Commit bdaa4ccd authored by ngadkari's avatar ngadkari

Migration Of Consumption Issue Confirm and Accounting effects for taxes not...

Migration Of Consumption Issue Confirm and Accounting effects for taxes not taking place on confirmation of consumption Issue.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@186483 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f346318f
......@@ -6422,7 +6422,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;
int countRec = 0,findIndex = 0,doExit=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();
......@@ -6433,12 +6433,22 @@ public class InvAcct
{
System.out.println("Inside consumeIssPost");
invOnline = finCommon.getFinparams("999999","INV_ACCT_CISS",conn);
if (invOnline == null || invOnline.trim().length() == 0 )
{
invOnline = "N";
}
invOnline = invOnline.trim();
if("NULLFOUND".equalsIgnoreCase(invOnline))
{
errString = itmDBAccessEJB.getErrorString("","VTFINPARM","","",conn);
return errString;
}
invOnline = invOnline.trim();
if (!"Y".equals(invOnline) && !"N".equals(invOnline) && !"S".equals(invOnline))
{
errString = itmDBAccessEJB.getErrorString("","VTFINPARM1","","",conn);
return errString;
}
if("S".equalsIgnoreCase(invOnline))
{
sql = " Select item_code From consume_iss_det where CONS_ISSUE = ? ";
......@@ -6446,34 +6456,45 @@ public class InvAcct
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
if (rs.next())
doExit=0;
while (rs.next())
{
itemCodehdr = rs.getString("item_code");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
sql = " Select b.inv_acct From Item a, ItemSer b Where a.item_ser = b.item_ser And a.item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCodehdr);
sql1 = " Select b.inv_acct From Item a, ItemSer b Where a.item_ser = b.item_ser And a.item_code = ?";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, itemCodehdr);
rs = pstmt.executeQuery();
if (rs.next())
{
itemSer1 = rs.getString("inv_acct");
rs1 = pstmt1.executeQuery();
if (rs1.next())
{
itemSer1 = rs1.getString("inv_acct");
}
rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;
if (itemSer1 == null && itemSer1.trim().length()< 0)
{
itemSer1="N";
}
if(!"Y".equalsIgnoreCase(itemSer1))
{
doExit = 1;
break;
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (itemSer1 == null && itemSer1.trim().length()< 0)
{
itemSer1="N";
}
}
if("Y".equalsIgnoreCase(invOnline))
if("Y".equalsIgnoreCase(invOnline)|| ("S".equals(invOnline) && doExit == 0))
{
sql = " select issue_date, site_code__ord, tran_type, remarks from consume_iss where cons_issue = ?";
pstmt = conn.prepareStatement(sql);
......
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