@feedmepos/mf-inventory-portal 1.0.35 → 1.0.36-dev.1

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 (76) hide show
  1. package/dist/{App-C5XJ0V5A.js → App-DDK4b9tN.js} +2 -2
  2. package/dist/{ApprovalView-D0-CwJrp.js → ApprovalView-e-sllXDo.js} +2 -2
  3. package/dist/{BindingsDialog-qTs98LNw.js → BindingsDialog-Bl9KvEQr.js} +2 -2
  4. package/dist/{BindingsPicker-CQWogwPI.js → BindingsPicker-CHMYrvdM.js} +1 -1
  5. package/dist/{BindingsTable-yCtrS8MP.js → BindingsTable-CcTN66vn.js} +1 -1
  6. package/dist/{ClosingDraftView-DoyFjLW_.js → ClosingDraftView-CVtoeYpq.js} +2 -2
  7. package/dist/{ClosingTemplateView-DQNvQmyL.js → ClosingTemplateView-B2Q9U8LR.js} +2 -2
  8. package/dist/{DeliveryOrderPrintPreview-D-zt7ntT.js → DeliveryOrderPrintPreview-Baa0V_QN.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D_-30uOG.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D3C8Ofy-.js} +3 -3
  10. package/dist/{FmMultiselectDialog-DOw1_V-H.js → FmMultiselectDialog-_OxDskLZ.js} +1 -1
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CCFlUlmH.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BmDyIfqq.js} +1 -1
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BANz3edL.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C7Xf7UpZ.js} +1 -1
  13. package/dist/{IngredientGroupView-BHhyDovJ.js → IngredientGroupView-DRRbw0-S.js} +2 -2
  14. package/dist/IngredientsView-DfmrSi7O.js +1885 -0
  15. package/dist/{IntegrationView-DACtki5t.js → IntegrationView-CEVfK78k.js} +6 -5
  16. package/dist/{InventoryBindingForm-DWrnv7wd.js → InventoryBindingForm-BobA9KFs.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-D3MecNWI.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BF4PL8Rs.js} +3 -3
  18. package/dist/{InventoryBindingSummary-CBlskC4w.js → InventoryBindingSummary-CtG9ZxiC.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BTGsINbY.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BUPk4GdT.js} +1 -1
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DeBjYaKQ.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CRpMLzjR.js} +1 -1
  21. package/dist/{PublishView-BDUZ76ss.js → PublishView-GKRWjX-1.js} +2 -2
  22. package/dist/{PurchaseOrderPrintPreview-CvSYYp87.js → PurchaseOrderPrintPreview-d5DhgAPD.js} +1 -1
  23. package/dist/{ReceiveRequestView-Dtq85Sx8.js → ReceiveRequestView-DEIXZ0qy.js} +787 -772
  24. package/dist/{RecipeView-Dw5qfDL-.js → RecipeView-Dt8jCXzB.js} +4 -4
  25. package/dist/{StockView-DZAanu-v.js → StockView-Dc3vwmji.js} +7 -7
  26. package/dist/{SupplierView-CLYMoQf8.js → SupplierView-CoMJmWNO.js} +4 -4
  27. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DWBI5ZhF.js → TransferDetails.vue_vue_type_script_setup_true_lang-BXa7boIg.js} +6 -6
  28. package/dist/{TransferTemplateView-CQG7krtn.js → TransferTemplateView-CwbkS6ci.js} +7 -7
  29. package/dist/{UnitView-CnkDG24q.js → UnitView-C41xBgkd.js} +3 -3
  30. package/dist/{WarehouseView-D0VKjVNp.js → WarehouseView-DhIxifgM.js} +1 -1
  31. package/dist/api/inventory.d.ts +4 -0
  32. package/dist/api/netsuite.d.ts +7 -0
  33. package/dist/{app-Dk-7AjkN.js → app-C2Ssxo54.js} +3589 -3547
  34. package/dist/app.d.ts +6 -0
  35. package/dist/app.js +1 -1
  36. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -0
  37. package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -0
  38. package/dist/{decimal-DQm8BE7_.js → decimal-Dg5x3N3U.js} +1 -1
  39. package/dist/{feature-ZLrkFLAJ.js → feature-DVnopfji.js} +2617 -2238
  40. package/dist/{format-unit-display-BnNaGUMz.js → format-unit-display-ZzNB0Y0F.js} +2 -2
  41. package/dist/{index-BBevj6fz.js → index-DXpWyzx4.js} +2 -2
  42. package/dist/{index-BWmFmO47.js → index-Du7pEy_r.js} +1 -1
  43. package/dist/{stock-0JpaL6I1.js → stock-CFc8rth6.js} +1 -1
  44. package/dist/stores/integration/netsuite.d.ts +6 -0
  45. package/dist/stores/inventory.d.ts +9 -0
  46. package/dist/{supplier-QXhc_oVR.js → supplier-A5hi2UDL.js} +2 -2
  47. package/dist/tsconfig.app.tsbuildinfo +1 -1
  48. package/dist/{use-ingredient-select-dialog-DxriSXHd.js → use-ingredient-select-dialog-DLXyIOZJ.js} +1 -1
  49. package/dist/{use-inventory-binding-dialog-_k35qAcZ.js → use-inventory-binding-dialog-Dqi7K9JI.js} +1 -1
  50. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -0
  51. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +24 -0
  52. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -0
  53. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +12 -0
  54. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +12 -0
  55. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -0
  56. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -0
  57. package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +2 -0
  58. package/dist/views/integration/components/netsuite/business/BusinessNetSuiteSideSheet.vue.d.ts +4 -0
  59. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +17 -0
  60. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -0
  61. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +4 -0
  62. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -0
  63. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +4 -0
  64. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +24 -0
  65. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +24 -0
  66. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -0
  67. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +2 -0
  68. package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +2 -0
  69. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +2 -0
  70. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -0
  71. package/dist/views/transfer-template/composables/use-netsuite-custom-field.d.ts +3 -0
  72. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +12 -0
  73. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +12 -0
  74. package/dist/{vue-i18n-DW4qNsx9.js → vue-i18n-Bl0EJaRp.js} +351 -351
  75. package/package.json +1 -1
  76. package/dist/IngredientsView-BjFJHl2j.js +0 -1839
@@ -1,21 +1,21 @@
1
- import { reactive as bt, onMounted as Qe, watch as _e, computed as U, h as L, defineComponent as ce, openBlock as S, createElementBlock as D, Fragment as de, renderList as Se, createElementVNode as n, toDisplayString as E, unref as s, resolveComponent as T, createVNode as y, withCtx as R, createCommentVNode as H, ref as O, createBlock as J, normalizeClass as K, normalizeStyle as gt, createTextVNode as Te, nextTick as $t, mergeProps as Ze, isRef as xe, createSlots as Tt, Teleport as Dt, normalizeProps as It, guardReactiveProps as Vt } from "vue";
2
- import { b as Me, P as _t, l as Oe, i as Ce, a6 as je, Q as Pt, at as Rt, A as qe, M as At, m as ht, ad as Je, E as fe, al as Et, au as Ot, av as qt, aw as Mt, J as kt, u as We, a as Ge, ax as Ut, ay as Nt, a5 as zt, $ as Bt, az as Lt, C as xt, a1 as Ht, d as Ee, w as jt, x as Qt, y as Yt, aA as He, a7 as pt, z as Kt, N as Xt, H as Zt, _ as Jt, B as Wt, V as ft } from "./app-Dk-7AjkN.js";
3
- import { u as et, a as Gt, P as Xe, b as es, _ as ts, g as ss } from "./TransferDetails.vue_vue_type_script_setup_true_lang-DWBI5ZhF.js";
4
- import { _ as Ct, u as os, i as as, e as ns } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-DeBjYaKQ.js";
1
+ import { reactive as bt, onMounted as Qe, watch as _e, computed as N, h as L, defineComponent as ce, openBlock as S, createElementBlock as T, Fragment as de, renderList as Se, createElementVNode as n, toDisplayString as q, unref as s, resolveComponent as I, createVNode as b, withCtx as R, createCommentVNode as j, ref as M, createBlock as W, normalizeClass as Z, normalizeStyle as gt, createTextVNode as Ie, nextTick as $t, mergeProps as Ze, isRef as xe, createSlots as It, Teleport as Tt, normalizeProps as Dt, guardReactiveProps as Vt } from "vue";
2
+ import { b as Me, P as _t, l as Oe, i as Ce, a6 as je, Q as Pt, at as Rt, A as qe, M as At, m as ht, ad as Je, E as fe, al as Et, au as Ot, av as qt, aw as Mt, J as kt, u as We, a as Ge, ax as Ut, ay as Nt, a5 as Bt, $ as zt, az as Lt, C as xt, a1 as Ht, d as Ee, w as jt, x as Qt, y as Yt, aA as He, a7 as pt, z as Kt, N as Xt, H as Zt, _ as Jt, B as Wt, V as ft } from "./app-C2Ssxo54.js";
3
+ import { u as et, a as Gt, P as Xe, b as es, _ as ts, g as ss } from "./TransferDetails.vue_vue_type_script_setup_true_lang-BXa7boIg.js";
4
+ import { _ as Ct, u as os, i as as, e as ns } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-CRpMLzjR.js";
5
5
  import { u as ls } from "./useTabStorage-BkIVScW_.js";
6
- import { useBreakpoints as tt, components as ge, FmButtonVariant as rs, useSnackbar as De, useDialog as is, useProxiedModel as St } from "@feedmepos/ui-library";
7
- import { P as ae, u as wt } from "./format-unit-display-BnNaGUMz.js";
8
- import { _ as us, F as ds, a as cs, b as ms } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CCFlUlmH.js";
9
- import { u as st } from "./feature-ZLrkFLAJ.js";
10
- import { c as $e, u as ps, _ as fs } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D_-30uOG.js";
6
+ import { useBreakpoints as tt, components as ge, FmButtonVariant as rs, useSnackbar as Te, useDialog as is, useProxiedModel as St } from "@feedmepos/ui-library";
7
+ import { P as ne, u as wt } from "./format-unit-display-ZzNB0Y0F.js";
8
+ import { _ as us, F as ds, a as cs, b as ms } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BmDyIfqq.js";
9
+ import { u as st, P as ps } from "./feature-DVnopfji.js";
10
+ import { c as $e, u as fs, _ as vs } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D3C8Ofy-.js";
11
11
  import { useI18n as he } from "@feedmepos/mf-common";
12
- import "./FmMultiselectDialog-DOw1_V-H.js";
13
- import { u as ot } from "./supplier-QXhc_oVR.js";
14
- import { _ as vs } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
15
- import { u as ys } from "./vue-i18n-DW4qNsx9.js";
12
+ import "./FmMultiselectDialog-_OxDskLZ.js";
13
+ import { u as ot } from "./supplier-A5hi2UDL.js";
14
+ import { _ as ys } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
15
+ import { u as bs } from "./vue-i18n-Bl0EJaRp.js";
16
16
  import "./array-Ca8T3f_G.js";
17
17
  var G = /* @__PURE__ */ ((g) => (g.Code = "Code", g.Name = "Name", g.TemplateName = "TemplateName", g.Amount = "Amount", g.Cost = "Cost", g.TotalCost = "TotalCost", g.Delete = "Delete", g))(G || {});
