fixed the issue with draft Remaining Qty

This commit is contained in:
Gopi Katwala 2019-07-16 23:34:14 -04:00
parent 6f54177cad
commit 7935a39bc4

View File

@ -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<InvoiceDetail> 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 ";