Commit 09d39441 authored by ssalve's avatar ssalve

itemchange for taxable_amt and default value 0.0 for igst,cgst and sgst amount on 26JUL2017


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@106384 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8c27fc58
...@@ -163,14 +163,14 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -163,14 +163,14 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
{ {
doc_type = checkNull(genericUtility.getColumnValue("doc_type", dom)).trim(); doc_type = checkNull(genericUtility.getColumnValue("doc_type", dom)).trim();
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
//System.out.println("Document Type is ["+doc_type+"]"+"gst_type["+gst_type+"]"); //System.out.println("INPUT VALUE"+"Document Type is ["+doc_type+"]"+"gst_type["+gst_type+"]");
}//end of if block for doc_type }//end of if block for doc_type
else if("tax_reg_no".equalsIgnoreCase(childNodeName)) else if("tax_reg_no".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim(); tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim();
//System.out.println("tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"); //System.out.println("INPUT VALUE"+"tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]");
}//end of if block for tax_reg_no }//end of if block for tax_reg_no
else if("name".equalsIgnoreCase(childNodeName)) else if("name".equalsIgnoreCase(childNodeName))
...@@ -178,7 +178,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -178,7 +178,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim(); tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim();
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
name = checkNull(genericUtility.getColumnValue("name", dom)).trim(); name = checkNull(genericUtility.getColumnValue("name", dom)).trim();
//System.out.println("tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"name["+name+"]"); //System.out.println("INPUT VALUE"+"tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"name["+name+"]");
}//end of if block for name }//end of if block for name
else if("addr1".equalsIgnoreCase(childNodeName)) else if("addr1".equalsIgnoreCase(childNodeName))
...@@ -186,7 +186,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -186,7 +186,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim(); tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim();
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
addr1 = checkNull(genericUtility.getColumnValue("addr1", dom)).trim(); addr1 = checkNull(genericUtility.getColumnValue("addr1", dom)).trim();
//System.out.println("tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"addr1["+addr1+"]"); //System.out.println("INPUT VALUE"+"tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"addr1["+addr1+"]");
}//end of if block for addr1 }//end of if block for addr1
else if("addr2".equalsIgnoreCase(childNodeName)) else if("addr2".equalsIgnoreCase(childNodeName))
...@@ -194,7 +194,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -194,7 +194,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim(); tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim();
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
addr2 = checkNull(genericUtility.getColumnValue("addr2", dom)).trim(); addr2 = checkNull(genericUtility.getColumnValue("addr2", dom)).trim();
//System.out.println("tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"addr2["+addr2+"]"); //System.out.println("INPUT VALUE"+"tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"addr2["+addr2+"]");
}//end of if block for addr2 }//end of if block for addr2
else if("addr3".equalsIgnoreCase(childNodeName)) else if("addr3".equalsIgnoreCase(childNodeName))
...@@ -202,7 +202,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -202,7 +202,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim(); tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim();
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
addr3 = checkNull(genericUtility.getColumnValue("addr3", dom)).trim(); addr3 = checkNull(genericUtility.getColumnValue("addr3", dom)).trim();
//System.out.println("tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"addr3["+addr3+"]"); //System.out.println("INPUT VALUE"+"tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"addr3["+addr3+"]");
}//end of if block for addr3 }//end of if block for addr3
else if("city".equalsIgnoreCase(childNodeName)) else if("city".equalsIgnoreCase(childNodeName))
...@@ -210,7 +210,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -210,7 +210,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim(); tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim();
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
city = checkNull(genericUtility.getColumnValue("city", dom)).trim(); city = checkNull(genericUtility.getColumnValue("city", dom)).trim();
//System.out.println("tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"city["+city+"]"); //System.out.println("INPUT VALUE"+"tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"city["+city+"]");
}//end of if block for city }//end of if block for city
else if("gst_state_code".equalsIgnoreCase(childNodeName)) else if("gst_state_code".equalsIgnoreCase(childNodeName))
...@@ -218,7 +218,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -218,7 +218,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim(); tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim();
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
state = checkNull(genericUtility.getColumnValue("gst_state_code", dom)).trim(); state = checkNull(genericUtility.getColumnValue("gst_state_code", dom)).trim();
//System.out.println("tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"state["+state+"]"); //System.out.println("INPUT VALUE"+"tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"state["+state+"]");
}//end of if block for state }//end of if block for state
else if("pin".equalsIgnoreCase(childNodeName)) else if("pin".equalsIgnoreCase(childNodeName))
...@@ -226,48 +226,48 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -226,48 +226,48 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim(); tax_reg_no = checkNull(genericUtility.getColumnValue("tax_reg_no", dom)).trim();
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
pin = checkNull(genericUtility.getColumnValue("pin", dom)).trim(); pin = checkNull(genericUtility.getColumnValue("pin", dom)).trim();
//System.out.println("tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"pin["+pin+"]"); //System.out.println("INPUT VALUE"+"tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"pin["+pin+"]");
}//end of if block for pin }//end of if block for pin
//added by sarita on 21JUL2017 //added by sarita on 21JUL2017
else if("cust_name".equalsIgnoreCase(childNodeName)) else if("cust_name".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
cust_name = checkNull(genericUtility.getColumnValue("cust_name", dom)).trim(); cust_name = checkNull(genericUtility.getColumnValue("cust_name", dom)).trim();
//System.out.println("tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"name["+name+"]"); //System.out.println("INPUT VALUE"+"tax_reg_no["+tax_reg_no+"]"+"gst_type["+gst_type+"]"+"name["+name+"]");
}//end of if block for name }//end of if block for name
else if("gst_code_state".equalsIgnoreCase(childNodeName)) else if("gst_code_state".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
state_code = checkNull(genericUtility.getColumnValue("gst_code_state", dom)).trim(); state_code = checkNull(genericUtility.getColumnValue("gst_code_state", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"gst_code_state["+state_code+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"gst_code_state["+state_code+"]");
}//end of if block for gst_code_state }//end of if block for gst_code_state
else if("doc_no".equalsIgnoreCase(childNodeName)) else if("doc_no".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
doc_no = checkNull(genericUtility.getColumnValue("doc_no", dom)).trim(); doc_no = checkNull(genericUtility.getColumnValue("doc_no", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"doc_no["+doc_no+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"doc_no["+doc_no+"]");
}//end of if block for doc_no }//end of if block for doc_no
else if("doc_date".equalsIgnoreCase(childNodeName)) else if("doc_date".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
doc_date = checkNull(genericUtility.getColumnValue("doc_date", dom)).trim(); doc_date = checkNull(genericUtility.getColumnValue("doc_date", dom)).trim();
System.out.println("gst_type["+gst_type+"]"+"doc_date["+doc_date+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"doc_date["+doc_date+"]");
}//end of if block for doc_date }//end of if block for doc_date
else if("amount".equalsIgnoreCase(childNodeName)) else if("amount".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
amount = checkNull(genericUtility.getColumnValue("amount", dom)).trim(); amount = checkNull(genericUtility.getColumnValue("amount", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"amount["+amount+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"amount["+amount+"]");
}//end of if block for amount }//end of if block for amount
else if("reverse_chrg".equalsIgnoreCase(childNodeName)) else if("reverse_chrg".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
reverse_chrg = checkNull(genericUtility.getColumnValue("reverse_chrg", dom)).trim(); reverse_chrg = checkNull(genericUtility.getColumnValue("reverse_chrg", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"reverse_chrg["+reverse_chrg+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"reverse_chrg["+reverse_chrg+"]");
}//end of if block for reverse_chrg }//end of if block for reverse_chrg
else if("ecom_reg_no".equalsIgnoreCase(childNodeName)) else if("ecom_reg_no".equalsIgnoreCase(childNodeName))
...@@ -275,42 +275,42 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -275,42 +275,42 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
doc_type = checkNull(genericUtility.getColumnValue("doc_type", dom)).trim(); doc_type = checkNull(genericUtility.getColumnValue("doc_type", dom)).trim();
ecomRegNo = checkNull(genericUtility.getColumnValue("ecom_reg_no", dom)).trim(); ecomRegNo = checkNull(genericUtility.getColumnValue("ecom_reg_no", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"doc_type["+doc_type+"]"+"ecomRegNo["+ecomRegNo+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"doc_type["+doc_type+"]"+"ecomRegNo["+ecomRegNo+"]");
}//end of if block for ecom_reg_no }//end of if block for ecom_reg_no
else if("ref_id__inv".equalsIgnoreCase(childNodeName)) else if("ref_id__inv".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
ref_id__inv = checkNull(genericUtility.getColumnValue("ref_id__inv", dom)).trim(); ref_id__inv = checkNull(genericUtility.getColumnValue("ref_id__inv", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"ref_id__inv["+ref_id__inv+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"ref_id__inv["+ref_id__inv+"]");
}//end of if block for ref_id__inv }//end of if block for ref_id__inv
else if("ref_date__inv".equalsIgnoreCase(childNodeName)) else if("ref_date__inv".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
ref_date__inv = checkNull(genericUtility.getColumnValue("ref_date__inv", dom)).trim(); ref_date__inv = checkNull(genericUtility.getColumnValue("ref_date__inv", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"ref_date__inv["+ref_date__inv+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"ref_date__inv["+ref_date__inv+"]");
}//end of if block for ref_date__inv }//end of if block for ref_date__inv
else if("order_no".equalsIgnoreCase(childNodeName)) else if("order_no".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
orderNo = checkNull(genericUtility.getColumnValue("order_no", dom)).trim(); orderNo = checkNull(genericUtility.getColumnValue("order_no", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"orderNo["+orderNo+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"orderNo["+orderNo+"]");
}//end of if block for order_no }//end of if block for order_no
else if("lr_no".equalsIgnoreCase(childNodeName)) else if("lr_no".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
lr_no = checkNull(genericUtility.getColumnValue("lr_no", dom)).trim(); lr_no = checkNull(genericUtility.getColumnValue("lr_no", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"lr_no["+lr_no+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"lr_no["+lr_no+"]");
}//end of if block for lr_no }//end of if block for lr_no
else if("lr_date".equalsIgnoreCase(childNodeName)) else if("lr_date".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)).trim();
lr_date = checkNull(genericUtility.getColumnValue("lr_date", dom)).trim(); lr_date = checkNull(genericUtility.getColumnValue("lr_date", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"lr_date["+lr_date+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"lr_date["+lr_date+"]");
}//end of if block for lr_date }//end of if block for lr_date
}//end of for loop }//end of for loop
...@@ -571,28 +571,28 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -571,28 +571,28 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1)).trim();
gs_code = checkNull(genericUtility.getColumnValue("gs_code", dom)).trim(); gs_code = checkNull(genericUtility.getColumnValue("gs_code", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"gs_code["+gs_code+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"gs_code["+gs_code+"]");
}//end of if block for GS Code }//end of if block for GS Code
else if("quantity".equalsIgnoreCase(childNodeName)) else if("quantity".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1)).trim();
quantity = checkNull(genericUtility.getColumnValue("quantity", dom)).trim(); quantity = checkNull(genericUtility.getColumnValue("quantity", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"quantity["+quantity+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"quantity["+quantity+"]");
}//end of if block for quantity }//end of if block for quantity
else if("unit".equalsIgnoreCase(childNodeName)) else if("unit".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1)).trim();
unit = checkNull(genericUtility.getColumnValue("unit", dom)).trim(); unit = checkNull(genericUtility.getColumnValue("unit", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"unit["+unit+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"unit["+unit+"]");
}//end of if block for unit }//end of if block for unit
else if("taxable_amt".equalsIgnoreCase(childNodeName)) else if("taxable_amt".equalsIgnoreCase(childNodeName))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1)).trim(); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1)).trim();
taxable_amt = checkNull(genericUtility.getColumnValue("taxable_amt", dom)).trim(); taxable_amt = checkNull(genericUtility.getColumnValue("taxable_amt", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"taxable_amt["+taxable_amt+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"taxable_amt["+taxable_amt+"]");
}//end of if block for taxable_amt }//end of if block for taxable_amt
else if("gst_rate".equalsIgnoreCase(childNodeName)) else if("gst_rate".equalsIgnoreCase(childNodeName))
...@@ -603,7 +603,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -603,7 +603,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
// Added by sarita on 14/07/2017 // Added by sarita on 14/07/2017
gstRate = converStringToDouble(checkNull(genericUtility.getColumnValue("gst_rate", dom)).trim()); gstRate = converStringToDouble(checkNull(genericUtility.getColumnValue("gst_rate", dom)).trim());
taxable_amt = checkNull(genericUtility.getColumnValue("taxable_amt", dom)).trim(); taxable_amt = checkNull(genericUtility.getColumnValue("taxable_amt", dom)).trim();
//System.out.println("gst_type["+gst_type+"]"+"doc_type["+doc_type+"]"+"gst_rate["+gst_rate+"]"+"gstRate["+gstRate+"]"+"taxable_amt["+taxable_amt+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"doc_type["+doc_type+"]"+"gst_rate["+gst_rate+"]"+"gstRate["+gstRate+"]"+"taxable_amt["+taxable_amt+"]");
}//end of if block for gst_rate }//end of if block for gst_rate
else if("igst_perc".equalsIgnoreCase(childNodeName)) else if("igst_perc".equalsIgnoreCase(childNodeName))
...@@ -614,7 +614,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -614,7 +614,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
igst_perc = checkNull(genericUtility.getColumnValue("igst_perc", dom)).trim(); igst_perc = checkNull(genericUtility.getColumnValue("igst_perc", dom)).trim();
igst_percVal = converStringToDouble(checkNull(genericUtility.getColumnValue("igst_perc", dom)).trim()); igst_percVal = converStringToDouble(checkNull(genericUtility.getColumnValue("igst_perc", dom)).trim());
state_code_cdn = getGstCodeForCDNR(dom,conn); state_code_cdn = getGstCodeForCDNR(dom,conn);
//System.out.println("gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"loginSiteCode["+loginSiteCode+"]"+"igst_perc["+igst_perc+"]"+"igst_percVal["+igst_percVal+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"loginSiteCode["+loginSiteCode+"]"+"igst_perc["+igst_perc+"]"+"igst_percVal["+igst_percVal+"]");
}//end of if block for igst_perc }//end of if block for igst_perc
else if("igst_amt".equalsIgnoreCase(childNodeName)) else if("igst_amt".equalsIgnoreCase(childNodeName))
...@@ -625,7 +625,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -625,7 +625,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
igst_amt = checkNull(genericUtility.getColumnValue("igst_amt", dom)).trim(); igst_amt = checkNull(genericUtility.getColumnValue("igst_amt", dom)).trim();
igst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("igst_amt", dom)).trim()); igst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("igst_amt", dom)).trim());
state_code_cdn = getGstCodeForCDNR(dom,conn); state_code_cdn = getGstCodeForCDNR(dom,conn);
//System.out.println("gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"loginSiteCode["+loginSiteCode+"]"+"igst_amt["+igst_amt+"]"+"igst_amtVal["+igst_amtVal+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"loginSiteCode["+loginSiteCode+"]"+"igst_amt["+igst_amt+"]"+"igst_amtVal["+igst_amtVal+"]");
}//end of if block for igst_amt }//end of if block for igst_amt
else if("cgst_perc".equalsIgnoreCase(childNodeName)) else if("cgst_perc".equalsIgnoreCase(childNodeName))
...@@ -636,7 +636,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -636,7 +636,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
loginSiteCode = checkNull(getStateFromLoginSite(loginSite,conn)); loginSiteCode = checkNull(getStateFromLoginSite(loginSite,conn));
cgst_percVal = converStringToDouble(checkNull(genericUtility.getColumnValue("cgst_perc", dom)).trim()); cgst_percVal = converStringToDouble(checkNull(genericUtility.getColumnValue("cgst_perc", dom)).trim());
state_code_cdn = getGstCodeForCDNR(dom,conn); state_code_cdn = getGstCodeForCDNR(dom,conn);
//System.out.println("gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"cgst_perc["+cgst_perc+"]"+"loginSiteCode["+loginSiteCode+"]"+"cgst_percVal["+cgst_percVal+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"cgst_perc["+cgst_perc+"]"+"loginSiteCode["+loginSiteCode+"]"+"cgst_percVal["+cgst_percVal+"]");
}//end of if block for cgst_perc }//end of if block for cgst_perc
else if("cgst_amt".equalsIgnoreCase(childNodeName)) else if("cgst_amt".equalsIgnoreCase(childNodeName))
...@@ -647,7 +647,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -647,7 +647,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
loginSiteCode = checkNull(getStateFromLoginSite(loginSite,conn)); loginSiteCode = checkNull(getStateFromLoginSite(loginSite,conn));
cgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("cgst_amt", dom)).trim()); cgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("cgst_amt", dom)).trim());
state_code_cdn = getGstCodeForCDNR(dom,conn); state_code_cdn = getGstCodeForCDNR(dom,conn);
//System.out.println("gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"cgst_amt["+cgst_amt+"]"+"loginSiteCode["+loginSiteCode+"]"+"cgst_amtVal["+cgst_amtVal+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"cgst_amt["+cgst_amt+"]"+"loginSiteCode["+loginSiteCode+"]"+"cgst_amtVal["+cgst_amtVal+"]");
}//end of if block for cgst_amt }//end of if block for cgst_amt
else if("sgst_perc".equalsIgnoreCase(childNodeName)) else if("sgst_perc".equalsIgnoreCase(childNodeName))
...@@ -658,7 +658,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -658,7 +658,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
loginSiteCode = checkNull(getStateFromLoginSite(loginSite,conn)); loginSiteCode = checkNull(getStateFromLoginSite(loginSite,conn));
sgst_percVal = converStringToDouble(checkNull(genericUtility.getColumnValue("sgst_perc", dom)).trim()); sgst_percVal = converStringToDouble(checkNull(genericUtility.getColumnValue("sgst_perc", dom)).trim());
state_code_cdn = getGstCodeForCDNR(dom,conn); state_code_cdn = getGstCodeForCDNR(dom,conn);
//System.out.println("gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"sgst_perc["+sgst_perc+"]"+"loginSiteCode["+loginSiteCode+"]"+"sgst_percVal["+sgst_percVal+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"sgst_perc["+sgst_perc+"]"+"loginSiteCode["+loginSiteCode+"]"+"sgst_percVal["+sgst_percVal+"]");
}//end of if block for sgst_perc }//end of if block for sgst_perc
else if("sgst_amt".equalsIgnoreCase(childNodeName)) else if("sgst_amt".equalsIgnoreCase(childNodeName))
...@@ -669,7 +669,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -669,7 +669,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
loginSiteCode = checkNull(getStateFromLoginSite(loginSite,conn)); loginSiteCode = checkNull(getStateFromLoginSite(loginSite,conn));
sgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("sgst_amt", dom)).trim()); sgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("sgst_amt", dom)).trim());
state_code_cdn = getGstCodeForCDNR(dom,conn); state_code_cdn = getGstCodeForCDNR(dom,conn);
//System.out.println("gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"sgst_amt["+sgst_amt+"]"+"loginSiteCode["+loginSiteCode+"]"+"sgst_amtVal["+sgst_amtVal+"]"); //System.out.println("INPUT VALUE"+"gst_type["+gst_type+"]"+"state_code["+state_code+"]"+"sgst_amt["+sgst_amt+"]"+"loginSiteCode["+loginSiteCode+"]"+"sgst_amtVal["+sgst_amtVal+"]");
}//end of if block for sgst_amt }//end of if block for sgst_amt
else if("itc_type".equalsIgnoreCase(childNodeName)) else if("itc_type".equalsIgnoreCase(childNodeName))
...@@ -761,7 +761,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -761,7 +761,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
refInvDateDate = Timestamp.valueOf(genericUtility.getValidDateString(ref_date__inv, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); refInvDateDate = Timestamp.valueOf(genericUtility.getValidDateString(ref_date__inv, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
String dt = "01/07/2017"; String dt = "01/07/2017";
invDate = Timestamp.valueOf(genericUtility.getValidDateString(dt, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); invDate = Timestamp.valueOf(genericUtility.getValidDateString(dt, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("ref_id__inv is ["+refIdInv+"]"+"ref_date__inv["+ref_date__inv+"]"+"refInvDateDate["+refInvDateDate+"]"+"Date1/7/17["+dt+"]"+"invDate["+invDate+"]"); //System.out.println("Return Value"+"ref_id__inv is ["+refIdInv+"]"+"ref_date__inv["+ref_date__inv+"]"+"refInvDateDate["+refInvDateDate+"]"+"Date1/7/17["+dt+"]"+"invDate["+invDate+"]");
if(refInvDateDate.after(invDate)) if(refInvDateDate.after(invDate))
{ {
if(gst_rate == null || gst_rate.trim().length() == 0) if(gst_rate == null || gst_rate.trim().length() == 0)
...@@ -808,7 +808,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -808,7 +808,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
cgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("cgst_amt", dom)).trim()); cgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("cgst_amt", dom)).trim());
sgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("sgst_amt", dom)).trim()); sgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("sgst_amt", dom)).trim());
//changed by sarita on 25JUL2017 //changed by sarita on 25JUL2017
System.out.println("cgst_amtVal["+cgst_amtVal+"]"+"sgst_amtVal["+sgst_amtVal+"]"+"cgst_percVal["+cgst_percVal+"]"+"sgst_percVal["+sgst_percVal+"]"); //System.out.println("Return Value"+"cgst_amtVal["+cgst_amtVal+"]"+"sgst_amtVal["+sgst_amtVal+"]"+"cgst_percVal["+cgst_percVal+"]"+"sgst_percVal["+sgst_percVal+"]");
if((cgst_amtVal > 0) || (sgst_amtVal > 0)) if((cgst_amtVal > 0) || (sgst_amtVal > 0))
{ {
errCode = "INVINTRAST"; errCode = "INVINTRAST";
...@@ -824,7 +824,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -824,7 +824,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
refInvDateDate = Timestamp.valueOf(genericUtility.getValidDateString(ref_date__inv, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); refInvDateDate = Timestamp.valueOf(genericUtility.getValidDateString(ref_date__inv, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
String dt = "01/07/2017"; String dt = "01/07/2017";
invDate = Timestamp.valueOf(genericUtility.getValidDateString(dt, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); invDate = Timestamp.valueOf(genericUtility.getValidDateString(dt, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
//System.out.println("ref_id__inv is ["+refIdInv+"]"+"ref_date__inv["+ref_date__inv+"]"+"refInvDateDate["+refInvDateDate+"]"+"Date1/7/17["+dt+"]"+"invDate["+invDate+"]"); //System.out.println("Return Value"+"ref_id__inv is ["+refIdInv+"]"+"ref_date__inv["+ref_date__inv+"]"+"refInvDateDate["+refInvDateDate+"]"+"Date1/7/17["+dt+"]"+"invDate["+invDate+"]");
if(refInvDateDate.after(invDate)) if(refInvDateDate.after(invDate))
{ {
sql = "select gst_code from gst_data_hdr where doc_no=?"; sql = "select gst_code from gst_data_hdr where doc_no=?";
...@@ -863,7 +863,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -863,7 +863,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
//added by sarita on 25JUL2017 //added by sarita on 25JUL2017
cgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("cgst_amt", dom)).trim()); cgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("cgst_amt", dom)).trim());
sgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("sgst_amt", dom)).trim()); sgst_amtVal = converStringToDouble(checkNull(genericUtility.getColumnValue("sgst_amt", dom)).trim());
System.out.println("cgst_amtVal["+cgst_amtVal+"]"+"sgst_amtVal["+sgst_amtVal+"]"+"cgst_percVal["+cgst_percVal+"]"+"sgst_percVal["+sgst_percVal+"]"); System.out.println("Return Value"+"cgst_amtVal["+cgst_amtVal+"]"+"sgst_amtVal["+sgst_amtVal+"]"+"cgst_percVal["+cgst_percVal+"]"+"sgst_percVal["+sgst_percVal+"]");
if((cgst_amtVal > 0) || (sgst_amtVal > 0)) if((cgst_amtVal > 0) || (sgst_amtVal > 0))
{ {
errCode = "INVINTRAST"; errCode = "INVINTRAST";
...@@ -913,7 +913,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -913,7 +913,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
refInvDateDate = Timestamp.valueOf(genericUtility.getValidDateString(ref_date__inv, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); refInvDateDate = Timestamp.valueOf(genericUtility.getValidDateString(ref_date__inv, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
String dt = "01/07/2017"; String dt = "01/07/2017";
invDate = Timestamp.valueOf(genericUtility.getValidDateString(dt, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); invDate = Timestamp.valueOf(genericUtility.getValidDateString(dt, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
//System.out.println("ref_id__inv is ["+refIdInv+"]"+"ref_date__inv["+ref_date__inv+"]"+"refInvDateDate["+refInvDateDate+"]"+"Date1/7/17["+dt+"]"+"invDate["+invDate+"]"); //System.out.println("Return Value"+"ref_id__inv is ["+refIdInv+"]"+"ref_date__inv["+ref_date__inv+"]"+"refInvDateDate["+refInvDateDate+"]"+"Date1/7/17["+dt+"]"+"invDate["+invDate+"]");
if(refInvDateDate.after(invDate)) if(refInvDateDate.after(invDate))
{ {
sql = "select gst_code from gst_data_hdr where doc_no=?"; sql = "select gst_code from gst_data_hdr where doc_no=?";
...@@ -1001,7 +1001,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -1001,7 +1001,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
refInvDateDate = Timestamp.valueOf(genericUtility.getValidDateString(ref_date__inv, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); refInvDateDate = Timestamp.valueOf(genericUtility.getValidDateString(ref_date__inv, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
String dt = "01/07/2017"; String dt = "01/07/2017";
invDate = Timestamp.valueOf(genericUtility.getValidDateString(dt, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); invDate = Timestamp.valueOf(genericUtility.getValidDateString(dt, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
//System.out.println("ref_id__inv is ["+refIdInv+"]"+"ref_date__inv["+ref_date__inv+"]"+"refInvDateDate["+refInvDateDate+"]"+"Date1/7/17["+dt+"]"+"invDate["+invDate+"]"); //System.out.println("Return Value"+"ref_id__inv is ["+refIdInv+"]"+"ref_date__inv["+ref_date__inv+"]"+"refInvDateDate["+refInvDateDate+"]"+"Date1/7/17["+dt+"]"+"invDate["+invDate+"]");
if(refInvDateDate.after(invDate)) if(refInvDateDate.after(invDate))
{ {
sql = "select gst_code from gst_data_hdr where doc_no=?"; sql = "select gst_code from gst_data_hdr where doc_no=?";
...@@ -1182,10 +1182,10 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -1182,10 +1182,10 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
String sql=""; String sql="";
String doc_no=""; String doc_no="";
String docDateStr=""; String docDateStr="";
double amount=0.0,taxable_amt=0.0, amt = 0.0; double amount=0.0,taxable_amt=0.0, amt = 0.0,gst_rate=0.0;
String recDescr ="",tranDescr="",stateDescr="",recoDescr="",siteDescr="",gst_type="",gstDescr=""; String recDescr ="",tranDescr="",stateDescr="",recoDescr="",siteDescr="",gst_type="",gstDescr="";
Timestamp doc_date=null; Timestamp doc_date=null;
String loginSite = "",state1="",stCode="",gst_rate="",refIdInv="",ref_date__inv="",cgst_amt="",sgst_amt="",igst_amt; String loginSite = "",state1="",stCode="",refIdInv="",ref_date__inv="",cgst_amt="",sgst_amt="",igst_amt;
Timestamp refInvDateDate=null,invDate=null; Timestamp refInvDateDate=null,invDate=null;
SimpleDateFormat sdf; SimpleDateFormat sdf;
NodeList parentList = null; NodeList parentList = null;
...@@ -1231,7 +1231,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -1231,7 +1231,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
valueXmlString.append("<tran_date>").append("<![CDATA[" + sdf.format(new Date())+ "]]>").append("</tran_date>"); valueXmlString.append("<tran_date>").append("<![CDATA[" + sdf.format(new Date())+ "]]>").append("</tran_date>");
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom));
System.out.println("loginSite["+loginSite+"]"+"gst_type["+gst_type+"]"); //System.out.println("Return Value"+"loginSite["+loginSite+"]"+"gst_type["+gst_type+"]");
if("gstr".equalsIgnoreCase(objName.trim())) if("gstr".equalsIgnoreCase(objName.trim()))
{ {
sql = "select fld_value,descr from gencodes where fld_name='REC_TYPE' and mod_name='W_GSTR'"; sql = "select fld_value,descr from gencodes where fld_name='REC_TYPE' and mod_name='W_GSTR'";
...@@ -1243,7 +1243,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -1243,7 +1243,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
recDescr = rs.getString("descr"); recDescr = rs.getString("descr");
if(rec_type.equalsIgnoreCase("1") && recDescr.equalsIgnoreCase("GSTR1")) if(rec_type.equalsIgnoreCase("1") && recDescr.equalsIgnoreCase("GSTR1"))
{ {
System.out.println("rec_type::["+rec_type+"]"+"recDescr::["+recDescr+"]"); System.out.println("Return Value"+"rec_type::["+rec_type+"]"+"recDescr::["+recDescr+"]");
valueXmlString.append("<rec_type>").append("<![CDATA["+rec_type+"]]>").append("</rec_type>"); valueXmlString.append("<rec_type>").append("<![CDATA["+rec_type+"]]>").append("</rec_type>");
valueXmlString.append("<rec_type_descr>").append("<![CDATA["+recDescr+"]]>").append("</rec_type_descr>"); valueXmlString.append("<rec_type_descr>").append("<![CDATA["+recDescr+"]]>").append("</rec_type_descr>");
} }
...@@ -1317,7 +1317,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -1317,7 +1317,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
else if("itm_defaultedit".equalsIgnoreCase(currentColumn.trim())) else if("itm_defaultedit".equalsIgnoreCase(currentColumn.trim()))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom));
System.out.println("gst_type ::::::::::"+gst_type); //System.out.println("Return Value"+"gst_type ::::::::::"+gst_type);
sql = "select descr from gencodes where fld_name='GST_TYPE' and fld_value=?"; sql = "select descr from gencodes where fld_name='GST_TYPE' and fld_value=?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,gst_type); pstmt.setString(1,gst_type);
...@@ -1733,7 +1733,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -1733,7 +1733,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
else if("gst_type".equalsIgnoreCase(currentColumn.trim())) else if("gst_type".equalsIgnoreCase(currentColumn.trim()))
{ {
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom)); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom));
System.out.println("gst_type:::["+gst_type+"]"); //System.out.println("Input Value::"+"gst_type:::["+gst_type+"]");
sql = "select descr from gencodes where fld_name='GST_TYPE' and fld_value=?"; sql = "select descr from gencodes where fld_name='GST_TYPE' and fld_value=?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,gst_type); pstmt.setString(1,gst_type);
...@@ -2129,7 +2129,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2129,7 +2129,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
if(tax_reg_no != null && tax_reg_no.trim().length() > 0) if(tax_reg_no != null && tax_reg_no.trim().length() > 0)
{ {
String plcOfSupp = tax_reg_no.substring(0,2); String plcOfSupp = tax_reg_no.substring(0,2);
System.out.println("plcOfSupp::::["+plcOfSupp+"]"); //System.out.println("Return Value::"+"plcOfSupp::::["+plcOfSupp+"]");
valueXmlString.append("<gst_code_state protect = \"0\" visible = \"1\">").append("<![CDATA["+plcOfSupp+"]]>").append("</gst_code_state>"); valueXmlString.append("<gst_code_state protect = \"0\" visible = \"1\">").append("<![CDATA["+plcOfSupp+"]]>").append("</gst_code_state>");
} }
else else
...@@ -2167,7 +2167,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2167,7 +2167,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
year = code.substring(0,4); year = code.substring(0,4);
mnth = code.substring(4,6); mnth = code.substring(4,6);
finalCode = mnth+year; finalCode = mnth+year;
System.out.println("Month["+mnth+"]"+"Year["+year+"]"+"Final Code["+finalCode+"]"); //System.out.println("Return Value::"+"Month["+mnth+"]"+"Year["+year+"]"+"Final Code["+finalCode+"]");
valueXmlString.append("<prd_code>").append("<![CDATA["+finalCode+"]]>").append("</prd_code>"); valueXmlString.append("<prd_code>").append("<![CDATA["+finalCode+"]]>").append("</prd_code>");
}//end of if block for doc_date }//end of if block for doc_date
...@@ -2217,7 +2217,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2217,7 +2217,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
{ {
ecomRegNo = checkNull(genericUtility.getColumnValue("ecom_reg_no", dom1)); ecomRegNo = checkNull(genericUtility.getColumnValue("ecom_reg_no", dom1));
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1)); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1));
System.out.println("ecom_reg_no is ====="+ecomRegNo + "gst_type:::::::"+gst_type); //System.out.println("Return Value"+"ecom_reg_no is ====="+ecomRegNo + "gst_type:::::::"+gst_type);
if(ecomRegNo != null && ecomRegNo.trim().length() > 0 && gst_type.equalsIgnoreCase("I")) if(ecomRegNo != null && ecomRegNo.trim().length() > 0 && gst_type.equalsIgnoreCase("I"))
{ {
...@@ -2238,23 +2238,26 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2238,23 +2238,26 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
// Added by sarita on 25JUN2017[END] // Added by sarita on 25JUN2017[END]
}//end of if block for itm_default }//end of if block for itm_default
if("gst_rate".equalsIgnoreCase(currentColumn.trim())) else if("gst_rate".equalsIgnoreCase(currentColumn.trim()))
{ {
gst_rate = checkNull(genericUtility.getColumnValue("gst_rate", dom)); //changes by sarita on 26JUL2017
gst_rate = getDouble(checkNull(genericUtility.getColumnValue("gst_rate", dom)));
state_code = checkNull(genericUtility.getColumnValue("gst_code_state", dom1)); state_code = checkNull(genericUtility.getColumnValue("gst_code_state", dom1));
loginSiteCode = checkNull(getStateFromLoginSite(loginSite,conn)); loginSiteCode = checkNull(getStateFromLoginSite(loginSite,conn));
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1)); gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1));
//Added by sarita on 25JUN2017[START] //Added by sarita on 25JUN2017[START]
rate = Double.parseDouble(gst_rate); rate = (gst_rate);
igst_amount = getIgst_Amt(rate, dom); igst_amount = getIgst_Amt(rate, dom);
cgst_amount = getCgst_Amt(rate, dom); cgst_amount = getCgst_Amt(rate, dom);
sgst_amount = getSgst_Amt(rate, dom); sgst_amount = getSgst_Amt(rate, dom);
System.out.println("gst_rate["+gst_rate+"]"+"state_code["+state_code+"]"+"loginSiteCode["+loginSiteCode+"]"+"gst_type["+gst_type+"]"); //System.out.println("Input Value::"+"gst_rate["+gst_rate+"]"+"state_code["+state_code+"]"+"loginSiteCode["+loginSiteCode+"]"+"gst_type["+gst_type+"]");
//Added by sarita on 25JUN2017[END] //Added by sarita on 25JUN2017[END]
if("E".equalsIgnoreCase(gst_type)) if("E".equalsIgnoreCase(gst_type))
{ {
valueXmlString.append("<igst_perc>").append("<![CDATA["+gst_rate+"]]>").append("</igst_perc>"); valueXmlString.append("<igst_perc>").append("<![CDATA["+gst_rate+"]]>").append("</igst_perc>");
valueXmlString.append("<igst_amt protect = \"0\">").append("<![CDATA["+igst_amount+"]]>").append("</igst_amt>"); valueXmlString.append("<igst_amt protect = \"0\">").append("<![CDATA["+igst_amount+"]]>").append("</igst_amt>");
valueXmlString.append("<cgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</cgst_amt>");
valueXmlString.append("<sgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</sgst_amt>");
} }
else if("C".equalsIgnoreCase(gst_type) || "D".equalsIgnoreCase(gst_type)) else if("C".equalsIgnoreCase(gst_type) || "D".equalsIgnoreCase(gst_type))
{ {
...@@ -2293,6 +2296,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2293,6 +2296,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
//changes done by sarita on 21JUL2017 //changes done by sarita on 21JUL2017
valueXmlString.append("<cgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</cgst_perc>"); valueXmlString.append("<cgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</cgst_perc>");
valueXmlString.append("<sgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</sgst_perc>"); valueXmlString.append("<sgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</sgst_perc>");
valueXmlString.append("<igst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</igst_amt>");
valueXmlString.append("<cgst_amt protect = \"0\">").append("<![CDATA["+cgst_amount+"]]>").append("</cgst_amt>"); valueXmlString.append("<cgst_amt protect = \"0\">").append("<![CDATA["+cgst_amount+"]]>").append("</cgst_amt>");
valueXmlString.append("<sgst_amt protect = \"0\">").append("<![CDATA["+sgst_amount+"]]>").append("</sgst_amt>"); valueXmlString.append("<sgst_amt protect = \"0\">").append("<![CDATA["+sgst_amount+"]]>").append("</sgst_amt>");
} }
...@@ -2300,6 +2304,8 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2300,6 +2304,8 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
{ {
valueXmlString.append("<igst_perc>").append("<![CDATA["+gst_rate+"]]>").append("</igst_perc>"); valueXmlString.append("<igst_perc>").append("<![CDATA["+gst_rate+"]]>").append("</igst_perc>");
valueXmlString.append("<igst_amt protect = \"0\">").append("<![CDATA["+igst_amount+"]]>").append("</igst_amt>"); valueXmlString.append("<igst_amt protect = \"0\">").append("<![CDATA["+igst_amount+"]]>").append("</igst_amt>");
valueXmlString.append("<cgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</cgst_amt>");
valueXmlString.append("<sgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</sgst_amt>");
} }
} }
} }
...@@ -2312,6 +2318,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2312,6 +2318,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
{ {
valueXmlString.append("<cgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</cgst_perc>"); valueXmlString.append("<cgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</cgst_perc>");
valueXmlString.append("<sgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</sgst_perc>"); valueXmlString.append("<sgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</sgst_perc>");
valueXmlString.append("<igst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</igst_amt>");
valueXmlString.append("<cgst_amt protect = \"0\">").append("<![CDATA["+cgst_amount+"]]>").append("</cgst_amt>"); valueXmlString.append("<cgst_amt protect = \"0\">").append("<![CDATA["+cgst_amount+"]]>").append("</cgst_amt>");
valueXmlString.append("<sgst_amt protect = \"0\">").append("<![CDATA["+sgst_amount+"]]>").append("</sgst_amt>"); valueXmlString.append("<sgst_amt protect = \"0\">").append("<![CDATA["+sgst_amount+"]]>").append("</sgst_amt>");
} }
...@@ -2319,10 +2326,108 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2319,10 +2326,108 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
{ {
valueXmlString.append("<igst_perc>").append("<![CDATA["+gst_rate+"]]>").append("</igst_perc>"); valueXmlString.append("<igst_perc>").append("<![CDATA["+gst_rate+"]]>").append("</igst_perc>");
valueXmlString.append("<igst_amt protect = \"0\">").append("<![CDATA["+igst_amount+"]]>").append("</igst_amt>"); valueXmlString.append("<igst_amt protect = \"0\">").append("<![CDATA["+igst_amount+"]]>").append("</igst_amt>");
valueXmlString.append("<cgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</cgst_amt>");
valueXmlString.append("<sgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</sgst_amt>");
} }
}//end of if block if state_code is not null }//end of if block if state_code is not null
} }
}//end of if block for gst_rate }//end of if block for gst_rate
else if("taxable_amt".equalsIgnoreCase(currentColumn.trim()))
{
String taxableAmt = checkNull(genericUtility.getColumnValue("taxable_amt", dom));
gst_rate = getDouble(checkNull(genericUtility.getColumnValue("gst_rate", dom)));
//System.out.println("INPUT VALUE"+"taxableAmt::["+taxableAmt+"]"+"[AND]"+"gst_rate::["+gst_rate+"]");
if(gst_rate > 0)
{
rate = (gst_rate);
igst_amount = getIgst_Amt(rate, dom);
cgst_amount = getCgst_Amt(rate, dom);
sgst_amount = getSgst_Amt(rate, dom);
state_code = checkNull(genericUtility.getColumnValue("gst_code_state", dom1));
loginSiteCode = checkNull(getStateFromLoginSite(loginSite,conn));
gst_type = checkNull(genericUtility.getColumnValue("gst_type", dom1));
if("E".equalsIgnoreCase(gst_type))
{
valueXmlString.append("<igst_perc>").append("<![CDATA["+gst_rate+"]]>").append("</igst_perc>");
valueXmlString.append("<igst_amt protect = \"0\">").append("<![CDATA["+igst_amount+"]]>").append("</igst_amt>");
valueXmlString.append("<cgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</cgst_amt>");
valueXmlString.append("<sgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</sgst_amt>");
}
else if("C".equalsIgnoreCase(gst_type) || "D".equalsIgnoreCase(gst_type))
{
refIdInv = checkNull(genericUtility.getColumnValue("ref_id__inv", dom1));
ref_date__inv = checkNull(genericUtility.getColumnValue("ref_date__inv", dom1)).trim();
refInvDateDate = Timestamp.valueOf(genericUtility.getValidDateString(ref_date__inv, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
String dt = "01/07/2017";
invDate = Timestamp.valueOf(genericUtility.getValidDateString(dt, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("ref_id__inv is ["+refIdInv+"]"+"ref_date__inv["+ref_date__inv+"]"+"refInvDateDate["+refInvDateDate+"]"+"Date1/7/17["+dt+"]"+"invDate["+invDate+"]");
if(refInvDateDate.after(invDate))
{
sql = "select gst_code from gst_data_hdr where doc_no=?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,refIdInv);
rs = pstmt.executeQuery();
if(rs.next())
{
gstCode = rs.getString("gst_code");
System.out.println("gstCode::::::::::["+gstCode+"]");
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(gstCode != null && gstCode.trim().length() > 0)
{
if(gstCode.equalsIgnoreCase(loginSiteCode))
{
igst_amt = checkNull(genericUtility.getColumnValue("igst_amt", dom));
//changes done by sarita on 21JUL2017
valueXmlString.append("<cgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</cgst_perc>");
valueXmlString.append("<sgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</sgst_perc>");
valueXmlString.append("<igst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</igst_amt>");
valueXmlString.append("<cgst_amt protect = \"0\">").append("<![CDATA["+cgst_amount+"]]>").append("</cgst_amt>");
valueXmlString.append("<sgst_amt protect = \"0\">").append("<![CDATA["+sgst_amount+"]]>").append("</sgst_amt>");
}
else if(!(state_code.equalsIgnoreCase(loginSiteCode)))
{
valueXmlString.append("<igst_perc>").append("<![CDATA["+gst_rate+"]]>").append("</igst_perc>");
valueXmlString.append("<igst_amt protect = \"0\">").append("<![CDATA["+igst_amount+"]]>").append("</igst_amt>");
valueXmlString.append("<cgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</cgst_amt>");
valueXmlString.append("<sgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</sgst_amt>");
}
}
}
}
else
{
if(state_code != null && state_code.trim().length() > 0)
{
if(state_code.equalsIgnoreCase(loginSiteCode))
{
valueXmlString.append("<cgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</cgst_perc>");
valueXmlString.append("<sgst_perc protect = \"1\">").append("<![CDATA["+rate/2+"]]>").append("</sgst_perc>");
valueXmlString.append("<igst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</igst_amt>");
valueXmlString.append("<cgst_amt protect = \"0\">").append("<![CDATA["+cgst_amount+"]]>").append("</cgst_amt>");
valueXmlString.append("<sgst_amt protect = \"0\">").append("<![CDATA["+sgst_amount+"]]>").append("</sgst_amt>");
}
else if(!(state_code.equalsIgnoreCase(loginSiteCode)))
{
valueXmlString.append("<igst_perc>").append("<![CDATA["+gst_rate+"]]>").append("</igst_perc>");
valueXmlString.append("<igst_amt protect = \"0\">").append("<![CDATA["+igst_amount+"]]>").append("</igst_amt>");
valueXmlString.append("<cgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</cgst_amt>");
valueXmlString.append("<sgst_amt protect = \"1\">").append("<![CDATA[0.0]]>").append("</sgst_amt>");
}
}//end of if block if state_code is not null
}
}
}
valueXmlString.append("</Detail2>"); valueXmlString.append("</Detail2>");
break; break;
}//end of case2 }//end of case2
...@@ -2668,6 +2773,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2668,6 +2773,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
{ {
double taxable_amt = Double.valueOf(checkNull(genericUtility.getColumnValue("taxable_amt", dom))); double taxable_amt = Double.valueOf(checkNull(genericUtility.getColumnValue("taxable_amt", dom)));
igst_amt = (taxable_amt * rate)/100; igst_amt = (taxable_amt * rate)/100;
//System.out.println("RETURN VALUE"+"igst_amt::["+igst_amt+"]");
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -2699,7 +2805,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2699,7 +2805,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
finalRate = (rate * num)/(num+den); finalRate = (rate * num)/(num+den);
System.out.println("finalRate :::::::::["+finalRate+"]"); System.out.println("finalRate :::::::::["+finalRate+"]");
cgst_amt = (taxable_amt * finalRate)/100; cgst_amt = (taxable_amt * finalRate)/100;
System.out.println("cgst_amt:::["+cgst_amt+"]"); //System.out.println("RETURN VALUE"+"cgst_amt:::["+cgst_amt+"]");
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -2731,7 +2837,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2731,7 +2837,7 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
finalRate = (rate * den)/(num+den); finalRate = (rate * den)/(num+den);
System.out.println("finalRate :::::::::["+finalRate+"]"); System.out.println("finalRate :::::::::["+finalRate+"]");
sgst_amt = (taxable_amt * finalRate)/100; sgst_amt = (taxable_amt * finalRate)/100;
System.out.println("sgst_amt:::["+sgst_amt+"]"); //System.out.println("RETURN VALUE"+"sgst_amt:::["+sgst_amt+"]");
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -2739,4 +2845,11 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal ...@@ -2739,4 +2845,11 @@ public class GstrIC extends ValidatorEJB implements GstrICRemote, GstrICLocal
} }
return sgst_amt; return sgst_amt;
} }
private double getDouble(String amount)
{
double result = 0.0;
result = Double.parseDouble((amount==null||amount.equals("")) ? "0" : amount);
return result;
}
} }
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