Identification



Welcome, Guest
Please Login or Register.    Lost Password?

Wrong calculation for the sum of 2 x 999?
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Wrong calculation for the sum of 2 x 999?
#22342
Wrong calculation for the sum of 2 x 999? 1 Year, 1 Month ago Karma: 2
If I add two entries with the base price of 999 to an invoice, the (german) summary looks like this:
Code:

Gesamtpreis     1.00
MwSt. 8%   -1&996.00
Bruttosumme     2.00

The Total (net of tax) amount, the minus prefix, the & instead of ' and the Total (inc. tax) acount is wrong. Changing the default language to en_US calculates this result:
Code:

Total (net of tax) 1.00
Total tax 8%  -1,996.00
Total (inc. tax)   2.00



Could my change in the main.lang to the german syntax be the reason for the calculation problem?
Code:

SeparatorDecimal=.
SeparatorThousand='
FormatDateShort=%d.%m.%Y
FormatDateShortJava=dd.MM.yyyy
FormatDateShortJQuery=dd.MM.yy
FormatDateHourShort=%d.%m.%Y %H:%M



Surprisingly, an Invoice with 'smaller' prices for single entries works like expected and with the perfect calculation:
Code:

Gesamtpreis 382.80
MwSt. 8%     30.63
Bruttosumme 413.43



Maybe this screen can help?
DolibarUser
Senior Boarder
Posts: 54
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2013/03/19 13:44 By DolibarUser.
The administrator has disabled public write access.
 
#22357
Re: Wrong calculation for the sum of 2 x 999? 1 Year, 1 Month ago Karma: 10
Hi,

Oops !! that's weird... which Dolibarr version are you using ?

Rgds.
humphrey
Gold Boarder
Posts: 164
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#22358
Re: Wrong calculation for the sum of 2 x 999? 1 Year, 1 Month ago Karma: 2
Version 3.3.1
DolibarUser
Senior Boarder
Posts: 54
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#22361
Re:Wrong calculation for the sum of 2 x 999? 1 Year, 1 Month ago Karma: 10
Oh I see... hope someone else will help you

Have a good day.
humphrey
Gold Boarder
Posts: 164
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#22388
Re:Wrong calculation for the sum of 2 x 999? 1 Year, 1 Month ago Karma: 0
did you try to escape those symbols with a \ or / before it "maybe" ?
HubZ
Senior Boarder
Posts: 52
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#22394
Re:Wrong calculation for the sum of 2 x 999? 1 Year, 1 Month ago Karma: 2
Unfortunately, escaping with \ or \\ or / or // doesn't help.
DolibarUser
Senior Boarder
Posts: 54
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#22436
Re:Wrong calculation for the sum of 2 x 999? 1 Year ago Karma: 2
The fix for the use of ' (Apostrophe) as SeparatorThousand fixed this calculation problem too!

The sum is now calculated as expected. Thank you, eldy!
DolibarUser
Senior Boarder
Posts: 54
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1