Help with Printer Scripts

General Information about POS Pizza 6
Member
Posts: 23
Joined: Thu Aug 28, 2014 2:28 am

Help with Printer Scripts

Postby mrk90 » Thu Aug 28, 2014 2:50 am

Hi, I'm customising my receipts and having some trouble finding info on the codes for different data points. Does anyone have a quick reference sheet for this?

Eg. From experimentation I've found that: '%cf' prints the full customer address, '%ca' the customer name, and '%cs' the street - but I haven't been able to find the codes for 'City' & 'Address Line 2'

Here's the top part of my current script. I'm looking to have the address print only on Delivery orders (but Name/Phone appear on all order types). Any help would be much appreciated!

; TOP SECTION
%f1 ; Use Font 1
%cl%li ; Center Legal Name
%f1 ; Use Font 1 for remainder
%el ; empty line
%cl%d2 ; print date & time
Cshr: %cn ; print cashier name
%po%tbTable: %tb ; print table (if there)
%el ; empty line
%cf ; full customer address
PH: %cp ; customer phone #
%el ; empty line if phone or delivery
%nn %tp ; type RIGHT

Site Admin
User avatar
Posts: 2183
Joined: Wed Apr 16, 2003 4:35 pm
Location: Western PA

Re: Help with Printer Scripts

Postby Scott » Thu Aug 28, 2014 6:35 am

There is a file called "Receipt Printing Scripting Codes" that can be found on the Windows "start" menu in the POS Pizza group as well as it can be found in the install folder location. The contents of this file are shown below.

Code: Select all
Receipt Print Markup Language

' Formatting Control Codes

'  FONT-CHANGE and LINE FORMATTING *MUST* appear prior to any other codes or text on a given line!

%cl  -  Centering ON
%nn  -  No New Line, Remaining data is on the same line as last data (continuation of previous line)
%lj  -  left justify ON (default)
%rj  -  right justify ON
%f1  -  Use Font 1
%f2  -  Use Font 2
%f3  -  Use Font 3
%f4  -  Use Font 4
%el  -  empty line

'  Conditional Printing

%po  -  Print only if following parameter is NON-ZERO or Not NULL.
           Useage:  %po%t1%rjTax 1: %t1  Would print Tax 1: $0.33
           only if %t1 (tax 1 amount in this case) is not zero.
           Otherwise everything on a line after this command is ignored.
%fd  -  Flag "Is Delivery",  returns 1 if order is a delivery or 0 if not.  This is for use with %po to
        determine whether or not an order is a delivery order
%fc  -  Flag "Is Carry-Out"  returns 1 if order is a carry out order, otherwise 0 is returned.
%fn  -  Flag "Is Dine-In"  returns 1 if order is a dine-in order, otherwise 0 is returned.
%fp  -  Flag "Print Phone" returns 1 if Always Print Phone is enabled OR if order is a delivery. Otherwise 0 is returned.
%fa  -  Flag "Print Address" returns 1 if Always Print Addr is enabled OR if order is a delivery. Otherwise 0 is returned.
%fx  -  Flag "Is Tax Exempt" returns 1 if order is Tax Exempt, otherwise 0 is returned
%ft  -  Flag "Is *NOT* Tax Exempt" returns 0 if an order is Tax Exempt, otherwise 1 is returned (opposite of %fx)
%fe  -  Flag "Is Edit Print" returns 1 if print session is during an edit & save, otherwise 0 is returned


'  Header & Layout Codes

%li  -  Legal License Name/City/Phone  MUST APPEAR 1 TIME or will be inserted at top of receipt
%ln  -  Line
%lg  -  Logo
%ed  -  Extra Data
%ef  -  Extra Data Field Name
%rp  -  Reprint (is "Reprint" if receipt is a reprint otherwise it is empty)
%on  -  Order Number
%tp  -  Order Type (Dine, Cary, Deliv)
%tb  -  Table Name/# if dine-in module order (should be used with the %po command to test for data first)
%cn  -  Cashier (Display Name)
%sn  -  Station (Computer Name)
%ca  -  Customer Name
%cp  -  Customer Phone #
%ce  -  Customer Email Address
%cf  -  Customer Full (Street) Address (House + Street + AddrLine2 + City, St + Zip)
%cs  -  Customer Street Address (House + Street Only)
%c2  -  Customer Address Line2
%ct  -  Customer Points Available
%ot  -  Order Time/Date   (SQL Format)
%dy  -  Order Year
%dm  -  Order Month Number
%dd  -  Order Date (Day number)
%dM  -  Order Month Name (Abreviated 3 characters)
%dD  -  Order Day Name (Abreviated 3 characters)
%d2  -  Order Time (12 Hour)
%d4  -  Order Time (24 Hour)
%pt  -  Print Time/Date   (SQL Format)
%py  -  Print Year
%pm  -  Print Month Number
%pd  -  Print Date (Day number)
%pM  -  Print Month Name (Abreviated 3 characters)
%pD  -  Print Day Name (Abreviated 3 characters)
%p2  -  Print Time (12 Hour)
%p4  -  Print Time (24 Hour)
%di  -  Delivery Instructions (Directions)
%pr  -  Promo Message
%sl  -  Slogan Message (single-spaced)
%s2  -  Slogan Message (double-spaced)
%em  -  Store Email Address
%dc  -  Delivery Charge Name  eg.  "Delivery Fee"
%n1  -  Tax 1 Name
%n2  -  Tax 2 Name
%n3  -  Tax 3 Name
%n4  -  Tax 4 Name
%dn  -  Discount Name

