From a484951645eb311c81c5a73733fdb493f58e7eff Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期五, 16 一月 2026 09:53:56 +0800
Subject: [PATCH] fix: 删除来票登记及对应台账后本次来票金额未正确回滚

---
 src/main/java/com/ruoyi/sales/service/impl/ReceiptPaymentServiceImpl.java |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/ruoyi/sales/service/impl/ReceiptPaymentServiceImpl.java b/src/main/java/com/ruoyi/sales/service/impl/ReceiptPaymentServiceImpl.java
index ae93c3b..48056a9 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/ReceiptPaymentServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/ReceiptPaymentServiceImpl.java
@@ -161,9 +161,16 @@
     @Override
     public IPage<ReceiptPaymentDto> bindInvoiceNoRegPage(Page page, ReceiptPaymentDto receiptPaymentDto) {
         IPage<ReceiptPaymentDto> receiptPaymentDtoIPage = receiptPaymentMapper.bindInvoiceNoRegPage(page, receiptPaymentDto);
-        if (receiptPaymentDto.getStatus()) {
-            receiptPaymentDtoIPage.getRecords().removeIf(receiptPaymentDto1 -> new BigDecimal("0.00").equals(receiptPaymentDto1.getNoReceiptAmount()));
-        }
+//        if (receiptPaymentDto.getStatus()) {
+//            long count = receiptPaymentDtoIPage.getRecords()
+//                    .stream()
+//                    .filter(receiptPaymentDto1 -> new BigDecimal("0.00").equals(receiptPaymentDto1.getNoReceiptAmount()))
+//                    .count();
+//            receiptPaymentDtoIPage
+//                    .getRecords()
+//                    .removeIf(receiptPaymentDto1 -> new BigDecimal("0.00").equals(receiptPaymentDto1.getNoReceiptAmount()));
+//            receiptPaymentDtoIPage.setTotal(receiptPaymentDtoIPage.getTotal() - count);
+//        }
         receiptPaymentDtoIPage.getRecords().forEach(item -> {
             // 姣旇緝鍥炴閲戦 == 寰呭洖娆鹃噾棰�
             if (item.getInvoiceTotal().compareTo(item.getReceiptPaymentAmountTotal()) == 0) {

--
Gitblit v1.9.3