From 1c8757f865bd5a0c80fa1d44ec4b62dfc6e24e39 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期一, 12 十月 2026 16:55:31 +0800
Subject: [PATCH] fix: 优化客户往来查询逻辑,修复应收金额计算及批号显示问题
---
src/main/resources/mapper/account/AccountStatementMapper.xml | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/account/AccountStatementMapper.xml b/src/main/resources/mapper/account/AccountStatementMapper.xml
index a4e00a8..9f99288 100644
--- a/src/main/resources/mapper/account/AccountStatementMapper.xml
+++ b/src/main/resources/mapper/account/AccountStatementMapper.xml
@@ -122,12 +122,12 @@
-- 杩涢」绋庢槑缁嗭紙閲囪喘璁㈠崟锛�
SELECT
pl.purchase_contract_number AS invoiceNo,
- pl.sales_contract_no AS salesContractNo,
+ pl.purchase_contract_number AS salesContractNo,
NULL AS supplierName,
- pl.supplier_name AS customerName,
+ pl.supplier_name AS customerName,
'杩涢」' AS orderType,
pl.entry_date AS invoiceDate,
- slp.tax_rate AS taxRate,
+ MAX(slp.tax_rate) AS taxRate,
ROUND(SUM(slp.tax_inclusive_total_price - slp.tax_exclusive_total_price), 2) AS jTaxAmount,
0 AS xTaxAmount,
ROUND(SUM(slp.tax_inclusive_total_price - slp.tax_exclusive_total_price), 2) AS taxAmount
@@ -148,7 +148,7 @@
sl.customer_name AS customerName,
'閿�椤�' AS orderType,
sl.entry_date AS invoiceDate,
- slp.tax_rate AS taxRate,
+ MAX(slp.tax_rate) AS taxRate,
0 AS jTaxAmount,
ROUND(SUM(slp.tax_inclusive_total_price - slp.tax_exclusive_total_price), 2) AS xTaxAmount,
ROUND(SUM(slp.tax_inclusive_total_price - slp.tax_exclusive_total_price), 2) AS taxAmount
--
Gitblit v1.9.3