diff --git a/resources/views/business/pages/supplier-payables/supplier-payables-report.blade.php b/resources/views/business/pages/supplier-payables/supplier-payables-report.blade.php index 7fc7e974..4b488b7d 100644 --- a/resources/views/business/pages/supplier-payables/supplier-payables-report.blade.php +++ b/resources/views/business/pages/supplier-payables/supplier-payables-report.blade.php @@ -306,12 +306,8 @@ - - - - @@ -333,10 +329,9 @@ 本月采购金额 减 加 - 单位:元 + 单位:元 备注 是否直接对私打款 - 对私原因 含税定价金额 押款金额 结款截图 @@ -360,9 +355,6 @@ 供应商余额 应付余额 预估金额 - 对公打款金额 - 对私打款金额 - 已销账金额 @@ -389,12 +381,8 @@ {{ $money($row->supplier_balance) }} {{ $money($row->should_pay) }} {{ $money($row->estimated_price) }} - {{ $money($row->to_corporate) }} - {{ $money($row->to_private) }} - {{ $money($row->cashier_paid) }} {{ $row->remarks ?: '-' }} {{ (float) ($row->to_private ?? 0) !== 0.0 ? '是' : '否' }} - {{ $row->private_reason ?: '-' }} - {{ $money($row->deposit) }} - @@ -405,7 +393,7 @@ @empty - {{ $supplierPayableError ? '数据读取失败,请稍后重试。' : '暂无供应商应付数据' }} + {{ $supplierPayableError ? '数据读取失败,请稍后重试。' : '暂无供应商应付数据' }} @endforelse diff --git a/tests/Feature/Business/SupplierPayablePagesTest.php b/tests/Feature/Business/SupplierPayablePagesTest.php index 61c813ef..fe1b6054 100644 --- a/tests/Feature/Business/SupplierPayablePagesTest.php +++ b/tests/Feature/Business/SupplierPayablePagesTest.php @@ -148,7 +148,7 @@ class SupplierPayablePagesTest extends FeatureTestCase $this->assertCount(17, $headers[0]); } - public function testSupplierPayablesReportPageUsesItsOwnThirtyFourColumnGroupedTable() + public function testSupplierPayablesReportPageUsesItsOwnThirtyColumnGroupedTable() { $this->grantAdminPermission(); @@ -160,19 +160,36 @@ class SupplierPayablePagesTest extends FeatureTestCase $response ->assertOk() ->assertSee('class="supplier-payables-report-table"', false) - ->assertSee('已销账供应商', false) - ->assertSee('供应商简称', false) - ->assertSee('已销账供应商') - ->assertSee('本月采购金额') - ->assertSee('加', false) - ->assertSee('单位:元', false) - ->assertSee('供应商余额', false) - ->assertSee('最晚出账单时间(新执行标准)') ->assertDontSee('class="business-blank-page"', false); - preg_match_all('/)/', $response->getContent(), $columns); + $this->assertSame( + 1, + preg_match( + '/]*class="[^"]*supplier-payables-report-table[^"]*"[^>]*>.*?<\/table>/s', + $response->getContent(), + $tableMatch + ), + '供应商应付报表表格未找到。' + ); - $this->assertCount(34, $columns[0]); + $table = $tableMatch[0]; + + $this->assertStringContainsString('已销账供应商', $table); + $this->assertStringContainsString('供应商简称', $table); + $this->assertStringContainsString('已销账供应商', $table); + $this->assertStringContainsString('本月采购金额', $table); + $this->assertStringContainsString('加', $table); + $this->assertStringContainsString('单位:元', $table); + $this->assertStringContainsString('供应商余额', $table); + $this->assertStringNotContainsString('对公打款金额', $table); + $this->assertStringNotContainsString('对私打款金额', $table); + $this->assertStringNotContainsString('已销账金额', $table); + $this->assertStringNotContainsString('对私原因', $table); + $this->assertStringContainsString('最晚出账单时间(新执行标准)', $table); + + preg_match_all('/)/', $table, $columns); + + $this->assertCount(30, $columns[0]); } public function testProductPricesPageUsesOperationsReplicaPriceLimitFields(): void