@feedmepos/mf-inventory-portal 1.2.37-dev.6 → 1.2.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/{App-DyOQ_Xw7.js → App-CONrAP7y.js} +3 -3
  2. package/dist/{ApprovalView-DFHDYNum.js → ApprovalView-Cn9_7xk9.js} +5 -5
  3. package/dist/{BindingsDialog-B96VG07s.js → BindingsDialog-L7mP6sx9.js} +8 -8
  4. package/dist/{BindingsPicker-CoVDTRO0.js → BindingsPicker-DZqBMDUg.js} +2 -2
  5. package/dist/{BindingsTable-CuWHxqPQ.js → BindingsTable-DHkFDwiH.js} +3 -3
  6. package/dist/{ClosingDraftView-BINAvQcF.js → ClosingDraftView-BtSmlj0J.js} +8 -8
  7. package/dist/{ClosingHistoryView-CfLTNGoT.js → ClosingHistoryView-j83Wuxis.js} +22 -22
  8. package/dist/{ClosingTemplateView-BcXdjqXm.js → ClosingTemplateView-ZubBNFCd.js} +14 -14
  9. package/dist/{DeliveryOrderPrintPreview-Nna0OSHA.js → DeliveryOrderPrintPreview-DfS2E2tl.js} +9 -9
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DIQOehlo.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CoO6g5B9.js} +61 -60
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CPeUdEDm.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnMjbyPc.js} +2 -2
  12. package/dist/{FmMultiselectDialog-HYBXnDCU.js → FmMultiselectDialog-8_qMKCPt.js} +2 -2
  13. package/dist/{FmMultiselectDialog-B5KK1OWo.js → FmMultiselectDialog-vj94RVLU.js} +1 -1
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BWC0hDbD.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Dihv3KTq.js} +3 -3
  15. package/dist/{ImportView-C9k44bAB.js → ImportView--0ZbHtb9.js} +6 -6
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Cv4IIkAi.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bosdu_28.js} +1 -1
  17. package/dist/{IngredientGroupView-CAEAOvqh.js → IngredientGroupView-D937cHah.js} +5 -5
  18. package/dist/{IngredientsView-Bkri4LBD.js → IngredientsView-BNdvTpOT.js} +14 -14
  19. package/dist/{IntegrationView-kYveJ3xG.js → IntegrationView-Dm3Eur8-.js} +12 -12
  20. package/dist/{InventoryBindingForm-CPDdwuSS.js → InventoryBindingForm-rBhW4Snl.js} +1 -1
  21. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-IsUi_VNj.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Cvpi7GQx.js} +14 -14
  22. package/dist/{InventoryBindingSummary-1q4t4xZu.js → InventoryBindingSummary-emUM5QuA.js} +1 -1
  23. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BCBhdfk-.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DFW-jg1P.js} +1 -1
  24. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-xAhtpaev.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BOxIYl0Z.js} +2 -2
  25. package/dist/{PublishView-BofNsPUM.js → PublishView-CXRBcsxc.js} +3 -3
  26. package/dist/{PurchaseOrderPrintPreview-GwHl_m2O.js → PurchaseOrderPrintPreview-BvjDpyrq.js} +9 -9
  27. package/dist/ReceiveRequestView-TwL3yVCN.js +2821 -0
  28. package/dist/{RecipeView-bTDYHYsW.js → RecipeView-dggwqURE.js} +8 -8
  29. package/dist/{StockView-BcmJWszh.js → StockView-Cml9AuXX.js} +305 -300
  30. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CMSN_f71.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BTZa1E_o.js} +1 -1
  31. package/dist/{SupplierView-DmDPwcVZ.js → SupplierView-CnD2QpE7.js} +11 -11
  32. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CKcmdIYZ.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DIbaHfbR.js} +2 -2
  33. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CtXx2kvG.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DeD1jiXL.js} +1 -1
  34. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-JFJLlP7n.js → TransferDetails.vue_vue_type_script_setup_true_lang-Y0eaTjgd.js} +374 -374
  35. package/dist/{TransferTemplateView-p3IubYSO.js → TransferTemplateView-DytfORlu.js} +354 -354
  36. package/dist/{UnitView-WtDMm46P.js → UnitView-ZUo-3Em1.js} +6 -6
  37. package/dist/{WarehouseView-gt891WkQ.js → WarehouseView-DlZirt8V.js} +5 -5
  38. package/dist/{WastageTemplateView-DDP_q1kT.js → WastageTemplateView-5Qvs2GZC.js} +14 -14
  39. package/dist/{app-DtJUp8mQ.js → app-xCn1wZY9.js} +4579 -4525
  40. package/dist/app.js +1 -1
  41. package/dist/{closing-template-DeUVPGPl.js → closing-template-DS8zFVJt.js} +1 -1
  42. package/dist/{date2-iHubu_Hg.js → date2-hHwvNr68.js} +1 -1
  43. package/dist/{dayjs.min-C81IRMa0.js → dayjs.min-PqgQ_K75.js} +12 -12
  44. package/dist/{decimal-DsF5fiGB.js → decimal-DOCxaZjf.js} +2 -2
  45. package/dist/{defineDeepModel-cHTtk4kj.js → defineDeepModel-CTlh0zvq.js} +1 -1
  46. package/dist/{duplicate-template-BMkJlSqi.js → duplicate-template-F8fz-36_.js} +1 -1
  47. package/dist/feature-UnTx1VJG.js +20162 -0
  48. package/dist/{format-time-from-id-gYFZ4gB4.js → format-time-from-id-DTsuaGJG.js} +1 -1
  49. package/dist/{format-unit-display-CrSG6jqO.js → format-unit-display-DS3MzSfd.js} +246 -245
  50. package/dist/{import-export.helper-BBZAXSKi.js → import-export.helper-BAUfb01o.js} +5 -5
  51. package/dist/{index-B4IDpHl_.js → index-BX9ig-2t.js} +3 -3
  52. package/dist/{index-D13-YBWx.js → index-CYZHYBBP.js} +1 -1
  53. package/dist/{index-DjhdVR8R.js → index-D_kOnYds.js} +9 -9
  54. package/dist/{lodash-fqg0EBFT.js → lodash-Cqi23PoA.js} +1 -1
  55. package/dist/{netsuite-Ce50v6Hm.js → netsuite-Cg_AEH3H.js} +3 -3
  56. package/dist/{purchase-order-template-BxglsHjM.js → purchase-order-template-Dh3D_2Tz.js} +1 -1
  57. package/dist/{rules-BO1fKtW6.js → rules-C_FnXd1e.js} +3 -3
  58. package/dist/{stock-DWYWu2eO.js → stock-BPdGitCC.js} +3 -3
  59. package/dist/{stock-DyZlhWdA.js → stock-DJDm1iIR.js} +1 -1
  60. package/dist/supplier-BtZVHCAl.js +78 -0
  61. package/dist/tsconfig.app.tsbuildinfo +1 -1
  62. package/dist/{use-ingredient-select-dialog-BvSDIPIV.js → use-ingredient-select-dialog-n26Kr4C5.js} +2 -2
  63. package/dist/{use-inventory-binding-dialog-SizooUK2.js → use-inventory-binding-dialog-kkpC2Tzi.js} +2 -2
  64. package/dist/{use-template-enabled-locations-2-D6QsVX09.js → use-template-enabled-locations-2-4ou70XAL.js} +2 -2
  65. package/dist/views/receive-request/components/netsuite/NetSuitePanel.vue.d.ts +2 -3
  66. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -3
  67. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +2197 -490
  68. package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +0 -1430
  69. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +0 -1
  70. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -3
  71. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +1 -1
  72. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +6 -6
  73. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +7 -7
  74. package/dist/views/receive-request/constants/purchase-order-transaction-type.d.ts +4 -0
  75. package/dist/views/receive-request/helper/get-transfer-type.d.ts +2 -1
  76. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -3
  77. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +2 -3
  78. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +3 -4
  79. package/dist/{vue-i18n-DVkVzKDL.js → vue-i18n-A7TH-x17.js} +533 -533
  80. package/dist/{xlsx-B8-jQ9MR.js → xlsx-DRYtBAdX.js} +1 -1
  81. package/dist/{xlsx.util-BZCQyeND.js → xlsx.util-DGBUU4BN.js} +1 -1
  82. package/package.json +1 -1
  83. package/dist/ReceiveRequestView-DfzANuLj.js +0 -2863
  84. package/dist/feature-Dx_hCq6v.js +0 -25312
  85. package/dist/helper/reactivity.d.ts +0 -11
  86. package/dist/helper/reactivity.spec.d.ts +0 -1
  87. package/dist/supplier-BtC6VaAp.js +0 -78
  88. package/dist/views/receive-request/components/transfer-form/composables/use-purchase-order-form-controller.d.ts +0 -13974
