After ending a work period then starting a new one the order numbers are continuing instead of starting from 1

Hi guys, after ending a work period then starting a new one the order numbers are continuing from last order number instead of starting from 1.

Is this common in v5 or is it something that I need to set?

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.
  • Click Select Actions. Choose “Reset Daily Counter”.

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.

Thanks a million for clarifying :slight_smile:

I think it doesnt assign ORDERNUMBER as numeric value. I tried using the TN but then the tag doesnt work.

I used TN in Action for Tagging Ticket with Current Counter Number; (Tried both)
[=TN (’{:ORDERNUMBER}’)]
[=F(TN (’{:ORDERNUMBER}’),’#’)]

Help please. Thank you

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

Please explain what you are trying to do. As this [=F(TN (’{:ORDERNUMBER}’),’#’)] is not what JTRTech advised me.

You may also want to take a look at this thread

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.

You might want to send screenshots so that it can be seen and the Advanced guys might look into it for you.

Order No Tag

I just changed the formatting to this and will try and see if it works. The probem is in my ticket lister I sort by this ticket tag. The outcome is:

1
10
2
20
3

So do you want them to be sorted like this?:

1
2
3
4

Yes, please. I think because the tag is string , it is not being sorted as I want them to.

By Ticket lister are you meaning the entity screen or delivery screen could you send a picture of this?

You need to share all your actions and rules for resetting the counter so that it can be checked for typos / mistakes.

Check that you have followed this tutorial correctly:

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.
  • Click Select Actions. Choose “Reset Daily Counter”.

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…

Then you need to add this [=TN(’{SETTING:ORDER NUMBER}’)+1] in Give Ticket Number:

It’s better for you to create these rules and actions over as they need to be refreshed.

Can I see the Action for this rule please? In my one ORDERNUMBER doest appear.

Brackets need to be square [:ORDERNUMBER] and not curly { }

FF is format financial I beleive, ie, money.