Total Pageviews

Thursday, December 19, 2013

Hard totals in ORPOS

Hard totals contain summary of financial information that is locally available to the register.  Hard totals also contain store status and transaction information, which is required to create transactions if the register goes offline.  A set of hard totals is kept for each till, each register, and the store.  The register hard totals contain a summary of the portion of its tills’ hard totals that occurred on that register; the store’s hard totals contain a summary of its registers’ hard totals. 

Note:  The number of sets of data for tills is determined by the setting of the Accountability system setting.
If the Accountability system setting is set to Cashier, the data is collected for each till in addition to the totals for the register.  If the Accountability system setting is set to Register, the data is collected for the single till used by the register.

Facts about Hard Totals Files

1.     Hard Totals contains financial data.  This data is stored so that it is accessible locally at the register.
2.     Sequence number recycles at the maximum, for example, (9999, the next number would be 0001).
3.     Hard totals are not updated when the system is in training mode.
4.     The system automatically resets the Hard Totals when the system detects a newer business date from persistent storage.
5.     When a till that was suspended on a different register is resumed on the current register (floating till), Hard Totals are only saved for the portion of till activity that occurs on the current register for that register.
6.     Per, PABP, PCI and SOX, social security numbers must not be in the clear, unless used for PAT Cash transaction.
7.     Per, PABP and PCI, passwords must not be in the clear.
8.  Default hard total size is configured in the device configuration file.

       Parameters/Configuration

Parameter Mnemonic
Description
Valid Values
filesize
Following configuration in POSDEVICES.XML determines the default hardtotal size.

SESSIONname="SimulatedHardTotalsSession"
devicename = "defaultHardTotals"          
PROPERTY propname="fileSize"

xxxxxxxx

The following information is a preliminary set of data stored in hard totals.  Any additional data shown in hard totals is acceptable.
Note: Hard totals keep track of the number of tenders.  If tenders are split, the counts are greater than the number of transactions.
Store Information
Register Information
Till Information
Store ID
Accountability
Till ID
Location Name
Last Transaction Sequence Number
Drawer ID
Address
Current Till ID
Cashier List (Employee ID and Information for Each Cashier)

 

Workstation ID


Store ID


Location Name


Address


Training Mode (true/false)


@Kapil Pant

Friday, December 6, 2013

SVN Administration (SVN user creation and directory access)

SVN  part 2 è SVN ADMINISTRATION

1.   How to create new user

[root@localhost]# htpasswd -md /etc/opt/CollabNet_Subversion/conf/svn_auth_file èenter

Password:è@@@@@@
Renter password è@@@@@@

2. How to provide rights to user

[root@localhost]# vi /etc/opt/CollabNet_Subversion/conf/svn_access_file

Open this file you will get this

è  [\]

= r  è this user will get only read permission
= rw è this user will get read-write permission


:wq! 
2.   HOW TO START AND STOP SVN SERVER

After installation of svn server on linux platform you can check the status of this service whether it is working or not via command 
[root@localhost]# lsof | grep 3326

In case if it is not working on your system.  you can start and stop this service using below command


[root@localhost]# ./etc/init.d/collabnet_subversion [start/stop/status/restart] 


List of files changed since a certain date using SVN

svn log -r {2016-09-01}:{2011-09-04} > log.txt (only shows the revisions and comments but not the files list)

--verbose (or -v) flag and you'll get a list of all affected paths as well as the log messages. If you want to get rid of the messages, add the --quiet (or -q) flag
svn log -qv -r {2016-09-01}:{2011-09-04} > log.txt


If you just want each changed file printed once (rather than for each revision in which it was changed), you could also do:
svn diff --summarize -r {2016-09-01}:{2011-09-04} > log.txt




SVN Installation (How to install svn in Redhat-enterprise linux)

SVN  Part è 1 : INSTALLATION

How to install svn in Redhat-enterprise linux 

Pre-requisite:--

First download the require rpm (below rpm or higher available)

(a)  CollabNetSubversion-client-1.4.6-3.i386.rpm
      (b)  CollabNetSubversion-server-1.4.6-3.i386.rpm 
Caution.: - make sure to install the client rpm first then server

1. [root@kapilhost CollabNetSubversion]# rpm -ivh CollabNetSubversion-client-1.4.6-3.i386.rpm

Preparing... ########################################### [100%]
   1:CollabNetSubversion-cli########################################### [100%]

2. [root@kapilhost CollabNetSubversion]# rpm -ivh CollabNetSubversion-server-1.4.6-3.i386.rpm

