Commit 17cc91c1 authored by akhokar's avatar akhokar

Changes done in allow deduction while insert/update to remove time from start date and end date.

PayrollPostAccPrc.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@205462 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 87abacf7
...@@ -2904,49 +2904,49 @@ public class PayrollPostAccPrc extends ProcessEJB implements PayrollPostAccPrcLo ...@@ -2904,49 +2904,49 @@ public class PayrollPostAccPrc extends ProcessEJB implements PayrollPostAccPrcLo
pstmt10 = conn.prepareStatement(sql); pstmt10 = conn.prepareStatement(sql);
sql = "select count(*) as count from allowdedn_bal where emp_code = ? and ad_code = ? " sql = "select count(*) as count from allowdedn_bal where emp_code = ? and ad_code = ? "
+ "and ? >= start_date and ref_type = ? and ref_no = ? "; + "and trunc(?) >= start_date and ref_type = ? and ref_no = ? ";
pstmt11 = conn.prepareStatement(sql); pstmt11 = conn.prepareStatement(sql);
sql = "select count(*) as count from allowdedn_bal where emp_code = ? and ad_code = ? " sql = "select count(*) as count from allowdedn_bal where emp_code = ? and ad_code = ? "
+ "and ? >= start_date and ? <= end_date "; + "and trunc(?) >= start_date and trunc(?) <= end_date ";
pstmt12 = conn.prepareStatement(sql); pstmt12 = conn.prepareStatement(sql);
sql = "INSERT INTO allowdedn_bal (emp_code, ad_code, start_date, end_date, amount,amt_adj, amt_bal, chg_date, chg_user, chg_term, ref_type)" sql = "INSERT INTO allowdedn_bal (emp_code, ad_code, start_date, end_date, amount,amt_adj, amt_bal, chg_date, chg_user, chg_term, ref_type) "
+ "VALUES ( ?, ?, ?, ?, ?, 0, ?, ?, ?, ?, 'K')"; + "VALUES ( ?, ?, trunc(?), trunc(?), ?, 0, ?, ?, ?, ?, 'K')";
pstmt13 = conn.prepareStatement(sql); pstmt13 = conn.prepareStatement(sql);
sql = "update allowdedn_bal set amount = (amount + ?),amt_bal = (amt_bal + ?)," sql = "update allowdedn_bal set amount = (amount + ?),amt_bal = (amt_bal + ?),"
+ "chg_user = ? ,chg_date = ?,chg_term = ? " + "chg_user = ? ,chg_date = ?,chg_term = ? "
+ "where emp_code = ? and ad_code = ? and ? >= start_date " + "where emp_code = ? and ad_code = ? and trunc(?) >= start_date "
+ "and ref_type = ? and ref_no = ? "; + "and ref_type = ? and ref_no = ? ";
pstmt14 = conn.prepareStatement(sql); pstmt14 = conn.prepareStatement(sql);
sql = "update allowdedn_bal set amount = (amount + ?)," sql = "update allowdedn_bal set amount = (amount + ?),"
+ "amt_bal = (amt_bal + ?),chg_user = ?, chg_date = ?," + "amt_bal = (amt_bal + ?),chg_user = ?, chg_date = ?,"
+ "chg_term = ? where emp_code = ? and ad_code = ? " + "chg_term = ? where emp_code = ? and ad_code = ? "
+ "and ? >= start_date and ? <= end_date"; + "and trunc(?) >= start_date and trunc(?) <= end_date";
pstmt15 = conn.prepareStatement(sql); pstmt15 = conn.prepareStatement(sql);
sql = "select amt_bal from allowdedn_bal where emp_code = ? " sql = "select amt_bal from allowdedn_bal where emp_code = ? "
+ "and ad_code = ? and ? >= start_date " + "and ad_code = ? and trunc(?) >= start_date "
+ "and ref_type = ? and ref_no = ? and amt_bal <> 0 "; + "and ref_type = ? and ref_no = ? and amt_bal <> 0 ";
pstmt16 = conn.prepareStatement(sql); pstmt16 = conn.prepareStatement(sql);
sql = "select amt_bal from allowdedn_bal where emp_code = ? " sql = "select amt_bal from allowdedn_bal where emp_code = ? "
+ "and ad_code = ? and ? >= start_date and ? <= end_date " + "and ad_code = ? and trunc(?) >= start_date and trunc(?) <= end_date "
+ "and amt_bal <> 0"; + "and amt_bal <> 0";
pstmt17 = conn.prepareStatement(sql); pstmt17 = conn.prepareStatement(sql);
sql = "update allowdedn_bal set amt_bal = (amt_bal - ?),amt_adj = amt_adj + ?," sql = "update allowdedn_bal set amt_bal = (amt_bal - ?),amt_adj = amt_adj + ?,"
+ "chg_user = ?,chg_date = ?,chg_term = ? where emp_code = ? " + "chg_user = ?,chg_date = ?,chg_term = ? where emp_code = ? "
+ "and ad_code = ? and ? >= start_date and ref_type = ? " + "and ad_code = ? and trunc(?) >= start_date and ref_type = ? "
+ "and ref_no = ? and amt_bal <> 0 "; + "and ref_no = ? and amt_bal <> 0 ";
pstmt18 = conn.prepareStatement(sql); pstmt18 = conn.prepareStatement(sql);
sql = "update allowdedn_bal set amt_bal = (amt_bal - ?),amt_adj = amt_adj + ?," sql = "update allowdedn_bal set amt_bal = (amt_bal - ?),amt_adj = amt_adj + ?,"
+ "chg_user = ?,chg_date = ?,chg_term = ? " + "chg_user = ?,chg_date = ?,chg_term = ? "
+ "where emp_code = ? and ad_code = ? and ? >= start_date " + "where emp_code = ? and ad_code = ? and trunc(?) >= start_date "
+ "and ? <= end_date and amt_bal <> 0 "; + "and trunc(?) <= end_date and amt_bal <> 0 ";
pstmt19 = conn.prepareStatement(sql); pstmt19 = conn.prepareStatement(sql);
sql = "insert into loan_reg(loan_no , tran_no , tran_date , tran_type , amount , int_calculated , chg_date , chg_user , chg_term)" sql = "insert into loan_reg(loan_no , tran_no , tran_date , tran_type , amount , int_calculated , chg_date , chg_user , chg_term)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment