科目映射表票据口径并入9%

常用票据口径新增 0.09(京东短信服务费等 9% 税率),页面票据下拉可选且校验不再报提示;补用例覆盖 0.09 与 options.invoices。另:京东「综合违约金/违约赔付」的借方科目由「销售费用/营业外支出」改为「营业外支出」(数据修正,走 store.update 并记操作日志)。
This commit is contained in:
qiuxiang 2026-09-29 16:30:11 +08:00
parent 48b436510e
commit f0e8803626
2 changed files with 28 additions and 1 deletions

View File

@ -56,7 +56,7 @@ class AccountMappingStore
];
/** 票据口径可取值 */
public const INVOICES = ['0.06', '不开票', '-'];
public const INVOICES = ['0.06', '0.09', '不开票', '-'];
/**
* 存储目录。

View File

@ -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'));
}
}