diff --git a/resources/views/business/pages/supplier-reconciliation/finance-data.blade.php b/resources/views/business/pages/supplier-reconciliation/finance-data.blade.php index 2e7dceac..e45ed042 100644 --- a/resources/views/business/pages/supplier-reconciliation/finance-data.blade.php +++ b/resources/views/business/pages/supplier-reconciliation/finance-data.blade.php @@ -474,37 +474,41 @@

@endif
- +
- - - - + + + + + @forelse ($financeReturnPanel['rows'] as $row) $row['_accounting_target'] === '物流'])> + - - + + + + - - - - + + + - + @empty - + @endforelse
发货时间条形码商品名称厂家扣减数量厂家扣减金额记账归属物流记账数量物流记账金额物流公司备注快递单号对账人确认状态发货时间明细供应商条形码商品名称发货量单价金额供应商条码备注标题wms配货单号仓库名称快递单号类型操作
{{ $row['send_time'] ?? '—' }}{{ $row['supplier'] ?? '—' }} {{ $row['barcode'] ?? '—' }} {{ $row['sku_name'] ?? '—' }}{{ $row['_accounting_target'] === '不记账' ? '—' : number_format($row['_supplier_qty'], 2) }}{{ $row['_accounting_target'] === '不记账' ? '—' : number_format($row['_supplier_amount'], 2) }}{{ $row['qty'] ?? '—' }}{{ $row['unit_price'] ?? '—' }}{{ $row['amount'] ?? '—' }}{{ $row['supplier_barcode'] ?? '—' }} - - {{ $row['_accounting_label'] }} - + {{ $row['remark'] ?? '—' }} + @if ($row['_accounting_target'] !== '厂家') + {{ $row['_accounting_label'] }} + @endif @if ($row['_accounting_note'] !== '按厂家退货扣减')
{{ $row['_accounting_note'] }}
@endif
{{ $row['_logistics_qty'] > 0 ? number_format($row['_logistics_qty'], 2) : '—' }}{{ $row['_logistics_amount'] > 0 ? number_format($row['_logistics_amount'], 2) : '—' }}{{ $row['_logistics_company'] !== '' ? $row['_logistics_company'] : '—' }}{{ $row['remark'] ?? '—' }}{{ $row['title'] ?? '—' }}{{ $row['wms_pick_no'] ?? '—' }}{{ $row['warehouse'] ?? '—' }} {{ $row['express_no'] ?? '—' }}{{ $row['reconciler'] ?? '—' }}退货 @if ($row['status'] === 'confirmed') 已确认 @@ -516,7 +520,7 @@
当前月份和对账人筛选下没有退货数据。
当前月份和对账人筛选下没有退货数据。
diff --git a/tests/Feature/Business/SupplierReconciliationDingTalkTest.php b/tests/Feature/Business/SupplierReconciliationDingTalkTest.php index 2e49b6cb..908fba76 100644 --- a/tests/Feature/Business/SupplierReconciliationDingTalkTest.php +++ b/tests/Feature/Business/SupplierReconciliationDingTalkTest.php @@ -241,6 +241,44 @@ class SupplierReconciliationDingTalkTest extends FeatureTestCase ->assertSee('name="month"', false); } + public function test_finance_return_table_uses_the_supplier_data_headers(): void + { + $this->seedReconciliation(); + + $html = $this->loginAs()->get($this->pageUrl())->assertOk()->getContent(); + $tableStart = strpos($html, 'data-finance-return-table'); + $this->assertNotFalse($tableStart, '财务退货表应正常渲染。'); + + $headStart = strpos($html, '', $tableStart); + $headEnd = strpos($html, '', $headStart); + $this->assertNotFalse($headStart); + $this->assertNotFalse($headEnd); + + preg_match_all('/(.*?)<\/th>/s', substr($html, $headStart, $headEnd - $headStart), $matches); + $headers = array_map( + static fn (string $value): string => html_entity_decode(strip_tags(trim($value))), + $matches[1], + ); + + $this->assertSame([ + '发货时间', + '明细供应商', + '条形码', + '商品名称', + '发货量', + '单价', + '金额', + '供应商条码', + '备注', + '标题', + 'wms配货单号', + '仓库名称', + '快递单号', + '类型', + '操作', + ], $headers); + } + public function test_monthly_return_push_sends_all_statuses_and_only_the_selected_supplier_month(): void { $this->saveRobot();