@feedmepos/mf-inventory-portal 1.2.59 → 1.2.60-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-Nwc0Ha2r.js → App-Dgk5k8U-.js} +82 -78
- package/dist/{ApprovalView-Y5f915s3.js → ApprovalView-CU2YMuZb.js} +5 -5
- package/dist/{BindingsDialog-5N7R_u4c.js → BindingsDialog-Cu0AR6jW.js} +5 -5
- package/dist/{BindingsPicker-BJwvLu2s.js → BindingsPicker-DyycJJ6i.js} +3 -3
- package/dist/{BindingsTable-B8sq-qXH.js → BindingsTable-wFAnOCdU.js} +5 -5
- package/dist/{ClosingDraftView-BsyYOZsz.js → ClosingDraftView-C01bZNv_.js} +891 -893
- package/dist/{ClosingHistoryView-BNpsMNy1.js → ClosingHistoryView-Bwjadf1x.js} +36 -36
- package/dist/{ClosingTemplateView-BBqbq07d.js → ClosingTemplateView-BAalivwa.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-CmOO7wuE.js → DeliveryOrderPrintPreview-CaEmXkPV.js} +7 -7
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BXlY-Gu1.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D7J8uo_B.js} +17 -17
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CAMkZRFI.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DU4I0imJ.js} +2 -2
- package/dist/{FmMultiselectDialog-LagHyTQP.js → FmMultiselectDialog-CdhcCzVw.js} +1 -1
- package/dist/{FmMultiselectDialog-CwJUv9tG.js → FmMultiselectDialog-v004bPKF.js} +16 -16
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BmHFIkt1.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C756UIBL.js} +16 -15
- package/dist/{ImportView-wQ_bNesb.js → ImportView-WyG44i3g.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DtMrJIVs.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Y74PdyhQ.js} +1 -1
- package/dist/{IngredientGroupView-DsGMhdwu.js → IngredientGroupView-7bkBWvrQ.js} +5 -5
- package/dist/{IngredientsView-JdjcLdOx.js → IngredientsView-BDgOWARl.js} +25 -24
- package/dist/{IntegrationView-CMmSIRUk.js → IntegrationView-BB7asiWy.js} +18 -17
- package/dist/{InventoryBindingForm-UL-UKtYW.js → InventoryBindingForm-CU9dnGdy.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-r875PDKP.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BmlVB1SU.js} +17 -16
- package/dist/{InventoryBindingSummary-BDAuT62b.js → InventoryBindingSummary-D2W_WcLV.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C5zOYiqR.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CVfShkXe.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-B2zppgqk.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CC4jkZg4.js} +2 -2
- package/dist/{PublishView-CSoZCSHT.js → PublishView-DR_TwAkf.js} +8 -8
- package/dist/{PurchaseOrderPrintPreview-D5Qw44xo.js → PurchaseOrderPrintPreview-CoX0u7jn.js} +11 -11
- package/dist/{ReceiveRequestView-Chntp08E.js → ReceiveRequestView-VBePJl-U.js} +34 -33
- package/dist/RecipeView-CiZw14m_.js +1558 -0
- package/dist/{StockView-CuCK7tD2.js → StockView-BFv_Tl8E.js} +122 -122
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-fMji2qKG.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BMEsUpAC.js} +1 -1
- package/dist/{SupplierView-CA17Tz02.js → SupplierView-PSGUQEzz.js} +20 -19
- package/dist/{SurchargeView-EIftjMCa.js → SurchargeView-B7qTXk1L.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CqA6RmPy.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CxEeb4BW.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CYXsAP0i.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Dxg6HaiQ.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BbbAEIcW.js → TransferDetails.vue_vue_type_script_setup_true_lang-CAviJscD.js} +77 -78
- package/dist/{TransferTemplateView-CYfbm9aS.js → TransferTemplateView-CsRPCwN_.js} +22 -21
- package/dist/UnitCostHistoryView-Byd2FHbH.js +651 -0
- package/dist/{UnitView-6s5CsGEQ.js → UnitView-CdZ_GaUr.js} +9 -9
- package/dist/{WarehouseView-BXDQOyFZ.js → WarehouseView-DQGYq00N.js} +5 -5
- package/dist/{WastageTemplateView-Cq92TiRs.js → WastageTemplateView-CE7aiWUH.js} +14 -14
- package/dist/api/inventory.d.ts +126 -36
- package/dist/api/netsuite.d.ts +8 -1
- package/dist/api/unit-cost-history.d.ts +28 -0
- package/dist/{app-DJuq_faF.js → app-CpEqZK89.js} +7453 -6448
- package/dist/app.d.ts +228 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-D_zbp5V1.js → closing-template-C20qxOGw.js} +1 -1
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +37 -1
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +14 -0
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +16 -1
- package/dist/{date2-4vrHarNG.js → date2-C37x5LGh.js} +1 -1
- package/dist/{dayjs.min-Dwp8614O.js → dayjs.min-C5A6b5Ut.js} +16 -16
- package/dist/{defineDeepModel-DVt2Wz9r.js → defineDeepModel-btW96tVp.js} +1 -1
- package/dist/{duplicate-template-CkYWeFtL.js → duplicate-template-BPduDL4a.js} +1 -1
- package/dist/{feature-Beh-qc03.js → feature-Cu77Fha2.js} +784 -779
- package/dist/{format-time-from-id-84iLSxVu.js → format-time-from-id-ULW7QQVk.js} +1 -1
- package/dist/{format-unit-display-DfeNpWk4.js → format-unit-display-CeyXEKCV.js} +16 -15
- package/dist/helper/number.d.ts +2 -0
- package/dist/helper/type.d.ts +5 -0
- package/dist/{import-export.helper-fAVzQM2q.js → import-export.helper-DpgGeeZ4.js} +17 -16
- package/dist/{index-CoEqhZLm.js → index-6Is7orHh.js} +1 -1
- package/dist/{index-B2_16R5E.js → index-Cl2lmtBz.js} +1471 -1412
- package/dist/{index-Chogzhcq.js → index-DKDWBhbI.js} +3 -3
- package/dist/{lodash-Cx8BU1GH.js → lodash-BS2snJNb.js} +1 -1
- package/dist/{netsuite-C1bml-v1.js → netsuite-B5YYhPhU.js} +60 -60
- package/dist/number-DgdltWRu.js +232 -0
- package/dist/{purchase-order-template-BqFnJ-6B.js → purchase-order-template-DVz_OXJ7.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/rules-BPG3Fjva.js +98 -0
- package/dist/stock-BXorYvfp.js +75 -0
- package/dist/{stock-KxT4JbNf.js → stock-D9iwDDOz.js} +1 -1
- package/dist/stores/feature.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +8 -1
- package/dist/stores/inventory.d.ts +119 -30
- package/dist/{supplier-C7wUB1zT.js → supplier-UJg1gtQ8.js} +2 -2
- package/dist/{surcharge-CjB_Qtbv.js → surcharge-CcJatYN4.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-D5KSqA4Z.js → use-ingredient-select-dialog-C--_de2u.js} +2 -2
- package/dist/{use-inventory-binding-dialog-eGOvztV3.js → use-inventory-binding-dialog-JsmcY8OK.js} +2 -2
- package/dist/{use-template-enabled-locations-2-3kcVWPQm.js → use-template-enabled-locations-2-Ce6Y0gQ_.js} +2 -2
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +64 -8
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +192 -24
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +8 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +96 -12
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +96 -12
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +18 -18
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +14 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +32 -4
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +28 -0
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +169 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingAlternative.vue.d.ts +43 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingRule.vue.d.ts +25 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +125 -0
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventorySkuBindingV2Field.vue.d.ts +129 -0
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-alternative-table.d.ts +30 -0
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +4 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +8 -1
- package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +16 -2
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +33 -5
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +16 -2
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +32 -4
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +8 -1
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +41 -6
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +246 -36
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +287 -42
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +16 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -0
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +16 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -1
- package/dist/views/transfer-template/composables/use-netsuite-custom-field.d.ts +24 -3
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -12
- package/dist/views/unit-cost-history/UnitCostHistoryView.vue.d.ts +2 -0
- package/dist/views/unit-cost-history/components/UnitCostDetailsSideSheet.vue.d.ts +19 -0
- package/dist/views/unit-cost-history/components/UnitCostRecalculationDialog.vue.d.ts +11 -0
- package/dist/views/unit-cost-history/composables/use-unit-cost-history.d.ts +65 -0
- package/dist/vue-i18n-Cv_EPb3h.js +2365 -0
- package/dist/{xlsx-BwNUbN_O.js → xlsx-DuXSmSdO.js} +1 -1
- package/dist/{xlsx.util-B_DE3inS.js → xlsx.util-B75iIY7V.js} +1 -1
- package/package.json +2 -2
- package/dist/RecipeView-Ck3Pa4fg.js +0 -646
- package/dist/decimal-Bf6AG_d3.js +0 -99
- package/dist/rules-y2OYGOro.js +0 -201
- package/dist/stock-BWUzlDTa.js +0 -75
- package/dist/vue-i18n-C6XNfngV.js +0 -2365
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { defineComponent as me, ref as z, computed as Y, resolveComponent as
|
|
1
|
+
import { defineComponent as me, ref as z, computed as Y, resolveComponent as U, openBlock as D, createBlock as X, withCtx as H, createElementVNode as e, normalizeClass as ge, toDisplayString as p, createVNode as y, createElementBlock as W, Fragment as le, renderList as ce, unref as a, h as ke, watch as $e, isRef as Ee, createCommentVNode as se, reactive as ut, mergeModels as Qe, useModel as bt, onMounted as qe, createTextVNode as ve, normalizeStyle as ct, Teleport as xt, normalizeProps as Le, mergeProps as ze } from "vue";
|
|
2
2
|
import { F as Xe, u as St, _ as wt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
3
|
-
import { u as xe, c as Pe, a as Re, F as Ze,
|
|
4
|
-
import { u as Oe } from "./stock-
|
|
3
|
+
import { u as xe, c as Pe, a as Re, F as Ze, w as Ft, G as ae, v as At, o as $t, D as Vt, y as Q, h as De, i as et, e as tt, J as he } from "./app-CpEqZK89.js";
|
|
4
|
+
import { u as Oe } from "./stock-BXorYvfp.js";
|
|
5
5
|
import { c as Ct } from "./component-DpCUABT3.js";
|
|
6
|
-
import {
|
|
7
|
-
import { d as ye } from "./dayjs.min-
|
|
8
|
-
import { e as
|
|
9
|
-
import { _ as Ke, S as Ge, g as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { useI18n as fe, useCoreStore as
|
|
12
|
-
import { useSnackbar as Se, useDialog as Ne, useProxiedModel as Ye, useBreakpoints as
|
|
13
|
-
import { defineStore as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { u as Ot } from "./use-inventory-binding-dialog-
|
|
17
|
-
import { a as pt } from "./FmMultiselectDialog-
|
|
18
|
-
import { _ as Nt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-
|
|
19
|
-
import { a as Yt, b as Lt, f as yt, t as st, c as at, p as zt, n as Gt, d as Wt } from "./date2-
|
|
20
|
-
import { i as Kt, _ as qt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { f as Ve, g as Ce, a as _e, e as Dt, t as Ie, c as be, h as jt, i as nt, j as dt, k as Je, d as Me, l as Mt } from "./number-DgdltWRu.js";
|
|
7
|
+
import { d as ye } from "./dayjs.min-C5A6b5Ut.js";
|
|
8
|
+
import { e as Bt, u as mt, i as Te, _ as ot } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-CC4jkZg4.js";
|
|
9
|
+
import { _ as Ke, S as Ge, g as ft, a as It } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BMEsUpAC.js";
|
|
10
|
+
import { _ as Tt } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
11
|
+
import { useI18n as fe, useCoreStore as vt } from "@feedmepos/mf-common";
|
|
12
|
+
import { useSnackbar as Se, useDialog as Ne, useProxiedModel as Ye, useBreakpoints as Ut } from "@feedmepos/ui-library";
|
|
13
|
+
import { defineStore as Ht } from "pinia";
|
|
14
|
+
import { u as we } from "./stock-D9iwDDOz.js";
|
|
15
|
+
import { c as Ue, A as Et, M as Pt, R as Rt } from "./rules-BPG3Fjva.js";
|
|
16
|
+
import { u as Ot } from "./use-inventory-binding-dialog-JsmcY8OK.js";
|
|
17
|
+
import { a as pt } from "./FmMultiselectDialog-v004bPKF.js";
|
|
18
|
+
import { _ as Nt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CVfShkXe.js";
|
|
19
|
+
import { a as Yt, b as Lt, f as yt, t as st, c as at, p as zt, n as Gt, d as Wt } from "./date2-C37x5LGh.js";
|
|
20
|
+
import { i as Kt, _ as qt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DU4I0imJ.js";
|
|
21
21
|
import { E as Xt } from "./empty-placeholder-wf6-BWE8.js";
|
|
22
|
-
import { F as pe, u as Jt } from "./feature-
|
|
22
|
+
import { F as pe, u as Jt } from "./feature-Cu77Fha2.js";
|
|
23
23
|
import { _ as Qt, F as lt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
|
|
24
|
-
import { u as Zt } from "./netsuite-
|
|
24
|
+
import { u as Zt } from "./netsuite-B5YYhPhU.js";
|
|
25
25
|
import { P as en, J as tn } from "./app-DiX-EfV6.js";
|
|
26
26
|
var Be = /* @__PURE__ */ ((k) => (k.History = "History", k.Convert = "Convert", k.Adjust = "Adjust", k))(Be || {});
|
|
27
27
|
const nn = [
|
|
@@ -56,7 +56,7 @@ async function sn(k) {
|
|
|
56
56
|
/ /g,
|
|
57
57
|
"_"
|
|
58
58
|
)}_${ye().format("DD_MM_YYYY_HHmm")}.xlsx`;
|
|
59
|
-
await
|
|
59
|
+
await Bt(
|
|
60
60
|
[
|
|
61
61
|
{
|
|
62
62
|
name: "stock",
|
|
@@ -73,7 +73,7 @@ async function sn(k) {
|
|
|
73
73
|
{
|
|
74
74
|
name: "Balance",
|
|
75
75
|
selector: (s) => {
|
|
76
|
-
const j =
|
|
76
|
+
const j = He(s, s.unit);
|
|
77
77
|
return j.type === "unit" ? Ve(s.balance, s.unit, null, !1) : Ve(s.balance, s.unit, j.measurement, !1);
|
|
78
78
|
}
|
|
79
79
|
},
|
|
@@ -81,7 +81,7 @@ async function sn(k) {
|
|
|
81
81
|
name: "Unit",
|
|
82
82
|
selector: (s) => {
|
|
83
83
|
var w;
|
|
84
|
-
const j =
|
|
84
|
+
const j = He(s, s.unit);
|
|
85
85
|
return j.type === "unit" ? s.unit.abbrev : ((w = s.unit.measurements.find((c) => c.id === j.measurement)) == null ? void 0 : w.abbrev) || "";
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -91,7 +91,7 @@ async function sn(k) {
|
|
|
91
91
|
d
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function He(k, m) {
|
|
95
95
|
const d = localStorage.getItem(`uom:${k._id}`);
|
|
96
96
|
return d ? d === m._id ? {
|
|
97
97
|
type: "unit"
|
|
@@ -121,9 +121,9 @@ const an = { class: "fm-typo-en-body-md-400 flex-grow" }, _t = /* @__PURE__ */ m
|
|
|
121
121
|
}
|
|
122
122
|
function d(B) {
|
|
123
123
|
const b = m(s.sku);
|
|
124
|
-
B ? localStorage.setItem(b, B) : localStorage.setItem(b, s.unit._id), j.value =
|
|
124
|
+
B ? localStorage.setItem(b, B) : localStorage.setItem(b, s.unit._id), j.value = He(s.sku, s.unit);
|
|
125
125
|
}
|
|
126
|
-
const s = k, j = z(
|
|
126
|
+
const s = k, j = z(He(s.sku, s.unit)), w = Y(() => {
|
|
127
127
|
const { measurements: B } = s.unit;
|
|
128
128
|
return [
|
|
129
129
|
{
|
|
@@ -146,12 +146,12 @@ const an = { class: "fm-typo-en-body-md-400 flex-grow" }, _t = /* @__PURE__ */ m
|
|
|
146
146
|
}
|
|
147
147
|
), h = z(!1);
|
|
148
148
|
return (B, b) => {
|
|
149
|
-
const i =
|
|
149
|
+
const i = U("FmIcon"), f = U("FmMenuItem"), T = U("FmMenu");
|
|
150
150
|
return D(), X(T, {
|
|
151
151
|
"stop-click-propagation": "",
|
|
152
152
|
onMenuChanged: b[0] || (b[0] = (g) => h.value = g)
|
|
153
153
|
}, {
|
|
154
|
-
"menu-button":
|
|
154
|
+
"menu-button": H(() => [
|
|
155
155
|
e("button", {
|
|
156
156
|
type: "button",
|
|
157
157
|
class: ge([
|
|
@@ -166,7 +166,7 @@ const an = { class: "fm-typo-en-body-md-400 flex-grow" }, _t = /* @__PURE__ */ m
|
|
|
166
166
|
})
|
|
167
167
|
], 2)
|
|
168
168
|
]),
|
|
169
|
-
default:
|
|
169
|
+
default: H(() => [
|
|
170
170
|
(D(!0), W(le, null, ce(w.value, (g) => (D(), X(f, {
|
|
171
171
|
key: g.value ?? 0,
|
|
172
172
|
label: g.label,
|
|
@@ -182,15 +182,15 @@ const an = { class: "fm-typo-en-body-md-400 flex-grow" }, _t = /* @__PURE__ */ m
|
|
|
182
182
|
__name: "StockHeaderPreview",
|
|
183
183
|
setup(k) {
|
|
184
184
|
const { t: m } = fe();
|
|
185
|
-
return (d, s) => (D(), X(
|
|
186
|
-
default:
|
|
185
|
+
return (d, s) => (D(), X(Tt, null, {
|
|
186
|
+
default: H(() => [
|
|
187
187
|
e("div", ln, p(a(m)("inventory.stock.prediction.daysRemaining")), 1)
|
|
188
188
|
]),
|
|
189
189
|
_: 1
|
|
190
190
|
}));
|
|
191
191
|
}
|
|
192
|
-
}), kt =
|
|
193
|
-
const k = z(!1), m = xe(), d = Oe(), s =
|
|
192
|
+
}), kt = Ht("stockActions", () => {
|
|
193
|
+
const k = z(!1), m = xe(), d = Oe(), s = mt(), j = Se(), w = Ne(), { t: c } = fe();
|
|
194
194
|
async function l() {
|
|
195
195
|
if (m._currentLocation) {
|
|
196
196
|
k.value = !0;
|
|
@@ -280,7 +280,7 @@ const an = { class: "fm-typo-en-body-md-400 flex-grow" }, _t = /* @__PURE__ */ m
|
|
|
280
280
|
});
|
|
281
281
|
function un() {
|
|
282
282
|
var w;
|
|
283
|
-
const k = xe(), m = kt(), d =
|
|
283
|
+
const k = xe(), m = kt(), d = vt(), { t: s } = fe();
|
|
284
284
|
return {
|
|
285
285
|
columnDefs: [
|
|
286
286
|
{
|
|
@@ -434,7 +434,7 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
434
434
|
v && (b.value = 0);
|
|
435
435
|
});
|
|
436
436
|
function o() {
|
|
437
|
-
R(s.sku,
|
|
437
|
+
R(s.sku, Ie(b.value), i.value);
|
|
438
438
|
}
|
|
439
439
|
function t(v) {
|
|
440
440
|
if (i.value)
|
|
@@ -447,7 +447,7 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
447
447
|
const $ = (E = s.sku.convert) != null && E.measurement ? s.sku.unit.measurements.find((_) => {
|
|
448
448
|
var r;
|
|
449
449
|
return _.id === ((r = s.sku.convert) == null ? void 0 : r.measurement);
|
|
450
|
-
}) ?? null : null, G = Ce(s.sku.unit, $), P =
|
|
450
|
+
}) ?? null : null, G = Ce(s.sku.unit, $), P = jt(+v);
|
|
451
451
|
return rt(P).isInteger().max(G).error ? "Precision cannot be more than " + G : !0;
|
|
452
452
|
}
|
|
453
453
|
const S = Y(
|
|
@@ -472,9 +472,9 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
472
472
|
var Fe;
|
|
473
473
|
return ie.id === ((Fe = s.sku.convert) == null ? void 0 : Fe.measurement);
|
|
474
474
|
}) ?? null : null, V = Ce(s.sku.unit, M), u = n(`${b.value}`) === !0 ? _e(
|
|
475
|
-
|
|
475
|
+
Dt(
|
|
476
476
|
E.amount,
|
|
477
|
-
|
|
477
|
+
Ie(+b.value, V)
|
|
478
478
|
),
|
|
479
479
|
!1
|
|
480
480
|
) : "0", F = (oe = (te = i.value) == null ? void 0 : te.find((ie) => ie.id === (_ == null ? void 0 : _._id))) == null ? void 0 : oe.amount, N = F ? _e(F, !1) : null;
|
|
@@ -536,7 +536,7 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
536
536
|
}
|
|
537
537
|
function O(v) {
|
|
538
538
|
const $ = f.value.find((G) => G._id === v);
|
|
539
|
-
return $ ?
|
|
539
|
+
return $ ? ft($.unit, !0) : [];
|
|
540
540
|
}
|
|
541
541
|
function Z(v, $) {
|
|
542
542
|
const G = O(v), P = G.find((L) => L.value === $) ?? G.find((L) => L.value === null);
|
|
@@ -579,32 +579,32 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
579
579
|
v || (i.value = null, b.value = 0);
|
|
580
580
|
}
|
|
581
581
|
), (v, $) => {
|
|
582
|
-
const G =
|
|
582
|
+
const G = U("FmTextField"), P = U("FmForm"), L = U("FmCard"), E = U("FmSwitch"), _ = U("FmFormGroup"), r = U("FmSelect"), M = U("FmButton"), V = U("FmSideSheet");
|
|
583
583
|
return D(), X(V, {
|
|
584
584
|
"dismiss-away": "",
|
|
585
585
|
modelValue: a(I),
|
|
586
586
|
"onUpdate:modelValue": $[3] || ($[3] = (u) => Ee(I) ? I.value = u : null),
|
|
587
587
|
"max-width": 500
|
|
588
588
|
}, {
|
|
589
|
-
"side-sheet-header":
|
|
589
|
+
"side-sheet-header": H(() => [
|
|
590
590
|
e("div", dn, [
|
|
591
591
|
e("div", mn, p(a(B)("inventory.stock.convert.title", { name: v.sku.name })), 1)
|
|
592
592
|
])
|
|
593
593
|
]),
|
|
594
|
-
default:
|
|
594
|
+
default: H(() => [
|
|
595
595
|
e("div", fn, [
|
|
596
596
|
y(P, {
|
|
597
597
|
ref_key: "formRef",
|
|
598
598
|
ref: A,
|
|
599
599
|
onValidationSuccess: o
|
|
600
600
|
}, {
|
|
601
|
-
default:
|
|
601
|
+
default: H(() => [
|
|
602
602
|
y(G, {
|
|
603
603
|
disabled: x.value,
|
|
604
604
|
"model-value": b.value,
|
|
605
605
|
"onUpdate:modelValue": $[0] || ($[0] = (u) => b.value = u),
|
|
606
606
|
label: a(B)("inventory.stock.convert.amount"),
|
|
607
|
-
rules: [t, n, a(
|
|
607
|
+
rules: [t, n, a(Ue)(0)],
|
|
608
608
|
"append-text": S.value,
|
|
609
609
|
"helper-text": i.value ? void 0 : `Max ${v.maxCount} ${S.value}`
|
|
610
610
|
}, null, 8, ["disabled", "model-value", "label", "rules", "append-text", "helper-text"])
|
|
@@ -615,7 +615,7 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
615
615
|
variant: "outlined",
|
|
616
616
|
class: "p-16"
|
|
617
617
|
}, {
|
|
618
|
-
default:
|
|
618
|
+
default: H(() => [
|
|
619
619
|
e("div", vn, [
|
|
620
620
|
e("div", pn, p(a(B)("inventory.stock.convert.deductionSummary")), 1),
|
|
621
621
|
(D(!0), W(le, null, ce(C.value, (u) => {
|
|
@@ -633,7 +633,7 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
633
633
|
_: 1
|
|
634
634
|
}),
|
|
635
635
|
y(L, { variant: "outlined" }, {
|
|
636
|
-
default:
|
|
636
|
+
default: H(() => [
|
|
637
637
|
e("div", kn, [
|
|
638
638
|
y(E, {
|
|
639
639
|
value: "",
|
|
@@ -645,7 +645,7 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
645
645
|
g.value ? (D(), W(le, { key: 0 }, [
|
|
646
646
|
y(_, {
|
|
647
647
|
modelValue: i.value,
|
|
648
|
-
rules: [a(
|
|
648
|
+
rules: [a(Et)(1, "Must have at least one ingredient binding")]
|
|
649
649
|
}, null, 8, ["modelValue", "rules"]),
|
|
650
650
|
e("div", hn, [
|
|
651
651
|
e("div", gn, p(a(B)("inventory.stock.convert.ingredients")), 1),
|
|
@@ -654,14 +654,14 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
654
654
|
disabled: x.value,
|
|
655
655
|
modelValue: +a(_e)(u.amount ?? { amount: 1, precision: 0 }),
|
|
656
656
|
rules: [
|
|
657
|
-
a(
|
|
657
|
+
a(Pt)(
|
|
658
658
|
f.value.find((F) => F._id === u.id).unit,
|
|
659
659
|
u.measurement
|
|
660
660
|
),
|
|
661
|
-
a(
|
|
661
|
+
a(Ue)(0)
|
|
662
662
|
]
|
|
663
663
|
}, {
|
|
664
|
-
default:
|
|
664
|
+
default: H(({ invalid: F }) => {
|
|
665
665
|
var N, ne, re;
|
|
666
666
|
return [
|
|
667
667
|
e("div", bn, [
|
|
@@ -683,7 +683,7 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
683
683
|
"onUpdate:modelValue": (J) => q(u.id, J, i.value ?? []),
|
|
684
684
|
invalid: F
|
|
685
685
|
}, {
|
|
686
|
-
"helper-text":
|
|
686
|
+
"helper-text": H(() => $[4] || ($[4] = [])),
|
|
687
687
|
_: 2
|
|
688
688
|
}, 1032, ["disabled", "items", "model-value", "onUpdate:modelValue", "invalid"]),
|
|
689
689
|
y(M, {
|
|
@@ -714,7 +714,7 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
714
714
|
})
|
|
715
715
|
])
|
|
716
716
|
]),
|
|
717
|
-
"side-sheet-footer":
|
|
717
|
+
"side-sheet-footer": H(() => [
|
|
718
718
|
e("div", Sn, [
|
|
719
719
|
y(M, {
|
|
720
720
|
loading: x.value,
|
|
@@ -732,11 +732,11 @@ const dn = { class: "flex items-center" }, mn = { class: "fm-typo-en-title-md-80
|
|
|
732
732
|
}
|
|
733
733
|
});
|
|
734
734
|
function je(k, m) {
|
|
735
|
-
const d =
|
|
735
|
+
const d = Ie(k, m);
|
|
736
736
|
return { ...d, amount: -d.amount };
|
|
737
737
|
}
|
|
738
738
|
function it(k, m) {
|
|
739
|
-
return
|
|
739
|
+
return Ie(Math.abs(k), m);
|
|
740
740
|
}
|
|
741
741
|
const We = {
|
|
742
742
|
[ae.enum.DAMAGE]: {
|
|
@@ -776,7 +776,7 @@ const We = {
|
|
|
776
776
|
label: At(t),
|
|
777
777
|
value: t
|
|
778
778
|
}))
|
|
779
|
-
), l = Y(() =>
|
|
779
|
+
), l = Y(() => ft(d.modelValue.doc.unit, !0)), h = Y({
|
|
780
780
|
get() {
|
|
781
781
|
return d.modelValue.type ?? ae.enum.PURCHASE;
|
|
782
782
|
},
|
|
@@ -785,7 +785,7 @@ const We = {
|
|
|
785
785
|
...d.modelValue
|
|
786
786
|
};
|
|
787
787
|
n.type = t;
|
|
788
|
-
const S =
|
|
788
|
+
const S = nt(d.modelValue.amount);
|
|
789
789
|
n.amount = We[n.type].toAdjustmentAmount(
|
|
790
790
|
+_e(S),
|
|
791
791
|
S.precision
|
|
@@ -793,7 +793,7 @@ const We = {
|
|
|
793
793
|
}
|
|
794
794
|
}), B = Y({
|
|
795
795
|
get() {
|
|
796
|
-
const t =
|
|
796
|
+
const t = nt(d.modelValue.amount);
|
|
797
797
|
return +_e(t);
|
|
798
798
|
},
|
|
799
799
|
set(t) {
|
|
@@ -833,19 +833,19 @@ const We = {
|
|
|
833
833
|
return (t == null ? void 0 : t.balance) ?? { amount: 0, precision: 0 };
|
|
834
834
|
}), T = Y(() => {
|
|
835
835
|
const t = d.modelValue.amount, n = d.modelValue.measurement;
|
|
836
|
-
return n ?
|
|
836
|
+
return n ? dt(t, n.conversion) : t;
|
|
837
837
|
}), g = Y(
|
|
838
838
|
() => Je(f.value, T.value)
|
|
839
839
|
), x = Y(
|
|
840
840
|
() => Ve(g.value, d.modelValue.doc.unit)
|
|
841
841
|
), o = Y(() => T.value.amount < 0);
|
|
842
842
|
return (t, n) => {
|
|
843
|
-
const S =
|
|
843
|
+
const S = U("FmButton"), C = U("FmSelect"), A = U("FmTextarea"), I = U("FmCard");
|
|
844
844
|
return D(), X(I, {
|
|
845
845
|
variant: "outlined",
|
|
846
846
|
class: "grid grid-cols-2 gap-8 p-16"
|
|
847
847
|
}, {
|
|
848
|
-
default:
|
|
848
|
+
default: H(() => [
|
|
849
849
|
e("div", Fn, [
|
|
850
850
|
e("div", An, [
|
|
851
851
|
e("div", $n, p(t.modelValue.doc.name), 1),
|
|
@@ -864,7 +864,7 @@ const We = {
|
|
|
864
864
|
items: c.value,
|
|
865
865
|
modelValue: h.value,
|
|
866
866
|
"onUpdate:modelValue": n[1] || (n[1] = (R) => h.value = R),
|
|
867
|
-
rules: [a(
|
|
867
|
+
rules: [a(Rt)()],
|
|
868
868
|
"label-mark": "required"
|
|
869
869
|
}, null, 8, ["disabled", "items", "modelValue", "rules"]),
|
|
870
870
|
y(Nt, {
|
|
@@ -876,7 +876,7 @@ const We = {
|
|
|
876
876
|
}),
|
|
877
877
|
modelValue: B.value,
|
|
878
878
|
"onUpdate:modelValue": n[2] || (n[2] = (R) => B.value = R),
|
|
879
|
-
rules: [a(
|
|
879
|
+
rules: [a(Ue)(0)]
|
|
880
880
|
}, null, 8, ["disabled", "step", "modelValue", "rules"]),
|
|
881
881
|
y(C, {
|
|
882
882
|
disabled: t.disabled,
|
|
@@ -904,7 +904,7 @@ const We = {
|
|
|
904
904
|
});
|
|
905
905
|
};
|
|
906
906
|
}
|
|
907
|
-
}), jn = { class: "flex items-center" }, Mn = { class: "fm-typo-en-title-md-800" }, Bn = { class: "flex items-center" }, In = { class: "fm-typo-en-title-sm-800 flex-1" }, Tn = { class: "flex gap-8" },
|
|
907
|
+
}), jn = { class: "flex items-center" }, Mn = { class: "fm-typo-en-title-md-800" }, Bn = { class: "flex items-center" }, In = { class: "fm-typo-en-title-sm-800 flex-1" }, Tn = { class: "flex gap-8" }, Un = /* @__PURE__ */ me({
|
|
908
908
|
__name: "AdjustSkuDialog",
|
|
909
909
|
props: {
|
|
910
910
|
stock: {},
|
|
@@ -1022,26 +1022,26 @@ const We = {
|
|
|
1022
1022
|
g.adjustments.splice(n, 1);
|
|
1023
1023
|
}
|
|
1024
1024
|
return (n, S) => {
|
|
1025
|
-
const C =
|
|
1025
|
+
const C = U("FmTextarea"), A = U("FmButton"), I = U("FmForm"), R = U("FmSideSheet");
|
|
1026
1026
|
return D(), X(R, {
|
|
1027
1027
|
modelValue: a(T),
|
|
1028
1028
|
"onUpdate:modelValue": S[2] || (S[2] = (K) => Ee(T) ? T.value = K : null),
|
|
1029
1029
|
"dismiss-away": "",
|
|
1030
1030
|
"max-width": 500
|
|
1031
1031
|
}, {
|
|
1032
|
-
"side-sheet-header":
|
|
1032
|
+
"side-sheet-header": H(() => [
|
|
1033
1033
|
e("div", jn, [
|
|
1034
1034
|
e("div", Mn, p(a(b)("inventory.stock.adjust.title")), 1)
|
|
1035
1035
|
])
|
|
1036
1036
|
]),
|
|
1037
|
-
default:
|
|
1037
|
+
default: H(() => [
|
|
1038
1038
|
y(I, {
|
|
1039
1039
|
class: "w-full flex flex-col gap-12",
|
|
1040
1040
|
ref_key: "formRef",
|
|
1041
1041
|
ref: f,
|
|
1042
1042
|
onValidationSuccess: i
|
|
1043
1043
|
}, {
|
|
1044
|
-
default:
|
|
1044
|
+
default: H(() => [
|
|
1045
1045
|
y(C, {
|
|
1046
1046
|
label: a(b)("inventory.stock.adjust.remark"),
|
|
1047
1047
|
modelValue: g.remark,
|
|
@@ -1066,7 +1066,7 @@ const We = {
|
|
|
1066
1066
|
_: 1
|
|
1067
1067
|
}, 512)
|
|
1068
1068
|
]),
|
|
1069
|
-
"side-sheet-footer":
|
|
1069
|
+
"side-sheet-footer": H(() => [
|
|
1070
1070
|
e("div", Tn, [
|
|
1071
1071
|
y(A, {
|
|
1072
1072
|
label: a(b)("inventory.stock.adjust.adjustButton"),
|
|
@@ -1082,7 +1082,7 @@ const We = {
|
|
|
1082
1082
|
}, 8, ["modelValue"]);
|
|
1083
1083
|
};
|
|
1084
1084
|
}
|
|
1085
|
-
}),
|
|
1085
|
+
}), Hn = { class: "flex items-center w-full gap-8" }, En = { class: "fm-typo-en-title-md-800 flex-1" }, Pn = { class: "flex flex-col gap-16" }, Rn = { class: "flex flex-col gap-4" }, On = { class: "fm-typo-en-body-md-600" }, Nn = { class: "flex gap-8 items-start" }, Yn = { class: "flex-1 min-w-0" }, Ln = { class: "flex-1 min-w-0" }, zn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Gn = { class: "flex items-center" }, Wn = { class: "fm-typo-en-title-sm-800 flex-1" }, Kn = { class: "flex gap-8" }, qn = /* @__PURE__ */ me({
|
|
1086
1086
|
__name: "StockAdjustmentSideSheet",
|
|
1087
1087
|
props: {
|
|
1088
1088
|
show: { type: Boolean }
|
|
@@ -1194,7 +1194,7 @@ const We = {
|
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
1196
|
return (C, A) => {
|
|
1197
|
-
const I =
|
|
1197
|
+
const I = U("FmTextarea"), R = U("FmDatePicker"), K = U("FmTimePicker"), O = U("FmButton"), Z = U("FmSideSheet");
|
|
1198
1198
|
return D(), X(Z, {
|
|
1199
1199
|
modelValue: a(B),
|
|
1200
1200
|
"onUpdate:modelValue": A[4] || (A[4] = (q) => Ee(B) ? B.value = q : null),
|
|
@@ -1202,12 +1202,12 @@ const We = {
|
|
|
1202
1202
|
"max-width": 560,
|
|
1203
1203
|
onAfterEnter: x
|
|
1204
1204
|
}, {
|
|
1205
|
-
"side-sheet-header":
|
|
1206
|
-
e("div",
|
|
1205
|
+
"side-sheet-header": H(() => [
|
|
1206
|
+
e("div", Hn, [
|
|
1207
1207
|
e("div", En, p(a(j)("inventory.stock.stock_adjustment.title")), 1)
|
|
1208
1208
|
])
|
|
1209
1209
|
]),
|
|
1210
|
-
default:
|
|
1210
|
+
default: H(() => [
|
|
1211
1211
|
e("div", Pn, [
|
|
1212
1212
|
y(I, {
|
|
1213
1213
|
label: a(j)("inventory.stock.adjust.remark"),
|
|
@@ -1255,7 +1255,7 @@ const We = {
|
|
|
1255
1255
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onClick:delete"]))), 128))
|
|
1256
1256
|
])
|
|
1257
1257
|
]),
|
|
1258
|
-
"side-sheet-footer":
|
|
1258
|
+
"side-sheet-footer": H(() => [
|
|
1259
1259
|
e("div", Kn, [
|
|
1260
1260
|
y(O, {
|
|
1261
1261
|
label: a(j)("common.confirm"),
|
|
@@ -1364,15 +1364,15 @@ const We = {
|
|
|
1364
1364
|
return n ? pe.toFormatString({ value: n }) : "N/A";
|
|
1365
1365
|
}
|
|
1366
1366
|
return (o, t) => {
|
|
1367
|
-
const n =
|
|
1367
|
+
const n = U("FmIcon"), S = U("FmStepperField"), C = U("FmCard"), A = U("FmForm"), I = U("FmSpacer"), R = U("FmButton"), K = U("FmDialog");
|
|
1368
1368
|
return D(), X(K, {
|
|
1369
1369
|
modelValue: h.value,
|
|
1370
1370
|
"onUpdate:modelValue": t[4] || (t[4] = (O) => h.value = O),
|
|
1371
1371
|
overlay: !0
|
|
1372
1372
|
}, {
|
|
1373
|
-
"dialog-button":
|
|
1373
|
+
"dialog-button": H(() => [
|
|
1374
1374
|
y(Xe, null, {
|
|
1375
|
-
default:
|
|
1375
|
+
default: H(() => [
|
|
1376
1376
|
e("button", {
|
|
1377
1377
|
onClick: t[0] || (t[0] = (O) => h.value = !0),
|
|
1378
1378
|
class: "rounded-md hover:bg-gray-100 transition-colors"
|
|
@@ -1386,10 +1386,10 @@ const We = {
|
|
|
1386
1386
|
_: 1
|
|
1387
1387
|
})
|
|
1388
1388
|
]),
|
|
1389
|
-
"dialog-header":
|
|
1389
|
+
"dialog-header": H(() => t[5] || (t[5] = [
|
|
1390
1390
|
e("div", null, "Amend Adjustment", -1)
|
|
1391
1391
|
])),
|
|
1392
|
-
"dialog-footer":
|
|
1392
|
+
"dialog-footer": H(() => [
|
|
1393
1393
|
e("div", ao, [
|
|
1394
1394
|
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)),
|
|
1395
1395
|
e("div", lo, [
|
|
@@ -1411,7 +1411,7 @@ const We = {
|
|
|
1411
1411
|
])
|
|
1412
1412
|
])
|
|
1413
1413
|
]),
|
|
1414
|
-
default:
|
|
1414
|
+
default: H(() => [
|
|
1415
1415
|
c.value ? (D(), W("div", Jn)) : (D(), X(A, {
|
|
1416
1416
|
key: 1,
|
|
1417
1417
|
ref_key: "formRef",
|
|
@@ -1424,7 +1424,7 @@ const We = {
|
|
|
1424
1424
|
}),
|
|
1425
1425
|
blameFormChildOnValidationFailed: ""
|
|
1426
1426
|
}, {
|
|
1427
|
-
default:
|
|
1427
|
+
default: H(() => [
|
|
1428
1428
|
e("p", Qn, [
|
|
1429
1429
|
t[6] || (t[6] = e("b", null, "Date:", -1)),
|
|
1430
1430
|
t[7] || (t[7] = e("br", null, null, -1)),
|
|
@@ -1437,7 +1437,7 @@ const We = {
|
|
|
1437
1437
|
variant: "outlined",
|
|
1438
1438
|
class: "p-2"
|
|
1439
1439
|
}, {
|
|
1440
|
-
default:
|
|
1440
|
+
default: H(() => [
|
|
1441
1441
|
e("div", eo, [
|
|
1442
1442
|
e("span", to, p(O.sku.code), 1),
|
|
1443
1443
|
e("span", null, p(O.sku.name), 1)
|
|
@@ -1469,7 +1469,7 @@ const We = {
|
|
|
1469
1469
|
"append-text": g(O, q),
|
|
1470
1470
|
rules: [
|
|
1471
1471
|
(ee) => ee <= T(q.amount) || `Cannot be more than ${T(q.amount)}`,
|
|
1472
|
-
a(
|
|
1472
|
+
a(Ue)(-1)
|
|
1473
1473
|
]
|
|
1474
1474
|
}, null, 8, ["max-fraction-digits", "model-value", "onUpdate:modelValue", "helper-text", "append-text", "rules"]),
|
|
1475
1475
|
e("div", so, [
|
|
@@ -1549,7 +1549,7 @@ const We = {
|
|
|
1549
1549
|
return ((t = o.skus) == null ? void 0 : t.filter((n) => n.sku._id === i._id)) ?? [];
|
|
1550
1550
|
}).flatMap((o) => o.amounts);
|
|
1551
1551
|
for (const o of g) {
|
|
1552
|
-
const t = o.measurement ?
|
|
1552
|
+
const t = o.measurement ? dt(o.measurement.conversion, o.amount) : o.amount;
|
|
1553
1553
|
f[x = o.type] ?? (f[x] = { amount: 0, precision: 0 }), f[o.type] = Je(t, f[o.type]);
|
|
1554
1554
|
}
|
|
1555
1555
|
return Object.entries(f).reduce(
|
|
@@ -1570,10 +1570,10 @@ const We = {
|
|
|
1570
1570
|
return {
|
|
1571
1571
|
...x,
|
|
1572
1572
|
ref: f.ref,
|
|
1573
|
-
backdateFrom: f.effectiveAt != null ?
|
|
1573
|
+
backdateFrom: f.effectiveAt != null ? Te(f._id) : null,
|
|
1574
1574
|
toBalance: (t = (o = f.skus) == null ? void 0 : o[0]) == null ? void 0 : t.toBalance,
|
|
1575
1575
|
adjustmentId: f._id,
|
|
1576
|
-
adjustmentTime: f.effectiveAt ??
|
|
1576
|
+
adjustmentTime: f.effectiveAt ?? Te(f._id)
|
|
1577
1577
|
};
|
|
1578
1578
|
})) ?? [];
|
|
1579
1579
|
}
|
|
@@ -1608,9 +1608,9 @@ const We = {
|
|
|
1608
1608
|
})
|
|
1609
1609
|
})));
|
|
1610
1610
|
return (b, i) => {
|
|
1611
|
-
const f =
|
|
1611
|
+
const f = U("FmIcon"), T = U("FmTooltip"), g = U("FmCard");
|
|
1612
1612
|
return D(), X(g, { variant: "outlined" }, {
|
|
1613
|
-
default:
|
|
1613
|
+
default: H(() => [
|
|
1614
1614
|
e("div", io, [
|
|
1615
1615
|
e("div", {
|
|
1616
1616
|
class: "flex items-center cursor-pointer mb-1",
|
|
@@ -1666,12 +1666,12 @@ const We = {
|
|
|
1666
1666
|
placement: "top",
|
|
1667
1667
|
"z-index": 50
|
|
1668
1668
|
}, {
|
|
1669
|
-
content:
|
|
1669
|
+
content: H(() => [
|
|
1670
1670
|
e("div", yo, p(a(h)("inventory.stock.record.backdate", [
|
|
1671
1671
|
a(yt)(new Date(o.backdateFrom))
|
|
1672
1672
|
])), 1)
|
|
1673
1673
|
]),
|
|
1674
|
-
default:
|
|
1674
|
+
default: H(() => [
|
|
1675
1675
|
y(f, {
|
|
1676
1676
|
name: "info",
|
|
1677
1677
|
size: "sm",
|
|
@@ -1779,7 +1779,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
1779
1779
|
}, jo = { class: "pb-16" }, Mo = { class: "fm-typo-cn-body-lg-600" }, Bo = {
|
|
1780
1780
|
class: "grid gap-12 fm-typo-en-body-md-400",
|
|
1781
1781
|
style: { "grid-template-columns": "auto auto auto", "grid-auto-rows": "1fr" }
|
|
1782
|
-
}, Io = { class: "flex flex-col gap-1" }, To = { class: "text-fm-color-typo-secondary" },
|
|
1782
|
+
}, Io = { class: "flex flex-col gap-1" }, To = { class: "text-fm-color-typo-secondary" }, Uo = { class: "font-bold" }, Ho = { class: "flex flex-col gap-1" }, Eo = { class: "text-fm-color-typo-secondary flex" }, Po = { class: "font-bold" }, Ro = { class: "flex flex-col gap-1" }, Oo = { class: "text-fm-color-typo-secondary" }, No = { class: "font-bold" }, Yo = { class: "flex flex-col gap-1" }, Lo = { class: "text-fm-color-typo-secondary" }, zo = { class: "font-bold" }, Go = { class: "flex flex-col gap-1" }, Wo = { class: "text-fm-color-typo-secondary" }, Ko = { class: "font-bold" }, qo = { class: "flex flex-col gap-1" }, Xo = { class: "text-fm-color-typo-secondary" }, Jo = { class: "font-bold" }, Qo = { class: "flex flex-col gap-1" }, Zo = { class: "text-fm-color-typo-secondary" }, es = { class: "font-bold" }, ts = { class: "flex flex-col gap-1" }, ns = { class: "text-fm-color-typo-secondary" }, os = { class: "font-bold" }, ss = { class: "flex flex-col gap-1" }, as = { class: "text-fm-color-typo-secondary" }, ls = { class: "font-bold" }, rs = {
|
|
1783
1783
|
key: 0,
|
|
1784
1784
|
class: "flex flex-col gap-8"
|
|
1785
1785
|
}, is = { class: "flex" }, us = { class: "flex-1 flex flex-col gap-1" }, cs = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, ds = { class: "font-bold" }, ms = { class: "flex-1 flex flex-col gap-1" }, fs = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, vs = { class: "flex flex-col gap-1" }, ps = { class: "font-bold" }, ys = {
|
|
@@ -1793,7 +1793,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
1793
1793
|
},
|
|
1794
1794
|
emits: ["update:show"],
|
|
1795
1795
|
setup(k) {
|
|
1796
|
-
const m =
|
|
1796
|
+
const m = vt(), d = Oe(), s = we(), j = Xn(), w = xe(), c = Jt(), { t: l } = fe(), h = k, B = z(!1), b = Se(), i = z("adjustment"), f = z([
|
|
1797
1797
|
{ label: "Adjustment (Default)", value: "adjustment" }
|
|
1798
1798
|
]), T = z([]), g = z(Kt(0));
|
|
1799
1799
|
async function x() {
|
|
@@ -1822,7 +1822,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
1822
1822
|
function C(_, r) {
|
|
1823
1823
|
const M = _.reduce(
|
|
1824
1824
|
(V, u) => {
|
|
1825
|
-
const F = u.effectiveAt ??
|
|
1825
|
+
const F = u.effectiveAt ?? Te(u._id);
|
|
1826
1826
|
if (!F)
|
|
1827
1827
|
return V;
|
|
1828
1828
|
const N = S(new Date(F), r);
|
|
@@ -1918,7 +1918,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
1918
1918
|
const F = u.cost;
|
|
1919
1919
|
if (!F) return V;
|
|
1920
1920
|
const N = {
|
|
1921
|
-
...
|
|
1921
|
+
...Mt(V, Math.max(V.precision, F.precision)),
|
|
1922
1922
|
currency: F.currency
|
|
1923
1923
|
};
|
|
1924
1924
|
return {
|
|
@@ -1977,7 +1977,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
1977
1977
|
currency: ((N = J.cost) == null ? void 0 : N.currency) || De(((ne = m.currentCountry) == null ? void 0 : ne.value) ?? et)
|
|
1978
1978
|
};
|
|
1979
1979
|
} else {
|
|
1980
|
-
const J = _.effectiveAt ??
|
|
1980
|
+
const J = _.effectiveAt ?? Te(_._id), te = v(
|
|
1981
1981
|
_._id,
|
|
1982
1982
|
J ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
1983
1983
|
);
|
|
@@ -2012,7 +2012,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2012
2012
|
}
|
|
2013
2013
|
const E = Ye(h, "show");
|
|
2014
2014
|
return (_, r) => {
|
|
2015
|
-
const M =
|
|
2015
|
+
const M = U("FmButton"), V = U("FmField"), u = U("FmDateRangePicker"), F = U("FmSpacer"), N = U("FmCircularProgress"), ne = U("FmIcon"), re = U("FmTooltip"), J = U("FmMenuDivider"), te = U("FmChip"), oe = U("FmSelect"), ie = U("FmCardSection"), Fe = U("FmCard"), gt = U("FmSideSheet");
|
|
2016
2016
|
return D(), X(gt, {
|
|
2017
2017
|
"dismiss-away": "",
|
|
2018
2018
|
modelValue: a(E),
|
|
@@ -2020,7 +2020,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2020
2020
|
"close-button": !1,
|
|
2021
2021
|
"max-width": 560
|
|
2022
2022
|
}, {
|
|
2023
|
-
"side-sheet-header":
|
|
2023
|
+
"side-sheet-header": H(() => [
|
|
2024
2024
|
e("div", So, [
|
|
2025
2025
|
e("div", wo, p(a(l)("inventory.stock.history.title", [_.sku.name])), 1),
|
|
2026
2026
|
y(M, {
|
|
@@ -2030,7 +2030,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2030
2030
|
})
|
|
2031
2031
|
])
|
|
2032
2032
|
]),
|
|
2033
|
-
default:
|
|
2033
|
+
default: H(() => {
|
|
2034
2034
|
var Ae;
|
|
2035
2035
|
return [
|
|
2036
2036
|
e("div", Fo, [
|
|
@@ -2044,12 +2044,12 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2044
2044
|
"end-label": "",
|
|
2045
2045
|
"z-index": 50
|
|
2046
2046
|
}, {
|
|
2047
|
-
"trigger-button":
|
|
2047
|
+
"trigger-button": H(({ opened: de }) => [
|
|
2048
2048
|
y(V, {
|
|
2049
2049
|
"prepend-icon": "calendar_month",
|
|
2050
2050
|
focused: de
|
|
2051
2051
|
}, {
|
|
2052
|
-
default:
|
|
2052
|
+
default: H(() => [
|
|
2053
2053
|
ve(p(g.value.startDate) + " - " + p(g.value.endDate), 1)
|
|
2054
2054
|
]),
|
|
2055
2055
|
_: 2
|
|
@@ -2077,18 +2077,18 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2077
2077
|
y(F)
|
|
2078
2078
|
])) : t.value && ((Ae = t.value) == null ? void 0 : Ae.length) > 0 ? (D(), W("div", Do, [
|
|
2079
2079
|
y(Fe, { variant: "outlined" }, {
|
|
2080
|
-
default:
|
|
2080
|
+
default: H(() => [
|
|
2081
2081
|
y(ie, { class: "flex flex-col gap-4" }, {
|
|
2082
|
-
default:
|
|
2082
|
+
default: H(() => [
|
|
2083
2083
|
e("div", jo, [
|
|
2084
2084
|
e("div", Mo, p(a(l)("inventory.stock.history.summary.title")), 1)
|
|
2085
2085
|
]),
|
|
2086
2086
|
e("div", Bo, [
|
|
2087
2087
|
e("div", Io, [
|
|
2088
2088
|
e("div", To, p(a(l)("inventory.stock.history.summary.totalPurchase")), 1),
|
|
2089
|
-
e("div",
|
|
2089
|
+
e("div", Uo, p(R.value.PURCHASE), 1)
|
|
2090
2090
|
]),
|
|
2091
|
-
e("div",
|
|
2091
|
+
e("div", Ho, [
|
|
2092
2092
|
e("div", Eo, [
|
|
2093
2093
|
ve(p(a(l)("inventory.stock.history.summary.totalSales")) + " ", 1),
|
|
2094
2094
|
K.value != null ? (D(), X(re, {
|
|
@@ -2098,7 +2098,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2098
2098
|
content: `Before: ${K.value}`,
|
|
2099
2099
|
"z-index": 50
|
|
2100
2100
|
}, {
|
|
2101
|
-
default:
|
|
2101
|
+
default: H(() => [
|
|
2102
2102
|
y(ne, {
|
|
2103
2103
|
name: "warning",
|
|
2104
2104
|
size: "sm"
|
|
@@ -2142,8 +2142,8 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2142
2142
|
y(J, { class: "w-full" }),
|
|
2143
2143
|
e("div", is, [
|
|
2144
2144
|
e("div", us, [
|
|
2145
|
-
y(
|
|
2146
|
-
default:
|
|
2145
|
+
y(ot, { "z-index": 50 }, {
|
|
2146
|
+
default: H(() => [
|
|
2147
2147
|
e("div", cs, [
|
|
2148
2148
|
ve(p(a(l)("inventory.stock.history.estimatedValue")) + " ", 1),
|
|
2149
2149
|
y(re, {
|
|
@@ -2152,7 +2152,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2152
2152
|
content: `[${ee.value}] ${a(l)("inventory.stock.history.estimatedValueTooltip")}`,
|
|
2153
2153
|
"z-index": 50
|
|
2154
2154
|
}, {
|
|
2155
|
-
default:
|
|
2155
|
+
default: H(() => [
|
|
2156
2156
|
y(ne, {
|
|
2157
2157
|
name: "help",
|
|
2158
2158
|
size: "sm"
|
|
@@ -2193,8 +2193,8 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2193
2193
|
}, null, 8, ["modelValue", "items"])
|
|
2194
2194
|
]),
|
|
2195
2195
|
e("div", ms, [
|
|
2196
|
-
y(
|
|
2197
|
-
default:
|
|
2196
|
+
y(ot, { "z-index": 50 }, {
|
|
2197
|
+
default: H(() => [
|
|
2198
2198
|
e("div", fs, [
|
|
2199
2199
|
ve(p(a(l)("inventory.stock.history.costSold")) + " ", 1),
|
|
2200
2200
|
y(re, {
|
|
@@ -2202,10 +2202,10 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2202
2202
|
placement: "top",
|
|
2203
2203
|
"z-index": 50
|
|
2204
2204
|
}, {
|
|
2205
|
-
content:
|
|
2205
|
+
content: H(() => [
|
|
2206
2206
|
e("div", vs, p(a(l)("inventory.stock.history.costSoldTooltip")), 1)
|
|
2207
2207
|
]),
|
|
2208
|
-
default:
|
|
2208
|
+
default: H(() => [
|
|
2209
2209
|
y(ne, {
|
|
2210
2210
|
name: "help",
|
|
2211
2211
|
size: "sm"
|
|
@@ -2267,7 +2267,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2267
2267
|
}, xs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ss = { class: "flex flex-col gap-8" }, ws = { class: "flex flex-col" }, Fs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, As = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Qs = /* @__PURE__ */ me({
|
|
2268
2268
|
__name: "StockView",
|
|
2269
2269
|
setup(k) {
|
|
2270
|
-
const { t: m } = fe(), d = Re(), s = xe(), j = Oe(), w = kt(), c = we(), l =
|
|
2270
|
+
const { t: m } = fe(), d = Re(), s = xe(), j = Oe(), w = kt(), c = we(), l = mt(), h = Zt(), { columnDefs: B } = un(), b = Ne(), i = Se();
|
|
2271
2271
|
s.watchLocation(x);
|
|
2272
2272
|
const f = Y(
|
|
2273
2273
|
() => new Set(h.getAvailableItems(h.businessSubsidiaryId))
|
|
@@ -2357,7 +2357,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2357
2357
|
}
|
|
2358
2358
|
}
|
|
2359
2359
|
return v;
|
|
2360
|
-
}), S = z(""), C = z(!0), { breakpoints: A } =
|
|
2360
|
+
}), S = z(""), C = z(!0), { breakpoints: A } = Ut(), I = Y(() => A.value.xs || A.value.sm), R = Y(() => I.value ? 10 : 20), K = St(), O = Y(() => [
|
|
2361
2361
|
{
|
|
2362
2362
|
label: m("inventory.stock.stock_balance.refreshBalance"),
|
|
2363
2363
|
value: "refresh-balance",
|
|
@@ -2394,13 +2394,13 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2394
2394
|
}
|
|
2395
2395
|
}
|
|
2396
2396
|
return (ee, v) => {
|
|
2397
|
-
const $ =
|
|
2397
|
+
const $ = U("FmSwitch"), G = U("FmTable");
|
|
2398
2398
|
return D(), X(wt, {
|
|
2399
2399
|
title: a(m)("inventory.stock.title"),
|
|
2400
2400
|
actions: O.value,
|
|
2401
2401
|
"onClick:action": ue
|
|
2402
2402
|
}, {
|
|
2403
|
-
default:
|
|
2403
|
+
default: H(() => {
|
|
2404
2404
|
var P, L, E, _;
|
|
2405
2405
|
return [
|
|
2406
2406
|
e("div", {
|
|
@@ -2423,12 +2423,12 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2423
2423
|
filter: t.value,
|
|
2424
2424
|
"onUpdate:filter": v[2] || (v[2] = (r) => t.value = r)
|
|
2425
2425
|
}, {
|
|
2426
|
-
default:
|
|
2426
|
+
default: H(() => [
|
|
2427
2427
|
a(h).isEnabled ? (D(), W("div", bs, [
|
|
2428
2428
|
e("span", xs, p(a(m)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
|
|
2429
|
-
y(
|
|
2429
|
+
y(It),
|
|
2430
2430
|
y(Xe, null, {
|
|
2431
|
-
default:
|
|
2431
|
+
default: H(() => [
|
|
2432
2432
|
y($, {
|
|
2433
2433
|
modelValue: C.value,
|
|
2434
2434
|
"onUpdate:modelValue": v[0] || (v[0] = (r) => C.value = r)
|
|
@@ -2450,12 +2450,12 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2450
2450
|
onRowClick: v[3] || (v[3] = (r) => a(w).showSkuHistory(r.original)),
|
|
2451
2451
|
"page-size": R.value
|
|
2452
2452
|
}, {
|
|
2453
|
-
"list-row":
|
|
2453
|
+
"list-row": H((r) => [
|
|
2454
2454
|
y(Qt, {
|
|
2455
2455
|
row: r,
|
|
2456
2456
|
onRowClick: a(w).showSkuHistory
|
|
2457
2457
|
}, {
|
|
2458
|
-
default:
|
|
2458
|
+
default: H((M) => {
|
|
2459
2459
|
var V, u, F, N, ne, re, J, te, oe, ie;
|
|
2460
2460
|
return [
|
|
2461
2461
|
e("div", Ss, [
|
|
@@ -2499,7 +2499,7 @@ const So = { class: "flex items-center w-full fm-typo-en-title-md-800" }, wo = {
|
|
|
2499
2499
|
(D(), X(xt, { to: "body" }, [
|
|
2500
2500
|
(L = a(w).stockHistoryProps) != null && L.sku ? (D(), X(gs, Le(ze({ key: 0 }, a(w).stockHistoryProps)), null, 16)) : se("", !0),
|
|
2501
2501
|
(E = a(w).convertSkuDialogProps) != null && E.sku ? (D(), X(wn, Le(ze({ key: 1 }, a(w).convertSkuDialogProps)), null, 16)) : se("", !0),
|
|
2502
|
-
(_ = a(w).adjustSkuDialogProps) != null && _.stock ? (D(), X(
|
|
2502
|
+
(_ = a(w).adjustSkuDialogProps) != null && _.stock ? (D(), X(Un, Le(ze({ key: 2 }, a(w).adjustSkuDialogProps)), null, 16)) : se("", !0),
|
|
2503
2503
|
Z.value ? (D(), X(qn, {
|
|
2504
2504
|
key: 3,
|
|
2505
2505
|
show: Z.value,
|