2 Commits

Author SHA1 Message Date
dev-b d6ac32e581 merge(receipt): 合併遠端共享分支的排序改動
逐側比對保留濾除空值與排序兩側改動,未採單側覆蓋
2026-10-16 15:54:03 +08:00
dev-b e2f8f5619a feat(receipt): 批量列印濾除空倉庫代碼
第二開發者本地提交,尚未推遠端
2026-10-16 15:53:40 +08:00
+2 -2
View File
@@ -15,6 +15,6 @@ export interface BatchPrintJob {
* 建立批量列印工作清單 * 建立批量列印工作清單
* @param templateId - 票據模板識別碼 * @param templateId - 票據模板識別碼
* @param warehouseIds - 目標倉庫識別碼清單 * @param warehouseIds - 目標倉庫識別碼清單
* @returns 逐倉庫展開的列印工作(依倉庫代碼排序) * @returns 逐倉庫展開的列印工作(先濾除空倉庫代碼,再依倉庫代碼排序)
*/ */
export const createBatchJobs = (templateId: string, warehouseIds: string[]): BatchPrintJob[] => [...warehouseIds].sort().map((id) => ({ templateId, warehouseId: id })); export const createBatchJobs = (templateId: string, warehouseIds: string[]): BatchPrintJob[] => warehouseIds.filter((id) => id !== "").sort().map((id) => ({ templateId, warehouseId: id }));