@feedmepos/mf-inventory-portal 1.8.0-dev.16 → 1.8.0-dev.18

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 (139) hide show
  1. package/dist/{App-xSsyvQV_.js → App-Djr9dJ9q.js} +9 -9
  2. package/dist/{ApprovalView-DfJ0FAiD.js → ApprovalView-VIVSr66P.js} +9 -9
  3. package/dist/{BindingsDialog-oAZyjgrN.js → BindingsDialog-NKiZKKA1.js} +2 -2
  4. package/dist/{BindingsPicker-CEIo7myR.js → BindingsPicker-WLdfNtim.js} +2 -2
  5. package/dist/{BindingsTable-BKa-JYRR.js → BindingsTable-DGikPjdP.js} +10 -10
  6. package/dist/{BulkReceiveRequestPage-C6Oyg5-E.js → BulkReceiveRequestPage-GmZ7yxnK.js} +21 -21
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BvleQo5y.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-6n-R2gAL.js} +1 -1
  8. package/dist/{ClosingDraftView-tJrjqyAC.js → ClosingDraftView-Biir_xEx.js} +19 -19
  9. package/dist/{ClosingHistoryView-CJQlK4Xc.js → ClosingHistoryView-ZMXQesn4.js} +7 -7
  10. package/dist/{ClosingTemplateView-DYRtdK5h.js → ClosingTemplateView-B-c3FkLX.js} +18 -18
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DEwi7wFf.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-D2bp6pW-.js} +1 -1
  12. package/dist/{DefaultView-CxTBlkln.js → DefaultView-D_Jhtw_c.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-Bywdjc2U.js → DeliveryOrderPrintPreview-D5-9lzBd.js} +9 -9
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-DcFAUTdO.js → EmailDialog.vue_vue_type_script_setup_true_lang-DEqUAhaS.js} +7759 -7654
  15. package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C8c6rmJv.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CCzJ6Awz.js} +1 -1
  16. package/dist/{FeatureCapabilityGate-B41dULfm.js → FeatureCapabilityGate-iW8fvX19.js} +28 -28
  17. package/dist/{FeaturePageGate.vue_vue_type_script_setup_true_lang-D4G6i1D6.js → FeaturePageGate.vue_vue_type_script_setup_true_lang-f3Y9lCSv.js} +1 -1
  18. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CnqH115V.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-1mVLSzDy.js} +1 -1
  19. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-QBviJzAO.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D6jnR8Rx.js} +2 -2
  20. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BqHtzo20.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-tMoK_Ce8.js} +2 -2
  21. package/dist/{FmMultiselectDialog-M6CvNFW1.js → FmMultiselectDialog-B8P_qEAQ.js} +2 -2
  22. package/dist/{FmMultiselectDialog-CFNZMzlC.js → FmMultiselectDialog-DP480e0e.js} +2 -2
  23. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BGco50Ma.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D7pb8F_A.js} +113 -106
  24. package/dist/{ImportView-C2GOmpuK.js → ImportView-BISXn7Th.js} +6 -6
  25. package/dist/{IngredientsView-wB9kGiOK.js → IngredientsView-C3LrzIuS.js} +15 -15
  26. package/dist/{IntegrationExplorerView-BujwGE4q.js → IntegrationExplorerView-B_4Af6OW.js} +6 -6
  27. package/dist/{IntegrationPlatformView-Wnvj6-BG.js → IntegrationPlatformView-CQUi7sRi.js} +2 -2
  28. package/dist/{IntegrationView-C77rSbpn.js → IntegrationView-CYkZq_tq.js} +14 -14
  29. package/dist/{InventoryBindingForm-Bs7Duwfj.js → InventoryBindingForm-D2s_z-6Q.js} +1 -1
  30. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DawAEeuP.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DXsyVclI.js} +4 -4
  31. package/dist/{InventoryBindingSummary-BefkYWIr.js → InventoryBindingSummary-BOBGDwSm.js} +1 -1
  32. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BpUMK6fj.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-gAd41m7W.js} +2 -2
  33. package/dist/{ProductionRunDetailPage-CVx9LS-P.js → ProductionRunDetailPage-COncuigP.js} +4 -4
  34. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-4aYz5NwS.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-B3PSF7-H.js} +988 -954
  35. package/dist/{ProductionRunPage-CuXzmWMc.js → ProductionRunPage-RUkgXlmL.js} +4 -4
  36. package/dist/{PublishView-Bu8J6ndy.js → PublishView-B0QVNasT.js} +3 -3
  37. package/dist/{PurchaseOrderPrintPreview-DaslFe8u.js → PurchaseOrderPrintPreview-CbjbKRS2.js} +13 -13
  38. package/dist/{ReceiveRequestView-CKPBpN4x.js → ReceiveRequestView-DAiOgbUO.js} +13 -13
  39. package/dist/{RecipeView-BeZ9ljtA.js → RecipeView-B-Qr9p-i.js} +15 -15
  40. package/dist/{SettingsView-CWhMdNfn.js → SettingsView-BnWul5uf.js} +7 -7
  41. package/dist/StockView-raj4WifG.js +2756 -0
  42. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B9Rx_9b7.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CYLgevQO.js} +1 -1
  43. package/dist/{SupplierView-BSGajl9V.js → SupplierView-CxAwhXEg.js} +15 -14
  44. package/dist/{SurchargeView-DtAszxTN.js → SurchargeView-B7R7_JVv.js} +7 -7
  45. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CfxroS8u.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CrYxhm0y.js} +2 -2
  46. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BSglNZaK.js +332 -0
  47. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B_9i5LzY.js → TransferDetails.vue_vue_type_script_setup_true_lang-CoOidQMw.js} +1583 -1530
  48. package/dist/{TransferTemplateView-D6_AfMja.js → TransferTemplateView-BXu5OhXF.js} +945 -941
  49. package/dist/{UnitCostHistoryView-kisQehVE.js → UnitCostHistoryView-BAfxgkjF.js} +4 -4
  50. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DKoPNZoW.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DTS06g9i.js} +4 -4
  51. package/dist/{UnitView-jSLennZW.js → UnitView-BnCe1kBW.js} +7 -7
  52. package/dist/{WarehouseView-CUdWJCMq.js → WarehouseView-D3y9EDWW.js} +8 -8
  53. package/dist/{WastageTemplateView--B0LSwHa.js → WastageTemplateView-BShli8bj.js} +15 -15
  54. package/dist/api/inventory.d.ts +9 -9
  55. package/dist/{app-Bb5HLWTu.js → app-FPg0KzwG.js} +6884 -6971
  56. package/dist/app.d.ts +49 -0
  57. package/dist/app.js +1 -1
  58. package/dist/{closing-template-CgDMayoo.js → closing-template-Db-KNAjB.js} +4 -4
  59. package/dist/components/FeatureCapabilityGate.vue.d.ts +1 -0
  60. package/dist/components/FmUnitInputProps.d.ts +1 -0
  61. package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
  62. package/dist/components/TemplatePublishDialog.d.ts +2 -0
  63. package/dist/components/TemplatePublishDialog.spec.d.ts +1 -0
  64. package/dist/composable/defineApi.d.ts +1 -1
  65. package/dist/{date2-D9gB9BE-.js → date2-YICloR2o.js} +1 -1
  66. package/dist/{dayjs.min-CumM_kH7.js → dayjs.min-CefWSTKK.js} +1 -1
  67. package/dist/{decimal-CVF1rRoj.js → decimal-CBsXxlpr.js} +2 -2
  68. package/dist/defineDeepModel-DdUeiux0.js +19 -0
  69. package/dist/{duplicate-template-CFYtQfQn.js → duplicate-template-BvMZ2ilL.js} +1 -1
  70. package/dist/{feature-kti8bU8q.js → feature-HJuftceg.js} +2 -2
  71. package/dist/{format-time-from-id-CWZ5VGvM.js → format-time-from-id-BUJJn9WM.js} +1 -1
  72. package/dist/{format-unit-display-BlxdvskN.js → format-unit-display-vkauUh5a.js} +115 -113
  73. package/dist/{id-to-date-BaH_1Kui.js → id-to-date-BFOeIS4x.js} +1 -1
  74. package/dist/{import-export.helper-8rKrOB0E.js → import-export.helper-C48DsrFq.js} +5 -5
  75. package/dist/{index-BHc3cNyz.js → index--e5sOJ5N.js} +3 -3
  76. package/dist/{index-B9p_OEdk.js → index-4EWcUZB2.js} +1 -1
  77. package/dist/{index-MEUJonBr.js → index-COy6Gu_M.js} +1768 -1741
  78. package/dist/{lz-string-IiazGN0W.js → lz-string-CX9VutYB.js} +1 -1
  79. package/dist/{netsuite-BeDxaeKM.js → netsuite-BOb6Ek6I.js} +247 -262
  80. package/dist/{netsuite-explorer-4IluitzS.js → netsuite-explorer-Czbq3dDh.js} +1 -1
  81. package/dist/{predefined-templates-D4qVID1q.js → predefined-templates-Cb97vyso.js} +1 -1
  82. package/dist/{purchase-order-template-GTOntq3C.js → purchase-order-template-CBjU0dUO.js} +1 -1
  83. package/dist/{recalculationUtils-Dye8x2TO.js → recalculationUtils-CyoKTNie.js} +1 -1
  84. package/dist/{row-action.enum-CVJbq_-y.js → row-action.enum-DoY1An1e.js} +1 -1
  85. package/dist/{rules-Y3zXVj3i.js → rules-C23j4F0_.js} +45 -40
  86. package/dist/{stock-BR8x3nlx.js → stock-CN-acijK.js} +1 -1
  87. package/dist/stock-DClY4hP_.js +78 -0
  88. package/dist/stores/integration/netsuite.d.ts +2 -2
  89. package/dist/stores/location.d.ts +42 -42
  90. package/dist/stores/supplier.d.ts +48 -48
  91. package/dist/stores/warehouse.d.ts +1 -1
  92. package/dist/style.css +1 -1
  93. package/dist/{supplier-CbdCjiIB.js → supplier-OCIcWTkA.js} +2 -2
  94. package/dist/{surcharge-BoXLK6o0.js → surcharge-CCqME8iu.js} +1 -1
  95. package/dist/tsconfig.app.tsbuildinfo +1 -1
  96. package/dist/{uom-rules-C5h1AoPJ.js → uom-rules-DyRkdoii.js} +1 -1
  97. package/dist/{use-ingredient-select-dialog-D196q_qk.js → use-ingredient-select-dialog-B9SD-Gfg.js} +2 -2
  98. package/dist/{use-inventory-binding-dialog-B4IhhCjM.js → use-inventory-binding-dialog-Dx8nYVH0.js} +2 -2
  99. package/dist/{use-template-enabled-locations-CDKP3kTS.js → use-template-enabled-locations-C7vIH0p-.js} +2 -2
  100. package/dist/{use-transfer-locations-DE4vxSDp.js → use-transfer-locations-DfZI178Y.js} +2 -2
  101. package/dist/{useHrmPermission-D1dkveCP.js → useHrmPermission-BF87diqS.js} +1 -1
  102. package/dist/{useNavigationMenu-N5_7da8m.js → useNavigationMenu-hmVbINp6.js} +4 -4
  103. package/dist/{useSseClient-CKpNaz5g.js → useSseClient-D-dJYaOl.js} +1 -1
  104. package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
  105. package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
  106. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
  107. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
  108. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
  109. package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
  110. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +18 -18
  111. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
  112. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
  113. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
  114. package/dist/views/integration/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
  115. package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
  116. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
  117. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +5 -5
  118. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +39 -39
  119. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +35 -35
  120. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +34 -34
  121. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +6 -6
  122. package/dist/views/stock/components/StockRecordCard.vue.d.ts +16 -2
  123. package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
  124. package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
  125. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
  126. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
  127. package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
  128. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
  129. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
  130. package/dist/views/transfer-template/helpers/template-item.error.helper.spec.d.ts +1 -0
  131. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
  132. package/dist/{vue-CxSKQOrZ.js → vue-_3HY6f-w.js} +2 -2
  133. package/dist/{vue-i18n-CTR_IUvd.js → vue-i18n-B8eq3KRC.js} +158 -158
  134. package/dist/{xlsx.util-J9pxGRQD.js → xlsx.util-BbyZEE1S.js} +2 -2
  135. package/package.json +4 -4
  136. package/dist/StockView-C5IhPGxi.js +0 -2651
  137. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CTj_jYK1.js +0 -299
  138. package/dist/defineDeepModel-DE-DsQjm.js +0 -19
  139. package/dist/stock-BIjTQFsR.js +0 -74
