-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
I've been looking through OrderReadHelper.java and found something that
I think is wrong, but I don't understand what's going on well enough to
be sure I am right. Could someone please take a look and see if this is
a serious bug that needs fixing?
I'm looking at a recent version from svn a few days ago.
The main code of concern is the method
public static BigDecimal getOrderItemsSubTotal(List orderItems, List
adjustments, List workEfforts)
Essentially it calls
BigDecimal itemTotal = getOrderItemSubTotal(orderItem, adjustments);
for each orderItem and then, if workEfforts is not null and the item is
a RENTAL_ORDER_ITEM it does a
itemTotal =
itemTotal.multiply(getWorkEffortRentalQuantity(workEffort)).setScale(scale,
rounding);
However the initial call to getOrderItemSubTotal(orderItem, adjustments)
ends up calling
public static BigDecimal getOrderItemSubTotal(GenericValue
orderItem, List adjustments, boolean forTax, boolean forShipping)
and this method seems to repeat the same logic for RENTAL_ORDER_ITEMs.
If I am reading this correctly, that means the result of the first
method will count the workeffort for RENTAL_ORDER_ITEMs twice.
Cheers,
Anne.
- --
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Phone: (03) 9585 6788
Fax: (03) 9585 1086
Web: http://www.cohsoft.com.au/
Email: [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIBaVbtgv4pchABrERAkY7AKCasGjO/MsbDkXVU9E/XqPDrrXlKgCeIMh0
mHSNz8goO5lWSNpM4DSvJuo=
=a79E
-----END PGP SIGNATURE-----