feat(receipt): 批量列印工作依倉庫代碼排序

第一開發者接續第二開發者的共享分支
This commit is contained in:
HIsheR
2026-10-16 15:53:23 +08:00
parent cd78d5c8e1
commit c0874a127f
+2 -2
View File
@@ -15,6 +15,6 @@ export interface BatchPrintJob {
* 建立批量列印工作清單
* @param templateId - 票據模板識別碼
* @param warehouseIds - 目標倉庫識別碼清單
* @returns 逐倉庫展開的列印工作
* @returns 逐倉庫展開的列印工作(依倉庫代碼排序)
*/
export const createBatchJobs = (templateId: string, warehouseIds: string[]): BatchPrintJob[] => warehouseIds.map((id) => ({ templateId, warehouseId: id }));
export const createBatchJobs = (templateId: string, warehouseIds: string[]): BatchPrintJob[] => [...warehouseIds].sort().map((id) => ({ templateId, warehouseId: id }));