Commit 66c53173 authored by kdabholkar's avatar kdabholkar

set value of UNIT where ever its NULL in GSTR2

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@185078 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 117adcf0
...@@ -14435,7 +14435,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -14435,7 +14435,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -14589,7 +14589,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -14589,7 +14589,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -14745,7 +14745,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -14745,7 +14745,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -14901,7 +14901,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -14901,7 +14901,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -15055,7 +15055,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -15055,7 +15055,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -15210,7 +15210,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -15210,7 +15210,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -15367,7 +15367,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -15367,7 +15367,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -15524,7 +15524,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc ...@@ -15524,7 +15524,7 @@ public class GstDataPrc extends ProcessEJB implements GstDataPrcLocal,GstDataPrc
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -21775,7 +21775,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -21775,7 +21775,7 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -21940,7 +21940,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -21940,7 +21940,7 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -22111,7 +22111,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -22111,7 +22111,7 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -22282,7 +22282,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -22282,7 +22282,7 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -22447,7 +22447,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -22447,7 +22447,7 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -22610,7 +22610,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -22610,7 +22610,7 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -29533,7 +29533,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -29533,7 +29533,7 @@ dtlSql = " select '' as TRAN_ID, "
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -29687,7 +29687,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -29687,7 +29687,7 @@ dtlSql = " select '' as TRAN_ID, "
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -29843,7 +29843,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -29843,7 +29843,7 @@ dtlSql = " select '' as TRAN_ID, "
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -29999,7 +29999,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -29999,7 +29999,7 @@ dtlSql = " select '' as TRAN_ID, "
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -30159,7 +30159,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -30159,7 +30159,7 @@ dtlSql = " select '' as TRAN_ID, "
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -30314,7 +30314,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -30314,7 +30314,7 @@ dtlSql = " select '' as TRAN_ID, "
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -30471,7 +30471,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -30471,7 +30471,7 @@ dtlSql = " select '' as TRAN_ID, "
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -30628,7 +30628,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -30628,7 +30628,7 @@ dtlSql = " select '' as TRAN_ID, "
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR, " +" ' ' as GS_DESCR, "
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" (it.quantity) as QUANTITY, " +" (it.quantity) as QUANTITY, "
+" 'OE' as SUPPLY_TYPE," ; +" 'OE' as SUPPLY_TYPE," ;
...@@ -35218,7 +35218,8 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -35218,7 +35218,8 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," //+" ' ' as UNIT,"
+"(select case when udf_str2 is null then descr else udf_str2 end as Unit from uom where unit=it.unit) as UNIT, "
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -35257,8 +35258,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -35257,8 +35258,9 @@ dtlSql = " select '' as TRAN_ID, "
dtlSql = dtlSql +"fn_get_gst_rate('P-ADV',i.tran_id, it.line_no) as gst_rate "; dtlSql = dtlSql +"fn_get_gst_rate('P-ADV',i.tran_id, it.line_no) as gst_rate ";
} }
dtlSql = dtlSql dtlSql = dtlSql
+"from porcp i,porcpdet it " +"from porcp i,porcpdet it,item "
+" where i.tran_id = it.tran_id " +" where i.tran_id = it.tran_id "
+" and item.item_code = it.item_code "
+"and (select count(1) from taxtran ti, tax tx where tx.tax_code = ti.tax_code " +"and (select count(1) from taxtran ti, tax tx where tx.tax_code = ti.tax_code "
+"and ti.tran_code = 'P-ADV' " +"and ti.tran_code = 'P-ADV' "
+"and ti.tran_id = i.tran_id " +"and ti.tran_id = i.tran_id "
...@@ -35379,7 +35381,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -35379,7 +35381,7 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," +"(select case when udf_str2 is null then descr else udf_str2 end as Unit from uom where unit=it.unit) as UNIT, "
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -35416,8 +35418,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -35416,8 +35418,9 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
//+"from voucher i,vouchdet it" //+"from voucher i,vouchdet it"
+" from porcp i,porcpdet it " +"from porcp i,porcpdet it,item "
+" where i.tran_id = it.tran_id " +" where i.tran_id = it.tran_id "
+" and item.item_code = it.item_code "
+"and (select count(1) from taxtran ti, tax tx where tx.tax_code = ti.tax_code " +"and (select count(1) from taxtran ti, tax tx where tx.tax_code = ti.tax_code "
+"and ti.tran_code = 'P-ADV' " +"and ti.tran_code = 'P-ADV' "
+"and ti.tran_id = i.tran_id " +"and ti.tran_id = i.tran_id "
...@@ -35546,7 +35549,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -35546,7 +35549,7 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -35710,7 +35713,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -35710,7 +35713,7 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," +" 'OTH' as UNIT,"
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -35879,7 +35882,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -35879,7 +35882,7 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," +"(select case when udf_str2 is null then descr else udf_str2 end as Unit from uom where unit=it.unit) as UNIT, "
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -35916,9 +35919,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -35916,9 +35919,9 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
//+"from voucher i,vouchadv it " //+"from voucher i,vouchadv it "
+" from porcp i,porcpdet it " +"from porcp i,porcpdet it,item "
+" where i.tran_id = it.tran_id " +" where i.tran_id = it.tran_id "
+" and item.item_code = it.item_code "
+"and (select count(1) from taxtran ti, tax tx where tx.tax_code = ti.tax_code " +"and (select count(1) from taxtran ti, tax tx where tx.tax_code = ti.tax_code "
+"and ti.tran_code = 'P-RCP' " +"and ti.tran_code = 'P-RCP' "
+"and ti.tran_id = i.tran_id " +"and ti.tran_id = i.tran_id "
...@@ -36049,7 +36052,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -36049,7 +36052,7 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
+" ' ' as GS_DESCR," +" ' ' as GS_DESCR,"
+" ' ' as UNIT," +"(select case when udf_str2 is null then descr else udf_str2 end as Unit from uom where unit=it.unit) as UNIT, "
+" 0 as QUANTITY," +" 0 as QUANTITY,"
+" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom) +" 'OE' as SUPPLY_TYPE," ;// -- E/OE (Ecom/Other than Ecom)
...@@ -36086,8 +36089,9 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -36086,8 +36089,9 @@ dtlSql = " select '' as TRAN_ID, "
} }
dtlSql = dtlSql dtlSql = dtlSql
// +"from voucher i,vouchadv it " // +"from voucher i,vouchadv it "
+" from porcp i,porcpdet it " +"from porcp i,porcpdet it,item "
+" where i.tran_id = it.tran_id " +" where i.tran_id = it.tran_id "
+" and item.item_code = it.item_code "
+" and i.tran_id = ? "; +" and i.tran_id = ? ";
// retString = executeSqlAndPopulateData(hdrSql,dtlSql,"10B(2)"); // retString = executeSqlAndPopulateData(hdrSql,dtlSql,"10B(2)");
...@@ -36287,7 +36291,7 @@ dtlSql = " select '' as TRAN_ID, " ...@@ -36287,7 +36291,7 @@ dtlSql = " select '' as TRAN_ID, "
currDate = Timestamp.valueOf(genericUtility.getValidDateString(currDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); currDate = Timestamp.valueOf(genericUtility.getValidDateString(currDateStr, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("cuuent Date"+currDate); System.out.println("cuuent1234 Date"+currDate);
int updCnt = 0; int updCnt = 0;
int detCnts = 0,hdrCnts = 0,lineNo = 0; int detCnts = 0,hdrCnts = 0,lineNo = 0;
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