@feedmepos/mf-inventory-portal 1.3.14-dev.1 → 1.3.14-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App-D1_jkD6L.js +309 -0
- package/dist/{ApprovalView-BxioAXpO.js → ApprovalView-CfF2FqsE.js} +12 -12
- package/dist/{BindingsDialog-Dn_hP7Ji.js → BindingsDialog-H-juP-az.js} +2 -2
- package/dist/{BindingsPicker-BEXOUaoI.js → BindingsPicker-ClruHF7p.js} +2 -2
- package/dist/{BindingsTable-CsRLA5J_.js → BindingsTable-Bx9pbFOO.js} +3 -3
- package/dist/{ClosingDraftView-DoH9ZcGA.js → ClosingDraftView-DN97Tao5.js} +137 -137
- package/dist/{ClosingHistoryView-BWf_gIrc.js → ClosingHistoryView-DsRYUqa2.js} +32 -32
- package/dist/{ClosingTemplateView-BKRxzvQX.js → ClosingTemplateView-f9zfsxCu.js} +14 -14
- package/dist/DefaultView-COVVxOrF.js +31 -0
- package/dist/{DeliveryOrderPrintPreview-HzspgQXj.js → DeliveryOrderPrintPreview-BMK4kBCQ.js} +11 -11
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DstxeP1q.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bqj_Ygmo.js} +23 -23
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-E9FFFhwx.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CK1ha_AY.js} +2 -2
- package/dist/{FmMultiselectDialog-3uKA-o0f.js → FmMultiselectDialog-BazT9oUX.js} +1 -1
- package/dist/{FmMultiselectDialog-uFZKKIiO.js → FmMultiselectDialog-_gUuhudi.js} +16 -16
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C1KGaqi7.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBtAgdsA.js} +18 -18
- package/dist/{ImportView-zrNDzp3k.js → ImportView-jpkwuCXO.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-B2vMgXVZ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DLJnF4do.js} +1 -1
- package/dist/{IngredientGroupView-HcAKvPur.js → IngredientGroupView-x3t1hyNn.js} +5 -5
- package/dist/{IngredientsView-CRB5UN-e.js → IngredientsView-BzWTnlb4.js} +15 -15
- package/dist/{IntegrationExplorerView-k3IHeiOU.js → IntegrationExplorerView-Bca3owbx.js} +5 -5
- package/dist/{IntegrationView-B3WeQTDB.js → IntegrationView-Dh1c4Qyo.js} +81 -81
- package/dist/{InventoryBindingForm-B-7SQKl2.js → InventoryBindingForm-B1sI1TGZ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DhPu_GyE.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-7NeE7Xos.js} +15 -15
- package/dist/{InventoryBindingSummary-Swi6A3W2.js → InventoryBindingSummary-R8zHPc52.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Duv0At06.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DMJVh7Nt.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang--gt60IlU.js → PremiumBadge.vue_vue_type_script_setup_true_lang-ChC9sEIk.js} +5 -5
- package/dist/{PublishView-B9HJT61I.js → PublishView-Bqp8Ww4J.js} +13 -13
- package/dist/{PurchaseOrderPrintPreview-sClUXkgt.js → PurchaseOrderPrintPreview-D7TCn8U-.js} +11 -11
- package/dist/{ReceiveRequestView-BbS55juS.js → ReceiveRequestView-oNBVAMYu.js} +23 -23
- package/dist/{RecipeView-BH3asOD4.js → RecipeView-D8Mvgji9.js} +50 -50
- package/dist/{SettingsView-BJAMNNhr.js → SettingsView-BJScLK9z.js} +30 -30
- package/dist/{StockView-DMLFY7d1.js → StockView-CRRdVCcD.js} +143 -143
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeiLMVin.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DUKv_LV6.js} +1 -1
- package/dist/{SupplierView-C3uBrEcc.js → SupplierView-DdBBIV8W.js} +12 -12
- package/dist/{SurchargeView-S9ByD9Nd.js → SurchargeView-DisBUPIs.js} +16 -16
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-ha60Wy7z.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CZ3Q3BAf.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CfyCEElN.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CC7F5HVc.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-CKfs-ns0.js → TransferDetails.vue_vue_type_script_setup_true_lang-BLlg1Vka.js} +212 -212
- package/dist/{TransferTemplateView-zbn5CGiZ.js → TransferTemplateView-7ICJMF9z.js} +17 -17
- package/dist/{UnitCostHistoryView-LhvAybS8.js → UnitCostHistoryView-BMRDBQ58.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-E2QCl521.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-mNXHzLN3.js} +4 -4
- package/dist/{UnitView-6oUdlUVo.js → UnitView-uUUYOjYn.js} +24 -24
- package/dist/{WarehouseView-DQFe99KT.js → WarehouseView-BfMf_iuj.js} +25 -25
- package/dist/{WastageTemplateView-BiYZqiT2.js → WastageTemplateView-BQYjJGZ-.js} +14 -14
- package/dist/{app-SnX9gL_k.js → app-B_zMegJc.js} +4571 -4564
- package/dist/app.d.ts +16 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-Ch--jBk-.js → closing-template-9vhx5Ji1.js} +1 -1
- package/dist/composable/useInventoryAccess.d.ts +11 -0
- package/dist/composable/useNavigationMenu.d.ts +14 -0
- package/dist/{date2-CGqqJOqr.js → date2-BMCS_Dsc.js} +1 -1
- package/dist/{dayjs.min-JnfBpNSN.js → dayjs.min-Dl26OaXo.js} +16 -16
- package/dist/{decimal-C-2MQYNP.js → decimal-e6OK2jkR.js} +2 -2
- package/dist/{defineDeepModel-CUJCBuvw.js → defineDeepModel-BvLlwxnd.js} +1 -1
- package/dist/{duplicate-template-BXg5EQRC.js → duplicate-template-Cnhu8Rxw.js} +1 -1
- package/dist/{empty-placeholder-wf6-BWE8.js → empty-placeholder-B0QU467o.js} +1 -1
- package/dist/{export-DUsFBcmf.js → export-CGvyGmeo.js} +1 -1
- package/dist/{feature-gkhmly57.js → feature-Do41WWzx.js} +23 -23
- package/dist/{format-time-from-id-D1RhcKfL.js → format-time-from-id-CqX_KaUG.js} +1 -1
- package/dist/{format-unit-display-DXs_-yEW.js → format-unit-display-D8qWmRXP.js} +11 -11
- package/dist/{import-export.helper-B84wW0eo.js → import-export.helper-85V8Ib5e.js} +6 -6
- package/dist/{index-Dp1GAjHf.js → index-C-CwnjUn.js} +3 -3
- package/dist/{index-artVJVqL.js → index-Cg3aLEhT.js} +1 -1
- package/dist/{index-D3XgyMwL.js → index-CtUF9Nsv.js} +1 -1
- package/dist/{inventory-core-dart.default-Bu1oVkLC.js → inventory-core-dart.default-B64FzAla.js} +1 -1
- package/dist/{lodash-DZbYS5Vn.js → lodash-U9ycVPlv.js} +1 -1
- package/dist/{lz-string-nX96TtT6.js → lz-string-0CgVsQoC.js} +13 -13
- package/dist/{netsuite-DQkJKCH9.js → netsuite-Du7-sXJt.js} +77 -77
- package/dist/{number-gRrApZRj.js → number-iJAzDfmj.js} +7 -7
- package/dist/{predefined-templates-D9bzSOz_.js → predefined-templates-LlSrXOXm.js} +1 -1
- package/dist/{purchase-order-template-BiE_We2X.js → purchase-order-template-DFuXb0rr.js} +1 -1
- package/dist/{recalculationUtils-zNt-EW5S.js → recalculationUtils-DWPnMW1G.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/{rules-CWFFr_mA.js → rules-DefSKiUN.js} +2 -2
- package/dist/{stock-C-34Vuxz.js → stock-BfF6peMd.js} +3 -3
- package/dist/{stock-V4Oy4QHQ.js → stock-Cx1BwdWs.js} +1 -1
- package/dist/{supplier-DbYagMhS.js → supplier-CU3iqdGr.js} +16 -16
- package/dist/{surcharge-CcvvfLHB.js → surcharge-D77J5opH.js} +12 -12
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-B4jFgJ5b.js → use-ingredient-select-dialog-B-jxV-79.js} +2 -2
- package/dist/{use-inventory-binding-dialog-20flYyGE.js → use-inventory-binding-dialog-BdTd5qPl.js} +2 -2
- package/dist/{use-template-enabled-locations-CpDMbAGF.js → use-template-enabled-locations-vFvaCjlH.js} +2 -2
- package/dist/{useHrmPermission-CZW6u2TS.js → useHrmPermission-CekUhyck.js} +4 -4
- package/dist/useNavigationMenu-BiLWMIip.js +162 -0
- package/dist/views/DefaultView.vue.d.ts +2 -0
- package/dist/{vue-i18n-CUrz9OVK.js → vue-i18n-C3_OsgSl.js} +372 -372
- package/dist/{xlsx-DBsOBE1z.js → xlsx-o7n1whCa.js} +398 -398
- package/dist/{xlsx.util-xziohm10.js → xlsx.util-D6nPboPW.js} +1 -1
- package/package.json +4 -4
- package/dist/App-Cb6qfRCz.js +0 -445
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as me, openBlock as V, createBlock as Q, withCtx as R, createElementVNode as e, toDisplayString as i, unref as s, ref as z, h as ge, computed as Y, watch as Fe, resolveComponent as
|
|
1
|
+
import { defineComponent as me, openBlock as V, createBlock as Q, withCtx as R, createElementVNode as e, toDisplayString as i, unref as s, ref as z, h as ge, computed as Y, watch as Fe, resolveComponent as U, isRef as Pe, createVNode as v, createElementBlock as G, Fragment as ie, renderList as de, createCommentVNode as te, normalizeClass as Ie, reactive as dt, mergeModels as Ze, useModel as xt, onMounted as qe, createTextVNode as pe, normalizeStyle as mt, watchEffect as St, renderSlot as et, Teleport as wt, normalizeProps as Le, mergeProps as ze } from "vue";
|
|
2
2
|
import { u as At, _ as Ft } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-sUxHOj47.js";
|
|
3
|
-
import { u as Ve, c as Ee, a as Re, F as tt,
|
|
4
|
-
import { u as
|
|
3
|
+
import { u as Ve, c as Ee, a as Re, F as tt, t as $t, D as ne, s as Vt, m as jt, B as Ct, w as J, f as je, h as ot, d as nt, J as xe, K as Ce } from "./app-B_zMegJc.js";
|
|
4
|
+
import { u as Ne } from "./stock-BfF6peMd.js";
|
|
5
5
|
import { c as Dt } from "./component-kqxARxvM.js";
|
|
6
|
-
import { _ as ft, o as Bt } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as Ke, S as Ge, g as pt, a as Mt } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as ft, o as Bt } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-mNXHzLN3.js";
|
|
7
|
+
import { _ as Ke, S as Ge, g as pt, a as Mt } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DUKv_LV6.js";
|
|
8
8
|
import { _ as It } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
9
9
|
import { useI18n as fe, useCoreStore as Xe } from "@feedmepos/mf-common";
|
|
10
|
-
import { u as vt, i as Te, _ as st } from "./PremiumBadge.vue_vue_type_script_setup_true_lang
|
|
11
|
-
import { useSnackbar as we, useDialog as
|
|
10
|
+
import { u as vt, i as Te, _ as st } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-ChC9sEIk.js";
|
|
11
|
+
import { useSnackbar as we, useDialog as Oe, useProxiedModel as Ye, useBreakpoints as Tt } from "@feedmepos/ui-library";
|
|
12
12
|
import { defineStore as Ht } from "pinia";
|
|
13
13
|
import { F as Je } from "./FmAdminBadge-DjnBAgyv.js";
|
|
14
|
-
import { g as $e, a as he, e as
|
|
15
|
-
import { u as Ae } from "./stock-
|
|
16
|
-
import { c as
|
|
17
|
-
import { u as Yt } from "./use-inventory-binding-dialog-
|
|
18
|
-
import { a as _t } from "./FmMultiselectDialog-
|
|
19
|
-
import { d as ke } from "./dayjs.min-
|
|
20
|
-
import { _ as Lt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-
|
|
21
|
-
import { g as zt } from "./decimal-
|
|
22
|
-
import { a as Gt, c as Wt, f as kt, t as rt, d as lt, p as Kt, n as qt, b as Xt } from "./date2-
|
|
23
|
-
import { i as Jt, _ as Qt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
24
|
-
import {
|
|
25
|
-
import { F as _e } from "./inventory-core-dart.default-
|
|
26
|
-
import { u as eo } from "./feature-
|
|
27
|
-
import { u as ht } from "./useHrmPermission-
|
|
14
|
+
import { g as $e, a as he, e as Ut, t as He, c as Se, f as Pt, h as at, i as yt, j as Qe, d as Be, k as Et } from "./number-iJAzDfmj.js";
|
|
15
|
+
import { u as Ae } from "./stock-Cx1BwdWs.js";
|
|
16
|
+
import { c as Ue, A as Rt, M as Nt, R as Ot } from "./rules-DefSKiUN.js";
|
|
17
|
+
import { u as Yt } from "./use-inventory-binding-dialog-BdTd5qPl.js";
|
|
18
|
+
import { a as _t } from "./FmMultiselectDialog-_gUuhudi.js";
|
|
19
|
+
import { d as ke } from "./dayjs.min-Dl26OaXo.js";
|
|
20
|
+
import { _ as Lt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DMJVh7Nt.js";
|
|
21
|
+
import { g as zt } from "./decimal-e6OK2jkR.js";
|
|
22
|
+
import { a as Gt, c as Wt, f as kt, t as rt, d as lt, p as Kt, n as qt, b as Xt } from "./date2-BMCS_Dsc.js";
|
|
23
|
+
import { i as Jt, _ as Qt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CK1ha_AY.js";
|
|
24
|
+
import { _ as Zt } from "./empty-placeholder-B0QU467o.js";
|
|
25
|
+
import { F as _e } from "./inventory-core-dart.default-B64FzAla.js";
|
|
26
|
+
import { u as eo } from "./feature-Do41WWzx.js";
|
|
27
|
+
import { u as ht } from "./useHrmPermission-CekUhyck.js";
|
|
28
28
|
import { _ as to, F as it } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
|
|
29
|
-
import { u as oo } from "./netsuite-
|
|
29
|
+
import { u as oo } from "./netsuite-Du7-sXJt.js";
|
|
30
30
|
import { P as no, J as so } from "./app-DiX-EfV6.js";
|
|
31
31
|
var Me = /* @__PURE__ */ ((A) => (A.History = "History", A.Convert = "Convert", A.Adjust = "Adjust", A))(Me || {});
|
|
32
32
|
const ao = [
|
|
@@ -67,7 +67,7 @@ const ao = [
|
|
|
67
67
|
}));
|
|
68
68
|
}
|
|
69
69
|
}), bt = Ht("stockActions", () => {
|
|
70
|
-
const A = z(!1), u = Ve(), _ =
|
|
70
|
+
const A = z(!1), u = Ve(), _ = Ne(), p = vt(), C = we(), j = Oe(), { t: c } = fe();
|
|
71
71
|
async function r() {
|
|
72
72
|
if (u._currentLocation) {
|
|
73
73
|
A.value = !0;
|
|
@@ -321,11 +321,11 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
|
|
|
321
321
|
return $ || !0;
|
|
322
322
|
}
|
|
323
323
|
function o(F) {
|
|
324
|
-
var
|
|
325
|
-
const $ = (
|
|
324
|
+
var N;
|
|
325
|
+
const $ = (N = p.sku.convert) != null && N.measurement ? p.sku.unit.measurements.find((y) => {
|
|
326
326
|
var m;
|
|
327
327
|
return y.id === ((m = p.sku.convert) == null ? void 0 : m.measurement);
|
|
328
|
-
}) ?? null : null, E = $e(p.sku.unit, $), D =
|
|
328
|
+
}) ?? null : null, E = $e(p.sku.unit, $), D = Pt(+F);
|
|
329
329
|
return ut(D).isInteger().max(E).error ? "Precision cannot be more than " + E : !0;
|
|
330
330
|
}
|
|
331
331
|
const x = Y(
|
|
@@ -343,22 +343,22 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
|
|
|
343
343
|
skus: c.skus,
|
|
344
344
|
skuGroups: c.skuGroups,
|
|
345
345
|
recipes: c.recipes
|
|
346
|
-
}).inventoryBindings.filter((
|
|
347
|
-
return (K = l.value ?? $) == null ? void 0 : K.map((
|
|
346
|
+
}).inventoryBindings.filter((N) => "success" in N && N.success).map((N) => N).map((N) => N.binding);
|
|
347
|
+
return (K = l.value ?? $) == null ? void 0 : K.map((N) => {
|
|
348
348
|
var Z, ae, q, ee, re;
|
|
349
|
-
const y = c.skus.find((le) => le._id ===
|
|
349
|
+
const y = c.skus.find((le) => le._id === N.id), m = ((Z = N.measurement) == null ? void 0 : Z.abbrev) ?? ((ae = y == null ? void 0 : y.unit) == null ? void 0 : ae.abbrev), B = (q = p.sku.convert) != null && q.measurement ? p.sku.unit.measurements.find((le) => {
|
|
350
350
|
var ve;
|
|
351
351
|
return le.id === ((ve = p.sku.convert) == null ? void 0 : ve.measurement);
|
|
352
352
|
}) ?? null : null, w = $e(p.sku.unit, B), a = o(`${M.value}`) === !0 ? he(
|
|
353
|
-
|
|
354
|
-
|
|
353
|
+
Ut(
|
|
354
|
+
N.amount,
|
|
355
355
|
He(+M.value, w)
|
|
356
356
|
),
|
|
357
357
|
!1
|
|
358
|
-
) : "0", f = (re = (ee = l.value) == null ? void 0 : ee.find((le) => le.id === (y == null ? void 0 : y._id))) == null ? void 0 : re.amount,
|
|
358
|
+
) : "0", f = (re = (ee = l.value) == null ? void 0 : ee.find((le) => le.id === (y == null ? void 0 : y._id))) == null ? void 0 : re.amount, O = f ? he(f, !1) : null;
|
|
359
359
|
return {
|
|
360
360
|
sku: y,
|
|
361
|
-
convertAmount:
|
|
361
|
+
convertAmount: O ?? a,
|
|
362
362
|
abbrev: m
|
|
363
363
|
};
|
|
364
364
|
});
|
|
@@ -410,14 +410,14 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
|
|
|
410
410
|
function W(F, $, E) {
|
|
411
411
|
const D = +$;
|
|
412
412
|
let K = E;
|
|
413
|
-
$.length > 0 && isFinite(D) ? K = E.map((
|
|
413
|
+
$.length > 0 && isFinite(D) ? K = E.map((N) => (N.id !== F || (N.amount = Se(D)), N)) : K = E.map((N) => (N.id !== F || (N.amount = { amount: 0, precision: 0 }), N)), l.value = K;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function P(F) {
|
|
416
416
|
const $ = d.value.find((E) => E._id === F);
|
|
417
417
|
return $ ? pt($.unit, !0) : [];
|
|
418
418
|
}
|
|
419
419
|
function oe(F, $) {
|
|
420
|
-
const E =
|
|
420
|
+
const E = P(F), D = E.find((K) => K.value === $) ?? E.find((K) => K.value === null);
|
|
421
421
|
return D ? {
|
|
422
422
|
...D,
|
|
423
423
|
label: D.abbrev
|
|
@@ -428,10 +428,10 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
|
|
|
428
428
|
if ($ === null)
|
|
429
429
|
D = E.map((K) => (K.id !== F || (K.measurement = null), K)) ?? [];
|
|
430
430
|
else {
|
|
431
|
-
const K = d.value.find((
|
|
432
|
-
D = E.map((
|
|
431
|
+
const K = d.value.find((N) => N._id === F);
|
|
432
|
+
D = E.map((N) => {
|
|
433
433
|
var y, m;
|
|
434
|
-
return
|
|
434
|
+
return N.id !== F || (N.measurement = (m = (y = K == null ? void 0 : K.unit) == null ? void 0 : y.measurements) == null ? void 0 : m.find((B) => B.id === $)), N;
|
|
435
435
|
}) ?? [];
|
|
436
436
|
}
|
|
437
437
|
l.value = D;
|
|
@@ -457,11 +457,11 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
|
|
|
457
457
|
F || (l.value = null, M.value = 0);
|
|
458
458
|
}
|
|
459
459
|
), (F, $) => {
|
|
460
|
-
const E =
|
|
460
|
+
const E = U("FmTextField"), D = U("FmForm"), K = U("FmCard"), N = U("FmSwitch"), y = U("FmFormGroup"), m = U("FmSelect"), B = U("FmButton"), w = U("FmSideSheet");
|
|
461
461
|
return V(), Q(w, {
|
|
462
462
|
"dismiss-away": "",
|
|
463
463
|
modelValue: s(I),
|
|
464
|
-
"onUpdate:modelValue": $[3] || ($[3] = (a) =>
|
|
464
|
+
"onUpdate:modelValue": $[3] || ($[3] = (a) => Pe(I) ? I.value = a : null),
|
|
465
465
|
"max-width": 500
|
|
466
466
|
}, {
|
|
467
467
|
"side-sheet-header": R(() => [
|
|
@@ -482,7 +482,7 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
|
|
|
482
482
|
"model-value": M.value,
|
|
483
483
|
"onUpdate:modelValue": $[0] || ($[0] = (a) => M.value = a),
|
|
484
484
|
label: s(L)("inventory.stock.convert.amount"),
|
|
485
|
-
rules: [t, o, s(
|
|
485
|
+
rules: [t, o, s(Ue)(0)],
|
|
486
486
|
"append-text": x.value,
|
|
487
487
|
"helper-text": l.value ? void 0 : `Max ${F.maxCount} ${x.value}`
|
|
488
488
|
}, null, 8, ["disabled", "model-value", "label", "rules", "append-text", "helper-text"])
|
|
@@ -497,12 +497,12 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
|
|
|
497
497
|
e("div", vo, [
|
|
498
498
|
e("div", yo, i(s(L)("inventory.stock.convert.deductionSummary")), 1),
|
|
499
499
|
(V(!0), G(ie, null, de(S.value, (a) => {
|
|
500
|
-
var f,
|
|
500
|
+
var f, O;
|
|
501
501
|
return V(), G("div", {
|
|
502
502
|
key: (f = a.sku) == null ? void 0 : f._id,
|
|
503
503
|
class: "flex items-center"
|
|
504
504
|
}, [
|
|
505
|
-
e("div", _o, i((
|
|
505
|
+
e("div", _o, i((O = a.sku) == null ? void 0 : O.name), 1),
|
|
506
506
|
e("div", ko, " -" + i(a.convertAmount) + " " + i(a.abbrev), 1)
|
|
507
507
|
]);
|
|
508
508
|
}), 128))
|
|
@@ -513,7 +513,7 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
|
|
|
513
513
|
v(K, { variant: "outlined" }, {
|
|
514
514
|
default: R(() => [
|
|
515
515
|
e("div", ho, [
|
|
516
|
-
v(
|
|
516
|
+
v(N, {
|
|
517
517
|
value: "",
|
|
518
518
|
modelValue: h.value,
|
|
519
519
|
"onUpdate:modelValue": $[1] || ($[1] = (a) => h.value = a),
|
|
@@ -532,18 +532,18 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
|
|
|
532
532
|
disabled: b.value,
|
|
533
533
|
modelValue: +s(he)(a.amount ?? { amount: 1, precision: 0 }),
|
|
534
534
|
rules: [
|
|
535
|
-
s(
|
|
535
|
+
s(Nt)(
|
|
536
536
|
d.value.find((f) => f._id === a.id).unit,
|
|
537
537
|
a.measurement
|
|
538
538
|
),
|
|
539
|
-
s(
|
|
539
|
+
s(Ue)(0)
|
|
540
540
|
]
|
|
541
541
|
}, {
|
|
542
542
|
default: R(({ invalid: f }) => {
|
|
543
|
-
var
|
|
543
|
+
var O, Z, ae;
|
|
544
544
|
return [
|
|
545
545
|
e("div", xo, [
|
|
546
|
-
e("div", So, i((
|
|
546
|
+
e("div", So, i((O = d.value.find((q) => q._id === a.id)) == null ? void 0 : O.name), 1),
|
|
547
547
|
v(E, {
|
|
548
548
|
class: "xs:col-span-2",
|
|
549
549
|
disabled: b.value,
|
|
@@ -556,7 +556,7 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
|
|
|
556
556
|
v(m, {
|
|
557
557
|
disabled: b.value,
|
|
558
558
|
class: "translate-y-[2px]",
|
|
559
|
-
items:
|
|
559
|
+
items: P(a.id),
|
|
560
560
|
"model-value": (ae = oe(a.id, (Z = a.measurement) == null ? void 0 : Z.id)) == null ? void 0 : ae.value,
|
|
561
561
|
"onUpdate:modelValue": (q) => X(a.id, q, l.value ?? []),
|
|
562
562
|
invalid: f
|
|
@@ -598,8 +598,8 @@ const mo = { class: "flex items-center" }, fo = { class: "fm-typo-en-title-md-80
|
|
|
598
598
|
loading: b.value,
|
|
599
599
|
label: s(L)("inventory.stock.convert.convertButton"),
|
|
600
600
|
onClick: $[2] || ($[2] = (a) => {
|
|
601
|
-
var f,
|
|
602
|
-
return (
|
|
601
|
+
var f, O;
|
|
602
|
+
return (O = (f = g.value) == null ? void 0 : f.validateInputs) == null ? void 0 : O.call(f);
|
|
603
603
|
})
|
|
604
604
|
}, null, 8, ["loading", "label"])
|
|
605
605
|
])
|
|
@@ -649,7 +649,7 @@ const We = {
|
|
|
649
649
|
},
|
|
650
650
|
emits: ["update:modelValue", "click:delete"],
|
|
651
651
|
setup(A, { emit: u }) {
|
|
652
|
-
const _ = A, p = u, { t: C } = fe(), j =
|
|
652
|
+
const _ = A, p = u, { t: C } = fe(), j = Ne(), c = Y(
|
|
653
653
|
() => Object.keys(We).map((t) => ({
|
|
654
654
|
label: Vt(t),
|
|
655
655
|
value: t
|
|
@@ -718,7 +718,7 @@ const We = {
|
|
|
718
718
|
() => zt(h.value, _.modelValue.doc.unit)
|
|
719
719
|
), n = Y(() => H.value.amount < 0);
|
|
720
720
|
return (t, o) => {
|
|
721
|
-
const x =
|
|
721
|
+
const x = U("FmButton"), S = U("FmSelect"), g = U("FmTextarea"), I = U("FmCard");
|
|
722
722
|
return V(), Q(I, {
|
|
723
723
|
variant: "outlined",
|
|
724
724
|
class: "grid grid-cols-2 gap-8 p-16"
|
|
@@ -742,7 +742,7 @@ const We = {
|
|
|
742
742
|
items: c.value,
|
|
743
743
|
modelValue: k.value,
|
|
744
744
|
"onUpdate:modelValue": o[1] || (o[1] = (T) => k.value = T),
|
|
745
|
-
rules: [s(
|
|
745
|
+
rules: [s(Ot)()],
|
|
746
746
|
"label-mark": "required"
|
|
747
747
|
}, null, 8, ["disabled", "items", "modelValue", "rules"]),
|
|
748
748
|
v(Lt, {
|
|
@@ -754,7 +754,7 @@ const We = {
|
|
|
754
754
|
}),
|
|
755
755
|
modelValue: L.value,
|
|
756
756
|
"onUpdate:modelValue": o[2] || (o[2] = (T) => L.value = T),
|
|
757
|
-
rules: [s(
|
|
757
|
+
rules: [s(Ue)(0)]
|
|
758
758
|
}, null, 8, ["disabled", "step", "modelValue", "rules"]),
|
|
759
759
|
v(S, {
|
|
760
760
|
disabled: t.disabled,
|
|
@@ -782,7 +782,7 @@ const We = {
|
|
|
782
782
|
});
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
|
-
}), Bo = { class: "flex items-center" }, Mo = { class: "fm-typo-en-title-md-800" }, Io = { class: "flex items-center" }, To = { class: "fm-typo-en-title-sm-800 flex-1" }, Ho = { class: "flex gap-8" },
|
|
785
|
+
}), Bo = { class: "flex items-center" }, Mo = { class: "fm-typo-en-title-md-800" }, Io = { class: "flex items-center" }, To = { class: "fm-typo-en-title-sm-800 flex-1" }, Ho = { class: "flex gap-8" }, Uo = /* @__PURE__ */ me({
|
|
786
786
|
__name: "AdjustSkuDialog",
|
|
787
787
|
props: {
|
|
788
788
|
stock: {},
|
|
@@ -790,7 +790,7 @@ const We = {
|
|
|
790
790
|
},
|
|
791
791
|
emits: ["update:show", "submitted"],
|
|
792
792
|
setup(A, { expose: u, emit: _ }) {
|
|
793
|
-
const p = A, C = _, j = Re(), c =
|
|
793
|
+
const p = A, C = _, j = Re(), c = Oe(), r = Ae(), k = we(), L = z(!1), { t: M } = fe();
|
|
794
794
|
function l() {
|
|
795
795
|
b(Ee(h));
|
|
796
796
|
}
|
|
@@ -900,10 +900,10 @@ const We = {
|
|
|
900
900
|
h.adjustments.splice(o, 1);
|
|
901
901
|
}
|
|
902
902
|
return (o, x) => {
|
|
903
|
-
const S =
|
|
903
|
+
const S = U("FmTextarea"), g = U("FmButton"), I = U("FmForm"), T = U("FmSideSheet");
|
|
904
904
|
return V(), Q(T, {
|
|
905
905
|
modelValue: s(H),
|
|
906
|
-
"onUpdate:modelValue": x[2] || (x[2] = (W) =>
|
|
906
|
+
"onUpdate:modelValue": x[2] || (x[2] = (W) => Pe(H) ? H.value = W : null),
|
|
907
907
|
"dismiss-away": "",
|
|
908
908
|
"max-width": 500
|
|
909
909
|
}, {
|
|
@@ -934,11 +934,11 @@ const We = {
|
|
|
934
934
|
onClick: n
|
|
935
935
|
})
|
|
936
936
|
]),
|
|
937
|
-
(V(!0), G(ie, null, de(h.adjustments, (W,
|
|
937
|
+
(V(!0), G(ie, null, de(h.adjustments, (W, P) => (V(), Q(gt, {
|
|
938
938
|
key: W.id,
|
|
939
|
-
modelValue: h.adjustments[
|
|
940
|
-
"onUpdate:modelValue": (oe) => h.adjustments[
|
|
941
|
-
"onClick:delete": (oe) => t(
|
|
939
|
+
modelValue: h.adjustments[P],
|
|
940
|
+
"onUpdate:modelValue": (oe) => h.adjustments[P] = oe,
|
|
941
|
+
"onClick:delete": (oe) => t(P)
|
|
942
942
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onClick:delete"]))), 128))
|
|
943
943
|
]),
|
|
944
944
|
_: 1
|
|
@@ -950,8 +950,8 @@ const We = {
|
|
|
950
950
|
label: s(M)("inventory.stock.adjust.adjustButton"),
|
|
951
951
|
loading: L.value,
|
|
952
952
|
onClick: x[1] || (x[1] = (W) => {
|
|
953
|
-
var
|
|
954
|
-
return (oe = (
|
|
953
|
+
var P, oe;
|
|
954
|
+
return (oe = (P = d.value) == null ? void 0 : P.validateInputs) == null ? void 0 : oe.call(P);
|
|
955
955
|
})
|
|
956
956
|
}, null, 8, ["label", "loading"])
|
|
957
957
|
])
|
|
@@ -960,14 +960,14 @@ const We = {
|
|
|
960
960
|
}, 8, ["modelValue"]);
|
|
961
961
|
};
|
|
962
962
|
}
|
|
963
|
-
}),
|
|
963
|
+
}), Po = { class: "flex items-center w-full gap-8" }, Eo = { class: "fm-typo-en-title-md-800 flex-1" }, Ro = { class: "flex flex-col gap-16" }, No = { class: "flex flex-col gap-4" }, Oo = { class: "fm-typo-en-body-md-600" }, Yo = { class: "flex gap-8 items-start" }, Lo = { class: "flex-1 min-w-0" }, zo = { class: "flex-1 min-w-0" }, Go = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Wo = { class: "flex items-center" }, Ko = { class: "fm-typo-en-title-sm-800 flex-1" }, qo = { class: "flex gap-8" }, Xo = /* @__PURE__ */ me({
|
|
964
964
|
__name: "StockAdjustmentSideSheet",
|
|
965
965
|
props: {
|
|
966
966
|
show: { type: Boolean }
|
|
967
967
|
},
|
|
968
968
|
emits: ["update:show", "submitted"],
|
|
969
969
|
setup(A, { emit: u }) {
|
|
970
|
-
const _ = A, p = u, { t: C } = fe(), j = Re(), c = Ae(), r =
|
|
970
|
+
const _ = A, p = u, { t: C } = fe(), j = Re(), c = Ae(), r = Oe(), k = we(), L = Ye(_, "show"), M = z(!1), l = dt({
|
|
971
971
|
remark: "",
|
|
972
972
|
effectiveAt: /* @__PURE__ */ new Date(),
|
|
973
973
|
adjustments: []
|
|
@@ -1047,9 +1047,9 @@ const We = {
|
|
|
1047
1047
|
M.value = !0;
|
|
1048
1048
|
try {
|
|
1049
1049
|
const S = l.adjustments.map(
|
|
1050
|
-
({ doc: I, remark: T, type: W, amount:
|
|
1050
|
+
({ doc: I, remark: T, type: W, amount: P, measurement: oe }) => ({
|
|
1051
1051
|
id: I._id,
|
|
1052
|
-
amount:
|
|
1052
|
+
amount: P,
|
|
1053
1053
|
measurement: oe,
|
|
1054
1054
|
remark: T,
|
|
1055
1055
|
doc: I,
|
|
@@ -1072,16 +1072,16 @@ const We = {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
}
|
|
1074
1074
|
return (S, g) => {
|
|
1075
|
-
const I =
|
|
1075
|
+
const I = U("FmTextarea"), T = U("FmDatePicker"), W = U("FmTimePicker"), P = U("FmButton"), oe = U("FmSideSheet");
|
|
1076
1076
|
return V(), Q(oe, {
|
|
1077
1077
|
modelValue: s(L),
|
|
1078
|
-
"onUpdate:modelValue": g[4] || (g[4] = (X) =>
|
|
1078
|
+
"onUpdate:modelValue": g[4] || (g[4] = (X) => Pe(L) ? L.value = X : null),
|
|
1079
1079
|
"dismiss-away": "",
|
|
1080
1080
|
"max-width": 560,
|
|
1081
1081
|
onAfterEnter: b
|
|
1082
1082
|
}, {
|
|
1083
1083
|
"side-sheet-header": R(() => [
|
|
1084
|
-
e("div",
|
|
1084
|
+
e("div", Po, [
|
|
1085
1085
|
e("div", Eo, i(s(C)("inventory.stock.stock_adjustment.title")), 1)
|
|
1086
1086
|
])
|
|
1087
1087
|
]),
|
|
@@ -1093,8 +1093,8 @@ const We = {
|
|
|
1093
1093
|
"onUpdate:modelValue": g[0] || (g[0] = (X) => l.remark = X),
|
|
1094
1094
|
"label-mark": "optional"
|
|
1095
1095
|
}, null, 8, ["label", "modelValue"]),
|
|
1096
|
-
e("div",
|
|
1097
|
-
e("label",
|
|
1096
|
+
e("div", No, [
|
|
1097
|
+
e("label", Oo, i(s(C)("inventory.stock.stock_adjustment.effectiveAt")), 1),
|
|
1098
1098
|
e("div", Yo, [
|
|
1099
1099
|
e("div", Lo, [
|
|
1100
1100
|
v(T, {
|
|
@@ -1118,7 +1118,7 @@ const We = {
|
|
|
1118
1118
|
]),
|
|
1119
1119
|
e("div", Wo, [
|
|
1120
1120
|
e("div", Ko, i(s(C)("inventory.stock.adjust.adjustedItems")), 1),
|
|
1121
|
-
v(
|
|
1121
|
+
v(P, {
|
|
1122
1122
|
"prepend-icon": "add",
|
|
1123
1123
|
variant: "tertiary",
|
|
1124
1124
|
size: "md",
|
|
@@ -1135,12 +1135,12 @@ const We = {
|
|
|
1135
1135
|
]),
|
|
1136
1136
|
"side-sheet-footer": R(() => [
|
|
1137
1137
|
e("div", qo, [
|
|
1138
|
-
v(
|
|
1138
|
+
v(P, {
|
|
1139
1139
|
label: s(C)("common.confirm"),
|
|
1140
1140
|
loading: M.value,
|
|
1141
1141
|
onClick: x
|
|
1142
1142
|
}, null, 8, ["label", "loading"]),
|
|
1143
|
-
v(
|
|
1143
|
+
v(P, {
|
|
1144
1144
|
label: s(C)("common.close"),
|
|
1145
1145
|
variant: "tertiary",
|
|
1146
1146
|
onClick: g[3] || (g[3] = (X) => p("update:show", !1))
|
|
@@ -1211,8 +1211,8 @@ const We = {
|
|
|
1211
1211
|
const { skuId: t, idx: o, unit: x, measurement: S } = n;
|
|
1212
1212
|
return Y({
|
|
1213
1213
|
get: () => {
|
|
1214
|
-
var T, W,
|
|
1215
|
-
const g = (
|
|
1214
|
+
var T, W, P;
|
|
1215
|
+
const g = (P = (W = (T = j.value) == null ? void 0 : T[t]) == null ? void 0 : W[o]) == null ? void 0 : P.amount;
|
|
1216
1216
|
return g ? Number(_e.toFormatString({ value: g })) : 0;
|
|
1217
1217
|
},
|
|
1218
1218
|
set: (g) => {
|
|
@@ -1242,17 +1242,17 @@ const We = {
|
|
|
1242
1242
|
return o ? _e.toFormatString({ value: o }) : "N/A";
|
|
1243
1243
|
}
|
|
1244
1244
|
return (n, t) => {
|
|
1245
|
-
const o =
|
|
1245
|
+
const o = U("FmIcon"), x = U("FmStepperField"), S = U("FmCard"), g = U("FmForm"), I = U("FmSpacer"), T = U("FmButton"), W = U("FmDialog");
|
|
1246
1246
|
return V(), Q(W, {
|
|
1247
1247
|
modelValue: k.value,
|
|
1248
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
1248
|
+
"onUpdate:modelValue": t[4] || (t[4] = (P) => k.value = P),
|
|
1249
1249
|
overlay: !0
|
|
1250
1250
|
}, {
|
|
1251
1251
|
"dialog-button": R(() => [
|
|
1252
1252
|
v(Je, null, {
|
|
1253
1253
|
default: R(() => [
|
|
1254
1254
|
e("button", {
|
|
1255
|
-
onClick: t[0] || (t[0] = (
|
|
1255
|
+
onClick: t[0] || (t[0] = (P) => k.value = !0),
|
|
1256
1256
|
class: "rounded-md hover:bg-gray-100 transition-colors"
|
|
1257
1257
|
}, [
|
|
1258
1258
|
v(o, {
|
|
@@ -1277,7 +1277,7 @@ const We = {
|
|
|
1277
1277
|
label: "Close",
|
|
1278
1278
|
size: "md",
|
|
1279
1279
|
variant: "tertiary",
|
|
1280
|
-
onClick: t[3] || (t[3] = (
|
|
1280
|
+
onClick: t[3] || (t[3] = (P) => k.value = !1)
|
|
1281
1281
|
}),
|
|
1282
1282
|
v(T, {
|
|
1283
1283
|
class: "sm:w-full xs:w-full",
|
|
@@ -1309,16 +1309,16 @@ const We = {
|
|
|
1309
1309
|
pe(" " + i(s(Gt)(s(Ct)(L.value._id))), 1)
|
|
1310
1310
|
]),
|
|
1311
1311
|
e("div", en, [
|
|
1312
|
-
(V(!0), G(ie, null, de(L.value.skus, (
|
|
1313
|
-
(V(!0), G(ie, null, de(
|
|
1312
|
+
(V(!0), G(ie, null, de(L.value.skus, (P, oe) => (V(), G(ie, { key: oe }, [
|
|
1313
|
+
(V(!0), G(ie, null, de(P.amounts, (X, ue) => (V(), Q(S, {
|
|
1314
1314
|
key: ue,
|
|
1315
1315
|
variant: "outlined",
|
|
1316
1316
|
class: "p-2"
|
|
1317
1317
|
}, {
|
|
1318
1318
|
default: R(() => [
|
|
1319
1319
|
e("div", tn, [
|
|
1320
|
-
e("span", on, i(
|
|
1321
|
-
e("span", null, i(
|
|
1320
|
+
e("span", on, i(P.sku.code), 1),
|
|
1321
|
+
e("span", null, i(P.sku.name), 1)
|
|
1322
1322
|
]),
|
|
1323
1323
|
t[12] || (t[12] = e("hr", { class: "m-2" }, null, -1)),
|
|
1324
1324
|
e("div", nn, [
|
|
@@ -1327,27 +1327,27 @@ const We = {
|
|
|
1327
1327
|
]),
|
|
1328
1328
|
e("div", sn, [
|
|
1329
1329
|
t[9] || (t[9] = e("span", { class: "fm-typo-en-body-lg-600" }, "Current amount:", -1)),
|
|
1330
|
-
e("span", null, i(s(_e).toFormatString({ value: X.amount })) + " " + i(h(
|
|
1330
|
+
e("span", null, i(s(_e).toFormatString({ value: X.amount })) + " " + i(h(P, X)), 1)
|
|
1331
1331
|
]),
|
|
1332
1332
|
v(x, {
|
|
1333
|
-
"max-fraction-digits": s($e)(
|
|
1333
|
+
"max-fraction-digits": s($e)(P.sku.unit),
|
|
1334
1334
|
"model-value": d({
|
|
1335
|
-
skuId:
|
|
1335
|
+
skuId: P.sku._id,
|
|
1336
1336
|
idx: ue,
|
|
1337
|
-
unit:
|
|
1337
|
+
unit: P.sku.unit
|
|
1338
1338
|
}).value,
|
|
1339
1339
|
"onUpdate:modelValue": (se) => d({
|
|
1340
|
-
skuId:
|
|
1340
|
+
skuId: P.sku._id,
|
|
1341
1341
|
idx: ue,
|
|
1342
|
-
unit:
|
|
1342
|
+
unit: P.sku.unit
|
|
1343
1343
|
}).value = se,
|
|
1344
1344
|
class: "mb-3",
|
|
1345
1345
|
label: "Adjust Amount (Leave 0 to skip)",
|
|
1346
1346
|
"helper-text": `Max: ${H(X.amount)}`,
|
|
1347
|
-
"append-text": h(
|
|
1347
|
+
"append-text": h(P, X),
|
|
1348
1348
|
rules: [
|
|
1349
1349
|
(se) => se <= H(X.amount) || `Cannot be more than ${H(X.amount)}`,
|
|
1350
|
-
s(
|
|
1350
|
+
s(Ue)(-1)
|
|
1351
1351
|
]
|
|
1352
1352
|
}, null, 8, ["max-fraction-digits", "model-value", "onUpdate:modelValue", "helper-text", "append-text", "rules"]),
|
|
1353
1353
|
e("div", an, [
|
|
@@ -1357,12 +1357,12 @@ const We = {
|
|
|
1357
1357
|
X.amount,
|
|
1358
1358
|
s(_e).fromNumber(
|
|
1359
1359
|
d({
|
|
1360
|
-
skuId:
|
|
1360
|
+
skuId: P.sku._id,
|
|
1361
1361
|
idx: ue,
|
|
1362
|
-
unit:
|
|
1362
|
+
unit: P.sku.unit
|
|
1363
1363
|
}).value
|
|
1364
1364
|
)
|
|
1365
|
-
)) + " " + i(h(
|
|
1365
|
+
)) + " " + i(h(P, X)), 1)
|
|
1366
1366
|
])
|
|
1367
1367
|
]),
|
|
1368
1368
|
_: 2
|
|
@@ -1496,7 +1496,7 @@ const We = {
|
|
|
1496
1496
|
})
|
|
1497
1497
|
})));
|
|
1498
1498
|
return (M, l) => {
|
|
1499
|
-
const d =
|
|
1499
|
+
const d = U("FmIcon"), H = U("FmTooltip"), h = U("FmCard");
|
|
1500
1500
|
return V(), Q(h, { variant: "outlined" }, {
|
|
1501
1501
|
default: R(() => [
|
|
1502
1502
|
e("div", cn, [
|
|
@@ -1663,10 +1663,10 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1663
1663
|
}, Mn = { class: "fm-typo-en-body-lg-400 translate-x-4" }, In = {
|
|
1664
1664
|
key: 1,
|
|
1665
1665
|
class: "flex flex-col gap-12"
|
|
1666
|
-
}, Tn = { class: "pb-16" }, Hn = { class: "fm-typo-cn-body-lg-600" },
|
|
1666
|
+
}, Tn = { class: "pb-16" }, Hn = { class: "fm-typo-cn-body-lg-600" }, Un = {
|
|
1667
1667
|
class: "grid gap-12 fm-typo-en-body-md-400",
|
|
1668
1668
|
style: { "grid-template-columns": "auto auto auto", "grid-auto-rows": "1fr" }
|
|
1669
|
-
},
|
|
1669
|
+
}, Pn = { class: "flex flex-col gap-1" }, En = { class: "text-fm-color-typo-secondary" }, Rn = { class: "font-bold" }, Nn = { class: "flex flex-col gap-1" }, On = { class: "text-fm-color-typo-secondary flex" }, Yn = { class: "font-bold" }, Ln = { class: "flex flex-col gap-1" }, zn = { class: "text-fm-color-typo-secondary" }, Gn = { class: "font-bold" }, Wn = { class: "flex flex-col gap-1" }, Kn = { class: "text-fm-color-typo-secondary" }, qn = { class: "font-bold" }, Xn = { class: "flex flex-col gap-1" }, Jn = { class: "text-fm-color-typo-secondary" }, Qn = { class: "font-bold" }, Zn = { class: "flex flex-col gap-1" }, es = { class: "text-fm-color-typo-secondary" }, ts = { class: "font-bold" }, os = { class: "flex flex-col gap-1" }, ns = { class: "text-fm-color-typo-secondary" }, ss = { class: "font-bold" }, as = { class: "flex flex-col gap-1" }, rs = { class: "text-fm-color-typo-secondary" }, ls = { class: "font-bold" }, is = { class: "flex flex-col gap-1" }, us = { class: "text-fm-color-typo-secondary" }, cs = { class: "font-bold" }, ds = {
|
|
1670
1670
|
key: 0,
|
|
1671
1671
|
class: "flex flex-col gap-8"
|
|
1672
1672
|
}, ms = { class: "flex" }, fs = { class: "flex-1 flex flex-col gap-1" }, ps = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, vs = { class: "font-bold" }, ys = { class: "flex-1 flex flex-col gap-1" }, _s = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, ks = { class: "flex flex-col gap-1" }, hs = { class: "font-bold" }, bs = {
|
|
@@ -1680,7 +1680,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1680
1680
|
},
|
|
1681
1681
|
emits: ["update:show"],
|
|
1682
1682
|
setup(A) {
|
|
1683
|
-
const u = Xe(), _ =
|
|
1683
|
+
const u = Xe(), _ = Ne(), p = Ae(), C = Jo(), j = Ve(), c = eo(), { t: r } = fe(), k = A, L = z(!1), M = we(), l = z("adjustment"), d = z([
|
|
1684
1684
|
{ label: "Adjustment (Default)", value: "adjustment" }
|
|
1685
1685
|
]), H = z([]), h = z(Jt(0));
|
|
1686
1686
|
async function b() {
|
|
@@ -1712,8 +1712,8 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1712
1712
|
const f = a.effectiveAt ?? Te(a._id);
|
|
1713
1713
|
if (!f)
|
|
1714
1714
|
return w;
|
|
1715
|
-
const
|
|
1716
|
-
return w[
|
|
1715
|
+
const O = x(new Date(f), m);
|
|
1716
|
+
return w[O] ?? (w[O] = []), w[O].push(a), w;
|
|
1717
1717
|
},
|
|
1718
1718
|
{}
|
|
1719
1719
|
);
|
|
@@ -1772,10 +1772,10 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1772
1772
|
}), W = Y(() => {
|
|
1773
1773
|
const y = n.value, m = k.sku;
|
|
1774
1774
|
return Fn(y, m);
|
|
1775
|
-
}),
|
|
1775
|
+
}), P = Y(() => {
|
|
1776
1776
|
const y = [...n.value].computeFirst((B) => {
|
|
1777
1777
|
var a, f;
|
|
1778
|
-
const w = (f = (a = B.skus) == null ? void 0 : a.find) == null ? void 0 : f.call(a, (
|
|
1778
|
+
const w = (f = (a = B.skus) == null ? void 0 : a.find) == null ? void 0 : f.call(a, (O) => O.sku._id === k.sku._id);
|
|
1779
1779
|
return w == null ? void 0 : w.fromBalance;
|
|
1780
1780
|
}) ?? {
|
|
1781
1781
|
amount: 0,
|
|
@@ -1788,7 +1788,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1788
1788
|
}), oe = Y(() => {
|
|
1789
1789
|
const y = [...n.value].reverse().computeFirst((B) => {
|
|
1790
1790
|
var a, f;
|
|
1791
|
-
const w = (f = (a = B.skus) == null ? void 0 : a.find) == null ? void 0 : f.call(a, (
|
|
1791
|
+
const w = (f = (a = B.skus) == null ? void 0 : a.find) == null ? void 0 : f.call(a, (O) => O.sku._id === k.sku._id);
|
|
1792
1792
|
return w == null ? void 0 : w.toBalance;
|
|
1793
1793
|
}) ?? {
|
|
1794
1794
|
amount: 0,
|
|
@@ -1804,12 +1804,12 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1804
1804
|
(w, a) => {
|
|
1805
1805
|
const f = a.cost;
|
|
1806
1806
|
if (!f) return w;
|
|
1807
|
-
const
|
|
1807
|
+
const O = {
|
|
1808
1808
|
...Et(w, Math.max(w.precision, f.precision)),
|
|
1809
1809
|
currency: f.currency
|
|
1810
1810
|
};
|
|
1811
1811
|
return {
|
|
1812
|
-
...Qe(
|
|
1812
|
+
...Qe(O, f),
|
|
1813
1813
|
currency: w.currency
|
|
1814
1814
|
};
|
|
1815
1815
|
},
|
|
@@ -1837,15 +1837,15 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1837
1837
|
);
|
|
1838
1838
|
if (B.length === 0) return null;
|
|
1839
1839
|
const w = B.find((f) => {
|
|
1840
|
-
const
|
|
1841
|
-
return (
|
|
1840
|
+
const O = f.meta;
|
|
1841
|
+
return (O == null ? void 0 : O.adjustmentId) === y;
|
|
1842
1842
|
});
|
|
1843
1843
|
if (w) return w.cost;
|
|
1844
|
-
const a = [...B].filter((f) => new Date(f.snapshotAt) <= new Date(m)).sort((f,
|
|
1844
|
+
const a = [...B].filter((f) => new Date(f.snapshotAt) <= new Date(m)).sort((f, O) => new Date(O.snapshotAt).getTime() - new Date(f.snapshotAt).getTime());
|
|
1845
1845
|
return a.length > 0 ? a[0].cost : null;
|
|
1846
1846
|
}
|
|
1847
1847
|
const $ = Y(() => {
|
|
1848
|
-
var w, a, f,
|
|
1848
|
+
var w, a, f, O, Z, ae;
|
|
1849
1849
|
const y = [...n.value].reverse().find((q) => {
|
|
1850
1850
|
var ee, re;
|
|
1851
1851
|
return (re = (ee = q.skus) == null ? void 0 : ee.find) == null ? void 0 : re.call(ee, (le) => le.sku._id === k.sku._id);
|
|
@@ -1861,7 +1861,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1861
1861
|
}, re = q.amount, le = re.amount == 0 ? J.fromNumber(0) : J.divide([ee, re]);
|
|
1862
1862
|
return {
|
|
1863
1863
|
...J.multiply([le, B]),
|
|
1864
|
-
currency: ((
|
|
1864
|
+
currency: ((O = q.cost) == null ? void 0 : O.currency) || je(((Z = u.currentCountry) == null ? void 0 : Z.value) ?? ot)
|
|
1865
1865
|
};
|
|
1866
1866
|
} else {
|
|
1867
1867
|
const q = y.effectiveAt ?? Te(y._id), ee = F(
|
|
@@ -1878,8 +1878,8 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1878
1878
|
}), E = Y(() => {
|
|
1879
1879
|
var B;
|
|
1880
1880
|
const y = [...n.value].reverse().computeFirst((w) => {
|
|
1881
|
-
var f,
|
|
1882
|
-
const a = (
|
|
1881
|
+
var f, O;
|
|
1882
|
+
const a = (O = (f = w.skus) == null ? void 0 : f.find) == null ? void 0 : O.call(f, (Z) => Z.sku._id === k.sku._id);
|
|
1883
1883
|
return a == null ? void 0 : a.toCostBalances;
|
|
1884
1884
|
});
|
|
1885
1885
|
return y ? {
|
|
@@ -1897,13 +1897,13 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1897
1897
|
endDate: m
|
|
1898
1898
|
});
|
|
1899
1899
|
}
|
|
1900
|
-
const
|
|
1900
|
+
const N = Ye(k, "show");
|
|
1901
1901
|
return (y, m) => {
|
|
1902
|
-
const B =
|
|
1902
|
+
const B = U("FmButton"), w = U("FmField"), a = U("FmDateRangePicker"), f = U("FmSpacer"), O = U("FmCircularProgress"), Z = U("FmIcon"), ae = U("FmTooltip"), q = U("FmMenuDivider"), ee = U("FmChip"), re = U("FmSelect"), le = U("FmCardSection"), ve = U("FmCard"), be = U("FmSideSheet");
|
|
1903
1903
|
return V(), Q(be, {
|
|
1904
1904
|
"dismiss-away": "",
|
|
1905
|
-
modelValue: s(
|
|
1906
|
-
"onUpdate:modelValue": m[5] || (m[5] = (ye) =>
|
|
1905
|
+
modelValue: s(N),
|
|
1906
|
+
"onUpdate:modelValue": m[5] || (m[5] = (ye) => Pe(N) ? N.value = ye : null),
|
|
1907
1907
|
"close-button": !1,
|
|
1908
1908
|
"max-width": 560
|
|
1909
1909
|
}, {
|
|
@@ -1913,7 +1913,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1913
1913
|
v(B, {
|
|
1914
1914
|
variant: "tertiary",
|
|
1915
1915
|
"prepend-icon": "close",
|
|
1916
|
-
onClick: m[0] || (m[0] = (ye) =>
|
|
1916
|
+
onClick: m[0] || (m[0] = (ye) => N.value = !1)
|
|
1917
1917
|
})
|
|
1918
1918
|
])
|
|
1919
1919
|
]),
|
|
@@ -1958,7 +1958,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1958
1958
|
]),
|
|
1959
1959
|
L.value ? (V(), G("div", Bn, [
|
|
1960
1960
|
v(f),
|
|
1961
|
-
v(
|
|
1961
|
+
v(O, { size: "xl" }),
|
|
1962
1962
|
e("div", Mn, i(s(r)("inventory.stock.history.loading")), 1),
|
|
1963
1963
|
v(f),
|
|
1964
1964
|
v(f)
|
|
@@ -1970,13 +1970,13 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
1970
1970
|
e("div", Tn, [
|
|
1971
1971
|
e("div", Hn, i(s(r)("inventory.stock.history.summary.title")), 1)
|
|
1972
1972
|
]),
|
|
1973
|
-
e("div",
|
|
1974
|
-
e("div",
|
|
1973
|
+
e("div", Un, [
|
|
1974
|
+
e("div", Pn, [
|
|
1975
1975
|
e("div", En, i(s(r)("inventory.stock.history.summary.totalPurchase")), 1),
|
|
1976
1976
|
e("div", Rn, i(T.value.PURCHASE), 1)
|
|
1977
1977
|
]),
|
|
1978
|
-
e("div",
|
|
1979
|
-
e("div",
|
|
1978
|
+
e("div", Nn, [
|
|
1979
|
+
e("div", On, [
|
|
1980
1980
|
pe(i(s(r)("inventory.stock.history.summary.totalSales")) + " ", 1),
|
|
1981
1981
|
W.value != null ? (V(), Q(ae, {
|
|
1982
1982
|
key: 0,
|
|
@@ -2018,7 +2018,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
2018
2018
|
]),
|
|
2019
2019
|
e("div", as, [
|
|
2020
2020
|
e("div", rs, i(s(r)("inventory.stock.history.summary.openingBalance")), 1),
|
|
2021
|
-
e("div", ls, i(
|
|
2021
|
+
e("div", ls, i(P.value), 1)
|
|
2022
2022
|
]),
|
|
2023
2023
|
e("div", is, [
|
|
2024
2024
|
e("div", us, i(s(r)("inventory.stock.history.summary.lastStockBalance")), 1),
|
|
@@ -2171,14 +2171,14 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
2171
2171
|
}, $s = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vs = { class: "flex flex-col gap-8" }, js = { class: "flex flex-col" }, Cs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ds = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, ia = /* @__PURE__ */ me({
|
|
2172
2172
|
__name: "StockView",
|
|
2173
2173
|
setup(A) {
|
|
2174
|
-
const { t: u } = fe(), _ = Re(), p = Ve(), C =
|
|
2174
|
+
const { t: u } = fe(), _ = Re(), p = Ve(), C = Ne(), j = bt(), c = Ae(), r = vt(), k = oo(), { columnDefs: L } = uo(), M = Xe(), { hasPermission: l } = ht(
|
|
2175
2175
|
Y(() => [{ action: Ce.Action.manage, subject: Ce.Subject.Business.inventory_stockAdjustment }])
|
|
2176
2176
|
), d = Y(
|
|
2177
2177
|
() => {
|
|
2178
2178
|
var E;
|
|
2179
2179
|
return l.value || ((E = M.sessionUser.value) == null ? void 0 : E.role.isAdmin);
|
|
2180
2180
|
}
|
|
2181
|
-
), H =
|
|
2181
|
+
), H = Oe(), h = we();
|
|
2182
2182
|
p.watchLocation(o);
|
|
2183
2183
|
const b = Y(
|
|
2184
2184
|
() => new Set(k.getAvailableItems(k.businessSubsidiaryId))
|
|
@@ -2239,7 +2239,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
2239
2239
|
}
|
|
2240
2240
|
]
|
|
2241
2241
|
}), g = Y(() => {
|
|
2242
|
-
var K,
|
|
2242
|
+
var K, N, y;
|
|
2243
2243
|
const E = S.value ? no.build(S.value) : null, D = [];
|
|
2244
2244
|
for (const m of _.skus) {
|
|
2245
2245
|
let B = !0;
|
|
@@ -2250,12 +2250,12 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
2250
2250
|
E
|
|
2251
2251
|
)), B) {
|
|
2252
2252
|
const w = m.trackingMeasurement;
|
|
2253
|
-
let a = (
|
|
2253
|
+
let a = (N = (K = C.stockBalance.skus) == null ? void 0 : K.find(
|
|
2254
2254
|
(Z) => Z.id === m._id
|
|
2255
|
-
)) == null ? void 0 :
|
|
2255
|
+
)) == null ? void 0 : N.balance, f = r.inventoryForecast.skus.find(
|
|
2256
2256
|
(Z) => Z.id === m._id
|
|
2257
2257
|
);
|
|
2258
|
-
const
|
|
2258
|
+
const O = {
|
|
2259
2259
|
...m,
|
|
2260
2260
|
balance: a ?? {
|
|
2261
2261
|
amount: 0,
|
|
@@ -2265,11 +2265,11 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
2265
2265
|
day: (f == null ? void 0 : f.depletionDays) ?? void 0,
|
|
2266
2266
|
trackingUnitAbbrev: w ? ((y = m.unit.measurements.find((Z) => Z.id === w)) == null ? void 0 : y.abbrev) ?? "" : m.unit.abbrev
|
|
2267
2267
|
};
|
|
2268
|
-
D.push(
|
|
2268
|
+
D.push(O);
|
|
2269
2269
|
}
|
|
2270
2270
|
}
|
|
2271
2271
|
return D;
|
|
2272
|
-
}), I = z(""), T = z(!0), { breakpoints: W } = Tt(),
|
|
2272
|
+
}), I = z(""), T = z(!0), { breakpoints: W } = Tt(), P = Y(() => W.value.xs || W.value.sm), oe = Y(() => P.value ? 10 : 20), X = At(), ue = Y(() => {
|
|
2273
2273
|
const E = [
|
|
2274
2274
|
{
|
|
2275
2275
|
label: u("inventory.stock.stock_balance.refreshBalance"),
|
|
@@ -2307,7 +2307,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
}
|
|
2309
2309
|
return (E, D) => {
|
|
2310
|
-
const K =
|
|
2310
|
+
const K = U("FmSwitch"), N = U("FmTable");
|
|
2311
2311
|
return V(), Q(Ft, {
|
|
2312
2312
|
title: s(u)("inventory.stock.title"),
|
|
2313
2313
|
actions: ue.value,
|
|
@@ -2320,8 +2320,8 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
2320
2320
|
class: Ie([
|
|
2321
2321
|
"flex flex-col gap-8 max-h-full",
|
|
2322
2322
|
{
|
|
2323
|
-
"p-0":
|
|
2324
|
-
"px-24 ": !
|
|
2323
|
+
"p-0": P.value,
|
|
2324
|
+
"px-24 ": !P.value
|
|
2325
2325
|
}
|
|
2326
2326
|
])
|
|
2327
2327
|
}, [
|
|
@@ -2353,7 +2353,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
2353
2353
|
]),
|
|
2354
2354
|
_: 1
|
|
2355
2355
|
}, 8, ["search", "filter-attributes", "filter"]),
|
|
2356
|
-
(V(), Q(
|
|
2356
|
+
(V(), Q(N, {
|
|
2357
2357
|
style: mt(s(X).tableHeight),
|
|
2358
2358
|
"column-defs": s(L),
|
|
2359
2359
|
"row-data": g.value,
|
|
@@ -2369,13 +2369,13 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
2369
2369
|
onRowClick: s(j).showSkuHistory
|
|
2370
2370
|
}, {
|
|
2371
2371
|
default: R((f) => {
|
|
2372
|
-
var
|
|
2372
|
+
var O, Z, ae, q, ee, re, le, ve, be, ye;
|
|
2373
2373
|
return [
|
|
2374
2374
|
e("div", Vs, [
|
|
2375
2375
|
e("div", js, [
|
|
2376
2376
|
e("div", Cs, [
|
|
2377
2377
|
v(s(it), {
|
|
2378
|
-
render: (ae = (Z = (
|
|
2378
|
+
render: (ae = (Z = (O = f.code) == null ? void 0 : O.column) == null ? void 0 : Z.columnDef) == null ? void 0 : ae.cell,
|
|
2379
2379
|
props: (ee = (q = f.code) == null ? void 0 : q.getContext) == null ? void 0 : ee.call(q)
|
|
2380
2380
|
}, null, 8, ["render", "props"])
|
|
2381
2381
|
]),
|
|
@@ -2412,7 +2412,7 @@ const $n = { class: "flex items-center w-full fm-typo-en-title-md-800" }, Vn = {
|
|
|
2412
2412
|
(V(), Q(wt, { to: "body" }, [
|
|
2413
2413
|
(m = s(j).stockHistoryProps) != null && m.sku ? (V(), Q(ws, Le(ze({ key: 0 }, s(j).stockHistoryProps)), null, 16)) : te("", !0),
|
|
2414
2414
|
(B = s(j).convertSkuDialogProps) != null && B.sku ? (V(), Q(Ao, Le(ze({ key: 1 }, s(j).convertSkuDialogProps)), null, 16)) : te("", !0),
|
|
2415
|
-
(w = s(j).adjustSkuDialogProps) != null && w.stock ? (V(), Q(
|
|
2415
|
+
(w = s(j).adjustSkuDialogProps) != null && w.stock ? (V(), Q(Uo, Le(ze({ key: 2 }, s(j).adjustSkuDialogProps)), null, 16)) : te("", !0),
|
|
2416
2416
|
v(As, {
|
|
2417
2417
|
permission: { action: s(Ce).Action.manage, subject: s(Ce).Subject.Business.inventory_stockAdjustment }
|
|
2418
2418
|
}, {
|