Welcome, Guest
Username: Password: Remember me

TOPIC: Wrong calculation for the sum of 2 x 999?

Wrong calculation for the sum of 2 x 999? 1 year 7 months ago #22342

  • DolibarUser
  • DolibarUser's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 54
  • Karma: 2
If I add two entries with the base price of 999 to an invoice, the (german) summary looks like this:
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:
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?
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:
Gesamtpreis 382.80
MwSt. 8%     30.63
Bruttosumme 413.43

Maybe this screen can help?
Last Edit: 1 year 7 months ago by DolibarUser.
The administrator has disabled public write access.

Re: Wrong calculation for the sum of 2 x 999? 1 year 7 months ago #22357

  • humphrey
  • humphrey's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 169
  • Thank you received: 6
  • Karma: 14
Hi,

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

Rgds.
The administrator has disabled public write access.

Re: Wrong calculation for the sum of 2 x 999? 1 year 7 months ago #22358

  • DolibarUser
  • DolibarUser's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 54
  • Karma: 2
Version 3.3.1
The administrator has disabled public write access.

Re:Wrong calculation for the sum of 2 x 999? 1 year 7 months ago #22361

  • humphrey
  • humphrey's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 169
  • Thank you received: 6
  • Karma: 14
Oh I see... hope someone else will help you

Have a good day.
The administrator has disabled public write access.

Re:Wrong calculation for the sum of 2 x 999? 1 year 7 months ago #22388

  • HubZ
  • HubZ's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 79
  • Thank you received: 1
  • Karma: 0
did you try to escape those symbols with a \ or / before it "maybe" ?
The administrator has disabled public write access.

Re:Wrong calculation for the sum of 2 x 999? 1 year 7 months ago #22394

  • DolibarUser
  • DolibarUser's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 54
  • Karma: 2
Unfortunately, escaping with \ or \\ or / or // doesn't help.
The administrator has disabled public write access.

Re:Wrong calculation for the sum of 2 x 999? 1 year 6 months ago #22436

  • DolibarUser
  • DolibarUser's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 54
  • 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!
The administrator has disabled public write access.
Time to create page: 0.102 seconds