diff --git a/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java b/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java index 28577dc..e36afd7 100644 --- a/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java +++ b/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java @@ -489,7 +489,7 @@ public class SqlDAO extends DAO { Double previouslyBilledAmt = getPreviouslyBilledAmount(PONo); if (invoice.getInvoiceStatus()==2) { - // TODO substract current invoice's bill amount from previouslyBilledAmt + // TODO subtract current invoice's bill amount from previouslyBilledAmt // if it is a submitted invoice } Double toBeBilledAmt = po.getContractAmt() - previouslyBilledAmt - invoice.getBillAmt(); @@ -547,8 +547,8 @@ public class SqlDAO extends DAO { try { List services = new ArrayList<>(); Statement stmt = conn.createStatement(); - String sql = "SELECT inv_num, line_item_num, PO_line_item_num, service_type_id, description, fee_type_id, fee, qty, get_draft_remaining_qty_fun('"+invoiceNum+"',"+ lineItemNo + ") as draftRemainingQty FROM INVOICE_DETAIL "; - + String sql = "SELECT inv_num, line_item_num, PO_line_item_num, service_type_id, description, fee_type_id, fee, qty, get_draft_remaining_qty_fun('"+invoiceNum+"',line_item_num) as draftRemainingQty FROM INVOICE_DETAIL "; + System.out.println(sql); String whereClause = " WHERE "; boolean whereClauseIndicator = false; if (invoiceNum != null) { @@ -563,6 +563,7 @@ public class SqlDAO extends DAO { } sql += whereClause; + System.out.println(sql); ResultSet rs = stmt.executeQuery(sql); while (rs.next()) { String invNo = rs.getString(1); @@ -584,6 +585,7 @@ public class SqlDAO extends DAO { } } + public void updateInvoiceMaster(String invoiceNum, String invoiceDate, String PONum, int pmtStatus, Double billAmt, String specialNotes, String certification, int invoiceStatus)throws AstuteException { try { String sql = "UPDATE INVOICE ";