Compare commits
1 Commits
main
...
fix/chenxi
| Author | SHA1 | Date | |
|---|---|---|---|
| 94c90d197b |
@ -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)
|
||||
|
||||
@ -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', '抖音账户')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user