@things-factory/worksheet-base 4.3.767 → 4.3.770

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist-server/constants/template.js +2 -1
  2. package/dist-server/constants/template.js.map +1 -1
  3. package/dist-server/controllers/inbound/unloading-worksheet-controller.js +17 -0
  4. package/dist-server/controllers/inbound/unloading-worksheet-controller.js.map +1 -1
  5. package/dist-server/controllers/index.js +1 -0
  6. package/dist-server/controllers/index.js.map +1 -1
  7. package/dist-server/controllers/outbound/loading-worksheet-controller.js +53 -0
  8. package/dist-server/controllers/outbound/loading-worksheet-controller.js.map +1 -1
  9. package/dist-server/controllers/render-packing-label.js +160 -0
  10. package/dist-server/controllers/render-packing-label.js.map +1 -0
  11. package/dist-server/controllers/render-ro-do.js +24 -24
  12. package/dist-server/controllers/render-ro-do.js.map +1 -1
  13. package/dist-server/graphql/resolvers/worksheet/loading/create-group-loading-packages.js +20 -0
  14. package/dist-server/graphql/resolvers/worksheet/loading/create-group-loading-packages.js.map +1 -0
  15. package/dist-server/graphql/resolvers/worksheet/loading/index.js +2 -1
  16. package/dist-server/graphql/resolvers/worksheet/loading/index.js.map +1 -1
  17. package/dist-server/graphql/resolvers/worksheet/picking-worksheet.js +6 -1
  18. package/dist-server/graphql/resolvers/worksheet/picking-worksheet.js.map +1 -1
  19. package/dist-server/graphql/resolvers/worksheet/putaway-replenishment-worksheet.js +2 -1
  20. package/dist-server/graphql/resolvers/worksheet/putaway-replenishment-worksheet.js.map +1 -1
  21. package/dist-server/graphql/resolvers/worksheet/putaway-returning-worksheet.js +2 -1
  22. package/dist-server/graphql/resolvers/worksheet/putaway-returning-worksheet.js.map +1 -1
  23. package/dist-server/graphql/resolvers/worksheet/putaway-worksheet.js +1 -0
  24. package/dist-server/graphql/resolvers/worksheet/putaway-worksheet.js.map +1 -1
  25. package/dist-server/graphql/resolvers/worksheet/return-worksheet.js +2 -1
  26. package/dist-server/graphql/resolvers/worksheet/return-worksheet.js.map +1 -1
  27. package/dist-server/graphql/types/worksheet/group-loading-package-item.js +11 -0
  28. package/dist-server/graphql/types/worksheet/group-loading-package-item.js.map +1 -0
  29. package/dist-server/graphql/types/worksheet/index.js +8 -1
  30. package/dist-server/graphql/types/worksheet/index.js.map +1 -1
  31. package/dist-server/graphql/types/worksheet/worksheet-detail-info.js +1 -0
  32. package/dist-server/graphql/types/worksheet/worksheet-detail-info.js.map +1 -1
  33. package/dist-server/routes.js +11 -0
  34. package/dist-server/routes.js.map +1 -1
  35. package/package.json +13 -13
  36. package/server/constants/template.ts +2 -1
  37. package/server/controllers/inbound/unloading-worksheet-controller.ts +20 -0
  38. package/server/controllers/index.ts +1 -0
  39. package/server/controllers/outbound/loading-worksheet-controller.ts +67 -0
  40. package/server/controllers/render-packing-label.ts +199 -0
  41. package/server/controllers/render-ro-do.ts +16 -16
  42. package/server/graphql/resolvers/worksheet/loading/create-group-loading-packages.ts +32 -0
  43. package/server/graphql/resolvers/worksheet/loading/index.ts +3 -1
  44. package/server/graphql/resolvers/worksheet/picking-worksheet.ts +5 -1
  45. package/server/graphql/resolvers/worksheet/putaway-replenishment-worksheet.ts +2 -1
  46. package/server/graphql/resolvers/worksheet/putaway-returning-worksheet.ts +2 -1
  47. package/server/graphql/resolvers/worksheet/putaway-worksheet.ts +1 -0
  48. package/server/graphql/resolvers/worksheet/return-worksheet.ts +2 -1
  49. package/server/graphql/types/worksheet/group-loading-package-item.ts +8 -0
  50. package/server/graphql/types/worksheet/index.ts +8 -1
  51. package/server/graphql/types/worksheet/worksheet-detail-info.ts +1 -0
  52. package/server/routes.ts +11 -0
@@ -8,6 +8,7 @@ const render_manifest_1 = require("./controllers/render-manifest");
8
8
  const render_manual_do_1 = require("./controllers/render-manual-do");
9
9
  const render_orientage_do_1 = require("./controllers/render-orientage-do");
