Commit 822c36a0 authored by msalla's avatar msalla

Purchase return issue tax class,taxchap tax env not set not stockhelp button

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@210386 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 26c4adc8
......@@ -192,7 +192,7 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
String allocqty = "";
double avl =0.00;
String ls_allowtax="";
String mtaxclass="",mtaxchap="",mtaxenv="",purcOrder="",poLineno="",retopt="";
String mtaxclass="",mtaxchap="",mtaxenv="",tranidrcp="",purcOrder="",poLinenorcp="",retopt="",linenoOrd="";
try
{
DistCommon disscommon = new DistCommon();
......@@ -222,10 +222,21 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
//added by monika-23 august 2019
purcOrder= genericUtility.getColumnValue("purc_order",dom1);
poLineno= genericUtility.getColumnValue("line_no",dom);
retopt = genericUtility.getColumnValue("ret_opt", dom1);//end
}
// poLineno= genericUtility.getColumnValue("line_no",dom);
retopt =genericUtility.getColumnValue("ret_opt", dom1);//end
tranidrcp=genericUtility.getColumnValue("tran_id__rcp",dom);//added by monika 21 oct 2019.
poLinenorcp= chkNull(genericUtility.getColumnValue("line_no__rcp",dom));
linenoOrd= genericUtility.getColumnValue("line_no__ord",dom);//end
poLinenorcp = " " + poLinenorcp;
poLinenorcp = poLinenorcp.substring(poLinenorcp.length() - 3,poLinenorcp.length());
linenoOrd = " " + linenoOrd;
linenoOrd = linenoOrd.substring(linenoOrd.length() - 3,linenoOrd.length());
System.out.println(" from det line no rcp ["+poLinenorcp.substring(poLinenorcp.length() - 3,poLinenorcp.length()));
System.out.println("SUSTRING VALUE ["+linenoOrd.substring(linenoOrd.length() - 3,linenoOrd.length())+"[POLINE---["+poLinenorcp+"]");
System.out.println(" from det line no rcp ["+poLinenorcp+" from det line no ord ["+linenoOrd);
}
System.out.println(" in if condition line no rcp ["+poLinenorcp);
sql = " SELECT stock.site_code , site.descr , "
+" stock.item_code as item_code,item.descr as item_descr , "
......@@ -266,13 +277,41 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
ls_allowtax = disscommon.getDisparams("999999",
"CALC_TAX_ON_REPLACE", conn);
}
if (ls_allowtax.equalsIgnoreCase("Y")) {
if (ls_allowtax.equalsIgnoreCase("Y"))
{
if(poLinenorcp != null && poLinenorcp.trim().length() > 0)
{
sql = "select tax_class,tax_chap,tax_env "
+ " from porcpdet "
+ " where tran_id = ? and line_no= ? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,tranidrcp);//
pstmt1.setString(2, poLinenorcp);
rs1 = pstmt1.executeQuery();
if(rs1.next())
{
mtaxclass =rs1.getString("tax_class");
mtaxchap =rs1.getString("tax_chap");
mtaxenv = rs1.getString("tax_env");
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
System.out.println(" in if condition tran_id rcp["+tranidrcp+"] line no rcp ["+poLinenorcp+" ] tax class["+mtaxclass+"] tax chap["+mtaxchap+"] tax env["+mtaxenv);
}
else {
sql = "select tax_class,tax_chap,tax_env "
+ " from porddet "
+ " where purc_order = ? and line_no = ? ";
+ " where purc_order = ? and line_no=?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,purcOrder);//
pstmt1.setString(2, poLineno);
pstmt1.setString(2, linenoOrd);
rs1 = pstmt1.executeQuery();
if(rs1.next())
{
......@@ -284,6 +323,10 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
rs1 = null;
pstmt1.close();
pstmt1 = null;
System.out.println(" in else condition purc_ord rcp["+purcOrder+"] line no ord ["+linenoOrd+" ] tax class["+mtaxclass+"] tax chap["+mtaxchap+"] tax env["+mtaxenv);
}
}
qty = rs.getString(11)== null?"0.00":rs.getString(11);
......@@ -683,6 +726,12 @@ public class GenStkHelpAct extends ActionHandlerEJB implements GenStkHelpActLoca
}
return string;
}*/
private String chkNull(String input) {
if (input == null || "null".equalsIgnoreCase(input)) {
input = "";
}
return input;
}
......
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