' Total Codes
%z1  -  Cash Tendered Amount
%z2  -  Check Tendered Amount
%z3  -  Credit Card Tendered Amount
%z4  -  Gift Card Tendered Amount
%z5  -  Billed To Account Amount
%z6  -  Customer Credit Awarded Amount
%z7  -  Points charged (taken from customer) Amount
%z8  -  Points earned (given to customer) Amount
%z9  -  Change given back to customer Amount
%z0  -  CashBack Amount (Debit Card Purchase)
%za  -  Debit Card Tendered Amount
%zb  -  Payment Due Amount
%b1  -  Gift Card Balance ( Prints NULL if no balance returned so can be used conditionally with %po )
%b2  -  Prepaid Card Balance ( Prints NULL if no balance returned so can be used conditionally with %po )
%tt  -  Total Tax Amount
%t1  -  Tax 1 Amount
%t2  -  Tax 2 Amount
%t3  -  Tax 3 Amount
%t4  -  Tax 4 Amount
%t5  -  Delivery Tax Amount
%df  -  Delivery Fee Amount
%ds  -  Discount Amount
%st  -  Sub-Total
%to  -  Total


'  Per Order Item Codes

%fi  -  Full Item Info (No other codes needed)
%if  -  Item Name + Toppings (traditional style)
%qt  -  Quantity
%it  -  Item Name
%nf  -  Next Topping (Full Name) - Must appear twice to show layout for all of the toppings and only if %fi or %if NOT USED!
%nt  -  Next Topping (Abev Name) - Must appear twice to show layout for all of the toppings and only if %fi or %if NOT USED!
%ic  -  Item Charge
%si  -  Special Instructions


;  -  Comment, can be the fist thing on a line or after other data.  Everything after this and all space from last
      entry up to this point will be ignored.

Each line will print as a single line of text.  Any line breaks in the script are ignored so if you want multiple
line breaks use the %el (Empty Line) command to force a line-feed on your receipt.

The %nn command on the otherhand will continue a line of text on the same line as the one above it so you could
have 2 separate lines of data in a script that actually print as a single line if the 2nd line begins with %nn.
The %nn must be first on a line or it will be ignored.





---- Example Script ----

%lg                    ; Print Logo
%f3                    ; Use Font 3
%cl%li                 ; Center Legal Name
%f1                    ; Use Font 1
%el                    ; empty line
%ln                    ; Print a LINE
%el%lj                 ; empty line & Left Justify
%f2Cashier: %cn        ; Cashier Name
%po%tb%nn%rjTable: %tb ; Right Justified Table on same line as cashier
                       ; IF Table is Valid!
%el%f2                 ; another empty line, font 3
%cl#%on - %ot          ; Order # and time/date in SQL format
                       ; empty lines are ignored
%f1                    ; back to font 1 for items
%el%ln%el              ; a couple emty lines, and then a LINE
:For Each Item         ; Begin Per Item Layout
%lj                    ; Items will print like:
%qt  %it%po%si / %si   ;   1 Large Pizza / Unbaked         $12.49
%nn%rj%ic              ;        Pep, Msh, 1/2a(BOlv, On)
;%lj     %nt, %nt      ; *if it wraps it won't indent!
%cl%nt
%cl%nt
:End Item              ; end of per item layout
%el                    ; print an empty line
%ln                    ; print a LINE
%el                    ; another empty line
%rj%po%ds%dn: %ds      ; discount (if present)
Tax: %tt               ; Right Justified,      Tax: $0.45
Total: %to             ; Right Justified,   Total: $15.85
%el                    ; empty line
%clT H A N K   Y O U ! ; Centered, Literal Text
%el                    ; empty line
%clEmail: %em          ; Centered, Email: ouraddress@ourdomain.com
%el%el%el              ; empty line
                       ; job end



Scott

Member
Posts: 23
Joined: Thu Aug 28, 2014 2:28 am

Re: Help with Printer Scripts

Postby mrk90 » Fri Aug 29, 2014 7:38 am

Excellent! Thanks so much

Member
Posts: 23
Joined: Thu Aug 28, 2014 2:28 am

Re: Help with Printer Scripts

Postby mrk90 » Sat Nov 26, 2016 1:07 pm

Hi Scott, are there codes to print "City" or "ZIP Code" as discrete values? (Instead of printing as part of full address.) I don't see it anywhere in the file.

Site Admin
User avatar
Posts: 2183
Joined: Wed Apr 16, 2003 4:35 pm
Location: Western PA

Re: Help with Printer Scripts

Postby Scott » Mon Nov 28, 2016 7:40 am

At present there are not. I will look into possibly having these added for v7.


Scott

Return to General Information

Who is online

Users browsing this forum: No registered users and 1 guest