mirror of
https://github.com/dyiop/astute.git
synced 2025-04-05 13:00:16 -04:00
fixed a bug
This commit is contained in:
parent
bcebd483f5
commit
530735f85b
|
@ -89,7 +89,7 @@ DECLARE detailCount int;
|
|||
SELECT COUNT(line_item_num) INTO detailCount FROM invoice_detail where inv_num = invoiceNum;
|
||||
if lineItemNum is null or lineItemNum = 0 then
|
||||
if detailCount > 0 then
|
||||
select max(lineItemNum) into maxlineItemNo from invoice_detail where inv_num = invoiceNum;
|
||||
select max(lineItemNum)+1 into maxlineItemNo from invoice_detail where inv_num = invoiceNum;
|
||||
else
|
||||
set maxlineItemNo = 1;
|
||||
end if;
|
||||
|
@ -121,7 +121,7 @@ SELECT COUNT(line_item_no) INTO podetailCount FROM po_detail where po_num = ponu
|
|||
|
||||
if lineItemNo is null or lineItemNo = 0 then
|
||||
if podetailCount > 0 then
|
||||
select max(line_item_no) into maxlineItemNo from po_detail where po_num = ponum;
|
||||
select max(line_item_no)+1 into maxlineItemNo from po_detail where po_num = ponum;
|
||||
else
|
||||
SET maxlineItemNo = 1;
|
||||
end if;
|
||||
|
|
Loading…
Reference in New Issue
Block a user