Commit aea7a36d authored by agaikwad's avatar agaikwad

Request_id-D15GSUN005


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101106 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4dbfeff6
...@@ -1824,9 +1824,45 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1824,9 +1824,45 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
*/ */
System.out.println("Discount in dom: " + discount); System.out.println("Discount in dom: " + discount);
dis = Double.parseDouble(discount); dis = Double.parseDouble(discount);
boolean falgporate=false;
String pordTyperate="";
if (indNo != null && indNo.length() > 0) if (indNo != null && indNo.length() > 0)
{ {
//-----------------
String typeallowporatelist="";
sql = "select pord_type from porder where purc_order = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
rs = pstmt.executeQuery();
if (rs.next())
{
pordTyperate = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("Pordtype.........." + pordTyperate);
typeallowporatelist =discommon.getDisparams("999999","TYPE_ALLOW_PURC_RATE", conn);
System.out.println(">>>>>>>>>In varValue for type allow purchase rate : "+typeallowporatelist);
typeallowporatelist = typeallowporatelist.trim();
if(typeallowporatelist != null && typeallowporatelist.trim().length() > 0 && typeallowporatelist != "NULLFOUND")
{
String typeallowporatelistArr[] = typeallowporatelist.split(",");
ArrayList typeallowporate = new ArrayList<String>(Arrays.asList(typeallowporatelistArr));
if(typeallowporate.contains(pordTyperate))
{
falgporate = true;
}
else
{
falgporate = false;
}
}
System.out.println("Rate is" + rate); System.out.println("Rate is" + rate);
if(falgporate = true)
{
if (dis > 0) if (dis > 0)
{ {
Disrate = (rate * dis) / 100; Disrate = (rate * dis) / 100;
...@@ -1834,7 +1870,8 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1834,7 +1870,8 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
rate = rate - Disrate; rate = rate - Disrate;
System.out.println("Rate discount condition is"+ rate); System.out.println("Rate discount condition is"+ rate);
} }
sql = " select case when purc_rate is null then 0 else purc_rate end ," sql = " select case when purc_rate is null then 0 else purc_rate end ,"
+ "case when max_rate is null then 0 else max_rate end " + "case when max_rate is null then 0 else max_rate end "
+ " from indent where ind_no = ? "; + " from indent where ind_no = ? ";
...@@ -1859,7 +1896,9 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder ...@@ -1859,7 +1896,9 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal,POrder
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName errFields.add(childNodeName
.toLowerCase()); .toLowerCase());
} // Ended by Abhijit Gaikwad Request }
}
// Ended by Abhijit Gaikwad Request
// ID-D15GSUN005 // ID-D15GSUN005
/* /*
* if (( rate > maxRate ) || ( rate < purcRate * if (( rate > maxRate ) || ( rate < purcRate
......
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