@feedmepos/mf-inventory-portal 1.2.63-dev.1 → 1.2.63

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 (124) hide show
  1. package/dist/{App-BHssUobV.js → App-W35c1JM6.js} +78 -82
  2. package/dist/{ApprovalView-DRGCQeGY.js → ApprovalView-qZaYBUOw.js} +5 -5
  3. package/dist/{BindingsDialog-CWl3LpdO.js → BindingsDialog-Bgvqj142.js} +5 -5
  4. package/dist/{BindingsPicker-BcASw3JJ.js → BindingsPicker-BlUUKBUF.js} +3 -3
  5. package/dist/{BindingsTable-BiKiLiVY.js → BindingsTable-Bb2CUGOE.js} +5 -5
  6. package/dist/{ClosingDraftView-mh5Kw46x.js → ClosingDraftView-BgIB7VGF.js} +216 -217
  7. package/dist/{ClosingHistoryView-C-ZrFei9.js → ClosingHistoryView-BNrhBSY1.js} +36 -36
  8. package/dist/{ClosingTemplateView-DBNRH0Tt.js → ClosingTemplateView-BHexv7IS.js} +14 -14
  9. package/dist/{DeliveryOrderPrintPreview-Dv3JZ3yr.js → DeliveryOrderPrintPreview-b6HAqBJ3.js} +7 -7
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CfL1adhx.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BMZ6uK2r.js} +16 -16
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-Db0JeXbc.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DTN2FDK5.js} +2 -2
  12. package/dist/{FmMultiselectDialog-DuYKQng9.js → FmMultiselectDialog-BRhLiA42.js} +16 -16
  13. package/dist/{FmMultiselectDialog-D9g07F_c.js → FmMultiselectDialog-ClPRjx_J.js} +1 -1
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CeXRT7Lf.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D6jUtx5F.js} +22 -23
  15. package/dist/{ImportView-DoMyJ1NE.js → ImportView-D0oguV-P.js} +6 -6
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CqJQcOBK.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-05HRp0Rw.js} +1 -1
  17. package/dist/{IngredientGroupView-D_Cl4kJy.js → IngredientGroupView-C8qcgsqS.js} +5 -5
  18. package/dist/{IngredientsView-CG6wUGzt.js → IngredientsView-DZLBIxnp.js} +24 -25
  19. package/dist/{IntegrationView-BIWPp1JH.js → IntegrationView-DoLRBfXS.js} +17 -18
  20. package/dist/{InventoryBindingForm-BrL6-2He.js → InventoryBindingForm-Ddc2xNun.js} +1 -1
  21. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-M3uVquEq.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Drnfo6QF.js} +16 -17
  22. package/dist/{InventoryBindingSummary-mnlQU1Mp.js → InventoryBindingSummary-C9G9UNHE.js} +1 -1
  23. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ByPOKZRm.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C-2ZqPDQ.js} +5 -5
  24. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DHwXNoTs.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CCFfnd1y.js} +2 -2
  25. package/dist/{PublishView-B4iVMq25.js → PublishView-CA0ndWK1.js} +8 -8
  26. package/dist/{PurchaseOrderPrintPreview-ws-SKrEC.js → PurchaseOrderPrintPreview-C0fSwRzh.js} +11 -11
  27. package/dist/{ReceiveRequestView-deSiORNX.js → ReceiveRequestView-7LQVLMw_.js} +142 -143
  28. package/dist/RecipeView-C970Tbje.js +646 -0
  29. package/dist/{StockView-6j_t2Kf1.js → StockView-DMFw_TH_.js} +105 -106
  30. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CgAMsW8n.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BnBRHve2.js} +1 -1
  31. package/dist/{SupplierView-D5tSOECx.js → SupplierView-BgwlWXfk.js} +19 -20
  32. package/dist/{SurchargeView-CP81Q4dW.js → SurchargeView-Cg6fbAF-.js} +6 -6
  33. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-Bmuw4PTO.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-B65wyG1T.js} +2 -2
  34. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D1FuB-kv.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-jjtyBmso.js} +1 -1
  35. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Canrz2ri.js → TransferDetails.vue_vue_type_script_setup_true_lang-Gi-bL9hh.js} +124 -124
  36. package/dist/{TransferTemplateView-CRI_Lexa.js → TransferTemplateView-B54hUzme.js} +21 -22
  37. package/dist/{UnitView-BZmfd-aw.js → UnitView-DOfJbxkC.js} +10 -11
  38. package/dist/{WarehouseView-BcmSyjA0.js → WarehouseView-x7UBmz1U.js} +5 -5
  39. package/dist/{WastageTemplateView-CNsdu0ga.js → WastageTemplateView-DyAlJgfd.js} +14 -14
  40. package/dist/api/inventory.d.ts +36 -126
  41. package/dist/api/netsuite.d.ts +1 -8
  42. package/dist/{app-ayv5Jw7D.js → app-CA2Cny0i.js} +7036 -8041
  43. package/dist/app.d.ts +0 -228
  44. package/dist/app.js +1 -1
  45. package/dist/{closing-template-D9UR8sMo.js → closing-template-DTv1fwBu.js} +1 -1
  46. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -37
  47. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +0 -14
  48. package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -16
  49. package/dist/{date2-GNP-79dA.js → date2-Cp4YfWcb.js} +1 -1
  50. package/dist/{dayjs.min-Bg_wgP2J.js → dayjs.min-CgirzsHV.js} +16 -16
  51. package/dist/{defineDeepModel-Co03tZfS.js → defineDeepModel-D9OlXcS_.js} +1 -1
  52. package/dist/{duplicate-template-BiPU4Z2Y.js → duplicate-template-DyCBVMov.js} +1 -1
  53. package/dist/{feature-BGeFfaiX.js → feature-BxsRwVch.js} +89 -94
  54. package/dist/{format-time-from-id-ByV0VX1x.js → format-time-from-id-BusUCMUA.js} +1 -1
  55. package/dist/{format-unit-display-r1Hb4DfH.js → format-unit-display-BvtbVzxs.js} +15 -16
  56. package/dist/{import-export.helper-PB9pPO3m.js → import-export.helper-B3Le8F5L.js} +15 -16
  57. package/dist/{index-DWWlEK_r.js → index-CLSRasCh.js} +1412 -1471
  58. package/dist/{index-ClbYCYSU.js → index-DzJrZhr1.js} +3 -3
  59. package/dist/{index-DMqOVOHw.js → index-f9YwK5uk.js} +1 -1
  60. package/dist/{lodash-BbWPSHMM.js → lodash--YJHqtef.js} +1 -1
  61. package/dist/{netsuite-VGghPz8h.js → netsuite-CBG_dy7k.js} +92 -92
  62. package/dist/{purchase-order-template-BMNxJR59.js → purchase-order-template-sK4yLnG5.js} +1 -1
  63. package/dist/router/name.d.ts +0 -1
  64. package/dist/rules-DPShesHe.js +327 -0
  65. package/dist/{stock-b7nNc6ko.js → stock-iBLjW3Y5.js} +1 -1
  66. package/dist/stock-q7nfubr2.js +75 -0
  67. package/dist/stores/feature.d.ts +0 -2
  68. package/dist/stores/integration/netsuite.d.ts +1 -8
  69. package/dist/stores/inventory.d.ts +30 -119
  70. package/dist/{supplier-Dm-bxVXL.js → supplier-pjh8CQtC.js} +2 -2
  71. package/dist/{surcharge-ZM-_XIvY.js → surcharge-CN4HYoU0.js} +1 -1
  72. package/dist/tsconfig.app.tsbuildinfo +1 -1
  73. package/dist/{use-ingredient-select-dialog-BYxTRqif.js → use-ingredient-select-dialog-Do34jWZ9.js} +2 -2
  74. package/dist/{use-inventory-binding-dialog-Dg9Mp0Vk.js → use-inventory-binding-dialog-CH_yEZAR.js} +2 -2
  75. package/dist/{use-template-enabled-locations-2-BmgcViqJ.js → use-template-enabled-locations-2-DDUlfrLq.js} +2 -2
  76. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -64
  77. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +24 -192
  78. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -8
  79. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +12 -96
  80. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +12 -96
  81. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +18 -18
  82. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +0 -14
  83. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -32
  84. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -28
  85. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -8
  86. package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +2 -16
  87. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -33
  88. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -16
  89. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +4 -32
  90. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -8
  91. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +6 -41
  92. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +36 -246
  93. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +42 -287
  94. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +0 -16
  95. package/dist/views/stock/components/StockRecordCard.vue.d.ts +0 -1
  96. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -16
  97. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +2 -16
  98. package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +2 -16
  99. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +2 -16
  100. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -8
  101. package/dist/views/transfer-template/composables/use-netsuite-custom-field.d.ts +3 -24
  102. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +12 -96
  103. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +12 -96
  104. package/dist/{vue-i18n-BwxQzDKn.js → vue-i18n-CVbjsMxl.js} +538 -538
  105. package/dist/{xlsx-dJMIfias.js → xlsx-CSeMIpYz.js} +1 -1
  106. package/dist/{xlsx.util-dclbjq8C.js → xlsx.util-CsYD8XWC.js} +1 -1
  107. package/package.json +3 -3
  108. package/dist/RecipeView-EEK7PiKl.js +0 -1558
  109. package/dist/UnitCostHistoryView-CT-4QDK8.js +0 -651
  110. package/dist/api/unit-cost-history.d.ts +0 -28
  111. package/dist/number-DPuTdA-J.js +0 -232
  112. package/dist/rules-CyF-4tvp.js +0 -98
  113. package/dist/stock-D1SElOsp.js +0 -75
  114. package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -169
  115. package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingAlternative.vue.d.ts +0 -43
  116. package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingRule.vue.d.ts +0 -25
  117. package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +0 -125
  118. package/dist/views/ingredients/components/inventory-binding/v2/components/InventorySkuBindingV2Field.vue.d.ts +0 -129
  119. package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-alternative-table.d.ts +0 -30
  120. package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -4
  121. package/dist/views/unit-cost-history/UnitCostHistoryView.vue.d.ts +0 -2
  122. package/dist/views/unit-cost-history/components/UnitCostDetailsSideSheet.vue.d.ts +0 -19
  123. package/dist/views/unit-cost-history/components/UnitCostRecalculationDialog.vue.d.ts +0 -11
  124. package/dist/views/unit-cost-history/composables/use-unit-cost-history.d.ts +0 -65