18
- const bs = () => (he(), L(
18
+ const gs = () => (he(), L(
19
19
  Ct,
20
20
  {
21
21
  zIndex: 50,
@@ -23,40 +23,40 @@ const bs = () => (he(), L(
23
23
  },
24
24
  `Total (${ht()})`
25
25
  ));
26
- function gs(g) {
27
- const { t: w } = he(), l = bt({}), { breakpoints: f } = tt(), x = st(), t = Me();
26
+ function _s(g) {
27
+ const { t: w } = he(), r = bt({}), { breakpoints: p } = tt(), x = st(), t = Me();
28
28
  Qe(() => {
29
- for (const b of g.items) {
30
- if (!b.totalCost)
29
+ for (const y of g.items) {
30
+ if (!y.totalCost)
31
31
  continue;
32
32
  const { cost: e } = $e(
33
- b.sku,
34
- b.quantity,
35
- b.measurement,
33
+ y.sku,
34
+ y.quantity,
35
+ y.measurement,
36
36
  {
37
37
  supplier: g.supplier
38
38
  }
39
- ), u = b.totalCost ?? _t.reset();
40
- e ? l[b.sku._id] = e.amount !== u.amount || e.precision !== u.precision : l[b.sku._id] = !0;
39
+ ), u = y.totalCost ?? _t.reset();
40
+ e ? r[y.sku._id] = e.amount !== u.amount || e.precision !== u.precision : r[y.sku._id] = !0;
41
41
  }
42
- }), _e([() => g.supplier], ([b]) => {
42
+ }), _e([() => g.supplier], ([y]) => {
43
43
  for (const e of g.items) {
44
- if (!e.totalCost || l[e.sku._id] || !v(e.sku))
44
+ if (!e.totalCost || r[e.sku._id] || !v(e.sku))
45
45
  continue;
46
46
  const { cost: u } = $e(
47
47
  e.sku,
48
48
  e.quantity,
49
49
  e.measurement,
50
50
  {
51
- supplier: b
51
+ supplier: y
52
52
  }
53
53
  );
54
54
  g.updateItem({ ...e, totalCost: u });
55
55
  }
56
56
  });
57
- function v(b) {
57
+ function v(y) {
58
58
  var u, k, a, i, h, _, C;
59
- return !!(((k = (u = b.defaultCost) == null ? void 0 : u.costPerUnit) == null ? void 0 : k.amount) ?? ((C = (_ = (h = (i = (a = g.supplier) == null ? void 0 : a.supplyItems) == null ? void 0 : i.find((r) => r.skuId === b._id)) == null ? void 0 : h.defaultCost) == null ? void 0 : _.costPerUnit) == null ? void 0 : C.amount));
59
+ return !!(((k = (u = y.defaultCost) == null ? void 0 : u.costPerUnit) == null ? void 0 : k.amount) ?? ((C = (_ = (h = (i = (a = g.supplier) == null ? void 0 : a.supplyItems) == null ? void 0 : i.find((l) => l.skuId === y._id)) == null ? void 0 : h.defaultCost) == null ? void 0 : _.costPerUnit) == null ? void 0 : C.amount));
60
60
  }
61
61
  const F = [
62
62
  {
@@ -64,8 +64,8 @@ function gs(g) {
64
64
  header: () => w("inventory.transfer.form.items.table.Code"),
65
65
  accessorKey: "code",
66
66
  size: 200,
67
- cell(b) {
68
- const e = b.row.original;
67
+ cell(y) {
68
+ const e = y.row.original;
69
69
  return t.isEnabled ? L(
70
70
  ge.FmTooltip,
71
71
  {
@@ -100,8 +100,8 @@ function gs(g) {
100
100
  id: "Name",
101
101
  header: () => w("inventory.transfer.form.items.table.Name"),
102
102
  minSize: 300,
103
- cell(b) {
104
- const e = b.row.original;
103
+ cell(y) {
104
+ const e = y.row.original;
105
105
  return t.isEnabled ? L(
106
106
  ge.FmTooltip,
107
107
  {
@@ -137,8 +137,8 @@ function gs(g) {
137
137
  header: () => w("inventory.transfer.form.items.table.Name"),
138
138
  minSize: 300,
139
139
  enableSorting: !1,
140
- cell(b) {
141
- const e = b.row.original, u = e.code, k = e.name;
140
+ cell(y) {
141
+ const e = y.row.original, u = e.code, k = e.name;
142
142
  return L(
143
143
  ge.FmTooltip,
144
144
  { zIndex: 50 },
@@ -170,9 +170,9 @@ function gs(g) {
170
170
  id: "Amount",
171
171
  header: () => w("inventory.transfer.form.items.table.Amount"),
172
172
  minSize: 200,
173
- cell(b) {
174
- var i, h, _, C, r;
175
- const e = b.row.original, u = (i = g.forecastAmounts) == null ? void 0 : i.find((m) => m.skuId === e.sku._id), k = u ? u.helperState === "error" ? `Predicted: ${u.amount} (out of range)` : `Predicted: ${u.amount}` : void 0, a = (C = (_ = (h = g.template) == null ? void 0 : h.purchaseOrder) == null ? void 0 : _.items) == null ? void 0 : C.find(
173
+ cell(y) {
174
+ var i, h, _, C, l;
175
+ const e = y.row.original, u = (i = g.forecastAmounts) == null ? void 0 : i.find((m) => m.skuId === e.sku._id), k = u ? u.helperState === "error" ? `Predicted: ${u.amount} (out of range)` : `Predicted: ${u.amount}` : void 0, a = (C = (_ = (h = g.template) == null ? void 0 : h.purchaseOrder) == null ? void 0 : _.items) == null ? void 0 : C.find(
176
176
  (m) => m.sku._id === e.sku._id
177
177
  );
178
178
  return L(us, {
@@ -189,26 +189,26 @@ function gs(g) {
189
189
  helperState: u == null ? void 0 : u.helperState,
190
190
  "onUpdate:modelValue": (m) => {
191
191
  if (!m) return;
192
- const I = {
192
+ const D = {
193
193
  ...e,
194
194
  quantity: m.amount,
195
195
  measurement: m.measurement
196
196
  };
197
197
  if (x.enableTotalCost) {
198
- const { cost: N } = $e(
199
- I.sku,
200
- I.quantity,
201
- I.measurement,
198
+ const { cost: B } = $e(
199
+ D.sku,
200
+ D.quantity,
201
+ D.measurement,
202
202
  {
203
203
  supplier: g.supplier,
204
204
  // NOTE: set undefined here if `manualTotalCost[updatedRow.sku._id] = false`, so that the function
205
205
  // will return the auto calculated default cost instead of the manual total cost
206
- manualTotalCost: l[I.sku._id] ? I.totalCost : void 0
206
+ manualTotalCost: r[D.sku._id] ? D.totalCost : void 0
207
207
  }
208
208
  );
209
- I.totalCost = N;
209
+ D.totalCost = B;
210
210
  }
211
- g.updateItem(I);
211
+ g.updateItem(D);
212
212
  },
213
213
  stepper: a == null ? void 0 : a.quantityStep,
214
214
  disableUnit: !!a,
@@ -216,7 +216,7 @@ function gs(g) {
216
216
  rules: [
217
217
  ds(
218
218
  +Ce(
219
- ((r = e.quantity) == null ? void 0 : r.amount) === 0 ? { amount: 0, precision: 0 } : (a == null ? void 0 : a.minimumQuantity) ?? { amount: 0, precision: 0 }
219
+ ((l = e.quantity) == null ? void 0 : l.amount) === 0 ? { amount: 0, precision: 0 } : (a == null ? void 0 : a.minimumQuantity) ?? { amount: 0, precision: 0 }
220
220
  )
221
221
  ),
222
222
  cs(
@@ -231,11 +231,11 @@ function gs(g) {
231
231
  },
232
232
  {
233
233
  id: "Cost",
234
- header: bs,
234
+ header: gs,
235
235
  size: 180,
236
- cell(b) {
237
- const e = b.row.original, u = v(e.sku), k = f.value.xs || f.value.sm;
238
- if (!l[e.sku._id] && u) {
236
+ cell(y) {
237
+ const e = y.row.original, u = v(e.sku), k = p.value.xs || p.value.sm;
238
+ if (!r[e.sku._id] && u) {
239
239
  const { cost: a, supplierOverrideCost: i } = $e(
240
240
  e.sku,
241
241
  e.quantity,
@@ -262,7 +262,7 @@ function gs(g) {
262
262
  g.updateItem({
263
263
  ...e,
264
264
  totalCost: a
265
- }), l[e.sku._id] = !0;
265
+ }), r[e.sku._id] = !0;
266
266
  }
267
267
  }),
268
268
  L(
@@ -357,7 +357,7 @@ function gs(g) {
357
357
  // NOTE: different from PO template, if a default cost is reenabled,
358
358
  // the total cost will automatically assigned
359
359
  totalCost: a
360
- }), l[e.sku._id] = !1;
360
+ }), r[e.sku._id] = !1;
361
361
  }
362
362
  }) : null;
363
363
  }
@@ -369,8 +369,8 @@ function gs(g) {
369
369
  {
370
370
  id: "Delete",
371
371
  header: "",
372
- cell(b) {
373
- const e = b.row.original;
372
+ cell(y) {
373
+ const e = y.row.original;
374
374
  return L("div", { class: "flex justify-end" }, [
375
375
  L(ge.FmButton, {
376
376
  key: e.sku._id,
@@ -395,47 +395,47 @@ function gs(g) {
395
395
  }
396
396
  ];
397
397
  return {
398
- columnDefs: U(() => x.enableTotalCost && g.transferType === ae.PURCHASE ? F : F.filter(
399
- (b) => b.id !== "Cost"
398
+ columnDefs: N(() => x.enableTotalCost && g.transferType === ne.PURCHASE ? F : F.filter(
399
+ (y) => y.id !== "Cost"
400
400
  /* Cost */
401
401
  ))
402
402
  };
403
403
  }
404
- const _s = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center" }, hs = { class: "fm-typo-en-body-lg-600 xs:fm-typo-en-body-md-600 mr-auto xs:w-full" }, ks = { class: "w-[450px] xs:w-full flex" }, xs = { class: "fm-typo-en-body-md-400 whitespace-nowrap" }, Cs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ft = /* @__PURE__ */ ce({
404
+ const hs = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center" }, ks = { class: "fm-typo-en-body-lg-600 xs:fm-typo-en-body-md-600 mr-auto xs:w-full" }, xs = { class: "w-[450px] xs:w-full flex" }, Cs = { class: "fm-typo-en-body-md-400 whitespace-nowrap" }, Ss = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ft = /* @__PURE__ */ ce({
405
405
  __name: "SupplierPriceHistory",
406
406
  props: {
407
407
  prices: {}
408
408
  },
409
409
  setup(g) {
410
410
  const w = ot();
411
- function l(f) {
412
- return w.suppliers.find((x) => x._id === f);
411
+ function r(p) {
412
+ return w.suppliers.find((x) => x._id === p);
413
413
  }
414
- return (f, x) => (S(), D("div", _s, [
415
- (S(!0), D(de, null, Se(Object.keys(f.prices), (t) => {
414
+ return (p, x) => (S(), T("div", hs, [
415
+ (S(!0), T(de, null, Se(Object.keys(p.prices), (t) => {
416
416
  var v;
417
- return S(), D("div", {
417
+ return S(), T("div", {
418
418
  key: t,
419
419
  class: "flex items-center gap-12 xs:gap-4 xs:flex-wrap w-full"
420
420
  }, [
421
- n("div", hs, E((v = l(t)) == null ? void 0 : v.name), 1),
422
- n("div", ks, [
423
- (S(!0), D(de, null, Se(f.prices[t].slice(0, 3), (F) => {
421
+ n("div", ks, q((v = r(t)) == null ? void 0 : v.name), 1),
422
+ n("div", xs, [
423
+ (S(!0), T(de, null, Se(p.prices[t].slice(0, 3), (F) => {
424
424
  var $;
425
- return S(), D("div", {
425
+ return S(), T("div", {
426
426
  key: F.date,
427
427
  class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
428
428
  }, [
429
- n("div", xs, [
430
- n("span", null, E(F.totalCost ? s(je)(F.totalCost) : "No data"), 1),
429
+ n("div", Cs, [
430
+ n("span", null, q(F.totalCost ? s(je)(F.totalCost) : "No data"), 1),
431
431
  x[0] || (x[0] = n("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
432
- n("span", null, E(s(Ce)(F.totalUnit, !1)), 1),
433
- n("span", null, E((($ = F.measurement) == null ? void 0 : $.abbrev) ?? F.unit.abbrev), 1)
432
+ n("span", null, q(s(Ce)(F.totalUnit, !1)), 1),
433
+ n("span", null, q((($ = F.measurement) == null ? void 0 : $.abbrev) ?? F.unit.abbrev), 1)
434
434
  ]),
435
- n("div", Cs, [
436
- n("span", null, "(#" + E(F.seqNumber) + ")", 1),
437
- x[1] || (x[1] = n("span", null, E(" "), -1)),
438
- n("span", null, E(s(Je)(new Date(F.date))), 1)
435
+ n("div", Ss, [
436
+ n("span", null, "(#" + q(F.seqNumber) + ")", 1),
437
+ x[1] || (x[1] = n("span", null, q(" "), -1)),
438
+ n("span", null, q(s(Je)(new Date(F.date))), 1)
439
439
  ])
440
440
  ]);
441
441
  }), 128))
@@ -444,10 +444,10 @@ const _s = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
444
444
  }), 128))
445
445
  ]));
446
446
  }
447
- }), Ss = { class: "flex flex-col gap-8 py-16" }, ws = { class: "flex items-center" }, Fs = { class: "flex-1 flex gap-1 items-center" }, $s = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ts = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ds = { class: "flex gap-8 w-full" }, Is = { class: "flex-1 flex flex-col gap-4" }, Vs = { class: "flex-1 flex flex-col gap-4" }, Ps = { class: "flex gap-8 w-full" }, Rs = { class: "flex-1 flex flex-col gap-4" }, As = {
447
+ }), ws = { class: "flex flex-col gap-8 py-16" }, Fs = { class: "flex items-center" }, $s = { class: "flex-1 flex gap-1 items-center" }, Is = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ts = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ds = { class: "flex gap-8 w-full" }, Vs = { class: "flex-1 flex flex-col gap-4" }, Ps = { class: "flex-1 flex flex-col gap-4" }, Rs = { class: "flex gap-8 w-full" }, As = { class: "flex-1 flex flex-col gap-4" }, Es = {
448
448
  key: 0,
449
449
  class: "flex-1 flex flex-col gap-4"
450
- }, Es = /* @__PURE__ */ ce({
450
+ }, Os = /* @__PURE__ */ ce({
451
451
  __name: "TransferItem",
452
452
  props: {
453
453
  cellByColId: {},
@@ -457,83 +457,83 @@ const _s = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
457
457
  },
458
458
  setup(g) {
459
459
  const { t: w } = he();
460
- return (l, f) => {
461
- var v, F, $, b, e, u, k, a, i, h, _, C, r, m, I, N, j, Q, Y, A, q, P, d, c, z, ne, Z;
462
- const x = T("FmLabel"), t = T("FmSpacer");
463
- return S(), D("div", Ss, [
464
- n("div", ws, [
465
- n("div", Fs, [
466
- n("span", $s, " (" + E(l.row.original.sku.code) + ") ", 1),
467
- n("span", Ts, E(l.row.original.sku.name), 1)
460
+ return (r, p) => {
461
+ var v, F, $, y, e, u, k, a, i, h, _, C, l, m, D, B, Q, Y, K, E, U, P, d, c, O, ee, X;
462
+ const x = I("FmLabel"), t = I("FmSpacer");
463
+ return S(), T("div", ws, [
464
+ n("div", Fs, [
465
+ n("div", $s, [
466
+ n("span", Is, " (" + q(r.row.original.sku.code) + ") ", 1),
467
+ n("span", Ts, q(r.row.original.sku.name), 1)
468
468
  ]),
469
469
  n("div", null, [
470
- y(s(fe), {
471
- render: ($ = (F = (v = l.cellByColId.Delete) == null ? void 0 : v.column) == null ? void 0 : F.columnDef) == null ? void 0 : $.cell,
472
- props: (e = (b = l.cellByColId.Delete) == null ? void 0 : b.getContext) == null ? void 0 : e.call(b)
470
+ b(s(fe), {
471
+ render: ($ = (F = (v = r.cellByColId.Delete) == null ? void 0 : v.column) == null ? void 0 : F.columnDef) == null ? void 0 : $.cell,
472
+ props: (e = (y = r.cellByColId.Delete) == null ? void 0 : y.getContext) == null ? void 0 : e.call(y)
473
473
  }, null, 8, ["render", "props"])
474
474
  ])
475
475
  ]),
476
476
  n("div", Ds, [
477
- n("div", Is, [
478
- y(x, {
477
+ n("div", Vs, [
478
+ b(x, {
479
479
  label: s(w)(`inventory.transfer.form.items.table.${s(G).Code}`)
480
480
  }, null, 8, ["label"]),
481
- y(s(fe), {
482
- render: (a = (k = (u = l.cellByColId[s(G).Code]) == null ? void 0 : u.column) == null ? void 0 : k.columnDef) == null ? void 0 : a.cell,
483
- props: (h = (i = l.cellByColId[s(G).Code]) == null ? void 0 : i.getContext) == null ? void 0 : h.call(i)
481
+ b(s(fe), {
482
+ render: (a = (k = (u = r.cellByColId[s(G).Code]) == null ? void 0 : u.column) == null ? void 0 : k.columnDef) == null ? void 0 : a.cell,
483
+ props: (h = (i = r.cellByColId[s(G).Code]) == null ? void 0 : i.getContext) == null ? void 0 : h.call(i)
484
484
  }, null, 8, ["render", "props"]),
485
- f[0] || (f[0] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
485
+ p[0] || (p[0] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
486
486
  ]),
487
- n("div", Vs, [
488
- y(x, {
487
+ n("div", Ps, [
488
+ b(x, {
489
489
  label: s(w)(`inventory.transfer.form.items.table.${s(G).Name}`)
490
490
  }, null, 8, ["label"]),
491
- y(s(fe), {
492
- render: (r = (C = (_ = l.cellByColId[s(G).Name]) == null ? void 0 : _.column) == null ? void 0 : C.columnDef) == null ? void 0 : r.cell,
493
- props: (I = (m = l.cellByColId[s(G).Name]) == null ? void 0 : m.getContext) == null ? void 0 : I.call(m)
491
+ b(s(fe), {
492
+ render: (l = (C = (_ = r.cellByColId[s(G).Name]) == null ? void 0 : _.column) == null ? void 0 : C.columnDef) == null ? void 0 : l.cell,
493
+ props: (D = (m = r.cellByColId[s(G).Name]) == null ? void 0 : m.getContext) == null ? void 0 : D.call(m)
494
494
  }, null, 8, ["render", "props"]),
495
- f[1] || (f[1] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
495
+ p[1] || (p[1] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
496
496
  ])
497
497
  ]),
498
- n("div", Ps, [
499
- n("div", Rs, [
500
- y(x, {
498
+ n("div", Rs, [
499
+ n("div", As, [
500
+ b(x, {
501
501
  label: s(w)(`inventory.transfer.form.items.table.${s(G).Amount}`)
502
502
  }, null, 8, ["label"]),
503
- y(s(fe), {
504
- render: (Q = (j = (N = l.cellByColId[s(G).Amount]) == null ? void 0 : N.column) == null ? void 0 : j.columnDef) == null ? void 0 : Q.cell,
505
- props: (A = (Y = l.cellByColId[s(G).Amount]) == null ? void 0 : Y.getContext) == null ? void 0 : A.call(Y)
503
+ b(s(fe), {
504
+ render: (Y = (Q = (B = r.cellByColId[s(G).Amount]) == null ? void 0 : B.column) == null ? void 0 : Q.columnDef) == null ? void 0 : Y.cell,
505
+ props: (E = (K = r.cellByColId[s(G).Amount]) == null ? void 0 : K.getContext) == null ? void 0 : E.call(K)
506
506
  }, null, 8, ["render", "props"]),
507
- f[2] || (f[2] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
507
+ p[2] || (p[2] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
508
508
  ]),
509
- l.cellByColId[s(G).Cost] ? (S(), D("div", As, [
510
- y(Ct, { "z-index": 50 }, {
509
+ r.cellByColId[s(G).Cost] ? (S(), T("div", Es, [
510
+ b(Ct, { "z-index": 50 }, {
511
511
  default: R(() => [
512
- y(x, {
512
+ b(x, {
513
513
  label: s(w)(`inventory.transfer.form.items.table.${s(G).Cost}2`)
514
514
  }, null, 8, ["label"])
515
515
  ]),
516
516
  _: 1
517
517
  }),
518
- y(s(fe), {
519
- render: (d = (P = (q = l.cellByColId[s(G).Cost]) == null ? void 0 : q.column) == null ? void 0 : P.columnDef) == null ? void 0 : d.cell,
520
- props: (z = (c = l.cellByColId[s(G).Cost]) == null ? void 0 : c.getContext) == null ? void 0 : z.call(c)
518
+ b(s(fe), {
519
+ render: (d = (P = (U = r.cellByColId[s(G).Cost]) == null ? void 0 : U.column) == null ? void 0 : P.columnDef) == null ? void 0 : d.cell,
520
+ props: (O = (c = r.cellByColId[s(G).Cost]) == null ? void 0 : c.getContext) == null ? void 0 : O.call(c)
521
521
  }, null, 8, ["render", "props"]),
522
- f[3] || (f[3] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
523
- ])) : H("", !0)
522
+ p[3] || (p[3] = n("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
523
+ ])) : j("", !0)
524
524
  ]),
525
- l.showComparePrice && Object.keys(l.comparePriceBySku[(ne = l.row.original.sku) == null ? void 0 : ne._id] ?? {}).length > 0 ? (S(), D(de, { key: 0 }, [
526
- y(t, { class: "h-8" }),
527
- y(Ft, {
528
- prices: l.comparePriceBySku[(Z = l.row.original.sku) == null ? void 0 : Z._id]
525
+ r.showComparePrice && Object.keys(r.comparePriceBySku[(ee = r.row.original.sku) == null ? void 0 : ee._id] ?? {}).length > 0 ? (S(), T(de, { key: 0 }, [
526
+ b(t, { class: "h-8" }),
527
+ b(Ft, {
528
+ prices: r.comparePriceBySku[(X = r.row.original.sku) == null ? void 0 : X._id]
529
529
  }, null, 8, ["prices"])
530
- ], 64)) : H("", !0)
530
+ ], 64)) : j("", !0)
531
531
  ]);
532
532
  };
533
533
  }
534
534
  });
535
- function Os(g) {
536
- const w = U({
535
+ function qs(g) {
536
+ const w = N({
537
537
  get() {
538
538
  const t = g.getEffectiveAt();
539
539
  return t ? new Date(t) : null;
@@ -541,42 +541,42 @@ function Os(g) {
541
541
  set(t) {
542
542
  g.setEffectiveAt((t == null ? void 0 : t.toISOString()) ?? null);
543
543
  }
544
- }), l = U({
544
+ }), r = N({
545
545
  get() {
546
546
  return !!w.value;
547
547
  },
548
548
  set(t) {
549
549
  t ? w.value = /* @__PURE__ */ new Date() : w.value = null;
550
550
  }
551
- }), f = U({
551
+ }), p = N({
552
552
  get() {
553
553
  return w.value === null ? "" : Je(w.value);
554
554
  },
555
555
  set(t) {
556
556
  t ? w.value = /* @__PURE__ */ new Date(`${t} ${x.value}`) : w.value = null;
557
557
  }
558
- }), x = U({
558
+ }), x = N({
559
559
  get() {
560
560
  return w.value === null ? "" : Et(w.value);
561
561
  },
562
562
  set(t) {
563
- t ? w.value = /* @__PURE__ */ new Date(`${f.value} ${t}`) : w.value = null;
563
+ t ? w.value = /* @__PURE__ */ new Date(`${p.value} ${t}`) : w.value = null;
564
564
  }
565
565
  });
566
566
  return {
567
567
  backdatePo: w,
568
- backdateSwitch: l,
569
- backdateModel: f,
568
+ backdateSwitch: r,
569
+ backdateModel: p,
570
570
  backdateTimeModel: x
571
571
  };
572
572
  }
573
- const qs = {
573
+ const Ms = {
574
574
  width: "24",
575
575
  height: "24",
576
576
  viewBox: "0 0 24 24",
577
577
  fill: "none",
578
578
  xmlns: "http://www.w3.org/2000/svg"
579
- }, Ms = ["fill"], Us = ["fill"], Ns = ["stroke"], zs = ["stroke"], Bs = /* @__PURE__ */ ce({
579
+ }, Us = ["fill"], Ns = ["fill"], Bs = ["stroke"], zs = ["stroke"], Ls = /* @__PURE__ */ ce({
580
580
  __name: "SparkIcon",
581
581
  props: {
582
582
  size: {
@@ -589,22 +589,22 @@ const qs = {
589
589
  }
590
590
  },
591
591
  setup(g) {
592
- return (w, l) => (S(), D("svg", qs, [
592
+ return (w, r) => (S(), T("svg", Ms, [
593
593
  n("path", {
594
594
  d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
595
595
  fill: g.color
596
- }, null, 8, Ms),
596
+ }, null, 8, Us),
597
597
  n("path", {
598
598
  d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
599
599
  fill: g.color
600
- }, null, 8, Us),
600
+ }, null, 8, Ns),
601
601
  n("path", {
602
602
  d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
603
603
  stroke: g.color,
604
604
  "stroke-width": "1.5",
605
605
  "stroke-linecap": "round",
606
606
  "stroke-linejoin": "round"
607
- }, null, 8, Ns),
607
+ }, null, 8, Bs),
608
608
  n("path", {
609
609
  d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
610
610
  stroke: g.color,
@@ -614,7 +614,7 @@ const qs = {
614
614
  }, null, 8, zs)
615
615
  ]));
616
616
  }
617
- }), Ls = { class: "flex gap-8 items-center" }, Hs = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, js = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, Qs = { class: "flex items-center w-full" }, Ys = { class: "flex-1" }, Ks = { class: "fm-typo-en-title-sm-800" }, Xs = { class: "flex items-start gap-8" }, Zs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Js = { class: "flex gap-1" }, Ws = /* @__PURE__ */ ce({
617
+ }), Hs = { class: "flex gap-8 items-center" }, js = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, Qs = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, Ys = { class: "flex items-center w-full" }, Ks = { class: "flex-1" }, Xs = { class: "fm-typo-en-title-sm-800" }, Zs = { class: "flex items-start gap-8" }, Js = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ws = { class: "flex gap-1" }, Gs = /* @__PURE__ */ ce({
618
618
  __name: "ForecastStock",
619
619
  props: {
620
620
  templateId: {},
@@ -624,8 +624,8 @@ const qs = {
624
624
  },
625
625
  emits: ["update:poItems", "update:forecastAmounts"],
626
626
  setup(g, { emit: w }) {
627
- const l = g, f = w, x = O(!1), t = O(7), v = os(), F = De(), { t: $ } = he();
628
- function b(a, i, h) {
627
+ const r = g, p = w, x = M(!1), t = M(7), v = os(), F = Te(), { t: $ } = he();
628
+ function y(a, i, h) {
629
629
  return i != null && a < i && (a = i), h != null && a > h && (a = h), a;
630
630
  }
631
631
  function e(a) {
@@ -638,33 +638,33 @@ const qs = {
638
638
  name: h,
639
639
  baseAmount: _,
640
640
  measurement: C,
641
- min: r,
641
+ min: l,
642
642
  max: m
643
643
  }) {
644
644
  if (C) {
645
- const I = C.conversion.amount;
646
- let N = Math.ceil(_ / I);
647
- return N = b(N, r, m), {
645
+ const D = C.conversion.amount;
646
+ let B = Math.ceil(_ / D);
647
+ return B = y(B, l, m), {
648
648
  sku: a,
649
649
  code: i,
650
650
  name: h,
651
- quantity: { amount: N, precision: 0 },
651
+ quantity: { amount: B, precision: 0 },
652
652
  measurement: C
653
653
  };
654
654
  } else {
655
- const I = Math.ceil(b(_, r, m));
655
+ const D = Math.ceil(y(_, l, m));
656
656
  return {
657
657
  sku: a,
658
658
  code: i,
659
659
  name: h,
660
- quantity: { amount: I, precision: 0 },
660
+ quantity: { amount: D, precision: 0 },
661
661
  measurement: null
662
662
  };
663
663
  }
664
664
  }
665
665
  async function k() {
666
666
  if (t.value < 1) return;
667
- x.value = !1, await v.readPurchaseOrder(t.value, l.templateId);
667
+ x.value = !1, await v.readPurchaseOrder(t.value, r.templateId);
668
668
  const a = v.purchaseOrderForecast.skus;
669
669
  if (a.length === 0) {
670
670
  F.open({
@@ -673,47 +673,47 @@ const qs = {
673
673
  });
674
674
  return;
675
675
  }
676
- const i = l.templateItems.reduce((_, C) => {
677
- var N;
678
- const r = (N = l.poItems) == null ? void 0 : N.find((j) => j.sku._id === C.sku._id), m = a.find((j) => j.id === C.sku._id);
676
+ const i = r.templateItems.reduce((_, C) => {
677
+ var B;
678
+ const l = (B = r.poItems) == null ? void 0 : B.find((Q) => Q.sku._id === C.sku._id), m = a.find((Q) => Q.id === C.sku._id);
679
679
  if (!m)
680
- return r && _.push(r), _;
681
- if (!l.templateId && m.amount <= 0) return _;
682
- const I = m.amount ?? e(r == null ? void 0 : r.quantity) ?? 0;
680
+ return l && _.push(l), _;
681
+ if (!r.templateId && m.amount <= 0) return _;
682
+ const D = m.amount ?? e(l == null ? void 0 : l.quantity) ?? 0;
683
683
  return _.push(
684
684
  u({
685
685
  sku: C.sku,
686
686
  code: C.code,
687
687
  name: C.name,
688
- baseAmount: I,
688
+ baseAmount: D,
689
689
  measurement: C.measurement || null,
690
690
  min: e(C.minimumQuantity),
691
691
  max: e(C.maximumQuantity)
692
692
  })
693
693
  ), _;
694
694
  }, []), h = a.map((_) => {
695
- const C = l.templateItems.find((Q) => Q.sku._id === _.id);
696
- let r = _.amount, m = 0;
695
+ const C = r.templateItems.find((Y) => Y.sku._id === _.id);
696
+ let l = _.amount, m = 0;
697
697
  if (C != null && C.measurement) {
698
- const Q = e(C.measurement.conversion) ?? 1;
699
- r = Math.ceil(_.amount / Q);
698
+ const Y = e(C.measurement.conversion) ?? 1;
699
+ l = Math.ceil(_.amount / Y);
700
700
  } else
701
- r = Math.ceil(_.amount);
702
- const I = e(C == null ? void 0 : C.minimumQuantity) ?? 0, N = e(C == null ? void 0 : C.maximumQuantity) ?? 1 / 0, j = r < I || r > N ? "error" : "success";
703
- return { skuId: _.id, amount: r, precision: m, helperState: j };
701
+ l = Math.ceil(_.amount);
702
+ const D = e(C == null ? void 0 : C.minimumQuantity) ?? 0, B = e(C == null ? void 0 : C.maximumQuantity) ?? 1 / 0, Q = l < D || l > B ? "error" : "success";
703
+ return { skuId: _.id, amount: l, precision: m, helperState: Q };
704
704
  });
705
- f("update:poItems", i), f("update:forecastAmounts", h);
705
+ p("update:poItems", i), p("update:forecastAmounts", h);
706
706
  }
707
707
  return (a, i) => {
708
- const h = T("FmButton"), _ = T("FmIcon"), C = T("FmStepperField"), r = T("FmPopover");
709
- return S(), J(r, {
708
+ const h = I("FmButton"), _ = I("FmIcon"), C = I("FmStepperField"), l = I("FmPopover");
709
+ return S(), W(l, {
710
710
  disabled: a.disabled,
711
711
  class: "flex",
712
712
  "show-popover": x.value,
713
713
  onPopoverChanged: i[3] || (i[3] = (m) => x.value = m)
714
714
  }, {
715
715
  "popover-button": R(() => [
716
- y(h, {
716
+ b(h, {
717
717
  label: "unused",
718
718
  variant: "secondary",
719
719
  "text-color": a.disabled ? "disabled" : "primary",
@@ -722,61 +722,61 @@ const qs = {
722
722
  disabled: a.disabled
723
723
  }, {
724
724
  default: R(() => [
725
- n("div", Ls, [
726
- y(Bs, {
725
+ n("div", Hs, [
726
+ b(Ls, {
727
727
  size: 24,
728
728
  color: a.disabled ? "#c7c7cc" : "#ff7823"
729
729
  }, null, 8, ["color"]),
730
- n("div", Hs, E(s($)("inventory.transfer.form.items.forecastStock.title")), 1)
730
+ n("div", js, q(s($)("inventory.transfer.form.items.forecastStock.title")), 1)
731
731
  ])
732
732
  ]),
733
733
  _: 1
734
734
  }, 8, ["text-color", "border-color", "disabled"])
735
735
  ]),
736
736
  default: R(() => [
737
- n("div", js, [
738
- n("div", Qs, [
739
- n("div", Ys, [
740
- y(vs, { "z-index": 99 }, {
737
+ n("div", Qs, [
738
+ n("div", Ys, [
739
+ n("div", Ks, [
740
+ b(ys, { "z-index": 99 }, {
741
741
  default: R(() => [
742
- n("p", Ks, E(s($)("inventory.transfer.form.items.forecastStock.title")), 1)
742
+ n("p", Xs, q(s($)("inventory.transfer.form.items.forecastStock.title")), 1)
743
743
  ]),
744
744
  _: 1
745
745
  })
746
746
  ]),
747
- y(h, {
747
+ b(h, {
748
748
  icon: "close",
749
749
  size: "md",
750
750
  variant: "tertiary",
751
751
  onClick: i[0] || (i[0] = (m) => x.value = !1)
752
752
  })
753
753
  ]),
754
- y(C, {
754
+ b(C, {
755
755
  modelValue: t.value,
756
756
  "onUpdate:modelValue": i[1] || (i[1] = (m) => t.value = m),
757
757
  label: s($)("inventory.transfer.form.items.forecastStock.days"),
758
758
  rules: [s(qe)(1)]
759
759
  }, {
760
760
  "helper-text": R(() => [
761
- n("div", Xs, [
762
- y(_, {
761
+ n("div", Zs, [
762
+ b(_, {
763
763
  name: "warning",
764
764
  size: "sm",
765
765
  class: "text-fm-color-system-warning-300"
766
766
  }),
767
- n("div", Zs, E(s($)("inventory.transfer.form.items.forecastStock.replace")), 1)
767
+ n("div", Js, q(s($)("inventory.transfer.form.items.forecastStock.replace")), 1)
768
768
  ])
769
769
  ]),
770
770
  _: 1
771
771
  }, 8, ["modelValue", "label", "rules"]),
772
- n("div", Js, [
772
+ n("div", Ws, [
773
773
  i[4] || (i[4] = n("div", { class: "grow" }, null, -1)),
774
- y(h, {
774
+ b(h, {
775
775
  label: s($)("common.cancel"),
776
776
  variant: "tertiary",
777
777
  onClick: i[2] || (i[2] = (m) => x.value = !1)
778
778
  }, null, 8, ["label"]),
779
- y(h, {
779
+ b(h, {
780
780
  label: s($)("inventory.transfer.form.items.forecastStock.generate"),
781
781
  onClick: k
782
782
  }, null, 8, ["label"])
@@ -788,14 +788,14 @@ const qs = {
788
788
  };
789
789
  }
790
790
  });
791
- function Gs() {
792
- const g = De(), w = et(), l = O(!1);
793
- _e(l, (v) => {
794
- v && (x.value = !0, f().finally(() => {
791
+ function eo() {
792
+ const g = Te(), w = et(), r = M(!1);
793
+ _e(r, (v) => {
794
+ v && (x.value = !0, p().finally(() => {
795
795
  x.value = !1;
796
796
  }));
797
797
  });
798
- async function f() {
798
+ async function p() {
799
799
  try {
800
800
  const { startDate: v, endDate: F } = Ot(6), e = (await w.getPurchaseOrders({ start: v, end: F })).filter(
801
801
  (u) => {
@@ -823,17 +823,17 @@ function Gs() {
823
823
  g.open({
824
824
  title: "Something went wrong",
825
825
  message: "Cannot retrieve supplier purchase history. Please try again."
826
- }), l.value = !1;
826
+ }), r.value = !1;
827
827
  }
828
828
  }
829
- const x = O(!1), t = O({});
829
+ const x = M(!1), t = M({});
830
830
  return {
831
- comparePricesToggle: l,
831
+ comparePricesToggle: r,
832
832
  comparePriceFetching: x,
833
833
  comparePriceBySku: t
834
834
  };
835
835
  }
836
- const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }, so = ["colspan"], oo = /* @__PURE__ */ ce({
836
+ const to = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, so = { key: 0 }, oo = ["colspan"], ao = /* @__PURE__ */ ce({
837
837
  __name: "TransferItemTable",
838
838
  props: {
839
839
  templateItem: {},
@@ -844,30 +844,30 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
844
844
  },
845
845
  emits: ["update:item"],
846
846
  setup(g) {
847
- function w(l) {
848
- return l.column.columnDef.meta;
847
+ function w(r) {
848
+ return r.column.columnDef.meta;
849
849
  }
850
- return (l, f) => {
850
+ return (r, p) => {
851
851
  var x, t;
852
- return S(), D(de, null, [
852
+ return S(), T(de, null, [
853
853
  n("tr", {
854
- class: K(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm", {
855
- "bg-fm-color-neutral-gray-100": l.row.getIsSelected()
854
+ class: Z(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm", {
855
+ "bg-fm-color-neutral-gray-100": r.row.getIsSelected()
856
856
  }])
857
857
  }, [
858
- (S(!0), D(de, null, Se(l.row.getVisibleCells(), (v) => {
859
- var F, $, b, e;
860
- return S(), D("td", {
858
+ (S(!0), T(de, null, Se(r.row.getVisibleCells(), (v) => {
859
+ var F, $, y, e;
860
+ return S(), T("td", {
861
861
  key: v.id,
862
- class: K(["h-[56px] text-fm-color-typo-primary", ((F = w(v)) == null ? void 0 : F.cellClass) ?? "px-16"]),
862
+ class: Z(["h-[56px] text-fm-color-typo-primary", ((F = w(v)) == null ? void 0 : F.cellClass) ?? "px-16"]),
863
863
  style: gt({
864
864
  width: ($ = w(v)) == null ? void 0 : $.width,
865
- maxWidth: (b = w(v)) == null ? void 0 : b.maxWidth,
865
+ maxWidth: (y = w(v)) == null ? void 0 : y.maxWidth,
866
866
  textAlign: ((e = w(v)) == null ? void 0 : e.textAlign) ?? "left"
867
867
  })
868
868
  }, [
869
- n("span", eo, [
870
- y(s(fe), {
869
+ n("span", to, [
870
+ b(s(fe), {
871
871
  render: v.column.columnDef.cell,
872
872
  props: v.getContext()
873
873
  }, null, 8, ["render", "props"])
@@ -875,25 +875,25 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
875
875
  ], 6);
876
876
  }), 128))
877
877
  ], 2),
878
- l.showComparePrice && Object.keys(l.comparePriceBySku[(x = l.row.original.sku) == null ? void 0 : x._id] ?? {}).length > 0 ? (S(), D("tr", to, [
878
+ r.showComparePrice && Object.keys(r.comparePriceBySku[(x = r.row.original.sku) == null ? void 0 : x._id] ?? {}).length > 0 ? (S(), T("tr", so, [
879
879
  n("td", {
880
- colspan: l.row.getVisibleCells().length
880
+ colspan: r.row.getVisibleCells().length
881
881
  }, [
882
- y(Ft, {
883
- prices: l.comparePriceBySku[(t = l.row.original.sku) == null ? void 0 : t._id]
882
+ b(Ft, {
883
+ prices: r.comparePriceBySku[(t = r.row.original.sku) == null ? void 0 : t._id]
884
884
  }, null, 8, ["prices"])
885
- ], 8, so)
886
- ])) : H("", !0)
885
+ ], 8, oo)
886
+ ])) : j("", !0)
887
887
  ], 64);
888
888
  };
889
889
  }
890
- }), ao = {
890
+ }), no = {
891
891
  key: 0,
892
892
  class: "flex flex-col gap-8"
893
- }, no = { class: "flex flex-col gap-4" }, lo = { class: "flex items-center gap-4" }, ro = {
893
+ }, lo = { class: "flex flex-col gap-4" }, ro = { class: "flex items-center gap-4" }, io = {
894
894
  key: 0,
895
895
  class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
896
- }, io = /* @__PURE__ */ ce({
896
+ }, uo = /* @__PURE__ */ ce({
897
897
  __name: "NetSuiteField",
898
898
  props: {
899
899
  required: { type: Boolean },
@@ -905,7 +905,7 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
905
905
  },
906
906
  emits: ["netsuite:ready"],
907
907
  setup(g, { emit: w }) {
908
- const l = Me(), f = g, x = w, { t } = ys(), v = O(!1), F = O();
908
+ const r = Me(), p = g, x = w, { t } = bs(), v = M(!1), F = M();
909
909
  Qe(() => {
910
910
  var u, k, a, i;
911
911
  let e = {
@@ -913,14 +913,14 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
913
913
  subsidiary: { id: "", name: "" },
914
914
  errors: []
915
915
  };
916
- if (!l.isEnabled || !f.required) {
916
+ if (!r.isEnabled || !p.required) {
917
917
  x("netsuite:ready", e);
918
918
  return;
919
919
  }
920
920
  try {
921
- const h = l.currentLocationSubsidiary();
922
- f.setting ? e = {
923
- ...f.setting,
921
+ const h = r.currentLocationSubsidiary();
922
+ p.setting ? e = {
923
+ ...p.setting,
924
924
  subsidiary: {
925
925
  id: h.id || "",
926
926
  name: h.name
@@ -932,64 +932,64 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
932
932
  name: h.name
933
933
  }
934
934
  };
935
- const _ = l.getAvailableItems(h.id), C = f.items.filter((r) => {
936
- if (r.measurement != null) {
937
- const m = l.getAvailableMeasurements(
938
- r.sku._id,
935
+ const _ = r.getAvailableItems(h.id), C = p.items.filter((l) => {
936
+ if (l.measurement != null) {
937
+ const m = r.getAvailableMeasurements(
938
+ l.sku._id,
939
939
  h.id
940
940
  );
941
- return _.includes(r.sku._id) && m.includes(r.measurement.id);
941
+ return _.includes(l.sku._id) && m.includes(l.measurement.id);
942
942
  }
943
- return _.includes(r.sku._id);
944
- }).map((r) => r.sku._id);
945
- f.onChange(
946
- f.items.filter((r) => C.includes(r.sku._id)),
943
+ return _.includes(l.sku._id);
944
+ }).map((l) => l.sku._id);
945
+ p.onChange(
946
+ p.items.filter((l) => C.includes(l.sku._id)),
947
947
  e
948
948
  );
949
949
  } finally {
950
- f.supplier.internal ? F.value = l.getNetSuiteLocation(
951
- `${f.supplier.internal}_${f.supplier._id}`
952
- ) : F.value = l.getNetSuiteVendor(f.supplier._id);
953
- const h = f.supplier.internal ? l.getLocationSubsidiary((u = F.value) == null ? void 0 : u.netSuiteId).id : (k = F.value) == null ? void 0 : k.subsidiaryId, _ = f.supplier.internal ? (a = l.currentLocationSubsidiary()) == null ? void 0 : a.id : (i = l.currentVendorSubsidiary(f.supplier._id)) == null ? void 0 : i.id;
954
- !l.isEnabled || h && l.isEnabled && h == _ ? x("netsuite:ready", e) : v.value = !0;
950
+ p.supplier.internal ? F.value = r.getNetSuiteLocation(
951
+ `${p.supplier.internal}_${p.supplier._id}`
952
+ ) : F.value = r.getNetSuiteVendor(p.supplier._id);
953
+ const h = p.supplier.internal ? r.getLocationSubsidiary((u = F.value) == null ? void 0 : u.netSuiteId).id : (k = F.value) == null ? void 0 : k.subsidiaryId, _ = p.supplier.internal ? (a = r.currentLocationSubsidiary()) == null ? void 0 : a.id : (i = r.currentVendorSubsidiary(p.supplier._id)) == null ? void 0 : i.id;
954
+ !r.isEnabled || h && r.isEnabled && h == _ ? x("netsuite:ready", e) : v.value = !0;
955
955
  }
956
956
  });
957
- const $ = U(
958
- () => f.supplier.internal ? l.currentLocationSubsidiary() : l.currentVendorSubsidiary(f.supplier._id)
959
- ), b = U(() => {
957
+ const $ = N(
958
+ () => p.supplier.internal ? r.currentLocationSubsidiary() : r.currentVendorSubsidiary(p.supplier._id)
959
+ ), y = N(() => {
960
960
  var e, u;
961
- return F.value == null ? `Cannot find the NetSuite location for "${f.supplier.name}"` : `The subsidiary of the request
962
- location is ${(u = l.getLocationSubsidiary((e = F.value) == null ? void 0 : e.netSuiteId)) == null ? void 0 : u.fullName}`;
961
+ return F.value == null ? `Cannot find the NetSuite location for "${p.supplier.name}"` : `The subsidiary of the request
962
+ location is ${(u = r.getLocationSubsidiary((e = F.value) == null ? void 0 : e.netSuiteId)) == null ? void 0 : u.fullName}`;
963
963
  });
964
964
  return (e, u) => {
965
- const k = T("FmLabel"), a = T("FmIcon"), i = T("FmField"), h = T("FmTooltip");
966
- return s(l).isEnabled && f.required ? (S(), D("div", ao, [
967
- y(k, {
965
+ const k = I("FmLabel"), a = I("FmIcon"), i = I("FmField"), h = I("FmTooltip");
966
+ return s(r).isEnabled && p.required ? (S(), T("div", no, [
967
+ b(k, {
968
968
  label: `NetSuite ${s(t)("inventory.transfer.form.netsuite.subsidiary")}`
969
969
  }, null, 8, ["label"]),
970
- n("div", no, [
971
- y(h, {
970
+ n("div", lo, [
971
+ b(h, {
972
972
  "z-index": 51,
973
973
  placement: "left",
974
974
  disabled: e.disabled
975
975
  }, {
976
976
  content: R(() => u[0] || (u[0] = [
977
- Te("This field is locked and based on the location of the request.")
977
+ Ie("This field is locked and based on the location of the request.")
978
978
  ])),
979
979
  default: R(() => [
980
- y(i, null, {
980
+ b(i, null, {
981
981
  default: R(() => {
982
982
  var _;
983
983
  return [
984
- n("div", lo, [
985
- y(a, {
984
+ n("div", ro, [
985
+ b(a, {
986
986
  name: "lock_outline",
987
987
  size: "sm",
988
988
  color: e.disabled ? "neutral-gray-200" : "neutral-gray-400"
989
989
  }, null, 8, ["color"]),
990
990
  n("div", {
991
- class: K([e.disabled ? "text-fm-color-typo-disabled" : ""])
992
- }, E((_ = $.value) == null ? void 0 : _.fullName), 3)
991
+ class: Z([e.disabled ? "text-fm-color-typo-disabled" : ""])
992
+ }, q((_ = $.value) == null ? void 0 : _.fullName), 3)
993
993
  ])
994
994
  ];
995
995
  }),
@@ -998,21 +998,21 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
998
998
  ]),
999
999
  _: 1
1000
1000
  }, 8, ["disabled"]),
1001
- v.value ? (S(), D("div", ro, E(b.value), 1)) : H("", !0)
1001
+ v.value ? (S(), T("div", io, q(y.value), 1)) : j("", !0)
1002
1002
  ])
1003
- ])) : H("", !0);
1003
+ ])) : j("", !0);
1004
1004
  };
1005
1005
  }
1006
- }), uo = { class: "flex flex-col gap-4" }, co = { class: "flex items-center gap-8 overflow-x-auto pb-12" }, mo = { class: "flex flex-col gap-16" }, po = { class: "flex flex-col gap-24" }, fo = { class: "flex flex-col gap-8" }, vo = { class: "flex flex-col gap-4" }, yo = { class: "flex items-center gap-4" }, bo = { class: "flex flex-col gap-8" }, go = { class: "flex flex-col gap-4" }, _o = { class: "flex items-center gap-4" }, ho = {
1006
+ }), co = { class: "flex flex-col gap-4" }, mo = { class: "flex items-center gap-8 overflow-x-auto pb-12" }, po = { class: "flex flex-col gap-16" }, fo = { class: "flex flex-col gap-24" }, vo = { class: "flex flex-col gap-8" }, yo = { class: "flex flex-col gap-4" }, bo = { class: "flex items-center gap-4" }, go = { class: "flex flex-col gap-8" }, _o = { class: "flex flex-col gap-4" }, ho = { class: "flex items-center gap-4" }, ko = {
1007
1007
  key: 3,
1008
1008
  class: "p-16 border border-fm-color-neutral-gray-300 fm-corner-radius-md flex flex-col"
1009
- }, ko = {
1009
+ }, xo = {
1010
1010
  key: 0,
1011
1011
  class: "flex-1 flex gap-8 h-48 xs:flex-col xs:pt-16 sm:flex-col sm:pt-16"
1012
- }, xo = { class: "flex-1" }, Co = { class: "flex-1" }, So = {
1012
+ }, Co = { class: "flex-1" }, So = { class: "flex-1" }, wo = {
1013
1013
  key: 1,
1014
1014
  class: "flex items-center gap-4"
1015
- }, wo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" }, Fo = { class: "flex flex-col gap-16" }, $o = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, To = { class: "flex gap-8" }, Do = { key: 0 }, Io = /* @__PURE__ */ ce({
1015
+ }, Fo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" }, $o = { class: "flex flex-col gap-16" }, Io = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, To = { class: "flex gap-8" }, Do = { key: 0 }, Vo = /* @__PURE__ */ ce({
1016
1016
  __name: "TransferForm2",
1017
1017
  props: {
1018
1018
  modelValue: {},
@@ -1023,43 +1023,43 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1023
1023
  lastClosingDate: {}
1024
1024
  },
1025
1025
  emits: ["validation-success", "form:ready"],
1026
- setup(g, { expose: w, emit: l }) {
1027
- const f = g, x = l, t = kt(), { t: v } = he(), F = We(), $ = Ge(), b = Me(), e = ot(), u = st(), k = wt(), { breakpoints: a } = tt(), i = U(() => a.value.xs || a.value.sm), h = bt({
1026
+ setup(g, { expose: w, emit: r }) {
1027
+ const p = g, x = r, t = kt(), { t: v } = he(), F = We(), $ = Ge(), y = Me(), e = ot(), u = st(), k = wt(), { breakpoints: a } = tt(), i = N(() => a.value.xs || a.value.sm), h = bt({
1028
1028
  value: !1
1029
- }), _ = O(!1), C = O(0), r = O([]), m = U(
1029
+ }), _ = M(!1), C = M(0), l = M([]), m = N(
1030
1030
  () => {
1031
1031
  var o;
1032
- return ((o = f.modelValue) == null ? void 0 : o.templateDoc) ?? k.templates.find((p) => p._id === t.template);
1032
+ return ((o = p.modelValue) == null ? void 0 : o.templateDoc) ?? k.templates.find((f) => f._id === t.template);
1033
1033
  }
1034
- ), I = U(() => t.status === "DRAFT" || !t._rev);
1034
+ ), D = N(() => t.status === "DRAFT" || !t._rev);
1035
1035
  _e(m, (o) => {
1036
- var p, M;
1036
+ var f, A;
1037
1037
  if (o) {
1038
1038
  if (o && !o.purchaseOrder.supplier)
1039
1039
  throw new Error("Template order must have a source location");
1040
- if (I.value) {
1041
- const W = (p = o.purchaseOrder) == null ? void 0 : p.supplier.internal;
1042
- if (W && (W == "restaurant" || W == "warehouse")) {
1043
- const le = (M = o.purchaseOrder) == null ? void 0 : M.supplier._id, re = `${W}_${le}`, X = F.allLocations.find(
1044
- (ie) => ie.type === W && ie.dbName === re
1040
+ if (D.value) {
1041
+ const H = (f = o.purchaseOrder) == null ? void 0 : f.supplier.internal;
1042
+ if (H && (H == "restaurant" || H == "warehouse")) {
1043
+ const le = (A = o.purchaseOrder) == null ? void 0 : A.supplier._id, re = `${H}_${le}`, J = F.allLocations.find(
1044
+ (ie) => ie.type === H && ie.dbName === re
1045
1045
  );
1046
- if (X) {
1046
+ if (J) {
1047
1047
  const ie = {
1048
1048
  ...o.purchaseOrder.supplier,
1049
- name: X.doc.profile.name,
1050
- contactName: X.doc.profile.name,
1051
- email: X.doc.profile.email,
1052
- phoneNumber: X.doc.profile.phoneNo,
1053
- registrationNumber: X.doc.profile.regNo,
1054
- address: X.doc.profile.address
1049
+ name: J.doc.profile.name,
1050
+ contactName: J.doc.profile.name,
1051
+ email: J.doc.profile.email,
1052
+ phoneNumber: J.doc.profile.phoneNo,
1053
+ registrationNumber: J.doc.profile.regNo,
1054
+ address: J.doc.profile.address
1055
1055
  };
1056
1056
  t.supplier = ie;
1057
1057
  }
1058
1058
  } else {
1059
1059
  const le = e.suppliers.find(
1060
1060
  (re) => {
1061
- var X;
1062
- return re._id === ((X = o.purchaseOrder.supplier) == null ? void 0 : X._id);
1061
+ var J;
1062
+ return re._id === ((J = o.purchaseOrder.supplier) == null ? void 0 : J._id);
1063
1063
  }
1064
1064
  );
1065
1065
  t.supplier = le ?? t.supplier;
@@ -1071,107 +1071,108 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1071
1071
  }), Qe(() => {
1072
1072
  var o;
1073
1073
  try {
1074
- if (t.items = t.items.map((p) => ({ ...p, id: p.id ?? p.sku._id })), !t.template) return;
1075
- t.items.length || (t.items = ((o = m.value) == null ? void 0 : o.purchaseOrder.items) ?? []);
1074
+ const f = $.skuById;
1075
+ let A = t.items.map((H) => ({ ...H, id: H.id ?? H.sku._id }));
1076
+ t.template && (t.items.length || (A = ((o = m.value) == null ? void 0 : o.purchaseOrder.items) ?? [])), t.items = A.filter((H) => !f[H.sku._id].isInactive);
1076
1077
  } finally {
1077
1078
  _.value = !0;
1078
1079
  }
1079
- }), _e([_, h], ([o, p], [M, W]) => {
1080
- p.value && W.value && x("form:ready");
1080
+ }), _e([_, h], ([o, f], [A, H]) => {
1081
+ f.value && H.value && x("form:ready");
1081
1082
  });
1082
- const N = U(
1083
+ const B = N(
1083
1084
  () => F.currentLocation.type === Ut.restaurant
1084
1085
  );
1085
1086
  F.watchLocation(async () => {
1086
1087
  location && (t.supplier || (t.supplier = e.suppliers.find((o) => o) ?? t.supplier));
1087
1088
  });
1088
- const j = is(), Q = ps(
1089
+ const Q = is(), Y = fs(
1089
1090
  () => t,
1090
1091
  (o) => {
1091
1092
  Object.assign(t, o);
1092
1093
  },
1093
1094
  !0,
1094
1095
  !0
1095
- ), Y = U({
1096
+ ), K = N({
1096
1097
  get() {
1097
1098
  var o;
1098
- return typeof ((o = t == null ? void 0 : t.supplier) == null ? void 0 : o.internal) == "string" ? ae.TRANSFER : ae.PURCHASE;
1099
+ return typeof ((o = t == null ? void 0 : t.supplier) == null ? void 0 : o.internal) == "string" ? ne.TRANSFER : ne.PURCHASE;
1099
1100
  },
1100
1101
  set(o) {
1101
- var M;
1102
- const p = typeof ((M = t == null ? void 0 : t.supplier) == null ? void 0 : M.internal) == "string" ? ae.TRANSFER : ae.PURCHASE;
1103
- o !== p && (t.supplier = o === ae.PURCHASE ? Q.locationOptionsTypePurchase.value[0] : Q.locationOptionsTypeTransfer.value[0]);
1102
+ var A;
1103
+ const f = typeof ((A = t == null ? void 0 : t.supplier) == null ? void 0 : A.internal) == "string" ? ne.TRANSFER : ne.PURCHASE;
1104
+ o !== f && (t.supplier = o === ne.PURCHASE ? Y.locationOptionsTypePurchase.value[0] : Y.locationOptionsTypeTransfer.value[0]);
1104
1105
  }
1105
1106
  });
1106
1107
  _e(
1107
1108
  () => {
1108
1109
  var o;
1109
- return (o = f.modelValue) == null ? void 0 : o.template;
1110
+ return (o = p.modelValue) == null ? void 0 : o.template;
1110
1111
  },
1111
1112
  (o) => {
1112
1113
  u.mustUsePoTemplate && !o && $t(() => {
1113
- var p, M;
1114
- t.supplier = ((M = (p = Q.locationOptionsTypeTransfer.value) == null ? void 0 : p.filter(
1115
- (W) => W.internal === "restaurant"
1116
- )) == null ? void 0 : M[0]) ?? t.supplier;
1114
+ var f, A;
1115
+ t.supplier = ((A = (f = Y.locationOptionsTypeTransfer.value) == null ? void 0 : f.filter(
1116
+ (H) => H.internal === "restaurant"
1117
+ )) == null ? void 0 : A[0]) ?? t.supplier;
1117
1118
  });
1118
1119
  },
1119
1120
  { immediate: !0 }
1120
1121
  );
1121
- const A = U(() => {
1122
- let o = Q.transferLocationOptions.value;
1123
- return u.mustUsePoTemplate && !t.template && (o = o.filter((p) => {
1124
- var M;
1125
- return (M = p.sublabel) == null ? void 0 : M.startsWith("restaurant");
1122
+ const E = N(() => {
1123
+ let o = Y.transferLocationOptions.value;
1124
+ return u.mustUsePoTemplate && !t.template && (o = o.filter((f) => {
1125
+ var A;
1126
+ return (A = f.sublabel) == null ? void 0 : A.startsWith("restaurant");
1126
1127
  })), o;
1127
- }), q = U({
1128
+ }), U = N({
1128
1129
  get() {
1129
1130
  var o;
1130
1131
  return (o = t.supplier) == null ? void 0 : o._id;
1131
1132
  },
1132
1133
  set(o) {
1133
- Q.transferLocationModel.value = o;
1134
+ Y.transferLocationModel.value = o;
1134
1135
  }
1135
- }), P = U({
1136
+ }), P = N({
1136
1137
  get() {
1137
1138
  return t.remark ?? void 0;
1138
1139
  },
1139
1140
  set(o) {
1140
1141
  t.remark = o;
1141
1142
  }
1142
- }), { backdatePo: d, backdateSwitch: c, backdateModel: z, backdateTimeModel: ne } = Os({
1143
+ }), { backdatePo: d, backdateSwitch: c, backdateModel: O, backdateTimeModel: ee } = qs({
1143
1144
  getEffectiveAt() {
1144
1145
  return t.effectiveAt;
1145
1146
  },
1146
1147
  setEffectiveAt(o) {
1147
1148
  t.effectiveAt = o;
1148
1149
  }
1149
- }), { comparePricesToggle: Z, comparePriceFetching: ke, comparePriceBySku: ve } = Gs(), me = O();
1150
+ }), { comparePricesToggle: X, comparePriceFetching: ke, comparePriceBySku: ve } = eo(), me = M();
1150
1151
  w({
1151
1152
  validateInputs: () => {
1152
- var o, p;
1153
- (p = (o = me.value) == null ? void 0 : o.validateInputs) == null || p.call(o);
1153
+ var o, f;
1154
+ (f = (o = me.value) == null ? void 0 : o.validateInputs) == null || f.call(o);
1154
1155
  },
1155
1156
  resetInputsValidation: () => {
1156
- var o, p;
1157
- (p = (o = me.value) == null ? void 0 : o.resetInputsValidation) == null || p.call(o);
1157
+ var o, f;
1158
+ (f = (o = me.value) == null ? void 0 : o.resetInputsValidation) == null || f.call(o);
1158
1159
  },
1159
1160
  resetInputs: () => {
1160
- var o, p;
1161
- (p = (o = me.value) == null ? void 0 : o.resetInputs) == null || p.call(o);
1161
+ var o, f;
1162
+ (f = (o = me.value) == null ? void 0 : o.resetInputs) == null || f.call(o);
1162
1163
  }
1163
1164
  });
1164
- const we = U(() => ({
1165
+ const we = N(() => ({
1165
1166
  updateItem: (o) => {
1166
- const p = Nt.parse(o);
1167
- t.items = t.items.map((M) => M.id && M.id !== o.id || !M.id && M.sku._id !== o.sku._id ? M : p);
1167
+ const f = Nt.parse(o);
1168
+ t.items = t.items.map((A) => A.id && A.id !== o.id || !A.id && A.sku._id !== o.sku._id ? A : f);
1168
1169
  },
1169
1170
  deleteItem: (o) => {
1170
1171
  t.items = t.items.filter(
1171
- (p) => p.id ? p.id !== o.id : p.sku._id !== o.sku._id
1172
+ (f) => f.id ? f.id !== o.id : f.sku._id !== o.sku._id
1172
1173
  );
1173
1174
  }
1174
- })), Ue = gs({
1175
+ })), Ue = _s({
1175
1176
  updateItem: (o) => we.value.updateItem(o),
1176
1177
  deleteItem: (o) => we.value.deleteItem(o),
1177
1178
  get supplier() {
@@ -1181,48 +1182,49 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1181
1182
  return t.items;
1182
1183
  },
1183
1184
  get transferType() {
1184
- return Y.value;
1185
+ return K.value;
1185
1186
  },
1186
1187
  get template() {
1187
1188
  return m.value;
1188
1189
  },
1189
1190
  get disabled() {
1190
- return f.disabled;
1191
+ return p.disabled;
1191
1192
  },
1192
1193
  get forecastAmounts() {
1193
- return r.value;
1194
+ return l.value;
1194
1195
  }
1195
- }), Ne = U(() => Ue.columnDefs.value);
1196
+ }), Ne = N(() => Ue.columnDefs.value);
1196
1197
  function Fe() {
1197
- var X, ie, Be, Le, Pe;
1198
- const o = (Be = (ie = (X = m.value) == null ? void 0 : X.purchaseOrder) == null ? void 0 : ie.items) == null ? void 0 : Be.groupBy((B) => B.sku._id), p = b.isEnabled ? b.getAvailableItems((Pe = (Le = t.netSuite) == null ? void 0 : Le.subsidiary) == null ? void 0 : Pe.id) : [], M = o != null && o.size ? $.skus.filter((B) => o.has(B._id)) : $.skus, W = b.isEnabled ? M.filter((B) => {
1199
- var oe, te, ue, pe;
1200
- const ee = (te = (oe = m.value) == null ? void 0 : oe.purchaseOrder) == null ? void 0 : te.items.find(
1201
- (ye) => ye.sku._id === B._id
1198
+ var J, ie, ze, Le, Pe;
1199
+ const o = (ze = (ie = (J = m.value) == null ? void 0 : J.purchaseOrder) == null ? void 0 : ie.items) == null ? void 0 : ze.groupBy((z) => z.sku._id), f = y.isEnabled ? y.getAvailableItems((Pe = (Le = t.netSuite) == null ? void 0 : Le.subsidiary) == null ? void 0 : Pe.id) : [], A = o != null && o.size ? $.skus.filter((z) => o.has(z._id)) : $.skus, H = y.isEnabled ? A.filter((z) => {
1200
+ var ae, se, ue, pe;
1201
+ const te = (se = (ae = m.value) == null ? void 0 : ae.purchaseOrder) == null ? void 0 : se.items.find(
1202
+ (ye) => ye.sku._id === z._id
1202
1203
  );
1203
- if (ee != null && ee.measurement != null) {
1204
- const ye = b.getAvailableMeasurements(
1205
- ee.sku._id,
1204
+ if (te != null && te.measurement != null) {
1205
+ const ye = y.getAvailableMeasurements(
1206
+ te.sku._id,
1206
1207
  (pe = (ue = t.netSuite) == null ? void 0 : ue.subsidiary) == null ? void 0 : pe.id
1207
1208
  );
1208
- return p.includes(ee.sku._id) && ye.includes(ee.measurement.id);
1209
+ return f.includes(te.sku._id) && ye.includes(te.measurement.id);
1209
1210
  }
1210
- return p.includes(B._id);
1211
- }).map((B) => B._id) : M.map((B) => B._id), le = M.map(
1212
- (B) => {
1213
- var ee, oe, te, ue;
1211
+ return f.includes(z._id);
1212
+ }).map((z) => z._id) : A.map((z) => z._id), le = A.map(
1213
+ (z) => {
1214
+ var te, ae, se, ue;
1214
1215
  return {
1215
- label: ((oe = (ee = o == null ? void 0 : o.get(B._id)) == null ? void 0 : ee[0]) == null ? void 0 : oe.name) ?? B.name,
1216
- sublabel: ((ue = (te = o == null ? void 0 : o.get(B._id)) == null ? void 0 : te[0]) == null ? void 0 : ue.code) ?? B.code,
1217
- value: B,
1218
- disabled: !W.includes(B._id)
1216
+ label: ((ae = (te = o == null ? void 0 : o.get(z._id)) == null ? void 0 : te[0]) == null ? void 0 : ae.name) ?? z.name,
1217
+ sublabel: ((ue = (se = o == null ? void 0 : o.get(z._id)) == null ? void 0 : se[0]) == null ? void 0 : ue.code) ?? z.code,
1218
+ value: z,
1219
+ disabled: !!(!H.includes(z._id) || z.isInactive),
1220
+ tags: z.isInactive ? ["Inactive"] : []
1219
1221
  };
1220
1222
  }
1221
- ), re = le.filter((B) => {
1222
- var ee;
1223
- return (ee = t.items) == null ? void 0 : ee.find((oe) => oe.sku._id === B.value._id);
1224
- }).map((B) => B.value);
1225
- j.open({
1223
+ ), re = le.filter((z) => {
1224
+ var te;
1225
+ return (te = t.items) == null ? void 0 : te.find((ae) => ae.sku._id === z.value._id);
1226
+ }).map((z) => z.value);
1227
+ Q.open({
1226
1228
  title: v("inventory.transfer.form.items.selectItem"),
1227
1229
  closeButton: !0,
1228
1230
  contentComponent: Ht,
@@ -1240,24 +1242,24 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1240
1242
  close: !0,
1241
1243
  variant: "tertiary"
1242
1244
  }
1243
- }).onPrimary((B) => {
1244
- const ee = t.items ?? [], oe = B.map((te) => {
1245
+ }).onPrimary((z) => {
1246
+ const te = t.items ?? [], ae = z.map((se) => {
1245
1247
  var ye, Re;
1246
- const ue = ee.find((be) => be.sku._id === te._id);
1248
+ const ue = te.find((be) => be.sku._id === se._id);
1247
1249
  if (ue)
1248
1250
  return ue;
1249
1251
  const pe = ((Re = (ye = m.value) == null ? void 0 : ye.purchaseOrder.items) == null ? void 0 : Re.find(
1250
- (be) => be.sku._id === te._id
1252
+ (be) => be.sku._id === se._id
1251
1253
  )) ?? {
1252
- sku: te,
1253
- code: te.code,
1254
- name: te.name,
1254
+ sku: se,
1255
+ code: se.code,
1256
+ name: se.name,
1255
1257
  quantity: {
1256
1258
  amount: 1,
1257
1259
  precision: 0
1258
1260
  }
1259
1261
  };
1260
- if (Y.value == ae.PURCHASE) {
1262
+ if (K.value == ne.PURCHASE) {
1261
1263
  const { cost: be } = $e(
1262
1264
  pe.sku,
1263
1265
  pe.quantity,
@@ -1270,104 +1272,104 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1270
1272
  }
1271
1273
  return pe;
1272
1274
  });
1273
- oe.sort((te, ue) => te.sku.code.localeCompare(ue.sku.code)), t.items = oe;
1275
+ ae.sort((se, ue) => se.sku.code.localeCompare(ue.sku.code)), t.items = ae;
1274
1276
  });
1275
1277
  }
1276
1278
  function Ye(o) {
1277
1279
  return o;
1278
1280
  }
1279
- const ze = U(() => {
1281
+ const Be = N(() => {
1280
1282
  var o;
1281
- return m.value ? ((o = m.value) == null ? void 0 : o.purchaseOrder.items) || [] : $.skus.map((p) => ({
1283
+ return m.value ? ((o = m.value) == null ? void 0 : o.purchaseOrder.items) || [] : $.skus.map((f) => ({
1282
1284
  quantity: {
1283
1285
  amount: 0,
1284
1286
  precision: 0
1285
1287
  },
1286
- name: p.name,
1287
- code: p.code,
1288
- sku: p,
1288
+ name: f.name,
1289
+ code: f.code,
1290
+ sku: f,
1289
1291
  quantityStep: {
1290
1292
  amount: 0,
1291
1293
  precision: 0
1292
1294
  },
1293
- measurement: p.trackingMeasurement ? p.unit.measurements.find((M) => M.id === p.trackingMeasurement) : null
1295
+ measurement: f.trackingMeasurement ? f.unit.measurements.find((A) => A.id === f.trackingMeasurement) : null
1294
1296
  }));
1295
- }), Ie = U(() => {
1297
+ }), De = N(() => {
1296
1298
  const o = [];
1297
1299
  return (!u.mustUsePoTemplate || u.mustUsePoTemplate && t.template) && o.push({
1298
1300
  label: v("inventory.transfer.form.type.purchase"),
1299
- value: ae.PURCHASE
1301
+ value: ne.PURCHASE
1300
1302
  }), o.push({
1301
1303
  label: v("inventory.transfer.form.type.transfer"),
1302
- value: ae.TRANSFER
1304
+ value: ne.TRANSFER
1303
1305
  }), o;
1304
- }), Ve = U(() => {
1306
+ }), Ve = N(() => {
1305
1307
  var o;
1306
- return (o = f.modelValue) == null ? void 0 : o.items.every((p) => p.quantity.amount <= 0);
1308
+ return (o = p.modelValue) == null ? void 0 : o.items.every((f) => f.quantity.amount <= 0);
1307
1309
  });
1308
- return (o, p) => {
1310
+ return (o, f) => {
1309
1311
  var ye, Re;
1310
- const M = T("FmChip"), W = T("FmLabel"), le = T("FmIcon"), re = T("FmField"), X = T("FmTooltip"), ie = T("FmSelect"), Be = T("FmTextField"), Le = T("FmTextarea"), Pe = T("FmSwitch"), B = T("FmDatePicker"), ee = T("FmTimePicker"), oe = T("FmFormGroup"), te = T("FmButton"), ue = T("FmTable"), pe = T("FmForm");
1311
- return S(), D("div", uo, [
1312
- n("div", co, [
1313
- (ye = f.modelValue) != null && ye.template ? (S(), J(M, {
1312
+ const A = I("FmChip"), H = I("FmLabel"), le = I("FmIcon"), re = I("FmField"), J = I("FmTooltip"), ie = I("FmSelect"), ze = I("FmTextField"), Le = I("FmTextarea"), Pe = I("FmSwitch"), z = I("FmDatePicker"), te = I("FmTimePicker"), ae = I("FmFormGroup"), se = I("FmButton"), ue = I("FmTable"), pe = I("FmForm");
1313
+ return S(), T("div", co, [
1314
+ n("div", mo, [
1315
+ (ye = p.modelValue) != null && ye.template ? (S(), W(A, {
1314
1316
  key: 0,
1315
1317
  variant: o.disabled ? "warning" : void 0,
1316
1318
  label: `${s(v)("inventory.transfer.template.title")}: ${((Re = m.value) == null ? void 0 : Re.name) ?? s(v)("inventory.transfer.form.loading")}`,
1317
1319
  icon: "summarize",
1318
1320
  compact: ""
1319
- }, null, 8, ["variant", "label"])) : H("", !0),
1320
- y(M, {
1321
+ }, null, 8, ["variant", "label"])) : j("", !0),
1322
+ b(A, {
1321
1323
  label: s(F).currentLocation.name,
1322
1324
  icon: "storefront",
1323
1325
  compact: ""
1324
1326
  }, null, 8, ["label"]),
1325
- o.lastClosingDate ? (S(), J(M, {
1327
+ o.lastClosingDate ? (S(), W(A, {
1326
1328
  key: 1,
1327
- label: `${s(v)("inventory.transfer.form.lastClosing")}: ${s(Je)(o.lastClosingDate)} ${s(zt)(o.lastClosingDate)}`,
1329
+ label: `${s(v)("inventory.transfer.form.lastClosing")}: ${s(Je)(o.lastClosingDate)} ${s(Bt)(o.lastClosingDate)}`,
1328
1330
  icon: "calendar_month",
1329
1331
  compact: ""
1330
- }, null, 8, ["label"])) : H("", !0)
1332
+ }, null, 8, ["label"])) : j("", !0)
1331
1333
  ]),
1332
- y(pe, {
1334
+ b(pe, {
1333
1335
  ref_key: "formRef",
1334
1336
  ref: me,
1335
1337
  class: "flex flex-col gap-32",
1336
1338
  disabled: o.disabled,
1337
1339
  onValidationFailed: console.log,
1338
- onValidationSuccess: p[14] || (p[14] = (be) => x("validation-success"))
1340
+ onValidationSuccess: f[14] || (f[14] = (be) => x("validation-success"))
1339
1341
  }, {
1340
1342
  default: R(() => {
1341
1343
  var be, at, nt, lt, rt, it, ut, dt;
1342
1344
  return [
1343
- n("div", mo, [
1344
- n("div", po, [
1345
- (be = f.modelValue) != null && be.template ? (S(), D(de, { key: 0 }, [
1346
- n("div", fo, [
1347
- y(W, {
1345
+ n("div", po, [
1346
+ n("div", fo, [
1347
+ (be = p.modelValue) != null && be.template ? (S(), T(de, { key: 0 }, [
1348
+ n("div", vo, [
1349
+ b(H, {
1348
1350
  label: s(v)("inventory.transfer.form.type.title")
1349
1351
  }, null, 8, ["label"]),
1350
- n("div", vo, [
1351
- y(X, {
1352
+ n("div", yo, [
1353
+ b(J, {
1352
1354
  "z-index": 51,
1353
1355
  placement: "left",
1354
1356
  disabled: o.disabled
1355
1357
  }, {
1356
- content: R(() => p[15] || (p[15] = [
1357
- Te("This field is locked from template.")
1358
+ content: R(() => f[15] || (f[15] = [
1359
+ Ie("This field is locked from template.")
1358
1360
  ])),
1359
1361
  default: R(() => [
1360
- y(re, null, {
1362
+ b(re, null, {
1361
1363
  default: R(() => [
1362
- n("div", yo, [
1363
- y(le, {
1364
+ n("div", bo, [
1365
+ b(le, {
1364
1366
  name: "lock_outline",
1365
1367
  size: "sm",
1366
1368
  color: o.disabled ? "neutral-gray-200" : "neutral-gray-400"
1367
1369
  }, null, 8, ["color"]),
1368
1370
  n("div", {
1369
- class: K({ "text-fm-color-typo-disabled": o.disabled })
1370
- }, E(s(v)(`inventory.transfer.form.type.${Y.value.toLocaleLowerCase("en-us")}`)), 3)
1371
+ class: Z({ "text-fm-color-typo-disabled": o.disabled })
1372
+ }, q(s(v)(`inventory.transfer.form.type.${K.value.toLocaleLowerCase("en-us")}`)), 3)
1371
1373
  ])
1372
1374
  ]),
1373
1375
  _: 1
@@ -1376,40 +1378,40 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1376
1378
  _: 1
1377
1379
  }, 8, ["disabled"]),
1378
1380
  n("div", {
1379
- class: K([
1381
+ class: Z([
1380
1382
  "fm-typo-en-body-sm-400",
1381
1383
  o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"
1382
1384
  ])
1383
1385
  }, null, 2)
1384
1386
  ])
1385
1387
  ]),
1386
- n("div", bo, [
1387
- y(W, {
1388
- label: Y.value === s(ae).PURCHASE ? s(v)("inventory.transfer.form.purchaseFrom") : s(v)("inventory.transfer.form.transferFrom")
1388
+ n("div", go, [
1389
+ b(H, {
1390
+ label: K.value === s(ne).PURCHASE ? s(v)("inventory.transfer.form.purchaseFrom") : s(v)("inventory.transfer.form.transferFrom")
1389
1391
  }, null, 8, ["label"]),
1390
- n("div", go, [
1391
- y(X, {
1392
+ n("div", _o, [
1393
+ b(J, {
1392
1394
  "z-index": 51,
1393
1395
  placement: "left",
1394
1396
  disabled: o.disabled
1395
1397
  }, {
1396
- content: R(() => p[16] || (p[16] = [
1397
- Te("This field is locked from template.")
1398
+ content: R(() => f[16] || (f[16] = [
1399
+ Ie("This field is locked from template.")
1398
1400
  ])),
1399
1401
  default: R(() => [
1400
- y(re, null, {
1402
+ b(re, null, {
1401
1403
  default: R(() => {
1402
1404
  var V;
1403
1405
  return [
1404
- n("div", _o, [
1405
- y(le, {
1406
+ n("div", ho, [
1407
+ b(le, {
1406
1408
  name: "lock_outline",
1407
1409
  size: "sm",
1408
1410
  color: o.disabled ? "neutral-gray-200" : "neutral-gray-400"
1409
1411
  }, null, 8, ["color"]),
1410
1412
  n("div", {
1411
- class: K({ "text-fm-color-typo-disabled": o.disabled })
1412
- }, E((V = A.value.find((se) => se.value === q.value)) == null ? void 0 : V.label), 3)
1413
+ class: Z({ "text-fm-color-typo-disabled": o.disabled })
1414
+ }, q((V = E.value.find((oe) => oe.value === U.value)) == null ? void 0 : V.label), 3)
1413
1415
  ])
1414
1416
  ];
1415
1417
  }),
@@ -1420,39 +1422,39 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1420
1422
  }, 8, ["disabled"])
1421
1423
  ])
1422
1424
  ])
1423
- ], 64)) : (S(), D(de, { key: 1 }, [
1424
- y(ie, {
1425
+ ], 64)) : (S(), T(de, { key: 1 }, [
1426
+ b(ie, {
1425
1427
  label: s(v)("inventory.transfer.form.type.title"),
1426
1428
  "label-mark": "required",
1427
- modelValue: Y.value,
1428
- "onUpdate:modelValue": p[0] || (p[0] = (V) => Y.value = V),
1429
- items: Ie.value,
1430
- rules: [s(qe)(1)(Ie.value)]
1429
+ modelValue: K.value,
1430
+ "onUpdate:modelValue": f[0] || (f[0] = (V) => K.value = V),
1431
+ items: De.value,
1432
+ rules: [s(qe)(1)(De.value)]
1431
1433
  }, {
1432
1434
  default: R(() => [
1433
1435
  n("span", {
1434
- class: K([
1436
+ class: Z([
1435
1437
  "line-clamp-1 fm-typo-en-body-lg-400",
1436
1438
  o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
1437
1439
  ])
1438
- }, E(s(Bt)(Y.value)), 3)
1440
+ }, q(s(zt)(K.value)), 3)
1439
1441
  ]),
1440
1442
  _: 1
1441
1443
  }, 8, ["label", "modelValue", "items", "rules"]),
1442
- y(ie, {
1443
- label: Y.value === s(ae).PURCHASE ? s(v)("inventory.transfer.form.purchaseFrom") : s(v)("inventory.transfer.form.transferFrom"),
1444
+ b(ie, {
1445
+ label: K.value === s(ne).PURCHASE ? s(v)("inventory.transfer.form.purchaseFrom") : s(v)("inventory.transfer.form.transferFrom"),
1444
1446
  "label-mark": "required",
1445
- modelValue: q.value,
1446
- "onUpdate:modelValue": p[1] || (p[1] = (V) => q.value = V),
1447
- items: A.value,
1448
- rules: [s(qe)(1)(A.value)]
1447
+ modelValue: U.value,
1448
+ "onUpdate:modelValue": f[1] || (f[1] = (V) => U.value = V),
1449
+ items: E.value,
1450
+ rules: [s(qe)(1)(E.value)]
1449
1451
  }, {
1450
1452
  "menu-wrapper": R((V) => {
1451
- var se, Ae;
1453
+ var oe, Ae;
1452
1454
  return [
1453
- y(fs, Ze(V, {
1454
- items: A.value,
1455
- "model-value": (Ae = (se = o.modelValue) == null ? void 0 : se.supplier) == null ? void 0 : Ae._id
1455
+ b(vs, Ze(V, {
1456
+ items: E.value,
1457
+ "model-value": (Ae = (oe = o.modelValue) == null ? void 0 : oe.supplier) == null ? void 0 : Ae._id
1456
1458
  }), null, 16, ["items", "model-value"])
1457
1459
  ];
1458
1460
  }),
@@ -1460,103 +1462,103 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1460
1462
  var V;
1461
1463
  return [
1462
1464
  n("span", {
1463
- class: K([
1465
+ class: Z([
1464
1466
  "line-clamp-1 fm-typo-en-body-lg-400",
1465
1467
  o.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
1466
1468
  ])
1467
- }, E((V = A.value.find((se) => se.value === q.value)) == null ? void 0 : V.label), 3)
1469
+ }, q((V = E.value.find((oe) => oe.value === U.value)) == null ? void 0 : V.label), 3)
1468
1470
  ];
1469
1471
  }),
1470
1472
  _: 1
1471
1473
  }, 8, ["label", "modelValue", "items", "rules"])
1472
1474
  ], 64)),
1473
- y(Be, {
1475
+ b(ze, {
1474
1476
  label: s(v)("inventory.transfer.form.reference"),
1475
1477
  "label-mark": "optional",
1476
1478
  modelValue: s(t).ref,
1477
- "onUpdate:modelValue": p[2] || (p[2] = (V) => s(t).ref = V)
1479
+ "onUpdate:modelValue": f[2] || (f[2] = (V) => s(t).ref = V)
1478
1480
  }, null, 8, ["label", "modelValue"]),
1479
- y(Le, {
1481
+ b(Le, {
1480
1482
  label: s(v)("inventory.transfer.form.remark"),
1481
1483
  "label-mark": "optional",
1482
1484
  "max-length": 240,
1483
1485
  modelValue: P.value,
1484
- "onUpdate:modelValue": p[3] || (p[3] = (V) => P.value = V),
1485
- class: K([o.disabled ? "text-fm-color-typo-disabled " : ""])
1486
+ "onUpdate:modelValue": f[3] || (f[3] = (V) => P.value = V),
1487
+ class: Z([o.disabled ? "text-fm-color-typo-disabled " : ""])
1486
1488
  }, null, 8, ["label", "modelValue", "class"]),
1487
- _.value ? (S(), J(io, {
1489
+ _.value ? (S(), W(uo, {
1488
1490
  key: 2,
1489
1491
  required: s(t).template != null,
1490
1492
  disabled: o.disabled,
1491
1493
  supplier: s(t).supplier,
1492
1494
  setting: s(t).netSuite,
1493
1495
  items: s(t).items,
1494
- onChange: (V, se) => {
1495
- s(t).items = V, s(t).netSuite = se;
1496
+ onChange: (V, oe) => {
1497
+ s(t).items = V, s(t).netSuite = oe;
1496
1498
  },
1497
- "onNetsuite:ready": p[4] || (p[4] = (V) => {
1499
+ "onNetsuite:ready": f[4] || (f[4] = (V) => {
1498
1500
  h.value = !0;
1499
1501
  })
1500
- }, null, 8, ["required", "disabled", "supplier", "setting", "items", "onChange"])) : H("", !0),
1501
- s(u).enableBackdatePo ? (S(), D("div", ho, [
1502
+ }, null, 8, ["required", "disabled", "supplier", "setting", "items", "onChange"])) : j("", !0),
1503
+ s(u).enableBackdatePo ? (S(), T("div", ko, [
1502
1504
  n("div", {
1503
- class: K([
1505
+ class: Z([
1504
1506
  "flex",
1505
1507
  {
1506
1508
  "flex-col": i.value
1507
1509
  }
1508
1510
  ])
1509
1511
  }, [
1510
- y(Pe, {
1512
+ b(Pe, {
1511
1513
  modelValue: s(c),
1512
- "onUpdate:modelValue": p[5] || (p[5] = (V) => xe(c) ? c.value = V : null),
1514
+ "onUpdate:modelValue": f[5] || (f[5] = (V) => xe(c) ? c.value = V : null),
1513
1515
  label: s(v)("inventory.transfer.form.backdate.title"),
1514
1516
  sublabel: s(v)("inventory.transfer.form.backdate.subtitle"),
1515
1517
  "label-placement": "right",
1516
- disabled: N.value && !o.lastClosingDate || o.disabled
1518
+ disabled: B.value && !o.lastClosingDate || o.disabled
1517
1519
  }, null, 8, ["modelValue", "label", "sublabel", "disabled"]),
1518
1520
  n("div", {
1519
- class: K({ hidden: i.value, "w-16": !i.value })
1521
+ class: Z({ hidden: i.value, "w-16": !i.value })
1520
1522
  }, null, 2),
1521
- s(c) ? (S(), D("div", ko, [
1522
- n("div", xo, [
1523
- y(B, {
1524
- modelValue: s(z),
1525
- "onUpdate:modelValue": p[6] || (p[6] = (V) => xe(z) ? z.value = V : null)
1523
+ s(c) ? (S(), T("div", xo, [
1524
+ n("div", Co, [
1525
+ b(z, {
1526
+ modelValue: s(O),
1527
+ "onUpdate:modelValue": f[6] || (f[6] = (V) => xe(O) ? O.value = V : null)
1526
1528
  }, null, 8, ["modelValue"])
1527
1529
  ]),
1528
- n("div", Co, [
1529
- y(ee, {
1530
- modelValue: s(ne),
1531
- "onUpdate:modelValue": p[7] || (p[7] = (V) => xe(ne) ? ne.value = V : null)
1530
+ n("div", So, [
1531
+ b(te, {
1532
+ modelValue: s(ee),
1533
+ "onUpdate:modelValue": f[7] || (f[7] = (V) => xe(ee) ? ee.value = V : null)
1532
1534
  }, null, 8, ["modelValue"])
1533
1535
  ])
1534
- ])) : H("", !0)
1536
+ ])) : j("", !0)
1535
1537
  ], 2),
1536
- s(d) ? (S(), J(oe, {
1538
+ s(d) ? (S(), W(ae, {
1537
1539
  key: 0,
1538
1540
  modelValue: s(d),
1539
- "onUpdate:modelValue": p[8] || (p[8] = (V) => xe(d) ? d.value = V : null),
1541
+ "onUpdate:modelValue": f[8] || (f[8] = (V) => xe(d) ? d.value = V : null),
1540
1542
  rules: [s(Lt)(new Date(o.lastClosingDate), /* @__PURE__ */ new Date())]
1541
- }, null, 8, ["modelValue", "rules"])) : H("", !0),
1542
- N.value && !o.lastClosingDate ? (S(), D("div", So, [
1543
- y(le, {
1543
+ }, null, 8, ["modelValue", "rules"])) : j("", !0),
1544
+ B.value && !o.lastClosingDate ? (S(), T("div", wo, [
1545
+ b(le, {
1544
1546
  name: "error",
1545
1547
  size: "sm",
1546
1548
  class: "text-fm-color-typo-warning"
1547
1549
  }),
1548
- n("span", wo, E(s(v)("inventory.transfer.form.backdate.error")), 1)
1549
- ])) : H("", !0)
1550
- ])) : H("", !0)
1550
+ n("span", Fo, q(s(v)("inventory.transfer.form.backdate.error")), 1)
1551
+ ])) : j("", !0)
1552
+ ])) : j("", !0)
1551
1553
  ])
1552
1554
  ]),
1553
- n("div", Fo, [
1554
- y(oe, {
1555
+ n("div", $o, [
1556
+ b(ae, {
1555
1557
  "model-value": s(t).items,
1556
1558
  rules: [s(qe)(1)]
1557
1559
  }, null, 8, ["model-value", "rules"]),
1558
1560
  n("div", {
1559
- class: K([
1561
+ class: Z([
1560
1562
  "flex gap-16",
1561
1563
  {
1562
1564
  "flex-col items-start": i.value,
@@ -1564,9 +1566,9 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1564
1566
  }
1565
1567
  ])
1566
1568
  }, [
1567
- n("div", $o, E(s(v)("inventory.transfer.form.items.title")), 1),
1569
+ n("div", Io, q(s(v)("inventory.transfer.form.items.title")), 1),
1568
1570
  n("div", To, [
1569
- y(te, {
1571
+ b(se, {
1570
1572
  disabled: o.disabled,
1571
1573
  label: s(v)("inventory.transfer.form.items.addItem"),
1572
1574
  "prepend-icon": "add",
@@ -1574,37 +1576,37 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1574
1576
  "text-color": "primary",
1575
1577
  "bg-color": "transparent",
1576
1578
  "border-color": "primary",
1577
- onClick: p[9] || (p[9] = (V) => Fe()),
1579
+ onClick: f[9] || (f[9] = (V) => Fe()),
1578
1580
  size: "md"
1579
1581
  }, null, 8, ["disabled", "label"]),
1580
- y(Ws, {
1582
+ b(Gs, {
1581
1583
  "template-id": s(t).template || void 0,
1582
- "template-items": ze.value,
1584
+ "template-items": Be.value,
1583
1585
  "po-items": s(t).items,
1584
- "onUpdate:forecastAmounts": p[10] || (p[10] = (V) => {
1585
- r.value = V;
1586
+ "onUpdate:forecastAmounts": f[10] || (f[10] = (V) => {
1587
+ l.value = V;
1586
1588
  }),
1587
- "onUpdate:poItems": p[11] || (p[11] = (V) => {
1589
+ "onUpdate:poItems": f[11] || (f[11] = (V) => {
1588
1590
  s(t).items = V, C.value++;
1589
1591
  })
1590
1592
  }, null, 8, ["template-id", "template-items", "po-items"])
1591
1593
  ])
1592
1594
  ], 2),
1593
- Y.value === s(ae).PURCHASE && I.value && s(u).enableTotalCost && ((at = o.modelValue) != null && at.items.length) ? (S(), D("div", Do, [
1594
- y(Pe, {
1595
+ K.value === s(ne).PURCHASE && D.value && s(u).enableTotalCost && ((at = o.modelValue) != null && at.items.length) ? (S(), T("div", Do, [
1596
+ b(Pe, {
1595
1597
  label: s(ke) ? s(v)("inventory.transfer.form.items.fetchingData") : s(v)("inventory.transfer.form.items.comparePriceHistory"),
1596
1598
  "prepend-icon": "compare_arrows",
1597
1599
  "label-placement": "right",
1598
- "model-value": s(Z),
1599
- "onUpdate:modelValue": p[12] || (p[12] = (V) => xe(Z) ? Z.value = V : null),
1600
+ "model-value": s(X),
1601
+ "onUpdate:modelValue": f[12] || (f[12] = (V) => xe(X) ? X.value = V : null),
1600
1602
  disabled: s(ke) || o.disabled
1601
1603
  }, null, 8, ["label", "model-value", "disabled"])
1602
- ])) : H("", !0),
1603
- y(oe, {
1604
+ ])) : j("", !0),
1605
+ b(ae, {
1604
1606
  "model-value": Ve.value,
1605
1607
  rules: [() => Ve.value ? "Must have at least one non-zero item" : !0]
1606
1608
  }, null, 8, ["model-value", "rules"]),
1607
- (S(), J(ue, {
1609
+ (S(), W(ue, {
1608
1610
  "column-defs": Ne.value,
1609
1611
  "column-visibility": {
1610
1612
  [s(G).Code]: !(((nt = o.modelValue) == null ? void 0 : nt.template) ?? ((lt = o.modelValue) == null ? void 0 : lt.templateDoc)),
@@ -1617,31 +1619,31 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1617
1619
  "page-size": s(t).items.length
1618
1620
  }, {
1619
1621
  "table-row": R((V) => {
1620
- var se, Ae, ct, mt;
1622
+ var oe, Ae, ct, mt;
1621
1623
  return [
1622
- y(oo, {
1624
+ b(ao, {
1623
1625
  "compare-price-by-sku": s(ve),
1624
- "show-compare-price": Y.value === s(ae).PURCHASE && s(Z),
1626
+ "show-compare-price": K.value === s(ne).PURCHASE && s(X),
1625
1627
  row: V,
1626
- "template-item": (mt = (ct = (Ae = (se = o.modelValue) == null ? void 0 : se.templateDoc) == null ? void 0 : Ae.purchaseOrder) == null ? void 0 : ct.items) == null ? void 0 : mt.find(
1628
+ "template-item": (mt = (ct = (Ae = (oe = o.modelValue) == null ? void 0 : oe.templateDoc) == null ? void 0 : Ae.purchaseOrder) == null ? void 0 : ct.items) == null ? void 0 : mt.find(
1627
1629
  (Ke) => Ke.sku._id === V.original.sku._id
1628
1630
  ),
1629
- "onUpdate:item": p[13] || (p[13] = (Ke) => we.value.updateItem(Ke)),
1631
+ "onUpdate:item": f[13] || (f[13] = (Ke) => we.value.updateItem(Ke)),
1630
1632
  disabled: o.disabled
1631
1633
  }, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "template-item", "disabled"])
1632
1634
  ];
1633
1635
  }),
1634
1636
  "list-row": R((V) => [
1635
- (S(), J(xt, {
1637
+ (S(), W(xt, {
1636
1638
  row: V,
1637
- key: s(t).items.map((se) => se.sku._id).join(".")
1639
+ key: s(t).items.map((oe) => oe.sku._id).join(".")
1638
1640
  }, {
1639
- default: R((se) => [
1640
- y(Es, {
1641
+ default: R((oe) => [
1642
+ b(Os, {
1641
1643
  "compare-price-by-sku": s(ve),
1642
- "show-compare-price": Y.value === s(ae).PURCHASE && s(Z),
1644
+ "show-compare-price": K.value === s(ne).PURCHASE && s(X),
1643
1645
  row: V,
1644
- "cell-by-col-id": se
1646
+ "cell-by-col-id": oe
1645
1647
  }, null, 8, ["compare-price-by-sku", "show-compare-price", "row", "cell-by-col-id"])
1646
1648
  ]),
1647
1649
  _: 2
@@ -1657,7 +1659,7 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1657
1659
  ]);
1658
1660
  };
1659
1661
  }
1660
- }), Vo = { class: "flex items-center" }, Po = { class: "fm-typo-en-title-md-800" }, Ro = { class: "flex gap-4" }, Ao = /* @__PURE__ */ ce({
1662
+ }), Po = { class: "flex items-center" }, Ro = { class: "fm-typo-en-title-md-800" }, Ao = { class: "flex gap-4" }, Eo = /* @__PURE__ */ ce({
1661
1663
  __name: "TransferDialog",
1662
1664
  props: {
1663
1665
  mode: {},
@@ -1667,9 +1669,9 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1667
1669
  lastClosingDate: {}
1668
1670
  },
1669
1671
  emits: ["update:show", "submitted"],
1670
- setup(g, { expose: w, emit: l }) {
1672
+ setup(g, { expose: w, emit: r }) {
1671
1673
  var P;
1672
- const f = g, x = l, t = et(), v = wt(), F = De(), $ = ot(), b = Ge(), e = We(), { t: u } = he(), k = O(!1), a = O(!1), i = O(!1);
1674
+ const p = g, x = r, t = et(), v = wt(), F = Te(), $ = ot(), y = Ge(), e = We(), { t: u } = he(), k = M(!1), a = M(!1), i = M(!1);
1673
1675
  async function h(d) {
1674
1676
  if (d) {
1675
1677
  a.value = !1;
@@ -1715,20 +1717,20 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1715
1717
  _id: "",
1716
1718
  seqNumber: 0,
1717
1719
  deliveryOrder: [],
1718
- template: f.templateId,
1719
- templateDoc: v.templates.find((c) => c._id === f.templateId)
1720
+ template: p.templateId,
1721
+ templateDoc: v.templates.find((c) => c._id === p.templateId)
1720
1722
  };
1721
1723
  }
1722
- const C = St(f, "show"), r = O(f.modelValue ?? _()), m = O(((P = f.modelValue) == null ? void 0 : P._id) ?? `${Math.random()}`);
1724
+ const C = St(p, "show"), l = M(p.modelValue ?? _()), m = M(((P = p.modelValue) == null ? void 0 : P._id) ?? `${Math.random()}`);
1723
1725
  _e(
1724
- () => f.show,
1726
+ () => p.show,
1725
1727
  (d) => {
1726
1728
  var c;
1727
- d && (i.value = !1, r.value = f.modelValue ?? _(), m.value = ((c = f.modelValue) == null ? void 0 : c._id) ?? `${Math.random()}`);
1729
+ d && (i.value = !1, l.value = p.modelValue ?? _(), m.value = ((c = p.modelValue) == null ? void 0 : c._id) ?? `${Math.random()}`);
1728
1730
  }
1729
1731
  );
1730
- const I = U(() => !a.value || !i.value), N = U(() => {
1731
- switch (f.mode) {
1732
+ const D = N(() => !a.value || !i.value), B = N(() => {
1733
+ switch (p.mode) {
1732
1734
  case Ee.READ:
1733
1735
  return "View transfer";
1734
1736
  case Ee.CREATE:
@@ -1737,23 +1739,23 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1737
1739
  return u("inventory.transfer.receiveRequest.update.title");
1738
1740
  }
1739
1741
  return "";
1740
- }), j = O();
1742
+ }), Q = M();
1741
1743
  w({
1742
1744
  validateInputs: () => {
1743
1745
  var d, c;
1744
- (c = (d = j.value) == null ? void 0 : d.validateInputs) == null || c.call(d);
1746
+ (c = (d = Q.value) == null ? void 0 : d.validateInputs) == null || c.call(d);
1745
1747
  },
1746
1748
  resetInputsValidation: () => {
1747
1749
  var d, c;
1748
- (c = (d = j.value) == null ? void 0 : d.resetInputsValidation) == null || c.call(d);
1750
+ (c = (d = Q.value) == null ? void 0 : d.resetInputsValidation) == null || c.call(d);
1749
1751
  },
1750
1752
  resetInputs: () => {
1751
1753
  var d, c;
1752
- (c = (d = j.value) == null ? void 0 : d.resetInputs) == null || c.call(d);
1754
+ (c = (d = Q.value) == null ? void 0 : d.resetInputs) == null || c.call(d);
1753
1755
  }
1754
1756
  });
1755
- async function Q() {
1756
- const d = r.value;
1757
+ async function Y() {
1758
+ const d = l.value;
1757
1759
  if (k.value = !0, d.items = d.items.filter((c) => c.quantity.amount > 0), !d.items.length) {
1758
1760
  F.open({
1759
1761
  title: "Cannot create order",
@@ -1762,7 +1764,7 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1762
1764
  });
1763
1765
  return;
1764
1766
  }
1765
- (d.supplier.internal === "warehouse" || d.supplier.internal === "restaurant") && (d.items = d.items.map(({ totalCost: c, ...z }) => z));
1767
+ (d.supplier.internal === "warehouse" || d.supplier.internal === "restaurant") && (d.items = d.items.map(({ totalCost: c, ...O }) => O));
1766
1768
  try {
1767
1769
  await t.createPurchaseOrder(d), await new Promise((c) => setTimeout(c, 1e3)), F.open({
1768
1770
  title: u("inventory.transfer.receiveRequest.create.success"),
@@ -1779,8 +1781,8 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1779
1781
  k.value = !1;
1780
1782
  }
1781
1783
  }
1782
- async function Y() {
1783
- const d = r.value;
1784
+ async function K() {
1785
+ const d = l.value;
1784
1786
  if (k.value = !0, d.items = d.items.filter((c) => c.quantity.amount > 0), !d.items.length) {
1785
1787
  F.open({
1786
1788
  title: "Cannot create order",
@@ -1789,7 +1791,7 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1789
1791
  });
1790
1792
  return;
1791
1793
  }
1792
- (d.supplier.internal === "warehouse" || d.supplier.internal === "restaurant") && (d.items = d.items.map(({ totalCost: c, ...z }) => z));
1794
+ (d.supplier.internal === "warehouse" || d.supplier.internal === "restaurant") && (d.items = d.items.map(({ totalCost: c, ...O }) => O));
1793
1795
  try {
1794
1796
  await t.updatePurchaseOrder(d), await new Promise((c) => setTimeout(c, 1e3)), F.open({
1795
1797
  title: u("inventory.transfer.receiveRequest.update.success"),
@@ -1806,61 +1808,74 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1806
1808
  k.value = !1;
1807
1809
  }
1808
1810
  }
1809
- function A() {
1810
- switch (f.mode) {
1811
+ function E() {
1812
+ switch (p.mode) {
1811
1813
  case Ee.CREATE:
1812
- return Q();
1813
- case Ee.UPDATE:
1814
1814
  return Y();
1815
+ case Ee.UPDATE:
1816
+ return K();
1815
1817
  }
1816
1818
  }
1817
- function q() {
1818
- var d, c;
1819
- (c = (d = j.value) == null ? void 0 : d.validateInputs) == null || c.call(d);
1819
+ function U() {
1820
+ var O, ee;
1821
+ const d = ps.validatePurchaseOrderItems({
1822
+ skusById: y.skuById ?? {},
1823
+ items: l.value.items ?? []
1824
+ }), c = Object.values(d).flat();
1825
+ if (c.length > 0) {
1826
+ const X = c[0];
1827
+ F.open({
1828
+ title: `[Row ${X.index + 1}] "${X.poItem.sku.name}"`,
1829
+ message: `${X.message}`,
1830
+ type: "error"
1831
+ });
1832
+ return;
1833
+ }
1834
+ (ee = (O = Q.value) == null ? void 0 : O.validateInputs) == null || ee.call(O);
1820
1835
  }
1821
1836
  return (d, c) => {
1822
- const z = T("FmButton"), ne = T("FmSideSheet");
1823
- return S(), J(ne, {
1837
+ const O = I("FmButton"), ee = I("FmSideSheet");
1838
+ return S(), W(ee, {
1824
1839
  modelValue: s(C),
1825
- "onUpdate:modelValue": c[3] || (c[3] = (Z) => xe(C) ? C.value = Z : null),
1840
+ "onUpdate:modelValue": c[3] || (c[3] = (X) => xe(C) ? C.value = X : null),
1826
1841
  "dismiss-away": "",
1827
1842
  "close-button": "",
1828
1843
  "max-width": 900
1829
1844
  }, {
1830
1845
  "side-sheet-header": R(() => [
1831
- n("div", Vo, [
1832
- n("div", Po, E(N.value), 1)
1846
+ n("div", Po, [
1847
+ n("div", Ro, q(B.value), 1)
1833
1848
  ])
1834
1849
  ]),
1835
1850
  default: R(() => [
1836
- (S(), J(Io, {
1851
+ (S(), W(Vo, {
1837
1852
  class: "w-full",
1838
1853
  ref_key: "formRef",
1839
- ref: j,
1854
+ ref: Q,
1840
1855
  "onForm:ready": c[0] || (c[0] = () => i.value = !0),
1841
- onValidationSuccess: A,
1842
- modelValue: r.value,
1843
- "onUpdate:modelValue": c[1] || (c[1] = (Z) => r.value = Z),
1844
- disabled: k.value || I.value,
1856
+ onValidationSuccess: E,
1857
+ modelValue: l.value,
1858
+ "onUpdate:modelValue": c[1] || (c[1] = (X) => l.value = X),
1859
+ disabled: k.value || D.value,
1845
1860
  suppliers: s($).suppliers,
1846
- skus: s(b).skus,
1861
+ skus: s(y).skus,
1847
1862
  key: m.value,
1848
1863
  "last-closing-date": d.lastClosingDate
1849
1864
  }, null, 8, ["modelValue", "disabled", "suppliers", "skus", "last-closing-date"]))
1850
1865
  ]),
1851
1866
  "side-sheet-footer": R(() => [
1852
- n("div", Ro, [
1853
- y(z, {
1867
+ n("div", Ao, [
1868
+ b(O, {
1854
1869
  loading: k.value,
1855
- disabled: I.value,
1870
+ disabled: D.value,
1856
1871
  label: s(u)("common.save"),
1857
- onClick: q
1872
+ onClick: U
1858
1873
  }, null, 8, ["loading", "disabled", "label"]),
1859
- y(z, {
1860
- disabled: I.value,
1874
+ b(O, {
1875
+ disabled: D.value,
1861
1876
  variant: "tertiary",
1862
1877
  label: s(u)("common.close"),
1863
- onClick: c[2] || (c[2] = (Z) => x("update:show", !1))
1878
+ onClick: c[2] || (c[2] = (X) => x("update:show", !1))
1864
1879
  }, null, 8, ["disabled", "label"])
1865
1880
  ])
1866
1881
  ]),
@@ -1869,17 +1884,17 @@ const eo = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, to = { key: 0 }
1869
1884
  };
1870
1885
  }
1871
1886
  });
1872
- function Eo(g) {
1873
- const [w, l, f, ...x] = jt(g), t = f.map((b) => b.toLowerCase().trim().replace(/ /g, "_")), F = ["item_name", "transfer_quantity(uom)", "uom", "scanned_code"].filter((b) => !t.includes(b));
1887
+ function Oo(g) {
1888
+ const [w, r, p, ...x] = jt(g), t = p.map((y) => y.toLowerCase().trim().replace(/ /g, "_")), F = ["item_name", "transfer_quantity(uom)", "uom", "scanned_code"].filter((y) => !t.includes(y));
1874
1889
  if (F.length)
1875
1890
  throw new Error(
1876
1891
  `Missing headers (${F.join()}). Excel file does not come from the template.`
1877
1892
  );
1878
- return x.map((b, e) => {
1893
+ return x.map((y, e) => {
1879
1894
  const u = {};
1880
1895
  for (const k in t) {
1881
1896
  const a = t[k];
1882
- Object.assign(u, { [a]: b[k] });
1897
+ Object.assign(u, { [a]: y[k] });
1883
1898
  }
1884
1899
  return {
1885
1900
  index: e,
@@ -1887,12 +1902,12 @@ function Eo(g) {
1887
1902
  };
1888
1903
  });
1889
1904
  }
1890
- function Oo(g) {
1905
+ function qo(g) {
1891
1906
  const w = g.SheetNames;
1892
1907
  try {
1893
1908
  return w.reduce(
1894
- (f, x) => {
1895
- const t = new Array(), v = g.Sheets[x], F = Ge(), $ = Eo(v), b = [];
1909
+ (p, x) => {
1910
+ const t = new Array(), v = g.Sheets[x], F = Ge(), $ = Oo(v), y = [];
1896
1911
  for (const { index: u, data: k } of $) {
1897
1912
  k.scanned_code === "" && t.push(`Row ${u + 1}: Scanned code is empty`), k.item_name === "" && t.push(`Row ${u + 1}: Item name is empty`), k.uom === "" && t.push(`Row ${u + 1}: UOM is empty`), k["transfer_quantity(uom)"] === "" && t.push(`Row ${u + 1}: Transfer quantity is empty`);
1898
1913
  const a = F.skus.find((_) => _.code === k.scanned_code);
@@ -1910,7 +1925,7 @@ function Oo(g) {
1910
1925
  }
1911
1926
  h = _;
1912
1927
  }
1913
- b.push({
1928
+ y.push({
1914
1929
  sku: a,
1915
1930
  code: k.scanned_code,
1916
1931
  name: k.item_name,
@@ -1920,31 +1935,31 @@ function Oo(g) {
1920
1935
  }
1921
1936
  const e = {
1922
1937
  type: "create",
1923
- poItems: b,
1938
+ poItems: y,
1924
1939
  excelSheetName: x,
1925
1940
  errors: t
1926
1941
  };
1927
- return f.importCreateResult.push(e), f;
1942
+ return p.importCreateResult.push(e), p;
1928
1943
  },
1929
1944
  {
1930
1945
  invalidExcel: !1,
1931
1946
  importCreateResult: new Array()
1932
1947
  }
1933
1948
  );
1934
- } catch (l) {
1949
+ } catch (r) {
1935
1950
  return {
1936
1951
  invalidExcel: !0,
1937
- invalidExcelMessage: (l == null ? void 0 : l.message) ?? "Invalid excel",
1952
+ invalidExcelMessage: (r == null ? void 0 : r.message) ?? "Invalid excel",
1938
1953
  importCreateResult: []
1939
1954
  };
1940
1955
  }
1941
1956
  }
1942
- const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = { class: "flex flex-col" }, No = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, zo = {
1957
+ const Mo = exports.FfCalculator, Uo = { class: "flex flex-col flex-1" }, No = { class: "flex flex-col" }, Bo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, zo = {
1943
1958
  key: 0,
1944
1959
  class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
1945
- }, Bo = { key: 0 }, Lo = {
1946
- class: /* @__PURE__ */ K(["fm-typo-en-body-lg-600"])
1947
- }, Ho = { class: "flex-1" }, jo = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" }, Qo = { class: "flex-auto line-clamp-2 text-ellipsis break-all" }, Yo = { class: "text-fm-color-typo-primary" }, Ko = { class: "ml-auto" }, Xo = { key: 0 }, Zo = /* @__PURE__ */ ce({
1960
+ }, Lo = { key: 0 }, Ho = {
1961
+ class: /* @__PURE__ */ Z(["fm-typo-en-body-lg-600"])
1962
+ }, jo = { class: "flex-1" }, Qo = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" }, Yo = { class: "flex-auto line-clamp-2 text-ellipsis break-all" }, Ko = { class: "text-fm-color-typo-primary" }, Xo = { class: "ml-auto" }, Zo = { key: 0 }, Jo = /* @__PURE__ */ ce({
1948
1963
  __name: "XilnexResult",
1949
1964
  props: {
1950
1965
  type: {},
@@ -1953,123 +1968,123 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
1953
1968
  errors: {}
1954
1969
  },
1955
1970
  setup(g) {
1956
- const w = g, { t: l } = he(), f = O(!1), x = () => {
1957
- w.errors.length && (f.value = !f.value);
1971
+ const w = g, { t: r } = he(), p = M(!1), x = () => {
1972
+ w.errors.length && (p.value = !p.value);
1958
1973
  };
1959
1974
  return (t, v) => {
1960
- var b;
1961
- const F = T("FmIcon"), $ = T("FmTooltip");
1962
- return S(), D("div", Mo, [
1975
+ var y;
1976
+ const F = I("FmIcon"), $ = I("FmTooltip");
1977
+ return S(), T("div", Uo, [
1963
1978
  n("div", {
1964
1979
  onClick: x,
1965
- class: K({
1980
+ class: Z({
1966
1981
  "cursor-pointer": t.errors.length
1967
1982
  })
1968
1983
  }, [
1969
- n("div", Uo, [
1970
- n("div", No, [
1984
+ n("div", No, [
1985
+ n("div", Bo, [
1971
1986
  n("div", {
1972
- class: K({
1987
+ class: Z({
1973
1988
  "text-fm-color-system-error-300": t.errors.length
1974
1989
  })
1975
1990
  }, [
1976
- Te(E(t.name) + " ", 1),
1977
- t.type === "create" ? (S(), D("span", zo, "(" + E(s(l)("inventory.closing.template.import.new")) + ")", 1)) : H("", !0)
1991
+ Ie(q(t.name) + " ", 1),
1992
+ t.type === "create" ? (S(), T("span", zo, "(" + q(s(r)("inventory.closing.template.import.new")) + ")", 1)) : j("", !0)
1978
1993
  ], 2),
1979
- t.errors.length ? (S(), D("div", Bo, [
1980
- y(F, {
1994
+ t.errors.length ? (S(), T("div", Lo, [
1995
+ b(F, {
1981
1996
  name: "error",
1982
1997
  size: "sm",
1983
1998
  color: "system-error-300"
1984
1999
  })
1985
- ])) : H("", !0)
2000
+ ])) : j("", !0)
1986
2001
  ]),
1987
2002
  v[0] || (v[0] = n("hr", { class: "my-2" }, null, -1)),
1988
- n("div", Lo, [
1989
- (b = t.items) != null && b.length ? (S(!0), D(de, { key: 0 }, Se(t.items, (e, u) => (S(), D("div", {
2003
+ n("div", Ho, [
2004
+ (y = t.items) != null && y.length ? (S(!0), T(de, { key: 0 }, Se(t.items, (e, u) => (S(), T("div", {
1990
2005
  key: u,
1991
2006
  class: "flex gap-4 mt-2 items-center"
1992
2007
  }, [
1993
- n("div", Ho, [
1994
- y($, {
2008
+ n("div", jo, [
2009
+ b($, {
1995
2010
  content: e.code,
1996
2011
  placement: "top",
1997
2012
  "z-index": 51
1998
2013
  }, {
1999
2014
  default: R(() => [
2000
- n("span", jo, E(e.code), 1)
2015
+ n("span", Qo, q(e.code), 1)
2001
2016
  ]),
2002
2017
  _: 2
2003
2018
  }, 1032, ["content"]),
2004
- y($, {
2019
+ b($, {
2005
2020
  content: e.name,
2006
2021
  placement: "top",
2007
2022
  "z-index": 51
2008
2023
  }, {
2009
2024
  default: R(() => [
2010
- n("span", Qo, E(e.name), 1)
2025
+ n("span", Yo, q(e.name), 1)
2011
2026
  ]),
2012
2027
  _: 2
2013
2028
  }, 1032, ["content"])
2014
2029
  ]),
2015
2030
  n("div", null, [
2016
- n("span", Yo, E(s(qo).toFormatString({
2031
+ n("span", Ko, q(s(Mo).toFormatString({
2017
2032
  value: e.quantity
2018
2033
  })), 1),
2019
- Te(" " + E(e.measurement ? e.measurement.abbrev : e.sku.unit.abbrev), 1)
2034
+ Ie(" " + q(e.measurement ? e.measurement.abbrev : e.sku.unit.abbrev), 1)
2020
2035
  ])
2021
- ]))), 128)) : H("", !0)
2036
+ ]))), 128)) : j("", !0)
2022
2037
  ])
2023
2038
  ]),
2024
- n("div", Ko, [
2025
- t.errors.length ? (S(), J(F, {
2039
+ n("div", Xo, [
2040
+ t.errors.length ? (S(), W(F, {
2026
2041
  key: 0,
2027
- name: f.value ? "keyboard_arrow_up" : "keyboard_arrow_down",
2042
+ name: p.value ? "keyboard_arrow_up" : "keyboard_arrow_down",
2028
2043
  size: "md"
2029
- }, null, 8, ["name"])) : H("", !0)
2044
+ }, null, 8, ["name"])) : j("", !0)
2030
2045
  ])
2031
2046
  ], 2),
2032
- f.value ? (S(), D("div", {
2047
+ p.value ? (S(), T("div", {
2033
2048
  key: 0,
2034
- class: K(["flex flex-col gap-4 pl-8 fm-typo-en-body-sm-400", {
2049
+ class: Z(["flex flex-col gap-4 pl-8 fm-typo-en-body-sm-400", {
2035
2050
  "text-fm-color-typo-secondary": !t.errors.length,
2036
2051
  "text-fm-color-system-error-300": t.errors.length
2037
2052
  }])
2038
2053
  }, [
2039
- t.errors.length ? (S(), D("div", Xo, [
2054
+ t.errors.length ? (S(), T("div", Zo, [
2040
2055
  n("ol", null, [
2041
- (S(!0), D(de, null, Se(t.errors, (e, u) => (S(), D("li", { key: u }, E(e), 1))), 128))
2056
+ (S(!0), T(de, null, Se(t.errors, (e, u) => (S(), T("li", { key: u }, q(e), 1))), 128))
2042
2057
  ])
2043
- ])) : H("", !0)
2044
- ], 2)) : H("", !0)
2058
+ ])) : j("", !0)
2059
+ ], 2)) : j("", !0)
2045
2060
  ]);
2046
2061
  };
2047
2062
  }
2048
- }), Jo = { class: "flex flex-col gap-24" }, Wo = {
2063
+ }), Wo = { class: "flex flex-col gap-24" }, Go = {
2049
2064
  key: 0,
2050
2065
  class: "flex items-center gap-8"
2051
- }, Go = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ea = { class: "flex flex-col gap-8" }, ta = { class: "line-clamp-2 text-ellipsis break-all" }, sa = {
2066
+ }, ea = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ta = { class: "flex flex-col gap-8" }, sa = { class: "line-clamp-2 text-ellipsis break-all" }, oa = {
2052
2067
  key: 2,
2053
2068
  class: "shrink-0"
2054
- }, oa = {
2069
+ }, aa = {
2055
2070
  key: 0,
2056
2071
  class: "flex flex-col"
2057
- }, aa = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, na = {
2072
+ }, na = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, la = {
2058
2073
  key: 0,
2059
2074
  class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
2060
- }, la = { class: "fm-typo-en-body-lg-600" }, vt = "Transfer note", ra = /* @__PURE__ */ ce({
2075
+ }, ra = { class: "fm-typo-en-body-lg-600" }, vt = "Transfer note", ia = /* @__PURE__ */ ce({
2061
2076
  __name: "XilnexImportForm",
2062
2077
  setup(g, { expose: w }) {
2063
- const l = O(null), f = De(), x = O(!1), t = O(!1), v = kt(), F = O(!1), $ = Me();
2064
- O([]);
2065
- const b = U({
2078
+ const r = M(null), p = Te(), x = M(!1), t = M(!1), v = kt(), F = M(!1), $ = Me();
2079
+ M([]);
2080
+ const y = N({
2066
2081
  get() {
2067
- var r;
2068
- return ((r = v.supplier) == null ? void 0 : r.name) ?? "";
2082
+ var l;
2083
+ return ((l = v.supplier) == null ? void 0 : l.name) ?? "";
2069
2084
  },
2070
- set(r) {
2071
- r && (v.supplier = {
2072
- name: r,
2085
+ set(l) {
2086
+ l && (v.supplier = {
2087
+ name: l,
2073
2088
  registrationNumber: "",
2074
2089
  _id: "xilnex",
2075
2090
  internal: "restaurant",
@@ -2085,93 +2100,93 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2085
2100
  }
2086
2101
  });
2087
2102
  Qe(async () => {
2088
- const r = await $.getNetSuiteLocations();
2089
- console.log(r), F.value = !0;
2103
+ const l = await $.getNetSuiteLocations();
2104
+ console.log(l), F.value = !0;
2090
2105
  });
2091
- const e = U({
2106
+ const e = N({
2092
2107
  get() {
2093
2108
  return "";
2094
2109
  },
2095
- set(r) {
2096
- if (r) {
2097
- const m = v.effectiveAt ? new Date(v.effectiveAt) : /* @__PURE__ */ new Date(), [I, N, j] = r.split("-");
2098
- m.setFullYear(parseInt(I)), m.setMonth(parseInt(N) - 1), m.setDate(parseInt(j)), v.effectiveAt = m.toISOString();
2110
+ set(l) {
2111
+ if (l) {
2112
+ const m = v.effectiveAt ? new Date(v.effectiveAt) : /* @__PURE__ */ new Date(), [D, B, Q] = l.split("-");
2113
+ m.setFullYear(parseInt(D)), m.setMonth(parseInt(B) - 1), m.setDate(parseInt(Q)), v.effectiveAt = m.toISOString();
2099
2114
  }
2100
2115
  }
2101
- }), u = U({
2116
+ }), u = N({
2102
2117
  get() {
2103
2118
  return null;
2104
2119
  },
2105
- set(r) {
2106
- if (r) {
2107
- const m = v.effectiveAt ? new Date(v.effectiveAt) : /* @__PURE__ */ new Date(), [I, N] = r.split(":");
2108
- m.setMinutes(parseInt(I)), m.setSeconds(parseInt(N)), v.effectiveAt = m.toISOString();
2120
+ set(l) {
2121
+ if (l) {
2122
+ const m = v.effectiveAt ? new Date(v.effectiveAt) : /* @__PURE__ */ new Date(), [D, B] = l.split(":");
2123
+ m.setMinutes(parseInt(D)), m.setSeconds(parseInt(B)), v.effectiveAt = m.toISOString();
2109
2124
  }
2110
2125
  }
2111
- }), k = O(new Array()), a = O([]), i = U(
2112
- () => !!k.value.length || a.value.some((r) => r.errors.length)
2113
- ), h = O();
2126
+ }), k = M(new Array()), a = M([]), i = N(
2127
+ () => !!k.value.length || a.value.some((l) => l.errors.length)
2128
+ ), h = M();
2114
2129
  w({
2115
2130
  validateInputs: () => {
2116
- var r, m;
2117
- (m = (r = h.value) == null ? void 0 : r.validateInputs) == null || m.call(r);
2131
+ var l, m;
2132
+ (m = (l = h.value) == null ? void 0 : l.validateInputs) == null || m.call(l);
2118
2133
  },
2119
2134
  resetInputsValidation: () => {
2120
- var r, m;
2121
- (m = (r = h.value) == null ? void 0 : r.resetInputsValidation) == null || m.call(r);
2135
+ var l, m;
2136
+ (m = (l = h.value) == null ? void 0 : l.resetInputsValidation) == null || m.call(l);
2122
2137
  },
2123
2138
  resetInputs: () => {
2124
- var r, m;
2125
- (m = (r = h.value) == null ? void 0 : r.resetInputs) == null || m.call(r);
2139
+ var l, m;
2140
+ (m = (l = h.value) == null ? void 0 : l.resetInputs) == null || m.call(l);
2126
2141
  }
2127
2142
  });
2128
2143
  const { t: _ } = he();
2129
- async function C(r) {
2144
+ async function C(l) {
2130
2145
  k.value = [], a.value = [];
2131
2146
  try {
2132
2147
  x.value = !0;
2133
2148
  const [m] = await Promise.all([
2134
- Yt(r),
2149
+ Yt(l),
2135
2150
  // fake buffer
2136
- new Promise((N) => setTimeout(N, 1e3))
2137
- ]), I = Oo(m);
2138
- if (I.invalidExcel) {
2151
+ new Promise((B) => setTimeout(B, 1e3))
2152
+ ]), D = qo(m);
2153
+ if (D.invalidExcel) {
2139
2154
  k.value.push(
2140
- I.invalidExcelMessage ?? _("inventory.ingredient.import.fileError.invalidExcel")
2155
+ D.invalidExcelMessage ?? _("inventory.ingredient.import.fileError.invalidExcel")
2141
2156
  );
2142
2157
  return;
2143
2158
  }
2144
- if (a.value = I.importCreateResult, !a.value.length) {
2159
+ if (a.value = D.importCreateResult, !a.value.length) {
2145
2160
  k.value.push(_("inventory.ingredient.import.fileError.noData"));
2146
2161
  return;
2147
2162
  }
2148
- v.items = a.value.map((N) => N.poItems).flat();
2163
+ v.items = a.value.map((B) => B.poItems).flat();
2149
2164
  } catch (m) {
2150
- f.open({
2165
+ p.open({
2151
2166
  title: _("inventory.ingredient.import.fileError.unableToRead"),
2152
2167
  message: m == null ? void 0 : m.message,
2153
2168
  type: "error"
2154
2169
  }), console.error("Error in reading file", m);
2155
2170
  } finally {
2156
- k.value.length && f.open({
2171
+ k.value.length && p.open({
2157
2172
  title: _("inventory.ingredient.import.fileError.invalidExcel"),
2158
2173
  type: "error"
2159
2174
  }), x.value = !1;
2160
2175
  }
2161
2176
  }
2162
- return _e(l, (r) => {
2163
- r && C(r);
2164
- }), (r, m) => {
2165
- const I = T("FmSelect"), N = T("FmDatePicker"), j = T("FmTimePicker"), Q = T("FmCircularProgress"), Y = T("FmLabel"), A = T("FmIcon"), q = T("FmButton"), P = T("FmForm");
2166
- return S(), J(P, {
2177
+ return _e(r, (l) => {
2178
+ l && C(l);
2179
+ }), (l, m) => {
2180
+ const D = I("FmSelect"), B = I("FmDatePicker"), Q = I("FmTimePicker"), Y = I("FmCircularProgress"), K = I("FmLabel"), E = I("FmIcon"), U = I("FmButton"), P = I("FmForm");
2181
+ return S(), W(P, {
2167
2182
  ref_key: "formRef",
2168
2183
  ref: h
2169
2184
  }, {
2170
2185
  default: R(() => [
2171
- n("div", Jo, [
2172
- y(I, {
2173
- modelValue: b.value,
2174
- "onUpdate:modelValue": m[0] || (m[0] = (d) => b.value = d),
2186
+ n("div", Wo, [
2187
+ b(D, {
2188
+ modelValue: y.value,
2189
+ "onUpdate:modelValue": m[0] || (m[0] = (d) => y.value = d),
2175
2190
  label: "Transfer from",
2176
2191
  searchable: "",
2177
2192
  searchTarget: "label",
@@ -2186,50 +2201,50 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2186
2201
  "helper-text": "Helper",
2187
2202
  rules: [s(Oe)()]
2188
2203
  }, null, 8, ["modelValue", "rules"]),
2189
- y(N, {
2204
+ b(B, {
2190
2205
  modelValue: e.value,
2191
2206
  "onUpdate:modelValue": m[1] || (m[1] = (d) => e.value = d),
2192
2207
  label: "Transfer date",
2193
2208
  rules: [s(Oe)()]
2194
2209
  }, null, 8, ["modelValue", "rules"]),
2195
- y(j, {
2210
+ b(Q, {
2196
2211
  modelValue: u.value,
2197
2212
  "onUpdate:modelValue": m[2] || (m[2] = (d) => u.value = d),
2198
2213
  label: "Transfer time",
2199
2214
  rules: [s(Oe)()]
2200
2215
  }, null, 8, ["modelValue", "rules"]),
2201
- t.value ? (S(), D("div", Wo, [
2216
+ t.value ? (S(), T("div", Go, [
2202
2217
  n("div", null, [
2203
- y(Q, {
2218
+ b(Y, {
2204
2219
  size: "md",
2205
2220
  color: "neutral-gray-200"
2206
2221
  })
2207
2222
  ]),
2208
- n("div", Go, E(s(_)("inventory.formField.loading")), 1)
2209
- ])) : (S(), D(de, { key: 1 }, [
2210
- y(Qt, {
2223
+ n("div", ea, q(s(_)("inventory.formField.loading")), 1)
2224
+ ])) : (S(), T(de, { key: 1 }, [
2225
+ b(Qt, {
2211
2226
  "max-file-size": 5,
2212
- class: K({
2227
+ class: Z({
2213
2228
  "w-full": !0,
2214
- "h-[200px]": !l.value
2229
+ "h-[200px]": !r.value
2215
2230
  }),
2216
2231
  accept: ".xlsx,.xls",
2217
2232
  label: vt,
2218
- onFileUpload: m[3] || (m[3] = (d) => l.value = d),
2233
+ onFileUpload: m[3] || (m[3] = (d) => r.value = d),
2219
2234
  "button-label": s(_)("inventory.ingredient.import.selectFile")
2220
- }, Tt({ _: 2 }, [
2221
- l.value ? {
2235
+ }, It({ _: 2 }, [
2236
+ r.value ? {
2222
2237
  name: "default",
2223
2238
  fn: R(({ openFileDialog: d }) => [
2224
- y(Y, null, {
2239
+ b(K, null, {
2225
2240
  default: R(() => [
2226
- Te(E(vt))
2241
+ Ie(q(vt))
2227
2242
  ]),
2228
2243
  _: 1
2229
2244
  }),
2230
- n("div", ea, [
2245
+ n("div", ta, [
2231
2246
  n("div", {
2232
- class: K([
2247
+ class: Z([
2233
2248
  "fm-corner-radius-md p-16 flex items-center gap-16",
2234
2249
  {
2235
2250
  "border border-fm-color-neutral-gray-100": x.value,
@@ -2238,18 +2253,18 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2238
2253
  }
2239
2254
  ])
2240
2255
  }, [
2241
- x.value ? (S(), J(Q, {
2256
+ x.value ? (S(), W(Y, {
2242
2257
  key: 0,
2243
2258
  size: "md",
2244
2259
  color: "neutral-gray-200"
2245
- })) : (S(), J(A, {
2260
+ })) : (S(), W(E, {
2246
2261
  key: 1,
2247
2262
  name: i.value ? "error" : "attach_file",
2248
2263
  outline: "",
2249
2264
  color: i.value ? "system-error-300" : void 0
2250
2265
  }, null, 8, ["name", "color"])),
2251
2266
  n("div", {
2252
- class: K([
2267
+ class: Z([
2253
2268
  "fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
2254
2269
  {
2255
2270
  "text-fm-color-typo-disabled": x.value,
@@ -2257,10 +2272,10 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2257
2272
  }
2258
2273
  ])
2259
2274
  }, [
2260
- n("div", ta, E(l.value.name), 1)
2275
+ n("div", sa, q(r.value.name), 1)
2261
2276
  ], 2),
2262
- x.value ? H("", !0) : (S(), D("div", sa, [
2263
- y(q, {
2277
+ x.value ? j("", !0) : (S(), T("div", oa, [
2278
+ b(U, {
2264
2279
  label: s(_)("inventory.ingredient.import.replaceFile"),
2265
2280
  variant: i.value ? "destructive" : "secondary",
2266
2281
  "prepend-icon": i.value ? void 0 : "autorenew",
@@ -2268,34 +2283,34 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2268
2283
  }, null, 8, ["label", "variant", "prepend-icon", "onClick"])
2269
2284
  ]))
2270
2285
  ], 2),
2271
- k.value.length ? (S(), D("div", oa, [
2272
- (S(!0), D(de, null, Se(k.value, (c, z) => (S(), D("div", {
2273
- key: z,
2286
+ k.value.length ? (S(), T("div", aa, [
2287
+ (S(!0), T(de, null, Se(k.value, (c, O) => (S(), T("div", {
2288
+ key: O,
2274
2289
  class: "flex gap-8 items-center"
2275
2290
  }, [
2276
- y(A, {
2291
+ b(E, {
2277
2292
  name: "error",
2278
2293
  size: "sm",
2279
2294
  color: "system-error-300"
2280
2295
  }),
2281
- n("div", aa, E(c), 1)
2296
+ n("div", na, q(c), 1)
2282
2297
  ]))), 128))
2283
- ])) : H("", !0)
2298
+ ])) : j("", !0)
2284
2299
  ])
2285
2300
  ]),
2286
2301
  key: "0"
2287
2302
  } : void 0
2288
2303
  ]), 1032, ["class", "button-label"]),
2289
- l.value ? (S(), D("div", na, [
2290
- n("div", la, E(s(_)("inventory.ingredient.import.summary")), 1),
2291
- (S(!0), D(de, null, Se(a.value, (d, c) => (S(), J(Zo, {
2304
+ r.value ? (S(), T("div", la, [
2305
+ n("div", ra, q(s(_)("inventory.ingredient.import.summary")), 1),
2306
+ (S(!0), T(de, null, Se(a.value, (d, c) => (S(), W(Jo, {
2292
2307
  key: c,
2293
2308
  name: `Transfer Note ${c + 1}`,
2294
2309
  items: d.poItems,
2295
2310
  errors: d.errors,
2296
2311
  type: "create"
2297
2312
  }, null, 8, ["name", "items", "errors"]))), 128))
2298
- ])) : H("", !0)
2313
+ ])) : j("", !0)
2299
2314
  ], 64))
2300
2315
  ])
2301
2316
  ]),
@@ -2303,34 +2318,34 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2303
2318
  }, 512);
2304
2319
  };
2305
2320
  }
2306
- }), ia = { class: "w-[480px]" }, ua = /* @__PURE__ */ ce({
2321
+ }), ua = { class: "w-[480px]" }, da = /* @__PURE__ */ ce({
2307
2322
  __name: "XilnexImportDialog",
2308
2323
  props: {
2309
2324
  show: { type: Boolean }
2310
2325
  },
2311
2326
  emits: ["update:show", "submitted"],
2312
- setup(g, { expose: w, emit: l }) {
2313
- const f = l, t = St(g, "show"), v = De(), F = et(), $ = O(!1), b = O(), e = O();
2327
+ setup(g, { expose: w, emit: r }) {
2328
+ const p = r, t = St(g, "show"), v = Te(), F = et(), $ = M(!1), y = M(), e = M();
2314
2329
  w({
2315
2330
  validateInputs: () => {
2316
2331
  var a, i;
2317
- (i = (a = b.value) == null ? void 0 : a.validateInputs) == null || i.call(a);
2332
+ (i = (a = y.value) == null ? void 0 : a.validateInputs) == null || i.call(a);
2318
2333
  },
2319
2334
  resetInputsValidation: () => {
2320
2335
  var a, i;
2321
- (i = (a = b.value) == null ? void 0 : a.resetInputsValidation) == null || i.call(a);
2336
+ (i = (a = y.value) == null ? void 0 : a.resetInputsValidation) == null || i.call(a);
2322
2337
  },
2323
2338
  resetInputs: () => {
2324
2339
  var a, i;
2325
- (i = (a = b.value) == null ? void 0 : a.resetInputs) == null || i.call(a);
2340
+ (i = (a = y.value) == null ? void 0 : a.resetInputs) == null || i.call(a);
2326
2341
  }
2327
2342
  });
2328
2343
  function u() {
2329
2344
  var a, i;
2330
- (i = (a = b.value) == null ? void 0 : a.validateInputs) == null || i.call(a);
2345
+ (i = (a = y.value) == null ? void 0 : a.validateInputs) == null || i.call(a);
2331
2346
  }
2332
2347
  async function k() {
2333
- var i, h, _, C, r;
2348
+ var i, h, _, C, l;
2334
2349
  if (!((h = (i = e.value) == null ? void 0 : i.supplier) != null && h.name)) {
2335
2350
  v.open({
2336
2351
  title: "Upload failed",
@@ -2339,7 +2354,7 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2339
2354
  });
2340
2355
  return;
2341
2356
  }
2342
- if (!((_ = e.value) != null && _.items) || ((r = (C = e.value) == null ? void 0 : C.items) == null ? void 0 : r.length) === 0) {
2357
+ if (!((_ = e.value) != null && _.items) || ((l = (C = e.value) == null ? void 0 : C.items) == null ? void 0 : l.length) === 0) {
2343
2358
  v.open({
2344
2359
  title: "Upload failed",
2345
2360
  message: "No data to upload",
@@ -2366,9 +2381,9 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2366
2381
  }
2367
2382
  $.value = !0;
2368
2383
  try {
2369
- await F.importFromXilnex(e.value), f("update:show", !1);
2384
+ await F.importFromXilnex(e.value), p("update:show", !1);
2370
2385
  } catch (m) {
2371
- await new Promise((I) => setTimeout(I, 1e3)), v.open({
2386
+ await new Promise((D) => setTimeout(D, 1e3)), v.open({
2372
2387
  title: "Upload failed",
2373
2388
  message: m == null ? void 0 : m.message,
2374
2389
  type: "error"
@@ -2378,10 +2393,10 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2378
2393
  }
2379
2394
  }
2380
2395
  return (a, i) => {
2381
- const h = T("FmSpacer"), _ = T("FmButton"), C = T("FmDialog");
2382
- return S(), J(C, {
2396
+ const h = I("FmSpacer"), _ = I("FmButton"), C = I("FmDialog");
2397
+ return S(), W(C, {
2383
2398
  modelValue: s(t),
2384
- "onUpdate:modelValue": i[2] || (i[2] = (r) => xe(t) ? t.value = r : null),
2399
+ "onUpdate:modelValue": i[2] || (i[2] = (l) => xe(t) ? t.value = l : null),
2385
2400
  overlay: !0,
2386
2401
  "close-button": !1
2387
2402
  }, {
@@ -2389,16 +2404,16 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2389
2404
  n("div", null, "Xilnex transfer order", -1)
2390
2405
  ])),
2391
2406
  "dialog-footer": R(() => [
2392
- y(h, { class: "sm:hidden xs:hidden" }),
2393
- y(_, {
2407
+ b(h, { class: "sm:hidden xs:hidden" }),
2408
+ b(_, {
2394
2409
  disabled: $.value,
2395
2410
  class: "sm:w-full xs:w-full",
2396
2411
  label: "Cancel",
2397
2412
  size: "md",
2398
2413
  variant: "tertiary",
2399
- onClick: i[1] || (i[1] = (r) => f("update:show", !1))
2414
+ onClick: i[1] || (i[1] = (l) => p("update:show", !1))
2400
2415
  }, null, 8, ["disabled"]),
2401
- y(_, {
2416
+ b(_, {
2402
2417
  disabled: $.value,
2403
2418
  loading: $.value,
2404
2419
  class: "sm:w-full xs:w-full",
@@ -2409,13 +2424,13 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2409
2424
  }, null, 8, ["disabled", "loading"])
2410
2425
  ]),
2411
2426
  default: R(() => [
2412
- n("div", ia, [
2413
- y(ra, {
2427
+ n("div", ua, [
2428
+ b(ia, {
2414
2429
  ref_key: "formRef",
2415
- ref: b,
2430
+ ref: y,
2416
2431
  onValidationSuccess: k,
2417
2432
  modelValue: e.value,
2418
- "onUpdate:modelValue": i[0] || (i[0] = (r) => e.value = r)
2433
+ "onUpdate:modelValue": i[0] || (i[0] = (l) => e.value = l)
2419
2434
  }, null, 8, ["modelValue"])
2420
2435
  ])
2421
2436
  ]),
@@ -2423,60 +2438,60 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2423
2438
  }, 8, ["modelValue"]);
2424
2439
  };
2425
2440
  }
2426
- }), da = { class: "flex flex-col py-8" }, ca = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ma = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, pa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, fa = {
2441
+ }), ca = { class: "flex flex-col py-8" }, ma = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pa = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, fa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, va = {
2427
2442
  key: 0,
2428
2443
  class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
2429
- }, va = { class: "pt-8" }, yt = "ReceiveRequestViewSearchCriteria", Pa = /* @__PURE__ */ ce({
2444
+ }, ya = { class: "pt-8" }, yt = "ReceiveRequestViewSearchCriteria", Ra = /* @__PURE__ */ ce({
2430
2445
  __name: "ReceiveRequestView",
2431
2446
  setup(g) {
2432
- const { t: w } = he(), l = De();
2447
+ const { t: w } = he(), r = Te();
2433
2448
  He.object({
2434
2449
  name: He.string().optional().nullable(),
2435
2450
  startDate: He.string().optional().nullable(),
2436
2451
  endDate: He.string().optional().nullable()
2437
2452
  });
2438
- const f = U(
2453
+ const p = N(
2439
2454
  () => !k._currentLocation || e.loading.value
2440
2455
  ), x = ls(), t = st(), v = Me();
2441
2456
  function F() {
2442
- const A = {
2457
+ const E = {
2443
2458
  name: "",
2444
2459
  ...pt()
2445
- }, q = x.getItem(yt);
2446
- if (!q)
2447
- return A;
2460
+ }, U = x.getItem(yt);
2461
+ if (!U)
2462
+ return E;
2448
2463
  try {
2449
- return JSON.parse(q);
2464
+ return JSON.parse(U);
2450
2465
  } catch {
2451
- return A;
2466
+ return E;
2452
2467
  }
2453
2468
  }
2454
2469
  function $() {
2455
- x.setItem(yt, JSON.stringify(b.value));
2470
+ x.setItem(yt, JSON.stringify(y.value));
2456
2471
  }
2457
- const b = O(F()), e = Gt(
2472
+ const y = M(F()), e = Gt(
2458
2473
  Xe.RECEIVE_REQUEST,
2459
- b.value
2474
+ y.value
2460
2475
  ), { columnDefs: u } = es(
2461
2476
  Xe.RECEIVE_REQUEST,
2462
2477
  e
2463
2478
  ), k = We();
2464
2479
  async function a() {
2465
- const A = `inventory-record_${ft(b.value.startDate).format("DD-MM-YYYY_HH-mm")}-${ft(b.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, q = e.purchaseOrders.value.flatMap(
2480
+ const E = `inventory-record_${ft(y.value.startDate).format("DD-MM-YYYY_HH-mm")}-${ft(y.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, U = e.purchaseOrders.value.flatMap(
2466
2481
  (d) => d.items.map((c) => {
2467
2482
  var me;
2468
- const z = new Date(as(d._id) ?? ""), ne = d.effectiveAt ? new Date(d.effectiveAt) : void 0, Z = Ce(
2483
+ const O = new Date(as(d._id) ?? ""), ee = d.effectiveAt ? new Date(d.effectiveAt) : void 0, X = Ce(
2469
2484
  ss(c.sku, d.deliveryOrder || [])
2470
2485
  ), ke = Ce(c.quantity), ve = ((me = c == null ? void 0 : c.measurement) == null ? void 0 : me.abbrev) || c.sku.unit.abbrev;
2471
2486
  return {
2472
2487
  "SKU code": c.code,
2473
2488
  "SKU name": c.name,
2474
2489
  "PO #": d.seqNumber,
2475
- "Effective at": ne,
2476
- Date: z,
2490
+ "Effective at": ee,
2491
+ Date: O,
2477
2492
  Status: d.status,
2478
2493
  Reference: d.ref ?? "",
2479
- "Received quantity": Z,
2494
+ "Received quantity": X,
2480
2495
  "Ordered quantity": ke,
2481
2496
  Unit: ve,
2482
2497
  "Total cost": c.totalCost ? je(c.totalCost) : null
@@ -2497,30 +2512,30 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2497
2512
  [
2498
2513
  {
2499
2514
  name: "purchases",
2500
- data: q,
2515
+ data: U,
2501
2516
  columns: P
2502
2517
  }
2503
2518
  ],
2504
- A
2505
- ), l.open({
2519
+ E
2520
+ ), r.open({
2506
2521
  title: w("inventory.transfer.receiveRequest.export.success"),
2507
- message: w("inventory.transfer.receiveRequest.export.message", [A]),
2522
+ message: w("inventory.transfer.receiveRequest.export.message", [E]),
2508
2523
  type: "success"
2509
2524
  });
2510
2525
  }
2511
- const i = O(pt()), h = O("");
2512
- _e([() => i.value], ([A]) => {
2513
- !A.startDate || !A.endDate || (b.value.startDate = A.startDate, b.value.endDate = A.endDate, e.updateDateRange(
2514
- b.value.startDate,
2515
- b.value.endDate
2526
+ const i = M(pt()), h = M("");
2527
+ _e([() => i.value], ([E]) => {
2528
+ !E.startDate || !E.endDate || (y.value.startDate = E.startDate, y.value.endDate = E.endDate, e.updateDateRange(
2529
+ y.value.startDate,
2530
+ y.value.endDate
2516
2531
  ), $());
2517
2532
  }), _e([() => h.value], () => {
2518
2533
  $();
2519
2534
  });
2520
- function _(A) {
2521
- if (A === "create") {
2522
- if (f.value) {
2523
- l.open({
2535
+ function _(E) {
2536
+ if (E === "create") {
2537
+ if (p.value) {
2538
+ r.open({
2524
2539
  title: "Loading data...",
2525
2540
  message: "Please wait.",
2526
2541
  type: "info"
@@ -2529,14 +2544,14 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2529
2544
  }
2530
2545
  return e.promptCreateTransferDialog();
2531
2546
  }
2532
- if (A === "upload" && t.enableXilnexTransferNote)
2547
+ if (E === "upload" && t.enableXilnexTransferNote)
2533
2548
  return e.promptUploadTransferDialog();
2534
- if (A === "refresh")
2549
+ if (E === "refresh")
2535
2550
  return e.fetchData();
2536
- if (A === "export")
2551
+ if (E === "export")
2537
2552
  return a();
2538
2553
  }
2539
- const { breakpoints: C } = tt(), r = U(() => C.value.xs || C.value.sm), m = U(() => r.value ? 10 : 20), I = Kt(), N = U(() => [
2554
+ const { breakpoints: C } = tt(), l = N(() => C.value.xs || C.value.sm), m = N(() => l.value ? 10 : 20), D = Kt(), B = N(() => [
2540
2555
  {
2541
2556
  label: w("inventory.transfer.receiveRequest.actions.create"),
2542
2557
  value: "create",
@@ -2557,8 +2572,8 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2557
2572
  label: w("inventory.common.export"),
2558
2573
  value: "export"
2559
2574
  }
2560
- ]), j = U(() => {
2561
- const A = [
2575
+ ]), Q = N(() => {
2576
+ const E = [
2562
2577
  {
2563
2578
  type: "string",
2564
2579
  key: "status",
@@ -2567,7 +2582,7 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2567
2582
  new Set(e.purchaseOrders.value.map((P) => P.status))
2568
2583
  )
2569
2584
  }
2570
- ], q = [
2585
+ ], U = [
2571
2586
  {
2572
2587
  type: "string",
2573
2588
  key: "netsuiteTransactionNumber",
@@ -2596,98 +2611,98 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2596
2611
  }).filter((P) => P != null)
2597
2612
  }
2598
2613
  ];
2599
- return [...A, ...v.isEnabled ? q : []];
2600
- }), Q = O(null), Y = U(() => {
2601
- if (!Q.value)
2614
+ return [...E, ...v.isEnabled ? U : []];
2615
+ }), Y = M(null), K = N(() => {
2616
+ if (!Y.value)
2602
2617
  return e.purchaseOrders.value;
2603
- const A = Xt.build(Q.value);
2604
- return e.purchaseOrders.value.filter((q) => {
2605
- var P, d, c, z;
2618
+ const E = Xt.build(Y.value);
2619
+ return e.purchaseOrders.value.filter((U) => {
2620
+ var P, d, c, O;
2606
2621
  return Zt(
2607
2622
  {
2608
- netsuiteTransactionNumber: (d = (P = q.netSuite) == null ? void 0 : P.additionalInfo) == null ? void 0 : d.transactionnumber,
2609
- netsuiteOrderNo: (c = q.netSuite) == null ? void 0 : c.refNo,
2610
- netsuiteOrderId: (z = q.netSuite) == null ? void 0 : z.id,
2611
- status: q.status
2623
+ netsuiteTransactionNumber: (d = (P = U.netSuite) == null ? void 0 : P.additionalInfo) == null ? void 0 : d.transactionnumber,
2624
+ netsuiteOrderNo: (c = U.netSuite) == null ? void 0 : c.refNo,
2625
+ netsuiteOrderId: (O = U.netSuite) == null ? void 0 : O.id,
2626
+ status: U.status
2612
2627
  },
2613
- A
2628
+ E
2614
2629
  );
2615
2630
  });
2616
2631
  });
2617
- return (A, q) => {
2618
- const P = T("FmTable");
2619
- return S(), J(Jt, {
2632
+ return (E, U) => {
2633
+ const P = I("FmTable");
2634
+ return S(), W(Jt, {
2620
2635
  title: s(w)("inventory.transfer.receiveRequest.title2"),
2621
- actions: N.value,
2636
+ actions: B.value,
2622
2637
  "onClick:action": _
2623
2638
  }, {
2624
2639
  default: R(() => {
2625
2640
  var d;
2626
2641
  return [
2627
2642
  n("div", {
2628
- class: K([
2643
+ class: Z([
2629
2644
  "flex flex-col gap-8 max-h-full",
2630
2645
  {
2631
- "p-0": r.value,
2632
- "px-24 ": !r.value
2646
+ "p-0": l.value,
2647
+ "px-24 ": !l.value
2633
2648
  }
2634
2649
  ])
2635
2650
  }, [
2636
- y(Wt, {
2651
+ b(Wt, {
2637
2652
  "date-range-query": "",
2638
2653
  "date-range": i.value,
2639
- "onUpdate:dateRange": q[0] || (q[0] = (c) => i.value = c),
2654
+ "onUpdate:dateRange": U[0] || (U[0] = (c) => i.value = c),
2640
2655
  searchable: "",
2641
2656
  "change-location": "",
2642
2657
  search: h.value,
2643
- "onUpdate:search": q[1] || (q[1] = (c) => h.value = c),
2658
+ "onUpdate:search": U[1] || (U[1] = (c) => h.value = c),
2644
2659
  filterable: "",
2645
- "filter-attributes": j.value,
2646
- filter: Q.value,
2647
- "onUpdate:filter": q[2] || (q[2] = (c) => Q.value = c)
2660
+ "filter-attributes": Q.value,
2661
+ filter: Y.value,
2662
+ "onUpdate:filter": U[2] || (U[2] = (c) => Y.value = c)
2648
2663
  }, null, 8, ["date-range", "search", "filter-attributes", "filter"]),
2649
- (S(), J(P, {
2650
- style: gt(s(I).tableHeight),
2664
+ (S(), W(P, {
2665
+ style: gt(s(D).tableHeight),
2651
2666
  "column-defs": s(u),
2652
- "row-data": Y.value,
2667
+ "row-data": K.value,
2653
2668
  "search-value": h.value,
2654
- loading: f.value,
2655
- onRowClick: q[3] || (q[3] = (c) => s(e).promptShowTransferDetails(c.original)),
2669
+ loading: p.value,
2670
+ onRowClick: U[3] || (U[3] = (c) => s(e).promptShowTransferDetails(c.original)),
2656
2671
  key: (d = s(k)._currentLocation) == null ? void 0 : d.dbName,
2657
2672
  "page-size": m.value
2658
2673
  }, {
2659
2674
  "list-row": R((c) => [
2660
- y(xt, {
2675
+ b(xt, {
2661
2676
  row: c,
2662
2677
  onRowClick: s(e).promptShowTransferDetails
2663
2678
  }, {
2664
- default: R((z) => {
2665
- var ne, Z, ke, ve, me, we, Ue, Ne, Fe, Ye, ze, Ie, Ve, o, p, M, W, le, re, X;
2679
+ default: R((O) => {
2680
+ var ee, X, ke, ve, me, we, Ue, Ne, Fe, Ye, Be, De, Ve, o, f, A, H, le, re, J;
2666
2681
  return [
2667
- n("div", da, [
2668
- n("div", ca, [
2669
- y(s(fe), {
2670
- render: (ke = (Z = (ne = z._id) == null ? void 0 : ne.column) == null ? void 0 : Z.columnDef) == null ? void 0 : ke.cell,
2671
- props: (me = (ve = z._id) == null ? void 0 : ve.getContext) == null ? void 0 : me.call(ve)
2682
+ n("div", ca, [
2683
+ n("div", ma, [
2684
+ b(s(fe), {
2685
+ render: (ke = (X = (ee = O._id) == null ? void 0 : ee.column) == null ? void 0 : X.columnDef) == null ? void 0 : ke.cell,
2686
+ props: (me = (ve = O._id) == null ? void 0 : ve.getContext) == null ? void 0 : me.call(ve)
2672
2687
  }, null, 8, ["render", "props"])
2673
2688
  ]),
2674
- n("div", ma, [
2675
- y(s(fe), {
2676
- render: (Ne = (Ue = (we = z.supplier_name) == null ? void 0 : we.column) == null ? void 0 : Ue.columnDef) == null ? void 0 : Ne.cell,
2677
- props: (Ye = (Fe = z.supplier_name) == null ? void 0 : Fe.getContext) == null ? void 0 : Ye.call(Fe)
2689
+ n("div", pa, [
2690
+ b(s(fe), {
2691
+ render: (Ne = (Ue = (we = O.supplier_name) == null ? void 0 : we.column) == null ? void 0 : Ue.columnDef) == null ? void 0 : Ne.cell,
2692
+ props: (Ye = (Fe = O.supplier_name) == null ? void 0 : Fe.getContext) == null ? void 0 : Ye.call(Fe)
2678
2693
  }, null, 8, ["render", "props"])
2679
2694
  ]),
2680
- n("div", pa, E(c.original.items.map((ie) => `${ie.name}`).join(", ")), 1),
2681
- c.original.ref ? (S(), D("div", fa, [
2682
- y(s(fe), {
2683
- render: (Ve = (Ie = (ze = z.ref) == null ? void 0 : ze.column) == null ? void 0 : Ie.columnDef) == null ? void 0 : Ve.cell,
2684
- props: (p = (o = z.ref) == null ? void 0 : o.getContext) == null ? void 0 : p.call(o)
2695
+ n("div", fa, q(c.original.items.map((ie) => `${ie.name}`).join(", ")), 1),
2696
+ c.original.ref ? (S(), T("div", va, [
2697
+ b(s(fe), {
2698
+ render: (Ve = (De = (Be = O.ref) == null ? void 0 : Be.column) == null ? void 0 : De.columnDef) == null ? void 0 : Ve.cell,
2699
+ props: (f = (o = O.ref) == null ? void 0 : o.getContext) == null ? void 0 : f.call(o)
2685
2700
  }, null, 8, ["render", "props"])
2686
- ])) : H("", !0),
2687
- n("div", va, [
2688
- y(s(fe), {
2689
- render: (le = (W = (M = z.status) == null ? void 0 : M.column) == null ? void 0 : W.columnDef) == null ? void 0 : le.cell,
2690
- props: (X = (re = z.status) == null ? void 0 : re.getContext) == null ? void 0 : X.call(re)
2701
+ ])) : j("", !0),
2702
+ n("div", ya, [
2703
+ b(s(fe), {
2704
+ render: (le = (H = (A = O.status) == null ? void 0 : A.column) == null ? void 0 : H.columnDef) == null ? void 0 : le.cell,
2705
+ props: (J = (re = O.status) == null ? void 0 : re.getContext) == null ? void 0 : J.call(re)
2691
2706
  }, null, 8, ["render", "props"])
2692
2707
  ])
2693
2708
  ])
@@ -2699,16 +2714,16 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2699
2714
  _: 1
2700
2715
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
2701
2716
  ], 2),
2702
- (S(), J(Dt, { to: "body" }, [
2703
- y(Ao, Ze(s(e).transferDialogProps.value, {
2717
+ (S(), W(Tt, { to: "body" }, [
2718
+ b(Eo, Ze(s(e).transferDialogProps.value, {
2704
2719
  onSubmitted: s(e).fetchData
2705
2720
  }), null, 16, ["onSubmitted"]),
2706
- y(ts, Ze({
2721
+ b(ts, Ze({
2707
2722
  scope: s(Xe).RECEIVE_REQUEST
2708
2723
  }, s(e).transferDetailsProps.value, {
2709
2724
  onSubmitted: s(e).fetchData
2710
2725
  }), null, 16, ["scope", "onSubmitted"]),
2711
- y(ua, It(Vt(s(e).xilnexImportDialogProps.value)), null, 16)
2726
+ b(da, Dt(Vt(s(e).xilnexImportDialogProps.value)), null, 16)
2712
2727
  ]))
2713
2728
  ];
2714
2729
  }),
@@ -2718,5 +2733,5 @@ const qo = exports.FfCalculator, Mo = { class: "flex flex-col flex-1" }, Uo = {
2718
2733
  }
2719
2734
  });
2720
2735
  export {
2721
- Pa as default
2736
+ Ra as default
2722
2737
  };