Commit 7c34ac8b authored by mjadhav's avatar mjadhav

set amount as -ve for tran_ser=p-RET in receipt


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97997 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4b43abae
......@@ -35,7 +35,7 @@ function resizeVideoPage(){
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Bill Status</title>
</head>
<body onload="resizeVideoPage()" style="overflow: auto;">
<body onload="resizeVideoPage()" style="overflow:auto;">
<!-- <body> -->
<%!
......@@ -107,6 +107,7 @@ HashMap<String, String> vochMap = new HashMap<String, String>();
HashMap<String, String> pmtMap = new HashMap<String, String>();
HashMap<String, String> qcMap = new HashMap<String, String>();
UtilMethods utilMethods= new UtilMethods();
String tranSer="";
try{
......@@ -426,7 +427,7 @@ pstmt = null;
sql = " select tran_id,tran_date,tran_type,supp_code,confirmed,conf_date, ";
sql = sql + " vouch_created,status,qc_reqd,tot_amt ,tax,adj_amt ,INVOICE_NO ,INVOICE_DATE,STATUS,AMOUNT,site_code ";
sql = sql + " vouch_created,status,qc_reqd,tot_amt ,tax,adj_amt ,INVOICE_NO ,INVOICE_DATE,STATUS,AMOUNT,site_code,tran_ser ";
sql = sql + " from porcp where purc_order=? ";
pstmt = conn.prepareStatement(sql);
......@@ -451,8 +452,34 @@ while(rs.next())
rcpInvDt=rs.getDate("INVOICE_DATE");
rcpStatus=rs.getString("STATUS");
rcpSiteCode=rs.getString("site_code");
tranSer=rs.getString("tran_ser");
if(tranSer!=null && tranSer.equalsIgnoreCase("P-RET"))
{
if(rcpAdjAmt != 0)
{
rcpAdjAmt=-1*rcpAdjAmt;
}
if(rcpTaxAmt != 0)
{
rcpTaxAmt=-1*rcpTaxAmt;
}
if(rcpTotAmt != 0)
{
rcpTotAmt=-1*rcpTotAmt;
}
if(rcpAmt != 0)
{
rcpAmt=-1*rcpAmt;
}
}
if("Y".equals(rcpConf))
{
rcpConf="Yes";
......@@ -687,10 +714,10 @@ while(rs.next())
/*---------------Voucher Information---------------------------------------------*/
sql = " select distinct(v.tran_id),v.tran_date,v.tran_type,v.supp_code,v.bill_no,v.bill_amt,v.bill_date, ";
sql = " select distinct v.tran_id,v.tran_date,v.tran_type,v.supp_code,v.bill_no,v.bill_amt,v.bill_date, ";
sql = sql + " v.bank_code,v.due_date,v.adv_amt,v.bill_amt,v.tax_amt,v.tot_amt, ";
sql = sql + " v.confirmed,v.conf_date,v.paid,v.net_amt,v.vouch_type,v.PURC_ORDER,v.DUE_DATE,v.SUPP_BILL_AMT,vrcp.prcp_id ";
sql = sql + " from voucher v ,vouchrcp vrcp where v.tran_id=vrcp.tran_id and v.purc_order=? and vrcp.prcp_id=? ";
sql = sql + " v.confirmed,v.conf_date,v.paid,v.net_amt,v.vouch_type,v.PURC_ORDER,v.DUE_DATE,v.SUPP_BILL_AMT,'"+rcpNo+"' prcp_id ";
sql = sql + " from voucher v where v.purc_order=? and v.tran_id in(select distinct tran_id from vouchrcp where prcp_id=?) ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,purcOrder);
......@@ -827,7 +854,7 @@ while(rs.next())
System.out.println("========Payment Information=========");
sql = " select pmt.tran_id,pmt.tran_date,pmt.tran_type,pmt.pay_mode,pmt.site_code,pmt.bank_code ";
sql = sql + " ,pmt.sundry_type,pmt.sundry_code,pmt.ref_no,pmt.ref_date,pmt.net_amt,pmt.tax_amt,pmt.discount_amt,pmt.confirmed,pmt.conf_date ";
sql = sql + " ,pmt.sundry_type,pmt.sundry_code,pmt.ref_no,pmt.ref_date,pmtdet.pay_amt,pmt.tax_amt,pmt.discount_amt,pmt.confirmed,pmt.conf_date ";
sql = sql + " ,pmtdet.vouch_no,pmtdet.vouch_date ";
sql = sql + " from misc_payment pmt,misc_paydet pmtdet where pmtdet.tran_id = pmt.tran_id ";
sql = sql + " and pmtdet.vouch_no=? ";
......@@ -848,7 +875,8 @@ while(rs.next())
pmtSundryCode=rs2.getString("sundry_code");
pmtRefNo=rs2.getString("ref_no");
pmtRefDate=rs2.getDate("ref_date");
pmtNetAmt=rs2.getDouble("net_amt");
//pmtNetAmt=rs2.getDouble("net_amt");
pmtNetAmt=rs2.getDouble("pay_amt");
pmtTaxAmt=rs2.getDouble("tax_amt");
pmtDiscAmt=rs2.getDouble("discount_amt");
pmtVochNo=rs2.getString("vouch_no");
......
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