Commit 7cd8ef05 authored by steurwadkar's avatar steurwadkar

F17ABAS001 GST API integration wizard source code commit

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@171494 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1d2000c9
......@@ -3463,7 +3463,7 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
posStateCode = checkNull(hdrRs.getString("GST_CODE"));
docNo = checkNull(hdrRs.getString("DOC_NO"));
docDate = hdrRs.getDate("DOC_DATE");
amount = hdrRs.getDouble("AMOUNT");
amount = Double.parseDouble(String.format("%.2f",hdrRs.getDouble("AMOUNT")));
reverseCharge = checkNull(hdrRs.getString("REVERSE_CHRG"));
etin = checkNull(hdrRs.getString("ECOM_REG_NO"));
redInvId = checkNull(hdrRs.getString("REF_ID__INV"));
......@@ -3541,9 +3541,9 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
detRs = detPstmt.executeQuery();
while(detRs.next())
{
gstRate = detRs.getDouble("GST_RATE");
taxableAmt = detRs.getDouble("TAXABLE_AMT");
cessAmt = detRs.getDouble("CESS_AMT");
gstRate = Double.parseDouble(String.format("%.2f",detRs.getDouble("GST_RATE")));
taxableAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("TAXABLE_AMT")));
cessAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("CESS_AMT")));
XSSFRow dataRow = dataSheet.createRow(b2bRowNum++);
......@@ -3577,9 +3577,9 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
detRs = detPstmt.executeQuery();
while(detRs.next())
{
gstRate = detRs.getDouble("GST_RATE");
taxableAmt = detRs.getDouble("TAXABLE_AMT");
cessAmt = detRs.getDouble("CESS_AMT");
gstRate = Double.parseDouble(String.format("%.2f",detRs.getDouble("GST_RATE")));
taxableAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("TAXABLE_AMT")));
cessAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("CESS_AMT")));
XSSFRow dataRow = dataSheet.createRow(b2clRowNum++);
......@@ -3610,9 +3610,9 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
detRs = detPstmt.executeQuery();
while(detRs.next())
{
gstRate = detRs.getDouble("GST_RATE");
taxableAmt = detRs.getDouble("TAXABLE_AMT");
cessAmt = detRs.getDouble("CESS_AMT");
gstRate = Double.parseDouble(String.format("%.2f",detRs.getDouble("GST_RATE")));
taxableAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("TAXABLE_AMT")));
cessAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("CESS_AMT")));
XSSFRow dataRow = dataSheet.createRow(b2csRowNum++);
......@@ -3649,9 +3649,9 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
detRs = detPstmt.executeQuery();
while(detRs.next())
{
gstRate = detRs.getDouble("GST_RATE");
taxableAmt = detRs.getDouble("TAXABLE_AMT");
cessAmt = detRs.getDouble("CESS_AMT");
gstRate = Double.parseDouble(String.format("%.2f",detRs.getDouble("GST_RATE")));
taxableAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("TAXABLE_AMT")));
cessAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("CESS_AMT")));
XSSFRow dataRow = dataSheet.createRow(cdnrRowNum++);
......@@ -3734,9 +3734,9 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
detRs = detPstmt.executeQuery();
while(detRs.next())
{
gstRate = detRs.getDouble("GST_RATE");
taxableAmt = detRs.getDouble("TAXABLE_AMT");
cessAmt = detRs.getDouble("CESS_AMT");
gstRate = Double.parseDouble(String.format("%.2f",detRs.getDouble("GST_RATE")));
taxableAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("TAXABLE_AMT")));
cessAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("CESS_AMT")));
XSSFRow dataRow = dataSheet.createRow(cdnurRowNum++);
......@@ -3777,9 +3777,9 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
detRs = detPstmt.executeQuery();
while(detRs.next())
{
gstRate = detRs.getDouble("GST_RATE");
taxableAmt = detRs.getDouble("TAXABLE_AMT");
cessAmt = detRs.getDouble("CESS_AMT");
gstRate = Double.parseDouble(String.format("%.2f",detRs.getDouble("GST_RATE")));
taxableAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("TAXABLE_AMT")));
cessAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("CESS_AMT")));
XSSFRow dataRow = dataSheet.createRow(expRowNum++);
......@@ -3820,9 +3820,9 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
detRs = detPstmt.executeQuery();
while(detRs.next())
{
gstRate = detRs.getDouble("GST_RATE");
taxableAmt = detRs.getDouble("TAXABLE_AMT");
cessAmt = detRs.getDouble("CESS_AMT");
gstRate = Double.parseDouble(String.format("%.2f",detRs.getDouble("GST_RATE")));
taxableAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("TAXABLE_AMT")));
cessAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("CESS_AMT")));
XSSFRow dataRow = dataSheet.createRow(atRowNum++);
......@@ -3844,9 +3844,9 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
detRs = detPstmt.executeQuery();
while(detRs.next())
{
gstRate = detRs.getDouble("GST_RATE");
taxableAmt = detRs.getDouble("TAXABLE_AMT");
cessAmt = detRs.getDouble("CESS_AMT");
gstRate = Double.parseDouble(String.format("%.2f",detRs.getDouble("GST_RATE")));
taxableAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("TAXABLE_AMT")));
cessAmt = Double.parseDouble(String.format("%.2f",detRs.getDouble("CESS_AMT")));
XSSFRow dataRow = dataSheet.createRow(atAdjRowNum++);
......@@ -3879,15 +3879,15 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
{
if("15".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
nilAmount = rs.getDouble("AMOUNT");
nilAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
if("16".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
exemtAmount = rs.getDouble("AMOUNT");
exemtAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
if("17".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
nonGSTAmount = rs.getDouble("AMOUNT");
nonGSTAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
}
closeResources(rs, pstmt);
......@@ -3917,15 +3917,15 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
{
if("18".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
nilAmount = rs.getDouble("AMOUNT");
nilAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
if("19".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
exemtAmount = rs.getDouble("AMOUNT");
exemtAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
if("20".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
nonGSTAmount = rs.getDouble("AMOUNT");
nonGSTAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
}
closeResources(rs, pstmt);
......@@ -3955,15 +3955,15 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
{
if("21".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
nilAmount = rs.getDouble("AMOUNT");
nilAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
if("22".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
exemtAmount = rs.getDouble("AMOUNT");
exemtAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
if("23".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
nonGSTAmount = rs.getDouble("AMOUNT");
nonGSTAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
}
closeResources(rs, pstmt);
......@@ -3993,15 +3993,15 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
{
if("24".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
nilAmount = rs.getDouble("AMOUNT");
nilAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
if("25".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
exemtAmount = rs.getDouble("AMOUNT");
exemtAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
if("26".equalsIgnoreCase(rs.getString("TRAN_TYPE")))
{
nonGSTAmount = rs.getDouble("AMOUNT");
nonGSTAmount = Double.parseDouble(String.format("%.2f",rs.getDouble("AMOUNT")));
}
}
closeResources(rs, pstmt);
......@@ -4043,14 +4043,14 @@ public class GSTDataSubmitWizEJB extends ValidatorEJB implements GSTDataSubmitWi
dataRow.createCell(0).setCellValue(checkNull(rs.getString("GS_CODE")));
String unitDescr = checkNull(rs.getString("UNIT")) + "-" + checkNull(rs.getString("DESCR"));
dataRow.createCell(2).setCellValue(unitDescr);
dataRow.createCell(3).setCellValue(rs.getDouble("TOT_QTY"));
dataRow.createCell(3).setCellValue(Double.parseDouble(String.format("%.2f",rs.getDouble("TOT_QTY"))));
double totalValue = rs.getDouble("TOT_TAXVAL") + rs.getDouble("TOT_IAMT") + rs.getDouble("TOT_CAMT") + rs.getDouble("TOT_SAMT") + rs.getDouble("TOT_CSAMT");
dataRow.createCell(4).setCellValue(totalValue);
dataRow.createCell(5).setCellValue(rs.getDouble("TOT_TAXVAL"));
dataRow.createCell(6).setCellValue(rs.getDouble("TOT_IAMT"));
dataRow.createCell(7).setCellValue(rs.getDouble("TOT_CAMT"));
dataRow.createCell(8).setCellValue(rs.getDouble("TOT_SAMT"));
dataRow.createCell(9).setCellValue(rs.getDouble("TOT_CSAMT"));
dataRow.createCell(4).setCellValue(Double.parseDouble(String.format("%.2f",totalValue)));
dataRow.createCell(5).setCellValue(Double.parseDouble(String.format("%.2f",rs.getDouble("TOT_TAXVAL"))));
dataRow.createCell(6).setCellValue(Double.parseDouble(String.format("%.2f",rs.getDouble("TOT_IAMT"))));
dataRow.createCell(7).setCellValue(Double.parseDouble(String.format("%.2f",rs.getDouble("TOT_CAMT"))));
dataRow.createCell(8).setCellValue(Double.parseDouble(String.format("%.2f",rs.getDouble("TOT_SAMT"))));
dataRow.createCell(9).setCellValue(Double.parseDouble(String.format("%.2f",rs.getDouble("TOT_CSAMT"))));
}
closeResources(rs, pstmt);
......
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