@@ -1,4 +1,4 @@
1
- import { o as s } from "./app-ayv5Jw7D.js";
1
+ import { o as s } from "./app-CA2Cny0i.js";
2
2
  import { useCoreStore as c } from "@feedmepos/mf-common";
3
3
  const u = s((n, a) => {
4
4
  function o() {
@@ -4,7 +4,6 @@ export declare enum RouteName {
4
4
  RECIPE = "RECIPE",
5
5
  UNIT = "UNIT",
6
6
  STOCK = "STOCK",
7
- UNIT_COST_HISTORY = "UNIT_COST_HISTORY",
8
7
  CLOSING_TEMPLATE = "CLOSING_TEMPLATE",
9
8
  CLOSING_DRAFT = "CLOSING_DRAFT",
10
9
  CLOSING_HISTORY = "CLOSING_HISTORY",
@@ -0,0 +1,327 @@
1
+ import { w as f } from "./app-CA2Cny0i.js";
2
+ import "./dayjs.min-CgirzsHV.js";
3
+ import { d as h, b as g } from "./date2-Cp4YfWcb.js";
4
+ function y(n) {
5
+ function t(r, i = !0) {
6
+ const u = Math.round(Math.log10(r));
7
+ return isFinite(u) && u >= 0 ? Math.ceil(u) : i ? 0 : Math.floor(u);
8
+ }
9
+ function e(r) {
10
+ const i = r.conversion;
11
+ return o - i.precision + t(i.amount);
12
+ }
13
+ const o = n.precision;
14
+ return n.measurements.reduce((r, i) => {
15
+ const u = e(i);
16
+ return u > r ? u : r;
17
+ }, 0);
18
+ }
19
+ class c {
20
+ static toDouble(t) {
21
+ return t.amount / Math.pow(10, t.precision);
22
+ }
23
+ static multiplyDecimal(t, e) {
24
+ let o = t.amount * e.amount, r = o == 0 ? 0 : t.precision + e.precision, i = o.toString();
25
+ for (; i.length > 0 && i[i.length - 1] == "0" && r > 0; )
26
+ o = o / 10, r -= 1, i = o.toString();
27
+ return {
28
+ amount: o,
29
+ precision: r
30
+ };
31
+ }
32
+ static divide(t, e) {
33
+ return {
34
+ amount: Math.floor(t.amount / e),
35
+ precision: t.precision
36
+ };
37
+ }
38
+ /// Adds two decimals and returns result of any max precision from [left] or [right]
39
+ static addDecimal(t, e) {
40
+ const o = c.normalize([t, e]), r = o[0], i = o[1];
41
+ return {
42
+ amount: r.amount + i.amount,
43
+ precision: r.precision
44
+ };
45
+ }
46
+ /// Multiplies amount if new precision is higher or rounds amount if new precision is lower
47
+ ///
48
+ /// e.g. 0.4 to 2 precision --> 0.40
49
+ /// 0.47 to 1 precision --> 0.5
50
+ /// 0.22 to 1 precision --> 0.0
51
+ static toPrecision(t, e) {
52
+ function o(i, u) {
53
+ let a = i.amount;
54
+ for (let p = i.precision; p < u; p++)
55
+ a *= 10;
56
+ return {
57
+ amount: a,
58
+ precision: u
59
+ };
60
+ }
61
+ function r(i, u) {
62
+ let a = i.amount;
63
+ for (let p = i.precision; p > u; p--)
64
+ a /= 10;
65
+ return {
66
+ amount: Number(a.toFixed(0)),
67
+ precision: u
68
+ };
69
+ }
70
+ return t.precision == e ? t : t.precision < e ? o(t, e) : r(t, e);
71
+ }
72
+ static equal(t, e) {
73
+ const o = c.normalize([t, e]), r = o[0], i = o[1];
74
+ return r.amount == i.amount;
75
+ }
76
+ static normalize(t) {
77
+ const e = t.reduce(
78
+ (o, r) => Math.max(o, Math.floor(r.precision)),
79
+ 0
80
+ );
81
+ return t.map((o) => c.toPrecision(o, e));
82
+ }
83
+ }
84
+ function x(n, t, e, o = !0) {
85
+ let r = {
86
+ ...n
87
+ };
88
+ if (e) {
89
+ const i = typeof e == "string" ? t.measurements.find((a) => a.id === e) : e;
90
+ if (!i)
91
+ return "NaN";
92
+ const u = y(t);
93
+ return r.precision < u && (r = c.toPrecision(r, y(t))), r = c.divide(r, c.toDouble(i.conversion)), `${c.toDouble(r)} ${i.abbrev}`;
94
+ }
95
+ return o ? `${c.toDouble(r)} ${t.abbrev}` : c.toDouble(r);
96
+ }
97
+ function w(n, t) {
98
+ return f.convertPrecision({
99
+ value: n,
100
+ precision: t
101
+ });
102
+ }
103
+ function F(n, t) {
104
+ return f.subtract([n, t]);
105
+ }
106
+ function T(n, t) {
107
+ return f.add([n, t]);
108
+ }
109
+ function O(n, t) {
110
+ return f.multiply([n, t]);
111
+ }
112
+ function z(n, t) {
113
+ return f.multiply([n, t]);
114
+ }
115
+ function A(n, t) {
116
+ const e = +s(n), o = +s(t);
117
+ return e / o;
118
+ }
119
+ function L(n, t) {
120
+ n = d(n), t = d(t);
121
+ const e = A(n, t);
122
+ return m(e);
123
+ }
124
+ function S(n, t) {
125
+ return n.precision >= t ? n : f.convertPrecision({ value: n, precision: t });
126
+ }
127
+ function d(n) {
128
+ if (n.amount === 0) return m(0);
129
+ const t = P(n.amount), e = n.precision - t;
130
+ return f.convertPrecision({ value: n, precision: Math.max(0, e) });
131
+ }
132
+ function s(n, t = !0) {
133
+ return t ? Number(n.amount / Math.pow(10, n.precision)).toFixed(n.precision) : Number(n.amount / Math.pow(10, n.precision)).toString();
134
+ }
135
+ function q(n, t) {
136
+ t = t ?? M(n);
137
+ const e = t, o = n.toFixed(e), r = o.includes(".") ? o.replace(/0+$/, "") : o;
138
+ return r.endsWith(".") ? r.slice(0, r.length - 1) : r;
139
+ }
140
+ function B(n, t = !1, e = 2) {
141
+ const o = Number(n.amount / Math.pow(10, n.precision)), r = o.toFixed(
142
+ Number.isInteger(o) ? 2 : Math.min(4, Math.max(2, e))
143
+ );
144
+ return t ? `${r} ${n.currency}` : n.currency === "MYR" ? `RM ${r}` : `${n.currency} ${r}`;
145
+ }
146
+ function R(n) {
147
+ return {
148
+ ...n,
149
+ amount: Math.abs(n.amount)
150
+ };
151
+ }
152
+ function M(n) {
153
+ if (!isFinite(n)) return 0;
154
+ let t = 1, e = 0;
155
+ for (; Math.round(n * t) / t !== n; )
156
+ t *= 10, e++;
157
+ return e;
158
+ }
159
+ function m(n) {
160
+ const t = M(n);
161
+ return {
162
+ precision: t,
163
+ amount: n * 10 ** t
164
+ };
165
+ }
166
+ function U(n, t = 0, e = !1) {
167
+ let o = 0;
168
+ return Number.isNaN(Number(n)) || (e || Number(n) >= 0) && (o = Number(n)), {
169
+ amount: Number((o * 10 ** t).toFixed(0)),
170
+ precision: t
171
+ };
172
+ }
173
+ function P(n) {
174
+ const t = `${n}`, e = t.replace(/0*$/g, "");
175
+ return t.length - e.length;
176
+ }
177
+ function N(n, t) {
178
+ if (!t)
179
+ return n.precision;
180
+ const e = P(t.conversion.amount);
181
+ return n.precision - t.conversion.precision + e;
182
+ }
183
+ function V(n, t = {}) {
184
+ if (n == null)
185
+ throw new Error("Value cannot be null or undefined");
186
+ const { minPrecision: e = 2, maxPrecision: o = 2, locale: r = "en-US" } = t;
187
+ if (e > o)
188
+ throw new Error("minPrecision cannot be greater than maxPrecision");
189
+ let i = 0;
190
+ switch (typeof n) {
191
+ case "number": {
192
+ i = n;
193
+ break;
194
+ }
195
+ case "string": {
196
+ i = Number(n);
197
+ break;
198
+ }
199
+ case "object": {
200
+ if (n.amount === void 0 || n.precision === void 0)
201
+ throw new Error("Invalid AdjustmentAmount object");
202
+ i = c.toDouble(n);
203
+ break;
204
+ }
205
+ default:
206
+ throw new Error("Invalid value type");
207
+ }
208
+ return i.toLocaleString(r, {
209
+ minimumFractionDigits: e,
210
+ maximumFractionDigits: o
211
+ });
212
+ }
213
+ function C() {
214
+ return function(t) {
215
+ return !!t || "Required";
216
+ };
217
+ }
218
+ function b(n) {
219
+ return n && typeof n == "object" && Object.prototype.hasOwnProperty.call(n, "amount") && Object.prototype.hasOwnProperty.call(n, "precision");
220
+ }
221
+ function Y(n, t) {
222
+ const e = typeof n == "object" ? +s(n) : n;
223
+ function o(r) {
224
+ return Object.prototype.hasOwnProperty.call(r, "length");
225
+ }
226
+ return function(i) {
227
+ return b(i) && (i = +s(i)), Number.isFinite(+i) && (i = +i), o(i) ? i.length >= e ? !0 : typeof t == "function" ? t(i.length) : t ?? `Must be at least ${e}` : typeof i == "number" ? i >= e ? !0 : typeof t == "function" ? t(i) : t ?? `Must be at least ${e}` : `Cannot validate at least ${e}`;
228
+ };
229
+ }
230
+ function k(n) {
231
+ const t = typeof n == "object" ? +s(n) : n;
232
+ function e(o) {
233
+ return Object.prototype.hasOwnProperty.call(o, "length");
234
+ }
235
+ return function(r, i) {
236
+ return b(r) && (r = +s(r)), e(r) ? r.length > t ? !0 : typeof i == "function" ? i(r.length) : i ?? `Must be more than ${t}` : typeof r == "number" ? r > t ? !0 : typeof i == "function" ? i(r) : i ?? `Must be more than ${t}` : `Cannot validate more than ${t}`;
237
+ };
238
+ }
239
+ function Z(n, t) {
240
+ return n instanceof Date && t instanceof Date ? function(o) {
241
+ const r = new Date(o);
242
+ return isNaN(r.getTime()) ? "Invalid date" : r.getTime() < n.getTime() ? `Date must be at least ${h(n)} ${g(n)}` : r.getTime() >= t.getTime() ? `Date must be less than ${h(t)} ${g(t)}` : !0;
243
+ } : typeof n == "number" && typeof t == "number" ? function(o) {
244
+ const r = +o;
245
+ return isNaN(r) ? "Invalid number" : r < n ? `Value must be at least ${n}` : r >= t ? `Value must be less than ${t}` : !0;
246
+ } : function() {
247
+ return "Progamming error: invalid range parameter.";
248
+ };
249
+ }
250
+ function l() {
251
+ return function(n) {
252
+ if (n = String(n), n.length === 0)
253
+ return !0;
254
+ const t = +n;
255
+ return isFinite(t) || "Must be a number";
256
+ };
257
+ }
258
+ function H(n, t) {
259
+ return typeof n == "number" ? function(o) {
260
+ const r = l()(o);
261
+ return typeof r == "string" ? r : m(+o).precision > n ? `Precision cannot be more than ${n} decimal point.` : !0;
262
+ } : function(o) {
263
+ const r = l()(o);
264
+ if (typeof r == "string")
265
+ return r;
266
+ const i = N(n, t);
267
+ return m(+o).precision > i ? `Precision cannot be more than ${i} decimal point.` : !0;
268
+ };
269
+ }
270
+ function I(n, t) {
271
+ return function(o) {
272
+ const r = l()(o);
273
+ if (typeof r == "string")
274
+ return r;
275
+ const i = m(+o);
276
+ return i.precision > n ? typeof t == "function" ? t(i.precision) : t ?? `Precision cannot be more than ${n}` : !0;
277
+ };
278
+ }
279
+ function W(n, t, e) {
280
+ return function(r) {
281
+ if (r === t) return !0;
282
+ const i = n.find((u) => u.value === r);
283
+ return i ? e ? e(i) : `Already used in ${i.label}` : !0;
284
+ };
285
+ }
286
+ function G(n) {
287
+ let t = typeof n == "number" ? m(n) : n;
288
+ t = d(t);
289
+ const e = s(t);
290
+ return function(r) {
291
+ if (!b(r)) {
292
+ if (r = +r, Number.isNaN(r)) return !0;
293
+ r = m(r);
294
+ }
295
+ return r = d(r), r.amount % t.amount === 0 && r.precision <= t.precision ? !0 : `${s(r)} must be a multiple of ${e}`;
296
+ };
297
+ }
298
+ export {
299
+ Y as A,
300
+ Z as B,
301
+ c as F,
302
+ l as I,
303
+ H as M,
304
+ C as R,
305
+ W as U,
306
+ s as a,
307
+ d as b,
308
+ G as c,
309
+ m as d,
310
+ B as e,
311
+ z as f,
312
+ N as g,
313
+ k as h,
314
+ x as i,
315
+ M as j,
316
+ R as k,
317
+ O as l,
318
+ T as m,
319
+ q as n,
320
+ w as o,
321
+ F as p,
322
+ L as q,
323
+ V as r,
324
+ I as s,
325
+ U as t,
326
+ S as u
327
+ };
@@ -1,4 +1,4 @@
1
- import { o as d, u as l } from "./app-ayv5Jw7D.js";
1
+ import { o as d, u as l } from "./app-CA2Cny0i.js";
2
2
  import { useCoreStore as m } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as $ } from "@feedmepos/ui-library";
4
4
  const y = d((o, a) => {
@@ -0,0 +1,75 @@
1
+ import { u as i } from "./stock-iBLjW3Y5.js";
2
+ import { a as s, L as p } from "./app-CA2Cny0i.js";
3
+ import { ref as d, computed as k } from "vue";
4
+ import { d as B } from "./rules-DPShesHe.js";
5
+ function m() {
6
+ return {
7
+ stockBalance: {
8
+ _id: "",
9
+ items: []
10
+ },
11
+ productBalance: []
12
+ };
13
+ }
14
+ const v = B(0), f = {
15
+ id: "",
16
+ balance: v,
17
+ closing: null,
18
+ costs: null
19
+ }, c = d(m()), w = () => {
20
+ const r = s(), u = k(() => {
21
+ var a;
22
+ const o = (a = c.value.stockBalance.skus) == null ? void 0 : a.groupBy((t) => t.id), n = (t) => {
23
+ var e;
24
+ return ((e = o == null ? void 0 : o.get(t)) == null ? void 0 : e[0]) ?? { ...f, id: t };
25
+ };
26
+ return r.skus.map((t) => n(t._id));
27
+ }), l = i();
28
+ return {
29
+ // state
30
+ get stockBalance() {
31
+ return {
32
+ ...c.value.stockBalance,
33
+ skus: u.value
34
+ };
35
+ },
36
+ set stockBalance(o) {
37
+ c.value.stockBalance = o;
38
+ },
39
+ get productBalance() {
40
+ return c.value.productBalance;
41
+ },
42
+ set productBalance(o) {
43
+ c.value.productBalance = o;
44
+ },
45
+ // actions
46
+ async readStockBalance() {
47
+ this.stockBalance = await l.readStockBalance();
48
+ },
49
+ async readProductBalance() {
50
+ this.productBalance = [];
51
+ const o = s(), n = p({
52
+ recipes: o.recipes,
53
+ skus: o.skus,
54
+ skuGroups: o.skuGroups,
55
+ inventoryBindingMapping: {},
56
+ stockBalance: this.stockBalance
57
+ // silent: true
58
+ });
59
+ function a(t, e) {
60
+ return Object.prototype.hasOwnProperty.call(t, e);
61
+ }
62
+ for (const t in n.convertCountdown)
63
+ if (a(n.convertCountdown, t)) {
64
+ const e = n.convertCountdown[t];
65
+ this.productBalance.push({
66
+ id: t,
67
+ count: e
68
+ });
69
+ }
70
+ }
71
+ };
72
+ };
73
+ export {
74
+ w as u
75
+ };
@@ -31,7 +31,6 @@ export interface FeatureState {
31
31
  inventory_portal_surcharge: boolean;
32
32
  inventory_purchase_order_cost_edit: boolean;
33
33
  inventory_purchase_order_workflow_allow_to_mark_completed: boolean;
34
- inventory_recipe_v2: boolean;
35
34
  }
36
35
  export declare const useFeatureStore: () => {
37
36
  readonly businessDbName: string;
@@ -67,7 +66,6 @@ export declare const useFeatureStore: () => {
67
66
  readonly enableSurcharge: boolean;
68
67
  readonly enablePurchaseOrderCostEdit: boolean;
69
68
  readonly poWorkflowAllowToMarkCompleted: boolean;
70
- readonly enableRecipeV2: boolean;
71
69
  init(): Promise<void>;
72
70
  awaitFeatureLoaded(callback: () => boolean): Promise<boolean>;
73
71
  };
@@ -164,8 +164,8 @@ export declare function useNetSuiteStore(): {
164
164
  } | null | undefined;
165
165
  customFields?: Record<string, any> | null | undefined;
166
166
  skuCache?: {
167
- trackingMeasurement?: string | null | undefined;
168
167
  isInactive?: boolean | null | undefined;
168
+ trackingMeasurement?: string | null | undefined;
169
169
  convert?: {
170
170
  measurement?: string | null | undefined;
171
171
  inventoryBindings?: {
@@ -178,13 +178,6 @@ export declare function useNetSuiteStore(): {
178
178
  precision: number;
179
179
  };
180
180
  } | null | undefined;
181
- rules?: Record<string, any> | null | undefined;
182
- alternatives?: {
183
- priority?: number | null | undefined;
184
- default?: boolean | null | undefined;
185
- trackingMeasurement?: string | null | undefined;
186
- _id: string;
187
- }[] | null | undefined;
188
181
  id: string;
189
182
  type: "RECIPE" | "SKU" | "SKU_GROUP";
190
183
  amount: {