Currency on Restaurant project

I am working on a restaurant project and i have a problem with currency.

i have an item that has 0,15 quantity and 15,9 price
total = 0,15 * 15,9 // that means that total = 2.385

tfTotal.text = Str(total) // returns 2.38 but cash machine returns 2.39

Does anyone has a proposal?

x=ceil((quantity * price)*100)/100

How about using the rounding function ROUND?

See https://documentation.xojo.com/index.php/Round

[quote=348477:@Markus Winter]How about using the rounding function ROUND?

See https://documentation.xojo.com/index.php/Round[/quote]
in retail you always ROUND UP… not nearest

You will need to check how the machine performs rounding. It could be round down, round up or possibly something like bankers rounding.

Not at the shops here (they try to get rid of the 1 and 2 cent coins so round up or down to the nearest 10 cent).

But it’s a good point and should probably be a preferences setting.

please read the LR on ROUND… there is no ambiguity

When they first dropped our 1c and 2c coins, the rule was to round to the nearest 5c. So $1.02 was rounded down to $1 and $1.03 was rounded up to $1.05. I was working with POS software at the time and I remember optioning this to avoid arguments with customers who didn’t understand, or didn’t want to understand, the legislation. Fun times.

a good businessman would round down always, so the customer feels happy.

Is that a portion of 15 clams from a pot of 100?
Im curious - What does a restaurant sell in fractional amounts?

In US it is up to nearest 1c …

so I I buy something for 50c … with tax it is 54c… but if I buy 2 of them… its is 1.09

LOL… not in any Capitalistic society I’m aware of … plus in MOST cases those fractions result from Sales Tax… and the Taxman wants his due.

I might be wrong (often am) but I think the US is fairly unique in having a different sticker price to the price you pay at the till. It still surprises me that I can pick up an item off the shelf which is marked at one price and then, when I go to pay for it, I am charged a different price after tax has been added. In most other places on the planet (or, at least, those that I’ve been to), the marked price has to be the actual price.

When I read it, I though it may be wine. 15.90€ the bottle and 150ml per glas.

So 15.90 would be including tax.

And I would sell the glas for 2.90 to make the bottle cheaper than buying a lot of glasses.

Jason… every CITY (at least in California, has its own Sales Tax, as does the State)…
When people around here buy a car, they sometimes will drive hundreds of miles to find a low sales tax county, since that could add up to a bit of $$$

So yeah… it the sticker says $1.00… I actually pay 1.09

That’s the reason I don’t like to use cash in the states.
Always give credit card.

[quote=348496:@Christian Schmitz]That’s the reason I don’t like to use cash in the states.
Always give credit card.[/quote]
and that allows you to NOT pay US sales tax???

Yes we used to have sales tax too, but then lots of different taxes were replaced by a single consumption tax 17 years ago (like the European VAT but called GST here). But even if you do still have sales tax, I don’t understand why the sticker price on the shelf can’t show the actual price. After all, the merchant knows which city and state their store is in.

Its a nightmare on a web site that trades internationally, if people expect the price to ‘know where they live’
One reason why I pay FastSpring to take the hassle away.

But I cannot understand why when I visited New York, where THEY ALREADY KNOW THE TAX… you see a sign that says 'buy this for only $16, and then maybe charge you $16, and maybe charge you $20

That said, my wife just told me to close my eyes, hand over the wallet and try not to worry about it… holidays are not for penny pinching. :slight_smile:

Edit:

yeah, that!

I was referring to how the cash machine rounds not Xojo.