@feedmepos/mf-inventory-portal 0.0.25-dev.32 → 0.0.25-dev.33

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 (44) hide show
  1. package/dist/{App-5mHsEh9k.js → App-BHIdSSIe.js} +2 -2
  2. package/dist/{ApprovalView-8j418xsu.js → ApprovalView-BHsPq9fp.js} +2 -2
  3. package/dist/{BindingsDialog-mI12JwDT.js → BindingsDialog-CcA_m9fC.js} +2 -2
  4. package/dist/{BindingsPicker-BiWsFvJ9.js → BindingsPicker-UttPVr0V.js} +1 -1
  5. package/dist/{BindingsTable-D0gpm1wp.js → BindingsTable-CQKt-n8j.js} +1 -1
  6. package/dist/{ClosingDraftView-CDw4t1Ry.js → ClosingDraftView-tYyeEBsI.js} +2 -2
  7. package/dist/{ClosingTemplateView-BVT7uVSl.js → ClosingTemplateView-CjFaTKSv.js} +2 -2
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-5lfzdCEF.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B544ZjAk.js} +3 -3
  9. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BiH1i5IX.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D6LxuLjN.js} +1 -1
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BZ5jhZJ3.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-hU74c6gB.js} +1 -1
  11. package/dist/{IngredientGroupView-CuOJ-lgG.js → IngredientGroupView-CjMBtQnL.js} +1 -1
  12. package/dist/{IngredientsView-DQxuOeeA.js → IngredientsView-Dr6lDeAa.js} +4 -4
  13. package/dist/{IntegrationView-dTWQ7Y0L.js → IntegrationView-ltFLmByt.js} +1 -1
  14. package/dist/{InventoryBindingForm-BqbgCls7.js → InventoryBindingForm-BVtDX2SX.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DNzrrq37.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CUykd8am.js} +3 -3
  16. package/dist/{InventoryBindingSummary-D9JS8cpw.js → InventoryBindingSummary-CvzXOSPU.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-vCMIiBLz.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DNs_wg0e.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Dseg75Hj.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BCwv6pd5.js} +1 -1
  19. package/dist/{PublishView-Pioi-3PK.js → PublishView-Cq_ylGgc.js} +2 -2
  20. package/dist/{PurchaseOrderPrintPreview-C06cZQBi.js → PurchaseOrderPrintPreview-CYCmhU-e.js} +1 -1
  21. package/dist/{ReceiveRequestView-0LIDAdE4.js → ReceiveRequestView-LnqepR2e.js} +9 -9
  22. package/dist/{RecipeView-dvtN4dem.js → RecipeView-CMs6Qt9A.js} +3 -3
  23. package/dist/{StockView-LWjH0TiO.js → StockView-e-PcQAKr.js} +7 -7
  24. package/dist/{SupplierView-By5AlMwB.js → SupplierView-CeXmu4st.js} +4 -4
  25. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BtdKFA4E.js → TransferDetails.vue_vue_type_script_setup_true_lang-DW_wzTB0.js} +557 -546
  26. package/dist/{TransferTemplateView-GfTDTpDz.js → TransferTemplateView-_jXDAlSR.js} +7 -7
  27. package/dist/{UnitView-B_C9Hrmw.js → UnitView-CYqpDvJJ.js} +3 -3
  28. package/dist/{WarehouseView-CGIrHlmN.js → WarehouseView-Ce8XkGoe.js} +1 -1
  29. package/dist/api/purchase-order.d.ts +4 -1
  30. package/dist/{app-PUG_dqk9.js → app-mT4U5kNO.js} +10 -10
  31. package/dist/app.js +1 -1
  32. package/dist/{decimal-BYRcDs02.js → decimal-B7ZVTj3Q.js} +1 -1
  33. package/dist/{feature-CXJupSqw.js → feature-BdqR6_vW.js} +1 -1
  34. package/dist/{format-unit-display-uZsyeofT.js → format-unit-display-DgTlT1cC.js} +2 -2
  35. package/dist/{index-BMnRochi.js → index-BO9UatRG.js} +2 -2
  36. package/dist/{stock-CvA-l-yz.js → stock-CtxeFyYM.js} +1 -1
  37. package/dist/{supplier-E13yRo0f.js → supplier-Bz2bTujX.js} +1 -1
  38. package/dist/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/{use-ingredient-select-dialog-C57l6NFB.js → use-ingredient-select-dialog-q3WmGGOm.js} +1 -1
  40. package/dist/{use-inventory-binding-dialog-drEXHE4h.js → use-inventory-binding-dialog-D246fGyU.js} +1 -1
  41. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +187 -2
  42. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +4 -3
  43. package/dist/{vue-i18n-C1ehwhFs.js → vue-i18n-iWMdXkLq.js} +261 -261
  44. package/package.json +3 -3
@@ -1,54 +1,54 @@
1
- import { W as it, u as Pe, aL as k, a5 as ct, a7 as ut, a8 as dt, am as ft, d as Be, e as tt, av as j, T as st, aM as mt, Y as Ke, K as qe, i as Oe, aN as rt, ac as Ee, f as Je, D as ee, h as Q, b as ze, a6 as pt, as as Ze, a0 as $e, ai as Me, aw as vt } from "./app-PUG_dqk9.js";
2
- import { ref as K, computed as X, h as N, defineComponent as Qe, onMounted as yt, unref as o, openBlock as c, createElementBlock as _, createElementVNode as e, toDisplayString as m, createCommentVNode as D, resolveComponent as ue, createVNode as B, watch as ht, createBlock as te, isRef as gt, withCtx as _e, Fragment as se, normalizeClass as ge, createTextVNode as je, renderList as Se, resolveDynamicComponent as bt } from "vue";
1
+ import { W as it, u as Pe, aL as R, a5 as ct, a7 as ut, a8 as dt, am as ft, d as Be, e as tt, av as j, T as st, aM as mt, Y as Ke, K as qe, i as Oe, aN as rt, ac as Ee, f as Je, D as te, h as Q, b as ze, a6 as pt, as as Ze, a0 as $e, ai as Me, aw as vt } from "./app-mT4U5kNO.js";
2
+ import { ref as K, computed as X, h as N, defineComponent as Qe, onMounted as yt, unref as n, openBlock as c, createElementBlock as _, createElementVNode as e, toDisplayString as m, createCommentVNode as D, resolveComponent as ce, createVNode as B, watch as ht, createBlock as se, isRef as gt, withCtx as _e, Fragment as re, normalizeClass as ge, createTextVNode as je, renderList as Se, resolveDynamicComponent as bt } from "vue";
3
3
  import { useI18n as at } from "@feedmepos/mf-common";
4
- import { b as _t, u as St, f as Ge, P as be } from "./format-unit-display-uZsyeofT.js";
4
+ import { b as _t, u as St, f as Ge, P as be } from "./format-unit-display-DgTlT1cC.js";
5
5
  import { E as et } from "./empty-placeholder-wf6-BWE8.js";
6
6
  import { useDialog as Ye, useSnackbar as We, useProxiedModel as wt } from "@feedmepos/ui-library";
