Urgent ... Weird behaviour when incrementing system variable

:confused:
2nd waitress clocked in an hour ago, no doubles right now ā€¦ but not a lot of customers this lunch time ā€¦ letā€™s wait.

I currently have the Script/Report method running, and no doubles.

Switched to Update +1 method without Report Tag, no doublesā€¦

Switched to Increase Value 1, no doublesā€¦

@plume,

Please post the Report you are using to track the SerialNumber Tag.

(Btw I donā€™t really need that reports to see doubles, the printed tickets are enough)

[SerialNumber:1, 3, 5]

{REPORT SQL DETAILS:

SELECT Id,Value,Name

FROM ProgramSettingValues

WHERE Id = '23'

:F.Id,F.Value,F.Name}



[Table Custom:2,2, 3, 2]

>Terminal|T Numb|SerialNumber|Amount

{REPORT TICKET DETAILS:T.Terminal,T.TicketNumber,TT.SunatNumber.desc,T.TotalAmount:}

I was told to use:
{GLOBAL SETTING:SerialNumber}
instead of
{SETTING:SerialNumber}

I am almost sure that will give NO double, I am just making a last try this lunch time replacing:

{GLOBAL SETTING:SerialNumber}
by
[=TN('{REPORT SQL DETAILS:SELECT [Value] FROM [ProgramSettingValues] WHERE [Name]='SerialNumber':F.Value}')]

Then Iā€™ll use you script.

##Report

[Ticket Serials:1,2,2,1,2,2,2]
>>DB|{REPORT SQL DETAILS:SELECT [Value] FROM [ProgramSettingValues] WHERE [Name]='SerialNumber':F.Value}

>>Payment
>tNum|tDate|pDate|Ser|tUser|pUser|Terminal
{REPORT PAYMENT DETAILS:T.TicketNumber,T.Time,P.Time,TT.SerNum.desc,T.User,P.User,T.Terminal}

>>Ticket
>tNum|tDate|pDate|Ser|tUser|pUser|Terminal
{REPORT TICKET DETAILS:T.TicketNumber,T.Time,T.LastPaymentDate,TT.SerNum.desc,T.User,-,T.Terminal}

The only diff I see is:

In Yellow, my ā€œTagValueā€ variableā€™s name was : ā€œSerialNumberā€ I donā€™t know if it has impact

Could you try with that?

UPDATE:

Got doubles.

Still no doubles.

Should not matter.

The variable name in the Action is not related to the Program Setting Nameā€¦ erm, at least it shouldnā€™t be!


Shouldnā€™t make any difference, but I will try it.

Currently still using Update+1 method, without Report (using {SETTING:SerialNumber}).

Do you mean to say use {GLOBAL SETTING:SerialNumber} in the Update and the Tag?

Is that mean Update Program Setting use value store in memory when Update Type set to Increase?

Seems that way, donā€™t know, just reporting it is ā€œbrokenā€, imo.

yes in both actions ā€¦

It seems if it find the value in memory it wonā€™t read from database. After logout from POS and log back in, it update correct value.

Changed to {GLOBAL SETTING:SerialNumber}

Got DOUBLES!

But hold onā€¦ I think I might have found a way to reproduce itā€¦

EDIT: Nope. Switched back to {SETTING:SerialNumber} and NO doubles.

Ok, so 2 things are ā€œBROKENā€ IMO ā€¦ causing DOUBLES ā€¦

Update Type: Increase fails to read the updated value.

{GLOBAL SETTING:X} is not always reading the value from the DB. It must be caching it somehow.


Using the following, I still get NO doublesā€¦

Update Type: Update using +1 method for increase.

{SETTING:X}