@feedmepos/mf-inventory-portal 1.2.59 → 1.2.60-dev.2
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.
- package/dist/{App-Nwc0Ha2r.js → App-B_yr-6yL.js} +82 -78
- package/dist/{ApprovalView-Y5f915s3.js → ApprovalView-DoYBBuSD.js} +5 -5
- package/dist/{BindingsDialog-5N7R_u4c.js → BindingsDialog-DG7HOy6J.js} +5 -5
- package/dist/{BindingsPicker-BJwvLu2s.js → BindingsPicker-DVCYpyrR.js} +3 -3
- package/dist/{BindingsTable-B8sq-qXH.js → BindingsTable-CCel2b_W.js} +5 -5
- package/dist/{ClosingDraftView-BsyYOZsz.js → ClosingDraftView-CfM7gNBX.js} +891 -893
- package/dist/{ClosingHistoryView-BNpsMNy1.js → ClosingHistoryView-DWH4bFgg.js} +36 -36
- package/dist/{ClosingTemplateView-BBqbq07d.js → ClosingTemplateView-JYnnvm7L.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-CmOO7wuE.js → DeliveryOrderPrintPreview-BihBTJGj.js} +7 -7
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BXlY-Gu1.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CWjtQajS.js} +17 -17
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CAMkZRFI.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CUIrR73y.js} +2 -2
- package/dist/{FmMultiselectDialog-CwJUv9tG.js → FmMultiselectDialog-CxDviJZM.js} +16 -16
- package/dist/{FmMultiselectDialog-LagHyTQP.js → FmMultiselectDialog-D51nW6yj.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BmHFIkt1.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DLqUnROc.js} +16 -15
- package/dist/{ImportView-wQ_bNesb.js → ImportView-C52rZFib.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DtMrJIVs.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CjZmd-Sa.js} +1 -1
- package/dist/{IngredientGroupView-DsGMhdwu.js → IngredientGroupView-DTHpZP2L.js} +5 -5
- package/dist/{IngredientsView-JdjcLdOx.js → IngredientsView-CrCW6heJ.js} +25 -24
- package/dist/{IntegrationView-CMmSIRUk.js → IntegrationView--DZANrHj.js} +18 -17
- package/dist/{InventoryBindingForm-UL-UKtYW.js → InventoryBindingForm-DLTpv-zQ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-r875PDKP.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-hkIg4Rbp.js} +17 -16
- package/dist/{InventoryBindingSummary-BDAuT62b.js → InventoryBindingSummary-D9ptV8Cw.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C5zOYiqR.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdPxhkg0.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-B2zppgqk.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Ci3esisT.js} +2 -2
- package/dist/{PublishView-CSoZCSHT.js → PublishView-DxzL_D61.js} +8 -8
- package/dist/{PurchaseOrderPrintPreview-D5Qw44xo.js → PurchaseOrderPrintPreview-D0tg-2TC.js} +11 -11
- package/dist/{ReceiveRequestView-Chntp08E.js → ReceiveRequestView-2U534J1_.js} +251 -250
- package/dist/RecipeView-VZRyX3Mm.js +1558 -0
- package/dist/{StockView-CuCK7tD2.js → StockView-CvWbnYGz.js} +653 -651
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxjceLuZ.js +183 -0
- package/dist/{SupplierView-CA17Tz02.js → SupplierView-DMIunLvv.js} +20 -19
- package/dist/{SurchargeView-EIftjMCa.js → SurchargeView-jteWYvQz.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CqA6RmPy.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CyoUVoDH.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CYXsAP0i.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DAkKiy0Z.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BbbAEIcW.js → TransferDetails.vue_vue_type_script_setup_true_lang-CEXA3vvS.js} +77 -78
- package/dist/{TransferTemplateView-CYfbm9aS.js → TransferTemplateView-DMQ1WIij.js} +22 -21
- package/dist/UnitCostHistoryView-DQ3sXVAQ.js +651 -0
- package/dist/{UnitView-6s5CsGEQ.js → UnitView-p6eZ8G2C.js} +9 -9
- package/dist/{WarehouseView-BXDQOyFZ.js → WarehouseView-BIShkEPs.js} +5 -5
- package/dist/{WastageTemplateView-Cq92TiRs.js → WastageTemplateView-DCbczB_0.js} +14 -14
- package/dist/api/inventory.d.ts +126 -36
- package/dist/api/netsuite.d.ts +8 -1
- package/dist/api/stock-estimate.d.ts +2 -0
- package/dist/api/unit-cost-history.d.ts +28 -0
- package/dist/{app-DJuq_faF.js → app-BAVBNKKH.js} +7461 -6448
- package/dist/app.d.ts +236 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-D_zbp5V1.js → closing-template-DqxA750a.js} +1 -1
- package/dist/components/StockForecastProps.d.ts +6 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +37 -1
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +14 -0
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +16 -1
- package/dist/{date2-4vrHarNG.js → date2-CgwRU403.js} +1 -1
- package/dist/{dayjs.min-Dwp8614O.js → dayjs.min-CjWVK_Fe.js} +16 -16
- package/dist/{defineDeepModel-DVt2Wz9r.js → defineDeepModel-B1j_kSRA.js} +1 -1
- package/dist/{duplicate-template-CkYWeFtL.js → duplicate-template-iHtqE_uw.js} +1 -1
- package/dist/{feature-Beh-qc03.js → feature-DEryk-Cv.js} +94 -89
- package/dist/{format-time-from-id-84iLSxVu.js → format-time-from-id-C-mbWMLS.js} +1 -1
- package/dist/{format-unit-display-DfeNpWk4.js → format-unit-display-C8Hzskg0.js} +16 -15
- package/dist/helper/number.d.ts +2 -0
- package/dist/helper/type.d.ts +5 -0
- package/dist/{import-export.helper-fAVzQM2q.js → import-export.helper-DGg16RXI.js} +17 -16
- package/dist/{index-CoEqhZLm.js → index-BAkoTUB0.js} +1 -1
- package/dist/{index-B2_16R5E.js → index-BLowSL6G.js} +1471 -1412
- package/dist/{index-Chogzhcq.js → index-CLr4DPan.js} +3 -3
- package/dist/{lodash-Cx8BU1GH.js → lodash-D1_0uR01.js} +1 -1
- package/dist/{netsuite-C1bml-v1.js → netsuite-Bbxz8tiD.js} +60 -60
- package/dist/number-Cof88Fjz.js +232 -0
- package/dist/{purchase-order-template-BqFnJ-6B.js → purchase-order-template-B-sXEbRE.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/rules-CzPUVxD_.js +98 -0
- package/dist/{stock-KxT4JbNf.js → stock-BYPFH5a_.js} +1 -1
- package/dist/stock-D9E1uFb1.js +75 -0
- package/dist/stores/feature.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +8 -1
- package/dist/stores/inventory.d.ts +119 -30
- package/dist/{supplier-C7wUB1zT.js → supplier-wQYh275s.js} +2 -2
- package/dist/{surcharge-CjB_Qtbv.js → surcharge-Bi21qFa0.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-D5KSqA4Z.js → use-ingredient-select-dialog-DH-mXl8H.js} +2 -2
- package/dist/{use-inventory-binding-dialog-eGOvztV3.js → use-inventory-binding-dialog-i8E2CNuV.js} +2 -2
- package/dist/{use-template-enabled-locations-2-3kcVWPQm.js → use-template-enabled-locations-2-DRk9TskI.js} +2 -2
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +64 -8
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +192 -24
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +8 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +96 -12
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +96 -12
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +18 -18
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +14 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +32 -4
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +28 -0
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +169 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingAlternative.vue.d.ts +43 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingRule.vue.d.ts +25 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +125 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventorySkuBindingV2Field.vue.d.ts +129 -0
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-alternative-table.d.ts +30 -0
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +4 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +8 -1
- package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +16 -2
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +33 -5
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +16 -2
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +32 -4
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +8 -1
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +41 -6
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +246 -36
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +287 -42
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +16 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -0
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +16 -2
- package/dist/views/stock/type.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -1
- package/dist/views/transfer-template/composables/use-netsuite-custom-field.d.ts +24 -3
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -12
- package/dist/views/unit-cost-history/UnitCostHistoryView.vue.d.ts +2 -0
- package/dist/views/unit-cost-history/components/UnitCostDetailsSideSheet.vue.d.ts +19 -0
- package/dist/views/unit-cost-history/components/UnitCostRecalculationDialog.vue.d.ts +11 -0
- package/dist/views/unit-cost-history/composables/use-unit-cost-history.d.ts +65 -0
- package/dist/{vue-i18n-C6XNfngV.js → vue-i18n-Cf9iDkfk.js} +398 -398
- package/dist/{xlsx-BwNUbN_O.js → xlsx-lp5RXzSw.js} +398 -398
- package/dist/{xlsx.util-B_DE3inS.js → xlsx.util-BxpZNkEZ.js} +1 -1
- package/package.json +2 -2
- package/dist/RecipeView-Ck3Pa4fg.js +0 -646
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-fMji2qKG.js +0 -172
- package/dist/decimal-Bf6AG_d3.js +0 -99
- package/dist/rules-y2OYGOro.js +0 -201
- package/dist/stock-BWUzlDTa.js +0 -75
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { y as a } from "./app-BAVBNKKH.js";
|
|
2
|
+
import "./dayjs.min-CjWVK_Fe.js";
|
|
3
|
+
function l(n) {
|
|
4
|
+
function t(o, e = !0) {
|
|
5
|
+
const u = Math.round(Math.log10(o));
|
|
6
|
+
return isFinite(u) && u >= 0 ? Math.ceil(u) : e ? 0 : Math.floor(u);
|
|
7
|
+
}
|
|
8
|
+
function r(o) {
|
|
9
|
+
const e = o.conversion;
|
|
10
|
+
return i - e.precision + t(e.amount);
|
|
11
|
+
}
|
|
12
|
+
const i = n.precision;
|
|
13
|
+
return n.measurements.reduce((o, e) => {
|
|
14
|
+
const u = r(e);
|
|
15
|
+
return u > o ? u : o;
|
|
16
|
+
}, 0);
|
|
17
|
+
}
|
|
18
|
+
class c {
|
|
19
|
+
static toDouble(t) {
|
|
20
|
+
return t.amount / Math.pow(10, t.precision);
|
|
21
|
+
}
|
|
22
|
+
static multiplyDecimal(t, r) {
|
|
23
|
+
let i = t.amount * r.amount, o = i == 0 ? 0 : t.precision + r.precision, e = i.toString();
|
|
24
|
+
for (; e.length > 0 && e[e.length - 1] == "0" && o > 0; )
|
|
25
|
+
i = i / 10, o -= 1, e = i.toString();
|
|
26
|
+
return {
|
|
27
|
+
amount: i,
|
|
28
|
+
precision: o
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static divide(t, r) {
|
|
32
|
+
return {
|
|
33
|
+
amount: Math.floor(t.amount / r),
|
|
34
|
+
precision: t.precision
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/// Adds two decimals and returns result of any max precision from [left] or [right]
|
|
38
|
+
static addDecimal(t, r) {
|
|
39
|
+
const i = c.normalize([t, r]), o = i[0], e = i[1];
|
|
40
|
+
return {
|
|
41
|
+
amount: o.amount + e.amount,
|
|
42
|
+
precision: o.precision
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/// Multiplies amount if new precision is higher or rounds amount if new precision is lower
|
|
46
|
+
///
|
|
47
|
+
/// e.g. 0.4 to 2 precision --> 0.40
|
|
48
|
+
/// 0.47 to 1 precision --> 0.5
|
|
49
|
+
/// 0.22 to 1 precision --> 0.0
|
|
50
|
+
static toPrecision(t, r) {
|
|
51
|
+
function i(e, u) {
|
|
52
|
+
let s = e.amount;
|
|
53
|
+
for (let m = e.precision; m < u; m++)
|
|
54
|
+
s *= 10;
|
|
55
|
+
return {
|
|
56
|
+
amount: s,
|
|
57
|
+
precision: u
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function o(e, u) {
|
|
61
|
+
let s = e.amount;
|
|
62
|
+
for (let m = e.precision; m > u; m--)
|
|
63
|
+
s /= 10;
|
|
64
|
+
return {
|
|
65
|
+
amount: Number(s.toFixed(0)),
|
|
66
|
+
precision: u
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return t.precision == r ? t : t.precision < r ? i(t, r) : o(t, r);
|
|
70
|
+
}
|
|
71
|
+
static equal(t, r) {
|
|
72
|
+
const i = c.normalize([t, r]), o = i[0], e = i[1];
|
|
73
|
+
return o.amount == e.amount;
|
|
74
|
+
}
|
|
75
|
+
static normalize(t) {
|
|
76
|
+
const r = t.reduce(
|
|
77
|
+
(i, o) => Math.max(i, Math.floor(o.precision)),
|
|
78
|
+
0
|
|
79
|
+
);
|
|
80
|
+
return t.map((i) => c.toPrecision(i, r));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function N(n, t, r, i = !0) {
|
|
84
|
+
let o = {
|
|
85
|
+
...n
|
|
86
|
+
};
|
|
87
|
+
if (r) {
|
|
88
|
+
const e = typeof r == "string" ? t.measurements.find((s) => s.id === r) : r;
|
|
89
|
+
if (!e)
|
|
90
|
+
return "NaN";
|
|
91
|
+
const u = l(t);
|
|
92
|
+
return o.precision < u && (o = c.toPrecision(o, l(t))), o = c.divide(o, c.toDouble(e.conversion)), `${c.toDouble(o)} ${e.abbrev}`;
|
|
93
|
+
}
|
|
94
|
+
return i ? `${c.toDouble(o)} ${t.abbrev}` : c.toDouble(o);
|
|
95
|
+
}
|
|
96
|
+
function x(n, t) {
|
|
97
|
+
return a.convertPrecision({
|
|
98
|
+
value: n,
|
|
99
|
+
precision: t
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function M(n, t) {
|
|
103
|
+
return a.subtract([n, t]);
|
|
104
|
+
}
|
|
105
|
+
function j(n, t) {
|
|
106
|
+
return a.add([n, t]);
|
|
107
|
+
}
|
|
108
|
+
function y(n, t) {
|
|
109
|
+
return a.multiply([n, t]);
|
|
110
|
+
}
|
|
111
|
+
function D(n, t) {
|
|
112
|
+
return a.multiply([n, t]);
|
|
113
|
+
}
|
|
114
|
+
function h(n, t) {
|
|
115
|
+
const r = +p(n), i = +p(t);
|
|
116
|
+
return r / i;
|
|
117
|
+
}
|
|
118
|
+
function F(n, t) {
|
|
119
|
+
n = f(n), t = f(t);
|
|
120
|
+
const r = h(n, t);
|
|
121
|
+
return b(r);
|
|
122
|
+
}
|
|
123
|
+
function w(n, t) {
|
|
124
|
+
return n.precision >= t ? n : a.convertPrecision({ value: n, precision: t });
|
|
125
|
+
}
|
|
126
|
+
function f(n) {
|
|
127
|
+
if (n.amount === 0) return b(0);
|
|
128
|
+
const t = g(n.amount), r = n.precision - t;
|
|
129
|
+
return a.convertPrecision({ value: n, precision: Math.max(0, r) });
|
|
130
|
+
}
|
|
131
|
+
function p(n, t = !0) {
|
|
132
|
+
return t ? Number(n.amount / Math.pow(10, n.precision)).toFixed(n.precision) : Number(n.amount / Math.pow(10, n.precision)).toString();
|
|
133
|
+
}
|
|
134
|
+
function $(n, t) {
|
|
135
|
+
t = t ?? d(n);
|
|
136
|
+
const r = t, i = n.toFixed(r), o = i.includes(".") ? i.replace(/0+$/, "") : i;
|
|
137
|
+
return o.endsWith(".") ? o.slice(0, o.length - 1) : o;
|
|
138
|
+
}
|
|
139
|
+
function z(n, t = !1, r = 2) {
|
|
140
|
+
const i = Number(n.amount / Math.pow(10, n.precision)), o = i.toFixed(
|
|
141
|
+
Number.isInteger(i) ? 2 : Math.min(4, Math.max(2, r))
|
|
142
|
+
);
|
|
143
|
+
return t ? `${o} ${n.currency}` : n.currency === "MYR" ? `RM ${o}` : `${n.currency} ${o}`;
|
|
144
|
+
}
|
|
145
|
+
function v(n) {
|
|
146
|
+
return {
|
|
147
|
+
...n,
|
|
148
|
+
amount: Math.abs(n.amount)
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function d(n) {
|
|
152
|
+
if (!isFinite(n)) return 0;
|
|
153
|
+
let t = 1, r = 0;
|
|
154
|
+
for (; Math.round(n * t) / t !== n; )
|
|
155
|
+
t *= 10, r++;
|
|
156
|
+
return r;
|
|
157
|
+
}
|
|
158
|
+
function b(n) {
|
|
159
|
+
const t = d(n);
|
|
160
|
+
return {
|
|
161
|
+
precision: t,
|
|
162
|
+
amount: n * 10 ** t
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function S(n, t = 0, r = !1) {
|
|
166
|
+
let i = 0;
|
|
167
|
+
return Number.isNaN(Number(n)) || (r || Number(n) >= 0) && (i = Number(n)), {
|
|
168
|
+
amount: Number((i * 10 ** t).toFixed(0)),
|
|
169
|
+
precision: t
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function g(n) {
|
|
173
|
+
const t = `${n}`, r = t.replace(/0*$/g, "");
|
|
174
|
+
return t.length - r.length;
|
|
175
|
+
}
|
|
176
|
+
function E(n, t) {
|
|
177
|
+
if (!t)
|
|
178
|
+
return n.precision;
|
|
179
|
+
const r = g(t.conversion.amount);
|
|
180
|
+
return n.precision - t.conversion.precision + r;
|
|
181
|
+
}
|
|
182
|
+
function k(n, t = {}) {
|
|
183
|
+
if (n == null)
|
|
184
|
+
throw new Error("Value cannot be null or undefined");
|
|
185
|
+
const { minPrecision: r = 2, maxPrecision: i = 2, locale: o = "en-US" } = t;
|
|
186
|
+
if (r > i)
|
|
187
|
+
throw new Error("minPrecision cannot be greater than maxPrecision");
|
|
188
|
+
let e = 0;
|
|
189
|
+
switch (typeof n) {
|
|
190
|
+
case "number": {
|
|
191
|
+
e = n;
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
case "string": {
|
|
195
|
+
e = Number(n);
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
case "object": {
|
|
199
|
+
if (n.amount === void 0 || n.precision === void 0)
|
|
200
|
+
throw new Error("Invalid AdjustmentAmount object");
|
|
201
|
+
e = c.toDouble(n);
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
default:
|
|
205
|
+
throw new Error("Invalid value type");
|
|
206
|
+
}
|
|
207
|
+
return e.toLocaleString(o, {
|
|
208
|
+
minimumFractionDigits: r,
|
|
209
|
+
maximumFractionDigits: i
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
export {
|
|
213
|
+
c as F,
|
|
214
|
+
p as a,
|
|
215
|
+
f as b,
|
|
216
|
+
b as c,
|
|
217
|
+
z as d,
|
|
218
|
+
D as e,
|
|
219
|
+
N as f,
|
|
220
|
+
E as g,
|
|
221
|
+
d as h,
|
|
222
|
+
v as i,
|
|
223
|
+
y as j,
|
|
224
|
+
j as k,
|
|
225
|
+
x as l,
|
|
226
|
+
M as m,
|
|
227
|
+
$ as n,
|
|
228
|
+
F as o,
|
|
229
|
+
k as p,
|
|
230
|
+
S as t,
|
|
231
|
+
w as u
|
|
232
|
+
};
|
package/dist/router/name.d.ts
CHANGED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { a as u, g as d, c as f, b as m } from "./number-Cof88Fjz.js";
|
|
2
|
+
import { d as b, b as p } from "./date2-CgwRU403.js";
|
|
3
|
+
function M() {
|
|
4
|
+
return function(e) {
|
|
5
|
+
return !!e || "Required";
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
function s(n) {
|
|
9
|
+
return n && typeof n == "object" && Object.prototype.hasOwnProperty.call(n, "amount") && Object.prototype.hasOwnProperty.call(n, "precision");
|
|
10
|
+
}
|
|
11
|
+
function A(n, e) {
|
|
12
|
+
const o = typeof n == "object" ? +u(n) : n;
|
|
13
|
+
function i(t) {
|
|
14
|
+
return Object.prototype.hasOwnProperty.call(t, "length");
|
|
15
|
+
}
|
|
16
|
+
return function(r) {
|
|
17
|
+
return s(r) && (r = +u(r)), Number.isFinite(+r) && (r = +r), i(r) ? r.length >= o ? !0 : typeof e == "function" ? e(r.length) : e ?? `Must be at least ${o}` : typeof r == "number" ? r >= o ? !0 : typeof e == "function" ? e(r) : e ?? `Must be at least ${o}` : `Cannot validate at least ${o}`;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function $(n) {
|
|
21
|
+
const e = typeof n == "object" ? +u(n) : n;
|
|
22
|
+
function o(i) {
|
|
23
|
+
return Object.prototype.hasOwnProperty.call(i, "length");
|
|
24
|
+
}
|
|
25
|
+
return function(t, r) {
|
|
26
|
+
return s(t) && (t = +u(t)), o(t) ? t.length > e ? !0 : typeof r == "function" ? r(t.length) : r ?? `Must be more than ${e}` : typeof t == "number" ? t > e ? !0 : typeof r == "function" ? r(t) : r ?? `Must be more than ${e}` : `Cannot validate more than ${e}`;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function P(n, e) {
|
|
30
|
+
return n instanceof Date && e instanceof Date ? function(i) {
|
|
31
|
+
const t = new Date(i);
|
|
32
|
+
return isNaN(t.getTime()) ? "Invalid date" : t.getTime() < n.getTime() ? `Date must be at least ${b(n)} ${p(n)}` : t.getTime() >= e.getTime() ? `Date must be less than ${b(e)} ${p(e)}` : !0;
|
|
33
|
+
} : typeof n == "number" && typeof e == "number" ? function(i) {
|
|
34
|
+
const t = +i;
|
|
35
|
+
return isNaN(t) ? "Invalid number" : t < n ? `Value must be at least ${n}` : t >= e ? `Value must be less than ${e}` : !0;
|
|
36
|
+
} : function() {
|
|
37
|
+
return "Progamming error: invalid range parameter.";
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function c() {
|
|
41
|
+
return function(n) {
|
|
42
|
+
if (n = String(n), n.length === 0)
|
|
43
|
+
return !0;
|
|
44
|
+
const e = +n;
|
|
45
|
+
return isFinite(e) || "Must be a number";
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function j(n, e) {
|
|
49
|
+
return typeof n == "number" ? function(i) {
|
|
50
|
+
const t = c()(i);
|
|
51
|
+
return typeof t == "string" ? t : f(+i).precision > n ? `Precision cannot be more than ${n} decimal point.` : !0;
|
|
52
|
+
} : function(i) {
|
|
53
|
+
const t = c()(i);
|
|
54
|
+
if (typeof t == "string")
|
|
55
|
+
return t;
|
|
56
|
+
const r = d(n, e);
|
|
57
|
+
return f(+i).precision > r ? `Precision cannot be more than ${r} decimal point.` : !0;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function g(n, e) {
|
|
61
|
+
return function(i) {
|
|
62
|
+
const t = c()(i);
|
|
63
|
+
if (typeof t == "string")
|
|
64
|
+
return t;
|
|
65
|
+
const r = f(+i);
|
|
66
|
+
return r.precision > n ? typeof e == "function" ? e(r.precision) : e ?? `Precision cannot be more than ${n}` : !0;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function D(n, e, o) {
|
|
70
|
+
return function(t) {
|
|
71
|
+
if (t === e) return !0;
|
|
72
|
+
const r = n.find((a) => a.value === t);
|
|
73
|
+
return r ? o ? o(r) : `Already used in ${r.label}` : !0;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function N(n) {
|
|
77
|
+
let e = typeof n == "number" ? f(n) : n;
|
|
78
|
+
e = m(e);
|
|
79
|
+
const o = u(e);
|
|
80
|
+
return function(t) {
|
|
81
|
+
if (!s(t)) {
|
|
82
|
+
if (t = +t, Number.isNaN(t)) return !0;
|
|
83
|
+
t = f(t);
|
|
84
|
+
}
|
|
85
|
+
return t = m(t), t.amount % e.amount === 0 && t.precision <= e.precision ? !0 : `${u(t)} must be a multiple of ${o}`;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
A,
|
|
90
|
+
P as B,
|
|
91
|
+
c as I,
|
|
92
|
+
j as M,
|
|
93
|
+
M as R,
|
|
94
|
+
D as U,
|
|
95
|
+
N as a,
|
|
96
|
+
g as b,
|
|
97
|
+
$ as c
|
|
98
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { u as i } from "./stock-BYPFH5a_.js";
|
|
2
|
+
import { a as s, M as p } from "./app-BAVBNKKH.js";
|
|
3
|
+
import { ref as k, computed as B } from "vue";
|
|
4
|
+
import { c as d } from "./number-Cof88Fjz.js";
|
|
5
|
+
function m() {
|
|
6
|
+
return {
|
|
7
|
+
stockBalance: {
|
|
8
|
+
_id: "",
|
|
9
|
+
items: []
|
|
10
|
+
},
|
|
11
|
+
productBalance: []
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
const v = d(0), f = {
|
|
15
|
+
id: "",
|
|
16
|
+
balance: v,
|
|
17
|
+
closing: null,
|
|
18
|
+
costs: null
|
|
19
|
+
}, n = k(m()), w = () => {
|
|
20
|
+
const r = s(), u = B(() => {
|
|
21
|
+
var a;
|
|
22
|
+
const o = (a = n.value.stockBalance.skus) == null ? void 0 : a.groupBy((t) => t.id), e = (t) => {
|
|
23
|
+
var c;
|
|
24
|
+
return ((c = o == null ? void 0 : o.get(t)) == null ? void 0 : c[0]) ?? { ...f, id: t };
|
|
25
|
+
};
|
|
26
|
+
return r.skus.map((t) => e(t._id));
|
|
27
|
+
}), l = i();
|
|
28
|
+
return {
|
|
29
|
+
// state
|
|
30
|
+
get stockBalance() {
|
|
31
|
+
return {
|
|
32
|
+
...n.value.stockBalance,
|
|
33
|
+
skus: u.value
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
set stockBalance(o) {
|
|
37
|
+
n.value.stockBalance = o;
|
|
38
|
+
},
|
|
39
|
+
get productBalance() {
|
|
40
|
+
return n.value.productBalance;
|
|
41
|
+
},
|
|
42
|
+
set productBalance(o) {
|
|
43
|
+
n.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(), e = 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, c) {
|
|
60
|
+
return Object.prototype.hasOwnProperty.call(t, c);
|
|
61
|
+
}
|
|
62
|
+
for (const t in e.convertCountdown)
|
|
63
|
+
if (a(e.convertCountdown, t)) {
|
|
64
|
+
const c = e.convertCountdown[t];
|
|
65
|
+
this.productBalance.push({
|
|
66
|
+
id: t,
|
|
67
|
+
count: c
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
w as u
|
|
75
|
+
};
|
package/dist/stores/feature.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ 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;
|
|
34
35
|
}
|
|
35
36
|
export declare const useFeatureStore: () => {
|
|
36
37
|
readonly businessDbName: string;
|
|
@@ -66,6 +67,7 @@ export declare const useFeatureStore: () => {
|
|
|
66
67
|
readonly enableSurcharge: boolean;
|
|
67
68
|
readonly enablePurchaseOrderCostEdit: boolean;
|
|
68
69
|
readonly poWorkflowAllowToMarkCompleted: boolean;
|
|
70
|
+
readonly enableRecipeV2: boolean;
|
|
69
71
|
init(): Promise<void>;
|
|
70
72
|
awaitFeatureLoaded(callback: () => boolean): Promise<boolean>;
|
|
71
73
|
};
|
|
@@ -164,8 +164,8 @@ export declare function useNetSuiteStore(): {
|
|
|
164
164
|
} | null | undefined;
|
|
165
165
|
customFields?: Record<string, any> | null | undefined;
|
|
166
166
|
skuCache?: {
|
|
167
|
-
isInactive?: boolean | null | undefined;
|
|
168
167
|
trackingMeasurement?: string | null | undefined;
|
|
168
|
+
isInactive?: boolean | null | undefined;
|
|
169
169
|
convert?: {
|
|
170
170
|
measurement?: string | null | undefined;
|
|
171
171
|
inventoryBindings?: {
|
|
@@ -178,6 +178,13 @@ 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;
|
|
181
188
|
id: string;
|
|
182
189
|
type: "RECIPE" | "SKU" | "SKU_GROUP";
|
|
183
190
|
amount: {
|