@feedmepos/mf-inventory-portal 1.0.36-dev.7 → 1.0.37-dev.1

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 (50) hide show
  1. package/dist/{App-Cw7dAyRr.js → App-DomXC0uh.js} +46 -47
  2. package/dist/{ApprovalView-uzxVamAD.js → ApprovalView-DnINEwhh.js} +20 -20
  3. package/dist/{BindingsDialog-CjAyz7qd.js → BindingsDialog-MstJl2hJ.js} +10 -10
  4. package/dist/{BindingsPicker-VWQEClDc.js → BindingsPicker-BCgoeZK5.js} +1 -1
  5. package/dist/{BindingsTable-D_AidNg-.js → BindingsTable-knJs1DaE.js} +4 -4
  6. package/dist/{ClosingDraftView-DnPQE4xl.js → ClosingDraftView-Cg4siKrJ.js} +27 -27
  7. package/dist/{ClosingTemplateView-BzeUoP0S.js → ClosingTemplateView-D7nxxW1T.js} +2 -2
  8. package/dist/{DeliveryOrderPrintPreview-CQBfbvjK.js → DeliveryOrderPrintPreview-DUqWxzpS.js} +4 -4
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C5iYx065.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DMeIIyKI.js} +11 -11
  10. package/dist/{FmMultiselectDialog-DLZju68a.js → FmMultiselectDialog-H6rOzolY.js} +1 -1
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-elcx6AO6.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BAk4KHnz.js} +31 -31
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DMmGsyfI.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-SxPkPzU1.js} +1 -1
  13. package/dist/{IngredientGroupView-bFYU22r_.js → IngredientGroupView-CAA69KE_.js} +21 -21
  14. package/dist/{IngredientsView-BrfeKO6V.js → IngredientsView-BYhDmhQb.js} +42 -43
  15. package/dist/IntegrationView-CGBFyLWN.js +3303 -0
  16. package/dist/{InventoryBindingForm-DrNO6vLb.js → InventoryBindingForm-X-CFcWEY.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DU_Nt6VM.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CwV5nKPo.js} +18 -18
  18. package/dist/{InventoryBindingSummary-BztWC0Gi.js → InventoryBindingSummary-Cch1pODC.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-OvRfk02N.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Uc6h5Apn.js} +4 -4
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BsbrYUky.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BcWa_Dww.js} +10 -10
  21. package/dist/{PublishView-BwmvDibM.js → PublishView-DCAdzucX.js} +19 -19
  22. package/dist/{PurchaseOrderPrintPreview-DRo0ctOc.js → PurchaseOrderPrintPreview-IDiFQ15P.js} +12 -12
  23. package/dist/{ReceiveRequestView-yb4E_Dg6.js → ReceiveRequestView-7eslFHYc.js} +106 -107
  24. package/dist/{RecipeView-Dyf9kDoR.js → RecipeView-DOLJ5Gsx.js} +38 -39
  25. package/dist/{StockView-Cg-KD9qT.js → StockView-vCgmnyKT.js} +68 -69
  26. package/dist/{SupplierView-BtVTg_Ht.js → SupplierView-B6xdSB6T.js} +11 -12
  27. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-lNmQ3zTi.js → TransferDetails.vue_vue_type_script_setup_true_lang-DrfHulTL.js} +105 -106
  28. package/dist/{TransferTemplateView-AUp2tI1x.js → TransferTemplateView-g1V3JX-5.js} +143 -144
  29. package/dist/{UnitView-BgbQjCfN.js → UnitView-BD28XnQL.js} +19 -19
  30. package/dist/{WarehouseView-BedfDS6s.js → WarehouseView-Cjgl43Xz.js} +14 -14
  31. package/dist/api/netsuite.d.ts +2 -0
  32. package/dist/app-dN4odAZ8.js +124833 -0
  33. package/dist/app.js +6 -6
  34. package/dist/{decimal-uKQOh7Qw.js → decimal-Blq-Ws2M.js} +1 -1
  35. package/dist/{format-unit-display-EMi6Weg0.js → format-unit-display-CzANmeBd.js} +13 -13
  36. package/dist/{index-B4jwhkHY.js → index-61_R9xfw.js} +3 -4
  37. package/dist/{index-BN_lVBL8.js → index-B8dsKHa4.js} +1 -1
  38. package/dist/{stock-SaEl13YM.js → stock-D7E6dj7b.js} +1 -1
  39. package/dist/stores/feature.d.ts +2 -0
  40. package/dist/stores/integration/netsuite.d.ts +1 -0
  41. package/dist/{supplier-hdrIxTLp.js → supplier-UeD3tjJh.js} +25 -26
  42. package/dist/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/{use-ingredient-select-dialog-B7XYGX1J.js → use-ingredient-select-dialog-CydPG1Ol.js} +1 -1
  44. package/dist/{use-inventory-binding-dialog-t7XQb2UV.js → use-inventory-binding-dialog-DzRlrnI6.js} +1 -1
  45. package/dist/views/integration/components/netsuite/InventoryTransferOutTable.vue.d.ts +2 -0
  46. package/dist/{vue-i18n-DBsdCMy_.js → vue-i18n-D64xeCoR.js} +285 -285
  47. package/package.json +1 -1
  48. package/dist/IntegrationView-KlnDvvRE.js +0 -6531
  49. package/dist/app-nDgEuY-Q.js +0 -102338
  50. package/dist/feature-_ggdK-7_.js +0 -19100
