Commit fdc08e61 authored by msalla's avatar msalla

1)In bank receipt screen under EPC adjustment screen (4th screen) client want...

1)In bank receipt screen under EPC adjustment screen (4th screen) client want to set the POPHELP on reference number field. but we can not set the pophelp on this field because ref_ser and ref_no field is common in EPC adjustment and Invoice Detail screen (2nd screen).

2)When user select Receipt Mode as Electronic and further select customer then system change Receipt Mode as CHQ because in customer master, default payment mode is Chq. Then user again has to change the Mode or if he forget to change the same, wrong entry is getting passed. To avoid the mistake, Receipt Mode column should appear after the  Customer column. 

3)Bank receipt, ref_no column in packing credit/adv booking to be changed

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@204467 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 72f9452e
......@@ -542,8 +542,6 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
}
else if (childNodeName.equalsIgnoreCase("cctr_code__bal"))
{
cctrCodeBal = this.genericUtility.getColumnValue("cctr_code__bal", dom);
analCode = this.genericUtility.getColumnValue("anal_code", dom);
refSer = this.genericUtility.getColumnValue("ref_ser", dom);
......@@ -563,9 +561,6 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
else if (childNodeName.equalsIgnoreCase("acct_code__adv"))
{
acctCodeAdv = this.genericUtility.getColumnValue("acct_code__adv", dom);
advAmt = doublevalue(this.genericUtility.getColumnValue("adv_amt", dom));
//if ((advAmt != 0.0) && ((acctCodeAdv.trim().length() != 0) && (acctCodeAdv != null))) Commented by Ajay on 17/05/18
......@@ -584,8 +579,6 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
}
else if (childNodeName.equalsIgnoreCase("cctr_code__adv"))
{
cctrCodeAdv = this.genericUtility.getColumnValue("cctr_code__adv", dom);
acctCodeAdv = this.genericUtility.getColumnValue("acct_code__adv", dom);
advAmt = Double.parseDouble(this.genericUtility.getColumnValue("adv_amt", dom));
......@@ -928,7 +921,7 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
{
tranDate = sdf.parse(this.genericUtility.getColumnValue("tran_date", dom));
bankCode = this.genericUtility.getColumnValue("bank_code", dom);
sql = "select count(*) from advbking where confirmed = 'Y' and bal_amt > 0 and (? between to_char(eff_date,'yyyy-mm-dd') and to_char(valid_upto,'yyyy-mm-dd'))and bank_code = ? tran_id = ? and status = 'A' ";
sql = "select count(*) from advbking where confirmed = 'Y' and bal_amt > 0 and (? between to_char(eff_date,'yyyy-mm-dd') and to_char(valid_upto,'yyyy-mm-dd'))and bank_code = ? and tran_id = ? and status = 'A' ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranDate.toString());
pstmt.setString(2, bankCode);
......@@ -1689,8 +1682,9 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
currCode = rs.getString("curr_code");
//commented by -monika-july-31-2019
//dueDate = rs.getDate("due_date");
dueDate = getTimeStamp("due_date");
refDate=rs.getTimeStamp("ref_date");
//added by monika-31-july-2019
dueDate = rs.getTimestamp("due_date");
refDate=rs.getTimestamp("ref_date");
if(!custCode.trim().equals(hcustCode.trim()))
{
errCode = "VTCGRP1";
......@@ -2221,7 +2215,7 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
{
exchRate=0;
}
if((!currCode.equals(currCodeHdr)) && (exchRate!=1))
if((!currCode.trim().equals(currCodeHdr.trim())) && (exchRate!=1))
{
errCode="VTCUR3";
errList.add(errCode);
......@@ -2337,7 +2331,7 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
}
valueXmlString.append("</Detail6>");
break;
//end
//end
}
int errListSize = errList.size();
cnt = 0;
......@@ -2988,6 +2982,7 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
ResultSet rs = null;
// GenericUtility genericUtility = GenericUtility.getInstance();
ConnDriver connDriver = new ConnDriver();
UtilMethods utl = new UtilMethods();
try
{
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
......@@ -4026,7 +4021,7 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
// if((tranSer == "S-INV") || (ctr == 1))commented by monika-30-july-2019
//added by monika salla-30-07-2019-
if((tranSer.equals("S-INV")) || (ctr == 1))//end
if(("S-INV".equals(tranSer.trim())) || (ctr == 1)) //end
{
sql = "select due_date,cr_term from invoice where invoice_id = ?";
pstmt = conn.prepareStatement(sql);
......@@ -4107,7 +4102,7 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
if (billDisc == null) billDisc = "N";
// if (billDisc == "Y")//commeneted by monika-30 july-19
//added bt monika 30 july-19
if (billDisc.equals("Y"))
if("Y".equals(billDisc))
{
sql = "select export_fund.exch_rate from export_fund, export_fundet where ( export_fund.tran_id = export_fundet.tran_id ) and ( export_fund.confirmed = 'Y') and( ( export_fundet.ref_ser = ? ) and ( export_fundet.ref_no = ?) )";
......@@ -4133,11 +4128,11 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
exchRate = Double.parseDouble(genericUtility.getColumnValue("exch_rate__rcv", dom));
}
bdFluctuationCf = finCommon.getFinparams("999999", "BD_FLUCTUATION_CF" ,conn);
if (bdFluctuationCf.equals("") || bdFluctuationCf == null)
if (("").equals(bdFluctuationCf) || bdFluctuationCf == null)
{
bdFluctuationCf = "Y";
}
if ((billDisc.equals("Y")) && (bdFluctuationCf.equals("Y")))
if (("Y".equals(billDisc)) && ("Y".equals(bdFluctuationCf)))
{
diffAmtExch = rcpAmt * exchRate - rcpAmt * exchRate;
valueXmlString.append("<diff_amt__exch>").append("<![CDATA[" + diffAmtExch + "]]>").append("</diff_amt__exch>");
......@@ -4165,11 +4160,11 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
errFields.add(childNodeName.toLowerCase());
}
rcpAutoFinchg = finCommon.getFinparams("999999", "RCP_AUTO_FINCHG", conn);
if (rcpAutoFinchg.equals("") || rcpAutoFinchg == null)
if ((("").equals(rcpAutoFinchg) || rcpAutoFinchg == null))
{
rcpAutoFinchg = "N";
}
if (rcpAutoFinchg.equals("Y"))
if("Y".equals(rcpAutoFinchg))
{
sql = "select count(*) from receivables where tran_ser = ? and ref_ser__org = ? and ref_no = ?";
pstmt = conn.prepareStatement(sql);
......@@ -4189,7 +4184,7 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
rcpAmt = Double.parseDouble(genericUtility.getColumnValue("rcp_amt", dom));
//if ((tranSer == "S-INV") || (ctr == 1))//commeneted by monika-30 july-19
//added by monika 30 july-19
if ((tranSer.equals("S-INV")) || (ctr == 1))//end
if(("S-INV".equals(tranSer.trim())) || (ctr == 1))//end
{
sql = "select due_date,cr_term from invoice where invoice_id = ?";
pstmt = conn.prepareStatement(sql);
......@@ -4233,7 +4228,7 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
//if (fchgType == "P")
//commeneted by monika-30 july-19
//added bt monika 30 july-19
if (fchgType.equals("P"))
if ("P".equals(fchgType))
{
discountLc = rcpAmt * (finChg / 36500.0D) * days;
}
......@@ -4335,6 +4330,7 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail4>");
childNodeListLength = childNodeList.getLength();
do
{
childNode = childNodeList.item(ctr);
......@@ -4404,7 +4400,10 @@ public class ReceiptAdv extends ValidatorEJB implements ReceiptAdvLocal, Receipt
valueXmlString.append("<currency_descr>").append("<![CDATA[" + currDescr + "]]>").append("</currency_descr>");
valueXmlString.append("<exch_rate>").append("<![CDATA[" + exchRate + "]]>").append("</exch_rate>");
valueXmlString.append("<tran_date>").append("<![CDATA[" + simpleDateFormat.format(dueDate) + "]]>").append("</tran_date>");
valueXmlString.append("<amount>").append("<![CDATA[" + (adjAmt - totAmt) + "]]>").append("</amount>");
// valueXmlString.append("<amount>").append("<![CDATA[" + (adjAmt - totAmt) + "]]>").append("</amount>");
valueXmlString.append("<amount>").append("<![CDATA[" + (utl.getReqDecString((adjAmt - totAmt),3)) + "]]>").append("</amount>");
valueXmlString.append("<sundry_type>").append("<![CDATA[" + sundryType + "]]>").append("</sundry_type>");
valueXmlString.append("<sundry_code>").append("<![CDATA[" + sundryCode + "]]>").append("</sundry_code>");
valueXmlString.append("<acct_code>").append("<![CDATA[" + acctCode + "]]>").append("</acct_code>");
......
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