demand: TMS系统财务销账优化
committer: heyu
This commit is contained in:
parent
c5d361c154
commit
e27b57ca67
@ -134,11 +134,11 @@ public class EmisWriteoffApplyServiceImpl extends EmisBaseService implements IEm
|
||||
|
||||
// 验证:申请金额 + 已收金额 <= 运单应收金额
|
||||
BigDecimal totalAmount = detail.getApplyMoney().add(receivedAmount);
|
||||
if (totalAmount.compareTo(detail.getEmisWaybill().getFreight()) > 0) {
|
||||
throw new EmisBizError("运单号 " + detail.getBillCode() + " 的申请金额(" +
|
||||
detail.getApplyMoney() + ") + 已收金额(" + receivedAmount + ") = " +
|
||||
totalAmount + " 超过运单应收金额(" + detail.getEmisWaybill().getFreight() + ")");
|
||||
}
|
||||
// if (totalAmount.compareTo(detail.getEmisWaybill().getFreight()) > 0) {
|
||||
// throw new EmisBizError("运单号 " + detail.getBillCode() + " 的申请金额(" +
|
||||
// detail.getApplyMoney() + ") + 已收金额(" + receivedAmount + ") = " +
|
||||
// totalAmount + " 超过运单应收金额(" + detail.getEmisWaybill().getFreight() + ")");
|
||||
// }
|
||||
}
|
||||
|
||||
// 验证总销账金额
|
||||
@ -683,10 +683,10 @@ public class EmisWriteoffApplyServiceImpl extends EmisBaseService implements IEm
|
||||
: BigDecimal.ZERO; // 已收金额
|
||||
|
||||
// 验证:申请金额 + 已收金额 <= 运单金额
|
||||
BigDecimal totalAmount = applyAmount.add(receivedAmount);
|
||||
if (totalAmount.compareTo(waybillAmount) > 0) {
|
||||
throw new EmisBizError("申请金额+已收金额(" + totalAmount + ")超过运单应收金额(" + waybillAmount + ")");
|
||||
}
|
||||
// BigDecimal totalAmount = applyAmount.add(receivedAmount);
|
||||
// if (totalAmount.compareTo(waybillAmount) > 0) {
|
||||
// throw new EmisBizError("申请金额+已收金额(" + totalAmount + ")超过运单应收金额(" + waybillAmount + ")");
|
||||
// }
|
||||
|
||||
// 直接使用明细中的子账单信息,无需额外查询
|
||||
if (detail.getEmisSettleSubBill() == null) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user