From 716a69ba8223ae3f31d100d313e551c4d2ca4c54 Mon Sep 17 00:00:00 2001 From: Gopi Katwala Date: Wed, 19 Jun 2019 21:57:09 -0400 Subject: [PATCH] fixed a bug --- AstuteSystem/sql/astute.sql | 2 +- AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AstuteSystem/sql/astute.sql b/AstuteSystem/sql/astute.sql index a30be7b..2530a41 100644 --- a/AstuteSystem/sql/astute.sql +++ b/AstuteSystem/sql/astute.sql @@ -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; diff --git a/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java b/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java index 5e7616a..c4d4a9a 100644 --- a/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java +++ b/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java @@ -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);