Last active
July 10, 2018 09:41
-
-
Save engr-erum/841b15a8de127ec1d28ff44d115b6216 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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