Commit ea09052e authored by msalla's avatar msalla

Gimatex: Sale Account code not picking up in invoice(itemcode missing)

 

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@216171 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c47dcab7
......@@ -3559,7 +3559,8 @@ public class InvAcct
// Getting ACCT & CCTR Code for COGS
cctrCodeCogs = finCommon.getAcctDetrTtype("", itemSer, "COGS", ordType, conn);
// cctrCodeCogs = finCommon.getAcctDetrTtype("", itemSer, "COGS", ordType, conn); commeneted by monika salla on 5 feb 2020 to set itemcode in getAcctDetrTtype
cctrCodeCogs = finCommon.getAcctDetrTtype(itemCode, itemSer, "COGS", ordType, conn);
//AcctAnalysisType("",itemSer,"COGS",ordType,siteCode,conn);
//Pavan R on 24may18 to handle AIOOBException if acct / cctr not found and return ","
if(cctrCodeCogs == null || cctrCodeCogs.trim().length() < 2)
......@@ -6545,7 +6546,7 @@ public class InvAcct
acctCodeInv = "", cctrCodeInv = "",acctCodeTax="",cctrCodeTax="",typeMap = "",acctCodeMap = "",cctrCodeMap = "";
Timestamp tranDate = null,effDate = null,currDate = null;
boolean exitFlag = false;
int countRec = 0,findIndex = 0,doExit=0;
int countRec = 0,findIndex = 0,doExit=0,lineNoINt=0;
double qtyStduom = 0, costRate = 0, physicalQty = 0,rateOh = 0,rate = 0,stdRate = 0,amtInv = 0, amtOh = 0,amtCogos = 0,grAmount = 0,amountMap = 0;
double taxAmt=0.0,exchRate=1.0;
ArrayList consisuueList = new ArrayList();
......@@ -6705,6 +6706,7 @@ public class InvAcct
{
itemCode = rs.getString("item_code");
lineNo = rs.getString("line_no");
// lineNoINt = rs.getInt("line_no");//added by monika
amount = rs.getString("amount");
locCode = rs.getString("loc_code");
lotNo = rs.getString("lot_no");
......@@ -6830,15 +6832,32 @@ public class InvAcct
}
// Data from TAXTRAN for Excise
sql1 = "select acct_code, cctr_code, (case when tax_amt is null then 0 else tax_amt end) as tax_amt from taxtran "
//added by monika 20-jan-2020 -to trim space in line no
/*
System.out.println("before:string line no["+lineNo+"]");
lineNoINt = Integer.parseInt(lineNo.trim());
System.out.println("LineNoINt---1---["+lineNoINt+"]");
lineNoINt = lineNoINt + 1;
System.out.println("LineNoINt---2---"+lineNoINt);
lineNo = lineNo.valueOf(lineNoINt);
lineNo = " " + lineNo;
lineNo = lineNo.substring(lineNo.length() - 3, lineNo.length());
//System.out.println("pordMaxLineNo---*---"+pordMaxLineNo);
System.out.println("after:"+lineNoINt+">new line no after space["+lineNo+"]");
//end
*/ // Data from TAXTRAN for Excise
/*sql1 = "select acct_code, cctr_code, (case when tax_amt is null then 0 else tax_amt end) as tax_amt from taxtran "
+ " where tran_code= ? and tran_id = ? and line_no = ? and tax_code = ?";
*/ //commenetd by monika to remove tax_code as it can take entries from tax tran.
sql1 = "select acct_code, cctr_code, (case when tax_amt is null then 0 else tax_amt end) as tax_amt from taxtran "
+ " where tran_code= ? and tran_id = ? and line_no = ? ";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, tranSer);
pstmt1.setString(2, tranId);
pstmt1.setString(3, lineNo);
pstmt1.setString(4, varValue);
pstmt1.setString(3, lineNo.substring(lineNo.length()-1));
// pstmt1.setString(4, varValue);
System.out.println("print sql of tax tran"+sql1);
rs1 = pstmt1.executeQuery();
if (rs1.next())
{
......
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