liyong
14 小时以前 b2089cc76bdf959a2e9ff71142dc3fcf0bd9b80b
src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
@@ -367,6 +367,7 @@
    public List<PaymentHistoryRecordVo> getPaymentRecordList(Long supplierId) {
        List<PaymentHistoryRecordVo> paymentRecordList = paymentRegistrationMapper.getPaymentRecordList(supplierId);
        List<PaymentHistoryRecordVo> result = new ArrayList<>();
        List<PaymentHistoryRecordVo> newResult = new ArrayList<>();
        // 应付总金额金额计算
        BigDecimal amountTotal = BigDecimal.ZERO;
        if(CollectionUtils.isNotEmpty(paymentRecordList)) {
@@ -403,8 +404,20 @@
                result.add(paymentHistoryRecordVo);
            }
            for (int i = 0; i < result.size(); i++) {
                PaymentHistoryRecordVo paymentHistoryRecordVo = result.get(i);
                if (i == 0) {
                    paymentHistoryRecordVo.setPayableAmount(paymentHistoryRecordVo.getInvoiceAmount().subtract(paymentHistoryRecordVo.getCurrentPaymentAmount()));
                }else {
                    PaymentHistoryRecordVo paymentHistoryRecordVo1 = result.get(i-1);
                    paymentHistoryRecordVo.setPayableAmount(paymentHistoryRecordVo1.getPayableAmount()
                            .add(paymentHistoryRecordVo.getInvoiceAmount()).subtract(paymentHistoryRecordVo.getCurrentPaymentAmount()));
                }
                newResult.add(paymentHistoryRecordVo);
            }
        }
        return result;
        return newResult;
    }
    /**