Commit dc74ce65 authored by ssalve's avatar ssalve

Sarita : Done change to set tax_class , tax_chapter and tax_env values set...

Sarita : Done change to set tax_class , tax_chapter and tax_env values set from porddet table and not for sorddet table on 26 DEC 2018

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@194914 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 244e7f72
......@@ -685,8 +685,17 @@ public class PostOrderActivity {
String errorType="";
String mapKey="";
sql="select despdt.line_no,despdt.item_code,despdt.sord_no,despdt.line_no__sord," +
//Added and Commented by sarita to remove tax_class , tax_chap,tax_env data getting from SORDDET table on 26 DEC 2018 [START]
/*sql="select despdt.line_no,despdt.item_code,despdt.sord_no,despdt.line_no__sord," +
"sdet.tax_class,sdet.tax_chap,sdet.tax_env,"
+ "despdt.unit,despdt.unit__std,despdt.quantity,despdt.quantity__stduom,despdt.conv__qty_stduom,"
+ "despdt.loc_code,despdt.lot_no,despdt.lot_sl,despdt.mfg_date,despdt.exp_date,despdt.rate__stduom,"
+ "despdt.rate__clg,despdt.no_art,despdt.site_code__mfg," +
"despdt.GROSS_WEIGHT,despdt.TARE_WEIGHT,despdt.NETT_WEIGHT,"
+ "despdt.retest_date,despdt.dimension,despdt.pallet_wt,despdt.pack_instr " +
" from despatchdet despdt,SORDDET sdet where despdt.sord_no =sdet.sale_order and " +
" despdt.line_no__sord = sdet.line_no and despdt.desp_id=? ";*/
sql="select despdt.line_no,despdt.item_code,despdt.sord_no,despdt.line_no__sord,"
+ "despdt.unit,despdt.unit__std,despdt.quantity,despdt.quantity__stduom,despdt.conv__qty_stduom,"
+ "despdt.loc_code,despdt.lot_no,despdt.lot_sl,despdt.mfg_date,despdt.exp_date,despdt.rate__stduom,"
+ "despdt.rate__clg,despdt.no_art,despdt.site_code__mfg," +
......@@ -694,6 +703,7 @@ public class PostOrderActivity {
+ "despdt.retest_date,despdt.dimension,despdt.pallet_wt,despdt.pack_instr " +
" from despatchdet despdt,SORDDET sdet where despdt.sord_no =sdet.sale_order and " +
" despdt.line_no__sord = sdet.line_no and despdt.desp_id=? ";
//Added and Commented by sarita to remove tax_class , tax_chap,tax_env data getting from SORDDET table on 26 DEC 2018 [END]
pstmt=conn.prepareStatement(sql);
pstmt.setString(1,despId);
rs=pstmt.executeQuery();
......@@ -702,9 +712,11 @@ public class PostOrderActivity {
itemCode=rs.getString("item_code");
sordNoDet=rs.getString("sord_no");
soLineNoDet=rs.getString("line_no__sord");
taxClass=checkNull(rs.getString("tax_class"));
//Commented by sarita to remove tax_class , tax_chap,tax_env data getting from SORDDET table on 26 DEC 2018 [START]
/*taxClass=checkNull(rs.getString("tax_class"));
taxChap=checkNull(rs.getString("tax_chap"));
taxEnv=checkNull(rs.getString("tax_env"));
taxEnv=checkNull(rs.getString("tax_env"));*/
//Commented by sarita to remove tax_class , tax_chap,tax_env data getting from SORDDET table on 26 DEC 2018 [END]
unit=rs.getString("unit");
unitStd=rs.getString("unit__std");
quantity=rs.getDouble("quantity");
......@@ -730,9 +742,11 @@ public class PostOrderActivity {
System.out.println("@@Commented by mayur on 28-02-18@@");
System.out.println("siteMfg["+siteMfg+"]");
System.out.println("taxClass["+taxClass+"]");
//Commented by sarita on 26 DEC 2018 [START]
/*System.out.println("taxClass["+taxClass+"]");
System.out.println("taxChap["+taxChap+"]");
System.out.println("taxEnv["+taxEnv+"]");
System.out.println("taxEnv["+taxEnv+"]");*/
//Commented by sarita on 26 DEC 2018 [END]
sql="select case when qc_reqd is null then 'N' else qc_reqd end,"
+ "(case when ordc_perc is null then 0 else ordc_perc end), "
......@@ -758,12 +772,19 @@ public class PostOrderActivity {
if(custPord.trim().length()>0)
{
cntPO=0; //added by arun 06-OCT-2017
sql="select d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr,"
//Added and Commented by sarita to set tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [START]
/*sql="select d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr,"
+ " d.quantity, (case when d.dlv_qty is null then 0 else d.dlv_qty end) as dlvqty "
+ " from porder h, porddet d where d.purc_order = h.purc_order "
+ " and d.purc_order = ? and d.line_no__sord = ? "
+ " and d.status = 'O' and d.item_code = ?";*/
sql="select d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr,"
+ " d.quantity, (case when d.dlv_qty is null then 0 else d.dlv_qty end) as dlvqty, "
+ " d.tax_class, d.tax_chap, d.tax_env "
+ " from porder h, porddet d where d.purc_order = h.purc_order "
+ " and d.purc_order = ? and d.line_no__sord = ? "
+ " and d.status = 'O' and d.item_code = ?";
//Added and Commented by sarita to set tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [END]
pstmt1=connCP.prepareStatement(sql);
pstmt1.setString(1,custPord);
pstmt1.setString(2,soLineNoDet);
......@@ -780,7 +801,11 @@ public class PostOrderActivity {
lineNoPO=rs1.getString("line_no");
ordQty=rs1.getDouble("quantity");
dlvQty=rs1.getDouble("dlvqty");
//Added by sarita to get tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018[START]
taxClass=checkNull(rs.getString("tax_class"));
taxChap=checkNull(rs.getString("tax_chap"));
taxEnv=checkNull(rs.getString("tax_env"));
//Added by sarita to get tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [END]
}
rs1.close();
rs1=null;
......@@ -788,10 +813,17 @@ public class PostOrderActivity {
pstmt1=null;
if(cntPO==0)
{
sql=" select d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr, "
//Added and Commented by sarita to set tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [START]
/*sql=" select d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr, "
+ " d.quantity, (case when d.dlv_qty is null then 0 else d.dlv_qty end) as dlvqty "
+ " from porder h, porddet d where d.purc_order = h.purc_order "
+ " and d.purc_order = ? and d.status = 'O' and d.item_code = ? ";*/
sql=" select d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr, "
+ " d.quantity, (case when d.dlv_qty is null then 0 else d.dlv_qty end) as dlvqty, "
+ " d.tax_class, d.tax_chap, d.tax_env "
+ " from porder h, porddet d where d.purc_order = h.purc_order "
+ " and d.purc_order = ? and d.status = 'O' and d.item_code = ? ";
//Added and Commented by sarita to set tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [END]
pstmt1=connCP.prepareStatement(sql);
pstmt1.setString(1,custPord);
pstmt1.setString(2,itemCode);
......@@ -808,7 +840,11 @@ public class PostOrderActivity {
lineNoPO=rs1.getString("line_no");
ordQty=rs1.getDouble("quantity");
dlvQty=rs1.getDouble("dlvqty");
//Added by sarita to get tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018[START]
taxClass=checkNull(rs.getString("tax_class"));
taxChap=checkNull(rs.getString("tax_chap"));
taxEnv=checkNull(rs.getString("tax_env"));
//Added by sarita to get tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [END]
}
rs1.close();
rs1=null;
......@@ -828,7 +864,8 @@ public class PostOrderActivity {
}else
{
cntPO=0;
sql="select d.purc_order, d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr, "
//Added and Commented by sarita to set tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [START]
/*sql="select d.purc_order, d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr, "
+ " d.quantity, (case when d.dlv_qty is null then 0 else d.dlv_qty end) dlvqty from porder h, porddet d "
+ " where h.supp_code = ? "
+ " and h.site_code__dlv = ? "
......@@ -836,7 +873,19 @@ public class PostOrderActivity {
+ " and h.status = 'O' "
+ " and d.purc_order = h.purc_order "
+ " and d.status = 'O' "
+ " and d.item_code = ? ";*/
sql="select d.purc_order, d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr, "
+ " d.quantity, (case when d.dlv_qty is null then 0 else d.dlv_qty end) as dlvqty, "
+ " d.tax_class, d.tax_chap, d.tax_env "
+ " from porder h, porddet d "
+ " where h.supp_code = ? "
+ " and h.site_code__dlv = ? "
+ " and h.item_ser = ? "
+ " and h.status = 'O' "
+ " and d.purc_order = h.purc_order "
+ " and d.status = 'O' "
+ " and d.item_code = ? ";
//Added and Commented by sarita to set tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [END]
pstmt1=connCP.prepareStatement(sql);
pstmt1.setString(1, suppCodeCh);
pstmt1.setString(2, siteCodeCh);
......@@ -854,7 +903,11 @@ public class PostOrderActivity {
custPord=rs1.getString("purc_order");
ordQty=rs1.getDouble("quantity");
dlvQty=rs1.getDouble("dlvqty");
//Added by sarita to get tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018[START]
taxClass=checkNull(rs.getString("tax_class"));
taxChap=checkNull(rs.getString("tax_chap"));
taxEnv=checkNull(rs.getString("tax_env"));
//Added by sarita to get tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [END]
}
rs1.close();
rs1=null;
......@@ -876,7 +929,8 @@ public class PostOrderActivity {
}
{
cntPO=0;
sql="select d.purc_order, d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr, "
//Added and Commented by sarita to set tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [START]
/*sql="select d.purc_order, d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr, "
+ " d.quantity, (case when d.dlv_qty is null then 0 else d.dlv_qty end) as dlvqty from porder h, porddet d "
+ " where h.supp_code = ? "
+ " and h.site_code__dlv = ? "
......@@ -884,7 +938,19 @@ public class PostOrderActivity {
+ " and h.status = 'O' "
+ " and d.purc_order = h.purc_order "
+ " and d.status = 'C' "
+ " and d.item_code = ? ";*/
sql="select d.purc_order, d.line_no as line_no, d.acct_code__dr as acct_code__dr, d.cctr_code__dr as cctr_code__dr, d.acct_code__cr as acct_code__cr, d.cctr_code__cr as cctr_code__cr, "
+ " d.quantity, (case when d.dlv_qty is null then 0 else d.dlv_qty end) as dlvqty, "
+ " d.tax_class, d.tax_chap, d.tax_env "
+ " from porder h, porddet d "
+ " where h.supp_code = ? "
+ " and h.site_code__dlv = ? "
+ " and h.item_ser = ? "
+ " and h.status = 'O' "
+ " and d.purc_order = h.purc_order "
+ " and d.status = 'C' "
+ " and d.item_code = ? ";
//Added and Commented by sarita to set tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [END]
pstmt1=connCP.prepareStatement(sql);
pstmt1.setString(1,suppCodeCh);
pstmt1.setString(2,siteCodeCh);
......@@ -902,7 +968,11 @@ public class PostOrderActivity {
custPord=rs1.getString("purc_order");
ordQty=rs1.getDouble("quantity");
dlvQty=rs1.getDouble("dlvqty");
//Added by sarita to get tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018[START]
taxClass=checkNull(rs.getString("tax_class"));
taxChap=checkNull(rs.getString("tax_chap"));
taxEnv=checkNull(rs.getString("tax_env"));
//Added by sarita to get tax_class , tax_chap and tax_env from porddet table on 26 DEC 2018 [END]
}
rs1.close();
rs1=null;
......@@ -920,6 +990,12 @@ public class PostOrderActivity {
}
}
//Added by sarita on 26 DEC 2018 [START]
System.out.println("taxClass["+taxClass+"]");
System.out.println("taxChap["+taxChap+"]");
System.out.println("taxEnv["+taxEnv+"]");
//Added by sarita on 26 DEC 2018 [END]
sql=" select grade,potency_perc,batch_no,supp_code__mfg,rate from stock"
+ " where item_code = ? and site_code = ? and loc_code = ? "
+ " and lot_no = ? and lot_sl = ?" ;
......
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