Commit 58a08188 authored by ngadkari's avatar ngadkari

changes for set discount amount

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204096 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ea1ba10c
...@@ -122,7 +122,30 @@ public class VoucherPostSave extends ValidatorEJB implements VoucherPostSaveLoca ...@@ -122,7 +122,30 @@ public class VoucherPostSave extends ValidatorEJB implements VoucherPostSaveLoca
System.out.println("voucher type "+voucherType); System.out.println("voucher type "+voucherType);
} }
// End Of advance Screen cross Update // End Of advance Screen cross Update
// added by nandkumar gadkari on 26/07/19------------------------start-----------------------
sql="select line_no,(coalesce(vouch_qty,0) * coalesce(vouch_rate,0) * coalesce(discount,0)/100 ) from vouchrcp WHERE tran_id = ? " ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranId);
rs = pstmt.executeQuery();
while (rs.next())
{
sql2="UPDATE vouchrcp set disc_amt = ? WHERE tran_id = ? and line_no = ?";
pstmt2 = conn.prepareStatement(sql2);
pstmt2.setDouble(1,rs.getDouble(2));
pstmt2.setString(2,tranId);
pstmt2.setLong(3,rs.getLong(1));
pstmt2.executeUpdate();
pstmt2.close();
pstmt2 = null;
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
// added by nandkumar gadkari on 26/07/19------------------------end-----------------------
//Receipt Screen Cross Update //Receipt Screen Cross Update
sql="select line_no, coalesce(vouch_qty,0) * coalesce(vouch_rate,0), coalesce(((coalesce(vouch_qty,0) * coalesce(vouch_rate,0)) + tax_amt - disc_amt),0) from vouchrcp WHERE tran_id = ? " ; // Discount amount positive sign change to negative by nandkumar gadkari on 27/06/19 sql="select line_no, coalesce(vouch_qty,0) * coalesce(vouch_rate,0), coalesce(((coalesce(vouch_qty,0) * coalesce(vouch_rate,0)) + tax_amt - disc_amt),0) from vouchrcp WHERE tran_id = ? " ; // Discount amount positive sign change to negative by nandkumar gadkari on 27/06/19
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
......
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