Odd result from script to calculate days sales

Still I couldn’t catch that but I’ll be glad if you let me know something can be done on SambaPOS side.

Couldnt get to the bottom of it LOL :anguished:
Have settled for rounding as think it is such a small variance it would take an extreme amount of orders to equate to even a penny out… :smile:

Settle screen should handle tax rounding issues fine. Are you seeing a variance on SambaPOS or your script?

Script…
Im not sure why…
Are the [Order Table] - [Price] values whole number or recalculated from tax?

Yeah that upsets @QMcKay a lot but I’m really not aware of how it is stored in tables. We’re using an abstraction framework so I never type SQL Scripts, create tables or deal with database stuff.

Price should be just order price when tax not included. If tax included we use a different calculation method.

Ok so it may well be tax related like @QMcKay said.

Just cant work out why it doesnt present itself until 3+ calculations later after setting .toFixed(2) off the bat when defineing the orderPrice variable…

very strange…

@emre
I have built some nifty little scripts for returning State, Tax and CustomTag values given their Name/Type.
Would they be any use to make helper scripts?
Not sure how that works… guessing they are pretty much hard coded scripts?

We already have printer tags and report tags that does that. What kind of helper are you referring to?

for within scripts…
printer and report tags dont work in scripts do they?

ie with a small tweek you could have something like;

orderStateValue(<orderid>,<statename>) to return the state set for that state type on that order or similar.

The JSON format State, Tax and CustomTag are stored in obviously take a bit more work to extract than straight values from sql query.

Was just an offer :smile: can take it or leave it :stuck_out_tongue:

What I mean is why use a script for it? PS I’m not doubting you its probably my lack of following your PMS work.

1 Like

I guess if only handling a single order you could input the state or tag etc into the call but if you wanted to…
Ok well cant give an example.

If you wanted to intergrate with a PMS system and make a for loop though a set of tickets/orders LOL :stuck_out_tongue:

As i said just an offer if they were of any use :disappointed:

1 Like

Did you ever try the Loop Value action?

Once a long time ago, dont think it would have been quite up to the job of my needs :smile:
Bloody hope not anyway after writing all those scripts HEHE

It might help you streamline some of it though.

Not functional screenshot just showing built in parameters.

1 Like

But if you in a script and need to get the state or tag of an order :stuck_out_tongue: lol

I wont lie you hooked into scripts and SQL and have ran with it and didn’t look back. You have done some amazing things. I am sorry I havnt given much input I know it interest Q because thats his background.

I hope to get back into more exploring myself soon ive been very busy with business and my health.

What I was trying to do is explore options for use outside of PMS for what most readers of this forum are looking for. Great work with the scripts and SQL though props to you.

1 Like

Your integration approach is mostly scripted from SambaPOS side and mine most of the scripting was done on TimeTrex server side and I used SambaPOS tags etc to feed into it. Both are solid examples but I agree with what Q said recently I think its time to explore some real integration ideas and I think @emre is on to something with device events.

I had noticed you had been laying low recently, trust your health isnt causing you too many issues…

I know what your saying, was just offering some of the spools of my work…

If i say so myself I think I’ce picked it up pretty well considering I had never even looked at JScript/JavaScript and SQL up to a couple of months ago :smile:

Carefull with that word, we almost fell out over it a while back :stuck_out_tongue:

I am excited on this, would love to work on an integration for an online eCommerce system when we can, think (without being greedy) it would be very very marketable and profitable to be able to offer a local POS with integrated eCommerce site.

Im thinking more along restaurant online ordering and custom apps integration.