Commit 43538f49 authored by prane's avatar prane

added getReqDecString() utility methods to format amounts to avoids exp form in amount

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@208132 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b1cff81c
...@@ -82,15 +82,13 @@ public class PostOrdCreditChk ...@@ -82,15 +82,13 @@ public class PostOrdCreditChk
String ordTypeNewPrd="",sql=""; String ordTypeNewPrd="",sql="";
int ctr=0; int ctr=0;
String lsMail[]=null,asCheck[]=null,gs_inv_call_fr=""; String lsMail[]=null,asCheck[]=null,gs_inv_call_fr="";
//E12GenericUtility e12GenericUtility = new E12GenericUtility(); //E12GenericUtility e12GenericUtility = new E12GenericUtility();
ArrayList<String> retArrayList = new ArrayList<String>(); ArrayList<String> retArrayList = new ArrayList<String>();
long startTime = 0, endTime = 0, totalTime = 0, totalHrs = 0, totlMts = 0, totSecs = 0; // Added long startTime = 0, endTime = 0, totalTime = 0, totalHrs = 0, totlMts = 0, totSecs = 0; // Added
try try
{ {
startTime = System.currentTimeMillis(); startTime = System.currentTimeMillis();
Timestamp currDate = new java.sql.Timestamp(System.currentTimeMillis()); Timestamp currDate = new java.sql.Timestamp(System.currentTimeMillis());
mailList = new ArrayList(); mailList = new ArrayList();
asCheckList = new ArrayList(); asCheckList = new ArrayList();
failedPolicyList = new ArrayList();// This has to be returned to the calling routine part of the returnMap failedPolicyList = new ArrayList();// This has to be returned to the calling routine part of the returnMap
...@@ -482,8 +480,8 @@ public class PostOrdCreditChk ...@@ -482,8 +480,8 @@ public class PostOrdCreditChk
} }
//System.out.println("@@@@@ lsCrPolicy["+lsCrPolicy+"]lcCheckAmt["+lcCheckAmt+"]lsStatus["+lsStatus+"]"); //System.out.println("@@@@@ lsCrPolicy["+lsCrPolicy+"]lcCheckAmt["+lcCheckAmt+"]lsStatus["+lsStatus+"]");
//Pavan Rane 19sep19 start[to insert proper message while P01 policy fail] //Pavan Rane 19sep19 start[to insert proper message while P01 policy fail]
lsStr1 = "Total Outstanding Amt exceeds limit for Sold to: "+lsCustNameSoldTo +" Bill to: "+lsCustNameBillTo +", Total O/S Amt.=>" +totOsAmt; lsStr1 = "Total Outstanding Amt exceeds limit for Sold to: "+lsCustNameSoldTo +" Bill to: "+lsCustNameBillTo +", Total O/S Amt.=>" +utilMethods.getReqDecString(totOsAmt,3);
lsStr2 = "Over Due Outstanding Amt over and above=>"+ mTotalOsAmt + ", "+ llIgnGays +" days exceeds Amt=> "+String(mIgnCr); lsStr2 = "Over Due Outstanding Amt over and above=>"+ utilMethods.getReqDecString(mTotalOsAmt,3) + ", "+ llIgnGays +" days exceeds Amt=> "+String(mIgnCr);
//Pavan Rane 19sep19 end[to insert proper message while P01 policy fail] //Pavan Rane 19sep19 end[to insert proper message while P01 policy fail]
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equalsIgnoreCase(asApplyTime)) if ("I".equalsIgnoreCase(asApplyTime))
...@@ -690,7 +688,7 @@ public class PostOrdCreditChk ...@@ -690,7 +688,7 @@ public class PostOrdCreditChk
//lsStr1 = "Outstanding amount exceeds limit for customer "+lsCustName; //lsStr1 = "Outstanding amount exceeds limit for customer "+lsCustName;
lsStr1 = "Outstanding amount exceeds limit for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo ; lsStr1 = "Outstanding amount exceeds limit for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo ;
//Changed By PriyankaC on 03June2019.[END] //Changed By PriyankaC on 03June2019.[END]
lsStr2 = " , Total O/S Amt: " + mTotOsAmt + " for division "+ lsItemSerDescr.trim() + " exceeds limit: "+ mCrLimit ; lsStr2 = " , Total O/S Amt: " + utilMethods.getReqDecString(mTotOsAmt,3) + " for division "+ lsItemSerDescr.trim() + " exceeds limit: "+ mCrLimit ;
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -817,7 +815,7 @@ public class PostOrdCreditChk ...@@ -817,7 +815,7 @@ public class PostOrdCreditChk
// lsStr1 = "Overall total credit check failed for "+lsCustName; // lsStr1 = "Overall total credit check failed for "+lsCustName;
lsStr1 = "Overall total credit check failed for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo ; lsStr1 = "Overall total credit check failed for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo ;
//Changed By PriyankaC on 03June2019.[END] //Changed By PriyankaC on 03June2019.[END]
lsStr2 = " , Total O/S Amt over and above "+ llIgnGays +" days is " + mTotalOsAmt + " exceeds limit: "+String(mIgnCr); lsStr2 = " , Total O/S Amt over and above "+ llIgnGays +" days is " + utilMethods.getReqDecString(mTotalOsAmt,3) + " exceeds limit: "+String(mIgnCr);
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -1005,7 +1003,7 @@ public class PostOrdCreditChk ...@@ -1005,7 +1003,7 @@ public class PostOrdCreditChk
// lsStr1 = "Overall total credit check failed for "+lsCustName; // lsStr1 = "Overall total credit check failed for "+lsCustName;
lsStr1 = "Overall total credit check failed for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo ; lsStr1 = "Overall total credit check failed for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo ;
////Changed By PriyankaC on 03June2019.[END] ////Changed By PriyankaC on 03June2019.[END]
lsStr2 = " , Total O/S Amt: "+ mTotOsAmt + " exceeds credit limit: "+ mCrLimit; lsStr2 = " , Total O/S Amt: "+ utilMethods.getReqDecString(mTotOsAmt,3) + " exceeds credit limit: "+ mCrLimit;
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -1183,7 +1181,7 @@ public class PostOrdCreditChk ...@@ -1183,7 +1181,7 @@ public class PostOrdCreditChk
//lsStr1 = lsCustName + " is on Advance Term"; //lsStr1 = lsCustName + " is on Advance Term";
lsStr1 = "for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo +" is on Advance Term"; lsStr1 = "for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo +" is on Advance Term";
//Changed By PriyankaC on 03June2019.[END] //Changed By PriyankaC on 03June2019.[END]
lsStr2 = " , Credit Balance: "+ lcNetAdv + " is less than invoice amount: "+ adNetAmt; lsStr2 = " , Credit Balance: "+ utilMethods.getReqDecString(lcNetAdv,3) + " is less than invoice amount: "+ adNetAmt;
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -1359,7 +1357,7 @@ public class PostOrdCreditChk ...@@ -1359,7 +1357,7 @@ public class PostOrdCreditChk
//lsStr1 = lsCustName + " is crossing the business limit"; //lsStr1 = lsCustName + " is crossing the business limit";
lsStr1 = "for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo + " is crossing the business limit"; lsStr1 = "for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo + " is crossing the business limit";
//Changed By PriyankaC on 03June2019 [END] //Changed By PriyankaC on 03June2019 [END]
lsStr2 = " , Sales for the month: " + lcNetAmt + " exceeds defined business limit: "+ lcBusiLimit +"*"+asItemSer; lsStr2 = " , Sales for the month: " + utilMethods.getReqDecString(lcNetAmt,3) + " exceeds defined business limit: "+ lcBusiLimit +"*"+asItemSer;
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -1830,7 +1828,7 @@ public class PostOrdCreditChk ...@@ -1830,7 +1828,7 @@ public class PostOrdCreditChk
pstmt = null; pstmt = null;
lsStr1 = "Overall credit check failed for sales person " + lsSlpersName; lsStr1 = "Overall credit check failed for sales person " + lsSlpersName;
lsStr2 = " , Total O/S Amt : " + mTotOsAmt + " exceeds credit limit: " + mCrLimit; lsStr2 = " , Total O/S Amt : " + utilMethods.getReqDecString(mTotOsAmt,3) + " exceeds credit limit: " + mCrLimit;
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -1973,7 +1971,7 @@ public class PostOrdCreditChk ...@@ -1973,7 +1971,7 @@ public class PostOrdCreditChk
pstmt = null; pstmt = null;
lsStr1 = "Cash discount credit check failed for sales person " + lsSlpersName; lsStr1 = "Cash discount credit check failed for sales person " + lsSlpersName;
lsStr2 = " , Total over due O/S Amt: " + mTotOsAmt; lsStr2 = " , Total over due O/S Amt: " + utilMethods.getReqDecString(mTotOsAmt,3);
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -2167,7 +2165,7 @@ public class PostOrdCreditChk ...@@ -2167,7 +2165,7 @@ public class PostOrdCreditChk
pstmt = null; pstmt = null;
lsStr1 = "Overall credit check failed for sales person " + lsSlpersName; lsStr1 = "Overall credit check failed for sales person " + lsSlpersName;
lsStr2 = " , Total O/S Amt : " + mTotOsAmt + " exceeds credit limit: " + mCrLimit; lsStr2 = " , Total O/S Amt : " + utilMethods.getReqDecString(mTotOsAmt,3) + " exceeds credit limit: " + mCrLimit;
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -2311,7 +2309,7 @@ public class PostOrdCreditChk ...@@ -2311,7 +2309,7 @@ public class PostOrdCreditChk
pstmt = null; pstmt = null;
lsStr1 = "Cash discount credit check failed for sales person " + lsSlpersName; lsStr1 = "Cash discount credit check failed for sales person " + lsSlpersName;
lsStr2 = " , Total over due O/S Amt: " + mTotOsAmt; lsStr2 = " , Total over due O/S Amt: " + utilMethods.getReqDecString(mTotOsAmt,3);
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -2512,7 +2510,7 @@ public class PostOrdCreditChk ...@@ -2512,7 +2510,7 @@ public class PostOrdCreditChk
pstmt = null; pstmt = null;
lsStr1 = "Overall credit check failed for contact person " + lsContactName; lsStr1 = "Overall credit check failed for contact person " + lsContactName;
lsStr2 = " , Total O/S Amt : " + mTotOsAmt + " exceeds credit limit: " + mCrLimit; lsStr2 = " , Total O/S Amt : " + utilMethods.getReqDecString(mTotOsAmt,3) + " exceeds credit limit: " + mCrLimit;
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -2655,7 +2653,7 @@ public class PostOrdCreditChk ...@@ -2655,7 +2653,7 @@ public class PostOrdCreditChk
pstmt = null; pstmt = null;
lsStr1 = "Cash discount credit check failed for contact person " + lsContactName; lsStr1 = "Cash discount credit check failed for contact person " + lsContactName;
lsStr2 = " , Total over due O/S Amt: " + mTotOsAmt; lsStr2 = " , Total over due O/S Amt: " + utilMethods.getReqDecString(mTotOsAmt,3);
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -2766,7 +2764,7 @@ public class PostOrdCreditChk ...@@ -2766,7 +2764,7 @@ public class PostOrdCreditChk
//lsStr1 = "Cash discount credit check failed for customer " + lsCustName; //lsStr1 = "Cash discount credit check failed for customer " + lsCustName;
lsStr1 = "Cash discount credit check failed for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo ; lsStr1 = "Cash discount credit check failed for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo ;
//Changed By PriyankaC on 03June2019 [END] //Changed By PriyankaC on 03June2019 [END]
lsStr2 = " , Total over due O/S Amt: " + mTotOsAmt; lsStr2 = " , Total over due O/S Amt: " + utilMethods.getReqDecString(mTotOsAmt,3);
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
...@@ -2922,7 +2920,7 @@ public class PostOrdCreditChk ...@@ -2922,7 +2920,7 @@ public class PostOrdCreditChk
//lsStr1 = "Advance credit check failed for customer " + lsCustName; //lsStr1 = "Advance credit check failed for customer " + lsCustName;
lsStr1 = "Advance credit check failed for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo ; lsStr1 = "Advance credit check failed for Sold to "+lsCustNameSoldTo +" Bill to "+lsCustNameBillTo ;
//Changed By PriyankaC on 03June2019 [END] //Changed By PriyankaC on 03June2019 [END]
lsStr2 = " , Total Advance Amt: " + mTotOsAmt + " exceeds order amount: " + lcPendOrd; lsStr2 = " , Total Advance Amt: " + utilMethods.getReqDecString(mTotOsAmt,3) + " exceeds order amount: " + utilMethods.getReqDecString(lcPendOrd,3);
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
...@@ -3025,7 +3023,7 @@ public class PostOrdCreditChk ...@@ -3025,7 +3023,7 @@ public class PostOrdCreditChk
lsStr1 = ""; lsStr1 = "";
lsStr2 = " Total Advance Amt: " + lcAdvVal + " less than advance percentage specified in sale order"; lsStr2 = " Total Advance Amt: " + utilMethods.getReqDecString(lcAdvVal,3) + " less than advance percentage specified in sale order";
//To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime)) if ("I".equals(asApplyTime))
{ {
......
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