Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

micros - set a print frequency for a check trailer

Status
Not open for further replies.

charless777

Programmer
Jan 31, 2013
19
0
0
US
Hi,

RES 3700
I would like to print a special check trailer every third check.
Can anyone give me a lead on how to accomplish this?
 
Yes. Open notepad and paste the following in:

Code:
RetainGlobalVar

var CHK_COUNT : N1

event print_trailer : Spcl_Trl

    if CHK_COUNT <> 2
        CHK_COUNT = CHK_COUNT + 1
        exitcontinue
    endif
 
    CHK_COUNT = 0

    @trailer[ 1 ] = "this is line one of a special trailer!"
    @trailer[ 2 ] = "this is line two of a special trailer!"

endevent

Now do file save as, change the filter at the bottom from .txt files to all files, and save as pmsX.isl on your desktop.

Now, open Pos Configurator and go to Devices -> Interface and click the blue plus button. Name it something useful and check that it is a sim interface. You should not have to fill any other field out. Now, the object number for the sim is at the far left next to the name of the new interface. Rename pmsX on you desktop, replacing the X with that number. Eg: pms1.isl. copy this file to D:\MICROS\Res\Pos\Etc. Next copy it into each of the etcs folders in the workstation folders located in D:\MICROS\Res\CAL\WS#\CF\MICROS\Etc.

Finally, to get it to actually print now that the sim is in place, open pos Configurator -> Sales -> Descriptors and go to the trailers tab. In the last line of the trailer you want to append it to add: @@Spcl_Trl

I wrote all that out from memory on my iPhone so post back if I missed anything.
 
If you want every 3rd check# to print a trailer, regardless of the workstation you are using, try something like this:

Code:
event print_trailer: Spcl_Trl
    if @CKNUM % 3 = 0
        @trailer[ 1 ] = "this is line one of a special trailer!"
        @trailer[ 2 ] = "this is line two of a special trailer!"
    endif
endevent

Check numbers 3,6,9,...N will always print the trailer, regardless of the workstation used for printing.

Moregelen's solution will print the trailer every 3rd printing of any check#, and is specific to that workstation. So you may get some unexpected results if this isn't what you intend.
 
Your solution will print the third check for that workstation only; remember, most places when installed set each workstation to have a specific range of check numbers. So two side by side workstation can still print at the same time.

The only way to set a truly global counter that is independent of workstation would be to set a variable in the database somewhere.. and who wants to do that for printing checks?

Now, I will say that if this site was installed in such a way that all of the workstation are sharing a single pool of check number ranges, yes, your solution would work as way to globally print every third check. I'm just so used to the fact that every site we have installed have been assigned completely separate check pools.
 
Actually, now that I think about it, your solution using @CkSeqNum instead of @Cknum should work perfectly. The check sequence is simply going to be incremented in the database each time, independent of the workstation, so that should work even at sites that have their workstations on their own check number ranges.

Code:
event print_trailer: Spcl_Trl
    if @CkSeqNum % 3 = 0
        @trailer[ 1 ] = "this is line one of a special trailer!"
        @trailer[ 2 ] = "this is line two of a special trailer!"
    endif
endevent

Give that a try and see if it has the results you expect.
 
Using [tt]@CKSEQNUM[/tt] is a good idea for system-wide usage. Regardless, any solution we come up with is ignoring the fact that we don't really know what the actual intent is :)

Is it to print a limited survey? Is it a REPRINT alert intended per-check? A printed promo/discount for future visits? If it's a promo, you could game the [tt]@CKSEQNUM/@CKNUM[/tt] approach by opening 2 checks and trans-canceling them so that the next check has the trailer. If it's a REPRINT flag, you'd need to keep track of each check's printed count or pull it from the db (or is there an ISL var like [tt]@CHK_PRINTD_CNT[/tt]?)

Just for the sake of completeness, check number ranges can be assigned:
[ul]
[li]per Revenue Center[/li]
[li]per workstation (overrides RVC setting)[/li]
[li]assigned by employee (seems to be rare)[/li]
[/ul]

FWIW, the RVC option is what I've most frequently encountered. Easy to identify "Bar" checks vs "Dining", etc. by the range (i.e. 1000-1999 = Dining, 2000-2999 = Bar).
 
Well, it doesn't help that of the hundreds of sites that I've been connected to so far, they were all installed by my company, who uses a single set of standards. 'This is done this way, that is done that way.' Makes it a whole hell of a lot easier for our help desk to manage, but it does also mean that it will never matter how many of these sites I've seen; I'll never get to get a 'feel' for how most places do it.

Our standard calls for settings the check range based on the UWS number. So UWS101 is check range 1000-1999, UWS102 is 2000-2999, etc. We also only really set up revenue centers for places that have TRUE, separate revenue centers. Most restaurants don't actually need a separate revenue center for their bar/patio, even though they'll ask for it; we just set their reports up differently at that point.

Regardless, yes, you're right, without more details, any solution we come up with is only really a guess. At least he has a few different methods to try out now though. We've covered three ways to do it...
 
Hello Morgelen and Regilobo,

I am sorry that I have not replied until now. Took some time off, putting on my programming hat and will be working on this item later today.
We are looking to print a limited survey trailer at a couple of locations. I am not sure of the frequency yet but I setting this up to be every 3rd check to begin with.
Each site has three terminals.

I truly appreciate your time and solutions.
I will post the solution that works for me.

Thank you!
Charles
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top