From 2c19f00b211b7ffb1a265d67991d92f2b194b1f5 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 08 六月 2026 11:33:47 +0800
Subject: [PATCH] feat(financial): 新增凭证分录科目明细字段

---
 src/main/resources/mapper/stock/StockOutRecordMapper.xml |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/stock/StockOutRecordMapper.xml b/src/main/resources/mapper/stock/StockOutRecordMapper.xml
index 202de6b..43a20c4 100644
--- a/src/main/resources/mapper/stock/StockOutRecordMapper.xml
+++ b/src/main/resources/mapper/stock/StockOutRecordMapper.xml
@@ -100,7 +100,8 @@
         sor.create_time as shippingDate,
         p.product_name,
         pm.model as specification_model,
-        sor.stock_out_num * slp.tax_inclusive_unit_price as outboundAmount,
+        slp.tax_rate,
+        sor.stock_out_num * slp.tax_inclusive_unit_price / IFNULL(NULLIF(slp.single_quantity, 0), 1) as outboundAmount,
         s.shipping_no,
         sl.sales_contract_no
         FROM stock_out_record sor
@@ -116,6 +117,9 @@
         <if test="req.customerName != null and req.customerName != ''">
             AND sl.customer_name LIKE CONCAT('%',#{req.customerName},'%')
         </if>
+        <if test="req.customerId != null ">
+            AND sl.customer_id = #{req.customerId}
+        </if>
         <if test="req.startDate != null and req.endDate != null">
             AND s.shipping_date BETWEEN #{req.startDate} AND #{req.endDate}
         </if>

--
Gitblit v1.9.3