Commit 479bcc29 authored by dpawar's avatar dpawar

change in reason code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94174 ce508802-f39f-4f6c-b175-0d175dae99d5
parent dc67781a
...@@ -177,6 +177,10 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -177,6 +177,10 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
debitNoteAmtDetail=getDebitNoteAmount(rateInv,qtyInv); debitNoteAmtDetail=getDebitNoteAmount(rateInv,qtyInv);
debitNoteAmtHdr=debitNoteAmtHdr+debitNoteAmtDetail; debitNoteAmtHdr=debitNoteAmtHdr+debitNoteAmtDetail;
detail3Amt=(PODrate - aprvRate) * PODqty; detail3Amt=(PODrate - aprvRate) * PODqty;
if(detail3Amt < 0){
System.out.println("debit note amount less than 0--------");
detail3Amt=0;
}
detail3AmtT=detail3AmtT + detail3Amt; detail3AmtT=detail3AmtT + detail3Amt;
mapDebitNoteAmt.put(lineNo, detail3Amt); mapDebitNoteAmt.put(lineNo, detail3Amt);
//detail2xmlString=getDetailsXmlString(conn, xtraParams, invoiceId, aprvRate, debitNoteAmtDetail); //detail2xmlString=getDetailsXmlString(conn, xtraParams, invoiceId, aprvRate, debitNoteAmtDetail);
...@@ -197,7 +201,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -197,7 +201,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
MiscDrCrRcpConf confDebitNote=new MiscDrCrRcpConf(); MiscDrCrRcpConf confDebitNote=new MiscDrCrRcpConf();
errString=confDebitNote.confirm(debitNoteTranID,xtraParams,"",conn); errString=confDebitNote.confirm(debitNoteTranID,xtraParams,"",conn);
//errString = confirmDebitNote("drcrrcp_dr",debitNoteTranID,xtraParams,"",conn); //errString = confirmDebitNote("drcrrcp_dr",debitNoteTranID,xtraParams,"",conn);
System.out.println("Error String on DB Confirmation21212112 : "+errString); System.out.println("Error String on DB Confirmation: "+errString);
if((errString != null ) && errString.indexOf("CONFSUCCES") > -1) if((errString != null ) && errString.indexOf("CONFSUCCES") > -1)
{ {
updCnt=updatePodHeader(conn,tranId,loginCode); updCnt=updatePodHeader(conn,tranId,loginCode);
...@@ -319,7 +323,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -319,7 +323,7 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
{ {
System.out.println("<--------Inside genDebitNote----------->"); System.out.println("<--------Inside genDebitNote----------->");
StringBuffer xmlBuffer = new StringBuffer(); StringBuffer xmlBuffer = new StringBuffer();
String xmlString = "", sql="", refNo="", procCode=""; String xmlString = "", sql="", refNo="", remarks="";
String retString=""; String retString="";
GenericUtility genutility=null; GenericUtility genutility=null;
SimpleDateFormat sdf=null; SimpleDateFormat sdf=null;
...@@ -343,6 +347,11 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -343,6 +347,11 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
if(invDate !=null){ if(invDate !=null){
invoiceDate=sdf.format(invDate); invoiceDate=sdf.format(invDate);
} }
System.out.println("Process12345------>>["+process+"]");
if(process.equalsIgnoreCase("PRC"))
remarks="Auto Generated Debit Note - POD Process - invoice ID "+invoiceId;
else
remarks="Auto Generated Debit Note - POD - invoice ID - "+invoiceId;
itemSer =getColumnDescr(conn, "item_ser","invoice","invoice_id", invoiceId); itemSer =getColumnDescr(conn, "item_ser","invoice","invoice_id", invoiceId);
finEntity = getColumnDescr(conn, "fin_entity","site","site_code", siteCode); finEntity = getColumnDescr(conn, "fin_entity","site","site_code", siteCode);
acctCode = getColumnDescr(conn,"acct_code__ar", "customer", "cust_code", custCode); acctCode = getColumnDescr(conn,"acct_code__ar", "customer", "cust_code", custCode);
...@@ -395,12 +404,9 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli ...@@ -395,12 +404,9 @@ public class ProofOfDeliveryConf extends ActionHandlerEJB implements ProofOfDeli
xmlBuffer.append("<reas_code>").append("<![CDATA[").append("PODDB").append("]]></reas_code>\r\n"); xmlBuffer.append("<reas_code>").append("<![CDATA[").append("PODDB").append("]]></reas_code>\r\n");
xmlBuffer.append("<cust_ref_no>").append("<![CDATA[").append(invoiceId).append("]]></cust_ref_no>\r\n"); xmlBuffer.append("<cust_ref_no>").append("<![CDATA[").append(invoiceId).append("]]></cust_ref_no>\r\n");
xmlBuffer.append("<cust_ref_date>").append("<![CDATA[").append(invoiceDate).append("]]></cust_ref_date>\r\n"); xmlBuffer.append("<cust_ref_date>").append("<![CDATA[").append(invoiceDate).append("]]></cust_ref_date>\r\n");
System.out.println("Process------>>["+process+"]");
if(process.equalsIgnoreCase("PRC")) xmlBuffer.append("<remarks>").append("<![CDATA[").append(remarks).append("]]></remarks>\r\n");
xmlBuffer.append("<remarks>").append("<![CDATA[").append("Auto Generated Debit Note from Proof of Delivery Process").append("]]></remarks>\r\n");
else
xmlBuffer.append("<remarks>").append("<![CDATA[").append("Auto Generated Debit Note from Proof Of Delivery").append("]]></remarks>\r\n");
xmlBuffer.append("<chg_user/>\r\n"); xmlBuffer.append("<chg_user/>\r\n");
xmlBuffer.append("<chg_term/>\r\n"); xmlBuffer.append("<chg_term/>\r\n");
xmlBuffer.append("<chg_date>").append("<![CDATA[").append(currAppdate).append("]]></chg_date>\r\n"); xmlBuffer.append("<chg_date>").append("<![CDATA[").append(currAppdate).append("]]></chg_date>\r\n");
......
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