On Jan 7, 2008, at 11:04 AM, Scott Gray wrote:

Hi Jacopo

My understanding of calc and final:
calc - adjustment level rounding
final - the sum of all tax adjustments (tax total) is rounded to this
precision

Perhaps AcctgTransEntry.amount needs to store to a higher precision as well?

What Scott says above is correct as I understand it, but I'm not sure this last part is a good idea.

Accounting/GL transactions are meant to be final and to avoid problems they are structured in a way where reporting just involves adding things up and using straight totals with no rounding, etc to avoid any biasing (with the exception of certain averages and such, but that is different as precision on those is used in a different way).

It seems to me that posting anything to an accounting with more than 2 decimals of precision seems like a bad idea to me, except perhaps the infamous "rounding remainder" accounts. We should probably consult with an accounting before doing much of that sort of thing, but of course if we do change the AcctgTransEntry.amount to be higher precision we can always configure/code around it.

-David


On 08/01/2008, Jacopo Cappellato <[EMAIL PROTECTED]> wrote:

While testing the GL accounting transactions I've found something that
could be an issue in the procedure that computes the sales tax
adjustment for the invoice.
I've noticed that the InvoiceItem.amount for sales tax contains
sometimes a number with 3 decimals, even if the arithmetic.properties
file we have:

salestax.calc.decimals = 3
salestax.final.decimals = 2
salestax.rounding = ROUND_HALF_UP

You can recreate this by creating and invoicing a sales order for 3
units of GZ-1000.

For example, look at this invoice:


https://demo.hotwaxmedia.com/accounting/control/invoiceOverview?invoiceId=CI1

Having 3 decimals is an issue for the gl auto posting service for sales
invoices because the sales tax item generates an AcctgTransEntry, but
the AcctgTransEntry.amount field can only store 2 decimals.

I'd appreciate suggestions/hints.

Cheers,

Jacopo


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to