Commit edb7745a authored by ngadkari's avatar ngadkari

discount defined in bom scheme is not getting applied on sales order

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@197815 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e298c085
......@@ -2554,6 +2554,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
PreparedStatement pstmt = null ,pstmt1=null,pstmt2=null;
ResultSet rs = null,rs1=null,rs2=null;
String taxChap=null;
double mdiscPerc=0.0;// variable declared by nandkumar gadkari on 28/02/19
DistCommon distCommon = new DistCommon();
try
{
......@@ -2599,8 +2600,8 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
if("B".equalsIgnoreCase(lineType))
{
sql2 = "select bom.unit, bom.batch_qty, bomdet.item_ref, bomdet.qty_per, bomdet.req_type, bomdet.min_qty, " +
"bomdet.app_min_qty, bomdet.app_max_qty, bomdet.nature from bom, bomdet where bomdet.bom_code = ? and " +
" bomdet.item_code = ? and bomdet.item_ref = ? and bom.bom_code = bomdet.bom_code";
"bomdet.app_min_qty, bomdet.app_max_qty, bomdet.nature ,bomdet.disc_perc from bom, bomdet where bomdet.bom_code = ? and " +
" bomdet.item_code = ? and bomdet.item_ref = ? and bom.bom_code = bomdet.bom_code";//bomdet.disc_perc column added by nandkumar gadkari on 28/02/19
pstmt2 = conn.prepareStatement(sql2);
pstmt2.setString(1, itemCode);
pstmt2.setString(2, mitemCode);
......@@ -2617,8 +2618,8 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
aminqty = rs2.getDouble("app_min_qty");
amaxqty = rs2.getDouble("app_max_qty");
mnature = rs2.getString("nature");
System.out.println("aminqty"+aminqty+" "+"amaxqty"+amaxqty);
mdiscPerc = rs2.getDouble("disc_perc");//disc_perc column added by nandkumar gadkari on 28/02/19
System.out.println("aminqty"+aminqty+" "+"amaxqty"+amaxqty+" "+"disc_perc"+mdiscPerc);
System.out.println("mreqtype"+mreqtype);
}
rs2.close();
......@@ -2898,10 +2899,10 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
+ "quantity,unit, line_type,min_shelf_life,max_shelf_life,nature," +
"order_date,order_type,dsp_date,rate , "
//Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[start]
+" qty_alloc, qty_desp,tax_chap )"
+" qty_alloc, qty_desp,tax_chap ,discount )"//discount column added by nandkumar gadkari on 28/02/19
//Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[start]
+ " values "
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
+ "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
pstmt2=conn.prepareStatement(sql);
pstmt2.setString(1,expLev+mlevel);
pstmt2.setString(2,saleOrder);
......@@ -2931,6 +2932,7 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
pstmt2.setString(25,"0");
//Changed by Manish on 12/09/16 for allocated quantity and despatch quantity[end]
pstmt2.setString(26,taxChap);
pstmt2.setDouble(27,mdiscPerc);//mdiscPerc column set by nandkumar gadkari on 28/02/19
insertCnt= pstmt2.executeUpdate();
pstmt2.close();
pstmt2=null;
......
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