Just today I’ve found that I can put all the tags inside a single button using the order tags prefixes.
Works great and its a powerfull feature.
Now my problem its with the kitchen ticket template, I have all the “CHEESE” tags under the prefix “CHEESE”, all the “VEGGIES” under “GREEN”… now when I print a ticket looks like:
░░░░░░░░░░░░░░░ B U R G E R ░░░░░░░░░░░░░░
1 110grs CUSTOM BURGER
CHEESE * Provolone
CHEESE * Mozzarella
GREEN lettuce
GREEN onion
I need to remove the “CHEESE” and “GREEN” words from the ticket but I can not figure how to do it
Automation>Scripts contains a list of javascript scripts which you can call from many places across samba.
Inside the script you can create a function and then call this function from within the ticket template using a command such as {CALL:myScript.myReplaceFuntion(’{ORDER TAG}’)}
You can use pretty standard javascript to actually do the replacement, so you can look on general javascript forums to work out how you can take an input string and remove the words you are looking to remove. There will be many ways to achieve this in javascript including using regex, but I am not sure what would be the best and most efficient method.