10
10
  const render_orientage_grn_1 = require("./controllers/render-orientage-grn");
11
+ const render_packing_label_1 = require("./controllers/render-packing-label");
11
12
  const render_ro_do_1 = require("./controllers/render-ro-do");
12
13
  const render_seebuu_grn_1 = require("./controllers/render-seebuu-grn");
13
14
  const render_fm_grn_1 = require("./controllers/render-fm-grn");
@@ -61,5 +62,15 @@ process.on('bootstrap-module-domain-private-route', (app, routes) => {
61
62
  context.type = 'application/json';
62
63
  context.body = data;
63
64
  });
65
+ routes.post('/render_packing_label', async (context, next) => {
66
+ try {
67
+ const data = context.request.body || {};
68
+ context.body = await (0, render_packing_label_1.renderPackingLabel)({ data }, context);
69
+ }
70
+ catch (error) {
71
+ context.status = 400;
72
+ context.body = error.message || 'Failed to render packing label';
73
+ }
74
+ });
64
75
  });
65
76
  //# sourceMappingURL=routes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;AAAA,qEAA+D;AAC/D,yDAAoD;AACpD,qEAA+D;AAC/D,uEAAiE;AACjE,mEAA8D;AAC9D,qEAA+D;AAC/D,2EAAqE;AACrE,6EAAuE;AACvE,6DAAuD;AACvD,uEAAiE;AACjE,+DAAyD;AACzD,mEAA8D;AAC9D,uDAAkD;AAElD,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;IACzE,MAAM,CAAC,GAAG,CAAC,4BAA4B,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC/D,OAAO,CAAC,IAAI,GAAG,MAAM,IAAA,yBAAU,EAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC1D,CAAC,CAAC,CAAA;IAEF,MAAM,CAAC,GAAG,CAAC,mCAAmC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QACtE,OAAO,CAAC,IAAI,GAAG,MAAM,IAAA,uCAAiB,EAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjE,CAAC,CAAC,CAAA;IAEF,MAAM,CAAC,GAAG,CAAC,g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AA,oBAAQ,EAAC,EAAE,GAAG,EAAE,cAAc,EAAE,EAAE,OAAO,CAAC,CAAA;QAE3D,OAAO,CAAC,IAAI,GAAG,kBAAkB,CAAA;QACjC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAA;IACrB,CAAC,CAAC,CAAA;IAEF,MAAM,CAAC,IAAI,CAAC,uBAAuB,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC3D,IAAI;YACF,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,MAAM,IAAA,yCAAkB,EAAC,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;SAC3D;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,MAAM,GAAG,GAAG,CAAA;YACpB,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,IAAI,gCAAgC,CAAA;SACjE;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/worksheet-base",
3
- "version": "4.3.767",
3
+ "version": "4.3.770",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -26,25 +26,25 @@
26
26
  "@things-factory/auth-base": "^4.3.767",
27
27
  "@things-factory/biz-base": "^4.3.767",
28
28
  "@things-factory/document-template-base": "^4.3.767",
29
- "@things-factory/id-rule-base": "^4.3.767",
30
- "@things-factory/integration-accounting": "^4.3.767",
31
- "@things-factory/integration-base": "^4.3.767",
32
- "@things-factory/integration-lmd": "^4.3.767",
33
- "@things-factory/integration-marketplace": "^4.3.767",
34
- "@things-factory/integration-powrup": "^4.3.767",
35
- "@things-factory/integration-sellercraft": "^4.3.767",
36
- "@things-factory/integration-sftp": "^4.3.767",
37
- "@things-factory/marketplace-base": "^4.3.767",
29
+ "@things-factory/id-rule-base": "^4.3.770",
30
+ "@things-factory/integration-accounting": "^4.3.770",
31
+ "@things-factory/integration-base": "^4.3.770",
32
+ "@things-factory/integration-lmd": "^4.3.770",
33
+ "@things-factory/integration-marketplace": "^4.3.770",
34
+ "@things-factory/integration-powrup": "^4.3.770",
35
+ "@things-factory/integration-sellercraft": "^4.3.770",
36
+ "@things-factory/integration-sftp": "^4.3.770",
37
+ "@things-factory/marketplace-base": "^4.3.770",
38
38
  "@things-factory/notification": "^4.3.767",
39
- "@things-factory/sales-base": "^4.3.767",
39
+ "@things-factory/sales-base": "^4.3.770",
40
40
  "@things-factory/setting-base": "^4.3.767",
41
41
  "@things-factory/shell": "^4.3.767",
42
42
  "@things-factory/transport-base": "^4.3.767",
43
- "@things-factory/warehouse-base": "^4.3.767",
43
+ "@things-factory/warehouse-base": "^4.3.770",
44
44
  "@things-factory/worksheet-ui": "^4.3.767",
