@feedmepos/mf-inventory-portal 1.2.0-dev.3 → 1.2.0-dev.4

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 (46) hide show
  1. package/dist/{App-CvnYXQ_H.js → App-B23hTt8P.js} +1 -1
  2. package/dist/{ApprovalView-Brt_cfLI.js → ApprovalView-BDlbBg8N.js} +2 -2
  3. package/dist/{BindingsDialog-BBCRbm60.js → BindingsDialog-De55nslG.js} +2 -2
  4. package/dist/{BindingsPicker-D3cfis0-.js → BindingsPicker-Dzq-QKnj.js} +1 -1
  5. package/dist/{BindingsTable-BuHEtiqI.js → BindingsTable-BkZVEDqh.js} +1 -1
  6. package/dist/{ClosingDraftView-fLxuV9T9.js → ClosingDraftView-Uu-1KA0k.js} +2 -2
  7. package/dist/{ClosingTemplateView-BJRZQ_9d.js → ClosingTemplateView-fmm3ZqYc.js} +2 -2
  8. package/dist/{DeliveryOrderPrintPreview-CKLGVFoJ.js → DeliveryOrderPrintPreview-DxhaGpb0.js} +1 -1
  9. package/dist/FmAdminBadge-P98dVu_i.js +34 -0
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-6h2ZF1IM.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CoKsh-hs.js} +3 -3
  11. package/dist/{FmMultiselectDialog-uEoXq-hv.js → FmMultiselectDialog-Cn8-Sd9S.js} +1 -1
  12. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CSNDv3kk.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D56QhrTV.js} +1 -1
  13. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CeZBz1eT.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DOaUhZjQ.js} +1 -1
  14. package/dist/{IngredientGroupView-BhsEp63p.js → IngredientGroupView-j5LbaClZ.js} +2 -2
  15. package/dist/{IngredientsView-D3aehOrb.js → IngredientsView-y-JGogdT.js} +4 -4
  16. package/dist/{IntegrationView-Ds4_pk0y.js → IntegrationView-BooM88Uh.js} +3 -3
  17. package/dist/{InventoryBindingForm-CVaSaP-L.js → InventoryBindingForm-DOM5HcgN.js} +1 -1
  18. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DsJObBbP.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B7QPYtZP.js} +3 -3
  19. package/dist/{InventoryBindingSummary-4dCMV0Je.js → InventoryBindingSummary-CnJHhG_U.js} +1 -1
  20. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BWTfN1Nc.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DOfNI7E2.js} +1 -1
  21. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-lKPfAldc.js → PremiumBadge.vue_vue_type_script_setup_true_lang-D1Iqw5DF.js} +1 -1
  22. package/dist/{PublishView-BW1IjgqP.js → PublishView-Xq1JT1BI.js} +1 -1
  23. package/dist/{PurchaseOrderPrintPreview-DupzzHHn.js → PurchaseOrderPrintPreview-BkS4Q1YJ.js} +1 -1
  24. package/dist/{ReceiveRequestView-CZMDH6oI.js → ReceiveRequestView-CKE_si_R.js} +8 -8
  25. package/dist/{RecipeView-BJ1JyMWl.js → RecipeView-muNNMb4o.js} +3 -3
  26. package/dist/{StockView-C0h2udKi.js → StockView-BMDBAEPn.js} +327 -321
  27. package/dist/{SupplierView-nRrJO3aS.js → SupplierView-BS4lKS85.js} +3 -3
  28. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CWXS6_zv.js → TransferDetails.vue_vue_type_script_setup_true_lang-B8tk0rVh.js} +778 -752
  29. package/dist/{TransferTemplateView-BmGAvcDy.js → TransferTemplateView-C7mzg1Yt.js} +6 -6
  30. package/dist/{UnitView-CFayjoeC.js → UnitView-BOfWrYoc.js} +3 -3
  31. package/dist/{WarehouseView-Dw74JEJ4.js → WarehouseView-CbHfwxXJ.js} +1 -1
  32. package/dist/{app-Cjc33Hak.js → app-D0rTMX1S.js} +191 -191
  33. package/dist/app.js +1 -1
  34. package/dist/components/FmAdminBadge.vue.d.ts +39 -0
  35. package/dist/{decimal-DkctM_2I.js → decimal-BL0xwFU9.js} +1 -1
  36. package/dist/{format-unit-display-BWs5lTJP.js → format-unit-display-D4XPYOff.js} +2 -2
  37. package/dist/{index-IbY1gBGq.js → index-BWDn1UVH.js} +1 -1
  38. package/dist/{index-C64jubVC.js → index-BWjTZvhM.js} +1 -1
  39. package/dist/{stock-BhsZeZQ6.js → stock-sYtaHuhh.js} +1 -1
  40. package/dist/style.css +1 -1
  41. package/dist/{supplier-D-CggzHd.js → supplier-B8VC44Gc.js} +1 -1
  42. package/dist/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/{use-ingredient-select-dialog-C03zsmuo.js → use-ingredient-select-dialog-DnYfVhkU.js} +1 -1
  44. package/dist/{use-inventory-binding-dialog-D3Chc97P.js → use-inventory-binding-dialog-D3blZbxh.js} +1 -1
  45. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +6 -2
  46. package/package.json +3 -3
