Commit 7f95bc76 authored by manohar's avatar manohar

effect_party in rcpaact was alway set as Y corrected


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94175 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 479bcc29
......@@ -303,7 +303,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
String rcpepcAdj = "";
String analCode = "";
String empCode = "";
String effectParty = "N";
int count = 0;
double netAmount = 0.0;
double exchRateRcv = 0.0;
......@@ -550,8 +550,8 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
// populate rcpacct
sql = "select sundry_type,sundry_code,acct_code,cctr_code,emp_code, anal_code,curr_code ,exch_rate,amount,party_doc_ref from rcpacct where tran_id = ?";
// 29/01/14 manoharan effect_party considered
sql = "select sundry_type,sundry_code,acct_code,cctr_code,emp_code, anal_code,curr_code ,exch_rate,amount,party_doc_ref,case when effect_party is null then 'N' else effect_party end as effect_party from rcpacct where tran_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranId);
rs = pstmt.executeQuery();
......@@ -568,6 +568,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
DetMap.put("exch_rate", rs.getDouble("exch_rate"));
DetMap.put("amount", rs.getDouble("amount"));
DetMap.put("party_doc_ref", rs.getString("party_doc_ref"));
DetMap.put("effect_party", rs.getString("effect_party")); // 29/01/14 manoharan
DetList.add(DetMap);
//System.out.println(" receipt Acct Map..........");
System.out.println("DetList initial [" + DetList.toString() + "]");
......@@ -592,7 +593,6 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
ADetMap.put("sundry_code", (String) RcpHdrMap.get("sundry_code"));
ADetMap.put("acct_code", rs.getString("acct_code"));
ADetMap.put("cctr_code", rs.getString("cctr_code"));
ADetMap.put("exch_rate__vouch", rs.getDouble("exch_rate__vouch"));
ADetList.add(ADetMap);
System.out.println(" receipt Adv Map..........");
......@@ -777,6 +777,8 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("amount", (double) Double.parseDouble( "" + RcpDetMap.get("rcp_amt")));
partyDocRef = finCommon.gfGetPartyDocRef((String)RcpDetMap.get("ref_ser"), (String)RcpDetMap.get("ref_no"),conn);
detMap.put("party_doc_ref", partyDocRef);
detMap.put("effect_party", "Y"); // 29/01/14 manoharan
DetList.add(detMap);
}
}
......@@ -880,6 +882,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("exch_rate", exch);
detMap.put("amount", rcpAmt);
detMap.put("party_doc_ref", "");
detMap.put("effect_party", "N"); // 29/01/14 manoharan
DetList.add(detMap);
}
}
......@@ -1018,6 +1021,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("exch_rate", exch);
detMap.put("amount", amount);
detMap.put("party_doc_ref", "");
detMap.put("effect_party", "Y"); // 29/01/14 manoharan
DetList.add(detMap);
}
......@@ -1130,6 +1134,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("exch_rate", exch);
detMap.put("amount", tFin);
detMap.put("party_doc_ref", "");
detMap.put("effect_party", "N"); // 29/01/14 manoharan
DetList.add(detMap);
......@@ -1160,6 +1165,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("exch_rate", exch);
detMap.put("amount", tFin);
detMap.put("party_doc_ref", "");
detMap.put("effect_party", "Y"); // 29/01/14 manoharan
DetList.add(detMap);
......@@ -1190,6 +1196,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("exch_rate", exch);
detMap.put("amount", -1 * tFin);
detMap.put("party_doc_ref", "");
detMap.put("effect_party", "Y"); // 29/01/14 manoharan
DetList.add(detMap);
......@@ -1237,6 +1244,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("exch_rate", exch);
detMap.put("amount", advAmt);
detMap.put("party_doc_ref", "");
detMap.put("effect_party", "Y"); // 29/01/14 manoharan
DetList.add(detMap);
}
......@@ -1363,6 +1371,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("exch_rate", exchRate);
detMap.put("amount", amount);
detMap.put("party_doc_ref", "");
detMap.put("effect_party", "N"); // 29/01/14 manoharan
DetList.add(detMap);
}
......@@ -1492,6 +1501,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("exch_rate", exchRate);
detMap.put("amount", diffAmtExch);
detMap.put("party_doc_ref", "");
detMap.put("effect_party", "N"); // 29/01/14 manoharan
DetList.add(detMap);
}
}
......@@ -1639,6 +1649,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("exch_rate", exchRate);
detMap.put("amount", (amtRev * -1));
detMap.put("party_doc_ref", "");
detMap.put("effect_party", "N"); // 29/01/14 manoharan
DetList.add(detMap);
}
......@@ -1722,6 +1733,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
detMap.put("exch_rate", exchRate);
detMap.put("amount", amtRev );
detMap.put("party_doc_ref", "");
detMap.put("effect_party", "N"); // 29/01/14 manoharan
DetList.add(detMap);
}
......@@ -1913,6 +1925,20 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
cctrCode = (String) detMap.get("cctr_code");
empCode = (String) detMap.get("emp_code");
analCode = (String) detMap.get("anal_code");
// 29/01/14 manoharan
effectParty = (String) detMap.get("effect_party");
if (effectParty == null || "null".equals(effectParty))
{
effectParty = "N";
}
if (sundryType == null || "O".equals(sundryType))
{
effectParty = "N";
}
if (sundryType != null && !"null".equals(sundryType) && !"O".equals(sundryType) && sundryCode != null && !"null".equals(sundryCode) && sundryCode.trim().length() > 0 )
{
effectParty = "Y";
}
//detMap.put("curr_code", rs.getString("curr_code"));
exchRate = (double) Double.parseDouble( "" +detMap.get("exch_rate"));
amount = (double) Double.parseDouble( "" +detMap.get("amount"));
......@@ -1927,7 +1953,7 @@ public class ReceiptAdvConf extends ActionHandlerEJB implements ReceiptAdvConfLo
pstmt.setDouble(6,amount);
pstmt.setString(7,empCode);
pstmt.setString(8,analCode);
pstmt.setString(9,"Y");
pstmt.setString(9,effectParty); // "Y"); // 29/01/14 manoharan
pstmt.setString(10,sundryType);
pstmt.setString(11,sundryCode);
pstmt.addBatch();
......
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