Commit 3890ef64 authored by steurwadkar's avatar steurwadkar

F17ABAS001 source code commit


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@106580 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c05e1141
......@@ -3628,6 +3628,7 @@ public class GSTDataSubmitWizPos extends ValidatorEJB implements GSTDataSubmitWi
List<ITCData> itcInelgDataList = new ArrayList<ITCData>();
List<InwardSuppliesDetails> inwardSuppliesList = new ArrayList<InwardSuppliesDetails>();
OutwardSuppliesDetails outwardSuppliesDetails = null;
OutwardZeroRatedSupplies outwardZeroRatedSupplies = null;
OutwardExempetedSupplies outwardExempetedSupplies = null;
......@@ -3635,6 +3636,8 @@ public class GSTDataSubmitWizPos extends ValidatorEJB implements GSTDataSubmitWi
OutwardNonGSTSupplies outwardNonGSTSupplies = null;
SuppliesDetails suppliesDetails = null;
InterStateSupplies interStateSupplies = new InterStateSupplies();
int noOfRecords = 0;
ArrayList<String> tranIdList = new ArrayList<String>();
......@@ -3644,153 +3647,152 @@ public class GSTDataSubmitWizPos extends ValidatorEJB implements GSTDataSubmitWi
try
{
sql = " SELECT SUM(GDD.TAXABLE_AMT) AS TAXABLE_AMT, SUM(GDD.IGST_AMT) AS IGST_AMT, SUM(GDD.CGST_AMT) AS CGST_AMT, SUM(GDD.SGST_AMT) AS SGST_AMT, SUM(GDD.CESS_AMT) AS CESS_AMT"
sql = " SELECT GDH.TRAN_TYPE,SUM(GDD.TAXABLE_AMT) AS TAXABLE_AMT, SUM(GDD.IGST_AMT) AS IGST_AMT, SUM(GDD.CGST_AMT) AS CGST_AMT, SUM(GDD.SGST_AMT) AS SGST_AMT, SUM(GDD.CESS_AMT) AS CESS_AMT"
+ " FROM GST_DATA_HDR GDH, GST_DATA_DET GDD"
+ " WHERE GDH.TRAN_ID=GDD.TRAN_ID"
+ " AND GDH.REC_TYPE = ? AND GDH.SITE_CODE = ?"
+ " AND GDH.PRD_CODE = ? AND GDH.TRAN_TYPE = ? AND GDH.SUBMIT_STATUS = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "6");
pstmt.setString(2, siteCode);
pstmt.setString(3, periodCode);
pstmt.setString(4, "01");
pstmt.setString(5, "P");
+ " WHERE GDH.TRAN_ID=GDD.TRAN_ID"
+ " AND GDH.REC_TYPE = ? AND GDH.PRD_CODE = ? AND GDH.SITE_CODE = ? AND GDH.SUBMIT_STATUS = ?"
+ " AND GDH.TRAN_TYPE IN ('01','02','03','04','05') GROUP BY TRAN_TYPE";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "6");
pstmt.setString(2, siteCode);
pstmt.setString(3, periodCode);
pstmt.setString(4, "P");
rs = pstmt.executeQuery();
if(rs.next())
while(rs.next())
{
outwardSuppliesDetails = new OutwardSuppliesDetails();
outwardSuppliesDetails.taxableAmount = rs.getDouble("TAXABLE_AMT");
outwardSuppliesDetails.igstAmount = rs.getDouble("IGST_AMT");
outwardSuppliesDetails.cgstAmount = rs.getDouble("CGST_AMT");
outwardSuppliesDetails.sgstAmount = rs.getDouble("SGST_AMT");
outwardSuppliesDetails.cessAmount = rs.getDouble("CESS_AMT");
if("01".equalsIgnoreCase(gstCommonUtil.checkNull(rs.getString("TRAN_TYPE"))))
{
outwardSuppliesDetails = new OutwardSuppliesDetails();
outwardSuppliesDetails.taxableAmount = rs.getDouble("TAXABLE_AMT");
outwardSuppliesDetails.igstAmount = rs.getDouble("IGST_AMT");
outwardSuppliesDetails.cgstAmount = rs.getDouble("CGST_AMT");
outwardSuppliesDetails.sgstAmount = rs.getDouble("SGST_AMT");
outwardSuppliesDetails.cessAmount = rs.getDouble("CESS_AMT");
}
else if("02".equalsIgnoreCase(gstCommonUtil.checkNull(rs.getString("TRAN_TYPE"))))
{
outwardZeroRatedSupplies = new OutwardZeroRatedSupplies();
outwardZeroRatedSupplies.taxableAmount = rs.getDouble("TAXABLE_AMT");
outwardZeroRatedSupplies.igstAmount = rs.getDouble("IGST_AMT");
outwardZeroRatedSupplies.cessAmount = rs.getDouble("CESS_AMT");
}
else if("03".equalsIgnoreCase(gstCommonUtil.checkNull(rs.getString("TRAN_TYPE"))))
{
outwardExempetedSupplies = new OutwardExempetedSupplies();
outwardExempetedSupplies.taxableAmount = rs.getDouble("TAXABLE_AMT");
}
else if("04".equalsIgnoreCase(gstCommonUtil.checkNull(rs.getString("TRAN_TYPE"))))
{
inwardSuppliesUnderRevCharge = new InwardSuppliesUnderRevCharge();
inwardSuppliesUnderRevCharge.taxableAmount = rs.getDouble("TAXABLE_AMT");
inwardSuppliesUnderRevCharge.igstAmount = rs.getDouble("IGST_AMT");
inwardSuppliesUnderRevCharge.cgstAmount = rs.getDouble("CGST_AMT");
inwardSuppliesUnderRevCharge.sgstAmount = rs.getDouble("SGST_AMT");
inwardSuppliesUnderRevCharge.cessAmount = rs.getDouble("CESS_AMT");
}
else if("05".equalsIgnoreCase(gstCommonUtil.checkNull(rs.getString("TRAN_TYPE"))))
{
outwardNonGSTSupplies = new OutwardNonGSTSupplies();
outwardNonGSTSupplies.taxableAmount = rs.getDouble("TAXABLE_AMT");
}
}
closeResources(rs,pstmt);
sql = " SELECT SUM(GDD.TAXABLE_AMT) AS TAXABLE_AMT, SUM(GDD.IGST_AMT) AS IGST_AMT, SUM(GDD.CGST_AMT) AS CGST_AMT, SUM(GDD.SGST_AMT) AS SGST_AMT, SUM(GDD.CESS_AMT) AS CESS_AMT"
+ " FROM GST_DATA_HDR GDH, GST_DATA_DET GDD"
+ " WHERE GDH.TRAN_ID=GDD.TRAN_ID"
+ " AND GDH.REC_TYPE = ? AND GDH.SITE_CODE = ?"
+ " AND GDH.PRD_CODE = ? AND GDH.TRAN_TYPE = ? AND GDH.SUBMIT_STATUS = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "6");
pstmt.setString(2, siteCode);
pstmt.setString(3, periodCode);
pstmt.setString(4, "02");
pstmt.setString(5, "P");
rs = pstmt.executeQuery();
if(rs.next())
if(outwardSuppliesDetails!=null || outwardZeroRatedSupplies!=null || outwardExempetedSupplies!=null || inwardSuppliesUnderRevCharge!=null || outwardNonGSTSupplies!=null)
{
outwardZeroRatedSupplies = new OutwardZeroRatedSupplies();
outwardZeroRatedSupplies.taxableAmount = rs.getDouble("TAXABLE_AMT");
outwardZeroRatedSupplies.igstAmount = rs.getDouble("IGST_AMT");
outwardZeroRatedSupplies.cessAmount = rs.getDouble("CESS_AMT");
suppliesDetails = new SuppliesDetails();
suppliesDetails.outwardSuppliesDetails = outwardSuppliesDetails;
suppliesDetails.outwardZeroRatedSupplies = outwardZeroRatedSupplies;
suppliesDetails.outwardExempetedSupplies = outwardExempetedSupplies;
suppliesDetails.inwardSuppliesUnderRevCharge = inwardSuppliesUnderRevCharge;
suppliesDetails.outwardNonGSTSupplies = outwardNonGSTSupplies;
}
closeResources(rs,pstmt);
sql = " SELECT SUM(GDD.TAXABLE_AMT) AS TAXABLE_AMT, SUM(GDD.IGST_AMT) AS IGST_AMT, SUM(GDD.CGST_AMT) AS CGST_AMT, SUM(GDD.SGST_AMT) AS SGST_AMT, SUM(GDD.CESS_AMT) AS CESS_AMT"
sql = " SELECT GDH.GST_CODE, SUM(GDD.TAXABLE_AMT) AS TAXABLE_AMT, SUM(GDD.IGST_AMT) AS IGST_AMT, SUM(GDD.CGST_AMT) AS CGST_AMT, SUM(GDD.SGST_AMT) AS SGST_AMT, SUM(GDD.CESS_AMT) AS CESS_AMT"
+ " FROM GST_DATA_HDR GDH, GST_DATA_DET GDD"
+ " WHERE GDH.TRAN_ID=GDD.TRAN_ID"
+ " AND GDH.REC_TYPE = ? AND GDH.SITE_CODE = ?"
+ " AND GDH.PRD_CODE = ? AND GDH.TRAN_TYPE = ? AND GDH.SUBMIT_STATUS = ?";
+ " WHERE GDH.TRAN_ID=GDD.TRAN_ID"
+ " AND GDH.REC_TYPE = ? AND GDH.PRD_CODE = ? AND GDH.SITE_CODE = ? AND GDH.SUBMIT_STATUS = ? AND GDH.TRAN_TYPE IN ('06') GROUP BY GDH.GST_CODE";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "6");
pstmt.setString(2, siteCode);
pstmt.setString(3, periodCode);
pstmt.setString(4, "03");
pstmt.setString(5, "P");
pstmt.setString(2, periodCode);
pstmt.setString(3, siteCode);
pstmt.setString(4, "P");
rs = pstmt.executeQuery();
if(rs.next())
while(rs.next())
{
outwardExempetedSupplies = new OutwardExempetedSupplies();
outwardExempetedSupplies.taxableAmount = rs.getDouble("TAXABLE_AMT");
InterStateSuppliesData interStateSuppliesData = new InterStateSuppliesData();
interStateSuppliesData.placeOfSupply = gstCommonUtil.checkNull(rs.getString("GST_CODE"));
interStateSuppliesData.taxableAmount = rs.getDouble("TAXABLE_AMT");
interStateSuppliesData.igstAmount = rs.getDouble("IGST_AMT");
interStateSuppliesDataList.add(interStateSuppliesData);
}
closeResources(rs,pstmt);
sql = " SELECT SUM(GDD.TAXABLE_AMT) AS TAXABLE_AMT, SUM(GDD.IGST_AMT) AS IGST_AMT, SUM(GDD.CGST_AMT) AS CGST_AMT, SUM(GDD.SGST_AMT) AS SGST_AMT, SUM(GDD.CESS_AMT) AS CESS_AMT"
if(interStateSuppliesDataList.size() > 0)
{
interStateSupplies.interUnregisterSuppliesData = interStateSuppliesDataList;
}
interStateSuppliesDataList.clear();
sql = " SELECT GDH.GST_CODE, SUM(GDD.TAXABLE_AMT) AS TAXABLE_AMT, SUM(GDD.IGST_AMT) AS IGST_AMT, SUM(GDD.CGST_AMT) AS CGST_AMT, SUM(GDD.SGST_AMT) AS SGST_AMT, SUM(GDD.CESS_AMT) AS CESS_AMT"
+ " FROM GST_DATA_HDR GDH, GST_DATA_DET GDD"
+ " WHERE GDH.TRAN_ID=GDD.TRAN_ID"
+ " AND GDH.REC_TYPE = ? AND GDH.SITE_CODE = ?"
+ " AND GDH.PRD_CODE = ? AND GDH.TRAN_TYPE = ? AND GDH.SUBMIT_STATUS = ?";
+ " WHERE GDH.TRAN_ID=GDD.TRAN_ID"
+ " AND GDH.REC_TYPE = ? AND GDH.PRD_CODE = ? AND GDH.SITE_CODE = ? AND GDH.SUBMIT_STATUS = ? AND GDH.TRAN_TYPE IN ('07') GROUP BY GDH.GST_CODE";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "6");
pstmt.setString(2, siteCode);
pstmt.setString(3, periodCode);
pstmt.setString(4, "04");
pstmt.setString(5, "P");
pstmt.setString(2, periodCode);
pstmt.setString(3, siteCode);
pstmt.setString(4, "P");
rs = pstmt.executeQuery();
if(rs.next())
while(rs.next())
{
inwardSuppliesUnderRevCharge = new InwardSuppliesUnderRevCharge();
inwardSuppliesUnderRevCharge.taxableAmount = rs.getDouble("TAXABLE_AMT");
inwardSuppliesUnderRevCharge.igstAmount = rs.getDouble("IGST_AMT");
inwardSuppliesUnderRevCharge.cgstAmount = rs.getDouble("CGST_AMT");
inwardSuppliesUnderRevCharge.sgstAmount = rs.getDouble("SGST_AMT");
inwardSuppliesUnderRevCharge.cessAmount = rs.getDouble("CESS_AMT");
InterStateSuppliesData interStateSuppliesData = new InterStateSuppliesData();
interStateSuppliesData.placeOfSupply = gstCommonUtil.checkNull(rs.getString("GST_CODE"));
interStateSuppliesData.taxableAmount = rs.getDouble("TAXABLE_AMT");
interStateSuppliesData.igstAmount = rs.getDouble("IGST_AMT");
interStateSuppliesDataList.add(interStateSuppliesData);
}
closeResources(rs,pstmt);
sql = " SELECT SUM(GDD.TAXABLE_AMT) AS TAXABLE_AMT, SUM(GDD.IGST_AMT) AS IGST_AMT, SUM(GDD.CGST_AMT) AS CGST_AMT, SUM(GDD.SGST_AMT) AS SGST_AMT, SUM(GDD.CESS_AMT) AS CESS_AMT"
if(interStateSuppliesDataList.size() > 0)
{
interStateSupplies.compositionSuppliesData = interStateSuppliesDataList;
}
interStateSuppliesDataList.clear();
sql = " SELECT GDH.GST_CODE, SUM(GDD.TAXABLE_AMT) AS TAXABLE_AMT, SUM(GDD.IGST_AMT) AS IGST_AMT, SUM(GDD.CGST_AMT) AS CGST_AMT, SUM(GDD.SGST_AMT) AS SGST_AMT, SUM(GDD.CESS_AMT) AS CESS_AMT"
+ " FROM GST_DATA_HDR GDH, GST_DATA_DET GDD"
+ " WHERE GDH.TRAN_ID=GDD.TRAN_ID"
+ " AND GDH.REC_TYPE = ? AND GDH.SITE_CODE = ?"
+ " AND GDH.PRD_CODE = ? AND GDH.TRAN_TYPE = ? AND GDH.SUBMIT_STATUS = ?";
+ " WHERE GDH.TRAN_ID=GDD.TRAN_ID"
+ " AND GDH.REC_TYPE = ? AND GDH.PRD_CODE = ? AND GDH.SITE_CODE = ? AND GDH.SUBMIT_STATUS = ? AND GDH.TRAN_TYPE IN ('08') GROUP BY GDH.GST_CODE";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "6");
pstmt.setString(2, siteCode);
pstmt.setString(3, periodCode);
pstmt.setString(4, "05");
pstmt.setString(5, "P");
pstmt.setString(2, periodCode);
pstmt.setString(3, siteCode);
pstmt.setString(4, "P");
rs = pstmt.executeQuery();
if(rs.next())
while(rs.next())
{
outwardNonGSTSupplies = new OutwardNonGSTSupplies();
outwardNonGSTSupplies.taxableAmount = rs.getDouble("TAXABLE_AMT");
InterStateSuppliesData interStateSuppliesData = new InterStateSuppliesData();
interStateSuppliesData.placeOfSupply = gstCommonUtil.checkNull(rs.getString("GST_CODE"));
interStateSuppliesData.taxableAmount = rs.getDouble("TAXABLE_AMT");
interStateSuppliesData.igstAmount = rs.getDouble("IGST_AMT");
interStateSuppliesDataList.add(interStateSuppliesData);
}
closeResources(rs,pstmt);
if(outwardSuppliesDetails!=null || outwardZeroRatedSupplies!=null || outwardExempetedSupplies!=null || inwardSuppliesUnderRevCharge!=null || outwardNonGSTSupplies!=null)
if(interStateSuppliesDataList.size() > 0)
{
suppliesDetails = new SuppliesDetails();
suppliesDetails.outwardSuppliesDetails = outwardSuppliesDetails;
suppliesDetails.outwardZeroRatedSupplies = outwardZeroRatedSupplies;
suppliesDetails.outwardExempetedSupplies = outwardExempetedSupplies;
suppliesDetails.inwardSuppliesUnderRevCharge = inwardSuppliesUnderRevCharge;
suppliesDetails.outwardNonGSTSupplies = outwardNonGSTSupplies;
interStateSupplies.uinSuppliesData = interStateSuppliesDataList;
}
InterStateSuppliesData interStateSuppliesData = new InterStateSuppliesData();
interStateSuppliesData.placeOfSupply = "01";
interStateSuppliesData.taxableAmount = 12000;
interStateSuppliesData.igstAmount = 1200;
interStateSuppliesDataList.add(interStateSuppliesData);
interStateSuppliesData = new InterStateSuppliesData();
interStateSuppliesData.placeOfSupply = "27";
interStateSuppliesData.taxableAmount = 150000;
interStateSuppliesData.igstAmount = 12000;
interStateSuppliesDataList.add(interStateSuppliesData);
interStateSuppliesData = new InterStateSuppliesData();
interStateSuppliesData.placeOfSupply = "29";
interStateSuppliesData.taxableAmount = 18000;
interStateSuppliesData.igstAmount = 1000;
interStateSuppliesDataList.add(interStateSuppliesData);
InterStateSupplies interStateSupplies = new InterStateSupplies();
interStateSupplies.interUnregisterSuppliesData = interStateSuppliesDataList;
interStateSupplies.compositionSuppliesData = interStateSuppliesDataList;
interStateSupplies.uinSuppliesData = interStateSuppliesDataList;
interStateSuppliesDataList.clear();
ITCData itcData = new ITCData();
itcData.type = "IMPG";
......@@ -4277,7 +4279,7 @@ public class GSTDataSubmitWizPos extends ValidatorEJB implements GSTDataSubmitWi
hdrInsPstmt.setString(3, null);
hdrInsPstmt.setString(4, siteCode);
hdrInsPstmt.setString(5, periodCode);
hdrInsPstmt.setString(6, "2");
hdrInsPstmt.setString(6, "4");
hdrInsPstmt.setString(7, tranType);
hdrInsPstmt.setString(8, null);
hdrInsPstmt.setString(9, null);
......@@ -4808,7 +4810,7 @@ public class GSTDataSubmitWizPos extends ValidatorEJB implements GSTDataSubmitWi
hdrInsPstmt.setString(3, null);
hdrInsPstmt.setString(4, siteCode);
hdrInsPstmt.setString(5, periodCode);
hdrInsPstmt.setString(6, "2");
hdrInsPstmt.setString(6, "4");
hdrInsPstmt.setString(7, tranType);
hdrInsPstmt.setString(8, null);
hdrInsPstmt.setString(9, null);
......
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