From 45ca4653e755b349851793a5f9f118fb42b4d127 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=8B=8F=E6=9C=A8?= <594326199@qq.com>
Date: Wed, 4 Nov 2026 11:13:39 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BE=9B=E5=BA=94=E5=95=86=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E5=90=8C=E6=AD=A5=E8=BF=87=E6=BB=A4=E9=80=80=E8=B4=A7?=
=?UTF-8?q?=E5=8E=82=E5=AE=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../View/SupplierReconciliationPageData.php | 19 ++++++++++++++++---
.../SupplierReconciliationDingTalkTest.php | 17 ++++++++++++++++-
2 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/modules/EcommerceFinance/View/SupplierReconciliationPageData.php b/modules/EcommerceFinance/View/SupplierReconciliationPageData.php
index 2dc3e8ab..fdeadc7b 100644
--- a/modules/EcommerceFinance/View/SupplierReconciliationPageData.php
+++ b/modules/EcommerceFinance/View/SupplierReconciliationPageData.php
@@ -110,6 +110,17 @@ class SupplierReconciliationPageData
));
}
+ $filteredReturnRows = [];
+ foreach ($returnRows as $row) {
+ if ($month !== '' && $this->returnRowMonth($row) !== $month) {
+ continue;
+ }
+ if ($reconciler !== '' && trim((string) ($row['reconciler'] ?? '')) !== $reconciler) {
+ continue;
+ }
+ $filteredReturnRows[] = $row;
+ }
+
$suppliers = [];
foreach ($mine as $row) {
$name = trim((string) ($row['supplier'] ?? ''));
@@ -117,10 +128,12 @@ class SupplierReconciliationPageData
$suppliers[$name] = true;
}
}
- foreach ($this->statements->uploadedSuppliers($companyId) as $name) {
- $suppliers[$name] = true;
+ if ($month === '' && $reconciler === '') {
+ foreach ($this->statements->uploadedSuppliers($companyId) as $name) {
+ $suppliers[$name] = true;
+ }
}
- foreach ($returnRows as $row) {
+ foreach ($filteredReturnRows as $row) {
$name = trim((string) ($row['supplier'] ?? ''));
if ($name !== '') {
$suppliers[$name] = true;
diff --git a/tests/Feature/Business/SupplierReconciliationDingTalkTest.php b/tests/Feature/Business/SupplierReconciliationDingTalkTest.php
index 06344be0..86e473c4 100644
--- a/tests/Feature/Business/SupplierReconciliationDingTalkTest.php
+++ b/tests/Feature/Business/SupplierReconciliationDingTalkTest.php
@@ -322,16 +322,31 @@ class SupplierReconciliationDingTalkTest extends FeatureTestCase
'amount' => '10',
'reconciler' => '陈亲园',
], $companyId, null);
+ $store->save('final:supplier:return-reconciliation', 'return:october-foreign', [
+ 'summary_month' => '2026-10',
+ 'send_time' => '2026-10-09 10:00:00',
+ 'supplier' => '鸣飞家具',
+ 'barcode' => 'RETURN-OCTOBER-FOREIGN',
+ 'sku_name' => '其他对账人退货',
+ 'qty' => '1',
+ 'unit_price' => '10',
+ 'amount' => '10',
+ 'reconciler' => '李萌',
+ ], $companyId, null);
$this->loginAs()->get(route('business.pages.show', [
'company_id' => $companyId,
'section' => 'supplier-reconciliation',
'page' => 'finance-data',
'month' => '2026-10',
+ 'reconciler' => '陈亲园',
]))
->assertOk()
->assertSee('