Found this as you mentioned it has been covered many times. Can you advise if the below should work for V5 as I found it on a V3 forum. Does this also have the duplicate implications as discussed in some of these threads.
Hello; While implementing some other SambaPOS features I’ve noticed we can create a counter that resets everyday…
Let me describe how it can be done:
Action for Increasing the counter
Create a new action, Name it as “Increase daily counter” and the Action Type will be “Update Program Setting”
Setting Name will be ORDERNUMBER
Setting Value is 1
Update Type is Increase
IsLocal = False
Action for Tagging Ticket with Current Counter Number
Create a new action, Name it as “Tag Ticket With Counter Number”, Action type is “Update Ticket Tag”
Tag Name will be Order No
Tag Value will be {:ORDERNUMBER} . That means Tag Value will be equal to current ORDERNUMBER setting.
Action for Resetting Counter
Create a new Action, Name it as “Reset Daily Counter” and the Action type is “Update Program Setting”
Setting Name = ORDERNUMBER
Setting Value = 0
Update Type = UPDATE
IsLocal = False
These are the required actions now we’ll create rules for defining how these actions will work.
Rule for Giving Next Number to Ticket
Create a new rule, Name it as “Give Ticket Number” and select “Ticket Created” event.
Click “Select Actions”. Choose “Increase Daily Number” and “Tag Ticket with Counter Number”
This rule will increase the number and tag ticket with that number.
Rule For Resetting Counter
Create a new rule, Name it as “Reset counter on End of Day”, and select “Work Period Ended” event.
This rule will reset counter when you end the work period.
For printing that number use {TICKETTAG:Order No} value tag. You can add that number to a printer template header or create a new template for printing a small paper that shows the customer order number…
Usong ticket tag is just a visual reference number, doesnt effect automation or database so no issues with duplicates.
The way to setup in v5 will be much the same as it was for v4 or v3.
You mean doesnt apply tag at all or as a string rather than number.
If no value at all TN or F is irelevent as not inputting a value.
Without seeing your setup its hard to know what problem is or exactly what you mean
TN or F are only really relevant if you need to force int rather than string for math based expression. Which I cant imagine your need in this case. A simple ticket tag is unlikely to matter if its an int or str.
As said I suspect a mistake means your nkt getting a value in the first place.
I assigned my own orders number using ticket tag but seems that the assigned numbers are string instead of numeric. When I sort them in the reports or ticket lister , they are not sorted properly so I was trying to format them as numbers. Maybe I am completely wrong.
This rule will reset counter when you end the work period.
For printing that number use {TICKETTAG:Order No} value tag. You can add that number to a printer template header or create a new template for printing a small paper that shows the customer order number…