@feedmepos/mf-inventory-portal 1.6.2 → 1.7.0-dev.0
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-C61RakQ7.js → App-DaAOxELy.js} +4 -4
- package/dist/{ApprovalView-Cc1iYZqD.js → ApprovalView-CxJ79rW7.js} +8 -8
- package/dist/{BindingsDialog-Chd2EdfO.js → BindingsDialog-CZhCQoLO.js} +2 -2
- package/dist/{BindingsPicker-CXXnZKq5.js → BindingsPicker-BWRMxgYR.js} +2 -2
- package/dist/{BindingsTable-C5migJtC.js → BindingsTable-fvBa1dHb.js} +3 -3
- package/dist/{BulkReceiveRequestView-9MSE2YVv.js → BulkReceiveRequestView-Bq7_r-qY.js} +19 -19
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CKM48Ktp.js +126 -0
- package/dist/{ClosingDraftView-C4XBYgez.js → ClosingDraftView-DdMr571D.js} +204 -203
- package/dist/{ClosingHistoryView-C_OtcjwH.js → ClosingHistoryView-BIpPvvzQ.js} +5 -5
- package/dist/{ClosingTemplateView-BZpuwhWe.js → ClosingTemplateView-IlV4hRZ7.js} +14 -14
- package/dist/{DefaultView-Dnub2r0C.js → DefaultView-TKUUG9_5.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-U8g2O_pt.js → DeliveryOrderPrintPreview-DTjC7-Op.js} +2 -2
- package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-D3tETd4M.js → EmailDialog.vue_vue_type_script_setup_true_lang-DeFiuGtR.js} +23 -23
- package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DPVkPshX.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-NtqJm53P.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CCl3KLFs.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CzHFzHXg.js} +2 -2
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CiMEAtPb.js +118 -0
- package/dist/{FmMultiselectDialog-BplRH37N.js → FmMultiselectDialog-BdXOoS6z.js} +2 -2
- package/dist/{FmMultiselectDialog-DX3xMRs8.js → FmMultiselectDialog-D_4f9sXH.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-fKDQGIyW.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D_MOm5kW.js} +5 -5
- package/dist/{ImportView-BYQcNVFt.js → ImportView-BnL6y68X.js} +51 -51
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bj3Bgpix.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-g-g6qaNU.js} +1 -1
- package/dist/{IngredientGroupView-B52_Gj1M.js → IngredientGroupView-Du0iICme.js} +5 -5
- package/dist/{IngredientsView-dp1q1202.js → IngredientsView-m2Rtn_F_.js} +15 -15
- package/dist/{IntegrationExplorerView-CFDjUZ1x.js → IntegrationExplorerView-J5BtpWN_.js} +352 -352
- package/dist/{IntegrationView-WxvHYqrr.js → IntegrationView-BMQj8wg-.js} +13 -13
- package/dist/{InventoryBindingForm-CgsJGTLO.js → InventoryBindingForm-D_KFXokV.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoDwQAGq.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B7GjOoZh.js} +5 -5
- package/dist/{InventoryBindingSummary-CJPi-O24.js → InventoryBindingSummary-9TWMG5bm.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-6WGw2Tnv.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DYXtIoll.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-D8iVxQQI.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CGJ_uWzF.js} +1 -1
- package/dist/ProductionView-CI07S6oW.js +1330 -0
- package/dist/{PublishView-DQxvMoL9.js → PublishView-CWMdUnaY.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-YN89wJJe.js → PurchaseOrderPrintPreview-B5XJcf8G.js} +2 -2
- package/dist/{ReceiveRequestView-Dld-AD3X.js → ReceiveRequestView-st3jdG9W.js} +13 -13
- package/dist/{RecipeView-DTeYl1vN.js → RecipeView-D9ZVbmtm.js} +17 -17
- package/dist/{SettingsView-ZKDeU7-t.js → SettingsView-CUS0aMbf.js} +4 -4
- package/dist/{StockView-iWDV-4Em.js → StockView-Co4DOixF.js} +55 -54
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DKQR-Oe-.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Dt6XECIc.js} +1 -1
- package/dist/{SupplierView-DIFYaNh0.js → SupplierView-DXw6V-uS.js} +12 -12
- package/dist/{SurchargeView-Dg744-lq.js → SurchargeView-C-Bg7UsR.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-a1NAKsHT.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-D6_M-pbk.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BiMBRYQP.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D7NrX7HR.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BNb64xXp.js → TransferDetails.vue_vue_type_script_setup_true_lang-D9Fl_xAx.js} +1315 -1315
- package/dist/{TransferTemplateView-OKkFfbJr.js → TransferTemplateView-CP7ia82t.js} +20 -20
- package/dist/{UnitCostHistoryView-BQD8QfVO.js → UnitCostHistoryView-xe5q6105.js} +4 -4
- package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DrZ0DaVk.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-_Eax2wkO.js} +4 -4
- package/dist/{UnitView-WB01UGKV.js → UnitView-1e6MQ-Vu.js} +7 -7
- package/dist/{WarehouseView-xzBYaKJc.js → WarehouseView-DXB6Ygwb.js} +5 -5
- package/dist/{WastageTemplateView-HQpsfs5m.js → WastageTemplateView-CWGNtaZJ.js} +14 -14
- package/dist/api/production.d.ts +29 -0
- package/dist/{app-jwcH8Mn8.js → app-DXqwG4b3.js} +1930 -1854
- package/dist/app.js +1 -1
- package/dist/{closing-template-nSKzJbXQ.js → closing-template-CCY6fg4v.js} +1 -1
- package/dist/{date2-CcBFYPpF.js → date2-BWfUJajP.js} +1 -1
- package/dist/{dayjs.min-CArZjoIW.js → dayjs.min-BqAOh_2L.js} +1 -1
- package/dist/{decimal-kAd3KrAk.js → decimal-DmkQg2_J.js} +2 -2
- package/dist/{defineDeepModel-DW3GGnCB.js → defineDeepModel-D9smHIGg.js} +1 -1
- package/dist/{duplicate-template-Dju7ozO-.js → duplicate-template-Ebdaehmw.js} +1 -1
- package/dist/{feature-Dwlpa3ga.js → feature-CD2ndvWN.js} +2 -2
- package/dist/{format-time-from-id-C8qHJtCE.js → format-time-from-id-BtUh8UMO.js} +1 -1
- package/dist/{format-unit-display-DW_s2GAu.js → format-unit-display-DLoTr1Hz.js} +12 -12
- package/dist/{import-export.helper-BLEUR_2a.js → import-export.helper-DYgr7Lvo.js} +49 -49
- package/dist/{index-DX29MkLw.js → index-CnuWmvgF.js} +1 -1
- package/dist/{index-CQqLXfqq.js → index-DmdqVO9N.js} +3 -3
- package/dist/{index-DeMIqTWp.js → index-z_cku6cd.js} +1 -1
- package/dist/inventory-core-dart.default-CEnDozvp.js +22707 -0
- package/dist/{jszip.min-UvNpneu6.js → jszip.min-DKMvkIMM.js} +220 -220
- package/dist/{lz-string-BJjf0Fvk.js → lz-string-BH6J5xxX.js} +1 -1
- package/dist/{netsuite-ojatCiHQ.js → netsuite-kR1AFzO9.js} +2 -2
- package/dist/{number-PbBeNwvZ.js → number-CRrcUtSg.js} +3 -3
- package/dist/{predefined-templates-C11X8192.js → predefined-templates-DbAHazbJ.js} +1 -1
- package/dist/{purchase-order-template-CMQsOjp6.js → purchase-order-template-DoEJEwqG.js} +1 -1
- package/dist/{recalculationUtils-DOIaJCEk.js → recalculationUtils-hk2PE0q1.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/{rules-iqyXkujx.js → rules-BPXgi6ZE.js} +2 -2
- package/dist/stock-CJAv4fTu.js +75 -0
- package/dist/{stock-BhMYoMNR.js → stock-qAhTEKrH.js} +1 -1
- package/dist/{supplier-XEzdhDaU.js → supplier-BvzIGpwW.js} +2 -2
- package/dist/{surcharge-Ors_mdMv.js → surcharge-BhLHJ3gK.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{uom-rules-BQohyyG-.js → uom-rules-B1s74P9M.js} +1 -1
- package/dist/{use-ingredient-select-dialog-DJ-u5t4P.js → use-ingredient-select-dialog-aAPbd5cS.js} +2 -2
- package/dist/{use-inventory-binding-dialog-D3W-HnQ8.js → use-inventory-binding-dialog-CTjQzuV7.js} +2 -2
- package/dist/{use-template-enabled-locations-DVF4RYya.js → use-template-enabled-locations-Brw80-tj.js} +2 -2
- package/dist/{use-transfer-locations-vRfZN9tb.js → use-transfer-locations-BF7CKYpr.js} +2 -2
- package/dist/{useHrmPermission-z87O-oAT.js → useHrmPermission-Csjov-cy.js} +1 -1
- package/dist/{useNavigationMenu-DMRHryMp.js → useNavigationMenu-D8BERWXB.js} +12 -7
- package/dist/useSseClient-Cen-cw5C.js +453 -0
- package/dist/views/closing-draft/helpers/get-calculated-total.helper.spec.d.ts +1 -0
- package/dist/views/production/ProductionBindingsCell.vue.d.ts +29 -0
- package/dist/views/production/ProductionCompletionDialog.vue.d.ts +32 -0
- package/dist/views/production/ProductionDetailSheet.vue.d.ts +38 -0
- package/dist/views/production/ProductionDuplicateDialog.vue.d.ts +280 -0
- package/dist/views/production/ProductionPrepareBuilder.vue.d.ts +6 -0
- package/dist/views/production/ProductionView.vue.d.ts +2 -0
- package/dist/{vue-i18n-nOka-XyP.js → vue-i18n-lC_mdXT4.js} +176 -176
- package/dist/{xlsx.util-DDX-Y6FY.js → xlsx.util-DxgWqaTd.js} +3 -3
- package/package.json +5 -5
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BgR0wjB0.js +0 -237
- package/dist/inventory-core-dart.default-BOlwkIOh.js +0 -18716
- package/dist/useSseClient-6AYDEsLw.js +0 -524
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
import { defineComponent as qe, ref as
|
|
2
|
-
import { f as ks, h as Os, r as ws, s as Qt } from "./predefined-templates-
|
|
3
|
-
import { f as st, p as $s } from "./format-time-from-id-
|
|
1
|
+
import { defineComponent as qe, ref as Z, watch as Ge, nextTick as us, openBlock as l, createBlock as me, Teleport as ds, createElementBlock as h, withModifiers as ms, createElementVNode as e, normalizeClass as Ue, toDisplayString as x, createCommentVNode as I, unref as _, withDirectives as ps, vModelText as fs, toRaw as vs, shallowRef as Vt, onUnmounted as ys, triggerRef as bs, computed as j, readonly as hs, h as Y, reactive as gs, onMounted as Wt, resolveComponent as re, withCtx as ce, createVNode as L, Fragment as Ce, renderList as Ee, createTextVNode as ze, renderSlot as _s, isRef as Ss, resolveDynamicComponent as xs } from "vue";
|
|
2
|
+
import { f as ks, h as Os, r as ws, s as Qt } from "./predefined-templates-DbAHazbJ.js";
|
|
3
|
+
import { f as st, p as $s } from "./format-time-from-id-BtUh8UMO.js";
|
|
4
4
|
import { c as Lt } from "./component-kqxARxvM.js";
|
|
5
5
|
import { D as Pe, R as Se } from "./row-action.enum-DQ9bJ_uv.js";
|
|
6
|
-
import { G as Je, m as Cs, u as Me, U as
|
|
7
|
-
import { h as wt, t as As, d as Ts, a as tt } from "./date2-
|
|
8
|
-
import { j as Ps, c as Is, a as xe, t as Ke, d as ot } from "./number-
|
|
9
|
-
import { F as Ze,
|
|
10
|
-
import { L as Es } from "./lz-string-
|
|
6
|
+
import { G as Je, m as Cs, u as Me, U as V, _ as ut, V as ve, a as kt, $ as Ut, a0 as Ds, a1 as Rs, E as Ns, c as Yt, s as Ot, q as De, L as Mt, a2 as Jt, r as et, C as Fe, w as Ae, B as at } from "./app-DXqwG4b3.js";
|
|
7
|
+
import { h as wt, t as As, d as Ts, a as tt } from "./date2-BWfUJajP.js";
|
|
8
|
+
import { j as Ps, c as Is, a as xe, t as Ke, d as ot } from "./number-CRrcUtSg.js";
|
|
9
|
+
import { F as Ze, a as Fs, b as vt } from "./inventory-core-dart.default-CEnDozvp.js";
|
|
10
|
+
import { L as Es } from "./lz-string-BH6J5xxX.js";
|
|
11
11
|
import { useI18n as dt, useCoreStore as mt } from "@feedmepos/mf-common";
|
|
12
|
-
import { u as pt, a as $t, S as Le } from "./netsuite-
|
|
12
|
+
import { u as pt, a as $t, S as Le } from "./netsuite-kR1AFzO9.js";
|
|
13
13
|
import { useDialog as ft, useSnackbar as Qe, components as lt, FmButtonVariant as Ve, useProxiedModel as qs } from "@feedmepos/ui-library";
|
|
14
14
|
import { F as We } from "./FmAdminBadge-DjnBAgyv.js";
|
|
15
|
-
import { u as He } from "./feature-
|
|
15
|
+
import { u as He } from "./feature-CD2ndvWN.js";
|
|
16
16
|
import { _ as Vs } from "./empty-placeholder-B0QU467o.js";
|
|
17
|
-
import { a as Ls, b as Us, f as it } from "./format-unit-display-
|
|
18
|
-
import { u as Ye, _ as Ms } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-
|
|
19
|
-
import { _ as js, a as Bs, b as zs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
17
|
+
import { a as Ls, b as Us, f as it } from "./format-unit-display-DLoTr1Hz.js";
|
|
18
|
+
import { u as Ye, _ as Ms } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-D6_M-pbk.js";
|
|
19
|
+
import { _ as js, a as Bs, b as zs } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-D_MOm5kW.js";
|
|
20
20
|
import { u as Ks, R as jt } from "./usePromise-CbVUCxhj.js";
|
|
21
|
-
import { d as Hs } from "./index-
|
|
22
|
-
import { i as Gs } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-
|
|
21
|
+
import { d as Hs } from "./index-DmdqVO9N.js";
|
|
22
|
+
import { i as Gs } from "./FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-NtqJm53P.js";
|
|
23
23
|
import { F as Bt } from "./form-mode.enum-BKiNVH6A.js";
|
|
24
|
-
import { u as Xt } from "./supplier-
|
|
25
|
-
import { u as Ws } from "./surcharge-
|
|
26
|
-
import { F as Qs } from "./decimal-
|
|
27
|
-
import { d as Zt } from "./defineDeepModel-
|
|
28
|
-
import { u as Ys } from "./vue-i18n-
|
|
29
|
-
import { u as Js } from "./useHrmPermission-
|
|
24
|
+
import { u as Xt } from "./supplier-BvzIGpwW.js";
|
|
25
|
+
import { u as Ws } from "./surcharge-BhLHJ3gK.js";
|
|
26
|
+
import { F as Qs } from "./decimal-DmkQg2_J.js";
|
|
27
|
+
import { d as Zt } from "./defineDeepModel-D9smHIGg.js";
|
|
28
|
+
import { u as Ys } from "./vue-i18n-lC_mdXT4.js";
|
|
29
|
+
import { u as Js } from "./useHrmPermission-Csjov-cy.js";
|
|
30
30
|
function es(b, s) {
|
|
31
31
|
return s.reduce(
|
|
32
|
-
(c,
|
|
33
|
-
const
|
|
34
|
-
return
|
|
32
|
+
(c, v) => {
|
|
33
|
+
const d = v.received.find((p) => p.sku._id === b._id);
|
|
34
|
+
return d && (c = Ps(c, d.amount)), c;
|
|
35
35
|
},
|
|
36
36
|
Qs.toPrecision(Is(0), b.unit.precision)
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
39
|
function Xs(b) {
|
|
40
|
-
var ge, H,
|
|
41
|
-
const { po: s, currentLocation:
|
|
42
|
-
name: t ||
|
|
43
|
-
legalName:
|
|
44
|
-
registrationNumber:
|
|
45
|
-
line1: (
|
|
46
|
-
line2: (
|
|
47
|
-
postcode: (
|
|
48
|
-
city: (
|
|
49
|
-
state: (
|
|
50
|
-
country: (
|
|
51
|
-
},
|
|
40
|
+
var ge, H, R, ne, P, C, K;
|
|
41
|
+
const { po: s, currentLocation: n, business: c, fulfilling: v, por: d } = b, p = n.doc.profile || {}, { name: t, address: o, regNo: u, legalName: k } = p, $ = {
|
|
42
|
+
name: t || n.name || "",
|
|
43
|
+
legalName: k || void 0,
|
|
44
|
+
registrationNumber: u || void 0,
|
|
45
|
+
line1: (o == null ? void 0 : o.line1) || "",
|
|
46
|
+
line2: (o == null ? void 0 : o.line2) || void 0,
|
|
47
|
+
postcode: (o == null ? void 0 : o.postcode) || "",
|
|
48
|
+
city: (o == null ? void 0 : o.city) || "",
|
|
49
|
+
state: (o == null ? void 0 : o.state) || "",
|
|
50
|
+
country: (o == null ? void 0 : o.country) || ""
|
|
51
|
+
}, D = {
|
|
52
52
|
name: s.supplier.name,
|
|
53
53
|
phoneNumber: s.supplier.phoneNumber || void 0,
|
|
54
54
|
registrationNumber: s.supplier.registrationNumber || void 0,
|
|
55
55
|
line1: ((ge = s.supplier.address) == null ? void 0 : ge.line1) || "",
|
|
56
56
|
line2: ((H = s.supplier.address) == null ? void 0 : H.line2) || void 0,
|
|
57
|
-
postcode: ((
|
|
57
|
+
postcode: ((R = s.supplier.address) == null ? void 0 : R.postcode) || "",
|
|
58
58
|
city: ((ne = s.supplier.address) == null ? void 0 : ne.city) || "",
|
|
59
|
-
state: ((
|
|
60
|
-
country: ((
|
|
61
|
-
},
|
|
59
|
+
state: ((P = s.supplier.address) == null ? void 0 : P.state) || "",
|
|
60
|
+
country: ((C = s.supplier.address) == null ? void 0 : C.country) || ""
|
|
61
|
+
}, T = s.items.filter((N) => N.sku).map((N) => {
|
|
62
62
|
var pe;
|
|
63
|
-
const { sku:
|
|
64
|
-
es(
|
|
63
|
+
const { sku: X, measurement: be } = N, ye = xe(
|
|
64
|
+
es(N.sku, s.deliveryOrder || []),
|
|
65
65
|
!1
|
|
66
66
|
);
|
|
67
67
|
return {
|
|
68
|
-
code:
|
|
69
|
-
description:
|
|
70
|
-
quantity: xe(
|
|
71
|
-
unit: (be == null ? void 0 : be.abbrev) || ((pe =
|
|
68
|
+
code: X.code,
|
|
69
|
+
description: X.name,
|
|
70
|
+
quantity: xe(N.quantity, !1),
|
|
71
|
+
unit: (be == null ? void 0 : be.abbrev) || ((pe = X.unit) == null ? void 0 : pe.abbrev) || "",
|
|
72
72
|
received: ye,
|
|
73
|
-
unitCost:
|
|
74
|
-
value:
|
|
73
|
+
unitCost: N.totalCost ? `${N.totalCost.currency} ${Ze.toFormatString({
|
|
74
|
+
value: N.quantity.amount === 0 ? Ze.fromNumber(0) : Ze.divide([N.totalCost, N.quantity])
|
|
75
75
|
})}` : void 0,
|
|
76
|
-
cost:
|
|
77
|
-
value:
|
|
76
|
+
cost: N.totalCost ? `${N.totalCost.currency} ${Ze.toFormatString({
|
|
77
|
+
value: N.totalCost
|
|
78
78
|
})}` : void 0
|
|
79
79
|
};
|
|
80
|
-
}),
|
|
81
|
-
createdAt: wt(new Date(
|
|
82
|
-
ref:
|
|
83
|
-
remark:
|
|
84
|
-
items: (
|
|
85
|
-
var be, ye, pe, fe,
|
|
80
|
+
}), S = (s.deliveryOrder || []).map((N) => ({
|
|
81
|
+
createdAt: wt(new Date(N.createdAt)),
|
|
82
|
+
ref: N.deliveryOrderNumber,
|
|
83
|
+
remark: N.remark || "",
|
|
84
|
+
items: (N.received || []).map((X) => {
|
|
85
|
+
var be, ye, pe, fe, f;
|
|
86
86
|
return {
|
|
87
|
-
code: ((be =
|
|
88
|
-
description: ((ye =
|
|
89
|
-
quantity: xe(
|
|
90
|
-
unit: ((pe =
|
|
87
|
+
code: ((be = X.sku) == null ? void 0 : be.code) || "",
|
|
88
|
+
description: ((ye = X.sku) == null ? void 0 : ye.name) || "",
|
|
89
|
+
quantity: xe(X.amount),
|
|
90
|
+
unit: ((pe = X.measurement) == null ? void 0 : pe.abbrev) || ((f = (fe = X.sku) == null ? void 0 : fe.unit) == null ? void 0 : f.abbrev) || ""
|
|
91
91
|
};
|
|
92
92
|
})
|
|
93
93
|
}));
|
|
94
|
-
let
|
|
95
|
-
if (s.supplier.internal ? (
|
|
96
|
-
const
|
|
97
|
-
|
|
94
|
+
let F = Je.Enum.purchaseOrder, E = "Inventory Receive Note";
|
|
95
|
+
if (s.supplier.internal ? (E = "Inventory Transfer Note", F = Je.Enum.transferOrder) : (E = "Purchase Order", F = Je.Enum.purchaseOrder), (K = d == null ? void 0 : d.from) != null && K.dbName) {
|
|
96
|
+
const N = d.from.dbName;
|
|
97
|
+
n.dbName === N || (E = "Inventory Receive Note", F = Je.Enum.goodsReceivedNote);
|
|
98
98
|
}
|
|
99
99
|
const z = {
|
|
100
|
-
title:
|
|
100
|
+
title: E,
|
|
101
101
|
businessName: c == null ? void 0 : c.name,
|
|
102
102
|
logo: c == null ? void 0 : c.thumbnail,
|
|
103
103
|
orderNumber: s.seqNumber.toString(),
|
|
104
104
|
createdAt: st(s._id),
|
|
105
105
|
ref: s.ref || "",
|
|
106
106
|
remark: s.remark || "",
|
|
107
|
-
buyer:
|
|
108
|
-
supplier:
|
|
109
|
-
items:
|
|
107
|
+
buyer: $,
|
|
108
|
+
supplier: D,
|
|
109
|
+
items: T,
|
|
110
110
|
status: s.status,
|
|
111
|
-
deliveryOrders:
|
|
112
|
-
},
|
|
113
|
-
return
|
|
111
|
+
deliveryOrders: S
|
|
112
|
+
}, ae = v && (s.deliveryFullfillment || []).length > 0;
|
|
113
|
+
return ae && (F = Je.Enum.deliveryOrder), { printData: z, templateType: F, isDeliveryPrint: ae };
|
|
114
114
|
}
|
|
115
115
|
function ts(b) {
|
|
116
|
-
var
|
|
117
|
-
const { printData: s, templateType:
|
|
116
|
+
var k;
|
|
117
|
+
const { printData: s, templateType: n } = Xs(b), v = ks().getTemplateByType(n), d = !!((k = v == null ? void 0 : v.blocks) != null && k.length), p = Os(n), t = d ? v.blocks : p.blocks, o = d ? v.name : p.name, u = !d;
|
|
118
118
|
try {
|
|
119
|
-
const
|
|
119
|
+
const $ = ws(t, s), D = $.match(/<style>([\s\S]*?)<\/style>/), T = D ? `<style>${D[1]}</style>` : "", S = $.replace(/<style>[\s\S]*?<\/style>/, "");
|
|
120
120
|
return {
|
|
121
121
|
html: `<!DOCTYPE html>
|
|
122
122
|
<html>
|
|
@@ -130,12 +130,12 @@ function ts(b) {
|
|
|
130
130
|
}
|
|
131
131
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
132
132
|
</style>
|
|
133
|
-
${
|
|
133
|
+
${T}
|
|
134
134
|
</head>
|
|
135
|
-
<body>${
|
|
135
|
+
<body>${S}</body>
|
|
136
136
|
</html>`,
|
|
137
|
-
templateName:
|
|
138
|
-
isDefault:
|
|
137
|
+
templateName: o,
|
|
138
|
+
isDefault: u
|
|
139
139
|
};
|
|
140
140
|
} catch {
|
|
141
141
|
return alert("Failed to render print template. Please try recreating the template."), null;
|
|
@@ -154,32 +154,32 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
154
154
|
},
|
|
155
155
|
emits: ["update:modelValue"],
|
|
156
156
|
setup(b, { emit: s }) {
|
|
157
|
-
const
|
|
158
|
-
function
|
|
157
|
+
const n = b, c = s, v = Z(null);
|
|
158
|
+
function d() {
|
|
159
159
|
c("update:modelValue", !1);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
var
|
|
161
|
+
function p() {
|
|
162
|
+
var o, u;
|
|
163
163
|
try {
|
|
164
|
-
(
|
|
164
|
+
(u = (o = v.value) == null ? void 0 : o.contentWindow) == null || u.print();
|
|
165
165
|
} catch {
|
|
166
166
|
alert("Failed to trigger print.");
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
Ge(
|
|
170
|
-
() =>
|
|
171
|
-
async (
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
() => n.modelValue,
|
|
171
|
+
async (o) => {
|
|
172
|
+
o && (await us(), t(), setTimeout(() => {
|
|
173
|
+
p();
|
|
174
174
|
}, 300));
|
|
175
175
|
}
|
|
176
176
|
);
|
|
177
177
|
function t() {
|
|
178
|
-
var
|
|
179
|
-
const
|
|
180
|
-
if (!
|
|
181
|
-
const
|
|
182
|
-
|
|
178
|
+
var $;
|
|
179
|
+
const o = v.value;
|
|
180
|
+
if (!o) return;
|
|
181
|
+
const u = Qt(n.html), k = o.contentDocument || (($ = o.contentWindow) == null ? void 0 : $.document);
|
|
182
|
+
k && (k.open(), k.write(`
|
|
183
183
|
<!DOCTYPE html>
|
|
184
184
|
<html>
|
|
185
185
|
<head>
|
|
@@ -235,70 +235,70 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
235
235
|
</head>
|
|
236
236
|
<body>
|
|
237
237
|
<div class="print-container">
|
|
238
|
-
${
|
|
238
|
+
${u}
|
|
239
239
|
</div>
|
|
240
240
|
</body>
|
|
241
241
|
</html>
|
|
242
|
-
`),
|
|
242
|
+
`), k.close());
|
|
243
243
|
}
|
|
244
|
-
return (
|
|
245
|
-
|
|
244
|
+
return (o, u) => (l(), me(ds, { to: "body" }, [
|
|
245
|
+
o.modelValue ? (l(), h("div", {
|
|
246
246
|
key: 0,
|
|
247
247
|
class: "fixed inset-0 z-[9999] bg-black/50 flex justify-center items-center",
|
|
248
|
-
onClick: ms(
|
|
248
|
+
onClick: ms(d, ["self"])
|
|
249
249
|
}, [
|
|
250
250
|
e("div", Zs, [
|
|
251
251
|
e("div", er, [
|
|
252
252
|
e("div", tr, [
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
u[0] || (u[0] = e("span", { class: "text-base font-semibold text-gray-700" }, "Print Preview", -1)),
|
|
254
|
+
o.templateName ? (l(), h("span", {
|
|
255
255
|
key: 0,
|
|
256
|
-
class: Ue(["text-xs font-medium px-2 py-0.5 rounded",
|
|
257
|
-
}, x(
|
|
258
|
-
|
|
256
|
+
class: Ue(["text-xs font-medium px-2 py-0.5 rounded", o.isDefault ? "text-gray-500 bg-gray-100" : "text-blue-700 bg-blue-50"])
|
|
257
|
+
}, x(o.templateName), 3)) : I("", !0),
|
|
258
|
+
o.isDefault ? (l(), h("span", sr, "Default")) : I("", !0)
|
|
259
259
|
]),
|
|
260
260
|
e("div", { class: "flex gap-2 items-center" }, [
|
|
261
261
|
e("button", {
|
|
262
262
|
class: "px-8 py-1.5 bg-blue-500 text-white border-none rounded text-sm cursor-pointer hover:bg-blue-700",
|
|
263
|
-
onClick:
|
|
263
|
+
onClick: p
|
|
264
264
|
}, " Print "),
|
|
265
265
|
e("button", {
|
|
266
266
|
class: "px-2.5 py-1 bg-transparent border border-gray-300 rounded text-xl leading-none cursor-pointer text-gray-500 hover:bg-gray-100",
|
|
267
|
-
onClick:
|
|
267
|
+
onClick: d
|
|
268
268
|
}, " × ")
|
|
269
269
|
])
|
|
270
270
|
]),
|
|
271
271
|
e("div", rr, [
|
|
272
272
|
e("iframe", {
|
|
273
273
|
ref_key: "iframeRef",
|
|
274
|
-
ref:
|
|
274
|
+
ref: v,
|
|
275
275
|
class: "w-full h-full border-none",
|
|
276
276
|
sandbox: "allow-same-origin allow-modals"
|
|
277
277
|
}, null, 512)
|
|
278
278
|
])
|
|
279
279
|
])
|
|
280
|
-
])) :
|
|
280
|
+
])) : I("", !0)
|
|
281
281
|
]));
|
|
282
282
|
}
|
|
283
283
|
}), or = Cs((b, s) => {
|
|
284
|
-
const
|
|
284
|
+
const n = Me();
|
|
285
285
|
return {
|
|
286
286
|
async getShipments({
|
|
287
287
|
start: c,
|
|
288
|
-
end:
|
|
288
|
+
end: v
|
|
289
289
|
}) {
|
|
290
|
-
const
|
|
291
|
-
return await s.get(`${
|
|
290
|
+
const d = n.currentLocationDBName, p = `${b.inventoryBackendUrl}/${d}/shipments`;
|
|
291
|
+
return await s.get(`${p}?start=${c}&end=${v}`);
|
|
292
292
|
},
|
|
293
293
|
async getShipmentsByIds(c) {
|
|
294
294
|
if (c.length === 0)
|
|
295
295
|
return [];
|
|
296
|
-
const
|
|
297
|
-
return await s.post(
|
|
296
|
+
const v = n.currentLocationDBName, d = `${b.inventoryBackendUrl}/${v}/shipments/get`;
|
|
297
|
+
return await s.post(d, { shipmentIds: c });
|
|
298
298
|
}
|
|
299
299
|
};
|
|
300
300
|
}), ss = {
|
|
301
|
-
[
|
|
301
|
+
[V.enum.confirmDraft]: {
|
|
302
302
|
primaryActions: {
|
|
303
303
|
text: "Confirm draft",
|
|
304
304
|
close: !0
|
|
@@ -307,7 +307,7 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
307
307
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
308
308
|
successMessage: "Purchase order draft has been confirmed"
|
|
309
309
|
},
|
|
310
|
-
[
|
|
310
|
+
[V.enum.cancelDraft]: {
|
|
311
311
|
primaryActions: {
|
|
312
312
|
text: "Cancel draft",
|
|
313
313
|
close: !0,
|
|
@@ -317,7 +317,7 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
317
317
|
message: "Purchase order cannot be changed after cancelled draft.",
|
|
318
318
|
successMessage: "Purchase order draft has been cancelled"
|
|
319
319
|
},
|
|
320
|
-
[
|
|
320
|
+
[V.enum.approveDraft]: {
|
|
321
321
|
primaryActions: {
|
|
322
322
|
text: "Approve draft",
|
|
323
323
|
close: !0
|
|
@@ -326,7 +326,7 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
326
326
|
message: "Purchase order request will be accepted.",
|
|
327
327
|
successMessage: "Purchase order has been approved"
|
|
328
328
|
},
|
|
329
|
-
[
|
|
329
|
+
[V.enum.rejectDraft]: {
|
|
330
330
|
primaryActions: {
|
|
331
331
|
text: "Reject draft",
|
|
332
332
|
close: !0
|
|
@@ -335,7 +335,7 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
335
335
|
message: "Purchase order request will be rejected. You may provide an optional reason for rejection.",
|
|
336
336
|
successMessage: "Purchase order has been rejected"
|
|
337
337
|
},
|
|
338
|
-
[
|
|
338
|
+
[V.enum.submitRequest]: {
|
|
339
339
|
primaryActions: {
|
|
340
340
|
text: "Submit request",
|
|
341
341
|
close: !0
|
|
@@ -344,7 +344,7 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
344
344
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
345
345
|
successMessage: "Purchase order draft has been submitted"
|
|
346
346
|
},
|
|
347
|
-
[
|
|
347
|
+
[V.enum.completeReceive]: {
|
|
348
348
|
primaryActions: {
|
|
349
349
|
text: "Mark received",
|
|
350
350
|
close: !0
|
|
@@ -353,7 +353,7 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
353
353
|
message: "Purchase order cannot be changed after it has complete receiving.",
|
|
354
354
|
successMessage: "Purchase order has been marked as received"
|
|
355
355
|
},
|
|
356
|
-
[
|
|
356
|
+
[V.enum.approveRequest]: {
|
|
357
357
|
primaryActions: {
|
|
358
358
|
text: "Accept request",
|
|
359
359
|
close: !0
|
|
@@ -362,7 +362,7 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
362
362
|
message: "Transfer out request will be accepted.",
|
|
363
363
|
successMessage: "Transfer out request has been approved"
|
|
364
364
|
},
|
|
365
|
-
[
|
|
365
|
+
[V.enum.rejectRequest]: {
|
|
366
366
|
primaryActions: {
|
|
367
367
|
text: "Reject request",
|
|
368
368
|
close: !0,
|
|
@@ -372,7 +372,7 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
372
372
|
message: "Purchase order will be rejected.",
|
|
373
373
|
successMessage: "Purchase order has been rejected"
|
|
374
374
|
},
|
|
375
|
-
[
|
|
375
|
+
[V.enum.processRequest]: {
|
|
376
376
|
primaryActions: {
|
|
377
377
|
text: "Process request",
|
|
378
378
|
close: !0,
|
|
@@ -393,19 +393,19 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
393
393
|
onChange: { type: Function }
|
|
394
394
|
},
|
|
395
395
|
setup(b) {
|
|
396
|
-
const s = b, { t:
|
|
397
|
-
Ge(c, (
|
|
398
|
-
var
|
|
399
|
-
(
|
|
396
|
+
const s = b, { t: n } = dt(), c = Z("");
|
|
397
|
+
Ge(c, (d) => {
|
|
398
|
+
var p;
|
|
399
|
+
(p = s.onChange) == null || p.call(s, d ?? "");
|
|
400
400
|
});
|
|
401
|
-
function
|
|
401
|
+
function v() {
|
|
402
402
|
c.value = "";
|
|
403
403
|
}
|
|
404
|
-
return (
|
|
405
|
-
s.message ? (l(), h("div", ar, x(s.message), 1)) :
|
|
406
|
-
e("label", lr, x(_(
|
|
404
|
+
return (d, p) => (l(), h("div", nr, [
|
|
405
|
+
s.message ? (l(), h("div", ar, x(s.message), 1)) : I("", !0),
|
|
406
|
+
e("label", lr, x(_(n)("inventory.transfer.receiveRequest.details.rejectionReason")) + " (" + x(_(n)("inventory.common.optional")) + ")", 1),
|
|
407
407
|
ps(e("textarea", {
|
|
408
|
-
"onUpdate:modelValue":
|
|
408
|
+
"onUpdate:modelValue": p[0] || (p[0] = (t) => c.value = t),
|
|
409
409
|
rows: "4",
|
|
410
410
|
class: "w-full mt-2 p-2 border rounded"
|
|
411
411
|
}, null, 512), [
|
|
@@ -415,7 +415,7 @@ const Zs = { class: "w-[95vw] h-[95vh] bg-white rounded-lg flex flex-col shadow-
|
|
|
415
415
|
e("button", {
|
|
416
416
|
type: "button",
|
|
417
417
|
class: "fm-btn fm-btn-tertiary",
|
|
418
|
-
onClick:
|
|
418
|
+
onClick: v
|
|
419
419
|
}, "Clear")
|
|
420
420
|
])
|
|
421
421
|
]));
|
|
@@ -436,37 +436,37 @@ function _t(b) {
|
|
|
436
436
|
receivedMap: b
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
|
-
function St(b, s,
|
|
439
|
+
function St(b, s, n) {
|
|
440
440
|
if (!ve.safeParse(b).success)
|
|
441
441
|
throw new Error(`Invalid purchase order status: ${b}`);
|
|
442
442
|
const c = ve.parse(b);
|
|
443
443
|
return ut.orderStatusCombination({
|
|
444
444
|
status: c,
|
|
445
445
|
isPOPartialReceive: s,
|
|
446
|
-
isPOOverReceive:
|
|
446
|
+
isPOOverReceive: n
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
449
|
function os() {
|
|
450
|
-
const b = Me(), s = Ye(),
|
|
451
|
-
async function c(
|
|
450
|
+
const b = Me(), s = Ye(), n = He();
|
|
451
|
+
async function c(d, p) {
|
|
452
452
|
const t = b.currentLocationDBName;
|
|
453
|
-
return
|
|
453
|
+
return d.doc.supplier.internal && d.operation === V.enum.confirmDraft && (d.operation = V.enum.submitRequest), await s.processPurchaseOrder(d, p || t);
|
|
454
454
|
}
|
|
455
|
-
async function
|
|
455
|
+
async function v(d, p) {
|
|
456
456
|
const t = b.currentLocationDBName;
|
|
457
|
-
return await s.processPurchaseOrderV2(
|
|
457
|
+
return await s.processPurchaseOrderV2(d, p || t);
|
|
458
458
|
}
|
|
459
|
-
return (
|
|
459
|
+
return (d) => n.useOperatePurchaseOrderV2 ? v(d.operateV2, d.transferTo) : c(d.operate, d.transferTo);
|
|
460
460
|
}
|
|
461
461
|
function Be(b) {
|
|
462
462
|
const s = vs(b);
|
|
463
463
|
if (Array.isArray(s))
|
|
464
464
|
return s.map(Be);
|
|
465
465
|
if (s !== null && typeof s == "object") {
|
|
466
|
-
const
|
|
466
|
+
const n = {};
|
|
467
467
|
for (const c in s)
|
|
468
|
-
Object.prototype.hasOwnProperty.call(s, c) && (
|
|
469
|
-
return
|
|
468
|
+
Object.prototype.hasOwnProperty.call(s, c) && (n[c] = Be(s[c]));
|
|
469
|
+
return n;
|
|
470
470
|
}
|
|
471
471
|
return s;
|
|
472
472
|
}
|
|
@@ -484,119 +484,119 @@ function zt(b) {
|
|
|
484
484
|
doc: b.doc
|
|
485
485
|
};
|
|
486
486
|
}
|
|
487
|
-
function Kt(b, s,
|
|
488
|
-
const
|
|
487
|
+
function Kt(b, s, n, c, v) {
|
|
488
|
+
const d = Be(b.suppliers ?? []), p = Be(s.allLocations ?? []).map(zt), t = s._currentLocation ? zt(Be(s._currentLocation)) : null, o = n.inventory ? [Be(n.inventory)] : [], u = c.state.setting ? Be(c.state.setting) : null, k = Be(v.surcharges ?? []);
|
|
489
489
|
return {
|
|
490
|
-
suppliers:
|
|
491
|
-
locations:
|
|
490
|
+
suppliers: d,
|
|
491
|
+
locations: p,
|
|
492
492
|
currentLocation: t,
|
|
493
|
-
inventoryDoc:
|
|
494
|
-
netSuiteSetting:
|
|
495
|
-
surcharges:
|
|
493
|
+
inventoryDoc: o,
|
|
494
|
+
netSuiteSetting: u,
|
|
495
|
+
surcharges: k
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
498
|
function ns() {
|
|
499
|
-
const b = Xt(), s = Me(),
|
|
499
|
+
const b = Xt(), s = Me(), n = kt(), c = pt(), v = Ws(), d = Kt(
|
|
500
500
|
b,
|
|
501
501
|
s,
|
|
502
|
-
|
|
502
|
+
n,
|
|
503
503
|
c,
|
|
504
|
-
|
|
505
|
-
),
|
|
506
|
-
|
|
507
|
-
const t = Vt(
|
|
508
|
-
t.value =
|
|
504
|
+
v
|
|
505
|
+
), p = Vt(Fs({ env: d }));
|
|
506
|
+
p.value.setUsePartialUpdates(!0);
|
|
507
|
+
const t = Vt(p.value.state()), o = (D) => {
|
|
508
|
+
t.value = p.value.state();
|
|
509
509
|
};
|
|
510
|
-
|
|
511
|
-
const
|
|
512
|
-
switch (
|
|
510
|
+
p.value.addListener(o);
|
|
511
|
+
const u = (D, T, S) => {
|
|
512
|
+
switch (D) {
|
|
513
513
|
case yt.set:
|
|
514
|
-
Ut(t.value,
|
|
514
|
+
Ut(t.value, T, S);
|
|
515
515
|
break;
|
|
516
516
|
case yt.add:
|
|
517
|
-
Rs(t.value,
|
|
517
|
+
Rs(t.value, T, S);
|
|
518
518
|
break;
|
|
519
519
|
case yt.delete:
|
|
520
|
-
Ds(t.value,
|
|
520
|
+
Ds(t.value, T);
|
|
521
521
|
break;
|
|
522
522
|
default:
|
|
523
|
-
console.warn(`Unknown partial update operation: ${
|
|
523
|
+
console.warn(`Unknown partial update operation: ${D}, falling back to 'set'`), Ut(t.value, T, S);
|
|
524
524
|
}
|
|
525
|
-
|
|
525
|
+
T !== "remark" && T !== "ref" && bs(t);
|
|
526
526
|
};
|
|
527
|
-
|
|
528
|
-
function
|
|
529
|
-
const
|
|
527
|
+
p.value.addPartialListener(u);
|
|
528
|
+
function k() {
|
|
529
|
+
const D = Kt(
|
|
530
530
|
b,
|
|
531
531
|
s,
|
|
532
|
-
|
|
532
|
+
n,
|
|
533
533
|
c,
|
|
534
|
-
|
|
534
|
+
v
|
|
535
535
|
);
|
|
536
|
-
|
|
536
|
+
p.value.updateFullEnv(D), t.value = p.value.state();
|
|
537
537
|
}
|
|
538
538
|
Ge(
|
|
539
539
|
[
|
|
540
540
|
() => b.suppliers,
|
|
541
541
|
() => s.allLocations,
|
|
542
542
|
() => s._currentLocation,
|
|
543
|
-
() =>
|
|
543
|
+
() => n.inventory,
|
|
544
544
|
() => c.state.setting,
|
|
545
|
-
() =>
|
|
545
|
+
() => v.surcharges
|
|
546
546
|
],
|
|
547
547
|
() => {
|
|
548
|
-
|
|
548
|
+
k();
|
|
549
549
|
},
|
|
550
550
|
{ deep: !0 }
|
|
551
551
|
), ys(() => {
|
|
552
|
-
|
|
552
|
+
p.value.removeListener(o), p.value.removePartialListener(u);
|
|
553
553
|
});
|
|
554
|
-
function
|
|
555
|
-
var
|
|
556
|
-
if (
|
|
557
|
-
|
|
554
|
+
function $(D) {
|
|
555
|
+
var T;
|
|
556
|
+
if (D != null && D._id) {
|
|
557
|
+
p.value.loadPurchaseOrder(D);
|
|
558
558
|
return;
|
|
559
559
|
}
|
|
560
560
|
if (!He().mustUsePoTemplate) {
|
|
561
|
-
|
|
561
|
+
p.value.init();
|
|
562
562
|
return;
|
|
563
563
|
}
|
|
564
|
-
|
|
564
|
+
D != null && D.template && ((T = D.templateDoc) != null && T.purchaseOrder) ? (D.items = D.templateDoc.purchaseOrder.items, p.value.initFromTemplate(D)) : p.value.initOutletToOutlet();
|
|
565
565
|
}
|
|
566
566
|
return {
|
|
567
|
-
controller:
|
|
567
|
+
controller: p,
|
|
568
568
|
state: t,
|
|
569
|
-
init:
|
|
569
|
+
init: $
|
|
570
570
|
};
|
|
571
571
|
}
|
|
572
572
|
var xt = /* @__PURE__ */ ((b) => (b.RECEIVE_REQUEST = "receive/request", b.APPROVAL = "approval", b))(xt || {});
|
|
573
|
-
const Xe =
|
|
573
|
+
const Xe = Z(), bt = Z(), ht = Z();
|
|
574
574
|
function zl(b, s) {
|
|
575
|
-
const
|
|
575
|
+
const n = ft(), c = Me(), v = He(), d = Xt(), p = mt(), t = Ls(), o = Us(), u = Z(!1), k = Qe(), $ = Ye(), D = or(), T = Z(new Array()), S = Z(new Array()), F = Z(
|
|
576
576
|
s != null && s.startDate && (s != null && s.endDate) ? s : Gs()
|
|
577
|
-
),
|
|
578
|
-
const
|
|
577
|
+
), E = j(() => {
|
|
578
|
+
const f = new Date(F.value.startDate), i = new Date(F.value.endDate);
|
|
579
579
|
return {
|
|
580
|
-
start: As(
|
|
580
|
+
start: As(f).toISOString(),
|
|
581
581
|
end: Ts(i).toISOString()
|
|
582
582
|
};
|
|
583
|
-
}),
|
|
584
|
-
async function ge(
|
|
585
|
-
function i(
|
|
583
|
+
}), J = Z(new Array()), z = Ns(), ae = Z(null);
|
|
584
|
+
async function ge(f) {
|
|
585
|
+
function i(M) {
|
|
586
586
|
const G = {
|
|
587
587
|
mode: Bt.CREATE,
|
|
588
|
-
modelValue:
|
|
588
|
+
modelValue: f || void 0,
|
|
589
589
|
show: !0,
|
|
590
|
-
"onUpdate:show"(
|
|
591
|
-
Xe.value.show =
|
|
590
|
+
"onUpdate:show"(ie) {
|
|
591
|
+
Xe.value.show = ie;
|
|
592
592
|
},
|
|
593
|
-
templateId:
|
|
594
|
-
lastClosingDate:
|
|
593
|
+
templateId: M,
|
|
594
|
+
lastClosingDate: ae.value
|
|
595
595
|
};
|
|
596
596
|
Xe.value = G;
|
|
597
597
|
}
|
|
598
|
-
let
|
|
599
|
-
|
|
598
|
+
let O;
|
|
599
|
+
v.mustUsePoTemplate && !(f != null && f.template) ? n.open({
|
|
600
600
|
title: "Create transfer",
|
|
601
601
|
message: "",
|
|
602
602
|
primaryActions: {
|
|
@@ -609,230 +609,230 @@ function zl(b, s) {
|
|
|
609
609
|
close: !0
|
|
610
610
|
}
|
|
611
611
|
}).onPrimary(async () => {
|
|
612
|
-
|
|
612
|
+
O = await t.getTemplateId(), O && i(O);
|
|
613
613
|
}).onSecondary(() => {
|
|
614
614
|
i(void 0);
|
|
615
|
-
}) : i(
|
|
615
|
+
}) : i(O);
|
|
616
616
|
}
|
|
617
|
-
function H(
|
|
617
|
+
function H(f) {
|
|
618
618
|
const i = {
|
|
619
619
|
mode: Bt.UPDATE,
|
|
620
|
-
modelValue: Yt(
|
|
620
|
+
modelValue: Yt(f),
|
|
621
621
|
show: !0,
|
|
622
|
-
"onUpdate:show"(
|
|
623
|
-
Xe.value.show =
|
|
622
|
+
"onUpdate:show"(O) {
|
|
623
|
+
Xe.value.show = O;
|
|
624
624
|
},
|
|
625
|
-
lastClosingDate:
|
|
625
|
+
lastClosingDate: ae.value
|
|
626
626
|
};
|
|
627
627
|
Xe.value = i;
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
if (!
|
|
629
|
+
function R(f) {
|
|
630
|
+
if (!p.currentBusiness.value) return;
|
|
631
631
|
const i = c.currentLocation;
|
|
632
632
|
if (i.type === "restaurant") {
|
|
633
633
|
const ee = c.locationRestaurantFromCore(i.doc._id);
|
|
634
634
|
ee !== null && (i.doc = ee);
|
|
635
635
|
}
|
|
636
|
-
const
|
|
637
|
-
po:
|
|
636
|
+
const O = ts({
|
|
637
|
+
po: f,
|
|
638
638
|
currentLocation: i,
|
|
639
|
-
business:
|
|
639
|
+
business: p.currentBusiness.value,
|
|
640
640
|
fulfilling: b === "approval",
|
|
641
|
-
por:
|
|
641
|
+
por: f.request
|
|
642
642
|
});
|
|
643
|
-
if (!
|
|
644
|
-
const
|
|
643
|
+
if (!O) return;
|
|
644
|
+
const M = Qt(O.html), G = d.supplierById[f.supplier._id], ie = {
|
|
645
645
|
recipientName: G.name,
|
|
646
646
|
email: (G == null ? void 0 : G.email) ?? "",
|
|
647
|
-
business:
|
|
648
|
-
modelValue:
|
|
647
|
+
business: p.currentBusiness.value,
|
|
648
|
+
modelValue: M,
|
|
649
649
|
show: !0,
|
|
650
650
|
"onUpdate:show"(ee) {
|
|
651
651
|
bt.value.show = ee;
|
|
652
652
|
}
|
|
653
653
|
};
|
|
654
|
-
bt.value =
|
|
654
|
+
bt.value = ie;
|
|
655
655
|
}
|
|
656
656
|
async function ne() {
|
|
657
|
-
|
|
657
|
+
T.value = [], S.value = [], u.value = !0;
|
|
658
658
|
try {
|
|
659
|
-
const
|
|
660
|
-
|
|
661
|
-
const i =
|
|
662
|
-
|
|
663
|
-
const
|
|
664
|
-
G && (
|
|
665
|
-
const
|
|
659
|
+
const f = await $.getPurchaseOrders(E.value);
|
|
660
|
+
T.value = f.sort((ee, ke) => ke._id.localeCompare(ee._id));
|
|
661
|
+
const i = f.flatMap((ee) => ee.shipmentIds || []).filter(Boolean), O = i.length > 0 ? await D.getShipmentsByIds(i) : [];
|
|
662
|
+
S.value = O;
|
|
663
|
+
const M = await z.readCurrentLocationLastClosing(!0), G = M == null ? void 0 : M._id;
|
|
664
|
+
G && (ae.value = $s(G)), await v.awaitFeatureLoaded(() => v.mustUsePoTemplate) && await o.fetchTemplates();
|
|
665
|
+
const ie = T.value.map((ee) => {
|
|
666
666
|
var ke;
|
|
667
667
|
return ((ke = ee.request) == null ? void 0 : ke.id) ?? "";
|
|
668
668
|
}).filter((ee) => ee);
|
|
669
|
-
|
|
669
|
+
J.value = await $.readRequestByIds(ie);
|
|
670
670
|
} catch {
|
|
671
|
-
|
|
671
|
+
k.open({
|
|
672
672
|
title: "Something went wrong",
|
|
673
673
|
message: "Error at fetching purchase orders",
|
|
674
674
|
type: "error"
|
|
675
675
|
});
|
|
676
676
|
} finally {
|
|
677
|
-
|
|
677
|
+
u.value = !1;
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
|
-
async function
|
|
681
|
-
|
|
680
|
+
async function P() {
|
|
681
|
+
J.value = [], u.value = !0;
|
|
682
682
|
try {
|
|
683
|
-
|
|
683
|
+
J.value = await $.readRequests(
|
|
684
684
|
void 0,
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
).then((
|
|
685
|
+
E.value.start,
|
|
686
|
+
E.value.end
|
|
687
|
+
).then((f) => f.reverse());
|
|
688
688
|
} catch {
|
|
689
|
-
|
|
689
|
+
k.open({
|
|
690
690
|
title: "Something went wrong",
|
|
691
691
|
message: "Error at fetching purchase requests",
|
|
692
692
|
type: "error"
|
|
693
693
|
});
|
|
694
694
|
} finally {
|
|
695
|
-
|
|
695
|
+
u.value = !1;
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function C() {
|
|
699
699
|
switch (b) {
|
|
700
700
|
case "receive/request":
|
|
701
701
|
return ne();
|
|
702
702
|
case "approval":
|
|
703
|
-
return
|
|
703
|
+
return P();
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
|
-
function K(
|
|
707
|
-
|
|
708
|
-
startDate:
|
|
706
|
+
function K(f, i) {
|
|
707
|
+
F.value = {
|
|
708
|
+
startDate: f,
|
|
709
709
|
endDate: i
|
|
710
|
-
},
|
|
710
|
+
}, C();
|
|
711
711
|
}
|
|
712
|
-
c.watchLocation(async (
|
|
713
|
-
if (!
|
|
714
|
-
|
|
712
|
+
c.watchLocation(async (f) => {
|
|
713
|
+
if (!f) {
|
|
714
|
+
T.value = [];
|
|
715
715
|
return;
|
|
716
716
|
}
|
|
717
|
-
await
|
|
717
|
+
await C();
|
|
718
718
|
});
|
|
719
|
-
const
|
|
720
|
-
async function be(
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
(ee) => ee.purchaseOrderId ===
|
|
719
|
+
const N = Z(), X = Z(Math.random().toString());
|
|
720
|
+
async function be(f, i) {
|
|
721
|
+
const O = Math.random().toString();
|
|
722
|
+
X.value = O, i ?? (i = J.value.computeFirst(
|
|
723
|
+
(ee) => ee.purchaseOrderId === f._id ? ee : null
|
|
724
724
|
) ?? void 0);
|
|
725
|
-
const
|
|
725
|
+
const M = b === "receive/request" ? c.currentLocation : i == null ? void 0 : i.to, G = b === "approval", ie = {
|
|
726
726
|
poRequest: i,
|
|
727
727
|
purchaseOrder: {
|
|
728
|
-
...
|
|
729
|
-
status: G && (i != null && i.rejectedAt) ? ve.Enum.REJECT :
|
|
728
|
+
...f,
|
|
729
|
+
status: G && (i != null && i.rejectedAt) ? ve.Enum.REJECT : f.status
|
|
730
730
|
},
|
|
731
|
-
transferTo:
|
|
732
|
-
transferToDbName:
|
|
731
|
+
transferTo: M == null ? void 0 : M.name,
|
|
732
|
+
transferToDbName: M == null ? void 0 : M.dbName,
|
|
733
733
|
show: !0,
|
|
734
734
|
canResubmit: !1,
|
|
735
735
|
canApprove: G,
|
|
736
736
|
"onUpdate:show"(ee) {
|
|
737
|
-
|
|
737
|
+
N.value.show = ee;
|
|
738
738
|
},
|
|
739
739
|
scope: b,
|
|
740
|
-
receivedMap: ct(
|
|
741
|
-
shipments:
|
|
740
|
+
receivedMap: ct(f) ?? {},
|
|
741
|
+
shipments: S.value
|
|
742
742
|
};
|
|
743
|
-
|
|
743
|
+
N.value = ie;
|
|
744
744
|
}
|
|
745
|
-
async function ye(
|
|
746
|
-
const
|
|
747
|
-
|
|
745
|
+
async function ye(f, i, O, M, G) {
|
|
746
|
+
const ie = os();
|
|
747
|
+
u.value = !0;
|
|
748
748
|
try {
|
|
749
|
-
await
|
|
749
|
+
await ie({
|
|
750
750
|
operate: {
|
|
751
751
|
operation: i,
|
|
752
|
-
doc:
|
|
752
|
+
doc: f,
|
|
753
753
|
options: (
|
|
754
754
|
// auto receive for supplier to warehouse
|
|
755
|
-
(i ===
|
|
756
|
-
i ===
|
|
755
|
+
(i === V.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
756
|
+
i === V.enum.completeReceive) && v.autoReceiveWarehouse ? {
|
|
757
757
|
autoReceive: !0
|
|
758
758
|
} : void 0
|
|
759
759
|
)
|
|
760
760
|
},
|
|
761
761
|
operateV2: {
|
|
762
|
-
_id:
|
|
763
|
-
_rev:
|
|
764
|
-
action: i ===
|
|
762
|
+
_id: f._id,
|
|
763
|
+
_rev: f._rev ?? "",
|
|
764
|
+
action: i === V.enum.submitRequest ? V.enum.confirmDraft : i,
|
|
765
765
|
payloads: G ?? []
|
|
766
766
|
},
|
|
767
|
-
transferTo:
|
|
768
|
-
}), await new Promise((
|
|
767
|
+
transferTo: M
|
|
768
|
+
}), await new Promise((le) => setTimeout(le, 1e3));
|
|
769
769
|
const ke = Me().currentLocationDBName.startsWith("restaurant_");
|
|
770
|
-
i ===
|
|
770
|
+
i === V.enum.confirmDraft && f.effectiveAt && ke ? k.open({
|
|
771
771
|
title: "Success",
|
|
772
|
-
message: `${
|
|
772
|
+
message: `${O}. The backdate will be reflected once your POS has received this change.`,
|
|
773
773
|
type: "success"
|
|
774
|
-
}) :
|
|
774
|
+
}) : k.open({
|
|
775
775
|
title: "Success",
|
|
776
|
-
message:
|
|
776
|
+
message: O,
|
|
777
777
|
type: "success"
|
|
778
778
|
});
|
|
779
779
|
} catch (ee) {
|
|
780
|
-
|
|
780
|
+
k.open({
|
|
781
781
|
title: "Something went wrong",
|
|
782
782
|
message: ee instanceof Error ? ee.message : "Please try again.",
|
|
783
783
|
type: "error"
|
|
784
|
-
}), console.error("Error when submitting PO operation", i,
|
|
784
|
+
}), console.error("Error when submitting PO operation", i, f, ee);
|
|
785
785
|
} finally {
|
|
786
|
-
|
|
786
|
+
u.value = !1, C();
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
|
-
async function pe(
|
|
790
|
-
const
|
|
791
|
-
if (!
|
|
792
|
-
|
|
789
|
+
async function pe(f, i, O) {
|
|
790
|
+
const M = ss[i];
|
|
791
|
+
if (!M) {
|
|
792
|
+
k.open({
|
|
793
793
|
title: "Something went wrong",
|
|
794
794
|
message: `Cannot process order: ${Ot(i)}`,
|
|
795
795
|
type: "error"
|
|
796
796
|
});
|
|
797
797
|
return;
|
|
798
798
|
}
|
|
799
|
-
const { successMessage: G, ...
|
|
800
|
-
if (i ===
|
|
801
|
-
let
|
|
802
|
-
|
|
803
|
-
title:
|
|
804
|
-
message:
|
|
805
|
-
primaryActions:
|
|
799
|
+
const { successMessage: G, ...ie } = M;
|
|
800
|
+
if (i === V.enum.rejectDraft) {
|
|
801
|
+
let le = "";
|
|
802
|
+
n.open({
|
|
803
|
+
title: ie.title,
|
|
804
|
+
message: ie.message,
|
|
805
|
+
primaryActions: ie.primaryActions,
|
|
806
806
|
contentComponent: rs,
|
|
807
807
|
contentComponentProps: {
|
|
808
|
-
message:
|
|
809
|
-
onChange: (r) =>
|
|
808
|
+
message: ie.message,
|
|
809
|
+
onChange: (r) => le = r
|
|
810
810
|
}
|
|
811
811
|
}).onPrimary(() => {
|
|
812
812
|
const r = [];
|
|
813
813
|
r.push({
|
|
814
814
|
action: "rejectDraft",
|
|
815
815
|
payload: {
|
|
816
|
-
rejectReason:
|
|
816
|
+
rejectReason: le
|
|
817
817
|
}
|
|
818
|
-
}), ye(
|
|
818
|
+
}), ye(f, i, G, O, r);
|
|
819
819
|
});
|
|
820
820
|
return;
|
|
821
821
|
}
|
|
822
822
|
const ee = [], ke = ns();
|
|
823
|
-
ke.init(
|
|
823
|
+
ke.init(f), (i === V.enum.confirmDraft || i === V.enum.submitRequest) && ee.push({
|
|
824
824
|
action: "confirmDraft",
|
|
825
825
|
payload: ke.controller.value.toConfirmDraftData(De())
|
|
826
|
-
}),
|
|
827
|
-
title:
|
|
828
|
-
message:
|
|
829
|
-
primaryActions:
|
|
826
|
+
}), n.open({
|
|
827
|
+
title: ie.title,
|
|
828
|
+
message: ie.message,
|
|
829
|
+
primaryActions: ie.primaryActions
|
|
830
830
|
}).onPrimary(() => {
|
|
831
|
-
ye(
|
|
831
|
+
ye(f, i, G, O, ee);
|
|
832
832
|
});
|
|
833
833
|
}
|
|
834
834
|
async function fe() {
|
|
835
|
-
|
|
835
|
+
n.open({
|
|
836
836
|
title: "Upload Transfer",
|
|
837
837
|
primaryActions: {
|
|
838
838
|
text: "Xilnex transfer note",
|
|
@@ -843,46 +843,46 @@ function zl(b, s) {
|
|
|
843
843
|
close: !0
|
|
844
844
|
}
|
|
845
845
|
}).onPrimary(() => {
|
|
846
|
-
const
|
|
846
|
+
const f = {
|
|
847
847
|
show: !0,
|
|
848
848
|
"onUpdate:show"(i) {
|
|
849
849
|
ht.value.show = i;
|
|
850
850
|
}
|
|
851
851
|
};
|
|
852
|
-
ht.value =
|
|
852
|
+
ht.value = f;
|
|
853
853
|
});
|
|
854
854
|
}
|
|
855
855
|
return {
|
|
856
|
-
purchaseOrders:
|
|
857
|
-
shipments:
|
|
858
|
-
purchaseRequests:
|
|
856
|
+
purchaseOrders: T,
|
|
857
|
+
shipments: S,
|
|
858
|
+
purchaseRequests: J,
|
|
859
859
|
updateDateRange: K,
|
|
860
|
-
fetchData:
|
|
861
|
-
loading:
|
|
860
|
+
fetchData: C,
|
|
861
|
+
loading: u,
|
|
862
862
|
transferDialogProps: Xe,
|
|
863
863
|
promptCreateTransferDialog: ge,
|
|
864
864
|
promptUpdateTransferDialog: H,
|
|
865
|
-
transferDetailsProps:
|
|
865
|
+
transferDetailsProps: N,
|
|
866
866
|
promptShowTransferDetails: be,
|
|
867
867
|
submitAction: pe,
|
|
868
868
|
xilnexImportDialogProps: ht,
|
|
869
869
|
promptUploadTransferDialog: fe,
|
|
870
870
|
emailDialogProps: bt,
|
|
871
|
-
promptEmailDialog:
|
|
871
|
+
promptEmailDialog: R
|
|
872
872
|
};
|
|
873
873
|
}
|
|
874
874
|
function cr(b) {
|
|
875
|
-
const { po: s, currentLocation:
|
|
876
|
-
name:
|
|
877
|
-
legalName:
|
|
878
|
-
registrationNumber:
|
|
875
|
+
const { po: s, currentLocation: n, business: c, fulfilling: v, por: d } = b, { name: p, address: t, regNo: o, legalName: u } = n.doc.profile, k = {
|
|
876
|
+
name: p,
|
|
877
|
+
legalName: u,
|
|
878
|
+
registrationNumber: o,
|
|
879
879
|
line1: t == null ? void 0 : t.line1,
|
|
880
880
|
line2: t == null ? void 0 : t.line2,
|
|
881
881
|
postcode: t == null ? void 0 : t.postcode,
|
|
882
882
|
city: t == null ? void 0 : t.city,
|
|
883
883
|
state: t == null ? void 0 : t.state,
|
|
884
884
|
country: t == null ? void 0 : t.country
|
|
885
|
-
},
|
|
885
|
+
}, $ = {
|
|
886
886
|
name: s.supplier.name,
|
|
887
887
|
phoneNumber: s.supplier.phoneNumber,
|
|
888
888
|
registrationNumber: s.supplier.registrationNumber,
|
|
@@ -892,123 +892,123 @@ function cr(b) {
|
|
|
892
892
|
city: s.supplier.address.city,
|
|
893
893
|
state: s.supplier.address.state,
|
|
894
894
|
country: s.supplier.address.country
|
|
895
|
-
},
|
|
896
|
-
const { sku:
|
|
895
|
+
}, D = s.items.map((H) => {
|
|
896
|
+
const { sku: R, measurement: ne } = H, P = xe(
|
|
897
897
|
es(H.sku, s.deliveryOrder || []),
|
|
898
898
|
!1
|
|
899
899
|
);
|
|
900
900
|
return {
|
|
901
|
-
code:
|
|
902
|
-
description:
|
|
901
|
+
code: R.code,
|
|
902
|
+
description: R.name,
|
|
903
903
|
quantity: xe(H.quantity, !1),
|
|
904
|
-
unit: (ne == null ? void 0 : ne.abbrev) ||
|
|
905
|
-
received:
|
|
904
|
+
unit: (ne == null ? void 0 : ne.abbrev) || R.unit.abbrev,
|
|
905
|
+
received: P,
|
|
906
906
|
cost: H.totalCost ? `${H.totalCost.currency} ${Ze.toFormatString({
|
|
907
907
|
value: H.totalCost
|
|
908
908
|
})}` : void 0
|
|
909
909
|
};
|
|
910
|
-
}),
|
|
910
|
+
}), T = s.deliveryOrder.map((H) => ({
|
|
911
911
|
createdAt: wt(new Date(H.createdAt)),
|
|
912
912
|
ref: H.deliveryOrderNumber,
|
|
913
913
|
remark: H.remark || "",
|
|
914
|
-
items: H.received.map((
|
|
914
|
+
items: H.received.map((R) => {
|
|
915
915
|
var ne;
|
|
916
916
|
return {
|
|
917
|
-
code:
|
|
918
|
-
description:
|
|
919
|
-
quantity: xe(
|
|
920
|
-
unit: ((ne =
|
|
917
|
+
code: R.sku.code,
|
|
918
|
+
description: R.sku.name,
|
|
919
|
+
quantity: xe(R.amount),
|
|
920
|
+
unit: ((ne = R.measurement) == null ? void 0 : ne.abbrev) || R.sku.unit.abbrev
|
|
921
921
|
};
|
|
922
922
|
})
|
|
923
|
-
})),
|
|
923
|
+
})), S = [
|
|
924
924
|
// Production
|
|
925
925
|
"67ca5d2c80bd0e001c5bf5bc",
|
|
926
926
|
// Dev
|
|
927
927
|
"6880b36a3054c5001db19218"
|
|
928
928
|
];
|
|
929
|
-
let
|
|
930
|
-
if (s.supplier.internal ? (
|
|
931
|
-
const H =
|
|
932
|
-
|
|
929
|
+
let F = "Inventory Receive Note";
|
|
930
|
+
if (s.supplier.internal ? (F = "Inventory Transfer Note", S.includes((c == null ? void 0 : c._id) || "") && (F = "Stock Request")) : F = "Purchase Order", d) {
|
|
931
|
+
const H = d.from.dbName;
|
|
932
|
+
n.dbName === H || (F = "Inventory Receive Note");
|
|
933
933
|
}
|
|
934
|
-
const
|
|
935
|
-
title:
|
|
934
|
+
const J = {
|
|
935
|
+
title: F,
|
|
936
936
|
businessName: c == null ? void 0 : c.name,
|
|
937
937
|
logo: c == null ? void 0 : c.thumbnail,
|
|
938
938
|
orderNumber: s.seqNumber.toString(),
|
|
939
939
|
createdAt: st(s._id),
|
|
940
940
|
ref: s.ref || "",
|
|
941
941
|
remark: s.remark || "",
|
|
942
|
-
buyer:
|
|
943
|
-
supplier:
|
|
944
|
-
items:
|
|
942
|
+
buyer: k,
|
|
943
|
+
supplier: $,
|
|
944
|
+
items: D,
|
|
945
945
|
status: s.status,
|
|
946
|
-
deliveryOrders:
|
|
947
|
-
}, z = new URL(window.location.href),
|
|
948
|
-
z.pathname = z.hostname.includes("portal.feedme") ? `/inventory/${
|
|
949
|
-
const ge = Es.compressToEncodedURIComponent(JSON.stringify(
|
|
946
|
+
deliveryOrders: T
|
|
947
|
+
}, z = new URL(window.location.href), ae = v && (s.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
948
|
+
z.pathname = z.hostname.includes("portal.feedme") ? `/inventory/${ae}` : `/${ae}`;
|
|
949
|
+
const ge = Es.compressToEncodedURIComponent(JSON.stringify(J));
|
|
950
950
|
z.searchParams.append("data", ge), window.open(z.href, "_blank", "noreferrer");
|
|
951
951
|
}
|
|
952
952
|
const je = {
|
|
953
953
|
submitRequest: {
|
|
954
954
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
955
955
|
color: "text-fm-color-typo-primary",
|
|
956
|
-
value:
|
|
956
|
+
value: V.enum.submitRequest
|
|
957
957
|
},
|
|
958
958
|
confirmDraft: {
|
|
959
959
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
960
960
|
color: "text-fm-color-typo-primary",
|
|
961
|
-
value:
|
|
961
|
+
value: V.enum.confirmDraft
|
|
962
962
|
},
|
|
963
963
|
cancelDraft: {
|
|
964
964
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
965
965
|
color: "text-fm-color-typo-error",
|
|
966
|
-
value:
|
|
966
|
+
value: V.enum.cancelDraft
|
|
967
967
|
},
|
|
968
968
|
approveRequest: {
|
|
969
969
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
970
970
|
color: "text-fm-color-typo-primary",
|
|
971
|
-
value:
|
|
971
|
+
value: V.enum.approveRequest
|
|
972
972
|
},
|
|
973
973
|
rejectRequest: {
|
|
974
974
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
975
975
|
color: "text-fm-color-typo-error",
|
|
976
|
-
value:
|
|
976
|
+
value: V.enum.rejectRequest
|
|
977
977
|
},
|
|
978
978
|
processRequest: {
|
|
979
979
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
980
980
|
color: "text-fm-color-typo-primary",
|
|
981
|
-
value:
|
|
981
|
+
value: V.enum.processRequest
|
|
982
982
|
},
|
|
983
983
|
receiveStock: {
|
|
984
984
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
985
985
|
color: "text-fm-color-typo-primary",
|
|
986
|
-
value:
|
|
986
|
+
value: V.enum.receiveStock
|
|
987
987
|
},
|
|
988
988
|
completeReceive: {
|
|
989
989
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
990
990
|
color: "text-fm-color-typo-primary",
|
|
991
|
-
value:
|
|
991
|
+
value: V.enum.completeReceive
|
|
992
992
|
},
|
|
993
993
|
closeRequest: {
|
|
994
994
|
translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
|
|
995
995
|
color: "system-error-300",
|
|
996
|
-
value:
|
|
996
|
+
value: V.enum.closeRequest
|
|
997
997
|
},
|
|
998
998
|
approveDraft: {
|
|
999
999
|
translationKey: "inventory.transfer.receiveRequest.actions.approveDraft",
|
|
1000
1000
|
color: "text-fm-color-typo-primary",
|
|
1001
|
-
value:
|
|
1001
|
+
value: V.enum.approveDraft
|
|
1002
1002
|
},
|
|
1003
1003
|
rejectDraft: {
|
|
1004
1004
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectDraft",
|
|
1005
1005
|
color: "text-fm-color-typo-error",
|
|
1006
|
-
value:
|
|
1006
|
+
value: V.enum.rejectDraft
|
|
1007
1007
|
},
|
|
1008
1008
|
returnStock: {
|
|
1009
1009
|
translationKey: "inventory.transfer.receiveRequest.actions.returnStock",
|
|
1010
1010
|
color: "text-fm-color-typo-primary",
|
|
1011
|
-
value:
|
|
1011
|
+
value: V.enum.returnStock
|
|
1012
1012
|
}
|
|
1013
1013
|
};
|
|
1014
1014
|
function as() {
|
|
@@ -1022,12 +1022,12 @@ function as() {
|
|
|
1022
1022
|
ableToMarkApproved(s) {
|
|
1023
1023
|
return !(!s || (s == null ? void 0 : s.status) !== ve.enum.REQUESTING);
|
|
1024
1024
|
},
|
|
1025
|
-
ableToCreateFulfillment(s,
|
|
1026
|
-
var
|
|
1027
|
-
if (!b.acceptRequireFulfillment || !s || !
|
|
1025
|
+
ableToCreateFulfillment(s, n) {
|
|
1026
|
+
var d, p;
|
|
1027
|
+
if (!b.acceptRequireFulfillment || !s || !n || s.status !== ve.enum.PROCESSING || !n.processedAt)
|
|
1028
1028
|
return !1;
|
|
1029
|
-
const c = (
|
|
1030
|
-
return !(c.startsWith("restaurant_") &&
|
|
1029
|
+
const c = (d = n == null ? void 0 : n.from) == null ? void 0 : d.dbName, v = (p = n == null ? void 0 : n.to) == null ? void 0 : p.dbName;
|
|
1030
|
+
return !(c.startsWith("restaurant_") && v.startsWith("restaurant_"));
|
|
1031
1031
|
}
|
|
1032
1032
|
};
|
|
1033
1033
|
}
|
|
@@ -1042,45 +1042,45 @@ function ls() {
|
|
|
1042
1042
|
hasOrderDraftPermission: hs(s)
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
1045
|
-
function Kl(b, s,
|
|
1046
|
-
const c = Me(),
|
|
1047
|
-
() =>
|
|
1048
|
-
),
|
|
1049
|
-
() =>
|
|
1045
|
+
function Kl(b, s, n) {
|
|
1046
|
+
const c = Me(), v = pt(), d = mt(), p = as(), { t } = dt(), { hasOrderDraftPermission: o } = ls(), u = He(), k = j(
|
|
1047
|
+
() => u.enablePrintTemplate ? [Pe[Se.PrintCustom]] : []
|
|
1048
|
+
), $ = j(
|
|
1049
|
+
() => u.enablePurchaseOrderEmail ? [Pe[Se.Email]] : []
|
|
1050
1050
|
);
|
|
1051
|
-
function
|
|
1052
|
-
switch (
|
|
1051
|
+
function D(R) {
|
|
1052
|
+
switch (R.status) {
|
|
1053
1053
|
case "DRAFT":
|
|
1054
1054
|
return [
|
|
1055
1055
|
Pe[Se.Update],
|
|
1056
1056
|
Pe[Se.Details],
|
|
1057
|
-
|
|
1058
|
-
je[
|
|
1057
|
+
R.supplier.internal === "restaurant" || R.supplier.internal === "warehouse" ? je[V.enum.submitRequest] : je[V.enum.confirmDraft],
|
|
1058
|
+
je[V.enum.cancelDraft]
|
|
1059
1059
|
];
|
|
1060
1060
|
case "RECEIVING":
|
|
1061
1061
|
return [
|
|
1062
|
-
...
|
|
1062
|
+
...p.ableToMarkReceived(R) ? [je[V.enum.completeReceive]] : [],
|
|
1063
1063
|
Pe[Se.Details],
|
|
1064
1064
|
Pe[Se.Print],
|
|
1065
|
-
...
|
|
1066
|
-
|
|
1065
|
+
...k.value,
|
|
1066
|
+
...$.value
|
|
1067
1067
|
];
|
|
1068
1068
|
case "PENDING_APPROVAL": {
|
|
1069
|
-
const
|
|
1070
|
-
return
|
|
1069
|
+
const P = [Pe[Se.Details]];
|
|
1070
|
+
return o.value && P.push(
|
|
1071
1071
|
Pe[Se.Update],
|
|
1072
|
-
je[
|
|
1073
|
-
je[
|
|
1074
|
-
),
|
|
1072
|
+
je[V.enum.approveDraft],
|
|
1073
|
+
je[V.enum.rejectDraft]
|
|
1074
|
+
), P;
|
|
1075
1075
|
}
|
|
1076
1076
|
case "REQUESTING":
|
|
1077
1077
|
return b === "receive/request" ? [
|
|
1078
1078
|
Pe[Se.Details],
|
|
1079
1079
|
Pe[Se.Print],
|
|
1080
|
-
...
|
|
1080
|
+
...k.value
|
|
1081
1081
|
] : [
|
|
1082
|
-
je[
|
|
1083
|
-
je[
|
|
1082
|
+
je[V.enum.approveRequest],
|
|
1083
|
+
je[V.enum.rejectRequest],
|
|
1084
1084
|
Pe[Se.Details]
|
|
1085
1085
|
// DefaultRowActions[RowActionEnum.Print]
|
|
1086
1086
|
];
|
|
@@ -1088,7 +1088,7 @@ function Kl(b, s, o) {
|
|
|
1088
1088
|
return [
|
|
1089
1089
|
Pe[Se.Details],
|
|
1090
1090
|
Pe[Se.Print],
|
|
1091
|
-
...
|
|
1091
|
+
...k.value
|
|
1092
1092
|
];
|
|
1093
1093
|
case "COMPLETE":
|
|
1094
1094
|
case "CANCEL":
|
|
@@ -1096,57 +1096,57 @@ function Kl(b, s, o) {
|
|
|
1096
1096
|
return [
|
|
1097
1097
|
Pe[Se.Details],
|
|
1098
1098
|
Pe[Se.Print],
|
|
1099
|
-
...
|
|
1099
|
+
...k.value
|
|
1100
1100
|
];
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1104
|
-
return Object.values(
|
|
1103
|
+
function T(R) {
|
|
1104
|
+
return Object.values(V.enum).includes(R);
|
|
1105
1105
|
}
|
|
1106
|
-
async function
|
|
1107
|
-
var K,
|
|
1108
|
-
const
|
|
1109
|
-
if (
|
|
1110
|
-
const
|
|
1111
|
-
if (
|
|
1112
|
-
const
|
|
1113
|
-
|
|
1106
|
+
async function S(R, ne, P) {
|
|
1107
|
+
var K, N, X, be, ye, pe, fe;
|
|
1108
|
+
const C = Yt(ne);
|
|
1109
|
+
if (R === Se.Print || R === Se.PrintCustom) {
|
|
1110
|
+
const f = (P == null ? void 0 : P.toInventoryLocation) ?? c.currentLocation;
|
|
1111
|
+
if (f.type === "restaurant") {
|
|
1112
|
+
const O = c.locationRestaurantFromCore(f.doc._id);
|
|
1113
|
+
O !== null && (f.doc = O);
|
|
1114
1114
|
}
|
|
1115
|
-
((K =
|
|
1115
|
+
((K = P == null ? void 0 : P.netSuite) != null && K.refNo || (N = C.netSuite) != null && N.refNo) && (C.ref = [((X = P == null ? void 0 : P.netSuite) == null ? void 0 : X.refNo) || ((be = C.netSuite) == null ? void 0 : be.refNo)].filter((O) => O).join(" "));
|
|
1116
1116
|
const i = {
|
|
1117
|
-
po:
|
|
1118
|
-
currentLocation:
|
|
1119
|
-
business:
|
|
1117
|
+
po: C,
|
|
1118
|
+
currentLocation: f,
|
|
1119
|
+
business: d.currentBusiness.value,
|
|
1120
1120
|
fulfilling: b === "approval",
|
|
1121
|
-
por:
|
|
1121
|
+
por: P
|
|
1122
1122
|
};
|
|
1123
|
-
if (
|
|
1124
|
-
const
|
|
1125
|
-
|
|
1123
|
+
if (R === Se.PrintCustom) {
|
|
1124
|
+
const O = ts(i);
|
|
1125
|
+
O && (ae.value = O.html, ge.value = O.templateName, H.value = O.isDefault, z.value = !0);
|
|
1126
1126
|
} else
|
|
1127
1127
|
cr(i);
|
|
1128
1128
|
return;
|
|
1129
1129
|
}
|
|
1130
|
-
if (
|
|
1131
|
-
s.promptShowTransferDetails(
|
|
1130
|
+
if (R === Se.Details) {
|
|
1131
|
+
s.promptShowTransferDetails(C, P);
|
|
1132
1132
|
return;
|
|
1133
1133
|
}
|
|
1134
|
-
if (
|
|
1135
|
-
(ye = s.promptUpdateTransferDialog) == null || ye.call(s,
|
|
1134
|
+
if (R === Se.Update) {
|
|
1135
|
+
(ye = s.promptUpdateTransferDialog) == null || ye.call(s, C);
|
|
1136
1136
|
return;
|
|
1137
1137
|
}
|
|
1138
|
-
if (
|
|
1139
|
-
(pe = s.promptEmailDialog) == null || pe.call(s,
|
|
1138
|
+
if (R === Se.Email) {
|
|
1139
|
+
(pe = s.promptEmailDialog) == null || pe.call(s, C);
|
|
1140
1140
|
return;
|
|
1141
1141
|
}
|
|
1142
|
-
if (
|
|
1143
|
-
s.submitAction(ne,
|
|
1142
|
+
if (T(R)) {
|
|
1143
|
+
s.submitAction(ne, R, (fe = P == null ? void 0 : P.to) == null ? void 0 : fe.dbName);
|
|
1144
1144
|
return;
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1147
|
+
function F() {
|
|
1148
1148
|
var ne;
|
|
1149
|
-
const
|
|
1149
|
+
const R = [
|
|
1150
1150
|
{
|
|
1151
1151
|
accessorKey: "seqNumber",
|
|
1152
1152
|
header: () => t("inventory.transfer.table.seqNo"),
|
|
@@ -1157,8 +1157,8 @@ function Kl(b, s, o) {
|
|
|
1157
1157
|
{
|
|
1158
1158
|
accessorKey: "_id",
|
|
1159
1159
|
header: () => t("inventory.transfer.table.createdAt"),
|
|
1160
|
-
cell(
|
|
1161
|
-
return st(`${
|
|
1160
|
+
cell(P) {
|
|
1161
|
+
return st(`${P.getValue()}`);
|
|
1162
1162
|
},
|
|
1163
1163
|
enableSorting: !0
|
|
1164
1164
|
},
|
|
@@ -1171,11 +1171,11 @@ function Kl(b, s, o) {
|
|
|
1171
1171
|
{
|
|
1172
1172
|
accessorKey: "items.length",
|
|
1173
1173
|
header: () => t("inventory.transfer.table.noOfItems"),
|
|
1174
|
-
cell: (
|
|
1175
|
-
const
|
|
1174
|
+
cell: (P) => {
|
|
1175
|
+
const C = P.row.original.version || "1", K = P.getValue();
|
|
1176
1176
|
return Y("div", { class: "flex items-center gap-2" }, [
|
|
1177
1177
|
K,
|
|
1178
|
-
|
|
1178
|
+
C !== "1" ? Y(
|
|
1179
1179
|
"div",
|
|
1180
1180
|
{ class: "py-3" },
|
|
1181
1181
|
Y(
|
|
@@ -1185,7 +1185,7 @@ function Kl(b, s, o) {
|
|
|
1185
1185
|
{
|
|
1186
1186
|
class: ["fm-status-badge", "fm-status-badge-draft"].join(" ")
|
|
1187
1187
|
},
|
|
1188
|
-
`v${
|
|
1188
|
+
`v${C}`
|
|
1189
1189
|
)
|
|
1190
1190
|
)
|
|
1191
1191
|
) : null
|
|
@@ -1202,12 +1202,12 @@ function Kl(b, s, o) {
|
|
|
1202
1202
|
enableSorting: !1,
|
|
1203
1203
|
size: "auto"
|
|
1204
1204
|
},
|
|
1205
|
-
...(ne =
|
|
1205
|
+
...(ne = d.sessionUser.value) != null && ne.role.isAdmin ? [
|
|
1206
1206
|
{
|
|
1207
1207
|
id: "statusForAdmin",
|
|
1208
1208
|
header: () => Y(We, {}, () => `${t("inventory.transfer.table.status")}`),
|
|
1209
|
-
cell(
|
|
1210
|
-
return
|
|
1209
|
+
cell(P) {
|
|
1210
|
+
return P.row.original.status;
|
|
1211
1211
|
},
|
|
1212
1212
|
enableSorting: !0,
|
|
1213
1213
|
size: 200
|
|
@@ -1216,17 +1216,17 @@ function Kl(b, s, o) {
|
|
|
1216
1216
|
{
|
|
1217
1217
|
accessorKey: "status",
|
|
1218
1218
|
header: () => t("inventory.transfer.table.status"),
|
|
1219
|
-
cell(
|
|
1220
|
-
const
|
|
1221
|
-
let ye = t(`inventory.transfer.status.${be}`), pe = `${
|
|
1219
|
+
cell(P) {
|
|
1220
|
+
const C = P.getValue(), K = ct(P.row.original), { partial: N, over: X } = _t(K), be = St(C ?? "", N, X);
|
|
1221
|
+
let ye = t(`inventory.transfer.status.${be}`), pe = `${C ?? ""}`.toLocaleLowerCase("en-us");
|
|
1222
1222
|
be === ve.enum.CLOSE && (ye = `${t(`inventory.transfer.status.${ve.enum.COMPLETE}`)}`), be === "PARTIAL_RECEIVED" && pe === ve.enum.PROCESSING.toLocaleLowerCase("en-us") && (pe = ve.enum.RECEIVING.toLocaleLowerCase("en-us"));
|
|
1223
1223
|
let fe = null;
|
|
1224
|
-
const
|
|
1225
|
-
if (
|
|
1226
|
-
const i =
|
|
1224
|
+
const f = n.value.find((i) => i.ref === P.row.original._id);
|
|
1225
|
+
if (f != null && f.milestones && f.milestones.length > 0) {
|
|
1226
|
+
const i = f.milestones[f.milestones.length - 1];
|
|
1227
1227
|
if (i.estimatedTime) {
|
|
1228
|
-
const
|
|
1229
|
-
fe = `${
|
|
1228
|
+
const O = new Date(i.estimatedTime), M = O.getDate().toString().padStart(2, "0");
|
|
1229
|
+
fe = `${O.toLocaleString("en-US", { month: "short" })} ${M}`;
|
|
1230
1230
|
}
|
|
1231
1231
|
}
|
|
1232
1232
|
return Y(
|
|
@@ -1244,7 +1244,7 @@ function Kl(b, s, o) {
|
|
|
1244
1244
|
class: [
|
|
1245
1245
|
"fm-status-badge",
|
|
1246
1246
|
`fm-status-badge-${pe}`,
|
|
1247
|
-
|
|
1247
|
+
X && "fm-status-badge-error"
|
|
1248
1248
|
].filter(Boolean).join(" ")
|
|
1249
1249
|
},
|
|
1250
1250
|
`${ye}`
|
|
@@ -1278,9 +1278,9 @@ function Kl(b, s, o) {
|
|
|
1278
1278
|
},
|
|
1279
1279
|
{
|
|
1280
1280
|
id: "action",
|
|
1281
|
-
cell(
|
|
1282
|
-
const
|
|
1283
|
-
return Lt(K, (
|
|
1281
|
+
cell(P) {
|
|
1282
|
+
const C = P.row.original, K = D(C);
|
|
1283
|
+
return Lt(K, (N) => S(N, C));
|
|
1284
1284
|
},
|
|
1285
1285
|
enableSorting: !1,
|
|
1286
1286
|
size: 40,
|
|
@@ -1290,19 +1290,19 @@ function Kl(b, s, o) {
|
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
1292
|
];
|
|
1293
|
-
if (
|
|
1294
|
-
const
|
|
1293
|
+
if (v.isEnabled) {
|
|
1294
|
+
const P = [
|
|
1295
1295
|
{
|
|
1296
1296
|
id: "netsuiteTransferOrder",
|
|
1297
|
-
accessorFn: (
|
|
1297
|
+
accessorFn: (C) => {
|
|
1298
1298
|
var K;
|
|
1299
|
-
return (K =
|
|
1299
|
+
return (K = C.netSuite) != null && K.id ? `${C.netSuite.refNo} (${C.netSuite.id})` : "N/A";
|
|
1300
1300
|
},
|
|
1301
1301
|
header: () => "NetSuite Order (ID)",
|
|
1302
|
-
cell(
|
|
1303
|
-
var
|
|
1304
|
-
const K =
|
|
1305
|
-
return (
|
|
1302
|
+
cell(C) {
|
|
1303
|
+
var N;
|
|
1304
|
+
const K = C.row.original;
|
|
1305
|
+
return (N = K.netSuite) != null && N.id ? `${K.netSuite.refNo} (${K.netSuite.id})` : "N/A";
|
|
1306
1306
|
},
|
|
1307
1307
|
enableSorting: !1,
|
|
1308
1308
|
size: 200,
|
|
@@ -1313,14 +1313,14 @@ function Kl(b, s, o) {
|
|
|
1313
1313
|
},
|
|
1314
1314
|
{
|
|
1315
1315
|
id: "netsuiteTransactionNumber",
|
|
1316
|
-
accessorFn: (
|
|
1317
|
-
var K,
|
|
1318
|
-
return ((
|
|
1316
|
+
accessorFn: (C) => {
|
|
1317
|
+
var K, N;
|
|
1318
|
+
return ((N = (K = C.netSuite) == null ? void 0 : K.additionalInfo) == null ? void 0 : N.transactionnumber) ?? "N/A";
|
|
1319
1319
|
},
|
|
1320
1320
|
header: () => "NetSuite Transaction No.",
|
|
1321
|
-
cell(
|
|
1322
|
-
var
|
|
1323
|
-
return ((
|
|
1321
|
+
cell(C) {
|
|
1322
|
+
var N, X;
|
|
1323
|
+
return ((X = (N = C.row.original.netSuite) == null ? void 0 : N.additionalInfo) == null ? void 0 : X.transactionnumber) ?? "N/A";
|
|
1324
1324
|
},
|
|
1325
1325
|
enableSorting: !1,
|
|
1326
1326
|
size: 200,
|
|
@@ -1330,13 +1330,13 @@ function Kl(b, s, o) {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
1332
|
];
|
|
1333
|
-
|
|
1333
|
+
R.splice(R.length - 1, 0, ...P);
|
|
1334
1334
|
}
|
|
1335
|
-
return
|
|
1335
|
+
return R;
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function E() {
|
|
1338
1338
|
var ne;
|
|
1339
|
-
const
|
|
1339
|
+
const R = [
|
|
1340
1340
|
{
|
|
1341
1341
|
accessorKey: "purchaseOrder.seqNumber",
|
|
1342
1342
|
header: () => t("inventory.transfer.table.seqNo"),
|
|
@@ -1347,8 +1347,8 @@ function Kl(b, s, o) {
|
|
|
1347
1347
|
{
|
|
1348
1348
|
accessorKey: "purchaseOrder._id",
|
|
1349
1349
|
header: () => t("inventory.transfer.table.createdAt"),
|
|
1350
|
-
cell(
|
|
1351
|
-
return st(`${
|
|
1350
|
+
cell(P) {
|
|
1351
|
+
return st(`${P.getValue()}`);
|
|
1352
1352
|
},
|
|
1353
1353
|
enableSorting: !0
|
|
1354
1354
|
},
|
|
@@ -1369,12 +1369,12 @@ function Kl(b, s, o) {
|
|
|
1369
1369
|
enableSorting: !1,
|
|
1370
1370
|
size: "auto"
|
|
1371
1371
|
},
|
|
1372
|
-
...(ne =
|
|
1372
|
+
...(ne = d.sessionUser.value) != null && ne.role.isAdmin ? [
|
|
1373
1373
|
{
|
|
1374
1374
|
id: "statusForAdmin",
|
|
1375
1375
|
header: () => Y(We, {}, () => `${t("inventory.transfer.table.status")}`),
|
|
1376
|
-
cell(
|
|
1377
|
-
return
|
|
1376
|
+
cell(P) {
|
|
1377
|
+
return P.row.original.status;
|
|
1378
1378
|
},
|
|
1379
1379
|
enableSorting: !0,
|
|
1380
1380
|
size: 200
|
|
@@ -1383,16 +1383,16 @@ function Kl(b, s, o) {
|
|
|
1383
1383
|
{
|
|
1384
1384
|
accessorKey: "purchaseOrder.status",
|
|
1385
1385
|
header: () => t("inventory.transfer.table.status"),
|
|
1386
|
-
cell(
|
|
1387
|
-
const
|
|
1388
|
-
if (!
|
|
1386
|
+
cell(P) {
|
|
1387
|
+
const C = P.row.original, K = P.getValue();
|
|
1388
|
+
if (!C.purchaseOrder)
|
|
1389
1389
|
return Y(lt.FmChip, {
|
|
1390
1390
|
label: "N/A",
|
|
1391
1391
|
compact: !0
|
|
1392
1392
|
});
|
|
1393
|
-
const
|
|
1393
|
+
const N = ct(C.purchaseOrder), { partial: X, over: be } = _t(N), ye = St(K ?? "", X, be);
|
|
1394
1394
|
let pe = t(`inventory.transfer.status.${ye}`), fe = `${K ?? ""}`.toLocaleLowerCase("en-us");
|
|
1395
|
-
return ye === ve.enum.CLOSE && (pe = `${t(`inventory.transfer.status.${ve.enum.COMPLETE}`)}`), ye === "PARTIAL_RECEIVED" && fe === ve.enum.PROCESSING.toLocaleLowerCase("en-us") && (fe = ve.enum.RECEIVING.toLocaleLowerCase("en-us")),
|
|
1395
|
+
return ye === ve.enum.CLOSE && (pe = `${t(`inventory.transfer.status.${ve.enum.COMPLETE}`)}`), ye === "PARTIAL_RECEIVED" && fe === ve.enum.PROCESSING.toLocaleLowerCase("en-us") && (fe = ve.enum.RECEIVING.toLocaleLowerCase("en-us")), C.rejectedAt && (pe = t("inventory.transfer.status.REJECT"), fe = ve.enum.REJECT.toLocaleLowerCase("en-us")), Y(
|
|
1396
1396
|
"div",
|
|
1397
1397
|
{
|
|
1398
1398
|
class: "flex"
|
|
@@ -1414,14 +1414,14 @@ function Kl(b, s, o) {
|
|
|
1414
1414
|
},
|
|
1415
1415
|
{
|
|
1416
1416
|
id: "action",
|
|
1417
|
-
cell(
|
|
1418
|
-
const
|
|
1419
|
-
...
|
|
1417
|
+
cell(P) {
|
|
1418
|
+
const C = P.row.original, N = (C.purchaseOrder ? D(C.purchaseOrder) : []).map((X) => X.value === Se.Print ? {
|
|
1419
|
+
...X,
|
|
1420
1420
|
translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
|
|
1421
|
-
} :
|
|
1421
|
+
} : X);
|
|
1422
1422
|
return Lt(
|
|
1423
|
-
|
|
1424
|
-
(
|
|
1423
|
+
N,
|
|
1424
|
+
(X) => C.purchaseOrder ? S(X, C.purchaseOrder, C) : void 0
|
|
1425
1425
|
);
|
|
1426
1426
|
},
|
|
1427
1427
|
enableSorting: !1,
|
|
@@ -1432,19 +1432,19 @@ function Kl(b, s, o) {
|
|
|
1432
1432
|
}
|
|
1433
1433
|
}
|
|
1434
1434
|
];
|
|
1435
|
-
if (
|
|
1436
|
-
const
|
|
1435
|
+
if (v.isEnabled) {
|
|
1436
|
+
const P = [
|
|
1437
1437
|
{
|
|
1438
1438
|
id: "netsuiteTransferOrder",
|
|
1439
|
-
accessorFn: (
|
|
1439
|
+
accessorFn: (C) => {
|
|
1440
1440
|
var K;
|
|
1441
|
-
return (K =
|
|
1441
|
+
return (K = C.netSuite) != null && K.id ? `${C.netSuite.refNo} (${C.netSuite.id})` : "N/A";
|
|
1442
1442
|
},
|
|
1443
1443
|
header: () => "NetSuite Order (ID)",
|
|
1444
|
-
cell(
|
|
1445
|
-
var
|
|
1446
|
-
const K =
|
|
1447
|
-
return (
|
|
1444
|
+
cell(C) {
|
|
1445
|
+
var N;
|
|
1446
|
+
const K = C.row.original;
|
|
1447
|
+
return (N = K.netSuite) != null && N.id ? `${K.netSuite.refNo} (${K.netSuite.id})` : "N/A";
|
|
1448
1448
|
},
|
|
1449
1449
|
enableSorting: !1,
|
|
1450
1450
|
size: 200,
|
|
@@ -1455,14 +1455,14 @@ function Kl(b, s, o) {
|
|
|
1455
1455
|
},
|
|
1456
1456
|
{
|
|
1457
1457
|
id: "netsuiteTransactionNumber",
|
|
1458
|
-
accessorFn: (
|
|
1459
|
-
var K,
|
|
1460
|
-
return ((
|
|
1458
|
+
accessorFn: (C) => {
|
|
1459
|
+
var K, N;
|
|
1460
|
+
return ((N = (K = C.netSuite) == null ? void 0 : K.additionalInfo) == null ? void 0 : N.transactionnumber) ?? "N/A";
|
|
1461
1461
|
},
|
|
1462
1462
|
header: () => "NetSuite Transaction No.",
|
|
1463
|
-
cell(
|
|
1464
|
-
var
|
|
1465
|
-
return ((
|
|
1463
|
+
cell(C) {
|
|
1464
|
+
var N, X;
|
|
1465
|
+
return ((X = (N = C.row.original.netSuite) == null ? void 0 : N.additionalInfo) == null ? void 0 : X.transactionnumber) ?? "N/A";
|
|
1466
1466
|
},
|
|
1467
1467
|
enableSorting: !1,
|
|
1468
1468
|
size: 200,
|
|
@@ -1472,15 +1472,15 @@ function Kl(b, s, o) {
|
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
1474
|
];
|
|
1475
|
-
|
|
1475
|
+
R.splice(R.length - 2, 0, ...P);
|
|
1476
1476
|
}
|
|
1477
|
-
return
|
|
1477
|
+
return R;
|
|
1478
1478
|
}
|
|
1479
|
-
const
|
|
1479
|
+
const J = j(() => b === "receive/request" ? F() : E()), z = Z(!1), ae = Z(""), ge = Z(""), H = Z(!1);
|
|
1480
1480
|
return {
|
|
1481
|
-
columnDefs:
|
|
1481
|
+
columnDefs: J,
|
|
1482
1482
|
showCustomPrintDialog: z,
|
|
1483
|
-
customPrintHtml:
|
|
1483
|
+
customPrintHtml: ae,
|
|
1484
1484
|
customPrintTemplateName: ge,
|
|
1485
1485
|
customPrintIsDefault: H
|
|
1486
1486
|
};
|
|
@@ -1493,43 +1493,43 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1493
1493
|
},
|
|
1494
1494
|
emits: ["update:show"],
|
|
1495
1495
|
setup(b, { emit: s }) {
|
|
1496
|
-
const
|
|
1496
|
+
const n = b, c = gs({
|
|
1497
1497
|
id: "",
|
|
1498
1498
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1499
1499
|
items: []
|
|
1500
|
-
}),
|
|
1500
|
+
}), v = Z(), d = s, p = (o) => o != null && o !== "";
|
|
1501
1501
|
Wt(() => {
|
|
1502
|
-
|
|
1503
|
-
id:
|
|
1504
|
-
sku:
|
|
1505
|
-
measurement:
|
|
1506
|
-
amount:
|
|
1502
|
+
n.purchaseOrder && (c.items = n.purchaseOrder.items.map((o) => ({
|
|
1503
|
+
id: o.id,
|
|
1504
|
+
sku: o.sku,
|
|
1505
|
+
measurement: o.measurement,
|
|
1506
|
+
amount: o.quantity ?? { amount: 1, precision: 0 }
|
|
1507
1507
|
})));
|
|
1508
1508
|
});
|
|
1509
|
-
const
|
|
1510
|
-
return (
|
|
1511
|
-
const
|
|
1512
|
-
return l(), me(
|
|
1509
|
+
const t = j(() => c.items.length <= 10);
|
|
1510
|
+
return (o, u) => {
|
|
1511
|
+
const k = re("FmTable"), $ = re("FmButton"), D = re("FmForm");
|
|
1512
|
+
return l(), me(D, {
|
|
1513
1513
|
ref_key: "formRef",
|
|
1514
|
-
ref:
|
|
1514
|
+
ref: v,
|
|
1515
1515
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
1516
1516
|
onValidationFailed: console.log,
|
|
1517
|
-
onValidationSuccess:
|
|
1517
|
+
onValidationSuccess: u[1] || (u[1] = () => n.confirm(c))
|
|
1518
1518
|
}, {
|
|
1519
|
-
default:
|
|
1520
|
-
|
|
1519
|
+
default: ce(() => [
|
|
1520
|
+
u[2] || (u[2] = e("div", { class: "fm-typo-en-title-sm-600" }, "Confirm the transfer amount", -1)),
|
|
1521
1521
|
e("div", ur, [
|
|
1522
1522
|
e("div", dr, [
|
|
1523
|
-
|
|
1523
|
+
L(k, {
|
|
1524
1524
|
"column-defs": [
|
|
1525
1525
|
{
|
|
1526
1526
|
header: "Code",
|
|
1527
|
-
cell: (
|
|
1528
|
-
const
|
|
1527
|
+
cell: (T) => {
|
|
1528
|
+
const S = n.purchaseOrder.items.find((F) => p(T.row.original.id) ? F.id === T.row.original.id : F.sku._id === T.row.original.sku._id);
|
|
1529
1529
|
return Y(
|
|
1530
1530
|
_(lt).FmTooltip,
|
|
1531
1531
|
{
|
|
1532
|
-
content:
|
|
1532
|
+
content: S.code,
|
|
1533
1533
|
placement: "top",
|
|
1534
1534
|
variant: "plain",
|
|
1535
1535
|
zIndex: 50
|
|
@@ -1539,19 +1539,19 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1539
1539
|
{
|
|
1540
1540
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
1541
1541
|
},
|
|
1542
|
-
|
|
1542
|
+
S.code
|
|
1543
1543
|
)
|
|
1544
1544
|
);
|
|
1545
1545
|
}
|
|
1546
1546
|
},
|
|
1547
1547
|
{
|
|
1548
1548
|
header: "Name",
|
|
1549
|
-
cell: (
|
|
1550
|
-
const
|
|
1549
|
+
cell: (T) => {
|
|
1550
|
+
const S = n.purchaseOrder.items.find((F) => p(T.row.original.id) ? F.id === T.row.original.id : F.sku._id === T.row.original.sku._id);
|
|
1551
1551
|
return Y(
|
|
1552
1552
|
_(lt).FmTooltip,
|
|
1553
1553
|
{
|
|
1554
|
-
content:
|
|
1554
|
+
content: S.name,
|
|
1555
1555
|
placement: "top",
|
|
1556
1556
|
variant: "plain",
|
|
1557
1557
|
zIndex: 50
|
|
@@ -1561,15 +1561,15 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1561
1561
|
{
|
|
1562
1562
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
1563
1563
|
},
|
|
1564
|
-
|
|
1564
|
+
S.name
|
|
1565
1565
|
)
|
|
1566
1566
|
);
|
|
1567
1567
|
}
|
|
1568
1568
|
},
|
|
1569
1569
|
{
|
|
1570
1570
|
header: "Amount",
|
|
1571
|
-
cell: (
|
|
1572
|
-
const
|
|
1571
|
+
cell: (T) => {
|
|
1572
|
+
const S = T.row.original, F = n.purchaseOrder.items.find((J) => p(S.id) ? J.id === S.id : J.sku._id === S.sku._id), E = S.amount ?? {
|
|
1573
1573
|
amount: 1,
|
|
1574
1574
|
precision: 0
|
|
1575
1575
|
};
|
|
@@ -1578,22 +1578,22 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1578
1578
|
flex: "1 1 0%"
|
|
1579
1579
|
},
|
|
1580
1580
|
modelValue: {
|
|
1581
|
-
amount:
|
|
1582
|
-
measurement:
|
|
1581
|
+
amount: E,
|
|
1582
|
+
measurement: S.measurement ?? null
|
|
1583
1583
|
},
|
|
1584
|
-
key:
|
|
1585
|
-
unit:
|
|
1586
|
-
"onUpdate:modelValue": (
|
|
1587
|
-
if (!
|
|
1588
|
-
const
|
|
1589
|
-
|
|
1584
|
+
key: p(S.id) ? S.id : S.sku._id,
|
|
1585
|
+
unit: S.sku.unit,
|
|
1586
|
+
"onUpdate:modelValue": (J) => {
|
|
1587
|
+
if (!J) return;
|
|
1588
|
+
const z = c.items.find((ae) => p(S.id) ? ae.id === S.id : ae.sku._id === S.sku._id);
|
|
1589
|
+
z && (z.amount = J.amount);
|
|
1590
1590
|
},
|
|
1591
1591
|
disableUnit: !0,
|
|
1592
1592
|
rules: [
|
|
1593
1593
|
_(Bs)(
|
|
1594
1594
|
+_(xe)({ amount: 0, precision: 0 })
|
|
1595
1595
|
),
|
|
1596
|
-
_(zs)(+_(xe)(
|
|
1596
|
+
_(zs)(+_(xe)(F.quantity))
|
|
1597
1597
|
],
|
|
1598
1598
|
applyDefaultRules: !0
|
|
1599
1599
|
});
|
|
@@ -1601,24 +1601,24 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1601
1601
|
}
|
|
1602
1602
|
],
|
|
1603
1603
|
"row-data": c.items,
|
|
1604
|
-
"hide-footer":
|
|
1604
|
+
"hide-footer": t.value
|
|
1605
1605
|
}, null, 8, ["column-defs", "row-data", "hide-footer"])
|
|
1606
1606
|
])
|
|
1607
1607
|
]),
|
|
1608
1608
|
e("div", mr, [
|
|
1609
|
-
|
|
1609
|
+
L($, {
|
|
1610
1610
|
class: "px-16",
|
|
1611
1611
|
label: "Confirm",
|
|
1612
1612
|
size: "md",
|
|
1613
1613
|
variant: "primary",
|
|
1614
1614
|
type: "submit"
|
|
1615
1615
|
}),
|
|
1616
|
-
|
|
1616
|
+
L($, {
|
|
1617
1617
|
class: "px-16",
|
|
1618
1618
|
label: "Cancel",
|
|
1619
1619
|
size: "md",
|
|
1620
1620
|
variant: "secondary",
|
|
1621
|
-
onClick:
|
|
1621
|
+
onClick: u[0] || (u[0] = () => d("update:show", !1))
|
|
1622
1622
|
})
|
|
1623
1623
|
])
|
|
1624
1624
|
]),
|
|
@@ -1699,16 +1699,16 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1699
1699
|
scope: {}
|
|
1700
1700
|
},
|
|
1701
1701
|
setup(b) {
|
|
1702
|
-
const s = b,
|
|
1702
|
+
const s = b, n = pt(), c = Qe(), v = ft(), d = Z(!1);
|
|
1703
1703
|
j(() => {
|
|
1704
|
-
var
|
|
1704
|
+
var k, $, D, T;
|
|
1705
1705
|
let t = !0;
|
|
1706
|
-
|
|
1707
|
-
const
|
|
1708
|
-
return
|
|
1706
|
+
n.isEnabled || (t = !1);
|
|
1707
|
+
const o = s.purchaseOrder, u = s.poRequest;
|
|
1708
|
+
return o && ((k = o == null ? void 0 : o.supplier) != null && k.internal ? (!u && o.status == ve.enum.DRAFT && (t = !1), u && !(($ = u == null ? void 0 : u.netSuite) != null && $.id) && (t = !1), s.isTransferBetweenOutlets && (t = !1)) : ((o == null ? void 0 : o.status) !== ve.enum.REQUESTING && o.supplier.internal && (t = !1), !u && !((D = o == null ? void 0 : o.netSuite) != null && D.id) && (t = !1), !u && ((T = o == null ? void 0 : o.netSuite) != null && T.id) && (o == null ? void 0 : o.status) == ve.enum.REQUESTING && (t = !1))), t;
|
|
1709
1709
|
});
|
|
1710
|
-
async function
|
|
1711
|
-
|
|
1710
|
+
async function p() {
|
|
1711
|
+
d.value || v.open({
|
|
1712
1712
|
title: "Sync with NetSuite",
|
|
1713
1713
|
contentComponent: Y("div", [
|
|
1714
1714
|
Y("p", "Are you sure you want to sync now?"),
|
|
@@ -1726,37 +1726,37 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1726
1726
|
},
|
|
1727
1727
|
secondaryActions: { text: "Not now", close: !0 }
|
|
1728
1728
|
}).onPrimary(async () => {
|
|
1729
|
-
var t,
|
|
1729
|
+
var t, o, u, k, $, D, T;
|
|
1730
1730
|
try {
|
|
1731
|
-
|
|
1732
|
-
const
|
|
1733
|
-
await
|
|
1734
|
-
purchaseOrderId:
|
|
1735
|
-
locationId: s.scope === "approval" ?
|
|
1736
|
-
netsuiteId: ((
|
|
1731
|
+
d.value = !0;
|
|
1732
|
+
const S = ((t = s.purchaseOrder) == null ? void 0 : t._id) || ((o = s.poRequest) == null ? void 0 : o.purchaseOrderId) || "", F = (u = s.poRequest) == null ? void 0 : u.to.dbName;
|
|
1733
|
+
await n.syncPurchaseOrder({
|
|
1734
|
+
purchaseOrderId: S,
|
|
1735
|
+
locationId: s.scope === "approval" ? F : void 0,
|
|
1736
|
+
netsuiteId: (($ = (k = s.purchaseOrder) == null ? void 0 : k.netSuite) == null ? void 0 : $.id) || ((T = (D = s.poRequest) == null ? void 0 : D.netSuite) == null ? void 0 : T.id)
|
|
1737
1737
|
}), c.open({
|
|
1738
1738
|
title: "Sync with NetSuite",
|
|
1739
1739
|
message: "Requested to sync with NetSuite. Please wait a moment.",
|
|
1740
1740
|
type: "success"
|
|
1741
|
-
}), await new Promise((
|
|
1742
|
-
} catch (
|
|
1743
|
-
console.log("Failed to sync with NetSuite",
|
|
1741
|
+
}), await new Promise((E) => setTimeout(E, 5e3)), d.value = !1;
|
|
1742
|
+
} catch (S) {
|
|
1743
|
+
console.log("Failed to sync with NetSuite", S), c.open({
|
|
1744
1744
|
title: "Error",
|
|
1745
1745
|
message: "Failed to sync with NetSuite",
|
|
1746
1746
|
type: "error"
|
|
1747
|
-
}),
|
|
1747
|
+
}), d.value = !1;
|
|
1748
1748
|
}
|
|
1749
1749
|
});
|
|
1750
1750
|
}
|
|
1751
|
-
return (t,
|
|
1752
|
-
const
|
|
1751
|
+
return (t, o) => {
|
|
1752
|
+
const u = re("FmButton");
|
|
1753
1753
|
return l(), h("div", fr, [
|
|
1754
|
-
|
|
1754
|
+
L(u, {
|
|
1755
1755
|
"prepend-icon": "sync",
|
|
1756
1756
|
variant: "secondary",
|
|
1757
1757
|
label: "Sync",
|
|
1758
|
-
loading:
|
|
1759
|
-
onClick:
|
|
1758
|
+
loading: d.value,
|
|
1759
|
+
onClick: p,
|
|
1760
1760
|
"text-color": "primary",
|
|
1761
1761
|
"bg-color": "transparent",
|
|
1762
1762
|
"border-color": "primary"
|
|
@@ -1790,59 +1790,59 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1790
1790
|
scope: {}
|
|
1791
1791
|
},
|
|
1792
1792
|
setup(b) {
|
|
1793
|
-
const s = b,
|
|
1793
|
+
const s = b, n = pt(), c = Ye(), v = Z(s.poRequest);
|
|
1794
1794
|
Wt(async () => {
|
|
1795
|
-
var
|
|
1796
|
-
if (!s.poRequest && ((
|
|
1797
|
-
const
|
|
1798
|
-
|
|
1795
|
+
var o;
|
|
1796
|
+
if (!s.poRequest && ((o = s.purchaseOrder) != null && o._id)) {
|
|
1797
|
+
const u = await c.getLatestPurchaseOrderRequest(s.purchaseOrder._id);
|
|
1798
|
+
v.value = u;
|
|
1799
1799
|
}
|
|
1800
1800
|
});
|
|
1801
|
-
const
|
|
1801
|
+
const d = j(
|
|
1802
1802
|
() => {
|
|
1803
|
-
var
|
|
1804
|
-
return
|
|
1805
|
-
((
|
|
1803
|
+
var o, u, k, $, D, T;
|
|
1804
|
+
return n.getSubsidiaryFullName(
|
|
1805
|
+
((k = (u = (o = s.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : u.subsidiary) == null ? void 0 : k.id) || ((T = (D = ($ = s.poRequest) == null ? void 0 : $.netSuite) == null ? void 0 : D.subsidiary) == null ? void 0 : T.id)
|
|
1806
1806
|
).fullName;
|
|
1807
1807
|
}
|
|
1808
|
-
),
|
|
1809
|
-
var
|
|
1810
|
-
return (
|
|
1808
|
+
), p = j(() => {
|
|
1809
|
+
var o, u, k, $, D, T, S, F, E, J, z, ae;
|
|
1810
|
+
return (k = (u = (o = s.purchaseOrder) == null ? void 0 : o.netSuite) == null ? void 0 : u.additionalInfo) != null && k.transactionnumber ? (T = (D = ($ = s.purchaseOrder) == null ? void 0 : $.netSuite) == null ? void 0 : D.additionalInfo) == null ? void 0 : T.transactionnumber : (E = (F = (S = v.value) == null ? void 0 : S.netSuite) == null ? void 0 : F.additionalInfo) != null && E.transactionnumber ? (ae = (z = (J = v.value) == null ? void 0 : J.netSuite) == null ? void 0 : z.additionalInfo) == null ? void 0 : ae.transactionnumber : null;
|
|
1811
1811
|
}), t = j(() => {
|
|
1812
|
-
var
|
|
1813
|
-
return (
|
|
1814
|
-
var
|
|
1815
|
-
return (
|
|
1812
|
+
var o, u, k, $, D, T;
|
|
1813
|
+
return (u = (o = s.purchaseOrder) == null ? void 0 : o.deliveryFullfillment) != null && u.length && (($ = (k = s.purchaseOrder) == null ? void 0 : k.deliveryFullfillment) == null ? void 0 : $.length) > 0 ? (T = (D = s.purchaseOrder) == null ? void 0 : D.deliveryFullfillment) == null ? void 0 : T.map((S) => {
|
|
1814
|
+
var F;
|
|
1815
|
+
return (F = S.netSuite) == null ? void 0 : F.refNo;
|
|
1816
1816
|
}).join(", ") : "N/A";
|
|
1817
1817
|
});
|
|
1818
|
-
return (
|
|
1819
|
-
var
|
|
1820
|
-
return _(
|
|
1818
|
+
return (o, u) => {
|
|
1819
|
+
var k, $, D, T, S, F, E, J, z, ae, ge, H, R, ne, P, C;
|
|
1820
|
+
return _(n).isEnabled ? (l(), h("div", yr, [
|
|
1821
1821
|
e("div", br, [
|
|
1822
|
-
|
|
1823
|
-
e("div", hr, x(
|
|
1822
|
+
u[0] || (u[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1823
|
+
e("div", hr, x(d.value || "N/A"), 1)
|
|
1824
1824
|
]),
|
|
1825
|
-
!
|
|
1826
|
-
e("div", _r, " NetSuite " + x((
|
|
1825
|
+
!o.isTransferBetweenOutlets && o.scope === _(xt).RECEIVE_REQUEST ? (l(), h("div", gr, [
|
|
1826
|
+
e("div", _r, " NetSuite " + x(($ = (k = o.purchaseOrder) == null ? void 0 : k.netSuite) != null && $.recordType ? _(Jt)((T = (D = o.purchaseOrder) == null ? void 0 : D.netSuite) == null ? void 0 : T.recordType) : o.transferType === _(et).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1827
1827
|
e("div", Sr, [
|
|
1828
|
-
(
|
|
1828
|
+
(F = (S = o.purchaseOrder) == null ? void 0 : S.netSuite) != null && F.id ? (l(), h("span", xr, x((J = (E = o.purchaseOrder) == null ? void 0 : E.netSuite) == null ? void 0 : J.refNo) + " (" + x((ae = (z = o.purchaseOrder) == null ? void 0 : z.netSuite) == null ? void 0 : ae.id) + ") ", 1)) : (l(), h("span", kr, "N/A"))
|
|
1829
1829
|
])
|
|
1830
|
-
])) :
|
|
1831
|
-
!
|
|
1832
|
-
e("div", wr, " (Request) NetSuite " + x(
|
|
1830
|
+
])) : I("", !0),
|
|
1831
|
+
!o.isTransferBetweenOutlets && v.value || o.scope === _(xt).APPROVAL ? (l(), h("div", Or, [
|
|
1832
|
+
e("div", wr, " (Request) NetSuite " + x(o.transferType === _(et).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1833
1833
|
e("div", $r, [
|
|
1834
|
-
(H = (ge =
|
|
1834
|
+
(H = (ge = v.value) == null ? void 0 : ge.netSuite) != null && H.id ? (l(), h("span", Cr, x((ne = (R = v.value) == null ? void 0 : R.netSuite) == null ? void 0 : ne.refNo) + " (" + x((C = (P = v.value) == null ? void 0 : P.netSuite) == null ? void 0 : C.id) + ") ", 1)) : (l(), h("span", Dr, "N/A"))
|
|
1835
1835
|
])
|
|
1836
|
-
])) :
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
e("div", Nr, x(
|
|
1840
|
-
])) :
|
|
1841
|
-
_(
|
|
1842
|
-
|
|
1836
|
+
])) : I("", !0),
|
|
1837
|
+
p.value ? (l(), h("div", Rr, [
|
|
1838
|
+
u[1] || (u[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1839
|
+
e("div", Nr, x(p.value), 1)
|
|
1840
|
+
])) : I("", !0),
|
|
1841
|
+
_(n).isEnabled && o.transferType === _(et).enum.transfer && !o.isTransferBetweenOutlets ? (l(), h("div", Ar, [
|
|
1842
|
+
u[2] || (u[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1843
1843
|
e("div", Tr, x(t.value), 1)
|
|
1844
|
-
])) :
|
|
1845
|
-
])) :
|
|
1844
|
+
])) : I("", !0)
|
|
1845
|
+
])) : I("", !0);
|
|
1846
1846
|
};
|
|
1847
1847
|
}
|
|
1848
1848
|
}), Ir = { class: "flex flex-row-reverse" }, Fr = /* @__PURE__ */ qe({
|
|
@@ -1852,37 +1852,37 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1852
1852
|
purchaseOrderId: {}
|
|
1853
1853
|
},
|
|
1854
1854
|
setup(b) {
|
|
1855
|
-
const s = Qe(),
|
|
1856
|
-
async function c(
|
|
1857
|
-
const
|
|
1858
|
-
if (
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1855
|
+
const s = Qe(), n = $t();
|
|
1856
|
+
async function c(v, d) {
|
|
1857
|
+
const p = [];
|
|
1858
|
+
if (v && p.push(`body.message:*${v}*`), d) {
|
|
1859
|
+
const k = d.replace(/:/g, "\\:");
|
|
1860
|
+
p.push(`${k}`);
|
|
1861
1861
|
}
|
|
1862
|
-
if (
|
|
1862
|
+
if (p.length === 0) {
|
|
1863
1863
|
s.open({
|
|
1864
1864
|
message: "Cannot open logs without valid filters.",
|
|
1865
1865
|
type: "error"
|
|
1866
1866
|
});
|
|
1867
1867
|
return;
|
|
1868
1868
|
}
|
|
1869
|
-
const
|
|
1869
|
+
const o = `attributes.pod:netsuite* AND (${p.join(" OR ")})`, { url: u } = await n.getSyncLogs(o);
|
|
1870
1870
|
s.open(
|
|
1871
1871
|
{
|
|
1872
1872
|
message: "Opening NetSuite logs...",
|
|
1873
1873
|
type: "info"
|
|
1874
1874
|
},
|
|
1875
1875
|
800
|
|
1876
|
-
), await new Promise((
|
|
1876
|
+
), await new Promise((k) => setTimeout(k, 800)), window.open(u, "_blank");
|
|
1877
1877
|
}
|
|
1878
|
-
return (
|
|
1879
|
-
const
|
|
1878
|
+
return (v, d) => {
|
|
1879
|
+
const p = re("FmButton");
|
|
1880
1880
|
return l(), h("div", Ir, [
|
|
1881
|
-
|
|
1881
|
+
L(p, {
|
|
1882
1882
|
"prepend-icon": "history",
|
|
1883
1883
|
variant: "secondary",
|
|
1884
1884
|
label: "Logs",
|
|
1885
|
-
onClick:
|
|
1885
|
+
onClick: d[0] || (d[0] = (t) => c(v.netsuiteId, v.purchaseOrderId)),
|
|
1886
1886
|
"text-color": "primary",
|
|
1887
1887
|
"bg-color": "transparent",
|
|
1888
1888
|
"border-color": "primary"
|
|
@@ -1906,39 +1906,39 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1906
1906
|
purchaseOrderId: {}
|
|
1907
1907
|
},
|
|
1908
1908
|
setup(b) {
|
|
1909
|
-
const s = b,
|
|
1910
|
-
async function
|
|
1911
|
-
if (!
|
|
1909
|
+
const s = b, n = $t(), c = Z(!1), v = Me(), d = Z(!0), p = Z(!1), t = Z(!1), o = Z(!1), u = Z(null), k = Z([]);
|
|
1910
|
+
async function $() {
|
|
1911
|
+
if (!u.value) {
|
|
1912
1912
|
c.value = !0;
|
|
1913
1913
|
try {
|
|
1914
|
-
|
|
1915
|
-
const
|
|
1916
|
-
|
|
1914
|
+
d.value = !0;
|
|
1915
|
+
const F = await n.getMoreInfo(
|
|
1916
|
+
v.currentLocation.dbName,
|
|
1917
1917
|
s.purchaseOrderId
|
|
1918
1918
|
);
|
|
1919
|
-
|
|
1919
|
+
u.value = F, p.value = !1;
|
|
1920
1920
|
} catch {
|
|
1921
|
-
|
|
1921
|
+
p.value = !0;
|
|
1922
1922
|
} finally {
|
|
1923
|
-
|
|
1923
|
+
d.value = !1;
|
|
1924
1924
|
}
|
|
1925
|
-
await
|
|
1925
|
+
await D();
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
|
-
async function
|
|
1929
|
-
if (!(
|
|
1928
|
+
async function D() {
|
|
1929
|
+
if (!(k.value.length > 0))
|
|
1930
1930
|
try {
|
|
1931
1931
|
t.value = !0;
|
|
1932
|
-
const
|
|
1933
|
-
|
|
1932
|
+
const F = await n.getChangeLogs(s.netsuiteId);
|
|
1933
|
+
k.value = F, o.value = !1;
|
|
1934
1934
|
} catch {
|
|
1935
|
-
|
|
1935
|
+
o.value = !0;
|
|
1936
1936
|
} finally {
|
|
1937
1937
|
t.value = !1;
|
|
1938
1938
|
}
|
|
1939
1939
|
}
|
|
1940
|
-
function
|
|
1941
|
-
switch (
|
|
1940
|
+
function T(F) {
|
|
1941
|
+
switch (F) {
|
|
1942
1942
|
case Le.Create:
|
|
1943
1943
|
return "text-green-600 bg-green-100";
|
|
1944
1944
|
case Le.Set:
|
|
@@ -1951,8 +1951,8 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1951
1951
|
return "text-gray-600 bg-gray-100";
|
|
1952
1952
|
}
|
|
1953
1953
|
}
|
|
1954
|
-
function
|
|
1955
|
-
return new Date(
|
|
1954
|
+
function S(F) {
|
|
1955
|
+
return new Date(F).toLocaleDateString("en-US", {
|
|
1956
1956
|
year: "numeric",
|
|
1957
1957
|
month: "short",
|
|
1958
1958
|
day: "numeric",
|
|
@@ -1960,64 +1960,64 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1960
1960
|
minute: "2-digit"
|
|
1961
1961
|
});
|
|
1962
1962
|
}
|
|
1963
|
-
return (
|
|
1964
|
-
const
|
|
1963
|
+
return (F, E) => {
|
|
1964
|
+
const J = re("FmButton"), z = re("FmLabel"), ae = re("FmCircularProgress"), ge = re("FmIcon"), H = re("FmDialog");
|
|
1965
1965
|
return l(), h("div", Er, [
|
|
1966
|
-
|
|
1966
|
+
L(H, {
|
|
1967
1967
|
modelValue: c.value,
|
|
1968
|
-
"onUpdate:modelValue":
|
|
1968
|
+
"onUpdate:modelValue": E[2] || (E[2] = (R) => c.value = R),
|
|
1969
1969
|
overlay: !0,
|
|
1970
1970
|
"max-width": 800
|
|
1971
1971
|
}, {
|
|
1972
|
-
"dialog-button":
|
|
1973
|
-
|
|
1972
|
+
"dialog-button": ce(() => [
|
|
1973
|
+
L(J, {
|
|
1974
1974
|
"prepend-icon": "info",
|
|
1975
1975
|
variant: "secondary",
|
|
1976
1976
|
label: "Latest Info",
|
|
1977
|
-
onClick:
|
|
1977
|
+
onClick: E[0] || (E[0] = (R) => $()),
|
|
1978
1978
|
"text-color": "primary",
|
|
1979
1979
|
"bg-color": "transparent",
|
|
1980
1980
|
"border-color": "primary"
|
|
1981
1981
|
})
|
|
1982
1982
|
]),
|
|
1983
|
-
"dialog-header":
|
|
1983
|
+
"dialog-header": ce(() => E[3] || (E[3] = [
|
|
1984
1984
|
e("div", null, "NetSuite latest info", -1)
|
|
1985
1985
|
])),
|
|
1986
|
-
default:
|
|
1987
|
-
|
|
1988
|
-
|
|
1986
|
+
default: ce(() => [
|
|
1987
|
+
d.value ? (l(), h("div", qr, "Loading...")) : (l(), h("div", Vr, [
|
|
1988
|
+
p.value ? (l(), h("p", ro, "Something went wrong.")) : (l(), h(Ce, { key: 0 }, [
|
|
1989
1989
|
e("div", Lr, [
|
|
1990
|
-
|
|
1991
|
-
(l(!0), h(Ce, null, Ee(
|
|
1990
|
+
E[4] || (E[4] = e("h3", { class: "fm-typo-en-body-lg-600 mb-4" }, "NetSuite Order Details", -1)),
|
|
1991
|
+
(l(!0), h(Ce, null, Ee(u.value, (R, ne) => (l(), h("div", {
|
|
1992
1992
|
key: ne,
|
|
1993
1993
|
class: "mb-2"
|
|
1994
1994
|
}, [
|
|
1995
1995
|
e("div", null, [
|
|
1996
|
-
|
|
1996
|
+
L(z, {
|
|
1997
1997
|
label: _(Ot)(ne)
|
|
1998
1998
|
}, null, 8, ["label"]),
|
|
1999
1999
|
e("div", Ur, [
|
|
2000
|
-
Array.isArray(
|
|
2000
|
+
Array.isArray(R) ? (l(), h("span", Mr, x(R.length > 0 ? R.join(", ") : "N/A"), 1)) : (l(), h("span", jr, x(R), 1))
|
|
2001
2001
|
])
|
|
2002
2002
|
])
|
|
2003
2003
|
]))), 128))
|
|
2004
2004
|
]),
|
|
2005
2005
|
t.value ? (l(), h("div", Br, [
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
])) :
|
|
2009
|
-
!t.value &&
|
|
2006
|
+
E[5] || (E[5] = e("span", null, "Change Log Loading...", -1)),
|
|
2007
|
+
L(ae, { size: "md" })
|
|
2008
|
+
])) : I("", !0),
|
|
2009
|
+
!t.value && k.value.length > 0 ? (l(), h("div", zr, [
|
|
2010
2010
|
e("h3", Kr, [
|
|
2011
|
-
|
|
2011
|
+
L(ge, {
|
|
2012
2012
|
name: "error",
|
|
2013
2013
|
color: "#ff9500",
|
|
2014
2014
|
size: "sm"
|
|
2015
2015
|
}),
|
|
2016
|
-
|
|
2016
|
+
E[6] || (E[6] = ze(" Change Logs "))
|
|
2017
2017
|
]),
|
|
2018
2018
|
e("div", Hr, [
|
|
2019
2019
|
e("table", Gr, [
|
|
2020
|
-
|
|
2020
|
+
E[7] || (E[7] = e("thead", { class: "bg-fm-color-neutral-gray-50" }, [
|
|
2021
2021
|
e("tr", { class: "border-b border-fm-color-neutral-gray-200" }, [
|
|
2022
2022
|
e("th", {
|
|
2023
2023
|
class: "text-left p-3 fm-typo-en-body-md-600",
|
|
@@ -2034,38 +2034,38 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2034
2034
|
])
|
|
2035
2035
|
], -1)),
|
|
2036
2036
|
e("tbody", null, [
|
|
2037
|
-
(l(!0), h(Ce, null, Ee(
|
|
2037
|
+
(l(!0), h(Ce, null, Ee(k.value, (R, ne) => (l(), h("tr", {
|
|
2038
2038
|
key: ne,
|
|
2039
2039
|
class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
|
|
2040
2040
|
}, [
|
|
2041
|
-
e("td", Wr, x(
|
|
2042
|
-
e("td", Qr, x(
|
|
2043
|
-
e("td", Yr, x(
|
|
2044
|
-
e("td", Jr, x(
|
|
2041
|
+
e("td", Wr, x(S(R._dateiso8601)), 1),
|
|
2042
|
+
e("td", Qr, x(R._rolename), 1),
|
|
2043
|
+
e("td", Yr, x(R._employeename), 1),
|
|
2044
|
+
e("td", Jr, x(R._contextname), 1),
|
|
2045
2045
|
e("td", {
|
|
2046
|
-
class: Ue(`p-3 fm-typo-en-body-sm-600 ${
|
|
2047
|
-
}, x(_(Le)[Number(
|
|
2048
|
-
e("td", Xr, x(
|
|
2049
|
-
e("td", Zr, x(
|
|
2050
|
-
e("td", eo, x(
|
|
2051
|
-
e("td", to, x(
|
|
2046
|
+
class: Ue(`p-3 fm-typo-en-body-sm-600 ${T(Number(R.type) - 1)}`)
|
|
2047
|
+
}, x(_(Le)[Number(R.type) - 1]), 3),
|
|
2048
|
+
e("td", Xr, x(R.lineid || ""), 1),
|
|
2049
|
+
e("td", Zr, x(R._fieldname), 1),
|
|
2050
|
+
e("td", eo, x(R.oldvalue || ""), 1),
|
|
2051
|
+
e("td", to, x(R.newvalue || ""), 1)
|
|
2052
2052
|
]))), 128))
|
|
2053
2053
|
])
|
|
2054
2054
|
])
|
|
2055
2055
|
])
|
|
2056
|
-
])) : (l(), h("div", so,
|
|
2056
|
+
])) : (l(), h("div", so, E[8] || (E[8] = [
|
|
2057
2057
|
e("p", null, "No change logs available.", -1)
|
|
2058
2058
|
])))
|
|
2059
2059
|
], 64))
|
|
2060
2060
|
]))
|
|
2061
2061
|
]),
|
|
2062
|
-
"dialog-footer":
|
|
2063
|
-
|
|
2062
|
+
"dialog-footer": ce(() => [
|
|
2063
|
+
L(J, {
|
|
2064
2064
|
class: "ml-auto sm:w-full xs:w-full",
|
|
2065
2065
|
label: "Close",
|
|
2066
2066
|
size: "md",
|
|
2067
2067
|
variant: "primary",
|
|
2068
|
-
onClick:
|
|
2068
|
+
onClick: E[1] || (E[1] = (R) => c.value = !1)
|
|
2069
2069
|
})
|
|
2070
2070
|
]),
|
|
2071
2071
|
_: 1
|
|
@@ -2086,58 +2086,58 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2086
2086
|
scope: {}
|
|
2087
2087
|
},
|
|
2088
2088
|
setup(b) {
|
|
2089
|
-
const s = b,
|
|
2090
|
-
return (
|
|
2091
|
-
var t,
|
|
2092
|
-
const
|
|
2089
|
+
const s = b, n = Hs(), c = j(() => n.isNetSuiteEnabled);
|
|
2090
|
+
return (v, d) => {
|
|
2091
|
+
var t, o;
|
|
2092
|
+
const p = re("FmMenuDivider");
|
|
2093
2093
|
return c.value ? (l(), h("div", no, [
|
|
2094
2094
|
e("div", ao, [
|
|
2095
|
-
|
|
2095
|
+
d[0] || (d[0] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
2096
2096
|
e("div", lo, [
|
|
2097
2097
|
e("div", io, [
|
|
2098
|
-
(
|
|
2099
|
-
default:
|
|
2100
|
-
var
|
|
2098
|
+
(o = (t = s.purchaseOrder) == null ? void 0 : t.netSuite) != null && o.id ? (l(), me(We, { key: 0 }, {
|
|
2099
|
+
default: ce(() => {
|
|
2100
|
+
var u, k, $;
|
|
2101
2101
|
return [
|
|
2102
|
-
|
|
2103
|
-
"netsuite-id": (
|
|
2104
|
-
"purchase-order-id": (
|
|
2102
|
+
L(oo, {
|
|
2103
|
+
"netsuite-id": (k = (u = v.purchaseOrder) == null ? void 0 : u.netSuite) == null ? void 0 : k.id,
|
|
2104
|
+
"purchase-order-id": ($ = v.purchaseOrder) == null ? void 0 : $._id
|
|
2105
2105
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
2106
2106
|
];
|
|
2107
2107
|
}),
|
|
2108
2108
|
_: 1
|
|
2109
|
-
})) :
|
|
2110
|
-
|
|
2111
|
-
default:
|
|
2112
|
-
var
|
|
2109
|
+
})) : I("", !0),
|
|
2110
|
+
L(We, null, {
|
|
2111
|
+
default: ce(() => {
|
|
2112
|
+
var u, k, $;
|
|
2113
2113
|
return [
|
|
2114
|
-
|
|
2115
|
-
"netsuite-id": (
|
|
2116
|
-
"purchase-order-id": (
|
|
2114
|
+
L(Fr, {
|
|
2115
|
+
"netsuite-id": (k = (u = v.purchaseOrder) == null ? void 0 : u.netSuite) == null ? void 0 : k.id,
|
|
2116
|
+
"purchase-order-id": ($ = v.purchaseOrder) == null ? void 0 : $._id
|
|
2117
2117
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
2118
2118
|
];
|
|
2119
2119
|
}),
|
|
2120
2120
|
_: 1
|
|
2121
2121
|
}),
|
|
2122
|
-
|
|
2123
|
-
"po-request":
|
|
2124
|
-
"purchase-order":
|
|
2122
|
+
L(vr, {
|
|
2123
|
+
"po-request": v.poRequest,
|
|
2124
|
+
"purchase-order": v.purchaseOrder,
|
|
2125
2125
|
"is-transfer-between-outlets": !c.value,
|
|
2126
|
-
scope:
|
|
2126
|
+
scope: v.scope
|
|
2127
2127
|
}, null, 8, ["po-request", "purchase-order", "is-transfer-between-outlets", "scope"])
|
|
2128
2128
|
])
|
|
2129
2129
|
])
|
|
2130
2130
|
]),
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
"po-request":
|
|
2134
|
-
"purchase-order":
|
|
2135
|
-
"transfer-type":
|
|
2136
|
-
"transfer-to-db-name":
|
|
2131
|
+
L(p),
|
|
2132
|
+
L(Pr, {
|
|
2133
|
+
"po-request": v.poRequest,
|
|
2134
|
+
"purchase-order": v.purchaseOrder,
|
|
2135
|
+
"transfer-type": v.transferType,
|
|
2136
|
+
"transfer-to-db-name": v.transferToDbName,
|
|
2137
2137
|
"is-transfer-between-outlets": !c.value,
|
|
2138
|
-
scope:
|
|
2138
|
+
scope: v.scope
|
|
2139
2139
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
2140
|
-
])) :
|
|
2140
|
+
])) : I("", !0);
|
|
2141
2141
|
};
|
|
2142
2142
|
}
|
|
2143
2143
|
}), uo = ["open"], mo = { class: "fm-typo-en-body-sm-600 cursor-pointer select-none" }, Ht = /* @__PURE__ */ qe({
|
|
@@ -2151,11 +2151,11 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2151
2151
|
},
|
|
2152
2152
|
setup(b) {
|
|
2153
2153
|
const s = b;
|
|
2154
|
-
return (
|
|
2154
|
+
return (n, c) => (l(), me(We, {
|
|
2155
2155
|
selectable: s.selectable,
|
|
2156
2156
|
class: Ue(s.class)
|
|
2157
2157
|
}, {
|
|
2158
|
-
default:
|
|
2158
|
+
default: ce(() => [
|
|
2159
2159
|
e("details", {
|
|
2160
2160
|
open: s.open,
|
|
2161
2161
|
class: "w-full"
|
|
@@ -2164,7 +2164,7 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2164
2164
|
e("div", {
|
|
2165
2165
|
class: Ue(["mt-4 flex flex-col gap-2", s.contentClass])
|
|
2166
2166
|
}, [
|
|
2167
|
-
_s(
|
|
2167
|
+
_s(n.$slots, "default")
|
|
2168
2168
|
], 2)
|
|
2169
2169
|
], 8, uo)
|
|
2170
2170
|
]),
|
|
@@ -2174,31 +2174,31 @@ const ur = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2174
2174
|
});
|
|
2175
2175
|
function is(b) {
|
|
2176
2176
|
if (!(b != null && b.itemsAtSubmission)) return [];
|
|
2177
|
-
const s = b.version === Fe.enum[2],
|
|
2177
|
+
const s = b.version === Fe.enum[2], n = new Set(b.itemsAtSubmission.map((c) => s ? c.id : c.sku._id));
|
|
2178
2178
|
return b.items.filter((c) => {
|
|
2179
|
-
const
|
|
2180
|
-
return !
|
|
2179
|
+
const v = s ? c.id : c.sku._id;
|
|
2180
|
+
return !n.has(v);
|
|
2181
2181
|
});
|
|
2182
2182
|
}
|
|
2183
2183
|
function cs(b, s) {
|
|
2184
|
-
var
|
|
2184
|
+
var d;
|
|
2185
2185
|
if (!b || s.length === 0) return {};
|
|
2186
|
-
const
|
|
2187
|
-
for (const
|
|
2188
|
-
for (const t of
|
|
2189
|
-
const
|
|
2190
|
-
|
|
2186
|
+
const n = b.version === Fe.enum[2], c = new Set(s.map((p) => n ? p.id : p.sku._id)), v = {};
|
|
2187
|
+
for (const p of b.deliveryOrder ?? [])
|
|
2188
|
+
for (const t of p.received ?? []) {
|
|
2189
|
+
const o = n ? t.id : t.sku._id;
|
|
2190
|
+
o && c.has(o) && (v[o] = (v[o] ?? 0) + (((d = t.amount) == null ? void 0 : d.amount) ?? 0));
|
|
2191
2191
|
}
|
|
2192
2192
|
return s.reduce(
|
|
2193
|
-
(
|
|
2194
|
-
var
|
|
2195
|
-
const
|
|
2196
|
-
return
|
|
2197
|
-
key:
|
|
2198
|
-
total: { amount:
|
|
2199
|
-
received: { amount:
|
|
2200
|
-
remaining: { amount:
|
|
2201
|
-
},
|
|
2193
|
+
(p, t) => {
|
|
2194
|
+
var D, T;
|
|
2195
|
+
const o = (n ? t.id : t.sku._id) ?? "", u = ((D = t.quantity) == null ? void 0 : D.amount) ?? 0, k = v[o] ?? 0, $ = ((T = t.quantity) == null ? void 0 : T.precision) ?? 0;
|
|
2196
|
+
return p[o] = {
|
|
2197
|
+
key: o,
|
|
2198
|
+
total: { amount: u, precision: $ },
|
|
2199
|
+
received: { amount: k, precision: $ },
|
|
2200
|
+
remaining: { amount: u - k, precision: $ }
|
|
2201
|
+
}, p;
|
|
2202
2202
|
},
|
|
2203
2203
|
{}
|
|
2204
2204
|
);
|
|
@@ -2230,227 +2230,227 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2230
2230
|
},
|
|
2231
2231
|
emits: ["submitted"],
|
|
2232
2232
|
setup(b, { emit: s }) {
|
|
2233
|
-
const { t:
|
|
2233
|
+
const { t: n } = Ys(), c = He(), v = Qe(), d = Z(!1), p = kt(), t = b, o = s, u = Zt("deliveryOrder"), k = Ye(), $ = j(
|
|
2234
2234
|
() => {
|
|
2235
|
-
var
|
|
2236
|
-
return ((
|
|
2235
|
+
var f;
|
|
2236
|
+
return ((f = t.purchaseOrder.deliveryFullfillment) == null ? void 0 : f.findIndex(
|
|
2237
2237
|
(i) => t.deliveryOrder.fullfillmentId && i.id === t.deliveryOrder.fullfillmentId
|
|
2238
2238
|
)) ?? -1;
|
|
2239
2239
|
}
|
|
2240
|
-
),
|
|
2240
|
+
), D = c.enablePurchaseOrderReceiveWithCustomCost, T = c.enablePortalDeliveryOrderWrite, S = Z({}), F = j(
|
|
2241
2241
|
() => (t.purchaseOrder.itemsAtSubmission ?? t.purchaseOrder.items).length
|
|
2242
|
-
),
|
|
2243
|
-
() => cs(t.purchaseOrder,
|
|
2242
|
+
), E = j(() => is(t.purchaseOrder)), J = j(
|
|
2243
|
+
() => cs(t.purchaseOrder, E.value)
|
|
2244
2244
|
), z = j(
|
|
2245
2245
|
() => t.purchaseOrder.items.map(
|
|
2246
|
-
(
|
|
2246
|
+
(f, i) => j({
|
|
2247
2247
|
get: () => {
|
|
2248
|
-
var
|
|
2249
|
-
const
|
|
2250
|
-
return
|
|
2248
|
+
var M;
|
|
2249
|
+
const O = (M = u.received[i]) == null ? void 0 : M.amount;
|
|
2250
|
+
return O ? +xe(O) : 0;
|
|
2251
2251
|
},
|
|
2252
|
-
set: (
|
|
2253
|
-
|
|
2252
|
+
set: (O) => {
|
|
2253
|
+
u.received[i].amount = Ke(O, 2);
|
|
2254
2254
|
}
|
|
2255
2255
|
})
|
|
2256
2256
|
)
|
|
2257
|
-
),
|
|
2257
|
+
), ae = j(
|
|
2258
2258
|
() => t.purchaseOrder.items.map(
|
|
2259
|
-
(
|
|
2259
|
+
(f, i) => j({
|
|
2260
2260
|
get: () => {
|
|
2261
|
-
var
|
|
2262
|
-
const
|
|
2263
|
-
return
|
|
2261
|
+
var M;
|
|
2262
|
+
const O = (M = u.received[i]) == null ? void 0 : M.cost;
|
|
2263
|
+
return O ? +xe(O) : 0;
|
|
2264
2264
|
},
|
|
2265
|
-
set: (
|
|
2266
|
-
|
|
2265
|
+
set: (O) => {
|
|
2266
|
+
u.received[i].cost = {
|
|
2267
2267
|
currency: De(),
|
|
2268
|
-
...Ke(
|
|
2268
|
+
...Ke(O, 4)
|
|
2269
2269
|
};
|
|
2270
2270
|
}
|
|
2271
2271
|
})
|
|
2272
2272
|
)
|
|
2273
2273
|
);
|
|
2274
|
-
function ge(
|
|
2275
|
-
var
|
|
2276
|
-
const i =
|
|
2277
|
-
if (
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2274
|
+
function ge(f) {
|
|
2275
|
+
var O;
|
|
2276
|
+
const i = !S.value[f];
|
|
2277
|
+
if (S.value[f] = i, i) {
|
|
2278
|
+
const M = (O = u.received[f]) == null ? void 0 : O.cost;
|
|
2279
|
+
u.received[f].cost = M ? { ...M, precision: 4 } : { currency: De(), amount: 0, precision: 4 };
|
|
2280
2280
|
} else
|
|
2281
|
-
delete
|
|
2281
|
+
delete u.received[f].cost;
|
|
2282
2282
|
}
|
|
2283
|
-
const H =
|
|
2284
|
-
() =>
|
|
2283
|
+
const H = Z([]), R = j(
|
|
2284
|
+
() => p.skus.filter((f) => !f.isInactive).map((f) => ({ label: `${f.name} (${f.code})`, value: f._id }))
|
|
2285
2285
|
);
|
|
2286
2286
|
function ne() {
|
|
2287
|
-
H.value.push({ skuId: null, costEnabled: !1 }),
|
|
2287
|
+
H.value.push({ skuId: null, costEnabled: !1 }), u.received.push({
|
|
2288
2288
|
sku: null,
|
|
2289
2289
|
amount: Ae.fromNumber(0),
|
|
2290
2290
|
measurement: null
|
|
2291
2291
|
});
|
|
2292
2292
|
}
|
|
2293
|
-
function
|
|
2294
|
-
H.value.splice(
|
|
2293
|
+
function P(f) {
|
|
2294
|
+
H.value.splice(f, 1), u.received.splice(F.value + f, 1);
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2297
|
-
H.value[
|
|
2298
|
-
const
|
|
2299
|
-
|
|
2296
|
+
function C(f, i) {
|
|
2297
|
+
H.value[f].skuId = i;
|
|
2298
|
+
const O = i ? p.skuById[i] : null;
|
|
2299
|
+
u.received[F.value + f].sku = O;
|
|
2300
2300
|
}
|
|
2301
|
-
function K(
|
|
2302
|
-
var
|
|
2303
|
-
const
|
|
2304
|
-
return (((ee = z.value[
|
|
2301
|
+
function K(f, i) {
|
|
2302
|
+
var ie, ee;
|
|
2303
|
+
const O = (ie = t.receivedInfoMap) == null ? void 0 : ie[i.sku._id], M = O ? `${n("inventory.transfer.receiveRequest.details.received")} ${Ae.toFormatString({ value: O.received })} / ${it(i.quantity, i.sku.unit, i.measurement)}` : void 0;
|
|
2304
|
+
return (((ee = z.value[f]) == null ? void 0 : ee.value) ?? 0) > 0 ? M : M ? `${M} · ${nt}` : nt;
|
|
2305
2305
|
}
|
|
2306
|
-
function
|
|
2307
|
-
var
|
|
2308
|
-
const
|
|
2306
|
+
function N(f, i) {
|
|
2307
|
+
var ie;
|
|
2308
|
+
const M = (((ie = X.value[i]) == null ? void 0 : ie.value) ?? 0) <= 0;
|
|
2309
2309
|
let G;
|
|
2310
|
-
if (
|
|
2311
|
-
const ee =
|
|
2312
|
-
G = `${
|
|
2310
|
+
if (f.skuId && J.value[f.skuId]) {
|
|
2311
|
+
const ee = J.value[f.skuId], ke = Ae.toFormatString({ value: ee.received });
|
|
2312
|
+
G = `${n("inventory.transfer.receiveRequest.details.received")} ${ke}`;
|
|
2313
2313
|
}
|
|
2314
|
-
return
|
|
2314
|
+
return M ? G ? `${G} · ${nt}` : nt : G;
|
|
2315
2315
|
}
|
|
2316
|
-
const
|
|
2317
|
-
() => H.value.map((
|
|
2318
|
-
const
|
|
2316
|
+
const X = j(
|
|
2317
|
+
() => H.value.map((f, i) => {
|
|
2318
|
+
const O = F.value + i;
|
|
2319
2319
|
return j({
|
|
2320
2320
|
get: () => {
|
|
2321
2321
|
var G;
|
|
2322
|
-
const
|
|
2323
|
-
return
|
|
2322
|
+
const M = (G = u.received[O]) == null ? void 0 : G.amount;
|
|
2323
|
+
return M ? +xe(M) : 0;
|
|
2324
2324
|
},
|
|
2325
|
-
set: (
|
|
2326
|
-
|
|
2325
|
+
set: (M) => {
|
|
2326
|
+
u.received[O].amount = Ke(M, 2);
|
|
2327
2327
|
}
|
|
2328
2328
|
});
|
|
2329
2329
|
})
|
|
2330
2330
|
), be = j(
|
|
2331
|
-
() => H.value.map((
|
|
2332
|
-
const
|
|
2331
|
+
() => H.value.map((f, i) => {
|
|
2332
|
+
const O = F.value + i;
|
|
2333
2333
|
return j({
|
|
2334
2334
|
get: () => {
|
|
2335
2335
|
var G;
|
|
2336
|
-
const
|
|
2337
|
-
return
|
|
2336
|
+
const M = (G = u.received[O]) == null ? void 0 : G.cost;
|
|
2337
|
+
return M ? +xe(M) : 0;
|
|
2338
2338
|
},
|
|
2339
|
-
set: (
|
|
2340
|
-
|
|
2339
|
+
set: (M) => {
|
|
2340
|
+
u.received[O].cost = {
|
|
2341
2341
|
currency: De(),
|
|
2342
|
-
...Ke(
|
|
2342
|
+
...Ke(M, 4)
|
|
2343
2343
|
};
|
|
2344
2344
|
}
|
|
2345
2345
|
});
|
|
2346
2346
|
})
|
|
2347
2347
|
);
|
|
2348
|
-
function ye(
|
|
2349
|
-
const i = H.value[
|
|
2350
|
-
i.costEnabled = !i.costEnabled, i.costEnabled ?
|
|
2348
|
+
function ye(f) {
|
|
2349
|
+
const i = H.value[f], O = F.value + f;
|
|
2350
|
+
i.costEnabled = !i.costEnabled, i.costEnabled ? u.received[O].cost = { currency: De(), amount: 0, precision: 4 } : delete u.received[O].cost;
|
|
2351
2351
|
}
|
|
2352
2352
|
Ge(
|
|
2353
|
-
() =>
|
|
2354
|
-
(
|
|
2355
|
-
var ke,
|
|
2356
|
-
if (!
|
|
2357
|
-
H.value = [],
|
|
2353
|
+
() => d.value,
|
|
2354
|
+
(f) => {
|
|
2355
|
+
var ke, le, r;
|
|
2356
|
+
if (!f) {
|
|
2357
|
+
H.value = [], S.value = {};
|
|
2358
2358
|
return;
|
|
2359
2359
|
}
|
|
2360
|
-
const i = t.purchaseOrder.itemsAtSubmission ?? t.purchaseOrder.items,
|
|
2360
|
+
const i = t.purchaseOrder.itemsAtSubmission ?? t.purchaseOrder.items, O = new Set(i.map((a) => a.sku._id)), M = {}, G = [];
|
|
2361
2361
|
for (const a of t.deliveryOrder.received ?? []) {
|
|
2362
|
-
const
|
|
2363
|
-
|
|
2362
|
+
const w = (ke = a.sku) == null ? void 0 : ke._id;
|
|
2363
|
+
w && (O.has(w) ? M[w] = a : G.push(a));
|
|
2364
2364
|
}
|
|
2365
|
-
|
|
2366
|
-
const
|
|
2367
|
-
return
|
|
2365
|
+
u.received = i.map((a) => {
|
|
2366
|
+
const w = M[a.sku._id];
|
|
2367
|
+
return w ? { ...w } : {
|
|
2368
2368
|
sku: a.sku,
|
|
2369
2369
|
amount: Ae.fromNumber(0),
|
|
2370
2370
|
measurement: a.measurement ?? null
|
|
2371
2371
|
};
|
|
2372
2372
|
});
|
|
2373
|
-
const
|
|
2373
|
+
const ie = {};
|
|
2374
2374
|
for (let a = 0; a < i.length; a++)
|
|
2375
|
-
(
|
|
2376
|
-
|
|
2377
|
-
const ee =
|
|
2375
|
+
(le = M[i[a].sku._id]) != null && le.cost && (ie[a] = !0);
|
|
2376
|
+
S.value = ie, H.value = [];
|
|
2377
|
+
const ee = E.value;
|
|
2378
2378
|
for (const a of G) {
|
|
2379
|
-
const
|
|
2379
|
+
const w = ee.find((q) => {
|
|
2380
2380
|
var W;
|
|
2381
|
-
return
|
|
2381
|
+
return q.sku._id === ((W = a.sku) == null ? void 0 : W._id);
|
|
2382
2382
|
});
|
|
2383
2383
|
H.value.push({
|
|
2384
2384
|
skuId: ((r = a.sku) == null ? void 0 : r._id) ?? null,
|
|
2385
2385
|
costEnabled: !!a.cost,
|
|
2386
2386
|
locked: !0,
|
|
2387
2387
|
quantityLocked: !0,
|
|
2388
|
-
historyItem:
|
|
2389
|
-
}),
|
|
2388
|
+
historyItem: w
|
|
2389
|
+
}), u.received.push({ ...a });
|
|
2390
2390
|
}
|
|
2391
2391
|
if (ee.length) {
|
|
2392
|
-
const a = new Set(G.map((
|
|
2393
|
-
var
|
|
2394
|
-
return (
|
|
2392
|
+
const a = new Set(G.map((w) => {
|
|
2393
|
+
var q;
|
|
2394
|
+
return (q = w.sku) == null ? void 0 : q._id;
|
|
2395
2395
|
}));
|
|
2396
|
-
for (const
|
|
2397
|
-
a.has(
|
|
2398
|
-
skuId:
|
|
2396
|
+
for (const w of ee)
|
|
2397
|
+
a.has(w.sku._id) || (H.value.push({
|
|
2398
|
+
skuId: w.sku._id,
|
|
2399
2399
|
costEnabled: !1,
|
|
2400
2400
|
locked: !0,
|
|
2401
|
-
historyItem:
|
|
2402
|
-
}),
|
|
2403
|
-
sku:
|
|
2401
|
+
historyItem: w
|
|
2402
|
+
}), u.received.push({
|
|
2403
|
+
sku: w.sku,
|
|
2404
2404
|
amount: Ae.fromNumber(0),
|
|
2405
|
-
measurement:
|
|
2405
|
+
measurement: w.measurement ?? null
|
|
2406
2406
|
}));
|
|
2407
2407
|
}
|
|
2408
2408
|
}
|
|
2409
2409
|
);
|
|
2410
|
-
const pe =
|
|
2410
|
+
const pe = Z(!1);
|
|
2411
2411
|
function fe() {
|
|
2412
|
-
pe.value = !0,
|
|
2412
|
+
pe.value = !0, k.updateDeliveryOrder({
|
|
2413
2413
|
deliveryOrder: {
|
|
2414
2414
|
...t.deliveryOrder,
|
|
2415
|
-
...
|
|
2415
|
+
...u
|
|
2416
2416
|
},
|
|
2417
2417
|
purchaseOrderId: t.purchaseOrder._id,
|
|
2418
2418
|
purchaseOrderRev: t.purchaseOrder._rev
|
|
2419
2419
|
}).then(() => {
|
|
2420
|
-
|
|
2420
|
+
v.open(
|
|
2421
2421
|
{
|
|
2422
2422
|
title: "Success",
|
|
2423
2423
|
message: `PO# ${t.purchaseOrder.seqNumber} Changes have been saved`,
|
|
2424
2424
|
type: "success"
|
|
2425
2425
|
},
|
|
2426
2426
|
1e4
|
|
2427
|
-
),
|
|
2427
|
+
), d.value = !1, o("submitted");
|
|
2428
2428
|
}).finally(() => {
|
|
2429
2429
|
pe.value = !1;
|
|
2430
2430
|
});
|
|
2431
2431
|
}
|
|
2432
|
-
return (
|
|
2433
|
-
const
|
|
2432
|
+
return (f, i) => {
|
|
2433
|
+
const O = re("FmButton"), M = re("FmStepperField"), G = re("FmSwitch"), ie = re("FmSelect"), ee = re("FmTextField"), ke = re("FmDialog");
|
|
2434
2434
|
return l(), me(ke, {
|
|
2435
|
-
modelValue:
|
|
2436
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
2435
|
+
modelValue: d.value,
|
|
2436
|
+
"onUpdate:modelValue": i[1] || (i[1] = (le) => d.value = le),
|
|
2437
2437
|
overlay: !0,
|
|
2438
2438
|
"min-width": 800
|
|
2439
2439
|
}, {
|
|
2440
|
-
"dialog-button":
|
|
2441
|
-
_(
|
|
2440
|
+
"dialog-button": ce(() => [
|
|
2441
|
+
_(T) ? (l(), me(O, {
|
|
2442
2442
|
key: 0,
|
|
2443
2443
|
variant: "plain",
|
|
2444
2444
|
label: "Edit",
|
|
2445
2445
|
size: "md",
|
|
2446
2446
|
"prepend-icon": "edit"
|
|
2447
|
-
})) :
|
|
2447
|
+
})) : I("", !0)
|
|
2448
2448
|
]),
|
|
2449
|
-
"dialog-header":
|
|
2449
|
+
"dialog-header": ce(() => [
|
|
2450
2450
|
e("div", null, "Received on " + x(_(tt)(t.deliveryOrder.createdAt)), 1)
|
|
2451
2451
|
]),
|
|
2452
|
-
"dialog-footer":
|
|
2453
|
-
|
|
2452
|
+
"dialog-footer": ce(() => [
|
|
2453
|
+
L(O, {
|
|
2454
2454
|
class: "ml-auto",
|
|
2455
2455
|
label: "Apply changes",
|
|
2456
2456
|
size: "md",
|
|
@@ -2460,7 +2460,7 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2460
2460
|
onClick: fe
|
|
2461
2461
|
}, null, 8, ["disabled", "loading"])
|
|
2462
2462
|
]),
|
|
2463
|
-
default:
|
|
2463
|
+
default: ce(() => [
|
|
2464
2464
|
e("div", po, [
|
|
2465
2465
|
e("div", fo, [
|
|
2466
2466
|
i[2] || (i[2] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Adjustment date", -1)),
|
|
@@ -2468,51 +2468,51 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2468
2468
|
]),
|
|
2469
2469
|
e("div", yo, [
|
|
2470
2470
|
i[4] || (i[4] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Items going to receive ", -1)),
|
|
2471
|
-
(l(!0), h(Ce, null, Ee(t.purchaseOrder.items, (
|
|
2471
|
+
(l(!0), h(Ce, null, Ee(t.purchaseOrder.items, (le, r) => {
|
|
2472
2472
|
var a;
|
|
2473
2473
|
return l(), h("div", { key: r }, [
|
|
2474
2474
|
e("div", bo, [
|
|
2475
2475
|
e("div", ho, [
|
|
2476
|
-
e("span", go, x(
|
|
2477
|
-
e("span", _o, x(
|
|
2476
|
+
e("span", go, x(le.sku.name), 1),
|
|
2477
|
+
e("span", _o, x(le.sku.code), 1)
|
|
2478
2478
|
]),
|
|
2479
2479
|
e("div", So, [
|
|
2480
|
-
|
|
2480
|
+
L(M, {
|
|
2481
2481
|
label: "Receive Quantity",
|
|
2482
2482
|
modelValue: z.value[r].value,
|
|
2483
|
-
"onUpdate:modelValue": (
|
|
2484
|
-
"append-text": ((a =
|
|
2485
|
-
"helper-text": K(r,
|
|
2483
|
+
"onUpdate:modelValue": (w) => z.value[r].value = w,
|
|
2484
|
+
"append-text": ((a = le.measurement) == null ? void 0 : a.abbrev) ?? le.sku.unit.abbrev,
|
|
2485
|
+
"helper-text": K(r, le)
|
|
2486
2486
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text", "helper-text"]),
|
|
2487
|
-
_(
|
|
2488
|
-
|
|
2489
|
-
"model-value":
|
|
2490
|
-
"onUpdate:modelValue": (
|
|
2487
|
+
_(D) ? (l(), h("div", xo, [
|
|
2488
|
+
L(G, {
|
|
2489
|
+
"model-value": S.value[r],
|
|
2490
|
+
"onUpdate:modelValue": (w) => ge(r),
|
|
2491
2491
|
size: "sm"
|
|
2492
2492
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2493
2493
|
i[3] || (i[3] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
2494
|
-
])) :
|
|
2495
|
-
_(
|
|
2494
|
+
])) : I("", !0),
|
|
2495
|
+
_(D) && S.value[r] ? (l(), me(M, {
|
|
2496
2496
|
key: 1,
|
|
2497
|
-
modelValue:
|
|
2498
|
-
"onUpdate:modelValue": (
|
|
2497
|
+
modelValue: ae.value[r].value,
|
|
2498
|
+
"onUpdate:modelValue": (w) => ae.value[r].value = w,
|
|
2499
2499
|
label: "Total Cost",
|
|
2500
2500
|
step: 1e-4,
|
|
2501
2501
|
min: 0,
|
|
2502
2502
|
placeholder: "0.0000",
|
|
2503
2503
|
size: "sm",
|
|
2504
2504
|
"append-text": _(De)()
|
|
2505
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) :
|
|
2505
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : I("", !0)
|
|
2506
2506
|
])
|
|
2507
2507
|
]),
|
|
2508
|
-
r < t.purchaseOrder.items.length - 1 ? (l(), h("div", ko)) :
|
|
2508
|
+
r < t.purchaseOrder.items.length - 1 ? (l(), h("div", ko)) : I("", !0)
|
|
2509
2509
|
]);
|
|
2510
2510
|
}), 128))
|
|
2511
2511
|
]),
|
|
2512
2512
|
e("div", Oo, [
|
|
2513
2513
|
e("div", wo, [
|
|
2514
2514
|
i[5] || (i[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Extra items", -1)),
|
|
2515
|
-
|
|
2515
|
+
L(O, {
|
|
2516
2516
|
variant: "tertiary",
|
|
2517
2517
|
label: "Add item",
|
|
2518
2518
|
"prepend-icon": "add",
|
|
@@ -2520,71 +2520,71 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2520
2520
|
onClick: ne
|
|
2521
2521
|
})
|
|
2522
2522
|
]),
|
|
2523
|
-
H.value.length === 0 ? (l(), h("div", $o, " No extra items added ")) :
|
|
2524
|
-
(l(!0), h(Ce, null, Ee(H.value, (
|
|
2525
|
-
var a,
|
|
2523
|
+
H.value.length === 0 ? (l(), h("div", $o, " No extra items added ")) : I("", !0),
|
|
2524
|
+
(l(!0), h(Ce, null, Ee(H.value, (le, r) => {
|
|
2525
|
+
var a, w;
|
|
2526
2526
|
return l(), h("div", { key: r }, [
|
|
2527
2527
|
e("div", Co, [
|
|
2528
2528
|
e("div", Do, [
|
|
2529
|
-
|
|
2530
|
-
"model-value":
|
|
2531
|
-
"onUpdate:modelValue": (
|
|
2529
|
+
L(ie, {
|
|
2530
|
+
"model-value": le.skuId,
|
|
2531
|
+
"onUpdate:modelValue": (q) => C(r, q),
|
|
2532
2532
|
label: "Ingredient",
|
|
2533
|
-
items:
|
|
2533
|
+
items: R.value,
|
|
2534
2534
|
searchable: "",
|
|
2535
2535
|
searchTarget: "label",
|
|
2536
2536
|
placeholder: "Select ingredient",
|
|
2537
|
-
disabled:
|
|
2537
|
+
disabled: le.locked
|
|
2538
2538
|
}, null, 8, ["model-value", "onUpdate:modelValue", "items", "disabled"])
|
|
2539
2539
|
]),
|
|
2540
2540
|
e("div", Ro, [
|
|
2541
|
-
|
|
2541
|
+
L(M, {
|
|
2542
2542
|
label: "Receive Quantity",
|
|
2543
|
-
modelValue:
|
|
2544
|
-
"onUpdate:modelValue": (
|
|
2545
|
-
"append-text":
|
|
2546
|
-
"helper-text":
|
|
2547
|
-
disabled:
|
|
2543
|
+
modelValue: X.value[r].value,
|
|
2544
|
+
"onUpdate:modelValue": (q) => X.value[r].value = q,
|
|
2545
|
+
"append-text": le.skuId ? ((w = (a = _(p).skuById[le.skuId]) == null ? void 0 : a.unit) == null ? void 0 : w.abbrev) ?? "" : "",
|
|
2546
|
+
"helper-text": N(le, r),
|
|
2547
|
+
disabled: le.quantityLocked || !le.skuId
|
|
2548
2548
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text", "helper-text", "disabled"]),
|
|
2549
|
-
_(
|
|
2550
|
-
|
|
2551
|
-
"model-value":
|
|
2552
|
-
"onUpdate:modelValue": (
|
|
2549
|
+
_(D) ? (l(), h("div", No, [
|
|
2550
|
+
L(G, {
|
|
2551
|
+
"model-value": le.costEnabled,
|
|
2552
|
+
"onUpdate:modelValue": (q) => ye(r),
|
|
2553
2553
|
size: "sm"
|
|
2554
2554
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2555
2555
|
i[6] || (i[6] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
2556
|
-
])) :
|
|
2557
|
-
_(
|
|
2556
|
+
])) : I("", !0),
|
|
2557
|
+
_(D) && le.costEnabled ? (l(), me(M, {
|
|
2558
2558
|
key: 1,
|
|
2559
2559
|
modelValue: be.value[r].value,
|
|
2560
|
-
"onUpdate:modelValue": (
|
|
2560
|
+
"onUpdate:modelValue": (q) => be.value[r].value = q,
|
|
2561
2561
|
label: "Total Cost",
|
|
2562
2562
|
step: 1e-4,
|
|
2563
2563
|
min: 0,
|
|
2564
2564
|
placeholder: "0.0000",
|
|
2565
2565
|
size: "sm",
|
|
2566
2566
|
"append-text": _(De)()
|
|
2567
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) :
|
|
2567
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : I("", !0)
|
|
2568
2568
|
]),
|
|
2569
|
-
|
|
2569
|
+
le.locked ? I("", !0) : (l(), me(O, {
|
|
2570
2570
|
key: 0,
|
|
2571
2571
|
variant: "tertiary",
|
|
2572
2572
|
"prepend-icon": "delete",
|
|
2573
2573
|
size: "md",
|
|
2574
2574
|
class: "mt-6",
|
|
2575
|
-
onClick: (
|
|
2575
|
+
onClick: (q) => P(r)
|
|
2576
2576
|
}, null, 8, ["onClick"]))
|
|
2577
2577
|
]),
|
|
2578
|
-
r < H.value.length - 1 ? (l(), h("div", Ao)) :
|
|
2578
|
+
r < H.value.length - 1 ? (l(), h("div", Ao)) : I("", !0)
|
|
2579
2579
|
]);
|
|
2580
2580
|
}), 128))
|
|
2581
2581
|
]),
|
|
2582
2582
|
e("div", To, [
|
|
2583
2583
|
i[7] || (i[7] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
|
|
2584
2584
|
e("div", Po, [
|
|
2585
|
-
|
|
2586
|
-
modelValue: _(
|
|
2587
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
2585
|
+
L(ee, {
|
|
2586
|
+
modelValue: _(u).deliveryOrderNumber,
|
|
2587
|
+
"onUpdate:modelValue": i[0] || (i[0] = (le) => _(u).deliveryOrderNumber = le),
|
|
2588
2588
|
size: "md",
|
|
2589
2589
|
placeholder: t.deliveryOrder.deliveryOrderNumber
|
|
2590
2590
|
}, null, 8, ["modelValue", "placeholder"])
|
|
@@ -2594,10 +2594,10 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2594
2594
|
i[8] || (i[8] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
|
|
2595
2595
|
e("div", Fo, x(t.deliveryOrder.remark || "N/A"), 1)
|
|
2596
2596
|
]),
|
|
2597
|
-
|
|
2597
|
+
$.value >= 0 ? (l(), h("div", Eo, [
|
|
2598
2598
|
i[9] || (i[9] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Fulfilment's sequence", -1)),
|
|
2599
|
-
e("div", qo, x(
|
|
2600
|
-
])) :
|
|
2599
|
+
e("div", qo, x($.value + 1), 1)
|
|
2600
|
+
])) : I("", !0)
|
|
2601
2601
|
])
|
|
2602
2602
|
]),
|
|
2603
2603
|
_: 1
|
|
@@ -2643,48 +2643,48 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2643
2643
|
},
|
|
2644
2644
|
emits: ["submitted"],
|
|
2645
2645
|
setup(b, { emit: s }) {
|
|
2646
|
-
var oe,
|
|
2647
|
-
const { t:
|
|
2646
|
+
var oe, A, ue;
|
|
2647
|
+
const { t: n } = dt(), c = Z(!1), v = mt(), d = b, p = s, t = Zt("", {
|
|
2648
2648
|
default: {
|
|
2649
2649
|
deliveryOrderNumber: "",
|
|
2650
2650
|
remark: "",
|
|
2651
|
-
received: (
|
|
2651
|
+
received: (d.purchaseOrder.itemsAtSubmission ?? d.purchaseOrder.items).map((y) => ({
|
|
2652
2652
|
sku: y.sku,
|
|
2653
2653
|
amount: Ae.fromNumber(0),
|
|
2654
2654
|
measurement: y.measurement
|
|
2655
2655
|
})),
|
|
2656
2656
|
createdBy: {
|
|
2657
|
-
id: ((oe =
|
|
2658
|
-
name: ((
|
|
2657
|
+
id: ((oe = v.sessionUser.value) == null ? void 0 : oe.id) || "",
|
|
2658
|
+
name: ((A = v.sessionUser.value) == null ? void 0 : A.displayName) || ""
|
|
2659
2659
|
},
|
|
2660
2660
|
createdAt: ""
|
|
2661
2661
|
}
|
|
2662
|
-
}),
|
|
2663
|
-
() =>
|
|
2664
|
-
),
|
|
2665
|
-
() => cs(
|
|
2662
|
+
}), o = Ye(), u = ft(), k = He(), $ = kt(), D = ((ue = d.purchaseOrder) == null ? void 0 : ue.supplier.internal) != null, T = D && k.enablePOSTransferRequireFulfillment, S = k.enablePortalDeliveryOrderWrite && (d.purchaseOrder.status === ve.Enum.RECEIVING || d.purchaseOrder.status === ve.Enum.COMPLETE) && (D ? !T : !0), F = k.enablePurchaseOrderReceiveWithCustomCost, E = k.enableBackdateReceive, J = Z({}), z = j(
|
|
2663
|
+
() => d.purchaseOrder.itemsAtSubmission ?? d.purchaseOrder.items
|
|
2664
|
+
), ae = j(() => is(d.purchaseOrder)), ge = j(
|
|
2665
|
+
() => cs(d.purchaseOrder, ae.value)
|
|
2666
2666
|
), H = j(
|
|
2667
2667
|
() => {
|
|
2668
2668
|
var y;
|
|
2669
|
-
return (((y =
|
|
2669
|
+
return (((y = d.purchaseOrder) == null ? void 0 : y.version) ?? Fe.enum[1]) === Fe.enum[2];
|
|
2670
2670
|
}
|
|
2671
2671
|
);
|
|
2672
|
-
function
|
|
2672
|
+
function R(y) {
|
|
2673
2673
|
return (H.value ? y.id : y.sku._id) ?? null;
|
|
2674
2674
|
}
|
|
2675
|
-
const ne = Qe(),
|
|
2675
|
+
const ne = Qe(), P = j({
|
|
2676
2676
|
get() {
|
|
2677
2677
|
if (!t.createdAt) return "";
|
|
2678
|
-
const y = new Date(t.createdAt), m = y.getFullYear(), g = String(y.getMonth() + 1).padStart(2, "0"),
|
|
2679
|
-
return `${m}-${g}-${
|
|
2678
|
+
const y = new Date(t.createdAt), m = y.getFullYear(), g = String(y.getMonth() + 1).padStart(2, "0"), U = String(y.getDate()).padStart(2, "0");
|
|
2679
|
+
return `${m}-${g}-${U}`;
|
|
2680
2680
|
},
|
|
2681
2681
|
set(y) {
|
|
2682
2682
|
if (y) {
|
|
2683
|
-
const m = t.createdAt ? new Date(t.createdAt) : /* @__PURE__ */ new Date(), [g,
|
|
2684
|
-
m.setFullYear(parseInt(g)), m.setMonth(parseInt(
|
|
2683
|
+
const m = t.createdAt ? new Date(t.createdAt) : /* @__PURE__ */ new Date(), [g, U, B] = y.split("-");
|
|
2684
|
+
m.setFullYear(parseInt(g)), m.setMonth(parseInt(U) - 1), m.setDate(parseInt(B)), t.createdAt = m.toISOString();
|
|
2685
2685
|
}
|
|
2686
2686
|
}
|
|
2687
|
-
}),
|
|
2687
|
+
}), C = j({
|
|
2688
2688
|
get() {
|
|
2689
2689
|
if (!t.createdAt) return "";
|
|
2690
2690
|
const y = new Date(t.createdAt), m = String(y.getHours()).padStart(2, "0"), g = String(y.getMinutes()).padStart(2, "0");
|
|
@@ -2692,50 +2692,50 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2692
2692
|
},
|
|
2693
2693
|
set(y) {
|
|
2694
2694
|
if (y) {
|
|
2695
|
-
const m = t.createdAt ? new Date(t.createdAt) : /* @__PURE__ */ new Date(), [g,
|
|
2696
|
-
m.setHours(parseInt(g)), m.setMinutes(parseInt(
|
|
2695
|
+
const m = t.createdAt ? new Date(t.createdAt) : /* @__PURE__ */ new Date(), [g, U] = y.split(":");
|
|
2696
|
+
m.setHours(parseInt(g)), m.setMinutes(parseInt(U)), t.createdAt = m.toISOString();
|
|
2697
2697
|
}
|
|
2698
2698
|
}
|
|
2699
2699
|
}), K = j(() => {
|
|
2700
|
-
const y = at(
|
|
2700
|
+
const y = at(d.purchaseOrder._id);
|
|
2701
2701
|
if (!y) return "";
|
|
2702
|
-
const m = new Date(y), g = m.getFullYear(),
|
|
2703
|
-
return `${g}-${
|
|
2704
|
-
}),
|
|
2705
|
-
const y = at(
|
|
2702
|
+
const m = new Date(y), g = m.getFullYear(), U = String(m.getMonth() + 1).padStart(2, "0"), B = String(m.getDate()).padStart(2, "0");
|
|
2703
|
+
return `${g}-${U}-${B}`;
|
|
2704
|
+
}), N = j(() => {
|
|
2705
|
+
const y = at(d.purchaseOrder._id);
|
|
2706
2706
|
return y ? new Date(y) : null;
|
|
2707
|
-
}),
|
|
2708
|
-
if (!
|
|
2709
|
-
if (/* @__PURE__ */ new Date(`${
|
|
2710
|
-
const m = K.value, g =
|
|
2707
|
+
}), X = j(() => {
|
|
2708
|
+
if (!P.value || !C.value || !N.value) return null;
|
|
2709
|
+
if (/* @__PURE__ */ new Date(`${P.value}T${C.value}:00`) < N.value) {
|
|
2710
|
+
const m = K.value, g = N.value.getHours(), U = N.value.getMinutes(), B = g >= 12 ? "PM" : "AM", _e = g % 12 || 12, $e = `${String(_e).padStart(2, "0")}:${String(U).padStart(2, "0")} ${B}`;
|
|
2711
2711
|
return `Delivery date & time cannot be earlier than order creation (${m} ${$e})`;
|
|
2712
2712
|
}
|
|
2713
2713
|
return null;
|
|
2714
|
-
}), be = j(() =>
|
|
2714
|
+
}), be = j(() => X.value || O.value.some((m) => !m.skuId) ? !1 : t.received.some((m) => {
|
|
2715
2715
|
const g = m.amount;
|
|
2716
2716
|
return g ? +xe(g) > 0 : !1;
|
|
2717
2717
|
}));
|
|
2718
2718
|
function ye(y) {
|
|
2719
2719
|
var g;
|
|
2720
|
-
const m = (g =
|
|
2721
|
-
return `${
|
|
2720
|
+
const m = (g = d.receivedInfoMap[y.sku._id]) == null ? void 0 : g.received;
|
|
2721
|
+
return `${n("inventory.transfer.receiveRequest.details.received")} ${Ae.toFormatString({ value: m })} / ${it(y.quantity, y.sku.unit, y.measurement)}`;
|
|
2722
2722
|
}
|
|
2723
2723
|
function pe() {
|
|
2724
2724
|
t.createdAt = "";
|
|
2725
2725
|
}
|
|
2726
2726
|
const fe = j(() => z.value.map((y, m) => j({
|
|
2727
2727
|
get: () => {
|
|
2728
|
-
var
|
|
2729
|
-
const g = (
|
|
2728
|
+
var U;
|
|
2729
|
+
const g = (U = t.received[m]) == null ? void 0 : U.amount;
|
|
2730
2730
|
return g ? +xe(g) : 0;
|
|
2731
2731
|
},
|
|
2732
2732
|
set: (g) => {
|
|
2733
2733
|
t.received[m].amount = Ke(g, 2);
|
|
2734
2734
|
}
|
|
2735
2735
|
})));
|
|
2736
|
-
function
|
|
2737
|
-
const m = !
|
|
2738
|
-
if (
|
|
2736
|
+
function f(y) {
|
|
2737
|
+
const m = !J.value[y];
|
|
2738
|
+
if (J.value[y] = m, m) {
|
|
2739
2739
|
const g = z.value[y];
|
|
2740
2740
|
g.totalCost ? t.received[y].cost = {
|
|
2741
2741
|
currency: g.totalCost.currency,
|
|
@@ -2752,8 +2752,8 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2752
2752
|
}
|
|
2753
2753
|
const i = j(() => z.value.map((y, m) => j({
|
|
2754
2754
|
get: () => {
|
|
2755
|
-
var
|
|
2756
|
-
const g = (
|
|
2755
|
+
var U;
|
|
2756
|
+
const g = (U = t.received[m]) == null ? void 0 : U.cost;
|
|
2757
2757
|
return g ? +xe(g) : 0;
|
|
2758
2758
|
},
|
|
2759
2759
|
set: (g) => {
|
|
@@ -2762,71 +2762,71 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2762
2762
|
...Ke(g, 4)
|
|
2763
2763
|
};
|
|
2764
2764
|
}
|
|
2765
|
-
}))),
|
|
2766
|
-
() =>
|
|
2765
|
+
}))), O = Z([]), M = j(
|
|
2766
|
+
() => $.skus.filter((y) => !y.isInactive).map((y) => ({ label: `${y.name} (${y.code})`, value: y._id }))
|
|
2767
2767
|
), G = j(() => z.value.length);
|
|
2768
|
-
function
|
|
2769
|
-
|
|
2768
|
+
function ie() {
|
|
2769
|
+
O.value.push({ skuId: null, stableKey: null, costEnabled: !1 }), t.received.push({
|
|
2770
2770
|
sku: null,
|
|
2771
2771
|
amount: Ae.fromNumber(0),
|
|
2772
2772
|
measurement: null
|
|
2773
2773
|
});
|
|
2774
2774
|
}
|
|
2775
2775
|
function ee(y) {
|
|
2776
|
-
|
|
2776
|
+
O.value.splice(y, 1), t.received.splice(G.value + y, 1);
|
|
2777
2777
|
}
|
|
2778
2778
|
function ke(y, m) {
|
|
2779
|
-
|
|
2780
|
-
const g = m ?
|
|
2779
|
+
O.value[y].skuId = m;
|
|
2780
|
+
const g = m ? $.skuById[m] : null;
|
|
2781
2781
|
t.received[G.value + y].sku = g;
|
|
2782
2782
|
}
|
|
2783
|
-
function
|
|
2783
|
+
function le(y) {
|
|
2784
2784
|
const m = y.stableKey;
|
|
2785
2785
|
if (m && ge.value[m]) {
|
|
2786
|
-
const g = ge.value[m],
|
|
2787
|
-
return `${
|
|
2786
|
+
const g = ge.value[m], U = Ae.toFormatString({ value: g.received });
|
|
2787
|
+
return `${n("inventory.transfer.receiveRequest.details.received")} ${U}`;
|
|
2788
2788
|
}
|
|
2789
2789
|
}
|
|
2790
2790
|
const r = j(
|
|
2791
|
-
() =>
|
|
2791
|
+
() => O.value.map((y, m) => {
|
|
2792
2792
|
const g = G.value + m;
|
|
2793
2793
|
return j({
|
|
2794
2794
|
get: () => {
|
|
2795
2795
|
var B;
|
|
2796
|
-
const
|
|
2797
|
-
return
|
|
2796
|
+
const U = (B = t.received[g]) == null ? void 0 : B.amount;
|
|
2797
|
+
return U ? +xe(U) : 0;
|
|
2798
2798
|
},
|
|
2799
|
-
set: (
|
|
2800
|
-
t.received[g].amount = Ke(
|
|
2799
|
+
set: (U) => {
|
|
2800
|
+
t.received[g].amount = Ke(U, 2);
|
|
2801
2801
|
}
|
|
2802
2802
|
});
|
|
2803
2803
|
})
|
|
2804
2804
|
), a = j(
|
|
2805
|
-
() =>
|
|
2805
|
+
() => O.value.map((y, m) => {
|
|
2806
2806
|
const g = G.value + m;
|
|
2807
2807
|
return j({
|
|
2808
2808
|
get: () => {
|
|
2809
2809
|
var B;
|
|
2810
|
-
const
|
|
2811
|
-
return
|
|
2810
|
+
const U = (B = t.received[g]) == null ? void 0 : B.cost;
|
|
2811
|
+
return U ? +xe(U) : 0;
|
|
2812
2812
|
},
|
|
2813
|
-
set: (
|
|
2813
|
+
set: (U) => {
|
|
2814
2814
|
t.received[g].cost = {
|
|
2815
2815
|
currency: De(),
|
|
2816
|
-
...Ke(
|
|
2816
|
+
...Ke(U, 4)
|
|
2817
2817
|
};
|
|
2818
2818
|
}
|
|
2819
2819
|
});
|
|
2820
2820
|
})
|
|
2821
2821
|
);
|
|
2822
|
-
function
|
|
2823
|
-
const m =
|
|
2822
|
+
function w(y) {
|
|
2823
|
+
const m = O.value[y], g = G.value + y;
|
|
2824
2824
|
m.costEnabled = !m.costEnabled, m.costEnabled ? t.received[g].cost = { currency: De(), amount: 0, precision: 4 } : delete t.received[g].cost;
|
|
2825
2825
|
}
|
|
2826
|
-
function
|
|
2827
|
-
|
|
2826
|
+
function q() {
|
|
2827
|
+
u.open({
|
|
2828
2828
|
title: "Confirm Create Delivery Order",
|
|
2829
|
-
message: `Are you sure you want to create delivery order for PO# ${
|
|
2829
|
+
message: `Are you sure you want to create delivery order for PO# ${d.purchaseOrder.seqNumber}?`,
|
|
2830
2830
|
primaryActions: {
|
|
2831
2831
|
text: "Create",
|
|
2832
2832
|
close: !0,
|
|
@@ -2838,22 +2838,22 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2838
2838
|
}
|
|
2839
2839
|
}).onPrimary(() => Q());
|
|
2840
2840
|
}
|
|
2841
|
-
const W =
|
|
2841
|
+
const W = Z(!1);
|
|
2842
2842
|
function Q() {
|
|
2843
|
-
W.value = !0,
|
|
2843
|
+
W.value = !0, o.createDeliveryOrder({
|
|
2844
2844
|
deliveryOrder: t,
|
|
2845
|
-
purchaseOrderId:
|
|
2846
|
-
purchaseOrderRev:
|
|
2845
|
+
purchaseOrderId: d.purchaseOrder._id,
|
|
2846
|
+
purchaseOrderRev: d.purchaseOrder._rev,
|
|
2847
2847
|
currency: De()
|
|
2848
2848
|
}).then(() => {
|
|
2849
2849
|
ne.open(
|
|
2850
2850
|
{
|
|
2851
2851
|
title: "Success",
|
|
2852
|
-
message: `New delivery order created for PO# ${
|
|
2852
|
+
message: `New delivery order created for PO# ${d.purchaseOrder.seqNumber}`,
|
|
2853
2853
|
type: "success"
|
|
2854
2854
|
},
|
|
2855
2855
|
1e4
|
|
2856
|
-
), c.value = !1,
|
|
2856
|
+
), c.value = !1, p("submitted");
|
|
2857
2857
|
}).finally(() => {
|
|
2858
2858
|
W.value = !1;
|
|
2859
2859
|
});
|
|
@@ -2861,9 +2861,9 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2861
2861
|
return Ge(
|
|
2862
2862
|
() => c.value,
|
|
2863
2863
|
(y) => {
|
|
2864
|
-
var
|
|
2864
|
+
var U;
|
|
2865
2865
|
if (!y) {
|
|
2866
|
-
|
|
2866
|
+
O.value = [], t.received = z.value.map((B) => ({
|
|
2867
2867
|
sku: B.sku,
|
|
2868
2868
|
amount: Ae.fromNumber(0),
|
|
2869
2869
|
measurement: B.measurement
|
|
@@ -2872,14 +2872,14 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2872
2872
|
}
|
|
2873
2873
|
const m = z.value;
|
|
2874
2874
|
for (let B = 0; B < m.length; B++) {
|
|
2875
|
-
const _e = m[B], te = (((
|
|
2875
|
+
const _e = m[B], te = (((U = d.purchaseOrder) == null ? void 0 : U.version) ?? Fe.enum[1]) === Fe.enum[2] ? _e.id : _e.sku._id, he = d.receivedMap[te], we = +xe(_e.quantity), Re = he ? +xe(he.received) : 0;
|
|
2876
2876
|
fe.value[B].value = Math.max(0, we - Re);
|
|
2877
2877
|
}
|
|
2878
|
-
const g =
|
|
2878
|
+
const g = ae.value;
|
|
2879
2879
|
if (g.length) {
|
|
2880
2880
|
for (const B of g) {
|
|
2881
|
-
const _e =
|
|
2882
|
-
|
|
2881
|
+
const _e = R(B);
|
|
2882
|
+
O.value.push({
|
|
2883
2883
|
skuId: B.sku._id,
|
|
2884
2884
|
stableKey: _e,
|
|
2885
2885
|
costEnabled: !1,
|
|
@@ -2893,7 +2893,7 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2893
2893
|
});
|
|
2894
2894
|
}
|
|
2895
2895
|
for (let B = 0; B < g.length; B++) {
|
|
2896
|
-
const _e =
|
|
2896
|
+
const _e = R(g[B]), $e = _e ? ge.value[_e] : void 0;
|
|
2897
2897
|
if ($e) {
|
|
2898
2898
|
const te = Math.pow(10, $e.remaining.precision ?? 2);
|
|
2899
2899
|
r.value[B].value = Math.max(0, $e.remaining.amount / te);
|
|
@@ -2902,82 +2902,82 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2902
2902
|
}
|
|
2903
2903
|
}
|
|
2904
2904
|
), (y, m) => {
|
|
2905
|
-
const g = re("FmButton"),
|
|
2905
|
+
const g = re("FmButton"), U = re("FmDatePicker"), B = re("FmTimePicker"), _e = re("FmIcon"), $e = re("FmStepperField"), te = re("FmSwitch"), he = re("FmSelect"), we = re("FmTextField"), Re = re("FmDialog");
|
|
2906
2906
|
return l(), me(Re, {
|
|
2907
2907
|
modelValue: c.value,
|
|
2908
2908
|
"onUpdate:modelValue": m[4] || (m[4] = (Ne) => c.value = Ne),
|
|
2909
2909
|
overlay: !0,
|
|
2910
2910
|
"min-width": 800
|
|
2911
2911
|
}, {
|
|
2912
|
-
"dialog-button":
|
|
2913
|
-
_(
|
|
2912
|
+
"dialog-button": ce(() => [
|
|
2913
|
+
_(S) ? (l(), me(g, {
|
|
2914
2914
|
key: 0,
|
|
2915
2915
|
variant: "primary",
|
|
2916
2916
|
label: "Create",
|
|
2917
2917
|
size: "md",
|
|
2918
2918
|
"prepend-icon": "add",
|
|
2919
2919
|
class: "w-full"
|
|
2920
|
-
})) :
|
|
2920
|
+
})) : I("", !0)
|
|
2921
2921
|
]),
|
|
2922
|
-
"dialog-header":
|
|
2923
|
-
e("div", null, "Order #" + x(
|
|
2922
|
+
"dialog-header": ce(() => [
|
|
2923
|
+
e("div", null, "Order #" + x(d.purchaseOrder.seqNumber) + " (New Delivery Order)", 1)
|
|
2924
2924
|
]),
|
|
2925
|
-
"dialog-footer":
|
|
2926
|
-
|
|
2925
|
+
"dialog-footer": ce(() => [
|
|
2926
|
+
L(g, {
|
|
2927
2927
|
class: "ml-auto",
|
|
2928
2928
|
label: "Create",
|
|
2929
2929
|
size: "md",
|
|
2930
2930
|
variant: "destructive",
|
|
2931
2931
|
disabled: !be.value || W.value,
|
|
2932
2932
|
loading: W.value,
|
|
2933
|
-
onClick:
|
|
2933
|
+
onClick: q
|
|
2934
2934
|
}, null, 8, ["disabled", "loading"])
|
|
2935
2935
|
]),
|
|
2936
|
-
default:
|
|
2936
|
+
default: ce(() => {
|
|
2937
2937
|
var Ne;
|
|
2938
2938
|
return [
|
|
2939
2939
|
e("div", Lo, [
|
|
2940
2940
|
e("div", Uo, [
|
|
2941
2941
|
m[5] || (m[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received by", -1)),
|
|
2942
|
-
e("div", Mo, x((Ne = _(
|
|
2942
|
+
e("div", Mo, x((Ne = _(v).sessionUser.value) == null ? void 0 : Ne.displayName), 1)
|
|
2943
2943
|
]),
|
|
2944
|
-
_(
|
|
2944
|
+
_(E) ? (l(), h("div", jo, [
|
|
2945
2945
|
e("div", Bo, [
|
|
2946
2946
|
e("div", zo, [
|
|
2947
2947
|
m[6] || (m[6] = ze(" Delivery Date & Time ")),
|
|
2948
|
-
!
|
|
2948
|
+
!P.value && !C.value ? (l(), h("div", Ko, " Leave blank to use current date & time ")) : I("", !0)
|
|
2949
2949
|
]),
|
|
2950
|
-
|
|
2950
|
+
P.value || C.value ? (l(), me(g, {
|
|
2951
2951
|
key: 0,
|
|
2952
2952
|
variant: "tertiary",
|
|
2953
2953
|
label: "Clear",
|
|
2954
2954
|
"prepend-icon": "close",
|
|
2955
2955
|
onClick: pe
|
|
2956
|
-
})) :
|
|
2956
|
+
})) : I("", !0)
|
|
2957
2957
|
]),
|
|
2958
2958
|
e("div", Ho, [
|
|
2959
2959
|
e("div", Go, [
|
|
2960
|
-
|
|
2961
|
-
modelValue:
|
|
2962
|
-
"onUpdate:modelValue": m[0] || (m[0] = (de) =>
|
|
2960
|
+
L(U, {
|
|
2961
|
+
modelValue: P.value,
|
|
2962
|
+
"onUpdate:modelValue": m[0] || (m[0] = (de) => P.value = de)
|
|
2963
2963
|
}, null, 8, ["modelValue"])
|
|
2964
2964
|
]),
|
|
2965
2965
|
e("div", Wo, [
|
|
2966
|
-
|
|
2967
|
-
modelValue:
|
|
2968
|
-
"onUpdate:modelValue": m[1] || (m[1] = (de) =>
|
|
2966
|
+
L(B, {
|
|
2967
|
+
modelValue: C.value,
|
|
2968
|
+
"onUpdate:modelValue": m[1] || (m[1] = (de) => C.value = de)
|
|
2969
2969
|
}, null, 8, ["modelValue"])
|
|
2970
2970
|
])
|
|
2971
2971
|
]),
|
|
2972
|
-
|
|
2973
|
-
|
|
2972
|
+
X.value ? (l(), h("div", Qo, [
|
|
2973
|
+
L(_e, {
|
|
2974
2974
|
name: "error",
|
|
2975
2975
|
class: "inline-block mr-1",
|
|
2976
2976
|
size: "sm"
|
|
2977
2977
|
}),
|
|
2978
|
-
e("div", Yo, x(
|
|
2979
|
-
])) :
|
|
2980
|
-
])) :
|
|
2978
|
+
e("div", Yo, x(X.value), 1)
|
|
2979
|
+
])) : I("", !0)
|
|
2980
|
+
])) : I("", !0),
|
|
2981
2981
|
e("div", Jo, [
|
|
2982
2982
|
m[8] || (m[8] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Items going to receive ", -1)),
|
|
2983
2983
|
(l(!0), h(Ce, null, Ee(z.value, (de, se) => {
|
|
@@ -2989,23 +2989,23 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
2989
2989
|
e("span", tn, x(de.sku.code), 1)
|
|
2990
2990
|
]),
|
|
2991
2991
|
e("div", sn, [
|
|
2992
|
-
|
|
2992
|
+
L($e, {
|
|
2993
2993
|
label: "Receive Quantity",
|
|
2994
2994
|
modelValue: fe.value[se].value,
|
|
2995
2995
|
"onUpdate:modelValue": (Te) => fe.value[se].value = Te,
|
|
2996
2996
|
"helper-text": ye(de),
|
|
2997
2997
|
"append-text": ((Oe = de.measurement) == null ? void 0 : Oe.abbrev) ?? de.sku.unit.abbrev
|
|
2998
2998
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "helper-text", "append-text"]),
|
|
2999
|
-
fe.value[se].value <= 0 ? (l(), h("div", rn, x(Gt))) :
|
|
3000
|
-
_(
|
|
3001
|
-
|
|
3002
|
-
"model-value":
|
|
3003
|
-
"onUpdate:modelValue": (Te) =>
|
|
2999
|
+
fe.value[se].value <= 0 ? (l(), h("div", rn, x(Gt))) : I("", !0),
|
|
3000
|
+
_(F) ? (l(), h("div", on, [
|
|
3001
|
+
L(te, {
|
|
3002
|
+
"model-value": J.value[se],
|
|
3003
|
+
"onUpdate:modelValue": (Te) => f(se),
|
|
3004
3004
|
size: "sm"
|
|
3005
3005
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
3006
3006
|
m[7] || (m[7] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
3007
|
-
])) :
|
|
3008
|
-
_(
|
|
3007
|
+
])) : I("", !0),
|
|
3008
|
+
_(F) && J.value[se] ? (l(), me($e, {
|
|
3009
3009
|
key: 2,
|
|
3010
3010
|
modelValue: i.value[se].value,
|
|
3011
3011
|
"onUpdate:modelValue": (Te) => i.value[se].value = Te,
|
|
@@ -3015,35 +3015,35 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3015
3015
|
placeholder: "0.0000",
|
|
3016
3016
|
size: "sm",
|
|
3017
3017
|
"append-text": _(De)()
|
|
3018
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) :
|
|
3018
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : I("", !0)
|
|
3019
3019
|
])
|
|
3020
3020
|
]),
|
|
3021
|
-
se < z.value.length - 1 ? (l(), h("div", nn)) :
|
|
3021
|
+
se < z.value.length - 1 ? (l(), h("div", nn)) : I("", !0)
|
|
3022
3022
|
]);
|
|
3023
3023
|
}), 128))
|
|
3024
3024
|
]),
|
|
3025
3025
|
e("div", an, [
|
|
3026
3026
|
e("div", ln, [
|
|
3027
3027
|
m[9] || (m[9] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Extra items", -1)),
|
|
3028
|
-
|
|
3028
|
+
L(g, {
|
|
3029
3029
|
variant: "tertiary",
|
|
3030
3030
|
label: "Add item",
|
|
3031
3031
|
"prepend-icon": "add",
|
|
3032
3032
|
size: "md",
|
|
3033
|
-
onClick:
|
|
3033
|
+
onClick: ie
|
|
3034
3034
|
})
|
|
3035
3035
|
]),
|
|
3036
|
-
|
|
3037
|
-
(l(!0), h(Ce, null, Ee(
|
|
3036
|
+
O.value.length === 0 ? (l(), h("div", cn, " No extra items added ")) : I("", !0),
|
|
3037
|
+
(l(!0), h(Ce, null, Ee(O.value, (de, se) => {
|
|
3038
3038
|
var Oe, Te;
|
|
3039
3039
|
return l(), h("div", { key: se }, [
|
|
3040
3040
|
e("div", un, [
|
|
3041
3041
|
e("div", dn, [
|
|
3042
|
-
|
|
3042
|
+
L(he, {
|
|
3043
3043
|
"model-value": de.skuId,
|
|
3044
3044
|
"onUpdate:modelValue": (Ie) => ke(se, Ie),
|
|
3045
3045
|
label: "Ingredient",
|
|
3046
|
-
items:
|
|
3046
|
+
items: M.value,
|
|
3047
3047
|
searchable: "",
|
|
3048
3048
|
searchTarget: "label",
|
|
3049
3049
|
placeholder: "Select ingredient",
|
|
@@ -3051,23 +3051,23 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3051
3051
|
}, null, 8, ["model-value", "onUpdate:modelValue", "items", "disabled"])
|
|
3052
3052
|
]),
|
|
3053
3053
|
e("div", mn, [
|
|
3054
|
-
|
|
3054
|
+
L($e, {
|
|
3055
3055
|
label: "Receive Quantity",
|
|
3056
3056
|
modelValue: r.value[se].value,
|
|
3057
3057
|
"onUpdate:modelValue": (Ie) => r.value[se].value = Ie,
|
|
3058
|
-
"append-text": de.skuId ? ((Te = (Oe = _(
|
|
3059
|
-
"helper-text":
|
|
3058
|
+
"append-text": de.skuId ? ((Te = (Oe = _($).skuById[de.skuId]) == null ? void 0 : Oe.unit) == null ? void 0 : Te.abbrev) ?? "" : "",
|
|
3059
|
+
"helper-text": le(de)
|
|
3060
3060
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text", "helper-text"]),
|
|
3061
|
-
r.value[se].value <= 0 ? (l(), h("div", pn, x(Gt))) :
|
|
3062
|
-
_(
|
|
3063
|
-
|
|
3061
|
+
r.value[se].value <= 0 ? (l(), h("div", pn, x(Gt))) : I("", !0),
|
|
3062
|
+
_(F) ? (l(), h("div", fn, [
|
|
3063
|
+
L(te, {
|
|
3064
3064
|
"model-value": de.costEnabled,
|
|
3065
|
-
"onUpdate:modelValue": (Ie) =>
|
|
3065
|
+
"onUpdate:modelValue": (Ie) => w(se),
|
|
3066
3066
|
size: "sm"
|
|
3067
3067
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
3068
3068
|
m[10] || (m[10] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
3069
|
-
])) :
|
|
3070
|
-
_(
|
|
3069
|
+
])) : I("", !0),
|
|
3070
|
+
_(F) && de.costEnabled ? (l(), me($e, {
|
|
3071
3071
|
key: 2,
|
|
3072
3072
|
modelValue: a.value[se].value,
|
|
3073
3073
|
"onUpdate:modelValue": (Ie) => a.value[se].value = Ie,
|
|
@@ -3077,9 +3077,9 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3077
3077
|
placeholder: "0.0000",
|
|
3078
3078
|
size: "sm",
|
|
3079
3079
|
"append-text": _(De)()
|
|
3080
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) :
|
|
3080
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : I("", !0)
|
|
3081
3081
|
]),
|
|
3082
|
-
de.historyItem ?
|
|
3082
|
+
de.historyItem ? I("", !0) : (l(), me(g, {
|
|
3083
3083
|
key: 0,
|
|
3084
3084
|
variant: "tertiary",
|
|
3085
3085
|
"prepend-icon": "delete",
|
|
@@ -3088,14 +3088,14 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3088
3088
|
onClick: (Ie) => ee(se)
|
|
3089
3089
|
}, null, 8, ["onClick"]))
|
|
3090
3090
|
]),
|
|
3091
|
-
se <
|
|
3091
|
+
se < O.value.length - 1 ? (l(), h("div", vn)) : I("", !0)
|
|
3092
3092
|
]);
|
|
3093
3093
|
}), 128))
|
|
3094
3094
|
]),
|
|
3095
3095
|
e("div", yn, [
|
|
3096
3096
|
m[11] || (m[11] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
|
|
3097
3097
|
e("div", bn, [
|
|
3098
|
-
|
|
3098
|
+
L(we, {
|
|
3099
3099
|
modelValue: _(t).deliveryOrderNumber,
|
|
3100
3100
|
"onUpdate:modelValue": m[2] || (m[2] = (de) => _(t).deliveryOrderNumber = de),
|
|
3101
3101
|
size: "md"
|
|
@@ -3105,7 +3105,7 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3105
3105
|
e("div", hn, [
|
|
3106
3106
|
m[12] || (m[12] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
|
|
3107
3107
|
e("div", gn, [
|
|
3108
|
-
|
|
3108
|
+
L(we, {
|
|
3109
3109
|
modelValue: _(t).remark,
|
|
3110
3110
|
"onUpdate:modelValue": m[3] || (m[3] = (de) => _(t).remark = de),
|
|
3111
3111
|
size: "md"
|
|
@@ -3134,21 +3134,21 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3134
3134
|
netsuiteId: {}
|
|
3135
3135
|
},
|
|
3136
3136
|
setup(b) {
|
|
3137
|
-
const s = b,
|
|
3137
|
+
const s = b, n = $t(), c = Z(!1), v = Z(!1), d = Z(!1), p = Z([]);
|
|
3138
3138
|
async function t() {
|
|
3139
|
-
if (!(
|
|
3139
|
+
if (!(p.value.length > 0))
|
|
3140
3140
|
try {
|
|
3141
|
-
|
|
3142
|
-
const
|
|
3143
|
-
|
|
3141
|
+
v.value = !0;
|
|
3142
|
+
const k = await n.getChangeLogs(s.netsuiteId);
|
|
3143
|
+
p.value = k, d.value = !1;
|
|
3144
3144
|
} catch {
|
|
3145
|
-
|
|
3145
|
+
d.value = !0;
|
|
3146
3146
|
} finally {
|
|
3147
|
-
|
|
3147
|
+
v.value = !1;
|
|
3148
3148
|
}
|
|
3149
3149
|
}
|
|
3150
|
-
function
|
|
3151
|
-
switch (
|
|
3150
|
+
function o(k) {
|
|
3151
|
+
switch (k) {
|
|
3152
3152
|
case Le.Create:
|
|
3153
3153
|
return "text-green-600 bg-green-100";
|
|
3154
3154
|
case Le.Set:
|
|
@@ -3161,8 +3161,8 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3161
3161
|
return "text-gray-600 bg-gray-100";
|
|
3162
3162
|
}
|
|
3163
3163
|
}
|
|
3164
|
-
function
|
|
3165
|
-
return new Date(
|
|
3164
|
+
function u(k) {
|
|
3165
|
+
return new Date(k).toLocaleDateString("en-US", {
|
|
3166
3166
|
year: "numeric",
|
|
3167
3167
|
month: "short",
|
|
3168
3168
|
day: "numeric",
|
|
@@ -3170,46 +3170,46 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3170
3170
|
minute: "2-digit"
|
|
3171
3171
|
});
|
|
3172
3172
|
}
|
|
3173
|
-
return (
|
|
3174
|
-
const
|
|
3173
|
+
return (k, $) => {
|
|
3174
|
+
const D = re("FmButton"), T = re("FmCircularProgress"), S = re("FmIcon"), F = re("FmDialog");
|
|
3175
3175
|
return l(), h("div", Sn, [
|
|
3176
|
-
|
|
3176
|
+
L(F, {
|
|
3177
3177
|
modelValue: c.value,
|
|
3178
|
-
"onUpdate:modelValue":
|
|
3178
|
+
"onUpdate:modelValue": $[2] || ($[2] = (E) => c.value = E),
|
|
3179
3179
|
overlay: !0,
|
|
3180
3180
|
"max-width": 800
|
|
3181
3181
|
}, {
|
|
3182
|
-
"dialog-button":
|
|
3183
|
-
|
|
3182
|
+
"dialog-button": ce(() => [
|
|
3183
|
+
L(D, {
|
|
3184
3184
|
"prepend-icon": "info",
|
|
3185
3185
|
variant: "secondary",
|
|
3186
3186
|
label: "NetSuite",
|
|
3187
|
-
onClick:
|
|
3187
|
+
onClick: $[0] || ($[0] = (E) => t()),
|
|
3188
3188
|
"text-color": "primary",
|
|
3189
3189
|
"bg-color": "transparent",
|
|
3190
3190
|
"border-color": "primary"
|
|
3191
3191
|
})
|
|
3192
3192
|
]),
|
|
3193
|
-
"dialog-header":
|
|
3193
|
+
"dialog-header": ce(() => $[3] || ($[3] = [
|
|
3194
3194
|
e("div", null, "NetSuite info", -1)
|
|
3195
3195
|
])),
|
|
3196
|
-
default:
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
])) :
|
|
3201
|
-
!
|
|
3196
|
+
default: ce(() => [
|
|
3197
|
+
v.value ? (l(), h("div", xn, [
|
|
3198
|
+
$[4] || ($[4] = e("span", null, "Change Log Loading...", -1)),
|
|
3199
|
+
L(T, { size: "md" })
|
|
3200
|
+
])) : I("", !0),
|
|
3201
|
+
!v.value && p.value.length > 0 ? (l(), h("div", kn, [
|
|
3202
3202
|
e("h3", On, [
|
|
3203
|
-
|
|
3203
|
+
L(S, {
|
|
3204
3204
|
name: "error",
|
|
3205
3205
|
color: "#ff9500",
|
|
3206
3206
|
size: "sm"
|
|
3207
3207
|
}),
|
|
3208
|
-
|
|
3208
|
+
$[5] || ($[5] = ze(" Change Logs "))
|
|
3209
3209
|
]),
|
|
3210
3210
|
e("div", wn, [
|
|
3211
3211
|
e("table", $n, [
|
|
3212
|
-
|
|
3212
|
+
$[6] || ($[6] = e("thead", { class: "bg-fm-color-neutral-gray-50" }, [
|
|
3213
3213
|
e("tr", { class: "border-b border-fm-color-neutral-gray-200" }, [
|
|
3214
3214
|
e("th", {
|
|
3215
3215
|
class: "text-left p-3 fm-typo-en-body-md-600",
|
|
@@ -3226,36 +3226,36 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3226
3226
|
])
|
|
3227
3227
|
], -1)),
|
|
3228
3228
|
e("tbody", null, [
|
|
3229
|
-
(l(!0), h(Ce, null, Ee(
|
|
3230
|
-
key:
|
|
3229
|
+
(l(!0), h(Ce, null, Ee(p.value, (E, J) => (l(), h("tr", {
|
|
3230
|
+
key: J,
|
|
3231
3231
|
class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
|
|
3232
3232
|
}, [
|
|
3233
|
-
e("td", Cn, x(
|
|
3234
|
-
e("td", Dn, x(
|
|
3235
|
-
e("td", Rn, x(
|
|
3236
|
-
e("td", Nn, x(
|
|
3233
|
+
e("td", Cn, x(u(E._dateiso8601)), 1),
|
|
3234
|
+
e("td", Dn, x(E._rolename), 1),
|
|
3235
|
+
e("td", Rn, x(E._employeename), 1),
|
|
3236
|
+
e("td", Nn, x(E._contextname), 1),
|
|
3237
3237
|
e("td", {
|
|
3238
|
-
class: Ue(`p-3 fm-typo-en-body-sm-600 ${
|
|
3239
|
-
}, x(_(Le)[Number(
|
|
3240
|
-
e("td", An, x(
|
|
3241
|
-
e("td", Tn, x(
|
|
3242
|
-
e("td", Pn, x(
|
|
3243
|
-
e("td", In, x(
|
|
3238
|
+
class: Ue(`p-3 fm-typo-en-body-sm-600 ${o(Number(E.type) - 1)}`)
|
|
3239
|
+
}, x(_(Le)[Number(E.type) - 1]), 3),
|
|
3240
|
+
e("td", An, x(E.lineid || ""), 1),
|
|
3241
|
+
e("td", Tn, x(E._fieldname), 1),
|
|
3242
|
+
e("td", Pn, x(E.oldvalue || ""), 1),
|
|
3243
|
+
e("td", In, x(E.newvalue || ""), 1)
|
|
3244
3244
|
]))), 128))
|
|
3245
3245
|
])
|
|
3246
3246
|
])
|
|
3247
3247
|
])
|
|
3248
|
-
])) : (l(), h("div", Fn,
|
|
3248
|
+
])) : (l(), h("div", Fn, $[7] || ($[7] = [
|
|
3249
3249
|
e("p", null, "No change logs available.", -1)
|
|
3250
3250
|
])))
|
|
3251
3251
|
]),
|
|
3252
|
-
"dialog-footer":
|
|
3253
|
-
|
|
3252
|
+
"dialog-footer": ce(() => [
|
|
3253
|
+
L(D, {
|
|
3254
3254
|
class: "ml-auto sm:w-full xs:w-full",
|
|
3255
3255
|
label: "Close",
|
|
3256
3256
|
size: "md",
|
|
3257
3257
|
variant: "primary",
|
|
3258
|
-
onClick:
|
|
3258
|
+
onClick: $[1] || ($[1] = (E) => c.value = !1)
|
|
3259
3259
|
})
|
|
3260
3260
|
]),
|
|
3261
3261
|
_: 1
|
|
@@ -3339,68 +3339,68 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3339
3339
|
},
|
|
3340
3340
|
emits: ["update:show", "submitted"],
|
|
3341
3341
|
setup(b, { emit: s }) {
|
|
3342
|
-
const
|
|
3343
|
-
function
|
|
3344
|
-
const a = r.isCustomCost,
|
|
3345
|
-
return a != null ? a === !0 :
|
|
3342
|
+
const n = b, c = s, v = ft(), d = Qe(), p = He(), t = Me(), o = mt(), { hasOrderDraftPermission: u } = ls(), k = ns();
|
|
3343
|
+
function $(r) {
|
|
3344
|
+
const a = r.isCustomCost, w = r.totalCost;
|
|
3345
|
+
return a != null ? a === !0 : w != null;
|
|
3346
3346
|
}
|
|
3347
3347
|
Ge(
|
|
3348
|
-
() =>
|
|
3348
|
+
() => n.purchaseOrder,
|
|
3349
3349
|
(r) => {
|
|
3350
|
-
|
|
3350
|
+
k.init(r);
|
|
3351
3351
|
},
|
|
3352
3352
|
{ immediate: !0 }
|
|
3353
3353
|
);
|
|
3354
|
-
const
|
|
3354
|
+
const D = j(
|
|
3355
3355
|
() => {
|
|
3356
3356
|
var r, a;
|
|
3357
3357
|
return {
|
|
3358
|
-
id: ((r =
|
|
3359
|
-
name: ((a =
|
|
3358
|
+
id: ((r = o.sessionUser.value) == null ? void 0 : r.id) ?? "",
|
|
3359
|
+
name: ((a = o.sessionUser.value) == null ? void 0 : a.displayName) ?? ""
|
|
3360
3360
|
};
|
|
3361
3361
|
}
|
|
3362
|
-
),
|
|
3362
|
+
), T = as(), { t: S } = dt(), F = j(
|
|
3363
3363
|
() => {
|
|
3364
|
-
var r, a,
|
|
3365
|
-
return ((a = (r =
|
|
3364
|
+
var r, a, w, q;
|
|
3365
|
+
return ((a = (r = n.purchaseOrder) == null ? void 0 : r.supplier) == null ? void 0 : a.internal) === "restaurant" || ((q = (w = n.purchaseOrder) == null ? void 0 : w.supplier) == null ? void 0 : q.internal) === "warehouse" ? et.enum.transfer : et.enum.purchase;
|
|
3366
3366
|
}
|
|
3367
|
-
),
|
|
3368
|
-
var
|
|
3369
|
-
const r = (
|
|
3367
|
+
), E = j(() => {
|
|
3368
|
+
var w;
|
|
3369
|
+
const r = (w = n.shipments) == null ? void 0 : w.find((q) => {
|
|
3370
3370
|
var W;
|
|
3371
|
-
return
|
|
3371
|
+
return q.ref === ((W = n.purchaseOrder) == null ? void 0 : W._id);
|
|
3372
3372
|
});
|
|
3373
3373
|
let a = null;
|
|
3374
3374
|
if (r != null && r.milestones && r.milestones.length > 0) {
|
|
3375
|
-
const
|
|
3376
|
-
if (
|
|
3377
|
-
const W = new Date(
|
|
3375
|
+
const q = r.milestones[r.milestones.length - 1];
|
|
3376
|
+
if (q.estimatedTime) {
|
|
3377
|
+
const W = new Date(q.estimatedTime), Q = W.getDate().toString().padStart(2, "0");
|
|
3378
3378
|
a = `${W.toLocaleString("en-US", { month: "short" })} ${Q}`;
|
|
3379
3379
|
}
|
|
3380
3380
|
}
|
|
3381
3381
|
return a;
|
|
3382
|
-
}),
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
],
|
|
3387
|
-
if (!
|
|
3382
|
+
}), J = Z(!1), z = Z(""), ae = Z(!0), ge = Ye(), H = Ks(ge.getWorkflowConfig), R = os(), ne = [
|
|
3383
|
+
V.enum.receiveStock,
|
|
3384
|
+
V.enum.processRequest,
|
|
3385
|
+
V.enum.closeRequest
|
|
3386
|
+
], P = j(() => {
|
|
3387
|
+
if (!n.purchaseOrder)
|
|
3388
3388
|
return [];
|
|
3389
3389
|
const r = H.result.value;
|
|
3390
3390
|
if (r.state === jt.loading)
|
|
3391
3391
|
return [];
|
|
3392
3392
|
const a = {
|
|
3393
|
-
user:
|
|
3393
|
+
user: D.value,
|
|
3394
3394
|
executedAt: t.locations.computeFirst(
|
|
3395
3395
|
(oe) => {
|
|
3396
|
-
var
|
|
3397
|
-
return oe.dbName === ((
|
|
3396
|
+
var A;
|
|
3397
|
+
return oe.dbName === ((A = t._currentLocation) == null ? void 0 : A.dbName) ? oe : null;
|
|
3398
3398
|
}
|
|
3399
3399
|
),
|
|
3400
|
-
purchaseOrderRequest:
|
|
3401
|
-
purchaseOrder:
|
|
3402
|
-
},
|
|
3403
|
-
|
|
3400
|
+
purchaseOrderRequest: n.poRequest,
|
|
3401
|
+
purchaseOrder: n.purchaseOrder
|
|
3402
|
+
}, w = p.useOperatePurchaseOrderV2, q = p.poWorkflowAllowToMarkCompleted, W = [...ne];
|
|
3403
|
+
w && !q && W.push(V.enum.completeReceive);
|
|
3404
3404
|
let Q = [];
|
|
3405
3405
|
try {
|
|
3406
3406
|
r.state === jt.error ? (console.error("Error fetching workflow config:", r.error), Q = vt.getAvailableActions({
|
|
@@ -3413,26 +3413,26 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3413
3413
|
} catch (oe) {
|
|
3414
3414
|
console.error("Error getting available actions:", oe);
|
|
3415
3415
|
}
|
|
3416
|
-
return
|
|
3417
|
-
(oe) => oe !==
|
|
3416
|
+
return n.scope === "approval" && (Q = Q.filter((oe) => oe !== V.enum.completeReceive)), u.value || (Q = Q.filter(
|
|
3417
|
+
(oe) => oe !== V.enum.approveDraft && oe !== V.enum.rejectDraft
|
|
3418
3418
|
)), Q;
|
|
3419
|
-
}),
|
|
3419
|
+
}), C = qs(n, "show"), K = j(() => [
|
|
3420
3420
|
{
|
|
3421
|
-
label:
|
|
3421
|
+
label: S("inventory.transfer.receiveRequest.details.overview"),
|
|
3422
3422
|
value: "overview"
|
|
3423
3423
|
},
|
|
3424
3424
|
{
|
|
3425
|
-
label:
|
|
3425
|
+
label: S("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
3426
3426
|
value: "deliveryHistory"
|
|
3427
3427
|
}
|
|
3428
|
-
]),
|
|
3428
|
+
]), N = Z(K.value[0]);
|
|
3429
3429
|
Ge(
|
|
3430
|
-
() =>
|
|
3430
|
+
() => n.show,
|
|
3431
3431
|
(r) => {
|
|
3432
|
-
r && (
|
|
3432
|
+
r && (N.value = K.value[0]);
|
|
3433
3433
|
}
|
|
3434
3434
|
);
|
|
3435
|
-
function
|
|
3435
|
+
function X(r) {
|
|
3436
3436
|
return r.map((a) => ({
|
|
3437
3437
|
...a,
|
|
3438
3438
|
amount: {
|
|
@@ -3441,28 +3441,28 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3441
3441
|
}
|
|
3442
3442
|
}));
|
|
3443
3443
|
}
|
|
3444
|
-
async function be(r, a,
|
|
3444
|
+
async function be(r, a, w, q, W) {
|
|
3445
3445
|
return new Promise((Q, oe) => {
|
|
3446
|
-
const
|
|
3446
|
+
const A = {
|
|
3447
3447
|
closeButton: !1,
|
|
3448
|
-
title:
|
|
3449
|
-
message:
|
|
3450
|
-
primaryActions:
|
|
3448
|
+
title: q.title,
|
|
3449
|
+
message: q.message,
|
|
3450
|
+
primaryActions: q.primaryActions,
|
|
3451
3451
|
secondaryActions: { text: "No", close: !1 }
|
|
3452
3452
|
};
|
|
3453
3453
|
let ue = a.rejectReason ?? "";
|
|
3454
|
-
|
|
3455
|
-
message:
|
|
3454
|
+
w === V.enum.rejectDraft && (A.contentComponent = rs, A.contentComponentProps = {
|
|
3455
|
+
message: q.message,
|
|
3456
3456
|
onChange: (y) => {
|
|
3457
3457
|
ue = y ?? "";
|
|
3458
3458
|
}
|
|
3459
|
-
}),
|
|
3460
|
-
var m, g,
|
|
3459
|
+
}), v.open(A).onPrimary(async () => {
|
|
3460
|
+
var m, g, U, B;
|
|
3461
3461
|
const y = [];
|
|
3462
|
-
|
|
3462
|
+
w === V.enum.confirmDraft || w === V.enum.submitRequest ? y.push({
|
|
3463
3463
|
action: "confirmDraft",
|
|
3464
|
-
payload:
|
|
3465
|
-
}) :
|
|
3464
|
+
payload: k.controller.value.toConfirmDraftData(De())
|
|
3465
|
+
}) : w === V.enum.approveRequest ? (y.push({
|
|
3466
3466
|
action: "approveRequest",
|
|
3467
3467
|
payload: null
|
|
3468
3468
|
}), a.fulfillment && y.push({
|
|
@@ -3471,45 +3471,45 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3471
3471
|
fulfillmentId: "",
|
|
3472
3472
|
deliveryOrderNumber: "",
|
|
3473
3473
|
deliveryRemark: null,
|
|
3474
|
-
items:
|
|
3475
|
-
createdBy:
|
|
3474
|
+
items: X(a.fulfillment.items),
|
|
3475
|
+
createdBy: D.value
|
|
3476
3476
|
}
|
|
3477
|
-
})) :
|
|
3477
|
+
})) : w === V.enum.processRequest ? a.fulfillment && y.push({
|
|
3478
3478
|
action: "processRequest",
|
|
3479
3479
|
payload: {
|
|
3480
3480
|
fulfillmentId: "",
|
|
3481
3481
|
deliveryOrderNumber: "",
|
|
3482
3482
|
deliveryRemark: null,
|
|
3483
|
-
items:
|
|
3484
|
-
createdBy:
|
|
3483
|
+
items: X(a.fulfillment.items),
|
|
3484
|
+
createdBy: D.value
|
|
3485
3485
|
}
|
|
3486
|
-
}) :
|
|
3486
|
+
}) : w === V.enum.rejectRequest ? y.push({
|
|
3487
3487
|
action: "rejectRequest",
|
|
3488
3488
|
payload: null
|
|
3489
|
-
}) :
|
|
3489
|
+
}) : w === V.enum.closeRequest ? y.push({
|
|
3490
3490
|
action: "closeRequest",
|
|
3491
3491
|
payload: null
|
|
3492
|
-
}) :
|
|
3492
|
+
}) : w === V.enum.rejectDraft && y.push({
|
|
3493
3493
|
action: "rejectDraft",
|
|
3494
3494
|
payload: {
|
|
3495
3495
|
rejectReason: ue ?? ""
|
|
3496
3496
|
}
|
|
3497
3497
|
});
|
|
3498
3498
|
try {
|
|
3499
|
-
await
|
|
3499
|
+
await R({
|
|
3500
3500
|
operate: {
|
|
3501
|
-
operation:
|
|
3501
|
+
operation: w,
|
|
3502
3502
|
doc: r,
|
|
3503
3503
|
options: a
|
|
3504
3504
|
},
|
|
3505
3505
|
operateV2: {
|
|
3506
|
-
_id: ((m =
|
|
3507
|
-
_rev: ((g =
|
|
3508
|
-
action:
|
|
3506
|
+
_id: ((m = n.purchaseOrder) == null ? void 0 : m._id) ?? "",
|
|
3507
|
+
_rev: ((g = n.purchaseOrder) == null ? void 0 : g._rev) ?? "",
|
|
3508
|
+
action: w === V.enum.submitRequest ? V.enum.confirmDraft : w,
|
|
3509
3509
|
payloads: y
|
|
3510
3510
|
// add payload if action is receiveStock or processRequest
|
|
3511
3511
|
},
|
|
3512
|
-
transferTo: (B = (
|
|
3512
|
+
transferTo: (B = (U = n.poRequest) == null ? void 0 : U.to) == null ? void 0 : B.dbName
|
|
3513
3513
|
}).delayed(1e3), Q("submitted");
|
|
3514
3514
|
} catch (_e) {
|
|
3515
3515
|
oe(_e);
|
|
@@ -3517,138 +3517,138 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3517
3517
|
}).onSecondary(() => {
|
|
3518
3518
|
Q("cancelled");
|
|
3519
3519
|
for (let y = 0; y < W + 2; y++)
|
|
3520
|
-
|
|
3520
|
+
v.close();
|
|
3521
3521
|
}).onClose(() => {
|
|
3522
3522
|
});
|
|
3523
3523
|
});
|
|
3524
3524
|
}
|
|
3525
3525
|
async function ye(r) {
|
|
3526
|
-
var W, Q, oe,
|
|
3527
|
-
if (r ===
|
|
3526
|
+
var W, Q, oe, A;
|
|
3527
|
+
if (r === V.enum.receiveStock)
|
|
3528
3528
|
return;
|
|
3529
3529
|
const a = ss[r];
|
|
3530
3530
|
if (!a) {
|
|
3531
|
-
|
|
3531
|
+
d.open({
|
|
3532
3532
|
title: "Something went wrong",
|
|
3533
3533
|
message: `Cannot process order: ${Ot(r)}`,
|
|
3534
3534
|
type: "error"
|
|
3535
3535
|
});
|
|
3536
3536
|
return;
|
|
3537
3537
|
}
|
|
3538
|
-
const { successMessage:
|
|
3539
|
-
if (
|
|
3540
|
-
z.value = `${r}`,
|
|
3538
|
+
const { successMessage: w, ...q } = a;
|
|
3539
|
+
if (n.purchaseOrder) {
|
|
3540
|
+
z.value = `${r}`, J.value = !0, ae.value = !1;
|
|
3541
3541
|
const ue = {};
|
|
3542
3542
|
let y = 0;
|
|
3543
|
-
if ((r ===
|
|
3544
|
-
r ===
|
|
3543
|
+
if ((r === V.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
3544
|
+
r === V.enum.completeReceive) && p.autoReceiveWarehouse)
|
|
3545
3545
|
ue.autoReceive = !0;
|
|
3546
|
-
else if ((r ===
|
|
3547
|
-
const m = (Q = (W =
|
|
3546
|
+
else if ((r === V.enum.approveRequest || r === V.enum.processRequest) && p.acceptRequireFulfillment) {
|
|
3547
|
+
const m = (Q = (W = n.poRequest) == null ? void 0 : W.from) == null ? void 0 : Q.dbName, g = (A = (oe = n.poRequest) == null ? void 0 : oe.to) == null ? void 0 : A.dbName;
|
|
3548
3548
|
if (m && g && (m.startsWith("warehouse_") || g.startsWith("warehouse_"))) {
|
|
3549
|
-
const
|
|
3550
|
-
|
|
3549
|
+
const U = await new Promise((B, _e) => {
|
|
3550
|
+
v.open({
|
|
3551
3551
|
closeButton: !1,
|
|
3552
3552
|
title: "Confirm transfer amount",
|
|
3553
3553
|
dialogComponent: pr,
|
|
3554
3554
|
dialogComponentProps: {
|
|
3555
|
-
purchaseOrder:
|
|
3555
|
+
purchaseOrder: n.purchaseOrder,
|
|
3556
3556
|
confirm: B,
|
|
3557
3557
|
"onUpdate:show": ($e) => {
|
|
3558
|
-
$e || (z.value = "",
|
|
3558
|
+
$e || (z.value = "", J.value = !1, ae.value = !0, y++, v.close()), _e("cancelled");
|
|
3559
3559
|
}
|
|
3560
3560
|
}
|
|
3561
3561
|
});
|
|
3562
3562
|
});
|
|
3563
|
-
ue.fulfillment =
|
|
3563
|
+
ue.fulfillment = U;
|
|
3564
3564
|
}
|
|
3565
3565
|
}
|
|
3566
3566
|
try {
|
|
3567
3567
|
await be(
|
|
3568
|
-
|
|
3568
|
+
n.purchaseOrder,
|
|
3569
3569
|
ue,
|
|
3570
3570
|
r,
|
|
3571
3571
|
a,
|
|
3572
3572
|
y
|
|
3573
|
-
) === "submitted" && (
|
|
3573
|
+
) === "submitted" && (d.open({
|
|
3574
3574
|
title: "Success",
|
|
3575
|
-
message:
|
|
3575
|
+
message: w,
|
|
3576
3576
|
type: "success"
|
|
3577
3577
|
}), c("update:show", !1), c("submitted"));
|
|
3578
3578
|
} catch (m) {
|
|
3579
|
-
|
|
3579
|
+
d.open({
|
|
3580
3580
|
title: "Something went wrong",
|
|
3581
3581
|
message: m instanceof Error ? m.message : "Please try again.",
|
|
3582
3582
|
type: "error"
|
|
3583
|
-
}), console.error("Error when submitting PO operation", r,
|
|
3583
|
+
}), console.error("Error when submitting PO operation", r, n.purchaseOrder, m);
|
|
3584
3584
|
} finally {
|
|
3585
|
-
z.value = "",
|
|
3585
|
+
z.value = "", J.value = !1, ae.value = !0;
|
|
3586
3586
|
}
|
|
3587
3587
|
}
|
|
3588
3588
|
}
|
|
3589
3589
|
const pe = j(() => {
|
|
3590
3590
|
var r, a;
|
|
3591
|
-
return ((r =
|
|
3592
|
-
}), fe = j(() =>
|
|
3593
|
-
const r =
|
|
3591
|
+
return ((r = n.purchaseOrder) == null ? void 0 : r.status) === ve.enum.RECEIVING || ((a = n.purchaseOrder) == null ? void 0 : a.status) === ve.enum.COMPLETE;
|
|
3592
|
+
}), fe = j(() => n.purchaseOrder ? ct(n.purchaseOrder) : {}), f = j(() => {
|
|
3593
|
+
const r = n.purchaseOrder;
|
|
3594
3594
|
if (!r) return { status: "", statusClass: "" };
|
|
3595
|
-
const { partial: a, over:
|
|
3596
|
-
let W =
|
|
3597
|
-
return
|
|
3595
|
+
const { partial: a, over: w } = _t(fe.value), q = St(r.status, a, w);
|
|
3596
|
+
let W = S(`inventory.transfer.status.${q}`), Q = `${r.status}`.toLocaleLowerCase("en-us");
|
|
3597
|
+
return q === ve.enum.CLOSE && (W = `${S(`inventory.transfer.status.${ve.enum.COMPLETE}`)}`), q === "PARTIAL_RECEIVED" && Q === ve.enum.PROCESSING.toLocaleLowerCase("en-us") && (Q = ve.enum.RECEIVING.toLocaleLowerCase("en-us")), {
|
|
3598
3598
|
status: W,
|
|
3599
3599
|
statusClass: `fm-status-badge fm-status-badge-${Q}`
|
|
3600
3600
|
};
|
|
3601
3601
|
}), i = j(() => {
|
|
3602
3602
|
var Q, oe;
|
|
3603
|
-
const r = ((Q =
|
|
3604
|
-
...r.map((
|
|
3605
|
-
createdAt:
|
|
3603
|
+
const r = ((Q = n.purchaseOrder) == null ? void 0 : Q.deliveryOrder) ?? [], a = ((oe = n.purchaseOrder) == null ? void 0 : oe.deliveryFullfillment) ?? [], w = [
|
|
3604
|
+
...r.map((A) => ({
|
|
3605
|
+
createdAt: A.createdAt,
|
|
3606
3606
|
type: "grn",
|
|
3607
|
-
doc:
|
|
3607
|
+
doc: A
|
|
3608
3608
|
})),
|
|
3609
|
-
...a.map((
|
|
3610
|
-
createdAt:
|
|
3609
|
+
...a.map((A) => ({
|
|
3610
|
+
createdAt: A.createdAt,
|
|
3611
3611
|
type: "fulfillment",
|
|
3612
|
-
doc:
|
|
3612
|
+
doc: A
|
|
3613
3613
|
}))
|
|
3614
3614
|
];
|
|
3615
|
-
|
|
3616
|
-
function
|
|
3617
|
-
var m, g,
|
|
3618
|
-
const ue = a.findIndex((se) => se.id ===
|
|
3615
|
+
w.reverse().sort((A, ue) => A.createdAt.localeCompare(ue.createdAt));
|
|
3616
|
+
function q(A) {
|
|
3617
|
+
var m, g, U, B, _e, $e, te, he, we, Re, Ne, de;
|
|
3618
|
+
const ue = a.findIndex((se) => se.id === A.fullfillmentId), y = [
|
|
3619
3619
|
(g = (m = a[ue]) == null ? void 0 : m.netSuite) != null && g.id ? {
|
|
3620
3620
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
3621
3621
|
values: [
|
|
3622
|
-
`${((B = (
|
|
3622
|
+
`${((B = (U = a[ue]) == null ? void 0 : U.netSuite) == null ? void 0 : B.refNo) ?? "N/A"} (${(($e = (_e = a[ue]) == null ? void 0 : _e.netSuite) == null ? void 0 : $e.id) ?? "-"})`
|
|
3623
3623
|
]
|
|
3624
3624
|
} : null,
|
|
3625
|
-
(te =
|
|
3625
|
+
(te = A == null ? void 0 : A.netSuite) != null && te.id ? {
|
|
3626
3626
|
label: "Netsuite ref no.",
|
|
3627
|
-
values: [`${((he =
|
|
3627
|
+
values: [`${((he = A == null ? void 0 : A.netSuite) == null ? void 0 : he.refNo) ?? "N/A"} (${((we = A == null ? void 0 : A.netSuite) == null ? void 0 : we.id) ?? "-"})`]
|
|
3628
3628
|
} : null,
|
|
3629
|
-
(Re =
|
|
3629
|
+
(Re = A == null ? void 0 : A.netSuite) != null && Re.recordType ? {
|
|
3630
3630
|
label: "Netsuite Type",
|
|
3631
|
-
values: [Jt((Ne =
|
|
3631
|
+
values: [Jt((Ne = A == null ? void 0 : A.netSuite) == null ? void 0 : Ne.recordType)]
|
|
3632
3632
|
} : null
|
|
3633
3633
|
];
|
|
3634
3634
|
return {
|
|
3635
3635
|
header: "Received",
|
|
3636
|
-
deliveryOrder:
|
|
3637
|
-
date: tt(new Date(
|
|
3636
|
+
deliveryOrder: A,
|
|
3637
|
+
date: tt(new Date(A.createdAt)),
|
|
3638
3638
|
info: [
|
|
3639
3639
|
{
|
|
3640
3640
|
label: "Adjustment date",
|
|
3641
3641
|
values: [
|
|
3642
|
-
|
|
3642
|
+
A.adjustment ? tt(new Date(at(A.adjustment))) : "-"
|
|
3643
3643
|
]
|
|
3644
3644
|
},
|
|
3645
3645
|
{
|
|
3646
3646
|
label: "Received by",
|
|
3647
|
-
values: [(de =
|
|
3647
|
+
values: [(de = A.createdBy) == null ? void 0 : de.name]
|
|
3648
3648
|
},
|
|
3649
3649
|
{
|
|
3650
3650
|
label: "Received items",
|
|
3651
|
-
values:
|
|
3651
|
+
values: A.received.map((se) => {
|
|
3652
3652
|
var Oe;
|
|
3653
3653
|
return Y("div", [
|
|
3654
3654
|
Y(
|
|
@@ -3723,11 +3723,11 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3723
3723
|
},
|
|
3724
3724
|
{
|
|
3725
3725
|
label: "Delivery order no.",
|
|
3726
|
-
values: [
|
|
3726
|
+
values: [A.deliveryOrderNumber || "N/A"]
|
|
3727
3727
|
},
|
|
3728
3728
|
{
|
|
3729
3729
|
label: "Remark",
|
|
3730
|
-
values: [
|
|
3730
|
+
values: [A.remark || "N/A"]
|
|
3731
3731
|
},
|
|
3732
3732
|
ue > -1 ? {
|
|
3733
3733
|
label: "Fulfilment's sequence",
|
|
@@ -3737,12 +3737,12 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3737
3737
|
].filter((se) => !!se)
|
|
3738
3738
|
};
|
|
3739
3739
|
}
|
|
3740
|
-
function W(
|
|
3740
|
+
function W(A) {
|
|
3741
3741
|
var y, m, g;
|
|
3742
|
-
const ue = a.findIndex((
|
|
3742
|
+
const ue = a.findIndex((U) => U.id === A.id);
|
|
3743
3743
|
return {
|
|
3744
3744
|
header: "Fulfillment",
|
|
3745
|
-
date: tt(new Date(
|
|
3745
|
+
date: tt(new Date(A.createdAt)),
|
|
3746
3746
|
info: [
|
|
3747
3747
|
{
|
|
3748
3748
|
label: "Sequence",
|
|
@@ -3750,7 +3750,7 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3750
3750
|
},
|
|
3751
3751
|
{
|
|
3752
3752
|
label: "Receiveable items",
|
|
3753
|
-
values:
|
|
3753
|
+
values: A.items.map((U) => {
|
|
3754
3754
|
var B;
|
|
3755
3755
|
return Y("div", [
|
|
3756
3756
|
Y(
|
|
@@ -3770,14 +3770,14 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3770
3770
|
{
|
|
3771
3771
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
3772
3772
|
},
|
|
3773
|
-
`${
|
|
3773
|
+
`${U.sku.name}`
|
|
3774
3774
|
),
|
|
3775
3775
|
Y(
|
|
3776
3776
|
"span",
|
|
3777
3777
|
{
|
|
3778
3778
|
class: "fm-typo-en-body-md-400"
|
|
3779
3779
|
},
|
|
3780
|
-
`${
|
|
3780
|
+
`${U.sku.code} `
|
|
3781
3781
|
)
|
|
3782
3782
|
]
|
|
3783
3783
|
),
|
|
@@ -3798,14 +3798,14 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3798
3798
|
{
|
|
3799
3799
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
3800
3800
|
},
|
|
3801
|
-
xe(
|
|
3801
|
+
xe(U.amount, !1)
|
|
3802
3802
|
),
|
|
3803
3803
|
Y(
|
|
3804
3804
|
"span",
|
|
3805
3805
|
{
|
|
3806
3806
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
3807
3807
|
},
|
|
3808
|
-
((B =
|
|
3808
|
+
((B = U.measurement) == null ? void 0 : B.abbrev) ?? U.sku.unit.abbrev
|
|
3809
3809
|
)
|
|
3810
3810
|
]
|
|
3811
3811
|
),
|
|
@@ -3814,7 +3814,7 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3814
3814
|
{
|
|
3815
3815
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
3816
3816
|
},
|
|
3817
|
-
`${
|
|
3817
|
+
`${U.cost ? `(${ot(U.cost)})` : ""}`
|
|
3818
3818
|
)
|
|
3819
3819
|
]
|
|
3820
3820
|
)
|
|
@@ -3823,100 +3823,100 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3823
3823
|
]);
|
|
3824
3824
|
})
|
|
3825
3825
|
},
|
|
3826
|
-
(y =
|
|
3826
|
+
(y = A.netSuite) != null && y.refNo ? {
|
|
3827
3827
|
label: "Netsuite Ref no. (ID)",
|
|
3828
|
-
values: [`${(m =
|
|
3828
|
+
values: [`${(m = A.netSuite) == null ? void 0 : m.refNo} (${((g = A.netSuite) == null ? void 0 : g.id) ?? "-"})`]
|
|
3829
3829
|
} : null
|
|
3830
|
-
].filter((
|
|
3830
|
+
].filter((U) => !!U)
|
|
3831
3831
|
};
|
|
3832
3832
|
}
|
|
3833
|
-
return
|
|
3834
|
-
(
|
|
3833
|
+
return w.map(
|
|
3834
|
+
(A) => A.type === "grn" ? q(A.doc) : W(A.doc)
|
|
3835
3835
|
);
|
|
3836
3836
|
});
|
|
3837
|
-
function
|
|
3837
|
+
function O(r) {
|
|
3838
3838
|
var Q;
|
|
3839
|
-
const
|
|
3840
|
-
return
|
|
3839
|
+
const w = (((Q = n.purchaseOrder) == null ? void 0 : Q.version) ?? Fe.enum[1]) === Fe.enum[2] ? r.id : r.sku._id, q = n.receivedMap[w], W = G(r);
|
|
3840
|
+
return q ? `<span class="${W} fm-typo-en-body-lg-600">${Ae.toFormatString({ value: q.received })}</span>/${it(r.quantity, r.sku.unit, r.measurement)}` : `<span class="fm-typo-en-body-lg-600">-</span>/${it(r.quantity, r.sku.unit, r.measurement)}`;
|
|
3841
3841
|
}
|
|
3842
|
-
function
|
|
3843
|
-
const a =
|
|
3842
|
+
function M(r) {
|
|
3843
|
+
const a = n.purchaseOrder;
|
|
3844
3844
|
if (!(a != null && a.itemsAtSubmission)) return !1;
|
|
3845
|
-
const
|
|
3846
|
-
return
|
|
3845
|
+
const w = a.version === Fe.enum[2], q = w ? r.id : r.sku._id;
|
|
3846
|
+
return q == null ? !1 : !a.itemsAtSubmission.some((W) => (w ? W.id : W.sku._id) === q);
|
|
3847
3847
|
}
|
|
3848
3848
|
function G(r) {
|
|
3849
3849
|
var ue;
|
|
3850
|
-
const
|
|
3851
|
-
return Q ? "text-fm-color-typo-tertiary" : W ? "text-fm-color-system-warning-300" : oe ? "text-fm-color-system-error-300" :
|
|
3850
|
+
const w = (((ue = n.purchaseOrder) == null ? void 0 : ue.version) ?? Fe.enum[1]) === Fe.enum[2] ? r.id : r.sku._id, q = n.receivedMap[w], { isPartialReceive: W, isNoReceive: Q, isOverReceive: oe, isFullReceive: A } = ir(q);
|
|
3851
|
+
return Q ? "text-fm-color-typo-tertiary" : W ? "text-fm-color-system-warning-300" : oe ? "text-fm-color-system-error-300" : A ? "text-fm-color-system-success-300" : "";
|
|
3852
3852
|
}
|
|
3853
|
-
const
|
|
3854
|
-
var r, a,
|
|
3855
|
-
return (r =
|
|
3856
|
-
var oe,
|
|
3857
|
-
const Q = (
|
|
3853
|
+
const ie = j(() => {
|
|
3854
|
+
var r, a, w;
|
|
3855
|
+
return (r = n.purchaseOrder) != null && r.itemsAtSubmission ? ((a = n.purchaseOrder) == null ? void 0 : a.version) === Fe.enum[2] ? n.purchaseOrder.items.reduce((q, W) => {
|
|
3856
|
+
var oe, A;
|
|
3857
|
+
const Q = (A = (oe = n.purchaseOrder) == null ? void 0 : oe.itemsAtSubmission) == null ? void 0 : A.find(
|
|
3858
3858
|
(ue) => ue.id === W.id
|
|
3859
3859
|
);
|
|
3860
|
-
return Q && Q.quantity !== W.quantity &&
|
|
3860
|
+
return Q && Q.quantity !== W.quantity && q.set(W.sku.code, {
|
|
3861
3861
|
originalAmount: Number(Ae.toFormatString({ value: Q.quantity })),
|
|
3862
3862
|
newAmount: Number(Ae.toFormatString({ value: W.quantity }))
|
|
3863
|
-
}),
|
|
3864
|
-
}, /* @__PURE__ */ new Map()) : (
|
|
3863
|
+
}), q;
|
|
3864
|
+
}, /* @__PURE__ */ new Map()) : (w = n.purchaseOrder) == null ? void 0 : w.items.reduce((q, W) => {
|
|
3865
3865
|
var ue, y;
|
|
3866
|
-
const Q = (y = (ue =
|
|
3866
|
+
const Q = (y = (ue = n.purchaseOrder) == null ? void 0 : ue.itemsAtSubmission) == null ? void 0 : y.find(
|
|
3867
3867
|
(m) => m.sku._id === W.sku._id
|
|
3868
|
-
), oe = Q ? Number(Ae.toFormatString({ value: Q.quantity })) : 0,
|
|
3869
|
-
return Q && oe !==
|
|
3868
|
+
), oe = Q ? Number(Ae.toFormatString({ value: Q.quantity })) : 0, A = Number(Ae.toFormatString({ value: W.quantity }));
|
|
3869
|
+
return Q && oe !== A && q.set(W.sku.code, {
|
|
3870
3870
|
originalAmount: oe,
|
|
3871
|
-
newAmount:
|
|
3872
|
-
}),
|
|
3871
|
+
newAmount: A
|
|
3872
|
+
}), q;
|
|
3873
3873
|
}, /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
|
|
3874
3874
|
}), ee = (r) => {
|
|
3875
|
-
var
|
|
3876
|
-
const a =
|
|
3877
|
-
return ((
|
|
3875
|
+
var w, q;
|
|
3876
|
+
const a = ie.value;
|
|
3877
|
+
return ((w = n.purchaseOrder) == null ? void 0 : w.version) === Fe.enum[2] ? a.has(r.id) : a.has((q = r.sku) == null ? void 0 : q.code);
|
|
3878
3878
|
}, ke = (r) => {
|
|
3879
|
-
var
|
|
3880
|
-
const a =
|
|
3881
|
-
return ((
|
|
3882
|
-
},
|
|
3883
|
-
const r =
|
|
3879
|
+
var w, q;
|
|
3880
|
+
const a = ie.value;
|
|
3881
|
+
return ((w = n.purchaseOrder) == null ? void 0 : w.version) === Fe.enum[2] ? a.get(r.id) : a.get((q = r.sku) == null ? void 0 : q.code);
|
|
3882
|
+
}, le = j(() => {
|
|
3883
|
+
const r = n.purchaseOrder;
|
|
3884
3884
|
if (!r) return "";
|
|
3885
|
-
const a = r.actionChangelogs ?? [],
|
|
3886
|
-
if (
|
|
3887
|
-
const
|
|
3888
|
-
return
|
|
3885
|
+
const a = r.actionChangelogs ?? [], w = a.length ? a[a.length - 1] : null;
|
|
3886
|
+
if (w && w.action === "rejectDraft") {
|
|
3887
|
+
const q = w.remarks ?? "";
|
|
3888
|
+
return q && q.toString().trim() !== "" ? q.toString() : "-";
|
|
3889
3889
|
}
|
|
3890
3890
|
return "";
|
|
3891
3891
|
});
|
|
3892
3892
|
return (r, a) => {
|
|
3893
|
-
const
|
|
3893
|
+
const w = re("FmButton"), q = re("FmButtonGroup"), W = re("FmChip"), Q = re("FmIcon"), oe = re("FmMenuDivider"), A = re("FmCard"), ue = re("FmTooltip"), y = re("FmSpacer"), m = re("FmSideSheet");
|
|
3894
3894
|
return l(), me(m, {
|
|
3895
|
-
modelValue: _(
|
|
3896
|
-
"onUpdate:modelValue": a[8] || (a[8] = (g) => Ss(
|
|
3897
|
-
"dismiss-away":
|
|
3895
|
+
modelValue: _(C),
|
|
3896
|
+
"onUpdate:modelValue": a[8] || (a[8] = (g) => Ss(C) ? C.value = g : null),
|
|
3897
|
+
"dismiss-away": ae.value,
|
|
3898
3898
|
"max-width": 600,
|
|
3899
3899
|
"close-button": !1
|
|
3900
3900
|
}, {
|
|
3901
|
-
"side-sheet-header":
|
|
3902
|
-
var g,
|
|
3901
|
+
"side-sheet-header": ce(() => {
|
|
3902
|
+
var g, U;
|
|
3903
3903
|
return [
|
|
3904
3904
|
e("div", qn, [
|
|
3905
3905
|
e("div", Vn, [
|
|
3906
|
-
e("div", Ln, x(_(
|
|
3907
|
-
|
|
3906
|
+
e("div", Ln, x(_(S)("inventory.transfer.receiveRequest.details.title") + ((g = r.purchaseOrder) != null && g.seqNumber ? ` #${(U = r.purchaseOrder) == null ? void 0 : U.seqNumber}` : "")), 1),
|
|
3907
|
+
L(w, {
|
|
3908
3908
|
class: "ml-auto -m-2",
|
|
3909
3909
|
variant: "tertiary",
|
|
3910
3910
|
"prepend-icon": "close",
|
|
3911
3911
|
onClick: a[0] || (a[0] = (B) => c("update:show", !1))
|
|
3912
3912
|
})
|
|
3913
3913
|
]),
|
|
3914
|
-
|
|
3914
|
+
L(q, {
|
|
3915
3915
|
items: K.value,
|
|
3916
|
-
modelValue:
|
|
3917
|
-
"onUpdate:modelValue": a[1] || (a[1] = (B) =>
|
|
3916
|
+
modelValue: N.value,
|
|
3917
|
+
"onUpdate:modelValue": a[1] || (a[1] = (B) => N.value = B)
|
|
3918
3918
|
}, null, 8, ["items", "modelValue"]),
|
|
3919
|
-
r.purchaseOrder &&
|
|
3919
|
+
r.purchaseOrder && N.value.value === "deliveryHistory" ? (l(), me(_n, {
|
|
3920
3920
|
key: 0,
|
|
3921
3921
|
"purchase-order": r.purchaseOrder,
|
|
3922
3922
|
"received-info-map": fe.value,
|
|
@@ -3924,112 +3924,112 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
3924
3924
|
onSubmitted: a[2] || (a[2] = () => {
|
|
3925
3925
|
c("update:show", !1), c("submitted");
|
|
3926
3926
|
})
|
|
3927
|
-
}, null, 8, ["purchase-order", "received-info-map", "received-map"])) :
|
|
3927
|
+
}, null, 8, ["purchase-order", "received-info-map", "received-map"])) : I("", !0)
|
|
3928
3928
|
])
|
|
3929
3929
|
];
|
|
3930
3930
|
}),
|
|
3931
|
-
default:
|
|
3932
|
-
var g,
|
|
3931
|
+
default: ce(() => {
|
|
3932
|
+
var g, U, B, _e, $e;
|
|
3933
3933
|
return [
|
|
3934
3934
|
e("div", Un, [
|
|
3935
|
-
|
|
3935
|
+
N.value.value === "overview" ? (l(), h(Ce, { key: 0 }, [
|
|
3936
3936
|
e("div", null, [
|
|
3937
|
-
|
|
3937
|
+
L(A, {
|
|
3938
3938
|
variant: "outlined",
|
|
3939
3939
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
3940
3940
|
}, {
|
|
3941
|
-
default:
|
|
3941
|
+
default: ce(() => {
|
|
3942
3942
|
var te, he, we, Re, Ne, de, se, Oe, Te, Ie;
|
|
3943
3943
|
return [
|
|
3944
3944
|
e("div", Mn, [
|
|
3945
|
-
e("div", jn, x(_(
|
|
3945
|
+
e("div", jn, x(_(S)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
3946
3946
|
e("div", Bn, [
|
|
3947
|
-
|
|
3948
|
-
label:
|
|
3949
|
-
class: Ue(
|
|
3947
|
+
L(W, {
|
|
3948
|
+
label: f.value.status,
|
|
3949
|
+
class: Ue(f.value.statusClass),
|
|
3950
3950
|
compact: ""
|
|
3951
3951
|
}, null, 8, ["label", "class"]),
|
|
3952
|
-
|
|
3953
|
-
|
|
3952
|
+
E.value ? (l(), h("div", zn, [
|
|
3953
|
+
L(Q, {
|
|
3954
3954
|
name: "local_shipping",
|
|
3955
3955
|
color: "#666666"
|
|
3956
3956
|
}),
|
|
3957
|
-
e("span", Kn, x(
|
|
3958
|
-
])) :
|
|
3957
|
+
e("span", Kn, x(E.value), 1)
|
|
3958
|
+
])) : I("", !0)
|
|
3959
3959
|
])
|
|
3960
3960
|
]),
|
|
3961
|
-
|
|
3961
|
+
L(oe),
|
|
3962
3962
|
e("div", Hn, [
|
|
3963
|
-
|
|
3964
|
-
default:
|
|
3963
|
+
L(Ht, { title: "Debug Info" }, {
|
|
3964
|
+
default: ce(() => {
|
|
3965
3965
|
var rt, Ct, Dt, Rt, Nt, At, Tt, Pt, It, Ft, Et, qt;
|
|
3966
3966
|
return [
|
|
3967
3967
|
(rt = r.purchaseOrder) != null && rt._id ? (l(), h("div", Gn, [
|
|
3968
3968
|
a[9] || (a[9] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Purchase Order ID ", -1)),
|
|
3969
3969
|
e("span", Wn, x((Ct = r.purchaseOrder) == null ? void 0 : Ct._id), 1)
|
|
3970
|
-
])) :
|
|
3970
|
+
])) : I("", !0),
|
|
3971
3971
|
(Dt = r.purchaseOrder) != null && Dt.status ? (l(), h("div", Qn, [
|
|
3972
3972
|
a[10] || (a[10] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Purchase Order Status ", -1)),
|
|
3973
3973
|
e("span", Yn, x((Rt = r.purchaseOrder) == null ? void 0 : Rt.status), 1)
|
|
3974
|
-
])) :
|
|
3974
|
+
])) : I("", !0),
|
|
3975
3975
|
(At = (Nt = r.purchaseOrder) == null ? void 0 : Nt.supplier) != null && At._id ? (l(), h("div", Jn, [
|
|
3976
3976
|
a[11] || (a[11] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Source Location ID ", -1)),
|
|
3977
3977
|
e("span", Xn, x(((Pt = (Tt = r.purchaseOrder) == null ? void 0 : Tt.supplier) == null ? void 0 : Pt.internal) != null ? `${(Ft = (It = r.purchaseOrder) == null ? void 0 : It.supplier) == null ? void 0 : Ft.internal}_` : "") + x((qt = (Et = r.purchaseOrder) == null ? void 0 : Et.supplier) == null ? void 0 : qt._id), 1)
|
|
3978
|
-
])) :
|
|
3978
|
+
])) : I("", !0),
|
|
3979
3979
|
r.transferToDbName ? (l(), h("div", Zn, [
|
|
3980
3980
|
a[12] || (a[12] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Destination Location ID ", -1)),
|
|
3981
3981
|
e("span", ea, x(r.transferToDbName), 1)
|
|
3982
|
-
])) :
|
|
3982
|
+
])) : I("", !0)
|
|
3983
3983
|
];
|
|
3984
3984
|
}),
|
|
3985
3985
|
_: 1
|
|
3986
3986
|
}),
|
|
3987
3987
|
e("div", ta, [
|
|
3988
3988
|
e("div", sa, [
|
|
3989
|
-
e("div", ra, x(_(
|
|
3989
|
+
e("div", ra, x(_(S)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
3990
3990
|
]),
|
|
3991
3991
|
e("div", oa, x(_(st)(((te = r.purchaseOrder) == null ? void 0 : te._id) ?? "")), 1)
|
|
3992
3992
|
]),
|
|
3993
3993
|
(he = r.purchaseOrder) != null && he.effectiveAt ? (l(), h("div", na, [
|
|
3994
|
-
e("div", aa, x(_(
|
|
3994
|
+
e("div", aa, x(_(S)("inventory.transfer.receiveRequest.details.date")), 1),
|
|
3995
3995
|
e("div", la, x(_(wt)(new Date((we = r.purchaseOrder) == null ? void 0 : we.effectiveAt))), 1)
|
|
3996
|
-
])) :
|
|
3996
|
+
])) : I("", !0),
|
|
3997
3997
|
e("div", ia, [
|
|
3998
|
-
e("div", ca, x(_(
|
|
3999
|
-
e("div", ua, x(_(
|
|
4000
|
-
`inventory.transfer.receiveRequest.details.type.${
|
|
3998
|
+
e("div", ca, x(_(S)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
3999
|
+
e("div", ua, x(_(S)(
|
|
4000
|
+
`inventory.transfer.receiveRequest.details.type.${F.value.toLocaleLowerCase("en-US")}`
|
|
4001
4001
|
)), 1)
|
|
4002
4002
|
]),
|
|
4003
4003
|
(Ne = (Re = r.purchaseOrder) == null ? void 0 : Re.supplier) != null && Ne.name ? (l(), h("div", da, [
|
|
4004
|
-
e("div", ma, x(_(
|
|
4004
|
+
e("div", ma, x(_(S)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
4005
4005
|
e("div", pa, x((se = (de = r.purchaseOrder) == null ? void 0 : de.supplier) == null ? void 0 : se.name), 1)
|
|
4006
|
-
])) :
|
|
4006
|
+
])) : I("", !0),
|
|
4007
4007
|
r.transferTo ? (l(), h("div", fa, [
|
|
4008
|
-
e("div", va, x(_(
|
|
4008
|
+
e("div", va, x(_(S)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
4009
4009
|
e("div", ya, x(r.transferTo), 1)
|
|
4010
|
-
])) :
|
|
4010
|
+
])) : I("", !0),
|
|
4011
4011
|
(Oe = r.purchaseOrder) != null && Oe.ref ? (l(), h("div", ba, [
|
|
4012
|
-
e("div", ha, x(_(
|
|
4012
|
+
e("div", ha, x(_(S)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
4013
4013
|
e("div", ga, x(r.purchaseOrder.ref), 1)
|
|
4014
|
-
])) :
|
|
4014
|
+
])) : I("", !0),
|
|
4015
4015
|
(Te = r.purchaseOrder) != null && Te.remark ? (l(), h("div", _a, [
|
|
4016
|
-
e("div", Sa, x(_(
|
|
4016
|
+
e("div", Sa, x(_(S)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
4017
4017
|
e("div", xa, x(r.purchaseOrder.remark), 1)
|
|
4018
|
-
])) :
|
|
4019
|
-
((Ie = r.purchaseOrder) == null ? void 0 : Ie.status) === _(ve).enum.DRAFT &&
|
|
4020
|
-
e("div", Oa, x(_(
|
|
4021
|
-
e("div", wa, x(
|
|
4022
|
-
])) :
|
|
4018
|
+
])) : I("", !0),
|
|
4019
|
+
((Ie = r.purchaseOrder) == null ? void 0 : Ie.status) === _(ve).enum.DRAFT && le.value ? (l(), h("div", ka, [
|
|
4020
|
+
e("div", Oa, x(_(S)("inventory.transfer.receiveRequest.details.rejectionReason")), 1),
|
|
4021
|
+
e("div", wa, x(le.value !== "" ? le.value : "-"), 1)
|
|
4022
|
+
])) : I("", !0)
|
|
4023
4023
|
])
|
|
4024
4024
|
];
|
|
4025
4025
|
}),
|
|
4026
4026
|
_: 1
|
|
4027
4027
|
})
|
|
4028
4028
|
]),
|
|
4029
|
-
|
|
4029
|
+
L(co, {
|
|
4030
4030
|
"po-request": r.poRequest,
|
|
4031
4031
|
purchaseOrder: r.purchaseOrder,
|
|
4032
|
-
transferType:
|
|
4032
|
+
transferType: F.value,
|
|
4033
4033
|
transferToDbName: r.transferToDbName,
|
|
4034
4034
|
scope: r.scope
|
|
4035
4035
|
}, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
|
|
@@ -4037,14 +4037,14 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
4037
4037
|
e("div", Ca, [
|
|
4038
4038
|
e("div", Da, [
|
|
4039
4039
|
e("span", Ra, [
|
|
4040
|
-
ze(x(pe.value ? _(
|
|
4041
|
-
(
|
|
4040
|
+
ze(x(pe.value ? _(S)("inventory.transfer.receiveRequest.details.receivedItems") : _(S)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
4041
|
+
(U = (g = r.purchaseOrder) == null ? void 0 : g.netSuite) != null && U.missingItems && ((_e = (B = r.purchaseOrder) == null ? void 0 : B.netSuite) == null ? void 0 : _e.missingItems.length) > 0 ? (l(), me(ue, {
|
|
4042
4042
|
key: 0,
|
|
4043
4043
|
variant: "rich",
|
|
4044
4044
|
placement: "top",
|
|
4045
4045
|
"z-index": 51
|
|
4046
4046
|
}, {
|
|
4047
|
-
content:
|
|
4047
|
+
content: ce(() => {
|
|
4048
4048
|
var te, he;
|
|
4049
4049
|
return [
|
|
4050
4050
|
e("div", Na, [
|
|
@@ -4052,7 +4052,7 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
4052
4052
|
class: "flex justify-center align-middle",
|
|
4053
4053
|
key: Re
|
|
4054
4054
|
}, [
|
|
4055
|
-
|
|
4055
|
+
L(Q, {
|
|
4056
4056
|
name: "arrow_right",
|
|
4057
4057
|
size: "sm"
|
|
4058
4058
|
}),
|
|
@@ -4061,18 +4061,18 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
4061
4061
|
])
|
|
4062
4062
|
];
|
|
4063
4063
|
}),
|
|
4064
|
-
default:
|
|
4065
|
-
|
|
4064
|
+
default: ce(() => [
|
|
4065
|
+
L(Q, {
|
|
4066
4066
|
name: "error",
|
|
4067
4067
|
color: "#ff2c2c",
|
|
4068
4068
|
size: "sm"
|
|
4069
4069
|
})
|
|
4070
4070
|
]),
|
|
4071
4071
|
_: 1
|
|
4072
|
-
})) :
|
|
4072
|
+
})) : I("", !0)
|
|
4073
4073
|
])
|
|
4074
4074
|
]),
|
|
4075
|
-
|
|
4075
|
+
L(oe),
|
|
4076
4076
|
(l(!0), h(Ce, null, Ee((($e = r.purchaseOrder) == null ? void 0 : $e.items) ?? [], (te, he) => {
|
|
4077
4077
|
var we;
|
|
4078
4078
|
return l(), h("div", {
|
|
@@ -4082,31 +4082,31 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
4082
4082
|
e("div", Aa, [
|
|
4083
4083
|
e("div", Ta, [
|
|
4084
4084
|
ze(x(te.name) + " ", 1),
|
|
4085
|
-
|
|
4085
|
+
M(te) ? (l(), me(ue, {
|
|
4086
4086
|
key: 0,
|
|
4087
4087
|
variant: "rich",
|
|
4088
4088
|
placement: "top",
|
|
4089
4089
|
"z-index": 51
|
|
4090
4090
|
}, {
|
|
4091
|
-
content:
|
|
4091
|
+
content: ce(() => a[13] || (a[13] = [
|
|
4092
4092
|
e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Extra item (added during delivery) ", -1)
|
|
4093
4093
|
])),
|
|
4094
|
-
default:
|
|
4095
|
-
|
|
4094
|
+
default: ce(() => [
|
|
4095
|
+
L(Q, {
|
|
4096
4096
|
name: "add_circle",
|
|
4097
4097
|
color: "#6b7280",
|
|
4098
4098
|
size: "sm"
|
|
4099
4099
|
})
|
|
4100
4100
|
]),
|
|
4101
4101
|
_: 1
|
|
4102
|
-
})) :
|
|
4102
|
+
})) : I("", !0),
|
|
4103
4103
|
ee(te) ? (l(), me(ue, {
|
|
4104
4104
|
key: 1,
|
|
4105
4105
|
variant: "rich",
|
|
4106
4106
|
placement: "top",
|
|
4107
4107
|
"z-index": 51
|
|
4108
4108
|
}, {
|
|
4109
|
-
content:
|
|
4109
|
+
content: ce(() => {
|
|
4110
4110
|
var Re, Ne;
|
|
4111
4111
|
return [
|
|
4112
4112
|
e("div", Pa, [
|
|
@@ -4116,51 +4116,51 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
4116
4116
|
])
|
|
4117
4117
|
];
|
|
4118
4118
|
}),
|
|
4119
|
-
default:
|
|
4120
|
-
|
|
4119
|
+
default: ce(() => [
|
|
4120
|
+
L(Q, {
|
|
4121
4121
|
name: "error",
|
|
4122
4122
|
color: "#ff9500",
|
|
4123
4123
|
size: "sm"
|
|
4124
4124
|
})
|
|
4125
4125
|
]),
|
|
4126
4126
|
_: 2
|
|
4127
|
-
}, 1024)) :
|
|
4127
|
+
}, 1024)) : I("", !0)
|
|
4128
4128
|
]),
|
|
4129
4129
|
e("div", Ia, [
|
|
4130
4130
|
e("span", {
|
|
4131
|
-
innerHTML:
|
|
4131
|
+
innerHTML: O(te)
|
|
4132
4132
|
}, null, 8, Fa)
|
|
4133
4133
|
])
|
|
4134
4134
|
]),
|
|
4135
4135
|
e("div", Ea, [
|
|
4136
4136
|
e("div", qa, x(te.code), 1),
|
|
4137
|
-
_(
|
|
4137
|
+
_(p).enableTotalCost ? (l(), h("div", Va, [
|
|
4138
4138
|
e("span", La, x(_(ot)(
|
|
4139
|
-
(we = te.totalCost) != null && we.amount ? te.totalCost : _(
|
|
4139
|
+
(we = te.totalCost) != null && we.amount ? te.totalCost : _(k).controller.value.getItemCost(te, _(De)()).cost
|
|
4140
4140
|
)), 1),
|
|
4141
|
-
|
|
4141
|
+
$(te) ? I("", !0) : (l(), h("span", Ua, [
|
|
4142
4142
|
a[15] || (a[15] = e("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1)),
|
|
4143
|
-
ze(" " + x(_(
|
|
4143
|
+
ze(" " + x(_(S)("inventory.transfer.form.items.autoCalculated")), 1)
|
|
4144
4144
|
]))
|
|
4145
|
-
])) :
|
|
4145
|
+
])) : I("", !0)
|
|
4146
4146
|
])
|
|
4147
4147
|
]);
|
|
4148
4148
|
}), 128)),
|
|
4149
|
-
+_(xe)(_(
|
|
4149
|
+
+_(xe)(_(k).controller.value.getTotalCosts()) ? (l(), h(Ce, { key: 0 }, [
|
|
4150
4150
|
e("div", Ma, [
|
|
4151
|
-
|
|
4151
|
+
L(oe)
|
|
4152
4152
|
]),
|
|
4153
4153
|
e("div", ja, [
|
|
4154
4154
|
a[16] || (a[16] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
4155
4155
|
e("div", Ba, x(_(De)()) + " " + x(_(ot)({
|
|
4156
|
-
..._(
|
|
4156
|
+
..._(k).controller.value.getTotalCosts(),
|
|
4157
4157
|
currency: _(De)()
|
|
4158
4158
|
}).replace(/[^0-9.,]/g, "")), 1)
|
|
4159
4159
|
])
|
|
4160
|
-
], 64)) :
|
|
4160
|
+
], 64)) : I("", !0)
|
|
4161
4161
|
])
|
|
4162
4162
|
])
|
|
4163
|
-
], 64)) :
|
|
4163
|
+
], 64)) : N.value.value === "deliveryHistory" ? (l(), h("div", za, [
|
|
4164
4164
|
i.value.length ? (l(), h("div", Qa, [
|
|
4165
4165
|
(l(!0), h(Ce, null, Ee(i.value, (te, he) => {
|
|
4166
4166
|
var we, Re, Ne, de, se;
|
|
@@ -4184,7 +4184,7 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
4184
4184
|
name: "local_shipping",
|
|
4185
4185
|
outline: "",
|
|
4186
4186
|
color: "#ffffff"
|
|
4187
|
-
})) :
|
|
4187
|
+
})) : I("", !0)
|
|
4188
4188
|
]),
|
|
4189
4189
|
e("div", el, [
|
|
4190
4190
|
e("div", {
|
|
@@ -4212,27 +4212,27 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
4212
4212
|
onSubmitted: a[3] || (a[3] = () => {
|
|
4213
4213
|
c("update:show", !1), c("submitted");
|
|
4214
4214
|
})
|
|
4215
|
-
}, null, 8, ["deliveryOrder", "purchaseOrder", "received-info-map"])) :
|
|
4215
|
+
}, null, 8, ["deliveryOrder", "purchaseOrder", "received-info-map"])) : I("", !0),
|
|
4216
4216
|
(Re = (we = te.deliveryOrder) == null ? void 0 : we.netSuite) != null && Re.id ? (l(), me(Ht, {
|
|
4217
4217
|
key: 1,
|
|
4218
4218
|
title: "Admin",
|
|
4219
4219
|
class: "min-w-[140px]"
|
|
4220
4220
|
}, {
|
|
4221
|
-
default:
|
|
4221
|
+
default: ce(() => {
|
|
4222
4222
|
var Oe, Te;
|
|
4223
4223
|
return [
|
|
4224
|
-
|
|
4224
|
+
L(En, {
|
|
4225
4225
|
"netsuite-id": (Te = (Oe = te.deliveryOrder) == null ? void 0 : Oe.netSuite) == null ? void 0 : Te.id
|
|
4226
4226
|
}, null, 8, ["netsuite-id"])
|
|
4227
4227
|
];
|
|
4228
4228
|
}),
|
|
4229
4229
|
_: 2
|
|
4230
|
-
}, 1024)) :
|
|
4230
|
+
}, 1024)) : I("", !0),
|
|
4231
4231
|
r.purchaseOrder && ((Ne = te.deliveryOrder) != null && Ne.id) ? (l(), me(Ms, {
|
|
4232
4232
|
key: 2,
|
|
4233
4233
|
"purchase-order-id": (de = r.purchaseOrder) == null ? void 0 : de._id,
|
|
4234
4234
|
"delivery-order-id": (se = te.deliveryOrder) == null ? void 0 : se.id
|
|
4235
|
-
}, null, 8, ["purchase-order-id", "delivery-order-id"])) :
|
|
4235
|
+
}, null, 8, ["purchase-order-id", "delivery-order-id"])) : I("", !0)
|
|
4236
4236
|
])
|
|
4237
4237
|
])
|
|
4238
4238
|
]),
|
|
@@ -4251,11 +4251,11 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
4251
4251
|
])
|
|
4252
4252
|
]),
|
|
4253
4253
|
e("div", cl, [
|
|
4254
|
-
|
|
4254
|
+
L(A, {
|
|
4255
4255
|
variant: "outlined",
|
|
4256
4256
|
class: "py-12 px-16"
|
|
4257
4257
|
}, {
|
|
4258
|
-
default:
|
|
4258
|
+
default: ce(() => [
|
|
4259
4259
|
e("div", ul, [
|
|
4260
4260
|
(l(!0), h(Ce, null, Ee(te.info, (Oe, Te) => (l(), h("div", {
|
|
4261
4261
|
key: Te,
|
|
@@ -4282,57 +4282,57 @@ const po = { class: "flex flex-col gap-3" }, fo = { class: "flex flex-col gap-4"
|
|
|
4282
4282
|
], 64);
|
|
4283
4283
|
}), 128))
|
|
4284
4284
|
])) : (l(), h("div", Ka, [
|
|
4285
|
-
|
|
4285
|
+
L(y),
|
|
4286
4286
|
e("div", null, [
|
|
4287
4287
|
e("img", {
|
|
4288
4288
|
src: _(Vs),
|
|
4289
4289
|
alt: "List is empty"
|
|
4290
4290
|
}, null, 8, Ha)
|
|
4291
4291
|
]),
|
|
4292
|
-
e("div", Ga, x(_(
|
|
4293
|
-
e("div", Wa, x(_(
|
|
4294
|
-
|
|
4295
|
-
|
|
4292
|
+
e("div", Ga, x(_(S)("inventory.transfer.receiveRequest.details.noRecordsFound")), 1),
|
|
4293
|
+
e("div", Wa, x(_(S)("inventory.transfer.receiveRequest.details.trackDeliveryMessage")), 1),
|
|
4294
|
+
L(y),
|
|
4295
|
+
L(y)
|
|
4296
4296
|
]))
|
|
4297
|
-
])) :
|
|
4297
|
+
])) : I("", !0)
|
|
4298
4298
|
])
|
|
4299
4299
|
];
|
|
4300
4300
|
}),
|
|
4301
|
-
"side-sheet-footer":
|
|
4301
|
+
"side-sheet-footer": ce(() => [
|
|
4302
4302
|
e("div", pl, [
|
|
4303
|
-
(l(!0), h(Ce, null, Ee(
|
|
4304
|
-
_(gt)[g].available != !1 ? (l(), me(
|
|
4303
|
+
(l(!0), h(Ce, null, Ee(P.value, (g) => (l(), h(Ce, null, [
|
|
4304
|
+
_(gt)[g].available != !1 ? (l(), me(w, {
|
|
4305
4305
|
key: g,
|
|
4306
|
-
label: _(
|
|
4307
|
-
onClick: (
|
|
4306
|
+
label: _(S)(_(gt)[g].translationKey),
|
|
4307
|
+
onClick: (U) => ye(g),
|
|
4308
4308
|
loading: z.value === g,
|
|
4309
|
-
disabled: z.value !== g &&
|
|
4309
|
+
disabled: z.value !== g && J.value,
|
|
4310
4310
|
variant: _(gt)[g].buttonVariant
|
|
4311
|
-
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) :
|
|
4311
|
+
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : I("", !0)
|
|
4312
4312
|
], 64))), 256)),
|
|
4313
|
-
_(
|
|
4313
|
+
_(T).ableToMarkReceived(r.purchaseOrder) && !P.value.includes("completeReceive") ? (l(), me(w, {
|
|
4314
4314
|
key: 0,
|
|
4315
|
-
label: _(
|
|
4315
|
+
label: _(S)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
4316
4316
|
onClick: a[4] || (a[4] = (g) => ye("completeReceive")),
|
|
4317
4317
|
loading: z.value === "completeReceive",
|
|
4318
|
-
disabled: z.value !== "completeReceive" &&
|
|
4319
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
4320
|
-
_(
|
|
4318
|
+
disabled: z.value !== "completeReceive" && J.value
|
|
4319
|
+
}, null, 8, ["label", "loading", "disabled"])) : I("", !0),
|
|
4320
|
+
_(T).ableToMarkApproved(r.purchaseOrder) && r.canApprove && !P.value.includes("approveRequest") ? (l(), me(w, {
|
|
4321
4321
|
key: 1,
|
|
4322
|
-
label: _(
|
|
4322
|
+
label: _(S)("inventory.transfer.approval.actions.approveRequest"),
|
|
4323
4323
|
onClick: a[5] || (a[5] = (g) => ye("approveRequest")),
|
|
4324
4324
|
loading: z.value === "approveRequest",
|
|
4325
|
-
disabled: z.value !== "approveRequest" &&
|
|
4326
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
4327
|
-
_(
|
|
4325
|
+
disabled: z.value !== "approveRequest" && J.value
|
|
4326
|
+
}, null, 8, ["label", "loading", "disabled"])) : I("", !0),
|
|
4327
|
+
_(T).ableToCreateFulfillment(r.purchaseOrder, r.poRequest) && n.scope === "approval" ? (l(), me(w, {
|
|
4328
4328
|
key: 2,
|
|
4329
|
-
label: _(
|
|
4329
|
+
label: _(S)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
4330
4330
|
onClick: a[6] || (a[6] = (g) => ye("processRequest")),
|
|
4331
4331
|
loading: z.value === "processRequest",
|
|
4332
|
-
disabled: z.value !== "processRequest" &&
|
|
4333
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
4334
|
-
|
|
4335
|
-
label: _(
|
|
4332
|
+
disabled: z.value !== "processRequest" && J.value
|
|
4333
|
+
}, null, 8, ["label", "loading", "disabled"])) : I("", !0),
|
|
4334
|
+
L(w, {
|
|
4335
|
+
label: _(S)("common.close"),
|
|
4336
4336
|
variant: "tertiary",
|
|
4337
4337
|
onClick: a[7] || (a[7] = (g) => c("update:show", !1))
|
|
4338
4338
|
}, null, 8, ["label"])
|