After that I close all trasnsaction screens… when I go back and do open the very same trasnsaction that I just added I realize that the Total changed… and I did NOT change it…
What we store in database is Unit Price and as 8/12 is a infinite number (0.66666…) it rounds unit price while saving to database. Total always displays Quantity x Unit Price.
(20/6), (19/12) all too fractional… Hmm. Even we store 4 digits after decimal we won’t be able to calculate exact prices back…
I wondered doesn’t your supplier use a computer program to create the invoice? How unit prices appears on the invoice?
Hi @Emre… usually we dont buy by the unit, my supplier, and exactly that is why i found this, sells me a whole pack, 12 cans of coke at a price of 20… or 12 units of Itaipava at a price of 19… If I would buy only one or two units, the price changes… Thats why I found odd total price changing, when it never changed before.
this is realted to my other post: The one with inventory (I am on the phone and cannot copy past urls)
Before you were not defining default cost… you more than likely entered your total price and it filled in the rest… now that you defined default cost it is going to multiply units x unit price… it will not let you enter your own total because 1.58*12 does not =20 it = 18.96
Few versions ago it would crash if you entered wrong total… looks like @emre fixed that by making it fix itself.
I am usign transaction since day one…
when you enter unit price and not total it calculated total cost, when you entered something in total it calculated unit price.
now its working this way, just that after saving when you open the same transaction again, it does only one caclulation as if you would entered only unit price and does not take in account that i entered total price.
I dont know if you could follow my explanation… today I am not so good with words…
Before if you entered both and one was wrong it would allow it but if you opened the report again it would crash. Now it just corrects it as it calculates total=unit price*units there was a long discussion about the crash.
OK. On next version I’ll round and update total immediately so you’ll notice the change. However this is a tricky issue because Unit Price can be 0,66 or 0,67. Both does not make 8 when multiplied by 12. It will be 7,92 or 8.04.
That will be an issue when we start saving transactions to supplier accounts. While implementing it I’ll allow manual correction of grand total.
I should round that while saving to database. Otherwise unit price becomes 0.666666666666666666 and I don’t know how much decimals I should store to be able to calculate exact price.
I understand that but I am having hard time understanding the change. When I type 12 items at 8.00 it comes back with .67… it is already rounding it isnt it?
OOOOOOHHHH I see it now… ok what was causing that if you don’t mind me asking? It is not updating database? It is just showing it with its own calculation?
EDIT: Sorry @gerlandog I was misunderstanding you.
I agree the calculation it uses should be based off the two manually entered values. So if you entered Total it should round Unit price… if you enter unit price it should round total…
you do realize that this is the first time we agree at first sight??? LOL!!!
again, i just had a BIG caipirinha, and i am a little bit fuzzy… or, better, just HAPPPPPPYYYYYYYYYYYYYYYYYYYYYYYYYYYYY…