Commit 5ebce636 authored by kdabholkar's avatar kdabholkar

changed in invoice and credit note query of GSTR1 for cust_code__bil changes

- wrong cust_name display in case of CUST_CODE__BIL so done the needful changes 
  while making join with the customer master added following condition 
  WHERE customer.cust_code = (CASE WHEN trim(sot.CUST_TAX_OPT) = '1'
    THEN invoice.CUST_CODE__BIL ELSE invoice.cust_code)

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@195975 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 44224593
...@@ -595,7 +595,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -595,7 +595,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code" //+" where c.cust_code = i.cust_code"
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.state_code " +" and state.state_code = c.state_code "
+" and i.inv_type=sot.ORDER_TYPE" +" and i.inv_type=sot.ORDER_TYPE"
...@@ -1571,7 +1573,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -1571,7 +1573,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" (select tax_reg_2 from sales_pers where sales_pers.sales_pers=i.sales_pers) AS ECOM_REG_NO," +" (select tax_reg_2 from sales_pers where sales_pers.sales_pers=i.sales_pers) AS ECOM_REG_NO,"
+" 'S-INV' as ref_ser " +" 'S-INV' as ref_ser "
+" from invoice i,customer c, despatch d, site s, state state, sordertype sot" +" from invoice i,customer c, despatch d, site s, state state, sordertype sot"
+" where c.cust_code = i.cust_code " // +" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
/* +" where (case when trim(sot.CUST_TAX_OPT) = '1' then " /* +" where (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
...@@ -1751,7 +1755,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -1751,7 +1755,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code" //+" where c.cust_code = i.cust_code"
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and i.inv_type=sot.ORDER_TYPE" +" and i.inv_type=sot.ORDER_TYPE"
+" and st_c.state_code = c.STATE_CODE " +" and st_c.state_code = c.STATE_CODE "
...@@ -2074,7 +2080,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -2074,7 +2080,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+ "where c.cust_code = i.cust_code" //+ "where c.cust_code = i.cust_code"
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" AND i.desp_id= d.desp_id " +" AND i.desp_id= d.desp_id "
//+" AND st_c.state_code = d.STATE_CODE__DLV " //+" AND st_c.state_code = d.STATE_CODE__DLV "
...@@ -2253,7 +2261,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -2253,7 +2261,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code" // +" where c.cust_code = i.cust_code"
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and i.inv_type=sot.ORDER_TYPE " +" and i.inv_type=sot.ORDER_TYPE "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and i.invoice_id not in (select inv.INVOICE_ID from invoice inv,sreturn srt where inv.INVOICE_ID = srt.INVOICE_ID " +" and i.invoice_id not in (select inv.INVOICE_ID from invoice inv,sreturn srt where inv.INVOICE_ID = srt.INVOICE_ID "
...@@ -2421,7 +2431,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -2421,7 +2431,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code" //+" where c.cust_code = i.cust_code"
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and i.inv_type=sot.ORDER_TYPE " +" and i.inv_type=sot.ORDER_TYPE "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and i.invoice_id not in (select inv.INVOICE_ID from invoice inv,sreturn srt where inv.INVOICE_ID = srt.INVOICE_ID " +" and i.invoice_id not in (select inv.INVOICE_ID from invoice inv,sreturn srt where inv.INVOICE_ID = srt.INVOICE_ID "
...@@ -2585,7 +2597,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -2585,7 +2597,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code" //+" where c.cust_code = i.cust_code"
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.state_code " +" and state.state_code = c.state_code "
+" and i.inv_type=sot.ORDER_TYPE " +" and i.inv_type=sot.ORDER_TYPE "
...@@ -2747,7 +2761,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -2747,7 +2761,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code" // +" where c.cust_code = i.cust_code"
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.state_code " +" and state.state_code = c.state_code "
+" and i.inv_type=sot.ORDER_TYPE " +" and i.inv_type=sot.ORDER_TYPE "
...@@ -2911,7 +2927,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -2911,7 +2927,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code " //+" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.state_code " +" and state.state_code = c.state_code "
+" and i.inv_type=sot.ORDER_TYPE " +" and i.inv_type=sot.ORDER_TYPE "
...@@ -3073,7 +3091,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -3073,7 +3091,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+ "where c.cust_code = i.cust_code" //+ "where c.cust_code = i.cust_code"
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and i.inv_type=sot.ORDER_TYPE " +" and i.inv_type=sot.ORDER_TYPE "
+" and st_c.state_code = c.state_code " +" and st_c.state_code = c.state_code "
...@@ -3247,7 +3267,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -3247,7 +3267,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end) "*/ +" i.CUST_CODE__BIL else i.cust_code end) "*/
+" where c.cust_code = i.cust_code" //+" where c.cust_code = i.cust_code"
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" AND i.desp_id= d.desp_id " +" AND i.desp_id= d.desp_id "
+" AND state.state_code = d.STATE_CODE__DLV" +" AND state.state_code = d.STATE_CODE__DLV"
...@@ -3425,7 +3447,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -3425,7 +3447,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end) "*/ +" i.CUST_CODE__BIL else i.cust_code end) "*/
+" where c.cust_code = i.cust_code" //+" where c.cust_code = i.cust_code"
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and st_c.state_code = c.state_code " +" and st_c.state_code = c.state_code "
+" and s.state_code = st_own.state_code " +" and s.state_code = st_own.state_code "
...@@ -3596,7 +3620,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -3596,7 +3620,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code " //+" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" AND i.desp_id= d.desp_id " +" AND i.desp_id= d.desp_id "
+" AND state.state_code = d.STATE_CODE__DLV " +" AND state.state_code = d.STATE_CODE__DLV "
...@@ -3775,7 +3801,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -3775,7 +3801,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code " //+" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and i.inv_type=sot.ORDER_TYPE " +" and i.inv_type=sot.ORDER_TYPE "
+" and state.state_code = c.state_code " +" and state.state_code = c.state_code "
...@@ -4135,7 +4163,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -4135,7 +4163,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code " //+" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.state_code " +" and state.state_code = c.state_code "
+" and s.state_code = c.state_code " +" and s.state_code = c.state_code "
...@@ -4327,7 +4357,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -4327,7 +4357,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code " // +" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.state_code " +" and state.state_code = c.state_code "
+" and s.state_code <> c.state_code " +" and s.state_code <> c.state_code "
...@@ -4532,7 +4564,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -4532,7 +4564,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code " //+" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.state_code " +" and state.state_code = c.state_code "
+" and s.state_code = c.state_code " +" and s.state_code = c.state_code "
...@@ -4758,7 +4792,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -4758,7 +4792,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" i.CUST_CODE__BIL else i.cust_code end)"*/ +" i.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code " //+" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then i.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.state_code " +" and state.state_code = c.state_code "
+" and i.invoice_id = a.invoice_id " +" and i.invoice_id = a.invoice_id "
...@@ -6121,7 +6157,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -6121,7 +6157,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then " +"(case when trim(sot.CUST_TAX_OPT) = '1' then "
+" inv.CUST_CODE__BIL else i.cust_code end)"*/ +" inv.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code " //+" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then inv.CUST_CODE__BIL else i.cust_code end) "
+" AND s.site_code = i.site_code " +" AND s.site_code = i.site_code "
+" AND st_c.state_code = c.state_code " +" AND st_c.state_code = c.state_code "
+" AND inv.invoice_id = i.invoice_id " +" AND inv.invoice_id = i.invoice_id "
...@@ -6282,7 +6320,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -6282,7 +6320,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+" (case when trim(sot.CUST_TAX_OPT) = '1' then " +" (case when trim(sot.CUST_TAX_OPT) = '1' then "
+" inv.CUST_CODE__BIL else i.cust_code end)"*/ +" inv.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code " //+" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then inv.CUST_CODE__BIL else i.cust_code end) "
+" AND s.site_code = i.site_code " +" AND s.site_code = i.site_code "
+" AND st_c.state_code = c.state_code " +" AND st_c.state_code = c.state_code "
+" AND inv.invoice_id = i.invoice_id " +" AND inv.invoice_id = i.invoice_id "
...@@ -6444,7 +6484,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -6444,7 +6484,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then " +"(case when trim(sot.CUST_TAX_OPT) = '1' then "
+" inv.CUST_CODE__BIL else i.cust_code end)"*/ +" inv.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code" //+" where c.cust_code = i.cust_code"
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then inv.CUST_CODE__BIL else i.cust_code end) "
+" AND s.site_code = i.site_code " +" AND s.site_code = i.site_code "
+" and inv.inv_type=sot.ORDER_TYPE " +" and inv.inv_type=sot.ORDER_TYPE "
+" AND st_c.state_code = c.state_code " +" AND st_c.state_code = c.state_code "
...@@ -6594,7 +6636,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -6594,7 +6636,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then " +"(case when trim(sot.CUST_TAX_OPT) = '1' then "
+" inv.CUST_CODE__BIL else i.cust_code end)"*/ +" inv.CUST_CODE__BIL else i.cust_code end)"*/
+ " where c.cust_code = i.cust_code " // + " where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then inv.CUST_CODE__BIL else i.cust_code end) "
+" AND s.site_code = i.site_code " +" AND s.site_code = i.site_code "
+" AND st_c.state_code = c.state_code " +" AND st_c.state_code = c.state_code "
+" AND inv.invoice_id = i.invoice_id " +" AND inv.invoice_id = i.invoice_id "
...@@ -9263,7 +9307,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -9263,7 +9307,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then " +"(case when trim(sot.CUST_TAX_OPT) = '1' then "
+" inv.CUST_CODE__BIL else i.cust_code end)"*/ +" inv.CUST_CODE__BIL else i.cust_code end)"*/
+ " where c.cust_code = i.cust_code " //+ " where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then inv.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.STATE_CODE " +" and state.state_code = c.STATE_CODE "
+" and inv.inv_type=sot.ORDER_TYPE " +" and inv.inv_type=sot.ORDER_TYPE "
...@@ -9510,7 +9556,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -9510,7 +9556,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then " +"(case when trim(sot.CUST_TAX_OPT) = '1' then "
+" inv.CUST_CODE__BIL else i.cust_code end)"*/ +" inv.CUST_CODE__BIL else i.cust_code end)"*/
+ " where c.cust_code = i.cust_code " // + " where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then inv.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.STATE_CODE " +" and state.state_code = c.STATE_CODE "
+" and inv.invoice_id = i.invoice_id " +" and inv.invoice_id = i.invoice_id "
...@@ -9727,7 +9775,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -9727,7 +9775,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then " +"(case when trim(sot.CUST_TAX_OPT) = '1' then "
+" inv.CUST_CODE__BIL else i.cust_code end)"*/ +" inv.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code " //+" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then inv.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and inv.inv_type=sot.ORDER_TYPE " +" and inv.inv_type=sot.ORDER_TYPE "
+" and state.state_code = c.STATE_CODE " +" and state.state_code = c.STATE_CODE "
...@@ -9954,7 +10004,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -9954,7 +10004,9 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
+" c.CUST_CODE__BIL else c.cust_code end) = " +" c.CUST_CODE__BIL else c.cust_code end) = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then " +"(case when trim(sot.CUST_TAX_OPT) = '1' then "
+" inv.CUST_CODE__BIL else i.cust_code end)"*/ +" inv.CUST_CODE__BIL else i.cust_code end)"*/
+" where c.cust_code = i.cust_code " //+" where c.cust_code = i.cust_code "
+" where c.cust_code = "
+"(case when trim(sot.CUST_TAX_OPT) = '1' then inv.CUST_CODE__BIL else i.cust_code end) "
+" and s.site_code = i.site_code " +" and s.site_code = i.site_code "
+" and state.state_code = c.STATE_CODE " +" and state.state_code = c.STATE_CODE "
+" and inv.inv_type=sot.ORDER_TYPE " +" and inv.inv_type=sot.ORDER_TYPE "
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