Commit d8b595b4 authored by kshinde's avatar kshinde

Invoice Cancel DrCrRcpConf confirm testing and bug fix.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@196724 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1af12406
...@@ -4380,7 +4380,7 @@ public class InvAcct ...@@ -4380,7 +4380,7 @@ public class InvAcct
if(projCode == null || projCode.trim().length() == 0) if(projCode == null || projCode.trim().length() == 0)
{ {
if(invoiceID != null || invoiceID.trim().length() > 0) if(invoiceID != null && invoiceID.trim().length() > 0)
{ {
sql = " select b.proj_code from invoice a, sorder b where a.sale_order = b.sale_order and a.invoice_id = ? "; sql = " select b.proj_code from invoice a, sorder b where a.sale_order = b.sale_order and a.invoice_id = ? ";
pstmtSql = conn.prepareStatement(sql); pstmtSql = conn.prepareStatement(sql);
......
...@@ -592,7 +592,7 @@ public class DrCrRcpConf extends ActionHandlerEJB implements DrCrInvConfLocal,Dr ...@@ -592,7 +592,7 @@ public class DrCrRcpConf extends ActionHandlerEJB implements DrCrInvConfLocal,Dr
} }
} }
sql = " select acct_code, cctr_code, sum(tax_amt), line_no, (case when sum(reco_amount) is null then 0 else sum(reco_amount) end) as reco_amount " sql = " select acct_code, cctr_code, sum(tax_amt) as tax_amt, line_no, (case when sum(reco_amount) is null then 0 else sum(reco_amount) end) as reco_amount "
+" from taxtran where tran_code = ? and tran_id = ? " +" from taxtran where tran_code = ? and tran_id = ? "
+" and tax_amt <> 0 and effect <> 'N' group by acct_code, cctr_code, line_no "; +" and tax_amt <> 0 and effect <> 'N' group by acct_code, cctr_code, line_no ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -689,37 +689,44 @@ public class DrCrRcpConf extends ActionHandlerEJB implements DrCrInvConfLocal,Dr ...@@ -689,37 +689,44 @@ public class DrCrRcpConf extends ActionHandlerEJB implements DrCrInvConfLocal,Dr
lsStr = "acct_code = '" + checkNull((acctCode)) + "' and cctr_code = '" + checkNull(cctrCode) + "'"; lsStr = "acct_code = '" + checkNull((acctCode)) + "' and cctr_code = '" + checkNull(cctrCode) + "'";
lineNo = String.valueOf(findLineNofromDetail(acctCode, cctrCode ,detailList)); lineNo = String.valueOf(findLineNofromDetail(acctCode, cctrCode ,detailList));
System.out.println("line No from detail"+lineNo);
if(Integer.parseInt(lineNo) == 0) if(Integer.parseInt(lineNo) == 0)
{ {
//Need to verfiy below code //Need to verfiy below code
//li_lineno = lds_det.insertrow(0); //li_lineno = lds_det.insertrow(0);
//amountTotal = amount; //amountTotal = amount;
detMap = new HashMap(); detMap = new HashMap();
amountTotal = amount; amountTotal = Double.parseDouble(taxAmt);
detMap.put("tran_id", tranId);
detMap.put("line_no", lineNo);
detMap.put("acct_code", acctCode);
detMap.put("cctr_code", cctrCode);
detMap.put("amount", amountTotal - recoAmt);
detMap.put("emp_code", "");
detMap.put("anal_code", "");
System.out.println("Inside detail new hashmap"+amountTotal);
} }
else else
{ {
//Need to verfiy below code //Need to verfiy below code
//amountTotal = amount + lds_det.getitemnumber(li_lineno,"amount"); //amountTotal = amount + lds_det.getitemnumber(li_lineno,"amount");
detMap = (HashMap) detailList.get(Integer.valueOf(lineNo)); detMap = (HashMap) detailList.get(Integer.valueOf(lineNo));
amountTotal = amount + (Double) detMap.get("amount"); amountTotal = Double.parseDouble(taxAmt) + (Double) detMap.get("amount");
System.out.println("Inside add detail map"+amountTotal+"DetailList"+detailList);
} }
detMap.put("tran_id", tranId);
detMap.put("line_no", lineNo);
detMap.put("acct_code", acctCode);
detMap.put("cctr_code", cctrCode);
detMap.put("amount", amountTotal - recoAmt);
detMap.put("emp_code", "");
detMap.put("anal_code", "");
if(Integer.parseInt(lineNo) == 0) if(Integer.parseInt(lineNo) == 0)
{ {
detailList.add(detMap); detailList.add(detMap);
System.out.println("DetailList added MAP"+detailList);
} }
else else
{ {
detailList.set(Integer.parseInt(lineNo), detMap); detailList.set(Integer.parseInt(lineNo), detMap);
System.out.println("");
} }
total = total + amount; total = total + amount;
......
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