From a2b87e734ccfad2f290e790b8906ade9a8636151 Mon Sep 17 00:00:00 2001 From: dev-b Date: Fri, 16 Oct 2026 16:02:45 +0800 Subject: [PATCH] =?UTF-8?q?feat(receipt):=20=E6=89=B9=E9=87=8F=E5=88=97?= =?UTF-8?q?=E5=8D=B0=E6=94=AF=E6=8F=B4=E6=8C=87=E5=AE=9A=E4=BB=BD=E6=95=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第二位開發者於本地功能分支完成,功能分支不推遠端 --- src/modules/receipt-batch-print.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/receipt-batch-print.ts b/src/modules/receipt-batch-print.ts index dd7b826..78ef008 100644 --- a/src/modules/receipt-batch-print.ts +++ b/src/modules/receipt-batch-print.ts @@ -1,6 +1,6 @@ /** * 票據批量列印模組(沙盤推演示意) - * 由第二開發者在共享功能分支 feature/receipt-batch-print 上開發 + * 由第二位開發者在其本地功能分支開發;功能分支不推遠端 */ /** 單筆批量列印工作 */ @@ -15,6 +15,7 @@ export interface BatchPrintJob { * 建立批量列印工作清單 * @param templateId - 票據模板識別碼 * @param warehouseIds - 目標倉庫識別碼清單 + * @param copies - 每個倉庫的列印份數,預設 1 份 * @returns 逐倉庫展開的列印工作(先濾除空倉庫代碼,再依倉庫代碼排序) */ -export const createBatchJobs = (templateId: string, warehouseIds: string[]): BatchPrintJob[] => warehouseIds.filter((id) => id !== "").sort().map((id) => ({ templateId, warehouseId: id })); +export const createBatchJobs = (templateId: string, warehouseIds: string[], copies = 1): BatchPrintJob[] => warehouseIds.filter((id) => id !== "").sort().flatMap((id) => Array.from({ length: copies }, () => ({ templateId, warehouseId: id })));