fix:外销合同提交效验

This commit is contained in:
ljw 2024-09-14 17:34:11 +08:00
parent 577661be20
commit ea8d9fa222

View File

@ -308,23 +308,23 @@ public class SalesOrderSubmitValidator extends AbstractValidator {
} }
if (map.containsKey(debcredtype)) { if (map.containsKey(debcredtype)) {
Boolean aBoolean = map.get(debcredtype); Boolean aBoolean = map.get(debcredtype);
if (!aBoolean) { if (aBoolean) {
// 实际来源总金额 // 实际来源总金额
BigDecimal sumtotalamount = object.getBigDecimal("yem_sumtotalamount"); // BigDecimal sumtotalamount = object.getBigDecimal("yem_sumtotalamount");
// 预计去向总金额 // 预计去向总金额
BigDecimal sumtowardamt = object.getBigDecimal("yem_sumtowardamt"); // BigDecimal sumtowardamt = object.getBigDecimal("yem_sumtowardamt");
if (debcuseamt.compareTo(sumtotalamount.subtract(sumtowardamt)) > 0) { // if (debcuseamt.compareTo(sumtotalamount.subtract(sumtowardamt)) > 0) {
sb.append(String.format("配件资金使用明细第 [ %s ] 行,贷记单使用金额 [ %s ] 超过其对应配件资金池 [ %s ] 分录第 [ %s ] 行,实际来源金额 [ %s ] - 预计去向金额 [ %s ] = [ %s ] !!\r\n", // sb.append(String.format("配件资金使用明细第 [ %s ] 行,贷记单使用金额 [ %s ] 超过其对应配件资金池 [ %s ] 分录第 [ %s ] 行,实际来源金额 [ %s ] - 预计去向金额 [ %s ] = [ %s ] !!\r\n",
index + 1, // index + 1,
debcuseamt.setScale(2, RoundingMode.HALF_UP), // debcuseamt.setScale(2, RoundingMode.HALF_UP),
single.getString("billno"), // single.getString("billno"),
subIdx + 1, // subIdx + 1,
sumtotalamount.setScale(2, RoundingMode.HALF_UP), // sumtotalamount.setScale(2, RoundingMode.HALF_UP),
sumtowardamt.setScale(2, RoundingMode.HALF_UP), // sumtowardamt.setScale(2, RoundingMode.HALF_UP),
sumtotalamount.subtract(sumtowardamt).setScale(2, RoundingMode.HALF_UP) // sumtotalamount.subtract(sumtowardamt).setScale(2, RoundingMode.HALF_UP)
)); // ));
} // }
} else { // } else {
// 实际来源总金额 // 实际来源总金额
BigDecimal sumtotalamount = object.getBigDecimal("yem_sumtotalamount"); BigDecimal sumtotalamount = object.getBigDecimal("yem_sumtotalamount");
// 预计去向总金额 // 预计去向总金额