Hi All,
OrderReadHelper has 2 methods for getting backordered quantity.
getOrderBackorderQuantity and getItemBackorderedQuantity however, they
use different entity values to calculate backordered quantities.
I have since added a new method to OrderReadHelper that returns the
backordered quantity for an orderitem but using similar logic as
getOrderBackorderQuantity.
below is the code I used. Im not sure if this is something anyone else
would be interested in.
public double getOrderItemBackorderQuantity(GenericValue orderItem)
{
double backorder = 0.0;
List reses = this.getOrderItemShipGrpInvResList(orderItem);
if (reses != null) {
Iterator ri = reses.iterator();
while (ri.hasNext()) {
GenericValue res = (GenericValue) ri.next();
Double nav = res.getDouble("quantityNotAvailable");
if (nav != null) {
backorder += nav.doubleValue();
}
}
}
return backorder;
}
Thanx
Fred
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users