From 951fde9c46b8e72e042a088582bfffa36518ff08 Mon Sep 17 00:00:00 2001 From: yueyang <2495544247@qq.com> Date: Sat, 10 Oct 2026 11:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A6=E5=8D=95=E9=A1=B5=E7=AD=BE=EF=BC=9A?= =?UTF-8?q?=E6=80=BB=E8=B4=A6=E5=A4=87=E6=B3=A8=E4=B8=8B=E6=8B=89=E5=80=99?= =?UTF-8?q?=E9=80=89=E5=90=88=E5=B9=B6=E7=A7=91=E7=9B=AE=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E8=B4=A2=E5=8A=A1=E5=A4=87=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 之前候选只来自总账备注映射表,科目映射表里新加的备注在下拉里选不到 - 现在两个来源取并集,改完映射表下一次请求即可筛选 --- .../Services/AccountLedgerRemarkMap.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/EcommerceFinance/Services/AccountLedgerRemarkMap.php b/modules/EcommerceFinance/Services/AccountLedgerRemarkMap.php index 8179a0ff..fd33d349 100644 --- a/modules/EcommerceFinance/Services/AccountLedgerRemarkMap.php +++ b/modules/EcommerceFinance/Services/AccountLedgerRemarkMap.php @@ -162,6 +162,7 @@ class AccountLedgerRemarkMap { $map = $this->map(); $remarks = []; + $rulesByPlatform = $this->accountMappingRulesByPlatform(); foreach ($this->platformsForTab($tab) as $platform) { foreach (array_values($map[$platform] ?? []) as $remark) { $remark = trim((string) $remark); @@ -169,6 +170,16 @@ class AccountLedgerRemarkMap $remarks[$remark] = true; } } + // 「财务规则 › 科目映射表」里的财务备注同样作为候选, + // 否则新加的备注要等总账备注映射表同步后才能在下拉里选到。 + foreach ($rulesByPlatform[$this->normalizeKey($platform)] ?? [] as $rules) { + foreach ($rules as $rule) { + $memo = trim((string) ($rule['memo'] ?? '')); + if ($memo !== '') { + $remarks[$memo] = true; + } + } + } } $list = array_keys($remarks);