@feedmepos/mf-inventory-portal 1.8.0-dev.1 → 1.8.0-dev.3
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-DRXADP0k.js +1498 -0
- package/dist/{ApprovalView-C8_ax05b.js → ApprovalView-hV1msz5Y.js} +9 -9
- package/dist/{BindingsDialog-t0ZY9eh5.js → BindingsDialog-BX1Lopf0.js} +2 -2
- package/dist/{BindingsPicker-C0Qblmml.js → BindingsPicker-BNKW8-XY.js} +2 -2
- package/dist/{BindingsTable-CsqUBbRA.js → BindingsTable-DiLDsL83.js} +4 -4
- package/dist/{BulkReceiveRequestView-DAG-TMox.js → BulkReceiveRequestView-oQh6kFLc.js} +20 -20
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BaMcGU-x.js +151 -0
- package/dist/{ClosingDraftView-CdKp4Ny6.js → ClosingDraftView-sgLoaSf4.js} +20 -20
- package/dist/{ClosingHistoryView-Blyq9-BS.js → ClosingHistoryView-BnE9HrzA.js} +5 -5
- package/dist/{ClosingTemplateView-C326DL4q.js → ClosingTemplateView-BD3Pa11r.js} +302 -291
- package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CXjubRbj.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-DlbyxkMQ.js} +1 -1
- package/dist/{DefaultView-CsIMmQAY.js → DefaultView-CuzvVkfE.js} +5 -5
- package/dist/{DeliveryOrderPrintPreview-eTrMvJzA.js → DeliveryOrderPrintPreview-w-1aAOY1.js} +2 -2
- package/dist/DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-Bp8bjDU1.js +58 -0
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-B7nBbxMo.js → EmailDialog.vue_vue_type_script_setup_true_lang-CxD12Qct.js} +1668 -1671
- package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CMoQKl_a.js +308 -0
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CI2KTzDs.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BqCh_vTP.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Db_FiSRe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CAXnmdUy.js} +2 -2
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-NhOdW33O.js +120 -0
- package/dist/{FmMultiselectDialog-BAw-gp5K.js → FmMultiselectDialog-BqZgHP8s.js} +1 -1
- package/dist/{FmMultiselectDialog-CYUxtxnS.js → FmMultiselectDialog-CULwA_hi.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DOkV11NN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CI3Y9kDl.js} +6 -6
- package/dist/{ImportView-BmotFC-3.js → ImportView-DqQG673_.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVCCpvS4.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DfvNUu80.js} +1 -1
- package/dist/IngredientGroupView-CyngKxPo.js +1000 -0
- package/dist/{IngredientsView-CZ6E7cXf.js → IngredientsView-pzpP6oXT.js} +309 -296
- package/dist/{IntegrationExplorerView-B15ND4Fg.js → IntegrationExplorerView-C5aAhB6e.js} +4 -4
- package/dist/{IntegrationView-hkNhsqx2.js → IntegrationView-Bqun7nX0.js} +2403 -2408
- package/dist/{InventoryBindingForm-SfuUF0_O.js → InventoryBindingForm-r_Ua1C4a.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Zq81p_MF.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CYDuu4kU.js} +5 -5
- package/dist/{InventoryBindingSummary-DUcukkyJ.js → InventoryBindingSummary-BQuZLohR.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BmfROiLM.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-7r-QcJdU.js} +1 -1
- package/dist/{ProductionRunDetailView-BwgRX-14.js → ProductionRunDetailView-95fu_CfH.js} +4 -4
- package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BbNXNhpr.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CdOca1tV.js} +7 -7
- package/dist/{ProductionRunView-CZU7LY9-.js → ProductionRunView-DIjor_Ix.js} +3 -3
- package/dist/{PublishView-DS2FZ66p.js → PublishView-DYObyHQq.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-CZa0MVAs.js → PurchaseOrderPrintPreview-C0jCmI9L.js} +2 -2
- package/dist/{ReceiveRequestView-Bk5b3nVB.js → ReceiveRequestView-i7ibPfIE.js} +14 -14
- package/dist/{RecipeView-DvI6X-uN.js → RecipeView-C5VO7yr3.js} +18 -18
- package/dist/SettingsView-CdBloj9k.js +983 -0
- package/dist/{StockView-Z9wGihT7.js → StockView-g_6eJ62R.js} +327 -322
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DdZg9T4n.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-C1rKc7MA.js} +1 -1
- package/dist/{SupplierView-D8q6siZW.js → SupplierView-DkYp_Frj.js} +451 -447
- package/dist/{SurchargeView-Db_5YFoR.js → SurchargeView-CfkV4Y3y.js} +7 -7
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-WOVs4Fr1.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-2MtN1p5t.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BtoP4XgE.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CYMjKXq4.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Bljc4Vuy.js → TransferDetails.vue_vue_type_script_setup_true_lang-D0zNr_vQ.js} +21 -21
- package/dist/{TransferTemplateView-DtsJzmUr.js → TransferTemplateView-Ne2gYUSn.js} +21 -21
- package/dist/{UnitCostHistoryView-BqDiQ4IE.js → UnitCostHistoryView-Db0_otOb.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BjSmg5LX.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BzO1lq7j.js} +4 -4
- package/dist/{UnitView-CM695-VI.js → UnitView-CiCeQ63i.js} +8 -8
- package/dist/{WarehouseView-BdidU4p6.js → WarehouseView-BcuJSOMF.js} +193 -189
- package/dist/{WastageTemplateView-DdhwdXT6.js → WastageTemplateView-CPQmtOKQ.js} +15 -15
- package/dist/api/feature-flags.d.ts +10 -0
- package/dist/api/inventory.d.ts +9 -9
- package/dist/api/license.d.ts +9 -0
- package/dist/{app-Cb5s4jMu.js → app-DqJp3dcI.js} +146 -108
- package/dist/app.d.ts +36 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-DnqnpXxn.js → closing-template-BNlgZviN.js} +1 -1
- package/dist/components/ChangeLocationComponent.vue.d.ts +21 -14
- package/dist/components/DeprecateSoonWarningDialog.vue.d.ts +22 -0
- package/dist/components/FeatureCapabilityBadge.vue.d.ts +29 -0
- package/dist/components/{PreviewBadge.vue.d.ts → FeatureCapabilityGate.vue.d.ts} +10 -7
- package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
- package/dist/components/{PremiumBadge.vue.d.ts → PlanTierBadge.vue.d.ts} +5 -13
- package/dist/components/PlanUpgradeDialog.vue.d.ts +30 -0
- package/dist/composable/useNavigationMenu.d.ts +2 -1
- package/dist/{inventory-core-dart.default-DDRxXXnt.js → core-Js7d-3Pv.js} +121 -118
- package/dist/{date2-BPhD_1Of.js → date2-Ci7521dn.js} +1 -1
- package/dist/{dayjs.min-Zbd6-uVD.js → dayjs.min-Cyp32v4J.js} +1 -1
- package/dist/{decimal-Df6a50Ld.js → decimal-BGdm5R3A.js} +2 -2
- package/dist/{defineDeepModel-Brbsikbi.js → defineDeepModel-B2cJ-rtd.js} +1 -1
- package/dist/{duplicate-template-B9kuShaF.js → duplicate-template-By5WeKZ0.js} +1 -1
- package/dist/feature-fG7d73oi.js +371 -0
- package/dist/feature-flags/core.d.ts +27 -0
- package/dist/feature-flags/core.spec.d.ts +1 -0
- package/dist/feature-flags/navigation-capabilities.d.ts +23 -0
- package/dist/feature-flags/navigation-capabilities.spec.d.ts +1 -0
- package/dist/feature-flags/plan-tier.d.ts +6 -0
- package/dist/feature-flags/plan-tier.spec.d.ts +1 -0
- package/dist/feature-flags/portal-feature-catalog.d.ts +24 -0
- package/dist/feature-flags/vue.d.ts +14 -0
- package/dist/{format-time-from-id-DmUjUcVj.js → format-time-from-id-Q8C2P96H.js} +1 -1
- package/dist/{format-unit-display-CsQA0SQd.js → format-unit-display-CICrmm8r.js} +13 -13
- package/dist/id-to-date-DeN5x0LR.js +67 -0
- package/dist/{import-export.helper-DCQ6oX9s.js → import-export.helper-BOTQWxr6.js} +28 -28
- package/dist/{index-C-mazZwS.js → index-BbbqCCfp.js} +3 -3
- package/dist/{index-BXaIMGnI.js → index-Cxm3Sgfv.js} +1 -1
- package/dist/index-Dqf27vLH.js +841 -0
- package/dist/{index-UmM6gHJ1.js → index-tCYhLCKP.js} +1 -1
- package/dist/{lz-string-Bibw5D_6.js → lz-string-Dy4Pg8mh.js} +1 -1
- package/dist/{netsuite-Bev0OtQT.js → netsuite-BaJjkDM8.js} +2 -2
- package/dist/{number-y_W4pn_d.js → number-CB36d2PQ.js} +3 -3
- package/dist/{predefined-templates-BHvUnTk_.js → predefined-templates-DLm93Bpx.js} +1 -1
- package/dist/{purchase-order-template-DgOKEzhS.js → purchase-order-template-CDhn9ZIF.js} +1 -1
- package/dist/{recalculationUtils-Dv__DzZh.js → recalculationUtils-Cqvefakh.js} +1 -1
- package/dist/{row-action.enum-ncgDYAjP.js → row-action.enum-NTfVmGY8.js} +2 -2
- package/dist/{rules-CZTBvenw.js → rules-C8dfM84-.js} +2 -2
- package/dist/{stock-XINW8JOM.js → stock-BGB0Siue.js} +3 -3
- package/dist/{stock-CxCRZo_D.js → stock-Qu5IiN2_.js} +1 -1
- package/dist/stores/feature.d.ts +12 -0
- package/dist/stores/integration/netsuite.d.ts +2 -2
- package/dist/stores/location.d.ts +42 -42
- package/dist/stores/supplier.d.ts +48 -48
- package/dist/stores/warehouse.d.ts +1 -1
- package/dist/{supplier-CkZdeMcl.js → supplier-CZdNOSMN.js} +17 -17
- package/dist/{surcharge-FRSFqjGl.js → surcharge-Cm40oJvU.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-Cm1styDr.js → uom-rules-L-IW4Nwk.js} +1 -1
- package/dist/{use-ingredient-select-dialog-ntAqHX04.js → use-ingredient-select-dialog-B2TDVJM6.js} +2 -2
- package/dist/{use-inventory-binding-dialog-DVIJO8Cl.js → use-inventory-binding-dialog-BJ00hl5f.js} +2 -2
- package/dist/{use-template-enabled-locations-CIZqw-Z8.js → use-template-enabled-locations-DYAPMvo9.js} +2 -2
- package/dist/{use-transfer-locations-CM5vNttA.js → use-transfer-locations-w-9tymYS.js} +2 -2
- package/dist/{useHrmPermission-CslLuBoP.js → useHrmPermission-BFCIo5sA.js} +1 -1
- package/dist/useNavigationMenu-BPHAH5sJ.js +352 -0
- package/dist/{useSseClient-CCV4mPzD.js → useSseClient-CWjRacRs.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
- package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
- package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
- package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +18 -18
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
- package/dist/views/integration/components/IntegrationCard.vue.d.ts +38 -0
- package/dist/views/integration/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
- package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +5 -5
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +39 -39
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +35 -35
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +34 -34
- package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +6 -6
- package/dist/views/settings/FeatureFlagView.vue.d.ts +2 -0
- package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
- package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
- package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
- package/dist/{vue-i18n-C5j4EQhi.js → vue-i18n-S4YQ9w6a.js} +295 -295
- package/dist/{xlsx.util-B50OvX4z.js → xlsx.util-CP8_VajN.js} +2 -2
- package/package.json +5 -5
- package/dist/App-BXgpGzGR.js +0 -1476
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-zcEv1Swg.js +0 -243
- package/dist/IngredientGroupView-qrR9ksEn.js +0 -985
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-3e3kDsbN.js +0 -93
- package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-DX2MJqL4.js +0 -29
- package/dist/SettingsView-sThYErMz.js +0 -698
- package/dist/feature-Ckn5ra3z.js +0 -1136
- package/dist/useNavigationMenu-CSinmNCY.js +0 -172
- /package/dist/components/{FmFeatureFlagDialog.vue.d.ts → DeprecateSoonPill.vue.d.ts} +0 -0
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { defineComponent as pe,
|
|
1
|
+
import { defineComponent as pe, createElementBlock as q, openBlock as j, createElementVNode as e, createVNode as y, toDisplayString as f, unref as s, ref as Y, h as be, computed as T, watch as Fe, resolveComponent as D, createBlock as ne, isRef as Pe, withCtx as M, Fragment as ue, renderList as ve, createCommentVNode as se, normalizeClass as He, reactive as _t, mergeModels as st, useModel as jt, onMounted as Xe, createTextVNode as me, normalizeStyle as kt, watchEffect as Vt, renderSlot as at, onUnmounted as Ct, Teleport as Bt, normalizeProps as rt, mergeProps as ze } from "vue";
|
|
2
2
|
import { u as Dt, _ as Mt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
|
|
3
|
-
import { u as Se, c as Re, a as Ne, F as
|
|
4
|
-
import { u as Oe } from "./stock-
|
|
3
|
+
import { u as Se, c as Re, a as Ne, F as lt, t as It, E as ie, s as Ht, d as Tt, B as Et, w as oe, h as Ce, i as it, e as ut, L as ge, M as Be } from "./app-DqJp3dcI.js";
|
|
4
|
+
import { u as Oe } from "./stock-BGB0Siue.js";
|
|
5
5
|
import { c as Ut } from "./component-BmLAdDiY.js";
|
|
6
|
-
import { _ as ht, o as Pt } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as Ke, S as Ge, g as bt, a as Rt } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import {
|
|
9
|
-
import { useI18n as ye, useCoreStore as
|
|
10
|
-
import { u as gt, i as Te
|
|
11
|
-
import { useSnackbar as we, useDialog as Le, useProxiedModel as Ye, useBreakpoints as
|
|
12
|
-
import { defineStore as
|
|
13
|
-
import { F as
|
|
14
|
-
import { g as $e, a as he, e as
|
|
15
|
-
import { u as Ae } from "./stock-
|
|
16
|
-
import { c as Ue, A as
|
|
17
|
-
import { u as
|
|
18
|
-
import { a as St } from "./FmMultiselectDialog-
|
|
19
|
-
import { d as ke } from "./dayjs.min-
|
|
20
|
-
import { _ as
|
|
21
|
-
import { g as
|
|
22
|
-
import { b as
|
|
23
|
-
import { i as
|
|
24
|
-
import { _ as
|
|
25
|
-
import { F as _e } from "./
|
|
26
|
-
import {
|
|
27
|
-
import { u as At } from "./useHrmPermission-
|
|
28
|
-
import { _ as
|
|
29
|
-
import { _ as
|
|
30
|
-
import { u as
|
|
31
|
-
import { u as
|
|
32
|
-
import { P as
|
|
6
|
+
import { _ as ht, o as Pt } from "./UnitDisplayControl.vue_vue_type_script_setup_true_lang-BzO1lq7j.js";
|
|
7
|
+
import { _ as Ke, S as Ge, g as bt, a as Rt } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-C1rKc7MA.js";
|
|
8
|
+
import { a as qe } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CMoQKl_a.js";
|
|
9
|
+
import { useI18n as ye, useCoreStore as Je } from "@feedmepos/mf-common";
|
|
10
|
+
import { u as gt, i as Te } from "./id-to-date-DeN5x0LR.js";
|
|
11
|
+
import { useSnackbar as we, useDialog as Le, useProxiedModel as Ye, useBreakpoints as Nt } from "@feedmepos/ui-library";
|
|
12
|
+
import { defineStore as Ot } from "pinia";
|
|
13
|
+
import { F as Qe } from "./FmAdminBadge-DlplQOHb.js";
|
|
14
|
+
import { g as $e, a as he, e as Lt, t as Ee, c as xe, f as Yt, h as ct, i as xt, j as Ze, d as Me, k as zt } from "./number-CB36d2PQ.js";
|
|
15
|
+
import { u as Ae } from "./stock-Qu5IiN2_.js";
|
|
16
|
+
import { c as Ue, A as Gt, M as Wt, R as Kt } from "./rules-C8dfM84-.js";
|
|
17
|
+
import { u as qt } from "./use-inventory-binding-dialog-BJ00hl5f.js";
|
|
18
|
+
import { a as St } from "./FmMultiselectDialog-CULwA_hi.js";
|
|
19
|
+
import { d as ke } from "./dayjs.min-Cyp32v4J.js";
|
|
20
|
+
import { _ as Xt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-7r-QcJdU.js";
|
|
21
|
+
import { g as Jt } from "./decimal-BGdm5R3A.js";
|
|
22
|
+
import { b as Qt, d as Zt, f as wt, t as dt, a as mt, p as eo, n as to, c as oo } from "./date2-Ci7521dn.js";
|
|
23
|
+
import { i as no } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BqCh_vTP.js";
|
|
24
|
+
import { _ as so } from "./empty-placeholder-B0QU467o.js";
|
|
25
|
+
import { F as _e } from "./core-Js7d-3Pv.js";
|
|
26
|
+
import { useFeatureStore as ao } from "./feature-fG7d73oi.js";
|
|
27
|
+
import { u as At } from "./useHrmPermission-BFCIo5sA.js";
|
|
28
|
+
import { _ as ro, F as ft } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
|
|
29
|
+
import { _ as lo } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-NhOdW33O.js";
|
|
30
|
+
import { u as io } from "./useSseClient-CWjRacRs.js";
|
|
31
|
+
import { u as uo } from "./netsuite-BaJjkDM8.js";
|
|
32
|
+
import { P as co, J as mo } from "./app-C39bYJmq.js";
|
|
33
33
|
var Ie = /* @__PURE__ */ ((A) => (A.History = "History", A.Convert = "Convert", A.Adjust = "Adjust", A))(Ie || {});
|
|
34
|
-
const
|
|
34
|
+
const fo = [
|
|
35
35
|
{
|
|
36
36
|
translationKey: "inventory.stock.action.history",
|
|
37
37
|
color: "text-neutral-700",
|
|
38
38
|
value: "History"
|
|
39
39
|
/* History */
|
|
40
40
|
}
|
|
41
|
-
],
|
|
41
|
+
], vo = [
|
|
42
42
|
{
|
|
43
43
|
translationKey: "inventory.stock.action.history",
|
|
44
44
|
color: "text-neutral-700",
|
|
@@ -57,24 +57,25 @@ const vo = [
|
|
|
57
57
|
value: "Adjust"
|
|
58
58
|
/* Adjust */
|
|
59
59
|
}
|
|
60
|
-
], yo = { class: "whitespace-nowrap" }, _o = /* @__PURE__ */ pe({
|
|
60
|
+
], po = { class: "flex items-center gap-8" }, yo = { class: "whitespace-nowrap" }, _o = /* @__PURE__ */ pe({
|
|
61
61
|
__name: "StockHeaderPreview",
|
|
62
62
|
setup(A) {
|
|
63
63
|
const { t: c } = ye();
|
|
64
|
-
return (k,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
return (k, _) => (j(), q("div", po, [
|
|
65
|
+
e("div", yo, f(s(c)("inventory.stock.prediction.daysRemaining")), 1),
|
|
66
|
+
y(qe, {
|
|
67
|
+
tier: "standard",
|
|
68
|
+
category: "beta"
|
|
69
|
+
})
|
|
70
|
+
]));
|
|
70
71
|
}
|
|
71
|
-
}), Ft =
|
|
72
|
-
const A = Y(!1), c = Se(), k = Oe(),
|
|
72
|
+
}), Ft = Ot("stockActions", () => {
|
|
73
|
+
const A = Y(!1), c = Se(), k = Oe(), _ = gt(), w = we(), V = Le(), { t: d } = ye();
|
|
73
74
|
async function r() {
|
|
74
75
|
if (c._currentLocation) {
|
|
75
76
|
A.value = !0;
|
|
76
77
|
try {
|
|
77
|
-
await k.readStockBalance(), await k.readProductBalance(), await
|
|
78
|
+
await k.readStockBalance(), await k.readProductBalance(), await _.readStockEstimateBalance();
|
|
78
79
|
} catch {
|
|
79
80
|
w.open({
|
|
80
81
|
title: d("inventory.stock.error.title"),
|
|
@@ -159,24 +160,24 @@ const vo = [
|
|
|
159
160
|
});
|
|
160
161
|
function ko() {
|
|
161
162
|
var V;
|
|
162
|
-
const A = Se(), c = Ft(), k =
|
|
163
|
+
const A = Se(), c = Ft(), k = Je(), { t: _ } = ye();
|
|
163
164
|
return {
|
|
164
165
|
columnDefs: [
|
|
165
166
|
{
|
|
166
167
|
accessorKey: "code",
|
|
167
|
-
header: () =>
|
|
168
|
+
header: () => _("inventory.stock.code"),
|
|
168
169
|
enableSorting: !0,
|
|
169
170
|
size: 300
|
|
170
171
|
},
|
|
171
172
|
{
|
|
172
173
|
accessorKey: "name",
|
|
173
|
-
header: () =>
|
|
174
|
+
header: () => _("inventory.stock.product"),
|
|
174
175
|
enableSorting: !0,
|
|
175
176
|
size: "auto"
|
|
176
177
|
},
|
|
177
178
|
{
|
|
178
179
|
id: "UOM",
|
|
179
|
-
header: () =>
|
|
180
|
+
header: () => _("inventory.stock.balance"),
|
|
180
181
|
cell(d) {
|
|
181
182
|
const r = d.row.original, b = {
|
|
182
183
|
unit: r.unit,
|
|
@@ -191,7 +192,7 @@ function ko() {
|
|
|
191
192
|
...(V = k.sessionUser.value) != null && V.role.isAdmin ? [
|
|
192
193
|
{
|
|
193
194
|
accessorKey: "isInactive",
|
|
194
|
-
header: () => be(
|
|
195
|
+
header: () => be(Qe, {}, () => `${_("inventory.ingredient.status.title")}`),
|
|
195
196
|
cell(d) {
|
|
196
197
|
const r = d.row.original.isInactive;
|
|
197
198
|
return be(
|
|
@@ -202,7 +203,7 @@ function ko() {
|
|
|
202
203
|
r ? "bg-red-100 text-red-700" : "bg-green-100 text-green-700"
|
|
203
204
|
].join(" ")
|
|
204
205
|
},
|
|
205
|
-
|
|
206
|
+
_(r ? "inventory.ingredient.status.inactive" : "inventory.ingredient.status.active")
|
|
206
207
|
);
|
|
207
208
|
},
|
|
208
209
|
enableSorting: !0
|
|
@@ -235,7 +236,7 @@ function ko() {
|
|
|
235
236
|
cell(d) {
|
|
236
237
|
var r;
|
|
237
238
|
return Ut(
|
|
238
|
-
((r = A._currentLocation) == null ? void 0 : r.type) === "restaurant" ?
|
|
239
|
+
((r = A._currentLocation) == null ? void 0 : r.type) === "restaurant" ? fo : vo,
|
|
239
240
|
(b) => c.onActionMenu(b, d.row.original)
|
|
240
241
|
);
|
|
241
242
|
},
|
|
@@ -295,11 +296,11 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
295
296
|
},
|
|
296
297
|
emits: ["update:show", "submitted"],
|
|
297
298
|
setup(A, { expose: c, emit: k }) {
|
|
298
|
-
const
|
|
299
|
+
const _ = A, w = k, V = qt(), d = Ne(), r = Ae(), b = we(), { t: R } = ye(), C = Y(0), l = Y(null), a = T(() => d.skus), B = T(
|
|
299
300
|
() => {
|
|
300
301
|
var x, F;
|
|
301
|
-
return (((F = (x =
|
|
302
|
-
(G) => G.type ===
|
|
302
|
+
return (((F = (x = _.sku) == null ? void 0 : x.convert) == null ? void 0 : F.inventoryBindings) ?? []).filter(
|
|
303
|
+
(G) => G.type === lt.enum.SKU
|
|
303
304
|
);
|
|
304
305
|
}
|
|
305
306
|
), v = T({
|
|
@@ -307,57 +308,57 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
307
308
|
return !!l.value;
|
|
308
309
|
},
|
|
309
310
|
set(x) {
|
|
310
|
-
x ? l.value = Re(B.value) : (l.value = null, C.value = Math.min(C.value,
|
|
311
|
+
x ? l.value = Re(B.value) : (l.value = null, C.value = Math.min(C.value, _.maxCount ?? 0));
|
|
311
312
|
}
|
|
312
313
|
}), g = Y(!1);
|
|
313
|
-
Fe([() =>
|
|
314
|
+
Fe([() => _.show], ([x]) => {
|
|
314
315
|
x && (C.value = 0);
|
|
315
316
|
});
|
|
316
317
|
function o() {
|
|
317
|
-
L(
|
|
318
|
+
L(_.sku, Ee(C.value), l.value);
|
|
318
319
|
}
|
|
319
320
|
function t(x) {
|
|
320
321
|
if (l.value)
|
|
321
322
|
return !0;
|
|
322
|
-
const F = vt(x).isInteger().max(
|
|
323
|
+
const F = vt(x).isInteger().max(_.maxCount ?? 0).error ?? "";
|
|
323
324
|
return F || !0;
|
|
324
325
|
}
|
|
325
326
|
function n(x) {
|
|
326
327
|
var I;
|
|
327
|
-
const F = (I =
|
|
328
|
+
const F = (I = _.sku.convert) != null && I.measurement ? _.sku.unit.measurements.find((u) => {
|
|
328
329
|
var h;
|
|
329
|
-
return u.id === ((h =
|
|
330
|
-
}) ?? null : null, G = $e(
|
|
330
|
+
return u.id === ((h = _.sku.convert) == null ? void 0 : h.measurement);
|
|
331
|
+
}) ?? null : null, G = $e(_.sku.unit, F), H = Yt(+x);
|
|
331
332
|
return vt(H).isInteger().max(G).error ? "Precision cannot be more than " + G : !0;
|
|
332
333
|
}
|
|
333
334
|
const $ = T(
|
|
334
335
|
() => {
|
|
335
336
|
var x, F;
|
|
336
|
-
return (x =
|
|
337
|
+
return (x = _.sku.convert) != null && x.measurement ? (F = _.sku.unit.measurements.find((G) => {
|
|
337
338
|
var H;
|
|
338
|
-
return G.id === ((H =
|
|
339
|
-
})) == null ? void 0 : F.abbrev :
|
|
339
|
+
return G.id === ((H = _.sku.convert) == null ? void 0 : H.measurement);
|
|
340
|
+
})) == null ? void 0 : F.abbrev : _.sku.unit.abbrev;
|
|
340
341
|
}
|
|
341
342
|
), E = T(() => {
|
|
342
343
|
var H, J;
|
|
343
344
|
const F = It({
|
|
344
|
-
bindings: ((H =
|
|
345
|
+
bindings: ((H = _.sku.convert) == null ? void 0 : H.inventoryBindings) ?? [],
|
|
345
346
|
skus: d.skus,
|
|
346
347
|
skuGroups: d.skuGroups,
|
|
347
348
|
recipes: d.recipes
|
|
348
349
|
}).inventoryBindings.filter((I) => "success" in I && I.success).map((I) => I).map((I) => I.binding);
|
|
349
350
|
return (J = l.value ?? F) == null ? void 0 : J.map((I) => {
|
|
350
|
-
var ee, ae, Q, W,
|
|
351
|
-
const u = d.skus.find((le) => le._id === I.id), h = ((ee = I.measurement) == null ? void 0 : ee.abbrev) ?? ((ae = u == null ? void 0 : u.unit) == null ? void 0 : ae.abbrev), p = (Q =
|
|
351
|
+
var ee, ae, Q, W, te;
|
|
352
|
+
const u = d.skus.find((le) => le._id === I.id), h = ((ee = I.measurement) == null ? void 0 : ee.abbrev) ?? ((ae = u == null ? void 0 : u.unit) == null ? void 0 : ae.abbrev), p = (Q = _.sku.convert) != null && Q.measurement ? _.sku.unit.measurements.find((le) => {
|
|
352
353
|
var ce;
|
|
353
|
-
return le.id === ((ce =
|
|
354
|
-
}) ?? null : null, m = $e(
|
|
355
|
-
|
|
354
|
+
return le.id === ((ce = _.sku.convert) == null ? void 0 : ce.measurement);
|
|
355
|
+
}) ?? null : null, m = $e(_.sku.unit, p), i = n(`${C.value}`) === !0 ? he(
|
|
356
|
+
Lt(
|
|
356
357
|
I.amount,
|
|
357
358
|
Ee(+C.value, m)
|
|
358
359
|
),
|
|
359
360
|
!1
|
|
360
|
-
) : "0", S = (
|
|
361
|
+
) : "0", S = (te = (W = l.value) == null ? void 0 : W.find((le) => le.id === (u == null ? void 0 : u._id))) == null ? void 0 : te.amount, P = S ? he(S, !1) : null;
|
|
361
362
|
return {
|
|
362
363
|
sku: u,
|
|
363
364
|
convertAmount: P ?? i,
|
|
@@ -379,7 +380,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
379
380
|
(F = (x = N.value) == null ? void 0 : x.resetInputs) == null || F.call(x);
|
|
380
381
|
}
|
|
381
382
|
});
|
|
382
|
-
const O = Ye(
|
|
383
|
+
const O = Ye(_, "show");
|
|
383
384
|
async function L(x, F, G) {
|
|
384
385
|
g.value = !0;
|
|
385
386
|
try {
|
|
@@ -445,22 +446,22 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
445
446
|
function re() {
|
|
446
447
|
const x = (l.value ?? []).map((F) => ({
|
|
447
448
|
...F,
|
|
448
|
-
type:
|
|
449
|
+
type: lt.enum.SKU
|
|
449
450
|
}));
|
|
450
451
|
V.promptIngredientsBinding(
|
|
451
452
|
x,
|
|
452
453
|
(F) => l.value = F,
|
|
453
|
-
|
|
454
|
+
_.sku._id
|
|
454
455
|
);
|
|
455
456
|
}
|
|
456
457
|
return Fe(
|
|
457
|
-
() =>
|
|
458
|
+
() => _.show,
|
|
458
459
|
(x) => {
|
|
459
460
|
x || (l.value = null, C.value = 0);
|
|
460
461
|
}
|
|
461
462
|
), (x, F) => {
|
|
462
463
|
const G = D("FmTextField"), H = D("FmForm"), J = D("FmCard"), I = D("FmSwitch"), u = D("FmFormGroup"), h = D("FmSelect"), p = D("FmButton"), m = D("FmSideSheet");
|
|
463
|
-
return j(),
|
|
464
|
+
return j(), ne(m, {
|
|
464
465
|
"dismiss-away": "",
|
|
465
466
|
modelValue: s(O),
|
|
466
467
|
"onUpdate:modelValue": F[3] || (F[3] = (i) => Pe(O) ? O.value = i : null),
|
|
@@ -473,13 +474,13 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
473
474
|
]),
|
|
474
475
|
default: M(() => [
|
|
475
476
|
e("div", xo, [
|
|
476
|
-
|
|
477
|
+
y(H, {
|
|
477
478
|
ref_key: "formRef",
|
|
478
479
|
ref: N,
|
|
479
480
|
onValidationSuccess: o
|
|
480
481
|
}, {
|
|
481
482
|
default: M(() => [
|
|
482
|
-
|
|
483
|
+
y(G, {
|
|
483
484
|
disabled: g.value,
|
|
484
485
|
"model-value": C.value,
|
|
485
486
|
"onUpdate:modelValue": F[0] || (F[0] = (i) => C.value = i),
|
|
@@ -491,7 +492,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
491
492
|
]),
|
|
492
493
|
_: 1
|
|
493
494
|
}, 512),
|
|
494
|
-
|
|
495
|
+
y(J, {
|
|
495
496
|
variant: "outlined",
|
|
496
497
|
class: "p-16"
|
|
497
498
|
}, {
|
|
@@ -512,10 +513,10 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
512
513
|
]),
|
|
513
514
|
_: 1
|
|
514
515
|
}),
|
|
515
|
-
|
|
516
|
+
y(J, { variant: "outlined" }, {
|
|
516
517
|
default: M(() => [
|
|
517
518
|
e("div", $o, [
|
|
518
|
-
|
|
519
|
+
y(I, {
|
|
519
520
|
value: "",
|
|
520
521
|
modelValue: v.value,
|
|
521
522
|
"onUpdate:modelValue": F[1] || (F[1] = (i) => v.value = i),
|
|
@@ -523,18 +524,18 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
523
524
|
"label-placement": "right"
|
|
524
525
|
}, null, 8, ["modelValue", "label"]),
|
|
525
526
|
v.value ? (j(), q(ue, { key: 0 }, [
|
|
526
|
-
|
|
527
|
+
y(u, {
|
|
527
528
|
modelValue: l.value,
|
|
528
|
-
rules: [s(
|
|
529
|
+
rules: [s(Gt)(1, "Must have at least one ingredient binding")]
|
|
529
530
|
}, null, 8, ["modelValue", "rules"]),
|
|
530
531
|
e("div", jo, [
|
|
531
532
|
e("div", Vo, f(s(R)("inventory.stock.convert.ingredients")), 1),
|
|
532
|
-
(j(!0), q(ue, null, ve(l.value, (i) => (j(),
|
|
533
|
+
(j(!0), q(ue, null, ve(l.value, (i) => (j(), ne(u, {
|
|
533
534
|
key: i.id,
|
|
534
535
|
disabled: g.value,
|
|
535
536
|
modelValue: +s(he)(i.amount ?? { amount: 1, precision: 0 }),
|
|
536
537
|
rules: [
|
|
537
|
-
s(
|
|
538
|
+
s(Wt)(
|
|
538
539
|
a.value.find((S) => S._id === i.id).unit,
|
|
539
540
|
i.measurement
|
|
540
541
|
),
|
|
@@ -546,7 +547,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
546
547
|
return [
|
|
547
548
|
e("div", Co, [
|
|
548
549
|
e("div", Bo, f((P = a.value.find((Q) => Q._id === i.id)) == null ? void 0 : P.name), 1),
|
|
549
|
-
|
|
550
|
+
y(G, {
|
|
550
551
|
class: "xs:col-span-2",
|
|
551
552
|
disabled: g.value,
|
|
552
553
|
modelValue: +s(he)(
|
|
@@ -555,7 +556,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
555
556
|
"onUpdate:modelValue": (Q) => X(i.id, Q, l.value ?? []),
|
|
556
557
|
invalid: S
|
|
557
558
|
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"]),
|
|
558
|
-
|
|
559
|
+
y(h, {
|
|
559
560
|
disabled: g.value,
|
|
560
561
|
class: "translate-y-[2px]",
|
|
561
562
|
items: z(i.id),
|
|
@@ -566,7 +567,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
566
567
|
"helper-text": M(() => F[4] || (F[4] = [])),
|
|
567
568
|
_: 2
|
|
568
569
|
}, 1032, ["disabled", "items", "model-value", "onUpdate:modelValue", "invalid"]),
|
|
569
|
-
|
|
570
|
+
y(p, {
|
|
570
571
|
disabled: g.value,
|
|
571
572
|
type: "button",
|
|
572
573
|
variant: "tertiary",
|
|
@@ -580,7 +581,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
580
581
|
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
581
582
|
]),
|
|
582
583
|
e("div", null, [
|
|
583
|
-
|
|
584
|
+
y(p, {
|
|
584
585
|
icon: "link",
|
|
585
586
|
label: s(R)("inventory.stock.convert.linkIngredient"),
|
|
586
587
|
variant: "plain",
|
|
@@ -596,7 +597,7 @@ const bo = { class: "flex items-center" }, go = { class: "fm-typo-en-title-md-80
|
|
|
596
597
|
]),
|
|
597
598
|
"side-sheet-footer": M(() => [
|
|
598
599
|
e("div", Do, [
|
|
599
|
-
|
|
600
|
+
y(p, {
|
|
600
601
|
loading: g.value,
|
|
601
602
|
label: s(R)("inventory.stock.convert.convertButton"),
|
|
602
603
|
onClick: F[2] || (F[2] = (i) => {
|
|
@@ -655,7 +656,7 @@ const We = {
|
|
|
655
656
|
},
|
|
656
657
|
emits: ["update:modelValue", "click:delete"],
|
|
657
658
|
setup(A, { emit: c }) {
|
|
658
|
-
const k = A,
|
|
659
|
+
const k = A, _ = c, { t: w } = ye(), V = Oe(), d = T(
|
|
659
660
|
() => Object.keys(We).map((t) => ({
|
|
660
661
|
label: Ht(t),
|
|
661
662
|
value: t
|
|
@@ -673,7 +674,7 @@ const We = {
|
|
|
673
674
|
n.amount = We[n.type].toAdjustmentAmount(
|
|
674
675
|
+he($),
|
|
675
676
|
$.precision
|
|
676
|
-
),
|
|
677
|
+
), _("update:modelValue", n);
|
|
677
678
|
}
|
|
678
679
|
}), R = T({
|
|
679
680
|
get() {
|
|
@@ -687,7 +688,7 @@ const We = {
|
|
|
687
688
|
n.amount = We[b.value].toAdjustmentAmount(
|
|
688
689
|
t,
|
|
689
690
|
$.precision
|
|
690
|
-
),
|
|
691
|
+
), _("update:modelValue", n);
|
|
691
692
|
}
|
|
692
693
|
}), C = T({
|
|
693
694
|
get() {
|
|
@@ -699,7 +700,7 @@ const We = {
|
|
|
699
700
|
const n = {
|
|
700
701
|
...k.modelValue
|
|
701
702
|
};
|
|
702
|
-
n.measurement = ((E = ($ = k.modelValue.doc.unit) == null ? void 0 : $.measurements) == null ? void 0 : E.find((N) => N.id === t)) ?? null,
|
|
703
|
+
n.measurement = ((E = ($ = k.modelValue.doc.unit) == null ? void 0 : $.measurements) == null ? void 0 : E.find((N) => N.id === t)) ?? null, _("update:modelValue", n);
|
|
703
704
|
}
|
|
704
705
|
}), l = T({
|
|
705
706
|
get() {
|
|
@@ -709,7 +710,7 @@ const We = {
|
|
|
709
710
|
const n = {
|
|
710
711
|
...k.modelValue
|
|
711
712
|
};
|
|
712
|
-
n.remark = t,
|
|
713
|
+
n.remark = t, _("update:modelValue", n);
|
|
713
714
|
}
|
|
714
715
|
}), a = T(() => {
|
|
715
716
|
var n;
|
|
@@ -719,15 +720,15 @@ const We = {
|
|
|
719
720
|
const t = k.modelValue.amount, n = k.modelValue.measurement;
|
|
720
721
|
return n ? xt(t, n.conversion) : t;
|
|
721
722
|
}), v = T(
|
|
722
|
-
() => k.isBackdate ? a.value :
|
|
723
|
+
() => k.isBackdate ? a.value : Ze(a.value, B.value)
|
|
723
724
|
), g = T(
|
|
724
|
-
() =>
|
|
725
|
+
() => Jt(v.value, k.modelValue.doc.unit)
|
|
725
726
|
), o = T(
|
|
726
727
|
() => !k.isBackdate && B.value.amount < 0
|
|
727
728
|
);
|
|
728
729
|
return (t, n) => {
|
|
729
730
|
const $ = D("FmButton"), E = D("FmSelect"), N = D("FmTextarea"), O = D("FmCard");
|
|
730
|
-
return j(),
|
|
731
|
+
return j(), ne(O, {
|
|
731
732
|
variant: "outlined",
|
|
732
733
|
class: "grid grid-cols-2 gap-8 p-16"
|
|
733
734
|
}, {
|
|
@@ -737,23 +738,23 @@ const We = {
|
|
|
737
738
|
e("div", To, f(t.modelValue.doc.name), 1),
|
|
738
739
|
e("div", Eo, f(t.modelValue.doc.code), 1)
|
|
739
740
|
]),
|
|
740
|
-
|
|
741
|
+
y($, {
|
|
741
742
|
variant: "tertiary",
|
|
742
743
|
"prepend-icon": "delete",
|
|
743
|
-
onClick: n[0] || (n[0] = (L) =>
|
|
744
|
+
onClick: n[0] || (n[0] = (L) => _("click:delete"))
|
|
744
745
|
})
|
|
745
746
|
]),
|
|
746
|
-
|
|
747
|
+
y(E, {
|
|
747
748
|
disabled: t.disabled,
|
|
748
749
|
class: "col-span-2",
|
|
749
750
|
label: "Type",
|
|
750
751
|
items: d.value,
|
|
751
752
|
modelValue: b.value,
|
|
752
753
|
"onUpdate:modelValue": n[1] || (n[1] = (L) => b.value = L),
|
|
753
|
-
rules: [s(
|
|
754
|
+
rules: [s(Kt)()],
|
|
754
755
|
"label-mark": "required"
|
|
755
756
|
}, null, 8, ["disabled", "items", "modelValue", "rules"]),
|
|
756
|
-
|
|
757
|
+
y(Xt, {
|
|
757
758
|
disabled: t.disabled,
|
|
758
759
|
label: "Amount",
|
|
759
760
|
step: +s(he)({
|
|
@@ -764,14 +765,14 @@ const We = {
|
|
|
764
765
|
"onUpdate:modelValue": n[2] || (n[2] = (L) => R.value = L),
|
|
765
766
|
rules: [s(Ue)(0)]
|
|
766
767
|
}, null, 8, ["disabled", "step", "modelValue", "rules"]),
|
|
767
|
-
|
|
768
|
+
y(E, {
|
|
768
769
|
disabled: t.disabled,
|
|
769
770
|
label: "Unit",
|
|
770
771
|
items: r.value,
|
|
771
772
|
modelValue: C.value,
|
|
772
773
|
"onUpdate:modelValue": n[3] || (n[3] = (L) => C.value = L)
|
|
773
774
|
}, null, 8, ["disabled", "items", "modelValue"]),
|
|
774
|
-
|
|
775
|
+
y(N, {
|
|
775
776
|
class: "col-span-2",
|
|
776
777
|
disabled: t.disabled,
|
|
777
778
|
label: "Remark",
|
|
@@ -799,7 +800,7 @@ const We = {
|
|
|
799
800
|
},
|
|
800
801
|
emits: ["update:show", "submitted"],
|
|
801
802
|
setup(A, { expose: c, emit: k }) {
|
|
802
|
-
const
|
|
803
|
+
const _ = A, w = k, V = Ne(), d = Le(), r = Ae(), b = we(), R = Y(!1), { t: C } = ye();
|
|
803
804
|
function l() {
|
|
804
805
|
g(Re(v));
|
|
805
806
|
}
|
|
@@ -818,25 +819,25 @@ const We = {
|
|
|
818
819
|
($ = (n = a.value) == null ? void 0 : n.resetInputs) == null || $.call(n);
|
|
819
820
|
}
|
|
820
821
|
});
|
|
821
|
-
const B = Ye(
|
|
822
|
+
const B = Ye(_, "show"), v = _t({
|
|
822
823
|
remark: "",
|
|
823
824
|
adjustments: [
|
|
824
825
|
{
|
|
825
826
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
826
827
|
type: ie.enum.PURCHASE,
|
|
827
|
-
doc:
|
|
828
|
+
doc: _.stock,
|
|
828
829
|
measurement: null,
|
|
829
830
|
remark: "",
|
|
830
831
|
amount: xe(1)
|
|
831
832
|
}
|
|
832
833
|
]
|
|
833
834
|
});
|
|
834
|
-
Fe([() =>
|
|
835
|
+
Fe([() => _.show], ([n]) => {
|
|
835
836
|
n && (v.remark = "", v.adjustments = [
|
|
836
837
|
{
|
|
837
838
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
838
839
|
type: ie.enum.PURCHASE,
|
|
839
|
-
doc:
|
|
840
|
+
doc: _.stock,
|
|
840
841
|
measurement: null,
|
|
841
842
|
remark: "",
|
|
842
843
|
amount: xe(1)
|
|
@@ -910,7 +911,7 @@ const We = {
|
|
|
910
911
|
}
|
|
911
912
|
return (n, $) => {
|
|
912
913
|
const E = D("FmTextarea"), N = D("FmButton"), O = D("FmForm"), L = D("FmSideSheet");
|
|
913
|
-
return j(),
|
|
914
|
+
return j(), ne(L, {
|
|
914
915
|
modelValue: s(B),
|
|
915
916
|
"onUpdate:modelValue": $[2] || ($[2] = (X) => Pe(B) ? B.value = X : null),
|
|
916
917
|
"dismiss-away": "",
|
|
@@ -922,28 +923,28 @@ const We = {
|
|
|
922
923
|
])
|
|
923
924
|
]),
|
|
924
925
|
default: M(() => [
|
|
925
|
-
|
|
926
|
+
y(O, {
|
|
926
927
|
class: "w-full flex flex-col gap-12",
|
|
927
928
|
ref_key: "formRef",
|
|
928
929
|
ref: a,
|
|
929
930
|
onValidationSuccess: l
|
|
930
931
|
}, {
|
|
931
932
|
default: M(() => [
|
|
932
|
-
|
|
933
|
+
y(E, {
|
|
933
934
|
label: s(C)("inventory.stock.adjust.remark"),
|
|
934
935
|
modelValue: v.remark,
|
|
935
936
|
"onUpdate:modelValue": $[0] || ($[0] = (X) => v.remark = X)
|
|
936
937
|
}, null, 8, ["label", "modelValue"]),
|
|
937
938
|
e("div", Lo, [
|
|
938
939
|
e("div", Yo, f(s(C)("inventory.stock.adjust.adjustedItems")), 1),
|
|
939
|
-
|
|
940
|
+
y(N, {
|
|
940
941
|
"prepend-icon": "add",
|
|
941
942
|
variant: "tertiary",
|
|
942
943
|
size: "md",
|
|
943
944
|
onClick: o
|
|
944
945
|
})
|
|
945
946
|
]),
|
|
946
|
-
(j(!0), q(ue, null, ve(v.adjustments, (X, z) => (j(),
|
|
947
|
+
(j(!0), q(ue, null, ve(v.adjustments, (X, z) => (j(), ne($t, {
|
|
947
948
|
key: X.id,
|
|
948
949
|
modelValue: v.adjustments[z],
|
|
949
950
|
"onUpdate:modelValue": (K) => v.adjustments[z] = K,
|
|
@@ -955,7 +956,7 @@ const We = {
|
|
|
955
956
|
]),
|
|
956
957
|
"side-sheet-footer": M(() => [
|
|
957
958
|
e("div", zo, [
|
|
958
|
-
|
|
959
|
+
y(N, {
|
|
959
960
|
label: s(C)("inventory.stock.adjust.adjustButton"),
|
|
960
961
|
loading: R.value,
|
|
961
962
|
onClick: $[1] || ($[1] = (X) => {
|
|
@@ -979,7 +980,7 @@ const We = {
|
|
|
979
980
|
},
|
|
980
981
|
emits: ["update:show", "submitted"],
|
|
981
982
|
setup(A, { emit: c }) {
|
|
982
|
-
const k = A,
|
|
983
|
+
const k = A, _ = c, { t: w } = ye(), V = Ne(), d = Ae(), r = Le(), b = we(), R = Ye(k, "show"), C = Y(!1), l = _t({
|
|
983
984
|
remark: "",
|
|
984
985
|
effectiveAt: /* @__PURE__ */ new Date(),
|
|
985
986
|
adjustments: []
|
|
@@ -1081,7 +1082,7 @@ const We = {
|
|
|
1081
1082
|
adjustments: K,
|
|
1082
1083
|
...a.value ? { effectiveAt: l.effectiveAt.toISOString() } : {}
|
|
1083
1084
|
};
|
|
1084
|
-
await d.adjustSku(Re(U)),
|
|
1085
|
+
await d.adjustSku(Re(U)), _("submitted"), _("update:show", !1);
|
|
1085
1086
|
} catch (K) {
|
|
1086
1087
|
b.open({
|
|
1087
1088
|
title: w("inventory.stock.adjust.error.title"),
|
|
@@ -1094,7 +1095,7 @@ const We = {
|
|
|
1094
1095
|
}
|
|
1095
1096
|
return (K, U) => {
|
|
1096
1097
|
const Z = D("FmTextarea"), re = D("FmSwitch"), x = D("FmDatePicker"), F = D("FmTimePicker"), G = D("FmFormGroup"), H = D("FmButton"), J = D("FmForm"), I = D("FmSideSheet");
|
|
1097
|
-
return j(),
|
|
1098
|
+
return j(), ne(I, {
|
|
1098
1099
|
modelValue: s(R),
|
|
1099
1100
|
"onUpdate:modelValue": U[6] || (U[6] = (u) => Pe(R) ? R.value = u : null),
|
|
1100
1101
|
"dismiss-away": "",
|
|
@@ -1107,20 +1108,20 @@ const We = {
|
|
|
1107
1108
|
])
|
|
1108
1109
|
]),
|
|
1109
1110
|
default: M(() => [
|
|
1110
|
-
|
|
1111
|
+
y(J, {
|
|
1111
1112
|
class: "flex flex-col gap-16",
|
|
1112
1113
|
ref_key: "formRef",
|
|
1113
1114
|
ref: g,
|
|
1114
1115
|
onValidationSuccess: z
|
|
1115
1116
|
}, {
|
|
1116
1117
|
default: M(() => [
|
|
1117
|
-
|
|
1118
|
+
y(Z, {
|
|
1118
1119
|
label: s(w)("inventory.stock.adjust.remark"),
|
|
1119
1120
|
modelValue: l.remark,
|
|
1120
1121
|
"onUpdate:modelValue": U[0] || (U[0] = (u) => l.remark = u),
|
|
1121
1122
|
"label-mark": "optional"
|
|
1122
1123
|
}, null, 8, ["label", "modelValue"]),
|
|
1123
|
-
|
|
1124
|
+
y(re, {
|
|
1124
1125
|
value: "",
|
|
1125
1126
|
"model-value": a.value,
|
|
1126
1127
|
"onUpdate:modelValue": U[1] || (U[1] = (u) => a.value = u),
|
|
@@ -1132,7 +1133,7 @@ const We = {
|
|
|
1132
1133
|
e("label", Xo, f(s(w)("inventory.stock.stock_adjustment.effectiveAt")), 1),
|
|
1133
1134
|
e("div", Jo, [
|
|
1134
1135
|
e("div", Qo, [
|
|
1135
|
-
|
|
1136
|
+
y(x, {
|
|
1136
1137
|
class: "w-full",
|
|
1137
1138
|
modelValue: B.value,
|
|
1138
1139
|
"onUpdate:modelValue": U[2] || (U[2] = (u) => B.value = u),
|
|
@@ -1140,7 +1141,7 @@ const We = {
|
|
|
1140
1141
|
}, null, 8, ["modelValue"])
|
|
1141
1142
|
]),
|
|
1142
1143
|
e("div", Zo, [
|
|
1143
|
-
|
|
1144
|
+
y(F, {
|
|
1144
1145
|
class: "w-full",
|
|
1145
1146
|
modelValue: v.value,
|
|
1146
1147
|
"onUpdate:modelValue": U[3] || (U[3] = (u) => v.value = u),
|
|
@@ -1148,7 +1149,7 @@ const We = {
|
|
|
1148
1149
|
}, null, 8, ["modelValue"])
|
|
1149
1150
|
])
|
|
1150
1151
|
]),
|
|
1151
|
-
|
|
1152
|
+
y(G, {
|
|
1152
1153
|
"model-value": o.value,
|
|
1153
1154
|
rules: n.value
|
|
1154
1155
|
}, null, 8, ["model-value", "rules"]),
|
|
@@ -1156,14 +1157,14 @@ const We = {
|
|
|
1156
1157
|
])) : se("", !0),
|
|
1157
1158
|
e("div", tn, [
|
|
1158
1159
|
e("div", on, f(s(w)("inventory.stock.adjust.adjustedItems")), 1),
|
|
1159
|
-
|
|
1160
|
+
y(H, {
|
|
1160
1161
|
"prepend-icon": "add",
|
|
1161
1162
|
variant: "tertiary",
|
|
1162
1163
|
size: "md",
|
|
1163
1164
|
onClick: L
|
|
1164
1165
|
})
|
|
1165
1166
|
]),
|
|
1166
|
-
(j(!0), q(ue, null, ve(l.adjustments, (u, h) => (j(),
|
|
1167
|
+
(j(!0), q(ue, null, ve(l.adjustments, (u, h) => (j(), ne($t, {
|
|
1167
1168
|
key: u.doc._id,
|
|
1168
1169
|
modelValue: l.adjustments[h],
|
|
1169
1170
|
"onUpdate:modelValue": (p) => l.adjustments[h] = p,
|
|
@@ -1176,7 +1177,7 @@ const We = {
|
|
|
1176
1177
|
]),
|
|
1177
1178
|
"side-sheet-footer": M(() => [
|
|
1178
1179
|
e("div", nn, [
|
|
1179
|
-
|
|
1180
|
+
y(H, {
|
|
1180
1181
|
label: s(w)("common.confirm"),
|
|
1181
1182
|
loading: C.value,
|
|
1182
1183
|
disabled: $.value,
|
|
@@ -1185,10 +1186,10 @@ const We = {
|
|
|
1185
1186
|
return (p = (h = g.value) == null ? void 0 : h.validateInputs) == null ? void 0 : p.call(h);
|
|
1186
1187
|
})
|
|
1187
1188
|
}, null, 8, ["label", "loading", "disabled"]),
|
|
1188
|
-
|
|
1189
|
+
y(H, {
|
|
1189
1190
|
label: s(w)("common.close"),
|
|
1190
1191
|
variant: "tertiary",
|
|
1191
|
-
onClick: U[5] || (U[5] = (u) =>
|
|
1192
|
+
onClick: U[5] || (U[5] = (u) => _("update:show", !1))
|
|
1192
1193
|
}, null, 8, ["label"])
|
|
1193
1194
|
])
|
|
1194
1195
|
]),
|
|
@@ -1198,11 +1199,11 @@ const We = {
|
|
|
1198
1199
|
}
|
|
1199
1200
|
}), an = Tt((A, c) => ({
|
|
1200
1201
|
// TODO: remove once latest inventory backend has been push
|
|
1201
|
-
async findBillsByBusinessId(k,
|
|
1202
|
+
async findBillsByBusinessId(k, _, w) {
|
|
1202
1203
|
const V = `${A.businessesBackendUrl}/${k}/reports/find-many`, d = {
|
|
1203
1204
|
// type: TYPE.bill,
|
|
1204
1205
|
type: "bill",
|
|
1205
|
-
restaurantIds:
|
|
1206
|
+
restaurantIds: _,
|
|
1206
1207
|
ids: w
|
|
1207
1208
|
};
|
|
1208
1209
|
return await c.post(V, d);
|
|
@@ -1218,19 +1219,19 @@ const We = {
|
|
|
1218
1219
|
class: "flex justify-center items-center h-32"
|
|
1219
1220
|
}, ln = { class: "mb-3" }, un = { class: "flex flex-col gap-8" }, cn = { class: "flex flex-col text-fm-color-typo-primary mb-3 text-center" }, dn = { class: "text-fm-color-neutral-gray-400 fm-typo-en-body-sm-600" }, mn = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, fn = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, vn = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, pn = { class: "flex flex-col w-full px-2" }, yn = { class: "flex gap-2" }, _n = /* @__PURE__ */ pe({
|
|
1220
1221
|
__name: "AmendAdjustmentForm",
|
|
1221
|
-
props: /* @__PURE__ */
|
|
1222
|
+
props: /* @__PURE__ */ st({
|
|
1222
1223
|
adjustmentId: {}
|
|
1223
1224
|
}, {
|
|
1224
1225
|
modelValue: {},
|
|
1225
1226
|
modelModifiers: {}
|
|
1226
1227
|
}),
|
|
1227
|
-
emits: /* @__PURE__ */
|
|
1228
|
+
emits: /* @__PURE__ */ st(["refreshHistory"], ["update:modelValue"]),
|
|
1228
1229
|
setup(A, { emit: c }) {
|
|
1229
|
-
const k = A,
|
|
1230
|
+
const k = A, _ = c, w = Ae(), V = jt(A, "modelValue"), d = Y(!1), r = Y(!1), b = Y(!1), R = Y({
|
|
1230
1231
|
_id: `inventoryAdjustment_${(/* @__PURE__ */ new Date()).toISOString()}_XXXXX`,
|
|
1231
1232
|
skus: []
|
|
1232
1233
|
}), C = Y();
|
|
1233
|
-
|
|
1234
|
+
Xe(async () => {
|
|
1234
1235
|
d.value = !0;
|
|
1235
1236
|
const o = await w.readSingleAdjustment(k.adjustmentId);
|
|
1236
1237
|
if (!o) throw new Error("Adjustment not found");
|
|
@@ -1250,7 +1251,7 @@ const We = {
|
|
|
1250
1251
|
}), await w.revertWastageAdjustment({
|
|
1251
1252
|
targetWastageAdjustmentId: k.adjustmentId,
|
|
1252
1253
|
amountsGoingToAdjust: o
|
|
1253
|
-
}),
|
|
1254
|
+
}), _("refreshHistory"), b.value = !1, V.value = {};
|
|
1254
1255
|
}
|
|
1255
1256
|
function a(o) {
|
|
1256
1257
|
const { skuId: t, idx: n, unit: $, measurement: E } = o;
|
|
@@ -1288,19 +1289,19 @@ const We = {
|
|
|
1288
1289
|
}
|
|
1289
1290
|
return (o, t) => {
|
|
1290
1291
|
const n = D("FmIcon"), $ = D("FmStepperField"), E = D("FmCard"), N = D("FmForm"), O = D("FmSpacer"), L = D("FmButton"), X = D("FmDialog");
|
|
1291
|
-
return j(),
|
|
1292
|
+
return j(), ne(X, {
|
|
1292
1293
|
modelValue: b.value,
|
|
1293
1294
|
"onUpdate:modelValue": t[4] || (t[4] = (z) => b.value = z),
|
|
1294
1295
|
overlay: !0
|
|
1295
1296
|
}, {
|
|
1296
1297
|
"dialog-button": M(() => [
|
|
1297
|
-
|
|
1298
|
+
y(Qe, null, {
|
|
1298
1299
|
default: M(() => [
|
|
1299
1300
|
e("button", {
|
|
1300
1301
|
onClick: t[0] || (t[0] = (z) => b.value = !0),
|
|
1301
1302
|
class: "rounded-md hover:bg-gray-100 transition-colors"
|
|
1302
1303
|
}, [
|
|
1303
|
-
|
|
1304
|
+
y(n, {
|
|
1304
1305
|
name: "edit",
|
|
1305
1306
|
size: "sm"
|
|
1306
1307
|
})
|
|
@@ -1316,15 +1317,15 @@ const We = {
|
|
|
1316
1317
|
e("div", pn, [
|
|
1317
1318
|
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)),
|
|
1318
1319
|
e("div", yn, [
|
|
1319
|
-
|
|
1320
|
-
|
|
1320
|
+
y(O),
|
|
1321
|
+
y(L, {
|
|
1321
1322
|
class: "sm:w-full xs:w-full",
|
|
1322
1323
|
label: "Close",
|
|
1323
1324
|
size: "md",
|
|
1324
1325
|
variant: "tertiary",
|
|
1325
1326
|
onClick: t[3] || (t[3] = (z) => b.value = !1)
|
|
1326
1327
|
}),
|
|
1327
|
-
|
|
1328
|
+
y(L, {
|
|
1328
1329
|
class: "sm:w-full xs:w-full",
|
|
1329
1330
|
label: "Submit",
|
|
1330
1331
|
size: "md",
|
|
@@ -1335,7 +1336,7 @@ const We = {
|
|
|
1335
1336
|
])
|
|
1336
1337
|
]),
|
|
1337
1338
|
default: M(() => [
|
|
1338
|
-
d.value ? (j(), q("div", rn)) : (j(),
|
|
1339
|
+
d.value ? (j(), q("div", rn)) : (j(), ne(N, {
|
|
1339
1340
|
key: 1,
|
|
1340
1341
|
ref_key: "formRef",
|
|
1341
1342
|
ref: C,
|
|
@@ -1351,11 +1352,11 @@ const We = {
|
|
|
1351
1352
|
e("p", ln, [
|
|
1352
1353
|
t[6] || (t[6] = e("b", null, "Date:", -1)),
|
|
1353
1354
|
t[7] || (t[7] = e("br", null, null, -1)),
|
|
1354
|
-
me(" " + f(s(
|
|
1355
|
+
me(" " + f(s(Qt)(s(Et)(R.value._id))), 1)
|
|
1355
1356
|
]),
|
|
1356
1357
|
e("div", un, [
|
|
1357
1358
|
(j(!0), q(ue, null, ve(R.value.skus, (z, K) => (j(), q(ue, { key: K }, [
|
|
1358
|
-
(j(!0), q(ue, null, ve(z.amounts, (U, Z) => (j(),
|
|
1359
|
+
(j(!0), q(ue, null, ve(z.amounts, (U, Z) => (j(), ne(E, {
|
|
1359
1360
|
key: Z,
|
|
1360
1361
|
variant: "outlined",
|
|
1361
1362
|
class: "p-2"
|
|
@@ -1374,7 +1375,7 @@ const We = {
|
|
|
1374
1375
|
t[9] || (t[9] = e("span", { class: "fm-typo-en-body-lg-600" }, "Current amount:", -1)),
|
|
1375
1376
|
e("span", null, f(s(_e).toFormatString({ value: U.amount })) + " " + f(v(z, U)), 1)
|
|
1376
1377
|
]),
|
|
1377
|
-
|
|
1378
|
+
y($, {
|
|
1378
1379
|
"max-fraction-digits": s($e)(z.sku.unit),
|
|
1379
1380
|
"model-value": a({
|
|
1380
1381
|
skuId: z.sku._id,
|
|
@@ -1463,8 +1464,8 @@ const We = {
|
|
|
1463
1464
|
const v = [...a].filter((g) => new Date(g.snapshotAt) <= new Date(l)).sort((g, o) => new Date(o.snapshotAt).getTime() - new Date(g.snapshotAt).getTime());
|
|
1464
1465
|
return v.length > 0 ? v[0].cost : null;
|
|
1465
1466
|
}
|
|
1466
|
-
const
|
|
1467
|
-
|
|
1467
|
+
const _ = Y(!1), w = Y(), V = Y(null), d = T(() => V.value === null ? "unset" : _.value ? `${V.value}px` : "0px");
|
|
1468
|
+
Xe(() => {
|
|
1468
1469
|
var C;
|
|
1469
1470
|
V.value = ((C = w.value) == null ? void 0 : C.scrollHeight) || 0;
|
|
1470
1471
|
});
|
|
@@ -1476,18 +1477,18 @@ const We = {
|
|
|
1476
1477
|
}).flatMap((o) => o.amounts);
|
|
1477
1478
|
for (const o of v) {
|
|
1478
1479
|
const t = o.measurement ? xt(o.measurement.conversion, o.amount) : o.amount;
|
|
1479
|
-
a[g = o.type] ?? (a[g] = { amount: 0, precision: 0 }), a[o.type] =
|
|
1480
|
+
a[g = o.type] ?? (a[g] = { amount: 0, precision: 0 }), a[o.type] = Ze(t, a[o.type]);
|
|
1480
1481
|
}
|
|
1481
1482
|
return Object.entries(a).reduce(
|
|
1482
1483
|
(o, [t, n]) => (o[t] = /// comment, because without it formatter makes code uglier
|
|
1483
|
-
`${
|
|
1484
|
+
`${oe.toFormatString({
|
|
1484
1485
|
value: n,
|
|
1485
1486
|
precision: 4
|
|
1486
1487
|
})} ${l.unit.abbrev}`, o),
|
|
1487
1488
|
{}
|
|
1488
1489
|
);
|
|
1489
1490
|
}), { t: b } = ye(), R = T(() => c.record.adjustmentsByTime.map(({ date: C, adjustments: l }) => ({
|
|
1490
|
-
time:
|
|
1491
|
+
time: Zt(new Date(C)),
|
|
1491
1492
|
adjustments: l.flatMap(
|
|
1492
1493
|
(a) => {
|
|
1493
1494
|
var B, v;
|
|
@@ -1513,9 +1514,9 @@ const We = {
|
|
|
1513
1514
|
var N;
|
|
1514
1515
|
let $ = n.cost;
|
|
1515
1516
|
if (o) {
|
|
1516
|
-
const O =
|
|
1517
|
+
const O = oe.fromDinero(o), L = n.amount, X = n.measurement ? oe.multiply([L, n.measurement.conversion]) : L;
|
|
1517
1518
|
$ = {
|
|
1518
|
-
...
|
|
1519
|
+
...oe.multiply([
|
|
1519
1520
|
O,
|
|
1520
1521
|
X
|
|
1521
1522
|
]),
|
|
@@ -1524,15 +1525,15 @@ const We = {
|
|
|
1524
1525
|
}
|
|
1525
1526
|
let E = "";
|
|
1526
1527
|
return v ? E = n.remark || "" : E = [a.adjustmentRemark, n.remark].filter((L) => L).join("/"), {
|
|
1527
|
-
amount: `${
|
|
1528
|
+
amount: `${oe.toFormatString({ value: n.amount, precision: 4 })} ${((N = n.measurement) == null ? void 0 : N.abbrev) ?? a.sku.unit.abbrev}`,
|
|
1528
1529
|
backdateFrom: a.backdateFrom,
|
|
1529
1530
|
name: n.type,
|
|
1530
1531
|
billRemark: v,
|
|
1531
1532
|
remark: E,
|
|
1532
1533
|
reason: a.reason || "",
|
|
1533
1534
|
cost: $,
|
|
1534
|
-
toBalance:
|
|
1535
|
-
value: a.toBalance ??
|
|
1535
|
+
toBalance: oe.toFormatString({
|
|
1536
|
+
value: a.toBalance ?? oe.fromNumber(0),
|
|
1536
1537
|
precision: 4
|
|
1537
1538
|
}),
|
|
1538
1539
|
baseUnit: a.sku.unit.abbrev,
|
|
@@ -1544,16 +1545,16 @@ const We = {
|
|
|
1544
1545
|
})));
|
|
1545
1546
|
return (C, l) => {
|
|
1546
1547
|
const a = D("FmIcon"), B = D("FmTooltip"), v = D("FmCard");
|
|
1547
|
-
return j(),
|
|
1548
|
+
return j(), ne(v, { variant: "outlined" }, {
|
|
1548
1549
|
default: M(() => [
|
|
1549
1550
|
e("div", kn, [
|
|
1550
1551
|
e("div", {
|
|
1551
1552
|
class: "flex items-center cursor-pointer mb-1",
|
|
1552
|
-
onClick: l[0] || (l[0] = (g) =>
|
|
1553
|
+
onClick: l[0] || (l[0] = (g) => _.value = !_.value)
|
|
1553
1554
|
}, [
|
|
1554
1555
|
e("div", hn, f(C.record.date), 1),
|
|
1555
|
-
|
|
1556
|
-
name:
|
|
1556
|
+
y(a, {
|
|
1557
|
+
name: _.value ? "expand_more" : "expand_less",
|
|
1557
1558
|
color: "#777777",
|
|
1558
1559
|
size: "md"
|
|
1559
1560
|
}, null, 8, ["name"])
|
|
@@ -1597,7 +1598,7 @@ const We = {
|
|
|
1597
1598
|
}, [
|
|
1598
1599
|
e("div", wn, [
|
|
1599
1600
|
me(f(s(b)(`inventory.inventoryAdjustment.type.${o.name}`)) + " ", 1),
|
|
1600
|
-
o.backdateFrom ? (j(),
|
|
1601
|
+
o.backdateFrom ? (j(), ne(B, {
|
|
1601
1602
|
key: 0,
|
|
1602
1603
|
variant: "plain",
|
|
1603
1604
|
placement: "top",
|
|
@@ -1609,7 +1610,7 @@ const We = {
|
|
|
1609
1610
|
])), 1)
|
|
1610
1611
|
]),
|
|
1611
1612
|
default: M(() => [
|
|
1612
|
-
|
|
1613
|
+
y(a, {
|
|
1613
1614
|
name: "info",
|
|
1614
1615
|
size: "sm",
|
|
1615
1616
|
color: "primary"
|
|
@@ -1621,7 +1622,7 @@ const We = {
|
|
|
1621
1622
|
o.billRemark && o.remark ? (j(), q("span", $n, " (" + f(o.remark) + ") ", 1)) : se("", !0),
|
|
1622
1623
|
!o.billRemark && o.reason ? (j(), q("span", jn, " (" + f(o.reason) + ") ", 1)) : se("", !0),
|
|
1623
1624
|
!o.billRemark && o.remark ? (j(), q("span", Vn, " # " + f(o.remark), 1)) : se("", !0),
|
|
1624
|
-
(t = o.createdBy) != null && t.name ? (j(),
|
|
1625
|
+
(t = o.createdBy) != null && t.name ? (j(), ne(B, {
|
|
1625
1626
|
key: 5,
|
|
1626
1627
|
variant: "plain",
|
|
1627
1628
|
placement: "top",
|
|
@@ -1632,7 +1633,7 @@ const We = {
|
|
|
1632
1633
|
]),
|
|
1633
1634
|
default: M(() => [
|
|
1634
1635
|
e("span", Cn, [
|
|
1635
|
-
|
|
1636
|
+
y(a, {
|
|
1636
1637
|
name: "person",
|
|
1637
1638
|
size: "sm",
|
|
1638
1639
|
color: "primary"
|
|
@@ -1651,7 +1652,7 @@ const We = {
|
|
|
1651
1652
|
"ml-auto": !0
|
|
1652
1653
|
})
|
|
1653
1654
|
}, f(o.amount), 3),
|
|
1654
|
-
o.name === s(ie).Enum.WASTAGE ? (j(),
|
|
1655
|
+
o.name === s(ie).Enum.WASTAGE ? (j(), ne(_n, {
|
|
1655
1656
|
key: 0,
|
|
1656
1657
|
adjustmentId: o.adjustmentId,
|
|
1657
1658
|
onRefreshHistory: l[1] || (l[1] = (n) => C.$emit("refreshHistory"))
|
|
@@ -1677,7 +1678,7 @@ function In(A, c) {
|
|
|
1677
1678
|
);
|
|
1678
1679
|
if (!c)
|
|
1679
1680
|
return Object.entries(k).reduce(
|
|
1680
|
-
(d, [r]) => (d[r] =
|
|
1681
|
+
(d, [r]) => (d[r] = oe.fromNumber(0), d),
|
|
1681
1682
|
{}
|
|
1682
1683
|
);
|
|
1683
1684
|
const w = A.flatMap((d) => {
|
|
@@ -1685,8 +1686,8 @@ function In(A, c) {
|
|
|
1685
1686
|
return ((r = d.skus) == null ? void 0 : r.filter((b) => b.sku._id === c._id)) ?? [];
|
|
1686
1687
|
}).flatMap((d) => d.amounts);
|
|
1687
1688
|
for (const d of w) {
|
|
1688
|
-
const r = d.measurement ?
|
|
1689
|
-
k[V = d.type] ?? (k[V] = { amount: 0, precision: 0 }), k[d.type] =
|
|
1689
|
+
const r = d.measurement ? oe.multiply([d.measurement.conversion, d.amount]) : d.amount;
|
|
1690
|
+
k[V = d.type] ?? (k[V] = { amount: 0, precision: 0 }), k[d.type] = oe.add([r, k[d.type]]);
|
|
1690
1691
|
}
|
|
1691
1692
|
return Object.entries(k).reduce(
|
|
1692
1693
|
(d, [r, b]) => {
|
|
@@ -1695,7 +1696,7 @@ function In(A, c) {
|
|
|
1695
1696
|
amount: Math.abs(b.amount)
|
|
1696
1697
|
};
|
|
1697
1698
|
return d[r] = /// comment, because without it formatter makes code uglier
|
|
1698
|
-
`${
|
|
1699
|
+
`${oe.toFormatString({
|
|
1699
1700
|
value: R,
|
|
1700
1701
|
precision: 4
|
|
1701
1702
|
})} ${c.unit.abbrev}`, d;
|
|
@@ -1719,11 +1720,11 @@ function Hn(A, c) {
|
|
|
1719
1720
|
for (const r of d) {
|
|
1720
1721
|
if (r.type !== ie.Enum.SALES)
|
|
1721
1722
|
continue;
|
|
1722
|
-
const b = r.measurement ?
|
|
1723
|
-
k ?? (k =
|
|
1723
|
+
const b = r.measurement ? oe.multiply([r.measurement.conversion, r.amount]) : r.amount;
|
|
1724
|
+
k ?? (k = oe.fromNumber(0)), k = oe.add([k, b]);
|
|
1724
1725
|
}
|
|
1725
1726
|
}
|
|
1726
|
-
return k != null ? (k.amount = Math.abs(k.amount), `${
|
|
1727
|
+
return k != null ? (k.amount = Math.abs(k.amount), `${oe.toFormatString({
|
|
1727
1728
|
value: k,
|
|
1728
1729
|
precision: 4
|
|
1729
1730
|
})} ${c.unit.abbrev}`) : null;
|
|
@@ -1740,10 +1741,10 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1740
1741
|
}, 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 flex" }, 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 = { class: "flex flex-col gap-1" }, ms = { class: "text-fm-color-typo-secondary" }, fs = { class: "font-bold" }, vs = { class: "flex flex-col gap-1" }, ps = { class: "text-fm-color-typo-secondary" }, ys = { class: "font-bold" }, _s = { class: "flex flex-col gap-1" }, ks = { class: "text-fm-color-typo-secondary" }, hs = { class: "font-bold" }, bs = {
|
|
1741
1742
|
key: 0,
|
|
1742
1743
|
class: "flex flex-col gap-8"
|
|
1743
|
-
}, gs = { class: "flex" }, xs = { class: "flex-1 flex flex-col gap-1" }, Ss = { class: "flex gap-1 items-center text-fm-color-typo-secondary" },
|
|
1744
|
+
}, gs = { class: "flex" }, xs = { class: "flex-1 flex flex-col gap-1" }, Ss = { class: "flex items-center gap-8" }, ws = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, As = { class: "font-bold" }, Fs = { class: "flex-1 flex flex-col gap-1" }, $s = { class: "flex items-center gap-8" }, js = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, Vs = { class: "flex flex-col gap-1" }, Cs = { class: "font-bold" }, Bs = {
|
|
1744
1745
|
key: 2,
|
|
1745
1746
|
class: "flex-1 flex flex-col items-center gap-8"
|
|
1746
|
-
},
|
|
1747
|
+
}, Ds = ["src"], Ms = { class: "font-bold text-lg" }, Is = { class: "text-xs text-neutral-400 text-center" }, Hs = /* @__PURE__ */ pe({
|
|
1747
1748
|
__name: "StockHistory",
|
|
1748
1749
|
props: {
|
|
1749
1750
|
sku: {},
|
|
@@ -1751,9 +1752,9 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1751
1752
|
},
|
|
1752
1753
|
emits: ["update:show"],
|
|
1753
1754
|
setup(A) {
|
|
1754
|
-
const c =
|
|
1755
|
+
const c = Je(), k = Oe(), _ = Ae(), w = an(), V = Se(), d = ao(), { t: r } = ye(), b = A, R = Y(!1), C = we(), l = Y("adjustment"), a = Y([
|
|
1755
1756
|
{ label: "Adjustment (Default)", value: "adjustment" }
|
|
1756
|
-
]), B = Y([]), v = Y(
|
|
1757
|
+
]), B = Y([]), v = Y(no(0));
|
|
1757
1758
|
async function g() {
|
|
1758
1759
|
R.value = !0;
|
|
1759
1760
|
try {
|
|
@@ -1768,14 +1769,14 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1768
1769
|
R.value = !1;
|
|
1769
1770
|
}
|
|
1770
1771
|
}
|
|
1771
|
-
|
|
1772
|
+
Xe(() => {
|
|
1772
1773
|
g();
|
|
1773
1774
|
}), Fe([() => v.value, () => b.sku], () => {
|
|
1774
1775
|
g();
|
|
1775
1776
|
});
|
|
1776
1777
|
const o = Y([]), t = Y([]), n = Y(new Array());
|
|
1777
1778
|
function $(u, h) {
|
|
1778
|
-
return h === "day" ?
|
|
1779
|
+
return h === "day" ? oo(u) : wt(u);
|
|
1779
1780
|
}
|
|
1780
1781
|
function E(u, h) {
|
|
1781
1782
|
const p = u.reduce(
|
|
@@ -1794,7 +1795,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1794
1795
|
}));
|
|
1795
1796
|
}
|
|
1796
1797
|
async function N() {
|
|
1797
|
-
let u = await
|
|
1798
|
+
let u = await _.readStockAdjustment(
|
|
1798
1799
|
b.sku._id,
|
|
1799
1800
|
dt(new Date(v.value.startDate)).toISOString(),
|
|
1800
1801
|
mt(new Date(v.value.endDate)).toISOString()
|
|
@@ -1807,7 +1808,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1807
1808
|
adjustmentsByTime: E(m, "minute")
|
|
1808
1809
|
}));
|
|
1809
1810
|
try {
|
|
1810
|
-
const p = await
|
|
1811
|
+
const p = await _.readUnitCostHistory(
|
|
1811
1812
|
b.sku._id,
|
|
1812
1813
|
dt(new Date(v.value.startDate)).toISOString(),
|
|
1813
1814
|
mt(new Date(v.value.endDate)).toISOString()
|
|
@@ -1852,7 +1853,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1852
1853
|
amount: 0,
|
|
1853
1854
|
precision: 0
|
|
1854
1855
|
}, h = b.sku;
|
|
1855
|
-
return h ? `${
|
|
1856
|
+
return h ? `${oe.toFormatString({
|
|
1856
1857
|
value: u,
|
|
1857
1858
|
precision: 4
|
|
1858
1859
|
})} ${h.unit.abbrev}` : "";
|
|
@@ -1865,7 +1866,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1865
1866
|
amount: 0,
|
|
1866
1867
|
precision: 0
|
|
1867
1868
|
}, h = b.sku;
|
|
1868
|
-
return h ? `${
|
|
1869
|
+
return h ? `${oe.toFormatString({ value: u, precision: 4 })} ${h.unit.abbrev}` : "";
|
|
1869
1870
|
}), U = T(() => {
|
|
1870
1871
|
var p;
|
|
1871
1872
|
const h = o.value.flatMap((m) => {
|
|
@@ -1876,11 +1877,11 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1876
1877
|
const S = i.cost;
|
|
1877
1878
|
if (!S) return m;
|
|
1878
1879
|
const P = {
|
|
1879
|
-
...
|
|
1880
|
+
...zt(m, Math.max(m.precision, S.precision)),
|
|
1880
1881
|
currency: S.currency
|
|
1881
1882
|
};
|
|
1882
1883
|
return {
|
|
1883
|
-
...
|
|
1884
|
+
...Ze(P, S),
|
|
1884
1885
|
currency: m.currency
|
|
1885
1886
|
};
|
|
1886
1887
|
},
|
|
@@ -1893,7 +1894,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1893
1894
|
return Me(h, !1, h.precision);
|
|
1894
1895
|
});
|
|
1895
1896
|
function Z() {
|
|
1896
|
-
const { startDate: u, endDate: h } =
|
|
1897
|
+
const { startDate: u, endDate: h } = eo(v.value);
|
|
1897
1898
|
u !== null && h !== null && (v.value = {
|
|
1898
1899
|
startDate: u,
|
|
1899
1900
|
endDate: h
|
|
@@ -1918,8 +1919,8 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1918
1919
|
const F = T(() => {
|
|
1919
1920
|
var m, i, S, P, ee, ae;
|
|
1920
1921
|
const u = [...o.value].reverse().find((Q) => {
|
|
1921
|
-
var W,
|
|
1922
|
-
return (
|
|
1922
|
+
var W, te;
|
|
1923
|
+
return (te = (W = Q.skus) == null ? void 0 : W.find) == null ? void 0 : te.call(W, (le) => le.sku._id === b.sku._id);
|
|
1923
1924
|
});
|
|
1924
1925
|
if (!u) return "No data";
|
|
1925
1926
|
const h = (m = u.skus) == null ? void 0 : m.find((Q) => Q.sku._id === b.sku._id);
|
|
@@ -1929,10 +1930,10 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1929
1930
|
const Q = [...h.amounts].reverse()[0], W = {
|
|
1930
1931
|
amount: ((i = Q.cost) == null ? void 0 : i.amount) ?? 0,
|
|
1931
1932
|
precision: ((S = Q.cost) == null ? void 0 : S.precision) ?? 0
|
|
1932
|
-
},
|
|
1933
|
+
}, te = Q.amount, le = te.amount == 0 ? oe.fromNumber(0) : oe.divide([W, te]);
|
|
1933
1934
|
return {
|
|
1934
|
-
...
|
|
1935
|
-
currency: ((P = Q.cost) == null ? void 0 : P.currency) || Ce(((ee = c.currentCountry) == null ? void 0 : ee.value) ??
|
|
1935
|
+
...oe.multiply([le, p]),
|
|
1936
|
+
currency: ((P = Q.cost) == null ? void 0 : P.currency) || Ce(((ee = c.currentCountry) == null ? void 0 : ee.value) ?? it)
|
|
1936
1937
|
};
|
|
1937
1938
|
} else {
|
|
1938
1939
|
const Q = u.effectiveAt ?? Te(u._id), W = x(
|
|
@@ -1940,10 +1941,10 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1940
1941
|
Q ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
1941
1942
|
);
|
|
1942
1943
|
if (!W) return "No data";
|
|
1943
|
-
const
|
|
1944
|
+
const te = oe.fromDinero(W);
|
|
1944
1945
|
return {
|
|
1945
|
-
...
|
|
1946
|
-
currency: W.currency || Ce(((ae = c.currentCountry) == null ? void 0 : ae.value) ??
|
|
1946
|
+
...oe.multiply([te, p]),
|
|
1947
|
+
currency: W.currency || Ce(((ae = c.currentCountry) == null ? void 0 : ae.value) ?? it)
|
|
1947
1948
|
};
|
|
1948
1949
|
}
|
|
1949
1950
|
}), G = T(() => {
|
|
@@ -1954,15 +1955,15 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1954
1955
|
return i == null ? void 0 : i.toCostBalances;
|
|
1955
1956
|
});
|
|
1956
1957
|
return !u || u.some((m) => m.cost == null) ? "No data" : {
|
|
1957
|
-
...u.reduce((m, i) =>
|
|
1958
|
+
...u.reduce((m, i) => oe.add([m, oe.fromDinero(i.cost)]), {
|
|
1958
1959
|
amount: 0,
|
|
1959
1960
|
precision: 0
|
|
1960
1961
|
}),
|
|
1961
1962
|
currency: Ce((p = c.currentCountry) == null ? void 0 : p.value)
|
|
1962
1963
|
};
|
|
1963
|
-
}), H = T(() => b.sku.valuation ===
|
|
1964
|
+
}), H = T(() => b.sku.valuation === ut.Enum.FIFO ? G.value : F.value);
|
|
1964
1965
|
function J() {
|
|
1965
|
-
const { startDate: u, endDate: h } =
|
|
1966
|
+
const { startDate: u, endDate: h } = to(v.value);
|
|
1966
1967
|
u !== null && h !== null && (v.value = {
|
|
1967
1968
|
startDate: u,
|
|
1968
1969
|
endDate: h
|
|
@@ -1970,8 +1971,8 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1970
1971
|
}
|
|
1971
1972
|
const I = Ye(b, "show");
|
|
1972
1973
|
return (u, h) => {
|
|
1973
|
-
const p = D("FmButton"), m = D("FmField"), i = D("FmDateRangePicker"), S = D("FmSpacer"), P = D("FmCircularProgress"), ee = D("FmIcon"), ae = D("FmTooltip"), Q = D("FmMenuDivider"), W = D("FmChip"),
|
|
1974
|
-
return j(),
|
|
1974
|
+
const p = D("FmButton"), m = D("FmField"), i = D("FmDateRangePicker"), S = D("FmSpacer"), P = D("FmCircularProgress"), ee = D("FmIcon"), ae = D("FmTooltip"), Q = D("FmMenuDivider"), W = D("FmChip"), te = D("FmSelect"), le = D("FmCardSection"), ce = D("FmCard"), je = D("FmSideSheet");
|
|
1975
|
+
return j(), ne(je, {
|
|
1975
1976
|
"dismiss-away": "",
|
|
1976
1977
|
modelValue: s(I),
|
|
1977
1978
|
"onUpdate:modelValue": h[5] || (h[5] = (fe) => Pe(I) ? I.value = fe : null),
|
|
@@ -1981,7 +1982,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1981
1982
|
"side-sheet-header": M(() => [
|
|
1982
1983
|
e("div", Tn, [
|
|
1983
1984
|
e("div", En, f(s(r)("inventory.stock.history.title", [u.sku.name])), 1),
|
|
1984
|
-
|
|
1985
|
+
y(p, {
|
|
1985
1986
|
variant: "tertiary",
|
|
1986
1987
|
"prepend-icon": "close",
|
|
1987
1988
|
onClick: h[0] || (h[0] = (fe) => I.value = !1)
|
|
@@ -1994,7 +1995,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
1994
1995
|
e("div", Un, [
|
|
1995
1996
|
e("div", Pn, [
|
|
1996
1997
|
e("div", Rn, [
|
|
1997
|
-
|
|
1998
|
+
y(i, {
|
|
1998
1999
|
modelValue: v.value,
|
|
1999
2000
|
"onUpdate:modelValue": h[1] || (h[1] = (de) => v.value = de),
|
|
2000
2001
|
"show-predefined-range": "",
|
|
@@ -2003,7 +2004,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2003
2004
|
"z-index": 50
|
|
2004
2005
|
}, {
|
|
2005
2006
|
"trigger-button": M(({ opened: de }) => [
|
|
2006
|
-
|
|
2007
|
+
y(m, {
|
|
2007
2008
|
"prepend-icon": "calendar_month",
|
|
2008
2009
|
focused: de
|
|
2009
2010
|
}, {
|
|
@@ -2016,27 +2017,27 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2016
2017
|
_: 1
|
|
2017
2018
|
}, 8, ["modelValue"])
|
|
2018
2019
|
]),
|
|
2019
|
-
|
|
2020
|
+
y(p, {
|
|
2020
2021
|
variant: "tertiary",
|
|
2021
2022
|
onClick: h[2] || (h[2] = (de) => Z()),
|
|
2022
2023
|
"prepend-icon": "navigate_before"
|
|
2023
2024
|
}),
|
|
2024
|
-
|
|
2025
|
+
y(p, {
|
|
2025
2026
|
variant: "tertiary",
|
|
2026
2027
|
onClick: h[3] || (h[3] = (de) => J()),
|
|
2027
2028
|
"prepend-icon": "navigate_next"
|
|
2028
2029
|
})
|
|
2029
2030
|
]),
|
|
2030
2031
|
R.value ? (j(), q("div", Nn, [
|
|
2031
|
-
|
|
2032
|
-
|
|
2032
|
+
y(S),
|
|
2033
|
+
y(P, { size: "xl" }),
|
|
2033
2034
|
e("div", On, f(s(r)("inventory.stock.history.loading")), 1),
|
|
2034
|
-
|
|
2035
|
-
|
|
2035
|
+
y(S),
|
|
2036
|
+
y(S)
|
|
2036
2037
|
])) : t.value && ((fe = t.value) == null ? void 0 : fe.length) > 0 ? (j(), q("div", Ln, [
|
|
2037
|
-
|
|
2038
|
+
y(ce, { variant: "outlined" }, {
|
|
2038
2039
|
default: M(() => [
|
|
2039
|
-
|
|
2040
|
+
y(le, { class: "flex flex-col gap-4" }, {
|
|
2040
2041
|
default: M(() => [
|
|
2041
2042
|
e("div", Yn, [
|
|
2042
2043
|
e("div", zn, f(s(r)("inventory.stock.history.summary.title")), 1)
|
|
@@ -2049,7 +2050,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2049
2050
|
e("div", Xn, [
|
|
2050
2051
|
e("div", Jn, [
|
|
2051
2052
|
me(f(s(r)("inventory.stock.history.summary.totalSales")) + " ", 1),
|
|
2052
|
-
X.value != null ? (j(),
|
|
2053
|
+
X.value != null ? (j(), ne(ae, {
|
|
2053
2054
|
key: 0,
|
|
2054
2055
|
variant: "plain",
|
|
2055
2056
|
placement: "top",
|
|
@@ -2057,7 +2058,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2057
2058
|
"z-index": 50
|
|
2058
2059
|
}, {
|
|
2059
2060
|
default: M(() => [
|
|
2060
|
-
|
|
2061
|
+
y(ee, {
|
|
2061
2062
|
name: "warning",
|
|
2062
2063
|
size: "sm"
|
|
2063
2064
|
})
|
|
@@ -2097,34 +2098,36 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2097
2098
|
])
|
|
2098
2099
|
]),
|
|
2099
2100
|
s(d).enableTotalCost ? (j(), q("div", bs, [
|
|
2100
|
-
|
|
2101
|
+
y(Q, { class: "w-full" }),
|
|
2101
2102
|
e("div", gs, [
|
|
2102
2103
|
e("div", xs, [
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
}, 8, ["content"])
|
|
2121
|
-
])
|
|
2104
|
+
e("div", Ss, [
|
|
2105
|
+
e("div", ws, [
|
|
2106
|
+
me(f(s(r)("inventory.stock.history.estimatedValue")) + " ", 1),
|
|
2107
|
+
y(ae, {
|
|
2108
|
+
variant: "plain",
|
|
2109
|
+
placement: "top",
|
|
2110
|
+
content: `[${re.value}] ${s(r)("inventory.stock.history.estimatedValueTooltip")}`,
|
|
2111
|
+
"z-index": 50
|
|
2112
|
+
}, {
|
|
2113
|
+
default: M(() => [
|
|
2114
|
+
y(ee, {
|
|
2115
|
+
name: "help",
|
|
2116
|
+
size: "sm"
|
|
2117
|
+
})
|
|
2118
|
+
]),
|
|
2119
|
+
_: 1
|
|
2120
|
+
}, 8, ["content"])
|
|
2122
2121
|
]),
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2122
|
+
y(qe, {
|
|
2123
|
+
tier: "premium",
|
|
2124
|
+
category: "premium",
|
|
2125
|
+
"feature-key": "total-cost"
|
|
2126
|
+
})
|
|
2127
|
+
]),
|
|
2128
|
+
e("div", As, [
|
|
2129
|
+
u.sku.valuation === s(ut).Enum.FIFO ? (j(), q(ue, { key: 0 }, [
|
|
2130
|
+
y(W, {
|
|
2128
2131
|
label: "FIFO",
|
|
2129
2132
|
compact: ""
|
|
2130
2133
|
}),
|
|
@@ -2141,7 +2144,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2141
2144
|
) : H.value), 1)
|
|
2142
2145
|
], 64))
|
|
2143
2146
|
]),
|
|
2144
|
-
|
|
2147
|
+
y(te, {
|
|
2145
2148
|
modelValue: l.value,
|
|
2146
2149
|
"onUpdate:modelValue": h[4] || (h[4] = (de) => l.value = de),
|
|
2147
2150
|
items: a.value,
|
|
@@ -2150,32 +2153,34 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2150
2153
|
style: { width: "200px" }
|
|
2151
2154
|
}, null, 8, ["modelValue", "items"])
|
|
2152
2155
|
]),
|
|
2153
|
-
e("div",
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
})
|
|
2174
|
-
])
|
|
2156
|
+
e("div", Fs, [
|
|
2157
|
+
e("div", $s, [
|
|
2158
|
+
e("div", js, [
|
|
2159
|
+
me(f(s(r)("inventory.stock.history.costSold")) + " ", 1),
|
|
2160
|
+
y(ae, {
|
|
2161
|
+
variant: "plain",
|
|
2162
|
+
placement: "top",
|
|
2163
|
+
"z-index": 50
|
|
2164
|
+
}, {
|
|
2165
|
+
content: M(() => [
|
|
2166
|
+
e("div", Vs, f(s(r)("inventory.stock.history.costSoldTooltip")), 1)
|
|
2167
|
+
]),
|
|
2168
|
+
default: M(() => [
|
|
2169
|
+
y(ee, {
|
|
2170
|
+
name: "help",
|
|
2171
|
+
size: "sm"
|
|
2172
|
+
})
|
|
2173
|
+
]),
|
|
2174
|
+
_: 1
|
|
2175
|
+
})
|
|
2175
2176
|
]),
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2177
|
+
y(qe, {
|
|
2178
|
+
tier: "premium",
|
|
2179
|
+
category: "premium",
|
|
2180
|
+
"feature-key": "total-cost"
|
|
2181
|
+
})
|
|
2182
|
+
]),
|
|
2183
|
+
e("div", Cs, f(U.value), 1)
|
|
2179
2184
|
])
|
|
2180
2185
|
])
|
|
2181
2186
|
])) : se("", !0)
|
|
@@ -2189,7 +2194,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2189
2194
|
(j(!0), q(ue, null, ve(t.value, (de) => (j(), q(ue, {
|
|
2190
2195
|
key: de.date
|
|
2191
2196
|
}, [
|
|
2192
|
-
u.sku ? (j(),
|
|
2197
|
+
u.sku ? (j(), ne(Mn, {
|
|
2193
2198
|
key: 0,
|
|
2194
2199
|
record: de,
|
|
2195
2200
|
sku: u.sku,
|
|
@@ -2199,18 +2204,18 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2199
2204
|
onRefreshHistory: g
|
|
2200
2205
|
}, null, 8, ["record", "sku", "bills", "unit-cost-history", "cost-mechanism"])) : se("", !0)
|
|
2201
2206
|
], 64))), 128))
|
|
2202
|
-
])) : (j(), q("div",
|
|
2203
|
-
|
|
2207
|
+
])) : (j(), q("div", Bs, [
|
|
2208
|
+
y(S),
|
|
2204
2209
|
e("div", null, [
|
|
2205
2210
|
e("img", {
|
|
2206
|
-
src: s(
|
|
2211
|
+
src: s(so),
|
|
2207
2212
|
alt: "List is empty"
|
|
2208
|
-
}, null, 8,
|
|
2213
|
+
}, null, 8, Ds)
|
|
2209
2214
|
]),
|
|
2210
|
-
e("div",
|
|
2211
|
-
e("div",
|
|
2212
|
-
|
|
2213
|
-
|
|
2215
|
+
e("div", Ms, f(s(r)("inventory.stock.history.noRecords")), 1),
|
|
2216
|
+
e("div", Is, f(s(r)("inventory.stock.history.changeDateRange")), 1),
|
|
2217
|
+
y(S),
|
|
2218
|
+
y(S)
|
|
2214
2219
|
]))
|
|
2215
2220
|
])
|
|
2216
2221
|
];
|
|
@@ -2219,7 +2224,7 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2219
2224
|
}, 8, ["modelValue"]);
|
|
2220
2225
|
};
|
|
2221
2226
|
}
|
|
2222
|
-
}),
|
|
2227
|
+
}), Ts = /* @__PURE__ */ pe({
|
|
2223
2228
|
__name: "HrmPermissionGuard",
|
|
2224
2229
|
props: {
|
|
2225
2230
|
permission: { default: void 0 },
|
|
@@ -2233,12 +2238,12 @@ const Tn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, En = {
|
|
|
2233
2238
|
});
|
|
2234
2239
|
Vt(() => {
|
|
2235
2240
|
});
|
|
2236
|
-
const { hasPermission:
|
|
2237
|
-
return (w, V) => s(
|
|
2241
|
+
const { hasPermission: _ } = At(k, () => c.mode);
|
|
2242
|
+
return (w, V) => s(_) ? at(w.$slots, "default", { key: 0 }) : at(w.$slots, "fallback", { key: 1 });
|
|
2238
2243
|
}
|
|
2239
2244
|
});
|
|
2240
|
-
function
|
|
2241
|
-
const c =
|
|
2245
|
+
function Es(A) {
|
|
2246
|
+
const c = io(), k = Se(), _ = Y(!1), w = Y(null), V = Y(null);
|
|
2242
2247
|
let d = null, r = !1, b = !1;
|
|
2243
2248
|
function R() {
|
|
2244
2249
|
if (b) return;
|
|
@@ -2262,7 +2267,7 @@ function Hs(A) {
|
|
|
2262
2267
|
var B, v, g;
|
|
2263
2268
|
if (!(!b || !a)) {
|
|
2264
2269
|
if (w.value = a, a.completedAt && (V.value = a.completedAt), a.message === "processing" || !a.completedAt && !a.message) {
|
|
2265
|
-
r = !0,
|
|
2270
|
+
r = !0, _.value = !0;
|
|
2266
2271
|
return;
|
|
2267
2272
|
}
|
|
2268
2273
|
if (a.message === "completed" || a.completedAt) {
|
|
@@ -2283,25 +2288,25 @@ function Hs(A) {
|
|
|
2283
2288
|
}
|
|
2284
2289
|
}
|
|
2285
2290
|
function l() {
|
|
2286
|
-
d && (d(), d = null), b = !1, r = !1,
|
|
2291
|
+
d && (d(), d = null), b = !1, r = !1, _.value = !1, w.value = null;
|
|
2287
2292
|
}
|
|
2288
2293
|
return Ct(() => {
|
|
2289
2294
|
l();
|
|
2290
2295
|
}), {
|
|
2291
|
-
refreshing:
|
|
2296
|
+
refreshing: _,
|
|
2292
2297
|
refreshStatus: w,
|
|
2293
2298
|
lastCompletedAt: V,
|
|
2294
2299
|
startListening: R,
|
|
2295
2300
|
stopListening: l
|
|
2296
2301
|
};
|
|
2297
2302
|
}
|
|
2298
|
-
const
|
|
2303
|
+
const Us = {
|
|
2299
2304
|
key: 0,
|
|
2300
2305
|
class: "flex items-center gap-1"
|
|
2301
|
-
},
|
|
2306
|
+
}, Ps = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rs = { class: "flex flex-col gap-8" }, Ns = { class: "flex flex-col" }, Os = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ls = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, xa = /* @__PURE__ */ pe({
|
|
2302
2307
|
__name: "StockView",
|
|
2303
2308
|
setup(A) {
|
|
2304
|
-
const { t: c } = ye(), k = Ne(),
|
|
2309
|
+
const { t: c } = ye(), k = Ne(), _ = Se(), w = Oe(), V = Ft(), d = Ae(), r = gt(), b = uo(), { columnDefs: R } = ko(), C = Je(), { hasPermission: l } = At(
|
|
2305
2310
|
T(() => [
|
|
2306
2311
|
{
|
|
2307
2312
|
action: Be.Action.manage,
|
|
@@ -2314,10 +2319,10 @@ const Ts = {
|
|
|
2314
2319
|
return l.value || ((p = C.sessionUser.value) == null ? void 0 : p.role.isAdmin);
|
|
2315
2320
|
}
|
|
2316
2321
|
), B = Le(), v = we();
|
|
2317
|
-
|
|
2322
|
+
_.watchLocation(X);
|
|
2318
2323
|
const g = T(
|
|
2319
2324
|
() => new Set(b.getAvailableItems(b.businessSubsidiaryId))
|
|
2320
|
-
), o = Y(!1), t = Y(!1), { refreshing: n, lastCompletedAt: $, startListening: E, stopListening: N } =
|
|
2325
|
+
), o = Y(!1), t = Y(!1), { refreshing: n, lastCompletedAt: $, startListening: E, stopListening: N } = Es({
|
|
2321
2326
|
onCompleted: async () => {
|
|
2322
2327
|
await X(), t.value = !1, v.open({
|
|
2323
2328
|
title: "Balance refreshed",
|
|
@@ -2374,7 +2379,7 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : p;
|
|
|
2374
2379
|
});
|
|
2375
2380
|
}
|
|
2376
2381
|
async function X() {
|
|
2377
|
-
if (
|
|
2382
|
+
if (_._currentLocation) {
|
|
2378
2383
|
o.value = !0;
|
|
2379
2384
|
try {
|
|
2380
2385
|
await w.readStockBalance(), await w.readProductBalance(), await r.readStockEstimateBalance();
|
|
@@ -2408,10 +2413,10 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : p;
|
|
|
2408
2413
|
]
|
|
2409
2414
|
}), U = T(() => {
|
|
2410
2415
|
var i, S, P;
|
|
2411
|
-
const p = K.value ?
|
|
2416
|
+
const p = K.value ? co.build(K.value) : null, m = [];
|
|
2412
2417
|
for (const ee of k.skus) {
|
|
2413
2418
|
let ae = !0;
|
|
2414
|
-
if (b.isEnabled && re.value && g.value && ae && (ae = g.value.has(ee._id)), p && ae && (ae =
|
|
2419
|
+
if (b.isEnabled && re.value && g.value && ae && (ae = g.value.has(ee._id)), p && ae && (ae = mo(
|
|
2415
2420
|
{
|
|
2416
2421
|
status: ee.isInactive ? "Inactive" : "Active"
|
|
2417
2422
|
},
|
|
@@ -2420,7 +2425,7 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : p;
|
|
|
2420
2425
|
const Q = ee.trackingMeasurement;
|
|
2421
2426
|
let W = (S = (i = w.stockBalance.skus) == null ? void 0 : i.find(
|
|
2422
2427
|
(ce) => ce.id === ee._id
|
|
2423
|
-
)) == null ? void 0 : S.balance,
|
|
2428
|
+
)) == null ? void 0 : S.balance, te = r.inventoryForecast.skus.find(
|
|
2424
2429
|
(ce) => ce.id === ee._id
|
|
2425
2430
|
);
|
|
2426
2431
|
const le = {
|
|
@@ -2429,15 +2434,15 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : p;
|
|
|
2429
2434
|
amount: 0,
|
|
2430
2435
|
precision: 0
|
|
2431
2436
|
},
|
|
2432
|
-
operator:
|
|
2433
|
-
day: (
|
|
2437
|
+
operator: te == null ? void 0 : te.operator,
|
|
2438
|
+
day: (te == null ? void 0 : te.depletionDays) ?? void 0,
|
|
2434
2439
|
trackingUnitAbbrev: Q ? ((P = ee.unit.measurements.find((ce) => ce.id === Q)) == null ? void 0 : P.abbrev) ?? "" : ee.unit.abbrev
|
|
2435
2440
|
};
|
|
2436
2441
|
m.push(le);
|
|
2437
2442
|
}
|
|
2438
2443
|
}
|
|
2439
2444
|
return m;
|
|
2440
|
-
}), Z = Y(""), re = Y(!0), { breakpoints: x } =
|
|
2445
|
+
}), Z = Y(""), re = Y(!0), { breakpoints: x } = Nt(), F = T(() => x.value.xs || x.value.sm), G = T(() => F.value ? 10 : 20), H = Dt(), J = T(() => {
|
|
2441
2446
|
const p = [
|
|
2442
2447
|
{
|
|
2443
2448
|
label: c("inventory.stock.stock_balance.refreshBalance"),
|
|
@@ -2476,7 +2481,7 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : p;
|
|
|
2476
2481
|
}
|
|
2477
2482
|
return (p, m) => {
|
|
2478
2483
|
const i = D("FmSwitch"), S = D("FmTable");
|
|
2479
|
-
return j(),
|
|
2484
|
+
return j(), ne(Mt, {
|
|
2480
2485
|
title: s(c)("inventory.stock.title"),
|
|
2481
2486
|
actions: J.value,
|
|
2482
2487
|
"onClick:action": h
|
|
@@ -2493,7 +2498,7 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : p;
|
|
|
2493
2498
|
}
|
|
2494
2499
|
])
|
|
2495
2500
|
}, [
|
|
2496
|
-
|
|
2501
|
+
y(lo, {
|
|
2497
2502
|
searchable: "",
|
|
2498
2503
|
"change-location": "",
|
|
2499
2504
|
search: Z.value,
|
|
@@ -2505,12 +2510,12 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : p;
|
|
|
2505
2510
|
"onUpdate:filter": m[2] || (m[2] = (W) => K.value = W)
|
|
2506
2511
|
}, {
|
|
2507
2512
|
default: M(() => [
|
|
2508
|
-
s(b).isEnabled ? (j(), q("div",
|
|
2509
|
-
e("span",
|
|
2510
|
-
|
|
2511
|
-
|
|
2513
|
+
s(b).isEnabled ? (j(), q("div", Us, [
|
|
2514
|
+
e("span", Ps, f(s(c)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
|
|
2515
|
+
y(Rt),
|
|
2516
|
+
y(Qe, null, {
|
|
2512
2517
|
default: M(() => [
|
|
2513
|
-
|
|
2518
|
+
y(i, {
|
|
2514
2519
|
modelValue: re.value,
|
|
2515
2520
|
"onUpdate:modelValue": m[0] || (m[0] = (W) => re.value = W)
|
|
2516
2521
|
}, null, 8, ["modelValue"])
|
|
@@ -2521,46 +2526,46 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : p;
|
|
|
2521
2526
|
]),
|
|
2522
2527
|
_: 1
|
|
2523
2528
|
}, 8, ["search", "filter-attributes", "filter"]),
|
|
2524
|
-
(j(),
|
|
2529
|
+
(j(), ne(S, {
|
|
2525
2530
|
style: kt(s(H).tableHeight),
|
|
2526
2531
|
"column-defs": s(R),
|
|
2527
2532
|
"row-data": U.value,
|
|
2528
2533
|
"search-value": Z.value,
|
|
2529
|
-
loading: o.value || s(n) || !s(
|
|
2530
|
-
key: (P = s(
|
|
2534
|
+
loading: o.value || s(n) || !s(_)._currentLocation,
|
|
2535
|
+
key: (P = s(_)._currentLocation) == null ? void 0 : P.dbName,
|
|
2531
2536
|
onRowClick: m[3] || (m[3] = (W) => s(V).showSkuHistory(W.original)),
|
|
2532
2537
|
"page-size": G.value
|
|
2533
2538
|
}, {
|
|
2534
2539
|
"list-row": M((W) => [
|
|
2535
|
-
|
|
2540
|
+
y(ro, {
|
|
2536
2541
|
row: W,
|
|
2537
2542
|
onRowClick: s(V).showSkuHistory
|
|
2538
2543
|
}, {
|
|
2539
|
-
default: M((
|
|
2540
|
-
var le, ce, je, fe, de,
|
|
2544
|
+
default: M((te) => {
|
|
2545
|
+
var le, ce, je, fe, de, et, tt, ot, Ve, nt;
|
|
2541
2546
|
return [
|
|
2542
|
-
e("div",
|
|
2543
|
-
e("div",
|
|
2544
|
-
e("div",
|
|
2545
|
-
|
|
2546
|
-
render: (je = (ce = (le =
|
|
2547
|
-
props: (de = (fe =
|
|
2547
|
+
e("div", Rs, [
|
|
2548
|
+
e("div", Ns, [
|
|
2549
|
+
e("div", Os, [
|
|
2550
|
+
y(s(ft), {
|
|
2551
|
+
render: (je = (ce = (le = te.code) == null ? void 0 : le.column) == null ? void 0 : ce.columnDef) == null ? void 0 : je.cell,
|
|
2552
|
+
props: (de = (fe = te.code) == null ? void 0 : fe.getContext) == null ? void 0 : de.call(fe)
|
|
2548
2553
|
}, null, 8, ["render", "props"])
|
|
2549
2554
|
]),
|
|
2550
|
-
e("div",
|
|
2551
|
-
|
|
2552
|
-
render: (
|
|
2553
|
-
props: (
|
|
2555
|
+
e("div", Ls, [
|
|
2556
|
+
y(s(ft), {
|
|
2557
|
+
render: (ot = (tt = (et = te.name) == null ? void 0 : et.column) == null ? void 0 : tt.columnDef) == null ? void 0 : ot.cell,
|
|
2558
|
+
props: (nt = (Ve = te.name) == null ? void 0 : Ve.getContext) == null ? void 0 : nt.call(Ve)
|
|
2554
2559
|
}, null, 8, ["render", "props"])
|
|
2555
2560
|
])
|
|
2556
2561
|
]),
|
|
2557
2562
|
e("div", null, [
|
|
2558
|
-
|
|
2563
|
+
y(Ke, {
|
|
2559
2564
|
days: W.original.day
|
|
2560
2565
|
}, null, 8, ["days"])
|
|
2561
2566
|
]),
|
|
2562
2567
|
e("div", null, [
|
|
2563
|
-
|
|
2568
|
+
y(ht, {
|
|
2564
2569
|
class: "xs:w-[160px]",
|
|
2565
2570
|
unit: W.original.unit,
|
|
2566
2571
|
sku: W.original,
|
|
@@ -2577,20 +2582,20 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : p;
|
|
|
2577
2582
|
_: 1
|
|
2578
2583
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2579
2584
|
], 2),
|
|
2580
|
-
(j(),
|
|
2581
|
-
(ee = s(V).stockHistoryProps) != null && ee.sku ? (j(),
|
|
2582
|
-
(ae = s(V).convertSkuDialogProps) != null && ae.sku ? (j(),
|
|
2583
|
-
(Q = s(V).adjustSkuDialogProps) != null && Q.stock ? (j(),
|
|
2585
|
+
(j(), ne(Bt, { to: "body" }, [
|
|
2586
|
+
(ee = s(V).stockHistoryProps) != null && ee.sku ? (j(), ne(Hs, rt(ze({ key: 0 }, s(V).stockHistoryProps)), null, 16)) : se("", !0),
|
|
2587
|
+
(ae = s(V).convertSkuDialogProps) != null && ae.sku ? (j(), ne(Mo, rt(ze({ key: 1 }, s(V).convertSkuDialogProps)), null, 16)) : se("", !0),
|
|
2588
|
+
(Q = s(V).adjustSkuDialogProps) != null && Q.stock ? (j(), ne(Go, ze({ key: 2 }, s(V).adjustSkuDialogProps, {
|
|
2584
2589
|
onSubmitted: m[4] || (m[4] = (W) => X())
|
|
2585
2590
|
}), null, 16)) : se("", !0),
|
|
2586
|
-
|
|
2591
|
+
y(Ts, {
|
|
2587
2592
|
permission: {
|
|
2588
2593
|
action: s(Be).Action.manage,
|
|
2589
2594
|
subject: s(Be).Subject.Business.inventory_stockAdjustment
|
|
2590
2595
|
}
|
|
2591
2596
|
}, {
|
|
2592
2597
|
default: M(() => [
|
|
2593
|
-
I.value ? (j(),
|
|
2598
|
+
I.value ? (j(), ne(sn, {
|
|
2594
2599
|
key: 0,
|
|
2595
2600
|
show: I.value,
|
|
2596
2601
|
"onUpdate:show": m[5] || (m[5] = (W) => I.value = W),
|
|
@@ -2608,5 +2613,5 @@ Last refreshed: ${new Date($.value).toLocaleString()}` : p;
|
|
|
2608
2613
|
}
|
|
2609
2614
|
});
|
|
2610
2615
|
export {
|
|
2611
|
-
|
|
2616
|
+
xa as default
|
|
2612
2617
|
};
|