Commit 0c0d66c1 authored by smanohar's avatar smanohar

Rounding of amount not updated in voucher header and posting also not rounded,...

Rounding of amount not updated in voucher header and posting also not rounded, fixed the rounding issue

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@213902 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d15b0c43
...@@ -1841,11 +1841,16 @@ public class VoucherConf extends ActionHandlerEJB //implements ReceiptAdvConfLoc ...@@ -1841,11 +1841,16 @@ public class VoucherConf extends ActionHandlerEJB //implements ReceiptAdvConfLoc
detMap.put("amount", rndAmt); detMap.put("amount", rndAmt);
detMap.put("auto_generated", "N"); detMap.put("auto_generated", "N");
DetList.add(detMap); DetList.add(detMap);
VchHdrMap.put("net_amt",netAmt);
VchHdrMap.put("net_amt__bc",netAmt * (double) VchHdrMap.get("exch_rate"));
VchHdrMap.put("rnd_amt",rndAmt);
sql = "update voucher set rnd_amt = ? where tran_id = ? "; sql = "update voucher set rnd_amt = ?, net_amt = ?,net_amt__bc = ? * exch_rate where tran_id = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setDouble(1,rndAmt); pstmt.setDouble(1,rndAmt);
pstmt.setString(2,tranId); pstmt.setDouble(2,netAmt);
pstmt.setDouble(3,netAmt);
pstmt.setString(4,tranId);
updCount = pstmt.executeUpdate(); updCount = pstmt.executeUpdate();
if (updCount != 1) if (updCount != 1)
{ {
......
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