@feedmepos/mf-inventory-portal 1.2.43-dev.3 → 1.2.43
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-DkzM4M0_.js → App-DVsAv4k3.js} +3 -3
- package/dist/{ApprovalView-Dd5bg0yE.js → ApprovalView-EHDiLsmL.js} +5 -5
- package/dist/{BindingsDialog-FoyqtujI.js → BindingsDialog-DL2Dgzpf.js} +8 -8
- package/dist/{BindingsPicker-D-DS3PdA.js → BindingsPicker-BpdNqjSm.js} +3 -3
- package/dist/{BindingsTable-viPFJCPm.js → BindingsTable-C6KWR_kl.js} +3 -3
- package/dist/{ClosingDraftView-BlaIq6iS.js → ClosingDraftView-Byx8Zp15.js} +8 -8
- package/dist/{ClosingHistoryView-Byb3JIG8.js → ClosingHistoryView-BpFFNCqD.js} +22 -22
- package/dist/{ClosingTemplateView-Dil7tncI.js → ClosingTemplateView-DqfxzSBi.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-zvfi--WO.js → DeliveryOrderPrintPreview-DvaTq4XO.js} +9 -9
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-_dZiJ1_p.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dadg0d7W.js} +60 -59
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DBSjX9GC.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-yp0tPBLr.js} +2 -2
- package/dist/{FmMultiselectDialog-CEnIfKkK.js → FmMultiselectDialog-M-tcECkK.js} +2 -2
- package/dist/{FmMultiselectDialog-D0HzUEWj.js → FmMultiselectDialog-iXXJJ181.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BG2lia-P.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CzYmgtjx.js} +3 -3
- package/dist/{ImportView-XUXFdNd5.js → ImportView-BGbe571V.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DgutuH9i.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-SkZJQR4H.js} +1 -1
- package/dist/{IngredientGroupView-7UTiTjiy.js → IngredientGroupView-B5AhZqGE.js} +5 -5
- package/dist/{IngredientsView-BkK-S9zb.js → IngredientsView-BkORfSgQ.js} +14 -14
- package/dist/{IntegrationView-BTXcGlp6.js → IntegrationView-DC1u6d1K.js} +12 -12
- package/dist/{InventoryBindingForm-Ch3ltUK8.js → InventoryBindingForm-D4ht1PMO.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dnv5PN-O.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CFWTE_sj.js} +14 -14
- package/dist/{InventoryBindingSummary-BVKjiIfs.js → InventoryBindingSummary-DKYKoLOt.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CbK0JN-7.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D1hfyifk.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-dv4OBeHd.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BfsTUKPQ.js} +2 -2
- package/dist/{PublishView-g_HbS6jK.js → PublishView-CMTQJ7Nv.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-BReNCrqT.js → PurchaseOrderPrintPreview-CzYlYowQ.js} +9 -9
- package/dist/ReceiveRequestView-CMHZZ9ul.js +2841 -0
- package/dist/{RecipeView-CtpQ2a0y.js → RecipeView-CIwSZuEd.js} +8 -8
- package/dist/{StockView-CEbdj6YL.js → StockView-DBY2sHlj.js} +341 -344
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bofw0-xa.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-VY2KygFc.js} +1 -1
- package/dist/{SupplierView-DzmEjA3j.js → SupplierView-CGsqiXR4.js} +11 -11
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-0A8OWe8S.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-BUs4-nO6.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-bxporBJ4.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-plLh-5S3.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-cDwtvgIk.js → TransferDetails.vue_vue_type_script_setup_true_lang-C8DluFT4.js} +306 -306
- package/dist/{TransferTemplateView-ySDW6lRS.js → TransferTemplateView-BEXsC7mp.js} +354 -354
- package/dist/{UnitView-Bv91T6ab.js → UnitView-BGRkT8Hr.js} +6 -6
- package/dist/{WarehouseView-kPmRof7c.js → WarehouseView-D7og7WBg.js} +5 -5
- package/dist/{WastageTemplateView-CZq9b3sy.js → WastageTemplateView-CwEUAwCw.js} +14 -14
- package/dist/{app-CV3h70p4.js → app-CioeggUO.js} +2296 -2343
- package/dist/app.js +7 -7
- package/dist/{closing-template-BBIWBX0k.js → closing-template-DrBlhTbC.js} +1 -1
- package/dist/{date2-CkCGGaAb.js → date2-mucf0HV-.js} +1 -1
- package/dist/{dayjs.min-Dd-afiDx.js → dayjs.min-C5lVIjQ1.js} +21 -21
- package/dist/{decimal-CS-CxyFz.js → decimal-EYAs7CPT.js} +2 -2
- package/dist/{defineDeepModel-D_bZeRgl.js → defineDeepModel-BQ_3cF8o.js} +1 -1
- package/dist/{duplicate-template-DPXszoh-.js → duplicate-template-K_oezMr4.js} +1 -1
- package/dist/feature-BkR98vGd.js +20161 -0
- package/dist/{format-time-from-id-BmBEi-Jw.js → format-time-from-id-qnJY4xQY.js} +1 -1
- package/dist/{format-unit-display-CDKsLgE4.js → format-unit-display-6I_PHQ9C.js} +246 -245
- package/dist/helper/form.d.ts +0 -1
- package/dist/helper/object.d.ts +0 -21
- package/dist/{import-export.helper-BLfWO3Yr.js → import-export.helper-vmA8rXwv.js} +5 -5
- package/dist/{index-DU9SwtH5.js → index-5yza2WJR.js} +1 -1
- package/dist/{index-BRDlwURl.js → index-DXJ9MIiE.js} +9 -9
- package/dist/{index-DAnsA0Mm.js → index-DqMYKP87.js} +3 -3
- package/dist/{lodash-CYR2InSF.js → lodash-D6iOSfR7.js} +1 -1
- package/dist/{netsuite-CPkzurdj.js → netsuite-DKE_ORM0.js} +70 -70
- package/dist/{purchase-order-template-DNQiObjY.js → purchase-order-template-Brpbfw8K.js} +1 -1
- package/dist/{rules-2RvCSF3q.js → rules-fd3m4inF.js} +3 -3
- package/dist/{stock-RjFuloPL.js → stock-8-vRigjE.js} +1 -1
- package/dist/{stock-BWBlXMgT.js → stock-CLX4SKxt.js} +3 -3
- package/dist/{supplier-8UMBjffB.js → supplier-Dlv1Clk5.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-DsrecsJw.js → use-ingredient-select-dialog-2j3Nbou_.js} +2 -2
- package/dist/{use-inventory-binding-dialog-C4bcTum8.js → use-inventory-binding-dialog-_S2XGoVU.js} +2 -2
- package/dist/{use-template-enabled-locations-2-_G7NryCx.js → use-template-enabled-locations-2-CWlQQnyD.js} +2 -2
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -1
- package/dist/views/receive-request/components/netsuite/NetSuitePanel.vue.d.ts +2 -3
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -3
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +3159 -0
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +0 -6
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -3
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +1 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +6 -6
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +7 -7
- package/dist/views/receive-request/constants/purchase-order-transaction-type.d.ts +2 -2
- package/dist/views/receive-request/helper/get-transfer-type.d.ts +2 -1
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -3
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +2 -3
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +3 -4
- package/dist/{vue-i18n-BU7aJfqP.js → vue-i18n-CCrvzsiW.js} +432 -432
- package/dist/{xlsx-JEiDJdww.js → xlsx-oL4emcgf.js} +398 -398
- package/dist/{xlsx.util-Cc50iTml.js → xlsx.util-JOeDOZ3P.js} +1 -1
- package/package.json +2 -2
- package/dist/ReceiveRequestView-ClT4-xel.js +0 -2894
- package/dist/feature-B_VTGztb.js +0 -25699
- package/dist/helper/reactivity.d.ts +0 -11
- package/dist/helper/reactivity.spec.d.ts +0 -1
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +0 -628
- package/dist/views/receive-request/components/transfer-form/composables/use-purchase-order-form-controller.d.ts +0 -22
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as ue, ref as O, computed as P, resolveComponent as U, openBlock as $, createBlock as z, withCtx as T, createElementVNode as e, normalizeClass as _e, toDisplayString as v, createVNode as y, createElementBlock as Y, Fragment as
|
|
1
|
+
import { defineComponent as ue, ref as O, computed as P, resolveComponent as U, openBlock as $, createBlock as z, withCtx as T, createElementVNode as e, normalizeClass as _e, toDisplayString as v, createVNode as y, createElementBlock as Y, Fragment as oe, renderList as ie, unref as a, h as ye, watch as xe, isRef as je, createCommentVNode as te, reactive as nt, mergeModels as qe, useModel as pt, onMounted as Le, createTextVNode as de, normalizeStyle as ot, Teleport as ft, normalizeProps as Te, mergeProps as He } from "vue";
|
|
2
2
|
import { F as ze, u as vt, _ as yt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
3
|
-
import { u as be, c as De, a as Be, F as Xe,
|
|
4
|
-
import { u as Me } from "./stock-
|
|
3
|
+
import { u as be, c as De, a as Be, F as Xe, E as _t, B as ne, t as kt, o as bt, z as gt, s as Q, h as Ee, i as ht, e as xt } from "./app-CioeggUO.js";
|
|
4
|
+
import { u as Me } from "./stock-CLX4SKxt.js";
|
|
5
5
|
import { c as St, _ as Ft, F as Je } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js";
|
|
6
|
-
import { g as Se } from "./decimal-
|
|
7
|
-
import { d as pe } from "./dayjs.min-
|
|
8
|
-
import { e as wt, u as st, i as at, _ as Qe } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as Ne, S as Pe, g as lt, a as $t } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { g as Se } from "./decimal-EYAs7CPT.js";
|
|
7
|
+
import { d as pe } from "./dayjs.min-C5lVIjQ1.js";
|
|
8
|
+
import { e as wt, u as st, i as at, _ as Qe } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BfsTUKPQ.js";
|
|
9
|
+
import { _ as Ne, S as Pe, g as lt, a as $t } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-VY2KygFc.js";
|
|
10
10
|
import { _ as At } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
11
11
|
import { useI18n as ce, useCoreStore as Ge } from "@feedmepos/mf-common";
|
|
12
12
|
import { useSnackbar as ge, useDialog as Ie, useProxiedModel as Ue, useBreakpoints as Vt } from "@feedmepos/ui-library";
|
|
13
13
|
import { defineStore as Ct } from "pinia";
|
|
14
|
-
import { g as Ye, a as ve, f as jt, t as Ae, h as Ve, A as Dt, M as Bt, d as ke, i as Mt, j as Ze, k as rt, l as Ke, R as It, e as we, m as Ut } from "./rules-
|
|
15
|
-
import { u as he } from "./stock-
|
|
16
|
-
import { u as Tt } from "./use-inventory-binding-dialog-
|
|
17
|
-
import { a as it } from "./FmMultiselectDialog-
|
|
18
|
-
import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-
|
|
19
|
-
import { a as Et, b as Pt, f as ut, t as Rt, c as Ot, p as Nt, n as Yt, d as Lt } from "./date2-
|
|
20
|
-
import { i as zt, _ as Gt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
14
|
+
import { g as Ye, a as ve, f as jt, t as Ae, h as Ve, A as Dt, M as Bt, d as ke, i as Mt, j as Ze, k as rt, l as Ke, R as It, e as we, m as Ut } from "./rules-fd3m4inF.js";
|
|
15
|
+
import { u as he } from "./stock-8-vRigjE.js";
|
|
16
|
+
import { u as Tt } from "./use-inventory-binding-dialog-_S2XGoVU.js";
|
|
17
|
+
import { a as it } from "./FmMultiselectDialog-M-tcECkK.js";
|
|
18
|
+
import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D1hfyifk.js";
|
|
19
|
+
import { a as Et, b as Pt, f as ut, t as Rt, c as Ot, p as Nt, n as Yt, d as Lt } from "./date2-mucf0HV-.js";
|
|
20
|
+
import { i as zt, _ as Gt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-yp0tPBLr.js";
|
|
21
21
|
import { E as Kt } from "./empty-placeholder-wf6-BWE8.js";
|
|
22
|
-
import { F as Re, u as Wt } from "./feature-
|
|
23
|
-
import { u as qt } from "./netsuite-
|
|
22
|
+
import { F as Re, u as Wt } from "./feature-BkR98vGd.js";
|
|
23
|
+
import { u as qt } from "./netsuite-DKE_ORM0.js";
|
|
24
24
|
import { N as Xt, H as Jt } from "./app-uBuHtW8m.js";
|
|
25
25
|
var $e = /* @__PURE__ */ ((k) => (k.History = "History", k.Convert = "Convert", k.Adjust = "Adjust", k))($e || {});
|
|
26
26
|
const Qt = [
|
|
@@ -50,7 +50,7 @@ const Qt = [
|
|
|
50
50
|
/* Adjust */
|
|
51
51
|
}
|
|
52
52
|
];
|
|
53
|
-
async function
|
|
53
|
+
async function en(k) {
|
|
54
54
|
const d = `${(be().currentLocation.name || "").replace(
|
|
55
55
|
/ /g,
|
|
56
56
|
"_"
|
|
@@ -71,17 +71,17 @@ async function eo(k) {
|
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
name: "Balance",
|
|
74
|
-
selector: (
|
|
75
|
-
const A = Ce(
|
|
76
|
-
return A.type === "unit" ? Se(
|
|
74
|
+
selector: (o) => {
|
|
75
|
+
const A = Ce(o, o.unit);
|
|
76
|
+
return A.type === "unit" ? Se(o.balance, o.unit, null, !1) : Se(o.balance, o.unit, A.measurement, !1);
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
name: "Unit",
|
|
81
|
-
selector: (
|
|
81
|
+
selector: (o) => {
|
|
82
82
|
var S;
|
|
83
|
-
const A = Ce(
|
|
84
|
-
return A.type === "unit" ?
|
|
83
|
+
const A = Ce(o, o.unit);
|
|
84
|
+
return A.type === "unit" ? o.unit.abbrev : ((S = o.unit.measurements.find((m) => m.id === A.measurement)) == null ? void 0 : S.abbrev) || "";
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
]
|
|
@@ -94,19 +94,19 @@ function Ce(k, g) {
|
|
|
94
94
|
const d = localStorage.getItem(`uom:${k._id}`);
|
|
95
95
|
return d ? d === g._id ? {
|
|
96
96
|
type: "unit"
|
|
97
|
-
} : g.measurements.find((
|
|
97
|
+
} : g.measurements.find((o) => o.id === d) ? {
|
|
98
98
|
type: "measurement",
|
|
99
99
|
measurement: d
|
|
100
100
|
} : {
|
|
101
101
|
type: "unit"
|
|
102
|
-
} : k.trackingMeasurement && g.measurements.find((
|
|
102
|
+
} : k.trackingMeasurement && g.measurements.find((o) => o.id === k.trackingMeasurement) ? {
|
|
103
103
|
type: "measurement",
|
|
104
104
|
measurement: k.trackingMeasurement
|
|
105
105
|
} : {
|
|
106
106
|
type: "unit"
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const tn = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ ue({
|
|
110
110
|
__name: "UnitDisplayControl",
|
|
111
111
|
props: {
|
|
112
112
|
unit: {},
|
|
@@ -119,18 +119,18 @@ const to = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
|
|
|
119
119
|
return `uom:${j._id}`;
|
|
120
120
|
}
|
|
121
121
|
function d(j) {
|
|
122
|
-
const w = g(
|
|
123
|
-
j ? localStorage.setItem(w, j) : localStorage.setItem(w,
|
|
122
|
+
const w = g(o.sku);
|
|
123
|
+
j ? localStorage.setItem(w, j) : localStorage.setItem(w, o.unit._id), A.value = Ce(o.sku, o.unit);
|
|
124
124
|
}
|
|
125
|
-
const
|
|
126
|
-
const { measurements: j } =
|
|
125
|
+
const o = k, A = O(Ce(o.sku, o.unit)), S = P(() => {
|
|
126
|
+
const { measurements: j } = o.unit;
|
|
127
127
|
return [
|
|
128
128
|
{
|
|
129
|
-
label: `${Se(
|
|
129
|
+
label: `${Se(o.amount, o.unit)}`,
|
|
130
130
|
value: null
|
|
131
131
|
},
|
|
132
132
|
...j.map(({ id: w }) => ({
|
|
133
|
-
label: `${Se(
|
|
133
|
+
label: `${Se(o.amount, o.unit, w)}`,
|
|
134
134
|
value: w
|
|
135
135
|
}))
|
|
136
136
|
];
|
|
@@ -158,7 +158,7 @@ const to = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
|
|
|
158
158
|
F.value ? "border-fm-color-primary" : "border-fm-color-neutral-gray-100"
|
|
159
159
|
])
|
|
160
160
|
}, [
|
|
161
|
-
e("div",
|
|
161
|
+
e("div", tn, v(i.value), 1),
|
|
162
162
|
y(u, {
|
|
163
163
|
class: "text-fm-color-neutral-gray-400",
|
|
164
164
|
name: "expand_more"
|
|
@@ -166,7 +166,7 @@ const to = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
|
|
|
166
166
|
], 2)
|
|
167
167
|
]),
|
|
168
168
|
default: T(() => [
|
|
169
|
-
($(!0), Y(
|
|
169
|
+
($(!0), Y(oe, null, ie(S.value, (B) => ($(), z(b, {
|
|
170
170
|
key: B.value ?? 0,
|
|
171
171
|
label: B.label,
|
|
172
172
|
"model-value": m(B),
|
|
@@ -177,24 +177,24 @@ const to = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
|
|
|
177
177
|
});
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
-
}),
|
|
180
|
+
}), nn = { class: "whitespace-nowrap" }, on = /* @__PURE__ */ ue({
|
|
181
181
|
__name: "StockHeaderPreview",
|
|
182
182
|
setup(k) {
|
|
183
183
|
const { t: g } = ce();
|
|
184
|
-
return (d,
|
|
184
|
+
return (d, o) => ($(), z(At, null, {
|
|
185
185
|
default: T(() => [
|
|
186
|
-
e("div",
|
|
186
|
+
e("div", nn, v(a(g)("inventory.stock.prediction.daysRemaining")), 1)
|
|
187
187
|
]),
|
|
188
188
|
_: 1
|
|
189
189
|
}));
|
|
190
190
|
}
|
|
191
191
|
}), dt = Ct("stockActions", () => {
|
|
192
|
-
const k = O(!1), g = be(), d = Me(),
|
|
192
|
+
const k = O(!1), g = be(), d = Me(), o = st(), A = ge(), S = Ie(), { t: m } = ce();
|
|
193
193
|
async function i() {
|
|
194
194
|
if (g._currentLocation) {
|
|
195
195
|
k.value = !0;
|
|
196
196
|
try {
|
|
197
|
-
await d.readStockBalance(), await d.readProductBalance(), await
|
|
197
|
+
await d.readStockBalance(), await d.readProductBalance(), await o.readStockEstimateBalance();
|
|
198
198
|
} catch {
|
|
199
199
|
A.open({
|
|
200
200
|
title: m("inventory.stock.error.title"),
|
|
@@ -277,26 +277,26 @@ const to = { class: "fm-typo-en-body-md-400 flex-grow" }, ct = /* @__PURE__ */ u
|
|
|
277
277
|
adjustSkuDialogProps: w
|
|
278
278
|
};
|
|
279
279
|
});
|
|
280
|
-
function
|
|
280
|
+
function sn() {
|
|
281
281
|
var S;
|
|
282
|
-
const k = be(), g = dt(), d = Ge(), { t:
|
|
282
|
+
const k = be(), g = dt(), d = Ge(), { t: o } = ce();
|
|
283
283
|
return {
|
|
284
284
|
columnDefs: [
|
|
285
285
|
{
|
|
286
286
|
accessorKey: "code",
|
|
287
|
-
header: () =>
|
|
287
|
+
header: () => o("inventory.stock.code"),
|
|
288
288
|
enableSorting: !0,
|
|
289
289
|
size: 300
|
|
290
290
|
},
|
|
291
291
|
{
|
|
292
292
|
accessorKey: "name",
|
|
293
|
-
header: () =>
|
|
293
|
+
header: () => o("inventory.stock.product"),
|
|
294
294
|
enableSorting: !0,
|
|
295
295
|
size: "auto"
|
|
296
296
|
},
|
|
297
297
|
{
|
|
298
298
|
id: "UOM",
|
|
299
|
-
header: () =>
|
|
299
|
+
header: () => o("inventory.stock.balance"),
|
|
300
300
|
cell(m) {
|
|
301
301
|
const i = m.row.original, F = {
|
|
302
302
|
unit: i.unit,
|
|
@@ -311,7 +311,7 @@ function so() {
|
|
|
311
311
|
...(S = d.sessionUser.value) != null && S.role.isAdmin ? [
|
|
312
312
|
{
|
|
313
313
|
accessorKey: "isInactive",
|
|
314
|
-
header: () => ye(ze, {}, () => `${
|
|
314
|
+
header: () => ye(ze, {}, () => `${o("inventory.ingredient.status.title")}`),
|
|
315
315
|
cell(m) {
|
|
316
316
|
const i = m.row.original.isInactive;
|
|
317
317
|
return ye(
|
|
@@ -322,7 +322,7 @@ function so() {
|
|
|
322
322
|
i ? "bg-red-100 text-red-700" : "bg-green-100 text-green-700"
|
|
323
323
|
].join(" ")
|
|
324
324
|
},
|
|
325
|
-
|
|
325
|
+
o(i ? "inventory.ingredient.status.inactive" : "inventory.ingredient.status.active")
|
|
326
326
|
);
|
|
327
327
|
},
|
|
328
328
|
enableSorting: !0
|
|
@@ -331,7 +331,7 @@ function so() {
|
|
|
331
331
|
{
|
|
332
332
|
accessorKey: "day",
|
|
333
333
|
id: "expireDate",
|
|
334
|
-
header: () => ye(
|
|
334
|
+
header: () => ye(on),
|
|
335
335
|
enableSorting: !0,
|
|
336
336
|
sortUndefined: "last",
|
|
337
337
|
cell(m) {
|
|
@@ -368,7 +368,7 @@ function so() {
|
|
|
368
368
|
]
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
|
-
const
|
|
371
|
+
const an = {
|
|
372
372
|
context: null,
|
|
373
373
|
error: null,
|
|
374
374
|
isRequired(k = "This field is required") {
|
|
@@ -403,9 +403,9 @@ const ao = {
|
|
|
403
403
|
}
|
|
404
404
|
};
|
|
405
405
|
function et(k) {
|
|
406
|
-
return { ...
|
|
406
|
+
return { ...an, context: k };
|
|
407
407
|
}
|
|
408
|
-
const
|
|
408
|
+
const ln = { class: "flex items-center" }, rn = { class: "fm-typo-en-title-md-800" }, un = { class: "flex flex-col gap-24 w-full" }, cn = { class: "flex flex-col gap-8" }, dn = { class: "fm-typo-en-body-lg-600" }, mn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary flex-grow" }, pn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-error" }, fn = { class: "flex flex-col p-16 gap-8" }, vn = { class: "flex flex-col gap-4" }, yn = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 border-b py-12 px-16" }, _n = { class: "grid grid-cols-[auto_100px_100px_48px] xs:grid-cols-[auto_80px_120px_48px] gap-8 px-8 items-center" }, kn = { class: "xs:col-span-3" }, bn = { class: "flex gap-8" }, gn = /* @__PURE__ */ ue({
|
|
409
409
|
__name: "ConvertSkuDialog",
|
|
410
410
|
props: {
|
|
411
411
|
sku: {},
|
|
@@ -414,10 +414,10 @@ const lo = { class: "flex items-center" }, ro = { class: "fm-typo-en-title-md-80
|
|
|
414
414
|
},
|
|
415
415
|
emits: ["update:show", "submitted"],
|
|
416
416
|
setup(k, { expose: g, emit: d }) {
|
|
417
|
-
const
|
|
417
|
+
const o = k, A = d, S = Tt(), m = Be(), i = he(), F = ge(), { t: j } = ce(), w = O(0), u = O(null), b = P(() => m.skus), C = P(
|
|
418
418
|
() => {
|
|
419
|
-
var p,
|
|
420
|
-
return (((
|
|
419
|
+
var p, n;
|
|
420
|
+
return (((n = (p = o.sku) == null ? void 0 : p.convert) == null ? void 0 : n.inventoryBindings) ?? []).filter(
|
|
421
421
|
(r) => r.type === Xe.enum.SKU
|
|
422
422
|
);
|
|
423
423
|
}
|
|
@@ -426,51 +426,51 @@ const lo = { class: "flex items-center" }, ro = { class: "fm-typo-en-title-md-80
|
|
|
426
426
|
return !!u.value;
|
|
427
427
|
},
|
|
428
428
|
set(p) {
|
|
429
|
-
p ? u.value = De(C.value) : (u.value = null, w.value = Math.min(w.value,
|
|
429
|
+
p ? u.value = De(C.value) : (u.value = null, w.value = Math.min(w.value, o.maxCount ?? 0));
|
|
430
430
|
}
|
|
431
431
|
}), D = O(!1);
|
|
432
|
-
xe([() =>
|
|
432
|
+
xe([() => o.show], ([p]) => {
|
|
433
433
|
p && (w.value = 0);
|
|
434
434
|
});
|
|
435
435
|
function s() {
|
|
436
|
-
N(
|
|
436
|
+
N(o.sku, Ae(w.value), u.value);
|
|
437
437
|
}
|
|
438
438
|
function t(p) {
|
|
439
439
|
if (u.value)
|
|
440
440
|
return !0;
|
|
441
|
-
const
|
|
442
|
-
return
|
|
441
|
+
const n = et(p).isInteger().max(o.maxCount ?? 0).error ?? "";
|
|
442
|
+
return n || !0;
|
|
443
443
|
}
|
|
444
444
|
function l(p) {
|
|
445
445
|
var f;
|
|
446
|
-
const
|
|
446
|
+
const n = (f = o.sku.convert) != null && f.measurement ? o.sku.unit.measurements.find((M) => {
|
|
447
447
|
var I;
|
|
448
|
-
return M.id === ((I =
|
|
449
|
-
}) ?? null : null, r = Ye(
|
|
448
|
+
return M.id === ((I = o.sku.convert) == null ? void 0 : I.measurement);
|
|
449
|
+
}) ?? null : null, r = Ye(o.sku.unit, n), h = Mt(+p);
|
|
450
450
|
return et(h).isInteger().max(r).error ? "Precision cannot be more than " + r : !0;
|
|
451
451
|
}
|
|
452
452
|
const x = P(
|
|
453
453
|
() => {
|
|
454
|
-
var p,
|
|
455
|
-
return (p =
|
|
454
|
+
var p, n;
|
|
455
|
+
return (p = o.sku.convert) != null && p.measurement ? (n = o.sku.unit.measurements.find((r) => {
|
|
456
456
|
var h;
|
|
457
|
-
return r.id === ((h =
|
|
458
|
-
})) == null ? void 0 :
|
|
457
|
+
return r.id === ((h = o.sku.convert) == null ? void 0 : h.measurement);
|
|
458
|
+
})) == null ? void 0 : n.abbrev : o.sku.unit.abbrev;
|
|
459
459
|
}
|
|
460
460
|
), _ = P(() => {
|
|
461
461
|
var h, c;
|
|
462
|
-
const
|
|
463
|
-
bindings: ((h =
|
|
462
|
+
const n = _t({
|
|
463
|
+
bindings: ((h = o.sku.convert) == null ? void 0 : h.inventoryBindings) ?? [],
|
|
464
464
|
skus: m.skus,
|
|
465
465
|
skuGroups: m.skuGroups,
|
|
466
466
|
recipes: m.recipes
|
|
467
467
|
}).inventoryBindings.filter((f) => "success" in f && f.success).map((f) => f).map((f) => f.binding);
|
|
468
|
-
return (c = u.value ??
|
|
468
|
+
return (c = u.value ?? n) == null ? void 0 : c.map((f) => {
|
|
469
469
|
var le, re, Z, ae, fe;
|
|
470
|
-
const M = m.skus.find((me) => me._id === f.id), I = ((le = f.measurement) == null ? void 0 : le.abbrev) ?? ((re = M == null ? void 0 : M.unit) == null ? void 0 : re.abbrev), G = (Z =
|
|
470
|
+
const M = m.skus.find((me) => me._id === f.id), I = ((le = f.measurement) == null ? void 0 : le.abbrev) ?? ((re = M == null ? void 0 : M.unit) == null ? void 0 : re.abbrev), G = (Z = o.sku.convert) != null && Z.measurement ? o.sku.unit.measurements.find((me) => {
|
|
471
471
|
var We;
|
|
472
|
-
return me.id === ((We =
|
|
473
|
-
}) ?? null : null, se = Ye(
|
|
472
|
+
return me.id === ((We = o.sku.convert) == null ? void 0 : We.measurement);
|
|
473
|
+
}) ?? null : null, se = Ye(o.sku.unit, G), E = l(`${w.value}`) === !0 ? ve(
|
|
474
474
|
jt(
|
|
475
475
|
f.amount,
|
|
476
476
|
Ae(+w.value, se)
|
|
@@ -486,27 +486,27 @@ const lo = { class: "flex items-center" }, ro = { class: "fm-typo-en-title-md-80
|
|
|
486
486
|
}), V = O();
|
|
487
487
|
g({
|
|
488
488
|
validateInputs: () => {
|
|
489
|
-
var p,
|
|
490
|
-
(
|
|
489
|
+
var p, n;
|
|
490
|
+
(n = (p = V.value) == null ? void 0 : p.validateInputs) == null || n.call(p);
|
|
491
491
|
},
|
|
492
492
|
resetInputsValidation: () => {
|
|
493
|
-
var p,
|
|
494
|
-
(
|
|
493
|
+
var p, n;
|
|
494
|
+
(n = (p = V.value) == null ? void 0 : p.resetInputsValidation) == null || n.call(p);
|
|
495
495
|
},
|
|
496
496
|
resetInputs: () => {
|
|
497
|
-
var p,
|
|
498
|
-
(
|
|
497
|
+
var p, n;
|
|
498
|
+
(n = (p = V.value) == null ? void 0 : p.resetInputs) == null || n.call(p);
|
|
499
499
|
}
|
|
500
500
|
});
|
|
501
|
-
const H = Ue(
|
|
502
|
-
async function N(p,
|
|
501
|
+
const H = Ue(o, "show");
|
|
502
|
+
async function N(p, n, r) {
|
|
503
503
|
D.value = !0;
|
|
504
504
|
try {
|
|
505
505
|
await i.convertSku({
|
|
506
506
|
conversions: [
|
|
507
507
|
{
|
|
508
508
|
doc: p,
|
|
509
|
-
amount:
|
|
509
|
+
amount: n,
|
|
510
510
|
overrides: r == null ? void 0 : r.map((h) => ({
|
|
511
511
|
...h,
|
|
512
512
|
amount: {
|
|
@@ -523,75 +523,75 @@ const lo = { class: "flex items-center" }, ro = { class: "fm-typo-en-title-md-80
|
|
|
523
523
|
title: "Something went wrong",
|
|
524
524
|
message: `Cannot convert ${p.name}. Please try again.`,
|
|
525
525
|
type: "error"
|
|
526
|
-
}), console.error("error at converting stock amount", p,
|
|
526
|
+
}), console.error("error at converting stock amount", p, n, h);
|
|
527
527
|
} finally {
|
|
528
528
|
D.value = !1;
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
function K(p,
|
|
532
|
-
const h = +
|
|
531
|
+
function K(p, n, r) {
|
|
532
|
+
const h = +n;
|
|
533
533
|
let c = r;
|
|
534
|
-
|
|
534
|
+
n.length > 0 && isFinite(h) ? c = r.map((f) => (f.id !== p || (f.amount = ke(h)), f)) : c = r.map((f) => (f.id !== p || (f.amount = { amount: 0, precision: 0 }), f)), u.value = c;
|
|
535
535
|
}
|
|
536
536
|
function R(p) {
|
|
537
|
-
const
|
|
538
|
-
return
|
|
537
|
+
const n = b.value.find((r) => r._id === p);
|
|
538
|
+
return n ? lt(n.unit, !0) : [];
|
|
539
539
|
}
|
|
540
|
-
function X(p,
|
|
541
|
-
const r = R(p), h = r.find((c) => c.value ===
|
|
540
|
+
function X(p, n) {
|
|
541
|
+
const r = R(p), h = r.find((c) => c.value === n) ?? r.find((c) => c.value === null);
|
|
542
542
|
return h ? {
|
|
543
543
|
...h,
|
|
544
544
|
label: h.abbrev
|
|
545
545
|
} : null;
|
|
546
546
|
}
|
|
547
|
-
function L(p,
|
|
547
|
+
function L(p, n, r) {
|
|
548
548
|
let h;
|
|
549
|
-
if (
|
|
549
|
+
if (n === null)
|
|
550
550
|
h = r.map((c) => (c.id !== p || (c.measurement = null), c)) ?? [];
|
|
551
551
|
else {
|
|
552
552
|
const c = b.value.find((f) => f._id === p);
|
|
553
553
|
h = r.map((f) => {
|
|
554
554
|
var M, I;
|
|
555
|
-
return f.id !== p || (f.measurement = (I = (M = c == null ? void 0 : c.unit) == null ? void 0 : M.measurements) == null ? void 0 : I.find((G) => G.id ===
|
|
555
|
+
return f.id !== p || (f.measurement = (I = (M = c == null ? void 0 : c.unit) == null ? void 0 : M.measurements) == null ? void 0 : I.find((G) => G.id === n)), f;
|
|
556
556
|
}) ?? [];
|
|
557
557
|
}
|
|
558
558
|
u.value = h;
|
|
559
559
|
}
|
|
560
|
-
function ee(p,
|
|
561
|
-
const r =
|
|
560
|
+
function ee(p, n) {
|
|
561
|
+
const r = n.filter((h) => h.id !== p);
|
|
562
562
|
u.value = r;
|
|
563
563
|
}
|
|
564
564
|
function J() {
|
|
565
|
-
const p = (u.value ?? []).map((
|
|
566
|
-
...
|
|
565
|
+
const p = (u.value ?? []).map((n) => ({
|
|
566
|
+
...n,
|
|
567
567
|
type: Xe.enum.SKU
|
|
568
568
|
}));
|
|
569
569
|
S.promptIngredientsBinding(
|
|
570
570
|
p,
|
|
571
|
-
(
|
|
572
|
-
|
|
571
|
+
(n) => u.value = n,
|
|
572
|
+
o.sku._id
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
575
|
return xe(
|
|
576
|
-
() =>
|
|
576
|
+
() => o.show,
|
|
577
577
|
(p) => {
|
|
578
578
|
p || (u.value = null, w.value = 0);
|
|
579
579
|
}
|
|
580
|
-
), (p,
|
|
580
|
+
), (p, n) => {
|
|
581
581
|
const r = U("FmTextField"), h = U("FmForm"), c = U("FmCard"), f = U("FmSwitch"), M = U("FmFormGroup"), I = U("FmSelect"), G = U("FmButton"), se = U("FmSideSheet");
|
|
582
582
|
return $(), z(se, {
|
|
583
583
|
"dismiss-away": "",
|
|
584
584
|
modelValue: a(H),
|
|
585
|
-
"onUpdate:modelValue":
|
|
585
|
+
"onUpdate:modelValue": n[3] || (n[3] = (E) => je(H) ? H.value = E : null),
|
|
586
586
|
"max-width": 500
|
|
587
587
|
}, {
|
|
588
588
|
"side-sheet-header": T(() => [
|
|
589
|
-
e("div",
|
|
590
|
-
e("div",
|
|
589
|
+
e("div", ln, [
|
|
590
|
+
e("div", rn, v(a(j)("inventory.stock.convert.title", { name: p.sku.name })), 1)
|
|
591
591
|
])
|
|
592
592
|
]),
|
|
593
593
|
default: T(() => [
|
|
594
|
-
e("div",
|
|
594
|
+
e("div", un, [
|
|
595
595
|
y(h, {
|
|
596
596
|
ref_key: "formRef",
|
|
597
597
|
ref: V,
|
|
@@ -601,7 +601,7 @@ const lo = { class: "flex items-center" }, ro = { class: "fm-typo-en-title-md-80
|
|
|
601
601
|
y(r, {
|
|
602
602
|
disabled: D.value,
|
|
603
603
|
"model-value": w.value,
|
|
604
|
-
"onUpdate:modelValue":
|
|
604
|
+
"onUpdate:modelValue": n[0] || (n[0] = (E) => w.value = E),
|
|
605
605
|
label: a(j)("inventory.stock.convert.amount"),
|
|
606
606
|
rules: [t, l, a(Ve)(0)],
|
|
607
607
|
"append-text": x.value,
|
|
@@ -615,16 +615,16 @@ const lo = { class: "flex items-center" }, ro = { class: "fm-typo-en-title-md-80
|
|
|
615
615
|
class: "p-16"
|
|
616
616
|
}, {
|
|
617
617
|
default: T(() => [
|
|
618
|
-
e("div",
|
|
619
|
-
e("div",
|
|
620
|
-
($(!0), Y(
|
|
618
|
+
e("div", cn, [
|
|
619
|
+
e("div", dn, v(a(j)("inventory.stock.convert.deductionSummary")), 1),
|
|
620
|
+
($(!0), Y(oe, null, ie(_.value, (E) => {
|
|
621
621
|
var W, q;
|
|
622
622
|
return $(), Y("div", {
|
|
623
623
|
key: (W = E.sku) == null ? void 0 : W._id,
|
|
624
624
|
class: "flex items-center"
|
|
625
625
|
}, [
|
|
626
|
-
e("div",
|
|
627
|
-
e("div",
|
|
626
|
+
e("div", mn, v((q = E.sku) == null ? void 0 : q.name), 1),
|
|
627
|
+
e("div", pn, " -" + v(E.convertAmount) + " " + v(E.abbrev), 1)
|
|
628
628
|
]);
|
|
629
629
|
}), 128))
|
|
630
630
|
])
|
|
@@ -633,22 +633,22 @@ const lo = { class: "flex items-center" }, ro = { class: "fm-typo-en-title-md-80
|
|
|
633
633
|
}),
|
|
634
634
|
y(c, { variant: "outlined" }, {
|
|
635
635
|
default: T(() => [
|
|
636
|
-
e("div",
|
|
636
|
+
e("div", fn, [
|
|
637
637
|
y(f, {
|
|
638
638
|
value: "",
|
|
639
639
|
modelValue: B.value,
|
|
640
|
-
"onUpdate:modelValue":
|
|
640
|
+
"onUpdate:modelValue": n[1] || (n[1] = (E) => B.value = E),
|
|
641
641
|
label: a(j)("inventory.stock.convert.overrideDeduction"),
|
|
642
642
|
"label-placement": "right"
|
|
643
643
|
}, null, 8, ["modelValue", "label"]),
|
|
644
|
-
B.value ? ($(), Y(
|
|
644
|
+
B.value ? ($(), Y(oe, { key: 0 }, [
|
|
645
645
|
y(M, {
|
|
646
646
|
modelValue: u.value,
|
|
647
647
|
rules: [a(Dt)(1, "Must have at least one ingredient binding")]
|
|
648
648
|
}, null, 8, ["modelValue", "rules"]),
|
|
649
|
-
e("div",
|
|
650
|
-
e("div",
|
|
651
|
-
($(!0), Y(
|
|
649
|
+
e("div", vn, [
|
|
650
|
+
e("div", yn, v(a(j)("inventory.stock.convert.ingredients")), 1),
|
|
651
|
+
($(!0), Y(oe, null, ie(u.value, (E) => ($(), z(M, {
|
|
652
652
|
key: E.id,
|
|
653
653
|
disabled: D.value,
|
|
654
654
|
modelValue: +a(ve)(E.amount ?? { amount: 1, precision: 0 }),
|
|
@@ -663,8 +663,8 @@ const lo = { class: "flex items-center" }, ro = { class: "fm-typo-en-title-md-80
|
|
|
663
663
|
default: T(({ invalid: W }) => {
|
|
664
664
|
var q, le, re;
|
|
665
665
|
return [
|
|
666
|
-
e("div",
|
|
667
|
-
e("div",
|
|
666
|
+
e("div", _n, [
|
|
667
|
+
e("div", kn, v((q = b.value.find((Z) => Z._id === E.id)) == null ? void 0 : q.name), 1),
|
|
668
668
|
y(r, {
|
|
669
669
|
class: "xs:col-span-2",
|
|
670
670
|
disabled: D.value,
|
|
@@ -682,7 +682,7 @@ const lo = { class: "flex items-center" }, ro = { class: "fm-typo-en-title-md-80
|
|
|
682
682
|
"onUpdate:modelValue": (Z) => L(E.id, Z, u.value ?? []),
|
|
683
683
|
invalid: W
|
|
684
684
|
}, {
|
|
685
|
-
"helper-text": T(() =>
|
|
685
|
+
"helper-text": T(() => n[4] || (n[4] = [])),
|
|
686
686
|
_: 2
|
|
687
687
|
}, 1032, ["disabled", "items", "model-value", "onUpdate:modelValue", "invalid"]),
|
|
688
688
|
y(G, {
|
|
@@ -714,11 +714,11 @@ const lo = { class: "flex items-center" }, ro = { class: "fm-typo-en-title-md-80
|
|
|
714
714
|
])
|
|
715
715
|
]),
|
|
716
716
|
"side-sheet-footer": T(() => [
|
|
717
|
-
e("div",
|
|
717
|
+
e("div", bn, [
|
|
718
718
|
y(G, {
|
|
719
719
|
loading: D.value,
|
|
720
720
|
label: a(j)("inventory.stock.convert.convertButton"),
|
|
721
|
-
onClick:
|
|
721
|
+
onClick: n[2] || (n[2] = (E) => {
|
|
722
722
|
var W, q;
|
|
723
723
|
return (q = (W = V.value) == null ? void 0 : W.validateInputs) == null ? void 0 : q.call(W);
|
|
724
724
|
})
|
|
@@ -738,31 +738,31 @@ function tt(k, g) {
|
|
|
738
738
|
return Ae(Math.abs(k), g);
|
|
739
739
|
}
|
|
740
740
|
const Oe = {
|
|
741
|
-
[
|
|
741
|
+
[ne.enum.DAMAGE]: {
|
|
742
742
|
label: "Damage",
|
|
743
743
|
toAdjustmentAmount: Fe
|
|
744
744
|
},
|
|
745
|
-
[
|
|
745
|
+
[ne.enum.WASTAGE]: {
|
|
746
746
|
label: "Wastage",
|
|
747
747
|
toAdjustmentAmount: Fe
|
|
748
748
|
},
|
|
749
|
-
[
|
|
749
|
+
[ne.enum.THEFT]: {
|
|
750
750
|
label: "Theft",
|
|
751
751
|
toAdjustmentAmount: Fe
|
|
752
752
|
},
|
|
753
|
-
[
|
|
753
|
+
[ne.enum.LOSE]: {
|
|
754
754
|
label: "Lose",
|
|
755
755
|
toAdjustmentAmount: Fe
|
|
756
756
|
},
|
|
757
|
-
[
|
|
757
|
+
[ne.enum.EXTRA]: {
|
|
758
758
|
label: "Extra",
|
|
759
759
|
toAdjustmentAmount: tt
|
|
760
760
|
},
|
|
761
|
-
[
|
|
761
|
+
[ne.enum.PURCHASE]: {
|
|
762
762
|
label: "Purchase",
|
|
763
763
|
toAdjustmentAmount: tt
|
|
764
764
|
}
|
|
765
|
-
},
|
|
765
|
+
}, hn = { class: "col-span-2 flex" }, xn = { class: "fm-typo-en-body-lg-600 flex-1" }, Sn = { class: "col-span-2 flex flex-col gap-4" }, Fn = { class: "flex gap-4 text-fm-color-typo-primary fm-typo-en-body-lg-600" }, mt = /* @__PURE__ */ ue({
|
|
766
766
|
__name: "AdjustedItemForm",
|
|
767
767
|
props: {
|
|
768
768
|
modelValue: {},
|
|
@@ -770,14 +770,14 @@ const Oe = {
|
|
|
770
770
|
},
|
|
771
771
|
emits: ["update:modelValue", "click:delete"],
|
|
772
772
|
setup(k, { emit: g }) {
|
|
773
|
-
const d = k,
|
|
773
|
+
const d = k, o = g, { t: A } = ce(), S = Me(), m = P(
|
|
774
774
|
() => Object.keys(Oe).map((t) => ({
|
|
775
775
|
label: kt(t),
|
|
776
776
|
value: t
|
|
777
777
|
}))
|
|
778
778
|
), i = P(() => lt(d.modelValue.doc.unit, !0)), F = P({
|
|
779
779
|
get() {
|
|
780
|
-
return d.modelValue.type ??
|
|
780
|
+
return d.modelValue.type ?? ne.enum.PURCHASE;
|
|
781
781
|
},
|
|
782
782
|
set(t) {
|
|
783
783
|
const l = {
|
|
@@ -788,7 +788,7 @@ const Oe = {
|
|
|
788
788
|
l.amount = Oe[l.type].toAdjustmentAmount(
|
|
789
789
|
+ve(x),
|
|
790
790
|
x.precision
|
|
791
|
-
),
|
|
791
|
+
), o("update:modelValue", l);
|
|
792
792
|
}
|
|
793
793
|
}), j = P({
|
|
794
794
|
get() {
|
|
@@ -802,7 +802,7 @@ const Oe = {
|
|
|
802
802
|
l.amount = Oe[F.value].toAdjustmentAmount(
|
|
803
803
|
t,
|
|
804
804
|
x.precision
|
|
805
|
-
),
|
|
805
|
+
), o("update:modelValue", l);
|
|
806
806
|
}
|
|
807
807
|
}), w = P({
|
|
808
808
|
get() {
|
|
@@ -814,7 +814,7 @@ const Oe = {
|
|
|
814
814
|
const l = {
|
|
815
815
|
...d.modelValue
|
|
816
816
|
};
|
|
817
|
-
l.measurement = ((_ = (x = d.modelValue.doc.unit) == null ? void 0 : x.measurements) == null ? void 0 : _.find((V) => V.id === t)) ?? null,
|
|
817
|
+
l.measurement = ((_ = (x = d.modelValue.doc.unit) == null ? void 0 : x.measurements) == null ? void 0 : _.find((V) => V.id === t)) ?? null, o("update:modelValue", l);
|
|
818
818
|
}
|
|
819
819
|
}), u = P({
|
|
820
820
|
get() {
|
|
@@ -824,7 +824,7 @@ const Oe = {
|
|
|
824
824
|
const l = {
|
|
825
825
|
...d.modelValue
|
|
826
826
|
};
|
|
827
|
-
l.remark = t,
|
|
827
|
+
l.remark = t, o("update:modelValue", l);
|
|
828
828
|
}
|
|
829
829
|
}), b = P(() => {
|
|
830
830
|
var l;
|
|
@@ -845,15 +845,12 @@ const Oe = {
|
|
|
845
845
|
class: "grid grid-cols-2 gap-8 p-16"
|
|
846
846
|
}, {
|
|
847
847
|
default: T(() => [
|
|
848
|
-
e("div",
|
|
849
|
-
e("div",
|
|
850
|
-
e("div", So, v(t.modelValue.doc.name), 1),
|
|
851
|
-
e("div", Fo, v(t.modelValue.doc.code), 1)
|
|
852
|
-
]),
|
|
848
|
+
e("div", hn, [
|
|
849
|
+
e("div", xn, v(t.modelValue.doc.name), 1),
|
|
853
850
|
y(x, {
|
|
854
851
|
variant: "tertiary",
|
|
855
852
|
"prepend-icon": "delete",
|
|
856
|
-
onClick: l[0] || (l[0] = (N) =>
|
|
853
|
+
onClick: l[0] || (l[0] = (N) => o("click:delete"))
|
|
857
854
|
})
|
|
858
855
|
]),
|
|
859
856
|
y(_, {
|
|
@@ -892,8 +889,8 @@ const Oe = {
|
|
|
892
889
|
"onUpdate:modelValue": l[4] || (l[4] = (N) => u.value = N),
|
|
893
890
|
"label-mark": "optional"
|
|
894
891
|
}, null, 8, ["disabled", "modelValue"]),
|
|
895
|
-
e("div",
|
|
896
|
-
e("div",
|
|
892
|
+
e("div", Sn, [
|
|
893
|
+
e("div", Fn, v(a(A)("inventory.stock.stock_adjustment.stockAfter")), 1),
|
|
897
894
|
e("div", {
|
|
898
895
|
class: _e(["fm-typo-en-body-lg-600", s.value ? "text-red-700" : "text-green-700"])
|
|
899
896
|
}, v(D.value), 3)
|
|
@@ -903,7 +900,7 @@ const Oe = {
|
|
|
903
900
|
});
|
|
904
901
|
};
|
|
905
902
|
}
|
|
906
|
-
}),
|
|
903
|
+
}), wn = { class: "flex items-center" }, $n = { class: "fm-typo-en-title-md-800" }, An = { class: "flex items-center" }, Vn = { class: "fm-typo-en-title-sm-800 flex-1" }, Cn = { class: "flex gap-8" }, jn = /* @__PURE__ */ ue({
|
|
907
904
|
__name: "AdjustSkuDialog",
|
|
908
905
|
props: {
|
|
909
906
|
stock: {},
|
|
@@ -911,7 +908,7 @@ const Oe = {
|
|
|
911
908
|
},
|
|
912
909
|
emits: ["update:show", "submitted"],
|
|
913
910
|
setup(k, { expose: g, emit: d }) {
|
|
914
|
-
const
|
|
911
|
+
const o = k, A = d, S = Be(), m = Ie(), i = he(), F = ge(), j = O(!1), { t: w } = ce();
|
|
915
912
|
function u() {
|
|
916
913
|
D(De(B));
|
|
917
914
|
}
|
|
@@ -930,25 +927,25 @@ const Oe = {
|
|
|
930
927
|
(x = (l = b.value) == null ? void 0 : l.resetInputs) == null || x.call(l);
|
|
931
928
|
}
|
|
932
929
|
});
|
|
933
|
-
const C = Ue(
|
|
930
|
+
const C = Ue(o, "show"), B = nt({
|
|
934
931
|
remark: "",
|
|
935
932
|
adjustments: [
|
|
936
933
|
{
|
|
937
934
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
938
|
-
type:
|
|
939
|
-
doc:
|
|
935
|
+
type: ne.enum.PURCHASE,
|
|
936
|
+
doc: o.stock,
|
|
940
937
|
measurement: null,
|
|
941
938
|
remark: "",
|
|
942
939
|
amount: ke(1)
|
|
943
940
|
}
|
|
944
941
|
]
|
|
945
942
|
});
|
|
946
|
-
xe([() =>
|
|
943
|
+
xe([() => o.show], ([l]) => {
|
|
947
944
|
l && (B.remark = "", B.adjustments = [
|
|
948
945
|
{
|
|
949
946
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
950
|
-
type:
|
|
951
|
-
doc:
|
|
947
|
+
type: ne.enum.PURCHASE,
|
|
948
|
+
doc: o.stock,
|
|
952
949
|
measurement: null,
|
|
953
950
|
remark: "",
|
|
954
951
|
amount: ke(1)
|
|
@@ -1008,7 +1005,7 @@ const Oe = {
|
|
|
1008
1005
|
B.adjustments = _.map(
|
|
1009
1006
|
(V) => B.adjustments.find((H) => H.doc._id === V) ?? {
|
|
1010
1007
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
1011
|
-
type:
|
|
1008
|
+
type: ne.enum.PURCHASE,
|
|
1012
1009
|
doc: S.skus.find((H) => H._id === V),
|
|
1013
1010
|
measurement: null,
|
|
1014
1011
|
remark: "",
|
|
@@ -1029,8 +1026,8 @@ const Oe = {
|
|
|
1029
1026
|
"max-width": 500
|
|
1030
1027
|
}, {
|
|
1031
1028
|
"side-sheet-header": T(() => [
|
|
1032
|
-
e("div",
|
|
1033
|
-
e("div",
|
|
1029
|
+
e("div", wn, [
|
|
1030
|
+
e("div", $n, v(a(w)("inventory.stock.adjust.title")), 1)
|
|
1034
1031
|
])
|
|
1035
1032
|
]),
|
|
1036
1033
|
default: T(() => [
|
|
@@ -1046,8 +1043,8 @@ const Oe = {
|
|
|
1046
1043
|
modelValue: B.remark,
|
|
1047
1044
|
"onUpdate:modelValue": x[0] || (x[0] = (K) => B.remark = K)
|
|
1048
1045
|
}, null, 8, ["label", "modelValue"]),
|
|
1049
|
-
e("div",
|
|
1050
|
-
e("div",
|
|
1046
|
+
e("div", An, [
|
|
1047
|
+
e("div", Vn, v(a(w)("inventory.stock.adjust.adjustedItems")), 1),
|
|
1051
1048
|
y(V, {
|
|
1052
1049
|
"prepend-icon": "add",
|
|
1053
1050
|
variant: "tertiary",
|
|
@@ -1055,7 +1052,7 @@ const Oe = {
|
|
|
1055
1052
|
onClick: s
|
|
1056
1053
|
})
|
|
1057
1054
|
]),
|
|
1058
|
-
($(!0), Y(
|
|
1055
|
+
($(!0), Y(oe, null, ie(B.adjustments, (K, R) => ($(), z(mt, {
|
|
1059
1056
|
key: K.id,
|
|
1060
1057
|
modelValue: B.adjustments[R],
|
|
1061
1058
|
"onUpdate:modelValue": (X) => B.adjustments[R] = X,
|
|
@@ -1066,7 +1063,7 @@ const Oe = {
|
|
|
1066
1063
|
}, 512)
|
|
1067
1064
|
]),
|
|
1068
1065
|
"side-sheet-footer": T(() => [
|
|
1069
|
-
e("div",
|
|
1066
|
+
e("div", Cn, [
|
|
1070
1067
|
y(V, {
|
|
1071
1068
|
label: a(w)("inventory.stock.adjust.adjustButton"),
|
|
1072
1069
|
loading: j.value,
|
|
@@ -1081,14 +1078,14 @@ const Oe = {
|
|
|
1081
1078
|
}, 8, ["modelValue"]);
|
|
1082
1079
|
};
|
|
1083
1080
|
}
|
|
1084
|
-
}),
|
|
1081
|
+
}), Dn = { class: "flex items-center w-full gap-8" }, Bn = { class: "fm-typo-en-title-md-800 flex-1" }, Mn = { class: "flex flex-col gap-16" }, In = { class: "flex flex-col gap-4" }, Un = { class: "fm-typo-en-body-md-600" }, Tn = { class: "flex gap-8 items-start" }, Hn = { class: "flex-1 min-w-0" }, En = { class: "flex-1 min-w-0" }, Pn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rn = { class: "flex items-center" }, On = { class: "fm-typo-en-title-sm-800 flex-1" }, Nn = { class: "flex gap-8" }, Yn = /* @__PURE__ */ ue({
|
|
1085
1082
|
__name: "StockAdjustmentSideSheet",
|
|
1086
1083
|
props: {
|
|
1087
1084
|
show: { type: Boolean }
|
|
1088
1085
|
},
|
|
1089
1086
|
emits: ["update:show", "submitted"],
|
|
1090
1087
|
setup(k, { emit: g }) {
|
|
1091
|
-
const d = k,
|
|
1088
|
+
const d = k, o = g, { t: A } = ce(), S = Be(), m = he(), i = Ie(), F = ge(), j = Ue(d, "show"), w = O(!1), u = nt({
|
|
1092
1089
|
remark: "",
|
|
1093
1090
|
effectiveAt: /* @__PURE__ */ new Date(),
|
|
1094
1091
|
adjustments: []
|
|
@@ -1144,7 +1141,7 @@ const Oe = {
|
|
|
1144
1141
|
u.adjustments = H.map(
|
|
1145
1142
|
(N) => u.adjustments.find((K) => K.doc._id === N) ?? {
|
|
1146
1143
|
id: "",
|
|
1147
|
-
type:
|
|
1144
|
+
type: ne.enum.PURCHASE,
|
|
1148
1145
|
doc: s.value[N],
|
|
1149
1146
|
measurement: null,
|
|
1150
1147
|
remark: "",
|
|
@@ -1181,7 +1178,7 @@ const Oe = {
|
|
|
1181
1178
|
adjustments: _,
|
|
1182
1179
|
effectiveAt: u.effectiveAt.toISOString()
|
|
1183
1180
|
};
|
|
1184
|
-
await m.adjustSku(De(V)),
|
|
1181
|
+
await m.adjustSku(De(V)), o("submitted"), o("update:show", !1);
|
|
1185
1182
|
} catch (_) {
|
|
1186
1183
|
F.open({
|
|
1187
1184
|
title: A("inventory.stock.adjust.error.title"),
|
|
@@ -1202,22 +1199,22 @@ const Oe = {
|
|
|
1202
1199
|
onAfterEnter: D
|
|
1203
1200
|
}, {
|
|
1204
1201
|
"side-sheet-header": T(() => [
|
|
1205
|
-
e("div",
|
|
1206
|
-
e("div",
|
|
1202
|
+
e("div", Dn, [
|
|
1203
|
+
e("div", Bn, v(a(A)("inventory.stock.stock_adjustment.title")), 1)
|
|
1207
1204
|
])
|
|
1208
1205
|
]),
|
|
1209
1206
|
default: T(() => [
|
|
1210
|
-
e("div",
|
|
1207
|
+
e("div", Mn, [
|
|
1211
1208
|
y(H, {
|
|
1212
1209
|
label: a(A)("inventory.stock.adjust.remark"),
|
|
1213
1210
|
modelValue: u.remark,
|
|
1214
1211
|
"onUpdate:modelValue": V[0] || (V[0] = (L) => u.remark = L),
|
|
1215
1212
|
"label-mark": "optional"
|
|
1216
1213
|
}, null, 8, ["label", "modelValue"]),
|
|
1217
|
-
e("div",
|
|
1218
|
-
e("label",
|
|
1219
|
-
e("div",
|
|
1220
|
-
e("div",
|
|
1214
|
+
e("div", In, [
|
|
1215
|
+
e("label", Un, v(a(A)("inventory.stock.stock_adjustment.effectiveAt")), 1),
|
|
1216
|
+
e("div", Tn, [
|
|
1217
|
+
e("div", Hn, [
|
|
1221
1218
|
y(N, {
|
|
1222
1219
|
class: "w-full",
|
|
1223
1220
|
modelValue: b.value,
|
|
@@ -1226,7 +1223,7 @@ const Oe = {
|
|
|
1226
1223
|
max: a(pe)().format("YYYY-MM-DD")
|
|
1227
1224
|
}, null, 8, ["modelValue", "max"])
|
|
1228
1225
|
]),
|
|
1229
|
-
e("div",
|
|
1226
|
+
e("div", En, [
|
|
1230
1227
|
y(K, {
|
|
1231
1228
|
class: "w-full",
|
|
1232
1229
|
modelValue: C.value,
|
|
@@ -1235,10 +1232,10 @@ const Oe = {
|
|
|
1235
1232
|
}, null, 8, ["modelValue"])
|
|
1236
1233
|
])
|
|
1237
1234
|
]),
|
|
1238
|
-
e("div",
|
|
1235
|
+
e("div", Pn, v(a(A)("inventory.stock.stock_adjustment.immediateHint")), 1)
|
|
1239
1236
|
]),
|
|
1240
|
-
e("div",
|
|
1241
|
-
e("div",
|
|
1237
|
+
e("div", Rn, [
|
|
1238
|
+
e("div", On, v(a(A)("inventory.stock.adjust.adjustedItems")), 1),
|
|
1242
1239
|
y(R, {
|
|
1243
1240
|
"prepend-icon": "add",
|
|
1244
1241
|
variant: "tertiary",
|
|
@@ -1246,7 +1243,7 @@ const Oe = {
|
|
|
1246
1243
|
onClick: t
|
|
1247
1244
|
})
|
|
1248
1245
|
]),
|
|
1249
|
-
($(!0), Y(
|
|
1246
|
+
($(!0), Y(oe, null, ie(u.adjustments, (L, ee) => ($(), z(mt, {
|
|
1250
1247
|
key: L.id,
|
|
1251
1248
|
modelValue: u.adjustments[ee],
|
|
1252
1249
|
"onUpdate:modelValue": (J) => u.adjustments[ee] = J,
|
|
@@ -1255,7 +1252,7 @@ const Oe = {
|
|
|
1255
1252
|
])
|
|
1256
1253
|
]),
|
|
1257
1254
|
"side-sheet-footer": T(() => [
|
|
1258
|
-
e("div",
|
|
1255
|
+
e("div", Nn, [
|
|
1259
1256
|
y(R, {
|
|
1260
1257
|
label: a(A)("common.confirm"),
|
|
1261
1258
|
loading: w.value,
|
|
@@ -1264,7 +1261,7 @@ const Oe = {
|
|
|
1264
1261
|
y(R, {
|
|
1265
1262
|
label: a(A)("common.close"),
|
|
1266
1263
|
variant: "tertiary",
|
|
1267
|
-
onClick: V[3] || (V[3] = (L) =>
|
|
1264
|
+
onClick: V[3] || (V[3] = (L) => o("update:show", !1))
|
|
1268
1265
|
}, null, 8, ["label"])
|
|
1269
1266
|
])
|
|
1270
1267
|
]),
|
|
@@ -1272,13 +1269,13 @@ const Oe = {
|
|
|
1272
1269
|
}, 8, ["modelValue"]);
|
|
1273
1270
|
};
|
|
1274
1271
|
}
|
|
1275
|
-
}),
|
|
1272
|
+
}), Ln = bt((k, g) => ({
|
|
1276
1273
|
// TODO: remove once latest inventory backend has been push
|
|
1277
|
-
async findBillsByBusinessId(d,
|
|
1274
|
+
async findBillsByBusinessId(d, o, A) {
|
|
1278
1275
|
const S = `${k.businessesBackendUrl}/${d}/reports/find-many`, m = {
|
|
1279
1276
|
// type: TYPE.bill,
|
|
1280
1277
|
type: "bill",
|
|
1281
|
-
restaurantIds:
|
|
1278
|
+
restaurantIds: o,
|
|
1282
1279
|
ids: A
|
|
1283
1280
|
};
|
|
1284
1281
|
return await g.post(S, m);
|
|
@@ -1289,10 +1286,10 @@ const Oe = {
|
|
|
1289
1286
|
};
|
|
1290
1287
|
return await g.post(S, m);
|
|
1291
1288
|
}
|
|
1292
|
-
})),
|
|
1289
|
+
})), zn = {
|
|
1293
1290
|
key: 0,
|
|
1294
1291
|
class: "flex justify-center items-center h-32"
|
|
1295
|
-
},
|
|
1292
|
+
}, Gn = { class: "mb-3" }, Kn = { class: "flex flex-col gap-8" }, Wn = { class: "flex flex-col text-fm-color-typo-primary mb-3 text-center" }, qn = { class: "text-fm-color-neutral-gray-400 fm-typo-en-body-sm-600" }, Xn = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, Jn = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, Qn = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, Zn = { class: "flex flex-col w-full px-2" }, eo = { class: "flex gap-2" }, to = /* @__PURE__ */ ue({
|
|
1296
1293
|
__name: "AmendAdjustmentForm",
|
|
1297
1294
|
props: /* @__PURE__ */ qe({
|
|
1298
1295
|
adjustmentId: {}
|
|
@@ -1302,7 +1299,7 @@ const Oe = {
|
|
|
1302
1299
|
}),
|
|
1303
1300
|
emits: /* @__PURE__ */ qe(["refreshHistory"], ["update:modelValue"]),
|
|
1304
1301
|
setup(k, { emit: g }) {
|
|
1305
|
-
const d = k,
|
|
1302
|
+
const d = k, o = g, A = he(), S = pt(k, "modelValue"), m = O(!1), i = O(!1), F = O(!1), j = O({
|
|
1306
1303
|
_id: `inventoryAdjustment_${(/* @__PURE__ */ new Date()).toISOString()}_XXXXX`,
|
|
1307
1304
|
skus: []
|
|
1308
1305
|
}), w = O();
|
|
@@ -1326,7 +1323,7 @@ const Oe = {
|
|
|
1326
1323
|
}), await A.revertWastageAdjustment({
|
|
1327
1324
|
targetWastageAdjustmentId: d.adjustmentId,
|
|
1328
1325
|
amountsGoingToAdjust: s
|
|
1329
|
-
}),
|
|
1326
|
+
}), o("refreshHistory"), F.value = !1, S.value = {};
|
|
1330
1327
|
}
|
|
1331
1328
|
function b(s, t, l) {
|
|
1332
1329
|
return P({
|
|
@@ -1340,7 +1337,7 @@ const Oe = {
|
|
|
1340
1337
|
const _ = { ...S.value };
|
|
1341
1338
|
_[s] || (_[s] = {}), _[s][t] = {
|
|
1342
1339
|
amount: Re.fromNumber(x),
|
|
1343
|
-
type:
|
|
1340
|
+
type: ne.Enum.WASTAGE,
|
|
1344
1341
|
measurement: l
|
|
1345
1342
|
}, S.value = _;
|
|
1346
1343
|
}
|
|
@@ -1383,9 +1380,9 @@ const Oe = {
|
|
|
1383
1380
|
e("div", null, "Amend Adjustment", -1)
|
|
1384
1381
|
])),
|
|
1385
1382
|
"dialog-footer": T(() => [
|
|
1386
|
-
e("div",
|
|
1383
|
+
e("div", Zn, [
|
|
1387
1384
|
t[13] || (t[13] = e("span", { class: "text-fm-color-system-warning-400 fm-typo-en-body-sm-400" }, "1. New adjustment EXTRA will be created for each reversal", -1)),
|
|
1388
|
-
e("div",
|
|
1385
|
+
e("div", eo, [
|
|
1389
1386
|
y(H),
|
|
1390
1387
|
y(N, {
|
|
1391
1388
|
class: "sm:w-full xs:w-full",
|
|
@@ -1405,7 +1402,7 @@ const Oe = {
|
|
|
1405
1402
|
])
|
|
1406
1403
|
]),
|
|
1407
1404
|
default: T(() => [
|
|
1408
|
-
m.value ? ($(), Y("div",
|
|
1405
|
+
m.value ? ($(), Y("div", zn)) : ($(), z(V, {
|
|
1409
1406
|
key: 1,
|
|
1410
1407
|
ref_key: "formRef",
|
|
1411
1408
|
ref: w,
|
|
@@ -1418,29 +1415,29 @@ const Oe = {
|
|
|
1418
1415
|
blameFormChildOnValidationFailed: ""
|
|
1419
1416
|
}, {
|
|
1420
1417
|
default: T(() => [
|
|
1421
|
-
e("p",
|
|
1418
|
+
e("p", Gn, [
|
|
1422
1419
|
t[6] || (t[6] = e("b", null, "Date:", -1)),
|
|
1423
1420
|
t[7] || (t[7] = e("br", null, null, -1)),
|
|
1424
1421
|
de(" " + v(a(Et)(a(gt)(j.value._id))), 1)
|
|
1425
1422
|
]),
|
|
1426
|
-
e("div",
|
|
1427
|
-
($(!0), Y(
|
|
1428
|
-
($(!0), Y(
|
|
1423
|
+
e("div", Kn, [
|
|
1424
|
+
($(!0), Y(oe, null, ie(j.value.skus, (R, X) => ($(), Y(oe, { key: X }, [
|
|
1425
|
+
($(!0), Y(oe, null, ie(R.amounts, (L, ee) => ($(), z(_, {
|
|
1429
1426
|
key: ee,
|
|
1430
1427
|
variant: "outlined",
|
|
1431
1428
|
class: "p-2"
|
|
1432
1429
|
}, {
|
|
1433
1430
|
default: T(() => [
|
|
1434
|
-
e("div",
|
|
1435
|
-
e("span",
|
|
1431
|
+
e("div", Wn, [
|
|
1432
|
+
e("span", qn, v(R.sku.code), 1),
|
|
1436
1433
|
e("span", null, v(R.sku.name), 1)
|
|
1437
1434
|
]),
|
|
1438
1435
|
t[12] || (t[12] = e("hr", { class: "m-2" }, null, -1)),
|
|
1439
|
-
e("div",
|
|
1436
|
+
e("div", Xn, [
|
|
1440
1437
|
t[8] || (t[8] = e("span", { class: "fm-typo-en-body-lg-600" }, "Adjustment type:", -1)),
|
|
1441
1438
|
e("span", null, v(L.type), 1)
|
|
1442
1439
|
]),
|
|
1443
|
-
e("div",
|
|
1440
|
+
e("div", Jn, [
|
|
1444
1441
|
t[9] || (t[9] = e("span", { class: "fm-typo-en-body-lg-600" }, "Current amount:", -1)),
|
|
1445
1442
|
e("span", null, v(a(Re).toFormatString({ value: L.amount })) + " " + v(B(R, L)), 1)
|
|
1446
1443
|
]),
|
|
@@ -1456,7 +1453,7 @@ const Oe = {
|
|
|
1456
1453
|
a(Ve)(-1)
|
|
1457
1454
|
]
|
|
1458
1455
|
}, null, 8, ["model-value", "onUpdate:modelValue", "helper-text", "append-text", "rules"]),
|
|
1459
|
-
e("div",
|
|
1456
|
+
e("div", Qn, [
|
|
1460
1457
|
t[10] || (t[10] = e("span", { class: "fm-typo-en-body-lg-600" }, "Amount after amend:", -1)),
|
|
1461
1458
|
t[11] || (t[11] = e("span", { class: "text-fm-color-system-warning-400 fm-typo-en-body-sm-400" }, "* It's an estimate for your reference, as it didn't include all the reversals related to this adjustment", -1)),
|
|
1462
1459
|
de(" " + v(D(
|
|
@@ -1477,19 +1474,19 @@ const Oe = {
|
|
|
1477
1474
|
}, 8, ["modelValue"]);
|
|
1478
1475
|
};
|
|
1479
1476
|
}
|
|
1480
|
-
}),
|
|
1477
|
+
}), no = { class: "p-16" }, oo = { class: "fm-typo-en-body-md-600 flex-grow" }, so = { class: "flex-grow text-fm-color-typo-secondary" }, ao = {
|
|
1481
1478
|
key: 0,
|
|
1482
1479
|
class: "my-5"
|
|
1483
|
-
},
|
|
1480
|
+
}, lo = { class: "text-neutral-400" }, ro = { class: "flex-grow" }, io = { class: "flex gap-1" }, uo = { class: "flex flex-col gap-1" }, co = {
|
|
1484
1481
|
key: 1,
|
|
1485
1482
|
class: "t-system text-fsecondary"
|
|
1486
|
-
},
|
|
1483
|
+
}, mo = {
|
|
1487
1484
|
key: 3,
|
|
1488
1485
|
class: "inline-flex items-center rounded-md bg-yellow-400/10 px-2 text-xs font-medium text-yellow-500 inset-ring inset-ring-yellow-400/20"
|
|
1489
|
-
},
|
|
1486
|
+
}, po = {
|
|
1490
1487
|
key: 1,
|
|
1491
1488
|
class: "shrink-0 text-fm-color-typo-secondary"
|
|
1492
|
-
},
|
|
1489
|
+
}, fo = /* @__PURE__ */ ue({
|
|
1493
1490
|
__name: "StockRecordCard",
|
|
1494
1491
|
props: {
|
|
1495
1492
|
record: {},
|
|
@@ -1498,9 +1495,9 @@ const Oe = {
|
|
|
1498
1495
|
},
|
|
1499
1496
|
emits: ["refreshHistory"],
|
|
1500
1497
|
setup(k, { emit: g }) {
|
|
1501
|
-
const d = k,
|
|
1498
|
+
const d = k, o = O(!1);
|
|
1502
1499
|
Ge();
|
|
1503
|
-
const A = O(), S = O(null), m = P(() => S.value === null ? "unset" :
|
|
1500
|
+
const A = O(), S = O(null), m = P(() => S.value === null ? "unset" : o.value ? `${S.value}px` : "0px");
|
|
1504
1501
|
Le(() => {
|
|
1505
1502
|
var w;
|
|
1506
1503
|
S.value = ((w = A.value) == null ? void 0 : w.scrollHeight) || 0;
|
|
@@ -1565,24 +1562,24 @@ const Oe = {
|
|
|
1565
1562
|
const b = U("FmIcon"), C = U("FmTooltip"), B = U("FmCard");
|
|
1566
1563
|
return $(), z(B, { variant: "outlined" }, {
|
|
1567
1564
|
default: T(() => [
|
|
1568
|
-
e("div",
|
|
1565
|
+
e("div", no, [
|
|
1569
1566
|
e("div", {
|
|
1570
1567
|
class: "flex items-center cursor-pointer mb-1",
|
|
1571
|
-
onClick: u[0] || (u[0] = (D) =>
|
|
1568
|
+
onClick: u[0] || (u[0] = (D) => o.value = !o.value)
|
|
1572
1569
|
}, [
|
|
1573
|
-
e("div",
|
|
1570
|
+
e("div", oo, v(w.record.date), 1),
|
|
1574
1571
|
y(b, {
|
|
1575
|
-
name:
|
|
1572
|
+
name: o.value ? "expand_more" : "expand_less",
|
|
1576
1573
|
color: "#777777",
|
|
1577
1574
|
size: "md"
|
|
1578
1575
|
}, null, 8, ["name"])
|
|
1579
1576
|
]),
|
|
1580
|
-
($(!0), Y(
|
|
1577
|
+
($(!0), Y(oe, null, ie(i.value, (D, s) => ($(), Y("div", {
|
|
1581
1578
|
key: s,
|
|
1582
1579
|
class: "flex flex-row py-1",
|
|
1583
1580
|
style: { "font-size": "0.8rem" }
|
|
1584
1581
|
}, [
|
|
1585
|
-
e("div",
|
|
1582
|
+
e("div", so, v(a(F)(`inventory.inventoryAdjustment.type.${s}`)), 1),
|
|
1586
1583
|
e("div", {
|
|
1587
1584
|
class: _e({
|
|
1588
1585
|
"text-fm-color-typo-error": D.startsWith("-"),
|
|
@@ -1594,25 +1591,25 @@ const Oe = {
|
|
|
1594
1591
|
e("div", {
|
|
1595
1592
|
ref_key: "detailRef",
|
|
1596
1593
|
ref: A,
|
|
1597
|
-
style:
|
|
1594
|
+
style: ot({
|
|
1598
1595
|
fontSize: "0.8rem",
|
|
1599
1596
|
maxHeight: m.value,
|
|
1600
1597
|
overflow: "hidden",
|
|
1601
1598
|
transition: "max-height 0.2s ease-out"
|
|
1602
1599
|
})
|
|
1603
1600
|
}, [
|
|
1604
|
-
j.value.length ? ($(), Y("hr",
|
|
1605
|
-
($(!0), Y(
|
|
1601
|
+
j.value.length ? ($(), Y("hr", ao)) : te("", !0),
|
|
1602
|
+
($(!0), Y(oe, null, ie(j.value, (D) => ($(), Y("div", {
|
|
1606
1603
|
key: D.time,
|
|
1607
1604
|
class: "flex gap-1 w-full"
|
|
1608
1605
|
}, [
|
|
1609
|
-
e("div",
|
|
1610
|
-
e("div",
|
|
1611
|
-
($(!0), Y(
|
|
1606
|
+
e("div", lo, v(D.time), 1),
|
|
1607
|
+
e("div", ro, [
|
|
1608
|
+
($(!0), Y(oe, null, ie(D.adjustments, (s) => ($(), Y("div", {
|
|
1612
1609
|
key: s.name,
|
|
1613
1610
|
class: "flex gap-1"
|
|
1614
1611
|
}, [
|
|
1615
|
-
e("div",
|
|
1612
|
+
e("div", io, [
|
|
1616
1613
|
de(v(a(F)(`inventory.inventoryAdjustment.type.${s.name}`)) + " ", 1),
|
|
1617
1614
|
s.backdateFrom ? ($(), z(C, {
|
|
1618
1615
|
key: 0,
|
|
@@ -1621,7 +1618,7 @@ const Oe = {
|
|
|
1621
1618
|
"z-index": 50
|
|
1622
1619
|
}, {
|
|
1623
1620
|
content: T(() => [
|
|
1624
|
-
e("div",
|
|
1621
|
+
e("div", uo, v(a(F)("inventory.stock.record.backdate", [
|
|
1625
1622
|
a(ut)(new Date(s.backdateFrom))
|
|
1626
1623
|
])), 1)
|
|
1627
1624
|
]),
|
|
@@ -1634,12 +1631,12 @@ const Oe = {
|
|
|
1634
1631
|
]),
|
|
1635
1632
|
_: 2
|
|
1636
1633
|
}, 1024)) : te("", !0),
|
|
1637
|
-
s.billRemark ? ($(), Y("span",
|
|
1634
|
+
s.billRemark ? ($(), Y("span", co, " # " + v(s.billRemark), 1)) : te("", !0),
|
|
1638
1635
|
s.remark ? ($(), Y("span", {
|
|
1639
1636
|
key: 2,
|
|
1640
1637
|
class: _e(s.billRemark ? "text-xs text-gray-400" : "")
|
|
1641
1638
|
}, v(s.billRemark ? `(${s.remark})` : `# ${s.remark}`), 3)) : te("", !0),
|
|
1642
|
-
s.name === a(
|
|
1639
|
+
s.name === a(ne).Enum.CLOSING ? ($(), Y("span", mo, " Actual Balance: " + v(s.toBalance) + " " + v(s.baseUnit), 1)) : te("", !0)
|
|
1643
1640
|
]),
|
|
1644
1641
|
e("div", {
|
|
1645
1642
|
class: _e({
|
|
@@ -1648,12 +1645,12 @@ const Oe = {
|
|
|
1648
1645
|
"ml-auto": !0
|
|
1649
1646
|
})
|
|
1650
1647
|
}, v(s.amount), 3),
|
|
1651
|
-
s.name === a(
|
|
1648
|
+
s.name === a(ne).Enum.WASTAGE ? ($(), z(to, {
|
|
1652
1649
|
key: 0,
|
|
1653
1650
|
adjustmentId: s.adjustmentId,
|
|
1654
1651
|
onRefreshHistory: u[1] || (u[1] = (t) => w.$emit("refreshHistory"))
|
|
1655
1652
|
}, null, 8, ["adjustmentId"])) : te("", !0),
|
|
1656
|
-
s.cost ? ($(), Y("div",
|
|
1653
|
+
s.cost ? ($(), Y("div", po, " (" + v(a(we)(s.cost, !1, s.cost.precision)) + ") ", 1)) : te("", !0)
|
|
1657
1654
|
]))), 128))
|
|
1658
1655
|
])
|
|
1659
1656
|
]))), 128))
|
|
@@ -1665,9 +1662,9 @@ const Oe = {
|
|
|
1665
1662
|
};
|
|
1666
1663
|
}
|
|
1667
1664
|
});
|
|
1668
|
-
function
|
|
1665
|
+
function vo(k, g) {
|
|
1669
1666
|
var S;
|
|
1670
|
-
const d = Object.keys(
|
|
1667
|
+
const d = Object.keys(ne.enum).reduce(
|
|
1671
1668
|
(m, i) => (m[i] = { amount: 0, precision: 0 }, m),
|
|
1672
1669
|
{}
|
|
1673
1670
|
);
|
|
@@ -1699,7 +1696,7 @@ function _n(k, g) {
|
|
|
1699
1696
|
{}
|
|
1700
1697
|
);
|
|
1701
1698
|
}
|
|
1702
|
-
function
|
|
1699
|
+
function yo(k, g) {
|
|
1703
1700
|
if (!g)
|
|
1704
1701
|
return null;
|
|
1705
1702
|
let d = null;
|
|
@@ -1713,7 +1710,7 @@ function kn(k, g) {
|
|
|
1713
1710
|
for (const S of A) {
|
|
1714
1711
|
const m = S.amounts;
|
|
1715
1712
|
for (const i of m) {
|
|
1716
|
-
if (i.type !==
|
|
1713
|
+
if (i.type !== ne.Enum.SALES)
|
|
1717
1714
|
continue;
|
|
1718
1715
|
const F = i.measurement ? Q.multiply([i.measurement.conversion, i.amount]) : i.amount;
|
|
1719
1716
|
d ?? (d = Q.fromNumber(0)), d = Q.add([d, F]);
|
|
@@ -1724,22 +1721,22 @@ function kn(k, g) {
|
|
|
1724
1721
|
precision: 4
|
|
1725
1722
|
})} ${g.unit.abbrev}`) : null;
|
|
1726
1723
|
}
|
|
1727
|
-
const
|
|
1724
|
+
const _o = { class: "flex items-center w-full fm-typo-en-title-md-800" }, ko = { class: "flex-1 line-clamp-2" }, bo = { class: "flex flex-col gap-32 w-full h-full" }, go = { class: "flex items-center relative gap-4" }, ho = { class: "flex-1" }, xo = {
|
|
1728
1725
|
key: 0,
|
|
1729
1726
|
class: "flex-1 flex flex-col items-center gap-16"
|
|
1730
|
-
},
|
|
1727
|
+
}, So = { class: "fm-typo-en-body-lg-400 translate-x-4" }, Fo = {
|
|
1731
1728
|
key: 1,
|
|
1732
1729
|
class: "flex flex-col gap-12"
|
|
1733
|
-
},
|
|
1730
|
+
}, wo = { class: "pb-16" }, $o = { class: "fm-typo-cn-body-lg-600" }, Ao = {
|
|
1734
1731
|
class: "grid gap-12 fm-typo-en-body-md-400",
|
|
1735
1732
|
style: { "grid-template-columns": "auto auto auto", "grid-auto-rows": "1fr" }
|
|
1736
|
-
},
|
|
1733
|
+
}, Vo = { class: "flex flex-col gap-1" }, Co = { class: "text-fm-color-typo-secondary" }, jo = { class: "font-bold" }, Do = { class: "flex flex-col gap-1" }, Bo = { class: "text-fm-color-typo-secondary flex" }, Mo = { class: "font-bold" }, Io = { class: "flex flex-col gap-1" }, Uo = { class: "text-fm-color-typo-secondary" }, To = { class: "font-bold" }, Ho = { class: "flex flex-col gap-1" }, Eo = { class: "text-fm-color-typo-secondary" }, Po = { class: "font-bold" }, Ro = { class: "flex flex-col gap-1" }, Oo = { class: "text-fm-color-typo-secondary" }, No = { class: "font-bold" }, Yo = { class: "flex flex-col gap-1" }, Lo = { class: "text-fm-color-typo-secondary" }, zo = { class: "font-bold" }, Go = { class: "flex flex-col gap-1" }, Ko = { class: "text-fm-color-typo-secondary" }, Wo = { class: "font-bold" }, qo = { class: "flex flex-col gap-1" }, Xo = { class: "text-fm-color-typo-secondary" }, Jo = { class: "font-bold" }, Qo = { class: "flex flex-col gap-1" }, Zo = { class: "text-fm-color-typo-secondary" }, es = { class: "font-bold" }, ts = {
|
|
1737
1734
|
key: 0,
|
|
1738
1735
|
class: "flex flex-col gap-8"
|
|
1739
|
-
},
|
|
1736
|
+
}, ns = { class: "flex" }, os = { class: "flex-1 flex flex-col gap-1" }, ss = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, as = { class: "font-bold" }, ls = { class: "flex-1 flex flex-col gap-1" }, rs = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, is = { class: "flex flex-col gap-1" }, us = { class: "font-bold" }, cs = {
|
|
1740
1737
|
key: 2,
|
|
1741
1738
|
class: "flex-1 flex flex-col items-center gap-8"
|
|
1742
|
-
},
|
|
1739
|
+
}, ds = ["src"], ms = { class: "font-bold text-lg" }, ps = { class: "text-xs text-neutral-400 text-center" }, fs = /* @__PURE__ */ ue({
|
|
1743
1740
|
__name: "StockHistory",
|
|
1744
1741
|
props: {
|
|
1745
1742
|
sku: {},
|
|
@@ -1747,17 +1744,17 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
1747
1744
|
},
|
|
1748
1745
|
emits: ["update:show"],
|
|
1749
1746
|
setup(k) {
|
|
1750
|
-
const g = Ge(), d = Me(),
|
|
1747
|
+
const g = Ge(), d = Me(), o = he(), A = Ln(), S = be(), m = Wt(), { t: i } = ce(), F = k, j = O(!1), w = ge(), u = O(zt(0));
|
|
1751
1748
|
async function b() {
|
|
1752
1749
|
j.value = !0;
|
|
1753
1750
|
try {
|
|
1754
1751
|
await l(), await d.readStockBalance();
|
|
1755
|
-
} catch (
|
|
1752
|
+
} catch (n) {
|
|
1756
1753
|
w.open({
|
|
1757
1754
|
title: "Something went wrong",
|
|
1758
1755
|
message: "Cannot fetch stock history. Please try again.",
|
|
1759
1756
|
type: "error"
|
|
1760
|
-
}), console.log("failed at fetching item adjustment history", F.sku, u,
|
|
1757
|
+
}), console.log("failed at fetching item adjustment history", F.sku, u, n);
|
|
1761
1758
|
} finally {
|
|
1762
1759
|
j.value = !1;
|
|
1763
1760
|
}
|
|
@@ -1768,11 +1765,11 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
1768
1765
|
b();
|
|
1769
1766
|
});
|
|
1770
1767
|
const C = O([]), B = O([]), D = O(new Array());
|
|
1771
|
-
function s(
|
|
1772
|
-
return r === "day" ? Lt(
|
|
1768
|
+
function s(n, r) {
|
|
1769
|
+
return r === "day" ? Lt(n) : ut(n);
|
|
1773
1770
|
}
|
|
1774
|
-
function t(
|
|
1775
|
-
const h =
|
|
1771
|
+
function t(n, r) {
|
|
1772
|
+
const h = n.reduce(
|
|
1776
1773
|
(c, f) => {
|
|
1777
1774
|
const M = f.effectiveAt ?? at(f._id);
|
|
1778
1775
|
if (!M)
|
|
@@ -1788,35 +1785,35 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
1788
1785
|
}));
|
|
1789
1786
|
}
|
|
1790
1787
|
async function l() {
|
|
1791
|
-
let
|
|
1788
|
+
let n = await o.readStockAdjustment(
|
|
1792
1789
|
F.sku._id,
|
|
1793
1790
|
Rt(new Date(u.value.startDate)).toISOString(),
|
|
1794
1791
|
Ot(new Date(u.value.endDate)).toISOString()
|
|
1795
1792
|
);
|
|
1796
|
-
C.value =
|
|
1797
|
-
const r =
|
|
1798
|
-
await x(r), B.value = t(
|
|
1793
|
+
C.value = n;
|
|
1794
|
+
const r = n.filter(({ ref: h }) => h == null ? void 0 : h.startsWith("bill_")).map(({ ref: h }) => h);
|
|
1795
|
+
await x(r), B.value = t(n, "day").map(({ date: h, adjustments: c }) => ({
|
|
1799
1796
|
date: h,
|
|
1800
1797
|
adjustments: c,
|
|
1801
1798
|
adjustmentsByTime: t(c, "minute")
|
|
1802
1799
|
}));
|
|
1803
1800
|
}
|
|
1804
|
-
async function x(
|
|
1805
|
-
|
|
1801
|
+
async function x(n) {
|
|
1802
|
+
n.length && (D.value = await A.findBillsById(n).catch((r) => {
|
|
1806
1803
|
var f;
|
|
1807
1804
|
console.error("Error on using latest bill API, retrying using legacy api", r);
|
|
1808
1805
|
const h = ((f = g.currentBusiness.value) == null ? void 0 : f._id) ?? "", c = S.currentLocation.doc._id;
|
|
1809
|
-
return A.findBillsByBusinessId(h, [c],
|
|
1806
|
+
return A.findBillsByBusinessId(h, [c], n);
|
|
1810
1807
|
}));
|
|
1811
1808
|
}
|
|
1812
1809
|
const _ = P(() => {
|
|
1813
|
-
const
|
|
1814
|
-
return
|
|
1810
|
+
const n = C.value, r = F.sku;
|
|
1811
|
+
return vo(n, r);
|
|
1815
1812
|
}), V = P(() => {
|
|
1816
|
-
const
|
|
1817
|
-
return
|
|
1813
|
+
const n = C.value, r = F.sku;
|
|
1814
|
+
return yo(n, r);
|
|
1818
1815
|
}), H = P(() => {
|
|
1819
|
-
const
|
|
1816
|
+
const n = [...C.value].computeFirst((h) => {
|
|
1820
1817
|
var f, M;
|
|
1821
1818
|
const c = (M = (f = h.skus) == null ? void 0 : f.find) == null ? void 0 : M.call(f, (I) => I.sku._id === F.sku._id);
|
|
1822
1819
|
return c == null ? void 0 : c.fromBalance;
|
|
@@ -1825,11 +1822,11 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
1825
1822
|
precision: 0
|
|
1826
1823
|
}, r = F.sku;
|
|
1827
1824
|
return r ? `${Q.toFormatString({
|
|
1828
|
-
value:
|
|
1825
|
+
value: n,
|
|
1829
1826
|
precision: 4
|
|
1830
1827
|
})} ${r.unit.abbrev}` : "";
|
|
1831
1828
|
}), N = P(() => {
|
|
1832
|
-
const
|
|
1829
|
+
const n = [...C.value].reverse().computeFirst((h) => {
|
|
1833
1830
|
var f, M;
|
|
1834
1831
|
const c = (M = (f = h.skus) == null ? void 0 : f.find) == null ? void 0 : M.call(f, (I) => I.sku._id === F.sku._id);
|
|
1835
1832
|
return c == null ? void 0 : c.toBalance;
|
|
@@ -1837,7 +1834,7 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
1837
1834
|
amount: 0,
|
|
1838
1835
|
precision: 0
|
|
1839
1836
|
}, r = F.sku;
|
|
1840
|
-
return r ? `${Q.toFormatString({ value:
|
|
1837
|
+
return r ? `${Q.toFormatString({ value: n, precision: 4 })} ${r.unit.abbrev}` : "";
|
|
1841
1838
|
}), K = P(() => {
|
|
1842
1839
|
var h;
|
|
1843
1840
|
const r = C.value.flatMap((c) => {
|
|
@@ -1865,20 +1862,20 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
1865
1862
|
return we(r, !1, r.precision);
|
|
1866
1863
|
});
|
|
1867
1864
|
function R() {
|
|
1868
|
-
const { startDate:
|
|
1869
|
-
|
|
1870
|
-
startDate:
|
|
1865
|
+
const { startDate: n, endDate: r } = Nt(u.value);
|
|
1866
|
+
n !== null && r !== null && (u.value = {
|
|
1867
|
+
startDate: n,
|
|
1871
1868
|
endDate: r
|
|
1872
1869
|
});
|
|
1873
1870
|
}
|
|
1874
1871
|
const X = P(() => i("inventory.ingredient.valuationMethod.WAVG")), L = P(() => {
|
|
1875
1872
|
var I, G, se, E;
|
|
1876
|
-
const
|
|
1873
|
+
const n = [...C.value].reverse().computeFirst((W) => {
|
|
1877
1874
|
var q, le;
|
|
1878
1875
|
return (le = (q = W.skus) == null ? void 0 : q.find) == null ? void 0 : le.call(q, (re) => re.sku._id === F.sku._id);
|
|
1879
1876
|
});
|
|
1880
|
-
if (!
|
|
1881
|
-
const r = [...
|
|
1877
|
+
if (!n) return "No data";
|
|
1878
|
+
const r = [...n.amounts].reverse()[0], h = {
|
|
1882
1879
|
amount: ((I = r.cost) == null ? void 0 : I.amount) ?? 0,
|
|
1883
1880
|
precision: ((G = r.cost) == null ? void 0 : G.precision) ?? 0
|
|
1884
1881
|
}, c = r.amount, f = c.amount == 0 ? Q.fromNumber(0) : Q.divide([h, c]);
|
|
@@ -1888,13 +1885,13 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
1888
1885
|
};
|
|
1889
1886
|
}), ee = P(() => {
|
|
1890
1887
|
var h;
|
|
1891
|
-
const
|
|
1888
|
+
const n = [...C.value].reverse().computeFirst((c) => {
|
|
1892
1889
|
var M, I;
|
|
1893
1890
|
const f = (I = (M = c.skus) == null ? void 0 : M.find) == null ? void 0 : I.call(M, (G) => G.sku._id === F.sku._id);
|
|
1894
1891
|
return f == null ? void 0 : f.toCostBalances;
|
|
1895
1892
|
});
|
|
1896
|
-
return
|
|
1897
|
-
...
|
|
1893
|
+
return n ? {
|
|
1894
|
+
...n.reduce((c, f) => Q.add([c, Q.fromDinero(f.cost)]), {
|
|
1898
1895
|
amount: 0,
|
|
1899
1896
|
precision: 0
|
|
1900
1897
|
}),
|
|
@@ -1902,14 +1899,14 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
1902
1899
|
} : "No data";
|
|
1903
1900
|
});
|
|
1904
1901
|
function J() {
|
|
1905
|
-
const { startDate:
|
|
1906
|
-
|
|
1907
|
-
startDate:
|
|
1902
|
+
const { startDate: n, endDate: r } = Yt(u.value);
|
|
1903
|
+
n !== null && r !== null && (u.value = {
|
|
1904
|
+
startDate: n,
|
|
1908
1905
|
endDate: r
|
|
1909
1906
|
});
|
|
1910
1907
|
}
|
|
1911
1908
|
const p = Ue(F, "show");
|
|
1912
|
-
return (
|
|
1909
|
+
return (n, r) => {
|
|
1913
1910
|
const h = U("FmButton"), c = U("FmField"), f = U("FmDateRangePicker"), M = U("FmSpacer"), I = U("FmCircularProgress"), G = U("FmIcon"), se = U("FmTooltip"), E = U("FmMenuDivider"), W = U("FmChip"), q = U("FmCardSection"), le = U("FmCard"), re = U("FmSideSheet");
|
|
1914
1911
|
return $(), z(re, {
|
|
1915
1912
|
"dismiss-away": "",
|
|
@@ -1919,8 +1916,8 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
1919
1916
|
"max-width": 560
|
|
1920
1917
|
}, {
|
|
1921
1918
|
"side-sheet-header": T(() => [
|
|
1922
|
-
e("div",
|
|
1923
|
-
e("div",
|
|
1919
|
+
e("div", _o, [
|
|
1920
|
+
e("div", ko, v(a(i)("inventory.stock.history.title", [n.sku.name])), 1),
|
|
1924
1921
|
y(h, {
|
|
1925
1922
|
variant: "tertiary",
|
|
1926
1923
|
"prepend-icon": "close",
|
|
@@ -1931,9 +1928,9 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
1931
1928
|
default: T(() => {
|
|
1932
1929
|
var Z;
|
|
1933
1930
|
return [
|
|
1934
|
-
e("div",
|
|
1935
|
-
e("div",
|
|
1936
|
-
e("div",
|
|
1931
|
+
e("div", bo, [
|
|
1932
|
+
e("div", go, [
|
|
1933
|
+
e("div", ho, [
|
|
1937
1934
|
y(f, {
|
|
1938
1935
|
modelValue: u.value,
|
|
1939
1936
|
"onUpdate:modelValue": r[1] || (r[1] = (ae) => u.value = ae),
|
|
@@ -1967,27 +1964,27 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
1967
1964
|
"prepend-icon": "navigate_next"
|
|
1968
1965
|
})
|
|
1969
1966
|
]),
|
|
1970
|
-
j.value ? ($(), Y("div",
|
|
1967
|
+
j.value ? ($(), Y("div", xo, [
|
|
1971
1968
|
y(M),
|
|
1972
1969
|
y(I, { size: "xl" }),
|
|
1973
|
-
e("div",
|
|
1970
|
+
e("div", So, v(a(i)("inventory.stock.history.loading")), 1),
|
|
1974
1971
|
y(M),
|
|
1975
1972
|
y(M)
|
|
1976
|
-
])) : B.value && ((Z = B.value) == null ? void 0 : Z.length) > 0 ? ($(), Y("div",
|
|
1973
|
+
])) : B.value && ((Z = B.value) == null ? void 0 : Z.length) > 0 ? ($(), Y("div", Fo, [
|
|
1977
1974
|
y(le, { variant: "outlined" }, {
|
|
1978
1975
|
default: T(() => [
|
|
1979
1976
|
y(q, { class: "flex flex-col gap-4" }, {
|
|
1980
1977
|
default: T(() => [
|
|
1981
|
-
e("div",
|
|
1982
|
-
e("div",
|
|
1978
|
+
e("div", wo, [
|
|
1979
|
+
e("div", $o, v(a(i)("inventory.stock.history.summary.title")), 1)
|
|
1983
1980
|
]),
|
|
1984
|
-
e("div",
|
|
1985
|
-
e("div",
|
|
1986
|
-
e("div",
|
|
1987
|
-
e("div",
|
|
1981
|
+
e("div", Ao, [
|
|
1982
|
+
e("div", Vo, [
|
|
1983
|
+
e("div", Co, v(a(i)("inventory.stock.history.summary.totalPurchase")), 1),
|
|
1984
|
+
e("div", jo, v(_.value.PURCHASE), 1)
|
|
1988
1985
|
]),
|
|
1989
|
-
e("div",
|
|
1990
|
-
e("div",
|
|
1986
|
+
e("div", Do, [
|
|
1987
|
+
e("div", Bo, [
|
|
1991
1988
|
de(v(a(i)("inventory.stock.history.summary.totalSales")) + " ", 1),
|
|
1992
1989
|
V.value != null ? ($(), z(se, {
|
|
1993
1990
|
key: 0,
|
|
@@ -2005,44 +2002,44 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2005
2002
|
_: 1
|
|
2006
2003
|
}, 8, ["content"])) : te("", !0)
|
|
2007
2004
|
]),
|
|
2008
|
-
e("div",
|
|
2005
|
+
e("div", Mo, v(_.value.SALES), 1)
|
|
2009
2006
|
]),
|
|
2010
|
-
e("div",
|
|
2011
|
-
e("div",
|
|
2012
|
-
e("div",
|
|
2007
|
+
e("div", Io, [
|
|
2008
|
+
e("div", Uo, v(a(i)("inventory.stock.history.summary.totalLose")), 1),
|
|
2009
|
+
e("div", To, v(_.value.LOSE), 1)
|
|
2013
2010
|
]),
|
|
2014
|
-
e("div",
|
|
2015
|
-
e("div",
|
|
2016
|
-
e("div",
|
|
2011
|
+
e("div", Ho, [
|
|
2012
|
+
e("div", Eo, v(a(i)("inventory.stock.history.summary.totalRequest")), 1),
|
|
2013
|
+
e("div", Po, v(_.value.REQUEST), 1)
|
|
2017
2014
|
]),
|
|
2018
|
-
e("div",
|
|
2019
|
-
e("div",
|
|
2020
|
-
e("div",
|
|
2015
|
+
e("div", Ro, [
|
|
2016
|
+
e("div", Oo, v(a(i)("inventory.stock.history.summary.totalReceive")), 1),
|
|
2017
|
+
e("div", No, v(_.value.RECEIVE), 1)
|
|
2021
2018
|
]),
|
|
2022
|
-
e("div",
|
|
2023
|
-
e("div",
|
|
2024
|
-
e("div",
|
|
2019
|
+
e("div", Yo, [
|
|
2020
|
+
e("div", Lo, v(a(i)("inventory.stock.history.summary.totalConvert")), 1),
|
|
2021
|
+
e("div", zo, v(_.value.CONVERT), 1)
|
|
2025
2022
|
]),
|
|
2026
|
-
e("div",
|
|
2027
|
-
e("div",
|
|
2028
|
-
e("div",
|
|
2023
|
+
e("div", Go, [
|
|
2024
|
+
e("div", Ko, v(a(i)("inventory.stock.history.summary.totalDamage")), 1),
|
|
2025
|
+
e("div", Wo, v(_.value.DAMAGE), 1)
|
|
2029
2026
|
]),
|
|
2030
|
-
e("div",
|
|
2031
|
-
e("div",
|
|
2032
|
-
e("div",
|
|
2027
|
+
e("div", qo, [
|
|
2028
|
+
e("div", Xo, v(a(i)("inventory.stock.history.summary.openingBalance")), 1),
|
|
2029
|
+
e("div", Jo, v(H.value), 1)
|
|
2033
2030
|
]),
|
|
2034
|
-
e("div",
|
|
2035
|
-
e("div",
|
|
2036
|
-
e("div",
|
|
2031
|
+
e("div", Qo, [
|
|
2032
|
+
e("div", Zo, v(a(i)("inventory.stock.history.summary.lastStockBalance")), 1),
|
|
2033
|
+
e("div", es, v(N.value), 1)
|
|
2037
2034
|
])
|
|
2038
2035
|
]),
|
|
2039
|
-
a(m).enableTotalCost ? ($(), Y("div",
|
|
2036
|
+
a(m).enableTotalCost ? ($(), Y("div", ts, [
|
|
2040
2037
|
y(E, { class: "w-full" }),
|
|
2041
|
-
e("div",
|
|
2042
|
-
e("div",
|
|
2038
|
+
e("div", ns, [
|
|
2039
|
+
e("div", os, [
|
|
2043
2040
|
y(Qe, { "z-index": 50 }, {
|
|
2044
2041
|
default: T(() => [
|
|
2045
|
-
e("div",
|
|
2042
|
+
e("div", ss, [
|
|
2046
2043
|
de(v(a(i)("inventory.stock.history.estimatedValue")) + " ", 1),
|
|
2047
2044
|
y(se, {
|
|
2048
2045
|
variant: "plain",
|
|
@@ -2062,8 +2059,8 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2062
2059
|
]),
|
|
2063
2060
|
_: 1
|
|
2064
2061
|
}),
|
|
2065
|
-
e("div",
|
|
2066
|
-
|
|
2062
|
+
e("div", as, [
|
|
2063
|
+
n.sku.valuation === a(xt).Enum.FIFO ? ($(), Y(oe, { key: 0 }, [
|
|
2067
2064
|
y(W, {
|
|
2068
2065
|
label: "FIFO",
|
|
2069
2066
|
compact: ""
|
|
@@ -2073,7 +2070,7 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2073
2070
|
!1,
|
|
2074
2071
|
ee.value.precision
|
|
2075
2072
|
) : ee.value), 1)
|
|
2076
|
-
], 64)) : ($(), Y(
|
|
2073
|
+
], 64)) : ($(), Y(oe, { key: 1 }, [
|
|
2077
2074
|
de(v(typeof L.value != "string" ? a(we)(
|
|
2078
2075
|
L.value,
|
|
2079
2076
|
!1,
|
|
@@ -2082,10 +2079,10 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2082
2079
|
], 64))
|
|
2083
2080
|
])
|
|
2084
2081
|
]),
|
|
2085
|
-
e("div",
|
|
2082
|
+
e("div", ls, [
|
|
2086
2083
|
y(Qe, { "z-index": 50 }, {
|
|
2087
2084
|
default: T(() => [
|
|
2088
|
-
e("div",
|
|
2085
|
+
e("div", rs, [
|
|
2089
2086
|
de(v(a(i)("inventory.stock.history.costSold")) + " ", 1),
|
|
2090
2087
|
y(se, {
|
|
2091
2088
|
variant: "plain",
|
|
@@ -2093,7 +2090,7 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2093
2090
|
"z-index": 50
|
|
2094
2091
|
}, {
|
|
2095
2092
|
content: T(() => [
|
|
2096
|
-
e("div",
|
|
2093
|
+
e("div", is, v(a(i)("inventory.stock.history.costSoldTooltip")), 1)
|
|
2097
2094
|
]),
|
|
2098
2095
|
default: T(() => [
|
|
2099
2096
|
y(G, {
|
|
@@ -2107,7 +2104,7 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2107
2104
|
]),
|
|
2108
2105
|
_: 1
|
|
2109
2106
|
}),
|
|
2110
|
-
e("div",
|
|
2107
|
+
e("div", us, v(K.value), 1)
|
|
2111
2108
|
])
|
|
2112
2109
|
])
|
|
2113
2110
|
])) : te("", !0)
|
|
@@ -2118,27 +2115,27 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2118
2115
|
_: 1
|
|
2119
2116
|
}),
|
|
2120
2117
|
r[5] || (r[5] = e("div", null, null, -1)),
|
|
2121
|
-
($(!0), Y(
|
|
2118
|
+
($(!0), Y(oe, null, ie(B.value, (ae) => ($(), Y(oe, {
|
|
2122
2119
|
key: ae.date
|
|
2123
2120
|
}, [
|
|
2124
|
-
|
|
2121
|
+
n.sku ? ($(), z(fo, {
|
|
2125
2122
|
key: 0,
|
|
2126
2123
|
record: ae,
|
|
2127
|
-
sku:
|
|
2124
|
+
sku: n.sku,
|
|
2128
2125
|
bills: D.value,
|
|
2129
2126
|
onRefreshHistory: b
|
|
2130
2127
|
}, null, 8, ["record", "sku", "bills"])) : te("", !0)
|
|
2131
2128
|
], 64))), 128))
|
|
2132
|
-
])) : ($(), Y("div",
|
|
2129
|
+
])) : ($(), Y("div", cs, [
|
|
2133
2130
|
y(M),
|
|
2134
2131
|
e("div", null, [
|
|
2135
2132
|
e("img", {
|
|
2136
2133
|
src: a(Kt),
|
|
2137
2134
|
alt: "List is empty"
|
|
2138
|
-
}, null, 8,
|
|
2135
|
+
}, null, 8, ds)
|
|
2139
2136
|
]),
|
|
2140
|
-
e("div",
|
|
2141
|
-
e("div",
|
|
2137
|
+
e("div", ms, v(a(i)("inventory.stock.history.noRecords")), 1),
|
|
2138
|
+
e("div", ps, v(a(i)("inventory.stock.history.changeDateRange")), 1),
|
|
2142
2139
|
y(M),
|
|
2143
2140
|
y(M)
|
|
2144
2141
|
]))
|
|
@@ -2149,14 +2146,14 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2149
2146
|
}, 8, ["modelValue"]);
|
|
2150
2147
|
};
|
|
2151
2148
|
}
|
|
2152
|
-
}),
|
|
2149
|
+
}), vs = {
|
|
2153
2150
|
key: 0,
|
|
2154
2151
|
class: "flex items-center gap-1"
|
|
2155
|
-
},
|
|
2152
|
+
}, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _s = { class: "flex flex-col gap-8" }, ks = { class: "flex flex-col" }, bs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, zs = /* @__PURE__ */ ue({
|
|
2156
2153
|
__name: "StockView",
|
|
2157
2154
|
setup(k) {
|
|
2158
|
-
const { t: g } = ce(), d = Be(),
|
|
2159
|
-
|
|
2155
|
+
const { t: g } = ce(), d = Be(), o = be(), A = Me(), S = dt(), m = he(), i = st(), F = qt(), { columnDefs: j } = sn(), w = Ie(), u = ge();
|
|
2156
|
+
o.watchLocation(D);
|
|
2160
2157
|
const b = P(
|
|
2161
2158
|
() => new Set(F.getAvailableItems(F.businessSubsidiaryId))
|
|
2162
2159
|
), C = O(!1);
|
|
@@ -2183,7 +2180,7 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2183
2180
|
});
|
|
2184
2181
|
}
|
|
2185
2182
|
async function D() {
|
|
2186
|
-
if (
|
|
2183
|
+
if (o._currentLocation) {
|
|
2187
2184
|
C.value = !0;
|
|
2188
2185
|
try {
|
|
2189
2186
|
await A.readStockBalance(), await A.readProductBalance(), await i.readStockEstimateBalance();
|
|
@@ -2216,7 +2213,7 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2216
2213
|
}
|
|
2217
2214
|
]
|
|
2218
2215
|
}), l = P(() => {
|
|
2219
|
-
var
|
|
2216
|
+
var n, r, h;
|
|
2220
2217
|
const J = t.value ? Xt.build(t.value) : null, p = [];
|
|
2221
2218
|
for (const c of d.skus) {
|
|
2222
2219
|
let f = !0;
|
|
@@ -2227,7 +2224,7 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2227
2224
|
J
|
|
2228
2225
|
)), f) {
|
|
2229
2226
|
const M = c.trackingMeasurement;
|
|
2230
|
-
let I = (r = (
|
|
2227
|
+
let I = (r = (n = A.stockBalance.skus) == null ? void 0 : n.find(
|
|
2231
2228
|
(E) => E.id === c._id
|
|
2232
2229
|
)) == null ? void 0 : r.balance, G = i.inventoryForecast.skus.find(
|
|
2233
2230
|
(E) => E.id === c._id
|
|
@@ -2276,13 +2273,13 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2276
2273
|
case "refresh":
|
|
2277
2274
|
return D();
|
|
2278
2275
|
case "export":
|
|
2279
|
-
return
|
|
2276
|
+
return en(l.value);
|
|
2280
2277
|
case "stockAdjustment":
|
|
2281
2278
|
return L();
|
|
2282
2279
|
}
|
|
2283
2280
|
}
|
|
2284
2281
|
return (J, p) => {
|
|
2285
|
-
const
|
|
2282
|
+
const n = U("FmSwitch"), r = U("FmTable");
|
|
2286
2283
|
return $(), z(yt, {
|
|
2287
2284
|
title: a(g)("inventory.stock.title"),
|
|
2288
2285
|
actions: R.value,
|
|
@@ -2312,12 +2309,12 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2312
2309
|
"onUpdate:filter": p[2] || (p[2] = (I) => t.value = I)
|
|
2313
2310
|
}, {
|
|
2314
2311
|
default: T(() => [
|
|
2315
|
-
a(F).isEnabled ? ($(), Y("div",
|
|
2316
|
-
e("span",
|
|
2312
|
+
a(F).isEnabled ? ($(), Y("div", vs, [
|
|
2313
|
+
e("span", ys, v(a(g)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
|
|
2317
2314
|
y($t),
|
|
2318
2315
|
y(ze, null, {
|
|
2319
2316
|
default: T(() => [
|
|
2320
|
-
y(
|
|
2317
|
+
y(n, {
|
|
2321
2318
|
modelValue: _.value,
|
|
2322
2319
|
"onUpdate:modelValue": p[0] || (p[0] = (I) => _.value = I)
|
|
2323
2320
|
}, null, 8, ["modelValue"])
|
|
@@ -2329,12 +2326,12 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2329
2326
|
_: 1
|
|
2330
2327
|
}, 8, ["search", "filter-attributes", "filter"]),
|
|
2331
2328
|
($(), z(r, {
|
|
2332
|
-
style:
|
|
2329
|
+
style: ot(a(K).tableHeight),
|
|
2333
2330
|
"column-defs": a(j),
|
|
2334
2331
|
"row-data": l.value,
|
|
2335
2332
|
"search-value": x.value,
|
|
2336
|
-
loading: C.value || !a(
|
|
2337
|
-
key: (h = a(
|
|
2333
|
+
loading: C.value || !a(o)._currentLocation,
|
|
2334
|
+
key: (h = a(o)._currentLocation) == null ? void 0 : h.dbName,
|
|
2338
2335
|
onRowClick: p[3] || (p[3] = (I) => a(S).showSkuHistory(I.original)),
|
|
2339
2336
|
"page-size": N.value
|
|
2340
2337
|
}, {
|
|
@@ -2346,15 +2343,15 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2346
2343
|
default: T((G) => {
|
|
2347
2344
|
var se, E, W, q, le, re, Z, ae, fe, me;
|
|
2348
2345
|
return [
|
|
2349
|
-
e("div",
|
|
2350
|
-
e("div",
|
|
2351
|
-
e("div",
|
|
2346
|
+
e("div", _s, [
|
|
2347
|
+
e("div", ks, [
|
|
2348
|
+
e("div", bs, [
|
|
2352
2349
|
y(a(Je), {
|
|
2353
2350
|
render: (W = (E = (se = G.code) == null ? void 0 : se.column) == null ? void 0 : E.columnDef) == null ? void 0 : W.cell,
|
|
2354
2351
|
props: (le = (q = G.code) == null ? void 0 : q.getContext) == null ? void 0 : le.call(q)
|
|
2355
2352
|
}, null, 8, ["render", "props"])
|
|
2356
2353
|
]),
|
|
2357
|
-
e("div",
|
|
2354
|
+
e("div", gs, [
|
|
2358
2355
|
y(a(Je), {
|
|
2359
2356
|
render: (ae = (Z = (re = G.name) == null ? void 0 : re.column) == null ? void 0 : Z.columnDef) == null ? void 0 : ae.cell,
|
|
2360
2357
|
props: (me = (fe = G.name) == null ? void 0 : fe.getContext) == null ? void 0 : me.call(fe)
|
|
@@ -2385,10 +2382,10 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2385
2382
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2386
2383
|
], 2),
|
|
2387
2384
|
($(), z(ft, { to: "body" }, [
|
|
2388
|
-
(c = a(S).stockHistoryProps) != null && c.sku ? ($(), z(
|
|
2389
|
-
(f = a(S).convertSkuDialogProps) != null && f.sku ? ($(), z(
|
|
2390
|
-
(M = a(S).adjustSkuDialogProps) != null && M.stock ? ($(), z(
|
|
2391
|
-
X.value ? ($(), z(
|
|
2385
|
+
(c = a(S).stockHistoryProps) != null && c.sku ? ($(), z(fs, Te(He({ key: 0 }, a(S).stockHistoryProps)), null, 16)) : te("", !0),
|
|
2386
|
+
(f = a(S).convertSkuDialogProps) != null && f.sku ? ($(), z(gn, Te(He({ key: 1 }, a(S).convertSkuDialogProps)), null, 16)) : te("", !0),
|
|
2387
|
+
(M = a(S).adjustSkuDialogProps) != null && M.stock ? ($(), z(jn, Te(He({ key: 2 }, a(S).adjustSkuDialogProps)), null, 16)) : te("", !0),
|
|
2388
|
+
X.value ? ($(), z(Yn, {
|
|
2392
2389
|
key: 3,
|
|
2393
2390
|
show: X.value,
|
|
2394
2391
|
"onUpdate:show": p[4] || (p[4] = (I) => X.value = I),
|
|
@@ -2403,5 +2400,5 @@ const bn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, gn = {
|
|
|
2403
2400
|
}
|
|
2404
2401
|
});
|
|
2405
2402
|
export {
|
|
2406
|
-
|
|
2403
|
+
zs as default
|
|
2407
2404
|
};
|