mirror of
https://github.com/dyiop/astute.git
synced 2025-04-05 21:10:16 -04:00
Add files via upload
This commit is contained in:
parent
a09b960bce
commit
ea91c8d756
|
@ -111,11 +111,11 @@ public abstract class DAO {
|
|||
|
||||
public abstract void updateInvoiceMaster(String invoiceNum, java.sql.Date invoiceDate, String PONum, int pmtStatus, Double billAmt, String specialNotes, String certification, int invoiceStatus) throws AstuteException;
|
||||
|
||||
public abstract void updateInvoiceDetail(String invoiceNum, int lineItemNum, int POLineItemNum, int serviceTypeId, String desc, double qty, double fee) throws AstuteException;
|
||||
public abstract void updateInvoiceDetail(String invoiceNum, int lineItemNum, int POLineItemNum, int serviceTypeId, String desc, double qty, double fee, int feeTypeId) throws AstuteException;
|
||||
|
||||
public abstract void createInvoiceMaster(String invoiceNum, java.sql.Date invoiceDate, String PONum, int pmtStatus, Double billAmt, String specialNotes, String certification, int invoiceStatus) throws AstuteException;
|
||||
|
||||
public abstract void createInvoiceDetail(String invoiceNum, int lineItemNum, int POLineItemNum, int serviceTypeId, String desc, double qty, double fee) throws AstuteException;
|
||||
public abstract void createInvoiceDetail(String invoiceNum, int lineItemNum, int POLineItemNum, int serviceTypeId, String desc, double qty, double fee, int feeTypeId) throws AstuteException;
|
||||
|
||||
public abstract String generateInvoiceNumber(String poNum) throws AstuteException;
|
||||
|
||||
|
|
|
@ -321,7 +321,7 @@ 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, percent_completion, hours,amt FROM INVOICE_DETAIL ";
|
||||
String sql = "SELECT inv_num, line_item_num, PO_line_item_num, service_type_id, description, fee_type_id, fee, qty FROM INVOICE_DETAIL ";
|
||||
|
||||
String whereClause = " WHERE ";
|
||||
boolean whereClauseIndicator = false;
|
||||
|
@ -344,9 +344,10 @@ public class SqlDAO extends DAO {
|
|||
int POLineItemNum = rs.getInt(3);
|
||||
int serviceTypeId = rs.getInt(4);
|
||||
String desc = rs.getString(5);
|
||||
Double qty = rs.getDouble(6);
|
||||
int feeTypeId = rs.getInt(6);
|
||||
Double fee = rs.getDouble(7);
|
||||
InvoiceDetail service = new InvoiceDetail(invNo, lineItemNum, POLineItemNum, serviceTypeId, desc, qty, fee);
|
||||
Double qty = rs.getDouble(8);
|
||||
InvoiceDetail service = new InvoiceDetail(invNo, lineItemNum, POLineItemNum, serviceTypeId, desc, qty, fee, feeTypeId);
|
||||
services.add(service);
|
||||
}
|
||||
return services;
|
||||
|
@ -384,7 +385,7 @@ public class SqlDAO extends DAO {
|
|||
}
|
||||
}
|
||||
|
||||
public void updateInvoiceDetail(String invoiceNum, int lineItemNum, int POLineItemNum, int serviceTypeId, String desc, double qty, double fee)throws AstuteException {
|
||||
public void updateInvoiceDetail(String invoiceNum, int lineItemNum, int POLineItemNum, int serviceTypeId, String desc, double qty, double fee, int feeTypeId)throws AstuteException {
|
||||
try {
|
||||
String sql = "UPDATE INVOICE_DETAIL ";
|
||||
String updateClause = " SET ";
|
||||
|
@ -409,6 +410,9 @@ public class SqlDAO extends DAO {
|
|||
if(fee > 0) {
|
||||
updateClause += " fee = " + fee + ",";
|
||||
}
|
||||
if(feeTypeId > 0) {
|
||||
updateClause += " fee_type_id = " + feeTypeId + ",";
|
||||
}
|
||||
if (!updateClause.equalsIgnoreCase(" SET ")) {
|
||||
sql = sql + trimLastCharacter(updateClause,",") + whereClause;
|
||||
|
||||
|
@ -444,11 +448,11 @@ public class SqlDAO extends DAO {
|
|||
}
|
||||
|
||||
|
||||
public void createInvoiceDetail(String invoiceNum, int lineItemNum, int POLineItemNum, int serviceTypeId, String desc, double qty, double fee)throws AstuteException {
|
||||
public void createInvoiceDetail(String invoiceNum, int lineItemNum, int POLineItemNum, int serviceTypeId, String desc, double qty, double fee, int feeTypeId)throws AstuteException {
|
||||
try {
|
||||
System.out.println("Calling create_invoice_detail Procedure");
|
||||
System.out.println("invoiceNum is "+invoiceNum);
|
||||
CallableStatement stmt = conn.prepareCall("{call create_invoice_detail(?,?,?,?,?,?,?,?)}");
|
||||
CallableStatement stmt = conn.prepareCall("{call create_invoice_detail(?,?,?,?,?,?,?,?,?)}");
|
||||
stmt.setString(1, invoiceNum);
|
||||
stmt.setInt(2, lineItemNum);
|
||||
stmt.setInt(3, POLineItemNum);
|
||||
|
@ -456,6 +460,7 @@ public class SqlDAO extends DAO {
|
|||
stmt.setString(5, desc);
|
||||
stmt.setDouble(6, qty);
|
||||
stmt.setDouble(7, fee);
|
||||
stmt.setInt(8, feeTypeId);
|
||||
stmt.executeUpdate();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Reference in New Issue
Block a user