From 14c60bde2365b1e8de8f88a36f7522f2a2a6a06e Mon Sep 17 00:00:00 2001 From: Gopi Katwala Date: Tue, 16 Jul 2019 18:15:39 -0400 Subject: [PATCH] updated update_remaining_qty function --- AstuteSystem/sql/astute.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AstuteSystem/sql/astute.sql b/AstuteSystem/sql/astute.sql index 0c7d48d..c2b4e02 100644 --- a/AstuteSystem/sql/astute.sql +++ b/AstuteSystem/sql/astute.sql @@ -773,7 +773,7 @@ and invoice_detail.po_line_item_num = item_no_in and po_detail.PO_num = po_no and invoice.PO_num = po_detail.PO_num and invoice.inv_no = invoice_detail.inv_num -and invoice.inv_status = 2 +and (invoice.inv_status = 2 OR invoice.inv_status = 1) and invoice_detail.po_line_item_num = po_detail.line_item_no; update po_detail set remaining_qty = rem_qty where PO_num = po_no and line_item_no = item_no_in;