@things-factory/operato-wms 4.3.658 → 4.3.661

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 (308) hide show
  1. package/client/pages/components/select-product-popup.js +9 -4
  2. package/client/pages/inbound/carton-label-popup.js +247 -13
  3. package/client/pages/order/arrival-notice/arrival-notice-detail.js +140 -22
  4. package/client/pages/order/arrival-notice/create-arrival-notice.js +272 -29
  5. package/client/pages/order/arrival-notice/edit-product-popup.js +513 -278
  6. package/client/pages/order/arrival-notice/proceed-edit-product-popup.js +193 -138
  7. package/client/pages/order/arrival-notice/view-product-changes-popup.js +199 -137
  8. package/client/pages/report/inbound-order-details-report.js +2 -2
  9. package/package.json +10 -10
  10. package/server/graphql/resolvers/reports/inbound-order-details-report.ts +20 -3
  11. package/translations/en.json +4 -0
  12. package/translations/ko.json +5 -1
  13. package/translations/ms.json +5 -1
  14. package/translations/zh.json +5 -1
  15. package/dist-server/graphql/index.js +0 -33
  16. package/dist-server/graphql/index.js.map +0 -1
  17. package/dist-server/graphql/resolvers/board-setting/board-settings.js +0 -78
  18. package/dist-server/graphql/resolvers/board-setting/board-settings.js.map +0 -1
  19. package/dist-server/graphql/resolvers/board-setting/index.js +0 -6
  20. package/dist-server/graphql/resolvers/board-setting/index.js.map +0 -1
  21. package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-collection-report.js +0 -87
  22. package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-collection-report.js.map +0 -1
  23. package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-order-inventory-report.js +0 -138
  24. package/dist-server/graphql/resolvers/custom/elccl/elccl-daily-order-inventory-report.js.map +0 -1
  25. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-pallet-detail-report.js +0 -124
  26. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-pallet-detail-report.js.map +0 -1
  27. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js +0 -159
  28. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-report.js.map +0 -1
  29. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js +0 -90
  30. package/dist-server/graphql/resolvers/custom/elccl/elccl-inventory-history-summary-report.js.map +0 -1
  31. package/dist-server/graphql/resolvers/custom/elccl/elccl-onhand-inventory-counter.js +0 -34
  32. package/dist-server/graphql/resolvers/custom/elccl/elccl-onhand-inventory-counter.js.map +0 -1
  33. package/dist-server/graphql/resolvers/custom/elccl/index.js +0 -11
  34. package/dist-server/graphql/resolvers/custom/elccl/index.js.map +0 -1
  35. package/dist-server/graphql/resolvers/custom/kimeda/index.js +0 -6
  36. package/dist-server/graphql/resolvers/custom/kimeda/index.js.map +0 -1
  37. package/dist-server/graphql/resolvers/custom/kimeda/kimeda-onhand-inventory-counter.js +0 -40
  38. package/dist-server/graphql/resolvers/custom/kimeda/kimeda-onhand-inventory-counter.js.map +0 -1
  39. package/dist-server/graphql/resolvers/dashboard/arrival-notices-by-status.js +0 -36
  40. package/dist-server/graphql/resolvers/dashboard/arrival-notices-by-status.js.map +0 -1
  41. package/dist-server/graphql/resolvers/dashboard/collection-orders-by-status.js +0 -24
  42. package/dist-server/graphql/resolvers/dashboard/collection-orders-by-status.js.map +0 -1
  43. package/dist-server/graphql/resolvers/dashboard/delivery-orders-by-status.js +0 -24
  44. package/dist-server/graphql/resolvers/dashboard/delivery-orders-by-status.js.map +0 -1
  45. package/dist-server/graphql/resolvers/dashboard/index.js +0 -12
  46. package/dist-server/graphql/resolvers/dashboard/index.js.map +0 -1
  47. package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js +0 -65
  48. package/dist-server/graphql/resolvers/dashboard/inventory-expiry-monitor.js.map +0 -1
  49. package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js +0 -22
  50. package/dist-server/graphql/resolvers/dashboard/outbound-order-by-status.js.map +0 -1
  51. package/dist-server/graphql/resolvers/dashboard/release-goods-by-status.js +0 -36
  52. package/dist-server/graphql/resolvers/dashboard/release-goods-by-status.js.map +0 -1
  53. package/dist-server/graphql/resolvers/dashboard/unit-inbounded-outbounded.js +0 -56
  54. package/dist-server/graphql/resolvers/dashboard/unit-inbounded-outbounded.js.map +0 -1
  55. package/dist-server/graphql/resolvers/index.js +0 -58
  56. package/dist-server/graphql/resolvers/index.js.map +0 -1
  57. package/dist-server/graphql/resolvers/inventory-comparison/index.js +0 -6
  58. package/dist-server/graphql/resolvers/inventory-comparison/index.js.map +0 -1
  59. package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js +0 -78
  60. package/dist-server/graphql/resolvers/inventory-comparison/inventory-comparison-list.js.map +0 -1
  61. package/dist-server/graphql/resolvers/opa-menu/index.js +0 -6
  62. package/dist-server/graphql/resolvers/opa-menu/index.js.map +0 -1
  63. package/dist-server/graphql/resolvers/opa-menu/opa-menus.js +0 -73
  64. package/dist-server/graphql/resolvers/opa-menu/opa-menus.js.map +0 -1
  65. package/dist-server/graphql/resolvers/other/add-release-good-products.js +0 -309
  66. package/dist-server/graphql/resolvers/other/add-release-good-products.js.map +0 -1
  67. package/dist-server/graphql/resolvers/other/index.js +0 -8
  68. package/dist-server/graphql/resolvers/other/index.js.map +0 -1
  69. package/dist-server/graphql/resolvers/other/page-settings.js +0 -135
  70. package/dist-server/graphql/resolvers/other/page-settings.js.map +0 -1
  71. package/dist-server/graphql/resolvers/outbound/complete-load.js +0 -114
  72. package/dist-server/graphql/resolvers/outbound/complete-load.js.map +0 -1
  73. package/dist-server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.js +0 -148
  74. package/dist-server/graphql/resolvers/outbound/find-loadable-release-good-by-bin.js.map +0 -1
  75. package/dist-server/graphql/resolvers/outbound/find-loadable-release-good.js +0 -114
  76. package/dist-server/graphql/resolvers/outbound/find-loadable-release-good.js.map +0 -1
  77. package/dist-server/graphql/resolvers/outbound/get-delivery-orders.js +0 -46
  78. package/dist-server/graphql/resolvers/outbound/get-delivery-orders.js.map +0 -1
  79. package/dist-server/graphql/resolvers/outbound/get-loading-task.js +0 -100
  80. package/dist-server/graphql/resolvers/outbound/get-loading-task.js.map +0 -1
  81. package/dist-server/graphql/resolvers/outbound/index.js +0 -17
  82. package/dist-server/graphql/resolvers/outbound/index.js.map +0 -1
  83. package/dist-server/graphql/resolvers/outbound/load-by-qty.js +0 -121
  84. package/dist-server/graphql/resolvers/outbound/load-by-qty.js.map +0 -1
  85. package/dist-server/graphql/resolvers/outbound/loading-worksheet-v2.js +0 -158
  86. package/dist-server/graphql/resolvers/outbound/loading-worksheet-v2.js.map +0 -1
  87. package/dist-server/graphql/resolvers/outbound/my-loading-assignment-status.js +0 -32
  88. package/dist-server/graphql/resolvers/outbound/my-loading-assignment-status.js.map +0 -1
  89. package/dist-server/graphql/resolvers/outbound/sort-item.js +0 -66
  90. package/dist-server/graphql/resolvers/outbound/sort-item.js.map +0 -1
  91. package/dist-server/graphql/resolvers/outbound/undo-load.js +0 -72
  92. package/dist-server/graphql/resolvers/outbound/undo-load.js.map +0 -1
  93. package/dist-server/graphql/resolvers/outbound/warehouse-return.js +0 -101
  94. package/dist-server/graphql/resolvers/outbound/warehouse-return.js.map +0 -1
  95. package/dist-server/graphql/resolvers/reports/analysis-picking-packing-report.js +0 -128
  96. package/dist-server/graphql/resolvers/reports/analysis-picking-packing-report.js.map +0 -1
  97. package/dist-server/graphql/resolvers/reports/billing-module-report.js +0 -355
  98. package/dist-server/graphql/resolvers/reports/billing-module-report.js.map +0 -1
  99. package/dist-server/graphql/resolvers/reports/costing-report.js +0 -166
  100. package/dist-server/graphql/resolvers/reports/costing-report.js.map +0 -1
  101. package/dist-server/graphql/resolvers/reports/cycle-count-report.js +0 -311
  102. package/dist-server/graphql/resolvers/reports/cycle-count-report.js.map +0 -1
  103. package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js +0 -198
  104. package/dist-server/graphql/resolvers/reports/inbound-order-details-report.js.map +0 -1
  105. package/dist-server/graphql/resolvers/reports/inbound-serial-number-report.js +0 -140
  106. package/dist-server/graphql/resolvers/reports/inbound-serial-number-report.js.map +0 -1
  107. package/dist-server/graphql/resolvers/reports/index.js +0 -21
  108. package/dist-server/graphql/resolvers/reports/index.js.map +0 -1
  109. package/dist-server/graphql/resolvers/reports/manifest-report.js +0 -98
  110. package/dist-server/graphql/resolvers/reports/manifest-report.js.map +0 -1
  111. package/dist-server/graphql/resolvers/reports/non-loaded-inventory-report.js +0 -143
  112. package/dist-server/graphql/resolvers/reports/non-loaded-inventory-report.js.map +0 -1
  113. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js +0 -290
  114. package/dist-server/graphql/resolvers/reports/outbound-order-details-report.js.map +0 -1
  115. package/dist-server/graphql/resolvers/reports/outbound-serial-number-report.js +0 -143
  116. package/dist-server/graphql/resolvers/reports/outbound-serial-number-report.js.map +0 -1
  117. package/dist-server/graphql/resolvers/reports/pg-udf-query.js +0 -70
  118. package/dist-server/graphql/resolvers/reports/pg-udf-query.js.map +0 -1
  119. package/dist-server/graphql/resolvers/reports/product-label-report.js +0 -57
  120. package/dist-server/graphql/resolvers/reports/product-label-report.js.map +0 -1
  121. package/dist-server/graphql/resolvers/reports/release-inventory-report.js +0 -180
  122. package/dist-server/graphql/resolvers/reports/release-inventory-report.js.map +0 -1
  123. package/dist-server/graphql/resolvers/reports/shortage-report.js +0 -165
  124. package/dist-server/graphql/resolvers/reports/shortage-report.js.map +0 -1
  125. package/dist-server/graphql/resolvers/reports/tote-loading-qc-report.js +0 -129
  126. package/dist-server/graphql/resolvers/reports/tote-loading-qc-report.js.map +0 -1
  127. package/dist-server/graphql/resolvers/reports/vas-report.js +0 -386
  128. package/dist-server/graphql/resolvers/reports/vas-report.js.map +0 -1
  129. package/dist-server/graphql/resolvers/shipping-provider/index.js +0 -6
  130. package/dist-server/graphql/resolvers/shipping-provider/index.js.map +0 -1
  131. package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js +0 -24
  132. package/dist-server/graphql/resolvers/shipping-provider/shipping-providers.js.map +0 -1
  133. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js +0 -6
  134. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/index.js.map +0 -1
  135. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js +0 -97
  136. package/dist-server/graphql/resolvers/warehouse-inventory-adjustment/warehouse-intentory-adjustment.js.map +0 -1
  137. package/dist-server/graphql/resolvers/zone-worksheet/activate-zone-worksheet.js +0 -91
  138. package/dist-server/graphql/resolvers/zone-worksheet/activate-zone-worksheet.js.map +0 -1
  139. package/dist-server/graphql/resolvers/zone-worksheet/assign-sorter.js +0 -36
  140. package/dist-server/graphql/resolvers/zone-worksheet/assign-sorter.js.map +0 -1
  141. package/dist-server/graphql/resolvers/zone-worksheet/generate-zone-worksheet.js +0 -106
  142. package/dist-server/graphql/resolvers/zone-worksheet/generate-zone-worksheet.js.map +0 -1
  143. package/dist-server/graphql/resolvers/zone-worksheet/get-zone-picking-task.js +0 -108
  144. package/dist-server/graphql/resolvers/zone-worksheet/get-zone-picking-task.js.map +0 -1
  145. package/dist-server/graphql/resolvers/zone-worksheet/index.js +0 -12
  146. package/dist-server/graphql/resolvers/zone-worksheet/index.js.map +0 -1
  147. package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js +0 -346
  148. package/dist-server/graphql/resolvers/zone-worksheet/zone-picking.js.map +0 -1
  149. package/dist-server/graphql/resolvers/zone-worksheet/zone-worksheet.js +0 -146
  150. package/dist-server/graphql/resolvers/zone-worksheet/zone-worksheet.js.map +0 -1
  151. package/dist-server/graphql/types/board-setting/board-setting.js +0 -16
  152. package/dist-server/graphql/types/board-setting/board-setting.js.map +0 -1
  153. package/dist-server/graphql/types/board-setting/index.js +0 -9
  154. package/dist-server/graphql/types/board-setting/index.js.map +0 -1
  155. package/dist-server/graphql/types/custom/elccl/elccl-daily-collection-report-list.js +0 -14
  156. package/dist-server/graphql/types/custom/elccl/elccl-daily-collection-report-list.js.map +0 -1
  157. package/dist-server/graphql/types/custom/elccl/elccl-daily-collection-report.js +0 -30
  158. package/dist-server/graphql/types/custom/elccl/elccl-daily-collection-report.js.map +0 -1
  159. package/dist-server/graphql/types/custom/elccl/elccl-daily-order-inventory-report-list.js +0 -14
  160. package/dist-server/graphql/types/custom/elccl/elccl-daily-order-inventory-report-list.js.map +0 -1
  161. package/dist-server/graphql/types/custom/elccl/elccl-daily-order-inventory-report.js +0 -25
  162. package/dist-server/graphql/types/custom/elccl/elccl-daily-order-inventory-report.js.map +0 -1
  163. package/dist-server/graphql/types/custom/elccl/elccl-inventory-report.js +0 -22
  164. package/dist-server/graphql/types/custom/elccl/elccl-inventory-report.js.map +0 -1
  165. package/dist-server/graphql/types/custom/elccl/elccl-inventory-summary-report-list.js +0 -14
  166. package/dist-server/graphql/types/custom/elccl/elccl-inventory-summary-report-list.js.map +0 -1
  167. package/dist-server/graphql/types/custom/elccl/elccl-inventory-summary-report.js +0 -23
  168. package/dist-server/graphql/types/custom/elccl/elccl-inventory-summary-report.js.map +0 -1
  169. package/dist-server/graphql/types/custom/elccl/elccl-pallet-detail-report.js +0 -22
  170. package/dist-server/graphql/types/custom/elccl/elccl-pallet-detail-report.js.map +0 -1
  171. package/dist-server/graphql/types/custom/elccl/index.js +0 -30
  172. package/dist-server/graphql/types/custom/elccl/index.js.map +0 -1
  173. package/dist-server/graphql/types/custom/kimeda/index.js +0 -7
  174. package/dist-server/graphql/types/custom/kimeda/index.js.map +0 -1
  175. package/dist-server/graphql/types/dashboard/index.js +0 -17
  176. package/dist-server/graphql/types/dashboard/index.js.map +0 -1
  177. package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js +0 -16
  178. package/dist-server/graphql/types/dashboard/inventory-expiry-counter.js.map +0 -1
  179. package/dist-server/graphql/types/dashboard/inventory-expiry-status.js +0 -14
  180. package/dist-server/graphql/types/dashboard/inventory-expiry-status.js.map +0 -1
  181. package/dist-server/graphql/types/dashboard/order-status-counter.js +0 -14
  182. package/dist-server/graphql/types/dashboard/order-status-counter.js.map +0 -1
  183. package/dist-server/graphql/types/index.js +0 -70
  184. package/dist-server/graphql/types/index.js.map +0 -1
  185. package/dist-server/graphql/types/inventory-comparison/index.js +0 -13
  186. package/dist-server/graphql/types/inventory-comparison/index.js.map +0 -1
  187. package/dist-server/graphql/types/inventory-comparison/inventory-comparison-list.js +0 -14
  188. package/dist-server/graphql/types/inventory-comparison/inventory-comparison-list.js.map +0 -1
  189. package/dist-server/graphql/types/inventory-comparison/inventory-comparison.js +0 -18
  190. package/dist-server/graphql/types/inventory-comparison/inventory-comparison.js.map +0 -1
  191. package/dist-server/graphql/types/opa-menu/index.js +0 -9
  192. package/dist-server/graphql/types/opa-menu/index.js.map +0 -1
  193. package/dist-server/graphql/types/opa-menu/opa-menu.js +0 -45
  194. package/dist-server/graphql/types/opa-menu/opa-menu.js.map +0 -1
  195. package/dist-server/graphql/types/other/index.js +0 -21
  196. package/dist-server/graphql/types/other/index.js.map +0 -1
  197. package/dist-server/graphql/types/other/page-setting.js +0 -37
  198. package/dist-server/graphql/types/other/page-setting.js.map +0 -1
  199. package/dist-server/graphql/types/outbound/delivery-order-info-list.js +0 -14
  200. package/dist-server/graphql/types/outbound/delivery-order-info-list.js.map +0 -1
  201. package/dist-server/graphql/types/outbound/index.js +0 -24
  202. package/dist-server/graphql/types/outbound/index.js.map +0 -1
  203. package/dist-server/graphql/types/outbound/loading-assignment.js +0 -15
  204. package/dist-server/graphql/types/outbound/loading-assignment.js.map +0 -1
  205. package/dist-server/graphql/types/outbound/loading-worksheet-type.js +0 -25
  206. package/dist-server/graphql/types/outbound/loading-worksheet-type.js.map +0 -1
  207. package/dist-server/graphql/types/reports/analysis-picking-packing-report-list.js +0 -14
  208. package/dist-server/graphql/types/reports/analysis-picking-packing-report-list.js.map +0 -1
  209. package/dist-server/graphql/types/reports/analysis-picking-packing-report.js +0 -18
  210. package/dist-server/graphql/types/reports/analysis-picking-packing-report.js.map +0 -1
  211. package/dist-server/graphql/types/reports/billing-module-report-list.js +0 -14
  212. package/dist-server/graphql/types/reports/billing-module-report-list.js.map +0 -1
  213. package/dist-server/graphql/types/reports/billing-module-report.js +0 -15
  214. package/dist-server/graphql/types/reports/billing-module-report.js.map +0 -1
  215. package/dist-server/graphql/types/reports/costing-report-list.js +0 -14
  216. package/dist-server/graphql/types/reports/costing-report-list.js.map +0 -1
  217. package/dist-server/graphql/types/reports/costing-report.js +0 -19
  218. package/dist-server/graphql/types/reports/costing-report.js.map +0 -1
  219. package/dist-server/graphql/types/reports/cycle-count-report-list.js +0 -14
  220. package/dist-server/graphql/types/reports/cycle-count-report-list.js.map +0 -1
  221. package/dist-server/graphql/types/reports/cycle-count-report.js +0 -35
  222. package/dist-server/graphql/types/reports/cycle-count-report.js.map +0 -1
  223. package/dist-server/graphql/types/reports/inbound-order-details-report-list.js +0 -14
  224. package/dist-server/graphql/types/reports/inbound-order-details-report-list.js.map +0 -1
  225. package/dist-server/graphql/types/reports/inbound-order-details-report.js +0 -60
  226. package/dist-server/graphql/types/reports/inbound-order-details-report.js.map +0 -1
  227. package/dist-server/graphql/types/reports/inbound-serial-number-report-list.js +0 -14
  228. package/dist-server/graphql/types/reports/inbound-serial-number-report-list.js.map +0 -1
  229. package/dist-server/graphql/types/reports/inbound-serial-number-report.js +0 -23
  230. package/dist-server/graphql/types/reports/inbound-serial-number-report.js.map +0 -1
  231. package/dist-server/graphql/types/reports/index.js +0 -89
  232. package/dist-server/graphql/types/reports/index.js.map +0 -1
  233. package/dist-server/graphql/types/reports/loading-qc-report-list.js +0 -14
  234. package/dist-server/graphql/types/reports/loading-qc-report-list.js.map +0 -1
  235. package/dist-server/graphql/types/reports/loading-qc-report.js +0 -24
  236. package/dist-server/graphql/types/reports/loading-qc-report.js.map +0 -1
  237. package/dist-server/graphql/types/reports/manifest-report-list.js +0 -14
  238. package/dist-server/graphql/types/reports/manifest-report-list.js.map +0 -1
  239. package/dist-server/graphql/types/reports/manifest-report-type.js +0 -23
  240. package/dist-server/graphql/types/reports/manifest-report-type.js.map +0 -1
  241. package/dist-server/graphql/types/reports/non-loaded-inventory-report-list.js +0 -14
  242. package/dist-server/graphql/types/reports/non-loaded-inventory-report-list.js.map +0 -1
  243. package/dist-server/graphql/types/reports/non-loaded-inventory-report.js +0 -23
  244. package/dist-server/graphql/types/reports/non-loaded-inventory-report.js.map +0 -1
  245. package/dist-server/graphql/types/reports/outbound-order-details-report-list.js +0 -14
  246. package/dist-server/graphql/types/reports/outbound-order-details-report-list.js.map +0 -1
  247. package/dist-server/graphql/types/reports/outbound-order-details-report.js +0 -79
  248. package/dist-server/graphql/types/reports/outbound-order-details-report.js.map +0 -1
  249. package/dist-server/graphql/types/reports/outbound-serial-number-report-list.js +0 -14
  250. package/dist-server/graphql/types/reports/outbound-serial-number-report-list.js.map +0 -1
  251. package/dist-server/graphql/types/reports/outbound-serial-number-report.js +0 -25
  252. package/dist-server/graphql/types/reports/outbound-serial-number-report.js.map +0 -1
  253. package/dist-server/graphql/types/reports/pg-udf-query-list.js +0 -13
  254. package/dist-server/graphql/types/reports/pg-udf-query-list.js.map +0 -1
  255. package/dist-server/graphql/types/reports/product-label-report-list.js +0 -14
  256. package/dist-server/graphql/types/reports/product-label-report-list.js.map +0 -1
  257. package/dist-server/graphql/types/reports/product-label-report.js +0 -16
  258. package/dist-server/graphql/types/reports/product-label-report.js.map +0 -1
  259. package/dist-server/graphql/types/reports/release-inventory-report-list.js +0 -14
  260. package/dist-server/graphql/types/reports/release-inventory-report-list.js.map +0 -1
  261. package/dist-server/graphql/types/reports/release-inventory-report.js +0 -29
  262. package/dist-server/graphql/types/reports/release-inventory-report.js.map +0 -1
  263. package/dist-server/graphql/types/reports/shortage-report-list.js +0 -14
  264. package/dist-server/graphql/types/reports/shortage-report-list.js.map +0 -1
  265. package/dist-server/graphql/types/reports/shortage-report-type.js +0 -26
  266. package/dist-server/graphql/types/reports/shortage-report-type.js.map +0 -1
  267. package/dist-server/graphql/types/reports/vas-report-list.js +0 -20
  268. package/dist-server/graphql/types/reports/vas-report-list.js.map +0 -1
  269. package/dist-server/graphql/types/reports/vas-report.js +0 -29
  270. package/dist-server/graphql/types/reports/vas-report.js.map +0 -1
  271. package/dist-server/graphql/types/shipping-provider/index.js +0 -10
  272. package/dist-server/graphql/types/shipping-provider/index.js.map +0 -1
  273. package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js +0 -13
  274. package/dist-server/graphql/types/shipping-provider/shipping-provider-list.js.map +0 -1
  275. package/dist-server/graphql/types/shipping-provider/shipping-provider.js +0 -13
  276. package/dist-server/graphql/types/shipping-provider/shipping-provider.js.map +0 -1
  277. package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js +0 -9
  278. package/dist-server/graphql/types/warehouse-inventory-adjustment/index.js.map +0 -1
  279. package/dist-server/graphql/types/zone-worksheet/index.js +0 -22
  280. package/dist-server/graphql/types/zone-worksheet/index.js.map +0 -1
  281. package/dist-server/graphql/types/zone-worksheet/zone-picking-worksheet.js +0 -18
  282. package/dist-server/graphql/types/zone-worksheet/zone-picking-worksheet.js.map +0 -1
  283. package/dist-server/graphql/types/zone-worksheet/zone-worksheet-overview-list.js +0 -13
  284. package/dist-server/graphql/types/zone-worksheet/zone-worksheet-overview-list.js.map +0 -1
  285. package/dist-server/graphql/types/zone-worksheet/zone-worksheet-overview.js +0 -16
  286. package/dist-server/graphql/types/zone-worksheet/zone-worksheet-overview.js.map +0 -1
  287. package/dist-server/index.js +0 -20
  288. package/dist-server/index.js.map +0 -1
  289. package/dist-server/migrations/1568858861188-SeedSetting.js +0 -51
  290. package/dist-server/migrations/1568858861188-SeedSetting.js.map +0 -1
  291. package/dist-server/migrations/1623308919899-SeedLocationRecommendSetting.js +0 -35
  292. package/dist-server/migrations/1623308919899-SeedLocationRecommendSetting.js.map +0 -1
  293. package/dist-server/migrations/1623381200659-SeedStoringRule.js +0 -33
  294. package/dist-server/migrations/1623381200659-SeedStoringRule.js.map +0 -1
  295. package/dist-server/migrations/1687413760311-UpdateProductDetailStockQty.js +0 -36
  296. package/dist-server/migrations/1687413760311-UpdateProductDetailStockQty.js.map +0 -1
  297. package/dist-server/migrations/1687415141200-InsertNewProductDetailStock.js +0 -32
  298. package/dist-server/migrations/1687415141200-InsertNewProductDetailStock.js.map +0 -1
  299. package/dist-server/migrations/index.js +0 -12
  300. package/dist-server/migrations/index.js.map +0 -1
  301. package/dist-server/opa-app-setting-constants.js +0 -15
  302. package/dist-server/opa-app-setting-constants.js.map +0 -1
  303. package/dist-server/routes.js +0 -3
  304. package/dist-server/routes.js.map +0 -1
  305. package/dist-server/utils/index.js +0 -18
  306. package/dist-server/utils/index.js.map +0 -1
  307. package/dist-server/utils/report-query-util.js +0 -42
  308. package/dist-server/utils/report-query-util.js.map +0 -1
