转出对比取税额字段

release
wangzhikun 2 years ago
parent 5cb223f61a
commit ad191177d7
  1. 4
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/ReceiptOutServiceImpl.java

@ -165,7 +165,7 @@ public class ReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutDao,
// 转出税额累加 // 转出税额累加
BigDecimal oldOutTax = record.getOutTaxAmount() == null ? new BigDecimal(0) : record.getOutTaxAmount(); BigDecimal oldOutTax = record.getOutTaxAmount() == null ? new BigDecimal(0) : record.getOutTaxAmount();
BigDecimal newOutTax = oldOutTax.add(new BigDecimal(condVO.getOutTax())); BigDecimal newOutTax = oldOutTax.add(new BigDecimal(condVO.getOutTax()));
int compareTax = newOutTax.compareTo(record.getDkTaxAmount()); int compareTax = newOutTax.compareTo(record.getTaxAmount());
if (compareTax > 0) { if (compareTax > 0) {
throw new RRException("累计转出税额不能大于发票税额"); throw new RRException("累计转出税额不能大于发票税额");
} }
@ -222,7 +222,7 @@ public class ReceiptOutServiceImpl extends MpBaseServiceImpl<BaseReceiptOutDao,
// 转出税额累加 // 转出税额累加
BigDecimal oldOutTax = record.getOutTaxAmount() == null ? new BigDecimal(0) : record.getOutTaxAmount(); BigDecimal oldOutTax = record.getOutTaxAmount() == null ? new BigDecimal(0) : record.getOutTaxAmount();
BigDecimal newOutTax = oldOutTax.add(new BigDecimal(condVO.getOutTax())); BigDecimal newOutTax = oldOutTax.add(new BigDecimal(condVO.getOutTax()));
int compareTax = newOutTax.compareTo(invoice.getDkTaxAmount()); int compareTax = newOutTax.compareTo(invoice.getTaxAmount());
if (compareTax > 0) { if (compareTax > 0) {
throw new RRException("累计转出税额不能大于发票税额"); throw new RRException("累计转出税额不能大于发票税额");
} }

Loading…
Cancel
Save