Home › Forums › Knowledge Base › Other Modules › Auto Close Utility
- This topic has 0 replies, 1 voice, and was last updated 19 years ago by
Rob.
-
AuthorPosts
-
April 14, 2006 at 12:24 pm #1489
Rob
MemberAuto Close Utility
AutoClos 6.06[color=red:g7ugljwq][size=120:g7ugljwq][b:g7ugljwq]PLEASE CHECK WITH RANDY BEFORE ADDING AUTO CLOSE TO ANY SITE THAT IS NOT ALREADY USING IT.[/b:g7ugljwq][/size:g7ugljwq][/color:g7ugljwq]
Auto Close is a shell utility that is designed to adjust sales and timekeeping records in a 24 hour restaurant so that cash drawer reports will balance with journal reports for the day. It also clocks employees out and back in so that their labor hours will be correctly allocated. Finally, Auto Close can make a remote request to TraPr to run an automatic settlement.
AUTOCLOS {/NoTraPr} {/Debug}
*
/NoTraPr – Tells Auto Close not to make a call to TraPr for the settlement
*/Debug – Optional parameter displays information on each step of the Auto Close process. Without this switch, there is no screen output.
Installation
The Auto Close executable should be placed in the Tools directory or some other directory in the path.
StylingAuto Close is designed to work in conjunction with styling that performs some of the error checking involved with the end of day procedure. In general, the Auto Close chain should first make sure that all requirements for running an end of day procedure have been met, then shell out to Auto Close. Upon return, the chain should check the Index variable to determine if Auto Close ran satisfactorily or if some error occurred. See the current Denny’s application for an example of styling Auto Close.
Variable UsagePassed to Auto Close
*
Decimal Time – Used to determine which checks within the journal need to be moved to the previous day.
*Date2 – Used to determine which journal and timekeeping files need to be adjusted.
Returned to Touchnet
*
Index – Returns the ending status of Auto Close. Values are:
0 – Auto Close completed successfully.
1 – Auto Close Successfully but did not receive acknowledgement that TraPr settlement was successful.
7 – Auto Close aborted because timekeeping files are locked by Manager.
8 – Auto Close aborted because new day has not started yet as defined in Global Options.
9 – Reserved for use by Touchnet to indicate a shell failure.
Technical
Auto Close performs several functions and performs several different error checks in the course of execution. The best way to explain it is to list each step in the order they are executed.
1.
On initial execution, the command line is checked for any optional switches.
2.Global.Dat is read to get the New Day Starts At setting, the Roll Journal Date Forward option, and the application version number.
3.The version number is checked to verify that Auto Close is compatible. Auto Close terminates with an error message if not.
4.Variable.Txt is read to get the Decimal Time and Date2 variables.
5.The Posting Date is calculated from the Date2 variable. If the Roll Journal Date Forward option is set, the Posting Date is the day after the date specified in the Date2 variable, otherwise the Date2 date is used as is.
6.The New Day Starts At setting is compared with the Decimal Time variable. If Decimal Time is lower than Auto Close aborts and returns a status 8 in the Index variable.
7.TimeIn.Lok is checked for existence. Its existence means that timekeeping files are locked and in use by another program, usually Manager. If true, Auto Close aborts and returns a status 7 in the Index variable. Otherwise Auto Close creates the file to lock out other programs.
8.A request to TraPr is submitted through the Tr-Req.Dat file to run a settlement and the Tr-Ack.Dat file is monitored for acknowledgement. If acknowledgement is not received, Auto Close continues but returns a status 1 in the Index variable. The /NoTraPr switch disables this step.
9.If a journal file exists for the posting date, all checks in that file are moved to yesterday and the file is erased. Note that this makes the new day for journal postings start at the time Auto Close is run.
10.Both the timekeeping files and the TimeIn.Dat file are checked for employees that clocked in yesterday but did not clock out as of the start of the new day. Employees that qualify are then clocked out and back in. Note that unlike journal files, the new day for timekeeping starts at the hour defined in Global Options.
11.The TimeIn.Lok file is deleted, releasing the timekeeping files for access by other programs.
12.The ending status is written to Variable.Txt. If not set in any of the steps above, a 0 is returned, indicating successful completion.
13.Auto Close terminates.
Revisions
5/4/99 6.00 rw
1. Initial Release.
5/17/99 6.02 rw
1. Changed handling of timekeeping so that employees are clocked out and back in based on the New Day Starts At Global Option as opposed to the time at the moment AutoClose was run.
7/7/99 6.03 rw
1. Stripped out all calls to video subroutines as they are not needed and were causing font information to be lost.
10/19/99 6.04 rw
1. Correct a bug where AutoClose gave an error 51 when Manager had the timekeeping files locked. It will now correctly return a status of 7 to indicate that it could not complete because of the lock.
1/27/00 6.05 rw
1. AutoClose now supports the new secret global option Roll Journal Date Forward feature that came out with Touchnet 6.58.
8/31/00 6.06 rw
1. Employees that clocked in before the new day started and clocked out after the new day started but before AutoClose was run were posting the entire entry to the day they clocked in. Corrected so that each portion of the shift would post to the correct day.
-
AuthorPosts
- You must be logged in to reply to this topic.