Common Command Button Recipes

From LaneWiki

Jump to: navigation, search

This page describes common command button recipes. Command buttons appear in menu-style pages where the action is specified as command= (as opposed to plu=). these include:

SysString:register-touch-functionpagesetup 
The Functions page of the tabpanel/notebook
SysString:net/L-ane/Register/Plugins/Func Frame 
The free-standing function buttons (CVS HEAD version of L’âne, bug 48)
SysString:net/L-ane/Register/Plugins/Manager Tab 
The Manager tab on the tabpanel/notebook ( This section may refer to features or tools which have not been integrated into the CVS HEAD version of L’âne, but do exist. See Bugzilla.)

Contents

Device Control

Ticket Reprint

Reprints the given ticket number (or the previous ticket if the necessary code has been loaded into SysString:register-initMachine-default) if the clerk is not inside of another sale.

item = Ticket\nPrint
foreground = black
background = white
command = if($#{$reg->{'sale'}{'items'}} == -1){return 0 if !$reg->{'sale'}->open($amt ? $amt : $main::lastTicketNumber); $reg->reprintProcess(, "Reprinted\n"); $reg->newTranz(); }

Errors

Cancel Sale

Cancels the current sale.

item = Cancel\nSale
foreground = black
background = red
command = @main::remoteData = (); $reg->cancelProcess() and $reg->newTranz();

Error Correct

Removes the previous item from the sale.

item = Error\nCorrect
foreground = black
background = yellow
command = $reg->errCorrectProcess('', $amt);

Void By Ticket Number

This section may refer to features or tools which depend on the CVS HEAD version of L’âne, bug 48.

Marks an existing ticket as void.

item = Void\nBy\nTicket #
foreground = black
background = red
command = $reg->triggerEvent('Lane/Register/Sale/Void by ID', $amt);

General

Customer

To open a customer, type the customer’s id then press this button.

item = Customer
foreground = black
background = RoyalBlue
command = $reg->custProcess('', $amt);

Discount

To specify a discount, 12 is the discount id.

item = Open\nTicket\nDiscount
foreground = black
background = white
command = $reg->discProcess(12, $amt);

Item/PLU

To emulate a plu= page item. myPlu is the product’s id.

item = This\nItem
foreground = White
background = Brown
command = $reg->itemProcess($qty, $amt, 'myPlu');

To emulate a plu= page item with direct multiplication. ( This section may refer to features or tools which have not been integrated into the CVS HEAD version of L’âne, but do exist. See Bugzilla.)

item = This\nItem
foreground = White
background = Brown
command = $reg->itemProcess($amt, '', 'myPlu');

Price Check

To check an item’s price without entering it into the sale.

item = Price\nCheck
foreground = black
background = RoyalBlue
command = $reg->priceCheckProcess('', $amt);

Receive on Account

To receive money into a customer’s account, after opening the customer, type the amount, then press this button.

item = R/A
foreground = black
background = RoyalBlue
command = $reg->raProcess('', $amt);

Resume a Suspended Ticket

To resume a previously suspended ticket, type the ticket number then press this button

item = Resume\nTicket
foreground = black
background = darksalmon
command = $reg->resumeProcess('', $amt);

Suspend a Ticket

To suspend a ticket (save it without finalizing it)

item = Suspend\nTicket
foreground =black
background = tomato
command = $reg->suspendProcess();

Tax Exempt

To exempt tax from a sale, press this button (customer’s who are tax exempt will automatically have their tax status applied to the sale when they are opened).

item = Tax\nExempt
foreground = black
background = Orange
command = $reg->exemptProcess();

Misc

External Command

To run an external command, myCommandXyz.

item = My\nCommand
foreground = black
background = green
command = system('myCommandXyz&');

L’âne Program

Similar to the External Command

item = Products
foreground = black
background = green
command = system("$ENV{'LaneRoot'}/backOffice/tkOffice/products&");

Tendering

Basic Tender Button

The basic button, either type in the amount, then press it (to specify the amount) or press it (to use Sale.due). In the example, 1 is the tender id of the specified tender. Also, note the button’s name (item=) does not need to match the tender’s description.

item = Check
foreground = black
background = RoyalBlue
command = $reg->tenderProcess(1, $amt);

Next Dollar

Rounds Sale.due to the next dollar.

item = Next\nDollar
foreground = black
background = green
command = $amt = $reg->{'sale'}->{'due'}; $amt = ($amt % 100) ? (int($amt/100) + 1) * 100 : $amt ; $reg->tenderProcess(0, $amt);

Preset Amount ($5, $10, etc)

For fixed, preset tender amounts, where the clerk only presses this button to automatically enter the specified amount. Like the register, this SysString has an implied decimal place (5.00 -> 500). Also, tender id 0 is the “Cash�? tender in the default datasets.

item=$5
foreground = black
background = green
command = $reg->tenderProcess(0, 500);

Subtotal/Amount Due

Pressing this button shows the amount due to both the clerk and the customer (on the pole display).

item = Subtotal
foreground = black
background = yellow
command = $reg->subtProcess();

Security

Clerk Logout

This first checks to make sure the clerk is not in a sale before logging him/her out.

item = Clerk\nLogout
foreground = black
background = red
command = if($#{$reg->{'sale'}{'items'}} == -1){$reg->clerkSignin()}
Personal tools