@@ -82,7 +82,8 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
82
82
  productData: Object,
83
83
  newProductData: Object,
84
84
  strictEditable: Boolean,
85
- userRole: Array
85
+ userRole: Array,
86
+ enableDirectInbound: Boolean
86
87
  }
87
88
  }
88
89
 
@@ -132,9 +133,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
132
133
  raised
133
134
  @click="${this._addEditProducts.bind(this, true)}"
134
135
  label="${i18next.t('button.submit')}"
135
- class="${this.status !== 'PENDING'
136
- ? 'hidden'
137
- : ''}"
136
+ class="${this.status !== 'PENDING' ? 'hidden' : ''}"
138
137
  ></mwc-button>
139
138
  </div>
140
139
  `
@@ -148,286 +147,364 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
148
147
 
149
148
  async firstUpdated() {
150
149
  this.enableLotIdInput = await fetchSettingRule('enable-lot-id-input')
150
+ this.enableDirectInbound = await fetchSettingRule('enable-direct-gan-order')
151
+
152
+ const fields = [
153
+ 'batchId',
154
+ 'productSku',
155
+ 'product',
156
+ 'brand',
157
+ 'packingType',
158
+ 'uomValue',
159
+ 'uom',
160
+ 'packQty',
161
+ 'totalUomValue',
162
+ 'palletQty',
163
+ 'palletId',
164
+ 'expDate',
165
+ 'manufactureDate',
166
+ 'batchIdRef',
167
+ 'warehouse',
168
+ 'location',
169
+ 'unitPrice',
170
+ 'remark',
171
+ 'status'
172
+ ]
173
+
174
+ const columns = [
175
+ { type: 'gutter', gutterName: 'sequence' },
176
+ { type: 'string', name: 'id', hidden: true },
177
+ {
178
+ type: 'string',
179
+ name: 'batchId',
180
+ header: i18next.t('field.batch_id'),
181
+ record: { editable: true },
182
+ width: 150
183
+ },
184
+ {
185
+ type: 'string',
186
+ name: 'productSku',
187
+ header: i18next.t('field.sku'),
188
+ width: 150
189
+ },
190
+ {
191
+ type: 'object',
192
+ name: 'product',
193
+ header: i18next.t('field.product'),
194
+ width: 350
195
+ },
196
+ {
197
+ type: 'object',
198
+ name: 'brand',
199
+ header: i18next.t('field.brand'),
200
+ width: 150
201
+ },
202
+ {
203
+ type: 'code',
204
+ name: 'packingType',
205
+ header: i18next.t('field.packing_type'),
206
+ record: { editable: !this.strictEditable, codeName: 'PACKING_TYPES' },
207
+ width: 150
208
+ },
209
+ {
210
+ type: 'float',
211
+ name: 'uomValue',
212
+ header: i18next.t('field.uom_value'),
213
+ record: { editable: !this.strictEditable, options: { min: 0 } },
214
+ width: 80
215
+ },
216
+ {
217
+ type: 'code',
218
+ name: 'uom',
219
+ header: i18next.t('field.uom'),
220
+ record: { editable: !this.strictEditable, codeName: 'WEIGHT_UNITS' },
221
+ width: 80
222
+ },
223
+ {
224
+ type: 'float',
225
+ name: 'packQty',
226
+ header: i18next.t('field.pack_qty'),
227
+ record: { editable: true, options: { min: 0 } },
228
+ width: 80
229
+ },
230
+ {
231
+ type: 'float',
232
+ name: 'totalUomValue',
233
+ header: i18next.t('field.total_uom_value'),
234
+ width: 120
235
+ },
236
+ {
237
+ type: 'integer',
238
+ name: 'palletQty',
239
+ header: i18next.t('field.pallet_qty'),
240
+ record: { editable: true, options: { min: 0 } },
241
+ width: 80
242
+ },
243
+ ...(this._enableLotIdInput
244
+ ? [
245
+ {
246
+ type: 'string',
247
+ name: 'palletId',
248
+ header: i18next.t('field.lot_id'),
249
+ imex: { header: i18next.t('field.lot_id'), key: 'palletId', width: 25, type: 'string' },
250
+ record: { editable: true },
251
+ width: 150
252
+ }
253
+ ]
254
+ : []),
255
+ {
256
+ type: 'date',
257
+ name: 'manufactureDate',
258
+ header: i18next.t('field.manufacture_date'),
259
+ record: { editable: true },
260
+ width: 120
261
+ },
262
+ {
263
+ type: 'string',
264
+ name: 'batchIdRef',
265
+ header: i18next.t('field.batch_no_ref'),
266
+ record: { editable: true },
267
+ width: 150
268
+ },
269
+ {
270
+ type: 'float',
271
+ name: 'unitPrice',
272
+ header: i18next.t('field.unit_price'),
273
+ record: { editable: true },
274
+ width: 80
275
+ },
276
+ {
277
+ type: 'string',
278
+ name: 'remark',
279
+ header: i18next.t('field.remark'),
280
+ record: { editable: true },
281
+ width: 300
282
+ },
283
+ {
284
+ type: 'string',
285
+ name: 'status',
286
+ header: i18next.t('field.status'),
287
+ width: 130
288
+ }
289
+ ]
290
+
291
+ function insertAfter(cols, anchorName, newCols) {
292
+ const idx = cols.findIndex(c => c.name === anchorName)
293
+ if (idx >= 0) cols.splice(idx + 1, 0, ...newCols)
294
+ }
295
+
296
+ function createExpDateColumn() {
297
+ return {
298
+ type: 'date',
299
+ name: 'expDate',
300
+ header: i18next.t('field.exp_date'),
301
+ record: { editable: true },
302
+ width: 120
303
+ }
304
+ }
305
+
306
+ function createWarehouseColumn() {
307
+ return {
308
+ type: 'object',
309
+ name: 'warehouse',
310
+ header: i18next.t('field.warehouse'),
311
+ width: 150
312
+ }
313
+ }
314
+
315
+ function createLocationColumn(clickHandler) {
316
+ return {
317
+ type: 'object',
318
+ name: 'location',
319
+ header: i18next.t('field.location'),
320
+ record: { editable: true },
321
+ handlers: {
322
+ click: (columns, data, column, record, rowIndex) => {
323
+ clickHandler(rowIndex)
324
+ }
325
+ },
326
+ width: 150
327
+ }
328
+ }
329
+
330
+ if (this.enableDirectInbound) {
331
+ const anchor = this.enableLotIdInput ? 'palletId' : 'palletQty'
332
+ insertAfter(columns, anchor, [createExpDateColumn()])
333
+ insertAfter(columns, 'batchIdRef', [
334
+ createWarehouseColumn(),
335
+ createLocationColumn(rowIndex => this._openLocationSelection(rowIndex))
336
+ ])
337
+ }
338
+
151
339
  this.editProductConfig = {
152
340
  pagination: { infinite: true },
153
341
  rows: { selectable: { multiple: true }, appendable: false },
154
342
  list: {
155
- fields: [
156
- 'batchId',
157
- 'productSku',
158
- 'product',
159
- 'brand',
160
- 'packingType',
161
- 'uomValue',
162
- 'uom',
163
- 'packQty',
164
- 'totalUomValue',
165
- 'palletQty',
166
- 'palletId',
167
- 'manufactureDate',
168
- 'batchIdRef',
169
- 'unitPrice',
170
- 'remark',
171
- 'status'
172
- ]
343
+ fields
173
344
  },
174
- columns: [
175
- { type: 'gutter', gutterName: 'sequence' },
176
- {
177
- type: 'string',
178
- name: 'id',
179
- hidden: true
180
- },
181
- {
182
- type: 'string',
183
- name: 'batchId',
184
- header: i18next.t('field.batch_id'),
185
- record: { editable: true },
186
- width: 150
187
- },
188
- {
189
- type: 'string',
190
- name: 'productSku',
191
- header: i18next.t('field.sku'),
192
- width: 150
193
- },
194
- {
195
- type: 'object',
196
- name: 'product',
197
- header: i18next.t('field.product'),
198
- width: 350
199
- },
200
- {
201
- type: 'object',
202
- name: 'brand',
203
- header: i18next.t('field.brand'),
204
- width: 150
205
- },
206
- {
207
- type: 'code',
208
- name: 'packingType',
209
- header: i18next.t('field.packing_type'),
210
- record: { editable: !this.strictEditable, codeName: 'PACKING_TYPES' },
211
- width: 150
212
- },
213
- {
214
- type: 'float',
215
- name: 'uomValue',
216
- header: i18next.t('field.uom_value'),
217
- record: { editable: !this.strictEditable, options: { min: 0 } },
218
- width: 80
219
- },
220
- {
221
- type: 'code',
222
- name: 'uom',
223
- header: i18next.t('field.uom'),
224
- record: { editable: !this.strictEditable, codeName: 'WEIGHT_UNITS' },
225
- width: 80
226
- },
227
- {
228
- type: 'float',
229
- name: 'packQty',
230
- header: i18next.t('field.pack_qty'),
231
- record: { editable: true, options: { min: 0 } },
232
- width: 80
233
- },
234
- {
235
- type: 'float',
236
- name: 'totalUomValue',
237
- header: i18next.t('field.total_uom_value'),
238
- width: 120
239
- },
240
- {
241
- type: 'integer',
242
- name: 'palletQty',
243
- header: i18next.t('field.pallet_qty'),
244
- record: { editable: true, options: { min: 0 } },
245
- width: 80
246
- },
247
- {
248
- type: 'string',
249
- name: 'palletId',
250
- header: i18next.t('field.lot_id'),
251
- width: 80
252
- },
253
- {
254
- type: 'date',
255
- name: 'manufactureDate',
256
- header: i18next.t('field.manufacture_date'),
257
- record: { editable: true },
258
- width: 120
259
- },
260
- {
261
- type: 'string',
262
- name: 'batchIdRef',
263
- header: i18next.t('field.batch_no_ref'),
264
- record: { editable: true },
265
- width: 150
266
- },
267
- {
268
- type: 'float',
269
- name: 'unitPrice',
270
- header: i18next.t('field.unit_price'),
271
- record: { editable: true },
272
- width: 80
273
- },
274
- {
275
- type: 'string',
276
- name: 'remark',
277
- header: i18next.t('field.remark'),
278
- record: { editable: true },
279
- width: 300
280
- },
281
- {
282
- type: 'string',
283
- name: 'status',
284
- header: i18next.t('field.status'),
285
- width: 130
345
+ columns
346
+ }
347
+
348
+ const addFields = [
349
+ 'batchId',
350
+ 'productName',
351
+ 'packingType',
352
+ 'uomValue',
353
+ 'uom',
354
+ 'packQty',
355
+ 'totalUomValue',
356
+ 'palletQty',
357
+ 'palletId',
358
+ 'expDate',
359
+ 'manufactureDate',
360
+ 'batchIdRef',
361
+ 'warehouse',
362
+ 'location',
363
+ 'unitPrice',
364
+ 'remark'
365
+ ]
366
+
367
+ const addColumns = [
368
+ { type: 'gutter', gutterName: 'sequence' },
369
+ {
370
+ type: 'gutter',
371
+ gutterName: 'button',
372
+ icon: 'close',
373
+ handlers: {
374
+ click: (columns, data, column, record, rowIndex) => {
375
+ const newData = data.records.filter((_, idx) => idx !== rowIndex)
376
+ this.newProductData = { ...this.newProductData, records: newData }
377
+ this.addProductGrist.dirtyData.records = newData
378
+ }
286
379
  }
287
- ]
380
+ },
381
+ {
382
+ type: 'string',
383
+ name: 'batchId',
384
+ header: i18next.t('field.batch_id'),
385
+ record: { editable: true },
386
+ width: 150
387
+ },
388
+ {
389
+ type: 'string',
390
+ name: 'productName',
391
+ header: i18next.t('field.product'),
392
+ imex: { header: i18next.t('field.product'), key: 'productName', width: 50, type: 'string' },
393
+ handlers: {
394
+ click: (columns, data, column, record, rowIndex) => {
395
+ this._openProductSelection(rowIndex)
396
+ }
397
+ },
398
+ width: 350
399
+ },
400
+ {
401
+ type: 'object',
402
+ name: 'product',
403
+ hidden: true
404
+ },
405
+ {
406
+ type: 'object',
407
+ name: 'brand',
408
+ header: i18next.t('field.brand'),
409
+ width: 150
410
+ },
411
+ {
412
+ type: 'code',
413
+ name: 'packingType',
414
+ header: i18next.t('field.packing_type'),
415
+ record: { editable: !this.strictEditable, codeName: 'PACKING_TYPES' },
416
+ width: 150
417
+ },
418
+ {
419
+ type: 'float',
420
+ name: 'uomValue',
421
+ header: i18next.t('field.uom_value'),
422
+ record: { editable: !this.strictEditable, options: { min: 0 } },
423
+ width: 80
424
+ },
425
+ {
426
+ type: 'code',
427
+ name: 'uom',
428
+ header: i18next.t('field.uom'),
429
+ record: { editable: !this.strictEditable, codeName: 'WEIGHT_UNITS' },
430
+ width: 80
431
+ },
432
+ {
433
+ type: 'float',
434
+ name: 'packQty',
435
+ header: i18next.t('field.pack_qty'),
436
+ record: { editable: true, options: { min: 0 } },
437
+ width: 80
438
+ },
439
+ {
440
+ type: 'float',
441
+ name: 'totalUomValue',
442
+ header: i18next.t('field.total_uom_value'),
443
+ width: 120
444
+ },
445
+ {
446
+ type: 'integer',
447
+ name: 'palletQty',
448
+ header: i18next.t('field.pallet_qty'),
449
+ record: { editable: true, options: { min: 0 } },
450
+ width: 80
451
+ },
452
+ ...(this.enableLotIdInput
453
+ ? [
454
+ {
455
+ type: 'string',
456
+ name: 'palletId',
457
+ header: i18next.t('field.lot_id'),
458
+ width: 80
459
+ }
460
+ ]
461
+ : []),
462
+ {
463
+ type: 'date',
464
+ name: 'manufactureDate',
465
+ header: i18next.t('field.manufacture_date'),
466
+ record: { editable: true },
467
+ width: 120
468
+ },
469
+ {
470
+ type: 'string',
471
+ name: 'batchIdRef',
472
+ header: i18next.t('field.batch_no_ref'),
473
+ record: { editable: true },
474
+ width: 150
475
+ },
476
+ {
477
+ type: 'float',
478
+ name: 'unitPrice',
479
+ header: i18next.t('field.unit_price'),
480
+ record: { editable: true },
481
+ width: 80
482
+ },
483
+ {
484
+ type: 'string',
485
+ name: 'remark',
486
+ header: i18next.t('field.remark'),
487
+ record: { editable: true },
488
+ width: 300
489
+ }
490
+ ]
491
+
492
+ if (this.enableDirectInbound) {
493
+ const anchor = this.enableLotIdInput ? 'palletId' : 'palletQty'
494
+ insertAfter(addColumns, anchor, [createExpDateColumn()])
495
+ insertAfter(addColumns, 'batchIdRef', [
496
+ createWarehouseColumn(),
497
+ createLocationColumn(rowIndex => this._openAddLocationSelection(rowIndex))
498
+ ])
288
499
  }
289
500
 
290
501
  this.addProductConfig = {
291
502
  pagination: { infinite: true },
292
503
  rows: { selectable: { multiple: true } },
293
504
  list: {
294
- fields: [
295
- 'batchId',
296
- 'productName',
297
- 'packingType',
298
- 'uomValue',
299
- 'uom',
300
- 'packQty',
301
- 'totalUomValue',
302
- 'palletQty',
303
- 'palletId',
304
- 'manufactureDate',
305
- 'batchIdRef',
306
- 'unitPrice',
307
- 'remark'
308
- ]
505
+ fields: addFields
309
506
  },
310
- columns: [
311
- { type: 'gutter', gutterName: 'sequence' },
312
- {
313
- type: 'gutter',
314
- gutterName: 'button',
315
- icon: 'close',
316
- handlers: {
317
- click: (columns, data, column, record, rowIndex) => {
318
- const newData = data.records.filter((_, idx) => idx !== rowIndex)
319
- this.newProductData = { ...this.newProductData, records: newData }
320
- this.addProductGrist.dirtyData.records = newData
321
- }
322
- }
323
- },
324
- {
325
- type: 'string',
326
- name: 'batchId',
327
- header: i18next.t('field.batch_id'),
328
- record: { editable: true },
329
- width: 150
330
- },
331
- {
332
- type: 'string',
333
- name: 'productName',
334
- header: i18next.t('field.product'),
335
- imex: { header: i18next.t('field.product'), key: 'productName', width: 50, type: 'string' },
336
- handlers: {
337
- click: (columns, data, column, record, rowIndex) => {
338
- this._openProductSelection(rowIndex)
339
- }
340
- },
341
- width: 350
342
- },
343
- {
344
- type: 'object',
345
- name: 'product',
346
- hidden: true
347
- },
348
- {
349
- type: 'object',
350
- name: 'brand',
351
- header: i18next.t('field.brand'),
352
- width: 150
353
- },
354
- {
355
- type: 'code',
356
- name: 'packingType',
357
- header: i18next.t('field.packing_type'),
358
- record: { editable: !this.strictEditable, codeName: 'PACKING_TYPES' },
359
- width: 150
360
- },
361
- {
362
- type: 'float',
363
- name: 'uomValue',
364
- header: i18next.t('field.uom_value'),
365
- record: { editable: !this.strictEditable, options: { min: 0 } },
366
- width: 80
367
- },
368
- {
369
- type: 'code',
370
- name: 'uom',
371
- header: i18next.t('field.uom'),
372
- record: { editable: !this.strictEditable, codeName: 'WEIGHT_UNITS' },
373
- width: 80
374
- },
375
- {
376
- type: 'float',
377
- name: 'packQty',
378
- header: i18next.t('field.pack_qty'),
379
- record: { editable: true, options: { min: 0 } },
380
- width: 80
381
- },
382
- {
383
- type: 'float',
384
- name: 'totalUomValue',
385
- header: i18next.t('field.total_uom_value'),
386
- width: 120
387
- },
388
- {
389
- type: 'integer',
390
- name: 'palletQty',
391
- header: i18next.t('field.pallet_qty'),
392
- record: { editable: true, options: { min: 0 } },
393
- width: 80
394
- },
395
- {
396
- type: 'string',
397
- name: 'palletId',
398
- header: i18next.t('field.lot_id'),
399
- record: { editable: true },
400
- width: 120
401
- },
402
- {
403
- type: 'date',
404
- name: 'manufactureDate',
405
- header: i18next.t('field.manufacture_date'),
406
- record: { editable: true },
407
- width: 120
408
- },
409
- {
410
- type: 'string',
411
- name: 'batchIdRef',
412
- header: i18next.t('field.batch_no_ref'),
413
- record: { editable: true },
414
- width: 150
415
- },
416
- {
417
- type: 'float',
418
- name: 'unitPrice',
419
- header: i18next.t('field.unit_price'),
420
- record: { editable: true },
421
- width: 80
422
- },
423
- {
424
- type: 'string',
425
- name: 'remark',
426
- header: i18next.t('field.remark'),
427
- record: { editable: true },
428
- width: 300
429
- }
430
- ]
507
+ columns: addColumns
431
508
  }
432
509
 
433
510
  this.userRole = await this.fetchUserRoleHandler()
@@ -443,7 +520,10 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
443
520
 
444
521
  async _onProductChangeHandler(event) {
445
522
  try {
446
- this._checkProductDuplication()
523
+ if (!this.enableDirectInbound) {
524
+ this._checkProductDuplication()
525
+ }
526
+
447
527
  let changeRecord = event.detail.after
448
528
  const changedColumn = event.detail.column.name
449
529
 
@@ -478,6 +558,17 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
478
558
  throw new Error(i18next.t('text.invalid_x', { state: { x: i18next.t('label.pallet_qty') } }))
479
559
  }
480
560
  }
561
+
562
+ if (changedColumn === 'expDate') {
563
+ if (!changeRecord.product?.isRequiredCheckExpiry) {
564
+ delete changeRecord.expDate
565
+ throw new Error(
566
+ i18next.t('text.exp_date_not_required_for_this_product', {
567
+ defaultValue: `Expiry date is not required for this product`
568
+ })
569
+ )
570
+ }
571
+ }
481
572
  } catch (e) {
482
573
  const beforeValue = event.detail.before && event.detail.before[event.detail.column.name]
483
574
  if (beforeValue) {
@@ -581,7 +672,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
581
672
  if (matchingRow?.length > 0) isDuplicated = true
582
673
 
583
674
  if (isDuplicated) {
584
- throw new Error(i18next.t('text.duplicated_lot_id'))
675
+ throw new Error(i18next.t('text.duplicated_batch_id'))
585
676
  }
586
677
  } else if (this.enableLotIdInput) {
587
678
  const addedNewRows = this.addProductGrist.dirtyData.records
@@ -613,6 +704,102 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
613
704
  }
614
705
  }
615
706
 
707
+ _openLocationSelection(rowIndex) {
708
+ openPopup(
709
+ html`
710
+ <buffer-location-selector
711
+ .bizplaceId="${this._bizplaceId}"
712
+ .data="${this.productData}"
713
+ .enableDirectInbound="${this.enableDirectInbound}"
714
+ @selected="${async e => {
715
+ this.editProductGrist.dirtyData.records[rowIndex].location = { id: e.detail.id, name: e.detail.name }
716
+ this.editProductGrist.dirtyData.records[rowIndex].warehouse = {
717
+ id: e.detail.warehouse.id,
718
+ name: e.detail.warehouse.name
719
+ }
720
+ this.editProductGrist.dirtyData.records[rowIndex].__dirty__ = true
721
+
722
+ if (this.editProductGrist.dirtyData.records.length !== rowIndex) {
723
+ // update existing product data records
724
+ this.editProductGrist.dirtyData.records.splice(rowIndex, 1, {
725
+ ...this.editProductGrist.dirtyData.records[rowIndex]
726
+ })
727
+
728
+ this.productData = {
729
+ ...this.productData,
730
+ records: [...this.editProductGrist.dirtyData.records]
731
+ }
732
+
733
+ this.editProductGrist.data.records = this.editProductGrist.dirtyData.records
734
+ } else {
735
+ this.productData = {
736
+ ...this.productData,
737
+ records: [...this.editProductGrist.dirtyData.records]
738
+ }
739
+ }
740
+ }}"
741
+ ></buffer-location-selector>
742
+ `,
743
+ {
744
+ backdrop: true,
745
+ size: 'large',
746
+ title: i18next.t('title.select_location', 'Select Location')
747
+ }
748
+ )
749
+ }
750
+
751
+ _openAddLocationSelection(rowIndex) {
752
+ openPopup(
753
+ html`
754
+ <buffer-location-selector
755
+ .bizplaceId="${this._bizplaceId}"
756
+ .data="${this.newProductData}"
757
+ .enableDirectInbound="${this.enableDirectInbound}"
758
+ @selected="${async e => {
759
+ this.addProductGrist.dirtyData.records[rowIndex].location = { id: e.detail.id, name: e.detail.name }
760
+ this.addProductGrist.dirtyData.records[rowIndex].warehouse = {
761
+ id: e.detail.warehouse.id,
762
+ name: e.detail.warehouse.name
763
+ }
764
+ this.addProductGrist.dirtyData.records[rowIndex].__dirty__ = true
765
+
766
+ if (this.addProductGrist.dirtyData.records.length !== rowIndex) {
767
+ // update existing product data records
768
+ this.addProductGrist.dirtyData.records.splice(rowIndex, 1, {
769
+ ...this.addProductGrist.dirtyData.records[rowIndex]
770
+ })
771
+
772
+ this.newProductData = {
773
+ ...this.newProductData,
774
+ records: [...this.addProductGrist.dirtyData.records]
775
+ }
776
+
777
+ this.addProductGrist.data.records = this.addProductGrist.dirtyData.records
778
+ } else {
779
+ this.newProductData = {
780
+ ...this.newProductData,
781
+ records: [...this.addProductGrist.dirtyData.records]
782
+ }
783
+ }
784
+ }}"
785
+ ></buffer-location-selector>
786
+ `,
787
+ {
788
+ backdrop: true,
789
+ size: 'large',
790
+ title: i18next.t('title.select_location', 'Select Location')
791
+ }
792
+ )
793
+ }
794
+
795
+ async pageUpdated(changes, lifecycle) {
796
+ if (this.active) {
797
+ await this.updateComplete
798
+
799
+ this.editProductGrist.config = this.editProductConfig
800
+ }
801
+ }
802
+
616
803
  _openProductSelection(rowIndex) {
617
804
  if (this.bizplace?.id) {
618
805
  openPopup(
@@ -656,6 +843,10 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
656
843
 
657
844
  async _addEditProducts(approveAdminAddEditProducts) {
658
845
  try {
846
+ if (this.enableDirectInbound) {
847
+ approveAdminAddEditProducts = false
848
+ }
849
+
659
850
  this._validateProducts()
660
851
 
661
852
  let existingOrderProducts = []
@@ -715,7 +906,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
715
906
  }
716
907
 
717
908
  _getNewOrderProducts() {
718
- const isStatusPending = this.status === 'PENDING' ? true : false
909
+ const isStatusPending = this.status === 'PENDING' && !this.enableDirectInbound
719
910
  return this.addProductGrist.dirtyData.records.map(record => {
720
911
  record.unitPrice = parseFloat(record.unitPrice) || 0
721
912
 
@@ -734,7 +925,7 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
734
925
  adjustedUomValue: !isStatusPending ? (record?.uomValue ? record.uomValue : 0) : null,
735
926
  uom: isStatusPending ? record.uom : 'N/A',
736
927
  adjustedUom: !isStatusPending ? record.uom : null,
737
- packQty: isStatusPending ? (record.packQty ? parseFloat(record.packQty).toFixed(3) : 0) : 0,
928
+ packQty: isStatusPending ? (record.packQty ? parseFloat(parseFloat(record.packQty).toFixed(3)) : 0) : 0,
738
929
  adjustedPackQty: !isStatusPending ? record.packQty : null,
739
930
  totalUomValue: isStatusPending ? record.totalUomValue : 'N/A',
740
931
  adjustedTotalUomValue: record?.totalUomValue && !isStatusPending ? record.totalUomValue : 'N/A',
@@ -744,14 +935,17 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
744
935
  unitPrice: isStatusPending ? record.unitPrice : 0,
745
936
  adjustedUnitPrice: record?.unitPrice && !isStatusPending ? record.unitPrice : null,
746
937
  remark: record?.remark ? record.remark : null,
747
- packingSize: record.packingSize || record.product.packingSize
938
+ packingSize: record.packingSize || record.product.packingSize,
939
+ expDate: record?.expDate ? record.expDate : null,
940
+ location: record?.location ? record.location : null,
941
+ warehouse: record?.warehouse ? record.warehouse : null
748
942
  }
749
943
  })
750
944
  }
751
945
 
752
946
  _getExistingOrderProducts() {
753
947
  let editedOrderProducts = []
754
- const isStatusPending = this.status === 'PENDING' ? true : false
948
+ const isStatusPending = this.status === 'PENDING' && !this.enableDirectInbound
755
949
  if (this.editProductGrist.dirtyData.records.some(record => record.__dirty__)) {
756
950
  this.editProductGrist.dirtyData.records.map(record => {
757
951
  record.unitPrice = parseFloat(record.unitPrice)
@@ -796,6 +990,21 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
796
990
  ? null
797
991
  : record.totalUomValue
798
992
  : null,
993
+ adjustedExpDate: !isStatusPending
994
+ ? record.expDate == record.__origin__.expDate
995
+ ? null
996
+ : record.expDate
997
+ : null,
998
+ adjustedWarehouse: !isStatusPending
999
+ ? record.warehouse == record.__origin__?.__origin__?.warehouse
1000
+ ? null
1001
+ : record.warehouse
1002
+ : null,
1003
+ adjustedLocation: !isStatusPending
1004
+ ? record.location == record.__origin__?.__origin__?.location
1005
+ ? null
1006
+ : record.location
1007
+ : null,
799
1008
  manufactureDate: record?.manufactureDate ? record.manufactureDate : null,
800
1009
  palletId: record?.palletId ? record.palletId : null,
801
1010
  adjustedUnitPrice: record?.unitPrice && !isStatusPending ? record.unitPrice : null,
@@ -809,7 +1018,10 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
809
1018
  uomValue: record.uomValue,
810
1019
  uom: record.uom,
811
1020
  batchId: record.batchId,
812
- totalUomValue: record.totalUomValue
1021
+ totalUomValue: record.totalUomValue,
1022
+ expDate: record.__origin__.expDate,
1023
+ location: record.__origin__.location,
1024
+ warehouse: record.__origin__.warehouse
813
1025
  })
814
1026
  })
815
1027
  })
@@ -832,6 +1044,29 @@ export class EditProductPopup extends localize(i18next)(LitElement) {
832
1044
  ) {
833
1045
  throw new Error(i18next.t('text.empty_value_in_add_product_list'))
834
1046
  }
1047
+
1048
+ this.addProductGrist.dirtyData.records.forEach((record, index) => {
1049
+ if (this.enableDirectInbound && record?.product?.isRequiredCheckExpiry && !record.expDate) {
1050
+ throw new Error(
1051
+ i18next.t('text.exp_date_required_for_product', {
1052
+ defaultValue: `Add Product Row ${index + 1}: Expiry date is required for product "${record.product.name}"`,
1053
+ product: record.product.name,
1054
+ row: index + 1
1055
+ })
1056
+ )
1057
+ }
1058
+
1059
+ if (!record.location || !record.location.id) {
1060
+ throw new Error(
1061
+ i18next.t('text.location_required_for_product', {
1062
+ defaultValue: `Add Product Row ${index + 1}: Location is missing for product "${record.product.name}"`,
1063
+ product: record.product.name,
1064
+ row: index + 1
1065
+ })
1066
+ )
1067
+ }
1068
+ })
1069
+
835
1070
  this.editProductGrist.dirtyData.records.forEach(record => {
836
1071
  if (record.packQty === 0 && !record.remark) {
837
1072
  throw new Error(i18next.t('text.remark_is_empty_kindly_fill_in_to_proceed'))