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
3ba902bfe4
commit
716a69ba82
|
@ -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)+1 into maxlineItemNo from invoice_detail where inv_num = invoiceNum;
|
||||
select max(line_Item_Num)+1 into maxlineItemNo from invoice_detail where inv_num = invoiceNum;
|
||||
else
|
||||
set maxlineItemNo = 1;
|
||||
end if;
|
||||
|
|
|
@ -278,7 +278,7 @@ public class SqlDAO extends DAO {
|
|||
|
||||
public void deletePO(String PONum) throws AstuteException {
|
||||
try {
|
||||
String sql = "DELETE FROM PO SET final = 1 WHERE PO_Num = '" + PONum + "' AND final = 0";
|
||||
String sql = "DELETE FROM PO WHERE PO_Num = '" + PONum + "' AND final = 0";
|
||||
System.out.println(sql);
|
||||
Statement stmt = conn.createStatement();
|
||||
stmt.executeUpdate(sql);
|
||||
|
|
Loading…
Reference in New Issue
Block a user