Commit a38ae64f authored by prane's avatar prane

Fixing the multiple credit check policy

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@172840 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 22453fcd
...@@ -295,8 +295,8 @@ public class PostOrdCreditChk ...@@ -295,8 +295,8 @@ public class PostOrdCreditChk
for(int policyCtr = 0; policyCtr < PolicyList.size(); policyCtr++) for(int policyCtr = 0; policyCtr < PolicyList.size(); policyCtr++)
{ {
lsCrPolicy = PolicyList.get(policyCtr).toString(); lsCrPolicy = PolicyList.get(policyCtr).toString();
System.out.println("@@@@@@@@@ PolicyList.Size()["+PolicyList.size()+"]");
//System.out.println("@@@@@@@@@ lsCrPolicy["+lsCrPolicy+"]"); System.out.println("@@@@@@@@@ lsCrPolicy["+lsCrPolicy+"]");
lsSql = "select cust_name from customer where cust_code = ?" ; lsSql = "select cust_name from customer where cust_code = ?" ;
pstmt = conn.prepareStatement(lsSql); pstmt = conn.prepareStatement(lsSql);
...@@ -406,7 +406,8 @@ public class PostOrdCreditChk ...@@ -406,7 +406,8 @@ public class PostOrdCreditChk
retArrayList = credit_check_update(asSorder,"P01",adNetAmt,asApplyTime,lcCheckAmt,"C",lsStatus,conn); retArrayList = credit_check_update(asSorder,"P01",adNetAmt,asApplyTime,lcCheckAmt,"C",lsStatus,conn);
// added on 19/04/16 for status and amount // added on 19/04/16 for status and amount
//System.out.println("@@@@@@@@@ retArrayList.size()["+ retArrayList.size()+"]"); System.out.println("@@@@@@@@@409 retArrayList.size()["+ retArrayList.size()+"]");
System.out.println("@@@@@@@@@409 retArrayList["+ retArrayList+"]");
if( retArrayList.size() > 0) if( retArrayList.size() > 0)
{ {
lsStatus = retArrayList.get(0); lsStatus = retArrayList.get(0);
...@@ -2872,8 +2873,10 @@ public class PostOrdCreditChk ...@@ -2872,8 +2873,10 @@ public class PostOrdCreditChk
////adNetAmt = ld_old_adNetAmt ////adNetAmt = ld_old_adNetAmt
} }
// ****************** else if (lsCrPolicy.trim().compareTo("P9") > 0) // pending - to be corrected // ****************** else if (lsCrPolicy.trim().compareTo("P9") > 0) // pending - to be corrected
else if (lsCrPolicy.trim().compareTo("P9") > 0) // pending - to be corrected else if (lsCrPolicy.trim().compareTo("P9") > 0) // pending - to be corrected
{ {
System.out.println("Credit Policy within P9["+lsCrPolicy+"]");
////Added Ruchira 18/03/2k6, added new dynamic credit check, which uses four new columns ////Added Ruchira 18/03/2k6, added new dynamic credit check, which uses four new columns
////added in itemser_cr_policy table to generate the result of an sql given in policy_sql ////added in itemser_cr_policy table to generate the result of an sql given in policy_sql
////using the input parameters in policy_input column dynamicaly and compare it useing the ////using the input parameters in policy_input column dynamicaly and compare it useing the
...@@ -2912,7 +2915,7 @@ public class PostOrdCreditChk ...@@ -2912,7 +2915,7 @@ public class PostOrdCreditChk
} }
lsFail = "F"; lsFail = "F";
System.out.println("@@@@ lsPolicySql====["+lsPolicySql+"]lsPolicyInput["+lsPolicyInput+"]lsPolicyResult["+lsPolicyResult+"]lsPolicyCondition["+lsPolicyCondition+"]"); System.out.println("@@@@ lsPolicySql====["+lsPolicySql+"]\nlsPolicyInput["+lsPolicyInput+"]\nlsPolicyResult["+lsPolicyResult+"]\nlsPolicyCondition["+lsPolicyCondition+"]");
////If policy_sql is null then credit check will not be done. ////If policy_sql is null then credit check will not be done.
if (lsPolicySql != null && lsPolicySql.trim().length() > 0 ) if (lsPolicySql != null && lsPolicySql.trim().length() > 0 )
{ {
...@@ -2927,6 +2930,7 @@ public class PostOrdCreditChk ...@@ -2927,6 +2930,7 @@ public class PostOrdCreditChk
int arrCtr = 0; int arrCtr = 0;
for (arrCtr = 0; arrCtr < arrStr.length; arrCtr++) for (arrCtr = 0; arrCtr < arrStr.length; arrCtr++)
{ {
if ("cust_code__bil".equals(arrStr[arrCtr].trim())) if ("cust_code__bil".equals(arrStr[arrCtr].trim()))
{ {
...@@ -2953,7 +2957,7 @@ public class PostOrdCreditChk ...@@ -2953,7 +2957,7 @@ public class PostOrdCreditChk
lsValue = "" + adNetAmt; lsValue = "" + adNetAmt;
} }
lsSql = lsSql + arrSql[arrCtr] + lsValue; lsSql = lsSql + arrSql[arrCtr] + lsValue;
//System.out.println("@@@@1 lsSql====["+lsSql+"]arrCtr===["+arrCtr+"]"); System.out.println("@@@@1 lsSql====["+lsSql+"]arrCtr===["+arrCtr+"]");
} }
if (arrStr.length < arrSql.length) if (arrStr.length < arrSql.length)
{ {
...@@ -2965,7 +2969,7 @@ public class PostOrdCreditChk ...@@ -2965,7 +2969,7 @@ public class PostOrdCreditChk
{ {
lsSql = lsPolicySql; lsSql = lsPolicySql;
} }
//System.out.println("@@@@2 lsSql====["+lsSql+"]"); System.out.println("@@@@2 lsSql====["+lsSql+"]");
////Executing the dynamit sql to get the result. ////Executing the dynamit sql to get the result.
pstmt = conn.prepareStatement(lsSql); pstmt = conn.prepareStatement(lsSql);
...@@ -2973,7 +2977,7 @@ public class PostOrdCreditChk ...@@ -2973,7 +2977,7 @@ public class PostOrdCreditChk
ResultSetMetaData rsmd=rs.getMetaData(); ResultSetMetaData rsmd=rs.getMetaData();
// int resultType = Integer.parseInt(rsmd.getColumnTypeName(1)); // int resultType = Integer.parseInt(rsmd.getColumnTypeName(1));
int resultType = rsmd.getColumnType(1); int resultType = rsmd.getColumnType(1);
//System.out.println("@@@@@ resultType["+resultType+"]"); System.out.println("@@@@@ resultType["+resultType+"]");
lsResult = ""; lsResult = "";
double lcResult = 0; double lcResult = 0;
int liResult = 9; int liResult = 9;
...@@ -3007,11 +3011,13 @@ public class PostOrdCreditChk ...@@ -3007,11 +3011,13 @@ public class PostOrdCreditChk
{ {
//liResult = rs.getInt(1); //liResult = rs.getInt(1);
lsResult = rs.getString(1); lsResult = rs.getString(1);
} }
else if( resultType >= 2 && resultType <= 8) else if( resultType >= 2 && resultType <= 8)
{ {
//lcResult = rs.getDouble(1); //lcResult = rs.getDouble(1);
lsResult = rs.getString(1); lsResult = rs.getString(1);
System.out.println("#### lsResult ["+lsResult+"]");
} }
else if( resultType == 1 || resultType == 12) else if( resultType == 1 || resultType == 12)
{ {
...@@ -3028,7 +3034,7 @@ public class PostOrdCreditChk ...@@ -3028,7 +3034,7 @@ public class PostOrdCreditChk
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("@@@@@@@lsPolicyCondition["+lsPolicyCondition+"]lsPolicyResult["+lsPolicyResult+"] lsResult["+lsResult+"]ldtResultResult["+ldtResultResult+"]"); System.out.println("@@@@@@@lsPolicyCondition["+lsPolicyCondition+"]lsPolicyResult["+lsPolicyResult+"]@@@@@@lsResult["+lsResult+"]@@@@@@@ldtResultResult["+ldtResultResult+"]");
////comparing the sql result with the given result in policy_result using the conditional ////comparing the sql result with the given result in policy_result using the conditional
////operater given in the policy_condition column. ////operater given in the policy_condition column.
if (lsPolicyCondition != null && lsPolicyCondition.trim().length() > 0 && lsPolicyResult != null && lsPolicyResult.trim().length() > 0) if (lsPolicyCondition != null && lsPolicyCondition.trim().length() > 0 && lsPolicyResult != null && lsPolicyResult.trim().length() > 0)
...@@ -3183,53 +3189,115 @@ public class PostOrdCreditChk ...@@ -3183,53 +3189,115 @@ public class PostOrdCreditChk
} }
} }
} }
//Pavan Rane start 02/11/17 START
if("T".equalsIgnoreCase(lsFail))
{ //asCheck[ctr] = 'R99'+"\t"+asDespId+"\t"+asSorder+"\t"+'Dynamic credit check failed !!!' //Commented Ruchira 08/06/2k6
//lsStr1 = 'Dynamic credit check failed !!!' //Commented Ruchira 27/06/2k6
//Added Ruchira 27/06/2k6
sql = " select title from itemser_cr_policy " +
" where item_ser = ? " +
" and cr_policy = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,asItemSer);
pstmt.setString(2,lsCrPolicy);
rs = pstmt.executeQuery();
if (rs.next())
{
lsStr1 = rs.getString("title");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
//lsStr1 = trim(lsStr1)
if( lsStr1 == null || lsStr1.trim().length() == 0 )
{
lsStr1 = lsCrPolicy+" Dynamic credit check failed !!!";
}
System.out.println("@@@@ 3219 lsStr1["+lsStr1+"]");
} //To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
if ("I".equals(asApplyTime))
//Added by Pavan R on 30/OCT/17 {
retArrayList = credit_check_update(asSorder,lsCrPolicy,adNetAmt,asApplyTime,lcCheckAmt,"C",lsStatus,conn); //lsStr3 = " , Invoice Amt.=> "+String(adNetAmt);
lsStr3 = " Invoice Amt.=> "+String(adNetAmt);
// added on 19/04/16 for status and amount }
System.out.println("@@@@@@@@@ retArrayList.size()["+ retArrayList.size()+"]"); else
System.out.println("@@@@@@@@@ retArrayList["+ retArrayList+"]"); {
//lsStr3 = " , Sales Order Amt.=> "+String(adNetAmt);
if( retArrayList.size() > 0) lsStr3 = " Sales Order Amt.=> "+String(adNetAmt);
{ }
lsStatus = retArrayList.get(0); //End To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
}
if( retArrayList.size() > 1) System.out.println("@@@@@@3229 adNetAmt["+adNetAmt+"]lsStr1["+lsStr1+"]lsStr3["+lsStr3+"]");
{
lcCheckAmt = Double.parseDouble(retArrayList.get(1)==null?"0":retArrayList.get(1)); //lsStr = String(adNetAmt)+"\t"+lsStr1+", "+lsStr3;
} lsStr = String(adNetAmt)+" "+lsStr1+","+lsStr3;
System.out.println("@@@@@ lsCrPolicy["+lsCrPolicy+"]lcCheckAmt["+lcCheckAmt+"]lsStatus["+lsStatus+"]lsStr["+lsStr+"]"); System.out.println("@@@@@@3233 lsStr["+lsStr+"]");
System.out.println("lsStatus::["+lsStatus+"]");
////Always when credit check fails it must get added into as_mail. retArrayList = credit_check_update(asSorder,lsCrPolicy,adNetAmt,asApplyTime,lcCheckAmt,"C",lsStatus,conn);
if (!"O".equals(lsStatus))
{ // added on 19/04/16 for status and amount
//lsMail[lsMail.length + 1] = lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr; System.out.println("@@@@@@@@@ retArrayList.size()["+ retArrayList.size()+"]");
mailList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr); System.out.println("@@@@@@@@@ retArrayList["+ retArrayList+"]");
}
if (lcCheckAmt > 0 || "F".equals(lsStatus) || lsStatus.trim().length() == 0) if( retArrayList.size() > 0)
{ {
//asCheck[ctr] = lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr; lsStatus = retArrayList.get(0);
//ctr = ctr + 1; }
//asCheckList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr); if( retArrayList.size() > 1)
{
lcCheckAmt = Double.parseDouble(retArrayList.get(1)==null?"0":retArrayList.get(1));
}
System.out.println("@@@@@ lsCrPolicy["+lsCrPolicy+"]lcCheckAmt["+lcCheckAmt+"]lsStatus["+lsStatus+"]lsStr["+lsStr+"]");
System.out.println("lsStatus::["+lsStatus+"]");
////Always when credit check fails it must get added into as_mail.
if (!"O".equals(lsStatus))
{
//lsMail[lsMail.length + 1] = lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr;
mailList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr);
}
if (lcCheckAmt > 0 || "F".equals(lsStatus) || lsStatus.trim().length() == 0)
{
//asCheck[ctr] = lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr;
//ctr = ctr + 1;
//asCheckList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr);
failedPolicyList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr+"\t"+lcCheckAmt+"\t"+lsStatus);
System.out.println("@@@@@@@@@@@failedPolicyList Size["+failedPolicyList.size()+"]");
System.out.println("@@@@@@@@@@@ failedPolicyList ["+failedPolicyList+"]");
}
System.out.println("@@@@ 3189 lsFail["+lsFail+"]::lsCrPolicy");
}
if ("I".equals(asApplyTime))
{
//****************** credit_check_update(asSorder,lsCrPolicy,adNetAmt,asApplyTime,lcCheckAmt,'U',lsStatus)
long startTime2 = System.currentTimeMillis();
credit_check_update(asSorder,lsCrPolicy,adNetAmt,asApplyTime,lcCheckAmt,"U",lsStatus,conn);
//Changed By Nasruddin Start 04-11-16
long endTime2 = System.currentTimeMillis();
System.out.println("DIFFERANCE IN TIME credit_check_update DATA IN SECONDS INSIDE CREDIT CHECK METHOD:::["+(endTime2-startTime2)/1000+"]");
//Changed By Nasruddin END 04-11-16
}
failedPolicyList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr+"\t"+lcCheckAmt+"\t"+lsStatus);
System.out.println("@@@@@@@@@@@failedPolicyList Size["+failedPolicyList.size()+"]");
System.out.println("@@@@@@@@@@@ failedPolicyList ["+failedPolicyList+"]");
}
System.out.println("@@@@ 3189 lsFail["+lsFail+"]::lsCrPolicy");
//End by Pavan R on 30/OCT/17
//System.out.println("@@@@ 3182 lsFail["+lsFail+"]"); }
//Pavan Rane start 02/11/17 end
} }
} }
//System.out.println("@@@@ 3185 lsFail["+lsFail+"]"); }
System.out.println("@@@@ 3192 lsFail["+lsFail+"]::lsCrPolicy");
//Added Ruchira 08/06/2k6 //Added Ruchira 08/06/2k6
//Credit check is failed so adding it into the asCheck array. //Credit check is failed so adding it into the asCheck array.
if("T".equalsIgnoreCase(lsFail)) //02/11/17 Pavan R start
/* if("T".equalsIgnoreCase(lsFail))
{ //asCheck[ctr] = 'R99'+"\t"+asDespId+"\t"+asSorder+"\t"+'Dynamic credit check failed !!!' //Commented Ruchira 08/06/2k6 { //asCheck[ctr] = 'R99'+"\t"+asDespId+"\t"+asSorder+"\t"+'Dynamic credit check failed !!!' //Commented Ruchira 08/06/2k6
//lsStr1 = 'Dynamic credit check failed !!!' //Commented Ruchira 27/06/2k6 //lsStr1 = 'Dynamic credit check failed !!!' //Commented Ruchira 27/06/2k6
//Added Ruchira 27/06/2k6 //Added Ruchira 27/06/2k6
...@@ -3253,7 +3321,7 @@ public class PostOrdCreditChk ...@@ -3253,7 +3321,7 @@ public class PostOrdCreditChk
{ {
lsStr1 = lsCrPolicy+" Dynamic credit check failed !!!"; lsStr1 = lsCrPolicy+" Dynamic credit check failed !!!";
} }
//System.out.println("@@@@ 3213 lsStr1["+lsStr1+"]"); System.out.println("@@@@ 3219 lsStr1["+lsStr1+"]");
//} //}
//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
...@@ -3269,24 +3337,25 @@ public class PostOrdCreditChk ...@@ -3269,24 +3337,25 @@ public class PostOrdCreditChk
} }
//End To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6 //End To show the Invoice/SO amt in credit chek fail description, Added Ruchira 21/08/2k6
//System.out.println("@@@@@@3229 adNetAmt["+adNetAmt+"]lsStr1["+lsStr1+"]lsStr3["+lsStr3+"]"); System.out.println("@@@@@@3229 adNetAmt["+adNetAmt+"]lsStr1["+lsStr1+"]lsStr3["+lsStr3+"]");
//lsStr = String(adNetAmt)+"\t"+lsStr1+", "+lsStr3; //lsStr = String(adNetAmt)+"\t"+lsStr1+", "+lsStr3;
lsStr = String(adNetAmt)+" "+lsStr1+","+lsStr3; lsStr = String(adNetAmt)+" "+lsStr1+","+lsStr3;
//System.out.println("@@@@@@3233 lsStr["+lsStr+"]"); System.out.println("@@@@@@3233 lsStr["+lsStr+"]");
*/
//02/11/17 Pavan R end
// asCheck[ctr] = lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr // asCheck[ctr] = lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr
// ctr = ctr + 1 // ctr = ctr + 1
////Checking for overriden / failed / balance amt, Ruchira 28/08/2k6 ////Checking for overriden / failed / balance amt, Ruchira 28/08/2k6
//****************** gbf_credit_check_update(asSorder,lsCrPolicy,adNetAmt,asApplyTime,lcCheckAmt,'C',lsStatus) //****************** gbf_credit_check_update(asSorder,lsCrPolicy,adNetAmt,asApplyTime,lcCheckAmt,'C',lsStatus)
// Added by Pavan R on 30/OCT/17 // Pavan Rane Start
/* /* retArrayList = credit_check_update(asSorder,lsCrPolicy,adNetAmt,asApplyTime,lcCheckAmt,"C",lsStatus,conn);
retArrayList = credit_check_update(asSorder,lsCrPolicy,adNetAmt,asApplyTime,lcCheckAmt,"C",lsStatus,conn);
// added on 19/04/16 for status and amount // added on 19/04/16 for status and amount
//System.out.println("@@@@@@@@@ retArrayList.size()["+ retArrayList.size()+"]"); System.out.println("@@@@@@@@@ retArrayList.size()["+ retArrayList.size()+"]");
if( retArrayList.size() > 0) if( retArrayList.size() > 0)
{ {
lsStatus = retArrayList.get(0); lsStatus = retArrayList.get(0);
...@@ -3295,7 +3364,7 @@ public class PostOrdCreditChk ...@@ -3295,7 +3364,7 @@ public class PostOrdCreditChk
{ {
lcCheckAmt = Double.parseDouble(retArrayList.get(1)==null?"0":retArrayList.get(1)); lcCheckAmt = Double.parseDouble(retArrayList.get(1)==null?"0":retArrayList.get(1));
} }
//System.out.println("@@@@@ lsCrPolicy["+lsCrPolicy+"]lcCheckAmt["+lcCheckAmt+"]lsStatus["+lsStatus+"]lsStr["+lsStr+"]"); System.out.println("@@@@@ lsCrPolicy["+lsCrPolicy+"]lcCheckAmt["+lcCheckAmt+"]lsStatus["+lsStatus+"]lsStr["+lsStr+"]");
////Always when credit check fails it must get added into as_mail. ////Always when credit check fails it must get added into as_mail.
...@@ -3304,25 +3373,28 @@ public class PostOrdCreditChk ...@@ -3304,25 +3373,28 @@ public class PostOrdCreditChk
//lsMail[lsMail.length + 1] = lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr; //lsMail[lsMail.length + 1] = lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr;
mailList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr); mailList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr);
} }
if (lcCheckAmt > 0 || "F".equals(lsStatus) || lsStatus.trim().length() == 0) System.out.println("####lsCrPolicy ["+lsCrPolicy+"]");
System.out.println("####lcCheckAmt ["+lcCheckAmt+"]");
System.out.println("####lsstatus ["+lsStatus+"]");*/
/*if (lcCheckAmt > 0 || "F".equals(lsStatus) || lsStatus.trim().length() == 0)
{ {
//asCheck[ctr] = lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr; //asCheck[ctr] = lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr;
//ctr = ctr + 1; //ctr = ctr + 1;
//asCheckList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr); //asCheckList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr);
//failedPolicyList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr);
failedPolicyList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr);
failedPolicyList.add(lsCrPolicy+"\t"+asDespId+"\t"+asSorder+"\t"+lsStr+"\t"+lcCheckAmt+"\t"+lsStatus); System.out.println("@@@@@@@@@@@failedPolicyList Size["+failedPolicyList.size()+"]");
System.out.println("@@@@@@@@@@@ failedPolicyList ["+failedPolicyList+"]");
}*/
} //Pavan Rane End
*/
//End by Pavan R on 30/OCT/17
}
////Added Ruchira 29/08/2k6, to update the used_amt in business_logic_check table even ////Added Ruchira 29/08/2k6, to update the used_amt in business_logic_check table even
///if the cr check is failed or not failed. ///if the cr check is failed or not failed.
if ("I".equals(asApplyTime))
//02/11/17 Pavan R start
/* if ("I".equals(asApplyTime))
{ {
//****************** credit_check_update(asSorder,lsCrPolicy,adNetAmt,asApplyTime,lcCheckAmt,'U',lsStatus) //****************** credit_check_update(asSorder,lsCrPolicy,adNetAmt,asApplyTime,lcCheckAmt,'U',lsStatus)
...@@ -3332,10 +3404,12 @@ public class PostOrdCreditChk ...@@ -3332,10 +3404,12 @@ public class PostOrdCreditChk
long endTime2 = System.currentTimeMillis(); long endTime2 = System.currentTimeMillis();
System.out.println("DIFFERANCE IN TIME credit_check_update DATA IN SECONDS INSIDE CREDIT CHECK METHOD:::["+(endTime2-startTime2)/1000+"]"); System.out.println("DIFFERANCE IN TIME credit_check_update DATA IN SECONDS INSIDE CREDIT CHECK METHOD:::["+(endTime2-startTime2)/1000+"]");
//Changed By Nasruddin END 04-11-16 //Changed By Nasruddin END 04-11-16
} }*/
//02/11/17 Pavan R end
} //}
////End Added Ruchira 29/08/2k6 ////End Added Ruchira 29/08/2k6
//End Added Ruchira 08/06/2k6 //End Added Ruchira 08/06/2k6
...@@ -3934,7 +4008,7 @@ public class PostOrdCreditChk ...@@ -3934,7 +4008,7 @@ public class PostOrdCreditChk
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
// System.out.println("@@@@@@ lc_aprv_amt["+lc_aprv_amt+"]ll_count["+ll_count+"]"); System.out.println("@@@@@@ lc_aprv_amt["+lc_aprv_amt+"]ll_count["+ll_count+"]");
//Checking for status only. //Checking for status only.
if( lc_aprv_amt == 0 && ll_count > 0 ) if( lc_aprv_amt == 0 && ll_count > 0 )
{ {
...@@ -3967,11 +4041,11 @@ public class PostOrdCreditChk ...@@ -3967,11 +4041,11 @@ public class PostOrdCreditChk
} }
else else
{ {
as_status = ""; as_status = " ";
} }
ac_check_amt = 0; ac_check_amt = 0;
//System.out.println("@@@@@@@@@@3907 as_status["+as_status+"]"); System.out.println("@@@@@@@@@@3907 as_status["+as_status+"]");
} }
else //////Checking for Amount else //////Checking for Amount
{ {
...@@ -4031,7 +4105,7 @@ public class PostOrdCreditChk ...@@ -4031,7 +4105,7 @@ public class PostOrdCreditChk
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
//System.out.println("@@@@@@@@@ ll_fcount["+ll_fcount+"]"); System.out.println("@@@@@@@@@ ll_fcount["+ll_fcount+"]");
if( ll_fcount > 0 ) if( ll_fcount > 0 )
{ {
ac_check_amt = 0; ac_check_amt = 0;
...@@ -4046,9 +4120,9 @@ public class PostOrdCreditChk ...@@ -4046,9 +4120,9 @@ public class PostOrdCreditChk
}//end if }//end if
if( ll_count == 0 ) if( ll_count == 0 )
{ {
as_status = ""; //New Record to be added as_status = " "; //New Record to be added
} }
//System.out.println("@@@@@@@@@@3984 as_status["+as_status+"]"); System.out.println("@@@@@@ Inside credit_check_update as_status["+as_status+"]");
} }
else if("U".equalsIgnoreCase(as_check_flag) && "I".equalsIgnoreCase(asApplyTime )) else if("U".equalsIgnoreCase(as_check_flag) && "I".equalsIgnoreCase(asApplyTime ))
{ {
...@@ -4110,6 +4184,7 @@ public class PostOrdCreditChk ...@@ -4110,6 +4184,7 @@ public class PostOrdCreditChk
retArrayList.add(as_status); retArrayList.add(as_status);
retArrayList.add(""+ac_check_amt); retArrayList.add(""+ac_check_amt);
return retArrayList; return retArrayList;
}//end if }//end if
////End Added Ruchira 24/08/2k6 (DI6SUN0120), If approved amt = 0 or status = 'O' then not to make any credit check. ////End Added Ruchira 24/08/2k6 (DI6SUN0120), If approved amt = 0 or status = 'O' then not to make any credit check.
......
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