@feedmepos/mf-inventory-portal 1.2.60-dev.1 → 1.2.60
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-Dgk5k8U-.js → App-B6JtYLP4.js} +78 -82
- package/dist/{ApprovalView-CU2YMuZb.js → ApprovalView-fiHlFJKJ.js} +5 -5
- package/dist/{BindingsDialog-Cu0AR6jW.js → BindingsDialog-BlF79qCu.js} +5 -5
- package/dist/{BindingsPicker-DyycJJ6i.js → BindingsPicker-BS2OcyII.js} +3 -3
- package/dist/{BindingsTable-wFAnOCdU.js → BindingsTable-RyfzT4g6.js} +5 -5
- package/dist/{ClosingDraftView-C01bZNv_.js → ClosingDraftView-B2d-XA_E.js} +216 -217
- package/dist/{ClosingHistoryView-Bwjadf1x.js → ClosingHistoryView-DZPNorN6.js} +36 -36
- package/dist/{ClosingTemplateView-BAalivwa.js → ClosingTemplateView-L596UQJH.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-CaEmXkPV.js → DeliveryOrderPrintPreview-C82JPcVR.js} +7 -7
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D7J8uo_B.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CNf3PA0N.js} +17 -17
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DU4I0imJ.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-WWzwaGw-.js} +2 -2
- package/dist/{FmMultiselectDialog-v004bPKF.js → FmMultiselectDialog-CcMB_4yD.js} +16 -16
- package/dist/{FmMultiselectDialog-CdhcCzVw.js → FmMultiselectDialog-DTLcPYaF.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C756UIBL.js → FmUnitInput.vue_vue_type_script_setup_true_lang-ChqG8Av1.js} +22 -23
- package/dist/{ImportView-WyG44i3g.js → ImportView-diTEPSKt.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Y74PdyhQ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Cu-dNL-B.js} +1 -1
- package/dist/{IngredientGroupView-7bkBWvrQ.js → IngredientGroupView-CYqZOXH1.js} +5 -5
- package/dist/{IngredientsView-BDgOWARl.js → IngredientsView-DoCTezXa.js} +24 -25
- package/dist/{IntegrationView-BB7asiWy.js → IntegrationView-JboVfhvd.js} +17 -18
- package/dist/{InventoryBindingForm-CU9dnGdy.js → InventoryBindingForm-B1MrDzRK.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BmlVB1SU.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Br1hzlQ5.js} +16 -17
- package/dist/{InventoryBindingSummary-D2W_WcLV.js → InventoryBindingSummary-B09SU9pE.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CVfShkXe.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BX26mYQG.js} +5 -5
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CC4jkZg4.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DIk5aP_6.js} +2 -2
- package/dist/{PublishView-DR_TwAkf.js → PublishView-BLu0VGTW.js} +8 -8
- package/dist/{PurchaseOrderPrintPreview-CoX0u7jn.js → PurchaseOrderPrintPreview-CFZX2Yen.js} +11 -11
- package/dist/{ReceiveRequestView-VBePJl-U.js → ReceiveRequestView-DD0kz7x8.js} +248 -249
- package/dist/RecipeView-Cg7v20hW.js +646 -0
- package/dist/{StockView-BFv_Tl8E.js → StockView-CJk1YeM_.js} +646 -645
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BFCjZO6S.js +183 -0
- package/dist/{SupplierView-PSGUQEzz.js → SupplierView-CTEInwI-.js} +19 -20
- package/dist/{SurchargeView-B7qTXk1L.js → SurchargeView-CKJ2LS9l.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CxEeb4BW.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DVhI5Qy6.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Dxg6HaiQ.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DjjLI4tM.js} +1 -1
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Dte8E0MX.js +3354 -0
- package/dist/{TransferTemplateView-CsRPCwN_.js → TransferTemplateView-rmrQtfX8.js} +21 -22
- package/dist/{UnitView-CdZ_GaUr.js → UnitView-Drvo3Tew.js} +10 -11
- package/dist/{WarehouseView-DQGYq00N.js → WarehouseView-DIBgCCzG.js} +5 -5
- package/dist/{WastageTemplateView-CE7aiWUH.js → WastageTemplateView-Cdvx4Ist.js} +14 -14
- package/dist/api/inventory.d.ts +36 -126
- package/dist/api/netsuite.d.ts +1 -8
- package/dist/api/stock-estimate.d.ts +2 -0
- package/dist/{app-CpEqZK89.js → app-BQahEYX9.js} +6708 -7673
- package/dist/app.d.ts +32 -228
- package/dist/app.js +1 -1
- package/dist/{closing-template-C20qxOGw.js → closing-template-ByR8ktYf.js} +1 -1
- package/dist/components/StockForecastProps.d.ts +6 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -37
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +0 -14
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -16
- package/dist/{date2-C37x5LGh.js → date2-BTP8kRm1.js} +1 -1
- package/dist/{dayjs.min-C5A6b5Ut.js → dayjs.min-1rxaqCQM.js} +16 -16
- package/dist/{defineDeepModel-btW96tVp.js → defineDeepModel-BaJIlpWC.js} +1 -1
- package/dist/{duplicate-template-BPduDL4a.js → duplicate-template-XaB2svr5.js} +1 -1
- package/dist/{feature-Cu77Fha2.js → feature-Ce7hky70.js} +1696 -1560
- package/dist/{format-time-from-id-ULW7QQVk.js → format-time-from-id-DwTuSEMw.js} +1 -1
- package/dist/{format-unit-display-CeyXEKCV.js → format-unit-display-DviFIF9R.js} +15 -16
- package/dist/{import-export.helper-DpgGeeZ4.js → import-export.helper-CyeFjIHv.js} +15 -16
- package/dist/{index-Cl2lmtBz.js → index-CC_ls9B4.js} +1412 -1471
- package/dist/{index-DKDWBhbI.js → index-CeTIFqwk.js} +3 -3
- package/dist/{index-6Is7orHh.js → index-f1rjUE_a.js} +1 -1
- package/dist/{lodash-BS2snJNb.js → lodash-Be4onxQF.js} +1 -1
- package/dist/{netsuite-B5YYhPhU.js → netsuite-CB9u725A.js} +374 -372
- package/dist/{purchase-order-template-DVz_OXJ7.js → purchase-order-template-DoBDYEtP.js} +1 -1
- package/dist/router/name.d.ts +0 -1
- package/dist/rules-DZnC9R5E.js +327 -0
- package/dist/stock-DcXdnfU0.js +75 -0
- package/dist/{stock-D9iwDDOz.js → stock-DjHGX36M.js} +1 -1
- package/dist/stores/feature.d.ts +0 -2
- package/dist/stores/integration/netsuite.d.ts +1 -8
- package/dist/stores/inventory.d.ts +30 -119
- package/dist/style.css +1 -1
- package/dist/{supplier-UJg1gtQ8.js → supplier-BtZvsnMx.js} +2 -2
- package/dist/{surcharge-CcJatYN4.js → surcharge-CDGjoxGm.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-C--_de2u.js → use-ingredient-select-dialog-l54ucmfp.js} +2 -2
- package/dist/{use-inventory-binding-dialog-JsmcY8OK.js → use-inventory-binding-dialog-adxsJaIL.js} +2 -2
- package/dist/{use-template-enabled-locations-2-Ce6Y0gQ_.js → use-template-enabled-locations-2-CgWtnf8k.js} +2 -2
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +8 -64
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +24 -192
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -8
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +12 -96
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +12 -96
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +18 -18
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +0 -14
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -32
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -28
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -8
- package/dist/views/integration/components/netsuite/InventoryTransferIngredientTable.vue.d.ts +2 -16
- package/dist/views/receive-request/components/transfer-details/RejectDraftForm.vue.d.ts +19 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +5 -1
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +6 -33
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -16
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +4 -32
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -8
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +7 -41
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +42 -246
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +49 -287
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +0 -16
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +0 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -16
- package/dist/views/stock/type.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +2 -16
- package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +2 -16
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +2 -16
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -8
- package/dist/views/transfer-template/composables/use-netsuite-custom-field.d.ts +3 -24
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +12 -96
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +12 -96
- package/dist/{vue-i18n-Cv_EPb3h.js → vue-i18n-CgWPe8oO.js} +438 -438
- package/dist/{xlsx-DuXSmSdO.js → xlsx-FLEhrhiP.js} +1 -1
- package/dist/{xlsx.util-B75iIY7V.js → xlsx.util-DoAD8sxa.js} +1 -1
- package/package.json +2 -2
- package/dist/RecipeView-CiZw14m_.js +0 -1558
- package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BMEsUpAC.js +0 -172
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CAviJscD.js +0 -3241
- package/dist/UnitCostHistoryView-Byd2FHbH.js +0 -651
- package/dist/api/unit-cost-history.d.ts +0 -28
- package/dist/number-DgdltWRu.js +0 -232
- package/dist/rules-BPG3Fjva.js +0 -98
- package/dist/stock-BXorYvfp.js +0 -75
- package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -169
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingAlternative.vue.d.ts +0 -43
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryBindingRule.vue.d.ts +0 -25
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventoryRecipeBindingV2Field.vue.d.ts +0 -125
- package/dist/views/ingredients/components/inventory-binding/v2/components/InventorySkuBindingV2Field.vue.d.ts +0 -129
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-alternative-table.d.ts +0 -30
- package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -4
- package/dist/views/unit-cost-history/UnitCostHistoryView.vue.d.ts +0 -2
- package/dist/views/unit-cost-history/components/UnitCostDetailsSideSheet.vue.d.ts +0 -19
- package/dist/views/unit-cost-history/components/UnitCostRecalculationDialog.vue.d.ts +0 -11
- package/dist/views/unit-cost-history/composables/use-unit-cost-history.d.ts +0 -65
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import { computed as q, h as Y, defineComponent as le, openBlock as x, createElementBlock as P, Fragment as re, renderList as fe, createElementVNode as o, toDisplayString as I, unref as e, resolveComponent as O, createVNode as m, withCtx as A, createCommentVNode as K, ref as U, createBlock as se, watch as be, normalizeClass as W, normalizeStyle as kt, onMounted as
|
|
2
|
-
import { t as de, s as pe, f as Ct,
|
|
3
|
-
import { i as
|
|
4
|
-
import { u as es, P as Ye, a as ts, _ as ss, g as os } from "./TransferDetails.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { a as xe,
|
|
6
|
-
import { _ as St, u as
|
|
7
|
-
import { d as bt } from "./dayjs.min-
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { useBreakpoints as
|
|
1
|
+
import { computed as q, h as Y, defineComponent as le, openBlock as x, createElementBlock as P, Fragment as re, renderList as fe, createElementVNode as o, toDisplayString as I, unref as e, resolveComponent as O, createVNode as m, withCtx as A, createCommentVNode as K, ref as U, createBlock as se, watch as be, normalizeClass as W, normalizeStyle as kt, onMounted as Ze, createTextVNode as Ce, toRaw as qt, shallowRef as pt, onUnmounted as Ut, triggerRef as Nt, reactive as Bt, mergeProps as Xe, isRef as he, createSlots as zt, Teleport as Lt, normalizeProps as jt, guardReactiveProps as Ht } from "vue";
|
|
2
|
+
import { t as de, s as pe, f as Ct, M as Qt, B as Yt, u as Ne, a as Be, O as ft, P as Kt, Q as Xt, T as Zt, U as Wt, v as Jt, w as wt, m as Me } from "./app-BQahEYX9.js";
|
|
3
|
+
import { i as vt, _ as Gt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-WWzwaGw-.js";
|
|
4
|
+
import { u as es, P as Ye, a as ts, _ as ss, g as os } from "./TransferDetails.vue_vue_type_script_setup_true_lang-Dte8E0MX.js";
|
|
5
|
+
import { R as Te, a as xe, e as we, d as as, A as Ue, M as rs, h as yt, B as ns } from "./rules-DZnC9R5E.js";
|
|
6
|
+
import { _ as St, u as ls, i as is, e as us } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-DIk5aP_6.js";
|
|
7
|
+
import { d as bt } from "./dayjs.min-1rxaqCQM.js";
|
|
8
|
+
import { u as ds } from "./useTabStorage-BkIVScW_.js";
|
|
9
|
+
import { u as cs, _ as ms } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
10
|
+
import { useBreakpoints as We, components as me, FmButtonVariant as ps, useSnackbar as Se, useDialog as fs, useProxiedModel as Ft } from "@feedmepos/ui-library";
|
|
11
11
|
import { F as De } from "./form-mode.enum-BKiNVH6A.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { u as Pe } from "./netsuite-B5YYhPhU.js";
|
|
12
|
+
import { _ as vs, a as ys, b as bs, F as gs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-ChqG8Av1.js";
|
|
13
|
+
import { F as qe, u as ze, c as _s, P as hs } from "./feature-Ce7hky70.js";
|
|
14
|
+
import { u as Pe } from "./netsuite-CB9u725A.js";
|
|
16
15
|
import { useI18n as ge } from "@feedmepos/mf-common";
|
|
17
|
-
import { u as $t } from "./surcharge-
|
|
18
|
-
import { a as
|
|
16
|
+
import { u as $t } from "./surcharge-CDGjoxGm.js";
|
|
17
|
+
import { a as xs } from "./FmMultiselectDialog-CcMB_4yD.js";
|
|
19
18
|
import { F as ce, _ as It } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
|
|
20
|
-
import { u as
|
|
21
|
-
import { d as
|
|
22
|
-
import { u as
|
|
23
|
-
import { _ as
|
|
24
|
-
import { a as Dt } from "./format-unit-display-
|
|
25
|
-
import { u as
|
|
26
|
-
import { u as
|
|
27
|
-
import { s as
|
|
28
|
-
import { F as
|
|
29
|
-
import { d as
|
|
30
|
-
import { P as
|
|
19
|
+
import { u as Je } from "./supplier-BtZvsnMx.js";
|
|
20
|
+
import { d as Ge, e as ks, g as Cs, b as ws } from "./date2-BTP8kRm1.js";
|
|
21
|
+
import { u as Ss, _ as Fs } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CNf3PA0N.js";
|
|
22
|
+
import { _ as $s } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
23
|
+
import { a as Dt } from "./format-unit-display-DviFIF9R.js";
|
|
24
|
+
import { u as et } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-DVhI5Qy6.js";
|
|
25
|
+
import { u as Is } from "./vue-i18n-CgWPe8oO.js";
|
|
26
|
+
import { s as Ds, r as Ts } from "./xlsx.util-DoAD8sxa.js";
|
|
27
|
+
import { F as Ps } from "./FmDroppableField-J0xUsOTV.js";
|
|
28
|
+
import { d as Vs } from "./defineDeepModel-BaJIlpWC.js";
|
|
29
|
+
import { P as Rs, J as Os } from "./app-DiX-EfV6.js";
|
|
31
30
|
var te = /* @__PURE__ */ ((f) => (f.Code = "Code", f.Name = "Name", f.TemplateName = "TemplateName", f.Amount = "Amount", f.Cost = "Cost", f.TotalCost = "TotalCost", f.Delete = "Delete", f))(te || {});
|
|
32
|
-
const
|
|
31
|
+
const As = () => Y(
|
|
33
32
|
St,
|
|
34
33
|
{
|
|
35
34
|
zIndex: 50,
|
|
@@ -37,8 +36,8 @@ const Os = () => Y(
|
|
|
37
36
|
},
|
|
38
37
|
`Total (${Ct()})`
|
|
39
38
|
);
|
|
40
|
-
function
|
|
41
|
-
const { t: b } = ge(), { breakpoints: d } =
|
|
39
|
+
function Es(f) {
|
|
40
|
+
const { t: b } = ge(), { breakpoints: d } = We(), u = ze(), _ = Pe();
|
|
42
41
|
function n(i) {
|
|
43
42
|
const t = f.formController.getAllPurchaseOrderItems().find((s) => s.item.sku._id === i);
|
|
44
43
|
return (t == null ? void 0 : t.isCustomCost) ?? !1;
|
|
@@ -181,7 +180,7 @@ function As(f) {
|
|
|
181
180
|
const t = i.row.original, s = (C = f.forecastAmounts) == null ? void 0 : C.find((E) => E.skuId === t.sku._id), a = s ? s.helperState === "error" ? `Predicted: ${s.amount} (out of range)` : `Predicted: ${s.amount}` : void 0, r = (v = (c = ($ = f.template) == null ? void 0 : $.purchaseOrder) == null ? void 0 : c.items) == null ? void 0 : v.find(
|
|
182
181
|
(E) => E.sku._id === t.sku._id
|
|
183
182
|
);
|
|
184
|
-
return Y(
|
|
183
|
+
return Y(vs, {
|
|
185
184
|
style: {
|
|
186
185
|
flex: "1 1 0%"
|
|
187
186
|
},
|
|
@@ -206,15 +205,15 @@ function As(f) {
|
|
|
206
205
|
disableUnit: !!r,
|
|
207
206
|
disabled: f.disabled,
|
|
208
207
|
rules: [
|
|
209
|
-
|
|
208
|
+
ys(
|
|
210
209
|
+xe(
|
|
211
210
|
((T = t.quantity) == null ? void 0 : T.amount) === 0 ? { amount: 0, precision: 0 } : (r == null ? void 0 : r.minimumQuantity) ?? { amount: 0, precision: 0 }
|
|
212
211
|
)
|
|
213
212
|
),
|
|
214
|
-
|
|
213
|
+
bs(
|
|
215
214
|
r != null && r.maximumQuantity ? +xe(r == null ? void 0 : r.maximumQuantity) : 1 / 0
|
|
216
215
|
),
|
|
217
|
-
...r != null && r.quantityStep ? [
|
|
216
|
+
...r != null && r.quantityStep ? [gs(r.quantityStep)] : []
|
|
218
217
|
],
|
|
219
218
|
applyDefaultRules: !0
|
|
220
219
|
});
|
|
@@ -223,7 +222,7 @@ function As(f) {
|
|
|
223
222
|
},
|
|
224
223
|
{
|
|
225
224
|
id: "Cost",
|
|
226
|
-
header:
|
|
225
|
+
header: As,
|
|
227
226
|
size: 180,
|
|
228
227
|
cell(i) {
|
|
229
228
|
const t = i.row.original, s = g(t.sku), a = d.value.xs || d.value.sm;
|
|
@@ -241,7 +240,7 @@ function As(f) {
|
|
|
241
240
|
[
|
|
242
241
|
u.enablePurchaseOrderCostEdit ? Y(me.FmButton, {
|
|
243
242
|
prependIcon: "edit",
|
|
244
|
-
variant:
|
|
243
|
+
variant: ps.Tertiary,
|
|
245
244
|
disabled: f.disabled,
|
|
246
245
|
onClick() {
|
|
247
246
|
f.updateItem(
|
|
@@ -315,7 +314,7 @@ function As(f) {
|
|
|
315
314
|
!0
|
|
316
315
|
);
|
|
317
316
|
},
|
|
318
|
-
rules: [Ue(0),
|
|
317
|
+
rules: [Ue(0), rs(2)]
|
|
319
318
|
},
|
|
320
319
|
{
|
|
321
320
|
prepend() {
|
|
@@ -404,41 +403,41 @@ function As(f) {
|
|
|
404
403
|
totalCost: y
|
|
405
404
|
};
|
|
406
405
|
}
|
|
407
|
-
const
|
|
406
|
+
const Ms = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center" }, qs = { class: "fm-typo-en-body-lg-600 xs:fm-typo-en-body-md-600 mr-auto xs:w-full" }, Us = { class: "w-[450px] xs:w-full flex" }, Ns = { class: "fm-typo-en-body-md-400 whitespace-nowrap" }, Bs = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Tt = /* @__PURE__ */ le({
|
|
408
407
|
__name: "SupplierPriceHistory",
|
|
409
408
|
props: {
|
|
410
409
|
prices: {}
|
|
411
410
|
},
|
|
412
411
|
setup(f) {
|
|
413
|
-
const b =
|
|
412
|
+
const b = Je();
|
|
414
413
|
function d(u) {
|
|
415
414
|
return b.suppliers.find((_) => _._id === u);
|
|
416
415
|
}
|
|
417
|
-
return (u, _) => (x(), P("div",
|
|
416
|
+
return (u, _) => (x(), P("div", Ms, [
|
|
418
417
|
(x(!0), P(re, null, fe(Object.keys(u.prices), (n) => {
|
|
419
418
|
var g;
|
|
420
419
|
return x(), P("div", {
|
|
421
420
|
key: n,
|
|
422
421
|
class: "flex items-center gap-12 xs:gap-4 xs:flex-wrap w-full"
|
|
423
422
|
}, [
|
|
424
|
-
o("div",
|
|
425
|
-
o("div",
|
|
423
|
+
o("div", qs, I((g = d(n)) == null ? void 0 : g.name), 1),
|
|
424
|
+
o("div", Us, [
|
|
426
425
|
(x(!0), P(re, null, fe(u.prices[n].slice(0, 3), (h) => {
|
|
427
426
|
var F;
|
|
428
427
|
return x(), P("div", {
|
|
429
428
|
key: h.date,
|
|
430
429
|
class: "flex flex-col w-[150px] xs:flex-1 text-ellipsis cursor-pointer"
|
|
431
430
|
}, [
|
|
432
|
-
o("div",
|
|
431
|
+
o("div", Ns, [
|
|
433
432
|
o("span", null, I(h.totalCost ? e(we)(h.totalCost) : "No data"), 1),
|
|
434
433
|
_[0] || (_[0] = o("span", { class: "text-fm-color-typo-secondary" }, "/", -1)),
|
|
435
434
|
o("span", null, I(e(xe)(h.totalUnit, !1)), 1),
|
|
436
435
|
o("span", null, I(((F = h.measurement) == null ? void 0 : F.abbrev) ?? h.unit.abbrev), 1)
|
|
437
436
|
]),
|
|
438
|
-
o("div",
|
|
437
|
+
o("div", Bs, [
|
|
439
438
|
o("span", null, "(#" + I(h.seqNumber) + ")", 1),
|
|
440
439
|
_[1] || (_[1] = o("span", null, I(" "), -1)),
|
|
441
|
-
o("span", null, I(e(
|
|
440
|
+
o("span", null, I(e(Ge)(new Date(h.date))), 1)
|
|
442
441
|
])
|
|
443
442
|
]);
|
|
444
443
|
}), 128))
|
|
@@ -447,10 +446,10 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
447
446
|
}), 128))
|
|
448
447
|
]));
|
|
449
448
|
}
|
|
450
|
-
}),
|
|
449
|
+
}), zs = { class: "flex flex-col gap-8 py-16" }, Ls = { class: "flex items-center" }, js = { class: "flex-1 flex gap-1 items-center" }, Hs = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Qs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ys = { class: "flex gap-8 w-full" }, Ks = { class: "flex-1 flex flex-col gap-4" }, Xs = { class: "flex-1 flex flex-col gap-4" }, Zs = { class: "flex gap-8 w-full" }, Ws = { class: "flex-1 flex flex-col gap-4" }, Js = {
|
|
451
450
|
key: 0,
|
|
452
451
|
class: "flex-1 flex flex-col gap-4"
|
|
453
|
-
},
|
|
452
|
+
}, Gs = /* @__PURE__ */ le({
|
|
454
453
|
__name: "TransferItem",
|
|
455
454
|
props: {
|
|
456
455
|
cellByColId: {},
|
|
@@ -463,11 +462,11 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
463
462
|
return (d, u) => {
|
|
464
463
|
var g, h, F, k, y, i, t, s, a, r, C, $, c, v, T, E, Z, z, X, N, B, V, D, M, L, J, oe;
|
|
465
464
|
const _ = O("FmLabel"), n = O("FmSpacer");
|
|
466
|
-
return x(), P("div",
|
|
467
|
-
o("div",
|
|
468
|
-
o("div",
|
|
469
|
-
o("span",
|
|
470
|
-
o("span",
|
|
465
|
+
return x(), P("div", zs, [
|
|
466
|
+
o("div", Ls, [
|
|
467
|
+
o("div", js, [
|
|
468
|
+
o("span", Hs, " (" + I(d.row.original.sku.code) + ") ", 1),
|
|
469
|
+
o("span", Qs, I(d.row.original.sku.name), 1)
|
|
471
470
|
]),
|
|
472
471
|
o("div", null, [
|
|
473
472
|
m(e(ce), {
|
|
@@ -476,8 +475,8 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
476
475
|
}, null, 8, ["render", "props"])
|
|
477
476
|
])
|
|
478
477
|
]),
|
|
479
|
-
o("div",
|
|
480
|
-
o("div",
|
|
478
|
+
o("div", Ys, [
|
|
479
|
+
o("div", Ks, [
|
|
481
480
|
m(_, {
|
|
482
481
|
label: e(b)(`inventory.transfer.form.items.table.${e(te).Code}`)
|
|
483
482
|
}, null, 8, ["label"]),
|
|
@@ -487,7 +486,7 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
487
486
|
}, null, 8, ["render", "props"]),
|
|
488
487
|
u[0] || (u[0] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
489
488
|
]),
|
|
490
|
-
o("div",
|
|
489
|
+
o("div", Xs, [
|
|
491
490
|
m(_, {
|
|
492
491
|
label: e(b)(`inventory.transfer.form.items.table.${e(te).Name}`)
|
|
493
492
|
}, null, 8, ["label"]),
|
|
@@ -498,8 +497,8 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
498
497
|
u[1] || (u[1] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
499
498
|
])
|
|
500
499
|
]),
|
|
501
|
-
o("div",
|
|
502
|
-
o("div",
|
|
500
|
+
o("div", Zs, [
|
|
501
|
+
o("div", Ws, [
|
|
503
502
|
m(_, {
|
|
504
503
|
label: e(b)(`inventory.transfer.form.items.table.${e(te).Amount}`)
|
|
505
504
|
}, null, 8, ["label"]),
|
|
@@ -509,7 +508,7 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
509
508
|
}, null, 8, ["render", "props"]),
|
|
510
509
|
u[2] || (u[2] = o("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
511
510
|
]),
|
|
512
|
-
d.cellByColId[e(te).Cost] ? (x(), P("div",
|
|
511
|
+
d.cellByColId[e(te).Cost] ? (x(), P("div", Js, [
|
|
513
512
|
m(St, { "z-index": 50 }, {
|
|
514
513
|
default: A(() => [
|
|
515
514
|
m(_, {
|
|
@@ -535,7 +534,7 @@ const Es = { class: "flex flex-col gap-8 px-16 xs:px-4 sm:px-4 py-4 items-center
|
|
|
535
534
|
};
|
|
536
535
|
}
|
|
537
536
|
});
|
|
538
|
-
function
|
|
537
|
+
function eo(f) {
|
|
539
538
|
const b = q({
|
|
540
539
|
get() {
|
|
541
540
|
const n = f.getEffectiveAt();
|
|
@@ -553,14 +552,14 @@ function Gs(f) {
|
|
|
553
552
|
}
|
|
554
553
|
}), u = q({
|
|
555
554
|
get() {
|
|
556
|
-
return b.value === null ? "" :
|
|
555
|
+
return b.value === null ? "" : Ge(b.value);
|
|
557
556
|
},
|
|
558
557
|
set(n) {
|
|
559
558
|
n ? b.value = /* @__PURE__ */ new Date(`${n} ${_.value}`) : b.value = null;
|
|
560
559
|
}
|
|
561
560
|
}), _ = q({
|
|
562
561
|
get() {
|
|
563
|
-
return b.value === null ? "" :
|
|
562
|
+
return b.value === null ? "" : ks(b.value);
|
|
564
563
|
},
|
|
565
564
|
set(n) {
|
|
566
565
|
n ? b.value = /* @__PURE__ */ new Date(`${u.value} ${n}`) : b.value = null;
|
|
@@ -573,13 +572,13 @@ function Gs(f) {
|
|
|
573
572
|
backdateTimeModel: _
|
|
574
573
|
};
|
|
575
574
|
}
|
|
576
|
-
const
|
|
575
|
+
const to = {
|
|
577
576
|
width: "24",
|
|
578
577
|
height: "24",
|
|
579
578
|
viewBox: "0 0 24 24",
|
|
580
579
|
fill: "none",
|
|
581
580
|
xmlns: "http://www.w3.org/2000/svg"
|
|
582
|
-
},
|
|
581
|
+
}, so = ["fill"], oo = ["fill"], ao = ["stroke"], ro = ["stroke"], no = /* @__PURE__ */ le({
|
|
583
582
|
__name: "SparkIcon",
|
|
584
583
|
props: {
|
|
585
584
|
size: {
|
|
@@ -592,32 +591,32 @@ const eo = {
|
|
|
592
591
|
}
|
|
593
592
|
},
|
|
594
593
|
setup(f) {
|
|
595
|
-
return (b, d) => (x(), P("svg",
|
|
594
|
+
return (b, d) => (x(), P("svg", to, [
|
|
596
595
|
o("path", {
|
|
597
596
|
d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
|
|
598
597
|
fill: f.color
|
|
599
|
-
}, null, 8,
|
|
598
|
+
}, null, 8, so),
|
|
600
599
|
o("path", {
|
|
601
600
|
d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
|
|
602
601
|
fill: f.color
|
|
603
|
-
}, null, 8,
|
|
602
|
+
}, null, 8, oo),
|
|
604
603
|
o("path", {
|
|
605
604
|
d: "M7.6 7.6C8.17076 6.94229 8.5 5.5 8.5 5.5C8.5 5.5 8.81356 6.87361 9.35714 7.5C9.92948 8.15953 11.5 8.5 11.5 8.5C11.5 8.5 9.92948 8.69761 9.35714 9.35714C8.81356 9.98354 8.5 11.5 8.5 11.5C8.5 11.5 8.32076 10.1888 7.75 9.59091C7.14905 8.96136 5.5 8.5 5.5 8.5C5.5 8.5 6.99905 8.29251 7.6 7.6Z",
|
|
606
605
|
stroke: f.color,
|
|
607
606
|
"stroke-width": "1.5",
|
|
608
607
|
"stroke-linecap": "round",
|
|
609
608
|
"stroke-linejoin": "round"
|
|
610
|
-
}, null, 8,
|
|
609
|
+
}, null, 8, ao),
|
|
611
610
|
o("path", {
|
|
612
611
|
d: "M12.2 12.2C13.3415 10.8846 14 8 14 8C14 8 14.6271 10.7472 15.7143 12C16.859 13.3191 20 14 20 14C20 14 16.859 14.3952 15.7143 15.7143C14.6271 16.9671 14 20 14 20C14 20 13.6415 17.3777 12.5 16.1818C11.2981 14.9227 8 14 8 14C8 14 10.9981 13.585 12.2 12.2Z",
|
|
613
612
|
stroke: f.color,
|
|
614
613
|
"stroke-width": "1.5",
|
|
615
614
|
"stroke-linecap": "round",
|
|
616
615
|
"stroke-linejoin": "round"
|
|
617
|
-
}, null, 8,
|
|
616
|
+
}, null, 8, ro)
|
|
618
617
|
]));
|
|
619
618
|
}
|
|
620
|
-
}),
|
|
619
|
+
}), lo = { class: "flex gap-8 items-center" }, io = { class: "fm-typo-en-body-lg-600 line-clamp-1" }, uo = { class: "w-[343px] px-24 py-16 rounded-lg shadow-light-300 flex flex-col gap-[20px]" }, co = { class: "flex items-center w-full" }, mo = { class: "flex-1" }, po = { class: "fm-typo-en-title-sm-800" }, fo = { class: "flex items-start gap-8" }, vo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, yo = { class: "flex gap-1" }, bo = /* @__PURE__ */ le({
|
|
621
620
|
__name: "ForecastStock",
|
|
622
621
|
props: {
|
|
623
622
|
templateId: {},
|
|
@@ -627,7 +626,7 @@ const eo = {
|
|
|
627
626
|
},
|
|
628
627
|
emits: ["update:poItems", "update:forecastAmounts", "update:predictionId"],
|
|
629
628
|
setup(f, { emit: b }) {
|
|
630
|
-
const d = f, u = b, _ = U(!1), n = U(7), g =
|
|
629
|
+
const d = f, u = b, _ = U(!1), n = U(7), g = ls(), h = Se(), { t: F } = ge();
|
|
631
630
|
function k(s, a, r) {
|
|
632
631
|
return a != null && s < a && (s = a), r != null && s > r && (s = r), s;
|
|
633
632
|
}
|
|
@@ -666,7 +665,7 @@ const eo = {
|
|
|
666
665
|
}
|
|
667
666
|
}
|
|
668
667
|
async function t() {
|
|
669
|
-
const s =
|
|
668
|
+
const s = yt(0)(n.value);
|
|
670
669
|
if (typeof s == "string") {
|
|
671
670
|
h.open({
|
|
672
671
|
message: s,
|
|
@@ -732,24 +731,24 @@ const eo = {
|
|
|
732
731
|
disabled: s.disabled
|
|
733
732
|
}, {
|
|
734
733
|
default: A(() => [
|
|
735
|
-
o("div",
|
|
736
|
-
m(
|
|
734
|
+
o("div", lo, [
|
|
735
|
+
m(no, {
|
|
737
736
|
size: 24,
|
|
738
737
|
color: s.disabled ? "#c7c7cc" : "#ff7823"
|
|
739
738
|
}, null, 8, ["color"]),
|
|
740
|
-
o("div",
|
|
739
|
+
o("div", io, I(e(F)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
741
740
|
])
|
|
742
741
|
]),
|
|
743
742
|
_: 1
|
|
744
743
|
}, 8, ["text-color", "border-color", "disabled"])
|
|
745
744
|
]),
|
|
746
745
|
default: A(() => [
|
|
747
|
-
o("div",
|
|
748
|
-
o("div",
|
|
749
|
-
o("div",
|
|
750
|
-
m(
|
|
746
|
+
o("div", uo, [
|
|
747
|
+
o("div", co, [
|
|
748
|
+
o("div", mo, [
|
|
749
|
+
m($s, { "z-index": 99 }, {
|
|
751
750
|
default: A(() => [
|
|
752
|
-
o("p",
|
|
751
|
+
o("p", po, I(e(F)("inventory.transfer.form.items.forecastStock.title")), 1)
|
|
753
752
|
]),
|
|
754
753
|
_: 1
|
|
755
754
|
})
|
|
@@ -765,21 +764,21 @@ const eo = {
|
|
|
765
764
|
modelValue: n.value,
|
|
766
765
|
"onUpdate:modelValue": a[1] || (a[1] = (v) => n.value = v),
|
|
767
766
|
label: e(F)("inventory.transfer.form.items.forecastStock.days"),
|
|
768
|
-
rules: [e(
|
|
767
|
+
rules: [e(yt)(0)]
|
|
769
768
|
}, {
|
|
770
769
|
"helper-text": A(() => [
|
|
771
|
-
o("div",
|
|
770
|
+
o("div", fo, [
|
|
772
771
|
m(C, {
|
|
773
772
|
name: "warning",
|
|
774
773
|
size: "sm",
|
|
775
774
|
class: "text-fm-color-system-warning-300"
|
|
776
775
|
}),
|
|
777
|
-
o("div",
|
|
776
|
+
o("div", vo, I(e(F)("inventory.transfer.form.items.forecastStock.replace")), 1)
|
|
778
777
|
])
|
|
779
778
|
]),
|
|
780
779
|
_: 1
|
|
781
780
|
}, 8, ["modelValue", "label", "rules"]),
|
|
782
|
-
o("div",
|
|
781
|
+
o("div", yo, [
|
|
783
782
|
a[4] || (a[4] = o("div", { class: "grow" }, null, -1)),
|
|
784
783
|
m(r, {
|
|
785
784
|
label: e(F)("common.cancel"),
|
|
@@ -798,8 +797,8 @@ const eo = {
|
|
|
798
797
|
};
|
|
799
798
|
}
|
|
800
799
|
});
|
|
801
|
-
function
|
|
802
|
-
const f = Se(), b =
|
|
800
|
+
function go() {
|
|
801
|
+
const f = Se(), b = et(), d = U(!1);
|
|
803
802
|
be(d, (g) => {
|
|
804
803
|
g && (_.value = !0, u().finally(() => {
|
|
805
804
|
_.value = !1;
|
|
@@ -807,7 +806,7 @@ function bo() {
|
|
|
807
806
|
});
|
|
808
807
|
async function u() {
|
|
809
808
|
try {
|
|
810
|
-
const { startDate: g, endDate: h } =
|
|
809
|
+
const { startDate: g, endDate: h } = Cs(6), y = (await b.getPurchaseOrders({ start: g, end: h })).filter(
|
|
811
810
|
(i) => {
|
|
812
811
|
var t, s;
|
|
813
812
|
return i.status === Qt.enum.COMPLETE && ((t = i.supplier) == null ? void 0 : t.internal) !== "warehouse" && ((s = i.supplier) == null ? void 0 : s.internal) !== "restaurant";
|
|
@@ -843,7 +842,7 @@ function bo() {
|
|
|
843
842
|
comparePriceBySku: n
|
|
844
843
|
};
|
|
845
844
|
}
|
|
846
|
-
const
|
|
845
|
+
const _o = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, ho = { key: 0 }, xo = ["colspan"], ko = /* @__PURE__ */ le({
|
|
847
846
|
__name: "TransferItemTable",
|
|
848
847
|
props: {
|
|
849
848
|
templateItem: {},
|
|
@@ -876,7 +875,7 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
876
875
|
textAlign: ((y = b(g)) == null ? void 0 : y.textAlign) ?? "left"
|
|
877
876
|
})
|
|
878
877
|
}, [
|
|
879
|
-
o("span",
|
|
878
|
+
o("span", _o, [
|
|
880
879
|
m(e(ce), {
|
|
881
880
|
render: g.column.columnDef.cell,
|
|
882
881
|
props: g.getContext()
|
|
@@ -885,25 +884,25 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
885
884
|
], 6);
|
|
886
885
|
}), 128))
|
|
887
886
|
], 2),
|
|
888
|
-
d.showComparePrice && Object.keys(d.comparePriceBySku[(_ = d.row.original.sku) == null ? void 0 : _._id] ?? {}).length > 0 ? (x(), P("tr",
|
|
887
|
+
d.showComparePrice && Object.keys(d.comparePriceBySku[(_ = d.row.original.sku) == null ? void 0 : _._id] ?? {}).length > 0 ? (x(), P("tr", ho, [
|
|
889
888
|
o("td", {
|
|
890
889
|
colspan: d.row.getVisibleCells().length
|
|
891
890
|
}, [
|
|
892
891
|
m(Tt, {
|
|
893
892
|
prices: d.comparePriceBySku[(n = d.row.original.sku) == null ? void 0 : n._id]
|
|
894
893
|
}, null, 8, ["prices"])
|
|
895
|
-
], 8,
|
|
894
|
+
], 8, xo)
|
|
896
895
|
])) : K("", !0)
|
|
897
896
|
], 64);
|
|
898
897
|
};
|
|
899
898
|
}
|
|
900
|
-
}),
|
|
899
|
+
}), Co = {
|
|
901
900
|
key: 0,
|
|
902
901
|
class: "flex flex-col gap-8"
|
|
903
|
-
},
|
|
902
|
+
}, wo = { class: "flex flex-col gap-4" }, So = { class: "flex items-center gap-4" }, Fo = {
|
|
904
903
|
key: 0,
|
|
905
904
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-error"
|
|
906
|
-
},
|
|
905
|
+
}, $o = /* @__PURE__ */ le({
|
|
907
906
|
__name: "NetSuiteField",
|
|
908
907
|
props: {
|
|
909
908
|
required: { type: Boolean },
|
|
@@ -916,7 +915,7 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
916
915
|
},
|
|
917
916
|
emits: ["netsuite:ready"],
|
|
918
917
|
setup(f, { emit: b }) {
|
|
919
|
-
const d = Pe(), u = f, _ = b, { t: n } =
|
|
918
|
+
const d = Pe(), u = f, _ = b, { t: n } = Is(), g = U(!1), h = U();
|
|
920
919
|
function F() {
|
|
921
920
|
var s, a, r, C;
|
|
922
921
|
if (!u.supplier) return;
|
|
@@ -932,7 +931,7 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
932
931
|
u.subsidiaryOptional && F();
|
|
933
932
|
},
|
|
934
933
|
{ deep: !0 }
|
|
935
|
-
),
|
|
934
|
+
), Ze(() => {
|
|
936
935
|
let i = {
|
|
937
936
|
id: "",
|
|
938
937
|
subsidiary: { id: "", name: "" },
|
|
@@ -986,11 +985,11 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
986
985
|
});
|
|
987
986
|
return (i, t) => {
|
|
988
987
|
const s = O("FmLabel"), a = O("FmIcon"), r = O("FmField"), C = O("FmTooltip");
|
|
989
|
-
return e(d).isEnabled && u.required ? (x(), P("div",
|
|
988
|
+
return e(d).isEnabled && u.required ? (x(), P("div", Co, [
|
|
990
989
|
m(s, {
|
|
991
990
|
label: `NetSuite ${e(n)("inventory.transfer.form.netsuite.subsidiary")}`
|
|
992
991
|
}, null, 8, ["label"]),
|
|
993
|
-
o("div",
|
|
992
|
+
o("div", wo, [
|
|
994
993
|
m(C, {
|
|
995
994
|
"z-index": 51,
|
|
996
995
|
placement: "left",
|
|
@@ -1004,7 +1003,7 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
1004
1003
|
default: A(() => {
|
|
1005
1004
|
var $;
|
|
1006
1005
|
return [
|
|
1007
|
-
o("div",
|
|
1006
|
+
o("div", So, [
|
|
1008
1007
|
m(a, {
|
|
1009
1008
|
name: "lock_outline",
|
|
1010
1009
|
size: "sm",
|
|
@@ -1021,7 +1020,7 @@ const go = { class: "fm-typo-body-md-400 line-clamp-2 w-full" }, _o = { key: 0 }
|
|
|
1021
1020
|
]),
|
|
1022
1021
|
_: 1
|
|
1023
1022
|
}, 8, ["disabled"]),
|
|
1024
|
-
g.value ? (x(), P("div",
|
|
1023
|
+
g.value ? (x(), P("div", Fo, I(y.value), 1)) : K("", !0)
|
|
1025
1024
|
])
|
|
1026
1025
|
])) : K("", !0);
|
|
1027
1026
|
};
|
|
@@ -1064,23 +1063,23 @@ function _t(f, b, d, u, _) {
|
|
|
1064
1063
|
surcharges: y
|
|
1065
1064
|
};
|
|
1066
1065
|
}
|
|
1067
|
-
function
|
|
1068
|
-
const f =
|
|
1066
|
+
function Io() {
|
|
1067
|
+
const f = Je(), b = Ne(), d = Be(), u = Pe(), _ = $t(), n = _t(
|
|
1069
1068
|
f,
|
|
1070
1069
|
b,
|
|
1071
1070
|
d,
|
|
1072
1071
|
u,
|
|
1073
1072
|
_
|
|
1074
|
-
), g =
|
|
1073
|
+
), g = pt(_s({ env: n }));
|
|
1075
1074
|
g.value.setUsePartialUpdates(!0);
|
|
1076
|
-
const h =
|
|
1075
|
+
const h = pt(g.value.state()), F = (t) => {
|
|
1077
1076
|
h.value = t;
|
|
1078
1077
|
};
|
|
1079
1078
|
g.value.addListener(F);
|
|
1080
1079
|
const k = (t, s, a) => {
|
|
1081
1080
|
switch (t) {
|
|
1082
1081
|
case Ke.set:
|
|
1083
|
-
|
|
1082
|
+
ft(h.value, s, a);
|
|
1084
1083
|
break;
|
|
1085
1084
|
case Ke.add:
|
|
1086
1085
|
Xt(h.value, s, a);
|
|
@@ -1089,7 +1088,7 @@ function $o() {
|
|
|
1089
1088
|
Kt(h.value, s);
|
|
1090
1089
|
break;
|
|
1091
1090
|
default:
|
|
1092
|
-
console.warn(`Unknown partial update operation: ${t}, falling back to 'set'`),
|
|
1091
|
+
console.warn(`Unknown partial update operation: ${t}, falling back to 'set'`), ft(h.value, s, a);
|
|
1093
1092
|
}
|
|
1094
1093
|
s !== "remark" && s !== "ref" && Nt(h);
|
|
1095
1094
|
};
|
|
@@ -1138,22 +1137,22 @@ function $o() {
|
|
|
1138
1137
|
init: i
|
|
1139
1138
|
};
|
|
1140
1139
|
}
|
|
1141
|
-
const
|
|
1140
|
+
const Do = { class: "flex flex-col gap-4" }, To = { class: "flex items-center gap-8 overflow-x-auto pb-12" }, Po = { class: "flex flex-col gap-16" }, Vo = { class: "flex flex-col gap-24" }, Ro = { class: "flex flex-col gap-8" }, Oo = { class: "flex flex-col gap-4" }, Ao = { class: "flex items-center gap-4" }, Eo = { class: "flex flex-col gap-8" }, Mo = { class: "flex flex-col gap-4" }, qo = { class: "flex items-center gap-4" }, Uo = {
|
|
1142
1141
|
key: 3,
|
|
1143
1142
|
class: "p-16 border border-fm-color-neutral-gray-300 fm-corner-radius-md flex flex-col"
|
|
1144
|
-
},
|
|
1143
|
+
}, No = {
|
|
1145
1144
|
key: 0,
|
|
1146
1145
|
class: "flex-1 flex gap-8 h-48 xs:flex-col xs:pt-16 sm:flex-col sm:pt-16"
|
|
1147
|
-
},
|
|
1146
|
+
}, Bo = { class: "flex-1" }, zo = { class: "flex-1" }, Lo = {
|
|
1148
1147
|
key: 1,
|
|
1149
1148
|
class: "flex items-center gap-4"
|
|
1150
|
-
},
|
|
1149
|
+
}, jo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary translate-y-[1px]" }, Ho = { class: "flex flex-col gap-16" }, Qo = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, Yo = { class: "flex gap-8" }, Ko = { key: 0 }, Xo = {
|
|
1151
1150
|
key: 0,
|
|
1152
1151
|
class: "flex justify-end p-16 border-t border-fm-color-neutral-gray-300"
|
|
1153
|
-
},
|
|
1152
|
+
}, Zo = { class: "flex items-center gap-16" }, Wo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-secondary" }, Jo = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Go = {
|
|
1154
1153
|
key: 1,
|
|
1155
1154
|
class: "flex flex-col gap-16"
|
|
1156
|
-
},
|
|
1155
|
+
}, ea = { class: "flex items-center gap-8" }, ta = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, sa = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mb-8" }, oa = { class: "flex flex-col gap-8 border border-fm-color-neutral-gray-300 fm-corner-radius-md overflow-hidden" }, aa = { class: "flex flex-col gap-4 flex-1" }, ra = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, na = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, la = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary whitespace-nowrap ml-16" }, ia = /* @__PURE__ */ le({
|
|
1157
1156
|
__name: "TransferFormWithController",
|
|
1158
1157
|
props: {
|
|
1159
1158
|
modelValue: {},
|
|
@@ -1165,7 +1164,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1165
1164
|
},
|
|
1166
1165
|
emits: ["validation-success", "form:ready"],
|
|
1167
1166
|
setup(f, { expose: b, emit: d }) {
|
|
1168
|
-
const u = f, _ = d, { t: n } = ge(), g = Ne(), h = Be(), F = $t(), k = ze(), y = Dt(), { breakpoints: i } =
|
|
1167
|
+
const u = f, _ = d, { t: n } = ge(), g = Ne(), h = Be(), F = $t(), k = ze(), y = Dt(), { breakpoints: i } = We(), t = q(() => i.value.xs || i.value.sm), s = Io();
|
|
1169
1168
|
s.init(u.modelValue);
|
|
1170
1169
|
const { controller: a, state: r } = s, C = Bt({
|
|
1171
1170
|
value: !1
|
|
@@ -1183,14 +1182,14 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1183
1182
|
return ((l = r.value.items) == null ? void 0 : l.map((p) => p.item)) || [];
|
|
1184
1183
|
}
|
|
1185
1184
|
);
|
|
1186
|
-
|
|
1185
|
+
Ze(async () => {
|
|
1187
1186
|
await F.browse(), $.value = !0;
|
|
1188
1187
|
}), be([$, C], ([l, p], [j, H]) => {
|
|
1189
1188
|
p.value && H.value && _("form:ready");
|
|
1190
1189
|
});
|
|
1191
1190
|
const X = q(
|
|
1192
1191
|
() => g.currentLocation.type === Zt.restaurant
|
|
1193
|
-
), N =
|
|
1192
|
+
), N = fs(), B = Ss(
|
|
1194
1193
|
() => r.value,
|
|
1195
1194
|
(l) => {
|
|
1196
1195
|
a.value.selectSupplier(l.supplier._id);
|
|
@@ -1233,14 +1232,14 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1233
1232
|
set(l) {
|
|
1234
1233
|
a.value.addReference(l ?? "");
|
|
1235
1234
|
}
|
|
1236
|
-
}), { backdatePo: oe, backdateSwitch: w, backdateModel: S, backdateTimeModel: Q } =
|
|
1235
|
+
}), { backdatePo: oe, backdateSwitch: w, backdateModel: S, backdateTimeModel: Q } = eo({
|
|
1237
1236
|
getEffectiveAt() {
|
|
1238
1237
|
return r.value.effectiveAt;
|
|
1239
1238
|
},
|
|
1240
1239
|
setEffectiveAt(l) {
|
|
1241
1240
|
a.value.setEffectiveAt(l);
|
|
1242
1241
|
}
|
|
1243
|
-
}), { comparePricesToggle: ne, comparePriceFetching: ie, comparePriceBySku: ee } =
|
|
1242
|
+
}), { comparePricesToggle: ne, comparePriceFetching: ie, comparePriceBySku: ee } = go(), _e = U();
|
|
1244
1243
|
b({
|
|
1245
1244
|
validateInputs: () => {
|
|
1246
1245
|
var l, p;
|
|
@@ -1271,7 +1270,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1271
1270
|
deleteItem: (l) => {
|
|
1272
1271
|
a.value.removeSku(l.sku);
|
|
1273
1272
|
}
|
|
1274
|
-
})), Ve =
|
|
1273
|
+
})), Ve = Es({
|
|
1275
1274
|
formController: a.value,
|
|
1276
1275
|
updateItem: (l, p) => ve.value.updateItem(l, p),
|
|
1277
1276
|
deleteItem: (l) => ve.value.deleteItem(l),
|
|
@@ -1306,7 +1305,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1306
1305
|
N.open({
|
|
1307
1306
|
title: n("inventory.transfer.form.items.selectItem"),
|
|
1308
1307
|
closeButton: !0,
|
|
1309
|
-
contentComponent:
|
|
1308
|
+
contentComponent: xs,
|
|
1310
1309
|
contentComponentProps: {
|
|
1311
1310
|
modelValue: p,
|
|
1312
1311
|
items: l,
|
|
@@ -1381,14 +1380,14 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1381
1380
|
return p.length > 0 ? p.join(" and ") : "Always applied";
|
|
1382
1381
|
}
|
|
1383
1382
|
return (l, p) => {
|
|
1384
|
-
var
|
|
1385
|
-
const j = O("FmChip"), H = O("FmLabel"), ae = O("FmIcon"), ue = O("FmField"), Ee = O("FmTooltip"),
|
|
1386
|
-
return x(), P("div",
|
|
1387
|
-
o("div",
|
|
1388
|
-
(
|
|
1383
|
+
var ot, at;
|
|
1384
|
+
const j = O("FmChip"), H = O("FmLabel"), ae = O("FmIcon"), ue = O("FmField"), Ee = O("FmTooltip"), tt = O("FmSelect"), Pt = O("FmTextField"), Vt = O("FmTextarea"), st = O("FmSwitch"), Rt = O("FmDatePicker"), Ot = O("FmTimePicker"), je = O("FmFormGroup"), At = O("FmButton"), Et = O("FmTable"), Mt = O("FmForm");
|
|
1385
|
+
return x(), P("div", Do, [
|
|
1386
|
+
o("div", To, [
|
|
1387
|
+
(ot = u.modelValue) != null && ot.template ? (x(), se(j, {
|
|
1389
1388
|
key: 0,
|
|
1390
1389
|
variant: l.disabled ? "warning" : void 0,
|
|
1391
|
-
label: `${e(n)("inventory.transfer.template.title")}: ${((
|
|
1390
|
+
label: `${e(n)("inventory.transfer.template.title")}: ${((at = E.value) == null ? void 0 : at.name) ?? e(n)("inventory.transfer.form.loading")}`,
|
|
1392
1391
|
icon: "summarize",
|
|
1393
1392
|
compact: ""
|
|
1394
1393
|
}, null, 8, ["variant", "label"])) : K("", !0),
|
|
@@ -1399,7 +1398,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1399
1398
|
}, null, 8, ["label"]),
|
|
1400
1399
|
l.lastClosingDate ? (x(), se(j, {
|
|
1401
1400
|
key: 1,
|
|
1402
|
-
label: `${e(n)("inventory.transfer.form.lastClosing")}: ${e(
|
|
1401
|
+
label: `${e(n)("inventory.transfer.form.lastClosing")}: ${e(Ge)(l.lastClosingDate)} ${e(ws)(l.lastClosingDate)}`,
|
|
1403
1402
|
icon: "calendar_month",
|
|
1404
1403
|
compact: ""
|
|
1405
1404
|
}, null, 8, ["label"])) : K("", !0)
|
|
@@ -1413,16 +1412,16 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1413
1412
|
onValidationSuccess: p[15] || (p[15] = (He) => _("validation-success"))
|
|
1414
1413
|
}, {
|
|
1415
1414
|
default: A(() => {
|
|
1416
|
-
var He, nt, lt, it, ut, dt
|
|
1415
|
+
var He, rt, nt, lt, it, ut, dt;
|
|
1417
1416
|
return [
|
|
1418
|
-
o("div",
|
|
1419
|
-
o("div",
|
|
1417
|
+
o("div", Po, [
|
|
1418
|
+
o("div", Vo, [
|
|
1420
1419
|
(He = u.modelValue) != null && He.template ? (x(), P(re, { key: 0 }, [
|
|
1421
|
-
o("div",
|
|
1420
|
+
o("div", Ro, [
|
|
1422
1421
|
m(H, {
|
|
1423
1422
|
label: e(n)("inventory.transfer.form.type.title")
|
|
1424
1423
|
}, null, 8, ["label"]),
|
|
1425
|
-
o("div",
|
|
1424
|
+
o("div", Oo, [
|
|
1426
1425
|
m(Ee, {
|
|
1427
1426
|
"z-index": 51,
|
|
1428
1427
|
placement: "left",
|
|
@@ -1434,7 +1433,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1434
1433
|
default: A(() => [
|
|
1435
1434
|
m(ue, null, {
|
|
1436
1435
|
default: A(() => [
|
|
1437
|
-
o("div",
|
|
1436
|
+
o("div", Ao, [
|
|
1438
1437
|
m(ae, {
|
|
1439
1438
|
name: "lock_outline",
|
|
1440
1439
|
size: "sm",
|
|
@@ -1458,11 +1457,11 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1458
1457
|
}, null, 2)
|
|
1459
1458
|
])
|
|
1460
1459
|
]),
|
|
1461
|
-
o("div",
|
|
1460
|
+
o("div", Eo, [
|
|
1462
1461
|
m(H, {
|
|
1463
1462
|
label: V.value === e(de).enum.purchase ? e(n)("inventory.transfer.form.purchaseFrom") : e(n)("inventory.transfer.form.transferFrom")
|
|
1464
1463
|
}, null, 8, ["label"]),
|
|
1465
|
-
o("div",
|
|
1464
|
+
o("div", Mo, [
|
|
1466
1465
|
m(Ee, {
|
|
1467
1466
|
"z-index": 51,
|
|
1468
1467
|
placement: "left",
|
|
@@ -1476,7 +1475,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1476
1475
|
default: A(() => {
|
|
1477
1476
|
var R;
|
|
1478
1477
|
return [
|
|
1479
|
-
o("div",
|
|
1478
|
+
o("div", qo, [
|
|
1480
1479
|
m(ae, {
|
|
1481
1480
|
name: "lock_outline",
|
|
1482
1481
|
size: "sm",
|
|
@@ -1496,7 +1495,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1496
1495
|
])
|
|
1497
1496
|
])
|
|
1498
1497
|
], 64)) : (x(), P(re, { key: 1 }, [
|
|
1499
|
-
m(
|
|
1498
|
+
m(tt, {
|
|
1500
1499
|
label: e(n)("inventory.transfer.form.type.title"),
|
|
1501
1500
|
"label-mark": "required",
|
|
1502
1501
|
modelValue: V.value,
|
|
@@ -1514,7 +1513,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1514
1513
|
]),
|
|
1515
1514
|
_: 1
|
|
1516
1515
|
}, 8, ["label", "modelValue", "items", "rules"]),
|
|
1517
|
-
m(
|
|
1516
|
+
m(tt, {
|
|
1518
1517
|
label: V.value === e(de).enum.purchase ? e(n)("inventory.transfer.form.purchaseFrom") : e(n)("inventory.transfer.form.transferFrom"),
|
|
1519
1518
|
"label-mark": "required",
|
|
1520
1519
|
modelValue: M.value,
|
|
@@ -1525,7 +1524,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1525
1524
|
"menu-wrapper": A((R) => {
|
|
1526
1525
|
var G, Ie;
|
|
1527
1526
|
return [
|
|
1528
|
-
m(
|
|
1527
|
+
m(Fs, Xe(R, {
|
|
1529
1528
|
items: D.value,
|
|
1530
1529
|
"model-value": (Ie = (G = l.modelValue) == null ? void 0 : G.supplier) == null ? void 0 : Ie._id
|
|
1531
1530
|
}), null, 16, ["items", "model-value"])
|
|
@@ -1559,7 +1558,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1559
1558
|
"onUpdate:modelValue": p[3] || (p[3] = (R) => L.value = R),
|
|
1560
1559
|
class: W([l.disabled ? "text-fm-color-typo-disabled " : ""])
|
|
1561
1560
|
}, null, 8, ["label", "modelValue", "class"]),
|
|
1562
|
-
$.value ? (x(), se(
|
|
1561
|
+
$.value ? (x(), se($o, {
|
|
1563
1562
|
key: 2,
|
|
1564
1563
|
required: e(r).template != null || e(r).netSuite != null,
|
|
1565
1564
|
subsidiaryOptional: e(r).template == null,
|
|
@@ -1574,7 +1573,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1574
1573
|
C.value = !0;
|
|
1575
1574
|
})
|
|
1576
1575
|
}, null, 8, ["required", "subsidiaryOptional", "disabled", "supplier", "setting", "items", "onChange"])) : K("", !0),
|
|
1577
|
-
e(k).enableBackdatePo ? (x(), P("div",
|
|
1576
|
+
e(k).enableBackdatePo ? (x(), P("div", Uo, [
|
|
1578
1577
|
o("div", {
|
|
1579
1578
|
class: W([
|
|
1580
1579
|
"flex",
|
|
@@ -1583,7 +1582,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1583
1582
|
}
|
|
1584
1583
|
])
|
|
1585
1584
|
}, [
|
|
1586
|
-
m(
|
|
1585
|
+
m(st, {
|
|
1587
1586
|
modelValue: e(w),
|
|
1588
1587
|
"onUpdate:modelValue": p[5] || (p[5] = (R) => he(w) ? w.value = R : null),
|
|
1589
1588
|
label: e(n)("inventory.transfer.form.backdate.title"),
|
|
@@ -1594,14 +1593,14 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1594
1593
|
o("div", {
|
|
1595
1594
|
class: W({ hidden: t.value, "w-16": !t.value })
|
|
1596
1595
|
}, null, 2),
|
|
1597
|
-
e(w) ? (x(), P("div",
|
|
1598
|
-
o("div",
|
|
1596
|
+
e(w) ? (x(), P("div", No, [
|
|
1597
|
+
o("div", Bo, [
|
|
1599
1598
|
m(Rt, {
|
|
1600
1599
|
modelValue: e(S),
|
|
1601
1600
|
"onUpdate:modelValue": p[6] || (p[6] = (R) => he(S) ? S.value = R : null)
|
|
1602
1601
|
}, null, 8, ["modelValue"])
|
|
1603
1602
|
]),
|
|
1604
|
-
o("div",
|
|
1603
|
+
o("div", zo, [
|
|
1605
1604
|
m(Ot, {
|
|
1606
1605
|
modelValue: e(Q),
|
|
1607
1606
|
"onUpdate:modelValue": p[7] || (p[7] = (R) => he(Q) ? Q.value = R : null)
|
|
@@ -1613,20 +1612,20 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1613
1612
|
key: 0,
|
|
1614
1613
|
modelValue: e(oe),
|
|
1615
1614
|
"onUpdate:modelValue": p[8] || (p[8] = (R) => he(oe) ? oe.value = R : null),
|
|
1616
|
-
rules: [e(
|
|
1615
|
+
rules: [e(ns)(new Date(l.lastClosingDate), /* @__PURE__ */ new Date())]
|
|
1617
1616
|
}, null, 8, ["modelValue", "rules"])) : K("", !0),
|
|
1618
|
-
X.value && !l.lastClosingDate ? (x(), P("div",
|
|
1617
|
+
X.value && !l.lastClosingDate ? (x(), P("div", Lo, [
|
|
1619
1618
|
m(ae, {
|
|
1620
1619
|
name: "error",
|
|
1621
1620
|
size: "sm",
|
|
1622
1621
|
class: "text-fm-color-typo-warning"
|
|
1623
1622
|
}),
|
|
1624
|
-
o("span",
|
|
1623
|
+
o("span", jo, I(e(n)("inventory.transfer.form.backdate.error")), 1)
|
|
1625
1624
|
])) : K("", !0)
|
|
1626
1625
|
])) : K("", !0)
|
|
1627
1626
|
])
|
|
1628
1627
|
]),
|
|
1629
|
-
o("div",
|
|
1628
|
+
o("div", Ho, [
|
|
1630
1629
|
m(je, {
|
|
1631
1630
|
"model-value": z.value,
|
|
1632
1631
|
rules: [e(Ue)(1)]
|
|
@@ -1640,8 +1639,8 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1640
1639
|
}
|
|
1641
1640
|
])
|
|
1642
1641
|
}, [
|
|
1643
|
-
o("div",
|
|
1644
|
-
o("div",
|
|
1642
|
+
o("div", Qo, I(e(n)("inventory.transfer.form.items.title")), 1),
|
|
1643
|
+
o("div", Yo, [
|
|
1645
1644
|
m(At, {
|
|
1646
1645
|
disabled: l.disabled,
|
|
1647
1646
|
label: e(n)("inventory.transfer.form.items.addItem"),
|
|
@@ -1653,7 +1652,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1653
1652
|
onClick: p[9] || (p[9] = (R) => Oe()),
|
|
1654
1653
|
size: "md"
|
|
1655
1654
|
}, null, 8, ["disabled", "label"]),
|
|
1656
|
-
m(
|
|
1655
|
+
m(bo, {
|
|
1657
1656
|
"template-id": e(r).template || void 0,
|
|
1658
1657
|
"template-items": ke.value,
|
|
1659
1658
|
"po-items": z.value,
|
|
@@ -1669,8 +1668,8 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1669
1668
|
}, null, 8, ["template-id", "template-items", "po-items"])
|
|
1670
1669
|
])
|
|
1671
1670
|
], 2),
|
|
1672
|
-
V.value === e(de).enum.purchase && Z.value && e(k).enableTotalCost && z.value.length ? (x(), P("div",
|
|
1673
|
-
m(
|
|
1671
|
+
V.value === e(de).enum.purchase && Z.value && e(k).enableTotalCost && z.value.length ? (x(), P("div", Ko, [
|
|
1672
|
+
m(st, {
|
|
1674
1673
|
label: e(ie) ? e(n)("inventory.transfer.form.items.fetchingData") : e(n)("inventory.transfer.form.items.comparePriceHistory"),
|
|
1675
1674
|
"prepend-icon": "compare_arrows",
|
|
1676
1675
|
"label-placement": "right",
|
|
@@ -1686,9 +1685,9 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1686
1685
|
(x(), se(Et, {
|
|
1687
1686
|
"column-defs": Re.value,
|
|
1688
1687
|
"column-visibility": {
|
|
1689
|
-
[e(te).Code]: !(((
|
|
1690
|
-
[e(te).Name]: !(((
|
|
1691
|
-
[e(te).TemplateName]: !!(((
|
|
1688
|
+
[e(te).Code]: !(((rt = l.modelValue) == null ? void 0 : rt.template) ?? ((nt = l.modelValue) == null ? void 0 : nt.templateDoc)),
|
|
1689
|
+
[e(te).Name]: !(((lt = l.modelValue) == null ? void 0 : lt.template) ?? ((it = l.modelValue) == null ? void 0 : it.templateDoc)),
|
|
1690
|
+
[e(te).TemplateName]: !!(((ut = l.modelValue) == null ? void 0 : ut.template) ?? ((dt = l.modelValue) == null ? void 0 : dt.templateDoc))
|
|
1692
1691
|
},
|
|
1693
1692
|
"row-data": z.value,
|
|
1694
1693
|
key: c.value,
|
|
@@ -1696,13 +1695,13 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1696
1695
|
"page-size": z.value.length
|
|
1697
1696
|
}, {
|
|
1698
1697
|
"table-row": A((R) => {
|
|
1699
|
-
var G, Ie,
|
|
1698
|
+
var G, Ie, ct, mt;
|
|
1700
1699
|
return [
|
|
1701
|
-
m(
|
|
1700
|
+
m(ko, {
|
|
1702
1701
|
"compare-price-by-sku": e(ee),
|
|
1703
1702
|
"show-compare-price": V.value === e(de).enum.purchase && e(ne),
|
|
1704
1703
|
row: R,
|
|
1705
|
-
"template-item": (
|
|
1704
|
+
"template-item": (mt = (ct = (Ie = (G = l.modelValue) == null ? void 0 : G.templateDoc) == null ? void 0 : Ie.purchaseOrder) == null ? void 0 : ct.items) == null ? void 0 : mt.find(
|
|
1706
1705
|
(Qe) => Qe.sku._id === R.original.sku._id
|
|
1707
1706
|
),
|
|
1708
1707
|
"onUpdate:item": p[14] || (p[14] = (Qe) => ve.value.updateItem(Qe)),
|
|
@@ -1716,7 +1715,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1716
1715
|
key: z.value.map((G) => G.sku._id).join(".")
|
|
1717
1716
|
}, {
|
|
1718
1717
|
default: A((G) => [
|
|
1719
|
-
m(
|
|
1718
|
+
m(Gs, {
|
|
1720
1719
|
"compare-price-by-sku": e(ee),
|
|
1721
1720
|
"show-compare-price": V.value === e(de).enum.purchase && e(ne),
|
|
1722
1721
|
row: R,
|
|
@@ -1729,18 +1728,18 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1729
1728
|
_: 1
|
|
1730
1729
|
}, 8, ["column-defs", "column-visibility", "row-data", "page-size"]))
|
|
1731
1730
|
]),
|
|
1732
|
-
e(k).enableTotalCost ? (x(), P("div",
|
|
1733
|
-
o("div",
|
|
1734
|
-
o("div",
|
|
1735
|
-
o("div",
|
|
1731
|
+
e(k).enableTotalCost ? (x(), P("div", Xo, [
|
|
1732
|
+
o("div", Zo, [
|
|
1733
|
+
o("div", Wo, I(e(n)("inventory.transfer.form.surcharges.totalCost")), 1),
|
|
1734
|
+
o("div", Jo, I(e(pe)()) + " " + I(e(we)({
|
|
1736
1735
|
...e(a).getTotalCosts(),
|
|
1737
1736
|
currency: e(pe)()
|
|
1738
1737
|
}).replace(/[^0-9.,]/g, "")), 1)
|
|
1739
1738
|
])
|
|
1740
1739
|
])) : K("", !0),
|
|
1741
|
-
e(a).getMatchedSurcharges().length > 0 ? (x(), P("div",
|
|
1742
|
-
o("div",
|
|
1743
|
-
o("div",
|
|
1740
|
+
e(a).getMatchedSurcharges().length > 0 ? (x(), P("div", Go, [
|
|
1741
|
+
o("div", ea, [
|
|
1742
|
+
o("div", ta, I(e(n)("inventory.transfer.form.surcharges.title")), 1),
|
|
1744
1743
|
m(j, {
|
|
1745
1744
|
label: e(n)("inventory.transfer.form.surcharges.autoApplied"),
|
|
1746
1745
|
icon: "auto_awesome",
|
|
@@ -1748,8 +1747,8 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1748
1747
|
compact: ""
|
|
1749
1748
|
}, null, 8, ["label"])
|
|
1750
1749
|
]),
|
|
1751
|
-
o("div",
|
|
1752
|
-
o("div",
|
|
1750
|
+
o("div", sa, I(e(n)("inventory.transfer.form.surcharges.appliedBased")), 1),
|
|
1751
|
+
o("div", oa, [
|
|
1753
1752
|
(x(!0), P(re, null, fe(e(a).getMatchedSurcharges(), (R, G) => (x(), P("div", {
|
|
1754
1753
|
key: G,
|
|
1755
1754
|
class: W([
|
|
@@ -1757,11 +1756,11 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1757
1756
|
G !== e(a).getMatchedSurcharges().length - 1 ? "border-b border-fm-color-neutral-gray-300" : ""
|
|
1758
1757
|
])
|
|
1759
1758
|
}, [
|
|
1760
|
-
o("div",
|
|
1761
|
-
o("div",
|
|
1762
|
-
o("div",
|
|
1759
|
+
o("div", aa, [
|
|
1760
|
+
o("div", ra, I(R.item.name), 1),
|
|
1761
|
+
o("div", na, I(e(n)("inventory.transfer.form.surcharges.appliedBased")) + ": " + I(Ae(R.surcharge.rule)), 1)
|
|
1763
1762
|
]),
|
|
1764
|
-
o("div",
|
|
1763
|
+
o("div", la, I(e(pe)()) + " " + I(e(we)(R.item.totalCost).replace(/[^0-9.,]/g, "")), 1)
|
|
1765
1764
|
], 2))), 128))
|
|
1766
1765
|
])
|
|
1767
1766
|
])) : K("", !0)
|
|
@@ -1772,7 +1771,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1772
1771
|
]);
|
|
1773
1772
|
};
|
|
1774
1773
|
}
|
|
1775
|
-
}),
|
|
1774
|
+
}), ua = { class: "flex items-center" }, da = { class: "fm-typo-en-title-md-800" }, ca = { class: "flex gap-4" }, ma = { class: "fm-typo-en-title-md-600" }, pa = { class: "flex flex-col gap-16" }, fa = { class: "fm-typo-en-body-md-400" }, va = { class: "max-h-[300px] overflow-y-auto" }, ya = { class: "list-disc pl-16" }, ba = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ga = { class: "flex w-full gap-8 justify-end" }, _a = /* @__PURE__ */ le({
|
|
1776
1775
|
__name: "TransferDialog",
|
|
1777
1776
|
props: {
|
|
1778
1777
|
mode: {},
|
|
@@ -1784,7 +1783,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1784
1783
|
emits: ["update:show", "submitted"],
|
|
1785
1784
|
setup(f, { expose: b, emit: d }) {
|
|
1786
1785
|
var oe;
|
|
1787
|
-
const u = f, _ = d, n =
|
|
1786
|
+
const u = f, _ = d, n = et(), g = Dt(), h = Se(), F = Je(), k = Be(), y = Ne(), { t: i } = ge(), t = U(!1), s = U(!1), a = U(!1), r = U(!1), C = q(() => {
|
|
1788
1787
|
var w;
|
|
1789
1788
|
return ((w = T.value.items) == null ? void 0 : w.filter((S) => S.quantity.amount === 0)) ?? [];
|
|
1790
1789
|
});
|
|
@@ -1944,7 +1943,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1944
1943
|
}
|
|
1945
1944
|
function L() {
|
|
1946
1945
|
var Q, ne;
|
|
1947
|
-
const w =
|
|
1946
|
+
const w = hs.validatePurchaseOrderItems({
|
|
1948
1947
|
skusById: k.skuById ?? {},
|
|
1949
1948
|
items: T.value.items ?? []
|
|
1950
1949
|
}), S = Object.values(w).flat();
|
|
@@ -1977,12 +1976,12 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1977
1976
|
"max-width": 900
|
|
1978
1977
|
}, {
|
|
1979
1978
|
"side-sheet-header": A(() => [
|
|
1980
|
-
o("div",
|
|
1981
|
-
o("div",
|
|
1979
|
+
o("div", ua, [
|
|
1980
|
+
o("div", da, I(z.value), 1)
|
|
1982
1981
|
])
|
|
1983
1982
|
]),
|
|
1984
1983
|
default: A(() => [
|
|
1985
|
-
(x(), se(
|
|
1984
|
+
(x(), se(ia, {
|
|
1986
1985
|
class: "w-full",
|
|
1987
1986
|
ref_key: "formRef",
|
|
1988
1987
|
ref: X,
|
|
@@ -1998,7 +1997,7 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
1998
1997
|
}, null, 8, ["modelValue", "disabled", "suppliers", "skus", "last-closing-date"]))
|
|
1999
1998
|
]),
|
|
2000
1999
|
"side-sheet-footer": A(() => [
|
|
2001
|
-
o("div",
|
|
2000
|
+
o("div", ca, [
|
|
2002
2001
|
m(Q, {
|
|
2003
2002
|
loading: t.value,
|
|
2004
2003
|
disabled: Z.value,
|
|
@@ -2021,10 +2020,10 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
2021
2020
|
overlay: !0
|
|
2022
2021
|
}, {
|
|
2023
2022
|
"dialog-header": A(() => [
|
|
2024
|
-
o("div",
|
|
2023
|
+
o("div", ma, I(e(i)("inventory.transfer.template.zeroQuantity.title")), 1)
|
|
2025
2024
|
]),
|
|
2026
2025
|
"dialog-footer": A(() => [
|
|
2027
|
-
o("div",
|
|
2026
|
+
o("div", ga, [
|
|
2028
2027
|
m(Q, {
|
|
2029
2028
|
label: e(i)("common.cancel"),
|
|
2030
2029
|
variant: "tertiary",
|
|
@@ -2039,17 +2038,17 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
2039
2038
|
])
|
|
2040
2039
|
]),
|
|
2041
2040
|
default: A(() => [
|
|
2042
|
-
o("div",
|
|
2043
|
-
o("div",
|
|
2044
|
-
o("div",
|
|
2045
|
-
o("ul",
|
|
2041
|
+
o("div", pa, [
|
|
2042
|
+
o("div", fa, I(e(i)("inventory.transfer.template.zeroQuantity.message", { count: C.value.length })), 1),
|
|
2043
|
+
o("div", va, [
|
|
2044
|
+
o("ul", ya, [
|
|
2046
2045
|
(x(!0), P(re, null, fe(C.value, (ee) => (x(), P("li", {
|
|
2047
2046
|
key: ee.sku._id,
|
|
2048
2047
|
class: "fm-typo-en-body-md-400"
|
|
2049
2048
|
}, I(ee.sku.name) + " (" + I(ee.sku.code) + ") ", 1))), 128))
|
|
2050
2049
|
])
|
|
2051
2050
|
]),
|
|
2052
|
-
o("div",
|
|
2051
|
+
o("div", ba, I(e(i)("inventory.transfer.template.zeroQuantity.prompt")), 1)
|
|
2053
2052
|
])
|
|
2054
2053
|
]),
|
|
2055
2054
|
_: 1
|
|
@@ -2058,8 +2057,8 @@ const Io = { class: "flex flex-col gap-4" }, Do = { class: "flex items-center ga
|
|
|
2058
2057
|
};
|
|
2059
2058
|
}
|
|
2060
2059
|
});
|
|
2061
|
-
function
|
|
2062
|
-
const [b, d, u, ..._] =
|
|
2060
|
+
function ha(f) {
|
|
2061
|
+
const [b, d, u, ..._] = Ds(f), n = u.map((k) => k.toLowerCase().trim().replace(/ /g, "_")), h = ["item_name", "transfer_quantity(uom)", "uom", "scanned_code"].filter((k) => !n.includes(k));
|
|
2063
2062
|
if (h.length)
|
|
2064
2063
|
throw new Error(
|
|
2065
2064
|
`Missing headers (${h.join()}). Excel file does not come from the template.`
|
|
@@ -2076,12 +2075,12 @@ function _a(f) {
|
|
|
2076
2075
|
};
|
|
2077
2076
|
});
|
|
2078
2077
|
}
|
|
2079
|
-
function
|
|
2078
|
+
function xa(f) {
|
|
2080
2079
|
const b = f.SheetNames;
|
|
2081
2080
|
try {
|
|
2082
2081
|
return b.reduce(
|
|
2083
2082
|
(u, _) => {
|
|
2084
|
-
const n = new Array(), g = f.Sheets[_], h = Be(), F =
|
|
2083
|
+
const n = new Array(), g = f.Sheets[_], h = Be(), F = ha(g), k = [];
|
|
2085
2084
|
for (const { index: i, data: t } of F) {
|
|
2086
2085
|
t.scanned_code === "" && n.push(`Row ${i + 1}: Scanned code is empty`), t.item_name === "" && n.push(`Row ${i + 1}: Item name is empty`), t.uom === "" && n.push(`Row ${i + 1}: UOM is empty`), t["transfer_quantity(uom)"] === "" && n.push(`Row ${i + 1}: Transfer quantity is empty`);
|
|
2087
2086
|
const s = h.skus.find((C) => C.code === t.scanned_code);
|
|
@@ -2128,12 +2127,12 @@ function ha(f) {
|
|
|
2128
2127
|
};
|
|
2129
2128
|
}
|
|
2130
2129
|
}
|
|
2131
|
-
const
|
|
2130
|
+
const ka = { class: "flex flex-col flex-1" }, Ca = { class: "flex flex-col" }, wa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Sa = {
|
|
2132
2131
|
key: 0,
|
|
2133
2132
|
class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
|
|
2134
|
-
},
|
|
2133
|
+
}, Fa = { key: 0 }, $a = {
|
|
2135
2134
|
class: /* @__PURE__ */ W(["fm-typo-en-body-lg-600"])
|
|
2136
|
-
},
|
|
2135
|
+
}, Ia = { class: "flex-1" }, Da = { class: "flex-auto line-clamp-2 text-ellipsis break-all fm-typo-en-body-sm-400" }, Ta = { class: "flex-auto line-clamp-2 text-ellipsis break-all" }, Pa = { class: "text-fm-color-typo-primary" }, Va = { class: "ml-auto" }, Ra = { key: 0 }, Oa = /* @__PURE__ */ le({
|
|
2137
2136
|
__name: "XilnexResult",
|
|
2138
2137
|
props: {
|
|
2139
2138
|
type: {},
|
|
@@ -2148,24 +2147,24 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2148
2147
|
return (n, g) => {
|
|
2149
2148
|
var k;
|
|
2150
2149
|
const h = O("FmIcon"), F = O("FmTooltip");
|
|
2151
|
-
return x(), P("div",
|
|
2150
|
+
return x(), P("div", ka, [
|
|
2152
2151
|
o("div", {
|
|
2153
2152
|
onClick: _,
|
|
2154
2153
|
class: W({
|
|
2155
2154
|
"cursor-pointer": n.errors.length
|
|
2156
2155
|
})
|
|
2157
2156
|
}, [
|
|
2158
|
-
o("div",
|
|
2159
|
-
o("div",
|
|
2157
|
+
o("div", Ca, [
|
|
2158
|
+
o("div", wa, [
|
|
2160
2159
|
o("div", {
|
|
2161
2160
|
class: W({
|
|
2162
2161
|
"text-fm-color-system-error-300": n.errors.length
|
|
2163
2162
|
})
|
|
2164
2163
|
}, [
|
|
2165
2164
|
Ce(I(n.name) + " ", 1),
|
|
2166
|
-
n.type === "create" ? (x(), P("span",
|
|
2165
|
+
n.type === "create" ? (x(), P("span", Sa, "(" + I(e(d)("inventory.closing.template.import.new")) + ")", 1)) : K("", !0)
|
|
2167
2166
|
], 2),
|
|
2168
|
-
n.errors.length ? (x(), P("div",
|
|
2167
|
+
n.errors.length ? (x(), P("div", Fa, [
|
|
2169
2168
|
m(h, {
|
|
2170
2169
|
name: "error",
|
|
2171
2170
|
size: "sm",
|
|
@@ -2174,19 +2173,19 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2174
2173
|
])) : K("", !0)
|
|
2175
2174
|
]),
|
|
2176
2175
|
g[0] || (g[0] = o("hr", { class: "my-2" }, null, -1)),
|
|
2177
|
-
o("div",
|
|
2176
|
+
o("div", $a, [
|
|
2178
2177
|
(k = n.items) != null && k.length ? (x(!0), P(re, { key: 0 }, fe(n.items, (y, i) => (x(), P("div", {
|
|
2179
2178
|
key: i,
|
|
2180
2179
|
class: "flex gap-4 mt-2 items-center"
|
|
2181
2180
|
}, [
|
|
2182
|
-
o("div",
|
|
2181
|
+
o("div", Ia, [
|
|
2183
2182
|
m(F, {
|
|
2184
2183
|
content: y.code,
|
|
2185
2184
|
placement: "top",
|
|
2186
2185
|
"z-index": 51
|
|
2187
2186
|
}, {
|
|
2188
2187
|
default: A(() => [
|
|
2189
|
-
o("span",
|
|
2188
|
+
o("span", Da, I(y.code), 1)
|
|
2190
2189
|
]),
|
|
2191
2190
|
_: 2
|
|
2192
2191
|
}, 1032, ["content"]),
|
|
@@ -2196,13 +2195,13 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2196
2195
|
"z-index": 51
|
|
2197
2196
|
}, {
|
|
2198
2197
|
default: A(() => [
|
|
2199
|
-
o("span",
|
|
2198
|
+
o("span", Ta, I(y.name), 1)
|
|
2200
2199
|
]),
|
|
2201
2200
|
_: 2
|
|
2202
2201
|
}, 1032, ["content"])
|
|
2203
2202
|
]),
|
|
2204
2203
|
o("div", null, [
|
|
2205
|
-
o("span",
|
|
2204
|
+
o("span", Pa, I(e(wt).toFormatString({
|
|
2206
2205
|
value: y.quantity
|
|
2207
2206
|
})), 1),
|
|
2208
2207
|
Ce(" " + I(y.measurement ? y.measurement.abbrev : y.sku.unit.abbrev), 1)
|
|
@@ -2210,7 +2209,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2210
2209
|
]))), 128)) : K("", !0)
|
|
2211
2210
|
])
|
|
2212
2211
|
]),
|
|
2213
|
-
o("div",
|
|
2212
|
+
o("div", Va, [
|
|
2214
2213
|
n.errors.length ? (x(), se(h, {
|
|
2215
2214
|
key: 0,
|
|
2216
2215
|
name: u.value ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
@@ -2225,7 +2224,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2225
2224
|
"text-fm-color-system-error-300": n.errors.length
|
|
2226
2225
|
}])
|
|
2227
2226
|
}, [
|
|
2228
|
-
n.errors.length ? (x(), P("div",
|
|
2227
|
+
n.errors.length ? (x(), P("div", Ra, [
|
|
2229
2228
|
o("ol", null, [
|
|
2230
2229
|
(x(!0), P(re, null, fe(n.errors, (y, i) => (x(), P("li", { key: i }, I(y), 1))), 128))
|
|
2231
2230
|
])
|
|
@@ -2234,22 +2233,22 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2234
2233
|
]);
|
|
2235
2234
|
};
|
|
2236
2235
|
}
|
|
2237
|
-
}),
|
|
2236
|
+
}), Aa = { class: "flex flex-col gap-24" }, Ea = {
|
|
2238
2237
|
key: 0,
|
|
2239
2238
|
class: "flex items-center gap-8"
|
|
2240
|
-
},
|
|
2239
|
+
}, Ma = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, qa = { class: "flex flex-col gap-8" }, Ua = { class: "line-clamp-2 text-ellipsis break-all" }, Na = {
|
|
2241
2240
|
key: 2,
|
|
2242
2241
|
class: "shrink-0"
|
|
2243
|
-
},
|
|
2242
|
+
}, Ba = {
|
|
2244
2243
|
key: 0,
|
|
2245
2244
|
class: "flex flex-col"
|
|
2246
|
-
},
|
|
2245
|
+
}, za = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, La = {
|
|
2247
2246
|
key: 0,
|
|
2248
2247
|
class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
|
|
2249
|
-
},
|
|
2248
|
+
}, ja = { class: "fm-typo-en-body-lg-600" }, ht = "Transfer note", Ha = /* @__PURE__ */ le({
|
|
2250
2249
|
__name: "XilnexImportForm",
|
|
2251
2250
|
setup(f, { expose: b }) {
|
|
2252
|
-
const d = U(null), u = Se(), _ = U(!1), n = U(!1), g =
|
|
2251
|
+
const d = U(null), u = Se(), _ = U(!1), n = U(!1), g = Vs(), h = U(!1), F = Pe();
|
|
2253
2252
|
U([]);
|
|
2254
2253
|
const k = q({
|
|
2255
2254
|
get() {
|
|
@@ -2273,7 +2272,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2273
2272
|
});
|
|
2274
2273
|
}
|
|
2275
2274
|
});
|
|
2276
|
-
|
|
2275
|
+
Ze(async () => {
|
|
2277
2276
|
const c = await F.getNetSuiteLocations();
|
|
2278
2277
|
console.log(c), h.value = !0;
|
|
2279
2278
|
});
|
|
@@ -2320,10 +2319,10 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2320
2319
|
try {
|
|
2321
2320
|
_.value = !0;
|
|
2322
2321
|
const [v] = await Promise.all([
|
|
2323
|
-
|
|
2322
|
+
Ts(c),
|
|
2324
2323
|
// fake buffer
|
|
2325
2324
|
new Promise((E) => setTimeout(E, 1e3))
|
|
2326
|
-
]), T =
|
|
2325
|
+
]), T = xa(v);
|
|
2327
2326
|
if (T.invalidExcel) {
|
|
2328
2327
|
t.value.push(
|
|
2329
2328
|
T.invalidExcelMessage ?? C("inventory.ingredient.import.fileError.invalidExcel")
|
|
@@ -2357,7 +2356,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2357
2356
|
ref: r
|
|
2358
2357
|
}, {
|
|
2359
2358
|
default: A(() => [
|
|
2360
|
-
o("div",
|
|
2359
|
+
o("div", Aa, [
|
|
2361
2360
|
m(T, {
|
|
2362
2361
|
modelValue: k.value,
|
|
2363
2362
|
"onUpdate:modelValue": v[0] || (v[0] = (D) => k.value = D),
|
|
@@ -2387,16 +2386,16 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2387
2386
|
label: "Transfer time",
|
|
2388
2387
|
rules: [e(Te)()]
|
|
2389
2388
|
}, null, 8, ["modelValue", "rules"]),
|
|
2390
|
-
n.value ? (x(), P("div",
|
|
2389
|
+
n.value ? (x(), P("div", Ea, [
|
|
2391
2390
|
o("div", null, [
|
|
2392
2391
|
m(z, {
|
|
2393
2392
|
size: "md",
|
|
2394
2393
|
color: "neutral-gray-200"
|
|
2395
2394
|
})
|
|
2396
2395
|
]),
|
|
2397
|
-
o("div",
|
|
2396
|
+
o("div", Ma, I(e(C)("inventory.formField.loading")), 1)
|
|
2398
2397
|
])) : (x(), P(re, { key: 1 }, [
|
|
2399
|
-
m(
|
|
2398
|
+
m(Ps, {
|
|
2400
2399
|
"max-file-size": 5,
|
|
2401
2400
|
class: W({
|
|
2402
2401
|
"w-full": !0,
|
|
@@ -2416,7 +2415,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2416
2415
|
]),
|
|
2417
2416
|
_: 1
|
|
2418
2417
|
}),
|
|
2419
|
-
o("div",
|
|
2418
|
+
o("div", qa, [
|
|
2420
2419
|
o("div", {
|
|
2421
2420
|
class: W([
|
|
2422
2421
|
"fm-corner-radius-md p-16 flex items-center gap-16",
|
|
@@ -2446,9 +2445,9 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2446
2445
|
}
|
|
2447
2446
|
])
|
|
2448
2447
|
}, [
|
|
2449
|
-
o("div",
|
|
2448
|
+
o("div", Ua, I(d.value.name), 1)
|
|
2450
2449
|
], 2),
|
|
2451
|
-
_.value ? K("", !0) : (x(), P("div",
|
|
2450
|
+
_.value ? K("", !0) : (x(), P("div", Na, [
|
|
2452
2451
|
m(B, {
|
|
2453
2452
|
label: e(C)("inventory.ingredient.import.replaceFile"),
|
|
2454
2453
|
variant: a.value ? "destructive" : "secondary",
|
|
@@ -2457,7 +2456,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2457
2456
|
}, null, 8, ["label", "variant", "prepend-icon", "onClick"])
|
|
2458
2457
|
]))
|
|
2459
2458
|
], 2),
|
|
2460
|
-
t.value.length ? (x(), P("div",
|
|
2459
|
+
t.value.length ? (x(), P("div", Ba, [
|
|
2461
2460
|
(x(!0), P(re, null, fe(t.value, (M, L) => (x(), P("div", {
|
|
2462
2461
|
key: L,
|
|
2463
2462
|
class: "flex gap-8 items-center"
|
|
@@ -2467,7 +2466,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2467
2466
|
size: "sm",
|
|
2468
2467
|
color: "system-error-300"
|
|
2469
2468
|
}),
|
|
2470
|
-
o("div",
|
|
2469
|
+
o("div", za, I(M), 1)
|
|
2471
2470
|
]))), 128))
|
|
2472
2471
|
])) : K("", !0)
|
|
2473
2472
|
])
|
|
@@ -2475,9 +2474,9 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2475
2474
|
key: "0"
|
|
2476
2475
|
} : void 0
|
|
2477
2476
|
]), 1032, ["class", "button-label"]),
|
|
2478
|
-
d.value ? (x(), P("div",
|
|
2479
|
-
o("div",
|
|
2480
|
-
(x(!0), P(re, null, fe(s.value, (D, M) => (x(), se(
|
|
2477
|
+
d.value ? (x(), P("div", La, [
|
|
2478
|
+
o("div", ja, I(e(C)("inventory.ingredient.import.summary")), 1),
|
|
2479
|
+
(x(!0), P(re, null, fe(s.value, (D, M) => (x(), se(Oa, {
|
|
2481
2480
|
key: M,
|
|
2482
2481
|
name: `Transfer Note ${M + 1}`,
|
|
2483
2482
|
items: D.poItems,
|
|
@@ -2492,14 +2491,14 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2492
2491
|
}, 512);
|
|
2493
2492
|
};
|
|
2494
2493
|
}
|
|
2495
|
-
}),
|
|
2494
|
+
}), Qa = { class: "w-[480px]" }, Ya = /* @__PURE__ */ le({
|
|
2496
2495
|
__name: "XilnexImportDialog",
|
|
2497
2496
|
props: {
|
|
2498
2497
|
show: { type: Boolean }
|
|
2499
2498
|
},
|
|
2500
2499
|
emits: ["update:show", "submitted"],
|
|
2501
2500
|
setup(f, { expose: b, emit: d }) {
|
|
2502
|
-
const u = d, n = Ft(f, "show"), g = Se(), h =
|
|
2501
|
+
const u = d, n = Ft(f, "show"), g = Se(), h = et(), F = U(!1), k = U(), y = U();
|
|
2503
2502
|
b({
|
|
2504
2503
|
validateInputs: () => {
|
|
2505
2504
|
var s, a;
|
|
@@ -2598,8 +2597,8 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2598
2597
|
}, null, 8, ["disabled", "loading"])
|
|
2599
2598
|
]),
|
|
2600
2599
|
default: A(() => [
|
|
2601
|
-
o("div",
|
|
2602
|
-
m(
|
|
2600
|
+
o("div", Qa, [
|
|
2601
|
+
m(Ha, {
|
|
2603
2602
|
ref_key: "formRef",
|
|
2604
2603
|
ref: k,
|
|
2605
2604
|
onValidationSuccess: t,
|
|
@@ -2612,10 +2611,10 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2612
2611
|
}, 8, ["modelValue"]);
|
|
2613
2612
|
};
|
|
2614
2613
|
}
|
|
2615
|
-
}),
|
|
2614
|
+
}), Ka = { class: "flex flex-col py-8" }, Xa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Za = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Wa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Ja = {
|
|
2616
2615
|
key: 0,
|
|
2617
2616
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
2618
|
-
},
|
|
2617
|
+
}, Ga = { class: "pt-8" }, xt = "ReceiveRequestViewSearchCriteria", Dr = /* @__PURE__ */ le({
|
|
2619
2618
|
__name: "ReceiveRequestView",
|
|
2620
2619
|
setup(f) {
|
|
2621
2620
|
const { t: b } = ge(), d = Se();
|
|
@@ -2626,11 +2625,11 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2626
2625
|
});
|
|
2627
2626
|
const u = q(
|
|
2628
2627
|
() => !t._currentLocation || y.loading.value
|
|
2629
|
-
), _ =
|
|
2628
|
+
), _ = ds(), n = ze(), g = Pe();
|
|
2630
2629
|
function h() {
|
|
2631
2630
|
const N = {
|
|
2632
2631
|
name: "",
|
|
2633
|
-
...
|
|
2632
|
+
...vt()
|
|
2634
2633
|
}, B = _.getItem(xt);
|
|
2635
2634
|
if (!B)
|
|
2636
2635
|
return N;
|
|
@@ -2655,7 +2654,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2655
2654
|
const N = `inventory-record_${bt(k.value.startDate).format("DD-MM-YYYY_HH-mm")}-${bt(k.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, B = y.purchaseOrders.value.flatMap(
|
|
2656
2655
|
(D) => D.items.map((M) => {
|
|
2657
2656
|
var Q;
|
|
2658
|
-
const L = new Date(
|
|
2657
|
+
const L = new Date(is(D._id) ?? ""), J = D.effectiveAt ? new Date(D.effectiveAt) : void 0, oe = xe(
|
|
2659
2658
|
os(M.sku, D.deliveryOrder || [])
|
|
2660
2659
|
), w = xe(M.quantity), S = ((Q = M == null ? void 0 : M.measurement) == null ? void 0 : Q.abbrev) || M.sku.unit.abbrev;
|
|
2661
2660
|
return {
|
|
@@ -2683,7 +2682,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2683
2682
|
"Ordered quantity",
|
|
2684
2683
|
"Unit"
|
|
2685
2684
|
];
|
|
2686
|
-
n.enableBackdatePo && V.insert("Effective at", 4), n.enableTotalCost && V.push("Total cost"), await
|
|
2685
|
+
n.enableBackdatePo && V.insert("Effective at", 4), n.enableTotalCost && V.push("Total cost"), await us(
|
|
2687
2686
|
[
|
|
2688
2687
|
{
|
|
2689
2688
|
name: "purchases",
|
|
@@ -2698,7 +2697,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2698
2697
|
type: "success"
|
|
2699
2698
|
});
|
|
2700
2699
|
}
|
|
2701
|
-
const a = U(
|
|
2700
|
+
const a = U(vt()), r = U("");
|
|
2702
2701
|
be([() => a.value], ([N]) => {
|
|
2703
2702
|
!N.startDate || !N.endDate || (k.value.startDate = N.startDate, k.value.endDate = N.endDate, y.updateDateRange(
|
|
2704
2703
|
k.value.startDate,
|
|
@@ -2726,7 +2725,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2726
2725
|
if (N === "export")
|
|
2727
2726
|
return s();
|
|
2728
2727
|
}
|
|
2729
|
-
const { breakpoints: $ } =
|
|
2728
|
+
const { breakpoints: $ } = We(), c = q(() => $.value.xs || $.value.sm), v = q(() => c.value ? 10 : 20), T = cs(), E = q(() => [
|
|
2730
2729
|
{
|
|
2731
2730
|
label: b("inventory.transfer.receiveRequest.actions.create"),
|
|
2732
2731
|
value: "create",
|
|
@@ -2790,10 +2789,10 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2790
2789
|
}), z = U(null), X = q(() => {
|
|
2791
2790
|
if (!z.value)
|
|
2792
2791
|
return y.purchaseOrders.value;
|
|
2793
|
-
const N =
|
|
2792
|
+
const N = Rs.build(z.value);
|
|
2794
2793
|
return y.purchaseOrders.value.filter((B) => {
|
|
2795
2794
|
var V, D, M, L;
|
|
2796
|
-
return
|
|
2795
|
+
return Os(
|
|
2797
2796
|
{
|
|
2798
2797
|
netsuiteTransactionNumber: (D = (V = B.netSuite) == null ? void 0 : V.additionalInfo) == null ? void 0 : D.transactionnumber,
|
|
2799
2798
|
netsuiteOrderNo: (M = B.netSuite) == null ? void 0 : M.refNo,
|
|
@@ -2806,7 +2805,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2806
2805
|
});
|
|
2807
2806
|
return (N, B) => {
|
|
2808
2807
|
const V = O("FmTable");
|
|
2809
|
-
return x(), se(
|
|
2808
|
+
return x(), se(ms, {
|
|
2810
2809
|
title: e(b)("inventory.transfer.receiveRequest.title2"),
|
|
2811
2810
|
actions: E.value,
|
|
2812
2811
|
"onClick:action": C
|
|
@@ -2854,27 +2853,27 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2854
2853
|
default: A((J) => {
|
|
2855
2854
|
var oe, w, S, Q, ne, ie, ee, _e, ve, Ve, Re, Oe, Le, ke, Fe, $e, Ae, l, p, j;
|
|
2856
2855
|
return [
|
|
2857
|
-
o("div",
|
|
2858
|
-
o("div",
|
|
2856
|
+
o("div", Ka, [
|
|
2857
|
+
o("div", Xa, [
|
|
2859
2858
|
m(e(ce), {
|
|
2860
2859
|
render: (S = (w = (oe = J._id) == null ? void 0 : oe.column) == null ? void 0 : w.columnDef) == null ? void 0 : S.cell,
|
|
2861
2860
|
props: (ne = (Q = J._id) == null ? void 0 : Q.getContext) == null ? void 0 : ne.call(Q)
|
|
2862
2861
|
}, null, 8, ["render", "props"])
|
|
2863
2862
|
]),
|
|
2864
|
-
o("div",
|
|
2863
|
+
o("div", Za, [
|
|
2865
2864
|
m(e(ce), {
|
|
2866
2865
|
render: (_e = (ee = (ie = J.supplier_name) == null ? void 0 : ie.column) == null ? void 0 : ee.columnDef) == null ? void 0 : _e.cell,
|
|
2867
2866
|
props: (Ve = (ve = J.supplier_name) == null ? void 0 : ve.getContext) == null ? void 0 : Ve.call(ve)
|
|
2868
2867
|
}, null, 8, ["render", "props"])
|
|
2869
2868
|
]),
|
|
2870
|
-
o("div",
|
|
2871
|
-
L.original.ref ? (x(), P("div",
|
|
2869
|
+
o("div", Wa, I(L.original.items.map((H) => `${H.name}`).join(", ")), 1),
|
|
2870
|
+
L.original.ref ? (x(), P("div", Ja, [
|
|
2872
2871
|
m(e(ce), {
|
|
2873
2872
|
render: (Le = (Oe = (Re = J.ref) == null ? void 0 : Re.column) == null ? void 0 : Oe.columnDef) == null ? void 0 : Le.cell,
|
|
2874
2873
|
props: (Fe = (ke = J.ref) == null ? void 0 : ke.getContext) == null ? void 0 : Fe.call(ke)
|
|
2875
2874
|
}, null, 8, ["render", "props"])
|
|
2876
2875
|
])) : K("", !0),
|
|
2877
|
-
o("div",
|
|
2876
|
+
o("div", Ga, [
|
|
2878
2877
|
m(e(ce), {
|
|
2879
2878
|
render: (l = (Ae = ($e = J.status) == null ? void 0 : $e.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : l.cell,
|
|
2880
2879
|
props: (j = (p = J.status) == null ? void 0 : p.getContext) == null ? void 0 : j.call(p)
|
|
@@ -2890,7 +2889,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2890
2889
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2891
2890
|
], 2),
|
|
2892
2891
|
(x(), se(Lt, { to: "body" }, [
|
|
2893
|
-
m(
|
|
2892
|
+
m(_a, Xe(e(y).transferDialogProps.value, {
|
|
2894
2893
|
onSubmitted: e(y).fetchData
|
|
2895
2894
|
}), null, 16, ["onSubmitted"]),
|
|
2896
2895
|
m(ss, Xe({
|
|
@@ -2902,7 +2901,7 @@ const xa = { class: "flex flex-col flex-1" }, ka = { class: "flex flex-col" }, C
|
|
|
2902
2901
|
}, {
|
|
2903
2902
|
onSubmitted: e(y).fetchData
|
|
2904
2903
|
}), null, 16, ["scope", "onSubmitted"]),
|
|
2905
|
-
m(
|
|
2904
|
+
m(Ya, jt(Ht(e(y).xilnexImportDialogProps.value)), null, 16)
|
|
2906
2905
|
]))
|
|
2907
2906
|
];
|
|
2908
2907
|
}),
|