7
- import { u as nt } from "./feature-CXJupSqw.js";
8
- import { F as xt } from "./decimal-BYRcDs02.js";
7
+ import { u as nt } from "./feature-BdqR6_vW.js";
8
+ import { F as xt } from "./decimal-B7ZVTj3Q.js";
9
9
  const Xe = it((p, v) => {
10
- const u = Pe();
10
+ const a = Pe();
11
11
  return {
12
- async readRequests(n) {
13
- const S = n ?? u.currentLocationDBName, R = `${p.inventoryBackendUrl}/${S}/purchase-request`;
14
- return await v.get(R);
12
+ async readRequests(i) {
13
+ const w = i ?? a.currentLocationDBName, x = `${p.inventoryBackendUrl}/${w}/purchase-request`;
14
+ return await v.get(x);
15
15
  },
16
16
  async getPurchaseOrders({
17
- start: n,
18
- end: S
17
+ start: i,
18
+ end: w
19
19
  }) {
20
- const R = u.currentLocationDBName, E = `${p.inventoryBackendUrl}/${R}/purchase-order`;
21
- return await v.get(`${E}?start=${n}&end=${S}`);
20
+ const x = a.currentLocationDBName, L = `${p.inventoryBackendUrl}/${x}/purchase-order`;
21
+ return await v.get(`${L}?start=${i}&end=${w}`);
22
22
  },
23
- async getLatestPurchaseOrderRequest(n, S) {
24
- S ?? (S = u.currentLocationDBName);
25
- const R = `${p.inventoryBackendUrl}/${S}/purchase-request/find-by-purchase-order-id`;
26
- return await v.get(`${R}/${n}`);
23
+ async getLatestPurchaseOrderRequest(i, w) {
24
+ w ?? (w = a.currentLocationDBName);
25
+ const x = `${p.inventoryBackendUrl}/${w}/purchase-request/find-by-purchase-order-id`;
26
+ return await v.get(`${x}/${i}`);
27
27
  },
28
- async getPurchaseOrderById(n, S) {
29
- S ?? (S = u.currentLocationDBName);
30
- const R = `${p.inventoryBackendUrl}/${S}/purchase-order`;
31
- return await v.get(`${R}/${n}`);
28
+ async getPurchaseOrderById(i, w) {
29
+ w ?? (w = a.currentLocationDBName);
30
+ const x = `${p.inventoryBackendUrl}/${w}/purchase-order`;
31
+ return await v.get(`${x}/${i}`);
32
32
  },
33
- async processPurchaseOrder(n, S) {
34
- const R = u.currentLocationDBName, E = S || R, q = `${p.inventoryBackendUrl}/${E}/purchase-order/run-operation`;
35
- return await v.put(q, n);
33
+ async processPurchaseOrder(i, w) {
34
+ const x = a.currentLocationDBName, L = w || x, q = `${p.inventoryBackendUrl}/${L}/purchase-order/run-operation`;
35
+ return await v.put(q, i);
36
36
  },
37
- async createPurchaseOrder(n) {
38
- const S = u.currentLocationDBName, R = `${p.inventoryBackendUrl}/${S}/purchase-order`;
39
- return await v.post(R, n);
37
+ async createPurchaseOrder(i) {
38
+ const w = a.currentLocationDBName, x = `${p.inventoryBackendUrl}/${w}/purchase-order`;
39
+ return await v.post(x, i);
40
40
  },
41
- async updatePurchaseOrder(n) {
42
- const S = u.currentLocationDBName, R = `${p.inventoryBackendUrl}/${S}/purchase-order`;
43
- return await v.put(R, n);
41
+ async updatePurchaseOrder(i) {
42
+ const w = a.currentLocationDBName, x = `${p.inventoryBackendUrl}/${w}/purchase-order`;
43
+ return await v.put(x, i);
44
44
  },
45
- async importFromXilnex(n) {
46
- const S = u.currentLocationDBName, R = `${p.inventoryBackendUrl}/${S}/purchase-order/import-from-xilnex`;
47
- return await v.post(R, n);
45
+ async importFromXilnex(i) {
46
+ const w = a.currentLocationDBName, x = `${p.inventoryBackendUrl}/${w}/purchase-order/import-from-xilnex`;
47
+ return await v.post(x, i);
48
48
  }
49
49
  };
50
50
  }), ot = {
51
- [k.enum.confirmDraft]: {
51
+ [R.enum.confirmDraft]: {
52
52
  primaryActions: {
53
53
  text: "Confirm draft",
54
54
  close: !0
@@ -57,7 +57,7 @@ const Xe = it((p, v) => {
57
57
  message: "Purchase order cannot be changed after confirm draft.",
58
58
  successMessage: "Purchase order draft has been confirmed"
59
59
  },
60
- [k.enum.cancelDraft]: {
60
+ [R.enum.cancelDraft]: {
61
61
  primaryActions: {
62
62
  text: "Cancel draft",
63
63
  close: !0,
@@ -67,7 +67,7 @@ const Xe = it((p, v) => {
67
67
  message: "Purchase order cannot be changed after cancelled draft.",
68
68
  successMessage: "Purchase order draft has been cancelled"
69
69
  },
70
- [k.enum.submitRequest]: {
70
+ [R.enum.submitRequest]: {
71
71
  primaryActions: {
72
72
  text: "Submit request",
73
73
  close: !0
@@ -76,7 +76,7 @@ const Xe = it((p, v) => {
76
76
  message: "Purchase order cannot be changed after confirm draft.",
77
77
  successMessage: "Purchase order draft has been submitted"
78
78
  },
79
- [k.enum.completeReceive]: {
79
+ [R.enum.completeReceive]: {
80
80
  primaryActions: {
81
81
  text: "Mark received",
82
82
  close: !0
@@ -85,7 +85,7 @@ const Xe = it((p, v) => {
85
85
  message: "Purchase order cannot be changed after it has complete receiving.",
86
86
  successMessage: "Purchase order has been marked as received"
87
87
  },
88
- [k.enum.approveRequest]: {
88
+ [R.enum.approveRequest]: {
89
89
  primaryActions: {
90
90
  text: "Approve request",
91
91
  close: !0
@@ -94,7 +94,7 @@ const Xe = it((p, v) => {
94
94
  message: "Purchase order will be approved.",
95
95
  successMessage: "Purchase order has been approved"
96
96
  },
97
- [k.enum.rejectRequest]: {
97
+ [R.enum.rejectRequest]: {
98
98
  primaryActions: {
99
99
  text: "Reject request",
100
100
  close: !0,
@@ -108,44 +108,44 @@ const Xe = it((p, v) => {
108
108
  var He = /* @__PURE__ */ ((p) => (p.RECEIVE_REQUEST = "receive/request", p.APPROVAL = "approval", p))(He || {});
109
109
  const we = K(), Ve = K();
110
110
  function Fr(p, v) {
111
- const u = Ye(), n = Pe(), S = nt(), R = _t(), E = St(), q = K(!1), f = We(), r = Xe(), a = K(new Array()), d = K(
111
+ const a = Ye(), i = Pe(), w = nt(), x = _t(), L = St(), q = K(!1), u = We(), t = Xe(), o = K(new Array()), l = K(
112
112
  v != null && v.startDate && (v != null && v.endDate) ? v : ct()
113
- ), l = X(() => {
114
- const y = new Date(d.value.startDate), h = new Date(d.value.endDate);
113
+ ), d = X(() => {
114
+ const y = new Date(l.value.startDate), h = new Date(l.value.endDate);
115
115
  return {
116
116
  start: ut(y).toISOString(),
117
117
  end: dt(h).toISOString()
118
118
  };
119
- }), i = K(new Array()), F = ft(), U = K(null);
119
+ }), f = K(new Array()), F = ft(), U = K(null);
120
120
  function J(y) {
121
121
  const h = {
122
122
  mode: Be.CREATE,
123
123
  modelValue: void 0,
124
124
  returnFrom: y,
125
125
  show: !0,
126
- "onUpdate:show"(t) {
127
- we.value.show = t;
126
+ "onUpdate:show"(s) {
127
+ we.value.show = s;
128
128
  },
129
129
  lastClosingDate: U.value
130
130
  };
131
131
  we.value = h;
132
132
  }
133
133
  async function T(y) {
134
- function h(s) {
135
- const x = {
134
+ function h(r) {
135
+ const O = {
136
136
  mode: Be.CREATE,
137
137
  modelValue: y || void 0,
138
138
  show: !0,
139
- "onUpdate:show"(O) {
140
- we.value.show = O;
139
+ "onUpdate:show"(k) {
140
+ we.value.show = k;
141
141
  },
142
- templateId: s,
142
+ templateId: r,
143
143
  lastClosingDate: U.value
144
144
  };
145
- we.value = x;
145
+ we.value = O;
146
146
  }
147
- let t;
148
- S.mustUsePoTemplate && !(y != null && y.template) ? u.open({
147
+ let s;
148
+ w.mustUsePoTemplate && !(y != null && y.template) ? a.open({
149
149
  title: "Create transfer",
150
150
  message: "",
151
151
  primaryActions: {
@@ -158,31 +158,31 @@ function Fr(p, v) {
158
158
  close: !0
159
159
  }
160
160
  }).onPrimary(async () => {
161
- t = await R.getTemplateId(), t && h(t);
161
+ s = await x.getTemplateId(), s && h(s);
162
162
  }).onSecondary(() => {
163
163
  h(void 0);
164
- }) : h(t);
164
+ }) : h(s);
165
165
  }
166
166
  function M(y) {
167
167
  const h = {
168
168
  mode: Be.UPDATE,
169
169
  modelValue: tt(y),
170
170
  show: !0,
171
- "onUpdate:show"(t) {
172
- we.value.show = t;
171
+ "onUpdate:show"(s) {
172
+ we.value.show = s;
173
173
  },
174
174
  lastClosingDate: U.value
175
175
  };
176
176
  we.value = h;
177
177
  }
178
- async function re() {
179
- a.value = [], q.value = !0;
178
+ async function Y() {
179
+ o.value = [], q.value = !0;
180
180
  try {
181
- a.value = await r.getPurchaseOrders(l.value).then((t) => t.sort((s, x) => x._id.localeCompare(s._id)));
181
+ o.value = await t.getPurchaseOrders(d.value).then((s) => s.sort((r, O) => O._id.localeCompare(r._id)));
182
182
  const y = await F.readLastClosing(!0), h = y == null ? void 0 : y._id;
183
- h && (U.value = mt(h)), S.mustUsePoTemplate && await E.fetchTemplates();
183
+ h && (U.value = mt(h)), w.mustUsePoTemplate && await L.fetchTemplates();
184
184
  } catch {
185
- f.open({
185
+ u.open({
186
186
  title: "Something went wrong",
187
187
  message: "Error at fetching purchase orders",
188
188
  type: "error"
@@ -191,12 +191,12 @@ function Fr(p, v) {
191
191
  q.value = !1;
192
192
  }
193
193
  }
194
- async function ae() {
195
- i.value = [], q.value = !0;
194
+ async function de() {
195
+ f.value = [], q.value = !0;
196
196
  try {
197
- i.value = await r.readRequests().then((y) => y.reverse());
197
+ f.value = await t.readRequests().then((y) => y.reverse());
198
198
  } catch {
199
- f.open({
199
+ u.open({
200
200
  title: "Something went wrong",
201
201
  message: "Error at fetching purchase requests",
202
202
  type: "error"
@@ -205,37 +205,37 @@ function Fr(p, v) {
205
205
  q.value = !1;
206
206
  }
207
207
  }
208
- function Y() {
208
+ function Z() {
209
209
  switch (p) {
210
210
  case "receive/request":
211
- return re();
211
+ return Y();
212
212
  case "approval":
213
- return ae();
213
+ return de();
214
214
  }
215
215
  }
216
- function de(y, h) {
217
- d.value = {
216
+ function fe(y, h) {
217
+ l.value = {
218
218
  startDate: y,
219
219
  endDate: h
220
- }, Y();
220
+ }, Z();
221
221
  }
222
- n.watchLocation(async (y) => {
222
+ i.watchLocation(async (y) => {
223
223
  if (!y) {
224
- a.value = [];
224
+ o.value = [];
225
225
  return;
226
226
  }
227
- await Y();
227
+ await Z();
228
228
  });
229
229
  const z = K(), Ce = K(Math.random().toString());
230
230
  async function Ie(y, h) {
231
- var O, P;
232
- const t = Math.random().toString();
233
- Ce.value = t;
234
- const s = p === "receive/request" ? n.currentLocation : h == null ? void 0 : h.to, x = {
231
+ var k, P;
232
+ const s = Math.random().toString();
233
+ Ce.value = s;
234
+ const r = p === "receive/request" ? i.currentLocation : h == null ? void 0 : h.to, O = {
235
235
  poRequest: h,
236
236
  purchaseOrder: y,
237
- transferTo: s == null ? void 0 : s.name,
238
- transferToDbName: s == null ? void 0 : s.dbName,
237
+ transferTo: r == null ? void 0 : r.name,
238
+ transferToDbName: r == null ? void 0 : r.dbName,
239
239
  show: !0,
240
240
  canResubmit: !1,
241
241
  canApprove: p === "approval",
@@ -244,84 +244,84 @@ function Fr(p, v) {
244
244
  },
245
245
  scope: p
246
246
  };
247
- if (z.value = x, !(h || y.status !== j.enum.REQUESTING)) {
247
+ if (z.value = O, !(h || y.status !== j.enum.REQUESTING)) {
248
248
  try {
249
- h = (await r.readRequests(
249
+ h = (await t.readRequests(
250
250
  `${y.supplier.internal}_${y.supplier._id}`
251
251
  )).find((G) => G.purchaseOrderId === y._id);
252
252
  } catch {
253
253
  console.error("Error at fetching po request to check");
254
254
  }
255
- t === Ce.value && (z.value.canResubmit = !h, z.value.transferTo = (O = h == null ? void 0 : h.to) == null ? void 0 : O.name, z.value.transferToDbName = (P = h == null ? void 0 : h.to) == null ? void 0 : P.dbName);
255
+ s === Ce.value && (z.value.canResubmit = !h, z.value.transferTo = (k = h == null ? void 0 : h.to) == null ? void 0 : k.name, z.value.transferToDbName = (P = h == null ? void 0 : h.to) == null ? void 0 : P.dbName);
256
256
  }
257
257
  }
258
- async function ne(y, h, t, s) {
258
+ async function ae(y, h, s, r) {
259
259
  q.value = !0;
260
260
  try {
261
- await r.processPurchaseOrder(
261
+ await t.processPurchaseOrder(
262
262
  {
263
263
  operation: h,
264
264
  doc: y,
265
265
  options: (
266
266
  // auto receive for supplier to warehouse
267
- (h === k.enum.confirmDraft || // auto receive for warehouse to warehouse
268
- h === k.enum.completeReceive) && S.autoReceiveWarehouse ? {
267
+ (h === R.enum.confirmDraft || // auto receive for warehouse to warehouse
268
+ h === R.enum.completeReceive) && w.autoReceiveWarehouse ? {
269
269
  autoReceive: !0
270
270
  } : void 0
271
271
  )
272
272
  },
273
- s
273
+ r
274
274
  ), await new Promise((P) => setTimeout(P, 1e3));
275
- const O = Pe().currentLocationDBName.startsWith("restaurant_");
276
- h === k.enum.confirmDraft && y.effectiveAt && O ? f.open({
275
+ const k = Pe().currentLocationDBName.startsWith("restaurant_");
276
+ h === R.enum.confirmDraft && y.effectiveAt && k ? u.open({
277
277
  title: "Success",
278
- message: `${t}. The backdate will be reflected once your POS has received this change.`,
278
+ message: `${s}. The backdate will be reflected once your POS has received this change.`,
279
279
  type: "success"
280
- }) : f.open({
280
+ }) : u.open({
281
281
  title: "Success",
282
- message: t,
282
+ message: s,
283
283
  type: "success"
284
284
  });
285
- } catch (x) {
286
- f.open({
285
+ } catch (O) {
286
+ u.open({
287
287
  title: "Something went wrong",
288
288
  message: "Please try again.",
289
289
  type: "error"
290
- }), console.error("Error when submitting PO operation", h, y, x);
290
+ }), console.error("Error when submitting PO operation", h, y, O);
291
291
  } finally {
292
- q.value = !1, Y();
292
+ q.value = !1, Z();
293
293
  }
294
294
  }
295
- async function Le(y, h, t, s) {
296
- if (h === k.enum.returnStock)
297
- return s ? ne(
295
+ async function Le(y, h, s, r) {
296
+ if (h === R.enum.returnStock)
297
+ return r ? ae(
298
298
  {
299
299
  returnOrder: y,
300
- purchaseOrder: s
300
+ purchaseOrder: r
301
301
  },
302
302
  h,
303
303
  "Transfer order successfully created."
304
304
  ) : void 0;
305
- const x = ot[h];
306
- if (!x) {
307
- f.open({
305
+ const O = ot[h];
306
+ if (!O) {
307
+ u.open({
308
308
  title: "Something went wrong",
309
309
  message: `Cannot process order: ${st(h)}`,
310
310
  type: "error"
311
311
  });
312
312
  return;
313
313
  }
314
- const { successMessage: O, ...P } = x;
315
- u.open({
314
+ const { successMessage: k, ...P } = O;
315
+ a.open({
316
316
  title: P.title,
317
317
  message: P.message,
318
318
  primaryActions: P.primaryActions
319
319
  }).onPrimary(() => {
320
- ne(y, h, O, t);
320
+ ae(y, h, k, s);
321
321
  });
322
322
  }
323
323
  async function Fe() {
324
- u.open({
324
+ a.open({
325
325
  title: "Upload Transfer",
326
326
  primaryActions: {
327
327
  text: "Xilnex transfer note",
@@ -342,10 +342,10 @@ function Fr(p, v) {
342
342
  });
343
343
  }
344
344
  return {
345
- purchaseOrders: a,
346
- purchaseRequests: i,
347
- updateDateRange: de,
348
- fetchData: Y,
345
+ purchaseOrders: o,
346
+ purchaseRequests: f,
347
+ updateDateRange: fe,
348
+ fetchData: Z,
349
349
  loading: q,
350
350
  transferDialogProps: we,
351
351
  promptCreateTransferDialog: T,
@@ -360,24 +360,24 @@ function Fr(p, v) {
360
360
  }
361
361
  function Ot(p, v) {
362
362
  return v.reduce(
363
- (n, S) => {
364
- const R = S.received.find((E) => E.sku._id === p._id);
365
- return R && (n = Ke(n, R.amount)), n;
363
+ (i, w) => {
364
+ const x = w.received.find((L) => L.sku._id === p._id);
365
+ return x && (i = Ke(i, x.amount)), i;
366
366
  },
367
367
  xt.toPrecision(qe(0), p.unit.precision)
368
368
  );
369
369
  }
370
370
  function lt(p, v) {
371
- const { name: u, address: n, regNo: S } = v.doc.profile, R = {
372
- name: u,
373
- registrationNumber: S,
374
- line1: n == null ? void 0 : n.line1,
375
- line2: n == null ? void 0 : n.line2,
376
- postcode: n == null ? void 0 : n.postcode,
377
- city: n == null ? void 0 : n.city,
378
- state: n == null ? void 0 : n.state,
379
- country: n == null ? void 0 : n.country
380
- }, E = {
371
+ const { name: a, address: i, regNo: w } = v.doc.profile, x = {
372
+ name: a,
373
+ registrationNumber: w,
374
+ line1: i == null ? void 0 : i.line1,
375
+ line2: i == null ? void 0 : i.line2,
376
+ postcode: i == null ? void 0 : i.postcode,
377
+ city: i == null ? void 0 : i.city,
378
+ state: i == null ? void 0 : i.state,
379
+ country: i == null ? void 0 : i.country
380
+ }, L = {
381
381
  name: p.supplier.name,
382
382
  registrationNumber: p.supplier.registrationNumber,
383
383
  line1: p.supplier.address.line1,
@@ -386,178 +386,189 @@ function lt(p, v) {
386
386
  city: p.supplier.address.city,
387
387
  state: p.supplier.address.state,
388
388
  country: p.supplier.address.country
389
- }, q = p.items.map((d) => {
390
- const { sku: l, measurement: i } = d, F = Oe(
391
- Ot(d.sku, p.deliveryOrder || []),
389
+ }, q = p.items.map((l) => {
390
+ const { sku: d, measurement: f } = l, F = Oe(
391
+ Ot(l.sku, p.deliveryOrder || []),
392
392
  !1
393
393
  );
394
394
  return {
395
- code: l.code,
396
- description: l.name,
397
- quantity: Ge(d.quantity, l.unit, d.measurement),
398
- unit: (i == null ? void 0 : i.abbrev) || l.unit.abbrev,
395
+ code: d.code,
396
+ description: d.name,
397
+ quantity: Ge(l.quantity, d.unit, l.measurement),
398
+ unit: (f == null ? void 0 : f.abbrev) || d.unit.abbrev,
399
399
  received: F
400
400
  };
401
- }), f = p.deliveryOrder.map((d) => ({
402
- createdAt: rt(new Date(d.createdAt)),
403
- ref: d.deliveryOrderNumber,
404
- remark: d.remark || "",
405
- items: d.received.map((l) => {
406
- var i;
401
+ }), u = p.deliveryOrder.map((l) => ({
402
+ createdAt: rt(new Date(l.createdAt)),
403
+ ref: l.deliveryOrderNumber,
404
+ remark: l.remark || "",
405
+ items: l.received.map((d) => {
406
+ var f;
407
407
  return {
408
- code: l.sku.code,
409
- description: l.sku.name,
410
- quantity: Oe(l.amount),
411
- unit: ((i = l.measurement) == null ? void 0 : i.abbrev) || l.sku.unit.abbrev
408
+ code: d.sku.code,
409
+ description: d.sku.name,
410
+ quantity: Oe(d.amount),
411
+ unit: ((f = d.measurement) == null ? void 0 : f.abbrev) || d.sku.unit.abbrev
412
412
  };
413
413
  })
414
- })), r = {
414
+ })), t = {
415
415
  orderNumber: p.seqNumber.toString(),
416
416
  createdAt: Ee(p._id),
417
417
  ref: p.ref || "",
418
418
  remark: p.remark || "",
419
- buyer: R,
420
- supplier: E,
419
+ buyer: x,
420
+ supplier: L,
421
421
  items: q,
422
422
  status: p.status,
423
- deliveryOrders: f
424
- }, a = new URL("https://inventory.feedme.cc");
425
- a.pathname = a.hostname.includes("inventory.feedme") || a.hostname.includes("localhost") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", a.searchParams.append("data", JSON.stringify(r)), window.open(a.href, "_blank", "noreferrer");
423
+ deliveryOrders: u
424
+ }, o = new URL("https://inventory.feedme.cc");
425
+ o.pathname = o.hostname.includes("inventory.feedme") || o.hostname.includes("localhost") ? "/receive-request/print-preview" : "/inventory/receive-request/print-preview", o.searchParams.append("data", JSON.stringify(t)), window.open(o.href, "_blank", "noreferrer");
426
426
  }
427
427
  const xe = {
428
428
  submitRequest: {
429
429
  translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
430
430
  color: "text-fm-color-typo-primary",
431
- value: k.enum.submitRequest
431
+ value: R.enum.submitRequest
432
432
  },
433
433
  confirmDraft: {
434
434
  translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
435
435
  color: "text-fm-color-typo-primary",
436
- value: k.enum.confirmDraft
436
+ value: R.enum.confirmDraft
437
437
  },
438
438
  cancelDraft: {
439
439
  translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
440
440
  color: "text-fm-color-typo-error",
441
- value: k.enum.cancelDraft
441
+ value: R.enum.cancelDraft
442
442
  },
443
443
  approveRequest: {
444
444
  translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
445
445
  color: "text-fm-color-typo-primary",
446
- value: k.enum.approveRequest
446
+ value: R.enum.approveRequest
447
447
  },
448
448
  rejectRequest: {
449
449
  translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
450
450
  color: "text-fm-color-typo-error",
451
- value: k.enum.rejectRequest
451
+ value: R.enum.rejectRequest
452
452
  },
453
453
  processRequest: {
454
454
  translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
455
455
  color: "text-fm-color-typo-primary",
456
- value: k.enum.processRequest
456
+ value: R.enum.processRequest
457
457
  },
458
458
  receiveStock: {
459
459
  translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
460
460
  color: "text-fm-color-typo-primary",
461
- value: k.enum.receiveStock
461
+ value: R.enum.receiveStock
462
462
  },
463
463
  completeReceive: {
464
464
  translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
465
465
  color: "text-fm-color-typo-primary",
466
- value: k.enum.completeReceive
466
+ value: R.enum.completeReceive
467
467
  },
468
468
  returnStock: {
469
469
  translationKey: "inventory.transfer.receiveRequest.actions.returnStock",
470
470
  color: "text-fm-color-typo-primary",
471
- value: k.enum.returnStock
471
+ value: R.enum.returnStock
472
472
  }
473
473
  };
474
474
  function Ur(p, v) {
475
- const u = Pe(), { t: n } = at();
476
- function S(a) {
477
- switch (a.status) {
475
+ Pe();
476
+ const { t: a } = at();
477
+ function i(t) {
478
+ switch (t.status) {
478
479
  case "DRAFT":
479
480
  return [
480
- ee[Q.Update],
481
- ee[Q.Details],
482
- a.supplier.internal === "restaurant" || a.supplier.internal === "warehouse" ? xe[k.enum.submitRequest] : xe[k.enum.confirmDraft],
483
- xe[k.enum.cancelDraft],
484
- ee[Q.Print]
481
+ te[Q.Update],
482
+ te[Q.Details],
483
+ t.supplier.internal === "restaurant" || t.supplier.internal === "warehouse" ? xe[R.enum.submitRequest] : xe[R.enum.confirmDraft],
484
+ xe[R.enum.cancelDraft],
485
+ te[Q.Print]
485
486
  ];
486
487
  case "RECEIVING":
487
488
  return [
488
- xe[k.enum.completeReceive],
489
- ee[Q.Details],
490
- ee[Q.Print]
489
+ xe[R.enum.completeReceive],
490
+ te[Q.Details],
491
+ te[Q.Print]
491
492
  ];
492
493
  case "REQUESTING":
493
- return p === "receive/request" ? [ee[Q.Details], ee[Q.Print]] : [
494
- xe[k.enum.approveRequest],
495
- xe[k.enum.rejectRequest],
496
- ee[Q.Details],
497
- ee[Q.Print]
494
+ return p === "receive/request" ? [te[Q.Details], te[Q.Print]] : [
495
+ xe[R.enum.approveRequest],
496
+ xe[R.enum.rejectRequest],
497
+ te[Q.Details],
498
+ te[Q.Print]
498
499
  ];
499
500
  case "PROCESSING":
500
- return [ee[Q.Details], ee[Q.Print]];
501
+ return [te[Q.Details], te[Q.Print]];
501
502
  case "COMPLETE":
502
503
  case "CANCEL":
503
504
  default:
504
- return [ee[Q.Details], ee[Q.Print]];
505
+ return [te[Q.Details], te[Q.Print]];
505
506
  }
506
507
  }
507
- function R(a) {
508
- return Object.values(k.enum).includes(a);
508
+ function w(t) {
509
+ return Object.values(R.enum).includes(t);
509
510
  }
510
- async function E(a, d, l) {
511
- var F, U, J, T, M, re;
512
- const i = tt(d);
513
- if (a === Q.Print) {
514
- const ae = l ? u.locationByDbName[l.to.dbName] : u.currentLocation, Y = `${((F = l == null ? void 0 : l.netSuite) == null ? void 0 : F.id) ?? ""} ${((U = l == null ? void 0 : l.netSuite) == null ? void 0 : U.refNo) ?? ""}`.trim() || `${((J = i.netSuite) == null ? void 0 : J.id) ?? ""} ${((T = i.netSuite) == null ? void 0 : T.refNo) ?? ""}`.trim();
515
- i.ref = [Y ? `Netsuite: (${Y})` : "", i.ref].filter((de) => de).join(" "), lt(i, ae ?? u.currentLocation);
511
+ async function x(t, o, l) {
512
+ var f, F, U, J, T, M;
513
+ const d = tt(o);
514
+ if (t === Q.Print) {
515
+ const Y = (l == null ? void 0 : l.toInventoryLocation) ?? {
516
+ name: "",
517
+ type: "restaurant",
518
+ acceptRequest: !0,
519
+ dbName: "",
520
+ doc: {
521
+ _id: "",
522
+ businessId: "",
523
+ profile: {}
524
+ }
525
+ }, de = `${((f = l == null ? void 0 : l.netSuite) == null ? void 0 : f.id) ?? ""} ${((F = l == null ? void 0 : l.netSuite) == null ? void 0 : F.refNo) ?? ""}`.trim() || `${((U = d.netSuite) == null ? void 0 : U.id) ?? ""} ${((J = d.netSuite) == null ? void 0 : J.refNo) ?? ""}`.trim();
526
+ d.ref = [de ? `Netsuite: (${de})` : "", d.ref].filter((Z) => Z).join(" "), lt(d, Y);
516
527
  return;
517
528
  }
518
- if (a === Q.Details) {
519
- v.promptShowTransferDetails(i, l).catch((ae) => {
520
- console.error("error on promptShowTransferDetails", { error: ae, poRequest: l });
529
+ if (t === Q.Details) {
530
+ v.promptShowTransferDetails(d, l).catch((Y) => {
531
+ console.error("error on promptShowTransferDetails", { error: Y, poRequest: l });
521
532
  });
522
533
  return;
523
534
  }
524
- if (a === Q.Update) {
525
- (M = v.promptUpdateTransferDialog) == null || M.call(v, i);
535
+ if (t === Q.Update) {
536
+ (T = v.promptUpdateTransferDialog) == null || T.call(v, d);
526
537
  return;
527
538
  }
528
- if (R(a) && a != k.enum.returnStock && a != k.enum.receiveStock) {
529
- v.submitAction(d, a, (re = l == null ? void 0 : l.to) == null ? void 0 : re.dbName).then((ae) => {
530
- console.error("error on po action", { action: a, error: ae });
539
+ if (w(t) && t != R.enum.returnStock && t != R.enum.receiveStock) {
540
+ v.submitAction(o, t, (M = l == null ? void 0 : l.to) == null ? void 0 : M.dbName).then((Y) => {
541
+ console.error("error on po action", { action: t, error: Y });
531
542
  });
532
543
  return;
533
544
  }
534
545
  }
535
- function q() {
546
+ function L() {
536
547
  return [
537
548
  {
538
549
  accessorKey: "seqNumber",
539
- header: () => n("inventory.transfer.table.seqNo"),
550
+ header: () => a("inventory.transfer.table.seqNo"),
540
551
  enableSorting: !0,
541
552
  size: 80,
542
553
  sortUndefined: "last"
543
554
  },
544
555
  {
545
556
  accessorKey: "_id",
546
- header: () => n("inventory.transfer.table.createdAt"),
547
- cell(a) {
548
- return Ee(`${a.getValue()}`);
557
+ header: () => a("inventory.transfer.table.createdAt"),
558
+ cell(t) {
559
+ return Ee(`${t.getValue()}`);
549
560
  },
550
561
  enableSorting: !0
551
562
  },
552
563
  {
553
564
  accessorKey: "supplier.name",
554
- header: () => n("inventory.transfer.table.transferFrom"),
565
+ header: () => a("inventory.transfer.table.transferFrom"),
555
566
  enableSorting: !0,
556
567
  size: 200
557
568
  },
558
569
  {
559
570
  accessorKey: "items.length",
560
- header: () => n("inventory.transfer.table.noOfItems"),
571
+ header: () => a("inventory.transfer.table.noOfItems"),
561
572
  enableSorting: !1,
562
573
  meta: {
563
574
  width: "10rem"
@@ -565,15 +576,15 @@ function Ur(p, v) {
565
576
  },
566
577
  {
567
578
  accessorKey: "ref",
568
- header: () => n("inventory.transfer.table.reference"),
579
+ header: () => a("inventory.transfer.table.reference"),
569
580
  enableSorting: !1,
570
581
  size: "auto"
571
582
  },
572
583
  {
573
584
  accessorKey: "status",
574
- header: () => n("inventory.transfer.table.status"),
575
- cell(a) {
576
- const d = n(`inventory.transfer.status.${a.getValue() ?? ""}`), l = `${a.getValue() ?? ""}`.toLocaleLowerCase("en-us");
585
+ header: () => a("inventory.transfer.table.status"),
586
+ cell(t) {
587
+ const o = a(`inventory.transfer.status.${t.getValue() ?? ""}`), l = `${t.getValue() ?? ""}`.toLocaleLowerCase("en-us");
577
588
  return N(
578
589
  "div",
579
590
  {
@@ -584,7 +595,7 @@ function Ur(p, v) {
584
595
  {
585
596
  class: `fm-status-badge fm-status-badge-${l}`
586
597
  },
587
- d
598
+ o
588
599
  )
589
600
  );
590
601
  },
@@ -593,9 +604,9 @@ function Ur(p, v) {
593
604
  },
594
605
  {
595
606
  id: "action",
596
- cell(a) {
597
- const d = a.row.original, l = S(d);
598
- return Je(l, (i) => E(i, d));
607
+ cell(t) {
608
+ const o = t.row.original, l = i(o);
609
+ return Je(l, (d) => x(d, o));
599
610
  },
600
611
  enableSorting: !1,
601
612
  size: 40,
@@ -606,45 +617,45 @@ function Ur(p, v) {
606
617
  }
607
618
  ];
608
619
  }
609
- function f() {
620
+ function q() {
610
621
  return [
611
622
  {
612
623
  accessorKey: "purchaseOrder.seqNumber",
613
- header: () => n("inventory.transfer.table.seqNo"),
624
+ header: () => a("inventory.transfer.table.seqNo"),
614
625
  enableSorting: !0,
615
626
  size: 80,
616
627
  sortUndefined: "last"
617
628
  },
618
629
  {
619
630
  accessorKey: "purchaseOrder._id",
620
- header: () => n("inventory.transfer.table.createdAt"),
621
- cell(a) {
622
- return Ee(`${a.getValue()}`);
631
+ header: () => a("inventory.transfer.table.createdAt"),
632
+ cell(t) {
633
+ return Ee(`${t.getValue()}`);
623
634
  },
624
635
  enableSorting: !0
625
636
  },
626
637
  {
627
638
  accessorKey: "to.name",
628
- header: () => n("inventory.transfer.table.transferTo"),
639
+ header: () => a("inventory.transfer.table.transferTo"),
629
640
  enableSorting: !1,
630
641
  size: 200
631
642
  },
632
643
  {
633
644
  accessorKey: "purchaseOrder.items.length",
634
- header: () => n("inventory.transfer.table.noOfItems"),
645
+ header: () => a("inventory.transfer.table.noOfItems"),
635
646
  enableSorting: !1
636
647
  },
637
648
  {
638
649
  accessorKey: "purchaseOrder.ref",
639
- header: () => n("inventory.transfer.table.reference"),
650
+ header: () => a("inventory.transfer.table.reference"),
640
651
  enableSorting: !1,
641
652
  size: "auto"
642
653
  },
643
654
  {
644
655
  accessorKey: "purchaseOrder.status",
645
- header: () => n("inventory.transfer.table.status"),
646
- cell(a) {
647
- const d = n(`inventory.transfer.status.${a.getValue() ?? ""}`), l = `${a.getValue() ?? ""}`.toLocaleLowerCase("en-us");
656
+ header: () => a("inventory.transfer.table.status"),
657
+ cell(t) {
658
+ const o = a(`inventory.transfer.status.${t.getValue() ?? ""}`), l = `${t.getValue() ?? ""}`.toLocaleLowerCase("en-us");
648
659
  return N(
649
660
  "div",
650
661
  {
@@ -655,7 +666,7 @@ function Ur(p, v) {
655
666
  {
656
667
  class: `fm-status-badge fm-status-badge-${l}`
657
668
  },
658
- d
669
+ o
659
670
  )
660
671
  );
661
672
  },
@@ -663,17 +674,17 @@ function Ur(p, v) {
663
674
  },
664
675
  {
665
676
  id: "action",
666
- cell(a) {
667
- const d = a.row.original, l = d.purchaseOrder ? S(d.purchaseOrder) : [];
677
+ cell(t) {
678
+ const o = t.row.original, l = o.purchaseOrder ? i(o.purchaseOrder) : [];
668
679
  return Je(
669
680
  l,
670
- (i) => d.purchaseOrder ? E(
671
- i,
681
+ (d) => o.purchaseOrder ? x(
682
+ d,
672
683
  {
673
- ...d.purchaseOrder,
674
- _rev: d.purchaseOrder._rev ?? ""
684
+ ...o.purchaseOrder,
685
+ _rev: o.purchaseOrder._rev ?? ""
675
686
  },
676
- d
687
+ o
677
688
  ) : void 0
678
689
  );
679
690
  },
@@ -686,17 +697,17 @@ function Ur(p, v) {
686
697
  }
687
698
  ];
688
699
  }
689
- const r = X(() => p === "receive/request" ? q() : f());
700
+ const u = X(() => p === "receive/request" ? L() : q());
690
701
  return {
691
702
  get columnDefs() {
692
- return r.value;
703
+ return u.value;
693
704
  }
694
705
  };
695
706
  }
696
- const Rt = {
707
+ const kt = {
697
708
  key: 0,
698
709
  class: "flex flex-col gap-8"
699
- }, kt = { class: "flex flex-col gap-4" }, Dt = { class: "fm-typo-en-body-lg-600" }, Nt = {
710
+ }, Rt = { class: "flex flex-col gap-4" }, Dt = { class: "fm-typo-en-body-lg-600" }, Nt = {
700
711
  key: 0,
701
712
  class: "flex flex-col gap-4"
702
713
  }, At = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Tt = { class: "fm-typo-en-body-lg-600" }, $t = { key: 0 }, Pt = { key: 1 }, Ct = {
@@ -719,56 +730,56 @@ const Rt = {
719
730
  scope: {}
720
731
  },
721
732
  setup(p) {
722
- const v = p, u = ze(), n = Xe(), S = K(v.poRequest);
733
+ const v = p, a = ze(), i = Xe(), w = K(v.poRequest);
723
734
  yt(async () => {
724
- var f;
725
- if (!v.poRequest && ((f = v.purchaseOrder) != null && f._id)) {
726
- const r = await n.getLatestPurchaseOrderRequest(v.purchaseOrder._id);
727
- S.value = r;
735
+ var u;
736
+ if (!v.poRequest && ((u = v.purchaseOrder) != null && u._id)) {
737
+ const t = await i.getLatestPurchaseOrderRequest(v.purchaseOrder._id);
738
+ w.value = t;
728
739
  }
729
740
  });
730
- const R = X(
741
+ const x = X(
731
742
  () => {
732
- var f, r, a, d, l, i;
733
- return u.getSubsidiaryFullName(
734
- ((a = (r = (f = v.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : r.subsidiary) == null ? void 0 : a.id) || ((i = (l = (d = v.poRequest) == null ? void 0 : d.netSuite) == null ? void 0 : l.subsidiary) == null ? void 0 : i.id)
743
+ var u, t, o, l, d, f;
744
+ return a.getSubsidiaryFullName(
745
+ ((o = (t = (u = v.purchaseOrder) == null ? void 0 : u.netSuite) == null ? void 0 : t.subsidiary) == null ? void 0 : o.id) || ((f = (d = (l = v.poRequest) == null ? void 0 : l.netSuite) == null ? void 0 : d.subsidiary) == null ? void 0 : f.id)
735
746
  ).fullName;
736
747
  }
737
- ), E = X(() => {
738
- var f, r, a, d, l, i, F, U, J, T, M, re;
739
- return (a = (r = (f = v.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : r.additionalInfo) != null && a.transactionnumber ? (i = (l = (d = v.purchaseOrder) == null ? void 0 : d.netSuite) == null ? void 0 : l.additionalInfo) == null ? void 0 : i.transactionnumber : (J = (U = (F = S.value) == null ? void 0 : F.netSuite) == null ? void 0 : U.additionalInfo) != null && J.transactionnumber ? (re = (M = (T = S.value) == null ? void 0 : T.netSuite) == null ? void 0 : M.additionalInfo) == null ? void 0 : re.transactionnumber : null;
748
+ ), L = X(() => {
749
+ var u, t, o, l, d, f, F, U, J, T, M, Y;
750
+ return (o = (t = (u = v.purchaseOrder) == null ? void 0 : u.netSuite) == null ? void 0 : t.additionalInfo) != null && o.transactionnumber ? (f = (d = (l = v.purchaseOrder) == null ? void 0 : l.netSuite) == null ? void 0 : d.additionalInfo) == null ? void 0 : f.transactionnumber : (J = (U = (F = w.value) == null ? void 0 : F.netSuite) == null ? void 0 : U.additionalInfo) != null && J.transactionnumber ? (Y = (M = (T = w.value) == null ? void 0 : T.netSuite) == null ? void 0 : M.additionalInfo) == null ? void 0 : Y.transactionnumber : null;
740
751
  }), q = X(() => {
741
- var f, r, a, d, l, i;
742
- return (r = (f = v.purchaseOrder) == null ? void 0 : f.deliveryFullfillment) != null && r.length && ((d = (a = v.purchaseOrder) == null ? void 0 : a.deliveryFullfillment) == null ? void 0 : d.length) > 0 ? (i = (l = v.purchaseOrder) == null ? void 0 : l.deliveryFullfillment) == null ? void 0 : i.map((F) => {
752
+ var u, t, o, l, d, f;
753
+ return (t = (u = v.purchaseOrder) == null ? void 0 : u.deliveryFullfillment) != null && t.length && ((l = (o = v.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) == null ? void 0 : l.length) > 0 ? (f = (d = v.purchaseOrder) == null ? void 0 : d.deliveryFullfillment) == null ? void 0 : f.map((F) => {
743
754
  var U;
744
755
  return (U = F.netSuite) == null ? void 0 : U.refNo;
745
756
  }).join(", ") : "N/A";
746
757
  });
747
- return (f, r) => {
748
- var a, d, l, i, F, U, J, T, M, re, ae, Y, de, z;
749
- return o(u).isEnabled ? (c(), _("div", Rt, [
750
- e("div", kt, [
751
- r[0] || (r[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
752
- e("div", Dt, m(R.value || "N/A"), 1)
758
+ return (u, t) => {
759
+ var o, l, d, f, F, U, J, T, M, Y, de, Z, fe, z;
760
+ return n(a).isEnabled ? (c(), _("div", kt, [
761
+ e("div", Rt, [
762
+ t[0] || (t[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
763
+ e("div", Dt, m(x.value || "N/A"), 1)
753
764
  ]),
754
- !f.isTransferBetweenOutlets && ((a = f.purchaseOrder) == null ? void 0 : a.status) !== o(j).Enum.REQUESTING && f.scope === o(He).RECEIVE_REQUEST ? (c(), _("div", Nt, [
755
- e("div", At, " NetSuite " + m(f.transferType === o(be).PURCHASE ? "purchase order" : "transfer order") + " (ID) ", 1),
765
+ !u.isTransferBetweenOutlets && ((o = u.purchaseOrder) == null ? void 0 : o.status) !== n(j).Enum.REQUESTING && u.scope === n(He).RECEIVE_REQUEST ? (c(), _("div", Nt, [
766
+ e("div", At, " NetSuite " + m(u.transferType === n(be).PURCHASE ? "purchase order" : "transfer order") + " (ID) ", 1),
756
767
  e("div", Tt, [
757
- (l = (d = f.purchaseOrder) == null ? void 0 : d.netSuite) != null && l.id ? (c(), _("span", $t, m((F = (i = f.purchaseOrder) == null ? void 0 : i.netSuite) == null ? void 0 : F.refNo) + " (" + m((J = (U = f.purchaseOrder) == null ? void 0 : U.netSuite) == null ? void 0 : J.id) + ") ", 1)) : (c(), _("span", Pt, "N/A"))
768
+ (d = (l = u.purchaseOrder) == null ? void 0 : l.netSuite) != null && d.id ? (c(), _("span", $t, m((F = (f = u.purchaseOrder) == null ? void 0 : f.netSuite) == null ? void 0 : F.refNo) + " (" + m((J = (U = u.purchaseOrder) == null ? void 0 : U.netSuite) == null ? void 0 : J.id) + ") ", 1)) : (c(), _("span", Pt, "N/A"))
758
769
  ])
759
770
  ])) : D("", !0),
760
- !f.isTransferBetweenOutlets && S.value && ((T = f.purchaseOrder) == null ? void 0 : T.status) === o(j).Enum.REQUESTING || f.scope === o(He).APPROVAL ? (c(), _("div", Ct, [
761
- e("div", qt, " (Request) NetSuite " + m(f.transferType === o(be).PURCHASE ? "Purchase order" : "Transfer order") + " (ID) ", 1),
771
+ !u.isTransferBetweenOutlets && w.value && ((T = u.purchaseOrder) == null ? void 0 : T.status) === n(j).Enum.REQUESTING || u.scope === n(He).APPROVAL ? (c(), _("div", Ct, [
772
+ e("div", qt, " (Request) NetSuite " + m(u.transferType === n(be).PURCHASE ? "Purchase order" : "Transfer order") + " (ID) ", 1),
762
773
  e("div", Et, [
763
- (re = (M = S.value) == null ? void 0 : M.netSuite) != null && re.id ? (c(), _("span", It, m((Y = (ae = S.value) == null ? void 0 : ae.netSuite) == null ? void 0 : Y.refNo) + " (" + m((z = (de = S.value) == null ? void 0 : de.netSuite) == null ? void 0 : z.id) + ") ", 1)) : (c(), _("span", Lt, "N/A"))
774
+ (Y = (M = w.value) == null ? void 0 : M.netSuite) != null && Y.id ? (c(), _("span", It, m((Z = (de = w.value) == null ? void 0 : de.netSuite) == null ? void 0 : Z.refNo) + " (" + m((z = (fe = w.value) == null ? void 0 : fe.netSuite) == null ? void 0 : z.id) + ") ", 1)) : (c(), _("span", Lt, "N/A"))
764
775
  ])
765
776
  ])) : D("", !0),
766
- E.value ? (c(), _("div", Ft, [
767
- r[1] || (r[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite transaction number ", -1)),
768
- e("div", Ut, m(E.value), 1)
777
+ L.value ? (c(), _("div", Ft, [
778
+ t[1] || (t[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite transaction number ", -1)),
779
+ e("div", Ut, m(L.value), 1)
769
780
  ])) : D("", !0),
770
- o(u).isEnabled && f.transferType === o(be).TRANSFER && !f.isTransferBetweenOutlets ? (c(), _("div", Bt, [
771
- r[2] || (r[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
781
+ n(a).isEnabled && u.transferType === n(be).TRANSFER && !u.isTransferBetweenOutlets ? (c(), _("div", Bt, [
782
+ t[2] || (t[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
772
783
  e("div", Mt, m(q.value), 1)
773
784
  ])) : D("", !0)
774
785
  ])) : D("", !0);
@@ -785,15 +796,15 @@ const Rt = {
785
796
  isTransferBetweenOutlets: { type: Boolean }
786
797
  },
787
798
  setup(p) {
788
- const v = p, u = ze(), n = We(), S = Ye(), R = K(!1), E = X(() => {
789
- var d, l, i, F;
790
- let f = !0;
791
- u.isEnabled || (f = !1);
792
- const r = v.purchaseOrder, a = v.poRequest;
793
- return r && ((d = r == null ? void 0 : r.supplier) != null && d.internal ? (!a && r.status == j.enum.DRAFT && (f = !1), a && !((l = a == null ? void 0 : a.netSuite) != null && l.id) && (f = !1), v.isTransferBetweenOutlets && (f = !1)) : ((r == null ? void 0 : r.status) !== j.enum.REQUESTING && r.supplier.internal && (f = !1), !a && !((i = r == null ? void 0 : r.netSuite) != null && i.id) && (f = !1), !a && ((F = r == null ? void 0 : r.netSuite) != null && F.id) && (r == null ? void 0 : r.status) == j.enum.REQUESTING && (f = !1))), f;
799
+ const v = p, a = ze(), i = We(), w = Ye(), x = K(!1), L = X(() => {
800
+ var l, d, f, F;
801
+ let u = !0;
802
+ a.isEnabled || (u = !1);
803
+ const t = v.purchaseOrder, o = v.poRequest;
804
+ return t && ((l = t == null ? void 0 : t.supplier) != null && l.internal ? (!o && t.status == j.enum.DRAFT && (u = !1), o && !((d = o == null ? void 0 : o.netSuite) != null && d.id) && (u = !1), v.isTransferBetweenOutlets && (u = !1)) : ((t == null ? void 0 : t.status) !== j.enum.REQUESTING && t.supplier.internal && (u = !1), !o && !((f = t == null ? void 0 : t.netSuite) != null && f.id) && (u = !1), !o && ((F = t == null ? void 0 : t.netSuite) != null && F.id) && (t == null ? void 0 : t.status) == j.enum.REQUESTING && (u = !1))), u;
794
805
  });
795
806
  async function q() {
796
- R.value || S.open({
807
+ x.value || w.open({
797
808
  title: "Sync with NetSuite",
798
809
  contentComponent: N("div", [
799
810
  N("p", "Are you sure you want to sync now?"),
@@ -811,44 +822,44 @@ const Rt = {
811
822
  },
812
823
  secondaryActions: { text: "Not now", close: !0 }
813
824
  }).onPrimary(async () => {
814
- var f;
825
+ var u;
815
826
  try {
816
- R.value = !0;
817
- const r = v.purchaseOrder, a = v.poRequest;
818
- let d = "purchaseOrder";
819
- if ((f = r == null ? void 0 : r.supplier) != null && f.internal && (d = "purchaseOrderRequest"), !(r != null && r._id)) {
820
- n.open({
827
+ x.value = !0;
828
+ const t = v.purchaseOrder, o = v.poRequest;
829
+ let l = "purchaseOrder";
830
+ if ((u = t == null ? void 0 : t.supplier) != null && u.internal && (l = "purchaseOrderRequest"), !(t != null && t._id)) {
831
+ i.open({
821
832
  title: "Error",
822
833
  message: "Invalid sync ID",
823
834
  type: "error"
824
835
  });
825
836
  return;
826
837
  }
827
- await u.syncTransferOrder(d, r == null ? void 0 : r._id, a == null ? void 0 : a._id), n.open({
838
+ await a.syncTransferOrder(l, t == null ? void 0 : t._id, o == null ? void 0 : o._id), i.open({
828
839
  title: "Sync with NetSuite",
829
840
  message: "Requested to sync with NetSuite. Please wait a moment.",
830
841
  type: "success"
831
842
  });
832
843
  } catch {
833
- n.open({
844
+ i.open({
834
845
  title: "Error",
835
846
  message: "Failed to sync with NetSuite",
836
847
  type: "error"
837
848
  });
838
849
  }
839
850
  setTimeout(() => {
840
- R.value = !1;
851
+ x.value = !1;
841
852
  }, 5e3);
842
853
  });
843
854
  }
844
- return (f, r) => {
845
- const a = ue("FmButton");
846
- return E.value ? (c(), _("div", Vt, [
847
- B(a, {
855
+ return (u, t) => {
856
+ const o = ce("FmButton");
857
+ return L.value ? (c(), _("div", Vt, [
858
+ B(o, {
848
859
  "prepend-icon": "sync",
849
860
  variant: "secondary",
850
861
  label: "Sync",
851
- loading: R.value,
862
+ loading: x.value,
852
863
  onClick: q,
853
864
  "text-color": "primary",
854
865
  "bg-color": "transparent",
@@ -875,7 +886,7 @@ const Rt = {
875
886
  }, vs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ys = { class: "fm-typo-en-body-lg-600" }, hs = {
876
887
  key: 0,
877
888
  class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16 flex flex-col gap-8"
878
- }, gs = { class: "flex gap-8 items-center" }, bs = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, _s = { class: "flex flex-col gap-8" }, Ss = { class: "flex gap-8 items-center" }, ws = { class: "flex-1 fm-typo-en-body-lg-600" }, xs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Os = { class: "flex w-full gap-4" }, Rs = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, ks = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Ds = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Ns = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, As = {
889
+ }, gs = { class: "flex gap-8 items-center" }, bs = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, _s = { class: "flex flex-col gap-8" }, Ss = { class: "flex gap-8 items-center" }, ws = { class: "flex-1 fm-typo-en-body-lg-600" }, xs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, Os = { class: "flex w-full gap-4" }, ks = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Rs = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Ds = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Ns = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, As = {
879
890
  key: 0,
880
891
  class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
881
892
  }, Ts = { class: "py-8" }, $s = { class: "flex justify-end gap-4 items-center" }, Ps = { class: "fm-typo-en-body-lg-600" }, Cs = {
@@ -920,7 +931,7 @@ const Rt = {
920
931
  }, gr = { class: "flex-1 flex flex-col items-center" }, br = {
921
932
  class: "py-12 flex flex-col gap-4 flex-1",
922
933
  name: "delivery details"
923
- }, _r = { class: "flex flex-col gap-8" }, Sr = { class: "flex flex-col gap-4" }, wr = { class: "fm-typo-en-body-lg-600" }, xr = { class: "flex w-full gap-4" }, Or = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, Rr = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, kr = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Dr = { class: "grow fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-1" }, Nr = {
934
+ }, _r = { class: "flex flex-col gap-8" }, Sr = { class: "flex flex-col gap-4" }, wr = { class: "fm-typo-en-body-lg-600" }, xr = { class: "flex w-full gap-4" }, Or = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2" }, kr = { class: "fm-typo-en-body-lg-600 line-clamp-2" }, Rr = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Dr = { class: "grow fm-typo-en-body-md-400 text-fm-color-typo-secondary line-clamp-1" }, Nr = {
924
935
  key: 0,
925
936
  class: "line-clamp-1 fm-typo-en-body-md-400 text-fm-color-typo-secondary"
926
937
  }, Ar = { class: "flex gap-8 xs:flex-col" }, Br = /* @__PURE__ */ Qe({
@@ -937,173 +948,173 @@ const Rt = {
937
948
  },
938
949
  emits: ["update:show", "submitted", "returnStock"],
939
950
  setup(p, { emit: v }) {
940
- const u = p, n = v, S = Ye(), R = We(), E = nt(), q = ze(), f = Pe(), { t: r } = at(), a = X(
951
+ const a = p, i = v, w = Ye(), x = We(), L = nt(), q = ze(), u = Pe(), { t } = at(), o = X(
941
952
  () => {
942
- var t, s, x, O;
943
- return ((s = (t = u.purchaseOrder) == null ? void 0 : t.supplier) == null ? void 0 : s.internal) === "restaurant" || ((O = (x = u.purchaseOrder) == null ? void 0 : x.supplier) == null ? void 0 : O.internal) === "warehouse" ? be.TRANSFER : be.PURCHASE;
953
+ var s, r, O, k;
954
+ return ((r = (s = a.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : r.internal) === "restaurant" || ((k = (O = a.purchaseOrder) == null ? void 0 : O.supplier) == null ? void 0 : k.internal) === "warehouse" ? be.TRANSFER : be.PURCHASE;
944
955
  }
945
- ), d = X(() => {
946
- var t, s, x;
947
- return a.value === be.TRANSFER && ((t = u.transferToDbName) == null ? void 0 : t.startsWith("restaurant")) && ((x = (s = u.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : x.internal) === "restaurant";
948
- }), l = K(!1), i = K(""), F = K(!0), U = Xe(), J = wt(u, "show"), T = K(null), M = K({}), re = X(() => T.value === null), ae = K(""), Y = X(() => {
949
- var s, x, O, P, C, G, g, w, I;
950
- if (!E.enableReturnStocks || !((x = (s = u.purchaseOrder) == null ? void 0 : s.supplier) != null && x.internal) || ((O = u.purchaseOrder) == null ? void 0 : O.status) !== j.enum.COMPLETE || !f.locationById[(C = (P = u.purchaseOrder) == null ? void 0 : P.supplier) == null ? void 0 : C._id]) return !1;
956
+ ), l = X(() => {
957
+ var s, r, O;
958
+ return o.value === be.TRANSFER && ((s = a.transferToDbName) == null ? void 0 : s.startsWith("restaurant")) && ((O = (r = a.purchaseOrder) == null ? void 0 : r.supplier) == null ? void 0 : O.internal) === "restaurant";
959
+ }), d = K(!1), f = K(""), F = K(!0), U = Xe(), J = wt(a, "show"), T = K(null), M = K({}), Y = X(() => T.value === null), de = K(""), Z = X(() => {
960
+ var r, O, k, P, C, G, g, S, E;
961
+ if (!L.enableReturnStocks || !((O = (r = a.purchaseOrder) == null ? void 0 : r.supplier) != null && O.internal) || ((k = a.purchaseOrder) == null ? void 0 : k.status) !== j.enum.COMPLETE || !u.locationById[(C = (P = a.purchaseOrder) == null ? void 0 : P.supplier) == null ? void 0 : C._id]) return !1;
951
962
  if (!q.isEnabled) {
952
963
  const V = q.getNetSuiteLocation(
953
- (g = (G = u.purchaseOrder) == null ? void 0 : G.supplier) == null ? void 0 : g._id
954
- ), L = q.getLocationSubsidiary(V == null ? void 0 : V.id), W = q.getNetSuiteLocation(
955
- f.currentLocation.doc._id
956
- ), oe = q.getLocationSubsidiary(W == null ? void 0 : W.id);
957
- if ((L == null ? void 0 : L.id) !== (oe == null ? void 0 : oe.id)) return !1;
964
+ (g = (G = a.purchaseOrder) == null ? void 0 : G.supplier) == null ? void 0 : g._id
965
+ ), I = q.getLocationSubsidiary(V == null ? void 0 : V.id), W = q.getNetSuiteLocation(
966
+ u.currentLocation.doc._id
967
+ ), ne = q.getLocationSubsidiary(W == null ? void 0 : W.id);
968
+ if ((I == null ? void 0 : I.id) !== (ne == null ? void 0 : ne.id)) return !1;
958
969
  }
959
- return !!((I = (w = u.purchaseOrder) == null ? void 0 : w.deliveryOrder) != null && I.length);
960
- }), de = X(() => {
961
- const t = [
970
+ return !!((E = (S = a.purchaseOrder) == null ? void 0 : S.deliveryOrder) != null && E.length);
971
+ }), fe = X(() => {
972
+ const s = [
962
973
  {
963
- label: r("inventory.transfer.receiveRequest.details.overview"),
974
+ label: t("inventory.transfer.receiveRequest.details.overview"),
964
975
  value: "overview"
965
976
  },
966
977
  {
967
- label: r("inventory.transfer.receiveRequest.details.deliveryHistory"),
978
+ label: t("inventory.transfer.receiveRequest.details.deliveryHistory"),
968
979
  value: "deliveryHistory"
969
980
  }
970
981
  ];
971
- return Y.value && t.push({
982
+ return Z.value && s.push({
972
983
  label: "Returns",
973
984
  value: "returns"
974
- }), t;
975
- }), z = K(de.value[0]);
985
+ }), s;
986
+ }), z = K(fe.value[0]);
976
987
  async function Ce() {
977
- var t, s, x, O, P;
988
+ var s, r, O, k, P;
978
989
  T.value = null, M.value = {};
979
990
  try {
980
- const C = ((t = u.purchaseOrder) == null ? void 0 : t.returnPoIds) ?? [], G = new Array(), g = `${(x = (s = u.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : x.internal}_${(P = (O = u.purchaseOrder) == null ? void 0 : O.supplier) == null ? void 0 : P._id}`;
981
- for (const w of C) {
982
- const [I, V] = await Promise.all([
983
- U.getPurchaseOrderById(w, g),
984
- U.getLatestPurchaseOrderRequest(w, g)
991
+ const C = ((s = a.purchaseOrder) == null ? void 0 : s.returnPoIds) ?? [], G = new Array(), g = `${(O = (r = a.purchaseOrder) == null ? void 0 : r.supplier) == null ? void 0 : O.internal}_${(P = (k = a.purchaseOrder) == null ? void 0 : k.supplier) == null ? void 0 : P._id}`;
992
+ for (const S of C) {
993
+ const [E, V] = await Promise.all([
994
+ U.getPurchaseOrderById(S, g),
995
+ U.getLatestPurchaseOrderRequest(S, g)
985
996
  ]);
986
- G.push(I), V && (M.value[w] = V);
997
+ G.push(E), V && (M.value[S] = V);
987
998
  }
988
- G.sort((w, I) => I._id.localeCompare(w._id)), T.value = G;
999
+ G.sort((S, E) => E._id.localeCompare(S._id)), T.value = G;
989
1000
  } catch (C) {
990
- console.error("error on fetching return orders", C), ae.value = `Something went wrong while retrieving returns. ${(C == null ? void 0 : C.message) ?? C}`, T.value = [];
1001
+ console.error("error on fetching return orders", C), de.value = `Something went wrong while retrieving returns. ${(C == null ? void 0 : C.message) ?? C}`, T.value = [];
991
1002
  }
992
1003
  }
993
1004
  ht(
994
- () => u.show,
995
- (t) => {
996
- t && (z.value = de.value[0], Ce());
1005
+ () => a.show,
1006
+ (s) => {
1007
+ s && (z.value = fe.value[0], Ce());
997
1008
  }
998
1009
  );
999
- async function Ie(t, s, x) {
1000
- i.value = `${s}`, l.value = !0, F.value = !1;
1010
+ async function Ie(s, r, O) {
1011
+ f.value = `${r}`, d.value = !0, F.value = !1;
1001
1012
  try {
1002
1013
  await U.processPurchaseOrder(
1003
1014
  {
1004
- operation: s,
1005
- doc: t,
1015
+ operation: r,
1016
+ doc: s,
1006
1017
  options: (
1007
1018
  // auto receive for supplier to warehouse
1008
- (s === k.enum.confirmDraft || // auto receive for warehouse to warehouse
1009
- s === k.enum.completeReceive) && E.autoReceiveWarehouse ? {
1019
+ (r === R.enum.confirmDraft || // auto receive for warehouse to warehouse
1020
+ r === R.enum.completeReceive) && L.autoReceiveWarehouse ? {
1010
1021
  autoReceive: !0
1011
1022
  } : void 0
1012
1023
  )
1013
1024
  },
1014
- u.transferToDbName
1015
- ), await new Promise((O) => setTimeout(O, 1e3)), R.open({
1025
+ a.transferToDbName
1026
+ ), await new Promise((k) => setTimeout(k, 1e3)), x.open({
1016
1027
  title: "Success",
1017
- message: x,
1028
+ message: O,
1018
1029
  type: "success"
1019
- }), n("update:show", !1), n("submitted");
1020
- } catch (O) {
1021
- R.open({
1030
+ }), i("update:show", !1), i("submitted");
1031
+ } catch (k) {
1032
+ x.open({
1022
1033
  title: "Something went wrong",
1023
1034
  message: "Please try again.",
1024
1035
  type: "error"
1025
- }), console.error("Error when submitting PO operation", s, t, O);
1036
+ }), console.error("Error when submitting PO operation", r, s, k);
1026
1037
  } finally {
1027
- i.value = "", l.value = !1, F.value = !0;
1038
+ f.value = "", d.value = !1, F.value = !0;
1028
1039
  }
1029
1040
  }
1030
- async function ne(t) {
1031
- if (t === k.enum.returnStock) {
1032
- u.purchaseOrder && n("returnStock", u.purchaseOrder), n("update:show", !1);
1041
+ async function ae(s) {
1042
+ if (s === R.enum.returnStock) {
1043
+ a.purchaseOrder && i("returnStock", a.purchaseOrder), i("update:show", !1);
1033
1044
  return;
1034
1045
  }
1035
- if (t === k.enum.receiveStock)
1046
+ if (s === R.enum.receiveStock)
1036
1047
  return;
1037
- const s = ot[t];
1038
- if (!s) {
1039
- R.open({
1048
+ const r = ot[s];
1049
+ if (!r) {
1050
+ x.open({
1040
1051
  title: "Something went wrong",
1041
- message: `Cannot process order: ${st(t)}`,
1052
+ message: `Cannot process order: ${st(s)}`,
1042
1053
  type: "error"
1043
1054
  });
1044
1055
  return;
1045
1056
  }
1046
- const { successMessage: x, ...O } = s;
1047
- S.open({
1048
- title: O.title,
1049
- message: O.message,
1050
- primaryActions: O.primaryActions
1057
+ const { successMessage: O, ...k } = r;
1058
+ w.open({
1059
+ title: k.title,
1060
+ message: k.message,
1061
+ primaryActions: k.primaryActions
1051
1062
  }).onPrimary(() => {
1052
- u.purchaseOrder && Ie(u.purchaseOrder, t, x);
1063
+ a.purchaseOrder && Ie(a.purchaseOrder, s, O);
1053
1064
  });
1054
1065
  }
1055
1066
  const Le = X(() => {
1056
- var t, s;
1057
- return ((t = u.purchaseOrder) == null ? void 0 : t.status) === j.enum.RECEIVING || ((s = u.purchaseOrder) == null ? void 0 : s.status) === j.enum.COMPLETE;
1067
+ var s, r;
1068
+ return ((s = a.purchaseOrder) == null ? void 0 : s.status) === j.enum.RECEIVING || ((r = a.purchaseOrder) == null ? void 0 : r.status) === j.enum.COMPLETE;
1058
1069
  }), Fe = X(() => {
1059
1070
  var C, G, g;
1060
- const x = (((C = u.purchaseOrder) == null ? void 0 : C.deliveryOrder) ?? []).flatMap((w) => w.received ?? []).reduce(
1061
- (w, I) => {
1062
- const V = w[I.sku._id] ?? [];
1063
- return w[I.sku._id] = [...V, I], w;
1071
+ const O = (((C = a.purchaseOrder) == null ? void 0 : C.deliveryOrder) ?? []).flatMap((S) => S.received ?? []).reduce(
1072
+ (S, E) => {
1073
+ const V = S[E.sku._id] ?? [];
1074
+ return S[E.sku._id] = [...V, E], S;
1064
1075
  },
1065
1076
  {}
1066
- ), O = Object.entries(x).reduce(
1067
- (w, [I, V]) => {
1068
- const L = V.reduce((W, oe) => {
1069
- const le = pt(
1077
+ ), k = Object.entries(O).reduce(
1078
+ (S, [E, V]) => {
1079
+ const I = V.reduce((W, ne) => {
1080
+ const oe = pt(
1070
1081
  W,
1071
- Math.max(W.precision, oe.amount.precision)
1082
+ Math.max(W.precision, ne.amount.precision)
1072
1083
  );
1073
- return Ke(le, oe.amount);
1084
+ return Ke(oe, ne.amount);
1074
1085
  }, qe(0));
1075
- return w[I] = L, w;
1086
+ return S[E] = I, S;
1076
1087
  },
1077
1088
  {}
1078
- ), P = ((G = u.purchaseOrder) == null ? void 0 : G.items) ?? [];
1079
- for (const w of P)
1080
- O[g = w.sku._id] ?? (O[g] = qe(0));
1081
- return O;
1089
+ ), P = ((G = a.purchaseOrder) == null ? void 0 : G.items) ?? [];
1090
+ for (const S of P)
1091
+ k[g = S.sku._id] ?? (k[g] = qe(0));
1092
+ return k;
1082
1093
  }), y = X(() => {
1083
1094
  var C, G;
1084
- const t = ((C = u.purchaseOrder) == null ? void 0 : C.deliveryOrder) ?? [], s = ((G = u.purchaseOrder) == null ? void 0 : G.deliveryFullfillment) ?? [], x = [
1085
- ...t.map((g) => ({
1095
+ const s = ((C = a.purchaseOrder) == null ? void 0 : C.deliveryOrder) ?? [], r = ((G = a.purchaseOrder) == null ? void 0 : G.deliveryFullfillment) ?? [], O = [
1096
+ ...s.map((g) => ({
1086
1097
  createdAt: g.createdAt,
1087
1098
  type: "grn",
1088
1099
  doc: g
1089
1100
  })),
1090
- ...s.map((g) => ({
1101
+ ...r.map((g) => ({
1091
1102
  createdAt: g.createdAt,
1092
1103
  type: "fulfillment",
1093
1104
  doc: g
1094
1105
  }))
1095
1106
  ];
1096
- x.reverse().sort((g, w) => g.createdAt.localeCompare(w.createdAt));
1097
- function O(g) {
1098
- var I, V, L, W, oe, le, me;
1099
- const w = s.findIndex((H) => H.id === g.fullfillmentId);
1107
+ O.reverse().sort((g, S) => g.createdAt.localeCompare(S.createdAt));
1108
+ function k(g) {
1109
+ var E, V, I, W, ne, oe, me;
1110
+ const S = r.findIndex((H) => H.id === g.fullfillmentId);
1100
1111
  return {
1101
1112
  header: "Received",
1102
1113
  date: Me(new Date(g.createdAt)),
1103
1114
  info: [
1104
1115
  {
1105
1116
  label: "Received by",
1106
- values: [(I = g.createdBy) == null ? void 0 : I.name]
1117
+ values: [(E = g.createdBy) == null ? void 0 : E.name]
1107
1118
  },
1108
1119
  {
1109
1120
  label: "Received items",
@@ -1188,15 +1199,15 @@ const Rt = {
1188
1199
  label: "Remark",
1189
1200
  values: [g.remark]
1190
1201
  } : null,
1191
- w > -1 ? {
1202
+ S > -1 ? {
1192
1203
  label: "Fulfilment's sequence",
1193
- values: [`${w + 1}`]
1204
+ values: [`${S + 1}`]
1194
1205
  } : null,
1195
- (L = (V = s[w]) == null ? void 0 : V.netSuite) != null && L.refNo ? {
1206
+ (I = (V = r[S]) == null ? void 0 : V.netSuite) != null && I.refNo ? {
1196
1207
  label: "Fulfillment's ref no. (Netsuite)",
1197
- values: [(oe = (W = s[w]) == null ? void 0 : W.netSuite) == null ? void 0 : oe.refNo]
1208
+ values: [(ne = (W = r[S]) == null ? void 0 : W.netSuite) == null ? void 0 : ne.refNo]
1198
1209
  } : null,
1199
- (le = g == null ? void 0 : g.netSuite) != null && le.refNo ? {
1210
+ (oe = g == null ? void 0 : g.netSuite) != null && oe.refNo ? {
1200
1211
  label: "Item receipt (Netsuite)",
1201
1212
  values: [(me = g == null ? void 0 : g.netSuite) == null ? void 0 : me.refNo]
1202
1213
  } : null
@@ -1204,19 +1215,19 @@ const Rt = {
1204
1215
  };
1205
1216
  }
1206
1217
  function P(g) {
1207
- var I, V;
1208
- const w = s.findIndex((L) => L.id === g.id);
1218
+ var E, V;
1219
+ const S = r.findIndex((I) => I.id === g.id);
1209
1220
  return {
1210
1221
  header: "Fulfillment",
1211
1222
  date: Me(new Date(g.createdAt)),
1212
1223
  info: [
1213
1224
  {
1214
1225
  label: "Sequence",
1215
- values: [String(w + 1)]
1226
+ values: [String(S + 1)]
1216
1227
  },
1217
1228
  {
1218
1229
  label: "Receiveable items",
1219
- values: g.items.map((L) => {
1230
+ values: g.items.map((I) => {
1220
1231
  var W;
1221
1232
  return N("div", [
1222
1233
  N(
@@ -1236,14 +1247,14 @@ const Rt = {
1236
1247
  {
1237
1248
  class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
1238
1249
  },
1239
- `${L.sku.name}`
1250
+ `${I.sku.name}`
1240
1251
  ),
1241
1252
  N(
1242
1253
  "span",
1243
1254
  {
1244
1255
  class: "fm-typo-en-body-md-400"
1245
1256
  },
1246
- `${L.sku.code} `
1257
+ `${I.sku.code} `
1247
1258
  )
1248
1259
  ]
1249
1260
  ),
@@ -1264,14 +1275,14 @@ const Rt = {
1264
1275
  {
1265
1276
  class: "fm-typo-en-body-lg-600 self-end"
1266
1277
  },
1267
- Oe(L.amount, !1)
1278
+ Oe(I.amount, !1)
1268
1279
  ),
1269
1280
  N(
1270
1281
  "span",
1271
1282
  {
1272
1283
  class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1273
1284
  },
1274
- ((W = L.measurement) == null ? void 0 : W.abbrev) ?? L.sku.unit.abbrev
1285
+ ((W = I.measurement) == null ? void 0 : W.abbrev) ?? I.sku.unit.abbrev
1275
1286
  )
1276
1287
  ]
1277
1288
  ),
@@ -1280,7 +1291,7 @@ const Rt = {
1280
1291
  {
1281
1292
  class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
1282
1293
  },
1283
- `${L.cost ? `(${$e(L.cost)})` : ""}`
1294
+ `${I.cost ? `(${$e(I.cost)})` : ""}`
1284
1295
  )
1285
1296
  ]
1286
1297
  )
@@ -1289,69 +1300,69 @@ const Rt = {
1289
1300
  ]);
1290
1301
  })
1291
1302
  },
1292
- (I = g.netSuite) != null && I.refNo ? {
1303
+ (E = g.netSuite) != null && E.refNo ? {
1293
1304
  label: "Ref no. (Netsuite)",
1294
1305
  values: [(V = g.netSuite) == null ? void 0 : V.refNo]
1295
1306
  } : null
1296
- ].filter((L) => L)
1307
+ ].filter((I) => I)
1297
1308
  };
1298
1309
  }
1299
- return x.map((g) => {
1310
+ return O.map((g) => {
1300
1311
  switch (g.type) {
1301
1312
  case "grn":
1302
- return O(g.doc);
1313
+ return k(g.doc);
1303
1314
  case "fulfillment":
1304
1315
  return P(g.doc);
1305
1316
  }
1306
1317
  });
1307
1318
  }), h = X(() => {
1308
- var s;
1309
- const t = {
1319
+ var r;
1320
+ const s = {
1310
1321
  ...qe(0),
1311
1322
  currency: Ze()
1312
1323
  };
1313
- return ((s = u.purchaseOrder) == null ? void 0 : s.items.reduce((x, O) => ({
1314
- ...Ke(x, O.totalCost ?? t),
1324
+ return ((r = a.purchaseOrder) == null ? void 0 : r.items.reduce((O, k) => ({
1325
+ ...Ke(O, k.totalCost ?? s),
1315
1326
  currency: Ze()
1316
- }), t)) ?? t;
1327
+ }), s)) ?? s;
1317
1328
  });
1318
- return (t, s) => {
1319
- var W, oe;
1320
- const x = ue("FmButtonGroup"), O = ue("FmChip"), P = ue("FmMenuDivider"), C = ue("FmCard"), G = ue("FmIcon"), g = ue("FmTooltip"), w = ue("FmButton"), I = ue("FmSpacer"), V = ue("FmCircularProgress"), L = ue("FmSideSheet");
1321
- return c(), te(L, {
1322
- header: o(r)("inventory.transfer.receiveRequest.details.title") + ((W = t.purchaseOrder) != null && W.seqNumber ? ` #${(oe = t.purchaseOrder) == null ? void 0 : oe.seqNumber}` : ""),
1323
- modelValue: o(J),
1324
- "onUpdate:modelValue": s[11] || (s[11] = (le) => gt(J) ? J.value = le : null),
1329
+ return (s, r) => {
1330
+ var W, ne;
1331
+ const O = ce("FmButtonGroup"), k = ce("FmChip"), P = ce("FmMenuDivider"), C = ce("FmCard"), G = ce("FmIcon"), g = ce("FmTooltip"), S = ce("FmButton"), E = ce("FmSpacer"), V = ce("FmCircularProgress"), I = ce("FmSideSheet");
1332
+ return c(), se(I, {
1333
+ header: n(t)("inventory.transfer.receiveRequest.details.title") + ((W = s.purchaseOrder) != null && W.seqNumber ? ` #${(ne = s.purchaseOrder) == null ? void 0 : ne.seqNumber}` : ""),
1334
+ modelValue: n(J),
1335
+ "onUpdate:modelValue": r[11] || (r[11] = (oe) => gt(J) ? J.value = oe : null),
1325
1336
  "dismiss-away": F.value,
1326
1337
  "close-button": "",
1327
1338
  "max-width": 600
1328
1339
  }, {
1329
1340
  default: _e(() => {
1330
- var le, me, H, pe, Re, ke, De, Ne;
1341
+ var oe, me, H, pe, ke, Re, De, Ne;
1331
1342
  return [
1332
1343
  e("div", Gt, [
1333
1344
  e("div", null, [
1334
- B(x, {
1335
- items: de.value,
1345
+ B(O, {
1346
+ items: fe.value,
1336
1347
  modelValue: z.value,
1337
- "onUpdate:modelValue": s[0] || (s[0] = (b) => z.value = b)
1348
+ "onUpdate:modelValue": r[0] || (r[0] = (b) => z.value = b)
1338
1349
  }, null, 8, ["items", "modelValue"])
1339
1350
  ]),
1340
- z.value.value === "overview" ? (c(), _(se, { key: 0 }, [
1351
+ z.value.value === "overview" ? (c(), _(re, { key: 0 }, [
1341
1352
  e("div", null, [
1342
1353
  B(C, {
1343
1354
  variant: "outlined",
1344
1355
  class: "flex flex-col gap-8 px-12 py-16"
1345
1356
  }, {
1346
1357
  default: _e(() => {
1347
- var b, A, $, ie, ce, fe, ve, ye, Z, he, Ae, Te;
1358
+ var b, A, $, le, ie, ue, ve, ye, ee, he, Ae, Te;
1348
1359
  return [
1349
1360
  e("div", Ht, [
1350
- e("div", zt, m(o(r)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
1361
+ e("div", zt, m(n(t)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
1351
1362
  e("div", null, [
1352
- B(O, {
1353
- label: o(r)(`inventory.transfer.status.${(b = t.purchaseOrder) == null ? void 0 : b.status}`),
1354
- class: ge(`fm-status-badge fm-status-badge-${($ = (A = t.purchaseOrder) == null ? void 0 : A.status) == null ? void 0 : $.toLocaleLowerCase("en-us")}`),
1363
+ B(k, {
1364
+ label: n(t)(`inventory.transfer.status.${(b = s.purchaseOrder) == null ? void 0 : b.status}`),
1365
+ class: ge(`fm-status-badge fm-status-badge-${($ = (A = s.purchaseOrder) == null ? void 0 : A.status) == null ? void 0 : $.toLocaleLowerCase("en-us")}`),
1355
1366
  compact: ""
1356
1367
  }, null, 8, ["label", "class"])
1357
1368
  ])
@@ -1360,35 +1371,35 @@ const Rt = {
1360
1371
  e("div", Qt, [
1361
1372
  e("div", Yt, [
1362
1373
  e("div", Wt, [
1363
- e("div", Xt, m(o(r)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1374
+ e("div", Xt, m(n(t)("inventory.transfer.receiveRequest.details.createdAt")), 1)
1364
1375
  ]),
1365
- e("div", Jt, m(o(Ee)(((ie = t.purchaseOrder) == null ? void 0 : ie._id) ?? "")), 1)
1376
+ e("div", Jt, m(n(Ee)(((le = s.purchaseOrder) == null ? void 0 : le._id) ?? "")), 1)
1366
1377
  ]),
1367
- (ce = t.purchaseOrder) != null && ce.effectiveAt ? (c(), _("div", Zt, [
1368
- e("div", es, m(o(r)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
1369
- e("div", ts, m(o(rt)(new Date((fe = t.purchaseOrder) == null ? void 0 : fe.effectiveAt))), 1)
1378
+ (ie = s.purchaseOrder) != null && ie.effectiveAt ? (c(), _("div", Zt, [
1379
+ e("div", es, m(n(t)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
1380
+ e("div", ts, m(n(rt)(new Date((ue = s.purchaseOrder) == null ? void 0 : ue.effectiveAt))), 1)
1370
1381
  ])) : D("", !0),
1371
1382
  e("div", ss, [
1372
- e("div", rs, m(o(r)("inventory.transfer.receiveRequest.details.type.title")), 1),
1373
- e("div", as, m(o(r)(
1374
- `inventory.transfer.receiveRequest.details.type.${a.value.toLocaleLowerCase("en-US")}`
1383
+ e("div", rs, m(n(t)("inventory.transfer.receiveRequest.details.type.title")), 1),
1384
+ e("div", as, m(n(t)(
1385
+ `inventory.transfer.receiveRequest.details.type.${o.value.toLocaleLowerCase("en-US")}`
1375
1386
  )), 1)
1376
1387
  ]),
1377
- (ye = (ve = t.purchaseOrder) == null ? void 0 : ve.supplier) != null && ye.name ? (c(), _("div", ns, [
1378
- e("div", os, m(o(r)("inventory.transfer.receiveRequest.details.from")), 1),
1379
- e("div", ls, m((he = (Z = t.purchaseOrder) == null ? void 0 : Z.supplier) == null ? void 0 : he.name), 1)
1388
+ (ye = (ve = s.purchaseOrder) == null ? void 0 : ve.supplier) != null && ye.name ? (c(), _("div", ns, [
1389
+ e("div", os, m(n(t)("inventory.transfer.receiveRequest.details.from")), 1),
1390
+ e("div", ls, m((he = (ee = s.purchaseOrder) == null ? void 0 : ee.supplier) == null ? void 0 : he.name), 1)
1380
1391
  ])) : D("", !0),
1381
- t.transferTo ? (c(), _("div", is, [
1382
- e("div", cs, m(o(r)("inventory.transfer.receiveRequest.details.to")), 1),
1383
- e("div", us, m(t.transferTo), 1)
1392
+ s.transferTo ? (c(), _("div", is, [
1393
+ e("div", cs, m(n(t)("inventory.transfer.receiveRequest.details.to")), 1),
1394
+ e("div", us, m(s.transferTo), 1)
1384
1395
  ])) : D("", !0),
1385
- (Ae = t.purchaseOrder) != null && Ae.ref ? (c(), _("div", ds, [
1386
- e("div", fs, m(o(r)("inventory.transfer.receiveRequest.details.reference")), 1),
1387
- e("div", ms, m(t.purchaseOrder.ref), 1)
1396
+ (Ae = s.purchaseOrder) != null && Ae.ref ? (c(), _("div", ds, [
1397
+ e("div", fs, m(n(t)("inventory.transfer.receiveRequest.details.reference")), 1),
1398
+ e("div", ms, m(s.purchaseOrder.ref), 1)
1388
1399
  ])) : D("", !0),
1389
- (Te = t.purchaseOrder) != null && Te.remark ? (c(), _("div", ps, [
1390
- e("div", vs, m(o(r)("inventory.transfer.receiveRequest.details.remark")), 1),
1391
- e("div", ys, m(t.purchaseOrder.remark), 1)
1400
+ (Te = s.purchaseOrder) != null && Te.remark ? (c(), _("div", ps, [
1401
+ e("div", vs, m(n(t)("inventory.transfer.receiveRequest.details.remark")), 1),
1402
+ e("div", ys, m(s.purchaseOrder.remark), 1)
1392
1403
  ])) : D("", !0)
1393
1404
  ])
1394
1405
  ];
@@ -1396,33 +1407,33 @@ const Rt = {
1396
1407
  _: 1
1397
1408
  })
1398
1409
  ]),
1399
- d.value ? D("", !0) : (c(), _("div", hs, [
1410
+ l.value ? D("", !0) : (c(), _("div", hs, [
1400
1411
  e("div", gs, [
1401
- s[12] || (s[12] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
1412
+ r[12] || (r[12] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
1402
1413
  e("div", null, [
1403
1414
  B(Kt, {
1404
- "po-request": t.poRequest,
1405
- "purchase-order": t.purchaseOrder,
1406
- "is-transfer-between-outlets": d.value
1415
+ "po-request": s.poRequest,
1416
+ "purchase-order": s.purchaseOrder,
1417
+ "is-transfer-between-outlets": l.value
1407
1418
  }, null, 8, ["po-request", "purchase-order", "is-transfer-between-outlets"])
1408
1419
  ])
1409
1420
  ]),
1410
1421
  B(P),
1411
1422
  B(jt, {
1412
- "po-request": t.poRequest,
1413
- "purchase-order": t.purchaseOrder,
1414
- "transfer-type": a.value,
1415
- "transfer-to-db-name": t.transferToDbName,
1416
- "is-transfer-between-outlets": d.value,
1417
- scope: t.scope
1423
+ "po-request": s.poRequest,
1424
+ "purchase-order": s.purchaseOrder,
1425
+ "transfer-type": o.value,
1426
+ "transfer-to-db-name": s.transferToDbName,
1427
+ "is-transfer-between-outlets": l.value,
1428
+ scope: s.scope
1418
1429
  }, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
1419
1430
  ])),
1420
1431
  e("div", bs, [
1421
1432
  e("div", _s, [
1422
1433
  e("div", Ss, [
1423
1434
  e("span", ws, [
1424
- je(m(Le.value ? o(r)("inventory.transfer.receiveRequest.details.receivedItems") : o(r)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
1425
- (me = (le = t.purchaseOrder) == null ? void 0 : le.netSuite) != null && me.missingItems && ((pe = (H = t.purchaseOrder) == null ? void 0 : H.netSuite) == null ? void 0 : pe.missingItems.length) > 0 ? (c(), te(g, {
1435
+ je(m(Le.value ? n(t)("inventory.transfer.receiveRequest.details.receivedItems") : n(t)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
1436
+ (me = (oe = s.purchaseOrder) == null ? void 0 : oe.netSuite) != null && me.missingItems && ((pe = (H = s.purchaseOrder) == null ? void 0 : H.netSuite) == null ? void 0 : pe.missingItems.length) > 0 ? (c(), se(g, {
1426
1437
  key: 0,
1427
1438
  variant: "rich",
1428
1439
  placement: "top",
@@ -1432,9 +1443,9 @@ const Rt = {
1432
1443
  var b, A;
1433
1444
  return [
1434
1445
  e("div", xs, [
1435
- (c(!0), _(se, null, Se((A = (b = t.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : A.missingItems, ($, ie) => (c(), _("div", {
1446
+ (c(!0), _(re, null, Se((A = (b = s.purchaseOrder) == null ? void 0 : b.netSuite) == null ? void 0 : A.missingItems, ($, le) => (c(), _("div", {
1436
1447
  class: "flex justify-center align-middle",
1437
- key: ie
1448
+ key: le
1438
1449
  }, [
1439
1450
  B(G, {
1440
1451
  name: "arrow_right",
@@ -1456,13 +1467,13 @@ const Rt = {
1456
1467
  })) : D("", !0)
1457
1468
  ]),
1458
1469
  e("div", null, [
1459
- Y.value && T.value != null && !((Re = T.value) != null && Re.length) ? (c(), te(w, {
1470
+ Z.value && T.value != null && !((ke = T.value) != null && ke.length) ? (c(), se(S, {
1460
1471
  key: 0,
1461
1472
  label: "Return",
1462
1473
  variant: "secondary",
1463
- onClick: s[1] || (s[1] = (b) => ne("returnStock")),
1464
- loading: i.value === "returnStock",
1465
- disabled: i.value !== "returnStock" && l.value,
1474
+ onClick: r[1] || (r[1] = (b) => ae("returnStock")),
1475
+ loading: f.value === "returnStock",
1476
+ disabled: f.value !== "returnStock" && d.value,
1466
1477
  "prepend-icon": "undo",
1467
1478
  "text-color": "primary",
1468
1479
  "bg-color": "transparent",
@@ -1471,36 +1482,36 @@ const Rt = {
1471
1482
  ])
1472
1483
  ]),
1473
1484
  B(P),
1474
- (c(!0), _(se, null, Se(((ke = t.purchaseOrder) == null ? void 0 : ke.items) ?? [], (b) => {
1485
+ (c(!0), _(re, null, Se(((Re = s.purchaseOrder) == null ? void 0 : Re.items) ?? [], (b) => {
1475
1486
  var A;
1476
1487
  return c(), _("div", {
1477
1488
  key: b.code,
1478
1489
  class: "flex flex-col"
1479
1490
  }, [
1480
1491
  e("div", Os, [
1481
- e("div", Rs, m(b.name), 1),
1482
- e("div", ks, m(o(Oe)(Fe.value[b.sku._id], !1)) + "/" + m(o(Ge)(b.quantity, b.sku.unit, b.measurement)), 1)
1492
+ e("div", ks, m(b.name), 1),
1493
+ e("div", Rs, m(n(Oe)(Fe.value[b.sku._id], !1)) + "/" + m(n(Ge)(b.quantity, b.sku.unit, b.measurement)), 1)
1483
1494
  ]),
1484
1495
  e("div", Ds, [
1485
1496
  e("div", Ns, m(b.code), 1),
1486
- (A = b.totalCost) != null && A.amount && o(E).enableTotalCost ? (c(), _("div", As, " (" + m(o($e)(b.totalCost)) + ") ", 1)) : D("", !0)
1497
+ (A = b.totalCost) != null && A.amount && n(L).enableTotalCost ? (c(), _("div", As, " (" + m(n($e)(b.totalCost)) + ") ", 1)) : D("", !0)
1487
1498
  ])
1488
1499
  ]);
1489
1500
  }), 128)),
1490
- +o(Oe)(h.value) ? (c(), _(se, { key: 0 }, [
1501
+ +n(Oe)(h.value) ? (c(), _(re, { key: 0 }, [
1491
1502
  e("div", Ts, [
1492
1503
  B(P)
1493
1504
  ]),
1494
1505
  e("div", $s, [
1495
- s[13] || (s[13] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
1496
- e("div", Ps, m(o($e)(h.value)), 1)
1506
+ r[13] || (r[13] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
1507
+ e("div", Ps, m(n($e)(h.value)), 1)
1497
1508
  ])
1498
1509
  ], 64)) : D("", !0)
1499
1510
  ])
1500
1511
  ])
1501
1512
  ], 64)) : z.value.value === "deliveryHistory" ? (c(), _("div", Cs, [
1502
1513
  y.value.length ? (c(), _("div", Fs, [
1503
- (c(!0), _(se, null, Se(y.value, (b, A) => (c(), _(se, { key: A }, [
1514
+ (c(!0), _(re, null, Se(y.value, (b, A) => (c(), _(re, { key: A }, [
1504
1515
  e("div", Us, [
1505
1516
  e("div", Bs, [
1506
1517
  e("div", Ms, [
@@ -1514,7 +1525,7 @@ const Rt = {
1514
1525
  ])
1515
1526
  }, null, 2)
1516
1527
  ]),
1517
- s[14] || (s[14] = e("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
1528
+ r[14] || (r[14] = e("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
1518
1529
  e("div", js, [
1519
1530
  e("div", {
1520
1531
  class: ge([
@@ -1553,19 +1564,19 @@ const Rt = {
1553
1564
  }, {
1554
1565
  default: _e(() => [
1555
1566
  e("div", Ws, [
1556
- (c(!0), _(se, null, Se(b.info, ($, ie) => (c(), _("div", {
1557
- key: ie,
1567
+ (c(!0), _(re, null, Se(b.info, ($, le) => (c(), _("div", {
1568
+ key: le,
1558
1569
  class: "flex flex-col gap-4"
1559
1570
  }, [
1560
1571
  e("div", Xs, m($ == null ? void 0 : $.label), 1),
1561
1572
  e("div", Js, [
1562
- (c(!0), _(se, null, Se($ == null ? void 0 : $.values, (ce, fe) => (c(), _("div", {
1563
- key: fe,
1573
+ (c(!0), _(re, null, Se($ == null ? void 0 : $.values, (ie, ue) => (c(), _("div", {
1574
+ key: ue,
1564
1575
  class: "fm-typo-en-body-lg-600"
1565
1576
  }, [
1566
- typeof ce == "string" ? (c(), _(se, { key: 0 }, [
1567
- je(m(ce), 1)
1568
- ], 64)) : (c(), te(bt(ce), { key: 1 }))
1577
+ typeof ie == "string" ? (c(), _(re, { key: 0 }, [
1578
+ je(m(ie), 1)
1579
+ ], 64)) : (c(), se(bt(ie), { key: 1 }))
1569
1580
  ]))), 128))
1570
1581
  ])
1571
1582
  ]))), 128))
@@ -1577,25 +1588,25 @@ const Rt = {
1577
1588
  ])
1578
1589
  ], 64))), 128))
1579
1590
  ])) : (c(), _("div", qs, [
1580
- B(I),
1591
+ B(E),
1581
1592
  e("div", null, [
1582
1593
  e("img", {
1583
- src: o(et),
1594
+ src: n(et),
1584
1595
  alt: "List is empty"
1585
1596
  }, null, 8, Es)
1586
1597
  ]),
1587
- e("div", Is, m(o(r)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
1588
- e("div", Ls, m(o(r)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
1589
- B(I),
1590
- B(I)
1598
+ e("div", Is, m(n(t)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
1599
+ e("div", Ls, m(n(t)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
1600
+ B(E),
1601
+ B(E)
1591
1602
  ]))
1592
- ])) : z.value.value === "returns" && Y.value ? (c(), _("div", Zs, [
1593
- re.value ? (c(), _("div", er, [
1594
- s[15] || (s[15] = e("div", { class: "h-80" }, null, -1)),
1603
+ ])) : z.value.value === "returns" && Z.value ? (c(), _("div", Zs, [
1604
+ Y.value ? (c(), _("div", er, [
1605
+ r[15] || (r[15] = e("div", { class: "h-80" }, null, -1)),
1595
1606
  B(V),
1596
- s[16] || (s[16] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400" }, "Loading...", -1))
1607
+ r[16] || (r[16] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400" }, "Loading...", -1))
1597
1608
  ])) : (De = T.value) != null && De.length ? (c(), _("div", nr, [
1598
- (c(!0), _(se, null, Se(T.value, (b, A) => (c(), _(se, {
1609
+ (c(!0), _(re, null, Se(T.value, (b, A) => (c(), _(re, {
1599
1610
  key: b._id
1600
1611
  }, [
1601
1612
  e("div", or, [
@@ -1611,7 +1622,7 @@ const Rt = {
1611
1622
  ])
1612
1623
  }, null, 2)
1613
1624
  ]),
1614
- s[19] || (s[19] = e("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
1625
+ r[19] || (r[19] = e("div", { class: "h-24 w-24 bg-fm-color-primary rounded-full" }, null, -1)),
1615
1626
  e("div", cr, [
1616
1627
  e("div", {
1617
1628
  class: ge([
@@ -1631,13 +1642,13 @@ const Rt = {
1631
1642
  e("span", mr, [
1632
1643
  e("span", {
1633
1644
  class: ge(`fm-status-badge fm-status-badge-${`${b.status}`.toLocaleLowerCase("en-us")}`)
1634
- }, m(o(r)(`inventory.transfer.status.${b.status}`)), 3)
1645
+ }, m(n(t)(`inventory.transfer.status.${b.status}`)), 3)
1635
1646
  ])
1636
1647
  ]),
1637
- e("div", pr, m(o(Me)(o(vt)(b._id))), 1)
1648
+ e("div", pr, m(n(Me)(n(vt)(b._id))), 1)
1638
1649
  ]),
1639
1650
  e("div", vr, [
1640
- B(w, {
1651
+ B(S, {
1641
1652
  variant: "secondary",
1642
1653
  label: "Print",
1643
1654
  "prepend-icon": "print",
@@ -1645,21 +1656,21 @@ const Rt = {
1645
1656
  "bg-color": "transparent",
1646
1657
  "border-color": "primary",
1647
1658
  onClick: ($) => {
1648
- var ie, ce, fe, ve, ye, Z, he, Ae, Te;
1649
- return o(lt)(
1659
+ var le, ie, ue, ve, ye, ee, he, Ae, Te;
1660
+ return n(lt)(
1650
1661
  {
1651
1662
  ...b,
1652
1663
  ref: [
1653
1664
  b.ref,
1654
- (ce = (ie = M.value[b._id]) == null ? void 0 : ie.netSuite) != null && ce.refNo ? `Netsuite ${(ve = (fe = M.value[b._id]) == null ? void 0 : fe.netSuite) == null ? void 0 : ve.refNo} (${(Z = (ye = M.value[b._id]) == null ? void 0 : ye.netSuite) == null ? void 0 : Z.id})` : ""
1665
+ (ie = (le = M.value[b._id]) == null ? void 0 : le.netSuite) != null && ie.refNo ? `Netsuite ${(ve = (ue = M.value[b._id]) == null ? void 0 : ue.netSuite) == null ? void 0 : ve.refNo} (${(ee = (ye = M.value[b._id]) == null ? void 0 : ye.netSuite) == null ? void 0 : ee.id})` : ""
1655
1666
  ].filter((Ue) => Ue == null ? void 0 : Ue.trim()).join()
1656
1667
  },
1657
1668
  {
1658
1669
  doc: {
1659
1670
  profile: {
1660
- name: (he = t.purchaseOrder) == null ? void 0 : he.supplier.name,
1661
- address: (Ae = t.purchaseOrder) == null ? void 0 : Ae.supplier.address,
1662
- regNo: (Te = t.purchaseOrder) == null ? void 0 : Te.supplier.registrationNumber
1671
+ name: (he = s.purchaseOrder) == null ? void 0 : he.supplier.name,
1672
+ address: (Ae = s.purchaseOrder) == null ? void 0 : Ae.supplier.address,
1673
+ regNo: (Te = s.purchaseOrder) == null ? void 0 : Te.supplier.registrationNumber
1663
1674
  }
1664
1675
  }
1665
1676
  }
@@ -1689,30 +1700,30 @@ const Rt = {
1689
1700
  class: "py-12 px-16"
1690
1701
  }, {
1691
1702
  default: _e(() => {
1692
- var $, ie, ce, fe, ve, ye;
1703
+ var $, le, ie, ue, ve, ye;
1693
1704
  return [
1694
1705
  e("div", _r, [
1695
- (ie = ($ = M.value[b._id]) == null ? void 0 : $.netSuite) != null && ie.id ? (c(), _(se, { key: 0 }, [
1706
+ (le = ($ = M.value[b._id]) == null ? void 0 : $.netSuite) != null && le.id ? (c(), _(re, { key: 0 }, [
1696
1707
  e("div", Sr, [
1697
- s[20] || (s[20] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Netsuite transfer order (ID) ", -1)),
1698
- e("div", wr, m((fe = (ce = M.value[b._id]) == null ? void 0 : ce.netSuite) == null ? void 0 : fe.refNo) + " (" + m((ye = (ve = M.value[b._id]) == null ? void 0 : ve.netSuite) == null ? void 0 : ye.id) + ") ", 1)
1708
+ r[20] || (r[20] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Netsuite transfer order (ID) ", -1)),
1709
+ e("div", wr, m((ue = (ie = M.value[b._id]) == null ? void 0 : ie.netSuite) == null ? void 0 : ue.refNo) + " (" + m((ye = (ve = M.value[b._id]) == null ? void 0 : ve.netSuite) == null ? void 0 : ye.id) + ") ", 1)
1699
1710
  ]),
1700
1711
  B(P)
1701
1712
  ], 64)) : D("", !0),
1702
- s[21] || (s[21] = e("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Returning items ", -1)),
1703
- (c(!0), _(se, null, Se((b == null ? void 0 : b.items) ?? [], (Z) => {
1713
+ r[21] || (r[21] = e("div", { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, " Returning items ", -1)),
1714
+ (c(!0), _(re, null, Se((b == null ? void 0 : b.items) ?? [], (ee) => {
1704
1715
  var he;
1705
1716
  return c(), _("div", {
1706
- key: Z.code,
1717
+ key: ee.code,
1707
1718
  class: "flex flex-col"
1708
1719
  }, [
1709
1720
  e("div", xr, [
1710
- e("div", Or, m(Z.name), 1),
1711
- e("div", Rr, m(o(Ge)(Z.quantity, Z.sku.unit, Z.measurement)), 1)
1721
+ e("div", Or, m(ee.name), 1),
1722
+ e("div", kr, m(n(Ge)(ee.quantity, ee.sku.unit, ee.measurement)), 1)
1712
1723
  ]),
1713
- e("div", kr, [
1714
- e("div", Dr, m(Z.code), 1),
1715
- (he = Z.totalCost) != null && he.amount && o(E).enableTotalCost ? (c(), _("div", Nr, " (" + m(o($e)(Z.totalCost)) + ") ", 1)) : D("", !0)
1724
+ e("div", Rr, [
1725
+ e("div", Dr, m(ee.code), 1),
1726
+ (he = ee.totalCost) != null && he.amount && n(L).enableTotalCost ? (c(), _("div", Nr, " (" + m(n($e)(ee.totalCost)) + ") ", 1)) : D("", !0)
1716
1727
  ])
1717
1728
  ]);
1718
1729
  }), 128))
@@ -1725,23 +1736,23 @@ const Rt = {
1725
1736
  ])
1726
1737
  ], 64))), 128))
1727
1738
  ])) : (c(), _("div", tr, [
1728
- s[17] || (s[17] = e("div", { class: "h-80" }, null, -1)),
1739
+ r[17] || (r[17] = e("div", { class: "h-80" }, null, -1)),
1729
1740
  e("div", null, [
1730
1741
  e("img", {
1731
- src: o(et),
1742
+ src: n(et),
1732
1743
  alt: "List is empty"
1733
1744
  }, null, 8, sr)
1734
1745
  ]),
1735
- e("div", rr, m(o(r)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
1736
- s[18] || (s[18] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, " You may view return request history here. ", -1)),
1746
+ e("div", rr, m(n(t)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
1747
+ r[18] || (r[18] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, " You may view return request history here. ", -1)),
1737
1748
  e("div", ar, [
1738
- Y.value && T.value != null && !((Ne = T.value) != null && Ne.length) ? (c(), te(w, {
1749
+ Z.value && T.value != null && !((Ne = T.value) != null && Ne.length) ? (c(), se(S, {
1739
1750
  key: 0,
1740
1751
  label: "Create return request",
1741
1752
  variant: "secondary",
1742
- onClick: s[2] || (s[2] = (b) => ne("returnStock")),
1743
- loading: i.value === "returnStock",
1744
- disabled: i.value !== "returnStock" && l.value,
1753
+ onClick: r[2] || (r[2] = (b) => ae("returnStock")),
1754
+ loading: f.value === "returnStock",
1755
+ disabled: f.value !== "returnStock" && d.value,
1745
1756
  "prepend-icon": "undo",
1746
1757
  "text-color": "primary",
1747
1758
  "bg-color": "transparent",
@@ -1754,65 +1765,65 @@ const Rt = {
1754
1765
  ];
1755
1766
  }),
1756
1767
  "side-sheet-footer": _e(() => {
1757
- var le, me, H, pe, Re, ke, De, Ne, b, A;
1768
+ var oe, me, H, pe, ke, Re, De, Ne, b, A;
1758
1769
  return [
1759
1770
  e("div", Ar, [
1760
- ((le = t.purchaseOrder) == null ? void 0 : le.status) === o(j).enum.DRAFT && a.value === o(be).PURCHASE ? (c(), te(w, {
1771
+ ((oe = s.purchaseOrder) == null ? void 0 : oe.status) === n(j).enum.DRAFT && o.value === n(be).PURCHASE ? (c(), se(S, {
1761
1772
  key: 0,
1762
- label: o(r)("inventory.transfer.receiveRequest.actions.confirmDraft"),
1763
- onClick: s[3] || (s[3] = ($) => ne("confirmDraft")),
1764
- loading: i.value === "confirmDraft",
1765
- disabled: i.value !== "confirmDraft" && l.value
1773
+ label: n(t)("inventory.transfer.receiveRequest.actions.confirmDraft"),
1774
+ onClick: r[3] || (r[3] = ($) => ae("confirmDraft")),
1775
+ loading: f.value === "confirmDraft",
1776
+ disabled: f.value !== "confirmDraft" && d.value
1766
1777
  }, null, 8, ["label", "loading", "disabled"])) : D("", !0),
1767
- ((me = t.purchaseOrder) == null ? void 0 : me.status) === o(j).enum.DRAFT && a.value === o(be).TRANSFER ? (c(), te(w, {
1778
+ ((me = s.purchaseOrder) == null ? void 0 : me.status) === n(j).enum.DRAFT && o.value === n(be).TRANSFER ? (c(), se(S, {
1768
1779
  key: 1,
1769
- label: o(r)("inventory.transfer.receiveRequest.actions.submitRequest"),
1770
- onClick: s[4] || (s[4] = ($) => ne("submitRequest")),
1771
- loading: i.value === "submitRequest",
1772
- disabled: i.value !== "submitRequest" && l.value
1780
+ label: n(t)("inventory.transfer.receiveRequest.actions.submitRequest"),
1781
+ onClick: r[4] || (r[4] = ($) => ae("submitRequest")),
1782
+ loading: f.value === "submitRequest",
1783
+ disabled: f.value !== "submitRequest" && d.value
1773
1784
  }, null, 8, ["label", "loading", "disabled"])) : D("", !0),
1774
- ((H = t.purchaseOrder) == null ? void 0 : H.status) === o(j).enum.DRAFT ? (c(), te(w, {
1785
+ ((H = s.purchaseOrder) == null ? void 0 : H.status) === n(j).enum.DRAFT ? (c(), se(S, {
1775
1786
  key: 2,
1776
- label: o(r)("inventory.transfer.receiveRequest.actions.cancelDraft"),
1777
- onClick: s[5] || (s[5] = ($) => ne("cancelDraft")),
1778
- loading: i.value === "cancelDraft",
1779
- disabled: i.value !== "cancelDraft" && l.value,
1787
+ label: n(t)("inventory.transfer.receiveRequest.actions.cancelDraft"),
1788
+ onClick: r[5] || (r[5] = ($) => ae("cancelDraft")),
1789
+ loading: f.value === "cancelDraft",
1790
+ disabled: f.value !== "cancelDraft" && d.value,
1780
1791
  variant: "destructive"
1781
1792
  }, null, 8, ["label", "loading", "disabled"])) : D("", !0),
1782
- ((pe = t.purchaseOrder) == null ? void 0 : pe.status) === o(j).enum.RECEIVING ? (c(), te(w, {
1793
+ ((pe = s.purchaseOrder) == null ? void 0 : pe.status) === n(j).enum.RECEIVING ? (c(), se(S, {
1783
1794
  key: 3,
1784
- label: o(r)("inventory.transfer.receiveRequest.actions.completeReceive"),
1785
- onClick: s[6] || (s[6] = ($) => ne("completeReceive")),
1786
- loading: i.value === "completeReceive",
1787
- disabled: i.value !== "completeReceive" && l.value
1795
+ label: n(t)("inventory.transfer.receiveRequest.actions.completeReceive"),
1796
+ onClick: r[6] || (r[6] = ($) => ae("completeReceive")),
1797
+ loading: f.value === "completeReceive",
1798
+ disabled: f.value !== "completeReceive" && d.value
1788
1799
  }, null, 8, ["label", "loading", "disabled"])) : D("", !0),
1789
- t.canResubmit ? (c(), te(w, {
1800
+ s.canResubmit ? (c(), se(S, {
1790
1801
  key: 4,
1791
- label: o(r)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
1792
- onClick: s[7] || (s[7] = ($) => ne("submitRequest")),
1793
- loading: i.value === "submitRequest",
1794
- disabled: i.value !== "submitRequest" && l.value
1802
+ label: n(t)("inventory.transfer.receiveRequest.actions.resubmitRequest"),
1803
+ onClick: r[7] || (r[7] = ($) => ae("submitRequest")),
1804
+ loading: f.value === "submitRequest",
1805
+ disabled: f.value !== "submitRequest" && d.value
1795
1806
  }, null, 8, ["label", "loading", "disabled"])) : D("", !0),
1796
- (((Re = t.purchaseOrder) == null ? void 0 : Re.status) === o(j).enum.REQUESTING || ((ke = t.purchaseOrder) == null ? void 0 : ke.status) === o(j).enum.PROCESSING) && t.canApprove ? (c(), te(w, {
1807
+ (((ke = s.purchaseOrder) == null ? void 0 : ke.status) === n(j).enum.REQUESTING || ((Re = s.purchaseOrder) == null ? void 0 : Re.status) === n(j).enum.PROCESSING) && s.canApprove ? (c(), se(S, {
1797
1808
  key: 5,
1798
- label: o(r)("inventory.transfer.approval.actions.approveRequest"),
1799
- onClick: s[8] || (s[8] = ($) => ne("approveRequest")),
1800
- loading: i.value === "approveRequest",
1801
- disabled: i.value !== "approveRequest" && l.value
1809
+ label: n(t)("inventory.transfer.approval.actions.approveRequest"),
1810
+ onClick: r[8] || (r[8] = ($) => ae("approveRequest")),
1811
+ loading: f.value === "approveRequest",
1812
+ disabled: f.value !== "approveRequest" && d.value
1802
1813
  }, null, 8, ["label", "loading", "disabled"])) : D("", !0),
1803
- ((De = t.purchaseOrder) == null ? void 0 : De.status) === o(j).enum.REQUESTING && t.canApprove ? (c(), te(w, {
1814
+ ((De = s.purchaseOrder) == null ? void 0 : De.status) === n(j).enum.REQUESTING && s.canApprove ? (c(), se(S, {
1804
1815
  key: 6,
1805
- label: o(r)("inventory.transfer.approval.actions.rejectRequest"),
1806
- onClick: s[9] || (s[9] = ($) => ne("rejectRequest")),
1807
- loading: i.value === "rejectRequest",
1808
- disabled: i.value !== "rejectRequest" && l.value,
1816
+ label: n(t)("inventory.transfer.approval.actions.rejectRequest"),
1817
+ onClick: r[9] || (r[9] = ($) => ae("rejectRequest")),
1818
+ loading: f.value === "rejectRequest",
1819
+ disabled: f.value !== "rejectRequest" && d.value,
1809
1820
  variant: "destructive"
1810
1821
  }, null, 8, ["label", "loading", "disabled"])) : D("", !0),
1811
- ((Ne = t.purchaseOrder) == null ? void 0 : Ne.status) !== o(j).enum.COMPLETE && ((b = t.purchaseOrder) == null ? void 0 : b.status) !== o(j).enum.CANCEL && (((A = t.purchaseOrder) == null ? void 0 : A.status) !== o(j).enum.REQUESTING || t.canApprove) ? (c(), te(w, {
1822
+ ((Ne = s.purchaseOrder) == null ? void 0 : Ne.status) !== n(j).enum.COMPLETE && ((b = s.purchaseOrder) == null ? void 0 : b.status) !== n(j).enum.CANCEL && (((A = s.purchaseOrder) == null ? void 0 : A.status) !== n(j).enum.REQUESTING || s.canApprove) ? (c(), se(S, {
1812
1823
  key: 7,
1813
- label: o(r)("common.close"),
1824
+ label: n(t)("common.close"),
1814
1825
  variant: "tertiary",
1815
- onClick: s[10] || (s[10] = ($) => n("update:show", !1))
1826
+ onClick: r[10] || (r[10] = ($) => i("update:show", !1))
1816
1827
  }, null, 8, ["label"])) : D("", !0)
1817
1828
  ])
1818
1829
  ];