Commit dfae6c5d authored by prane's avatar prane

groupscheme button in homescreen component merge

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@176945 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 50a2bf5c
......@@ -84,7 +84,7 @@ public class SorderGroupSchemeAct extends ActionHandlerEJB implements SorderGrou
StateCodeDlv = checkNull(rs.getString(10));
CountCodeDlv = checkNull(rs.getString(11));
custCode = checkNull(rs.getString(12));
count3 = 0;
System.out.println("lineNo["+lineNo+"]");
System.out.println("itemCodeOrd["+itemCodeOrd+"]");
System.out.println("qty["+qty+"]");
......@@ -437,20 +437,12 @@ public class SorderGroupSchemeAct extends ActionHandlerEJB implements SorderGrou
schFalg = (String)schemItemMap.get("schemeNature");
System.out.println("schemItemMap[-"+schLineNo+"-"+schFalg+"-"+schItemCode+"-"+schScheme+"-"+schQty+"-"+schRate+"-"+schNature);
if ("F".equalsIgnoreCase(schFalg))
{
freeTotQty = freeTotQty+schQty;
}else if("C".equalsIgnoreCase(schFalg)){
chrgbleTotQty = chrgbleTotQty + schQty;
}
System.out.println("freeTotQty["+freeTotQty+"]--chrgbleTotQty["+chrgbleTotQty+"]");
//Scheme applied msg
mainStr="Line No:"+schLineNo+" Item Code:"+schItemCode+" Scheme:"+schScheme+"\n";
msgNotAppString = msgNotAppString.append(mainStr);
System.out.println("--msgNotAppString--"+msgNotAppString);
}
//Scheme applied msg
mainStr="Line No:"+schLineNo+" Item Code:"+schItemCode+" Scheme:"+schScheme;
msgNotAppString = msgNotAppString.append(mainStr);
System.out.println("--msgNotAppString--"+msgNotAppString);
}
//Checks scheme type and description
sql3 = "SELECT DESCR, SCHEME_TYPE, PURC_BASE, SCH_ALLOWENCE FROM SCH_GROUP_DEF where SCHEME_CODE= ?";
......@@ -484,11 +476,20 @@ public class SorderGroupSchemeAct extends ActionHandlerEJB implements SorderGrou
if ("F".equalsIgnoreCase(schFalg))
{
freeTotQty = freeTotQty+schQty;
//freeTotQty = freeTotQty+schQty;
if("0".equalsIgnoreCase(schemeType))
{
//freeQty = ((qty * SchAllowence) / PurcBase);
freeQty = ((chrgbleTotQty * SchAllowence) / PurcBase);
if(freeQty > freeTotQty && freeTotQty > 0 )
{
//Scheme applied msg
mainStr="\n\n Some of the Scheme Items, Offer not selected.\n" +
"Eligible Free Quantity:"+freeQty+" only.\n"+
"Total Free Quantity:"+freeTotQty+"\n";
msgAppStrinrg = msgAppStrinrg.append(mainStr);
System.out.println("--msgNotAppString--"+msgAppStrinrg);
}
}
else if("1".equalsIgnoreCase(schemeType))
{
......@@ -616,7 +617,7 @@ public class SorderGroupSchemeAct extends ActionHandlerEJB implements SorderGrou
//mainStr=begPart+msgString;
if(msgNotAppString != null && msgNotAppString.length() > 0)
{
msgNotApplied="Following Scheme Item, Free Item Not define :";
msgNotApplied="Following Scheme Item, Offer item not selected :";
}
else
{
......@@ -624,7 +625,7 @@ public class SorderGroupSchemeAct extends ActionHandlerEJB implements SorderGrou
}
if(msgAppStrinrg != null && msgAppStrinrg.length() > 0)
{
msgApplied="Scheme Applied On Following item:";
msgApplied="Scheme Applied on items :";
}else
{
msgApplied = " ";
......@@ -708,3 +709,4 @@ public class SorderGroupSchemeAct extends ActionHandlerEJB implements SorderGrou
}
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