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

Re: rounded values in templates - linetotal

Dear Chris

* Chris Travers [2013-06-13 22:05:22 -0700]:


> > maybe I've found the issue in discount amount rounding method, please see
> > https://sourceforge.net/p/ledger-smb/bugs/862/#ad33

I've posted a patch there, please have a look as soon as you can


> The discount rounding method is a bit complex.  We round the unit price,
> not the extended price.

yes I see, but I see that the method used in LedgerSMB/OE.pm is
different from that used in bin/io.pl, that's the issue I think

I mean: in OE.pm the $discount is rounded and **then** substracted from
$sellprice_i while in io.pl the discount is calculated "inline", thus not
rounded before being subtracted: this causes different results in certain

this means that sometimes (like the example I spotted in my bug report)
values in order forms are different from that (the correct ones) in printed
forms (HTML or PDF)

the very same applies to tax calculation in io.pl, where discount is
calculated "inline" and not rounded before being subtracted, causing
different taxes in order form and in order templates


please have a look to my patch

thanks a lot!

Giovanni Biscuolo

Xelera - IT infrastructures

Attachment: signature.asc
Description: Digital signature

This SF.net email is sponsored by Windows:

Build for Windows Store.

Ledger-smb-users mailing list