@@ -1,4 +1,4 @@
1
- import { d as i } from "./app-Bb5HLWTu.js";
1
+ import { d as i } from "./app-FPg0KzwG.js";
2
2
  import { useCoreStore as $ } from "@feedmepos/mf-common";
3
3
  const B = i((n, s) => {
4
4
  const u = $();
@@ -1,4 +1,4 @@
1
- import { d as qn, j as Wn, y as zn } from "./app-Bb5HLWTu.js";
1
+ import { d as qn, j as Wn, y as zn } from "./app-FPg0KzwG.js";
2
2
  import { defineStore as Vn } from "pinia";
3
3
  import { ref as mt, computed as Kn } from "vue";
4
4
  import { useCoreStore as Yn } from "@feedmepos/mf-common";
@@ -1,4 +1,4 @@
1
- import { d as s } from "./app-Bb5HLWTu.js";
1
+ import { d as s } from "./app-FPg0KzwG.js";
2
2
  import { useCoreStore as c } from "@feedmepos/mf-common";
3
3
  const u = s((n, a) => {
4
4
  function o() {
@@ -1,4 +1,4 @@
1
- import { B as p } from "./app-Bb5HLWTu.js";
1
+ import { B as p } from "./app-FPg0KzwG.js";
2
2
  function l(s) {
3
3
  return Math.floor(s.getTime() / 1e3) * 1e3;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import { h as r } from "vue";
2
- import { _ as o } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C8c6rmJv.js";
2
+ import { _ as o } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CCzJ6Awz.js";
3
3
  var e = /* @__PURE__ */ ((t) => (t.Add = "Add", t.Create = "Create", t.Print = "Print", t.PrintCustom = "PrintCustom", t.PrintPdf = "PrintPdf", t.Export = "Export", t.Update = "Update", t.Details = "Details", t.Edit = "Edit", t.Delete = "Delete", t.Publish = "Publish", t.Duplicate = "Duplicate", t.Email = "Email", t))(e || {});
4
4
  const i = {
5
5
  Add: {
@@ -1,6 +1,6 @@
1
- import { s as u } from "./app-Bb5HLWTu.js";
2
- import { c as l, d as h } from "./date2-D9gB9BE-.js";
3
- import { F as $ } from "./decimal-CVF1rRoj.js";
1
+ import { s as u } from "./app-FPg0KzwG.js";
2
+ import { c as l, d as h } from "./date2-YICloR2o.js";
3
+ import { F as $ } from "./decimal-CBsXxlpr.js";
4
4
  function F(t, n) {
5
5
  return u.convertPrecision({
6
6
  value: t,
@@ -20,9 +20,13 @@ function S(t, n) {
20
20
  return u.multiply([t, n]);
21
21
  }
22
22
  function R(t, n) {
23
+ const r = +c(t), o = +c(n);
24
+ return r / o;
25
+ }
26
+ function q(t, n) {
23
27
  return u.divideSignificant([t, n]);
24
28
  }
25
- function P(t) {
29
+ function A(t) {
26
30
  const n = t == null ? "" : String(t).trim();
27
31
  if (n === "" || n === "undefined") return "is empty";
28
32
  const r = Number(n);
@@ -40,7 +44,7 @@ function P(t) {
40
44
  };
41
45
  return o(n.replace(/\.(?=e|$)/i, ".0")) !== o(String(r)) ? "has too many digits" : null;
42
46
  }
43
- function q(t, n) {
47
+ function B(t, n) {
44
48
  return t.precision >= n ? t : u.convertPrecision({ value: t, precision: n });
45
49
  }
46
50
  function g(t) {
@@ -51,31 +55,31 @@ function g(t) {
51
55
  function c(t, n = !0) {
52
56
  return n ? Number(t.amount / Math.pow(10, t.precision)).toFixed(t.precision) : Number(t.amount / Math.pow(10, t.precision)).toString();
53
57
  }
54
- function B(t, n) {
55
- n = n ?? A(t);
58
+ function V(t, n) {
59
+ n = n ?? P(t);
56
60
  const r = n, o = t.toFixed(r), e = o.includes(".") ? o.replace(/0+$/, "") : o;
57
61
  return e.endsWith(".") ? e.slice(0, e.length - 1) : e;
58
62
  }
59
- function V(t, n = !1, r = 2) {
63
+ function C(t, n = !1, r = 2) {
60
64
  const o = Number(t.amount / Math.pow(10, t.precision)), e = o.toFixed(
61
65
  Number.isInteger(o) ? 2 : Math.min(4, Math.max(2, r))
62
66
  );
63
67
  return n ? `${e} ${t.currency}` : t.currency === "MYR" ? `RM ${e}` : `${t.currency} ${e}`;
64
68
  }
65
- function C(t) {
69
+ function Y(t) {
66
70
  return {
67
71
  ...t,
68
72
  amount: Math.abs(t.amount)
69
73
  };
70
74
  }
71
- function A(t) {
75
+ function P(t) {
72
76
  if (!isFinite(t)) return 0;
73
77
  let n = 1, r = 0;
74
78
  for (; Math.round(t * n) / n !== t; )
75
79
  n *= 10, r++;
76
80
  return r;
77
81
  }
78
- function Y(t, n = 0, r = !1) {
82
+ function k(t, n = 0, r = !1) {
79
83
  let o = 0;
80
84
  return Number.isNaN(Number(t)) || (r || Number(t) >= 0) && (o = Number(t)), {
81
85
  amount: Number((o * 10 ** n).toFixed(0)),
@@ -92,8 +96,8 @@ function j(t, n) {
92
96
  const r = y(n.conversion.amount);
93
97
  return t.precision - n.conversion.precision + r;
94
98
  }
95
- const k = (t) => `${t}`.length && s()(t) === !0;
96
- function U(t, n = {}) {
99
+ const U = (t) => `${t}`.length && s()(t) === !0;
100
+ function Z(t, n = {}) {
97
101
  if (t == null)
98
102
  throw new Error("Value cannot be null or undefined");
99
103
  const { minPrecision: r = 2, maxPrecision: o = 2, locale: e = "en-US" } = n;
@@ -123,7 +127,7 @@ function U(t, n = {}) {
123
127
  maximumFractionDigits: o
124
128
  });
125
129
  }
126
- function Z() {
130
+ function H() {
127
131
  return function(n) {
128
132
  return !!n || "Required";
129
133
  };
@@ -131,7 +135,7 @@ function Z() {
131
135
  function m(t) {
132
136
  return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "amount") && Object.prototype.hasOwnProperty.call(t, "precision");
133
137
  }
134
- function H(t, n) {
138
+ function I(t, n) {
135
139
  const r = typeof t == "object" ? +c(t) : t;
136
140
  function o(e) {
137
141
  return Object.prototype.hasOwnProperty.call(e, "length");
@@ -140,7 +144,7 @@ function H(t, n) {
140
144
  return m(i) && (i = +c(i)), Number.isFinite(+i) && (i = +i), o(i) ? i.length >= r ? !0 : typeof n == "function" ? n(i.length) : n ?? `Must be at least ${r}` : typeof i == "number" ? i >= r ? !0 : typeof n == "function" ? n(i) : n ?? `Must be at least ${r}` : `Cannot validate at least ${r}`;
141
145
  };
142
146
  }
143
- function I(t) {
147
+ function W(t) {
144
148
  const n = typeof t == "object" ? +c(t) : t;
145
149
  function r(o) {
146
150
  return Object.prototype.hasOwnProperty.call(o, "length");
@@ -149,7 +153,7 @@ function I(t) {
149
153
  return m(e) && (e = +c(e)), r(e) ? e.length > n ? !0 : typeof i == "function" ? i(e.length) : i ?? `Must be more than ${n}` : typeof e == "number" ? e > n ? !0 : typeof i == "function" ? i(e) : i ?? `Must be more than ${n}` : `Cannot validate more than ${n}`;
150
154
  };
151
155
  }
152
- function W(t, n) {
156
+ function z(t, n) {
153
157
  return t instanceof Date && n instanceof Date ? function(o) {
154
158
  const e = new Date(o);
155
159
  return isNaN(e.getTime()) ? "Invalid date" : e.getTime() < t.getTime() ? `Date must be at least ${l(t)} ${h(t)}` : e.getTime() >= n.getTime() ? `Date must be less than ${l(n)} ${h(n)}` : !0;
@@ -163,11 +167,11 @@ function W(t, n) {
163
167
  function s() {
164
168
  return function(t) {
165
169
  if (t = String(t), t.trim().length === 0) return !0;
166
- const n = P(t);
170
+ const n = A(t);
167
171
  return n !== null ? n === "has too many digits" ? "Number has too many digits" : "Must be a number" : !0;
168
172
  };
169
173
  }
170
- function z(t, n) {
174
+ function G(t, n) {
171
175
  return typeof t == "number" ? function(o) {
172
176
  const e = s()(o);
173
177
  return typeof e == "string" ? e : u.fromNumber(+o).precision > t ? `Precision cannot be more than ${t} decimal point.` : !0;
@@ -179,7 +183,7 @@ function z(t, n) {
179
183
  return u.fromNumber(+o).precision > i ? `Precision cannot be more than ${i} decimal point.` : !0;
180
184
  };
181
185
  }
182
- function G(t, n) {
186
+ function J(t, n) {
183
187
  return function(o) {
184
188
  const e = s()(o);
185
189
  if (typeof e == "string")
@@ -188,14 +192,14 @@ function G(t, n) {
188
192
  return i.precision > t ? typeof n == "function" ? n(i.precision) : n ?? `Precision cannot be more than ${t}` : !0;
189
193
  };
190
194
  }
191
- function J(t, n, r) {
195
+ function K(t, n, r) {
192
196
  return function(e) {
193
197
  if (e === n) return !0;
194
198
  const i = t.find((a) => a.value === e);
195
199
  return i ? r ? r(i) : `Already used in ${i.label}` : !0;
196
200
  };
197
201
  }
198
- function K(t) {
202
+ function Q(t) {
199
203
  let n = typeof t == "number" ? u.fromNumber(t) : t;
200
204
  n = g(n);
201
205
  const r = c(n);
@@ -208,31 +212,32 @@ function K(t) {
208
212
  };
209
213
  }
210
214
  export {
211
- H as A,
212
- W as B,
215
+ I as A,
216
+ z as B,
213
217
  s as I,
214
- z as M,
215
- Z as R,
216
- J as U,
218
+ G as M,
219
+ H as R,
220
+ K as U,
217
221
  c as a,
218
222
  g as b,
219
- K as c,
220
- V as d,
221
- G as e,
222
- I as f,
223
+ Q as c,
224
+ C as d,
225
+ J as e,
226
+ W as f,
223
227
  j as g,
224
228
  S as h,
225
- A as i,
226
- C as j,
229
+ P as i,
230
+ Y as j,
227
231
  L as k,
228
232
  O as l,
229
233
  F as m,
230
- B as n,
231
- U as o,
234
+ V as n,
235
+ Z as o,
232
236
  T as p,
233
- R as q,
234
- k as r,
235
- Y as t,
236
- q as u,
237
- P as v
237
+ q,
238
+ R as r,
239
+ U as s,
240
+ k as t,
241
+ B as u,
242
+ A as v
238
243
  };
@@ -1,4 +1,4 @@
1
- import { d as m, u as $ } from "./app-Bb5HLWTu.js";
1
+ import { d as m, u as $ } from "./app-FPg0KzwG.js";
2
2
  import { useCoreStore as B } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as y } from "@feedmepos/ui-library";
4
4
  const N = m((r, a) => {
@@ -0,0 +1,78 @@
1
+ import { u as p } from "./stock-CN-acijK.js";
2
+ import { a as r, s as B, u as d, Z as k, _ as m } from "./app-FPg0KzwG.js";
3
+ import { computed as f, ref as v } from "vue";
4
+ function y() {
5
+ return {
6
+ stockBalance: {
7
+ _id: "",
8
+ items: []
9
+ },
10
+ productBalance: []
11
+ };
12
+ }
13
+ const S = B.fromNumber(0), g = {
14
+ id: "",
15
+ balance: S,
16
+ closing: null,
17
+ costs: null
18
+ }, c = v(y()), w = () => {
19
+ const u = r(), l = f(() => {
20
+ var n;
21
+ const t = (n = c.value.stockBalance.skus) == null ? void 0 : n.groupBy((o) => o.id), a = (o) => {
22
+ var e;
23
+ return ((e = t == null ? void 0 : t.get(o)) == null ? void 0 : e[0]) ?? { ...g, id: o };
24
+ };
25
+ return u.skus.map((o) => a(o._id));
26
+ }), i = p();
27
+ return {
28
+ // state
29
+ get stockBalance() {
30
+ return {
31
+ ...c.value.stockBalance,
32
+ skus: l.value
33
+ };
34
+ },
35
+ set stockBalance(t) {
36
+ c.value.stockBalance = t;
37
+ },
38
+ get productBalance() {
39
+ return c.value.productBalance;
40
+ },
41
+ set productBalance(t) {
42
+ c.value.productBalance = t;
43
+ },
44
+ // actions
45
+ async readStockBalance() {
46
+ this.stockBalance = await i.readStockBalance();
47
+ },
48
+ async readProductBalance() {
49
+ this.productBalance = [];
50
+ const t = r(), a = d().currentLocation, n = k({
51
+ recipes: t.recipes,
52
+ skus: t.skus,
53
+ skuGroups: [],
54
+ inventoryBindingMapping: {},
55
+ stockBalance: this.stockBalance,
56
+ customAttributes: m.buildCustomAttributeContext({
57
+ profile: a.doc.profile ?? null,
58
+ settingCustomAttributes: a.customAttributes ?? null
59
+ })
60
+ // silent: true
61
+ });
62
+ function o(e, s) {
63
+ return Object.prototype.hasOwnProperty.call(e, s);
64
+ }
65
+ for (const e in n.convertCountdown)
66
+ if (o(n.convertCountdown, e)) {
67
+ const s = n.convertCountdown[e];
68
+ this.productBalance.push({
69
+ id: e,
70
+ count: s
71
+ });
72
+ }
73
+ }
74
+ };
75
+ };
76
+ export {
77
+ w as u
78
+ };
@@ -262,9 +262,9 @@ export declare function useNetSuiteStore(): {
262
262
  deletedAt?: string | null | undefined;
263
263
  supplierCache?: {
264
264
  _rev?: string | null | undefined;
265
- email?: string | null | undefined;
266
265
  internal?: "restaurant" | "warehouse" | null | undefined;
267
266
  contactName?: string | null | undefined;
267
+ email?: string | null | undefined;
268
268
  phoneNumber?: string | null | undefined;
269
269
  supplyItems?: {
270
270
  skuId: string;
@@ -291,6 +291,7 @@ export declare function useNetSuiteStore(): {
291
291
  } | null | undefined;
292
292
  _id: string;
293
293
  name: string;
294
+ registrationNumber: string;
294
295
  address: {
295
296
  line2?: string | null | undefined;
296
297
  line1: string;
@@ -299,7 +300,6 @@ export declare function useNetSuiteStore(): {
299
300
  postcode: string;
300
301
  country: string;
301
302
  };
302
- registrationNumber: string;
303
303
  } | null | undefined;
304
304
  custentity_financeapproval?: boolean | null | undefined;
305
305
  businessId: string;