@feedmepos/mf-inventory-portal 1.2.44 → 1.2.46

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 (68) hide show
  1. package/dist/{App-DXnFnEL2.js → App-DBd4DVaZ.js} +3 -3
  2. package/dist/{ApprovalView-DlrrecgX.js → ApprovalView-C-XcEiMZ.js} +5 -5
  3. package/dist/{BindingsDialog-DJUoNmmX.js → BindingsDialog-CXKDYmmR.js} +2 -2
  4. package/dist/{BindingsPicker-D1SWqbV4.js → BindingsPicker-Cq1yHJhJ.js} +2 -2
  5. package/dist/{BindingsTable-Des625xH.js → BindingsTable-BL8DhipQ.js} +3 -3
  6. package/dist/{ClosingDraftView-DzMTD-L0.js → ClosingDraftView-nwQQl4U1.js} +8 -8
  7. package/dist/{ClosingHistoryView-CXD3_B2n.js → ClosingHistoryView-BC8ZP51z.js} +3 -3
  8. package/dist/{ClosingTemplateView-HZ2qZk0M.js → ClosingTemplateView-B4jnOrpc.js} +14 -14
  9. package/dist/{DeliveryOrderPrintPreview-BC8cochN.js → DeliveryOrderPrintPreview-Bxy5xIrP.js} +1 -1
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bkgk1wIR.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D5DApGXT.js} +4 -4
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DaUjYQ_e.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DHS5LMuy.js} +2 -2
  12. package/dist/{FmMultiselectDialog-CMQy85kw.js → FmMultiselectDialog-C6OzbsWu.js} +2 -2
  13. package/dist/{FmMultiselectDialog-DGr_DO7P.js → FmMultiselectDialog-C7DVf8cL.js} +1 -1
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-viiJ9w7R.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BtN3UL40.js} +3 -3
  15. package/dist/{ImportView-UEUfNLOO.js → ImportView-BhmfI7Am.js} +6 -6
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-rN9PiiZM.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BXSO5UKK.js} +1 -1
  17. package/dist/{IngredientGroupView-B0QS_v4i.js → IngredientGroupView-DfAt-7Fz.js} +5 -5
  18. package/dist/{IngredientsView-DgCC2j7p.js → IngredientsView-4MNLuMhd.js} +14 -14
  19. package/dist/{IntegrationView-BgtXZ8-L.js → IntegrationView-CvgAJIaG.js} +338 -336
  20. package/dist/{InventoryBindingForm-CD_pHm2x.js → InventoryBindingForm-CQB1X3d5.js} +1 -1
  21. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CeAcQ01V.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Sebvr-gm.js} +4 -4
  22. package/dist/{InventoryBindingSummary-BKkUajN2.js → InventoryBindingSummary-_-dkvb4N.js} +1 -1
  23. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CovU3n87.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BGsjKOls.js} +1 -1
  24. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-9QTyo0in.js → PremiumBadge.vue_vue_type_script_setup_true_lang-D9goSrss.js} +2 -2
  25. package/dist/{PublishView-TBHyDc8C.js → PublishView-BFdsGmRf.js} +3 -3
  26. package/dist/{PurchaseOrderPrintPreview-RYbcK57P.js → PurchaseOrderPrintPreview-DpaV5GjO.js} +1 -1
  27. package/dist/{ReceiveRequestView-CAut48Gh.js → ReceiveRequestView-DNimgIgR.js} +202 -192
  28. package/dist/{RecipeView-Dyh1_VlX.js → RecipeView-D8CH2rJC.js} +8 -8
  29. package/dist/{StockView-CjhGTe8D.js → StockView-cXMeYZEU.js} +15 -15
  30. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CsEcdtv7.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bb-yJBxo.js} +1 -1
  31. package/dist/{SupplierView-Cwkl4DTN.js → SupplierView-Bl0JNI44.js} +11 -11
  32. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-6PR-_jZG.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-C-VmXiM3.js} +2 -2
  33. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BO6GCBNu.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DqmlOtC4.js} +1 -1
  34. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CBj1d2F3.js → TransferDetails.vue_vue_type_script_setup_true_lang-D-4LyU74.js} +14 -14
  35. package/dist/{TransferTemplateView-IszJbyCQ.js → TransferTemplateView-COJEXmF0.js} +15 -15
  36. package/dist/{UnitView-CRvgf3Rp.js → UnitView-ecUANF8x.js} +6 -6
  37. package/dist/{WarehouseView-CPNbR-Sz.js → WarehouseView-DZ9OCali.js} +5 -5
  38. package/dist/{WastageTemplateView-GNiI1JIu.js → WastageTemplateView-DXu5bayJ.js} +14 -14
  39. package/dist/api/netsuite.d.ts +4 -0
  40. package/dist/{app-DHUMB72T.js → app-aLZoWUfQ.js} +7 -7
  41. package/dist/app.js +1 -1
  42. package/dist/{closing-template-D9SS4U_4.js → closing-template-D-cf9Vnu.js} +1 -1
  43. package/dist/{date2-CvE08rV1.js → date2-DluMG3-3.js} +1 -1
  44. package/dist/{dayjs.min-BktyX7i-.js → dayjs.min-UuQWuDkU.js} +1 -1
  45. package/dist/{decimal-Bm0qNw-w.js → decimal-B2f58cUQ.js} +2 -2
  46. package/dist/{defineDeepModel-CmVhoc_Z.js → defineDeepModel-DUvW0g9M.js} +1 -1
  47. package/dist/{duplicate-template-DZdqPu3T.js → duplicate-template-BiGYHuPK.js} +1 -1
  48. package/dist/{feature-D0xmVCVJ.js → feature-B-rekKRC.js} +2 -2
  49. package/dist/{format-time-from-id-Z3OcKT3L.js → format-time-from-id-CMm14GBq.js} +1 -1
  50. package/dist/{format-unit-display-CE9leKrP.js → format-unit-display-DeHfXVX_.js} +10 -10
  51. package/dist/{import-export.helper-uOlmRosV.js → import-export.helper-rXmKqRlR.js} +5 -5
  52. package/dist/{index-D-pxCkqa.js → index-CEK6OlSE.js} +1 -1
  53. package/dist/{index-D8UuoY07.js → index-CYdIQDVa.js} +1 -1
  54. package/dist/{index-CIU4QTLi.js → index-DGs4MBmv.js} +3 -3
  55. package/dist/{lodash-BFSaO8Ul.js → lodash-DO8ShgBV.js} +1 -1
  56. package/dist/{netsuite-DcUaeNf9.js → netsuite-NShFW2SJ.js} +3 -3
  57. package/dist/{purchase-order-template-BlLi95c1.js → purchase-order-template-COeJz9vK.js} +1 -1
  58. package/dist/{rules-mI-itS-k.js → rules-C_U2Ahtv.js} +3 -3
  59. package/dist/{stock-WdPzMtZG.js → stock-B9KGLNAt.js} +3 -3
  60. package/dist/{stock-CwESi9cl.js → stock-DdZuie8e.js} +1 -1
  61. package/dist/{supplier-dYpKxqKD.js → supplier-BCfa74hz.js} +2 -2
  62. package/dist/{use-ingredient-select-dialog-COkMh2vC.js → use-ingredient-select-dialog-CoAP08vZ.js} +2 -2
  63. package/dist/{use-inventory-binding-dialog-BuRH5N-e.js → use-inventory-binding-dialog-BPXhlhVD.js} +2 -2
  64. package/dist/{use-template-enabled-locations-2-BH64c89n.js → use-template-enabled-locations-2-CYfkmGP5.js} +2 -2
  65. package/dist/{vue-i18n-CeLhTNuU.js → vue-i18n-Cn8L1Fah.js} +2 -2
  66. package/dist/{xlsx-xTuXYh72.js → xlsx-jqtV3ziP.js} +1 -1
  67. package/dist/{xlsx.util-Da1cHoG7.js → xlsx.util-BBey-FqO.js} +1 -1
  68. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
