for (int i = 0; i < returnedSellingManagerProductType.length; i++) {
SellingManagerProductDetailsType prodDetailType = returnedSellingManagerProductType[i].getSellingManagerProductDetails();
int qty = prodDetailType.getQuantityAvailable();
if (qty == 0) {
SellingManagerTemplateDetailsArrayType sellingTempArr = returnedSellingManagerProductType[i].getSellingManagerTemplateDetailsArray();
SellingManagerTemplateDetailsType[] selllingTempType = null;
if (UtilValidate.isNotEmpty(sellingTempArr)) {
selllingTempType = sellingTempArr.getSellingManagerTemplateDetails();
}
if (selllingTempType.length > 0) {
for (int j = 0; j < selllingTempType.length; j++) {
Long longTemplete = Long.parseLong(selllingTempType[j].getSaleTemplateID());