Commit ce35245c authored by kshinde's avatar kshinde

added trunc to conf date in sql.

changed eff to error code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@44572 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 84ed2de2
......@@ -92,7 +92,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
}
if(toDT==null || toDT.trim().length()==0)
{
errCode="VPEDATE1";
errCode="VMEFFUPTO";
errString = itmDBAccessEJB.getErrorString("",errCode,"","",con);
return errString;
......@@ -150,7 +150,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
+ "c.supp_code = i.supp_code and s.site_code = i.site_code and i.site_code=? and i.gp_no is null and state.state_code = c.STATE_CODE and "
+ "(c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null )"
+ " and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'VOUCH' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0 "
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and i.conf_date between ? and ? ";
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and trunc(i.conf_date) between ? and ? ";
pstmt=con.prepareStatement(sql);
//pstmt.setString(1,"voucher");
pstmt.setString(1,siteCode);
......@@ -219,7 +219,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
+ " c.supp_code = i.sundry_code and i.sundry_type = 'S' and s.site_code = i.site_code and i.site_code=? and i.gp_no is null and state.state_code = c.STATE_CODE and"
+ " (c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null)"
+ " and (select count(1) from taxtran ti,tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'M-VOUC' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0"
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and i.conf_date between ? and ? ";
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and trunc(i.conf_date) between ? and ? ";
pstmt=con.prepareStatement(sql1);
//pstmt.setString(1,"voucher");
pstmt.setString(1,siteCode);
......@@ -293,7 +293,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
+ "c.supp_code = i.supp_code and s.site_code = i.site_code and i.site_code=? and drcr_flag='D' and i.gp_no is null and state.state_code = c.STATE_CODE and "
+ "(c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null )"
+ " and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'DRNPAY' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0 "
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and i.conf_date between ? and ? ";
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and trunc(i.conf_date) between ? and ? ";
pstmt=con.prepareStatement(sql);
//pstmt.setString(1,"voucher");
......@@ -369,7 +369,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
+ "c.supp_code = i.supp_code and s.site_code = i.site_code and i.site_code=? and drcr_flag='C' and i.gp_no is null and state.state_code = c.STATE_CODE and "
+ "(c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null )"
+ " and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'CRNPAY' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0 "
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and i.conf_date between ? and ? ";
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and trunc(i.conf_date) between ? and ? ";
pstmt=con.prepareStatement(sql);
//pstmt.setString(1,"voucher");
......
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