- import { reactive as It, onMounted as We, watch as _e, computed as q, h as Q, defineComponent as de, openBlock as x, createElementBlock as T, Fragment as re, renderList as xe, createElementVNode as l, toDisplayString as E, unref as t, resolveComponent as V, createVNode as f, withCtx as A, createCommentVNode as K, ref as N, createBlock as se, normalizeClass as Z, normalizeStyle as $t, createTextVNode as Pe, toRaw as At, shallowRef as _t, onUnmounted as Et, triggerRef as Mt, mergeProps as nt, isRef as Se, createSlots as qt, Teleport as Nt, normalizeProps as Ut, guardReactiveProps as Bt } from "vue";
2
- import { s as lt, t as pe, I as zt, f as Dt, L as Lt, A as Ht, u as Ge, a as Je, M as ht, O as jt, P as Qt, Q as Yt, T as Kt, v as Xt, m as Xe } from "./app-DHUMB72T.js";
3
- import { i as kt, _ as Zt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DaUjYQ_e.js";
4
- import { u as Wt, P as at, a as Gt, _ as Jt, g as es } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CBj1d2F3.js";
5
- import { R as Ne, a as we, e as Ze, d as ts, A as Ue, M as ss, B as as } from "./rules-mI-itS-k.js";
6
- import { _ as Tt, u as os, i as ns, e as ls } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-9QTyo0in.js";
7
- import { d as xt } from "./dayjs.min-BktyX7i-.js";
1
+ import { reactive as It, onMounted as We, watch as _e, computed as M, h as Q, defineComponent as de, openBlock as x, createElementBlock as T, Fragment as re, renderList as xe, createElementVNode as l, toDisplayString as E, unref as t, resolveComponent as V, createVNode as f, withCtx as A, createCommentVNode as K, ref as N, createBlock as se, normalizeClass as Z, normalizeStyle as $t, createTextVNode as Pe, toRaw as At, shallowRef as _t, onUnmounted as Et, triggerRef as Mt, mergeProps as nt, isRef as Se, createSlots as qt, Teleport as Nt, normalizeProps as Ut, guardReactiveProps as Bt } from "vue";
2
+ import { s as lt, t as pe, I as zt, f as Dt, L as Lt, A as Ht, u as Ge, a as Je, M as ht, O as jt, P as Qt, Q as Yt, T as Kt, v as Xt, m as Xe } from "./app-aLZoWUfQ.js";
3
+ import { i as kt, _ as Zt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DHS5LMuy.js";
4
+ import { u as Wt, P as at, a as Gt, _ as Jt, g as es } from "./TransferDetails.vue_vue_type_script_setup_true_lang-D-4LyU74.js";
5
+ import { R as Ne, a as we, e as Ze, d as ts, A as Ue, M as ss, B as as } from "./rules-C_U2Ahtv.js";
6
+ import { _ as Tt, u as os, i as ns, e as ls } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-D9goSrss.js";
7
+ import { d as xt } from "./dayjs.min-UuQWuDkU.js";
8
8
  import { u as rs } from "./useTabStorage-BkIVScW_.js";
9
9
  import { u as is, _ as us } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
10
10
  import { useBreakpoints as rt, components as ge, FmButtonVariant as ds, useSnackbar as Re, useDialog as cs, useProxiedModel as Vt } from "@feedmepos/ui-library";
11
11
  import { F as qe } from "./form-mode.enum-BKiNVH6A.js";
12
- import { _ as ms, a as ps, b as fs, F as vs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-viiJ9w7R.js";
13
- import { u as et, c as ys, P as bs } from "./feature-D0xmVCVJ.js";
14
- import { u as Be } from "./netsuite-DcUaeNf9.js";
15
- import { c as Te, u as gs, _ as _s } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bkgk1wIR.js";
12
+ import { _ as ms, a as ps, b as fs, F as vs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BtN3UL40.js";
13
+ import { u as et, c as ys, P as bs } from "./feature-B-rekKRC.js";
14
+ import { u as Be } from "./netsuite-NShFW2SJ.js";
15
+ import { c as Te, u as gs, _ as _s } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D5DApGXT.js";
16
16
  import { useI18n as he } from "@feedmepos/mf-common";
17
- import { a as hs } from "./FmMultiselectDialog-CMQy85kw.js";
17
+ import { a as hs } from "./FmMultiselectDialog-C6OzbsWu.js";
18
18
  import { F as ve, _ as Pt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js";
19
- import { u as it } from "./supplier-dYpKxqKD.js";
20
- import { d as ut, e as ks, g as xs, b as Cs } from "./date2-CvE08rV1.js";
19
+ import { u as it } from "./supplier-BCfa74hz.js";
20
+ import { d as ut, e as ks, g as xs, b as Cs } from "./date2-DluMG3-3.js";
21
21
  import { _ as Ss } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
22
- import { a as Rt } from "./format-unit-display-CE9leKrP.js";
23
- import { u as dt } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-6PR-_jZG.js";
24
- import { u as ws } from "./vue-i18n-CeLhTNuU.js";
25
- import { s as Fs, r as Is } from "./xlsx.util-Da1cHoG7.js";
22
+ import { a as Rt } from "./format-unit-display-DeHfXVX_.js";
23
+ import { u as dt } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-C-VmXiM3.js";
24
+ import { u as ws } from "./vue-i18n-Cn8L1Fah.js";
25
+ import { s as Fs, r as Is } from "./xlsx.util-BBey-FqO.js";
26
26
  import { F as $s } from "./FmDroppableField-J0xUsOTV.js";
27
- import { d as Ds } from "./defineDeepModel-CmVhoc_Z.js";
27
+ import { d as Ds } from "./defineDeepModel-DUvW0g9M.js";
28
28
  import { N as Ts, H as Vs } from "./app-uBuHtW8m.js";
29
29
  var te = /* @__PURE__ */ ((m) => (m.Code = "Code", m.Name = "Name", m.TemplateName = "TemplateName", m.Amount = "Amount", m.Cost = "Cost", m.TotalCost = "TotalCost", m.Delete = "Delete", m))(te || {});
30
30
  const Ps = () => (he(), Q(
@@ -36,7 +36,7 @@ const Ps = () => (he(), Q(
36
36
  `Total (${Dt()})`
37
37
  ));
38
38
  function Rs(m) {
39
- const { t: b } = he(), r = It({}), { breakpoints: d } = rt(), y = et(), o = Be();
39
+ const { t: b } = he(), r = It({}), { breakpoints: d } = rt(), v = et(), o = Be();
40
40
  We(() => {
41
41
  for (const c of m.items) {
42
42
  if (!c.totalCost)
@@ -75,7 +75,7 @@ function Rs(m) {
75
75
  );
76
76
  function k(c) {
77
77
  var n, p, s, i, u, h, S;
78
- return !!(((p = (n = c.defaultCost) == null ? void 0 : n.costPerUnit) == null ? void 0 : p.amount) ?? ((S = (h = (u = (i = (s = m.supplier) == null ? void 0 : s.supplyItems) == null ? void 0 : i.find((v) => v.skuId === c._id)) == null ? void 0 : u.defaultCost) == null ? void 0 : h.costPerUnit) == null ? void 0 : S.amount));
78
+ return !!(((p = (n = c.defaultCost) == null ? void 0 : n.costPerUnit) == null ? void 0 : p.amount) ?? ((S = (h = (u = (i = (s = m.supplier) == null ? void 0 : s.supplyItems) == null ? void 0 : i.find((y) => y.skuId === c._id)) == null ? void 0 : u.defaultCost) == null ? void 0 : h.costPerUnit) == null ? void 0 : S.amount));
79
79
  }
80
80
  const C = [
81
81
  {
@@ -190,7 +190,7 @@ function Rs(m) {
190
190
  header: () => b("inventory.transfer.form.items.table.Amount"),
191
191
  minSize: 200,
192
192
  cell(c) {
193
- var i, u, h, S, v;
193
+ var i, u, h, S, y;
194
194
  const e = c.row.original, n = (i = m.forecastAmounts) == null ? void 0 : i.find((g) => g.skuId === e.sku._id), p = n ? n.helperState === "error" ? `Predicted: ${n.amount} (out of range)` : `Predicted: ${n.amount}` : void 0, s = (S = (h = (u = m.template) == null ? void 0 : u.purchaseOrder) == null ? void 0 : h.items) == null ? void 0 : S.find(
195
195
  (g) => g.sku._id === e.sku._id
196
196
  );
@@ -213,7 +213,7 @@ function Rs(m) {
213
213
  quantity: g.amount,
214
214
  measurement: g.measurement
215
215
  };
216
- if (y.enableTotalCost) {
216
+ if (v.enableTotalCost) {
217
217
  const { cost: B } = Te(
218
218
  $.sku,
219
219
  $.quantity,
@@ -235,7 +235,7 @@ function Rs(m) {
235
235
  rules: [
236
236
  ps(
237
237
  +we(
238
- ((v = e.quantity) == null ? void 0 : v.amount) === 0 ? { amount: 0, precision: 0 } : (s == null ? void 0 : s.minimumQuantity) ?? { amount: 0, precision: 0 }
238
+ ((y = e.quantity) == null ? void 0 : y.amount) === 0 ? { amount: 0, precision: 0 } : (s == null ? void 0 : s.minimumQuantity) ?? { amount: 0, precision: 0 }
239
239
  )
240
240
  ),
241
241
  fs(
@@ -414,7 +414,7 @@ function Rs(m) {
414
414
  }
415
415
  ];
416
416
  return {
417
- columnDefs: q(() => y.enableTotalCost && m.transferType === pe.enum.purchase ? C : C.filter(
417
+ columnDefs: M(() => v.enableTotalCost && m.transferType === pe.enum.purchase ? C : C.filter(
418
418
  (c) => c.id !== "Cost"
419
419
  /* Cost */
420
420
  ))
@@ -428,9 +428,9 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
428
428
  setup(m) {
429
429
  const b = it();
430
430
  function r(d) {
431
- return b.suppliers.find((y) => y._id === d);
431
+ return b.suppliers.find((v) => v._id === d);
432
432
  }
433
- return (d, y) => (x(), T("div", Os, [
433
+ return (d, v) => (x(), T("div", Os, [
434
434
  (x(!0), T(re, null, xe(Object.keys(d.prices), (o) => {
435
435
  var k;
436
436
  return x(), T("div", {
@@ -447,13 +447,13 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
447
447
  }, [
448
448
  l("div", Ms, [
449
449
  l("span", null, E(C.totalCost ? t(Ze)(C.totalCost) : "No data"), 1),
450
- y[0] || (y[0] = l("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
450
+ v[0] || (v[0] = l("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
451
451
  l("span", null, E(t(we)(C.totalUnit, !1)), 1),
452
452
  l("span", null, E(((I = C.measurement) == null ? void 0 : I.abbrev) ?? C.unit.abbrev), 1)
453
453
  ]),
454
454
  l("div", qs, [
455
455
  l("span", null, "(#" + E(C.seqNumber) + ")", 1),
456
- y[1] || (y[1] = l("span", null, E(" "), -1)),
456
+ v[1] || (v[1] = l("span", null, E(" "), -1)),
457
457
  l("span", null, E(t(ut)(new Date(C.date))), 1)
458
458
  ])
459
459
  ]);
@@ -477,8 +477,8 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
477
477
  setup(m) {
478
478
  const { t: b } = he();
479
479
  return (r, d) => {
480
- var k, C, I, c, e, n, p, s, i, u, h, S, v, g, $, B, z, W, J, U, P, R, D, M, L, X, ae;
481
- const y = V("FmLabel"), o = V("FmSpacer");
480
+ var k, C, I, c, e, n, p, s, i, u, h, S, y, g, $, B, z, W, J, U, P, R, D, q, L, X, ae;
481
+ const v = V("FmLabel"), o = V("FmSpacer");
482
482
  return x(), T("div", Ns, [
483
483
  l("div", Us, [
484
484
  l("div", Bs, [
@@ -494,7 +494,7 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
494
494
  ]),
495
495
  l("div", Hs, [
496
496
  l("div", js, [
497
- f(y, {
497
+ f(v, {
498
498
  label: t(b)(`inventory.transfer.form.items.table.${t(te).Code}`)
499
499
  }, null, 8, ["label"]),
500
500
  f(t(ve), {
@@ -504,11 +504,11 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
504
504
  d[0] || (d[0] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
505
505
  ]),
506
506
  l("div", Qs, [
507
- f(y, {
507
+ f(v, {
508
508
  label: t(b)(`inventory.transfer.form.items.table.${t(te).Name}`)
509
509
  }, null, 8, ["label"]),
510
510
  f(t(ve), {
511
- render: (v = (S = (h = r.cellByColId[t(te).Name]) == null ? void 0 : h.column) == null ? void 0 : S.columnDef) == null ? void 0 : v.cell,
511
+ render: (y = (S = (h = r.cellByColId[t(te).Name]) == null ? void 0 : h.column) == null ? void 0 : S.columnDef) == null ? void 0 : y.cell,
512
512
  props: ($ = (g = r.cellByColId[t(te).Name]) == null ? void 0 : g.getContext) == null ? void 0 : $.call(g)
513
513
  }, null, 8, ["render", "props"]),
514
514
  d[1] || (d[1] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
@@ -516,7 +516,7 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
516
516
  ]),
517
517
  l("div", Ys, [
518
518
  l("div", Ks, [
519
- f(y, {
519
+ f(v, {
520
520
  label: t(b)(`inventory.transfer.form.items.table.${t(te).Amount}`)
521
521
  }, null, 8, ["label"]),
522
522
  f(t(ve), {
@@ -528,7 +528,7 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
528
528
  r.cellByColId[t(te).Cost] ? (x(), T("div", Xs, [
529
529
  f(Tt, { "z-index": 50 }, {
530
530
  default: A(() => [
531
- f(y, {
531
+ f(v, {
532
532
  label: t(b)(`inventory.transfer.form.items.table.${t(te).Cost}2`)
533
533
  }, null, 8, ["label"])
534
534
  ]),
@@ -536,7 +536,7 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
536
536
  }),
537
537
  f(t(ve), {
538
538
  render: (D = (R = (P = r.cellByColId[t(te).Cost]) == null ? void 0 : P.column) == null ? void 0 : R.columnDef) == null ? void 0 : D.cell,
539
- props: (L = (M = r.cellByColId[t(te).Cost]) == null ? void 0 : M.getContext) == null ? void 0 : L.call(M)
539
+ props: (L = (q = r.cellByColId[t(te).Cost]) == null ? void 0 : q.getContext) == null ? void 0 : L.call(q)
540
540
  }, null, 8, ["render", "props"]),
541
541
  d[3] || (d[3] = l("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
542
542
  ])) : K("", !0)
@@ -552,7 +552,7 @@ const Os = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
552
552
  }
553
553
  });
554
554
  function Ws(m) {
555
- const b = q({
555
+ const b = M({
556
556
  get() {
557
557
  const o = m.getEffectiveAt();
558
558
  return o ? new Date(o) : null;
@@ -560,21 +560,21 @@ function Ws(m) {
560
560
  set(o) {
561
561
  m.setEffectiveAt((o == null ? void 0 : o.toISOString()) ?? null);
562
562
  }
563
- }), r = q({
563
+ }), r = M({
564
564
  get() {
565
565
  return !!b.value;
566
566
  },
567
567
  set(o) {
568
568
  o ? b.value = /* @__PURE__ */ new Date() : b.value = null;
569
569
  }
570
- }), d = q({
570
+ }), d = M({
571
571
  get() {
572
572
  return b.value === null ? "" : ut(b.value);
573
573
  },
574
574
  set(o) {
575
- o ? b.value = /* @__PURE__ */ new Date(`${o} ${y.value}`) : b.value = null;
575
+ o ? b.value = /* @__PURE__ */ new Date(`${o} ${v.value}`) : b.value = null;
576
576
  }
577
- }), y = q({
577
+ }), v = M({
578
578
  get() {
579
579
  return b.value === null ? "" : ks(b.value);
580
580
  },
@@ -586,7 +586,7 @@ function Ws(m) {
586
586
  backdatePo: b,
587
587
  backdateSwitch: r,
588
588
  backdateModel: d,
589
- backdateTimeModel: y
589
+ backdateTimeModel: v
590
590
  };
591
591
  }
592
592
  const Gs = {
@@ -643,7 +643,7 @@ const Gs = {
643
643
  },
644
644
  emits: ["update:poItems", "update:forecastAmounts"],
645
645
  setup(m, { emit: b }) {
646
- const r = m, d = b, y = N(!1), o = N(7), k = os(), C = Re(), { t: I } = he();
646
+ const r = m, d = b, v = N(!1), o = N(7), k = os(), C = Re(), { t: I } = he();
647
647
  function c(s, i, u) {
648
648
  return i != null && s < i && (s = i), u != null && s > u && (s = u), s;
649
649
  }
@@ -657,13 +657,13 @@ const Gs = {
657
657
  name: u,
658
658
  baseAmount: h,
659
659
  measurement: S,
660
- min: v,
660
+ min: y,
661
661
  max: g
662
662
  }) {
663
663
  if (S) {
664
664
  const $ = S.conversion.amount;
665
665
  let B = Math.ceil(h / $);
666
- return B = c(B, v, g), {
666
+ return B = c(B, y, g), {
667
667
  sku: s,
668
668
  code: i,
669
669
  name: u,
@@ -671,7 +671,7 @@ const Gs = {
671
671
  measurement: S
672
672
  };
673
673
  } else {
674
- const $ = Math.ceil(c(h, v, g));
674
+ const $ = Math.ceil(c(h, y, g));
675
675
  return {
676
676
  sku: s,
677
677
  code: i,
@@ -683,7 +683,7 @@ const Gs = {
683
683
  }
684
684
  async function p() {
685
685
  if (o.value < 1) return;
686
- y.value = !1, await k.readPurchaseOrder(o.value, r.templateId);
686
+ v.value = !1, await k.readPurchaseOrder(o.value, r.templateId);
687
687
  const s = k.purchaseOrderForecast.skus;
688
688
  if (s.length === 0) {
689
689
  C.open({
@@ -694,11 +694,11 @@ const Gs = {
694
694
  }
695
695
  const i = r.templateItems.reduce((h, S) => {
696
696
  var B;
697
- const v = (B = r.poItems) == null ? void 0 : B.find((z) => z.sku._id === S.sku._id), g = s.find((z) => z.id === S.sku._id);
697
+ const y = (B = r.poItems) == null ? void 0 : B.find((z) => z.sku._id === S.sku._id), g = s.find((z) => z.id === S.sku._id);
698
698
  if (!g)
699
- return v && h.push(v), h;
699
+ return y && h.push(y), h;
700
700
  if (!r.templateId && g.amount <= 0) return h;
701
- const $ = g.amount ?? e(v == null ? void 0 : v.quantity) ?? 0;
701
+ const $ = g.amount ?? e(y == null ? void 0 : y.quantity) ?? 0;
702
702
  return h.push(
703
703
  n({
704
704
  sku: S.sku,
@@ -712,24 +712,24 @@ const Gs = {
712
712
  ), h;
713
713
  }, []), u = s.map((h) => {
714
714
  const S = r.templateItems.find((W) => W.sku._id === h.id);
715
- let v = h.amount, g = 0;
715
+ let y = h.amount, g = 0;
716
716
  if (S != null && S.measurement) {
717
717
  const W = e(S.measurement.conversion) ?? 1;
718
- v = Math.ceil(h.amount / W);
718
+ y = Math.ceil(h.amount / W);
719
719
  } else
720
- v = Math.ceil(h.amount);
721
- const $ = e(S == null ? void 0 : S.minimumQuantity) ?? 0, B = e(S == null ? void 0 : S.maximumQuantity) ?? 1 / 0, z = v < $ || v > B ? "error" : "success";
722
- return { skuId: h.id, amount: v, precision: g, helperState: z };
720
+ y = Math.ceil(h.amount);
721
+ const $ = e(S == null ? void 0 : S.minimumQuantity) ?? 0, B = e(S == null ? void 0 : S.maximumQuantity) ?? 1 / 0, z = y < $ || y > B ? "error" : "success";
722
+ return { skuId: h.id, amount: y, precision: g, helperState: z };
723
723
  });
724
724
  d("update:poItems", i), d("update:forecastAmounts", u);
725
725
  }
726
726
  return (s, i) => {
727
- const u = V("FmButton"), h = V("FmIcon"), S = V("FmStepperField"), v = V("FmPopover");
728
- return x(), se(v, {
727
+ const u = V("FmButton"), h = V("FmIcon"), S = V("FmStepperField"), y = V("FmPopover");
728
+ return x(), se(y, {
729
729
  disabled: s.disabled,
730
730
  class: "flex",
731
- "show-popover": y.value,
732
- onPopoverChanged: i[3] || (i[3] = (g) => y.value = g)
731
+ "show-popover": v.value,
732
+ onPopoverChanged: i[3] || (i[3] = (g) => v.value = g)
733
733
  }, {
734
734
  "popover-button": A(() => [
735
735
  f(u, {
@@ -767,7 +767,7 @@ const Gs = {
767
767
  icon: "close",
768
768
  size: "md",
769
769
  variant: "tertiary",
770
- onClick: i[0] || (i[0] = (g) => y.value = !1)
770
+ onClick: i[0] || (i[0] = (g) => v.value = !1)
771
771
  })
772
772
  ]),
773
773
  f(S, {
@@ -793,7 +793,7 @@ const Gs = {
793
793
  f(u, {
794
794
  label: t(I)("common.cancel"),
795
795
  variant: "tertiary",
796
- onClick: i[2] || (i[2] = (g) => y.value = !1)
796
+ onClick: i[2] || (i[2] = (g) => v.value = !1)
797
797
  }, null, 8, ["label"]),
798
798
  f(u, {
799
799
  label: t(I)("inventory.transfer.form.items.forecastStock.generate"),
@@ -810,8 +810,8 @@ const Gs = {
810
810
  function fa() {
811
811
  const m = Re(), b = dt(), r = N(!1);
812
812
  _e(r, (k) => {
813
- k && (y.value = !0, d().finally(() => {
814
- y.value = !1;
813
+ k && (v.value = !0, d().finally(() => {
814
+ v.value = !1;
815
815
  }));
816
816
  });
817
817
  async function d() {
@@ -845,10 +845,10 @@ function fa() {
845
845
  }), r.value = !1;
846
846
  }
847
847
  }
848
- const y = N(!1), o = N({});
848
+ const v = N(!1), o = N({});
849
849
  return {
850
850
  comparePricesToggle: r,
851
- comparePriceFetching: y,
851
+ comparePriceFetching: v,
852
852
  comparePriceBySku: o
853
853
  };
854
854
  }
@@ -867,7 +867,7 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
867
867
  return r.column.columnDef.meta;
868
868
  }
869
869
  return (r, d) => {
870
- var y, o;
870
+ var v, o;
871
871
  return x(), T(re, null, [
872
872
  l("tr", {
873
873
  class: Z(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm", {
@@ -894,7 +894,7 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
894
894
  ], 6);
895
895
  }), 128))
896
896
  ], 2),
897
- r.showComparePrice && Object.keys(r.comparePriceBySku[(y = r.row.original.sku) == null ? void 0 : y._id] ?? {}).length > 0 ? (x(), T("tr", ya, [
897
+ r.showComparePrice && Object.keys(r.comparePriceBySku[(v = r.row.original.sku) == null ? void 0 : v._id] ?? {}).length > 0 ? (x(), T("tr", ya, [
898
898
  l("td", {
899
899
  colspan: r.row.getVisibleCells().length
900
900
  }, [
@@ -925,7 +925,7 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
925
925
  },
926
926
  emits: ["netsuite:ready"],
927
927
  setup(m, { emit: b }) {
928
- const r = Be(), d = m, y = b, { t: o } = ws(), k = N(!1), C = N();
928
+ const r = Be(), d = m, v = b, { t: o } = ws(), k = N(!1), C = N();
929
929
  function I() {
930
930
  var s, i, u, h;
931
931
  if (!d.supplier) return;
@@ -949,7 +949,7 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
949
949
  };
950
950
  if (r.isReady) {
951
951
  if (!r.isEnabled || !d.required) {
952
- y("netsuite:ready", n);
952
+ v("netsuite:ready", n);
953
953
  return;
954
954
  }
955
955
  try {
@@ -982,13 +982,13 @@ const va = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ya = { key: 0 }
982
982
  n
983
983
  );
984
984
  } finally {
985
- I(), k.value ? d.subsidiaryOptional && y("netsuite:ready", n) : y("netsuite:ready", n);
985
+ I(), k.value ? d.subsidiaryOptional && v("netsuite:ready", n) : v("netsuite:ready", n);
986
986
  }
987
987
  }
988
988
  });
989
- const c = q(
989
+ const c = M(
990
990
  () => d.supplier.internal ? r.currentLocationSubsidiary() : r.currentVendorSubsidiary(d.supplier._id)
991
- ), e = q(() => {
991
+ ), e = M(() => {
992
992
  var n, p;
993
993
  return C.value == null ? `Cannot find the NetSuite location for "${d.supplier.name}"` : `The subsidiary of the request
994
994
  location is ${(p = r.getLocationSubsidiary((n = C.value) == null ? void 0 : n.netSuiteId)) == null ? void 0 : p.fullName}`;
@@ -1063,21 +1063,21 @@ function Ct(m) {
1063
1063
  };
1064
1064
  }
1065
1065
  function St(m, b, r) {
1066
- const d = Ve(m.suppliers ?? []), y = Ve(b.allLocations ?? []).map(Ct), o = b._currentLocation ? Ct(Ve(b._currentLocation)) : null, k = r.inventory ? [Ve(r.inventory)] : [];
1066
+ const d = Ve(m.suppliers ?? []), v = Ve(b.allLocations ?? []).map(Ct), o = b._currentLocation ? Ct(Ve(b._currentLocation)) : null, k = r.inventory ? [Ve(r.inventory)] : [];
1067
1067
  return {
1068
1068
  suppliers: d,
1069
- locations: y,
1069
+ locations: v,
1070
1070
  currentLocation: o,
1071
1071
  inventoryDoc: k
1072
1072
  };
1073
1073
  }
1074
1074
  function Sa() {
1075
- const m = it(), b = Ge(), r = Je(), d = St(m, b, r), y = _t(ys({ env: d }));
1076
- y.value.setUsePartialUpdates(!0);
1077
- const o = _t(y.value.state()), k = (e) => {
1075
+ const m = it(), b = Ge(), r = Je(), d = St(m, b, r), v = _t(ys({ env: d }));
1076
+ v.value.setUsePartialUpdates(!0);
1077
+ const o = _t(v.value.state()), k = (e) => {
1078
1078
  o.value = e;
1079
1079
  };
1080
- y.value.addListener(k);
1080
+ v.value.addListener(k);
1081
1081
  const C = (e, n, p) => {
1082
1082
  switch (e) {
1083
1083
  case ot.set:
@@ -1094,10 +1094,10 @@ function Sa() {
1094
1094
  }
1095
1095
  n !== "remark" && n !== "ref" && Mt(o);
1096
1096
  };
1097
- y.value.addPartialListener(C);
1097
+ v.value.addPartialListener(C);
1098
1098
  function I() {
1099
1099
  const e = St(m, b, r);
1100
- y.value.updateFullEnv(e), o.value = y.value.state();
1100
+ v.value.updateFullEnv(e), o.value = v.value.state();
1101
1101
  }
1102
1102
  _e(
1103
1103
  [
@@ -1111,14 +1111,22 @@ function Sa() {
1111
1111
  },
1112
1112
  { deep: !0 }
1113
1113
  ), Et(() => {
1114
- y.value.removeListener(k), y.value.removePartialListener(C);
1114
+ v.value.removeListener(k), v.value.removePartialListener(C);
1115
1115
  });
1116
1116
  function c(e) {
1117
1117
  var n;
1118
- et().mustUsePoTemplate || y.value.init(), e != null && e.template && ((n = e.templateDoc) != null && n.purchaseOrder) ? (e.items = e.templateDoc.purchaseOrder.items, y.value.initFromTemplate(e)) : y.value.initOutletToOutlet();
1118
+ if (e != null && e._id) {
1119
+ v.value.loadPurchaseOrder(e);
1120
+ return;
1121
+ }
1122
+ if (!et().mustUsePoTemplate) {
1123
+ v.value.init();
1124
+ return;
1125
+ }
1126
+ e != null && e.template && ((n = e.templateDoc) != null && n.purchaseOrder) ? (e.items = e.templateDoc.purchaseOrder.items, v.value.initFromTemplate(e)) : v.value.initOutletToOutlet();
1119
1127
  }
1120
1128
  return {
1121
- controller: y,
1129
+ controller: v,
1122
1130
  state: o,
1123
1131
  init: c
1124
1132
  };
@@ -1144,11 +1152,11 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1144
1152
  },
1145
1153
  emits: ["validation-success", "form:ready"],
1146
1154
  setup(m, { expose: b, emit: r }) {
1147
- const d = m, y = r, { t: o } = he(), k = Ge(), C = Je(), I = Be(), c = et(), e = Rt(), { breakpoints: n } = rt(), p = q(() => n.value.xs || n.value.sm), s = Sa();
1155
+ const d = m, v = r, { t: o } = he(), k = Ge(), C = Je(), I = Be(), c = et(), e = Rt(), { breakpoints: n } = rt(), p = M(() => n.value.xs || n.value.sm), s = Sa();
1148
1156
  s.init(d.modelValue);
1149
1157
  const { controller: i, state: u } = s, h = It({
1150
1158
  value: !1
1151
- }), S = N(!1), v = N(0), g = N([]), $ = q(
1159
+ }), S = N(!1), y = N(0), g = N([]), $ = M(
1152
1160
  () => {
1153
1161
  var a;
1154
1162
  return ((a = d.modelValue) == null ? void 0 : a.templateDoc) ?? e.templates.find((_) => {
@@ -1156,7 +1164,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1156
1164
  return _._id === ((Y = d.modelValue) == null ? void 0 : Y.template);
1157
1165
  });
1158
1166
  }
1159
- ), B = q(() => u.value.status === "DRAFT" || !u.value.rev), z = q(
1167
+ ), B = M(() => u.value.status === "DRAFT" || !u.value.rev), z = M(
1160
1168
  () => {
1161
1169
  var a;
1162
1170
  return ((a = u.value.items) == null ? void 0 : a.map((_) => _.item)) || [];
@@ -1178,9 +1186,9 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1178
1186
  S.value = !0;
1179
1187
  }
1180
1188
  }), _e([S, h], ([a, _], [Y, le]) => {
1181
- _.value && le.value && y("form:ready");
1189
+ _.value && le.value && v("form:ready");
1182
1190
  });
1183
- const W = q(
1191
+ const W = M(
1184
1192
  () => k.currentLocation.type === Yt.restaurant
1185
1193
  ), J = cs(), U = gs(
1186
1194
  () => u.value,
@@ -1189,7 +1197,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1189
1197
  },
1190
1198
  !0,
1191
1199
  !c.businessSupplierOnly
1192
- ), P = q({
1200
+ ), P = M({
1193
1201
  get() {
1194
1202
  var a;
1195
1203
  return typeof ((a = u.value.supplier) == null ? void 0 : a.internal) == "string" ? pe.enum.transfer : pe.enum.purchase;
@@ -1197,13 +1205,13 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1197
1205
  set(a) {
1198
1206
  i.value.selectType(a);
1199
1207
  }
1200
- }), R = q(() => {
1208
+ }), R = M(() => {
1201
1209
  let a = U.transferLocationOptions.value;
1202
1210
  return c.mustUsePoTemplate && !u.value.template && (a = a.filter((_) => {
1203
1211
  var Y;
1204
1212
  return (Y = _.sublabel) == null ? void 0 : Y.startsWith("restaurant");
1205
1213
  })), a;
1206
- }), D = q({
1214
+ }), D = M({
1207
1215
  get() {
1208
1216
  var a;
1209
1217
  return (a = u.value.supplier) == null ? void 0 : a._id;
@@ -1211,14 +1219,14 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1211
1219
  set(a) {
1212
1220
  U.transferLocationModel.value = a;
1213
1221
  }
1214
- }), M = q({
1222
+ }), q = M({
1215
1223
  get() {
1216
1224
  return u.value.remark ?? "";
1217
1225
  },
1218
1226
  set(a) {
1219
1227
  i.value.addRemark(a ?? "");
1220
1228
  }
1221
- }), L = q({
1229
+ }), L = M({
1222
1230
  get() {
1223
1231
  return u.value.ref ?? "";
1224
1232
  },
@@ -1248,7 +1256,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1248
1256
  },
1249
1257
  getFormData: () => u.value.id && u.value.rev ? i.value.toUpdateData() : i.value.toCreateData()
1250
1258
  });
1251
- const Fe = q(() => ({
1259
+ const Fe = M(() => ({
1252
1260
  updateItem: (a) => {
1253
1261
  const _ = Kt.parse(a), Y = i.value.toFdtoPOItem(_);
1254
1262
  i.value.updateSkuInfo(Y);
@@ -1277,7 +1285,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1277
1285
  get forecastAmounts() {
1278
1286
  return g.value;
1279
1287
  }
1280
- }), ze = q(() => Ie.columnDefs.value);
1288
+ }), ze = M(() => Ie.columnDefs.value);
1281
1289
  function Le() {
1282
1290
  var Ae, Qe, Ye, Ee, Ke;
1283
1291
  const a = (Ye = (Qe = (Ae = $.value) == null ? void 0 : Ae.purchaseOrder) == null ? void 0 : Qe.items) == null ? void 0 : Ye.groupBy((j) => j.sku._id), _ = I.isEnabled ? I.getAvailableItems((Ke = (Ee = u.value.netSuite) == null ? void 0 : Ee.subsidiary) == null ? void 0 : Ke.id) : [], Y = a != null && a.size ? C.skus.filter((j) => a.has(j._id)) : C.skus, le = I.isEnabled ? Y.filter((j) => {
@@ -1370,7 +1378,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1370
1378
  function tt(a) {
1371
1379
  return a;
1372
1380
  }
1373
- const He = q(() => {
1381
+ const He = M(() => {
1374
1382
  var a;
1375
1383
  return $.value ? ((a = $.value) == null ? void 0 : a.purchaseOrder.items) || [] : C.skus.map((_) => ({
1376
1384
  quantity: {
@@ -1386,7 +1394,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1386
1394
  },
1387
1395
  measurement: _.trackingMeasurement ? _.unit.measurements.find((Y) => Y.id === _.trackingMeasurement) : null
1388
1396
  }));
1389
- }), Ce = q(() => {
1397
+ }), Ce = M(() => {
1390
1398
  const a = [];
1391
1399
  return (!c.mustUsePoTemplate || c.mustUsePoTemplate && u.value.template) && a.push({
1392
1400
  label: o("inventory.transfer.form.type.purchase"),
@@ -1395,7 +1403,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1395
1403
  label: o("inventory.transfer.form.type.transfer"),
1396
1404
  value: pe.enum.transfer
1397
1405
  }), a;
1398
- }), Oe = q(
1406
+ }), Oe = M(
1399
1407
  () => {
1400
1408
  var a;
1401
1409
  return ((a = u.value.items) == null ? void 0 : a.every((_) => _.item.quantity.amount <= 0)) ?? !0;
@@ -1431,7 +1439,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1431
1439
  class: "flex flex-col gap-32",
1432
1440
  disabled: a.disabled,
1433
1441
  onValidationFailed: console.log,
1434
- onValidationSuccess: _[14] || (_[14] = (De) => y("validation-success"))
1442
+ onValidationSuccess: _[14] || (_[14] = (De) => v("validation-success"))
1435
1443
  }, {
1436
1444
  default: A(() => {
1437
1445
  var De, ke, ct, mt, pt, ft, vt, yt;
@@ -1576,8 +1584,8 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1576
1584
  label: t(o)("inventory.transfer.form.remark"),
1577
1585
  "label-mark": "optional",
1578
1586
  "max-length": 240,
1579
- modelValue: M.value,
1580
- "onUpdate:modelValue": _[3] || (_[3] = (O) => M.value = O),
1587
+ modelValue: q.value,
1588
+ "onUpdate:modelValue": _[3] || (_[3] = (O) => q.value = O),
1581
1589
  class: Z([a.disabled ? "text-fm-color-typo-disabled " : ""])
1582
1590
  }, null, 8, ["label", "modelValue", "class"]),
1583
1591
  S.value ? (x(), se(Ca, {
@@ -1682,7 +1690,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1682
1690
  g.value = O;
1683
1691
  }),
1684
1692
  "onUpdate:poItems": _[11] || (_[11] = (O) => {
1685
- t(i).updateItems(O), v.value++;
1693
+ t(i).updateItems(O), y.value++;
1686
1694
  })
1687
1695
  }, null, 8, ["template-id", "template-items", "po-items"])
1688
1696
  ])
@@ -1709,7 +1717,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1709
1717
  [t(te).TemplateName]: !!(((vt = a.modelValue) == null ? void 0 : vt.template) ?? ((yt = a.modelValue) == null ? void 0 : yt.templateDoc))
1710
1718
  },
1711
1719
  "row-data": z.value,
1712
- key: v.value,
1720
+ key: y.value,
1713
1721
  "hide-footer": "",
1714
1722
  "page-size": z.value.length
1715
1723
  }, {
@@ -1766,7 +1774,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1766
1774
  emits: ["update:show", "submitted"],
1767
1775
  setup(m, { expose: b, emit: r }) {
1768
1776
  var ae;
1769
- const d = m, y = r, o = dt(), k = Rt(), C = Re(), I = it(), c = Je(), e = Ge(), { t: n } = he(), p = N(!1), s = N(!1), i = N(!1), u = N(!1), h = q(() => {
1777
+ const d = m, v = r, o = dt(), k = Rt(), C = Re(), I = it(), c = Je(), e = Ge(), { t: n } = he(), p = N(!1), s = N(!1), i = N(!1), u = N(!1), h = M(() => {
1770
1778
  var F;
1771
1779
  return ((F = $.value.items) == null ? void 0 : F.filter((w) => w.quantity.amount === 0)) ?? [];
1772
1780
  });
@@ -1785,7 +1793,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1785
1793
  }
1786
1794
  }
1787
1795
  e.watchLocation(S);
1788
- function v() {
1796
+ function y() {
1789
1797
  return {
1790
1798
  remark: void 0,
1791
1799
  ref: void 0,
@@ -1819,15 +1827,15 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1819
1827
  templateDoc: k.templates.find((w) => w._id === d.templateId)
1820
1828
  };
1821
1829
  }
1822
- const g = Vt(d, "show"), $ = N(d.modelValue ?? v()), B = N(((ae = d.modelValue) == null ? void 0 : ae._id) ?? `${Math.random()}`);
1830
+ const g = Vt(d, "show"), $ = N(d.modelValue ?? y()), B = N(((ae = d.modelValue) == null ? void 0 : ae._id) ?? `${Math.random()}`);
1823
1831
  _e(
1824
1832
  () => d.show,
1825
1833
  (F) => {
1826
1834
  var w;
1827
- F && (i.value = !1, $.value = d.modelValue ?? v(), B.value = ((w = d.modelValue) == null ? void 0 : w._id) ?? `${Math.random()}`);
1835
+ F && (i.value = !1, $.value = d.modelValue ?? y(), B.value = ((w = d.modelValue) == null ? void 0 : w._id) ?? `${Math.random()}`);
1828
1836
  }
1829
1837
  );
1830
- const z = q(() => !s.value || !i.value), W = q(() => {
1838
+ const z = M(() => !s.value || !i.value), W = M(() => {
1831
1839
  switch (d.mode) {
1832
1840
  case qe.READ:
1833
1841
  return "View transfer";
@@ -1868,7 +1876,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1868
1876
  title: n("inventory.transfer.receiveRequest.create.success"),
1869
1877
  message: n("inventory.transfer.receiveRequest.create.successMessage"),
1870
1878
  type: "success"
1871
- }), y("update:show", !1), y("submitted");
1879
+ }), v("update:show", !1), v("submitted");
1872
1880
  } catch (w) {
1873
1881
  C.open({
1874
1882
  title: n("inventory.transfer.receiveRequest.create.error.title"),
@@ -1895,7 +1903,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1895
1903
  title: n("inventory.transfer.receiveRequest.update.success"),
1896
1904
  message: n("inventory.transfer.receiveRequest.update.successMessage"),
1897
1905
  type: "success"
1898
- }), y("update:show", !1), y("submitted");
1906
+ }), v("update:show", !1), v("submitted");
1899
1907
  } catch (w) {
1900
1908
  C.open({
1901
1909
  title: n("inventory.transfer.receiveRequest.update.error.title"),
@@ -1918,12 +1926,14 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1918
1926
  var F;
1919
1927
  $.value.items = ((F = $.value.items) == null ? void 0 : F.filter((w) => w.quantity.amount > 0)) ?? [], u.value = !1, L();
1920
1928
  }
1921
- function M() {
1922
- J.value.getFormData && ($.value = J.value.getFormData());
1929
+ function q() {
1930
+ J.value.getFormData && ($.value = {
1931
+ ...$.value,
1932
+ ...J.value.getFormData()
1933
+ });
1923
1934
  }
1924
1935
  function L() {
1925
1936
  var H, fe;
1926
- M();
1927
1937
  const F = bs.validatePurchaseOrderItems({
1928
1938
  skusById: c.skuById ?? {},
1929
1939
  items: $.value.items ?? []
@@ -1940,7 +1950,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1940
1950
  (fe = (H = J.value) == null ? void 0 : H.validateInputs) == null || fe.call(H);
1941
1951
  }
1942
1952
  function X() {
1943
- if (M(), h.value.length > 0) {
1953
+ if (q(), h.value.length > 0) {
1944
1954
  u.value = !0;
1945
1955
  return;
1946
1956
  }
@@ -1989,7 +1999,7 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
1989
1999
  disabled: z.value,
1990
2000
  variant: "tertiary",
1991
2001
  label: t(n)("common.close"),
1992
- onClick: w[2] || (w[2] = (G) => y("update:show", !1))
2002
+ onClick: w[2] || (w[2] = (G) => v("update:show", !1))
1993
2003
  }, null, 8, ["disabled", "label"])
1994
2004
  ])
1995
2005
  ]),
@@ -2039,12 +2049,12 @@ const wa = { class: "flex flex-col gap-4" }, Fa = { class: "flex items-center ga
2039
2049
  }
2040
2050
  });
2041
2051
  function ao(m) {
2042
- const [b, r, d, ...y] = Fs(m), o = d.map((c) => c.toLowerCase().trim().replace(/ /g, "_")), C = ["item_name", "transfer_quantity(uom)", "uom", "scanned_code"].filter((c) => !o.includes(c));
2052
+ const [b, r, d, ...v] = Fs(m), o = d.map((c) => c.toLowerCase().trim().replace(/ /g, "_")), C = ["item_name", "transfer_quantity(uom)", "uom", "scanned_code"].filter((c) => !o.includes(c));
2043
2053
  if (C.length)
2044
2054
  throw new Error(
2045
2055
  `Missing headers (${C.join()}). Excel file does not come from the template.`
2046
2056
  );
2047
- return y.map((c, e) => {
2057
+ return v.map((c, e) => {
2048
2058
  const n = {};
2049
2059
  for (const p in o) {
2050
2060
  const s = o[p];
@@ -2060,8 +2070,8 @@ function oo(m) {
2060
2070
  const b = m.SheetNames;
2061
2071
  try {
2062
2072
  return b.reduce(
2063
- (d, y) => {
2064
- const o = new Array(), k = m.Sheets[y], C = Je(), I = ao(k), c = [];
2073
+ (d, v) => {
2074
+ const o = new Array(), k = m.Sheets[v], C = Je(), I = ao(k), c = [];
2065
2075
  for (const { index: n, data: p } of I) {
2066
2076
  p.scanned_code === "" && o.push(`Row ${n + 1}: Scanned code is empty`), p.item_name === "" && o.push(`Row ${n + 1}: Item name is empty`), p.uom === "" && o.push(`Row ${n + 1}: UOM is empty`), p["transfer_quantity(uom)"] === "" && o.push(`Row ${n + 1}: Transfer quantity is empty`);
2067
2077
  const s = C.skus.find((h) => h.code === p.scanned_code);
@@ -2090,7 +2100,7 @@ function oo(m) {
2090
2100
  const e = {
2091
2101
  type: "create",
2092
2102
  poItems: c,
2093
- excelSheetName: y,
2103
+ excelSheetName: v,
2094
2104
  errors: o
2095
2105
  };
2096
2106
  return d.importCreateResult.push(e), d;
@@ -2122,7 +2132,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2122
2132
  errors: {}
2123
2133
  },
2124
2134
  setup(m) {
2125
- const b = m, { t: r } = he(), d = N(!1), y = () => {
2135
+ const b = m, { t: r } = he(), d = N(!1), v = () => {
2126
2136
  b.errors.length && (d.value = !d.value);
2127
2137
  };
2128
2138
  return (o, k) => {
@@ -2130,7 +2140,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2130
2140
  const C = V("FmIcon"), I = V("FmTooltip");
2131
2141
  return x(), T("div", no, [
2132
2142
  l("div", {
2133
- onClick: y,
2143
+ onClick: v,
2134
2144
  class: Z({
2135
2145
  "cursor-pointer": o.errors.length
2136
2146
  })
@@ -2229,16 +2239,16 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2229
2239
  }, $o = { class: "fm-typo-en-body-lg-600" }, wt = "Transfer note", Do = /* @__PURE__ */ de({
2230
2240
  __name: "XilnexImportForm",
2231
2241
  setup(m, { expose: b }) {
2232
- const r = N(null), d = Re(), y = N(!1), o = N(!1), k = Ds(), C = N(!1), I = Be();
2242
+ const r = N(null), d = Re(), v = N(!1), o = N(!1), k = Ds(), C = N(!1), I = Be();
2233
2243
  N([]);
2234
- const c = q({
2244
+ const c = M({
2235
2245
  get() {
2236
- var v;
2237
- return ((v = k.supplier) == null ? void 0 : v.name) ?? "";
2246
+ var y;
2247
+ return ((y = k.supplier) == null ? void 0 : y.name) ?? "";
2238
2248
  },
2239
- set(v) {
2240
- v && (k.supplier = {
2241
- name: v,
2249
+ set(y) {
2250
+ y && (k.supplier = {
2251
+ name: y,
2242
2252
  registrationNumber: "",
2243
2253
  _id: "xilnex",
2244
2254
  internal: "restaurant",
@@ -2254,53 +2264,53 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2254
2264
  }
2255
2265
  });
2256
2266
  We(async () => {
2257
- const v = await I.getNetSuiteLocations();
2258
- console.log(v), C.value = !0;
2267
+ const y = await I.getNetSuiteLocations();
2268
+ console.log(y), C.value = !0;
2259
2269
  });
2260
- const e = q({
2270
+ const e = M({
2261
2271
  get() {
2262
2272
  return "";
2263
2273
  },
2264
- set(v) {
2265
- if (v) {
2266
- const g = k.effectiveAt ? new Date(k.effectiveAt) : /* @__PURE__ */ new Date(), [$, B, z] = v.split("-");
2274
+ set(y) {
2275
+ if (y) {
2276
+ const g = k.effectiveAt ? new Date(k.effectiveAt) : /* @__PURE__ */ new Date(), [$, B, z] = y.split("-");
2267
2277
  g.setFullYear(parseInt($)), g.setMonth(parseInt(B) - 1), g.setDate(parseInt(z)), k.effectiveAt = g.toISOString();
2268
2278
  }
2269
2279
  }
2270
- }), n = q({
2280
+ }), n = M({
2271
2281
  get() {
2272
2282
  return null;
2273
2283
  },
2274
- set(v) {
2275
- if (v) {
2276
- const g = k.effectiveAt ? new Date(k.effectiveAt) : /* @__PURE__ */ new Date(), [$, B] = v.split(":");
2284
+ set(y) {
2285
+ if (y) {
2286
+ const g = k.effectiveAt ? new Date(k.effectiveAt) : /* @__PURE__ */ new Date(), [$, B] = y.split(":");
2277
2287
  g.setMinutes(parseInt($)), g.setSeconds(parseInt(B)), k.effectiveAt = g.toISOString();
2278
2288
  }
2279
2289
  }
2280
- }), p = N(new Array()), s = N([]), i = q(
2281
- () => !!p.value.length || s.value.some((v) => v.errors.length)
2290
+ }), p = N(new Array()), s = N([]), i = M(
2291
+ () => !!p.value.length || s.value.some((y) => y.errors.length)
2282
2292
  ), u = N();
2283
2293
  b({
2284
2294
  validateInputs: () => {
2285
- var v, g;
2286
- (g = (v = u.value) == null ? void 0 : v.validateInputs) == null || g.call(v);
2295
+ var y, g;
2296
+ (g = (y = u.value) == null ? void 0 : y.validateInputs) == null || g.call(y);
2287
2297
  },
2288
2298
  resetInputsValidation: () => {
2289
- var v, g;
2290
- (g = (v = u.value) == null ? void 0 : v.resetInputsValidation) == null || g.call(v);
2299
+ var y, g;
2300
+ (g = (y = u.value) == null ? void 0 : y.resetInputsValidation) == null || g.call(y);
2291
2301
  },
2292
2302
  resetInputs: () => {
2293
- var v, g;
2294
- (g = (v = u.value) == null ? void 0 : v.resetInputs) == null || g.call(v);
2303
+ var y, g;
2304
+ (g = (y = u.value) == null ? void 0 : y.resetInputs) == null || g.call(y);
2295
2305
  }
2296
2306
  });
2297
2307
  const { t: h } = he();
2298
- async function S(v) {
2308
+ async function S(y) {
2299
2309
  p.value = [], s.value = [];
2300
2310
  try {
2301
- y.value = !0;
2311
+ v.value = !0;
2302
2312
  const [g] = await Promise.all([
2303
- Is(v),
2313
+ Is(y),
2304
2314
  // fake buffer
2305
2315
  new Promise((B) => setTimeout(B, 1e3))
2306
2316
  ]), $ = oo(g);
@@ -2325,12 +2335,12 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2325
2335
  p.value.length && d.open({
2326
2336
  title: h("inventory.ingredient.import.fileError.invalidExcel"),
2327
2337
  type: "error"
2328
- }), y.value = !1;
2338
+ }), v.value = !1;
2329
2339
  }
2330
2340
  }
2331
- return _e(r, (v) => {
2332
- v && S(v);
2333
- }), (v, g) => {
2341
+ return _e(r, (y) => {
2342
+ y && S(y);
2343
+ }), (y, g) => {
2334
2344
  const $ = V("FmSelect"), B = V("FmDatePicker"), z = V("FmTimePicker"), W = V("FmCircularProgress"), J = V("FmLabel"), U = V("FmIcon"), P = V("FmButton"), R = V("FmForm");
2335
2345
  return x(), se(R, {
2336
2346
  ref_key: "formRef",
@@ -2401,13 +2411,13 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2401
2411
  class: Z([
2402
2412
  "fm-corner-radius-md p-16 flex items-center gap-16",
2403
2413
  {
2404
- "border border-fm-color-neutral-gray-100": y.value,
2405
- "border border-fm-color-neutral-gray-200": !y.value && !i.value,
2414
+ "border border-fm-color-neutral-gray-100": v.value,
2415
+ "border border-fm-color-neutral-gray-200": !v.value && !i.value,
2406
2416
  "border border-fm-color-system-error-200": i.value
2407
2417
  }
2408
2418
  ])
2409
2419
  }, [
2410
- y.value ? (x(), se(W, {
2420
+ v.value ? (x(), se(W, {
2411
2421
  key: 0,
2412
2422
  size: "md",
2413
2423
  color: "neutral-gray-200"
@@ -2421,14 +2431,14 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2421
2431
  class: Z([
2422
2432
  "fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
2423
2433
  {
2424
- "text-fm-color-typo-disabled": y.value,
2425
- "text-fm-color-typo-primary": !y.value
2434
+ "text-fm-color-typo-disabled": v.value,
2435
+ "text-fm-color-typo-primary": !v.value
2426
2436
  }
2427
2437
  ])
2428
2438
  }, [
2429
2439
  l("div", Co, E(r.value.name), 1)
2430
2440
  ], 2),
2431
- y.value ? K("", !0) : (x(), T("div", So, [
2441
+ v.value ? K("", !0) : (x(), T("div", So, [
2432
2442
  f(P, {
2433
2443
  label: t(h)("inventory.ingredient.import.replaceFile"),
2434
2444
  variant: i.value ? "destructive" : "secondary",
@@ -2438,7 +2448,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2438
2448
  ]))
2439
2449
  ], 2),
2440
2450
  p.value.length ? (x(), T("div", wo, [
2441
- (x(!0), T(re, null, xe(p.value, (M, L) => (x(), T("div", {
2451
+ (x(!0), T(re, null, xe(p.value, (q, L) => (x(), T("div", {
2442
2452
  key: L,
2443
2453
  class: "flex gap-8 items-center"
2444
2454
  }, [
@@ -2447,7 +2457,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2447
2457
  size: "sm",
2448
2458
  color: "system-error-300"
2449
2459
  }),
2450
- l("div", Fo, E(M), 1)
2460
+ l("div", Fo, E(q), 1)
2451
2461
  ]))), 128))
2452
2462
  ])) : K("", !0)
2453
2463
  ])
@@ -2457,9 +2467,9 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2457
2467
  ]), 1032, ["class", "button-label"]),
2458
2468
  r.value ? (x(), T("div", Io, [
2459
2469
  l("div", $o, E(t(h)("inventory.ingredient.import.summary")), 1),
2460
- (x(!0), T(re, null, xe(s.value, (D, M) => (x(), se(go, {
2461
- key: M,
2462
- name: `Transfer Note ${M + 1}`,
2470
+ (x(!0), T(re, null, xe(s.value, (D, q) => (x(), se(go, {
2471
+ key: q,
2472
+ name: `Transfer Note ${q + 1}`,
2463
2473
  items: D.poItems,
2464
2474
  errors: D.errors,
2465
2475
  type: "create"
@@ -2499,7 +2509,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2499
2509
  (i = (s = c.value) == null ? void 0 : s.validateInputs) == null || i.call(s);
2500
2510
  }
2501
2511
  async function p() {
2502
- var i, u, h, S, v;
2512
+ var i, u, h, S, y;
2503
2513
  if (!((u = (i = e.value) == null ? void 0 : i.supplier) != null && u.name)) {
2504
2514
  k.open({
2505
2515
  title: "Upload failed",
@@ -2508,7 +2518,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2508
2518
  });
2509
2519
  return;
2510
2520
  }
2511
- if (!((h = e.value) != null && h.items) || ((v = (S = e.value) == null ? void 0 : S.items) == null ? void 0 : v.length) === 0) {
2521
+ if (!((h = e.value) != null && h.items) || ((y = (S = e.value) == null ? void 0 : S.items) == null ? void 0 : y.length) === 0) {
2512
2522
  k.open({
2513
2523
  title: "Upload failed",
2514
2524
  message: "No data to upload",
@@ -2550,7 +2560,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2550
2560
  const u = V("FmSpacer"), h = V("FmButton"), S = V("FmDialog");
2551
2561
  return x(), se(S, {
2552
2562
  modelValue: t(o),
2553
- "onUpdate:modelValue": i[2] || (i[2] = (v) => Se(o) ? o.value = v : null),
2563
+ "onUpdate:modelValue": i[2] || (i[2] = (y) => Se(o) ? o.value = y : null),
2554
2564
  overlay: !0,
2555
2565
  "close-button": !1
2556
2566
  }, {
@@ -2565,7 +2575,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2565
2575
  label: "Cancel",
2566
2576
  size: "md",
2567
2577
  variant: "tertiary",
2568
- onClick: i[1] || (i[1] = (v) => d("update:show", !1))
2578
+ onClick: i[1] || (i[1] = (y) => d("update:show", !1))
2569
2579
  }, null, 8, ["disabled"]),
2570
2580
  f(h, {
2571
2581
  disabled: I.value,
@@ -2584,7 +2594,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2584
2594
  ref: c,
2585
2595
  onValidationSuccess: p,
2586
2596
  modelValue: e.value,
2587
- "onUpdate:modelValue": i[0] || (i[0] = (v) => e.value = v)
2597
+ "onUpdate:modelValue": i[0] || (i[0] = (y) => e.value = y)
2588
2598
  }, null, 8, ["modelValue"])
2589
2599
  ])
2590
2600
  ]),
@@ -2604,14 +2614,14 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2604
2614
  startDate: Xe.string().optional().nullable(),
2605
2615
  endDate: Xe.string().optional().nullable()
2606
2616
  });
2607
- const d = q(
2617
+ const d = M(
2608
2618
  () => !p._currentLocation || e.loading.value
2609
- ), y = rs(), o = et(), k = Be();
2619
+ ), v = rs(), o = et(), k = Be();
2610
2620
  function C() {
2611
2621
  const U = {
2612
2622
  name: "",
2613
2623
  ...kt()
2614
- }, P = y.getItem(Ft);
2624
+ }, P = v.getItem(Ft);
2615
2625
  if (!P)
2616
2626
  return U;
2617
2627
  try {
@@ -2621,7 +2631,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2621
2631
  }
2622
2632
  }
2623
2633
  function I() {
2624
- y.setItem(Ft, JSON.stringify(c.value));
2634
+ v.setItem(Ft, JSON.stringify(c.value));
2625
2635
  }
2626
2636
  const c = N(C()), e = Wt(
2627
2637
  at.RECEIVE_REQUEST,
@@ -2633,14 +2643,14 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2633
2643
  ), p = Ge();
2634
2644
  async function s() {
2635
2645
  const U = `inventory-record_${xt(c.value.startDate).format("DD-MM-YYYY_HH-mm")}-${xt(c.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, P = e.purchaseOrders.value.flatMap(
2636
- (D) => D.items.map((M) => {
2646
+ (D) => D.items.map((q) => {
2637
2647
  var H;
2638
2648
  const L = new Date(ns(D._id) ?? ""), X = D.effectiveAt ? new Date(D.effectiveAt) : void 0, ae = we(
2639
- es(M.sku, D.deliveryOrder || [])
2640
- ), F = we(M.quantity), w = ((H = M == null ? void 0 : M.measurement) == null ? void 0 : H.abbrev) || M.sku.unit.abbrev;
2649
+ es(q.sku, D.deliveryOrder || [])
2650
+ ), F = we(q.quantity), w = ((H = q == null ? void 0 : q.measurement) == null ? void 0 : H.abbrev) || q.sku.unit.abbrev;
2641
2651
  return {
2642
- "SKU code": M.code,
2643
- "SKU name": M.name,
2652
+ "SKU code": q.code,
2653
+ "SKU name": q.name,
2644
2654
  "PO #": D.seqNumber,
2645
2655
  "Effective at": X,
2646
2656
  Date: L,
@@ -2649,7 +2659,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2649
2659
  "Received quantity": ae,
2650
2660
  "Ordered quantity": F,
2651
2661
  Unit: w,
2652
- "Total cost": M.totalCost ? Ze(M.totalCost) : null
2662
+ "Total cost": q.totalCost ? Ze(q.totalCost) : null
2653
2663
  };
2654
2664
  })
2655
2665
  ), R = [
@@ -2706,7 +2716,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2706
2716
  if (U === "export")
2707
2717
  return s();
2708
2718
  }
2709
- const { breakpoints: S } = rt(), v = q(() => S.value.xs || S.value.sm), g = q(() => v.value ? 10 : 20), $ = is(), B = q(() => [
2719
+ const { breakpoints: S } = rt(), y = M(() => S.value.xs || S.value.sm), g = M(() => y.value ? 10 : 20), $ = is(), B = M(() => [
2710
2720
  {
2711
2721
  label: b("inventory.transfer.receiveRequest.actions.create"),
2712
2722
  value: "create",
@@ -2727,7 +2737,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2727
2737
  label: b("inventory.common.export"),
2728
2738
  value: "export"
2729
2739
  }
2730
- ]), z = q(() => {
2740
+ ]), z = M(() => {
2731
2741
  const U = [
2732
2742
  {
2733
2743
  type: "string",
@@ -2743,8 +2753,8 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2743
2753
  key: "netsuiteTransactionNumber",
2744
2754
  entity: "purchaseOrder",
2745
2755
  values: e.purchaseOrders.value.map((R) => {
2746
- var D, M;
2747
- return (M = (D = R.netSuite) == null ? void 0 : D.additionalInfo) == null ? void 0 : M.transactionnumber;
2756
+ var D, q;
2757
+ return (q = (D = R.netSuite) == null ? void 0 : D.additionalInfo) == null ? void 0 : q.transactionnumber;
2748
2758
  }).filter((R) => R != null)
2749
2759
  },
2750
2760
  {
@@ -2767,16 +2777,16 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2767
2777
  }
2768
2778
  ];
2769
2779
  return [...U, ...k.isEnabled ? P : []];
2770
- }), W = N(null), J = q(() => {
2780
+ }), W = N(null), J = M(() => {
2771
2781
  if (!W.value)
2772
2782
  return e.purchaseOrders.value;
2773
2783
  const U = Ts.build(W.value);
2774
2784
  return e.purchaseOrders.value.filter((P) => {
2775
- var R, D, M, L;
2785
+ var R, D, q, L;
2776
2786
  return Vs(
2777
2787
  {
2778
2788
  netsuiteTransactionNumber: (D = (R = P.netSuite) == null ? void 0 : R.additionalInfo) == null ? void 0 : D.transactionnumber,
2779
- netsuiteOrderNo: (M = P.netSuite) == null ? void 0 : M.refNo,
2789
+ netsuiteOrderNo: (q = P.netSuite) == null ? void 0 : q.refNo,
2780
2790
  netsuiteOrderId: (L = P.netSuite) == null ? void 0 : L.id,
2781
2791
  status: P.status
2782
2792
  },
@@ -2792,14 +2802,14 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2792
2802
  "onClick:action": h
2793
2803
  }, {
2794
2804
  default: A(() => {
2795
- var D, M;
2805
+ var D, q;
2796
2806
  return [
2797
2807
  l("div", {
2798
2808
  class: Z([
2799
2809
  "flex flex-col gap-8 max-h-full",
2800
2810
  {
2801
- "p-0": v.value,
2802
- "px-24 ": !v.value
2811
+ "p-0": y.value,
2812
+ "px-24 ": !y.value
2803
2813
  }
2804
2814
  ])
2805
2815
  }, [
@@ -2877,7 +2887,7 @@ const no = { class: "flex flex-col flex-1" }, lo = { class: "flex flex-col" }, r
2877
2887
  scope: t(at).RECEIVE_REQUEST
2878
2888
  }, {
2879
2889
  ...t(e).transferDetailsProps.value,
2880
- receivedMap: ((M = t(e).transferDetailsProps.value) == null ? void 0 : M.receivedMap) ?? {},
2890
+ receivedMap: ((q = t(e).transferDetailsProps.value) == null ? void 0 : q.receivedMap) ?? {},
2881
2891
  shipments: t(e).shipments.value ?? []
2882
2892
  }, {
2883
2893
  onSubmitted: t(e).fetchData