I can give you the DB if you want to check it yourself.
Was that on a fresh db?
yep.
Only thing installed was the file on this topic and I just added the users.
The only thing Ill admit I did not do yet was change the time offset to +54000. But that has nothing to do with the âAsk Questionâ rule that itâs meant to fire though.
I think I know what it is⊠It may be the constraint. sec
Hmm it loaded just fine for me on fresh DB. I created a User roll called Employee then created an employee and logged in as that employee and it worked.
Ok I did not have a role for Employee.
The user Shivan was set as admin.
Ill test this and check it now.
OK yes. I think i got your point before regarding admin.
I created user role Employee and assigned Shivan as employee.
Then I got the Clock in Prompt.
Ok I noticed a mistake it should be <br/>
lol
You need to also add a Cancel button on Clock out screen. Ill add that to the file soon.
Hmm yeah, I think the only thing at the moment seems to be the syntax error.
Most likely because of the trial account. Although I find it interesting they would do this when they actually provide an API for a trial account
They are a solid company with a really good product but I have had a confusing experience with the API. At first it used to have a function for PUNCH method and it was simple to code the call for it. You didnt have to worry about inserting the time etc. Then they removed it and made that internal only.
So I think it probably is because of trial they just dont expect anyone to try and use the API lol.
I had to go through three people before I finally got the actual developer and he knew what I was talking about.
Haha yes, that would make sense to a degree.
Will let you know once I hear back from them.
In the meantime, I wonder if I should create another free trial account and test the theory whether it really is the trial or is it just the API i received thats bad.
But im only curious to why I would get a syntax error and not a connection error of some sort.
That may just be how SambaPOS is coded to respond. The function I wrote is not coded to show an error msg.
Also I noticed that the file doesnt appear to have the rules to capture sales.
I checked all the rules for this but I couldnt find one that associated with capturing sales.
Is this how itâs meant to be? Besides the part in the script?
I did not include that one. I will give it to you.
Its a single rule.
7shifts.createReceipt('[=TN('{PLAIN TOTAL}')*100]','[=FD(ADS('{TICKET DATE:yyyy-MM-dd HH:mm:ss}',+18000),'yyyy-MM-dd HH:mm:ss')]','{TICKET ID}')
Edit the time offset in that one too.
Can use the same script execute action as the punch integration.
I am working on the script to edit sales receipts if you do a refund.