Commit 58d2b1d3 authored by ngadkari's avatar ngadkari

Auto pay flag based automatic payment of voucher and misc. voucher, pay mode cash to be removed

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@186865 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7eb379a3
......@@ -81,7 +81,8 @@ public class VouchPayAct extends ActionHandlerEJB implements VouchPayActLocal, V
String billNo="",currCode="",acctCode="",cctrCode="",siteCode="",finEntity="",sundryType="",bankCode="",userName="",sundryCode="",tranSerM="",
purcOrder="",pCrTerm="",acctCodeDisc="",cctrCodeDisc="",startFrom="";
double exchRate=0.0d,totAmt=0.0d,advAmt=0.0d,holdAmt=0.0d,netPayable=0.0d,adjAmt=0.0d,lcDiscount=0.0d,lcDiscountAmt=0.0d,payAmt=0.0d,totAmount=0.0d;
double chq1=0,chq2=0,llRefNo=0;
double chq1=0,chq2=0;
long llRefNo=0;
E12GenericUtility genericUtility = new E12GenericUtility();
try
{
......@@ -408,23 +409,25 @@ public class VouchPayAct extends ActionHandlerEJB implements VouchPayActLocal, V
chq1=Double.parseDouble(chq1Str);
chq2=Double.parseDouble(chq2Str);
sql = "select max( to_number(a.ref_no)) from ( select ref_no from banktran_log where bank_code = ? "
+ " and ref_mode = 'Q' and ref_no is not null and ref_no <> ' ' and (ref_no) = 0 ) a "
+ " where to_number(a.ref_no) >= ? and to_number (a.ref_no) <= ? ";
+ " and ref_mode = 'Q' and ref_no is not null and ref_no <> ' ') a "
+ " where a.ref_no >= ? and a.ref_no <= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, bankCode);
pstmt.setDouble(2, chq1);
pstmt.setDouble(3, chq2);
pstmt.setString(2, chq1Str);
pstmt.setString(3, chq2Str);
rs = pstmt.executeQuery();
if(rs.next())
{
llRefNo=rs.getDouble(1);
llRefNo=rs.getLong(1);
}
pstmt.close();
rs.close();
if (llRefNo==0)
{
{
lsRefNo=" ";
}
else
{
......@@ -434,7 +437,7 @@ public class VouchPayAct extends ActionHandlerEJB implements VouchPayActLocal, V
}
else
{
lsRefNo=Double.toString(llRefNo +1);
lsRefNo=Long.toString(llRefNo +1);
if (chq2Str.indexOf(0)==1 )
{
lsRefNo="000000"+lsRefNo.substring(lsRefNo.length()-6);
......@@ -449,7 +452,7 @@ public class VouchPayAct extends ActionHandlerEJB implements VouchPayActLocal, V
{
lsRefNo=" ";
}
xmlBuff.append("<ref_no><![CDATA[" + llRefNo + "]]></ref_no>");
xmlBuff.append("<ref_no><![CDATA[" + lsRefNo + "]]></ref_no>");
}
//added by Nandkumar Gadkari On 21/06/18------end--------------
if(refDate!=null)// condition added by Nandkumar Gadkari On 21/06/18
......
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