@feedmepos/mf-inventory-portal 1.2.64 → 1.2.66-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.
- package/dist/{App-apJIvz1w.js → App-BUNonuLz.js} +82 -78
- package/dist/{ApprovalView-CnT6gEI8.js → ApprovalView-BlS1tfbh.js} +6 -6
- package/dist/{BindingsDialog-DLEGDbV2.js → BindingsDialog-tRpsVTm0.js} +5 -5
- package/dist/{BindingsPicker-1Xt1vCu9.js → BindingsPicker-CUvkqcAG.js} +3 -3
- package/dist/{BindingsTable-_0cOM0Kx.js → BindingsTable-B86pWYMk.js} +5 -5
- package/dist/{ClosingDraftView-DsVPsN87.js → ClosingDraftView-gMVnQcWw.js} +226 -224
- package/dist/ClosingHistoryView-DhbE1pEl.js +1147 -0
- package/dist/{ClosingTemplateView-DB3F1wul.js → ClosingTemplateView-Ywbdj05y.js} +15 -15
- package/dist/{DeliveryOrderPrintPreview-CglCMgHc.js → DeliveryOrderPrintPreview-BPhVNc_r.js} +7 -7
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-MMPTJodu.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BrPh_Nvx.js} +16 -16
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CCID5O2Y.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CkUwLhut.js} +3 -3
- package/dist/{FmMultiselectDialog-B8xFmCsH.js → FmMultiselectDialog-C6E_KMFO.js} +1 -1
- package/dist/{FmMultiselectDialog-lQM1qEEW.js → FmMultiselectDialog-DBXpkw5b.js} +16 -16
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BLDz8wwK.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D-ZqJ8sU.js} +23 -22
- package/dist/{ImportView-DeC-MPFn.js → ImportView-DV1e51qk.js} +7 -7
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BGDZlmsr.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DkQL7hK2.js} +1 -1
- package/dist/{IngredientGroupView-CuFwQ8Bo.js → IngredientGroupView-CdXGO34J.js} +6 -6
- package/dist/{IngredientsView-CfloqEqn.js → IngredientsView-D2qffNiJ.js} +26 -25
- package/dist/{IntegrationView-CFU0yG6C.js → IntegrationView-RFJIHXQv.js} +19 -18
- package/dist/{InventoryBindingForm-i7eNurS2.js → InventoryBindingForm-CPn-IXgg.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-zOo9YVJe.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-0Vrih8D5.js} +17 -16
- package/dist/{InventoryBindingSummary-BbHLCdjj.js → InventoryBindingSummary-B_WUQ6By.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-NEPqmkHR.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BmDuR4Yb.js} +5 -5
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-DhIHSpzG.js +93 -0
- package/dist/{PublishView-CbwCLtph.js → PublishView-BtTSOUyL.js} +9 -9
- package/dist/{PurchaseOrderPrintPreview-DLhgjhHB.js → PurchaseOrderPrintPreview-CxhMPx5u.js} +11 -11
- package/dist/{ReceiveRequestView-CE2aQR-o.js → ReceiveRequestView-CsqEjf7r.js} +144 -142
- package/dist/RecipeView-DASoba97.js +1558 -0
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-mvRR4CrP.js +254 -0
- package/dist/StockView-B4Km4DgB.js +2395 -0
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-D0BDdq4d.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Cki-LAZR.js} +1 -1
- package/dist/{SupplierView-wSzWjZLY.js → SupplierView-CrzFvBIx.js} +21 -20
- package/dist/{SurchargeView-G8OyE60y.js → SurchargeView-BoNWpxFY.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CROQL761.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-Dcp5vZPM.js} +3 -3
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-IAknr-ye.js +292 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D1AGDeEP.js → TransferDetails.vue_vue_type_script_setup_true_lang-D9aNX0oM.js} +131 -130
- package/dist/{TransferTemplateView-CVfi8jsk.js → TransferTemplateView-DwIU0paO.js} +23 -22
- package/dist/UnitCostHistoryView-Bjs4RwyR.js +651 -0
- package/dist/UnitDisplayControl.vue_vue_type_script_setup_true_lang-BH0PxivU.js +137 -0
- package/dist/{UnitView-Dn3nuQHm.js → UnitView-BbQ0jOgS.js} +12 -10
- package/dist/{WarehouseView-GSxQ_Ev2.js → WarehouseView-DzPttKzE.js} +6 -6
- package/dist/WastageTemplateView-CxyZz5JC.js +2327 -0
- package/dist/api/adjustment-template.d.ts +1 -0
- package/dist/api/closing.d.ts +2 -0
- package/dist/api/inventory.d.ts +126 -36
- package/dist/api/netsuite.d.ts +8 -1
- package/dist/api/stock.d.ts +5 -1
- package/dist/api/unit-cost-history.d.ts +28 -0
- package/dist/{app-CYbiMVcX.js → app-EoCCjoRh.js} +9021 -7945
- package/dist/app.d.ts +236 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-Dq16W8vW.js → closing-template-O_hzhisU.js} +5 -1
- package/dist/components/TemplatePublishDialog.d.ts +1 -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-De3BHKh5.js → date2-CTHKdfXp.js} +1 -1
- package/dist/{dayjs.min-DxdfVXA-.js → dayjs.min-Ccv4NdEp.js} +16 -16
- package/dist/decimal-tRyklLh0.js +99 -0
- package/dist/{defineDeepModel-2n_afItE.js → defineDeepModel-rmOd66to.js} +1 -1
- package/dist/{duplicate-template-DM7YIgor.js → duplicate-template-k8Erwdzo.js} +1 -1
- package/dist/export-TmaGpV98.js +25 -0
- package/dist/{feature-_nNpSZuh.js → feature-D4-lt7R6.js} +94 -89
- package/dist/{format-time-from-id-D5HSMsS-.js → format-time-from-id-Cru7cG1h.js} +1 -1
- package/dist/{format-unit-display-CQUFDxVm.js → format-unit-display-DZDD796a.js} +16 -15
- package/dist/{import-export.helper-BoxczUsX.js → import-export.helper-BjzXGudc.js} +16 -15
- package/dist/{index-B6nDUCCe.js → index-BeEz64I1.js} +3 -3
- package/dist/{index-Cp_mpu5S.js → index-DKCY6354.js} +1471 -1412
- package/dist/{index-CdfF5GGW.js → index-gGbN4qbt.js} +1 -1
- package/dist/{lodash-2R7Rgorb.js → lodash-BSCFf0k7.js} +1 -1
- package/dist/{netsuite-Bss4fURp.js → netsuite-DwoCq3Mv.js} +92 -92
- package/dist/number-CEUoMyIk.js +138 -0
- package/dist/{purchase-order-template-CBSvv0b2.js → purchase-order-template-DWTdjo9l.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/rules-CyW1Bx31.js +98 -0
- package/dist/{stock-DMX_hH5c.js → stock-DYWJ4DZW.js} +28 -27
- package/dist/stock-Ds3GNgHG.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 +120 -30
- package/dist/{supplier-Cf5HW15s.js → supplier-DwUb1oVo.js} +2 -2
- package/dist/{surcharge-CyReT8lG.js → surcharge-UTJFNBLN.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BCyydlHR.js → use-ingredient-select-dialog-D8A3bPTe.js} +2 -2
- package/dist/{use-inventory-binding-dialog-WGQs-_2i.js → use-inventory-binding-dialog-DFmiAQ9d.js} +2 -2
- package/dist/{use-template-enabled-locations-2-B0nlqUjb.js → use-template-enabled-locations-2-snlITfW8.js} +2 -2
- package/dist/views/adjustment-template/wastage-template/table.d.ts +10 -1
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +68 -12
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +204 -36
- package/dist/views/closing-history/ClosingDetailDialog.vue.d.ts +23 -0
- 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/components/dialog/SnapshotRecalculationDialog.vue.d.ts +11 -0
- package/dist/views/stock/components/dialog/recalculationUtils.d.ts +16 -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-DwS_fjo9.js → vue-i18n-CY4442Fb.js} +510 -510
- package/dist/{xlsx-9MOvXxhT.js → xlsx-Kc1XotGV.js} +1 -1
- package/dist/{xlsx.util-D1DdGA1N.js → xlsx.util-Dy4jmPyv.js} +1 -1
- package/package.json +1 -1
- package/dist/ClosingHistoryView-YrEVWvGu.js +0 -447
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-BDVHkTSE.js +0 -116
- package/dist/RecipeView-B-gmrXHR.js +0 -646
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js +0 -251
- package/dist/StockView-BNe2_5bA.js +0 -2520
- package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CwV2luel.js +0 -263
- package/dist/WastageTemplateView-BG-y48uc.js +0 -2388
- package/dist/rules-T-fs8_4_.js +0 -327
- package/dist/stock-CFWu5bRA.js +0 -75
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { y as o } from "./app-EoCCjoRh.js";
|
|
2
|
+
import { F as l } from "./decimal-tRyklLh0.js";
|
|
3
|
+
import "./dayjs.min-Ccv4NdEp.js";
|
|
4
|
+
function g(n, t) {
|
|
5
|
+
return o.convertPrecision({
|
|
6
|
+
value: n,
|
|
7
|
+
precision: t
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function A(n, t) {
|
|
11
|
+
return o.subtract([n, t]);
|
|
12
|
+
}
|
|
13
|
+
function j(n, t) {
|
|
14
|
+
return o.add([n, t]);
|
|
15
|
+
}
|
|
16
|
+
function P(n, t) {
|
|
17
|
+
return o.multiply([n, t]);
|
|
18
|
+
}
|
|
19
|
+
function w(n, t) {
|
|
20
|
+
return o.multiply([n, t]);
|
|
21
|
+
}
|
|
22
|
+
function d(n, t) {
|
|
23
|
+
const r = +s(n), e = +s(t);
|
|
24
|
+
return r / e;
|
|
25
|
+
}
|
|
26
|
+
function F(n, t) {
|
|
27
|
+
n = c(n), t = c(t);
|
|
28
|
+
const r = d(n, t);
|
|
29
|
+
return m(r);
|
|
30
|
+
}
|
|
31
|
+
function N(n, t) {
|
|
32
|
+
return n.precision >= t ? n : o.convertPrecision({ value: n, precision: t });
|
|
33
|
+
}
|
|
34
|
+
function c(n) {
|
|
35
|
+
if (n.amount === 0) return m(0);
|
|
36
|
+
const t = f(n.amount), r = n.precision - t;
|
|
37
|
+
return o.convertPrecision({ value: n, precision: Math.max(0, r) });
|
|
38
|
+
}
|
|
39
|
+
function s(n, t = !0) {
|
|
40
|
+
return t ? Number(n.amount / Math.pow(10, n.precision)).toFixed(n.precision) : Number(n.amount / Math.pow(10, n.precision)).toString();
|
|
41
|
+
}
|
|
42
|
+
function x(n, t) {
|
|
43
|
+
t = t ?? a(n);
|
|
44
|
+
const r = t, e = n.toFixed(r), i = e.includes(".") ? e.replace(/0+$/, "") : e;
|
|
45
|
+
return i.endsWith(".") ? i.slice(0, i.length - 1) : i;
|
|
46
|
+
}
|
|
47
|
+
function y(n, t = !1, r = 2) {
|
|
48
|
+
const e = Number(n.amount / Math.pow(10, n.precision)), i = e.toFixed(
|
|
49
|
+
Number.isInteger(e) ? 2 : Math.min(4, Math.max(2, r))
|
|
50
|
+
);
|
|
51
|
+
return t ? `${i} ${n.currency}` : n.currency === "MYR" ? `RM ${i}` : `${n.currency} ${i}`;
|
|
52
|
+
}
|
|
53
|
+
function M(n) {
|
|
54
|
+
return {
|
|
55
|
+
...n,
|
|
56
|
+
amount: Math.abs(n.amount)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function a(n) {
|
|
60
|
+
if (!isFinite(n)) return 0;
|
|
61
|
+
let t = 1, r = 0;
|
|
62
|
+
for (; Math.round(n * t) / t !== n; )
|
|
63
|
+
t *= 10, r++;
|
|
64
|
+
return r;
|
|
65
|
+
}
|
|
66
|
+
function m(n) {
|
|
67
|
+
const t = a(n);
|
|
68
|
+
return {
|
|
69
|
+
precision: t,
|
|
70
|
+
amount: n * 10 ** t
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function v(n, t = 0, r = !1) {
|
|
74
|
+
let e = 0;
|
|
75
|
+
return Number.isNaN(Number(n)) || (r || Number(n) >= 0) && (e = Number(n)), {
|
|
76
|
+
amount: Number((e * 10 ** t).toFixed(0)),
|
|
77
|
+
precision: t
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function f(n) {
|
|
81
|
+
const t = `${n}`, r = t.replace(/0*$/g, "");
|
|
82
|
+
return t.length - r.length;
|
|
83
|
+
}
|
|
84
|
+
function D(n, t) {
|
|
85
|
+
if (!t)
|
|
86
|
+
return n.precision;
|
|
87
|
+
const r = f(t.conversion.amount);
|
|
88
|
+
return n.precision - t.conversion.precision + r;
|
|
89
|
+
}
|
|
90
|
+
function $(n, t = {}) {
|
|
91
|
+
if (n == null)
|
|
92
|
+
throw new Error("Value cannot be null or undefined");
|
|
93
|
+
const { minPrecision: r = 2, maxPrecision: e = 2, locale: i = "en-US" } = t;
|
|
94
|
+
if (r > e)
|
|
95
|
+
throw new Error("minPrecision cannot be greater than maxPrecision");
|
|
96
|
+
let u = 0;
|
|
97
|
+
switch (typeof n) {
|
|
98
|
+
case "number": {
|
|
99
|
+
u = n;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
case "string": {
|
|
103
|
+
u = Number(n);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
case "object": {
|
|
107
|
+
if (n.amount === void 0 || n.precision === void 0)
|
|
108
|
+
throw new Error("Invalid AdjustmentAmount object");
|
|
109
|
+
u = l.toDouble(n);
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
default:
|
|
113
|
+
throw new Error("Invalid value type");
|
|
114
|
+
}
|
|
115
|
+
return u.toLocaleString(i, {
|
|
116
|
+
minimumFractionDigits: r,
|
|
117
|
+
maximumFractionDigits: e
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
export {
|
|
121
|
+
s as a,
|
|
122
|
+
c as b,
|
|
123
|
+
m as c,
|
|
124
|
+
y as d,
|
|
125
|
+
w as e,
|
|
126
|
+
a as f,
|
|
127
|
+
D as g,
|
|
128
|
+
M as h,
|
|
129
|
+
P as i,
|
|
130
|
+
j,
|
|
131
|
+
g as k,
|
|
132
|
+
A as l,
|
|
133
|
+
F as m,
|
|
134
|
+
x as n,
|
|
135
|
+
$ as o,
|
|
136
|
+
v as t,
|
|
137
|
+
N as u
|
|
138
|
+
};
|
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-CEUoMyIk.js";
|
|
2
|
+
import { d as b, b as p } from "./date2-CTHKdfXp.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
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { o as d, u as l } from "./app-
|
|
1
|
+
import { o as d, u as l } from "./app-EoCCjoRh.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) => {
|
|
5
|
-
const
|
|
5
|
+
const c = l(), u = m(), i = $();
|
|
6
6
|
return a.onError(async (e) => {
|
|
7
7
|
e.name === "SvcForbiddenError" && (i == null || i.open({
|
|
8
8
|
title: e.title,
|
|
@@ -11,38 +11,38 @@ const y = d((o, a) => {
|
|
|
11
11
|
}));
|
|
12
12
|
}), {
|
|
13
13
|
async readStockBalance() {
|
|
14
|
-
const e =
|
|
14
|
+
const e = c.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/stock-balance`;
|
|
15
15
|
return await a.get(t);
|
|
16
16
|
},
|
|
17
17
|
async readSkuBalance() {
|
|
18
18
|
var r;
|
|
19
|
-
const e =
|
|
19
|
+
const e = c.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/sku/balance`;
|
|
20
20
|
return (((r = u.currentBusiness.value) == null ? void 0 : r.menuVersion) ?? "") === "v3" ? await a.get(t) : await a.get(`${t}?useInventoryDoc=true`);
|
|
21
21
|
},
|
|
22
22
|
async readSingleAdjustment(e) {
|
|
23
|
-
const t =
|
|
23
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/adjustment`;
|
|
24
24
|
return await a.get(`${n}?adjustmentId=${e}`);
|
|
25
25
|
},
|
|
26
26
|
async readStockAdjustment(e, t, n) {
|
|
27
|
-
const r =
|
|
28
|
-
return await a.get(`${
|
|
27
|
+
const r = c.currentLocationDBName, s = `${o.inventoryBackendUrl}/${r}/sku`;
|
|
28
|
+
return await a.get(`${s}?skuId=${e}&start=${t}&end=${n}`);
|
|
29
29
|
},
|
|
30
30
|
async readAdjustmentById(e) {
|
|
31
|
-
const t =
|
|
31
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/adjustment`;
|
|
32
32
|
return await a.get(`${n}?adjustmentId=${e}`);
|
|
33
33
|
},
|
|
34
34
|
async convertSku(e) {
|
|
35
|
-
var
|
|
36
|
-
const t =
|
|
37
|
-
return (((
|
|
35
|
+
var s;
|
|
36
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/sku/convert`;
|
|
37
|
+
return (((s = u.currentBusiness.value) == null ? void 0 : s.menuVersion) ?? "") === "v3" ? await a.post(n, e) : await a.post(`${n}?useInventoryDoc=true`, e);
|
|
38
38
|
},
|
|
39
39
|
async adjustSku(e) {
|
|
40
|
-
var
|
|
41
|
-
const t =
|
|
42
|
-
return (((
|
|
40
|
+
var s;
|
|
41
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/sku/adjust`;
|
|
42
|
+
return (((s = u.currentBusiness.value) == null ? void 0 : s.menuVersion) ?? "") === "v3" ? await a.post(n, e) : await a.post(`${n}?useInventoryDoc=true`, e);
|
|
43
43
|
},
|
|
44
44
|
async revertWastageAdjustment(e) {
|
|
45
|
-
const t =
|
|
45
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/sku/revert-wastage-adjustment`;
|
|
46
46
|
return await a.post(n, e);
|
|
47
47
|
},
|
|
48
48
|
recalculation: {
|
|
@@ -57,37 +57,38 @@ const y = d((o, a) => {
|
|
|
57
57
|
return a.post(n);
|
|
58
58
|
},
|
|
59
59
|
refreshCurrentBalances() {
|
|
60
|
-
const e =
|
|
60
|
+
const e = c.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/stock/operations/recalculate/refresh-current-balances`;
|
|
61
61
|
return a.post(t);
|
|
62
62
|
},
|
|
63
63
|
scheduleCalculateStockSnapshotAtDate(e, t) {
|
|
64
|
-
const n =
|
|
64
|
+
const n = c.currentLocationDBName, r = `${o.inventoryBackendUrl}/${n}/stock/operations/recalculate/schedule/calculate-at-date?effectiveAt=${encodeURIComponent(e)}&closingDraftId=${encodeURIComponent(t)}`;
|
|
65
65
|
return a.get(r);
|
|
66
66
|
},
|
|
67
67
|
scheduleInvalidateClosingDraftCache(e) {
|
|
68
|
-
const t =
|
|
68
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/stock/operations/recalculate/schedule/invalidate-closing-draft-cache`;
|
|
69
69
|
return a.post(n, { closingDraftIds: e });
|
|
70
70
|
},
|
|
71
71
|
recalculationRequests() {
|
|
72
|
-
const e =
|
|
72
|
+
const e = c.currentLocationDBName, t = `${o.inventoryBackendUrl}/${e}/stock/operations/recalculate/recalculation/requests`;
|
|
73
73
|
return a.get(t);
|
|
74
74
|
},
|
|
75
|
-
scheduleRecalculation(e
|
|
76
|
-
const
|
|
77
|
-
return a.post(
|
|
78
|
-
openingId: e,
|
|
79
|
-
untilDate:
|
|
75
|
+
scheduleRecalculation(e) {
|
|
76
|
+
const t = c.currentLocationDBName, n = `${o.inventoryBackendUrl}/${t}/stock/operations/recalculate/schedule/recalculation`;
|
|
77
|
+
return a.post(n, {
|
|
78
|
+
openingId: e.openingId,
|
|
79
|
+
untilDate: e.untilDate,
|
|
80
|
+
recalculateBySnapshot: e.recalculateBySnapshot
|
|
80
81
|
});
|
|
81
82
|
},
|
|
82
83
|
getAffectedClosingDrafts(e, t) {
|
|
83
|
-
const n =
|
|
84
|
+
const n = c.currentLocationDBName, r = `${o.inventoryBackendUrl}/${n}/closing-draft/recalculation/affected-closing-drafts?openingId=${encodeURIComponent(e)}&untilDate=${encodeURIComponent(t)}`;
|
|
84
85
|
return a.get(r);
|
|
85
86
|
}
|
|
86
87
|
},
|
|
87
88
|
async readUnitCostHistory(e, t, n) {
|
|
88
|
-
const r =
|
|
89
|
+
const r = c.currentLocation.doc._id, s = `${o.inventoryBackendUrl}/api/unit-cost-history`;
|
|
89
90
|
return await a.get(
|
|
90
|
-
`${
|
|
91
|
+
`${s}?locationId=${r}&skuId=${e}&startDate=${t}&endDate=${n}`
|
|
91
92
|
);
|
|
92
93
|
}
|
|
93
94
|
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { u as i } from "./stock-DYWJ4DZW.js";
|
|
2
|
+
import { a as s, M as p } from "./app-EoCCjoRh.js";
|
|
3
|
+
import { ref as k, computed as B } from "vue";
|
|
4
|
+
import { c as d } from "./number-CEUoMyIk.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: {
|