Commit 4b064fde by huluobin

bug fix

parent bee0a147
......@@ -102,14 +102,15 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
costPlanDomain.setLendBalance(BigDecimal.ZERO);
CostDomain costDomain = planToCost(costPlanDomain.getCostPlanNo());
costDomain.setCostNo(getCostNo());
//待提交
costDomain.setCostStatus(0);
//费用单金额
costDomain.setAmount(counteract);
//关联借支单币种 ->人民币 汇率
costDomain.setAmount(costDomain.getCounteract());
costDomain.setLendBalance(BigDecimal.ZERO);
costDomain.setPayPlanAmount(costDomain.getPayCounteract());
costDomain.setPayLendBalance(BigDecimal.ZERO);
BigDecimal toRmbRate = CurUtils.getCur(costDomain.getDic(), "CNY");
costDomain.setToRmbRate(toRmbRate);
costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP));
costDao.insert(costDomain);
//更新借支单申请归还金额
......@@ -225,14 +226,17 @@ public class CostPlanNewLend2ServiceImpl extends AbstractCostPlanService impleme
throw new BizRuntimeException("冲销后归还金额 > 借支单待归还金额");
}
costPlanDomain.setCounteract(BigDecimal.ZERO);
CostDomain costDomain = planToCost(costPlanDomain.getCostPlanNo());
costDomain.setCostNo(getCostNo());
costDomain.setCostStatus(0);
costDomain.setAmount(lendBalance);
BigDecimal toRmbRate = CurUtils.getCur(costDomain.getDic(), "CNY");
costDomain.setToRmbRate(toRmbRate);
costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate).setScale(2, BigDecimal.ROUND_HALF_UP));
costDomain.setAmount(costDomain.getLendBalance());
costDomain.setCounteract(new BigDecimal(0));
costDomain.setPayPlanAmount(costDomain.getPayLendBalance());
costDomain.setPayCounteract(new BigDecimal(0));
BigDecimal toRmbRate1 = CurUtils.getCur(costDomain.getDic(), "CNY");
costDomain.setToRmbRate(toRmbRate1);
costDomain.setAmountRmb(costDomain.getAmount().multiply(toRmbRate1).setScale(2, BigDecimal.ROUND_HALF_UP));
costDao.insert(costDomain);
//更新借支单申请归还金额
......
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