Commit d952791e authored by pdas's avatar pdas

CHANGES FOR DEBIT NOTE


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97910 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 55e6788b
......@@ -2900,9 +2900,11 @@ public class CalculateCommission
}
else
{
sql = "select sum(case when drcr_flag = 'C' then net_amt else -net_amt end) from drcr_inv, drcr_invdet " +
"where drcr_inv.tran_id = drcr_invdet.tran_id and drcr_inv.invoice_id = ? and drcr_inv.sundry_code = ? " +
" and drcr_inv.curr_code = ? and (case when line_no__inv is null then 0 else line_no__inv end) = ? and drcr_flag = 'C'";
sql = "select net_amt from drcr_inv,drcr_invdet where drcr_inv.tran_id = drcr_invdet.tran_id and " +
"drcr_inv.invoice_id = ? and drcr_inv.sundry_code = ? " +
"and drcr_inv.curr_code = ? and drcr_flag = 'D' " +
"and (case when line_no__inv is null then 0 else line_no__inv end) = ?" +
" order by chg_date desc";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,invoiceId );
pstmt.setString(2, salesPer);
......
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