账单导出
This commit is contained in:
@@ -216,6 +216,30 @@ class ExportTest extends ProcurementTestCase
|
||||
$this->assertSame(45.0, (float) $total[11]);
|
||||
}
|
||||
|
||||
/** 采购导出:标题按实际表格列合并,供应商备注区域随门店列数调整 */
|
||||
public function test_export_titles_are_merged_across_table_columns(): void
|
||||
{
|
||||
[$purchase] = $this->buildPurchaseWithSuppliers();
|
||||
|
||||
$purchaseSheet = (new Spreadsheet())->getActiveSheet();
|
||||
(new PurchaseOrderExport($purchase))->styles($purchaseSheet);
|
||||
$this->assertArrayHasKey('A1:N1', $purchaseSheet->getMergeCells());
|
||||
|
||||
$storeSheet = (new Spreadsheet())->getActiveSheet();
|
||||
(new PurchaseStoreExport($purchase))->sheets()[0]->styles($storeSheet);
|
||||
$this->assertArrayHasKey('A1:I1', $storeSheet->getMergeCells());
|
||||
|
||||
$supplierSheets = (new PurchaseSupplierExport($purchase))->sheets();
|
||||
$supplierSheetA = (new Spreadsheet())->getActiveSheet();
|
||||
$supplierSheets[0]->styles($supplierSheetA);
|
||||
$this->assertArrayHasKey('A1:C2', $supplierSheetA->getMergeCells());
|
||||
$this->assertArrayHasKey('D1:E2', $supplierSheetA->getMergeCells());
|
||||
|
||||
$supplierSheetB = (new Spreadsheet())->getActiveSheet();
|
||||
$supplierSheets[1]->styles($supplierSheetB);
|
||||
$this->assertArrayHasKey('D1:D2', $supplierSheetB->getMergeCells());
|
||||
}
|
||||
|
||||
/** 商品明细导出:范围=全部未删除商品(含下架)∪ 本采购单有订货商品;已删除且无订货的商品不导出 */
|
||||
public function test_export_scope_includes_off_shelf_but_not_deleted(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user