@@ -1,18 +1,17 @@
1
1
  import { defineComponent as ie, ref as O, computed as U, resolveComponent as M, openBlock as A, createBlock as Y, withCtx as D, createElementVNode as t, normalizeClass as ge, toDisplayString as h, createVNode as g, createElementBlock as R, Fragment as J, renderList as le, unref as r, h as _e, watch as be, isRef as Ie, createCommentVNode as ne, reactive as at, onMounted as qe, normalizeStyle as Qe, createTextVNode as ce, Teleport as rt, normalizeProps as we, mergeProps as $e } from "vue";
2
- import { u as pe, V as lt, e as Te, f as it, a as Ue, F as Le, W as ut, X as Be, i as de, O as ct, t as xe, T as De, A as dt, M as mt, Q as fe, Y as pt, Z as te, $ as vt, a0 as Ne, l as ft, a1 as yt, a2 as _t, a3 as kt, a4 as Xe, P as G, a5 as ht, r as Je, a6 as ke, a7 as gt, a8 as bt, n as Ae, k as ze, o as xt, a9 as St, aa as Ft, ab as wt, ac as $t, ad as At, z as Ct, _ as Vt, B as Mt, C as Bt, E as Ye } from "./app-nDgEuY-Q.js";
3
- import { u as Pe, a as Ee } from "./stock-SaEl13YM.js";
4
- import { g as Se } from "./decimal-uKQOh7Qw.js";
5
- import { e as Dt, u as Ze, i as et, _ as Ke } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BsbrYUky.js";
2
+ import { u as pe, W as lt, f as Te, h as it, a as Ue, F as Le, X as ut, Y as Be, j as de, P as ct, t as xe, V as De, A as dt, M as mt, T as fe, Z as pt, $ as te, a0 as vt, a1 as Ne, m as ft, a2 as yt, a3 as _t, a4 as kt, a5 as Xe, Q as W, a6 as ht, s as Je, a7 as ke, a8 as gt, a9 as bt, o as Ae, l as ze, p as xt, c as St, aa as Ft, ab as wt, ac as $t, ad as At, ae as Ct, B as Vt, _ as Mt, C as Bt, E as Dt, G as Ye } from "./app-dN4odAZ8.js";
3
+ import { u as Pe, a as Ee } from "./stock-D7E6dj7b.js";
4
+ import { g as Se } from "./decimal-Blq-Ws2M.js";
5
+ import { e as jt, u as Ze, i as et, _ as Ke } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BcWa_Dww.js";
6
6
  import { _ as je, S as Ce, g as tt } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
7
- import { _ as jt } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
8
- import { useI18n as ue, useCoreStore as It } from "@feedmepos/mf-common";
9
- import { useSnackbar as ye, useDialog as nt, useProxiedModel as He, useBreakpoints as Tt } from "@feedmepos/ui-library";
10
- import { defineStore as Ut } from "pinia";
11
- import { u as Pt } from "./use-inventory-binding-dialog-t7XQb2UV.js";
12
- import { _ as Et } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-OvRfk02N.js";
13
- import { E as Ht } from "./empty-placeholder-wf6-BWE8.js";
7
+ import { _ as It } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
8
+ import { useI18n as ue, useCoreStore as Tt } from "@feedmepos/mf-common";
9
+ import { useSnackbar as ye, useDialog as nt, useProxiedModel as He, useBreakpoints as Ut } from "@feedmepos/ui-library";
10
+ import { defineStore as Pt } from "pinia";
11
+ import { u as Et } from "./use-inventory-binding-dialog-DzRlrnI6.js";
12
+ import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Uc6h5Apn.js";
13
+ import { E as Rt } from "./empty-placeholder-wf6-BWE8.js";
14
14
  import "./array-Ca8T3f_G.js";
15
- import { u as Rt } from "./feature-_ggdK-7_.js";
16
15
  var he = /* @__PURE__ */ ((f) => (f.History = "History", f.Convert = "Convert", f.Adjust = "Adjust", f))(he || {});
