[Home] [Help]
1357: --IF covered inventory is negative then reassign it to 0
1358: IF l_inventorydetails_tbl(i).covered_quantity < 0 THEN
1359: l_inventorydetails_tbl(i).covered_quantity := 0;
1360: END IF;
1361: -- Delete existing rows in DPP_INVENTORY_DETAILS_ADJ_ALL (if any)
1362: DELETE
1363: FROM DPP_INVENTORY_DETAILS_ADJ_ALL
1364: WHERE INVENTORY_DETAILS_ID IN
1365: (SELECT INVENTORY_DETAILS_ID
1359: l_inventorydetails_tbl(i).covered_quantity := 0;
1360: END IF;
1361: -- Delete existing rows in DPP_INVENTORY_DETAILS_ADJ_ALL (if any)
1362: DELETE
1363: FROM DPP_INVENTORY_DETAILS_ADJ_ALL
1364: WHERE INVENTORY_DETAILS_ID IN
1365: (SELECT INVENTORY_DETAILS_ID
1366: FROM DPP_INVENTORY_DETAILS_ALL
1367: WHERE org_id = l_hdr_rec.org_id
1437: END IF;
1438: END;
1439:
1440: INSERT
1441: INTO DPP_INVENTORY_DETAILS_ADJ_ALL(
1442: inv_details_adj_id,
1443: inventory_details_id,
1444: date_received,
1445: days_out,