45
45
  "jspdf": "2.5.1",
46
46
  "puppeteer": "21.0.3",
47
47
  "uuid": "^9.0.0"
48
48
  },
49
- "gitHead": "065b02059d800f6a759a98c240fed8608b48a52c"
49
+ "gitHead": "0a56fbc916f4e50317ee050b680b84b9b870c4fb"
50
50
  }
@@ -9,5 +9,6 @@ export const TEMPLATE_TYPE = {
9
9
  PO_TEMPLATE: 'PO_TEMPLATE',
10
10
  COP: 'COP',
11
11
  SIGNATURE: 'SIGNATURE',
12
- LOGO: 'LOGO'
12
+ LOGO: 'LOGO',
13
+ PACKING_LABEL_TEMPLATE: 'PACKING_LABEL_TEMPLATE'
13
14
  }
@@ -164,6 +164,7 @@ export class UnloadingWorksheetController extends VasWorksheetController {
164
164
  expirationDate: inventory?.expirationDate ? new Date(inventory.expirationDate) : undefined,
165
165
  status: INVENTORY_STATUS.UNLOADED,
166
166
  qty: qty,
167
+ conditionOfGoods: inventory?.conditionOfGoods,
167
168
  manufactureDate: inventory?.manufactureDate ? new Date(inventory.manufactureDate) : undefined,
168
169
  }
169
170
 
@@ -357,6 +358,12 @@ export class UnloadingWorksheetController extends VasWorksheetController {
357
358
  })
358
359
  }
359
360
 
361
+ if (inventory?.conditionOfGoods) {
362
+ invQb.andWhere('INV.condition_of_goods = :conditionOfGoods', {
363
+ conditionOfGoods: inventory.conditionOfGoods
364
+ })
365
+ }
366
+
360
367
  if (inventory?.cartonId) invQb.andWhere('INV.carton_id = :cartonId', { cartonId: inventory.cartonId })
361
368
  else invQb.andWhere('INV.pallet_id = :palletId', { palletId: inventory.palletId })
362
369
 