Preparing..  ########################################### [100%]
   1:CollabNetSubversion-ser########################################### [100%]


Creating new repository

First take backup of following file   /etc/opt/CollabNet_Subversion/conf/svn_access_file 

*Backup required restoration purpose in future.


[root@kapilhost ~]#  cp    /etc/opt/CollabNet_Subversion/conf/svn_access_file    

                                        /etc/opt/CollabNet_Subversion/conf/svn_access_file.bak  *(backup complete)

3. [root@kapilhost~]# cd /opt/         

4. [root@kapilhostopt]# ls 
now you can see CollabNet_Subversion under /opt directory.

5. [root@kapilhostopt]# cd CollabNet_Subversion/   (go inside  CollabNet_Subversion dir using cd )

7. [root@kapilhostCollabNet_Subversion]# ls    (using ls you can see the basic directory structure of svn)

    bin  build  docs  lib  modules  share

8. [root@kapilhostCollabNet_Subversion]# cd bin/

9. [root@kapilhostbin]# ls

ab            Configure-CollabNet-Subversion  htpasswd    svnadmin
apachectl     dbmmanage                       httpd       svndumpfilter
apr-1-config  envvars                         httxt2dbm   svnlook
apu-1-config  htcacheclean                    logresolve  svnserve
apxs          htdbm                           rotatelogs  svnsync
checkgid      htdigest                        svn         svnversion


10. [root@kapilhostbin]# ./Configure-CollabNet-Subversion   (execute file to setup svn)


CollabNet Subversion Server is a free download of open-source Subversion,
compiled and tested by CollabNet. For more information about CollabNet
Subversion, visit the CollabNet community at http://open.collab.net.


Would you like to configure the CollabNet Subversion Server now? [yes] yes

Welcome to CollabNet Subversion Server setup.

You will now be asked some questions to configure CollabNet Subversion.
Defaults are given in square brackets. If a default is okay for you
Just hit [Enter] to continue.    Press enter key


This setup can configure either Apache or svnserve as Subversion
server, for you. Would you like to configure Apache as your
Subversion server now? [yes] yes

Continuing with apache Subversion server configuration ...

Specify the base directory for Subversion repositories: [/var/svn/repositories]

Non-existing base path, Let me create and continue [yes] yes

Base path created.
Would you like to create a new Subversion repository? [yes] no

Would you like to give the name and port that the server uses to identify itself? [yes] yes

Registered DNS name or IP address: 172.18.64.111

Server port number: 3326

Allow anonymous read access? [no] no

0 users currently have access to this repository:

Would you like to create a new Subversion account? [yes] no

Stopping CollabNet Subversion: httpd (no pid file) not running  [  OK  ]                                                  
Starting CollabNet Subversion:                             [  OK  ]
  Congratulations! You have successfully configured the CollabNet
  Subversion server.

  You can access your repositories at the following URL:

  http://172.18.64.111:3326/svn/YOUR-REPOS-NAME




Tuesday, February 12, 2013

Adding custom design tag using Macrodef in ANT



Below we will learn how to use custom design ANT tag,

Macrodef is one of the most powerful ways of reusing Ant code.  Macrodefs allow us to define a “private method” with “parameters”, called attributes. Most uses of "ant calls"can be replaced by macrodefs. Macrodefs allow easier code flow than trying to specify “depends” which increase faster execution of build script.

       

** Note-  "propertyregex " performs regular expression operations on an input string, and sets the results to a property.

Input- The input String to be processed.

Global-Should a replacement operation be performed on the entire string, rather than just the first occurrence .

Benefit of using Macrodef.

Suppose as a user I have to define property java.compile.rversion and I passed compiler value as 1.5 but by mistake a space or tab character comes before the compiler value. If we will use the same it will fail while compiling but if we use "triminputproperty" and pass the compiler value into this it will auto remove the space before and after the passed value string and we can use the correct value.

property name=" java.compile.version" value="  1.5" ( Input with space character) (Removed angle bracket as they are not supported by blogspot)

  (now using trim if you check the value it will 1.5 without any space)
triminputproperty property="java.compiler.trimmed" input="${java.compile.version}"  

Now using echo we can verify the output.
echo message="${java.compiler.trimmed}" 

Cheers !


Tuesday, February 5, 2013

Batch file which can run on two or more Java/Jre version

Suppose you have a requirement to install a product/application on different type of hardware some of them uses Java/Jre5 and rest of them uses Java/Jre6 and we needed a single batch or sh file which can identify version according to hardware and install the application into the machine.

