@feedmepos/mf-inventory-portal 1.0.37-dev.3 → 1.0.38

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