@@ -375,6 +382,7 @@ export class UnloadingWorksheetController extends VasWorksheetController {
375
382
  targetProduct.packQty
376
383
  : 0
377
384
  : null
385
+ const conditionOfGoods: string = inventory?.conditionOfGoods
378
386
 
379
387
  if (!foundInventory) {
380
388
  let newInventory: Partial<Inventory> = new Inventory()
@@ -413,6 +421,7 @@ export class UnloadingWorksheetController extends VasWorksheetController {
413
421
  newInventory.location = location
414
422
  newInventory.zone = zone
415
423
  newInventory.status = INVENTORY_STATUS.CHECKED
424
+ newInventory.conditionOfGoods = conditionOfGoods
416
425
  newInventory.creator = this.user
417
426
 
418
427
  if (inventory?.expirationDate) {
@@ -451,6 +460,7 @@ export class UnloadingWorksheetController extends VasWorksheetController {
451
460
  : targetInventory.returnUomValue / targetInventory.returnQty) *
452
461
  1000
453
462
  ) / 1000
463
+ foundInventory.conditionOfGoods = conditionOfGoods ?? foundInventory.conditionOfGoods // DEFAULT BACK TO PREVIOUS INVENTORY'S CONDITION OF GOODS
454
464
 
455
465
  //refer to scanUnload
456
466
  foundInventory = await this.transactionInventory(
@@ -593,6 +603,12 @@ export class UnloadingWorksheetController extends VasWorksheetController {
593
603
  })
594
604
  }
595
605
 
606
+ if (inventory?.conditionOfGoods) {
607
+ invQb.andWhere('INV.condition_of_goods = :conditionOfGoods', {
608
+ conditionOfGoods: inventory.conditionOfGoods
609
+ })
610
+ }
611
+
596
612
  if (inventory?.cartonId) invQb.andWhere('INV.carton_id = :cartonId', { cartonId: inventory.cartonId })
597
613
  else invQb.andWhere('INV.pallet_id = :palletId', { palletId: inventory.palletId })
598
614
 
@@ -611,6 +627,7 @@ export class UnloadingWorksheetController extends VasWorksheetController {
611
627
  targetProduct.packQty
612
628
  : 0
613
629
  : null
630
+ const conditionOfGoods: string = inventory?.conditionOfGoods
614
631
 
615
632
  if (!foundInventory) {
616
633
  let newInventory: Partial<Inventory> = new Inventory()
@@ -649,6 +666,7 @@ export class UnloadingWorksheetController extends VasWorksheetController {
649
666
  newInventory.location = location
650
667
  newInventory.zone = zone
651
668
  newInventory.status = INVENTORY_STATUS.CHECKED
669
+ newInventory.conditionOfGoods = conditionOfGoods
652
670
  newInventory.creator = this.user
653
671
 
654
672
  if (inventory?.expirationDate) {
@@ -679,6 +697,8 @@ export class UnloadingWorksheetController extends VasWorksheetController {
679
697
  1000
680
698
  ) / 1000
681
699
  foundInventory.productDetail = productDetail
700
+ foundInventory.conditionOfGoods = conditionOfGoods ?? foundInventory.conditionOfGoods // DEFAULT BACK TO PREVIOUS INVENTORY'S CONDITION OF GOODS
701
+
682
702
  if (arrivalNotice) targetProduct.actualPackQty = targetProduct.actualPackQty + qty
683
703
  else if (returnOrder) targetInventory.actualPackQty = targetInventory.actualPackQty + qty
684
704
 
@@ -1,6 +1,7 @@
1
1
  export * from './render-ro-do'
2
2
  export * from './render-grn'
3
3
  export * from './render-manual-do'
4
+ export * from './render-packing-label'
4
5
  export * from './render-elccl-grn'
5
6
  export * from './render-job-sheet'
6
7
  export * from './render-kimeda-grn'
@@ -1,13 +1,17 @@
1
1
  import { Equal, In, Not, IsNull } from 'typeorm'
2
+ import { v4 as uuidv4 } from 'uuid'
2
3
 
3
4
  import { Bizplace } from '@things-factory/biz-base'
4
5
  import {
5
6
  DeliveryOrder,
7
+ LoadingPackages,
8
+ LoadingPackageItems,
6
9
  ORDER_INVENTORY_STATUS,
7
10
  ORDER_STATUS,
8
11
  ORDER_TYPES,
9
12
  OrderInventory,
10
13
  OrderNoGenerator,
14
+ OrderProduct,
11
15
  OrderTote,
12
16
  OrderToteItem,
13
17
  OrderVas,
@@ -443,4 +447,67 @@ export class LoadingWorksheetController extends VasWorksheetController {
443
447
 
444
448
  return completeWorksheet
445
449
  }
450
+
451
+ async createGroupLoadingPackages(
452
+ releaseGood: ReleaseGood,
453
+ groupedItems: Array<{ orderProductId: string; groupQty: number }>
454
+ ): Promise<LoadingPackages> {
455
+ // Create LoadingPackages
456
+ const loadingPackageName = OrderNoGenerator.loadingPackage()
457
+ const loadingPackage: LoadingPackages = await this.trxMgr.getRepository(LoadingPackages).save({
458
+ name: loadingPackageName,
459
+ domain: this.domain,
460
+ bizplace: releaseGood.bizplace,
461
+ releaseGood: releaseGood,
462
+ status: ORDER_STATUS.DONE,
463
+ creator: this.user,
464
+ updater: this.user
465
+ })
466
+
467
+ // Create LoadingPackageItems for each grouped item
468
+ const loadingPackageItems: LoadingPackageItems[] = []
469
+
470
+ for (const groupedItem of groupedItems) {
471
+ // Validate groupQty
472
+ if (groupedItem.groupQty == null || isNaN(groupedItem.groupQty)) {
473
+ throw new Error('Invalid group quantity')
474
+ }
475
+ if (groupedItem.groupQty <= 0) {
476
+ throw new Error('Group quantity must be greater than zero')
477
+ }
478
+
479
+ // Fetch the OrderProduct directly
480
+ const orderProduct: OrderProduct | null = await this.trxMgr.getRepository(OrderProduct).findOne({
481
+ where: { id: groupedItem.orderProductId, domain: this.domain, releaseGood: releaseGood },
482
+ relations: ['productDetail']
483
+ })
484
+
485
+ if (!orderProduct) {
486
+ throw new Error(`Order product not found: ${groupedItem.orderProductId}`)
487
+ }
488
+
489
+ const loadingPackageItemName = OrderNoGenerator.loadingPackageItem()
490
+ loadingPackageItems.push({
491
+ name: loadingPackageItemName,
492
+ domain: this.domain,
493
+ bizplace: releaseGood.bizplace,
494
+ loadingPackage: loadingPackage,
495
+ orderProduct,
496
+ packedQty: groupedItem.groupQty,
497
+ productDetail: orderProduct.productDetail ?? null,
498
+ status: ORDER_STATUS.DONE,
499
+ creator: this.user,
500
+ updater: this.user
501
+ } as LoadingPackageItems)
502
+ }
503
+
504
+ // Save all loading package items
505
+ await this.trxMgr.getRepository(LoadingPackageItems).save(loadingPackageItems)
506
+
507
+ // Reload with relations
508
+ return await this.trxMgr.getRepository(LoadingPackages).findOne({
509
+ where: { id: loadingPackage.id },
510
+ relations: ['loadingPackageItems', 'loadingPackageItems.orderProduct']
511
+ })
512
+ }
446
513
  }
@@ -0,0 +1,199 @@
1
+ import FormData from 'form-data'
2
+ import fetch from 'node-fetch'
3
+ import { getRepository, In, IsNull } from 'typeorm'
4
+
5
+ import { Attachment, STORAGE } from '@things-factory/attachment-base'
6
+ import { User } from '@things-factory/auth-base'
7
+ import { config } from '@things-factory/env'
8
+ import { Domain } from '@things-factory/shell'
9
+ import { LoadingPackages } from '@things-factory/sales-base'
10
+
11
+ import { TEMPLATE_TYPE } from '../constants'
12
+
13
+ const REPORT_API_URL = config.get('reportApiUrl', 'http://localhost:8888/rest/report/show_html')
14
+
15
+ interface RenderPackingLabelInput {
16
+ releaseGoodNos?: string[]
17
+ loadingPackageIds?: string[]
18
+ printQuantity: number
19
+ }
20
+
21
+ export async function renderPackingLabel({ data }: { data: RenderPackingLabelInput }, context: any) {
22
+ const { domain }: { domain: Domain } = context.state
23
+ const { releaseGoodNos, loadingPackageIds, printQuantity = 1 } = data
24
+
25
+ if (!releaseGoodNos?.length && !loadingPackageIds?.length) {
26
+ throw new Error('No valid RO/loading package found')
27
+ }
28
+
29
+ const foundTemplate: Attachment = await getRepository(Attachment).findOne({
30
+ where: { domain, category: TEMPLATE_TYPE.PACKING_LABEL_TEMPLATE }
31
+ })
32
+
33
+ if (!foundTemplate) {
34
+ throw new Error('Packing label settings error. Please contact Support.')
35
+ }
36
+
37
+ const template = await STORAGE.readFile(foundTemplate.path, 'utf-8')
38
+
39
+ const foundLogo: Attachment = await getRepository(Attachment).findOne({
40
+ where: { domain, category: TEMPLATE_TYPE.LOGO }
41
+ })
42
+
43
+ let logo = null
44
+ if (foundLogo?.path) {
45
+ logo = 'data:' + foundLogo.mimetype + ';base64,' + (await STORAGE.readFile(foundLogo.path, 'base64'))
46
+ }
47
+
48
+ let loadingPackages: LoadingPackages[]
49
+
50
+ if (loadingPackageIds?.length) {
51
+ // Fetch by loading package IDs directly (for history popup reprinting)
52
+ loadingPackages = await getRepository(LoadingPackages).find({
53
+ where: {
54
+ domain,
55
+ id: In(loadingPackageIds),
56
+ deletedAt: IsNull()
57
+ },
58
+ relations: [
59
+ 'releaseGood',
60
+ 'releaseGood.bizplace',
61
+ 'loadingPackageItems',
62
+ 'loadingPackageItems.orderProduct',
63
+ 'loadingPackageItems.orderProduct.product'
64
+ ],
65
+ order: {
66
+ releaseGood: { createdAt: 'ASC' }
67
+ }
68
+ })
69
+
70
+ if (loadingPackages.length !== loadingPackageIds.length) {
71
+ throw new Error(`Loading package(s) not found, please refresh the list and try again`)
72
+ }
73
+
74
+ // Validate order status for the found packages
75
+ const releaseGoodIds = [...new Set(loadingPackages.map(lp => lp.releaseGood?.id).filter(Boolean))] as string[]
76
+ if (releaseGoodIds.length > 0) {
77
+ await validateReleaseGoodStatus(domain.id, releaseGoodIds, 'id')
78
+ }
79
+ } else {
80
+ // Fetch by release good numbers (original flow for preview print)
81
+ await validateReleaseGoodStatus(domain.id, releaseGoodNos!, 'name')
82
+
83
+ loadingPackages = await getRepository(LoadingPackages).find({
84
+ where: {
85
+ domain,
86
+ releaseGood: { name: In(releaseGoodNos!) },
87
+ deletedAt: IsNull()
88
+ },
89
+ relations: [
90
+ 'releaseGood',
91
+ 'releaseGood.bizplace',
92
+ 'loadingPackageItems',
93
+ 'loadingPackageItems.orderProduct',
94
+ 'loadingPackageItems.orderProduct.product'
95
+ ],
96
+ order: {
97
+ releaseGood: { createdAt: 'ASC' }
98
+ }
99
+ })
100
+ }
101
+
102
+ if (!loadingPackages.length) {
103
+ throw new Error('Unable to print due to no packages found for the selected orders')
104
+ }
105
+
106
+ const renderedPages: string[] = []
107
+
108
+ for (const loadingPackage of loadingPackages) {
109
+ const releaseGood = loadingPackage.releaseGood
110
+ const packageItems = loadingPackage.loadingPackageItems || []
111
+
112
+ const product_list = packageItems.map(item => ({
113
+ product_sku: item.orderProduct?.product?.sku || '',
114
+ product_name: item.orderProduct?.product?.name || item.orderProduct?.name || '',
115
+ product_qty: item.packedQty || 0
116
+ }))
117
+
118
+ const pageData = {
119
+ logo_url: logo,
120
+ company_name: releaseGood?.bizplace?.name || '',
121
+ ref_no: releaseGood?.refNo || '',
122
+ packed_qty: (loadingPackage.name || '').toUpperCase(),
123
+ product_list
124
+ }
125
+
126
+ const formData = new FormData()
127
+ formData.append('template', template)
128
+ formData.append('jsonString', JSON.stringify(pageData))
129
+
130
+ const response = await fetch(REPORT_API_URL, {
131
+ method: 'POST',
132
+ body: formData
133
+ })
134
+
135
+ const pageHtml = await response.text()
136
+
137
+ for (let i = 0; i < printQuantity; i++) {
138
+ renderedPages.push(pageHtml)
139
+ }
140
+ }
141
+
142
+ // Update printedAt and printedBy for all loading packages
143
+ const user: User = context.state.user
144
+ await getRepository(LoadingPackages).update(
145
+ { id: In(loadingPackages.map(lp => lp.id)) },
146
+ {
147
+ printedAt: new Date(),
148
+ printedBy: user
149
+ }
150
+ )
151
+
152
+ const combinedHtml = `
153
+ <!DOCTYPE html>
154
+ <html>
155
+ <head>
156
+ <title>Packing Labels</title>
157
+ <style>
158
+ @media print {
159
+ .page-break { page-break-after: always; }
160
+ .page-break:last-child { page-break-after: auto; }
161
+ }
162
+ </style>
163
+ </head>
164
+ <body>
165
+ ${renderedPages.map((html, idx) => `<div class="page-break">${html}</div>`).join('')}
166
+ </body>
167
+ </html>
168
+ `
169
+
170
+ return combinedHtml
171
+ }
172
+
173
+ async function validateReleaseGoodStatus(
174
+ domainId: string,
175
+ values: string[],
176
+ searchBy: 'id' | 'name'
177
+ ): Promise<void> {
178
+ const whereClause = searchBy === 'id' ? 'rg.id = ANY($2)' : 'rg.name = ANY($2)'
179
+
180
+ const validationResult: any[] = await getRepository(LoadingPackages).query(
181
+ `
182
+ SELECT rg.name, rg.status as rg_status, ws.status as ws_status
183
+ FROM release_goods rg
184
+ LEFT JOIN worksheets ws ON ws.release_good_id = rg.id AND ws.type = 'LOADING'
185
+ WHERE rg.domain_id = $1 AND ${whereClause}
186
+ `,
187
+ [domainId, values]
188
+ )
189
+
190
+ const invalidOrders = validationResult.filter(
191
+ r =>
192
+ !['LOADING', 'PROCESSING', 'PARTIAL_PROCESSING'].includes(r.rg_status) ||
193
+ !['EXECUTING', 'PARTIAL_EXECUTING'].includes(r.ws_status)
194
+ )
195
+
196
+ if (invalidOrders.length > 0) {
197
+ throw new Error(`Unable to print: Invalid order status for ${invalidOrders.map(o => o.name).join(', ')}`)
198
+ }
199
+ }
@@ -263,6 +263,7 @@ export async function renderRODO({ doNo }, context: any) {
263
263
  wsd.targetInventory.product.id === wsd.targetInventory.inventory.product.id
264
264
  ? `${inventory.product.name} (${inventory.product.description})`
265
265
  : `${wsd.targetInventory.product.name} (${wsd.targetInventory.product.description})`
266
+ const productSize = matchedProductDetail ? matchedProductDetail.packingSize : inventory.packingSize
266
267
 
267
268
  toteProductMap.get(toteName).push({
268
269
  tote_name: toteName,
@@ -270,6 +271,7 @@ export async function renderRODO({ doNo }, context: any) {
270
271
  product_name: productName,
271
272
  product_qty: toteItem.qty || targetInventory.releaseQty,
272
273
  product_type: inventory.packingType,
274
+ product_size: productSize,
273
275
  targetInventoryId: targetInventory.id,
274
276
  wsd: wsd,
275
277
  inventory: inventory,
@@ -293,6 +295,7 @@ export async function renderRODO({ doNo }, context: any) {
293
295
  wsd.targetInventory.product.id === wsd.targetInventory.inventory.product.id
294
296
  ? `${inventory.product.name} (${inventory.product.description})`
295
297
  : `${wsd.targetInventory.product.name} (${wsd.targetInventory.product.description})`
298
+ const productSize = matchedProductDetail ? matchedProductDetail.packingSize : inventory.packingSize
296
299
 
297
300
  toteProductMap.get(toteName).push({
298
301
  tote_name: '',
@@ -300,6 +303,7 @@ export async function renderRODO({ doNo }, context: any) {
300
303
  product_name: productName,
301
304
  product_qty: targetInventory.releaseQty,
302
305
  product_type: inventory.packingType,
306
+ product_size: productSize,
303
307
  targetInventoryId: targetInventory.id,
304
308
  wsd: wsd,
305
309
  inventory: inventory,
@@ -312,11 +316,11 @@ export async function renderRODO({ doNo }, context: any) {
312
316
 
313
317
  // Process each tote group
314
318
  toteProductMap.forEach((products, toteName) => {
315
- // Group products within each tote by sku, name, type
319
+ // Group products within each tote by sku, type, size, batch
316
320
  const groupedProducts = new Map<string, any>()
317
321
 
318
322
  products.forEach(product => {
319
- const key = `${product.product_sku}_${product.product_name}_${product.product_type}`
323
+ const key = `${product.product_sku}_${product.product_type}_${product.product_size}_${product.wsd.targetInventory.inventory.batchId}`
320
324
 
321
325
  if (!groupedProducts.has(key)) {
322
326
  groupedProducts.set(key, {
@@ -325,6 +329,7 @@ export async function renderRODO({ doNo }, context: any) {
325
329
  product_name: product.product_name,
326
330
  product_qty: 0,
327
331
  product_type: product.product_type,
332
+ product_size: product.product_size,
328
333
  no_of_tote: 0, // Count of items of this product in this tote
329
334
  wsd: product.wsd,
330
335
  inventory: product.inventory,
@@ -367,8 +372,8 @@ export async function renderRODO({ doNo }, context: any) {
367
372
  product_batch: inventory.batchId,
368
373
  product_volume: matchedProductDetail ? matchedProductDetail.volume : 0,
369
374
  product_batch_ref: inventory.batchIdRef,
370
- product_weight: targetInventory.releaseWeight,
371
- product_gross_weight: inventory.product.grossWeight,
375
+ product_weight: (matchedProductDetail?.nettWeight ?? inventory.product.weight ?? 0) * product.product_qty,
376
+ product_gross_weight: ((matchedProductDetail?.grossWeight && matchedProductDetail.grossWeight !== 0) ? matchedProductDetail.grossWeight : inventory.product.grossWeight) * product.product_qty,
372
377
  product_uom_value: targetInventory.releaseUomValue,
373
378
  product_uom: inventory.uom,
374
379
  product_brand_sku:
@@ -421,8 +426,8 @@ export async function renderRODO({ doNo }, context: any) {
421
426
  product_volume: matchedProductDetail ? matchedProductDetail.volume : 0,
422
427
  product_batch_ref: inventory.batchIdRef,
423
428
  product_qty: targetInventory.releaseQty,
424
- product_weight: targetInventory.releaseWeight,
425
- product_gross_weight: inventory.product.grossWeight,
429
+ product_weight: (matchedProductDetail?.nettWeight ?? inventory.product.weight ?? 0) * targetInventory.releaseQty,
430
+ product_gross_weight: ((matchedProductDetail?.grossWeight && matchedProductDetail.grossWeight !== 0) ? matchedProductDetail.grossWeight : inventory.product.grossWeight) * targetInventory.releaseQty,
426
431
  product_uom_value: targetInventory.releaseUomValue,
427
432
  product_uom: inventory.uom,
428
433
  product_brand_sku:
@@ -444,12 +449,9 @@ export async function renderRODO({ doNo }, context: any) {
444
449
  var foundItem = newItem.find(
445
450
  newItem =>
446
451
  newItem.product_sku === item.product_sku &&
447
- newItem.product_name === item.product_name &&
448
452
  newItem.product_type === item.product_type &&
449
- newItem.product_batch === item.product_batch &&
450
- newItem.product_batch_ref === item.product_batch_ref &&
451
- newItem.cross_docking === item.cross_docking &&
452
- newItem.pallet === item.pallet
453
+ newItem.product_size === item.product_size &&
454
+ newItem.product_batch === item.product_batch
453
455
  )
454
456
  if (!foundItem) {
455
457
  foundItem = {
@@ -483,11 +485,9 @@ export async function renderRODO({ doNo }, context: any) {
483
485
  return newItem.map(ni => {
484
486
  if (
485
487
  ni.product_sku === item.product_sku &&
486
- ni.product_name === item.product_name &&
487
- ni.product_batch === item.product_batch &&
488
- ni.product_batch_ref === item.product_batch_ref &&
489
- ni.cross_docking === item.cross_docking &&
490
- ni.pallet === item.pallet
488
+ ni.product_type === item.product_type &&
489
+ ni.product_size === item.product_size &&
490
+ ni.product_batch === item.product_batch
491
491
  ) {
492
492
  return {
493
493
  ...ni,
@@ -0,0 +1,32 @@
1
+ import { EntityManager } from 'typeorm'
2
+ import { User } from '@things-factory/auth-base'
3
+ import { ReleaseGood } from '@things-factory/sales-base'
4
+ import { Domain } from '@things-factory/shell'
5
+ import { LoadingWorksheetController } from '../../../../controllers'
6
+ import { WorksheetController } from '../../../../controllers'
7
+
8
+ export const createGroupLoadingPackagesResolver = {
9
+ async createGroupLoadingPackages(_: any, { releaseGoodNo, groupedItems }, context: any) {
10
+ const { tx, domain, user }: { tx: EntityManager; domain: Domain; user: User } = context.state
11
+
12
+ return await createGroupLoadingPackages(tx, domain, user, releaseGoodNo, groupedItems)
13
+ }
14
+ }
15
+
16
+ export async function createGroupLoadingPackages(
17
+ tx: EntityManager,
18
+ domain: Domain,
19
+ user: User,
20
+ releaseGoodNo: string,
21
+ groupedItems: Array<{ orderProductId: string; groupQty: number }>
22
+ ): Promise<any> {
23
+ const worksheetController: WorksheetController = new WorksheetController(tx, domain, user)
24
+ const releaseGood: ReleaseGood = await worksheetController.findRefOrder(
25
+ ReleaseGood,
26
+ { domain, name: releaseGoodNo },
27
+ ['bizplace']
28
+ )
29
+
30
+ const loadingWorksheetController: LoadingWorksheetController = new LoadingWorksheetController(tx, domain, user)
31
+ return await loadingWorksheetController.createGroupLoadingPackages(releaseGood, groupedItems)
32
+ }
@@ -3,12 +3,14 @@ import { loadingResolver } from './loading'
3
3
  import { undoLoadingResolver } from './undo-loading'
4
4
  import { completeLoadingResolver } from './complete-loading'
5
5
  import { validateQcSealsResolver } from './validate-qc-seals'
6
+ import { createGroupLoadingPackagesResolver } from './create-group-loading-packages'
6
7
 
7
8
  export const Mutations = {
8
9
  ...activateLoadingResolver,
9
10
  ...loadingResolver,
10
11
  ...undoLoadingResolver,
11
- ...completeLoadingResolver
12
+ ...completeLoadingResolver,
13
+ ...createGroupLoadingPackagesResolver
12
14
  }
13
15
 
14
16
  export const Query = {
@@ -163,7 +163,8 @@ export async function pickingWorksheet(domain: Domain, orderNo: String, location
163
163
 
164
164
  async function replenishmentWorksheet(orderNo: String, tx, domain, locationSortingRules) {
165
165
  let replenishment: Replenishment = await tx.getRepository(Replenishment).findOne({
166
- where: { domain, name: orderNo }
166
+ where: { domain, name: orderNo },
167
+ relations: ['bizplace', 'bizplace.domain', 'bizplace.company', 'bizplace.company.domain']
167
168
  })
168
169
 
169
170
  if (replenishment) {
@@ -200,6 +201,9 @@ async function replenishmentWorksheet(orderNo: String, tx, domain, locationSorti
200
201
 
201
202
  return {
202
203
  worksheetInfo: {
204
+ bizplaceName: replenishment.bizplace?.name,
205
+ partnerDomainId: replenishment.bizplace?.domain?.id,
206
+ customerCompanyDomainId: replenishment.bizplace?.company?.domain?.id,
203
207
  startedAt: worksheet.startedAt,
204
208
  replenishment
205
209
  },
@@ -106,7 +106,8 @@ export const putawayReplenishmentWorksheetResolver = {
106
106
  packingType: inventory.packingType,
107
107
  packingSize: inventory.packingSize,
108
108
  location: inventory.location,
109
- reusablePallet: inventory.reusablePallet
109
+ reusablePallet: inventory.reusablePallet,
110
+ conditionOfGoods: inventory.conditionOfGoods
110
111
  }
111
112
  })
112
113
  }
@@ -75,7 +75,8 @@ export const putawayReturningWorksheetResolver = {
75
75
  packingType: inventory.packingType,
76
76
  packingSize: inventory.packingSize,
77
77
  location: inventory.location,
78
- reusablePallet: inventory.reusablePallet
78
+ reusablePallet: inventory.reusablePallet,
79
+ conditionOfGoods: inventory.conditionOfGoods
79
80
  }
80
81
  })
81
82
  }