Here you go, this batch file will help you to implement these kind of requirements.




@echo off
REM Author @Kapil Pant
set JAVA_VERSION=1.6
set JAVA_VERSION2=1.4
if "%JAVA_HOME%" == "" goto javahomenotfound

REM Find Java executable

if not exist "%JAVA_HOME%\bin\java.exe" goto setjre
set JAVAEXE=%JAVA_HOME%\bin\java.exe
goto setjava
:setjre

if not exist "%JAVA_HOME%\jre\bin\java.exe" goto javahomenotfound
set JAVAEXE=%JAVA_HOME%\jre\bin\java.exe
:setjava

REM Verify correct Java version is being used
"%JAVA_HOME%\bin\java" -version 2>&1  | findstr /C:"%JAVA_VERSION1%"
If %ERRORLEVEL% EQU 0 goto goodversion
"%JAVA_HOME%\bin\java" -version 2>&1  | findstr /C:"%JAVA_VERSION2%"
If %ERRORLEVEL% NEQ 0 goto badjavaversion
:goodversion
set PATH=%JAVA_HOME%\bin;%PATH%
goto EOF

:javahomenotfound
echo You must set JAVA_HOME to a JRE or JDK
goto EOF

:badjavaversion
echo
echo Required Java %JAVA_VERSION% not found under %JAVA_HOME%
goto EOF
:EOF



Thursday, August 2, 2012

How to Increase Java memory option and GC (Garbage Collector ) in POS Client or any batch file


Below command will set Java Memory option in any batch file.
set JAVA_MEM_OPTIONS=-Xms256m -Xmx512m

Below command will add garbage setting in any batch file also you can generate GC log.
set GC_OPTIONS=-XX:NewSize=85m -XX:MaxNewSize=85m -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=50 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:+CMSParallelRemarkEnabled -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:+DisableExplicitGC -XX:+UseTLAB -Xloggc:%LOGHOME%/logs/VerboseGC.log

Note -%LOGHOME% is a variable you need to set its value somewhere in the batch file.

 Add more JAVA_OPTIONS lines to inlude more options.
set JAVA_OPTIONS=%JAVA_MEM_OPTIONS% %JAVA_OPTIONS% %GC_OPTIONS%





Wednesday, November 2, 2011

How-To Connect SquirreL to the Store and Corporate Databases


Squirrel Overview


If it becomes necessary to connect directly to the store or corporate databases, SQuirreL is considered one of the best clients to use.
SQuirreL SQL Client is a graphical Java program that will allow you to view the structure of a JDBC compliant database, browse the data in tables, issue SQL commands etc, see Getting Started and Introduction. The minimum version of Java supported is 1.6.x as of SQuirreL version 3.0. See the Old Versions page for versions of SQuirreL that will work with older versions of Java.

Assumptions

Windows XP
Java 1.6.x is installed
JAVA_HOME points to the Java 1.6.x installation


Required Software

SQuirreL
Oracle Thin JDBC driver (ojdbc6.jar)


Solution

Install SQuirreL
java -jar squirrel-sql--install.jar
Add the Oracle Driver
Click the ‘Drivers’ tab
Scroll down to ‘Oracle Thin Driver’
‘Drivers | Modify Driver…’
Click the ‘Extra Class Path’ tab
Click the ‘Add’ button
Navigate to ojdbc6.jar and click ‘Open’
Click ‘OK’
Create a New Alias for the Store Database
‘Aliases | New Alias…’
Set ‘Name’ to:
Store Database
Select ‘Oracle Thin Driver’ from the Driver drop-down list
Edit the URL to:
jdbc:oracle:thin:@orstores:1521:oretail
Set ‘User Name’ to:
bo
Set ‘Password’ to:
bo
Check the ‘Auto logon’ box
Click the ‘Test’ button
If successful, click the ‘OK’ button
Click the ‘OK’ button
Create a New Alias for the Store Database
‘Aliases | New Alias…’
Set ‘Name’ to:
Corporate Database
Select ‘Oracle Thin Driver’ from the Driver drop-down list
Edit the URL to:
jdbc:oracle:thin:@orstores:1521:oretail
Set ‘User Name’ to:
co
Set ‘Password’ to:
co
Check the ‘Auto logon’ box
Click the ‘Test’ button
If successful, click the ‘OK’ button
Click the ‘OK’ button
Connect to the Database :-
Select one of the aliases
‘Aliases | Connect’


How to connect with Offline DB..




For detail ...