Commit 20e6d636 authored by msingh's avatar msingh

Changed by Manish on 28/04/16


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101407 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f7b243be
......@@ -1809,10 +1809,20 @@ public class CreatePoRcpVoucher
taxMultiplier = -1;
sql = "update porcp set vouch_created = 'Y' where tran_id = ? ";
pstmtUpd = conn.prepareStatement(sql);
pstmtUpd.setString(1, returnId);
pstmtUpd.setString(1, tranId);
pstmtUpd.executeUpdate();
pstmtUpd.close();
pstmtUpd=null;
if(returnId != null && returnId.trim().length()>0)
{
sql = "update porcp set vouch_created = 'Y' where tran_id = ? ";
pstmtUpd = conn.prepareStatement(sql);
pstmtUpd.setString(1, returnId);
pstmtUpd.executeUpdate();
pstmtUpd.close();
pstmtUpd=null;
}
}
/* //
// 3 Added by Vilas
......
......@@ -8,7 +8,6 @@ import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.utility.TransIDGenerator;
/*import ibase.webitm.utility.GenericUtility;*/
import ibase.webitm.utility.ITMException;
import java.util.*;
......@@ -28,13 +27,13 @@ import ibase.webitm.ejb.mfg.MfgCommon;
public class InvAcct
{
FinCommon finCommon = new FinCommon();
// GenericUtility genericUtility = GenericUtility.getInstance();
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ValidatorEJB validator = new ValidatorEJB();
public String acctPoRcpt(String tranId, Connection conn)throws ITMException
{
FinCommon finCommon = null;
// GenericUtility genericUtility = null;
// GenericUtility genericUtility = null;
ITMDBAccessEJB itmDBAccessEJB = null;
String sql = "",errString = "", errCode = "";
......@@ -72,7 +71,7 @@ public class InvAcct
{
finCommon = new FinCommon();
// genericUtility = GenericUtility.getInstance();
// genericUtility = GenericUtility.getInstance();
itmDBAccessEJB = new ITMDBAccessEJB();
sql = " SELECT TRAN_DATE, EFF_DATE, SITE_CODE, SUPP_CODE, "
......@@ -82,6 +81,7 @@ public class InvAcct
+ " FROM PORCP WHERE TRAN_ID = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
if(rs.next())
{
......@@ -364,7 +364,7 @@ public class InvAcct
}
if (cctrCodeCR == null || cctrCodeCR.trim().length() == 0 )
{
if (cctrCodeDR == null && cctrCodeDR.trim().length() > 0)
if (cctrCodeDR != null && cctrCodeDR.trim().length() > 0)
{
cctrCodeCR = cctrCodeDR;
}
......@@ -718,6 +718,7 @@ public class InvAcct
// the tax recovery amount is subtracted from the effect going to the inventory
///amish for std acct
tempMap = (HashMap) poRcpMap.get("X" + acctCodeDR + cctrCodeDR + analysis1__dr + analysis2__dr + analysis3__dr ); // 07/11/13 manoharan added
grAmount = Double.parseDouble(tempMap.get("amount").toString()); //Changed by Manish on 28/04/16
tempMap.put("amount", grAmount - recoAmount);
//poRcpMap.put("X" + acctCodeDR + cctrCodeDR, tempMap); // 07/11/13 manoharan commented and added following line
poRcpMap.put("X" + acctCodeDR + cctrCodeDR + analysis1__dr + analysis2__dr + analysis3__dr, tempMap);
......@@ -739,8 +740,10 @@ public class InvAcct
{
tempMap = new HashMap();
tempMap.put("type", "X");
tempMap.put("acct_code", acctCodeDR);
tempMap.put("cctr_code", cctrCodeDR);
// tempMap.put("acct_code", acctCodeDR);
tempMap.put("acct_code", acctCodeReco); //Changed by Manish on 28/04/16
// tempMap.put("cctr_code", cctrCodeDR);
tempMap.put("cctr_code", ccrtCodeReco); //Changed by Manish on 28/04/16
tempMap.put("amount", recoAmount);
// added by cpatil on 09-03-13 start
tempMap.put("analysis1",analysis1__dr);
......@@ -835,7 +838,8 @@ public class InvAcct
if (poRcpMap.containsKey("X" + acctCodeNP + cctrCodeNP + analysis1__dr + analysis2__dr + analysis3__dr)) // modify by cpatil on 09-03-13 start
{
tempMap = (HashMap) poRcpMap.get("X" + acctCodeReco + ccrtCodeReco + analysis1__dr + analysis2__dr + analysis3__dr );
//tempMap = (HashMap) poRcpMap.get("X" + acctCodeReco + ccrtCodeReco + analysis1__dr + analysis2__dr + analysis3__dr );
tempMap = (HashMap) poRcpMap.get("X" + acctCodeNP + cctrCodeNP + analysis1__dr + analysis2__dr + analysis3__dr ); //Changed by Manish on 28/04/16
grAmount = Double.parseDouble(tempMap.get("amount").toString());
System.out.println("tempMap[old] ==================== ["+tempMap+"]");
tempMap.put("amount", grAmount + amountNP);
......@@ -1046,6 +1050,12 @@ public class InvAcct
//if as_transer = 'P-RET' then
// netAmount = 0 - netAmount
//end if
if(cctrCodeCR == null)
{
cctrCodeCR = " ";
}
System.out.println("acct_code IS ::::["+acctCodeCR+"]");
System.out.println("cctr_code IS ::::["+cctrCodeCR+"]");
glTraceMap = new HashMap();
glTraceMap.put("tran_date",tranDate);
......@@ -2685,7 +2695,7 @@ public class InvAcct
//
// 28/09/00 manoharan added coin diff. checking
FinCommon finCommon = null;
// GenericUtility genericUtility = null;
//GenericUtility genericUtility = null;
ITMDBAccessEJB itmDBAccessEJB = null;
PreparedStatement pstmt = null, pstmt1 = null, pstmtUpd = null;
ResultSet rs = null, rs1 = null;
......@@ -2703,7 +2713,7 @@ public class InvAcct
finCommon = new FinCommon();
MfgCommon mfgCommon = new MfgCommon();
// genericUtility = GenericUtility.getInstance();
// genericUtility = GenericUtility.getInstance();
itmDBAccessEJB = new ITMDBAccessEJB();
invOnline = finCommon.getFinparams("999999", "INV_ACCT_WISS", conn);
if ("NULLFOUND".equals(invOnline))
......
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