From 725a0aedfeeb5002eb482c3b012e5c8e72ef66fe Mon Sep 17 00:00:00 2001 From: limeng <1131177064@qq.com> Date: Fri, 27 Nov 2026 11:14:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=8E=82=E5=AE=B6=E8=AE=B0=E8=B4=A6):=20?= =?UTF-8?q?=E6=88=90=E6=9C=AC=E4=BB=B7=E5=B7=A5=E5=8D=95=E8=BF=90=E8=B4=B9?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=A9=BA=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EcommerceFinance/Services/SupplierBookkeepingValuation.php | 2 +- .../Unit/EcommerceFinance/SupplierBookkeepingValuationTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/EcommerceFinance/Services/SupplierBookkeepingValuation.php b/modules/EcommerceFinance/Services/SupplierBookkeepingValuation.php index 03511029..d0fd146d 100644 --- a/modules/EcommerceFinance/Services/SupplierBookkeepingValuation.php +++ b/modules/EcommerceFinance/Services/SupplierBookkeepingValuation.php @@ -178,7 +178,7 @@ class SupplierBookkeepingValuation $row['matched_tracking_no'] = implode("\n", array_values(array_unique(array_column($pool, 'express_no')))); if ($costOnly) { $row['matched_cost'] = self::money($cost); - $row['matched_freight'] = ''; + $row['matched_freight'] = null; $row['amount'] = self::money($cost); $basis = implode('、', self::COST_ONLY_SUPPLIERS) . '只记成本价:按发货数量×商品成本价记账,不含运费'; } elseif ($freightOnly) { diff --git a/tests/Unit/EcommerceFinance/SupplierBookkeepingValuationTest.php b/tests/Unit/EcommerceFinance/SupplierBookkeepingValuationTest.php index 5319e7ab..8c81e775 100644 --- a/tests/Unit/EcommerceFinance/SupplierBookkeepingValuationTest.php +++ b/tests/Unit/EcommerceFinance/SupplierBookkeepingValuationTest.php @@ -373,7 +373,7 @@ class SupplierBookkeepingValuationTest extends TestCase $row = $service->apply([$this->row(['supplier' => '沐野竹木', 'bookkeeping_type' => $type, 'amount' => $amount])])[0]; $this->assertSame('40.00', $row['amount'], $type); $this->assertSame('40.00', $row['matched_cost']); - $this->assertSame('', $row['matched_freight']); + $this->assertNull($row['matched_freight']); $this->assertSame('2', $row['matched_quantity']); $this->assertSame('扣款', $row['deduction_status']); $this->assertStringContainsString('沐野竹木只记成本价', $row['remark']);