From bcb36b7dd1f5727670ab52c65af85f8b29394ca9 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期四, 12 三月 2026 11:32:00 +0800
Subject: [PATCH] yys 修改供应商往来bug

---
 src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml b/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
index d8b9241..d0e241a 100644
--- a/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
+++ b/src/main/resources/mapper/purchase/PaymentRegistrationMapper.xml
@@ -129,7 +129,7 @@
         SELECT * FROM(
              SELECT
                  T1.issue_date AS happenTime,
-                 IFNULL(T1.invoice_amount,0) AS invoiceAmount,
+                 sum(IFNULL(T1.invoice_amount,0)) AS invoiceAmount,
                  '1' AS type,
                  0 AS currentPaymentAmount
              FROM
@@ -141,7 +141,7 @@
                  payment_date AS happenTime,
                  0 AS invoiceAmount,
                  '0' AS type,
-                 current_payment_amount AS currentPaymentAmount
+                 sum(ifnull(current_payment_amount,0)) AS currentPaymentAmount
              FROM payment_registration
              WHERE supplier_id = #{supplierId}
         ) T1

--
Gitblit v1.9.3