David,

Yeah, I got quite a surprise when I created products with prices like 0.4375 and they ended up being 0.43 in orders and on the invoices!

I'm not sure why OrderItem.unitPrice should be different the Product or SupplierProduct price? If someone wants to use a 3- or 4-digit price, wouldn't they want it to be the unit price on their orders?

Also, InvoiceItem.amount is not the line item's total amount. It is equivalent to the unitPrice on OrderItem, so ... that's why I thought they should all be changed to currency-precise

Of course, for people who are using 2-decimal prices, none of this would change things.

On Nov 21, 2006, at 7:53 PM, David E Jones wrote:


On Nov 21, 2006, at 8:09 PM, Si Chen wrote:

Hi all-

I noticed that while Product.price is currency-precise, certain fields which are related to it are only currency-amount, causing loss of precision when original prices have 3 or 4 decimal places of precision. Specifically, I think the following should all be changed to currency-precise:
SupplierProduct.lastPrice
OrderItem.unitPrice, unitListPrice, unitAverageCost, unitRecurringPrice
InvoiceItem.amount

Is there any reason why these shouldn't be currency-precise?

Most of these look fine, but I'm not sure about OrderItem.unitPrice, and I'm pretty uncomfortable with InvoiceItem.amount.

OrderItem.unitPrice may be arguable because some calculation may be done based on that, but the InvoiceItem.amount should be something that never results in any surprises...

-David

Best Regards,

Si
[EMAIL PROTECTED]



Reply via email to