Compare commits

...

1 Commits

Author SHA1 Message Date
94c90d197b 修复「总账备注」在共享镜像页签不生效
- AccountBills::mirrorIndex 的返回漏了 withLedgerRemarks(补丁误落在同一文件的本系统账单表分支),导致抖音/京东账单/京喜账单/京东网银钱包等镜像页签这一列为空
- PagesTest 的抖音账户用例补回归断言:镜像页签行必须带 payload.ledger_remark
2026-10-06 15:54:33 +08:00
2 changed files with 15 additions and 1 deletions

View File

@ -344,7 +344,7 @@ class AccountBills extends Controller
$data['columns'] = AccountBillColumns::for($billType);
return response()->json($data);
return response()->json($this->withLedgerRemarks($data, $billType));
}
private function exportMirror(Request $request, string $billType)

View File

@ -564,6 +564,7 @@ class PagesTest extends FeatureTestCase
'id' => '9001',
'record_code' => '9001',
'store_name' => '放心购旗舰店',
'bill_item' => '订单实付',
'income' => 88.50,
'expense' => 0.0,
'payload' => [
@ -576,10 +577,23 @@ class PagesTest extends FeatureTestCase
]);
$this->app->instance(StoreReceivingDouyinBillMirrorRepository::class, $repository);
// 回归:镜像页签也必须按「平台 + 账单项目」补齐总账备注。
\Illuminate\Support\Facades\DB::table('ec_account_ledger_remarks')->insert([
'platform' => '抖音',
'bill_item' => '订单实付',
'ledger_remark' => '订单收入',
'created_at' => now(),
'updated_at' => now(),
]);
\Illuminate\Support\Facades\Cache::forget(
\Modules\EcommerceFinance\Services\AccountLedgerRemarkMap::CACHE_KEY
);
$this->loginAs()
->withHeader('X-Requested-With', 'XMLHttpRequest')
->get(route('ecommerce-finance.account-bills.index', ['bill_type' => 'douyin']))
->assertOk()
->assertJsonPath('data.0.payload.ledger_remark', '订单收入')
->assertJsonPath('data.0.payload.move_scene', '头条放心购')
->assertJsonPath('data.0.payload.settle_account', 'TouTiaoFXGZJ')
->assertJsonPath('columns.title', '抖音账户')