@@ -1,73 +1,74 @@
1
- import { a3 as pt, u as me, aS as x, aT as qe, aA as M, c as Te, b as Pe, ab as vt, ad as yt, ae as ht, aU as bt, e as et, f as nt, a0 as He, aV as gt, a8 as at, T as ot, j as fe, a6 as _t, aW as it, ai as $e, h as tt, i as te, D as ae, aX as lt, aY as ct, aZ as Le, ay as rt, aa as ke, a4 as Be, a5 as St, a_ as Ae, Q as wt } from "./app-Cjc33Hak.js";
2
- import { ref as G, computed as ee, h as $, defineComponent as he, reactive as Rt, onMounted as ut, resolveComponent as W, openBlock as g, createBlock as ie, withCtx as oe, createElementVNode as o, createVNode as F, unref as R, createElementBlock as N, toDisplayString as k, createCommentVNode as U, Fragment as ne, renderList as ve, watch as Ot, isRef as Nt, normalizeClass as Ce, createTextVNode as Ve, resolveDynamicComponent as xt } from "vue";
3
- import { F as kt } from "./decimal-DkctM_2I.js";
4
- import { useCoreStore as Ie, useI18n as dt } from "@feedmepos/mf-common";
5
- import { useDialog as We, useSnackbar as Fe, components as Ke, FmButtonVariant as se, useProxiedModel as At } from "@feedmepos/ui-library";
6
- import { b as Ct, u as $t, P as ye, f as Dt } from "./format-unit-display-BWs5lTJP.js";
7
- import { E as qt } from "./empty-placeholder-wf6-BWE8.js";
8
- import { _ as Tt, F as Pt, a as It } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CSNDv3kk.js";
9
- import { u as Ft, R as st } from "./usePromise-CbVUCxhj.js";
10
- import { u as Et } from "./index-C64jubVC.js";
11
- const Ee = pt((p, t) => {
12
- const a = me(), _ = Ie();
1
+ import { a3 as vt, u as me, aS as x, aT as Pe, aA as M, c as Ie, b as Fe, ab as yt, ad as ht, ae as bt, aU as gt, e as tt, f as at, a0 as We, aV as _t, a8 as ot, T as it, j as fe, a6 as St, aW as lt, ai as qe, h as rt, i as te, D as oe, aX as ct, aY as ut, aZ as Ve, ay as st, aa as Ae, a4 as Ue, a5 as wt, a_ as Ce, Q as Rt } from "./app-D0rTMX1S.js";
2
+ import { ref as G, computed as ee, h as C, defineComponent as he, reactive as Ot, onMounted as dt, resolveComponent as W, openBlock as g, createBlock as ie, withCtx as re, createElementVNode as o, createVNode as I, unref as w, createElementBlock as N, toDisplayString as k, createCommentVNode as U, Fragment as ae, renderList as ve, watch as Nt, isRef as xt, createTextVNode as $e, normalizeClass as De, resolveDynamicComponent as kt } from "vue";
3
+ import { F as At } from "./decimal-BL0xwFU9.js";
4
+ import { useCoreStore as Ee, useI18n as ft } from "@feedmepos/mf-common";
5
+ import { useDialog as Ye, useSnackbar as Le, components as je, FmButtonVariant as ne, useProxiedModel as Ct } from "@feedmepos/ui-library";
6
+ import { F as Ne } from "./FmAdminBadge-P98dVu_i.js";
7
+ import { b as $t, u as Dt, P as ye, f as qt } from "./format-unit-display-D4XPYOff.js";
8
+ import { E as Tt } from "./empty-placeholder-wf6-BWE8.js";
9
+ import { _ as Pt, F as It, a as Ft } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-D56QhrTV.js";
10
+ import { u as Et, R as nt } from "./usePromise-CbVUCxhj.js";
11
+ import { u as Lt } from "./index-BWjTZvhM.js";
12
+ const Be = vt((y, t) => {
13
+ const a = me(), _ = Ee();
13
14
  return {
14
- async readRequests(c, e, u) {
15
- const i = c ?? a.currentLocationDBName, n = `${p.inventoryBackendUrl}/${i}/purchase-request`;
16
- return e && u ? await t.get(`${n}?startDate=${e}&endDate=${u}`) : await t.get(n);
15
+ async readRequests(l, e, c) {
16
+ const i = l ?? a.currentLocationDBName, s = `${y.inventoryBackendUrl}/${i}/purchase-request`;
17
+ return e && c ? await t.get(`${s}?startDate=${e}&endDate=${c}`) : await t.get(s);
17
18
  },
18
- async readRequestById(c, e) {
19
- const u = e ?? a.currentLocationDBName, i = `${p.inventoryBackendUrl}/${u}/purchase-request/${c}`;
19
+ async readRequestById(l, e) {
20
+ const c = e ?? a.currentLocationDBName, i = `${y.inventoryBackendUrl}/${c}/purchase-request/${l}`;
20
21
  return await t.get(i);
21
22
  },
22
- async readRequestByIds(c, e) {
23
- const u = e ?? a.currentLocationDBName, i = `${p.inventoryBackendUrl}/${u}/purchase-request/find`;
24
- return await t.post(i, { requestIds: c });
23
+ async readRequestByIds(l, e) {
24
+ const c = e ?? a.currentLocationDBName, i = `${y.inventoryBackendUrl}/${c}/purchase-request/find`;
25
+ return await t.post(i, { requestIds: l });
25
26
  },
26
27
  async getPurchaseOrders({
27
- start: c,
28
+ start: l,
28
29
  end: e
29
30
  }) {
30
- const u = a.currentLocationDBName, i = `${p.inventoryBackendUrl}/${u}/purchase-order`;
31
- return await t.get(`${i}?start=${c}&end=${e}`);
31
+ const c = a.currentLocationDBName, i = `${y.inventoryBackendUrl}/${c}/purchase-order`;
32
+ return await t.get(`${i}?start=${l}&end=${e}`);
32
33
  },
33
- async getLatestPurchaseOrderRequest(c) {
34
- const e = a.currentLocationDBName, u = `${p.inventoryBackendUrl}/${e}/purchase-request/find-by-purchase-order-id`;
35
- return await t.get(`${u}/${c}`);
34
+ async getLatestPurchaseOrderRequest(l) {
35
+ const e = a.currentLocationDBName, c = `${y.inventoryBackendUrl}/${e}/purchase-request/find-by-purchase-order-id`;
36
+ return await t.get(`${c}/${l}`);
36
37
  },
37
- async getPurchaseOrderById(c) {
38
- const e = a.currentLocationDBName, u = `${p.inventoryBackendUrl}/${e}/purchase-order`;
39
- return await t.get(`${u}/${c}`);
38
+ async getPurchaseOrderById(l) {
39
+ const e = a.currentLocationDBName, c = `${y.inventoryBackendUrl}/${e}/purchase-order`;
40
+ return await t.get(`${c}/${l}`);
40
41
  },
41
42
  /**
42
43
  * @deprecated Use `processPurchaseOrderV2` instead.
43
44
  */
44
- async processPurchaseOrder(c, e) {
45
- const u = a.currentLocationDBName, i = e || u, n = `${p.inventoryBackendUrl}/${i}/purchase-order/run-operation`;
46
- return await t.put(n, c);
45
+ async processPurchaseOrder(l, e) {
46
+ const c = a.currentLocationDBName, i = e || c, s = `${y.inventoryBackendUrl}/${i}/purchase-order/run-operation`;
47
+ return await t.put(s, l);
47
48
  },
48
- async createPurchaseOrder(c) {
49
- const e = a.currentLocationDBName, u = `${p.inventoryBackendUrl}/${e}/purchase-order`;
50
- return await t.post(u, c);
49
+ async createPurchaseOrder(l) {
50
+ const e = a.currentLocationDBName, c = `${y.inventoryBackendUrl}/${e}/purchase-order`;
51
+ return await t.post(c, l);
51
52
  },
52
- async updatePurchaseOrder(c) {
53
- const e = a.currentLocationDBName, u = `${p.inventoryBackendUrl}/${e}/purchase-order`;
54
- return await t.put(u, c);
53
+ async updatePurchaseOrder(l) {
54
+ const e = a.currentLocationDBName, c = `${y.inventoryBackendUrl}/${e}/purchase-order`;
55
+ return await t.put(c, l);
55
56
  },
56
- async importFromXilnex(c) {
57
- const e = a.currentLocationDBName, u = `${p.inventoryBackendUrl}/${e}/purchase-order/import-from-xilnex`;
58
- return await t.post(u, c);
57
+ async importFromXilnex(l) {
58
+ const e = a.currentLocationDBName, c = `${y.inventoryBackendUrl}/${e}/purchase-order/import-from-xilnex`;
59
+ return await t.post(c, l);
59
60
  },
60
- async processPurchaseOrderV2(c, e) {
61
- const u = a.currentLocationDBName, i = e || u, n = `${p.inventoryBackendUrl}/${i}/v2/purchase-order/run-operation`;
62
- return await t.put(n, c);
61
+ async processPurchaseOrderV2(l, e) {
62
+ const c = a.currentLocationDBName, i = e || c, s = `${y.inventoryBackendUrl}/${i}/v2/purchase-order/run-operation`;
63
+ return await t.put(s, l);
63
64
  },
64
65
  async getWorkflowConfig() {
65
66
  var i;
66
- const e = `business_${(i = _.currentBusiness.value) == null ? void 0 : i._id}`, u = `${p.inventoryBackendUrl}/${e}/v2/purchase-order/workflow-config`;
67
- return await t.get(u);
67
+ const e = `business_${(i = _.currentBusiness.value) == null ? void 0 : i._id}`, c = `${y.inventoryBackendUrl}/${e}/v2/purchase-order/workflow-config`;
68
+ return await t.get(c);
68
69
  }
69
70
  };
70
- }), ft = {
71
+ }), mt = {
71
72
  [x.enum.confirmDraft]: {
72
73
  primaryActions: {
73
74
  text: "Confirm draft",
@@ -135,73 +136,73 @@ const Ee = pt((p, t) => {
135
136
  successMessage: "Purchase order has been processed"
136
137
  }
137
138
  };
138
- function De(p) {
139
- return qe.generatedPOReceivedMap({
140
- purchaseOrder: p
139
+ function Te(y) {
140
+ return Pe.generatedPOReceivedMap({
141
+ purchaseOrder: y
141
142
  });
142
143
  }
143
- function Lt(p) {
144
- return qe.validatePOItemReceivedStatus({
145
- dto: p
144
+ function Bt(y) {
145
+ return Pe.validatePOItemReceivedStatus({
146
+ dto: y
146
147
  });
147
148
  }
148
- function je(p) {
149
- return qe.validatePOReceivedStatus({
150
- receivedMap: p
149
+ function ze(y) {
150
+ return Pe.validatePOReceivedStatus({
151
+ receivedMap: y
151
152
  });
152
153
  }
153
- function ze(p, t, a) {
154
- if (!M.safeParse(p).success)
155
- throw new Error(`Invalid purchase order status: ${p}`);
156
- const _ = M.parse(p);
157
- return qe.orderStatusCombination({
154
+ function Ge(y, t, a) {
155
+ if (!M.safeParse(y).success)
156
+ throw new Error(`Invalid purchase order status: ${y}`);
157
+ const _ = M.parse(y);
158
+ return Pe.orderStatusCombination({
158
159
  status: _,
159
160
  isPOPartialReceive: t,
160
161
  isPOOverReceive: a
161
162
  });
162
163
  }
163
- function mt() {
164
- const p = me(), t = Ee(), a = Te();
165
- async function _(e, u) {
166
- const i = p.currentLocationDBName;
167
- return e.doc.supplier.internal && e.operation === x.enum.confirmDraft && (e.operation = x.enum.submitRequest), await t.processPurchaseOrder(e, u || i);
164
+ function pt() {
165
+ const y = me(), t = Be(), a = Ie();
166
+ async function _(e, c) {
167
+ const i = y.currentLocationDBName;
168
+ return e.doc.supplier.internal && e.operation === x.enum.confirmDraft && (e.operation = x.enum.submitRequest), await t.processPurchaseOrder(e, c || i);
168
169
  }
169
- async function c(e, u) {
170
- const i = p.currentLocationDBName;
171
- return await t.processPurchaseOrderV2(e, u || i);
170
+ async function l(e, c) {
171
+ const i = y.currentLocationDBName;
172
+ return await t.processPurchaseOrderV2(e, c || i);
172
173
  }
173
- return (e) => a.useOperatePurchaseOrderV2 ? c(e.operateV2, e.transferTo) : _(e.operate, e.transferTo);
174
+ return (e) => a.useOperatePurchaseOrderV2 ? l(e.operateV2, e.transferTo) : _(e.operate, e.transferTo);
174
175
  }
175
- var Ge = /* @__PURE__ */ ((p) => (p.RECEIVE_REQUEST = "receive/request", p.APPROVAL = "approval", p))(Ge || {});
176
- const Oe = G(), Ue = G();
177
- function Hs(p, t) {
178
- const a = We(), _ = me(), c = Te();
179
- Pe();
180
- const e = Ct(), u = $t(), i = G(!1), n = Fe(), h = Ee(), S = G(new Array()), v = G(
181
- t != null && t.startDate && (t != null && t.endDate) ? t : vt()
182
- ), m = ee(() => {
183
- const A = new Date(v.value.startDate), T = new Date(v.value.endDate);
176
+ var He = /* @__PURE__ */ ((y) => (y.RECEIVE_REQUEST = "receive/request", y.APPROVAL = "approval", y))(He || {});
177
+ const Oe = G(), Me = G();
178
+ function Ys(y, t) {
179
+ const a = Ye(), _ = me(), l = Ie();
180
+ Fe();
181
+ const e = $t(), c = Dt(), i = G(!1), s = Le(), v = Be(), b = G(new Array()), m = G(
182
+ t != null && t.startDate && (t != null && t.endDate) ? t : yt()
183
+ ), p = ee(() => {
184
+ const A = new Date(m.value.startDate), T = new Date(m.value.endDate);
184
185
  return {
185
- start: yt(A).toISOString(),
186
- end: ht(T).toISOString()
186
+ start: ht(A).toISOString(),
187
+ end: bt(T).toISOString()
187
188
  };
188
- }), d = G(new Array()), s = bt(), l = G(null);
189
- async function b(A) {
189
+ }), d = G(new Array()), n = gt(), u = G(null);
190
+ async function S(A) {
190
191
  function T(r) {
191
192
  const f = {
192
- mode: et.CREATE,
193
+ mode: tt.CREATE,
193
194
  modelValue: A || void 0,
194
195
  show: !0,
195
196
  "onUpdate:show"(O) {
196
197
  Oe.value.show = O;
197
198
  },
198
199
  templateId: r,
199
- lastClosingDate: l.value
200
+ lastClosingDate: u.value
200
201
  };
201
202
  Oe.value = f;
202
203
  }
203
204
  let Y;
204
- c.mustUsePoTemplate && !(A != null && A.template) ? a.open({
205
+ l.mustUsePoTemplate && !(A != null && A.template) ? a.open({
205
206
  title: "Create transfer",
206
207
  message: "",
207
208
  primaryActions: {
@@ -219,31 +220,31 @@ function Hs(p, t) {
219
220
  T(void 0);
220
221
  }) : T(Y);
221
222
  }
222
- function w(A) {
223
+ function R(A) {
223
224
  const T = {
224
- mode: et.UPDATE,
225
- modelValue: nt(A),
225
+ mode: tt.UPDATE,
226
+ modelValue: at(A),
226
227
  show: !0,
227
228
  "onUpdate:show"(Y) {
228
229
  Oe.value.show = Y;
229
230
  },
230
- lastClosingDate: l.value
231
+ lastClosingDate: u.value
231
232
  };
232
233
  Oe.value = T;
233
234
  }
234
235
  async function D() {
235
- S.value = [], i.value = !0;
236
+ b.value = [], i.value = !0;
236
237
  try {
237
- S.value = await h.getPurchaseOrders(m.value).then((r) => r.sort((f, O) => O._id.localeCompare(f._id)));
238
- const A = await s.readCurrentLocationLastClosing(!0), T = A == null ? void 0 : A._id;
239
- T && (l.value = gt(T)), await c.awaitFeatureLoaded(() => c.mustUsePoTemplate) && await u.fetchTemplates();
240
- const Y = S.value.map((r) => {
238
+ b.value = await v.getPurchaseOrders(p.value).then((r) => r.sort((f, O) => O._id.localeCompare(f._id)));
239
+ const A = await n.readCurrentLocationLastClosing(!0), T = A == null ? void 0 : A._id;
240
+ T && (u.value = _t(T)), await l.awaitFeatureLoaded(() => l.mustUsePoTemplate) && await c.fetchTemplates();
241
+ const Y = b.value.map((r) => {
241
242
  var f;
242
243
  return ((f = r.request) == null ? void 0 : f.id) ?? "";
243
244
  }).filter((r) => r);
244
- d.value = await h.readRequestByIds(Y);
245
+ d.value = await v.readRequestByIds(Y);
245
246
  } catch {
246
- n.open({
247
+ s.open({
247
248
  title: "Something went wrong",
248
249
  message: "Error at fetching purchase orders",
249
250
  type: "error"
@@ -255,13 +256,13 @@ function Hs(p, t) {
255
256
  async function q() {
256
257
  d.value = [], i.value = !0;
257
258
  try {
258
- d.value = await h.readRequests(
259
+ d.value = await v.readRequests(
259
260
  void 0,
260
- m.value.start,
261
- m.value.end
261
+ p.value.start,
262
+ p.value.end
262
263
  ).then((A) => A.reverse());
263
264
  } catch {
264
- n.open({
265
+ s.open({
265
266
  title: "Something went wrong",
266
267
  message: "Error at fetching purchase requests",
267
268
  type: "error"
@@ -271,7 +272,7 @@ function Hs(p, t) {
271
272
  }
272
273
  }
273
274
  function P() {
274
- switch (p) {
275
+ switch (y) {
275
276
  case "receive/request":
276
277
  return D();
277
278
  case "approval":
@@ -279,14 +280,14 @@ function Hs(p, t) {
279
280
  }
280
281
  }
281
282
  function E(A, T) {
282
- v.value = {
283
+ m.value = {
283
284
  startDate: A,
284
285
  endDate: T
285
286
  }, P();
286
287
  }
287
288
  _.watchLocation(async (A) => {
288
289
  if (!A) {
289
- S.value = [];
290
+ b.value = [];
290
291
  return;
291
292
  }
292
293
  await P();
@@ -297,24 +298,24 @@ function Hs(p, t) {
297
298
  ce.value = Y, T ?? (T = d.value.computeFirst(
298
299
  (O) => O.purchaseOrderId === A._id ? O : null
299
300
  ) ?? void 0);
300
- const r = p === "receive/request" ? _.currentLocation : T == null ? void 0 : T.to, f = {
301
+ const r = y === "receive/request" ? _.currentLocation : T == null ? void 0 : T.to, f = {
301
302
  poRequest: T,
302
303
  purchaseOrder: A,
303
304
  transferTo: r == null ? void 0 : r.name,
304
305
  transferToDbName: r == null ? void 0 : r.dbName,
305
306
  show: !0,
306
307
  canResubmit: !1,
307
- canApprove: p === "approval",
308
+ canApprove: y === "approval",
308
309
  "onUpdate:show"(O) {
309
310
  z.value.show = O;
310
311
  },
311
- scope: p,
312
- receivedMap: De(A) ?? {}
312
+ scope: y,
313
+ receivedMap: Te(A) ?? {}
313
314
  };
314
315
  z.value = f;
315
316
  }
316
317
  async function be(A, T, Y, r) {
317
- const f = mt();
318
+ const f = pt();
318
319
  i.value = !0;
319
320
  try {
320
321
  await f({
@@ -324,7 +325,7 @@ function Hs(p, t) {
324
325
  options: (
325
326
  // auto receive for supplier to warehouse
326
327
  (T === x.enum.confirmDraft || // auto receive for warehouse to warehouse
327
- T === x.enum.completeReceive) && c.autoReceiveWarehouse ? {
328
+ T === x.enum.completeReceive) && l.autoReceiveWarehouse ? {
328
329
  autoReceive: !0
329
330
  } : void 0
330
331
  )
@@ -337,18 +338,18 @@ function Hs(p, t) {
337
338
  },
338
339
  transferTo: r
339
340
  }), await new Promise((B) => setTimeout(B, 1e3));
340
- const C = me().currentLocationDBName.startsWith("restaurant_");
341
- T === x.enum.confirmDraft && A.effectiveAt && C ? n.open({
341
+ const $ = me().currentLocationDBName.startsWith("restaurant_");
342
+ T === x.enum.confirmDraft && A.effectiveAt && $ ? s.open({
342
343
  title: "Success",
343
344
  message: `${Y}. The backdate will be reflected once your POS has received this change.`,
344
345
  type: "success"
345
- }) : n.open({
346
+ }) : s.open({
346
347
  title: "Success",
347
348
  message: Y,
348
349
  type: "success"
349
350
  });
350
351
  } catch (O) {
351
- n.open({
352
+ s.open({
352
353
  title: "Something went wrong",
353
354
  message: "Please try again.",
354
355
  type: "error"
@@ -357,12 +358,12 @@ function Hs(p, t) {
357
358
  i.value = !1, P();
358
359
  }
359
360
  }
360
- async function Ne(A, T, Y) {
361
- const r = ft[T];
361
+ async function xe(A, T, Y) {
362
+ const r = mt[T];
362
363
  if (!r) {
363
- n.open({
364
+ s.open({
364
365
  title: "Something went wrong",
365
- message: `Cannot process order: ${He(T)}`,
366
+ message: `Cannot process order: ${We(T)}`,
366
367
  type: "error"
367
368
  });
368
369
  return;
@@ -391,48 +392,48 @@ function Hs(p, t) {
391
392
  const A = {
392
393
  show: !0,
393
394
  "onUpdate:show"(T) {
394
- Ue.value.show = T;
395
+ Me.value.show = T;
395
396
  }
396
397
  };
397
- Ue.value = A;
398
+ Me.value = A;
398
399
  });
399
400
  }
400
401
  return {
401
- purchaseOrders: S,
402
+ purchaseOrders: b,
402
403
  purchaseRequests: d,
403
404
  updateDateRange: E,
404
405
  fetchData: P,
405
406
  loading: i,
406
407
  transferDialogProps: Oe,
407
- promptCreateTransferDialog: b,
408
- promptUpdateTransferDialog: w,
408
+ promptCreateTransferDialog: S,
409
+ promptUpdateTransferDialog: R,
409
410
  transferDetailsProps: z,
410
411
  promptShowTransferDetails: le,
411
- submitAction: Ne,
412
- xilnexImportDialogProps: Ue,
412
+ submitAction: xe,
413
+ xilnexImportDialogProps: Me,
413
414
  promptUploadTransferDialog: ue
414
415
  };
415
416
  }
416
- function Bt(p, t) {
417
+ function Vt(y, t) {
417
418
  return t.reduce(
418
- (_, c) => {
419
- const e = c.received.find((u) => u.sku._id === p._id);
420
- return e && (_ = at(_, e.amount)), _;
419
+ (_, l) => {
420
+ const e = l.received.find((c) => c.sku._id === y._id);
421
+ return e && (_ = ot(_, e.amount)), _;
421
422
  },
422
- kt.toPrecision(ot(0), p.unit.precision)
423
+ At.toPrecision(it(0), y.unit.precision)
423
424
  );
424
425
  }
425
- function Vt(p) {
426
- const { po: t, currentLocation: a, business: _, fulfilling: c, por: e } = p, { name: u, address: i, regNo: n } = a.doc.profile, h = {
427
- name: u,
428
- registrationNumber: n,
426
+ function Ut(y) {
427
+ const { po: t, currentLocation: a, business: _, fulfilling: l, por: e } = y, { name: c, address: i, regNo: s } = a.doc.profile, v = {
428
+ name: c,
429
+ registrationNumber: s,
429
430
  line1: i == null ? void 0 : i.line1,
430
431
  line2: i == null ? void 0 : i.line2,
431
432
  postcode: i == null ? void 0 : i.postcode,
432
433
  city: i == null ? void 0 : i.city,
433
434
  state: i == null ? void 0 : i.state,
434
435
  country: i == null ? void 0 : i.country
435
- }, S = {
436
+ }, b = {
436
437
  name: t.supplier.name,
437
438
  phoneNumber: t.supplier.phoneNumber,
438
439
  registrationNumber: t.supplier.registrationNumber,
@@ -442,9 +443,9 @@ function Vt(p) {
442
443
  city: t.supplier.address.city,
443
444
  state: t.supplier.address.state,
444
445
  country: t.supplier.address.country
445
- }, v = t.items.map((q) => {
446
+ }, m = t.items.map((q) => {
446
447
  const { sku: P, measurement: E } = q, z = fe(
447
- Bt(q.sku, t.deliveryOrder || []),
448
+ Vt(q.sku, t.deliveryOrder || []),
448
449
  !1
449
450
  );
450
451
  return {
@@ -453,12 +454,12 @@ function Vt(p) {
453
454
  quantity: fe(q.quantity, !1),
454
455
  unit: (E == null ? void 0 : E.abbrev) || P.unit.abbrev,
455
456
  received: z,
456
- cost: q.totalCost ? `${q.totalCost.currency} ${_t.toFormatString({
457
+ cost: q.totalCost ? `${q.totalCost.currency} ${St.toFormatString({
457
458
  value: q.totalCost
458
459
  })}` : void 0
459
460
  };
460
- }), m = t.deliveryOrder.map((q) => ({
461
- createdAt: it(new Date(q.createdAt)),
461
+ }), p = t.deliveryOrder.map((q) => ({
462
+ createdAt: lt(new Date(q.createdAt)),
462
463
  ref: q.deliveryOrderNumber,
463
464
  remark: q.remark || "",
464
465
  items: q.received.map((P) => {
@@ -476,26 +477,26 @@ function Vt(p) {
476
477
  // Dev
477
478
  "6880b36a3054c5001db19218"
478
479
  ];
479
- let s = "Inventory Receive Note";
480
- if (t.supplier.internal ? (s = "Inventory Transfer Note", d.includes((_ == null ? void 0 : _._id) || "") && (s = "Stock Request")) : s = "Purchase Order", e) {
480
+ let n = "Inventory Receive Note";
481
+ if (t.supplier.internal ? (n = "Inventory Transfer Note", d.includes((_ == null ? void 0 : _._id) || "") && (n = "Stock Request")) : n = "Purchase Order", e) {
481
482
  const q = e.from.dbName;
482
- a.dbName === q || (s = "Inventory Receive Note");
483
+ a.dbName === q || (n = "Inventory Receive Note");
483
484
  }
484
- const b = {
485
- title: s,
485
+ const S = {
486
+ title: n,
486
487
  businessName: _ == null ? void 0 : _.name,
487
488
  logo: _ == null ? void 0 : _.thumbnail,
488
489
  orderNumber: t.seqNumber.toString(),
489
- createdAt: $e(t._id),
490
+ createdAt: qe(t._id),
490
491
  ref: t.ref || "",
491
492
  remark: t.remark || "",
492
- buyer: h,
493
- supplier: S,
494
- items: v,
493
+ buyer: v,
494
+ supplier: b,
495
+ items: m,
495
496
  status: t.status,
496
- deliveryOrders: m
497
- }, w = new URL(window.location.href), D = c && (t.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
498
- w.pathname = w.hostname.includes("portal.feedme") ? `/inventory/${D}` : `/${D}`, w.searchParams.append("data", JSON.stringify(b)), window.open(w.href, "_blank", "noreferrer");
497
+ deliveryOrders: p
498
+ }, R = new URL(window.location.href), D = l && (t.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
499
+ R.pathname = R.hostname.includes("portal.feedme") ? `/inventory/${D}` : `/${D}`, R.searchParams.append("data", JSON.stringify(S)), window.open(R.href, "_blank", "noreferrer");
499
500
  }
500
501
  const Se = {
501
502
  submitRequest: {
@@ -559,71 +560,71 @@ const Se = {
559
560
  value: x.enum.returnStock
560
561
  }
561
562
  };
562
- function Ws(p, t) {
563
- const a = me(), _ = Pe(), c = Ie(), { t: e } = dt();
564
- function u(m) {
565
- switch (m.status) {
563
+ function Qs(y, t) {
564
+ const a = me(), _ = Fe(), l = Ee(), { t: e } = ft();
565
+ function c(p) {
566
+ switch (p.status) {
566
567
  case "DRAFT":
567
568
  return [
568
- ae[te.Update],
569
- ae[te.Details],
570
- m.supplier.internal === "restaurant" || m.supplier.internal === "warehouse" ? Se[x.enum.submitRequest] : Se[x.enum.confirmDraft],
569
+ oe[te.Update],
570
+ oe[te.Details],
571
+ p.supplier.internal === "restaurant" || p.supplier.internal === "warehouse" ? Se[x.enum.submitRequest] : Se[x.enum.confirmDraft],
571
572
  Se[x.enum.cancelDraft]
572
573
  ];
573
574
  case "RECEIVING":
574
575
  return [
575
576
  Se[x.enum.completeReceive],
576
- ae[te.Details],
577
- ae[te.Print]
577
+ oe[te.Details],
578
+ oe[te.Print]
578
579
  ];
579
580
  case "REQUESTING":
580
- return p === "receive/request" ? [ae[te.Details], ae[te.Print]] : [
581
+ return y === "receive/request" ? [oe[te.Details], oe[te.Print]] : [
581
582
  Se[x.enum.approveRequest],
582
583
  Se[x.enum.rejectRequest],
583
- ae[te.Details]
584
+ oe[te.Details]
584
585
  // DefaultRowActions[RowActionEnum.Print]
585
586
  ];
586
587
  case "PROCESSING":
587
- return [ae[te.Details], ae[te.Print]];
588
+ return [oe[te.Details], oe[te.Print]];
588
589
  case "COMPLETE":
589
590
  case "CANCEL":
590
591
  default:
591
- return [ae[te.Details], ae[te.Print]];
592
+ return [oe[te.Details], oe[te.Print]];
592
593
  }
593
594
  }
594
- function i(m) {
595
- return Object.values(x.enum).includes(m);
595
+ function i(p) {
596
+ return Object.values(x.enum).includes(p);
596
597
  }
597
- async function n(m, d, s) {
598
- var b, w, D, q, P, E;
599
- const l = nt(d);
600
- if (m === te.Print) {
601
- const z = (s == null ? void 0 : s.toInventoryLocation) ?? a.currentLocation;
602
- ((b = s == null ? void 0 : s.netSuite) != null && b.refNo || (w = l.netSuite) != null && w.refNo) && (l.ref = [((D = s == null ? void 0 : s.netSuite) == null ? void 0 : D.refNo) || ((q = l.netSuite) == null ? void 0 : q.refNo)].filter((ce) => ce).join(" ")), Vt({
603
- po: l,
598
+ async function s(p, d, n) {
599
+ var S, R, D, q, P, E;
600
+ const u = at(d);
601
+ if (p === te.Print) {
602
+ const z = (n == null ? void 0 : n.toInventoryLocation) ?? a.currentLocation;
603
+ ((S = n == null ? void 0 : n.netSuite) != null && S.refNo || (R = u.netSuite) != null && R.refNo) && (u.ref = [((D = n == null ? void 0 : n.netSuite) == null ? void 0 : D.refNo) || ((q = u.netSuite) == null ? void 0 : q.refNo)].filter((ce) => ce).join(" ")), Ut({
604
+ po: u,
604
605
  currentLocation: z,
605
- business: c.currentBusiness.value,
606
- fulfilling: p === "approval",
607
- por: s
606
+ business: l.currentBusiness.value,
607
+ fulfilling: y === "approval",
608
+ por: n
608
609
  });
609
610
  return;
610
611
  }
611
- if (m === te.Details) {
612
- t.promptShowTransferDetails(l, s);
612
+ if (p === te.Details) {
613
+ t.promptShowTransferDetails(u, n);
613
614
  return;
614
615
  }
615
- if (m === te.Update) {
616
- (P = t.promptUpdateTransferDialog) == null || P.call(t, l);
616
+ if (p === te.Update) {
617
+ (P = t.promptUpdateTransferDialog) == null || P.call(t, u);
617
618
  return;
618
619
  }
619
- if (i(m)) {
620
- t.submitAction(d, m, (E = s == null ? void 0 : s.to) == null ? void 0 : E.dbName);
620
+ if (i(p)) {
621
+ t.submitAction(d, p, (E = n == null ? void 0 : n.to) == null ? void 0 : E.dbName);
621
622
  return;
622
623
  }
623
624
  }
624
- function h() {
625
+ function v() {
625
626
  var d;
626
- const m = [
627
+ const p = [
627
628
  {
628
629
  accessorKey: "seqNumber",
629
630
  header: () => e("inventory.transfer.table.seqNo"),
@@ -634,8 +635,8 @@ function Ws(p, t) {
634
635
  {
635
636
  accessorKey: "_id",
636
637
  header: () => e("inventory.transfer.table.createdAt"),
637
- cell(s) {
638
- return $e(`${s.getValue()}`);
638
+ cell(n) {
639
+ return qe(`${n.getValue()}`);
639
640
  },
640
641
  enableSorting: !0
641
642
  },
@@ -648,17 +649,17 @@ function Ws(p, t) {
648
649
  {
649
650
  accessorKey: "items.length",
650
651
  header: () => e("inventory.transfer.table.noOfItems"),
651
- cell: (s) => {
652
- var w;
653
- const l = s.row.original.version || "1", b = s.getValue();
654
- return $("div", { class: "flex items-center gap-2" }, [
655
- b,
656
- l !== "1" && ((w = c.sessionUser.value) != null && w.role.isAdmin) ? $(
652
+ cell: (n) => {
653
+ var R;
654
+ const u = n.row.original.version || "1", S = n.getValue();
655
+ return C("div", { class: "flex items-center gap-2" }, [
656
+ S,
657
+ u !== "1" && ((R = l.sessionUser.value) != null && R.role.isAdmin) ? C(
657
658
  "div",
658
659
  {
659
660
  class: ["fm-status-badge", "fm-status-badge-draft"].join(" ")
660
661
  },
661
- `v${l}`
662
+ `v${u}`
662
663
  ) : null
663
664
  ]);
664
665
  },
@@ -673,12 +674,12 @@ function Ws(p, t) {
673
674
  enableSorting: !1,
674
675
  size: "auto"
675
676
  },
676
- ...(d = c.sessionUser.value) != null && d.role.isAdmin ? [
677
+ ...(d = l.sessionUser.value) != null && d.role.isAdmin ? [
677
678
  {
678
679
  id: "statusForAdmin",
679
- header: () => `${e("inventory.transfer.table.status")} (Admin)`,
680
- cell(s) {
681
- return s.row.original.status;
680
+ header: () => C(Ne, {}, () => `${e("inventory.transfer.table.status")}`),
681
+ cell(n) {
682
+ return n.row.original.status;
682
683
  },
683
684
  enableSorting: !0,
684
685
  size: 200
@@ -687,15 +688,15 @@ function Ws(p, t) {
687
688
  {
688
689
  accessorKey: "status",
689
690
  header: () => e("inventory.transfer.table.status"),
690
- cell(s) {
691
- const l = s.getValue(), b = De(s.row.original), { partial: w, over: D } = je(b), q = ze(l ?? "", w, D);
692
- let P = e(`inventory.transfer.status.${q}`), E = `${l ?? ""}`.toLocaleLowerCase("en-us");
693
- return q === M.enum.CLOSE && (P = `${e(`inventory.transfer.status.${M.enum.COMPLETE}`)}`), q === "PARTIAL_RECEIVED" && E === M.enum.PROCESSING.toLocaleLowerCase("en-us") && (E = M.enum.RECEIVING.toLocaleLowerCase("en-us")), $(
691
+ cell(n) {
692
+ const u = n.getValue(), S = Te(n.row.original), { partial: R, over: D } = ze(S), q = Ge(u ?? "", R, D);
693
+ let P = e(`inventory.transfer.status.${q}`), E = `${u ?? ""}`.toLocaleLowerCase("en-us");
694
+ return q === M.enum.CLOSE && (P = `${e(`inventory.transfer.status.${M.enum.COMPLETE}`)}`), q === "PARTIAL_RECEIVED" && E === M.enum.PROCESSING.toLocaleLowerCase("en-us") && (E = M.enum.RECEIVING.toLocaleLowerCase("en-us")), C(
694
695
  "div",
695
696
  {
696
697
  class: "flex"
697
698
  },
698
- $(
699
+ C(
699
700
  "div",
700
701
  {
701
702
  class: [
@@ -713,9 +714,9 @@ function Ws(p, t) {
713
714
  },
714
715
  {
715
716
  id: "action",
716
- cell(s) {
717
- const l = s.row.original, b = u(l);
718
- return tt(b, (w) => n(w, l));
717
+ cell(n) {
718
+ const u = n.row.original, S = c(u);
719
+ return rt(S, (R) => s(R, u));
719
720
  },
720
721
  enableSorting: !1,
721
722
  size: 40,
@@ -726,18 +727,18 @@ function Ws(p, t) {
726
727
  }
727
728
  ];
728
729
  if (_.isEnabled) {
729
- const s = [
730
+ const n = [
730
731
  {
731
732
  id: "netsuiteTransferOrder",
732
- accessorFn: (l) => {
733
- var b;
734
- return (b = l.netSuite) != null && b.id ? `${l.netSuite.refNo} (${l.netSuite.id})` : "N/A";
733
+ accessorFn: (u) => {
734
+ var S;
735
+ return (S = u.netSuite) != null && S.id ? `${u.netSuite.refNo} (${u.netSuite.id})` : "N/A";
735
736
  },
736
737
  header: () => "NetSuite Order (ID)",
737
- cell(l) {
738
- var w;
739
- const b = l.row.original;
740
- return (w = b.netSuite) != null && w.id ? `${b.netSuite.refNo} (${b.netSuite.id})` : "N/A";
738
+ cell(u) {
739
+ var R;
740
+ const S = u.row.original;
741
+ return (R = S.netSuite) != null && R.id ? `${S.netSuite.refNo} (${S.netSuite.id})` : "N/A";
741
742
  },
742
743
  enableSorting: !1,
743
744
  size: 200,
@@ -748,14 +749,14 @@ function Ws(p, t) {
748
749
  },
749
750
  {
750
751
  id: "netsuiteTransactionNumber",
751
- accessorFn: (l) => {
752
- var b, w;
753
- return ((w = (b = l.netSuite) == null ? void 0 : b.additionalInfo) == null ? void 0 : w.transactionnumber) ?? "N/A";
752
+ accessorFn: (u) => {
753
+ var S, R;
754
+ return ((R = (S = u.netSuite) == null ? void 0 : S.additionalInfo) == null ? void 0 : R.transactionnumber) ?? "N/A";
754
755
  },
755
756
  header: () => "NetSuite Transaction No.",
756
- cell(l) {
757
- var w, D;
758
- return ((D = (w = l.row.original.netSuite) == null ? void 0 : w.additionalInfo) == null ? void 0 : D.transactionnumber) ?? "N/A";
757
+ cell(u) {
758
+ var R, D;
759
+ return ((D = (R = u.row.original.netSuite) == null ? void 0 : R.additionalInfo) == null ? void 0 : D.transactionnumber) ?? "N/A";
759
760
  },
760
761
  enableSorting: !1,
761
762
  size: 200,
@@ -765,13 +766,13 @@ function Ws(p, t) {
765
766
  }
766
767
  }
767
768
  ];
768
- m.splice(m.length - 1, 0, ...s);
769
+ p.splice(p.length - 1, 0, ...n);
769
770
  }
770
- return m;
771
+ return p;
771
772
  }
772
- function S() {
773
+ function b() {
773
774
  var d;
774
- const m = [
775
+ const p = [
775
776
  {
776
777
  accessorKey: "purchaseOrder.seqNumber",
777
778
  header: () => e("inventory.transfer.table.seqNo"),
@@ -782,8 +783,8 @@ function Ws(p, t) {
782
783
  {
783
784
  accessorKey: "purchaseOrder._id",
784
785
  header: () => e("inventory.transfer.table.createdAt"),
785
- cell(s) {
786
- return $e(`${s.getValue()}`);
786
+ cell(n) {
787
+ return qe(`${n.getValue()}`);
787
788
  },
788
789
  enableSorting: !0
789
790
  },
@@ -804,12 +805,12 @@ function Ws(p, t) {
804
805
  enableSorting: !1,
805
806
  size: "auto"
806
807
  },
807
- ...(d = c.sessionUser.value) != null && d.role.isAdmin ? [
808
+ ...(d = l.sessionUser.value) != null && d.role.isAdmin ? [
808
809
  {
809
810
  id: "statusForAdmin",
810
- header: () => `${e("inventory.transfer.table.status")} (Admin)`,
811
- cell(s) {
812
- return s.row.original.status;
811
+ header: () => C(Ne, {}, () => `${e("inventory.transfer.table.status")}`),
812
+ cell(n) {
813
+ return n.row.original.status;
813
814
  },
814
815
  enableSorting: !0,
815
816
  size: 200
@@ -818,21 +819,21 @@ function Ws(p, t) {
818
819
  {
819
820
  accessorKey: "purchaseOrder.status",
820
821
  header: () => e("inventory.transfer.table.status"),
821
- cell(s) {
822
- const l = s.row.original, b = s.getValue();
823
- if (!l.purchaseOrder)
824
- return $(Ke.FmChip, {
822
+ cell(n) {
823
+ const u = n.row.original, S = n.getValue();
824
+ if (!u.purchaseOrder)
825
+ return C(je.FmChip, {
825
826
  label: "N/A",
826
827
  compact: !0
827
828
  });
828
- const w = De(l.purchaseOrder), { partial: D, over: q } = je(w), P = ze(b ?? "", D, q);
829
- let E = e(`inventory.transfer.status.${P}`), z = `${b ?? ""}`.toLocaleLowerCase("en-us");
830
- return P === M.enum.CLOSE && (E = `${e(`inventory.transfer.status.${M.enum.COMPLETE}`)}`), P === "PARTIAL_RECEIVED" && z === M.enum.PROCESSING.toLocaleLowerCase("en-us") && (z = M.enum.RECEIVING.toLocaleLowerCase("en-us")), $(
829
+ const R = Te(u.purchaseOrder), { partial: D, over: q } = ze(R), P = Ge(S ?? "", D, q);
830
+ let E = e(`inventory.transfer.status.${P}`), z = `${S ?? ""}`.toLocaleLowerCase("en-us");
831
+ return P === M.enum.CLOSE && (E = `${e(`inventory.transfer.status.${M.enum.COMPLETE}`)}`), P === "PARTIAL_RECEIVED" && z === M.enum.PROCESSING.toLocaleLowerCase("en-us") && (z = M.enum.RECEIVING.toLocaleLowerCase("en-us")), C(
831
832
  "div",
832
833
  {
833
834
  class: "flex"
834
835
  },
835
- $(
836
+ C(
836
837
  "div",
837
838
  {
838
839
  class: [
@@ -849,14 +850,14 @@ function Ws(p, t) {
849
850
  },
850
851
  {
851
852
  id: "action",
852
- cell(s) {
853
- const l = s.row.original, w = (l.purchaseOrder ? u(l.purchaseOrder) : []).map((D) => D.value === te.Print ? {
853
+ cell(n) {
854
+ const u = n.row.original, R = (u.purchaseOrder ? c(u.purchaseOrder) : []).map((D) => D.value === te.Print ? {
854
855
  ...D,
855
856
  translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
856
857
  } : D);
857
- return tt(
858
- w,
859
- (D) => l.purchaseOrder ? n(D, l.purchaseOrder, l) : void 0
858
+ return rt(
859
+ R,
860
+ (D) => u.purchaseOrder ? s(D, u.purchaseOrder, u) : void 0
860
861
  );
861
862
  },
862
863
  enableSorting: !1,
@@ -868,18 +869,18 @@ function Ws(p, t) {
868
869
  }
869
870
  ];
870
871
  if (_.isEnabled) {
871
- const s = [
872
+ const n = [
872
873
  {
873
874
  id: "netsuiteTransferOrder",
874
- accessorFn: (l) => {
875
- var b;
876
- return (b = l.netSuite) != null && b.id ? `${l.netSuite.refNo} (${l.netSuite.id})` : "N/A";
875
+ accessorFn: (u) => {
876
+ var S;
877
+ return (S = u.netSuite) != null && S.id ? `${u.netSuite.refNo} (${u.netSuite.id})` : "N/A";
877
878
  },
878
879
  header: () => "NetSuite Order (ID)",
879
- cell(l) {
880
- var w;
881
- const b = l.row.original;
882
- return (w = b.netSuite) != null && w.id ? `${b.netSuite.refNo} (${b.netSuite.id})` : "N/A";
880
+ cell(u) {
881
+ var R;
882
+ const S = u.row.original;
883
+ return (R = S.netSuite) != null && R.id ? `${S.netSuite.refNo} (${S.netSuite.id})` : "N/A";
883
884
  },
884
885
  enableSorting: !1,
885
886
  size: 200,
@@ -890,14 +891,14 @@ function Ws(p, t) {
890
891
  },
891
892
  {
892
893
  id: "netsuiteTransactionNumber",
893
- accessorFn: (l) => {
894
- var b, w;
895
- return ((w = (b = l.netSuite) == null ? void 0 : b.additionalInfo) == null ? void 0 : w.transactionnumber) ?? "N/A";
894
+ accessorFn: (u) => {
895
+ var S, R;
896
+ return ((R = (S = u.netSuite) == null ? void 0 : S.additionalInfo) == null ? void 0 : R.transactionnumber) ?? "N/A";
896
897
  },
897
898
  header: () => "NetSuite Transaction No.",
898
- cell(l) {
899
- var w, D;
900
- return ((D = (w = l.row.original.netSuite) == null ? void 0 : w.additionalInfo) == null ? void 0 : D.transactionnumber) ?? "N/A";
899
+ cell(u) {
900
+ var R, D;
901
+ return ((D = (R = u.row.original.netSuite) == null ? void 0 : R.additionalInfo) == null ? void 0 : D.transactionnumber) ?? "N/A";
901
902
  },
902
903
  enableSorting: !1,
903
904
  size: 200,
@@ -907,28 +908,28 @@ function Ws(p, t) {
907
908
  }
908
909
  }
909
910
  ];
910
- m.splice(m.length - 2, 0, ...s);
911
+ p.splice(p.length - 2, 0, ...n);
911
912
  }
912
- return m;
913
+ return p;
913
914
  }
914
915
  return {
915
- columnDefs: ee(() => p === "receive/request" ? h() : S())
916
+ columnDefs: ee(() => y === "receive/request" ? v() : b())
916
917
  };
917
918
  }
918
- const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Mt = { class: "flex flex-col gap-8" }, Kt = { class: "flex w-full justify-end gap-16" }, jt = /* @__PURE__ */ he({
919
+ const Mt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Kt = { class: "flex flex-col gap-8" }, jt = { class: "flex w-full justify-end gap-16" }, zt = /* @__PURE__ */ he({
919
920
  __name: "FulfillmentForm",
920
921
  props: {
921
922
  purchaseOrder: {},
922
923
  confirm: { type: Function }
923
924
  },
924
925
  emits: ["update:show"],
925
- setup(p, { emit: t }) {
926
- const a = p, _ = Rt({
926
+ setup(y, { emit: t }) {
927
+ const a = y, _ = Ot({
927
928
  id: "",
928
929
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
929
930
  items: []
930
- }), c = G(), e = t;
931
- ut(() => {
931
+ }), l = G(), e = t;
932
+ dt(() => {
932
933
  a.purchaseOrder && (_.items = a.purchaseOrder.items.map((i) => ({
933
934
  id: i.id,
934
935
  sku: i.sku,
@@ -936,35 +937,35 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
936
937
  amount: i.quantity ?? { amount: 1, precision: 0 }
937
938
  })));
938
939
  });
939
- const u = ee(() => _.items.length <= 10);
940
- return (i, n) => {
941
- const h = W("FmTable"), S = W("FmButton"), v = W("FmForm");
942
- return g(), ie(v, {
940
+ const c = ee(() => _.items.length <= 10);
941
+ return (i, s) => {
942
+ const v = W("FmTable"), b = W("FmButton"), m = W("FmForm");
943
+ return g(), ie(m, {
943
944
  ref_key: "formRef",
944
- ref: c,
945
+ ref: l,
945
946
  class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
946
947
  onValidationFailed: console.log,
947
- onValidationSuccess: n[1] || (n[1] = () => a.confirm(_))
948
+ onValidationSuccess: s[1] || (s[1] = () => a.confirm(_))
948
949
  }, {
949
- default: oe(() => [
950
- n[2] || (n[2] = o("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
951
- o("div", Ut, [
952
- o("div", Mt, [
953
- F(h, {
950
+ default: re(() => [
951
+ s[2] || (s[2] = o("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
952
+ o("div", Mt, [
953
+ o("div", Kt, [
954
+ I(v, {
954
955
  "column-defs": [
955
956
  {
956
957
  header: "Code",
957
- cell: (m) => {
958
- const d = a.purchaseOrder.items.find((s) => s.id === m.row.original.id || s.sku._id === m.row.original.sku._id);
959
- return $(
960
- R(Ke).FmTooltip,
958
+ cell: (p) => {
959
+ const d = a.purchaseOrder.items.find((n) => n.id === p.row.original.id || n.sku._id === p.row.original.sku._id);
960
+ return C(
961
+ w(je).FmTooltip,
961
962
  {
962
963
  content: d.code,
963
964
  placement: "top",
964
965
  variant: "plain",
965
966
  zIndex: 50
966
967
  },
967
- $(
968
+ C(
968
969
  "span",
969
970
  {
970
971
  class: "flex-auto line-clamp-2 text-ellipsis break-all"
@@ -976,17 +977,17 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
976
977
  },
977
978
  {
978
979
  header: "Name",
979
- cell: (m) => {
980
- const d = a.purchaseOrder.items.find((s) => s.id === m.row.original.id || s.sku._id === m.row.original.sku._id);
981
- return $(
982
- R(Ke).FmTooltip,
980
+ cell: (p) => {
981
+ const d = a.purchaseOrder.items.find((n) => n.id === p.row.original.id || n.sku._id === p.row.original.sku._id);
982
+ return C(
983
+ w(je).FmTooltip,
983
984
  {
984
985
  content: d.name,
985
986
  placement: "top",
986
987
  variant: "plain",
987
988
  zIndex: 50
988
989
  },
989
- $(
990
+ C(
990
991
  "span",
991
992
  {
992
993
  class: "flex-auto line-clamp-2 text-ellipsis break-all"
@@ -998,32 +999,32 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
998
999
  },
999
1000
  {
1000
1001
  header: "Amount",
1001
- cell: (m) => {
1002
- const d = m.row.original, s = a.purchaseOrder.items.find((b) => b.id === d.id || b.sku._id === d.sku._id), l = d.amount ?? {
1002
+ cell: (p) => {
1003
+ const d = p.row.original, n = a.purchaseOrder.items.find((S) => S.id === d.id || S.sku._id === d.sku._id), u = d.amount ?? {
1003
1004
  amount: 1,
1004
1005
  precision: 0
1005
1006
  };
1006
- return $(Tt, {
1007
+ return C(Pt, {
1007
1008
  style: {
1008
1009
  flex: "1 1 0%"
1009
1010
  },
1010
1011
  modelValue: {
1011
- amount: l,
1012
+ amount: u,
1012
1013
  measurement: d.measurement ?? null
1013
1014
  },
1014
1015
  key: d.id ?? d.sku._id,
1015
1016
  unit: d.sku.unit,
1016
- "onUpdate:modelValue": (b) => {
1017
- if (!b) return;
1018
- const w = _.items.find((D) => D.id === d.id || D.sku._id === d.sku._id);
1019
- w && (w.amount = b.amount);
1017
+ "onUpdate:modelValue": (S) => {
1018
+ if (!S) return;
1019
+ const R = _.items.find((D) => D.id === d.id || D.sku._id === d.sku._id);
1020
+ R && (R.amount = S.amount);
1020
1021
  },
1021
1022
  disableUnit: !0,
1022
1023
  rules: [
1023
- R(Pt)(
1024
- +R(fe)({ amount: 0, precision: 0 })
1024
+ w(It)(
1025
+ +w(fe)({ amount: 0, precision: 0 })
1025
1026
  ),
1026
- R(It)(+R(fe)(s.quantity))
1027
+ w(Ft)(+w(fe)(n.quantity))
1027
1028
  ],
1028
1029
  applyDefaultRules: !0
1029
1030
  });
@@ -1031,24 +1032,24 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1031
1032
  }
1032
1033
  ],
1033
1034
  "row-data": _.items,
1034
- "hide-footer": u.value
1035
+ "hide-footer": c.value
1035
1036
  }, null, 8, ["column-defs", "row-data", "hide-footer"])
1036
1037
  ])
1037
1038
  ]),
1038
- o("div", Kt, [
1039
- F(S, {
1039
+ o("div", jt, [
1040
+ I(b, {
1040
1041
  class: "px-16",
1041
1042
  label: "Confirm",
1042
1043
  size: "md",
1043
1044
  variant: "primary",
1044
1045
  type: "submit"
1045
1046
  }),
1046
- F(S, {
1047
+ I(b, {
1047
1048
  class: "px-16",
1048
1049
  label: "Cancel",
1049
1050
  size: "md",
1050
1051
  variant: "secondary",
1051
- onClick: n[0] || (n[0] = () => e("update:show", !1))
1052
+ onClick: s[0] || (s[0] = () => e("update:show", !1))
1052
1053
  })
1053
1054
  ])
1054
1055
  ]),
@@ -1056,73 +1057,73 @@ const Ut = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
1056
1057
  }, 8, ["onValidationFailed"]);
1057
1058
  };
1058
1059
  }
1059
- }), Me = {
1060
+ }), Ke = {
1060
1061
  submitRequest: {
1061
1062
  translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
1062
1063
  color: "primary",
1063
- buttonVariant: se.Primary
1064
+ buttonVariant: ne.Primary
1064
1065
  },
1065
1066
  confirmDraft: {
1066
1067
  translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
1067
1068
  color: "primary",
1068
- buttonVariant: se.Primary
1069
+ buttonVariant: ne.Primary
1069
1070
  },
1070
1071
  cancelDraft: {
1071
1072
  translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
1072
1073
  color: "system-error-300",
1073
- buttonVariant: se.Destructive
1074
+ buttonVariant: ne.Destructive
1074
1075
  },
1075
1076
  approveDraft: {
1076
1077
  translationKey: "inventory.transfer.receiveRequest.actions.approveDraft",
1077
1078
  color: "primary",
1078
- buttonVariant: se.Primary
1079
+ buttonVariant: ne.Primary
1079
1080
  },
1080
1081
  rejectDraft: {
1081
1082
  translationKey: "inventory.transfer.receiveRequest.actions.rejectDraft",
1082
1083
  color: "system-error-300",
1083
- buttonVariant: se.Destructive
1084
+ buttonVariant: ne.Destructive
1084
1085
  },
1085
1086
  approveRequest: {
1086
1087
  translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
1087
1088
  color: "primary",
1088
- buttonVariant: se.Primary
1089
+ buttonVariant: ne.Primary
1089
1090
  },
1090
1091
  processRequest: {
1091
1092
  translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
1092
1093
  color: "primary",
1093
- buttonVariant: se.Primary
1094
+ buttonVariant: ne.Primary
1094
1095
  },
1095
1096
  receiveStock: {
1096
1097
  translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
1097
1098
  color: "primary",
1098
- buttonVariant: se.Primary,
1099
+ buttonVariant: ne.Primary,
1099
1100
  available: !1
1100
1101
  },
1101
1102
  completeReceive: {
1102
1103
  translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
1103
1104
  color: "primary",
1104
- buttonVariant: se.Plain
1105
+ buttonVariant: ne.Plain
1105
1106
  },
1106
1107
  rejectRequest: {
1107
1108
  translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
1108
1109
  color: "system-error-300",
1109
- buttonVariant: se.Destructive
1110
+ buttonVariant: ne.Destructive
1110
1111
  },
1111
1112
  closeRequest: {
1112
1113
  translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
1113
1114
  color: "system-error-300",
1114
- buttonVariant: se.Destructive,
1115
+ buttonVariant: ne.Destructive,
1115
1116
  available: !1
1116
1117
  },
1117
1118
  returnStock: {
1118
1119
  translationKey: "inventory.transfer.receiveRequest.actions.returnStock",
1119
1120
  color: "primary",
1120
- buttonVariant: se.Primary,
1121
+ buttonVariant: ne.Primary,
1121
1122
  available: !1
1122
1123
  }
1123
1124
  };
1124
- function zt() {
1125
- const p = Te();
1125
+ function Gt() {
1126
+ const y = Ie();
1126
1127
  return {
1127
1128
  ableToMarkReceived(t) {
1128
1129
  if (!t || t.status !== M.enum.RECEIVING)
@@ -1134,15 +1135,15 @@ function zt() {
1134
1135
  return !(!t || (t == null ? void 0 : t.status) !== M.enum.REQUESTING);
1135
1136
  },
1136
1137
  ableToCreateFulfillment(t, a) {
1137
- var e, u;
1138
- if (!p.acceptRequireFulfillment || !t || !a || t.status !== M.enum.PROCESSING || !a.processedAt)
1138
+ var e, c;
1139
+ if (!y.acceptRequireFulfillment || !t || !a || t.status !== M.enum.PROCESSING || !a.processedAt)
1139
1140
  return !1;
1140
- const _ = (e = a == null ? void 0 : a.from) == null ? void 0 : e.dbName, c = (u = a == null ? void 0 : a.to) == null ? void 0 : u.dbName;
1141
- return !(_.startsWith("restaurant_") && c.startsWith("restaurant_"));
1141
+ const _ = (e = a == null ? void 0 : a.from) == null ? void 0 : e.dbName, l = (c = a == null ? void 0 : a.to) == null ? void 0 : c.dbName;
1142
+ return !(_.startsWith("restaurant_") && l.startsWith("restaurant_"));
1142
1143
  }
1143
1144
  };
1144
1145
  }
1145
- const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1146
+ const Ht = { class: "flex flex-row-reverse" }, Wt = /* @__PURE__ */ he({
1146
1147
  __name: "NetSuiteSync",
1147
1148
  props: {
1148
1149
  poRequest: {},
@@ -1150,22 +1151,22 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1150
1151
  isTransferBetweenOutlets: { type: Boolean },
1151
1152
  scope: {}
1152
1153
  },
1153
- setup(p) {
1154
- const t = p, a = Pe(), _ = Fe(), c = We(), e = G(!1);
1154
+ setup(y) {
1155
+ const t = y, a = Fe(), _ = Le(), l = Ye(), e = G(!1);
1155
1156
  ee(() => {
1156
- var S, v, m, d;
1157
+ var b, m, p, d;
1157
1158
  let i = !0;
1158
1159
  a.isEnabled || (i = !1);
1159
- const n = t.purchaseOrder, h = t.poRequest;
1160
- return n && ((S = n == null ? void 0 : n.supplier) != null && S.internal ? (!h && n.status == M.enum.DRAFT && (i = !1), h && !((v = h == null ? void 0 : h.netSuite) != null && v.id) && (i = !1), t.isTransferBetweenOutlets && (i = !1)) : ((n == null ? void 0 : n.status) !== M.enum.REQUESTING && n.supplier.internal && (i = !1), !h && !((m = n == null ? void 0 : n.netSuite) != null && m.id) && (i = !1), !h && ((d = n == null ? void 0 : n.netSuite) != null && d.id) && (n == null ? void 0 : n.status) == M.enum.REQUESTING && (i = !1))), i;
1160
+ const s = t.purchaseOrder, v = t.poRequest;
1161
+ return s && ((b = s == null ? void 0 : s.supplier) != null && b.internal ? (!v && s.status == M.enum.DRAFT && (i = !1), v && !((m = v == null ? void 0 : v.netSuite) != null && m.id) && (i = !1), t.isTransferBetweenOutlets && (i = !1)) : ((s == null ? void 0 : s.status) !== M.enum.REQUESTING && s.supplier.internal && (i = !1), !v && !((p = s == null ? void 0 : s.netSuite) != null && p.id) && (i = !1), !v && ((d = s == null ? void 0 : s.netSuite) != null && d.id) && (s == null ? void 0 : s.status) == M.enum.REQUESTING && (i = !1))), i;
1161
1162
  });
1162
- async function u() {
1163
- e.value || c.open({
1163
+ async function c() {
1164
+ e.value || l.open({
1164
1165
  title: "Sync with NetSuite",
1165
- contentComponent: $("div", [
1166
- $("p", "Are you sure you want to sync now?"),
1167
- $("br"),
1168
- $(
1166
+ contentComponent: C("div", [
1167
+ C("p", "Are you sure you want to sync now?"),
1168
+ C("br"),
1169
+ C(
1169
1170
  "p",
1170
1171
  { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
1171
1172
  "Please wait a moment before syncing manually to avoid unnecessary actions."
@@ -1178,18 +1179,18 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1178
1179
  },
1179
1180
  secondaryActions: { text: "Not now", close: !0 }
1180
1181
  }).onPrimary(async () => {
1181
- var i, n, h;
1182
+ var i, s, v;
1182
1183
  try {
1183
1184
  e.value = !0;
1184
- const S = ((i = t.purchaseOrder) == null ? void 0 : i._id) || ((n = t.poRequest) == null ? void 0 : n.purchaseOrderId) || "", v = (h = t.poRequest) == null ? void 0 : h.to.dbName;
1185
+ const b = ((i = t.purchaseOrder) == null ? void 0 : i._id) || ((s = t.poRequest) == null ? void 0 : s.purchaseOrderId) || "", m = (v = t.poRequest) == null ? void 0 : v.to.dbName;
1185
1186
  await a.syncPurchaseOrder(
1186
- S,
1187
- t.scope === "approval" ? v : void 0
1187
+ b,
1188
+ t.scope === "approval" ? m : void 0
1188
1189
  ), _.open({
1189
1190
  title: "Sync with NetSuite",
1190
1191
  message: "Requested to sync with NetSuite. Please wait a moment.",
1191
1192
  type: "success"
1192
- }), await new Promise((m) => setTimeout(m, 5e3)), e.value = !1;
1193
+ }), await new Promise((p) => setTimeout(p, 5e3)), e.value = !1;
1193
1194
  } catch {
1194
1195
  _.open({
1195
1196
  title: "Error",
@@ -1199,15 +1200,15 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1199
1200
  }
1200
1201
  });
1201
1202
  }
1202
- return (i, n) => {
1203
- const h = W("FmButton");
1204
- return g(), N("div", Gt, [
1205
- F(h, {
1203
+ return (i, s) => {
1204
+ const v = W("FmButton");
1205
+ return g(), N("div", Ht, [
1206
+ I(v, {
1206
1207
  "prepend-icon": "sync",
1207
1208
  variant: "secondary",
1208
1209
  label: "Sync",
1209
1210
  loading: e.value,
1210
- onClick: u,
1211
+ onClick: c,
1211
1212
  "text-color": "primary",
1212
1213
  "bg-color": "transparent",
1213
1214
  "border-color": "primary"
@@ -1215,22 +1216,22 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1215
1216
  ]);
1216
1217
  };
1217
1218
  }
1218
- }), Wt = {
1219
+ }), Yt = {
1219
1220
  key: 0,
1220
1221
  class: "flex flex-col gap-8"
1221
- }, Yt = { class: "flex flex-col gap-4" }, Qt = { class: "fm-typo-en-body-lg-600" }, Xt = {
1222
+ }, Qt = { class: "flex flex-col gap-4" }, Xt = { class: "fm-typo-en-body-lg-600" }, Zt = {
1222
1223
  key: 0,
1223
1224
  class: "flex flex-col gap-4"
1224
- }, Zt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Jt = { class: "fm-typo-en-body-lg-600" }, er = { key: 0 }, tr = { key: 1 }, rr = {
1225
+ }, Jt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, er = { class: "fm-typo-en-body-lg-600" }, tr = { key: 0 }, rr = { key: 1 }, sr = {
1225
1226
  key: 1,
1226
1227
  class: "flex flex-col gap-4"
1227
- }, sr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, nr = { class: "fm-typo-en-body-lg-600" }, ar = { key: 0 }, or = { key: 1 }, ir = {
1228
+ }, nr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ar = { class: "fm-typo-en-body-lg-600" }, or = { key: 0 }, ir = { key: 1 }, lr = {
1228
1229
  key: 2,
1229
1230
  class: "flex flex-col gap-4"
1230
- }, lr = { class: "fm-typo-en-body-lg-600" }, cr = {
1231
+ }, cr = { class: "fm-typo-en-body-lg-600" }, ur = {
1231
1232
  key: 3,
1232
1233
  class: "flex flex-col gap-4"
1233
- }, ur = { class: "fm-typo-en-body-lg-600" }, dr = /* @__PURE__ */ he({
1234
+ }, dr = { class: "fm-typo-en-body-lg-600" }, fr = /* @__PURE__ */ he({
1234
1235
  __name: "NetSuiteInfo",
1235
1236
  props: {
1236
1237
  transferType: {},
@@ -1240,100 +1241,100 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1240
1241
  isTransferBetweenOutlets: { type: Boolean },
1241
1242
  scope: {}
1242
1243
  },
1243
- setup(p) {
1244
- const t = p, a = Pe(), _ = Ee(), c = G(t.poRequest);
1245
- ut(async () => {
1246
- var n;
1247
- if (!t.poRequest && ((n = t.purchaseOrder) != null && n._id)) {
1248
- const h = await _.getLatestPurchaseOrderRequest(t.purchaseOrder._id);
1249
- c.value = h;
1244
+ setup(y) {
1245
+ const t = y, a = Fe(), _ = Be(), l = G(t.poRequest);
1246
+ dt(async () => {
1247
+ var s;
1248
+ if (!t.poRequest && ((s = t.purchaseOrder) != null && s._id)) {
1249
+ const v = await _.getLatestPurchaseOrderRequest(t.purchaseOrder._id);
1250
+ l.value = v;
1250
1251
  }
1251
1252
  });
1252
1253
  const e = ee(
1253
1254
  () => {
1254
- var n, h, S, v, m, d;
1255
+ var s, v, b, m, p, d;
1255
1256
  return a.getSubsidiaryFullName(
1256
- ((S = (h = (n = t.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : h.subsidiary) == null ? void 0 : S.id) || ((d = (m = (v = t.poRequest) == null ? void 0 : v.netSuite) == null ? void 0 : m.subsidiary) == null ? void 0 : d.id)
1257
+ ((b = (v = (s = t.purchaseOrder) == null ? void 0 : s.netSuite) == null ? void 0 : v.subsidiary) == null ? void 0 : b.id) || ((d = (p = (m = t.poRequest) == null ? void 0 : m.netSuite) == null ? void 0 : p.subsidiary) == null ? void 0 : d.id)
1257
1258
  ).fullName;
1258
1259
  }
1259
- ), u = ee(() => {
1260
- var n, h, S, v, m, d, s, l, b, w, D, q;
1261
- return (S = (h = (n = t.purchaseOrder) == null ? void 0 : n.netSuite) == null ? void 0 : h.additionalInfo) != null && S.transactionnumber ? (d = (m = (v = t.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.additionalInfo) == null ? void 0 : d.transactionnumber : (b = (l = (s = c.value) == null ? void 0 : s.netSuite) == null ? void 0 : l.additionalInfo) != null && b.transactionnumber ? (q = (D = (w = c.value) == null ? void 0 : w.netSuite) == null ? void 0 : D.additionalInfo) == null ? void 0 : q.transactionnumber : null;
1260
+ ), c = ee(() => {
1261
+ var s, v, b, m, p, d, n, u, S, R, D, q;
1262
+ return (b = (v = (s = t.purchaseOrder) == null ? void 0 : s.netSuite) == null ? void 0 : v.additionalInfo) != null && b.transactionnumber ? (d = (p = (m = t.purchaseOrder) == null ? void 0 : m.netSuite) == null ? void 0 : p.additionalInfo) == null ? void 0 : d.transactionnumber : (S = (u = (n = l.value) == null ? void 0 : n.netSuite) == null ? void 0 : u.additionalInfo) != null && S.transactionnumber ? (q = (D = (R = l.value) == null ? void 0 : R.netSuite) == null ? void 0 : D.additionalInfo) == null ? void 0 : q.transactionnumber : null;
1262
1263
  }), i = ee(() => {
1263
- var n, h, S, v, m, d;
1264
- return (h = (n = t.purchaseOrder) == null ? void 0 : n.deliveryFullfillment) != null && h.length && ((v = (S = t.purchaseOrder) == null ? void 0 : S.deliveryFullfillment) == null ? void 0 : v.length) > 0 ? (d = (m = t.purchaseOrder) == null ? void 0 : m.deliveryFullfillment) == null ? void 0 : d.map((s) => {
1265
- var l;
1266
- return (l = s.netSuite) == null ? void 0 : l.refNo;
1264
+ var s, v, b, m, p, d;
1265
+ return (v = (s = t.purchaseOrder) == null ? void 0 : s.deliveryFullfillment) != null && v.length && ((m = (b = t.purchaseOrder) == null ? void 0 : b.deliveryFullfillment) == null ? void 0 : m.length) > 0 ? (d = (p = t.purchaseOrder) == null ? void 0 : p.deliveryFullfillment) == null ? void 0 : d.map((n) => {
1266
+ var u;
1267
+ return (u = n.netSuite) == null ? void 0 : u.refNo;
1267
1268
  }).join(", ") : "N/A";
1268
1269
  });
1269
- return (n, h) => {
1270
- var S, v, m, d, s, l, b, w, D, q, P, E, z, ce, le, be;
1271
- return R(a).isEnabled ? (g(), N("div", Wt, [
1272
- o("div", Yt, [
1273
- h[0] || (h[0] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
1274
- o("div", Qt, k(e.value || "N/A"), 1)
1270
+ return (s, v) => {
1271
+ var b, m, p, d, n, u, S, R, D, q, P, E, z, ce, le, be;
1272
+ return w(a).isEnabled ? (g(), N("div", Yt, [
1273
+ o("div", Qt, [
1274
+ v[0] || (v[0] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
1275
+ o("div", Xt, k(e.value || "N/A"), 1)
1275
1276
  ]),
1276
- !n.isTransferBetweenOutlets && n.scope === R(Ge).RECEIVE_REQUEST ? (g(), N("div", Xt, [
1277
- o("div", Zt, " NetSuite " + k((v = (S = n.purchaseOrder) == null ? void 0 : S.netSuite) != null && v.recordType ? R(lt)((d = (m = n.purchaseOrder) == null ? void 0 : m.netSuite) == null ? void 0 : d.recordType) : n.transferType === R(ye).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
1278
- o("div", Jt, [
1279
- (l = (s = n.purchaseOrder) == null ? void 0 : s.netSuite) != null && l.id ? (g(), N("span", er, k((w = (b = n.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : w.refNo) + " (" + k((q = (D = n.purchaseOrder) == null ? void 0 : D.netSuite) == null ? void 0 : q.id) + ") ", 1)) : (g(), N("span", tr, "N/A"))
1277
+ !s.isTransferBetweenOutlets && s.scope === w(He).RECEIVE_REQUEST ? (g(), N("div", Zt, [
1278
+ o("div", Jt, " NetSuite " + k((m = (b = s.purchaseOrder) == null ? void 0 : b.netSuite) != null && m.recordType ? w(ct)((d = (p = s.purchaseOrder) == null ? void 0 : p.netSuite) == null ? void 0 : d.recordType) : s.transferType === w(ye).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
1279
+ o("div", er, [
1280
+ (u = (n = s.purchaseOrder) == null ? void 0 : n.netSuite) != null && u.id ? (g(), N("span", tr, k((R = (S = s.purchaseOrder) == null ? void 0 : S.netSuite) == null ? void 0 : R.refNo) + " (" + k((q = (D = s.purchaseOrder) == null ? void 0 : D.netSuite) == null ? void 0 : q.id) + ") ", 1)) : (g(), N("span", rr, "N/A"))
1280
1281
  ])
1281
1282
  ])) : U("", !0),
1282
- !n.isTransferBetweenOutlets && c.value || n.scope === R(Ge).APPROVAL ? (g(), N("div", rr, [
1283
- o("div", sr, " (Request) NetSuite " + k(n.transferType === R(ye).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
1284
- o("div", nr, [
1285
- (E = (P = c.value) == null ? void 0 : P.netSuite) != null && E.id ? (g(), N("span", ar, k((ce = (z = c.value) == null ? void 0 : z.netSuite) == null ? void 0 : ce.refNo) + " (" + k((be = (le = c.value) == null ? void 0 : le.netSuite) == null ? void 0 : be.id) + ") ", 1)) : (g(), N("span", or, "N/A"))
1283
+ !s.isTransferBetweenOutlets && l.value || s.scope === w(He).APPROVAL ? (g(), N("div", sr, [
1284
+ o("div", nr, " (Request) NetSuite " + k(s.transferType === w(ye).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
1285
+ o("div", ar, [
1286
+ (E = (P = l.value) == null ? void 0 : P.netSuite) != null && E.id ? (g(), N("span", or, k((ce = (z = l.value) == null ? void 0 : z.netSuite) == null ? void 0 : ce.refNo) + " (" + k((be = (le = l.value) == null ? void 0 : le.netSuite) == null ? void 0 : be.id) + ") ", 1)) : (g(), N("span", ir, "N/A"))
1286
1287
  ])
1287
1288
  ])) : U("", !0),
1288
- u.value ? (g(), N("div", ir, [
1289
- h[1] || (h[1] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
1290
- o("div", lr, k(u.value), 1)
1289
+ c.value ? (g(), N("div", lr, [
1290
+ v[1] || (v[1] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
1291
+ o("div", cr, k(c.value), 1)
1291
1292
  ])) : U("", !0),
1292
- R(a).isEnabled && n.transferType === R(ye).TRANSFER && !n.isTransferBetweenOutlets ? (g(), N("div", cr, [
1293
- h[2] || (h[2] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
1294
- o("div", ur, k(i.value), 1)
1293
+ w(a).isEnabled && s.transferType === w(ye).TRANSFER && !s.isTransferBetweenOutlets ? (g(), N("div", ur, [
1294
+ v[2] || (v[2] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
1295
+ o("div", dr, k(i.value), 1)
1295
1296
  ])) : U("", !0)
1296
1297
  ])) : U("", !0);
1297
1298
  };
1298
1299
  }
1299
- }), fr = { class: "flex flex-row-reverse" }, mr = /* @__PURE__ */ he({
1300
+ }), mr = { class: "flex flex-row-reverse" }, pr = /* @__PURE__ */ he({
1300
1301
  __name: "NetSuiteLog",
1301
1302
  props: {
1302
1303
  netsuiteId: {},
1303
1304
  purchaseOrderId: {}
1304
1305
  },
1305
- setup(p) {
1306
- const t = Fe(), a = ct();
1307
- async function _(c, e) {
1308
- const u = [];
1309
- if (c && u.push(`body.message:*${c}*`), e) {
1310
- const S = e.replace(/:/g, "\\:");
1311
- u.push(`${S}`);
1306
+ setup(y) {
1307
+ const t = Le(), a = ut();
1308
+ async function _(l, e) {
1309
+ const c = [];
1310
+ if (l && c.push(`body.message:*${l}*`), e) {
1311
+ const b = e.replace(/:/g, "\\:");
1312
+ c.push(`${b}`);
1312
1313
  }
1313
- if (u.length === 0) {
1314
+ if (c.length === 0) {
1314
1315
  t.open({
1315
1316
  message: "Cannot open logs without valid filters.",
1316
1317
  type: "error"
1317
1318
  });
1318
1319
  return;
1319
1320
  }
1320
- const n = `attributes.pod:netsuite* AND (${u.join(" OR ")})`, { url: h } = await a.getLogs(n);
1321
+ const s = `attributes.pod:netsuite* AND (${c.join(" OR ")})`, { url: v } = await a.getLogs(s);
1321
1322
  t.open(
1322
1323
  {
1323
1324
  message: "Opening NetSuite logs...",
1324
1325
  type: "info"
1325
1326
  },
1326
1327
  800
1327
- ), await new Promise((S) => setTimeout(S, 800)), window.open(h, "_blank");
1328
+ ), await new Promise((b) => setTimeout(b, 800)), window.open(v, "_blank");
1328
1329
  }
1329
- return (c, e) => {
1330
- const u = W("FmButton");
1331
- return g(), N("div", fr, [
1332
- F(u, {
1330
+ return (l, e) => {
1331
+ const c = W("FmButton");
1332
+ return g(), N("div", mr, [
1333
+ I(c, {
1333
1334
  "prepend-icon": "history",
1334
1335
  variant: "secondary",
1335
1336
  label: "Logs",
1336
- onClick: e[0] || (e[0] = (i) => _(c.netsuiteId, c.purchaseOrderId)),
1337
+ onClick: e[0] || (e[0] = (i) => _(l.netsuiteId, l.purchaseOrderId)),
1337
1338
  "text-color": "primary",
1338
1339
  "bg-color": "transparent",
1339
1340
  "border-color": "primary"
@@ -1341,77 +1342,77 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1341
1342
  ]);
1342
1343
  };
1343
1344
  }
1344
- }), pr = { class: "flex flex-row-reverse" }, vr = { key: 0 }, yr = {
1345
+ }), vr = { class: "flex flex-row-reverse" }, yr = { key: 0 }, hr = {
1345
1346
  key: 1,
1346
1347
  class: "w-[480px]"
1347
- }, hr = { class: "fm-typo-en-body-md-400" }, br = { key: 0 }, gr = { key: 1 }, _r = { key: 1 }, Sr = /* @__PURE__ */ he({
1348
+ }, br = { class: "fm-typo-en-body-md-400" }, gr = { key: 0 }, _r = { key: 1 }, Sr = { key: 1 }, wr = /* @__PURE__ */ he({
1348
1349
  __name: "NetSuiteLatestInfo",
1349
1350
  props: {
1350
1351
  netsuiteId: {},
1351
1352
  purchaseOrderId: {}
1352
1353
  },
1353
- setup(p) {
1354
- const t = p, a = ct(), _ = G(!1), c = me(), e = G(!0), u = G(!1), i = G(null);
1355
- async function n() {
1354
+ setup(y) {
1355
+ const t = y, a = ut(), _ = G(!1), l = me(), e = G(!0), c = G(!1), i = G(null);
1356
+ async function s() {
1356
1357
  if (!i.value) {
1357
1358
  _.value = !0;
1358
1359
  try {
1359
1360
  e.value = !0;
1360
- const h = await a.getMoreInfo(
1361
- c.currentLocation.dbName,
1361
+ const v = await a.getMoreInfo(
1362
+ l.currentLocation.dbName,
1362
1363
  t.purchaseOrderId
1363
1364
  );
1364
- i.value = h, u.value = !1;
1365
+ i.value = v, c.value = !1;
1365
1366
  } catch {
1366
- u.value = !0;
1367
+ c.value = !0;
1367
1368
  } finally {
1368
1369
  e.value = !1;
1369
1370
  }
1370
1371
  }
1371
1372
  }
1372
- return (h, S) => {
1373
- const v = W("FmButton"), m = W("FmLabel"), d = W("FmDialog");
1374
- return g(), N("div", pr, [
1375
- F(d, {
1373
+ return (v, b) => {
1374
+ const m = W("FmButton"), p = W("FmLabel"), d = W("FmDialog");
1375
+ return g(), N("div", vr, [
1376
+ I(d, {
1376
1377
  modelValue: _.value,
1377
- "onUpdate:modelValue": S[2] || (S[2] = (s) => _.value = s),
1378
+ "onUpdate:modelValue": b[2] || (b[2] = (n) => _.value = n),
1378
1379
  overlay: !0
1379
1380
  }, {
1380
- "dialog-button": oe(() => [
1381
- F(v, {
1381
+ "dialog-button": re(() => [
1382
+ I(m, {
1382
1383
  "prepend-icon": "info",
1383
1384
  variant: "secondary",
1384
1385
  label: "Latest Info",
1385
- onClick: S[0] || (S[0] = (s) => n()),
1386
+ onClick: b[0] || (b[0] = (n) => s()),
1386
1387
  "text-color": "primary",
1387
1388
  "bg-color": "transparent",
1388
1389
  "border-color": "primary"
1389
1390
  })
1390
1391
  ]),
1391
- "dialog-header": oe(() => S[3] || (S[3] = [
1392
+ "dialog-header": re(() => b[3] || (b[3] = [
1392
1393
  o("div", null, "NetSuite latest info", -1)
1393
1394
  ])),
1394
- "dialog-footer": oe(() => [
1395
- F(v, {
1395
+ "dialog-footer": re(() => [
1396
+ I(m, {
1396
1397
  class: "ml-auto sm:w-full xs:w-full",
1397
1398
  label: "Close",
1398
1399
  size: "md",
1399
1400
  variant: "primary",
1400
- onClick: S[1] || (S[1] = (s) => _.value = !1)
1401
+ onClick: b[1] || (b[1] = (n) => _.value = !1)
1401
1402
  })
1402
1403
  ]),
1403
- default: oe(() => [
1404
- e.value ? (g(), N("div", vr, "Loading...")) : (g(), N("div", yr, [
1405
- u.value ? (g(), N("p", _r, "Something went wrong.")) : (g(!0), N(ne, { key: 0 }, ve(i.value, (s, l) => (g(), N("div", {
1406
- key: l,
1404
+ default: re(() => [
1405
+ e.value ? (g(), N("div", yr, "Loading...")) : (g(), N("div", hr, [
1406
+ c.value ? (g(), N("p", Sr, "Something went wrong.")) : (g(!0), N(ae, { key: 0 }, ve(i.value, (n, u) => (g(), N("div", {
1407
+ key: u,
1407
1408
  class: "mb-2"
1408
1409
  }, [
1409
1410
  o("div", null, [
1410
- F(m, {
1411
- label: R(He)(l)
1411
+ I(p, {
1412
+ label: w(We)(u)
1412
1413
  }, null, 8, ["label"]),
1413
- o("div", hr, [
1414
- Array.isArray(s) ? (g(), N("span", br, k(s.length > 0 ? s.join(", ") : "N/A"), 1)) : (g(), N("span", gr, k(s), 1))
1414
+ o("div", br, [
1415
+ Array.isArray(n) ? (g(), N("span", gr, k(n.length > 0 ? n.join(", ") : "N/A"), 1)) : (g(), N("span", _r, k(n), 1))
1415
1416
  ])
1416
1417
  ])
1417
1418
  ]))), 128))
@@ -1422,10 +1423,10 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1422
1423
  ]);
1423
1424
  };
1424
1425
  }
1425
- }), wr = {
1426
+ }), Rr = {
1426
1427
  key: 0,
1427
1428
  class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
1428
- }, Rr = { class: "flex gap-8 items-center" }, Or = { class: "ml-auto" }, Nr = { class: "flex gap-4" }, xr = /* @__PURE__ */ he({
1429
+ }, Or = { class: "flex gap-8 items-center" }, Nr = { class: "ml-auto" }, xr = { class: "flex gap-4" }, kr = /* @__PURE__ */ he({
1429
1430
  __name: "NetSuitePanel",
1430
1431
  props: {
1431
1432
  poRequest: {},
@@ -1434,91 +1435,106 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1434
1435
  transferToDbName: {},
1435
1436
  scope: {}
1436
1437
  },
1437
- setup(p) {
1438
- const t = p, a = Et(), _ = Ie(), c = ee(() => {
1439
- var n, h, S, v, m, d, s;
1440
- const e = ((n = t.transferToDbName) == null ? void 0 : n.startsWith("restaurant")) && ((S = (h = t.purchaseOrder) == null ? void 0 : h.supplier) == null ? void 0 : S.internal) === "restaurant", u = t.transferType === ye.PURCHASE, i = t.transferType === ye.TRANSFER;
1441
- return u || i && !e || ((m = (v = t.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.id) || ((s = (d = t.poRequest) == null ? void 0 : d.netSuite) == null ? void 0 : s.id);
1438
+ setup(y) {
1439
+ const t = y, a = Lt(), _ = Ee(), l = ee(() => {
1440
+ var s, v, b, m, p, d, n;
1441
+ const e = ((s = t.transferToDbName) == null ? void 0 : s.startsWith("restaurant")) && ((b = (v = t.purchaseOrder) == null ? void 0 : v.supplier) == null ? void 0 : b.internal) === "restaurant", c = t.transferType === ye.PURCHASE, i = t.transferType === ye.TRANSFER;
1442
+ return c || i && !e || ((p = (m = t.purchaseOrder) == null ? void 0 : m.netSuite) == null ? void 0 : p.id) || ((n = (d = t.poRequest) == null ? void 0 : d.netSuite) == null ? void 0 : n.id);
1442
1443
  });
1443
- return (e, u) => {
1444
- var n, h, S, v, m, d, s, l, b, w;
1444
+ return (e, c) => {
1445
1445
  const i = W("FmMenuDivider");
1446
- return R(a).isNetSuiteEnabled && c.value ? (g(), N("div", wr, [
1447
- o("div", Rr, [
1448
- u[0] || (u[0] = o("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
1449
- o("div", Or, [
1450
- o("div", Nr, [
1451
- (n = R(_).sessionUser.value) != null && n.role.isAdmin && ((S = (h = t.purchaseOrder) == null ? void 0 : h.netSuite) != null && S.id) ? (g(), ie(Sr, {
1452
- key: 0,
1453
- "netsuite-id": (m = (v = e.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : m.id,
1454
- "purchase-order-id": (d = e.purchaseOrder) == null ? void 0 : d._id
1455
- }, null, 8, ["netsuite-id", "purchase-order-id"])) : U("", !0),
1456
- (s = R(_).sessionUser.value) != null && s.role.isAdmin ? (g(), ie(mr, {
1457
- key: 1,
1458
- "netsuite-id": (b = (l = e.purchaseOrder) == null ? void 0 : l.netSuite) == null ? void 0 : b.id,
1459
- "purchase-order-id": (w = e.purchaseOrder) == null ? void 0 : w._id
1460
- }, null, 8, ["netsuite-id", "purchase-order-id"])) : U("", !0),
1461
- F(Ht, {
1446
+ return w(a).isNetSuiteEnabled && l.value ? (g(), N("div", Rr, [
1447
+ o("div", Or, [
1448
+ c[0] || (c[0] = o("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
1449
+ o("div", Nr, [
1450
+ o("div", xr, [
1451
+ I(Ne, null, {
1452
+ default: re(() => {
1453
+ var s, v, b, m, p, d;
1454
+ return [
1455
+ (s = w(_).sessionUser.value) != null && s.role.isAdmin && ((b = (v = t.purchaseOrder) == null ? void 0 : v.netSuite) != null && b.id) ? (g(), ie(wr, {
1456
+ key: 0,
1457
+ "netsuite-id": (p = (m = e.purchaseOrder) == null ? void 0 : m.netSuite) == null ? void 0 : p.id,
1458
+ "purchase-order-id": (d = e.purchaseOrder) == null ? void 0 : d._id
1459
+ }, null, 8, ["netsuite-id", "purchase-order-id"])) : U("", !0)
1460
+ ];
1461
+ }),
1462
+ _: 1
1463
+ }),
1464
+ I(Ne, null, {
1465
+ default: re(() => {
1466
+ var s, v, b, m;
1467
+ return [
1468
+ (s = w(_).sessionUser.value) != null && s.role.isAdmin ? (g(), ie(pr, {
1469
+ key: 0,
1470
+ "netsuite-id": (b = (v = e.purchaseOrder) == null ? void 0 : v.netSuite) == null ? void 0 : b.id,
1471
+ "purchase-order-id": (m = e.purchaseOrder) == null ? void 0 : m._id
1472
+ }, null, 8, ["netsuite-id", "purchase-order-id"])) : U("", !0)
1473
+ ];
1474
+ }),
1475
+ _: 1
1476
+ }),
1477
+ I(Wt, {
1462
1478
  "po-request": e.poRequest,
1463
1479
  "purchase-order": e.purchaseOrder,
1464
- "is-transfer-between-outlets": !c.value,
1480
+ "is-transfer-between-outlets": !l.value,
1465
1481
  scope: e.scope
1466
1482
  }, null, 8, ["po-request", "purchase-order", "is-transfer-between-outlets", "scope"])
1467
1483
  ])
1468
1484
  ])
1469
1485
  ]),
1470
- F(i),
1471
- F(dr, {
1486
+ I(i),
1487
+ I(fr, {
1472
1488
  "po-request": e.poRequest,
1473
1489
  "purchase-order": e.purchaseOrder,
1474
1490
  "transfer-type": e.transferType,
1475
1491
  "transfer-to-db-name": e.transferToDbName,
1476
- "is-transfer-between-outlets": !c.value,
1492
+ "is-transfer-between-outlets": !l.value,
1477
1493
  scope: e.scope
1478
1494
  }, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
1479
1495
  ])) : U("", !0);
1480
1496
  };
1481
1497
  }
1482
- }), kr = { class: "flex flex-col gap-16 w-full h-full" }, Ar = { class: "flex justify-between" }, Cr = { class: "fm-typo-en-body-lg-600" }, $r = { class: "flex gap-2" }, Dr = { key: 0 }, qr = { class: "flex flex-col gap-8" }, Tr = { class: "flex flex-col gap-4" }, Pr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ir = { class: "flex gap-1" }, Fr = { class: "fm-typo-en-body-lg-600" }, Er = {
1498
+ }), Ar = { class: "flex flex-col gap-16 w-full h-full" }, Cr = { class: "flex justify-between" }, $r = { class: "fm-typo-en-body-lg-600" }, Dr = { class: "flex gap-2" }, qr = { key: 0 }, Tr = { class: "flex flex-col gap-8" }, Pr = { class: "flex flex-col gap-4" }, Ir = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fr = { class: "flex gap-1" }, Er = { class: "fm-typo-en-body-lg-600" }, Lr = {
1483
1499
  key: 0,
1484
1500
  class: "flex flex-col gap-4"
1485
- }, Lr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Br = { class: "fm-typo-en-body-lg-600" }, Vr = { class: "flex flex-col gap-4" }, Ur = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mr = { class: "fm-typo-en-body-lg-600" }, Kr = {
1501
+ }, Br = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vr = { class: "fm-typo-en-body-lg-600" }, Ur = { class: "flex flex-col gap-4" }, Mr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Kr = { class: "fm-typo-en-body-lg-600" }, jr = {
1486
1502
  key: 1,
1487
1503
  class: "flex flex-col gap-4"
1488
- }, jr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, zr = { class: "fm-typo-en-body-lg-600" }, Gr = {
1504
+ }, zr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Gr = { class: "fm-typo-en-body-lg-600" }, Hr = {
1489
1505
  key: 2,
1490
1506
  class: "flex flex-col gap-4"
1491
- }, Hr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wr = { class: "fm-typo-en-body-lg-600" }, Yr = {
1507
+ }, Wr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Yr = { class: "fm-typo-en-body-lg-600" }, Qr = {
1492
1508
  key: 3,
1493
1509
  class: "flex flex-col gap-4"
1494
- }, Qr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Xr = { class: "fm-typo-en-body-lg-600" }, Zr = {
1510
+ }, Xr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Zr = { class: "fm-typo-en-body-lg-600" }, Jr = {
1495
1511
  key: 4,
1496
1512
  class: "flex flex-col gap-4"
1497
- }, Jr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, es = { class: "fm-typo-en-body-lg-600" }, ts = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, rs = { class: "flex flex-col gap-8" }, ss = { class: "flex gap-8 items-center" }, ns = { class: "flex-1 fm-typo-en-body-lg-600" }, as = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, os = { class: "flex w-full gap-4" }, is = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" }, ls = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, cs = ["innerHTML"], us = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, ds = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, fs = {
1513
+ }, es = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ts = { class: "fm-typo-en-body-lg-600" }, rs = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, ss = { class: "flex flex-col gap-8" }, ns = { class: "flex gap-8 items-center" }, as = { class: "flex-1 fm-typo-en-body-lg-600" }, os = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, is = { class: "flex w-full gap-4" }, ls = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" }, cs = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, us = ["innerHTML"], ds = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, fs = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, ms = {
1498
1514
  key: 0,
1499
1515
  class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1500
- }, ms = { class: "py-8" }, ps = { class: "flex justify-end gap-4 items-center" }, vs = { class: "fm-typo-en-body-lg-600" }, ys = {
1516
+ }, ps = { class: "py-8" }, vs = { class: "flex justify-end gap-4 items-center" }, ys = { class: "fm-typo-en-body-lg-600" }, hs = {
1501
1517
  key: 1,
1502
1518
  class: "flex-1 xs:w-screen xs:max-w-full"
1503
- }, hs = {
1519
+ }, bs = {
1504
1520
  key: 0,
1505
1521
  class: "flex flex-col items-center gap-8 h-full"
1506
- }, bs = ["src"], gs = { class: "fm-typo-en-body-lg-600" }, _s = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, Ss = {
1522
+ }, gs = ["src"], _s = { class: "fm-typo-en-body-lg-600" }, Ss = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, ws = {
1507
1523
  key: 1,
1508
1524
  class: "px-4 flex flex-col"
1509
- }, ws = { class: "flex gap-12 content-stretch" }, Rs = {
1525
+ }, Rs = { class: "flex gap-12 content-stretch" }, Os = {
1510
1526
  class: "flex flex-col w-24",
1511
1527
  name: "circles"
1512
- }, Os = { class: "flex-1 flex flex-col items-center" }, Ns = { class: "flex-1 flex flex-col items-center" }, xs = {
1528
+ }, Ns = { class: "flex-1 flex flex-col items-center" }, xs = { class: "flex-1 flex flex-col items-center" }, ks = {
1513
1529
  class: "py-12 flex flex-col gap-4",
1514
1530
  name: "received-at header"
1515
- }, ks = { class: "fm-typo-en-body-lg-400" }, As = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Cs = { class: "flex gap-12 content-stretch" }, $s = {
1531
+ }, As = { class: "fm-typo-en-body-lg-400" }, Cs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, $s = { class: "flex gap-12 content-stretch" }, Ds = {
1516
1532
  class: "flex flex-col w-24",
1517
1533
  name: "circles"
1518
- }, Ds = { class: "flex-1 flex flex-col items-center" }, qs = {
1534
+ }, qs = { class: "flex-1 flex flex-col items-center" }, Ts = {
1519
1535
  class: "py-12 flex flex-col gap-4 flex-1",
1520
1536
  name: "delivery details"
1521
- }, Ts = { class: "flex flex-col gap-8" }, Ps = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Is = { class: "flex flex-col gap-4" }, Fs = { class: "flex gap-8 xs:flex-col" }, Ys = /* @__PURE__ */ he({
1537
+ }, Ps = { class: "flex flex-col gap-8" }, Is = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Fs = { class: "flex flex-col gap-4" }, Es = { class: "flex gap-8 xs:flex-col" }, Xs = /* @__PURE__ */ he({
1522
1538
  __name: "TransferDetails",
1523
1539
  props: {
1524
1540
  poRequest: {},
@@ -1532,32 +1548,32 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1532
1548
  receivedMap: {}
1533
1549
  },
1534
1550
  emits: ["update:show", "submitted"],
1535
- setup(p, { emit: t }) {
1536
- const a = p, _ = t, c = We(), e = Fe(), u = Te(), i = me(), n = Ie(), h = ee(
1551
+ setup(y, { emit: t }) {
1552
+ const a = y, _ = t, l = Ye(), e = Le(), c = Ie(), i = me(), s = Ee(), v = ee(
1537
1553
  () => {
1538
1554
  var r, f;
1539
1555
  return {
1540
- id: ((r = n.sessionUser.value) == null ? void 0 : r.id) ?? "",
1541
- name: ((f = n.sessionUser.value) == null ? void 0 : f.displayName) ?? ""
1556
+ id: ((r = s.sessionUser.value) == null ? void 0 : r.id) ?? "",
1557
+ name: ((f = s.sessionUser.value) == null ? void 0 : f.displayName) ?? ""
1542
1558
  };
1543
1559
  }
1544
- ), S = zt(), { t: v } = dt(), m = ee(
1560
+ ), b = Gt(), { t: m } = ft(), p = ee(
1545
1561
  () => {
1546
- var r, f, O, C;
1547
- return ((f = (r = a.purchaseOrder) == null ? void 0 : r.supplier) == null ? void 0 : f.internal) === "restaurant" || ((C = (O = a.purchaseOrder) == null ? void 0 : O.supplier) == null ? void 0 : C.internal) === "warehouse" ? ye.TRANSFER : ye.PURCHASE;
1562
+ var r, f, O, $;
1563
+ return ((f = (r = a.purchaseOrder) == null ? void 0 : r.supplier) == null ? void 0 : f.internal) === "restaurant" || (($ = (O = a.purchaseOrder) == null ? void 0 : O.supplier) == null ? void 0 : $.internal) === "warehouse" ? ye.TRANSFER : ye.PURCHASE;
1548
1564
  }
1549
- ), d = G(!1), s = G(""), l = G(!0), b = Ee(), w = Ft(b.getWorkflowConfig), D = mt(), q = ee(() => {
1565
+ ), d = G(!1), n = G(""), u = G(!0), S = Be(), R = Et(S.getWorkflowConfig), D = pt(), q = ee(() => {
1550
1566
  if (!a.purchaseOrder)
1551
1567
  return [];
1552
- const r = w.result.value;
1553
- if (r.state === st.loading)
1568
+ const r = R.result.value;
1569
+ if (r.state === nt.loading)
1554
1570
  return [];
1555
1571
  const f = {
1556
- user: h.value,
1572
+ user: v.value,
1557
1573
  executedAt: i.locations.computeFirst(
1558
- (C) => {
1574
+ ($) => {
1559
1575
  var B;
1560
- return C.dbName === ((B = i._currentLocation) == null ? void 0 : B.dbName) ? C : null;
1576
+ return $.dbName === ((B = i._currentLocation) == null ? void 0 : B.dbName) ? $ : null;
1561
1577
  }
1562
1578
  ),
1563
1579
  purchaseOrderRequest: a.poRequest,
@@ -1565,77 +1581,77 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1565
1581
  };
1566
1582
  let O = [];
1567
1583
  try {
1568
- r.state === st.error ? (console.error("Error fetching workflow config:", r.error), O = Le.getAvailableActions({
1584
+ r.state === nt.error ? (console.error("Error fetching workflow config:", r.error), O = Ve.getAvailableActions({
1569
1585
  ...f,
1570
- orderConfig: Le.getDefaultConfig()
1586
+ orderConfig: Ve.getDefaultConfig()
1571
1587
  }).actions.filter(
1572
- (C) => (
1588
+ ($) => (
1573
1589
  // TODO: create receiveStock & processRequest dialog
1574
1590
  // to create their payload
1575
- C !== x.enum.receiveStock && C !== x.enum.processRequest && C !== x.enum.closeRequest
1591
+ $ !== x.enum.receiveStock && $ !== x.enum.processRequest && $ !== x.enum.closeRequest
1576
1592
  )
1577
- )) : O = Le.getAvailableActions({
1593
+ )) : O = Ve.getAvailableActions({
1578
1594
  ...f,
1579
1595
  orderConfig: r.data
1580
1596
  }).actions.filter(
1581
- (C) => C !== x.enum.receiveStock && C !== x.enum.processRequest && C !== x.enum.closeRequest
1597
+ ($) => $ !== x.enum.receiveStock && $ !== x.enum.processRequest && $ !== x.enum.closeRequest
1582
1598
  );
1583
- } catch (C) {
1584
- console.error("Error getting available actions:", C);
1599
+ } catch ($) {
1600
+ console.error("Error getting available actions:", $);
1585
1601
  }
1586
- return a.scope === "approval" && (O = O.filter((C) => C !== x.enum.completeReceive)), O;
1587
- }), P = At(a, "show"), E = ee(() => [
1602
+ return a.scope === "approval" && (O = O.filter(($) => $ !== x.enum.completeReceive)), O;
1603
+ }), P = Ct(a, "show"), E = ee(() => [
1588
1604
  {
1589
- label: v("inventory.transfer.receiveRequest.details.overview"),
1605
+ label: m("inventory.transfer.receiveRequest.details.overview"),
1590
1606
  value: "overview"
1591
1607
  },
1592
1608
  {
1593
- label: v("inventory.transfer.receiveRequest.details.deliveryHistory"),
1609
+ label: m("inventory.transfer.receiveRequest.details.deliveryHistory"),
1594
1610
  value: "deliveryHistory"
1595
1611
  }
1596
1612
  ]), z = G(E.value[0]);
1597
- Ot(
1613
+ Nt(
1598
1614
  () => a.show,
1599
1615
  (r) => {
1600
1616
  r && (z.value = E.value[0]);
1601
1617
  }
1602
1618
  );
1603
- async function ce(r, f, O, C, B) {
1619
+ async function ce(r, f, O, $, B) {
1604
1620
  return new Promise((H, Q) => {
1605
- c.open({
1621
+ l.open({
1606
1622
  closeButton: !1,
1607
- title: C.title,
1608
- message: C.message,
1609
- primaryActions: C.primaryActions,
1623
+ title: $.title,
1624
+ message: $.message,
1625
+ primaryActions: $.primaryActions,
1610
1626
  secondaryActions: { text: "No", close: !1 }
1611
1627
  }).onPrimary(async () => {
1612
1628
  var V, X, Z, L;
1613
- const y = [];
1614
- O === x.enum.approveRequest ? (y.push({
1629
+ const h = [];
1630
+ O === x.enum.approveRequest ? (h.push({
1615
1631
  action: "approveRequest",
1616
1632
  payload: null
1617
- }), f.fulfillment && y.push({
1633
+ }), f.fulfillment && h.push({
1618
1634
  action: "processRequest",
1619
1635
  payload: {
1620
1636
  fulfillmentId: "",
1621
1637
  deliveryOrderNumber: "",
1622
1638
  deliveryRemark: null,
1623
1639
  items: f.fulfillment.items,
1624
- createdBy: h.value
1640
+ createdBy: v.value
1625
1641
  }
1626
- })) : O === x.enum.processRequest ? f.fulfillment && y.push({
1642
+ })) : O === x.enum.processRequest ? f.fulfillment && h.push({
1627
1643
  action: "processRequest",
1628
1644
  payload: {
1629
1645
  fulfillmentId: "",
1630
1646
  deliveryOrderNumber: "",
1631
1647
  deliveryRemark: null,
1632
1648
  items: f.fulfillment.items,
1633
- createdBy: h.value
1649
+ createdBy: v.value
1634
1650
  }
1635
- }) : O === x.enum.rejectRequest ? y.push({
1651
+ }) : O === x.enum.rejectRequest ? h.push({
1636
1652
  action: "rejectRequest",
1637
1653
  payload: null
1638
- }) : O === x.enum.closeRequest && y.push({
1654
+ }) : O === x.enum.closeRequest && h.push({
1639
1655
  action: "closeRequest",
1640
1656
  payload: null
1641
1657
  });
@@ -1650,61 +1666,61 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1650
1666
  _id: ((V = a.purchaseOrder) == null ? void 0 : V._id) ?? "",
1651
1667
  _rev: ((X = a.purchaseOrder) == null ? void 0 : X._rev) ?? "",
1652
1668
  action: O,
1653
- payloads: y
1669
+ payloads: h
1654
1670
  // add payload if action is receiveStock or processRequest
1655
1671
  },
1656
1672
  transferTo: (L = (Z = a.poRequest) == null ? void 0 : Z.to) == null ? void 0 : L.dbName
1657
1673
  }).delayed(1e3), H("submitted");
1658
- } catch (re) {
1659
- Q(re);
1674
+ } catch (se) {
1675
+ Q(se);
1660
1676
  }
1661
1677
  }).onSecondary(() => {
1662
1678
  H("cancelled");
1663
- for (let y = 0; y < B + 2; y++)
1664
- c.close();
1679
+ for (let h = 0; h < B + 2; h++)
1680
+ l.close();
1665
1681
  }).onClose(() => {
1666
1682
  });
1667
1683
  });
1668
1684
  }
1669
1685
  async function le(r) {
1670
- var B, H, Q, y;
1686
+ var B, H, Q, h;
1671
1687
  if (r === x.enum.receiveStock)
1672
1688
  return;
1673
- const f = ft[r];
1689
+ const f = mt[r];
1674
1690
  if (!f) {
1675
1691
  e.open({
1676
1692
  title: "Something went wrong",
1677
- message: `Cannot process order: ${He(r)}`,
1693
+ message: `Cannot process order: ${We(r)}`,
1678
1694
  type: "error"
1679
1695
  });
1680
1696
  return;
1681
1697
  }
1682
- const { successMessage: O, ...C } = f;
1698
+ const { successMessage: O, ...$ } = f;
1683
1699
  if (a.purchaseOrder) {
1684
- s.value = `${r}`, d.value = !0, l.value = !1;
1700
+ n.value = `${r}`, d.value = !0, u.value = !1;
1685
1701
  const V = {};
1686
1702
  let X = 0;
1687
1703
  if ((r === x.enum.confirmDraft || // auto receive for warehouse to warehouse
1688
- r === x.enum.completeReceive) && u.autoReceiveWarehouse)
1704
+ r === x.enum.completeReceive) && c.autoReceiveWarehouse)
1689
1705
  V.autoReceive = !0;
1690
- else if ((r === x.enum.approveRequest || r === x.enum.processRequest) && u.acceptRequireFulfillment) {
1691
- const Z = (H = (B = a.poRequest) == null ? void 0 : B.from) == null ? void 0 : H.dbName, L = (y = (Q = a.poRequest) == null ? void 0 : Q.to) == null ? void 0 : y.dbName;
1706
+ else if ((r === x.enum.approveRequest || r === x.enum.processRequest) && c.acceptRequireFulfillment) {
1707
+ const Z = (H = (B = a.poRequest) == null ? void 0 : B.from) == null ? void 0 : H.dbName, L = (h = (Q = a.poRequest) == null ? void 0 : Q.to) == null ? void 0 : h.dbName;
1692
1708
  if (Z && L && (Z.startsWith("warehouse_") || L.startsWith("warehouse_"))) {
1693
- const re = await new Promise((K, de) => {
1694
- c.open({
1709
+ const se = await new Promise((K, de) => {
1710
+ l.open({
1695
1711
  closeButton: !1,
1696
1712
  title: "Confirm transfer amount",
1697
- dialogComponent: jt,
1713
+ dialogComponent: zt,
1698
1714
  dialogComponentProps: {
1699
1715
  purchaseOrder: a.purchaseOrder,
1700
1716
  confirm: K,
1701
1717
  "onUpdate:show": (pe) => {
1702
- pe || (s.value = "", d.value = !1, l.value = !0, X++, c.close()), de("cancelled");
1718
+ pe || (n.value = "", d.value = !1, u.value = !0, X++, l.close()), de("cancelled");
1703
1719
  }
1704
1720
  }
1705
1721
  });
1706
1722
  });
1707
- V.fulfillment = re;
1723
+ V.fulfillment = se;
1708
1724
  }
1709
1725
  }
1710
1726
  try {
@@ -1726,134 +1742,134 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1726
1742
  type: "error"
1727
1743
  }), console.error("Error when submitting PO operation", r, a.purchaseOrder, Z);
1728
1744
  } finally {
1729
- s.value = "", d.value = !1, l.value = !0;
1745
+ n.value = "", d.value = !1, u.value = !0;
1730
1746
  }
1731
1747
  }
1732
1748
  }
1733
1749
  const be = ee(() => {
1734
1750
  var r, f;
1735
1751
  return ((r = a.purchaseOrder) == null ? void 0 : r.status) === M.enum.RECEIVING || ((f = a.purchaseOrder) == null ? void 0 : f.status) === M.enum.COMPLETE;
1736
- }), Ne = ee(() => {
1752
+ }), xe = ee(() => {
1737
1753
  const r = a.purchaseOrder;
1738
1754
  if (!r) return { status: "", statusClass: "" };
1739
- const f = De(r), { partial: O, over: C } = je(f), B = ze(r.status, O, C);
1740
- let H = v(`inventory.transfer.status.${B}`), Q = `${r.status}`.toLocaleLowerCase("en-us");
1741
- return B === M.enum.CLOSE && (H = `${v(`inventory.transfer.status.${M.enum.COMPLETE}`)}`), B === "PARTIAL_RECEIVED" && Q === M.enum.PROCESSING.toLocaleLowerCase("en-us") && (Q = M.enum.RECEIVING.toLocaleLowerCase("en-us")), {
1755
+ const f = Te(r), { partial: O, over: $ } = ze(f), B = Ge(r.status, O, $);
1756
+ let H = m(`inventory.transfer.status.${B}`), Q = `${r.status}`.toLocaleLowerCase("en-us");
1757
+ return B === M.enum.CLOSE && (H = `${m(`inventory.transfer.status.${M.enum.COMPLETE}`)}`), B === "PARTIAL_RECEIVED" && Q === M.enum.PROCESSING.toLocaleLowerCase("en-us") && (Q = M.enum.RECEIVING.toLocaleLowerCase("en-us")), {
1742
1758
  status: H,
1743
1759
  statusClass: `fm-status-badge fm-status-badge-${Q}`
1744
1760
  };
1745
1761
  }), ue = ee(() => {
1746
1762
  var H, Q;
1747
1763
  const r = ((H = a.purchaseOrder) == null ? void 0 : H.deliveryOrder) ?? [], f = ((Q = a.purchaseOrder) == null ? void 0 : Q.deliveryFullfillment) ?? [], O = [
1748
- ...r.map((y) => ({
1749
- createdAt: y.createdAt,
1764
+ ...r.map((h) => ({
1765
+ createdAt: h.createdAt,
1750
1766
  type: "grn",
1751
- doc: y
1767
+ doc: h
1752
1768
  })),
1753
- ...f.map((y) => ({
1754
- createdAt: y.createdAt,
1769
+ ...f.map((h) => ({
1770
+ createdAt: h.createdAt,
1755
1771
  type: "fulfillment",
1756
- doc: y
1772
+ doc: h
1757
1773
  }))
1758
1774
  ];
1759
- O.reverse().sort((y, V) => y.createdAt.localeCompare(V.createdAt));
1760
- function C(y) {
1761
- var Z, L, re, K, de, pe, we, Re, j;
1762
- const V = f.findIndex((I) => I.id === y.fullfillmentId), X = [
1775
+ O.reverse().sort((h, V) => h.createdAt.localeCompare(V.createdAt));
1776
+ function $(h) {
1777
+ var Z, L, se, K, de, pe, we, Re, j;
1778
+ const V = f.findIndex((F) => F.id === h.fullfillmentId), X = [
1763
1779
  (L = (Z = f[V]) == null ? void 0 : Z.netSuite) != null && L.refNo ? {
1764
1780
  label: "Fulfillment's ref no. (Netsuite)",
1765
- values: [(K = (re = f[V]) == null ? void 0 : re.netSuite) == null ? void 0 : K.refNo]
1781
+ values: [(K = (se = f[V]) == null ? void 0 : se.netSuite) == null ? void 0 : K.refNo]
1766
1782
  } : null,
1767
- (de = y == null ? void 0 : y.netSuite) != null && de.refNo ? {
1783
+ (de = h == null ? void 0 : h.netSuite) != null && de.refNo ? {
1768
1784
  label: "Netsuite ref no.",
1769
- values: [(pe = y == null ? void 0 : y.netSuite) == null ? void 0 : pe.refNo]
1785
+ values: [(pe = h == null ? void 0 : h.netSuite) == null ? void 0 : pe.refNo]
1770
1786
  } : null,
1771
- (we = y == null ? void 0 : y.netSuite) != null && we.recordType ? {
1787
+ (we = h == null ? void 0 : h.netSuite) != null && we.recordType ? {
1772
1788
  label: "Netsuite Type",
1773
- values: [lt((Re = y == null ? void 0 : y.netSuite) == null ? void 0 : Re.recordType)]
1789
+ values: [ct((Re = h == null ? void 0 : h.netSuite) == null ? void 0 : Re.recordType)]
1774
1790
  } : null
1775
1791
  ];
1776
1792
  return {
1777
1793
  header: "Received",
1778
- date: Be(new Date(y.createdAt)),
1794
+ date: Ue(new Date(h.createdAt)),
1779
1795
  info: [
1780
1796
  {
1781
1797
  label: "Adjustment date",
1782
1798
  values: [
1783
- y.adjustment ? Be(new Date(St(y.adjustment))) : "-"
1799
+ h.adjustment ? Ue(new Date(wt(h.adjustment))) : "-"
1784
1800
  ]
1785
1801
  },
1786
1802
  {
1787
1803
  label: "Received by",
1788
- values: [(j = y.createdBy) == null ? void 0 : j.name]
1804
+ values: [(j = h.createdBy) == null ? void 0 : j.name]
1789
1805
  },
1790
1806
  {
1791
1807
  label: "Received items",
1792
- values: y.received.map((I) => {
1808
+ values: h.received.map((F) => {
1793
1809
  var J;
1794
- return $("div", [
1795
- $(
1810
+ return C("div", [
1811
+ C(
1796
1812
  "div",
1797
1813
  {
1798
1814
  class: "flex gap-4"
1799
1815
  },
1800
1816
  [
1801
- $(
1817
+ C(
1802
1818
  "div",
1803
1819
  {
1804
1820
  class: "flex flex-col"
1805
1821
  },
1806
1822
  [
1807
- $(
1823
+ C(
1808
1824
  "span",
1809
1825
  {
1810
1826
  class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
1811
1827
  },
1812
- `${I.sku.name}`
1828
+ `${F.sku.name}`
1813
1829
  ),
1814
- $(
1830
+ C(
1815
1831
  "span",
1816
1832
  {
1817
1833
  class: "fm-typo-en-body-md-400"
1818
1834
  },
1819
- `${I.sku.code} `
1835
+ `${F.sku.code} `
1820
1836
  )
1821
1837
  ]
1822
1838
  ),
1823
- $(
1839
+ C(
1824
1840
  "div",
1825
1841
  {
1826
1842
  class: "ml-auto flex flex-col"
1827
1843
  },
1828
1844
  [
1829
- $(
1845
+ C(
1830
1846
  "div",
1831
1847
  {
1832
1848
  class: "ml-auto flex gap-1"
1833
1849
  },
1834
1850
  [
1835
- $(
1851
+ C(
1836
1852
  "span",
1837
1853
  {
1838
1854
  class: "fm-typo-en-body-lg-600 self-end"
1839
1855
  },
1840
- fe(I.amount, !1)
1856
+ fe(F.amount, !1)
1841
1857
  ),
1842
- $(
1858
+ C(
1843
1859
  "span",
1844
1860
  {
1845
1861
  class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1846
1862
  },
1847
- ((J = I.measurement) == null ? void 0 : J.abbrev) ?? I.sku.unit.abbrev
1863
+ ((J = F.measurement) == null ? void 0 : J.abbrev) ?? F.sku.unit.abbrev
1848
1864
  )
1849
1865
  ]
1850
1866
  ),
1851
- $(
1867
+ C(
1852
1868
  "div",
1853
1869
  {
1854
1870
  class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
1855
1871
  },
1856
- `${I.cost ? `(${ke(I.cost)})` : ""}`
1872
+ `${F.cost ? `(${Ae(F.cost)})` : ""}`
1857
1873
  )
1858
1874
  ]
1859
1875
  )
@@ -1862,28 +1878,28 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1862
1878
  ]);
1863
1879
  })
1864
1880
  },
1865
- y.deliveryOrderNumber ? {
1881
+ h.deliveryOrderNumber ? {
1866
1882
  label: "Delivery order no.",
1867
- values: [y.deliveryOrderNumber]
1883
+ values: [h.deliveryOrderNumber]
1868
1884
  } : null,
1869
- y.remark ? {
1885
+ h.remark ? {
1870
1886
  label: "Remark",
1871
- values: [y.remark]
1887
+ values: [h.remark]
1872
1888
  } : null,
1873
1889
  V > -1 ? {
1874
1890
  label: "Fulfilment's sequence",
1875
1891
  values: [`${V + 1}`]
1876
1892
  } : null,
1877
1893
  ...X
1878
- ].filter((I) => I)
1894
+ ].filter((F) => F)
1879
1895
  };
1880
1896
  }
1881
- function B(y) {
1897
+ function B(h) {
1882
1898
  var X, Z;
1883
- const V = f.findIndex((L) => L.id === y.id);
1899
+ const V = f.findIndex((L) => L.id === h.id);
1884
1900
  return {
1885
1901
  header: "Fulfillment",
1886
- date: Be(new Date(y.createdAt)),
1902
+ date: Ue(new Date(h.createdAt)),
1887
1903
  info: [
1888
1904
  {
1889
1905
  label: "Sequence",
@@ -1891,29 +1907,29 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1891
1907
  },
1892
1908
  {
1893
1909
  label: "Receiveable items",
1894
- values: y.items.map((L) => {
1895
- var re;
1896
- return $("div", [
1897
- $(
1910
+ values: h.items.map((L) => {
1911
+ var se;
1912
+ return C("div", [
1913
+ C(
1898
1914
  "div",
1899
1915
  {
1900
1916
  class: "flex gap-4"
1901
1917
  },
1902
1918
  [
1903
- $(
1919
+ C(
1904
1920
  "div",
1905
1921
  {
1906
1922
  class: "flex flex-col"
1907
1923
  },
1908
1924
  [
1909
- $(
1925
+ C(
1910
1926
  "span",
1911
1927
  {
1912
1928
  class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
1913
1929
  },
1914
1930
  `${L.sku.name}`
1915
1931
  ),
1916
- $(
1932
+ C(
1917
1933
  "span",
1918
1934
  {
1919
1935
  class: "fm-typo-en-body-md-400"
@@ -1922,40 +1938,40 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1922
1938
  )
1923
1939
  ]
1924
1940
  ),
1925
- $(
1941
+ C(
1926
1942
  "div",
1927
1943
  {
1928
1944
  class: "ml-auto flex flex-col"
1929
1945
  },
1930
1946
  [
1931
- $(
1947
+ C(
1932
1948
  "div",
1933
1949
  {
1934
1950
  class: "ml-auto flex gap-1"
1935
1951
  },
1936
1952
  [
1937
- $(
1953
+ C(
1938
1954
  "span",
1939
1955
  {
1940
1956
  class: "fm-typo-en-body-lg-600 self-end"
1941
1957
  },
1942
1958
  fe(L.amount, !1)
1943
1959
  ),
1944
- $(
1960
+ C(
1945
1961
  "span",
1946
1962
  {
1947
1963
  class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1948
1964
  },
1949
- ((re = L.measurement) == null ? void 0 : re.abbrev) ?? L.sku.unit.abbrev
1965
+ ((se = L.measurement) == null ? void 0 : se.abbrev) ?? L.sku.unit.abbrev
1950
1966
  )
1951
1967
  ]
1952
1968
  ),
1953
- $(
1969
+ C(
1954
1970
  "div",
1955
1971
  {
1956
1972
  class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
1957
1973
  },
1958
- `${L.cost ? `(${ke(L.cost)})` : ""}`
1974
+ `${L.cost ? `(${Ae(L.cost)})` : ""}`
1959
1975
  )
1960
1976
  ]
1961
1977
  )
@@ -1964,117 +1980,127 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
1964
1980
  ]);
1965
1981
  })
1966
1982
  },
1967
- (X = y.netSuite) != null && X.refNo ? {
1983
+ (X = h.netSuite) != null && X.refNo ? {
1968
1984
  label: "Ref no. (Netsuite)",
1969
- values: [(Z = y.netSuite) == null ? void 0 : Z.refNo]
1985
+ values: [(Z = h.netSuite) == null ? void 0 : Z.refNo]
1970
1986
  } : null
1971
1987
  ].filter((L) => L)
1972
1988
  };
1973
1989
  }
1974
- return O.map((y) => {
1975
- switch (y.type) {
1990
+ return O.map((h) => {
1991
+ switch (h.type) {
1976
1992
  case "grn":
1977
- return C(y.doc);
1993
+ return $(h.doc);
1978
1994
  case "fulfillment":
1979
- return B(y.doc);
1995
+ return B(h.doc);
1980
1996
  }
1981
1997
  });
1982
1998
  }), A = ee(() => {
1983
1999
  var f;
1984
2000
  const r = {
1985
- ...ot(0),
1986
- currency: rt()
2001
+ ...it(0),
2002
+ currency: st()
1987
2003
  };
1988
- return ((f = a.purchaseOrder) == null ? void 0 : f.items.reduce((O, C) => ({
1989
- ...at(O, C.totalCost ?? r),
1990
- currency: rt()
2004
+ return ((f = a.purchaseOrder) == null ? void 0 : f.items.reduce((O, $) => ({
2005
+ ...ot(O, $.totalCost ?? r),
2006
+ currency: st()
1991
2007
  }), r)) ?? r;
1992
2008
  });
1993
2009
  function T(r) {
1994
2010
  var H;
1995
- const O = (((H = a.purchaseOrder) == null ? void 0 : H.version) ?? Ae.enum[1]) === Ae.enum[2] ? r.id : r.sku._id, C = a.receivedMap[O];
1996
- return `<span class="${Y(r)} fm-typo-en-body-lg-600">${wt.toFormatString({ value: C.received })}</span>/${Dt(r.quantity, r.sku.unit, r.measurement)}`;
2011
+ const O = (((H = a.purchaseOrder) == null ? void 0 : H.version) ?? Ce.enum[1]) === Ce.enum[2] ? r.id : r.sku._id, $ = a.receivedMap[O];
2012
+ return `<span class="${Y(r)} fm-typo-en-body-lg-600">${Rt.toFormatString({ value: $.received })}</span>/${qt(r.quantity, r.sku.unit, r.measurement)}`;
1997
2013
  }
1998
2014
  function Y(r) {
1999
2015
  var V;
2000
- const O = (((V = a.purchaseOrder) == null ? void 0 : V.version) ?? Ae.enum[1]) === Ae.enum[2] ? r.id : r.sku._id, C = a.receivedMap[O], { isPartialReceive: B, isNoReceive: H, isOverReceive: Q, isFullReceive: y } = Lt(C);
2001
- return H ? "text-fm-color-typo-tertiary" : B ? "text-fm-color-system-warning-300" : Q ? "text-fm-color-system-error-300" : y ? "text-fm-color-system-success-300" : "";
2016
+ const O = (((V = a.purchaseOrder) == null ? void 0 : V.version) ?? Ce.enum[1]) === Ce.enum[2] ? r.id : r.sku._id, $ = a.receivedMap[O], { isPartialReceive: B, isNoReceive: H, isOverReceive: Q, isFullReceive: h } = Bt($);
2017
+ return H ? "text-fm-color-typo-tertiary" : B ? "text-fm-color-system-warning-300" : Q ? "text-fm-color-system-error-300" : h ? "text-fm-color-system-success-300" : "";
2002
2018
  }
2003
2019
  return (r, f) => {
2004
- var L, re;
2005
- const O = W("FmButtonGroup"), C = W("FmChip"), B = W("FmMenuDivider"), H = W("FmCard"), Q = W("FmIcon"), y = W("FmTooltip"), V = W("FmSpacer"), X = W("FmButton"), Z = W("FmSideSheet");
2020
+ var L, se;
2021
+ const O = W("FmButtonGroup"), $ = W("FmChip"), B = W("FmMenuDivider"), H = W("FmCard"), Q = W("FmIcon"), h = W("FmTooltip"), V = W("FmSpacer"), X = W("FmButton"), Z = W("FmSideSheet");
2006
2022
  return g(), ie(Z, {
2007
- header: R(v)("inventory.transfer.receiveRequest.details.title") + ((L = r.purchaseOrder) != null && L.seqNumber ? ` #${(re = r.purchaseOrder) == null ? void 0 : re.seqNumber}` : ""),
2008
- modelValue: R(P),
2009
- "onUpdate:modelValue": f[5] || (f[5] = (K) => Nt(P) ? P.value = K : null),
2010
- "dismiss-away": l.value,
2023
+ header: w(m)("inventory.transfer.receiveRequest.details.title") + ((L = r.purchaseOrder) != null && L.seqNumber ? ` #${(se = r.purchaseOrder) == null ? void 0 : se.seqNumber}` : ""),
2024
+ modelValue: w(P),
2025
+ "onUpdate:modelValue": f[5] || (f[5] = (K) => xt(P) ? P.value = K : null),
2026
+ "dismiss-away": u.value,
2011
2027
  "close-button": "",
2012
2028
  "max-width": 600
2013
2029
  }, {
2014
- default: oe(() => {
2030
+ default: re(() => {
2015
2031
  var K, de, pe, we, Re;
2016
2032
  return [
2017
- o("div", kr, [
2033
+ o("div", Ar, [
2018
2034
  o("div", null, [
2019
- F(O, {
2035
+ I(O, {
2020
2036
  items: E.value,
2021
2037
  modelValue: z.value,
2022
2038
  "onUpdate:modelValue": f[0] || (f[0] = (j) => z.value = j)
2023
2039
  }, null, 8, ["items", "modelValue"])
2024
2040
  ]),
2025
- z.value.value === "overview" ? (g(), N(ne, { key: 0 }, [
2041
+ z.value.value === "overview" ? (g(), N(ae, { key: 0 }, [
2026
2042
  o("div", null, [
2027
- F(H, {
2043
+ I(H, {
2028
2044
  variant: "outlined",
2029
2045
  class: "flex flex-col gap-8 px-12 py-16"
2030
2046
  }, {
2031
- default: oe(() => {
2032
- var j, I, J, ge, _e, xe, Ye, Qe, Xe, Ze, Je;
2047
+ default: re(() => {
2048
+ var j, F, J, ge, _e, ke, Qe, Xe, Ze, Je;
2033
2049
  return [
2034
- o("div", Ar, [
2035
- o("div", Cr, k(R(v)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
2036
- o("div", $r, [
2037
- (j = R(n).sessionUser.value) != null && j.role.isAdmin ? (g(), N("div", Dr, k((I = a.purchaseOrder) == null ? void 0 : I.status) + " (Admin) ", 1)) : U("", !0),
2038
- F(C, {
2039
- label: Ne.value.status,
2040
- class: Ce(Ne.value.statusClass),
2050
+ o("div", Cr, [
2051
+ o("div", $r, k(w(m)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
2052
+ o("div", Dr, [
2053
+ (j = w(s).sessionUser.value) != null && j.role.isAdmin ? (g(), N("div", qr, [
2054
+ I(Ne, null, {
2055
+ default: re(() => {
2056
+ var et;
2057
+ return [
2058
+ $e(k((et = a.purchaseOrder) == null ? void 0 : et.status), 1)
2059
+ ];
2060
+ }),
2061
+ _: 1
2062
+ })
2063
+ ])) : U("", !0),
2064
+ I($, {
2065
+ label: xe.value.status,
2066
+ class: De(xe.value.statusClass),
2041
2067
  compact: ""
2042
2068
  }, null, 8, ["label", "class"])
2043
2069
  ])
2044
2070
  ]),
2045
- F(B),
2046
- o("div", qr, [
2047
- o("div", Tr, [
2048
- o("div", Pr, [
2049
- o("div", Ir, k(R(v)("inventory.transfer.receiveRequest.details.createdAt")), 1)
2071
+ I(B),
2072
+ o("div", Tr, [
2073
+ o("div", Pr, [
2074
+ o("div", Ir, [
2075
+ o("div", Fr, k(w(m)("inventory.transfer.receiveRequest.details.createdAt")), 1)
2050
2076
  ]),
2051
- o("div", Fr, k(R($e)(((J = r.purchaseOrder) == null ? void 0 : J._id) ?? "")), 1)
2077
+ o("div", Er, k(w(qe)(((F = r.purchaseOrder) == null ? void 0 : F._id) ?? "")), 1)
2052
2078
  ]),
2053
- (ge = r.purchaseOrder) != null && ge.effectiveAt ? (g(), N("div", Er, [
2054
- o("div", Lr, k(R(v)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
2055
- o("div", Br, k(R(it)(new Date((_e = r.purchaseOrder) == null ? void 0 : _e.effectiveAt))), 1)
2079
+ (J = r.purchaseOrder) != null && J.effectiveAt ? (g(), N("div", Lr, [
2080
+ o("div", Br, k(w(m)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
2081
+ o("div", Vr, k(w(lt)(new Date((ge = r.purchaseOrder) == null ? void 0 : ge.effectiveAt))), 1)
2056
2082
  ])) : U("", !0),
2057
- o("div", Vr, [
2058
- o("div", Ur, k(R(v)("inventory.transfer.receiveRequest.details.type.title")), 1),
2059
- o("div", Mr, k(R(v)(
2060
- `inventory.transfer.receiveRequest.details.type.${m.value.toLocaleLowerCase("en-US")}`
2083
+ o("div", Ur, [
2084
+ o("div", Mr, k(w(m)("inventory.transfer.receiveRequest.details.type.title")), 1),
2085
+ o("div", Kr, k(w(m)(
2086
+ `inventory.transfer.receiveRequest.details.type.${p.value.toLocaleLowerCase("en-US")}`
2061
2087
  )), 1)
2062
2088
  ]),
2063
- (Ye = (xe = r.purchaseOrder) == null ? void 0 : xe.supplier) != null && Ye.name ? (g(), N("div", Kr, [
2064
- o("div", jr, k(R(v)("inventory.transfer.receiveRequest.details.from")), 1),
2065
- o("div", zr, k((Xe = (Qe = r.purchaseOrder) == null ? void 0 : Qe.supplier) == null ? void 0 : Xe.name), 1)
2089
+ (ke = (_e = r.purchaseOrder) == null ? void 0 : _e.supplier) != null && ke.name ? (g(), N("div", jr, [
2090
+ o("div", zr, k(w(m)("inventory.transfer.receiveRequest.details.from")), 1),
2091
+ o("div", Gr, k((Xe = (Qe = r.purchaseOrder) == null ? void 0 : Qe.supplier) == null ? void 0 : Xe.name), 1)
2066
2092
  ])) : U("", !0),
2067
- r.transferTo ? (g(), N("div", Gr, [
2068
- o("div", Hr, k(R(v)("inventory.transfer.receiveRequest.details.to")), 1),
2069
- o("div", Wr, k(r.transferTo), 1)
2093
+ r.transferTo ? (g(), N("div", Hr, [
2094
+ o("div", Wr, k(w(m)("inventory.transfer.receiveRequest.details.to")), 1),
2095
+ o("div", Yr, k(r.transferTo), 1)
2070
2096
  ])) : U("", !0),
2071
- (Ze = r.purchaseOrder) != null && Ze.ref ? (g(), N("div", Yr, [
2072
- o("div", Qr, k(R(v)("inventory.transfer.receiveRequest.details.reference")), 1),
2073
- o("div", Xr, k(r.purchaseOrder.ref), 1)
2097
+ (Ze = r.purchaseOrder) != null && Ze.ref ? (g(), N("div", Qr, [
2098
+ o("div", Xr, k(w(m)("inventory.transfer.receiveRequest.details.reference")), 1),
2099
+ o("div", Zr, k(r.purchaseOrder.ref), 1)
2074
2100
  ])) : U("", !0),
2075
- (Je = r.purchaseOrder) != null && Je.remark ? (g(), N("div", Zr, [
2076
- o("div", Jr, k(R(v)("inventory.transfer.receiveRequest.details.remark")), 1),
2077
- o("div", es, k(r.purchaseOrder.remark), 1)
2101
+ (Je = r.purchaseOrder) != null && Je.remark ? (g(), N("div", Jr, [
2102
+ o("div", es, k(w(m)("inventory.transfer.receiveRequest.details.remark")), 1),
2103
+ o("div", ts, k(r.purchaseOrder.remark), 1)
2078
2104
  ])) : U("", !0)
2079
2105
  ])
2080
2106
  ];
@@ -2082,43 +2108,43 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
2082
2108
  _: 1
2083
2109
  })
2084
2110
  ]),
2085
- F(xr, {
2111
+ I(kr, {
2086
2112
  "po-request": r.poRequest,
2087
2113
  purchaseOrder: r.purchaseOrder,
2088
- transferType: m.value,
2114
+ transferType: p.value,
2089
2115
  transferToDbName: r.transferToDbName,
2090
2116
  scope: r.scope
2091
2117
  }, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
2092
- o("div", ts, [
2093
- o("div", rs, [
2094
- o("div", ss, [
2095
- o("span", ns, [
2096
- Ve(k(be.value ? R(v)("inventory.transfer.receiveRequest.details.receivedItems") : R(v)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
2097
- (de = (K = r.purchaseOrder) == null ? void 0 : K.netSuite) != null && de.missingItems && ((we = (pe = r.purchaseOrder) == null ? void 0 : pe.netSuite) == null ? void 0 : we.missingItems.length) > 0 ? (g(), ie(y, {
2118
+ o("div", rs, [
2119
+ o("div", ss, [
2120
+ o("div", ns, [
2121
+ o("span", as, [
2122
+ $e(k(be.value ? w(m)("inventory.transfer.receiveRequest.details.receivedItems") : w(m)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
2123
+ (de = (K = r.purchaseOrder) == null ? void 0 : K.netSuite) != null && de.missingItems && ((we = (pe = r.purchaseOrder) == null ? void 0 : pe.netSuite) == null ? void 0 : we.missingItems.length) > 0 ? (g(), ie(h, {
2098
2124
  key: 0,
2099
2125
  variant: "rich",
2100
2126
  placement: "top",
2101
2127
  "z-index": 51
2102
2128
  }, {
2103
- content: oe(() => {
2104
- var j, I;
2129
+ content: re(() => {
2130
+ var j, F;
2105
2131
  return [
2106
- o("div", as, [
2107
- (g(!0), N(ne, null, ve((I = (j = r.purchaseOrder) == null ? void 0 : j.netSuite) == null ? void 0 : I.missingItems, (J, ge) => (g(), N("div", {
2132
+ o("div", os, [
2133
+ (g(!0), N(ae, null, ve((F = (j = r.purchaseOrder) == null ? void 0 : j.netSuite) == null ? void 0 : F.missingItems, (J, ge) => (g(), N("div", {
2108
2134
  class: "flex justify-center align-middle",
2109
2135
  key: ge
2110
2136
  }, [
2111
- F(Q, {
2137
+ I(Q, {
2112
2138
  name: "arrow_right",
2113
2139
  size: "sm"
2114
2140
  }),
2115
- Ve(" " + k(`(${J.netSuiteId}) ${J.name}: ${J.reason}`), 1)
2141
+ $e(" " + k(`(${J.netSuiteId}) ${J.name}: ${J.reason}`), 1)
2116
2142
  ]))), 128))
2117
2143
  ])
2118
2144
  ];
2119
2145
  }),
2120
- default: oe(() => [
2121
- F(Q, {
2146
+ default: re(() => [
2147
+ I(Q, {
2122
2148
  name: "error",
2123
2149
  color: "#ff2c2c",
2124
2150
  size: "sm"
@@ -2128,106 +2154,106 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
2128
2154
  })) : U("", !0)
2129
2155
  ])
2130
2156
  ]),
2131
- F(B),
2132
- (g(!0), N(ne, null, ve(((Re = r.purchaseOrder) == null ? void 0 : Re.items) ?? [], (j) => {
2133
- var I;
2157
+ I(B),
2158
+ (g(!0), N(ae, null, ve(((Re = r.purchaseOrder) == null ? void 0 : Re.items) ?? [], (j) => {
2159
+ var F;
2134
2160
  return g(), N("div", {
2135
2161
  key: j.code,
2136
2162
  class: "flex flex-col"
2137
2163
  }, [
2138
- o("div", os, [
2139
- o("div", is, k(j.name), 1),
2140
- o("div", ls, [
2164
+ o("div", is, [
2165
+ o("div", ls, k(j.name), 1),
2166
+ o("div", cs, [
2141
2167
  o("span", {
2142
2168
  innerHTML: T(j)
2143
- }, null, 8, cs)
2169
+ }, null, 8, us)
2144
2170
  ])
2145
2171
  ]),
2146
- o("div", us, [
2147
- o("div", ds, k(j.code), 1),
2148
- (I = j.totalCost) != null && I.amount && R(u).enableTotalCost ? (g(), N("div", fs, " (" + k(R(ke)(j.totalCost)) + ") ", 1)) : U("", !0)
2172
+ o("div", ds, [
2173
+ o("div", fs, k(j.code), 1),
2174
+ (F = j.totalCost) != null && F.amount && w(c).enableTotalCost ? (g(), N("div", ms, " (" + k(w(Ae)(j.totalCost)) + ") ", 1)) : U("", !0)
2149
2175
  ])
2150
2176
  ]);
2151
2177
  }), 128)),
2152
- +R(fe)(A.value) ? (g(), N(ne, { key: 0 }, [
2153
- o("div", ms, [
2154
- F(B)
2155
- ]),
2178
+ +w(fe)(A.value) ? (g(), N(ae, { key: 0 }, [
2156
2179
  o("div", ps, [
2180
+ I(B)
2181
+ ]),
2182
+ o("div", vs, [
2157
2183
  f[6] || (f[6] = o("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
2158
- o("div", vs, k(R(ke)(A.value)), 1)
2184
+ o("div", ys, k(w(Ae)(A.value)), 1)
2159
2185
  ])
2160
2186
  ], 64)) : U("", !0)
2161
2187
  ])
2162
2188
  ])
2163
- ], 64)) : z.value.value === "deliveryHistory" ? (g(), N("div", ys, [
2164
- ue.value.length ? (g(), N("div", Ss, [
2165
- (g(!0), N(ne, null, ve(ue.value, (j, I) => (g(), N(ne, { key: I }, [
2166
- o("div", ws, [
2167
- o("div", Rs, [
2168
- o("div", Os, [
2189
+ ], 64)) : z.value.value === "deliveryHistory" ? (g(), N("div", hs, [
2190
+ ue.value.length ? (g(), N("div", ws, [
2191
+ (g(!0), N(ae, null, ve(ue.value, (j, F) => (g(), N(ae, { key: F }, [
2192
+ o("div", Rs, [
2193
+ o("div", Os, [
2194
+ o("div", Ns, [
2169
2195
  o("div", {
2170
- class: Ce([
2196
+ class: De([
2171
2197
  {
2172
- "bg-fm-color-primary": I !== 0,
2173
- "bg-white": I === 0
2198
+ "bg-fm-color-primary": F !== 0,
2199
+ "bg-white": F === 0
2174
2200
  },
2175
2201
  "w-[2px] h-full"
2176
2202
  ])
2177
2203
  }, null, 2)
2178
2204
  ]),
2179
2205
  f[7] || (f[7] = o("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
2180
- o("div", Ns, [
2206
+ o("div", xs, [
2181
2207
  o("div", {
2182
- class: Ce([
2208
+ class: De([
2183
2209
  {
2184
- "bg-fm-color-primary": I < ue.value.length - 1,
2185
- "bg-white": I >= ue.value.length - 1
2210
+ "bg-fm-color-primary": F < ue.value.length - 1,
2211
+ "bg-white": F >= ue.value.length - 1
2186
2212
  },
2187
2213
  "w-[2px] h-full"
2188
2214
  ])
2189
2215
  }, null, 2)
2190
2216
  ])
2191
2217
  ]),
2192
- o("div", xs, [
2193
- o("div", ks, k(j.header), 1),
2194
- o("div", As, k(j.date), 1)
2218
+ o("div", ks, [
2219
+ o("div", As, k(j.header), 1),
2220
+ o("div", Cs, k(j.date), 1)
2195
2221
  ])
2196
2222
  ]),
2197
- o("div", Cs, [
2198
- o("div", $s, [
2199
- o("div", Ds, [
2223
+ o("div", $s, [
2224
+ o("div", Ds, [
2225
+ o("div", qs, [
2200
2226
  o("div", {
2201
- class: Ce([
2227
+ class: De([
2202
2228
  {
2203
- "bg-fm-color-primary": I < ue.value.length - 1,
2204
- "bg-white": I >= ue.value.length - 1
2229
+ "bg-fm-color-primary": F < ue.value.length - 1,
2230
+ "bg-white": F >= ue.value.length - 1
2205
2231
  },
2206
2232
  "w-[2px] h-full"
2207
2233
  ])
2208
2234
  }, null, 2)
2209
2235
  ])
2210
2236
  ]),
2211
- o("div", qs, [
2212
- F(H, {
2237
+ o("div", Ts, [
2238
+ I(H, {
2213
2239
  variant: "outlined",
2214
2240
  class: "py-12 px-16"
2215
2241
  }, {
2216
- default: oe(() => [
2217
- o("div", Ts, [
2218
- (g(!0), N(ne, null, ve(j.info, (J, ge) => (g(), N("div", {
2242
+ default: re(() => [
2243
+ o("div", Ps, [
2244
+ (g(!0), N(ae, null, ve(j.info, (J, ge) => (g(), N("div", {
2219
2245
  key: ge,
2220
2246
  class: "flex flex-col gap-4"
2221
2247
  }, [
2222
- o("div", Ps, k(J == null ? void 0 : J.label), 1),
2223
- o("div", Is, [
2224
- (g(!0), N(ne, null, ve(J == null ? void 0 : J.values, (_e, xe) => (g(), N("div", {
2225
- key: xe,
2248
+ o("div", Is, k(J == null ? void 0 : J.label), 1),
2249
+ o("div", Fs, [
2250
+ (g(!0), N(ae, null, ve(J == null ? void 0 : J.values, (_e, ke) => (g(), N("div", {
2251
+ key: ke,
2226
2252
  class: "fm-typo-en-body-lg-600"
2227
2253
  }, [
2228
- typeof _e == "string" ? (g(), N(ne, { key: 0 }, [
2229
- Ve(k(_e), 1)
2230
- ], 64)) : (g(), ie(xt(_e), { key: 1 }))
2254
+ typeof _e == "string" ? (g(), N(ae, { key: 0 }, [
2255
+ $e(k(_e), 1)
2256
+ ], 64)) : (g(), ie(kt(_e), { key: 1 }))
2231
2257
  ]))), 128))
2232
2258
  ])
2233
2259
  ]))), 128))
@@ -2238,58 +2264,58 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
2238
2264
  ])
2239
2265
  ])
2240
2266
  ], 64))), 128))
2241
- ])) : (g(), N("div", hs, [
2242
- F(V),
2267
+ ])) : (g(), N("div", bs, [
2268
+ I(V),
2243
2269
  o("div", null, [
2244
2270
  o("img", {
2245
- src: R(qt),
2271
+ src: w(Tt),
2246
2272
  alt: "List is empty"
2247
- }, null, 8, bs)
2273
+ }, null, 8, gs)
2248
2274
  ]),
2249
- o("div", gs, k(R(v)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
2250
- o("div", _s, k(R(v)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
2251
- F(V),
2252
- F(V)
2275
+ o("div", _s, k(w(m)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
2276
+ o("div", Ss, k(w(m)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
2277
+ I(V),
2278
+ I(V)
2253
2279
  ]))
2254
2280
  ])) : U("", !0)
2255
2281
  ])
2256
2282
  ];
2257
2283
  }),
2258
- "side-sheet-footer": oe(() => [
2259
- o("div", Fs, [
2260
- (g(!0), N(ne, null, ve(q.value, (K) => (g(), N(ne, null, [
2261
- R(Me)[K].available != !1 ? (g(), ie(X, {
2284
+ "side-sheet-footer": re(() => [
2285
+ o("div", Es, [
2286
+ (g(!0), N(ae, null, ve(q.value, (K) => (g(), N(ae, null, [
2287
+ w(Ke)[K].available != !1 ? (g(), ie(X, {
2262
2288
  key: K,
2263
- label: R(v)(R(Me)[K].translationKey),
2289
+ label: w(m)(w(Ke)[K].translationKey),
2264
2290
  onClick: (de) => le(K),
2265
- loading: s.value === K,
2266
- disabled: s.value !== K && d.value,
2267
- variant: R(Me)[K].buttonVariant
2291
+ loading: n.value === K,
2292
+ disabled: n.value !== K && d.value,
2293
+ variant: w(Ke)[K].buttonVariant
2268
2294
  }, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : U("", !0)
2269
2295
  ], 64))), 256)),
2270
- R(S).ableToMarkReceived(r.purchaseOrder) && !q.value.includes("completeReceive") ? (g(), ie(X, {
2296
+ w(b).ableToMarkReceived(r.purchaseOrder) && !q.value.includes("completeReceive") ? (g(), ie(X, {
2271
2297
  key: 0,
2272
- label: R(v)("inventory.transfer.receiveRequest.actions.completeReceive"),
2298
+ label: w(m)("inventory.transfer.receiveRequest.actions.completeReceive"),
2273
2299
  onClick: f[1] || (f[1] = (K) => le("completeReceive")),
2274
- loading: s.value === "completeReceive",
2275
- disabled: s.value !== "completeReceive" && d.value
2300
+ loading: n.value === "completeReceive",
2301
+ disabled: n.value !== "completeReceive" && d.value
2276
2302
  }, null, 8, ["label", "loading", "disabled"])) : U("", !0),
2277
- R(S).ableToMarkApproved(r.purchaseOrder) && r.canApprove && !q.value.includes("approveRequest") ? (g(), ie(X, {
2303
+ w(b).ableToMarkApproved(r.purchaseOrder) && r.canApprove && !q.value.includes("approveRequest") ? (g(), ie(X, {
2278
2304
  key: 1,
2279
- label: R(v)("inventory.transfer.approval.actions.approveRequest"),
2305
+ label: w(m)("inventory.transfer.approval.actions.approveRequest"),
2280
2306
  onClick: f[2] || (f[2] = (K) => le("approveRequest")),
2281
- loading: s.value === "approveRequest",
2282
- disabled: s.value !== "approveRequest" && d.value
2307
+ loading: n.value === "approveRequest",
2308
+ disabled: n.value !== "approveRequest" && d.value
2283
2309
  }, null, 8, ["label", "loading", "disabled"])) : U("", !0),
2284
- R(S).ableToCreateFulfillment(r.purchaseOrder, r.poRequest) && a.scope === "approval" ? (g(), ie(X, {
2310
+ w(b).ableToCreateFulfillment(r.purchaseOrder, r.poRequest) && a.scope === "approval" ? (g(), ie(X, {
2285
2311
  key: 2,
2286
- label: R(v)("inventory.transfer.receiveRequest.actions.processRequest"),
2312
+ label: w(m)("inventory.transfer.receiveRequest.actions.processRequest"),
2287
2313
  onClick: f[3] || (f[3] = (K) => le("processRequest")),
2288
- loading: s.value === "processRequest",
2289
- disabled: s.value !== "processRequest" && d.value
2314
+ loading: n.value === "processRequest",
2315
+ disabled: n.value !== "processRequest" && d.value
2290
2316
  }, null, 8, ["label", "loading", "disabled"])) : U("", !0),
2291
- F(X, {
2292
- label: R(v)("common.close"),
2317
+ I(X, {
2318
+ label: w(m)("common.close"),
2293
2319
  variant: "tertiary",
2294
2320
  onClick: f[4] || (f[4] = (K) => _("update:show", !1))
2295
2321
  }, null, 8, ["label"])
@@ -2301,10 +2327,10 @@ const Gt = { class: "flex flex-row-reverse" }, Ht = /* @__PURE__ */ he({
2301
2327
  }
2302
2328
  });
2303
2329
  export {
2304
- Ge as P,
2305
- Ys as _,
2306
- Hs as a,
2307
- Ws as b,
2308
- Bt as g,
2309
- Ee as u
2330
+ He as P,
2331
+ Xs as _,
2332
+ Ys as a,
2333
+ Qs as b,
2334
+ Vt as g,
2335
+ Be as u
2310
2336
  };