Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
for (int k = 0; k < mOrder.getTmxOrderLine().size(); k++) {
Orderline mOrderLine = mOrder.getTmxOrderLine().get(k);
//match by product master id
if (mOrderLine.getProductMasterId().intValue() == mProduct.getSchemeProductMasterId().intValue()) {
quantityRequiredInOrder += mOrderLine.getOrderQuantity();
}
else
{
//this block will be used to compare productMasterId with child brand and its parent brand
int OrderLinePrdMasterId = mOrderLine.getProductMasterId().intValue();
ProductMaster prdMaster = ProductDomain.getProductMasterById(OrderLinePrdMasterId);
if(prdMaster != null) {
while (prdMaster.getParentProductMasterId() != 0) {
if (prdMaster.getParentProductMasterId() == mProduct.getSchemeProductMasterId()) {
quantityRequiredInOrder += mOrderLine.getOrderQuantity();
break;
}
prdMaster = ProductDomain.getProductMasterById(prdMaster.getParentProductMasterId());
}
}
}
}
if (quantityRequiredInOrder > 0) {
quantityForMultipler += quantityRequiredInOrder;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.