@feedmepos/mf-inventory-portal 1.1.9-dev.1 → 1.1.9
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-BfIpFPGU.js → App-D1UJ8NY1.js} +1 -1
- package/dist/{ApprovalView-Do1yyzE6.js → ApprovalView-Cf6tfPo1.js} +22 -22
- package/dist/{BindingsDialog-ubaL5OwF.js → BindingsDialog-C4XnyllW.js} +2 -2
- package/dist/{BindingsPicker-BYchmbg-.js → BindingsPicker-BW4-JT2R.js} +1 -1
- package/dist/{BindingsTable-ICktlHep.js → BindingsTable-DtDFatll.js} +1 -1
- package/dist/{ClosingDraftView-DwbYmvym.js → ClosingDraftView-TtsNry0r.js} +2 -2
- package/dist/{ClosingTemplateView-uQSTyQiB.js → ClosingTemplateView-NbwT6bOk.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-mIAgCIr3.js → DeliveryOrderPrintPreview-ujSpOCKj.js} +8 -8
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DDLdXyp6.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-AGOtUG41.js} +12 -12
- package/dist/{FmMultiselectDialog-zemj5Lmo.js → FmMultiselectDialog-c2e1Pisp.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-D9saKOiN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BNxA-pQp.js} +25 -25
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BozsxAU4.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-HkmovqY5.js} +1 -1
- package/dist/{IngredientGroupView-COhf_EZ5.js → IngredientGroupView-CnSZ_jFk.js} +2 -2
- package/dist/{IngredientsView-8VBajGKt.js → IngredientsView-DjWSaEi8.js} +4 -4
- package/dist/{IntegrationView-Cs-WRZFa.js → IntegrationView-CJJKfJDQ.js} +83 -83
- package/dist/{InventoryBindingForm-BagZK7OF.js → InventoryBindingForm-DhnOLZJo.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DG7_OLWa.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CgLA6KH7.js} +3 -3
- package/dist/{InventoryBindingSummary-pPCMIHWZ.js → InventoryBindingSummary-_DhLtjfm.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D2xliATx.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BzlWBYz0.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BvDgdLC4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DRlFOUlD.js} +7 -7
- package/dist/{PublishView-BpSIH0g0.js → PublishView-DjA8RTiy.js} +4 -4
- package/dist/{PurchaseOrderPrintPreview-CHFo2OWK.js → PurchaseOrderPrintPreview-Bzdm9Vd-.js} +7 -7
- package/dist/{ReceiveRequestView-DmhXAzCY.js → ReceiveRequestView-CJ7oiJBQ.js} +60 -60
- package/dist/{RecipeView-D_o1ilxq.js → RecipeView--lcBWmZ3.js} +3 -3
- package/dist/StockView-BGNukBaV.js +1856 -0
- package/dist/{SupplierView-DfMlG0Kb.js → SupplierView-BN1P0pgR.js} +3 -3
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CUbqoBpx.js → TransferDetails.vue_vue_type_script_setup_true_lang-CiK1nGyN.js} +5 -5
- package/dist/{TransferTemplateView-M90fc49b.js → TransferTemplateView-P25c3cZ-.js} +64 -64
- package/dist/{UnitView-DoBEmSwl.js → UnitView-Umy1Vy0Y.js} +3 -3
- package/dist/{WarehouseView-BsogK81-.js → WarehouseView-DNDIdR4i.js} +1 -1
- package/dist/api/stock.d.ts +0 -2
- package/dist/{app-CwtJJj6R.js → app-CgzMLhAo.js} +20966 -20819
- package/dist/app.d.ts +328 -71
- package/dist/app.js +1 -1
- package/dist/{decimal-Chx0lsE-.js → decimal-D_3mwNtr.js} +1 -1
- package/dist/{format-unit-display-CIdi-ibN.js → format-unit-display-Bu29MSxm.js} +17 -17
- package/dist/{index-DrX61Ix1.js → index-BE8jrI3O.js} +1 -1
- package/dist/{index-m57qt8LD.js → index-D-fVJxc8.js} +1 -1
- package/dist/{stock-DRK5DdRY.js → stock-JVbFNtIv.js} +27 -35
- package/dist/{supplier-Dyvr7-wz.js → supplier-nx8WElIW.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-g2uXpJK9.js → use-ingredient-select-dialog-CX9_4vk_.js} +1 -1
- package/dist/{use-inventory-binding-dialog-CnXislSE.js → use-inventory-binding-dialog-BfVLQDzr.js} +1 -1
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +2 -6
- package/package.json +2 -2
- package/dist/StockView-BFRupdag.js +0 -2080
- package/dist/views/stock/components/dialog/AmendAdjustmentForm.vue.d.ts +0 -94
- package/dist/views/stock/components/dialog/AmendAdjustmentFormProps.d.ts +0 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a3 as Ae, a as q, T as Ie,
|
|
1
|
+
import { a3 as Ae, a as q, T as Ie, ah as M, s as De, ai as he, v as ve, u as Z, j as B, w as Oe, aM as ce, x as ge, b as te, t as G, Y as J, aL as Fe, aD as Pe, a0 as Ue, y as Me, z as Be, aj as Le, e as me, f as re, R as ue, a2 as Qe, af as He, D as j, i as I, h as Ve } from "./app-CgzMLhAo.js";
|
|
2
2
|
import { useCoreStore as ne, useI18n as oe } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialogChild as qe, useSnackbar as be, useDialog as je, FmButtonVariant as z, components as X } from "@feedmepos/ui-library";
|
|
4
4
|
import { defineStore as xe } from "pinia";
|
|
5
|
-
import { defineComponent as ae, resolveComponent as Q, openBlock as _, createElementBlock as k, createElementVNode as C, normalizeClass as H, createTextVNode as ze, toDisplayString as D, unref as A, createCommentVNode as V, createVNode as P, withCtx as ee, Fragment as L, renderList as K, ref as
|
|
5
|
+
import { defineComponent as ae, resolveComponent as Q, openBlock as _, createElementBlock as k, createElementVNode as C, normalizeClass as H, createTextVNode as ze, toDisplayString as D, unref as A, createCommentVNode as V, createVNode as P, withCtx as ee, Fragment as L, renderList as K, ref as R, onMounted as Ye, computed as de, watch as Ke, createSlots as We, createBlock as Y, h as W } from "vue";
|
|
6
6
|
import { useRouter as Ge } from "vue-router";
|
|
7
|
-
import { u as se } from "./supplier-
|
|
7
|
+
import { u as se } from "./supplier-nx8WElIW.js";
|
|
8
8
|
const Te = Ae((e, t) => {
|
|
9
9
|
function s() {
|
|
10
10
|
var o;
|
|
@@ -43,7 +43,7 @@ function Se(e) {
|
|
|
43
43
|
const i = e.measurement;
|
|
44
44
|
return i ? !t.unitById[l.unit._id].measurements.find((c) => c.id === i.id) : !1;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
46
|
+
var N = /* @__PURE__ */ ((e) => (e.PURCHASE = "PURCHASE", e.TRANSFER = "TRANSFER", e))(N || {}), ie = /* @__PURE__ */ ((e) => (e.Source = "Source", e.Destination = "Destination", e.Ingredient = "Ingredient", e))(ie || {});
|
|
47
47
|
const pe = Ie(0);
|
|
48
48
|
function _e(e) {
|
|
49
49
|
var l;
|
|
@@ -107,7 +107,7 @@ function Ze(e) {
|
|
|
107
107
|
["Menu version", s == null ? void 0 : s.menuVersion],
|
|
108
108
|
[
|
|
109
109
|
"Purchase/Transfer",
|
|
110
|
-
typeof a.purchaseOrder.supplier.internal == "string" ?
|
|
110
|
+
typeof a.purchaseOrder.supplier.internal == "string" ? N.TRANSFER : N.PURCHASE
|
|
111
111
|
],
|
|
112
112
|
[
|
|
113
113
|
"Transfer from",
|
|
@@ -260,7 +260,7 @@ function Xe(e, t) {
|
|
|
260
260
|
const h = m[1], d = m[2];
|
|
261
261
|
let u;
|
|
262
262
|
if (d.startsWith("supplier"))
|
|
263
|
-
u = c[d], t !==
|
|
263
|
+
u = c[d], t !== N.PURCHASE && s.push(`Expected transfer type Purchase but found ${t} instead.`);
|
|
264
264
|
else {
|
|
265
265
|
const v = o[d];
|
|
266
266
|
if (!v)
|
|
@@ -331,7 +331,7 @@ function tt(e) {
|
|
|
331
331
|
return {
|
|
332
332
|
id: `${s[1] ?? ""}`.trim(),
|
|
333
333
|
name: `${l[1] ?? ""}`.trim(),
|
|
334
|
-
type: `${c[1] ?? ""}`.trim().toLocaleLowerCase() === "transfer" ?
|
|
334
|
+
type: `${c[1] ?? ""}`.trim().toLocaleLowerCase() === "transfer" ? N.TRANSFER : N.PURCHASE,
|
|
335
335
|
transferFrom: `${a[1] ?? ""}`.trim(),
|
|
336
336
|
locations: m.slice(1).map((u) => `${u}`.trim()).filter((u) => u),
|
|
337
337
|
reference: `${h[1] ?? ""}`.trim(),
|
|
@@ -648,7 +648,7 @@ const it = { class: "flex items-center gap-12 pl-8" }, lt = { class: "flex flex-
|
|
|
648
648
|
}, Tt = { class: "fm-typo-en-body-lg-600" }, St = /* @__PURE__ */ ae({
|
|
649
649
|
__name: "TransferTemplateImport",
|
|
650
650
|
setup(e) {
|
|
651
|
-
const t =
|
|
651
|
+
const t = R(null), s = qe(), l = be(), i = R(!1), o = R(!1), f = se();
|
|
652
652
|
Ye(async () => {
|
|
653
653
|
o.value = !0;
|
|
654
654
|
try {
|
|
@@ -663,7 +663,7 @@ const it = { class: "flex items-center gap-12 pl-8" }, lt = { class: "flex flex-
|
|
|
663
663
|
o.value = !1;
|
|
664
664
|
}
|
|
665
665
|
});
|
|
666
|
-
const c =
|
|
666
|
+
const c = R(new Array()), a = R([]), m = R([]), h = de(
|
|
667
667
|
() => !!c.value.length || a.value.some((b) => b.errors.length) || m.value.some((b) => b.errors.length)
|
|
668
668
|
), d = de(
|
|
669
669
|
() => !!a.value.length || !!m.value.length
|
|
@@ -800,7 +800,7 @@ const it = { class: "flex items-center gap-12 pl-8" }, lt = { class: "flex flex-
|
|
|
800
800
|
(_(!0), k(L, null, K(a.value, (p, n) => (_(), Y(fe, {
|
|
801
801
|
key: n,
|
|
802
802
|
name: p.template.name,
|
|
803
|
-
"transfer-type": typeof p.template.purchaseOrder.supplier.internal == "string" ? A(
|
|
803
|
+
"transfer-type": typeof p.template.purchaseOrder.supplier.internal == "string" ? A(N).TRANSFER : A(N).PURCHASE,
|
|
804
804
|
locations: p.template.locations,
|
|
805
805
|
items: p.template.purchaseOrder.items,
|
|
806
806
|
errors: p.errors,
|
|
@@ -809,7 +809,7 @@ const it = { class: "flex items-center gap-12 pl-8" }, lt = { class: "flex flex-
|
|
|
809
809
|
(_(!0), k(L, null, K(m.value, (p) => (_(), Y(fe, {
|
|
810
810
|
key: p.template._id,
|
|
811
811
|
name: p.template.name,
|
|
812
|
-
"transfer-type": typeof p.template.purchaseOrder.supplier.internal == "string" ? A(
|
|
812
|
+
"transfer-type": typeof p.template.purchaseOrder.supplier.internal == "string" ? A(N).TRANSFER : A(N).PURCHASE,
|
|
813
813
|
locations: p.template.locations,
|
|
814
814
|
items: p.template.purchaseOrder.items,
|
|
815
815
|
errors: p.errors,
|
|
@@ -833,7 +833,7 @@ function _t(e) {
|
|
|
833
833
|
return l && l == i;
|
|
834
834
|
}
|
|
835
835
|
const $t = xe("transferTemplateActions", () => {
|
|
836
|
-
const e = je(), t = be(), s = Z(), l = Ce(), i = Le(), o = Te(), f = te(), c = Ge(), { t: a } = oe(), m =
|
|
836
|
+
const e = je(), t = be(), s = Z(), l = Ce(), i = Le(), o = Te(), f = te(), c = Ge(), { t: a } = oe(), m = R({});
|
|
837
837
|
function h() {
|
|
838
838
|
m.value = {
|
|
839
839
|
mode: me.CREATE,
|
|
@@ -949,7 +949,7 @@ const $t = xe("transferTemplateActions", () => {
|
|
|
949
949
|
}
|
|
950
950
|
});
|
|
951
951
|
}
|
|
952
|
-
const b =
|
|
952
|
+
const b = R({});
|
|
953
953
|
function r(n) {
|
|
954
954
|
b.value = {
|
|
955
955
|
template: n,
|
|
@@ -989,12 +989,12 @@ const $t = xe("transferTemplateActions", () => {
|
|
|
989
989
|
const O = !g.purchaseOrder.items.length || g.purchaseOrder.items.some(Se), F = !_t(g.purchaseOrder.supplier), U = g.purchaseOrder.supplier.internal ? f.getNetSuiteLocation(
|
|
990
990
|
`${g.purchaseOrder.supplier.internal}_${g.purchaseOrder.supplier._id}`
|
|
991
991
|
) : f.getNetSuiteVendor(g.purchaseOrder.supplier._id), ke = F ? `The subsidiary of the request
|
|
992
|
-
location is ${(le = f.getLocationSubsidiary(U == null ? void 0 : U.netSuiteId)) == null ? void 0 : le.fullName}.` : void 0, Ee = O || F,
|
|
992
|
+
location is ${(le = f.getLocationSubsidiary(U == null ? void 0 : U.netSuiteId)) == null ? void 0 : le.fullName}.` : void 0, Ee = O || F, Re = O ? "This template is invalid. Update this template." : F ? ke : void 0, Ne = `${g.purchaseOrder.supplier.internal ? "Transfer" : "Purchase"} from ${g.purchaseOrder.supplier.name}`;
|
|
993
993
|
return {
|
|
994
994
|
label: g.name,
|
|
995
995
|
value: g._id,
|
|
996
996
|
disabled: Ee,
|
|
997
|
-
sublabel:
|
|
997
|
+
sublabel: Re ?? Ne
|
|
998
998
|
};
|
|
999
999
|
});
|
|
1000
1000
|
return E.sort((g, O) => +!!g.disabled - +!!O.disabled), e.open({
|
|
@@ -1129,7 +1129,7 @@ function ye(e) {
|
|
|
1129
1129
|
const Ce = xe(
|
|
1130
1130
|
"transferTemplateTable",
|
|
1131
1131
|
function() {
|
|
1132
|
-
const { t } = oe(), s = $t(), l =
|
|
1132
|
+
const { t } = oe(), s = $t(), l = R(!1), i = R(new Array()), o = Te(), f = q();
|
|
1133
1133
|
async function c() {
|
|
1134
1134
|
i.value = [], l.value = !0;
|
|
1135
1135
|
try {
|
|
@@ -1280,7 +1280,7 @@ function Dt(e, t, s) {
|
|
|
1280
1280
|
return `${B(e, !1)} ${l}`;
|
|
1281
1281
|
}
|
|
1282
1282
|
export {
|
|
1283
|
-
|
|
1283
|
+
N as P,
|
|
1284
1284
|
Te as a,
|
|
1285
1285
|
$t as b,
|
|
1286
1286
|
Dt as f,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b0 as x, b7 as V, b8 as q, b9 as Re, ba as cl, bb as sr, bc as Lt, bd as fl, be as $l } from "./app-
|
|
1
|
+
import { b0 as x, b7 as V, b8 as q, b9 as Re, ba as cl, bb as sr, bc as Lt, bd as fl, be as $l } from "./app-CgzMLhAo.js";
|
|
2
2
|
function vl(t, e) {
|
|
3
3
|
for (var r = 0; r < e.length; r++) {
|
|
4
4
|
const n = e[r];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as b, computed as u } from "vue";
|
|
2
|
-
import { u as d, b1 as p,
|
|
2
|
+
import { u as d, b1 as p, aT as v, c as m, b as h } from "./app-CgzMLhAo.js";
|
|
3
3
|
import { useSnackbar as E } from "@feedmepos/ui-library";
|
|
4
4
|
function I() {
|
|
5
5
|
return {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a3 as m, u as k, a as l,
|
|
1
|
+
import { a3 as m, u as k, a as l, at as B, T as p } from "./app-CgzMLhAo.js";
|
|
2
2
|
import { useCoreStore as v } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as $ } from "@feedmepos/ui-library";
|
|
4
|
-
import { ref as y, computed as
|
|
5
|
-
const g = m((
|
|
6
|
-
const
|
|
4
|
+
import { ref as y, computed as S } from "vue";
|
|
5
|
+
const g = m((c, a) => {
|
|
6
|
+
const r = k(), o = v(), u = $();
|
|
7
7
|
return a.onError(async (t) => {
|
|
8
8
|
t.name === "SvcForbiddenError" && (u == null || u.open({
|
|
9
9
|
title: t.title,
|
|
@@ -12,67 +12,59 @@ const g = m((s, a) => {
|
|
|
12
12
|
}));
|
|
13
13
|
}), {
|
|
14
14
|
async readStockBalance() {
|
|
15
|
-
const t =
|
|
15
|
+
const t = r.currentLocationDBName, e = `${c.inventoryBackendUrl}/${t}/stock-balance`;
|
|
16
16
|
return await a.get(e);
|
|
17
17
|
},
|
|
18
18
|
async readSkuBalance() {
|
|
19
|
-
var
|
|
20
|
-
const t =
|
|
21
|
-
return (((
|
|
19
|
+
var s;
|
|
20
|
+
const t = r.currentLocationDBName, e = `${c.inventoryBackendUrl}/${t}/sku/balance`;
|
|
21
|
+
return (((s = o.currentBusiness.value) == null ? void 0 : s.menuVersion) ?? "") === "v3" ? await a.get(e) : await a.get(`${e}?useInventoryDoc=true`);
|
|
22
22
|
},
|
|
23
23
|
async readSingleAdjustment(t) {
|
|
24
|
-
const e =
|
|
24
|
+
const e = r.currentLocationDBName, n = `${c.inventoryBackendUrl}/${e}/adjustment`;
|
|
25
25
|
return await a.get(`${n}?adjustmentId=${t}`);
|
|
26
26
|
},
|
|
27
27
|
async readStockAdjustment(t, e, n) {
|
|
28
|
-
const
|
|
28
|
+
const s = r.currentLocationDBName, i = `${c.inventoryBackendUrl}/${s}/sku`;
|
|
29
29
|
return await a.get(`${i}?skuId=${t}&start=${e}&end=${n}`);
|
|
30
30
|
},
|
|
31
31
|
async readAdjustmentById(t) {
|
|
32
|
-
const e =
|
|
32
|
+
const e = r.currentLocationDBName, n = `${c.inventoryBackendUrl}/${e}/adjustment`;
|
|
33
33
|
return await a.get(`${n}?adjustmentId=${t}`);
|
|
34
34
|
},
|
|
35
35
|
async convertSku(t) {
|
|
36
36
|
var i;
|
|
37
|
-
const e =
|
|
37
|
+
const e = r.currentLocationDBName, n = `${c.inventoryBackendUrl}/${e}/sku/convert`;
|
|
38
38
|
return (((i = o.currentBusiness.value) == null ? void 0 : i.menuVersion) ?? "") === "v3" ? await a.post(n, t) : await a.post(`${n}?useInventoryDoc=true`, t);
|
|
39
39
|
},
|
|
40
40
|
async adjustSku(t) {
|
|
41
41
|
var i;
|
|
42
|
-
const e =
|
|
42
|
+
const e = r.currentLocationDBName, n = `${c.inventoryBackendUrl}/${e}/sku/adjust`;
|
|
43
43
|
return (((i = o.currentBusiness.value) == null ? void 0 : i.menuVersion) ?? "") === "v3" ? await a.post(n, t) : await a.post(`${n}?useInventoryDoc=true`, t);
|
|
44
44
|
},
|
|
45
|
-
async revertWastageAdjustment(t) {
|
|
46
|
-
const e = c.currentLocationDBName, n = `${s.inventoryBackendUrl}/${e}/sku/revert-wastage-adjustment`;
|
|
47
|
-
return await a.post(n, t);
|
|
48
|
-
},
|
|
49
45
|
recalculation: {
|
|
50
46
|
getRecalculateAbility() {
|
|
51
|
-
var
|
|
52
|
-
const e = `business_${(
|
|
47
|
+
var s;
|
|
48
|
+
const e = `business_${(s = o.currentBusiness.value) == null ? void 0 : s._id}`, n = `${c.inventoryBackendUrl}/${e}/stock/operations/recalculate`;
|
|
53
49
|
return a.get(n);
|
|
54
50
|
},
|
|
55
51
|
startRecalculateTask() {
|
|
56
|
-
var
|
|
57
|
-
const e = `business_${(
|
|
52
|
+
var s;
|
|
53
|
+
const e = `business_${(s = o.currentBusiness.value) == null ? void 0 : s._id}`, n = `${c.inventoryBackendUrl}/${e}/stock/operations/recalculate?refundFromPreviousAdjustment=true`;
|
|
58
54
|
return a.post(n);
|
|
59
55
|
},
|
|
60
|
-
refreshCurrentBalances() {
|
|
61
|
-
const t = c.currentLocationDBName, e = `${s.inventoryBackendUrl}/${t}/stock/operations/recalculate/refresh-current-balances`;
|
|
62
|
-
return a.post(e);
|
|
63
|
-
},
|
|
64
56
|
calculateStockSnapshotAtDate(t, e) {
|
|
65
|
-
const n =
|
|
66
|
-
return a.get(
|
|
57
|
+
const n = r.currentLocationDBName, s = `${c.inventoryBackendUrl}/${n}/stock/operations/recalculate/calculate-at-date?effectiveAt=${encodeURIComponent(t)}&closingDraftId=${encodeURIComponent(e)}`;
|
|
58
|
+
return a.get(s);
|
|
67
59
|
},
|
|
68
60
|
scheduleCalculateStockSnapshotAtDate(t, e) {
|
|
69
|
-
const n =
|
|
70
|
-
return a.get(
|
|
61
|
+
const n = r.currentLocationDBName, s = `${c.inventoryBackendUrl}/${n}/stock/operations/recalculate/schedule/calculate-at-date?effectiveAt=${encodeURIComponent(t)}&closingDraftId=${encodeURIComponent(e)}`;
|
|
62
|
+
return a.get(s);
|
|
71
63
|
}
|
|
72
64
|
}
|
|
73
65
|
};
|
|
74
66
|
});
|
|
75
|
-
function
|
|
67
|
+
function b() {
|
|
76
68
|
return {
|
|
77
69
|
stockBalance: {
|
|
78
70
|
_id: "",
|
|
@@ -86,15 +78,15 @@ const f = p(0), N = {
|
|
|
86
78
|
balance: f,
|
|
87
79
|
closing: null,
|
|
88
80
|
costs: null
|
|
89
|
-
}, d = y(
|
|
90
|
-
const
|
|
81
|
+
}, d = y(b()), A = () => {
|
|
82
|
+
const c = l(), a = S(() => {
|
|
91
83
|
var t;
|
|
92
84
|
const o = (t = d.value.stockBalance.skus) == null ? void 0 : t.groupBy((e) => e.id), u = (e) => {
|
|
93
85
|
var n;
|
|
94
86
|
return ((n = o == null ? void 0 : o.get(e)) == null ? void 0 : n[0]) ?? { ...N, id: e };
|
|
95
87
|
};
|
|
96
|
-
return
|
|
97
|
-
}),
|
|
88
|
+
return c.skus.map((e) => u(e._id));
|
|
89
|
+
}), r = g();
|
|
98
90
|
return {
|
|
99
91
|
// state
|
|
100
92
|
get stockBalance() {
|
|
@@ -114,7 +106,7 @@ const f = p(0), N = {
|
|
|
114
106
|
},
|
|
115
107
|
// actions
|
|
116
108
|
async readStockBalance() {
|
|
117
|
-
this.stockBalance = await
|
|
109
|
+
this.stockBalance = await r.readStockBalance();
|
|
118
110
|
},
|
|
119
111
|
async readProductBalance() {
|
|
120
112
|
this.productBalance = [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a3 as m, u, c as b, w,
|
|
1
|
+
import { a3 as m, u, c as b, w, au as v, av as $ } from "./app-CgzMLhAo.js";
|
|
2
2
|
import { useCoreStore as c } from "@feedmepos/mf-common";
|
|
3
3
|
import { defineStore as A } from "pinia";
|
|
4
4
|
import { ref as l, computed as d } from "vue";
|