[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

discount calculation & tax calculation



Hi,

I run into some strange rounding issues with LedgerSMB.

I need to invoice the following:

9.6 items priced Euro 79.95
2176.98 items priced Euro 0.25
265.86 items priced Euro 0.25
1553.90 items priced Euro 0.25

and then provide a 30% discount. If I calculate the total first
(1766.705) and then apply the 30% discount, I get 1236.6935.
LedgerSMB seems however to apply the 30% discount to the item price, and
do some rounding there. I then get a subtotal of 1216.67

the invoice web page then shows the tax amount @ 19% as 234.97, but
printing the invoice as either pdf or html has 231.17 as the tax amount.
 The 234.97 in the invoice web would be the correct amount for a total
of 1236.69, and the 231.17 is correct for the 1216.67 total.

The desired behavior imho would be that rounding would be performed as
late a possible, and that calculations would be consistent in the web
interface and the invoices. The fact that the web interface comes up
with the correct tax amount for what I think is the right discount
calculation outcome, leads me to believe that this is implemented half,
but not fully.

Can someone point me out how I could correct this, or work around it?

I have not found a way to search the mailing list archives, so if this
is a FAQ, I apologize, and please point me to the right thread.

best regards,

-- 
Armand A. Verstappen <..hidden..>