17
16
  const Ot = [
18
17
  {
@@ -46,7 +45,7 @@ async function Nt(f) {
46
45
  / /g,
47
46
  "_"
48
47
  )}_${lt().format("DD_MM_YYYY_HHmm")}.xlsx`;
49
- await Dt(
48
+ await jt(
50
49
  [
51
50
  {
52
51
  name: "stock",
@@ -172,14 +171,14 @@ const zt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ i
172
171
  __name: "StockHeaderPreview",
173
172
  setup(f) {
174
173
  const { t: y } = ue();
175
- return (l, o) => (A(), Y(jt, null, {
174
+ return (l, o) => (A(), Y(It, null, {
176
175
  default: D(() => [
177
176
  t("div", Yt, h(r(y)("inventory.stock.prediction.daysRemaining")), 1)
178
177
  ]),
179
178
  _: 1
180
179
  }));
181
180
  }
182
- }), st = Ut("stockActions", () => {
181
+ }), st = Pt("stockActions", () => {
183
182
  const f = O(!1), y = pe(), l = Pe(), o = Ze(), S = ye(), _ = nt(), { t: i } = ue();
184
183
  async function m() {
185
184
  if (y._currentLocation) {
@@ -268,7 +267,7 @@ const zt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ i
268
267
  adjustSkuDialogProps: a
269
268
  };
270
269
  });
271
- function Wt() {
270
+ function Gt() {
272
271
  const f = pe(), y = st(), { t: l } = ue();
273
272
  return {
274
273
  columnDefs: [
@@ -338,7 +337,7 @@ function Wt() {
338
337
  ]
339
338
  };
340
339
  }
341
- const Gt = {
340
+ const Wt = {
342
341
  context: null,
343
342
  error: null,
344
343
  isRequired(f = "This field is required") {
@@ -372,8 +371,8 @@ const Gt = {
372
371
  return this;
373
372
  }
374
373
  };
375
- function We(f) {
376
- return { ...Gt, context: f };
374
+ function Ge(f) {
375
+ return { ...Wt, context: f };
377
376
  }
378
377
  const qt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-800" }, Xt = { class: "flex flex-col gap-24 w-full" }, Jt = { class: "flex flex-col gap-8" }, Zt = { class: "fm-typo-en-body-lg-600" }, en = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary flex-grow" }, tn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-error" }, nn = { class: "flex flex-col p-16 gap-8" }, on = { class: "flex flex-col gap-4" }, sn = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 border-b py-12 px-16" }, an = { class: "grid grid-cols-[auto_100px_100px_48px] xs:grid-cols-[auto_80px_120px_48px] gap-8 px-8 items-center" }, rn = { class: "xs:col-span-3" }, ln = { class: "flex gap-8" }, un = /* @__PURE__ */ ie({
379
378
  __name: "ConvertSkuDialog",
@@ -384,7 +383,7 @@ const qt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
384
383
  },
385
384
  emits: ["update:show", "submitted"],
386
385
  setup(f, { expose: y, emit: l }) {
387
- const o = f, S = l, _ = Pt(), i = Ue(), m = Ee(), w = ye(), { t: x } = ue(), a = O(0), n = O(null), F = U(() => i.skus), C = U(
386
+ const o = f, S = l, _ = Et(), i = Ue(), m = Ee(), w = ye(), { t: x } = ue(), a = O(0), n = O(null), F = U(() => i.skus), C = U(
388
387
  () => {
389
388
  var p, e;
390
389
  return (((e = (p = o.sku) == null ? void 0 : p.convert) == null ? void 0 : e.inventoryBindings) ?? []).filter(
@@ -408,7 +407,7 @@ const qt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
408
407
  function L(p) {
409
408
  if (n.value)
410
409
  return !0;
411
- const e = We(p).isInteger().max(o.maxCount ?? 0).error ?? "";
410
+ const e = Ge(p).isInteger().max(o.maxCount ?? 0).error ?? "";
412
411
  return e || !0;
413
412
  }
414
413
  function V(p) {
@@ -417,7 +416,7 @@ const qt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
417
416
  var I;
418
417
  return b.id === ((I = o.sku.convert) == null ? void 0 : I.measurement);
419
418
  }) ?? null : null, s = Be(o.sku.unit, e), v = pt(+p);
420
- return We(v).isInteger().max(s).error ? "Precision cannot be more than " + s : !0;
419
+ return Ge(v).isInteger().max(s).error ? "Precision cannot be more than " + s : !0;
421
420
  }
422
421
  const $ = U(
423
422
  () => {
@@ -446,10 +445,10 @@ const qt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
446
445
  xe(+a.value, oe)
447
446
  ),
448
447
  !1
449
- ) : "0", z = (Re = (ee = n.value) == null ? void 0 : ee.find((ve) => ve.id === (b == null ? void 0 : b._id))) == null ? void 0 : Re.amount, W = z ? de(z, !1) : null;
448
+ ) : "0", z = (Re = (ee = n.value) == null ? void 0 : ee.find((ve) => ve.id === (b == null ? void 0 : b._id))) == null ? void 0 : Re.amount, G = z ? de(z, !1) : null;
450
449
  return {
451
450
  sku: b,
452
- convertAmount: W ?? T,
451
+ convertAmount: G ?? T,
453
452
  abbrev: I
454
453
  };
455
454
  });
@@ -588,12 +587,12 @@ const qt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
588
587
  t("div", Jt, [
589
588
  t("div", Zt, h(r(x)("inventory.stock.convert.deductionSummary")), 1),
590
589
  (A(!0), R(J, null, le(B.value, (T) => {
591
- var z, W;
590
+ var z, G;
592
591
  return A(), R("div", {
593
592
  key: (z = T.sku) == null ? void 0 : z._id,
594
593
  class: "flex items-center"
595
594
  }, [
596
- t("div", en, h((W = T.sku) == null ? void 0 : W.name), 1),
595
+ t("div", en, h((G = T.sku) == null ? void 0 : G.name), 1),
597
596
  t("div", tn, " -" + h(T.convertAmount) + " " + h(T.abbrev), 1)
598
597
  ]);
599
598
  }), 128))
@@ -631,10 +630,10 @@ const qt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
631
630
  ]
632
631
  }, {
633
632
  default: D(({ invalid: z }) => {
634
- var W, se, re;
633
+ var G, se, re;
635
634
  return [
636
635
  t("div", an, [
637
- t("div", rn, h((W = F.value.find((X) => X._id === T.id)) == null ? void 0 : W.name), 1),
636
+ t("div", rn, h((G = F.value.find((X) => X._id === T.id)) == null ? void 0 : G.name), 1),
638
637
  g(s, {
639
638
  class: "xs:col-span-2",
640
639
  disabled: u.value,
@@ -689,8 +688,8 @@ const qt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-80
689
688
  loading: u.value,
690
689
  label: r(x)("inventory.stock.convert.convertButton"),
691
690
  onClick: e[2] || (e[2] = (T) => {
692
- var z, W;
693
- return (W = (z = P.value) == null ? void 0 : z.validateInputs) == null ? void 0 : W.call(z);
691
+ var z, G;
692
+ return (G = (z = P.value) == null ? void 0 : z.validateInputs) == null ? void 0 : G.call(z);
694
693
  })
695
694
  }, null, 8, ["loading", "label"])
696
695
  ])
@@ -704,7 +703,7 @@ function Ve(f, y) {
704
703
  const l = xe(f, y);
705
704
  return { ...l, amount: -l.amount };
706
705
  }
707
- function Ge(f, y) {
706
+ function We(f, y) {
708
707
  return xe(Math.abs(f), y);
709
708
  }
710
709
  const Me = {
@@ -722,11 +721,11 @@ const Me = {
722
721
  },
723
722
  [te.enum.EXTRA]: {
724
723
  label: "Extra",
725
- toAdjustmentAmount: Ge
724
+ toAdjustmentAmount: We
726
725
  },
727
726
  [te.enum.PURCHASE]: {
728
727
  label: "Purchase",
729
- toAdjustmentAmount: Ge
728
+ toAdjustmentAmount: We
730
729
  }
731
730
  }, cn = { class: "col-span-2 flex" }, dn = { class: "fm-typo-en-body-lg-600 flex-1" }, mn = /* @__PURE__ */ ie({
732
731
  __name: "AdjustedItemForm",
@@ -818,7 +817,7 @@ const Me = {
818
817
  rules: [r(ft)()],
819
818
  "label-mark": "required"
820
819
  }, null, 8, ["disabled", "items", "modelValue", "rules"]),
821
- g(Et, {
820
+ g(Ht, {
822
821
  disabled: a.disabled,
823
822
  label: "Amount",
824
823
  step: +r(de)({
@@ -1078,7 +1077,7 @@ const Me = {
1078
1077
  }
1079
1078
  return Object.entries(n).reduce(
1080
1079
  (u, [j, L]) => (u[j] = /// comment, because without it formatter makes code uglier
1081
- `${G.toFormatString({
1080
+ `${W.toFormatString({
1082
1081
  value: L,
1083
1082
  precision: 4
1084
1083
  })} ${a.unit.abbrev}`, u),
@@ -1101,7 +1100,7 @@ const Me = {
1101
1100
  return n.amounts.map((u) => {
1102
1101
  var j;
1103
1102
  return {
1104
- amount: `${G.toFormatString({ value: u.amount, precision: 4 })} ${((j = u.measurement) == null ? void 0 : j.abbrev) ?? n.sku.unit.abbrev}`,
1103
+ amount: `${W.toFormatString({ value: u.amount, precision: 4 })} ${((j = u.measurement) == null ? void 0 : j.abbrev) ?? n.sku.unit.abbrev}`,
1105
1104
  backdateFrom: n.backdateFrom,
1106
1105
  name: u.type,
1107
1106
  remark: u.remark || C || "",
@@ -1210,7 +1209,7 @@ function Bn(f, y) {
1210
1209
  );
1211
1210
  if (!y)
1212
1211
  return Object.entries(l).reduce(
1213
- (i, [m]) => (i[m] = G.fromNumber(0), i),
1212
+ (i, [m]) => (i[m] = W.fromNumber(0), i),
1214
1213
  {}
1215
1214
  );
1216
1215
  const S = f.flatMap((i) => {
@@ -1218,8 +1217,8 @@ function Bn(f, y) {
1218
1217
  return ((m = i.skus) == null ? void 0 : m.filter((w) => w.sku._id === y._id)) ?? [];
1219
1218
  }).flatMap((i) => i.amounts);
1220
1219
  for (const i of S) {
1221
- const m = i.measurement ? G.multiply([i.measurement.conversion, i.amount]) : i.amount;
1222
- l[_ = i.type] ?? (l[_] = { amount: 0, precision: 0 }), l[i.type] = G.add([m, l[i.type]]);
1220
+ const m = i.measurement ? W.multiply([i.measurement.conversion, i.amount]) : i.amount;
1221
+ l[_ = i.type] ?? (l[_] = { amount: 0, precision: 0 }), l[i.type] = W.add([m, l[i.type]]);
1223
1222
  }
1224
1223
  return Object.entries(l).reduce(
1225
1224
  (i, [m, w]) => {
@@ -1228,7 +1227,7 @@ function Bn(f, y) {
1228
1227
  amount: Math.abs(w.amount)
1229
1228
  };
1230
1229
  return i[m] = /// comment, because without it formatter makes code uglier
1231
- `${G.toFormatString({
1230
+ `${W.toFormatString({
1232
1231
  value: x,
1233
1232
  precision: 4
1234
1233
  })} ${y.unit.abbrev}`, i;
@@ -1252,11 +1251,11 @@ function Dn(f, y) {
1252
1251
  for (const m of i) {
1253
1252
  if (m.type !== te.Enum.SALES)
1254
1253
  continue;
1255
- const w = m.measurement ? G.multiply([m.measurement.conversion, m.amount]) : m.amount;
1256
- l ?? (l = G.fromNumber(0)), l = G.add([l, w]);
1254
+ const w = m.measurement ? W.multiply([m.measurement.conversion, m.amount]) : m.amount;
1255
+ l ?? (l = W.fromNumber(0)), l = W.add([l, w]);
1257
1256
  }
1258
1257
  }
1259
- return l != null ? (l.amount = Math.abs(l.amount), `${G.toFormatString({
1258
+ return l != null ? (l.amount = Math.abs(l.amount), `${W.toFormatString({
1260
1259
  value: l,
1261
1260
  precision: 4
1262
1261
  })} ${y.unit.abbrev}`) : null;
@@ -1270,7 +1269,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1270
1269
  }, On = { class: "pb-16" }, Ln = { class: "fm-typo-cn-body-lg-600" }, Nn = {
1271
1270
  class: "grid gap-12 fm-typo-en-body-md-400",
1272
1271
  style: { "grid-template-columns": "auto auto auto", "grid-auto-rows": "1fr" }
1273
- }, zn = { class: "flex flex-col gap-1" }, Yn = { class: "text-fm-color-typo-secondary" }, Kn = { class: "font-bold" }, Wn = { class: "flex flex-col gap-1" }, Gn = { class: "text-fm-color-typo-secondary flex" }, qn = { class: "font-bold" }, Qn = { class: "flex flex-col gap-1" }, Xn = { class: "text-fm-color-typo-secondary" }, Jn = { class: "font-bold" }, Zn = { class: "flex flex-col gap-1" }, eo = { class: "text-fm-color-typo-secondary" }, to = { class: "font-bold" }, no = { class: "flex flex-col gap-1" }, oo = { class: "text-fm-color-typo-secondary" }, so = { class: "font-bold" }, ao = { class: "flex flex-col gap-1" }, ro = { class: "text-fm-color-typo-secondary" }, lo = { class: "font-bold" }, io = { class: "flex flex-col gap-1" }, uo = { class: "text-fm-color-typo-secondary" }, co = { class: "font-bold" }, mo = { class: "flex flex-col gap-1" }, po = { class: "text-fm-color-typo-secondary" }, vo = { class: "font-bold" }, fo = { class: "flex flex-col gap-1" }, yo = { class: "text-fm-color-typo-secondary" }, _o = { class: "font-bold" }, ko = {
1272
+ }, zn = { class: "flex flex-col gap-1" }, Yn = { class: "text-fm-color-typo-secondary" }, Kn = { class: "font-bold" }, Gn = { class: "flex flex-col gap-1" }, Wn = { class: "text-fm-color-typo-secondary flex" }, qn = { class: "font-bold" }, Qn = { class: "flex flex-col gap-1" }, Xn = { class: "text-fm-color-typo-secondary" }, Jn = { class: "font-bold" }, Zn = { class: "flex flex-col gap-1" }, eo = { class: "text-fm-color-typo-secondary" }, to = { class: "font-bold" }, no = { class: "flex flex-col gap-1" }, oo = { class: "text-fm-color-typo-secondary" }, so = { class: "font-bold" }, ao = { class: "flex flex-col gap-1" }, ro = { class: "text-fm-color-typo-secondary" }, lo = { class: "font-bold" }, io = { class: "flex flex-col gap-1" }, uo = { class: "text-fm-color-typo-secondary" }, co = { class: "font-bold" }, mo = { class: "flex flex-col gap-1" }, po = { class: "text-fm-color-typo-secondary" }, vo = { class: "font-bold" }, fo = { class: "flex flex-col gap-1" }, yo = { class: "text-fm-color-typo-secondary" }, _o = { class: "font-bold" }, ko = {
1274
1273
  key: 0,
1275
1274
  class: "flex flex-col gap-8"
1276
1275
  }, ho = { class: "flex" }, go = { class: "flex-1 flex flex-col gap-1" }, bo = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, xo = { class: "font-bold" }, So = { class: "flex-1 flex flex-col gap-1" }, Fo = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, wo = { class: "flex flex-col gap-1" }, $o = { class: "font-bold" }, Ao = {
@@ -1284,7 +1283,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1284
1283
  },
1285
1284
  emits: ["update:show"],
1286
1285
  setup(f) {
1287
- const y = It(), l = Pe(), o = Ee(), S = hn(), _ = pe(), i = Rt(), { t: m } = ue(), w = f, x = O(!1), a = ye(), n = O(gt(0));
1286
+ const y = Tt(), l = Pe(), o = Ee(), S = hn(), _ = pe(), i = St(), { t: m } = ue(), w = f, x = O(!1), a = ye(), n = O(gt(0));
1288
1287
  async function F() {
1289
1288
  x.value = !0;
1290
1289
  try {
@@ -1306,7 +1305,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1306
1305
  });
1307
1306
  const C = O([]), k = O([]), u = O(new Array());
1308
1307
  function j(e, s) {
1309
- return s === "day" ? At(e) : Je(e);
1308
+ return s === "day" ? Ct(e) : Je(e);
1310
1309
  }
1311
1310
  function L(e, s) {
1312
1311
  const v = e.reduce(
@@ -1327,8 +1326,8 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1327
1326
  async function V() {
1328
1327
  let e = await o.readStockAdjustment(
1329
1328
  w.sku._id,
1330
- St(new Date(n.value.startDate)).toISOString(),
1331
- Ft(new Date(n.value.endDate)).toISOString()
1329
+ Ft(new Date(n.value.startDate)).toISOString(),
1330
+ wt(new Date(n.value.endDate)).toISOString()
1332
1331
  );
1333
1332
  C.value = e;
1334
1333
  const s = e.filter(({ ref: v }) => v == null ? void 0 : v.startsWith("bill_")).map(({ ref: v }) => v);
@@ -1361,7 +1360,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1361
1360
  amount: 0,
1362
1361
  precision: 0
1363
1362
  }, s = w.sku;
1364
- return s ? `${G.toFormatString({
1363
+ return s ? `${W.toFormatString({
1365
1364
  value: e,
1366
1365
  precision: 4
1367
1366
  })} ${s.unit.abbrev}` : "";
@@ -1374,7 +1373,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1374
1373
  amount: 0,
1375
1374
  precision: 0
1376
1375
  }, s = w.sku;
1377
- return s ? `${G.toFormatString({ value: e, precision: 4 })} ${s.unit.abbrev}` : "";
1376
+ return s ? `${W.toFormatString({ value: e, precision: 4 })} ${s.unit.abbrev}` : "";
1378
1377
  }), q = U(() => {
1379
1378
  var v;
1380
1379
  const s = C.value.flatMap((c) => {
@@ -1402,7 +1401,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1402
1401
  return ke(s, !1, s.precision);
1403
1402
  });
1404
1403
  function N() {
1405
- const { startDate: e, endDate: s } = wt(n.value);
1404
+ const { startDate: e, endDate: s } = $t(n.value);
1406
1405
  e !== null && s !== null && (n.value = {
1407
1406
  startDate: e,
1408
1407
  endDate: s
@@ -1411,16 +1410,16 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1411
1410
  const H = U(() => w.sku.valuation === ze.Enum.FIFO ? m("inventory.ingredient.valuationMethod.FIFO") : m("inventory.ingredient.valuationMethod.WAVG")), K = U(() => {
1412
1411
  var I, Q, oe, T;
1413
1412
  const e = [...C.value].reverse().computeFirst((z) => {
1414
- var W, se;
1415
- return (se = (W = z.skus) == null ? void 0 : W.find) == null ? void 0 : se.call(W, (re) => re.sku._id === w.sku._id);
1413
+ var G, se;
1414
+ return (se = (G = z.skus) == null ? void 0 : G.find) == null ? void 0 : se.call(G, (re) => re.sku._id === w.sku._id);
1416
1415
  });
1417
1416
  if (!e) return "No data";
1418
1417
  const s = e.amounts.reverse()[0], v = {
1419
1418
  amount: ((I = s.cost) == null ? void 0 : I.amount) ?? 0,
1420
1419
  precision: ((Q = s.cost) == null ? void 0 : Q.precision) ?? 0
1421
- }, c = s.amount, d = c.amount == 0 ? G.fromNumber(0) : G.divide([v, c]);
1420
+ }, c = s.amount, d = c.amount == 0 ? W.fromNumber(0) : W.divide([v, c]);
1422
1421
  return {
1423
- ...G.multiply([d, c]),
1422
+ ...W.multiply([d, c]),
1424
1423
  currency: ((oe = s.cost) == null ? void 0 : oe.currency) || Ae(((T = y.currentCountry) == null ? void 0 : T.value) ?? xt)
1425
1424
  };
1426
1425
  }), ae = U(() => {
@@ -1431,7 +1430,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1431
1430
  return d == null ? void 0 : d.toCostBalances;
1432
1431
  });
1433
1432
  return e ? {
1434
- ...e.reduce((c, d) => G.add([c, G.fromDinero(d.cost)]), {
1433
+ ...e.reduce((c, d) => W.add([c, W.fromDinero(d.cost)]), {
1435
1434
  amount: 0,
1436
1435
  precision: 0
1437
1436
  }),
@@ -1439,7 +1438,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1439
1438
  } : "No data";
1440
1439
  });
1441
1440
  function me() {
1442
- const { startDate: e, endDate: s } = $t(n.value);
1441
+ const { startDate: e, endDate: s } = At(n.value);
1443
1442
  e !== null && s !== null && (n.value = {
1444
1443
  startDate: e,
1445
1444
  endDate: s
@@ -1447,7 +1446,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1447
1446
  }
1448
1447
  const p = He(w, "show");
1449
1448
  return (e, s) => {
1450
- const v = M("FmButton"), c = M("FmField"), d = M("FmDateRangePicker"), b = M("FmSpacer"), I = M("FmCircularProgress"), Q = M("FmIcon"), oe = M("FmTooltip"), T = M("FmMenuDivider"), z = M("FmChip"), W = M("FmCardSection"), se = M("FmCard"), re = M("FmSideSheet");
1449
+ const v = M("FmButton"), c = M("FmField"), d = M("FmDateRangePicker"), b = M("FmSpacer"), I = M("FmCircularProgress"), Q = M("FmIcon"), oe = M("FmTooltip"), T = M("FmMenuDivider"), z = M("FmChip"), G = M("FmCardSection"), se = M("FmCard"), re = M("FmSideSheet");
1451
1450
  return A(), Y(re, {
1452
1451
  "dismiss-away": "",
1453
1452
  modelValue: r(p),
@@ -1513,7 +1512,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1513
1512
  ])) : k.value && ((X = k.value) == null ? void 0 : X.length) > 0 ? (A(), R("div", Rn, [
1514
1513
  g(se, { variant: "outlined" }, {
1515
1514
  default: D(() => [
1516
- g(W, { class: "flex flex-col gap-4" }, {
1515
+ g(G, { class: "flex flex-col gap-4" }, {
1517
1516
  default: D(() => [
1518
1517
  t("div", On, [
1519
1518
  t("div", Ln, h(r(m)("inventory.stock.history.summary.title")), 1)
@@ -1523,8 +1522,8 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1523
1522
  t("div", Yn, h(r(m)("inventory.stock.history.summary.totalPurchase")), 1),
1524
1523
  t("div", Kn, h(B.value.PURCHASE), 1)
1525
1524
  ]),
1526
- t("div", Wn, [
1527
- t("div", Gn, [
1525
+ t("div", Gn, [
1526
+ t("div", Wn, [
1528
1527
  ce(h(r(m)("inventory.stock.history.summary.totalSales")) + "  ", 1),
1529
1528
  P.value != null ? (A(), Y(oe, {
1530
1529
  key: 0,
@@ -1669,7 +1668,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1669
1668
  g(b),
1670
1669
  t("div", null, [
1671
1670
  t("img", {
1672
- src: r(Ht),
1671
+ src: r(Rt),
1673
1672
  alt: "List is empty"
1674
1673
  }, null, 8, Co)
1675
1674
  ]),
@@ -1685,10 +1684,10 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1685
1684
  }, 8, ["modelValue"]);
1686
1685
  };
1687
1686
  }
1688
- }), Do = { class: "flex flex-col gap-8" }, jo = { class: "flex flex-col" }, Io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, To = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Xo = /* @__PURE__ */ ie({
1687
+ }), Do = { class: "flex flex-col gap-8" }, jo = { class: "flex flex-col" }, Io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, To = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Qo = /* @__PURE__ */ ie({
1689
1688
  __name: "StockView",
1690
1689
  setup(f) {
1691
- const { t: y } = ue(), l = Ue(), o = pe(), S = Pe(), _ = st(), i = Ze(), { columnDefs: m } = Wt();
1690
+ const { t: y } = ue(), l = Ue(), o = pe(), S = Pe(), _ = st(), i = Ze(), { columnDefs: m } = Gt();
1692
1691
  o.watchLocation(a);
1693
1692
  const w = O(!1), x = ye();
1694
1693
  async function a() {
@@ -1726,7 +1725,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1726
1725
  trackingUnitAbbrev: B ? ((H = $.unit.measurements.find((K) => K.id === B)) == null ? void 0 : H.abbrev) ?? "" : $.unit.abbrev
1727
1726
  };
1728
1727
  })
1729
- ), F = O(""), { breakpoints: C } = Tt(), k = U(() => C.value.xs || C.value.sm), u = U(() => k.value ? 10 : 20), j = Ct(), L = U(() => [
1728
+ ), F = O(""), { breakpoints: C } = Ut(), k = U(() => C.value.xs || C.value.sm), u = U(() => k.value ? 10 : 20), j = Vt(), L = U(() => [
1730
1729
  {
1731
1730
  label: y("inventory.common.refresh"),
1732
1731
  value: "refresh"
@@ -1746,7 +1745,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1746
1745
  }
1747
1746
  return ($, B) => {
1748
1747
  const P = M("FmTable");
1749
- return A(), Y(Vt, {
1748
+ return A(), Y(Mt, {
1750
1749
  title: r(y)("inventory.stock.title"),
1751
1750
  actions: L.value,
1752
1751
  "onClick:action": V
@@ -1763,7 +1762,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1763
1762
  }
1764
1763
  ])
1765
1764
  }, [
1766
- g(Mt, {
1765
+ g(Bt, {
1767
1766
  searchable: "",
1768
1767
  "change-location": "",
1769
1768
  search: F.value,
@@ -1780,7 +1779,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1780
1779
  "page-size": u.value
1781
1780
  }, {
1782
1781
  "list-row": D((H) => [
1783
- g(Bt, {
1782
+ g(Dt, {
1784
1783
  row: H,
1785
1784
  onRowClick: r(_).showSkuHistory
1786
1785
  }, {
@@ -1838,5 +1837,5 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
1838
1837
  }
1839
1838
  });
1840
1839
  export {
1841
- Xo as default
1840
+ Qo as default
1842
1841
  };
@@ -1,11 +1,10 @@
1
1
  import { defineComponent as de, mergeModels as Bd, computed as x, useModel as Gd, resolveComponent as A, openBlock as N, createElementBlock as I, createElementVNode as g, createVNode as C, withCtx as L, toDisplayString as w, unref as u, Fragment as Q, renderList as te, ref as M, createBlock as Y, createCommentVNode as X, isRef as Je, normalizeClass as ee, createTextVNode as Hd, watch as Id, createSlots as jd, normalizeStyle as Kd, Teleport as Wd } from "vue";
2
- import { u as oe } from "./supplier-hdrIxTLp.js";
3
- import { b as Oe, f as Yd, D as Qe, h as se, e as Ce, a as Fd, n as ed, o as dd, j as Xd, a1 as Zd, v as Od, u as ye, l as K, d as U, q as wd, r as zd, s as Ad, w as qd, x as Jd, y as Qd, z as et, _ as dt, B as tt, C as rt, E as ue } from "./app-nDgEuY-Q.js";
2
+ import { u as oe } from "./supplier-UeD3tjJh.js";
3
+ import { b as Oe, h as Yd, D as Qe, i as se, f as Ce, a as Fd, o as ed, p as dd, k as Xd, a2 as Zd, w as Od, u as ye, m as K, c as wd, e as U, r as Ad, s as zd, v as Td, x as qd, y as Jd, z as Qd, B as et, _ as dt, C as tt, E as rt, G as ue } from "./app-dN4odAZ8.js";
4
4
  import { useI18n as z, useCoreStore as ve } from "@feedmepos/mf-common";
5
5
  import { useDialog as we, useSnackbar as ge, useProxiedModel as td, useDialogChild as nt, useBreakpoints as ot } from "@feedmepos/ui-library";
6
6
  import { _ as at } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
7
- import { _ as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-elcx6AO6.js";
8
- import { u as Td } from "./feature-_ggdK-7_.js";
7
+ import { _ as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BAk4KHnz.js";
9
8
  import { defineStore as it } from "pinia";
10
9
  function lt(e, d) {
11
10
  const { t } = z(), r = Oe();
@@ -244,7 +243,7 @@ const st = { class: "flex flex-col gap-12" }, ut = { class: "flex flex-col" }, c
244
243
  },
245
244
  emits: ["update:modelValue", "validation-success"],
246
245
  setup(e, { expose: d, emit: t }) {
247
- const r = e, n = t, o = Td(), $ = Fd(), i = x(() => Od($.skus, "_id")), { t: l } = z(), c = ye(), p = x(() => c.businessLevel), y = x({
246
+ const r = e, n = t, o = wd(), $ = Fd(), i = x(() => Od($.skus, "_id")), { t: l } = z(), c = ye(), p = x(() => c.businessLevel), y = x({
248
247
  get() {
249
248
  var s;
250
249
  return ((s = r.modelValue) == null ? void 0 : s.name) ?? "";
@@ -2360,8 +2359,8 @@ function Y1() {
2360
2359
  [],
2361
2360
  $.map((y) => y.name),
2362
2361
  ...r.map((y) => $.map((f) => y[f.id]))
2363
- ], l = $.map((y) => `system:${y.id}`), c = wd(i, l), p = `${o == null ? void 0 : o.name} suppliers (${zd(/* @__PURE__ */ new Date())}).xlsx`;
2364
- return Ad(c, p), p;
2362
+ ], l = $.map((y) => `system:${y.id}`), c = Ad(i, l), p = `${o == null ? void 0 : o.name} suppliers (${zd(/* @__PURE__ */ new Date())}).xlsx`;
2363
+ return Td(c, p), p;
2365
2364
  }
2366
2365
  function X1() {
2367
2366
  const d = ve().currentBusiness.value, t = Ud(), r = [
@@ -2370,8 +2369,8 @@ function X1() {
2370
2369
  ["Menu version", d == null ? void 0 : d.menuVersion],
2371
2370
  [],
2372
2371
  t.map((i) => i.name)
2373
- ], n = t.map((i) => `system:${i.id}`), o = wd(r, n), $ = "FeedMe supplier template.xlsx";
2374
- return Ad(o, $), $;
2372
+ ], n = t.map((i) => `system:${i.id}`), o = Ad(r, n), $ = "FeedMe supplier template.xlsx";
2373
+ return Td(o, $), $;
2375
2374
  }
2376
2375
  function Z1(e) {
2377
2376
  const [
@@ -2809,10 +2808,10 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
2809
2808
  }), mr = { class: "flex flex-col py-8" }, yr = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, vr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, hr = {
2810
2809
  key: 0,
2811
2810
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
2812
- }, br = "You are managing business-level supplier list. These suppliers will be made visible to all locations.", Or = /* @__PURE__ */ de({
2811
+ }, br = "You are managing business-level supplier list. These suppliers will be made visible to all locations.", Fr = /* @__PURE__ */ de({
2813
2812
  __name: "SupplierView",
2814
2813
  setup(e) {
2815
- const { importSuppliers: d, exportSuppliers: t } = pr(), r = oe(), n = ye(), o = Td(), $ = Oe(), i = M(!1), l = we(), c = ge(), { t: p } = z();
2814
+ const { importSuppliers: d, exportSuppliers: t } = pr(), r = oe(), n = ye(), o = wd(), $ = Oe(), i = M(!1), l = we(), c = ge(), { t: p } = z();
2816
2815
  n.watchLocation(f);
2817
2816
  const y = x(() => n.businessLevel);
2818
2817
  Id(y, f);
@@ -3016,5 +3015,5 @@ const q1 = { class: "flex items-center gap-12 pl-8" }, J1 = { class: "flex flex-
3016
3015
  }
3017
3016
  });
3018
3017
  export {
3019
- Or as default
3018
+ Fr as default
3020
3019
  };