mirror of
https://github.com/dyiop/astute.git
synced 2025-04-05 21:10: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;
|
SELECT COUNT(line_item_num) INTO detailCount FROM invoice_detail where inv_num = invoiceNum;
|
||||||
if lineItemNum is null or lineItemNum = 0 then
|
if lineItemNum is null or lineItemNum = 0 then
|
||||||
if detailCount > 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
|
else
|
||||||
set maxlineItemNo = 1;
|
set maxlineItemNo = 1;
|
||||||
end if;
|
end if;
|
||||||
|
|
|
@ -278,7 +278,7 @@ public class SqlDAO extends DAO {
|
||||||
|
|
||||||
public void deletePO(String PONum) throws AstuteException {
|
public void deletePO(String PONum) throws AstuteException {
|
||||||
try {
|
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);
|
System.out.println(sql);
|
||||||
Statement stmt = conn.createStatement();
|
Statement stmt = conn.createStatement();
|
||||||
stmt.executeUpdate(sql);
|
stmt.executeUpdate(sql);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user