Hi, I added Tips functionality, and also I added a row in the Ticket Printer Template as follows:
Suggested Tip:|[{TICKET TOTAL}*0.1]
This row its because in my country the suggested tip its 10%, so for example, if the order total its $95, the suggested tip its 9.5. Everything prints fine when I Print the Bill before I add the tips, but if I add the Tips in payment screen, and then I Print the Bill, the suggested Tip field its calculated after the Tip:
Order total $95
Tip aded: $9.5
Total: $104.5
Suggested Tip: 10.45---------- (This is the problem)
So I need to make a substraction, something like this:
Suggested Tip:|[=({TICKET TOTAL}-“added tips”)*0.1]
Where “added tips” ammount its the field I dont know how to access.
Also I need some conditional (If, else or something) to print this row only in Tickets “To eat here”, and to not print when Tickets are “To Go”.
Actually Im using default tickets configuration, do I need to add another Ticket Type to differentiate tickets to go? or Can I use some kind of Variable to print or not that row?
That is checking the ticket Tag StayGO which is what his tutorial has you name it. Its checking if it equals To Go if it does then it displays whats after the ? if it doesnt match it displays whats after the : so by using ' ' it means display nothing.
if statements are used in Jscript with the scripting but they are not part of the printer template expressions. What I demonstrated is a ternary operator which acts similar to an if statement.
@Jesse it works great!, anyway I realized that in my restaurant, when I select a customer it means its an order To Go, so I need to use something like this:
Could you just clarify the use of that?
X==Y ? [if true] : [if false]
Excuse the lack of formatting etc am on phone and hard to see you post while typing…
The ? symbol its asking if the sentence its true, in this case, if entity customer its ‘’ (empty), then print ‘Dine In’, at least thats my understanding, correct me if Im wrong please