Hey everybody--
Something else interesting we encountered: when I wrote
getSuppliersForProduct a couple of years ago for purchasing, I had it
always return the lowest price of all the ones whose
minimumOrderQuantity < orderQuantity. This may not be the largest
minimumOrderQuantity below orderQuantity, however, so you might get
weird behavior like this:
0 - 1000 $1.00
1000 - 2000 $1.25
2000+ $1.50
In this case, if you try to order $2500, your price will be $1.00,
even though it should actually be $1.50 with this price schedule.
This price schedule might actually be the case for certain
commodities, so now I think it's a bug. The change is actually very
simple in SupplierServices.java:
- supplierProducts = EntityUtil.orderBy(supplierProducts,
UtilMisc.toList("lastPrice ASC"));
+ supplierProducts = EntityUtil.orderBy(supplierProducts,
UtilMisc.toList("minimumOrderQuantity DESC"));
Best Regards,
Si
[hidden email]