@@ -1,28 +1,28 @@
1
- import { defineComponent as ue, ref as O, computed as P, resolveComponent as U, openBlock as V, createBlock as z, withCtx as T, createElementVNode as e, normalizeClass as he, toDisplayString as v, createVNode as y, createElementBlock as Y, Fragment as ne, renderList as ie, unref as s, h as ye, watch as xe, isRef as je, createCommentVNode as se, reactive as nt, mergeModels as qe, useModel as pt, onMounted as Le, createTextVNode as de, normalizeStyle as ot, Teleport as ft, normalizeProps as Te, mergeProps as He } from "vue";
1
+ import { defineComponent as ue, ref as O, computed as P, resolveComponent as U, openBlock as $, createBlock as z, withCtx as T, createElementVNode as e, normalizeClass as _e, toDisplayString as v, createVNode as y, createElementBlock as Y, Fragment as oe, renderList as ie, unref as a, h as ye, watch as xe, isRef as je, createCommentVNode as te, reactive as nt, mergeModels as qe, useModel as pt, onMounted as Le, createTextVNode as de, normalizeStyle as ot, Teleport as ft, normalizeProps as Te, mergeProps as He } from "vue";
2
2
  import { F as ze, u as vt, _ as yt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
3
- import { u as ke, c as De, a as Be, F as Xe, G as _t, C as te, v as kt, o as bt, A as gt, s as Q, h as Ee, i as ht, e as xt } from "./app-DtJUp8mQ.js";
4
- import { u as Me } from "./stock-DWYWu2eO.js";
3
+ import { u as be, c as De, a as Be, F as Xe, E as _t, B as ne, t as kt, o as bt, z as gt, s as Q, h as Ee, i as ht, e as xt } from "./app-xCn1wZY9.js";
4
+ import { u as Me } from "./stock-BPdGitCC.js";
5
5
  import { c as St, _ as Ft, F as Je } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
6
- import { g as Se } from "./decimal-DsF5fiGB.js";
7
- import { d as pe } from "./dayjs.min-C81IRMa0.js";
8
- import { e as wt, u as st, i as at, _ as Qe } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-xAhtpaev.js";
9
- import { _ as Ne, S as Pe, g as lt, a as At } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CMSN_f71.js";
10
- import { _ as $t } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
6
+ import { g as Se } from "./decimal-DOCxaZjf.js";
7
+ import { d as pe } from "./dayjs.min-PqgQ_K75.js";
8
+ import { e as wt, u as st, i as at, _ as Qe } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BOxIYl0Z.js";
9
+ import { _ as Ne, S as Pe, g as lt, a as $t } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BTZa1E_o.js";
10
+ import { _ as At } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
11
11
  import { useI18n as ce, useCoreStore as Ge } from "@feedmepos/mf-common";
12
- import { useSnackbar as be, useDialog as Ie, useProxiedModel as Ue, useBreakpoints as Vt } from "@feedmepos/ui-library";
12
+ import { useSnackbar as ge, useDialog as Ie, useProxiedModel as Ue, useBreakpoints as Vt } from "@feedmepos/ui-library";
13
13
  import { defineStore as Ct } from "pinia";
14
- import { g as Ye, a as ve, f as jt, t as $e, h as Ve, A as Dt, M as Bt, d as _e, i as Mt, j as Ze, k as rt, l as Ke, R as It, e as we, m as Ut } from "./rules-BO1fKtW6.js";
15
- import { u as ge } from "./stock-DyZlhWdA.js";
16
- import { u as Tt } from "./use-inventory-binding-dialog-SizooUK2.js";
17
- import { a as it } from "./FmMultiselectDialog-HYBXnDCU.js";
18
- import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BCBhdfk-.js";
19
- import { a as Et, b as Pt, f as ut, t as Rt, c as Ot, p as Nt, n as Yt, d as Lt } from "./date2-iHubu_Hg.js";
20
- import { i as zt, _ as Gt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CPeUdEDm.js";
14
+ import { g as Ye, a as ve, f as jt, t as Ae, h as Ve, A as Dt, M as Bt, d as ke, i as Mt, j as Ze, k as rt, l as Ke, R as It, e as we, m as Ut } from "./rules-C_FnXd1e.js";
15
+ import { u as he } from "./stock-DJDm1iIR.js";
16
+ import { u as Tt } from "./use-inventory-binding-dialog-kkpC2Tzi.js";
17
+ import { a as it } from "./FmMultiselectDialog-8_qMKCPt.js";
18
+ import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DFW-jg1P.js";
19
+ import { a as Et, b as Pt, f as ut, t as Rt, c as Ot, p as Nt, n as Yt, d as Lt } from "./date2-hHwvNr68.js";
20
+ import { i as zt, _ as Gt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnMjbyPc.js";
21
21
  import { E as Kt } from "./empty-placeholder-wf6-BWE8.js";
22
- import { F as Re, u as Wt } from "./feature-Dx_hCq6v.js";
23
- import { u as qt } from "./netsuite-Ce50v6Hm.js";
22
+ import { F as Re, u as Wt } from "./feature-UnTx1VJG.js";
23
+ import { u as qt } from "./netsuite-Cg_AEH3H.js";
24
24
  import { N as Xt, H as Jt } from "./app-uBuHtW8m.js";
25
- var Ae = /* @__PURE__ */ ((k) => (k.History = "History", k.Convert = "Convert", k.Adjust = "Adjust", k))(Ae || {});
25
+ var $e = /* @__PURE__ */ ((k) => (k.History = "History", k.Convert = "Convert", k.Adjust = "Adjust", k))($e || {});
26
26
  const Qt = [
27
27
  {
28
28
  translationKey: "inventory.stock.action.history",
@@ -51,7 +51,7 @@ const Qt = [
51
51
  }
52
52
  ];
53
53
  async function en(k) {
54
- const d = `${(ke().currentLocation.name || "").replace(
54
+ const d = `${(be().currentLocation.name || "").replace(
55
55
  / /g,
56
56
  "_"
57
57
  )}_${pe().format("DD_MM_YYYY_HHmm")}.xlsx`;
@@ -136,7 +136,7 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
136
136
  ];
137
137
  });
138
138
  function m({ value: j }) {
139
- return s(A).type === "unit" ? j === null : j === s(A).measurement;
139
+ return a(A).type === "unit" ? j === null : j === a(A).measurement;
140
140
  }
141
141
  const i = P(
142
142
  () => {
@@ -146,14 +146,14 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
146
146
  ), F = O(!1);
147
147
  return (j, w) => {
148
148
  const u = U("FmIcon"), b = U("FmMenuItem"), C = U("FmMenu");
149
- return V(), z(C, {
149
+ return $(), z(C, {
150
150
  "stop-click-propagation": "",
151
151
  onMenuChanged: w[0] || (w[0] = (B) => F.value = B)
152
152
  }, {
153
153
  "menu-button": T(() => [
154
154
  e("button", {
155
155
  type: "button",
156
- class: he([
156
+ class: _e([
157
157
  "w-full text-left flex items-center gap-8 cursor-pointer fm-corner-radius-sm px-8 py-4 border bg-white",
158
158
  F.value ? "border-fm-color-primary" : "border-fm-color-neutral-gray-100"
159
159
  ])
@@ -166,7 +166,7 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
166
166
  ], 2)
167
167
  ]),
168
168
  default: T(() => [
169
- (V(!0), Y(ne, null, ie(S.value, (B) => (V(), z(b, {
169
+ ($(!0), Y(oe, null, ie(S.value, (B) => ($(), z(b, {
170
170
  key: B.value ?? 0,
171
171
  label: B.label,
172
172
  "model-value": m(B),
@@ -181,15 +181,15 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
181
181
  __name: "StockHeaderPreview",
182
182
  setup(k) {
183
183
  const { t: g } = ce();
184
- return (d, o) => (V(), z($t, null, {
184
+ return (d, o) => ($(), z(At, null, {
185
185
  default: T(() => [
186
- e("div", nn, v(s(g)("inventory.stock.prediction.daysRemaining")), 1)
186
+ e("div", nn, v(a(g)("inventory.stock.prediction.daysRemaining")), 1)
187
187
  ]),
188
188
  _: 1
189
189
  }));
190
190
  }
191
191
  }), dt = Ct("stockActions", () => {
192
- const k = O(!1), g = ke(), d = Me(), o = st(), A = be(), S = Ie(), { t: m } = ce();
192
+ const k = O(!1), g = be(), d = Me(), o = st(), A = ge(), S = Ie(), { t: m } = ce();
193
193
  async function i() {
194
194
  if (g._currentLocation) {
195
195
  k.value = !0;
@@ -208,7 +208,7 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
208
208
  }
209
209
  const F = O();
210
210
  async function j(D) {
211
- var x, _, $;
211
+ var x, _, V;
212
212
  if (!!!((_ = (x = D.convert) == null ? void 0 : x.inventoryBindings) != null && _.length)) {
213
213
  S.open({
214
214
  title: m("inventory.stock.error.convert.title"),
@@ -217,7 +217,7 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
217
217
  return;
218
218
  }
219
219
  const l = {
220
- maxCount: (($ = d.productBalance.find(({ id: H }) => H === D._id)) == null ? void 0 : $.count) || 0,
220
+ maxCount: ((V = d.productBalance.find(({ id: H }) => H === D._id)) == null ? void 0 : V.count) || 0,
221
221
  sku: D,
222
222
  show: !0,
223
223
  "onUpdate:show"(H) {
@@ -231,7 +231,7 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
231
231
  }
232
232
  const w = O();
233
233
  async function u(D) {
234
- const a = {
234
+ const s = {
235
235
  stock: D,
236
236
  show: !0,
237
237
  "onUpdate:show"(t) {
@@ -241,29 +241,29 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
241
241
  i();
242
242
  }
243
243
  };
244
- w.value = a;
244
+ w.value = s;
245
245
  }
246
246
  const b = O();
247
247
  async function C(D) {
248
- const a = {
248
+ const s = {
249
249
  sku: D,
250
250
  show: !0,
251
251
  "onUpdate:show"(t) {
252
252
  b.value.show = t;
253
253
  }
254
254
  };
255
- b.value = a;
255
+ b.value = s;
256
256
  }
257
- function B(D, a) {
258
- const t = De(a);
257
+ function B(D, s) {
258
+ const t = De(s);
259
259
  switch (D) {
260
- case Ae.History:
260
+ case $e.History:
261
261
  C(t);
262
262
  return;
263
- case Ae.Convert:
263
+ case $e.Convert:
264
264
  j(t);
265
265
  return;
266
- case Ae.Adjust:
266
+ case $e.Adjust:
267
267
  u(t);
268
268
  return;
269
269
  }
@@ -279,7 +279,7 @@ const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
279
279
  });
280
280
  function sn() {
281
281
  var S;
282
- const k = ke(), g = dt(), d = Ge(), { t: o } = ce();
282
+ const k = be(), g = dt(), d = Ge(), { t: o } = ce();
283
283
  return {
284
284
  columnDefs: [
285
285
  {
@@ -414,7 +414,7 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
414
414
  },
415
415
  emits: ["update:show", "submitted"],
416
416
  setup(k, { expose: g, emit: d }) {
417
- const o = k, A = d, S = Tt(), m = Be(), i = ge(), F = be(), { t: j } = ce(), w = O(0), u = O(null), b = P(() => m.skus), C = P(
417
+ const o = k, A = d, S = Tt(), m = Be(), i = he(), F = ge(), { t: j } = ce(), w = O(0), u = O(null), b = P(() => m.skus), C = P(
418
418
  () => {
419
419
  var p, n;
420
420
  return (((n = (p = o.sku) == null ? void 0 : p.convert) == null ? void 0 : n.inventoryBindings) ?? []).filter(
@@ -432,8 +432,8 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
432
432
  xe([() => o.show], ([p]) => {
433
433
  p && (w.value = 0);
434
434
  });
435
- function a() {
436
- N(o.sku, $e(w.value), u.value);
435
+ function s() {
436
+ N(o.sku, Ae(w.value), u.value);
437
437
  }
438
438
  function t(p) {
439
439
  if (u.value)
@@ -470,10 +470,10 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
470
470
  const M = m.skus.find((me) => me._id === f.id), I = ((le = f.measurement) == null ? void 0 : le.abbrev) ?? ((re = M == null ? void 0 : M.unit) == null ? void 0 : re.abbrev), G = (Z = o.sku.convert) != null && Z.measurement ? o.sku.unit.measurements.find((me) => {
471
471
  var We;
472
472
  return me.id === ((We = o.sku.convert) == null ? void 0 : We.measurement);
473
- }) ?? null : null, oe = Ye(o.sku.unit, G), E = l(`${w.value}`) === !0 ? ve(
473
+ }) ?? null : null, se = Ye(o.sku.unit, G), E = l(`${w.value}`) === !0 ? ve(
474
474
  jt(
475
475
  f.amount,
476
- $e(+w.value, oe)
476
+ Ae(+w.value, se)
477
477
  ),
478
478
  !1
479
479
  ) : "0", W = (fe = (ae = u.value) == null ? void 0 : ae.find((me) => me.id === (M == null ? void 0 : M._id))) == null ? void 0 : fe.amount, q = W ? ve(W, !1) : null;
@@ -483,19 +483,19 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
483
483
  abbrev: I
484
484
  };
485
485
  });
486
- }), $ = O();
486
+ }), V = O();
487
487
  g({
488
488
  validateInputs: () => {
489
489
  var p, n;
490
- (n = (p = $.value) == null ? void 0 : p.validateInputs) == null || n.call(p);
490
+ (n = (p = V.value) == null ? void 0 : p.validateInputs) == null || n.call(p);
491
491
  },
492
492
  resetInputsValidation: () => {
493
493
  var p, n;
494
- (n = (p = $.value) == null ? void 0 : p.resetInputsValidation) == null || n.call(p);
494
+ (n = (p = V.value) == null ? void 0 : p.resetInputsValidation) == null || n.call(p);
495
495
  },
496
496
  resetInputs: () => {
497
497
  var p, n;
498
- (n = (p = $.value) == null ? void 0 : p.resetInputs) == null || n.call(p);
498
+ (n = (p = V.value) == null ? void 0 : p.resetInputs) == null || n.call(p);
499
499
  }
500
500
  });
501
501
  const H = Ue(o, "show");
@@ -531,7 +531,7 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
531
531
  function K(p, n, r) {
532
532
  const h = +n;
533
533
  let c = r;
534
- n.length > 0 && isFinite(h) ? c = r.map((f) => (f.id !== p || (f.amount = _e(h)), f)) : c = r.map((f) => (f.id !== p || (f.amount = { amount: 0, precision: 0 }), f)), u.value = c;
534
+ n.length > 0 && isFinite(h) ? c = r.map((f) => (f.id !== p || (f.amount = ke(h)), f)) : c = r.map((f) => (f.id !== p || (f.amount = { amount: 0, precision: 0 }), f)), u.value = c;
535
535
  }
536
536
  function R(p) {
537
537
  const n = b.value.find((r) => r._id === p);
@@ -578,32 +578,32 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
578
578
  p || (u.value = null, w.value = 0);
579
579
  }
580
580
  ), (p, n) => {
581
- const r = U("FmTextField"), h = U("FmForm"), c = U("FmCard"), f = U("FmSwitch"), M = U("FmFormGroup"), I = U("FmSelect"), G = U("FmButton"), oe = U("FmSideSheet");
582
- return V(), z(oe, {
581
+ const r = U("FmTextField"), h = U("FmForm"), c = U("FmCard"), f = U("FmSwitch"), M = U("FmFormGroup"), I = U("FmSelect"), G = U("FmButton"), se = U("FmSideSheet");
582
+ return $(), z(se, {
583
583
  "dismiss-away": "",
584
- modelValue: s(H),
584
+ modelValue: a(H),
585
585
  "onUpdate:modelValue": n[3] || (n[3] = (E) => je(H) ? H.value = E : null),
586
586
  "max-width": 500
587
587
  }, {
588
588
  "side-sheet-header": T(() => [
589
589
  e("div", ln, [
590
- e("div", rn, v(s(j)("inventory.stock.convert.title", { name: p.sku.name })), 1)
590
+ e("div", rn, v(a(j)("inventory.stock.convert.title", { name: p.sku.name })), 1)
591
591
  ])
592
592
  ]),
593
593
  default: T(() => [
594
594
  e("div", un, [
595
595
  y(h, {
596
596
  ref_key: "formRef",
597
- ref: $,
598
- onValidationSuccess: a
597
+ ref: V,
598
+ onValidationSuccess: s
599
599
  }, {
600
600
  default: T(() => [
601
601
  y(r, {
602
602
  disabled: D.value,
603
603
  "model-value": w.value,
604
604
  "onUpdate:modelValue": n[0] || (n[0] = (E) => w.value = E),
605
- label: s(j)("inventory.stock.convert.amount"),
606
- rules: [t, l, s(Ve)(0)],
605
+ label: a(j)("inventory.stock.convert.amount"),
606
+ rules: [t, l, a(Ve)(0)],
607
607
  "append-text": x.value,
608
608
  "helper-text": u.value ? void 0 : `Max ${p.maxCount} ${x.value}`
609
609
  }, null, 8, ["disabled", "model-value", "label", "rules", "append-text", "helper-text"])
@@ -616,10 +616,10 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
616
616
  }, {
617
617
  default: T(() => [
618
618
  e("div", cn, [
619
- e("div", dn, v(s(j)("inventory.stock.convert.deductionSummary")), 1),
620
- (V(!0), Y(ne, null, ie(_.value, (E) => {
619
+ e("div", dn, v(a(j)("inventory.stock.convert.deductionSummary")), 1),
620
+ ($(!0), Y(oe, null, ie(_.value, (E) => {
621
621
  var W, q;
622
- return V(), Y("div", {
622
+ return $(), Y("div", {
623
623
  key: (W = E.sku) == null ? void 0 : W._id,
624
624
  class: "flex items-center"
625
625
  }, [
@@ -638,26 +638,26 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
638
638
  value: "",
639
639
  modelValue: B.value,
640
640
  "onUpdate:modelValue": n[1] || (n[1] = (E) => B.value = E),
641
- label: s(j)("inventory.stock.convert.overrideDeduction"),
641
+ label: a(j)("inventory.stock.convert.overrideDeduction"),
642
642
  "label-placement": "right"
643
643
  }, null, 8, ["modelValue", "label"]),
644
- B.value ? (V(), Y(ne, { key: 0 }, [
644
+ B.value ? ($(), Y(oe, { key: 0 }, [
645
645
  y(M, {
646
646
  modelValue: u.value,
647
- rules: [s(Dt)(1, "Must have at least one ingredient binding")]
647
+ rules: [a(Dt)(1, "Must have at least one ingredient binding")]
648
648
  }, null, 8, ["modelValue", "rules"]),
649
649
  e("div", vn, [
650
- e("div", yn, v(s(j)("inventory.stock.convert.ingredients")), 1),
651
- (V(!0), Y(ne, null, ie(u.value, (E) => (V(), z(M, {
650
+ e("div", yn, v(a(j)("inventory.stock.convert.ingredients")), 1),
651
+ ($(!0), Y(oe, null, ie(u.value, (E) => ($(), z(M, {
652
652
  key: E.id,
653
653
  disabled: D.value,
654
- modelValue: +s(ve)(E.amount ?? { amount: 1, precision: 0 }),
654
+ modelValue: +a(ve)(E.amount ?? { amount: 1, precision: 0 }),
655
655
  rules: [
656
- s(Bt)(
656
+ a(Bt)(
657
657
  b.value.find((W) => W._id === E.id).unit,
658
658
  E.measurement
659
659
  ),
660
- s(Ve)(0)
660
+ a(Ve)(0)
661
661
  ]
662
662
  }, {
663
663
  default: T(({ invalid: W }) => {
@@ -668,7 +668,7 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
668
668
  y(r, {
669
669
  class: "xs:col-span-2",
670
670
  disabled: D.value,
671
- modelValue: +s(ve)(
671
+ modelValue: +a(ve)(
672
672
  E.amount ?? { amount: 1, precision: 0 }
673
673
  ),
674
674
  "onUpdate:modelValue": (Z) => K(E.id, Z, u.value ?? []),
@@ -701,12 +701,12 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
701
701
  e("div", null, [
702
702
  y(G, {
703
703
  icon: "link",
704
- label: s(j)("inventory.stock.convert.linkIngredient"),
704
+ label: a(j)("inventory.stock.convert.linkIngredient"),
705
705
  variant: "plain",
706
706
  onClick: J
707
707
  }, null, 8, ["label"])
708
708
  ])
709
- ], 64)) : se("", !0)
709
+ ], 64)) : te("", !0)
710
710
  ])
711
711
  ]),
712
712
  _: 1
@@ -717,10 +717,10 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
717
717
  e("div", bn, [
718
718
  y(G, {
719
719
  loading: D.value,
720
- label: s(j)("inventory.stock.convert.convertButton"),
720
+ label: a(j)("inventory.stock.convert.convertButton"),
721
721
  onClick: n[2] || (n[2] = (E) => {
722
722
  var W, q;
723
- return (q = (W = $.value) == null ? void 0 : W.validateInputs) == null ? void 0 : q.call(W);
723
+ return (q = (W = V.value) == null ? void 0 : W.validateInputs) == null ? void 0 : q.call(W);
724
724
  })
725
725
  }, null, 8, ["loading", "label"])
726
726
  ])
@@ -731,34 +731,34 @@ const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-80
731
731
  }
732
732
  });
733
733
  function Fe(k, g) {
734
- const d = $e(k, g);
734
+ const d = Ae(k, g);
735
735
  return { ...d, amount: -d.amount };
736
736
  }
737
737
  function tt(k, g) {
738
- return $e(Math.abs(k), g);
738
+ return Ae(Math.abs(k), g);
739
739
  }
740
740
  const Oe = {
741
- [te.enum.DAMAGE]: {
741
+ [ne.enum.DAMAGE]: {
742
742
  label: "Damage",
743
743
  toAdjustmentAmount: Fe
744
744
  },
745
- [te.enum.WASTAGE]: {
745
+ [ne.enum.WASTAGE]: {
746
746
  label: "Wastage",
747
747
  toAdjustmentAmount: Fe
748
748
  },
749
- [te.enum.THEFT]: {
749
+ [ne.enum.THEFT]: {
750
750
  label: "Theft",
751
751
  toAdjustmentAmount: Fe
752
752
  },
753
- [te.enum.LOSE]: {
753
+ [ne.enum.LOSE]: {
754
754
  label: "Lose",
755
755
  toAdjustmentAmount: Fe
756
756
  },
757
- [te.enum.EXTRA]: {
757
+ [ne.enum.EXTRA]: {
758
758
  label: "Extra",
759
759
  toAdjustmentAmount: tt
760
760
  },
761
- [te.enum.PURCHASE]: {
761
+ [ne.enum.PURCHASE]: {
762
762
  label: "Purchase",
763
763
  toAdjustmentAmount: tt
764
764
  }
@@ -777,7 +777,7 @@ const Oe = {
777
777
  }))
778
778
  ), i = P(() => lt(d.modelValue.doc.unit, !0)), F = P({
779
779
  get() {
780
- return d.modelValue.type ?? te.enum.PURCHASE;
780
+ return d.modelValue.type ?? ne.enum.PURCHASE;
781
781
  },
782
782
  set(t) {
783
783
  const l = {
@@ -798,7 +798,7 @@ const Oe = {
798
798
  set(t) {
799
799
  const l = {
800
800
  ...d.modelValue
801
- }, x = _e(t);
801
+ }, x = ke(t);
802
802
  l.amount = Oe[F.value].toAdjustmentAmount(
803
803
  t,
804
804
  x.precision
@@ -814,7 +814,7 @@ const Oe = {
814
814
  const l = {
815
815
  ...d.modelValue
816
816
  };
817
- l.measurement = ((_ = (x = d.modelValue.doc.unit) == null ? void 0 : x.measurements) == null ? void 0 : _.find(($) => $.id === t)) ?? null, o("update:modelValue", l);
817
+ l.measurement = ((_ = (x = d.modelValue.doc.unit) == null ? void 0 : x.measurements) == null ? void 0 : _.find((V) => V.id === t)) ?? null, o("update:modelValue", l);
818
818
  }
819
819
  }), u = P({
820
820
  get() {
@@ -837,10 +837,10 @@ const Oe = {
837
837
  () => Ke(b.value, C.value)
838
838
  ), D = P(
839
839
  () => Se(B.value, d.modelValue.doc.unit)
840
- ), a = P(() => C.value.amount < 0);
840
+ ), s = P(() => C.value.amount < 0);
841
841
  return (t, l) => {
842
- const x = U("FmButton"), _ = U("FmSelect"), $ = U("FmTextarea"), H = U("FmCard");
843
- return V(), z(H, {
842
+ const x = U("FmButton"), _ = U("FmSelect"), V = U("FmTextarea"), H = U("FmCard");
843
+ return $(), z(H, {
844
844
  variant: "outlined",
845
845
  class: "grid grid-cols-2 gap-8 p-16"
846
846
  }, {
@@ -860,19 +860,19 @@ const Oe = {
860
860
  items: m.value,
861
861
  modelValue: F.value,
862
862
  "onUpdate:modelValue": l[1] || (l[1] = (N) => F.value = N),
863
- rules: [s(It)()],
863
+ rules: [a(It)()],
864
864
  "label-mark": "required"
865
865
  }, null, 8, ["disabled", "items", "modelValue", "rules"]),
866
866
  y(Ht, {
867
867
  disabled: t.disabled,
868
868
  label: "Amount",
869
- step: +s(ve)({
869
+ step: +a(ve)({
870
870
  amount: 1,
871
- precision: s(Ye)(t.modelValue.doc.unit, t.modelValue.measurement)
871
+ precision: a(Ye)(t.modelValue.doc.unit, t.modelValue.measurement)
872
872
  }),
873
873
  modelValue: j.value,
874
874
  "onUpdate:modelValue": l[2] || (l[2] = (N) => j.value = N),
875
- rules: [s(Ve)(0)]
875
+ rules: [a(Ve)(0)]
876
876
  }, null, 8, ["disabled", "step", "modelValue", "rules"]),
877
877
  y(_, {
878
878
  disabled: t.disabled,
@@ -881,7 +881,7 @@ const Oe = {
881
881
  modelValue: w.value,
882
882
  "onUpdate:modelValue": l[3] || (l[3] = (N) => w.value = N)
883
883
  }, null, 8, ["disabled", "items", "modelValue"]),
884
- y($, {
884
+ y(V, {
885
885
  class: "col-span-2",
886
886
  disabled: t.disabled,
887
887
  label: "Remark",
@@ -890,9 +890,9 @@ const Oe = {
890
890
  "label-mark": "optional"
891
891
  }, null, 8, ["disabled", "modelValue"]),
892
892
  e("div", Sn, [
893
- e("div", Fn, v(s(A)("inventory.stock.stock_adjustment.stockAfter")), 1),
893
+ e("div", Fn, v(a(A)("inventory.stock.stock_adjustment.stockAfter")), 1),
894
894
  e("div", {
895
- class: he(["fm-typo-en-body-lg-600", a.value ? "text-red-700" : "text-green-700"])
895
+ class: _e(["fm-typo-en-body-lg-600", s.value ? "text-red-700" : "text-green-700"])
896
896
  }, v(D.value), 3)
897
897
  ])
898
898
  ]),
@@ -900,7 +900,7 @@ const Oe = {
900
900
  });
901
901
  };
902
902
  }
903
- }), wn = { class: "flex items-center" }, An = { class: "fm-typo-en-title-md-800" }, $n = { class: "flex items-center" }, Vn = { class: "fm-typo-en-title-sm-800 flex-1" }, Cn = { class: "flex gap-8" }, jn = /* @__PURE__ */ ue({
903
+ }), wn = { class: "flex items-center" }, $n = { class: "fm-typo-en-title-md-800" }, An = { class: "flex items-center" }, Vn = { class: "fm-typo-en-title-sm-800 flex-1" }, Cn = { class: "flex gap-8" }, jn = /* @__PURE__ */ ue({
904
904
  __name: "AdjustSkuDialog",
905
905
  props: {
906
906
  stock: {},
@@ -908,7 +908,7 @@ const Oe = {
908
908
  },
909
909
  emits: ["update:show", "submitted"],
910
910
  setup(k, { expose: g, emit: d }) {
911
- const o = k, A = d, S = Be(), m = Ie(), i = ge(), F = be(), j = O(!1), { t: w } = ce();
911
+ const o = k, A = d, S = Be(), m = Ie(), i = he(), F = ge(), j = O(!1), { t: w } = ce();
912
912
  function u() {
913
913
  D(De(B));
914
914
  }
@@ -932,11 +932,11 @@ const Oe = {
932
932
  adjustments: [
933
933
  {
934
934
  id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
935
- type: te.enum.PURCHASE,
935
+ type: ne.enum.PURCHASE,
936
936
  doc: o.stock,
937
937
  measurement: null,
938
938
  remark: "",
939
- amount: _e(1)
939
+ amount: ke(1)
940
940
  }
941
941
  ]
942
942
  });
@@ -944,11 +944,11 @@ const Oe = {
944
944
  l && (B.remark = "", B.adjustments = [
945
945
  {
946
946
  id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
947
- type: te.enum.PURCHASE,
947
+ type: ne.enum.PURCHASE,
948
948
  doc: o.stock,
949
949
  measurement: null,
950
950
  remark: "",
951
- amount: _e(1)
951
+ amount: ke(1)
952
952
  }
953
953
  ]);
954
954
  });
@@ -957,13 +957,13 @@ const Oe = {
957
957
  try {
958
958
  await i.adjustSku({
959
959
  remark: l.remark,
960
- adjustments: l.adjustments.map(({ doc: x, remark: _, type: $, amount: H, measurement: N }) => ({
960
+ adjustments: l.adjustments.map(({ doc: x, remark: _, type: V, amount: H, measurement: N }) => ({
961
961
  id: x._id,
962
962
  amount: H,
963
963
  measurement: N,
964
964
  remark: _,
965
965
  doc: x,
966
- type: $
966
+ type: V
967
967
  }))
968
968
  }), A("update:show", !1), A("submitted");
969
969
  } catch (x) {
@@ -976,12 +976,12 @@ const Oe = {
976
976
  j.value = !1;
977
977
  }
978
978
  }
979
- function a() {
979
+ function s() {
980
980
  const l = S.skus.map((_) => ({
981
981
  label: _.name,
982
982
  sublabel: _.code,
983
983
  value: _._id
984
- })), x = l.filter((_) => B.adjustments.find(($) => $.doc._id === _.value)).map((_) => _.value);
984
+ })), x = l.filter((_) => B.adjustments.find((V) => V.doc._id === _.value)).map((_) => _.value);
985
985
  m.open({
986
986
  title: "Select ingredients",
987
987
  contentComponent: it,
@@ -1003,13 +1003,13 @@ const Oe = {
1003
1003
  }
1004
1004
  }).onPrimary((_) => {
1005
1005
  B.adjustments = _.map(
1006
- ($) => B.adjustments.find((H) => H.doc._id === $) ?? {
1006
+ (V) => B.adjustments.find((H) => H.doc._id === V) ?? {
1007
1007
  id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
1008
- type: te.enum.PURCHASE,
1009
- doc: S.skus.find((H) => H._id === $),
1008
+ type: ne.enum.PURCHASE,
1009
+ doc: S.skus.find((H) => H._id === V),
1010
1010
  measurement: null,
1011
1011
  remark: "",
1012
- amount: _e(1)
1012
+ amount: ke(1)
1013
1013
  }
1014
1014
  );
1015
1015
  });
@@ -1018,16 +1018,16 @@ const Oe = {
1018
1018
  B.adjustments.splice(l, 1);
1019
1019
  }
1020
1020
  return (l, x) => {
1021
- const _ = U("FmTextarea"), $ = U("FmButton"), H = U("FmForm"), N = U("FmSideSheet");
1022
- return V(), z(N, {
1023
- modelValue: s(C),
1021
+ const _ = U("FmTextarea"), V = U("FmButton"), H = U("FmForm"), N = U("FmSideSheet");
1022
+ return $(), z(N, {
1023
+ modelValue: a(C),
1024
1024
  "onUpdate:modelValue": x[2] || (x[2] = (K) => je(C) ? C.value = K : null),
1025
1025
  "dismiss-away": "",
1026
1026
  "max-width": 500
1027
1027
  }, {
1028
1028
  "side-sheet-header": T(() => [
1029
1029
  e("div", wn, [
1030
- e("div", An, v(s(w)("inventory.stock.adjust.title")), 1)
1030
+ e("div", $n, v(a(w)("inventory.stock.adjust.title")), 1)
1031
1031
  ])
1032
1032
  ]),
1033
1033
  default: T(() => [
@@ -1039,20 +1039,20 @@ const Oe = {
1039
1039
  }, {
1040
1040
  default: T(() => [
1041
1041
  y(_, {
1042
- label: s(w)("inventory.stock.adjust.remark"),
1042
+ label: a(w)("inventory.stock.adjust.remark"),
1043
1043
  modelValue: B.remark,
1044
1044
  "onUpdate:modelValue": x[0] || (x[0] = (K) => B.remark = K)
1045
1045
  }, null, 8, ["label", "modelValue"]),
1046
- e("div", $n, [
1047
- e("div", Vn, v(s(w)("inventory.stock.adjust.adjustedItems")), 1),
1048
- y($, {
1046
+ e("div", An, [
1047
+ e("div", Vn, v(a(w)("inventory.stock.adjust.adjustedItems")), 1),
1048
+ y(V, {
1049
1049
  "prepend-icon": "add",
1050
1050
  variant: "tertiary",
1051
1051
  size: "md",
1052
- onClick: a
1052
+ onClick: s
1053
1053
  })
1054
1054
  ]),
1055
- (V(!0), Y(ne, null, ie(B.adjustments, (K, R) => (V(), z(mt, {
1055
+ ($(!0), Y(oe, null, ie(B.adjustments, (K, R) => ($(), z(mt, {
1056
1056
  key: K.id,
1057
1057
  modelValue: B.adjustments[R],
1058
1058
  "onUpdate:modelValue": (X) => B.adjustments[R] = X,
@@ -1064,8 +1064,8 @@ const Oe = {
1064
1064
  ]),
1065
1065
  "side-sheet-footer": T(() => [
1066
1066
  e("div", Cn, [
1067
- y($, {
1068
- label: s(w)("inventory.stock.adjust.adjustButton"),
1067
+ y(V, {
1068
+ label: a(w)("inventory.stock.adjust.adjustButton"),
1069
1069
  loading: j.value,
1070
1070
  onClick: x[1] || (x[1] = (K) => {
1071
1071
  var R, X;
@@ -1085,7 +1085,7 @@ const Oe = {
1085
1085
  },
1086
1086
  emits: ["update:show", "submitted"],
1087
1087
  setup(k, { emit: g }) {
1088
- const d = k, o = g, { t: A } = ce(), S = Be(), m = ge(), i = Ie(), F = be(), j = Ue(d, "show"), w = O(!1), u = nt({
1088
+ const d = k, o = g, { t: A } = ce(), S = Be(), m = he(), i = Ie(), F = ge(), j = Ue(d, "show"), w = O(!1), u = nt({
1089
1089
  remark: "",
1090
1090
  effectiveAt: /* @__PURE__ */ new Date(),
1091
1091
  adjustments: []
@@ -1094,8 +1094,8 @@ const Oe = {
1094
1094
  if (b.value && C.value) {
1095
1095
  const _ = pe(`${b.value} ${C.value}`, "YYYY-MM-DD HH:mm");
1096
1096
  if (_.isValid()) {
1097
- const $ = pe();
1098
- _.isAfter($) ? u.effectiveAt = $.toDate() : u.effectiveAt = _.toDate();
1097
+ const V = pe();
1098
+ _.isAfter(V) ? u.effectiveAt = V.toDate() : u.effectiveAt = _.toDate();
1099
1099
  }
1100
1100
  }
1101
1101
  });
@@ -1105,10 +1105,10 @@ const Oe = {
1105
1105
  function D() {
1106
1106
  B();
1107
1107
  }
1108
- const a = P(() => {
1108
+ const s = P(() => {
1109
1109
  const _ = {};
1110
- return S.skus.forEach(($) => {
1111
- _[$._id] = $;
1110
+ return S.skus.forEach((V) => {
1111
+ _[V._id] = V;
1112
1112
  }), _;
1113
1113
  });
1114
1114
  function t() {
@@ -1116,13 +1116,13 @@ const Oe = {
1116
1116
  label: H.name,
1117
1117
  sublabel: H.code,
1118
1118
  value: H._id
1119
- })), $ = u.adjustments.map((H) => H.doc._id);
1119
+ })), V = u.adjustments.map((H) => H.doc._id);
1120
1120
  i.open({
1121
1121
  title: A("inventory.stock.adjust.selectIngredients"),
1122
1122
  contentComponent: it,
1123
1123
  contentComponentProps: {
1124
1124
  items: _,
1125
- modelValue: $,
1125
+ modelValue: V,
1126
1126
  virtualScroll: !0
1127
1127
  },
1128
1128
  overlay: !0,
@@ -1141,11 +1141,11 @@ const Oe = {
1141
1141
  u.adjustments = H.map(
1142
1142
  (N) => u.adjustments.find((K) => K.doc._id === N) ?? {
1143
1143
  id: "",
1144
- type: te.enum.PURCHASE,
1145
- doc: a.value[N],
1144
+ type: ne.enum.PURCHASE,
1145
+ doc: s.value[N],
1146
1146
  measurement: null,
1147
1147
  remark: "",
1148
- amount: _e(1)
1148
+ amount: ke(1)
1149
1149
  }
1150
1150
  );
1151
1151
  });
@@ -1173,12 +1173,12 @@ const Oe = {
1173
1173
  doc: H,
1174
1174
  type: K
1175
1175
  })
1176
- ), $ = {
1176
+ ), V = {
1177
1177
  remark: u.remark,
1178
1178
  adjustments: _,
1179
1179
  effectiveAt: u.effectiveAt.toISOString()
1180
1180
  };
1181
- await m.adjustSku(De($)), o("submitted"), o("update:show", !1);
1181
+ await m.adjustSku(De(V)), o("submitted"), o("update:show", !1);
1182
1182
  } catch (_) {
1183
1183
  F.open({
1184
1184
  title: A("inventory.stock.adjust.error.title"),
@@ -1189,53 +1189,53 @@ const Oe = {
1189
1189
  w.value = !1;
1190
1190
  }
1191
1191
  }
1192
- return (_, $) => {
1192
+ return (_, V) => {
1193
1193
  const H = U("FmTextarea"), N = U("FmDatePicker"), K = U("FmTimePicker"), R = U("FmButton"), X = U("FmSideSheet");
1194
- return V(), z(X, {
1195
- modelValue: s(j),
1196
- "onUpdate:modelValue": $[4] || ($[4] = (L) => je(j) ? j.value = L : null),
1194
+ return $(), z(X, {
1195
+ modelValue: a(j),
1196
+ "onUpdate:modelValue": V[4] || (V[4] = (L) => je(j) ? j.value = L : null),
1197
1197
  "dismiss-away": "",
1198
1198
  "max-width": 560,
1199
1199
  onAfterEnter: D
1200
1200
  }, {
1201
1201
  "side-sheet-header": T(() => [
1202
1202
  e("div", Dn, [
1203
- e("div", Bn, v(s(A)("inventory.stock.stock_adjustment.title")), 1)
1203
+ e("div", Bn, v(a(A)("inventory.stock.stock_adjustment.title")), 1)
1204
1204
  ])
1205
1205
  ]),
1206
1206
  default: T(() => [
1207
1207
  e("div", Mn, [
1208
1208
  y(H, {
1209
- label: s(A)("inventory.stock.adjust.remark"),
1209
+ label: a(A)("inventory.stock.adjust.remark"),
1210
1210
  modelValue: u.remark,
1211
- "onUpdate:modelValue": $[0] || ($[0] = (L) => u.remark = L),
1211
+ "onUpdate:modelValue": V[0] || (V[0] = (L) => u.remark = L),
1212
1212
  "label-mark": "optional"
1213
1213
  }, null, 8, ["label", "modelValue"]),
1214
1214
  e("div", In, [
1215
- e("label", Un, v(s(A)("inventory.stock.stock_adjustment.effectiveAt")), 1),
1215
+ e("label", Un, v(a(A)("inventory.stock.stock_adjustment.effectiveAt")), 1),
1216
1216
  e("div", Tn, [
1217
1217
  e("div", Hn, [
1218
1218
  y(N, {
1219
1219
  class: "w-full",
1220
1220
  modelValue: b.value,
1221
- "onUpdate:modelValue": $[1] || ($[1] = (L) => b.value = L),
1221
+ "onUpdate:modelValue": V[1] || (V[1] = (L) => b.value = L),
1222
1222
  clearable: !1,
1223
- max: s(pe)().format("YYYY-MM-DD")
1223
+ max: a(pe)().format("YYYY-MM-DD")
1224
1224
  }, null, 8, ["modelValue", "max"])
1225
1225
  ]),
1226
1226
  e("div", En, [
1227
1227
  y(K, {
1228
1228
  class: "w-full",
1229
1229
  modelValue: C.value,
1230
- "onUpdate:modelValue": $[2] || ($[2] = (L) => C.value = L),
1230
+ "onUpdate:modelValue": V[2] || (V[2] = (L) => C.value = L),
1231
1231
  format: "HH:mm"
1232
1232
  }, null, 8, ["modelValue"])
1233
1233
  ])
1234
1234
  ]),
1235
- e("div", Pn, v(s(A)("inventory.stock.stock_adjustment.immediateHint")), 1)
1235
+ e("div", Pn, v(a(A)("inventory.stock.stock_adjustment.immediateHint")), 1)
1236
1236
  ]),
1237
1237
  e("div", Rn, [
1238
- e("div", On, v(s(A)("inventory.stock.adjust.adjustedItems")), 1),
1238
+ e("div", On, v(a(A)("inventory.stock.adjust.adjustedItems")), 1),
1239
1239
  y(R, {
1240
1240
  "prepend-icon": "add",
1241
1241
  variant: "tertiary",
@@ -1243,7 +1243,7 @@ const Oe = {
1243
1243
  onClick: t
1244
1244
  })
1245
1245
  ]),
1246
- (V(!0), Y(ne, null, ie(u.adjustments, (L, ee) => (V(), z(mt, {
1246
+ ($(!0), Y(oe, null, ie(u.adjustments, (L, ee) => ($(), z(mt, {
1247
1247
  key: L.id,
1248
1248
  modelValue: u.adjustments[ee],
1249
1249
  "onUpdate:modelValue": (J) => u.adjustments[ee] = J,
@@ -1254,14 +1254,14 @@ const Oe = {
1254
1254
  "side-sheet-footer": T(() => [
1255
1255
  e("div", Nn, [
1256
1256
  y(R, {
1257
- label: s(A)("common.confirm"),
1257
+ label: a(A)("common.confirm"),
1258
1258
  loading: w.value,
1259
1259
  onClick: x
1260
1260
  }, null, 8, ["label", "loading"]),
1261
1261
  y(R, {
1262
- label: s(A)("common.close"),
1262
+ label: a(A)("common.close"),
1263
1263
  variant: "tertiary",
1264
- onClick: $[3] || ($[3] = (L) => o("update:show", !1))
1264
+ onClick: V[3] || (V[3] = (L) => o("update:show", !1))
1265
1265
  }, null, 8, ["label"])
1266
1266
  ])
1267
1267
  ]),
@@ -1281,7 +1281,7 @@ const Oe = {
1281
1281
  return await g.post(S, m);
1282
1282
  },
1283
1283
  async findBillsById(d) {
1284
- const A = ke().currentLocationDBName, S = `${k.inventoryBackendUrl}/${A}/bill/search`, m = {
1284
+ const A = be().currentLocationDBName, S = `${k.inventoryBackendUrl}/${A}/bill/search`, m = {
1285
1285
  ids: d
1286
1286
  };
1287
1287
  return await g.post(S, m);
@@ -1299,63 +1299,63 @@ const Oe = {
1299
1299
  }),
1300
1300
  emits: /* @__PURE__ */ qe(["refreshHistory"], ["update:modelValue"]),
1301
1301
  setup(k, { emit: g }) {
1302
- const d = k, o = g, A = ge(), S = pt(k, "modelValue"), m = O(!1), i = O(!1), F = O(!1), j = O({
1302
+ const d = k, o = g, A = he(), S = pt(k, "modelValue"), m = O(!1), i = O(!1), F = O(!1), j = O({
1303
1303
  _id: `inventoryAdjustment_${(/* @__PURE__ */ new Date()).toISOString()}_XXXXX`,
1304
1304
  skus: []
1305
1305
  }), w = O();
1306
1306
  Le(async () => {
1307
1307
  m.value = !0;
1308
- const a = await A.readSingleAdjustment(d.adjustmentId);
1309
- if (!a) throw new Error("Adjustment not found");
1310
- j.value = a, m.value = !1;
1308
+ const s = await A.readSingleAdjustment(d.adjustmentId);
1309
+ if (!s) throw new Error("Adjustment not found");
1310
+ j.value = s, m.value = !1;
1311
1311
  });
1312
1312
  async function u() {
1313
1313
  var t, l;
1314
1314
  if ((l = (t = w == null ? void 0 : w.value) == null ? void 0 : t.validateInputs) == null || l.call(t), !i.value) return;
1315
- const a = {};
1315
+ const s = {};
1316
1316
  Object.keys(S.value || {}).forEach((x) => {
1317
1317
  var _;
1318
- Object.keys(((_ = S.value) == null ? void 0 : _[x]) || {}).forEach(($) => {
1318
+ Object.keys(((_ = S.value) == null ? void 0 : _[x]) || {}).forEach((V) => {
1319
1319
  var N, K;
1320
- const H = (K = (N = S.value) == null ? void 0 : N[x]) == null ? void 0 : K[Number($)];
1321
- H && C(H.amount) > 0 && (a[x] || (a[x] = []), a[x].push(H));
1320
+ const H = (K = (N = S.value) == null ? void 0 : N[x]) == null ? void 0 : K[Number(V)];
1321
+ H && C(H.amount) > 0 && (s[x] || (s[x] = []), s[x].push(H));
1322
1322
  });
1323
1323
  }), await A.revertWastageAdjustment({
1324
1324
  targetWastageAdjustmentId: d.adjustmentId,
1325
- amountsGoingToAdjust: a
1325
+ amountsGoingToAdjust: s
1326
1326
  }), o("refreshHistory"), F.value = !1, S.value = {};
1327
1327
  }
1328
- function b(a, t, l) {
1328
+ function b(s, t, l) {
1329
1329
  return P({
1330
1330
  get: () => {
1331
- var _, $, H;
1332
- const x = (H = ($ = (_ = S.value) == null ? void 0 : _[a]) == null ? void 0 : $[t]) == null ? void 0 : H.amount;
1331
+ var _, V, H;
1332
+ const x = (H = (V = (_ = S.value) == null ? void 0 : _[s]) == null ? void 0 : V[t]) == null ? void 0 : H.amount;
1333
1333
  return x ? C(x, !0) : 0;
1334
1334
  },
1335
1335
  set: (x) => {
1336
1336
  S.value || (S.value = {});
1337
1337
  const _ = { ...S.value };
1338
- _[a] || (_[a] = {}), _[a][t] = {
1338
+ _[s] || (_[s] = {}), _[s][t] = {
1339
1339
  amount: Re.fromNumber(x),
1340
- type: te.Enum.WASTAGE,
1340
+ type: ne.Enum.WASTAGE,
1341
1341
  measurement: l
1342
1342
  }, S.value = _;
1343
1343
  }
1344
1344
  });
1345
1345
  }
1346
- function C(a, t = !0) {
1347
- const l = Number(Re.toFormatString({ value: a }));
1346
+ function C(s, t = !0) {
1347
+ const l = Number(Re.toFormatString({ value: s }));
1348
1348
  return t ? Math.abs(l) : l;
1349
1349
  }
1350
- function B(a, t) {
1351
- return t.measurement ? t.measurement.abbrev : a.sku.unit.abbrev;
1350
+ function B(s, t) {
1351
+ return t.measurement ? t.measurement.abbrev : s.sku.unit.abbrev;
1352
1352
  }
1353
- function D(a, t) {
1354
- return t === 0 ? "N/A" : (a + t).toString();
1353
+ function D(s, t) {
1354
+ return t === 0 ? "N/A" : (s + t).toString();
1355
1355
  }
1356
- return (a, t) => {
1357
- const l = U("FmIcon"), x = U("FmStepperField"), _ = U("FmCard"), $ = U("FmForm"), H = U("FmSpacer"), N = U("FmButton"), K = U("FmDialog");
1358
- return V(), z(K, {
1356
+ return (s, t) => {
1357
+ const l = U("FmIcon"), x = U("FmStepperField"), _ = U("FmCard"), V = U("FmForm"), H = U("FmSpacer"), N = U("FmButton"), K = U("FmDialog");
1358
+ return $(), z(K, {
1359
1359
  modelValue: F.value,
1360
1360
  "onUpdate:modelValue": t[4] || (t[4] = (R) => F.value = R),
1361
1361
  overlay: !0
@@ -1402,7 +1402,7 @@ const Oe = {
1402
1402
  ])
1403
1403
  ]),
1404
1404
  default: T(() => [
1405
- m.value ? (V(), Y("div", zn)) : (V(), z($, {
1405
+ m.value ? ($(), Y("div", zn)) : ($(), z(V, {
1406
1406
  key: 1,
1407
1407
  ref_key: "formRef",
1408
1408
  ref: w,
@@ -1418,11 +1418,11 @@ const Oe = {
1418
1418
  e("p", Gn, [
1419
1419
  t[6] || (t[6] = e("b", null, "Date:", -1)),
1420
1420
  t[7] || (t[7] = e("br", null, null, -1)),
1421
- de(" " + v(s(Et)(s(gt)(j.value._id))), 1)
1421
+ de(" " + v(a(Et)(a(gt)(j.value._id))), 1)
1422
1422
  ]),
1423
1423
  e("div", Kn, [
1424
- (V(!0), Y(ne, null, ie(j.value.skus, (R, X) => (V(), Y(ne, { key: X }, [
1425
- (V(!0), Y(ne, null, ie(R.amounts, (L, ee) => (V(), z(_, {
1424
+ ($(!0), Y(oe, null, ie(j.value.skus, (R, X) => ($(), Y(oe, { key: X }, [
1425
+ ($(!0), Y(oe, null, ie(R.amounts, (L, ee) => ($(), z(_, {
1426
1426
  key: ee,
1427
1427
  variant: "outlined",
1428
1428
  class: "p-2"
@@ -1439,7 +1439,7 @@ const Oe = {
1439
1439
  ]),
1440
1440
  e("div", Jn, [
1441
1441
  t[9] || (t[9] = e("span", { class: "fm-typo-en-body-lg-600" }, "Current amount:", -1)),
1442
- e("span", null, v(s(Re).toFormatString({ value: L.amount })) + " " + v(B(R, L)), 1)
1442
+ e("span", null, v(a(Re).toFormatString({ value: L.amount })) + " " + v(B(R, L)), 1)
1443
1443
  ]),
1444
1444
  y(x, {
1445
1445
  "model-value": b(R.sku._id, ee).value,
@@ -1450,7 +1450,7 @@ const Oe = {
1450
1450
  "append-text": B(R, L),
1451
1451
  rules: [
1452
1452
  (J) => J <= C(L.amount) || `Cannot be more than ${C(L.amount)}`,
1453
- s(Ve)(-1)
1453
+ a(Ve)(-1)
1454
1454
  ]
1455
1455
  }, null, 8, ["model-value", "onUpdate:modelValue", "helper-text", "append-text", "rules"]),
1456
1456
  e("div", Qn, [
@@ -1481,7 +1481,7 @@ const Oe = {
1481
1481
  key: 1,
1482
1482
  class: "t-system text-fsecondary"
1483
1483
  }, mo = {
1484
- key: 2,
1484
+ key: 3,
1485
1485
  class: "inline-flex items-center rounded-md bg-yellow-400/10 px-2 text-xs font-medium text-yellow-500 inset-ring inset-ring-yellow-400/20"
1486
1486
  }, po = {
1487
1487
  key: 1,
@@ -1504,20 +1504,20 @@ const Oe = {
1504
1504
  });
1505
1505
  const i = P(() => {
1506
1506
  var D;
1507
- const w = d.record.adjustments, u = d.sku, b = {}, B = w.flatMap((a) => {
1507
+ const w = d.record.adjustments, u = d.sku, b = {}, B = w.flatMap((s) => {
1508
1508
  var t;
1509
- return ((t = a.skus) == null ? void 0 : t.filter((l) => l.sku._id === u._id)) ?? [];
1510
- }).flatMap((a) => a.amounts);
1511
- for (const a of B) {
1512
- const t = a.measurement ? rt(a.measurement.conversion, a.amount) : a.amount;
1513
- b[D = a.type] ?? (b[D] = { amount: 0, precision: 0 }), b[a.type] = Ke(t, b[a.type]);
1509
+ return ((t = s.skus) == null ? void 0 : t.filter((l) => l.sku._id === u._id)) ?? [];
1510
+ }).flatMap((s) => s.amounts);
1511
+ for (const s of B) {
1512
+ const t = s.measurement ? rt(s.measurement.conversion, s.amount) : s.amount;
1513
+ b[D = s.type] ?? (b[D] = { amount: 0, precision: 0 }), b[s.type] = Ke(t, b[s.type]);
1514
1514
  }
1515
1515
  return Object.entries(b).reduce(
1516
- (a, [t, l]) => (a[t] = /// comment, because without it formatter makes code uglier
1516
+ (s, [t, l]) => (s[t] = /// comment, because without it formatter makes code uglier
1517
1517
  `${Q.toFormatString({
1518
1518
  value: l,
1519
1519
  precision: 4
1520
- })} ${u.unit.abbrev}`, a),
1520
+ })} ${u.unit.abbrev}`, s),
1521
1521
  {}
1522
1522
  );
1523
1523
  }), { t: F } = ce(), j = P(() => d.record.adjustmentsByTime.map(({ date: w, adjustments: u }) => ({
@@ -1526,27 +1526,28 @@ const Oe = {
1526
1526
  (b) => {
1527
1527
  var C, B;
1528
1528
  return ((B = (C = b.skus) == null ? void 0 : C.map) == null ? void 0 : B.call(C, (D) => {
1529
- var a, t;
1529
+ var s, t;
1530
1530
  return {
1531
1531
  ...D,
1532
1532
  ref: b.ref,
1533
1533
  backdateFrom: b.effectiveAt != null ? at(b._id) : null,
1534
- toBalance: (t = (a = b.skus) == null ? void 0 : a[0]) == null ? void 0 : t.toBalance,
1534
+ toBalance: (t = (s = b.skus) == null ? void 0 : s[0]) == null ? void 0 : t.toBalance,
1535
1535
  adjustmentId: b._id
1536
1536
  };
1537
1537
  })) ?? [];
1538
1538
  }
1539
1539
  ).flatMap((b) => {
1540
1540
  var D;
1541
- const C = (D = d.bills.find((a) => a._id === b.ref)) == null ? void 0 : D.seqNumber, B = C ? F("inventory.stock.record.bill", [C]) : "";
1542
- return b.amounts.map((a) => {
1541
+ const C = (D = d.bills.find((s) => s._id === b.ref)) == null ? void 0 : D.seqNumber, B = C ? F("inventory.stock.record.bill", [C]) : "";
1542
+ return b.amounts.map((s) => {
1543
1543
  var t;
1544
1544
  return {
1545
- amount: `${Q.toFormatString({ value: a.amount, precision: 4 })} ${((t = a.measurement) == null ? void 0 : t.abbrev) ?? b.sku.unit.abbrev}`,
1545
+ amount: `${Q.toFormatString({ value: s.amount, precision: 4 })} ${((t = s.measurement) == null ? void 0 : t.abbrev) ?? b.sku.unit.abbrev}`,
1546
1546
  backdateFrom: b.backdateFrom,
1547
- name: a.type,
1548
- remark: a.remark || B || "",
1549
- cost: a.cost,
1547
+ name: s.type,
1548
+ billRemark: B,
1549
+ remark: s.remark || "",
1550
+ cost: s.cost,
1550
1551
  toBalance: Q.toFormatString({
1551
1552
  value: b.toBalance ?? Q.fromNumber(0),
1552
1553
  precision: 4
@@ -1559,7 +1560,7 @@ const Oe = {
1559
1560
  })));
1560
1561
  return (w, u) => {
1561
1562
  const b = U("FmIcon"), C = U("FmTooltip"), B = U("FmCard");
1562
- return V(), z(B, { variant: "outlined" }, {
1563
+ return $(), z(B, { variant: "outlined" }, {
1563
1564
  default: T(() => [
1564
1565
  e("div", no, [
1565
1566
  e("div", {
@@ -1573,14 +1574,14 @@ const Oe = {
1573
1574
  size: "md"
1574
1575
  }, null, 8, ["name"])
1575
1576
  ]),
1576
- (V(!0), Y(ne, null, ie(i.value, (D, a) => (V(), Y("div", {
1577
- key: a,
1577
+ ($(!0), Y(oe, null, ie(i.value, (D, s) => ($(), Y("div", {
1578
+ key: s,
1578
1579
  class: "flex flex-row py-1",
1579
1580
  style: { "font-size": "0.8rem" }
1580
1581
  }, [
1581
- e("div", so, v(s(F)(`inventory.inventoryAdjustment.type.${a}`)), 1),
1582
+ e("div", so, v(a(F)(`inventory.inventoryAdjustment.type.${s}`)), 1),
1582
1583
  e("div", {
1583
- class: he({
1584
+ class: _e({
1584
1585
  "text-fm-color-typo-error": D.startsWith("-"),
1585
1586
  "text-fm-color-typo-success": !D.startsWith("-"),
1586
1587
  "ml-auto": !0
@@ -1597,28 +1598,28 @@ const Oe = {
1597
1598
  transition: "max-height 0.2s ease-out"
1598
1599
  })
1599
1600
  }, [
1600
- j.value.length ? (V(), Y("hr", ao)) : se("", !0),
1601
- (V(!0), Y(ne, null, ie(j.value, (D) => (V(), Y("div", {
1601
+ j.value.length ? ($(), Y("hr", ao)) : te("", !0),
1602
+ ($(!0), Y(oe, null, ie(j.value, (D) => ($(), Y("div", {
1602
1603
  key: D.time,
1603
1604
  class: "flex gap-1 w-full"
1604
1605
  }, [
1605
1606
  e("div", lo, v(D.time), 1),
1606
1607
  e("div", ro, [
1607
- (V(!0), Y(ne, null, ie(D.adjustments, (a) => (V(), Y("div", {
1608
- key: a.name,
1608
+ ($(!0), Y(oe, null, ie(D.adjustments, (s) => ($(), Y("div", {
1609
+ key: s.name,
1609
1610
  class: "flex gap-1"
1610
1611
  }, [
1611
1612
  e("div", io, [
1612
- de(v(s(F)(`inventory.inventoryAdjustment.type.${a.name}`)) + " ", 1),
1613
- a.backdateFrom ? (V(), z(C, {
1613
+ de(v(a(F)(`inventory.inventoryAdjustment.type.${s.name}`)) + " ", 1),
1614
+ s.backdateFrom ? ($(), z(C, {
1614
1615
  key: 0,
1615
1616
  variant: "plain",
1616
1617
  placement: "top",
1617
1618
  "z-index": 50
1618
1619
  }, {
1619
1620
  content: T(() => [
1620
- e("div", uo, v(s(F)("inventory.stock.record.backdate", [
1621
- s(ut)(new Date(a.backdateFrom))
1621
+ e("div", uo, v(a(F)("inventory.stock.record.backdate", [
1622
+ a(ut)(new Date(s.backdateFrom))
1622
1623
  ])), 1)
1623
1624
  ]),
1624
1625
  default: T(() => [
@@ -1629,23 +1630,27 @@ const Oe = {
1629
1630
  })
1630
1631
  ]),
1631
1632
  _: 2
1632
- }, 1024)) : se("", !0),
1633
- a.remark ? (V(), Y("span", co, " # " + v(a.remark), 1)) : se("", !0),
1634
- a.name === s(te).Enum.CLOSING ? (V(), Y("span", mo, " Actual Balance: " + v(a.toBalance) + " " + v(a.baseUnit), 1)) : se("", !0)
1633
+ }, 1024)) : te("", !0),
1634
+ s.billRemark ? ($(), Y("span", co, " # " + v(s.billRemark), 1)) : te("", !0),
1635
+ s.remark ? ($(), Y("span", {
1636
+ key: 2,
1637
+ class: _e(s.billRemark ? "text-xs text-gray-400" : "")
1638
+ }, v(s.billRemark ? `(${s.remark})` : `# ${s.remark}`), 3)) : te("", !0),
1639
+ s.name === a(ne).Enum.CLOSING ? ($(), Y("span", mo, " Actual Balance: " + v(s.toBalance) + " " + v(s.baseUnit), 1)) : te("", !0)
1635
1640
  ]),
1636
1641
  e("div", {
1637
- class: he({
1638
- "text-fm-color-typo-error": a.amount.startsWith("-"),
1639
- "text-fm-color-typo-success": !a.amount.startsWith("-"),
1642
+ class: _e({
1643
+ "text-fm-color-typo-error": s.amount.startsWith("-"),
1644
+ "text-fm-color-typo-success": !s.amount.startsWith("-"),
1640
1645
  "ml-auto": !0
1641
1646
  })
1642
- }, v(a.amount), 3),
1643
- a.name === s(te).Enum.WASTAGE ? (V(), z(to, {
1647
+ }, v(s.amount), 3),
1648
+ s.name === a(ne).Enum.WASTAGE ? ($(), z(to, {
1644
1649
  key: 0,
1645
- adjustmentId: a.adjustmentId,
1650
+ adjustmentId: s.adjustmentId,
1646
1651
  onRefreshHistory: u[1] || (u[1] = (t) => w.$emit("refreshHistory"))
1647
- }, null, 8, ["adjustmentId"])) : se("", !0),
1648
- a.cost ? (V(), Y("div", po, " (" + v(s(we)(a.cost, !1, a.cost.precision)) + ") ", 1)) : se("", !0)
1652
+ }, null, 8, ["adjustmentId"])) : te("", !0),
1653
+ s.cost ? ($(), Y("div", po, " (" + v(a(we)(s.cost, !1, s.cost.precision)) + ") ", 1)) : te("", !0)
1649
1654
  ]))), 128))
1650
1655
  ])
1651
1656
  ]))), 128))
@@ -1659,7 +1664,7 @@ const Oe = {
1659
1664
  });
1660
1665
  function vo(k, g) {
1661
1666
  var S;
1662
- const d = Object.keys(te.enum).reduce(
1667
+ const d = Object.keys(ne.enum).reduce(
1663
1668
  (m, i) => (m[i] = { amount: 0, precision: 0 }, m),
1664
1669
  {}
1665
1670
  );
@@ -1705,7 +1710,7 @@ function yo(k, g) {
1705
1710
  for (const S of A) {
1706
1711
  const m = S.amounts;
1707
1712
  for (const i of m) {
1708
- if (i.type !== te.Enum.SALES)
1713
+ if (i.type !== ne.Enum.SALES)
1709
1714
  continue;
1710
1715
  const F = i.measurement ? Q.multiply([i.measurement.conversion, i.amount]) : i.amount;
1711
1716
  d ?? (d = Q.fromNumber(0)), d = Q.add([d, F]);
@@ -1722,7 +1727,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
1722
1727
  }, So = { class: "fm-typo-en-body-lg-400 translate-x-4" }, Fo = {
1723
1728
  key: 1,
1724
1729
  class: "flex flex-col gap-12"
1725
- }, wo = { class: "pb-16" }, Ao = { class: "fm-typo-cn-body-lg-600" }, $o = {
1730
+ }, wo = { class: "pb-16" }, $o = { class: "fm-typo-cn-body-lg-600" }, Ao = {
1726
1731
  class: "grid gap-12 fm-typo-en-body-md-400",
1727
1732
  style: { "grid-template-columns": "auto auto auto", "grid-auto-rows": "1fr" }
1728
1733
  }, Vo = { class: "flex flex-col gap-1" }, Co = { class: "text-fm-color-typo-secondary" }, jo = { class: "font-bold" }, Do = { class: "flex flex-col gap-1" }, Bo = { class: "text-fm-color-typo-secondary flex" }, Mo = { class: "font-bold" }, Io = { class: "flex flex-col gap-1" }, Uo = { class: "text-fm-color-typo-secondary" }, To = { class: "font-bold" }, Ho = { class: "flex flex-col gap-1" }, Eo = { class: "text-fm-color-typo-secondary" }, Po = { class: "font-bold" }, Ro = { class: "flex flex-col gap-1" }, Oo = { class: "text-fm-color-typo-secondary" }, No = { class: "font-bold" }, Yo = { class: "flex flex-col gap-1" }, Lo = { class: "text-fm-color-typo-secondary" }, zo = { class: "font-bold" }, Go = { class: "flex flex-col gap-1" }, Ko = { class: "text-fm-color-typo-secondary" }, Wo = { class: "font-bold" }, qo = { class: "flex flex-col gap-1" }, Xo = { class: "text-fm-color-typo-secondary" }, Jo = { class: "font-bold" }, Qo = { class: "flex flex-col gap-1" }, Zo = { class: "text-fm-color-typo-secondary" }, es = { class: "font-bold" }, ts = {
@@ -1739,7 +1744,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
1739
1744
  },
1740
1745
  emits: ["update:show"],
1741
1746
  setup(k) {
1742
- const g = Ge(), d = Me(), o = ge(), A = Ln(), S = ke(), m = Wt(), { t: i } = ce(), F = k, j = O(!1), w = be(), u = O(zt(0));
1747
+ const g = Ge(), d = Me(), o = he(), A = Ln(), S = be(), m = Wt(), { t: i } = ce(), F = k, j = O(!1), w = ge(), u = O(zt(0));
1743
1748
  async function b() {
1744
1749
  j.value = !0;
1745
1750
  try {
@@ -1760,7 +1765,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
1760
1765
  b();
1761
1766
  });
1762
1767
  const C = O([]), B = O([]), D = O(new Array());
1763
- function a(n, r) {
1768
+ function s(n, r) {
1764
1769
  return r === "day" ? Lt(n) : ut(n);
1765
1770
  }
1766
1771
  function t(n, r) {
@@ -1769,7 +1774,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
1769
1774
  const M = f.effectiveAt ?? at(f._id);
1770
1775
  if (!M)
1771
1776
  return c;
1772
- const I = a(new Date(M), r);
1777
+ const I = s(new Date(M), r);
1773
1778
  return c[I] ?? (c[I] = []), c[I].push(f), c;
1774
1779
  },
1775
1780
  {}
@@ -1804,7 +1809,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
1804
1809
  const _ = P(() => {
1805
1810
  const n = C.value, r = F.sku;
1806
1811
  return vo(n, r);
1807
- }), $ = P(() => {
1812
+ }), V = P(() => {
1808
1813
  const n = C.value, r = F.sku;
1809
1814
  return yo(n, r);
1810
1815
  }), H = P(() => {
@@ -1864,7 +1869,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
1864
1869
  });
1865
1870
  }
1866
1871
  const X = P(() => i("inventory.ingredient.valuationMethod.WAVG")), L = P(() => {
1867
- var I, G, oe, E;
1872
+ var I, G, se, E;
1868
1873
  const n = [...C.value].reverse().computeFirst((W) => {
1869
1874
  var q, le;
1870
1875
  return (le = (q = W.skus) == null ? void 0 : q.find) == null ? void 0 : le.call(q, (re) => re.sku._id === F.sku._id);
@@ -1876,7 +1881,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
1876
1881
  }, c = r.amount, f = c.amount == 0 ? Q.fromNumber(0) : Q.divide([h, c]);
1877
1882
  return {
1878
1883
  ...Q.multiply([f, c]),
1879
- currency: ((oe = r.cost) == null ? void 0 : oe.currency) || Ee(((E = g.currentCountry) == null ? void 0 : E.value) ?? ht)
1884
+ currency: ((se = r.cost) == null ? void 0 : se.currency) || Ee(((E = g.currentCountry) == null ? void 0 : E.value) ?? ht)
1880
1885
  };
1881
1886
  }), ee = P(() => {
1882
1887
  var h;
@@ -1902,17 +1907,17 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
1902
1907
  }
1903
1908
  const p = Ue(F, "show");
1904
1909
  return (n, r) => {
1905
- const h = U("FmButton"), c = U("FmField"), f = U("FmDateRangePicker"), M = U("FmSpacer"), I = U("FmCircularProgress"), G = U("FmIcon"), oe = U("FmTooltip"), E = U("FmMenuDivider"), W = U("FmChip"), q = U("FmCardSection"), le = U("FmCard"), re = U("FmSideSheet");
1906
- return V(), z(re, {
1910
+ const h = U("FmButton"), c = U("FmField"), f = U("FmDateRangePicker"), M = U("FmSpacer"), I = U("FmCircularProgress"), G = U("FmIcon"), se = U("FmTooltip"), E = U("FmMenuDivider"), W = U("FmChip"), q = U("FmCardSection"), le = U("FmCard"), re = U("FmSideSheet");
1911
+ return $(), z(re, {
1907
1912
  "dismiss-away": "",
1908
- modelValue: s(p),
1913
+ modelValue: a(p),
1909
1914
  "onUpdate:modelValue": r[4] || (r[4] = (Z) => je(p) ? p.value = Z : null),
1910
1915
  "close-button": !1,
1911
1916
  "max-width": 560
1912
1917
  }, {
1913
1918
  "side-sheet-header": T(() => [
1914
1919
  e("div", _o, [
1915
- e("div", ko, v(s(i)("inventory.stock.history.title", [n.sku.name])), 1),
1920
+ e("div", ko, v(a(i)("inventory.stock.history.title", [n.sku.name])), 1),
1916
1921
  y(h, {
1917
1922
  variant: "tertiary",
1918
1923
  "prepend-icon": "close",
@@ -1959,33 +1964,33 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
1959
1964
  "prepend-icon": "navigate_next"
1960
1965
  })
1961
1966
  ]),
1962
- j.value ? (V(), Y("div", xo, [
1967
+ j.value ? ($(), Y("div", xo, [
1963
1968
  y(M),
1964
1969
  y(I, { size: "xl" }),
1965
- e("div", So, v(s(i)("inventory.stock.history.loading")), 1),
1970
+ e("div", So, v(a(i)("inventory.stock.history.loading")), 1),
1966
1971
  y(M),
1967
1972
  y(M)
1968
- ])) : B.value && ((Z = B.value) == null ? void 0 : Z.length) > 0 ? (V(), Y("div", Fo, [
1973
+ ])) : B.value && ((Z = B.value) == null ? void 0 : Z.length) > 0 ? ($(), Y("div", Fo, [
1969
1974
  y(le, { variant: "outlined" }, {
1970
1975
  default: T(() => [
1971
1976
  y(q, { class: "flex flex-col gap-4" }, {
1972
1977
  default: T(() => [
1973
1978
  e("div", wo, [
1974
- e("div", Ao, v(s(i)("inventory.stock.history.summary.title")), 1)
1979
+ e("div", $o, v(a(i)("inventory.stock.history.summary.title")), 1)
1975
1980
  ]),
1976
- e("div", $o, [
1981
+ e("div", Ao, [
1977
1982
  e("div", Vo, [
1978
- e("div", Co, v(s(i)("inventory.stock.history.summary.totalPurchase")), 1),
1983
+ e("div", Co, v(a(i)("inventory.stock.history.summary.totalPurchase")), 1),
1979
1984
  e("div", jo, v(_.value.PURCHASE), 1)
1980
1985
  ]),
1981
1986
  e("div", Do, [
1982
1987
  e("div", Bo, [
1983
- de(v(s(i)("inventory.stock.history.summary.totalSales")) + "  ", 1),
1984
- $.value != null ? (V(), z(oe, {
1988
+ de(v(a(i)("inventory.stock.history.summary.totalSales")) + "  ", 1),
1989
+ V.value != null ? ($(), z(se, {
1985
1990
  key: 0,
1986
1991
  variant: "plain",
1987
1992
  placement: "top",
1988
- content: `Before: ${$.value}`,
1993
+ content: `Before: ${V.value}`,
1989
1994
  "z-index": 50
1990
1995
  }, {
1991
1996
  default: T(() => [
@@ -1995,51 +2000,51 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
1995
2000
  })
1996
2001
  ]),
1997
2002
  _: 1
1998
- }, 8, ["content"])) : se("", !0)
2003
+ }, 8, ["content"])) : te("", !0)
1999
2004
  ]),
2000
2005
  e("div", Mo, v(_.value.SALES), 1)
2001
2006
  ]),
2002
2007
  e("div", Io, [
2003
- e("div", Uo, v(s(i)("inventory.stock.history.summary.totalLose")), 1),
2008
+ e("div", Uo, v(a(i)("inventory.stock.history.summary.totalLose")), 1),
2004
2009
  e("div", To, v(_.value.LOSE), 1)
2005
2010
  ]),
2006
2011
  e("div", Ho, [
2007
- e("div", Eo, v(s(i)("inventory.stock.history.summary.totalRequest")), 1),
2012
+ e("div", Eo, v(a(i)("inventory.stock.history.summary.totalRequest")), 1),
2008
2013
  e("div", Po, v(_.value.REQUEST), 1)
2009
2014
  ]),
2010
2015
  e("div", Ro, [
2011
- e("div", Oo, v(s(i)("inventory.stock.history.summary.totalReceive")), 1),
2016
+ e("div", Oo, v(a(i)("inventory.stock.history.summary.totalReceive")), 1),
2012
2017
  e("div", No, v(_.value.RECEIVE), 1)
2013
2018
  ]),
2014
2019
  e("div", Yo, [
2015
- e("div", Lo, v(s(i)("inventory.stock.history.summary.totalConvert")), 1),
2020
+ e("div", Lo, v(a(i)("inventory.stock.history.summary.totalConvert")), 1),
2016
2021
  e("div", zo, v(_.value.CONVERT), 1)
2017
2022
  ]),
2018
2023
  e("div", Go, [
2019
- e("div", Ko, v(s(i)("inventory.stock.history.summary.totalDamage")), 1),
2024
+ e("div", Ko, v(a(i)("inventory.stock.history.summary.totalDamage")), 1),
2020
2025
  e("div", Wo, v(_.value.DAMAGE), 1)
2021
2026
  ]),
2022
2027
  e("div", qo, [
2023
- e("div", Xo, v(s(i)("inventory.stock.history.summary.openingBalance")), 1),
2028
+ e("div", Xo, v(a(i)("inventory.stock.history.summary.openingBalance")), 1),
2024
2029
  e("div", Jo, v(H.value), 1)
2025
2030
  ]),
2026
2031
  e("div", Qo, [
2027
- e("div", Zo, v(s(i)("inventory.stock.history.summary.lastStockBalance")), 1),
2032
+ e("div", Zo, v(a(i)("inventory.stock.history.summary.lastStockBalance")), 1),
2028
2033
  e("div", es, v(N.value), 1)
2029
2034
  ])
2030
2035
  ]),
2031
- s(m).enableTotalCost ? (V(), Y("div", ts, [
2036
+ a(m).enableTotalCost ? ($(), Y("div", ts, [
2032
2037
  y(E, { class: "w-full" }),
2033
2038
  e("div", ns, [
2034
2039
  e("div", os, [
2035
2040
  y(Qe, { "z-index": 50 }, {
2036
2041
  default: T(() => [
2037
2042
  e("div", ss, [
2038
- de(v(s(i)("inventory.stock.history.estimatedValue")) + " ", 1),
2039
- y(oe, {
2043
+ de(v(a(i)("inventory.stock.history.estimatedValue")) + " ", 1),
2044
+ y(se, {
2040
2045
  variant: "plain",
2041
2046
  placement: "top",
2042
- content: `[${X.value}] ${s(i)("inventory.stock.history.estimatedValueTooltip")}`,
2047
+ content: `[${X.value}] ${a(i)("inventory.stock.history.estimatedValueTooltip")}`,
2043
2048
  "z-index": 50
2044
2049
  }, {
2045
2050
  default: T(() => [
@@ -2055,18 +2060,18 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2055
2060
  _: 1
2056
2061
  }),
2057
2062
  e("div", as, [
2058
- n.sku.valuation === s(xt).Enum.FIFO ? (V(), Y(ne, { key: 0 }, [
2063
+ n.sku.valuation === a(xt).Enum.FIFO ? ($(), Y(oe, { key: 0 }, [
2059
2064
  y(W, {
2060
2065
  label: "FIFO",
2061
2066
  compact: ""
2062
2067
  }),
2063
- de(" " + v(typeof ee.value != "string" ? s(we)(
2068
+ de(" " + v(typeof ee.value != "string" ? a(we)(
2064
2069
  ee.value,
2065
2070
  !1,
2066
2071
  ee.value.precision
2067
2072
  ) : ee.value), 1)
2068
- ], 64)) : (V(), Y(ne, { key: 1 }, [
2069
- de(v(typeof L.value != "string" ? s(we)(
2073
+ ], 64)) : ($(), Y(oe, { key: 1 }, [
2074
+ de(v(typeof L.value != "string" ? a(we)(
2070
2075
  L.value,
2071
2076
  !1,
2072
2077
  L.value.precision
@@ -2078,14 +2083,14 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2078
2083
  y(Qe, { "z-index": 50 }, {
2079
2084
  default: T(() => [
2080
2085
  e("div", rs, [
2081
- de(v(s(i)("inventory.stock.history.costSold")) + " ", 1),
2082
- y(oe, {
2086
+ de(v(a(i)("inventory.stock.history.costSold")) + " ", 1),
2087
+ y(se, {
2083
2088
  variant: "plain",
2084
2089
  placement: "top",
2085
2090
  "z-index": 50
2086
2091
  }, {
2087
2092
  content: T(() => [
2088
- e("div", is, v(s(i)("inventory.stock.history.costSoldTooltip")), 1)
2093
+ e("div", is, v(a(i)("inventory.stock.history.costSoldTooltip")), 1)
2089
2094
  ]),
2090
2095
  default: T(() => [
2091
2096
  y(G, {
@@ -2102,7 +2107,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2102
2107
  e("div", us, v(K.value), 1)
2103
2108
  ])
2104
2109
  ])
2105
- ])) : se("", !0)
2110
+ ])) : te("", !0)
2106
2111
  ]),
2107
2112
  _: 1
2108
2113
  })
@@ -2110,27 +2115,27 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2110
2115
  _: 1
2111
2116
  }),
2112
2117
  r[5] || (r[5] = e("div", null, null, -1)),
2113
- (V(!0), Y(ne, null, ie(B.value, (ae) => (V(), Y(ne, {
2118
+ ($(!0), Y(oe, null, ie(B.value, (ae) => ($(), Y(oe, {
2114
2119
  key: ae.date
2115
2120
  }, [
2116
- n.sku ? (V(), z(fo, {
2121
+ n.sku ? ($(), z(fo, {
2117
2122
  key: 0,
2118
2123
  record: ae,
2119
2124
  sku: n.sku,
2120
2125
  bills: D.value,
2121
2126
  onRefreshHistory: b
2122
- }, null, 8, ["record", "sku", "bills"])) : se("", !0)
2127
+ }, null, 8, ["record", "sku", "bills"])) : te("", !0)
2123
2128
  ], 64))), 128))
2124
- ])) : (V(), Y("div", cs, [
2129
+ ])) : ($(), Y("div", cs, [
2125
2130
  y(M),
2126
2131
  e("div", null, [
2127
2132
  e("img", {
2128
- src: s(Kt),
2133
+ src: a(Kt),
2129
2134
  alt: "List is empty"
2130
2135
  }, null, 8, ds)
2131
2136
  ]),
2132
- e("div", ms, v(s(i)("inventory.stock.history.noRecords")), 1),
2133
- e("div", ps, v(s(i)("inventory.stock.history.changeDateRange")), 1),
2137
+ e("div", ms, v(a(i)("inventory.stock.history.noRecords")), 1),
2138
+ e("div", ps, v(a(i)("inventory.stock.history.changeDateRange")), 1),
2134
2139
  y(M),
2135
2140
  y(M)
2136
2141
  ]))
@@ -2147,7 +2152,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2147
2152
  }, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _s = { class: "flex flex-col gap-8" }, ks = { class: "flex flex-col" }, bs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, zs = /* @__PURE__ */ ue({
2148
2153
  __name: "StockView",
2149
2154
  setup(k) {
2150
- const { t: g } = ce(), d = Be(), o = ke(), A = Me(), S = dt(), m = ge(), i = st(), F = qt(), { columnDefs: j } = sn(), w = Ie(), u = be();
2155
+ const { t: g } = ce(), d = Be(), o = be(), A = Me(), S = dt(), m = he(), i = st(), F = qt(), { columnDefs: j } = sn(), w = Ie(), u = ge();
2151
2156
  o.watchLocation(D);
2152
2157
  const b = P(
2153
2158
  () => new Set(F.getAvailableItems(F.businessSubsidiaryId))
@@ -2190,7 +2195,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2190
2195
  }
2191
2196
  }
2192
2197
  }
2193
- const a = P(() => [
2198
+ const s = P(() => [
2194
2199
  {
2195
2200
  type: "string",
2196
2201
  key: "status",
@@ -2224,7 +2229,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2224
2229
  )) == null ? void 0 : r.balance, G = i.inventoryForecast.skus.find(
2225
2230
  (E) => E.id === c._id
2226
2231
  );
2227
- const oe = {
2232
+ const se = {
2228
2233
  ...c,
2229
2234
  balance: I ?? {
2230
2235
  amount: 0,
@@ -2233,11 +2238,11 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2233
2238
  day: (G == null ? void 0 : G.depletionDays) ?? void 0,
2234
2239
  trackingUnitAbbrev: M ? ((h = c.unit.measurements.find((E) => E.id === M)) == null ? void 0 : h.abbrev) ?? "" : c.unit.abbrev
2235
2240
  };
2236
- p.push(oe);
2241
+ p.push(se);
2237
2242
  }
2238
2243
  }
2239
2244
  return p;
2240
- }), x = O(""), _ = O(!0), { breakpoints: $ } = Vt(), H = P(() => $.value.xs || $.value.sm), N = P(() => H.value ? 10 : 20), K = vt(), R = P(() => [
2245
+ }), x = O(""), _ = O(!0), { breakpoints: V } = Vt(), H = P(() => V.value.xs || V.value.sm), N = P(() => H.value ? 10 : 20), K = vt(), R = P(() => [
2241
2246
  {
2242
2247
  label: g("inventory.stock.stock_balance.refreshBalance"),
2243
2248
  value: "refresh-balance",
@@ -2275,8 +2280,8 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2275
2280
  }
2276
2281
  return (J, p) => {
2277
2282
  const n = U("FmSwitch"), r = U("FmTable");
2278
- return V(), z(yt, {
2279
- title: s(g)("inventory.stock.title"),
2283
+ return $(), z(yt, {
2284
+ title: a(g)("inventory.stock.title"),
2280
2285
  actions: R.value,
2281
2286
  "onClick:action": ee
2282
2287
  }, {
@@ -2284,7 +2289,7 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2284
2289
  var h, c, f, M;
2285
2290
  return [
2286
2291
  e("div", {
2287
- class: he([
2292
+ class: _e([
2288
2293
  "flex flex-col gap-8 max-h-full",
2289
2294
  {
2290
2295
  "p-0": H.value,
@@ -2299,14 +2304,14 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2299
2304
  "onUpdate:search": p[1] || (p[1] = (I) => x.value = I),
2300
2305
  "hide-filter-options": !0,
2301
2306
  filterable: "",
2302
- "filter-attributes": a.value,
2307
+ "filter-attributes": s.value,
2303
2308
  filter: t.value,
2304
2309
  "onUpdate:filter": p[2] || (p[2] = (I) => t.value = I)
2305
2310
  }, {
2306
2311
  default: T(() => [
2307
- s(F).isEnabled ? (V(), Y("div", vs, [
2308
- e("span", ys, v(s(g)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
2309
- y(At),
2312
+ a(F).isEnabled ? ($(), Y("div", vs, [
2313
+ e("span", ys, v(a(g)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
2314
+ y($t),
2310
2315
  y(ze, null, {
2311
2316
  default: T(() => [
2312
2317
  y(n, {
@@ -2316,38 +2321,38 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2316
2321
  ]),
2317
2322
  _: 1
2318
2323
  })
2319
- ])) : se("", !0)
2324
+ ])) : te("", !0)
2320
2325
  ]),
2321
2326
  _: 1
2322
2327
  }, 8, ["search", "filter-attributes", "filter"]),
2323
- (V(), z(r, {
2324
- style: ot(s(K).tableHeight),
2325
- "column-defs": s(j),
2328
+ ($(), z(r, {
2329
+ style: ot(a(K).tableHeight),
2330
+ "column-defs": a(j),
2326
2331
  "row-data": l.value,
2327
2332
  "search-value": x.value,
2328
- loading: C.value || !s(o)._currentLocation,
2329
- key: (h = s(o)._currentLocation) == null ? void 0 : h.dbName,
2330
- onRowClick: p[3] || (p[3] = (I) => s(S).showSkuHistory(I.original)),
2333
+ loading: C.value || !a(o)._currentLocation,
2334
+ key: (h = a(o)._currentLocation) == null ? void 0 : h.dbName,
2335
+ onRowClick: p[3] || (p[3] = (I) => a(S).showSkuHistory(I.original)),
2331
2336
  "page-size": N.value
2332
2337
  }, {
2333
2338
  "list-row": T((I) => [
2334
2339
  y(Ft, {
2335
2340
  row: I,
2336
- onRowClick: s(S).showSkuHistory
2341
+ onRowClick: a(S).showSkuHistory
2337
2342
  }, {
2338
2343
  default: T((G) => {
2339
- var oe, E, W, q, le, re, Z, ae, fe, me;
2344
+ var se, E, W, q, le, re, Z, ae, fe, me;
2340
2345
  return [
2341
2346
  e("div", _s, [
2342
2347
  e("div", ks, [
2343
2348
  e("div", bs, [
2344
- y(s(Je), {
2345
- render: (W = (E = (oe = G.code) == null ? void 0 : oe.column) == null ? void 0 : E.columnDef) == null ? void 0 : W.cell,
2349
+ y(a(Je), {
2350
+ render: (W = (E = (se = G.code) == null ? void 0 : se.column) == null ? void 0 : E.columnDef) == null ? void 0 : W.cell,
2346
2351
  props: (le = (q = G.code) == null ? void 0 : q.getContext) == null ? void 0 : le.call(q)
2347
2352
  }, null, 8, ["render", "props"])
2348
2353
  ]),
2349
2354
  e("div", gs, [
2350
- y(s(Je), {
2355
+ y(a(Je), {
2351
2356
  render: (ae = (Z = (re = G.name) == null ? void 0 : re.column) == null ? void 0 : Z.columnDef) == null ? void 0 : ae.cell,
2352
2357
  props: (me = (fe = G.name) == null ? void 0 : fe.getContext) == null ? void 0 : me.call(fe)
2353
2358
  }, null, 8, ["render", "props"])
@@ -2376,16 +2381,16 @@ const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = {
2376
2381
  _: 1
2377
2382
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
2378
2383
  ], 2),
2379
- (V(), z(ft, { to: "body" }, [
2380
- (c = s(S).stockHistoryProps) != null && c.sku ? (V(), z(fs, Te(He({ key: 0 }, s(S).stockHistoryProps)), null, 16)) : se("", !0),
2381
- (f = s(S).convertSkuDialogProps) != null && f.sku ? (V(), z(gn, Te(He({ key: 1 }, s(S).convertSkuDialogProps)), null, 16)) : se("", !0),
2382
- (M = s(S).adjustSkuDialogProps) != null && M.stock ? (V(), z(jn, Te(He({ key: 2 }, s(S).adjustSkuDialogProps)), null, 16)) : se("", !0),
2383
- X.value ? (V(), z(Yn, {
2384
+ ($(), z(ft, { to: "body" }, [
2385
+ (c = a(S).stockHistoryProps) != null && c.sku ? ($(), z(fs, Te(He({ key: 0 }, a(S).stockHistoryProps)), null, 16)) : te("", !0),
2386
+ (f = a(S).convertSkuDialogProps) != null && f.sku ? ($(), z(gn, Te(He({ key: 1 }, a(S).convertSkuDialogProps)), null, 16)) : te("", !0),
2387
+ (M = a(S).adjustSkuDialogProps) != null && M.stock ? ($(), z(jn, Te(He({ key: 2 }, a(S).adjustSkuDialogProps)), null, 16)) : te("", !0),
2388
+ X.value ? ($(), z(Yn, {
2384
2389
  key: 3,
2385
2390
  show: X.value,
2386
2391
  "onUpdate:show": p[4] || (p[4] = (I) => X.value = I),
2387
2392
  onSubmitted: p[5] || (p[5] = (I) => D())
2388
- }, null, 8, ["show"])) : se("", !0)
2393
+ }, null, 8, ["show"])) : te("", !0)
2389
2394
  ]))
2390
2395
  ];
2391
2396
  }),