From f0e88036262c2fb2e6db59fc7f92592a2dbcbe11 Mon Sep 17 00:00:00 2001 From: qiuxiang <394405259@qq.com> Date: Tue, 29 Sep 2026 16:30:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=91=E7=9B=AE=E6=98=A0=E5=B0=84=E8=A1=A8?= =?UTF-8?q?=E7=A5=A8=E6=8D=AE=E5=8F=A3=E5=BE=84=E5=B9=B6=E5=85=A59%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 常用票据口径新增 0.09(京东短信服务费等 9% 税率),页面票据下拉可选且校验不再报提示;补用例覆盖 0.09 与 options.invoices。另:京东「综合违约金/违约赔付」的借方科目由「销售费用/营业外支出」改为「营业外支出」(数据修正,走 store.update 并记操作日志)。 --- .../Services/AccountMappingStore.php | 2 +- .../Business/AccountMappingPageTest.php | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/modules/EcommerceFinance/Services/AccountMappingStore.php b/modules/EcommerceFinance/Services/AccountMappingStore.php index 9e8e505f..816439dd 100644 --- a/modules/EcommerceFinance/Services/AccountMappingStore.php +++ b/modules/EcommerceFinance/Services/AccountMappingStore.php @@ -56,7 +56,7 @@ class AccountMappingStore ]; /** 票据口径可取值 */ - public const INVOICES = ['0.06', '不开票', '-']; + public const INVOICES = ['0.06', '0.09', '不开票', '-']; /** * 存储目录。 diff --git a/tests/Feature/Business/AccountMappingPageTest.php b/tests/Feature/Business/AccountMappingPageTest.php index 8608a44b..d944e52a 100644 --- a/tests/Feature/Business/AccountMappingPageTest.php +++ b/tests/Feature/Business/AccountMappingPageTest.php @@ -246,4 +246,31 @@ class AccountMappingPageTest extends FeatureTestCase $this->assertSame('不开票', $rule['invoice']); $this->assertSame('支出基准', $rule['basis']); } + + /** 9% 票据口径(京东短信服务费)并入常用取值,页面下拉可选且不再报提示。 */ + public function test_nine_percent_invoice_is_a_known_option(): void + { + $this->grantAdminPermission(); + + $this->assertContains('0.09', AccountMappingStore::INVOICES); + + $invoices = $this->loginAs()->getJson($this->rulesUrl())->assertOk()->json('options.invoices'); + $this->assertContains('0.09', $invoices); + + $issues = app(AccountMappingValidator::class)->validate([[ + 'id' => 9001, + 'platform' => '京东', + 'item' => '短信服务费', + 'memo' => '销售费用手续费', + 'invoice' => '0.09', + 'category' => '平台服务费', + 'dAcct' => '销售费用', + 'dSub' => '', + 'cAcct' => '其他货币资金', + 'cSub' => '', + 'basis' => '支出基准', + ]])['issues'][9001] ?? []; + + $this->assertNotContains('invoice_unknown', array_column($issues, 'code')); + } }