@feedmepos/mf-inventory-portal 1.2.50 → 1.2.51
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-DssF0b6P.js → App-BJ_vKOR1.js} +3 -3
- package/dist/{ApprovalView-DTCayLqE.js → ApprovalView-B_prTTtl.js} +5 -5
- package/dist/{BindingsDialog-C2-THIG0.js → BindingsDialog-BPuKgJIk.js} +2 -2
- package/dist/{BindingsPicker-Q9W92GzO.js → BindingsPicker-Dv_cmEil.js} +2 -2
- package/dist/{BindingsTable-BQo8HpbF.js → BindingsTable-BNSfYRfq.js} +3 -3
- package/dist/{ClosingDraftView-B0spMbZd.js → ClosingDraftView-C78tcaJ3.js} +391 -404
- package/dist/{ClosingHistoryView-DDVibMzL.js → ClosingHistoryView-DY8liEk3.js} +3 -3
- package/dist/{ClosingTemplateView-BSiNTpkH.js → ClosingTemplateView-pJXEcrjO.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-P9JASYcM.js → DeliveryOrderPrintPreview-Bu_l-kxu.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DkvLYf5A.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dgibb-Fh.js} +4 -4
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CaQq9jpc.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DHe5G3kX.js} +2 -2
- package/dist/{FmMultiselectDialog-DKEGwdyz.js → FmMultiselectDialog-C3iCMK5I.js} +1 -1
- package/dist/{FmMultiselectDialog-BgLyRNeD.js → FmMultiselectDialog-CDONDKxE.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-H5xYFc6B.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CefvebOx.js} +3 -3
- package/dist/{ImportView-CKg0Z3Bz.js → ImportView-JrenRgiI.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-y1qeqeUV.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CSdxodp6.js} +1 -1
- package/dist/{IngredientGroupView-DntDNlVX.js → IngredientGroupView-aDFq_ZDh.js} +5 -5
- package/dist/{IngredientsView-B93tavZW.js → IngredientsView-DSh3UqDg.js} +14 -14
- package/dist/{IntegrationView-CqEe7SWR.js → IntegrationView-KhZ78uxM.js} +12 -12
- package/dist/{InventoryBindingForm-9E3VsD4v.js → InventoryBindingForm-DZu0CZYh.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dgy_eFxJ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-YuCn0irA.js} +4 -4
- package/dist/{InventoryBindingSummary-DTcoWk_n.js → InventoryBindingSummary-DZxLhZ_-.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CIDw4WOz.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DAwpZY3n.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Dao7XifY.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CPDxwz-V.js} +2 -2
- package/dist/{PublishView-GDJsOfeY.js → PublishView-CLnQ7NBN.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-DFeZT5Zi.js → PurchaseOrderPrintPreview-DiBztBma.js} +1 -1
- package/dist/{ReceiveRequestView-BvYpGKEB.js → ReceiveRequestView-_TOSnDGJ.js} +18 -18
- package/dist/{RecipeView-DyJs2lsk.js → RecipeView-BPIMvoTw.js} +8 -8
- package/dist/{StockView-Cvwfcsf7.js → StockView-CI8MUJay.js} +15 -15
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CMFiW6FL.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DEBHEMkh.js} +1 -1
- package/dist/{SupplierView-C6rIxQOg.js → SupplierView-COihDMNY.js} +11 -11
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-6C5vAumx.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-D-c0Ayis.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bc0MVyK_.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-D8vbPlie.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BSNIRZx3.js → TransferDetails.vue_vue_type_script_setup_true_lang-BVuuw11z.js} +599 -598
- package/dist/{TransferTemplateView-BVRXLZGK.js → TransferTemplateView-B2NNfrEq.js} +15 -15
- package/dist/{UnitView-B9n1vDtN.js → UnitView-ZsbM07hw.js} +6 -6
- package/dist/{WarehouseView-oyEVpI9M.js → WarehouseView-Cd5RFu5v.js} +5 -5
- package/dist/{WastageTemplateView-DCdR4fhu.js → WastageTemplateView-DpikyyZW.js} +14 -14
- package/dist/{app-_hCz0958.js → app-CySQTQxj.js} +7 -7
- package/dist/app.js +1 -1
- package/dist/{closing-template-y0kvKjaN.js → closing-template-DXGjC5AG.js} +1 -1
- package/dist/{date2-Ct3mwV73.js → date2-BWoUn1K_.js} +1 -1
- package/dist/{dayjs.min-iDh15Qvq.js → dayjs.min-cMW8olEu.js} +1 -1
- package/dist/{decimal-DliTT0vp.js → decimal-8BRzZQU6.js} +2 -2
- package/dist/{defineDeepModel-DmVg-VGa.js → defineDeepModel-AsUZ-DyW.js} +1 -1
- package/dist/{duplicate-template-BO8LvPWq.js → duplicate-template-CyHfZR3S.js} +1 -1
- package/dist/{feature-Dk3_0hiC.js → feature-Dm0FnWf9.js} +47 -40
- package/dist/{format-time-from-id-DOmxxVYQ.js → format-time-from-id-C9lmv5BP.js} +1 -1
- package/dist/{format-unit-display-BuliV6Fn.js → format-unit-display-BV8pJisO.js} +10 -10
- package/dist/{import-export.helper-DpWf4zh7.js → import-export.helper-Djxw_H5S.js} +5 -5
- package/dist/{index-BZ9fyZbO.js → index-8hCa5_Gb.js} +1 -1
- package/dist/{index-C6nEuFpg.js → index-D6u3kywf.js} +1 -1
- package/dist/{index-CY6-px7W.js → index-DidYtgNc.js} +3 -3
- package/dist/{lodash-DDMf37Aw.js → lodash-CW_Ea6mA.js} +1 -1
- package/dist/{netsuite-CVg13Lx5.js → netsuite-BEto-z0v.js} +3 -3
- package/dist/{purchase-order-template-C9GqlQL3.js → purchase-order-template-BTzjcgrO.js} +1 -1
- package/dist/{rules-9-OxHCjJ.js → rules-DkVWS5mF.js} +3 -3
- package/dist/{stock-CjJKvKsB.js → stock-CHw8pI8V.js} +3 -3
- package/dist/{stock-D7gYQHth.js → stock-D8hLHgeN.js} +1 -1
- package/dist/stores/feature.d.ts +2 -0
- package/dist/{supplier-z1X1B4yZ.js → supplier-Dv83IfQr.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-B4u8ttOK.js → use-ingredient-select-dialog-CJjd4g-6.js} +2 -2
- package/dist/{use-inventory-binding-dialog-CaFu9DlH.js → use-inventory-binding-dialog-D4g79p5S.js} +2 -2
- package/dist/{use-template-enabled-locations-2-KQU0hLX3.js → use-template-enabled-locations-2-Cg2iqQdq.js} +2 -2
- package/dist/{vue-i18n-UG5lCeUG.js → vue-i18n-kUcLfpvT.js} +2 -2
- package/dist/{xlsx-INrtkMe5.js → xlsx-BjeMbhDF.js} +1 -1
- package/dist/{xlsx.util-OqI8IJfw.js → xlsx.util-9eMlJfd9.js} +1 -1
- package/package.json +3 -3
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { p as Ct, f as We } from "./format-time-from-id-
|
|
2
|
-
import { ref as J, computed as Y, h as L, defineComponent as $e, reactive as Rt, onMounted as yt, resolveComponent as
|
|
1
|
+
import { p as Ct, f as We } from "./format-time-from-id-C9lmv5BP.js";
|
|
2
|
+
import { ref as J, computed as Y, h as L, defineComponent as $e, reactive as Rt, onMounted as yt, resolveComponent as G, openBlock as l, createBlock as re, withCtx as ee, createElementVNode as e, createVNode as D, unref as v, createElementBlock as b, toDisplayString as y, createCommentVNode as B, Fragment as de, renderList as xe, createTextVNode as ke, normalizeClass as Me, watch as kt, isRef as Dt, resolveDynamicComponent as At } from "vue";
|
|
3
3
|
import { c as mt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-cfFHDIwQ.js";
|
|
4
4
|
import { R as ye, D as Se } from "./row-action.enum-BcW_L_nE.js";
|
|
5
|
-
import { o as Nt, u as De, W as
|
|
6
|
-
import { l as
|
|
7
|
-
import { F as Tt } from "./decimal-
|
|
8
|
-
import { t as It, c as Pt, h as _t, a as He } from "./date2-
|
|
9
|
-
import { u as Ue, F as qt, a as st } from "./feature-
|
|
5
|
+
import { o as Nt, u as De, W as U, X as Ze, M as se, D as Ft, c as vt, v as it, Y as ht, t as Ge, J as Ce, A as Ye, s as qe, B as Pe } from "./app-CySQTQxj.js";
|
|
6
|
+
import { l as bt, d as gt, a as be, t as Qe, e as Ke } from "./rules-DkVWS5mF.js";
|
|
7
|
+
import { F as Tt } from "./decimal-8BRzZQU6.js";
|
|
8
|
+
import { t as It, c as Pt, h as _t, a as He } from "./date2-BWoUn1K_.js";
|
|
9
|
+
import { u as Ue, F as qt, a as st } from "./feature-Dm0FnWf9.js";
|
|
10
10
|
import { useCoreStore as ct, useI18n as ut } from "@feedmepos/mf-common";
|
|
11
|
-
import { u as et, a as dt, S as we } from "./netsuite-
|
|
11
|
+
import { u as et, a as dt, S as we } from "./netsuite-BEto-z0v.js";
|
|
12
12
|
import { useDialog as tt, useSnackbar as Be, components as Je, FmButtonVariant as ge, useProxiedModel as Vt } from "@feedmepos/ui-library";
|
|
13
13
|
import { F as Ve } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
14
14
|
import { E as Et } from "./empty-placeholder-wf6-BWE8.js";
|
|
15
|
-
import { u as Lt, a as Mt, f as Ut } from "./format-unit-display-
|
|
16
|
-
import { u as je, _ as Bt } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { _ as jt, a as zt, b as Kt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
15
|
+
import { u as Lt, a as Mt, f as Ut } from "./format-unit-display-BV8pJisO.js";
|
|
16
|
+
import { u as je, _ as Bt } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-D-c0Ayis.js";
|
|
17
|
+
import { _ as jt, a as zt, b as Kt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CefvebOx.js";
|
|
18
18
|
import { u as Gt, R as pt } from "./usePromise-CbVUCxhj.js";
|
|
19
|
-
import { c as Ht } from "./index-
|
|
20
|
-
import { i as Wt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
19
|
+
import { c as Ht } from "./index-DidYtgNc.js";
|
|
20
|
+
import { i as Wt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DHe5G3kX.js";
|
|
21
21
|
import { F as ft } from "./form-mode.enum-BKiNVH6A.js";
|
|
22
|
-
import { d as St } from "./defineDeepModel-
|
|
23
|
-
import { u as Yt } from "./vue-i18n-
|
|
24
|
-
const Qt = Nt((
|
|
22
|
+
import { d as St } from "./defineDeepModel-AsUZ-DyW.js";
|
|
23
|
+
import { u as Yt } from "./vue-i18n-kUcLfpvT.js";
|
|
24
|
+
const Qt = Nt(($, a) => {
|
|
25
25
|
const o = De();
|
|
26
26
|
return {
|
|
27
27
|
async getShipments({
|
|
28
28
|
start: f,
|
|
29
|
-
end:
|
|
29
|
+
end: h
|
|
30
30
|
}) {
|
|
31
|
-
const n = o.currentLocationDBName, A = `${
|
|
32
|
-
return await a.get(`${A}?start=${f}&end=${
|
|
31
|
+
const n = o.currentLocationDBName, A = `${$.inventoryBackendUrl}/${n}/shipments`;
|
|
32
|
+
return await a.get(`${A}?start=${f}&end=${h}`);
|
|
33
33
|
},
|
|
34
34
|
async getShipmentsByIds(f) {
|
|
35
35
|
if (f.length === 0)
|
|
36
36
|
return [];
|
|
37
|
-
const
|
|
37
|
+
const h = o.currentLocationDBName, n = `${$.inventoryBackendUrl}/${h}/shipments/get`;
|
|
38
38
|
return await a.post(n, { shipmentIds: f });
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
}), xt = {
|
|
42
|
-
[
|
|
42
|
+
[U.enum.confirmDraft]: {
|
|
43
43
|
primaryActions: {
|
|
44
44
|
text: "Confirm draft",
|
|
45
45
|
close: !0
|
|
@@ -48,7 +48,7 @@ const Qt = Nt((C, a) => {
|
|
|
48
48
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
49
49
|
successMessage: "Purchase order draft has been confirmed"
|
|
50
50
|
},
|
|
51
|
-
[
|
|
51
|
+
[U.enum.cancelDraft]: {
|
|
52
52
|
primaryActions: {
|
|
53
53
|
text: "Cancel draft",
|
|
54
54
|
close: !0,
|
|
@@ -58,7 +58,7 @@ const Qt = Nt((C, a) => {
|
|
|
58
58
|
message: "Purchase order cannot be changed after cancelled draft.",
|
|
59
59
|
successMessage: "Purchase order draft has been cancelled"
|
|
60
60
|
},
|
|
61
|
-
[
|
|
61
|
+
[U.enum.submitRequest]: {
|
|
62
62
|
primaryActions: {
|
|
63
63
|
text: "Submit request",
|
|
64
64
|
close: !0
|
|
@@ -67,7 +67,7 @@ const Qt = Nt((C, a) => {
|
|
|
67
67
|
message: "Purchase order cannot be changed after confirm draft.",
|
|
68
68
|
successMessage: "Purchase order draft has been submitted"
|
|
69
69
|
},
|
|
70
|
-
[
|
|
70
|
+
[U.enum.completeReceive]: {
|
|
71
71
|
primaryActions: {
|
|
72
72
|
text: "Mark received",
|
|
73
73
|
close: !0
|
|
@@ -76,7 +76,7 @@ const Qt = Nt((C, a) => {
|
|
|
76
76
|
message: "Purchase order cannot be changed after it has complete receiving.",
|
|
77
77
|
successMessage: "Purchase order has been marked as received"
|
|
78
78
|
},
|
|
79
|
-
[
|
|
79
|
+
[U.enum.approveRequest]: {
|
|
80
80
|
primaryActions: {
|
|
81
81
|
text: "Accept request",
|
|
82
82
|
close: !0
|
|
@@ -85,7 +85,7 @@ const Qt = Nt((C, a) => {
|
|
|
85
85
|
message: "Transfer out request will be accepted.",
|
|
86
86
|
successMessage: "Transfer out request has been approved"
|
|
87
87
|
},
|
|
88
|
-
[
|
|
88
|
+
[U.enum.rejectRequest]: {
|
|
89
89
|
primaryActions: {
|
|
90
90
|
text: "Reject request",
|
|
91
91
|
close: !0,
|
|
@@ -95,7 +95,7 @@ const Qt = Nt((C, a) => {
|
|
|
95
95
|
message: "Purchase order will be rejected.",
|
|
96
96
|
successMessage: "Purchase order has been rejected"
|
|
97
97
|
},
|
|
98
|
-
[
|
|
98
|
+
[U.enum.processRequest]: {
|
|
99
99
|
primaryActions: {
|
|
100
100
|
text: "Process request",
|
|
101
101
|
close: !0,
|
|
@@ -106,25 +106,25 @@ const Qt = Nt((C, a) => {
|
|
|
106
106
|
successMessage: "Purchase order has been processed"
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
|
-
function Xe(
|
|
109
|
+
function Xe($) {
|
|
110
110
|
return Ze.generatedPOReceivedMap({
|
|
111
|
-
purchaseOrder:
|
|
111
|
+
purchaseOrder: $
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
function Jt(
|
|
114
|
+
function Jt($) {
|
|
115
115
|
return Ze.validatePOItemReceivedStatus({
|
|
116
|
-
dto:
|
|
116
|
+
dto: $
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
-
function nt(
|
|
119
|
+
function nt($) {
|
|
120
120
|
return Ze.validatePOReceivedStatus({
|
|
121
|
-
receivedMap:
|
|
121
|
+
receivedMap: $
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
|
-
function at(
|
|
125
|
-
if (!se.safeParse(
|
|
126
|
-
throw new Error(`Invalid purchase order status: ${
|
|
127
|
-
const f = se.parse(
|
|
124
|
+
function at($, a, o) {
|
|
125
|
+
if (!se.safeParse($).success)
|
|
126
|
+
throw new Error(`Invalid purchase order status: ${$}`);
|
|
127
|
+
const f = se.parse($);
|
|
128
128
|
return Ze.orderStatusCombination({
|
|
129
129
|
status: f,
|
|
130
130
|
isPOPartialReceive: a,
|
|
@@ -132,36 +132,36 @@ function at(C, a, o) {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
function Ot() {
|
|
135
|
-
const
|
|
135
|
+
const $ = De(), a = je(), o = Ue();
|
|
136
136
|
async function f(n, A) {
|
|
137
|
-
const t =
|
|
138
|
-
return n.doc.supplier.internal && n.operation ===
|
|
137
|
+
const t = $.currentLocationDBName;
|
|
138
|
+
return n.doc.supplier.internal && n.operation === U.enum.confirmDraft && (n.operation = U.enum.submitRequest), await a.processPurchaseOrder(n, A || t);
|
|
139
139
|
}
|
|
140
|
-
async function
|
|
141
|
-
const t =
|
|
140
|
+
async function h(n, A) {
|
|
141
|
+
const t = $.currentLocationDBName;
|
|
142
142
|
return await a.processPurchaseOrderV2(n, A || t);
|
|
143
143
|
}
|
|
144
|
-
return (n) => o.useOperatePurchaseOrderV2 ?
|
|
144
|
+
return (n) => o.useOperatePurchaseOrderV2 ? h(n.operateV2, n.transferTo) : f(n.operate, n.transferTo);
|
|
145
145
|
}
|
|
146
|
-
var lt = /* @__PURE__ */ ((
|
|
146
|
+
var lt = /* @__PURE__ */ (($) => ($.RECEIVE_REQUEST = "receive/request", $.APPROVAL = "approval", $))(lt || {});
|
|
147
147
|
const ze = J(), rt = J();
|
|
148
|
-
function Yn(
|
|
149
|
-
const o = tt(), f = De(),
|
|
148
|
+
function Yn($, a) {
|
|
149
|
+
const o = tt(), f = De(), h = Ue();
|
|
150
150
|
et();
|
|
151
|
-
const n = Lt(), A = Mt(), t = J(!1), c = Be(), S = je(), x = Qt(), u = J(new Array()),
|
|
151
|
+
const n = Lt(), A = Mt(), t = J(!1), c = Be(), S = je(), x = Qt(), u = J(new Array()), T = J(new Array()), N = J(
|
|
152
152
|
a != null && a.startDate && (a != null && a.endDate) ? a : Wt()
|
|
153
153
|
), w = Y(() => {
|
|
154
|
-
const
|
|
154
|
+
const j = new Date(N.value.startDate), V = new Date(N.value.endDate);
|
|
155
155
|
return {
|
|
156
|
-
start: It(
|
|
157
|
-
end: Pt(
|
|
156
|
+
start: It(j).toISOString(),
|
|
157
|
+
end: Pt(V).toISOString()
|
|
158
158
|
};
|
|
159
159
|
}), O = J(new Array()), r = Ft(), d = J(null);
|
|
160
|
-
async function i(
|
|
161
|
-
function
|
|
160
|
+
async function i(j) {
|
|
161
|
+
function V(k) {
|
|
162
162
|
const _ = {
|
|
163
163
|
mode: ft.CREATE,
|
|
164
|
-
modelValue:
|
|
164
|
+
modelValue: j || void 0,
|
|
165
165
|
show: !0,
|
|
166
166
|
"onUpdate:show"(F) {
|
|
167
167
|
ze.value.show = F;
|
|
@@ -172,7 +172,7 @@ function Yn(C, a) {
|
|
|
172
172
|
ze.value = _;
|
|
173
173
|
}
|
|
174
174
|
let oe;
|
|
175
|
-
|
|
175
|
+
h.mustUsePoTemplate && !(j != null && j.template) ? o.open({
|
|
176
176
|
title: "Create transfer",
|
|
177
177
|
message: "",
|
|
178
178
|
primaryActions: {
|
|
@@ -185,36 +185,36 @@ function Yn(C, a) {
|
|
|
185
185
|
close: !0
|
|
186
186
|
}
|
|
187
187
|
}).onPrimary(async () => {
|
|
188
|
-
oe = await n.getTemplateId(), oe &&
|
|
188
|
+
oe = await n.getTemplateId(), oe && V(oe);
|
|
189
189
|
}).onSecondary(() => {
|
|
190
|
-
|
|
191
|
-
}) :
|
|
190
|
+
V(void 0);
|
|
191
|
+
}) : V(oe);
|
|
192
192
|
}
|
|
193
|
-
function g(
|
|
194
|
-
const
|
|
193
|
+
function g(j) {
|
|
194
|
+
const V = {
|
|
195
195
|
mode: ft.UPDATE,
|
|
196
|
-
modelValue: vt(
|
|
196
|
+
modelValue: vt(j),
|
|
197
197
|
show: !0,
|
|
198
198
|
"onUpdate:show"(oe) {
|
|
199
199
|
ze.value.show = oe;
|
|
200
200
|
},
|
|
201
201
|
lastClosingDate: d.value
|
|
202
202
|
};
|
|
203
|
-
ze.value =
|
|
203
|
+
ze.value = V;
|
|
204
204
|
}
|
|
205
|
-
async function
|
|
206
|
-
u.value = [],
|
|
205
|
+
async function C() {
|
|
206
|
+
u.value = [], T.value = [], t.value = !0;
|
|
207
207
|
try {
|
|
208
|
-
const
|
|
209
|
-
u.value =
|
|
210
|
-
const
|
|
211
|
-
|
|
208
|
+
const j = await S.getPurchaseOrders(w.value);
|
|
209
|
+
u.value = j.sort((H, ce) => ce._id.localeCompare(H._id));
|
|
210
|
+
const V = j.flatMap((H) => H.shipmentIds || []).filter(Boolean), oe = V.length > 0 ? await x.getShipmentsByIds(V) : [];
|
|
211
|
+
T.value = oe;
|
|
212
212
|
const k = await r.readCurrentLocationLastClosing(!0), _ = k == null ? void 0 : k._id;
|
|
213
|
-
_ && (d.value = Ct(_)), await
|
|
214
|
-
const F = u.value.map((
|
|
213
|
+
_ && (d.value = Ct(_)), await h.awaitFeatureLoaded(() => h.mustUsePoTemplate) && await A.fetchTemplates();
|
|
214
|
+
const F = u.value.map((H) => {
|
|
215
215
|
var ce;
|
|
216
|
-
return ((ce =
|
|
217
|
-
}).filter((
|
|
216
|
+
return ((ce = H.request) == null ? void 0 : ce.id) ?? "";
|
|
217
|
+
}).filter((H) => H);
|
|
218
218
|
O.value = await S.readRequestByIds(F);
|
|
219
219
|
} catch {
|
|
220
220
|
c.open({
|
|
@@ -233,7 +233,7 @@ function Yn(C, a) {
|
|
|
233
233
|
void 0,
|
|
234
234
|
w.value.start,
|
|
235
235
|
w.value.end
|
|
236
|
-
).then((
|
|
236
|
+
).then((j) => j.reverse());
|
|
237
237
|
} catch {
|
|
238
238
|
c.open({
|
|
239
239
|
title: "Something went wrong",
|
|
@@ -245,78 +245,78 @@ function Yn(C, a) {
|
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
function R() {
|
|
248
|
-
switch (
|
|
248
|
+
switch ($) {
|
|
249
249
|
case "receive/request":
|
|
250
|
-
return
|
|
250
|
+
return C();
|
|
251
251
|
case "approval":
|
|
252
252
|
return K();
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
function X(
|
|
255
|
+
function X(j, V) {
|
|
256
256
|
N.value = {
|
|
257
|
-
startDate:
|
|
258
|
-
endDate:
|
|
257
|
+
startDate: j,
|
|
258
|
+
endDate: V
|
|
259
259
|
}, R();
|
|
260
260
|
}
|
|
261
|
-
f.watchLocation(async (
|
|
262
|
-
if (!
|
|
261
|
+
f.watchLocation(async (j) => {
|
|
262
|
+
if (!j) {
|
|
263
263
|
u.value = [];
|
|
264
264
|
return;
|
|
265
265
|
}
|
|
266
266
|
await R();
|
|
267
267
|
});
|
|
268
|
-
const
|
|
269
|
-
async function ve(
|
|
268
|
+
const z = J(), Q = J(Math.random().toString());
|
|
269
|
+
async function ve(j, V) {
|
|
270
270
|
const oe = Math.random().toString();
|
|
271
|
-
Q.value = oe,
|
|
272
|
-
(
|
|
271
|
+
Q.value = oe, V ?? (V = O.value.computeFirst(
|
|
272
|
+
(H) => H.purchaseOrderId === j._id ? H : null
|
|
273
273
|
) ?? void 0);
|
|
274
|
-
const k =
|
|
275
|
-
poRequest:
|
|
274
|
+
const k = $ === "receive/request" ? f.currentLocation : V == null ? void 0 : V.to, _ = $ === "approval", F = {
|
|
275
|
+
poRequest: V,
|
|
276
276
|
purchaseOrder: {
|
|
277
|
-
...
|
|
278
|
-
status: _ && (
|
|
277
|
+
...j,
|
|
278
|
+
status: _ && (V != null && V.rejectedAt) ? se.Enum.REJECT : j.status
|
|
279
279
|
},
|
|
280
280
|
transferTo: k == null ? void 0 : k.name,
|
|
281
281
|
transferToDbName: k == null ? void 0 : k.dbName,
|
|
282
282
|
show: !0,
|
|
283
283
|
canResubmit: !1,
|
|
284
284
|
canApprove: _,
|
|
285
|
-
"onUpdate:show"(
|
|
286
|
-
|
|
285
|
+
"onUpdate:show"(H) {
|
|
286
|
+
z.value.show = H;
|
|
287
287
|
},
|
|
288
|
-
scope:
|
|
289
|
-
receivedMap: Xe(
|
|
290
|
-
shipments:
|
|
288
|
+
scope: $,
|
|
289
|
+
receivedMap: Xe(j) ?? {},
|
|
290
|
+
shipments: T.value
|
|
291
291
|
};
|
|
292
|
-
|
|
292
|
+
z.value = F;
|
|
293
293
|
}
|
|
294
|
-
async function ie(
|
|
294
|
+
async function ie(j, V, oe, k) {
|
|
295
295
|
const _ = Ot();
|
|
296
296
|
t.value = !0;
|
|
297
297
|
try {
|
|
298
298
|
await _({
|
|
299
299
|
operate: {
|
|
300
|
-
operation:
|
|
301
|
-
doc:
|
|
300
|
+
operation: V,
|
|
301
|
+
doc: j,
|
|
302
302
|
options: (
|
|
303
303
|
// auto receive for supplier to warehouse
|
|
304
|
-
(
|
|
305
|
-
|
|
304
|
+
(V === U.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
305
|
+
V === U.enum.completeReceive) && h.autoReceiveWarehouse ? {
|
|
306
306
|
autoReceive: !0
|
|
307
307
|
} : void 0
|
|
308
308
|
)
|
|
309
309
|
},
|
|
310
310
|
operateV2: {
|
|
311
|
-
_id:
|
|
312
|
-
_rev:
|
|
313
|
-
action:
|
|
311
|
+
_id: j._id,
|
|
312
|
+
_rev: j._rev ?? "",
|
|
313
|
+
action: V,
|
|
314
314
|
payloads: []
|
|
315
315
|
},
|
|
316
316
|
transferTo: k
|
|
317
317
|
}), await new Promise((ce) => setTimeout(ce, 1e3));
|
|
318
|
-
const
|
|
319
|
-
|
|
318
|
+
const H = De().currentLocationDBName.startsWith("restaurant_");
|
|
319
|
+
V === U.enum.confirmDraft && j.effectiveAt && H ? c.open({
|
|
320
320
|
title: "Success",
|
|
321
321
|
message: `${oe}. The backdate will be reflected once your POS has received this change.`,
|
|
322
322
|
type: "success"
|
|
@@ -330,17 +330,17 @@ function Yn(C, a) {
|
|
|
330
330
|
title: "Something went wrong",
|
|
331
331
|
message: "Please try again.",
|
|
332
332
|
type: "error"
|
|
333
|
-
}), console.error("Error when submitting PO operation",
|
|
333
|
+
}), console.error("Error when submitting PO operation", V, j, F);
|
|
334
334
|
} finally {
|
|
335
335
|
t.value = !1, R();
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
async function Ae(
|
|
339
|
-
const k = xt[
|
|
338
|
+
async function Ae(j, V, oe) {
|
|
339
|
+
const k = xt[V];
|
|
340
340
|
if (!k) {
|
|
341
341
|
c.open({
|
|
342
342
|
title: "Something went wrong",
|
|
343
|
-
message: `Cannot process order: ${it(
|
|
343
|
+
message: `Cannot process order: ${it(V)}`,
|
|
344
344
|
type: "error"
|
|
345
345
|
});
|
|
346
346
|
return;
|
|
@@ -351,7 +351,7 @@ function Yn(C, a) {
|
|
|
351
351
|
message: F.message,
|
|
352
352
|
primaryActions: F.primaryActions
|
|
353
353
|
}).onPrimary(() => {
|
|
354
|
-
ie(
|
|
354
|
+
ie(j, V, _, oe);
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
357
|
async function Ne() {
|
|
@@ -366,18 +366,18 @@ function Yn(C, a) {
|
|
|
366
366
|
close: !0
|
|
367
367
|
}
|
|
368
368
|
}).onPrimary(() => {
|
|
369
|
-
const
|
|
369
|
+
const j = {
|
|
370
370
|
show: !0,
|
|
371
|
-
"onUpdate:show"(
|
|
372
|
-
rt.value.show =
|
|
371
|
+
"onUpdate:show"(V) {
|
|
372
|
+
rt.value.show = V;
|
|
373
373
|
}
|
|
374
374
|
};
|
|
375
|
-
rt.value =
|
|
375
|
+
rt.value = j;
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
378
|
return {
|
|
379
379
|
purchaseOrders: u,
|
|
380
|
-
shipments:
|
|
380
|
+
shipments: T,
|
|
381
381
|
purchaseRequests: O,
|
|
382
382
|
updateDateRange: X,
|
|
383
383
|
fetchData: R,
|
|
@@ -385,24 +385,24 @@ function Yn(C, a) {
|
|
|
385
385
|
transferDialogProps: ze,
|
|
386
386
|
promptCreateTransferDialog: i,
|
|
387
387
|
promptUpdateTransferDialog: g,
|
|
388
|
-
transferDetailsProps:
|
|
388
|
+
transferDetailsProps: z,
|
|
389
389
|
promptShowTransferDetails: ve,
|
|
390
390
|
submitAction: Ae,
|
|
391
391
|
xilnexImportDialogProps: rt,
|
|
392
392
|
promptUploadTransferDialog: Ne
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
|
-
function Xt(
|
|
395
|
+
function Xt($, a) {
|
|
396
396
|
return a.reduce(
|
|
397
|
-
(f,
|
|
398
|
-
const n =
|
|
399
|
-
return n && (f =
|
|
397
|
+
(f, h) => {
|
|
398
|
+
const n = h.received.find((A) => A.sku._id === $._id);
|
|
399
|
+
return n && (f = bt(f, n.amount)), f;
|
|
400
400
|
},
|
|
401
|
-
Tt.toPrecision(gt(0),
|
|
401
|
+
Tt.toPrecision(gt(0), $.unit.precision)
|
|
402
402
|
);
|
|
403
403
|
}
|
|
404
|
-
function Zt(
|
|
405
|
-
const { po: a, currentLocation: o, business: f, fulfilling:
|
|
404
|
+
function Zt($) {
|
|
405
|
+
const { po: a, currentLocation: o, business: f, fulfilling: h, por: n } = $, { name: A, address: t, regNo: c, legalName: S } = o.doc.profile, x = {
|
|
406
406
|
name: A,
|
|
407
407
|
legalName: S,
|
|
408
408
|
registrationNumber: c,
|
|
@@ -422,31 +422,31 @@ function Zt(C) {
|
|
|
422
422
|
city: a.supplier.address.city,
|
|
423
423
|
state: a.supplier.address.state,
|
|
424
424
|
country: a.supplier.address.country
|
|
425
|
-
},
|
|
426
|
-
const { sku: K, measurement: R } =
|
|
427
|
-
Xt(
|
|
425
|
+
}, T = a.items.map((C) => {
|
|
426
|
+
const { sku: K, measurement: R } = C, X = be(
|
|
427
|
+
Xt(C.sku, a.deliveryOrder || []),
|
|
428
428
|
!1
|
|
429
429
|
);
|
|
430
430
|
return {
|
|
431
431
|
code: K.code,
|
|
432
432
|
description: K.name,
|
|
433
|
-
quantity:
|
|
433
|
+
quantity: be(C.quantity, !1),
|
|
434
434
|
unit: (R == null ? void 0 : R.abbrev) || K.unit.abbrev,
|
|
435
435
|
received: X,
|
|
436
|
-
cost:
|
|
437
|
-
value:
|
|
436
|
+
cost: C.totalCost ? `${C.totalCost.currency} ${qt.toFormatString({
|
|
437
|
+
value: C.totalCost
|
|
438
438
|
})}` : void 0
|
|
439
439
|
};
|
|
440
|
-
}), N = a.deliveryOrder.map((
|
|
441
|
-
createdAt: _t(new Date(
|
|
442
|
-
ref:
|
|
443
|
-
remark:
|
|
444
|
-
items:
|
|
440
|
+
}), N = a.deliveryOrder.map((C) => ({
|
|
441
|
+
createdAt: _t(new Date(C.createdAt)),
|
|
442
|
+
ref: C.deliveryOrderNumber,
|
|
443
|
+
remark: C.remark || "",
|
|
444
|
+
items: C.received.map((K) => {
|
|
445
445
|
var R;
|
|
446
446
|
return {
|
|
447
447
|
code: K.sku.code,
|
|
448
448
|
description: K.sku.name,
|
|
449
|
-
quantity:
|
|
449
|
+
quantity: be(K.amount),
|
|
450
450
|
unit: ((R = K.measurement) == null ? void 0 : R.abbrev) || K.sku.unit.abbrev
|
|
451
451
|
};
|
|
452
452
|
})
|
|
@@ -458,8 +458,8 @@ function Zt(C) {
|
|
|
458
458
|
];
|
|
459
459
|
let O = "Inventory Receive Note";
|
|
460
460
|
if (a.supplier.internal ? (O = "Inventory Transfer Note", w.includes((f == null ? void 0 : f._id) || "") && (O = "Stock Request")) : O = "Purchase Order", n) {
|
|
461
|
-
const
|
|
462
|
-
o.dbName ===
|
|
461
|
+
const C = n.from.dbName;
|
|
462
|
+
o.dbName === C || (O = "Inventory Receive Note");
|
|
463
463
|
}
|
|
464
464
|
const d = {
|
|
465
465
|
title: O,
|
|
@@ -471,57 +471,57 @@ function Zt(C) {
|
|
|
471
471
|
remark: a.remark || "",
|
|
472
472
|
buyer: x,
|
|
473
473
|
supplier: u,
|
|
474
|
-
items:
|
|
474
|
+
items: T,
|
|
475
475
|
status: a.status,
|
|
476
476
|
deliveryOrders: N
|
|
477
|
-
}, i = new URL(window.location.href), g =
|
|
477
|
+
}, i = new URL(window.location.href), g = h && (a.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
478
478
|
i.pathname = i.hostname.includes("portal.feedme") ? `/inventory/${g}` : `/${g}`, i.searchParams.append("data", JSON.stringify(d)), window.open(i.href, "_blank", "noreferrer");
|
|
479
479
|
}
|
|
480
480
|
const Le = {
|
|
481
481
|
submitRequest: {
|
|
482
482
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
483
483
|
color: "text-fm-color-typo-primary",
|
|
484
|
-
value:
|
|
484
|
+
value: U.enum.submitRequest
|
|
485
485
|
},
|
|
486
486
|
confirmDraft: {
|
|
487
487
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
488
488
|
color: "text-fm-color-typo-primary",
|
|
489
|
-
value:
|
|
489
|
+
value: U.enum.confirmDraft
|
|
490
490
|
},
|
|
491
491
|
cancelDraft: {
|
|
492
492
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
493
493
|
color: "text-fm-color-typo-error",
|
|
494
|
-
value:
|
|
494
|
+
value: U.enum.cancelDraft
|
|
495
495
|
},
|
|
496
496
|
approveRequest: {
|
|
497
497
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
498
498
|
color: "text-fm-color-typo-primary",
|
|
499
|
-
value:
|
|
499
|
+
value: U.enum.approveRequest
|
|
500
500
|
},
|
|
501
501
|
rejectRequest: {
|
|
502
502
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
503
503
|
color: "text-fm-color-typo-error",
|
|
504
|
-
value:
|
|
504
|
+
value: U.enum.rejectRequest
|
|
505
505
|
},
|
|
506
506
|
processRequest: {
|
|
507
507
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
508
508
|
color: "text-fm-color-typo-primary",
|
|
509
|
-
value:
|
|
509
|
+
value: U.enum.processRequest
|
|
510
510
|
},
|
|
511
511
|
receiveStock: {
|
|
512
512
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
513
513
|
color: "text-fm-color-typo-primary",
|
|
514
|
-
value:
|
|
514
|
+
value: U.enum.receiveStock
|
|
515
515
|
},
|
|
516
516
|
completeReceive: {
|
|
517
517
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
518
518
|
color: "text-fm-color-typo-primary",
|
|
519
|
-
value:
|
|
519
|
+
value: U.enum.completeReceive
|
|
520
520
|
},
|
|
521
521
|
closeRequest: {
|
|
522
522
|
translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
|
|
523
523
|
color: "system-error-300",
|
|
524
|
-
value:
|
|
524
|
+
value: U.enum.closeRequest
|
|
525
525
|
},
|
|
526
526
|
approveDraft: {
|
|
527
527
|
translationKey: "",
|
|
@@ -536,14 +536,14 @@ const Le = {
|
|
|
536
536
|
returnStock: {
|
|
537
537
|
translationKey: "inventory.transfer.receiveRequest.actions.returnStock",
|
|
538
538
|
color: "text-fm-color-typo-primary",
|
|
539
|
-
value:
|
|
539
|
+
value: U.enum.returnStock
|
|
540
540
|
}
|
|
541
541
|
};
|
|
542
542
|
function wt() {
|
|
543
|
-
const
|
|
543
|
+
const $ = Ue();
|
|
544
544
|
return {
|
|
545
545
|
ableToMarkReceived(a) {
|
|
546
|
-
if (!a || a.status !== se.enum.RECEIVING ||
|
|
546
|
+
if (!a || a.status !== se.enum.RECEIVING || $.useOperatePurchaseOrderV2) return !1;
|
|
547
547
|
const f = De().currentLocationDBName;
|
|
548
548
|
return `${a.supplier.internal}_${a.supplier._id}` !== f;
|
|
549
549
|
},
|
|
@@ -552,34 +552,34 @@ function wt() {
|
|
|
552
552
|
},
|
|
553
553
|
ableToCreateFulfillment(a, o) {
|
|
554
554
|
var n, A;
|
|
555
|
-
if (
|
|
555
|
+
if (!$.acceptRequireFulfillment || !a || !o || a.status !== se.enum.PROCESSING || !o.processedAt)
|
|
556
556
|
return !1;
|
|
557
|
-
const f = (n = o == null ? void 0 : o.from) == null ? void 0 : n.dbName,
|
|
558
|
-
return !(f.startsWith("restaurant_") &&
|
|
557
|
+
const f = (n = o == null ? void 0 : o.from) == null ? void 0 : n.dbName, h = (A = o == null ? void 0 : o.to) == null ? void 0 : A.dbName;
|
|
558
|
+
return !(f.startsWith("restaurant_") && h.startsWith("restaurant_"));
|
|
559
559
|
}
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
|
-
function Qn(
|
|
563
|
-
const f = De(),
|
|
562
|
+
function Qn($, a, o) {
|
|
563
|
+
const f = De(), h = et(), n = ct(), A = wt(), { t } = ut();
|
|
564
564
|
function c(w) {
|
|
565
565
|
switch (w.status) {
|
|
566
566
|
case "DRAFT":
|
|
567
567
|
return [
|
|
568
568
|
Se[ye.Update],
|
|
569
569
|
Se[ye.Details],
|
|
570
|
-
w.supplier.internal === "restaurant" || w.supplier.internal === "warehouse" ? Le[
|
|
571
|
-
Le[
|
|
570
|
+
w.supplier.internal === "restaurant" || w.supplier.internal === "warehouse" ? Le[U.enum.submitRequest] : Le[U.enum.confirmDraft],
|
|
571
|
+
Le[U.enum.cancelDraft]
|
|
572
572
|
];
|
|
573
573
|
case "RECEIVING":
|
|
574
574
|
return [
|
|
575
|
-
...A.ableToMarkReceived(w) ? [Le[
|
|
575
|
+
...A.ableToMarkReceived(w) ? [Le[U.enum.completeReceive]] : [],
|
|
576
576
|
Se[ye.Details],
|
|
577
577
|
Se[ye.Print]
|
|
578
578
|
];
|
|
579
579
|
case "REQUESTING":
|
|
580
|
-
return
|
|
581
|
-
Le[
|
|
582
|
-
Le[
|
|
580
|
+
return $ === "receive/request" ? [Se[ye.Details], Se[ye.Print]] : [
|
|
581
|
+
Le[U.enum.approveRequest],
|
|
582
|
+
Le[U.enum.rejectRequest],
|
|
583
583
|
Se[ye.Details]
|
|
584
584
|
// DefaultRowActions[RowActionEnum.Print]
|
|
585
585
|
];
|
|
@@ -592,22 +592,22 @@ function Qn(C, a, o) {
|
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
function S(w) {
|
|
595
|
-
return Object.values(
|
|
595
|
+
return Object.values(U.enum).includes(w);
|
|
596
596
|
}
|
|
597
597
|
async function x(w, O, r) {
|
|
598
|
-
var i, g,
|
|
598
|
+
var i, g, C, K, R, X;
|
|
599
599
|
const d = vt(O);
|
|
600
600
|
if (w === ye.Print) {
|
|
601
|
-
const
|
|
602
|
-
if (
|
|
603
|
-
const Q = f.locationRestaurantFromCore(
|
|
604
|
-
Q !== null && (
|
|
601
|
+
const z = (r == null ? void 0 : r.toInventoryLocation) ?? f.currentLocation;
|
|
602
|
+
if (z.type === "restaurant") {
|
|
603
|
+
const Q = f.locationRestaurantFromCore(z.doc._id);
|
|
604
|
+
Q !== null && (z.doc = Q);
|
|
605
605
|
}
|
|
606
|
-
((i = r == null ? void 0 : r.netSuite) != null && i.refNo || (g = d.netSuite) != null && g.refNo) && (d.ref = [((
|
|
606
|
+
((i = r == null ? void 0 : r.netSuite) != null && i.refNo || (g = d.netSuite) != null && g.refNo) && (d.ref = [((C = r == null ? void 0 : r.netSuite) == null ? void 0 : C.refNo) || ((K = d.netSuite) == null ? void 0 : K.refNo)].filter((Q) => Q).join(" ")), Zt({
|
|
607
607
|
po: d,
|
|
608
|
-
currentLocation:
|
|
608
|
+
currentLocation: z,
|
|
609
609
|
business: n.currentBusiness.value,
|
|
610
|
-
fulfilling:
|
|
610
|
+
fulfilling: $ === "approval",
|
|
611
611
|
por: r
|
|
612
612
|
});
|
|
613
613
|
return;
|
|
@@ -698,16 +698,16 @@ function Qn(C, a, o) {
|
|
|
698
698
|
accessorKey: "status",
|
|
699
699
|
header: () => t("inventory.transfer.table.status"),
|
|
700
700
|
cell(r) {
|
|
701
|
-
const d = r.getValue(), i = Xe(r.row.original), { partial: g, over:
|
|
701
|
+
const d = r.getValue(), i = Xe(r.row.original), { partial: g, over: C } = nt(i), K = at(d ?? "", g, C);
|
|
702
702
|
let R = t(`inventory.transfer.status.${K}`), X = `${d ?? ""}`.toLocaleLowerCase("en-us");
|
|
703
703
|
K === se.enum.CLOSE && (R = `${t(`inventory.transfer.status.${se.enum.COMPLETE}`)}`), K === "PARTIAL_RECEIVED" && X === se.enum.PROCESSING.toLocaleLowerCase("en-us") && (X = se.enum.RECEIVING.toLocaleLowerCase("en-us"));
|
|
704
|
-
let
|
|
704
|
+
let z = null;
|
|
705
705
|
const Q = o.value.find((ve) => ve.ref === r.row.original._id);
|
|
706
706
|
if (Q != null && Q.milestones && Q.milestones.length > 0) {
|
|
707
707
|
const ve = Q.milestones[Q.milestones.length - 1];
|
|
708
708
|
if (ve.estimatedTime) {
|
|
709
709
|
const ie = new Date(ve.estimatedTime), Ae = ie.getDate().toString().padStart(2, "0");
|
|
710
|
-
|
|
710
|
+
z = `${ie.toLocaleString("en-US", { month: "short" })} ${Ae}`;
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
return L(
|
|
@@ -725,13 +725,13 @@ function Qn(C, a, o) {
|
|
|
725
725
|
class: [
|
|
726
726
|
"fm-status-badge",
|
|
727
727
|
`fm-status-badge-${X}`,
|
|
728
|
-
|
|
728
|
+
C && "fm-status-badge-error"
|
|
729
729
|
].filter(Boolean).join(" ")
|
|
730
730
|
},
|
|
731
731
|
`${R}`
|
|
732
732
|
)
|
|
733
733
|
),
|
|
734
|
-
...
|
|
734
|
+
...z ? [
|
|
735
735
|
L(
|
|
736
736
|
"div",
|
|
737
737
|
{
|
|
@@ -746,7 +746,7 @@ function Qn(C, a, o) {
|
|
|
746
746
|
L(
|
|
747
747
|
"span",
|
|
748
748
|
{ class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" },
|
|
749
|
-
|
|
749
|
+
z
|
|
750
750
|
)
|
|
751
751
|
]
|
|
752
752
|
)
|
|
@@ -771,7 +771,7 @@ function Qn(C, a, o) {
|
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
773
|
];
|
|
774
|
-
if (
|
|
774
|
+
if (h.isEnabled) {
|
|
775
775
|
const r = [
|
|
776
776
|
{
|
|
777
777
|
id: "netsuiteTransferOrder",
|
|
@@ -800,8 +800,8 @@ function Qn(C, a, o) {
|
|
|
800
800
|
},
|
|
801
801
|
header: () => "NetSuite Transaction No.",
|
|
802
802
|
cell(d) {
|
|
803
|
-
var g,
|
|
804
|
-
return ((
|
|
803
|
+
var g, C;
|
|
804
|
+
return ((C = (g = d.row.original.netSuite) == null ? void 0 : g.additionalInfo) == null ? void 0 : C.transactionnumber) ?? "N/A";
|
|
805
805
|
},
|
|
806
806
|
enableSorting: !1,
|
|
807
807
|
size: 200,
|
|
@@ -815,7 +815,7 @@ function Qn(C, a, o) {
|
|
|
815
815
|
}
|
|
816
816
|
return w;
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function T() {
|
|
819
819
|
var O;
|
|
820
820
|
const w = [
|
|
821
821
|
{
|
|
@@ -871,9 +871,9 @@ function Qn(C, a, o) {
|
|
|
871
871
|
label: "N/A",
|
|
872
872
|
compact: !0
|
|
873
873
|
});
|
|
874
|
-
const g = Xe(d.purchaseOrder), { partial:
|
|
875
|
-
let X = t(`inventory.transfer.status.${R}`),
|
|
876
|
-
return R === se.enum.CLOSE && (X = `${t(`inventory.transfer.status.${se.enum.COMPLETE}`)}`), R === "PARTIAL_RECEIVED" &&
|
|
874
|
+
const g = Xe(d.purchaseOrder), { partial: C, over: K } = nt(g), R = at(i ?? "", C, K);
|
|
875
|
+
let X = t(`inventory.transfer.status.${R}`), z = `${i ?? ""}`.toLocaleLowerCase("en-us");
|
|
876
|
+
return R === se.enum.CLOSE && (X = `${t(`inventory.transfer.status.${se.enum.COMPLETE}`)}`), R === "PARTIAL_RECEIVED" && z === se.enum.PROCESSING.toLocaleLowerCase("en-us") && (z = se.enum.RECEIVING.toLocaleLowerCase("en-us")), d.rejectedAt && (X = t("inventory.transfer.status.REJECT"), z = se.enum.REJECT.toLocaleLowerCase("en-us")), L(
|
|
877
877
|
"div",
|
|
878
878
|
{
|
|
879
879
|
class: "flex"
|
|
@@ -883,7 +883,7 @@ function Qn(C, a, o) {
|
|
|
883
883
|
{
|
|
884
884
|
class: [
|
|
885
885
|
"fm-status-badge",
|
|
886
|
-
`fm-status-badge-${
|
|
886
|
+
`fm-status-badge-${z}`,
|
|
887
887
|
K && "fm-status-badge-error"
|
|
888
888
|
].filter(Boolean).join(" ")
|
|
889
889
|
},
|
|
@@ -896,13 +896,13 @@ function Qn(C, a, o) {
|
|
|
896
896
|
{
|
|
897
897
|
id: "action",
|
|
898
898
|
cell(r) {
|
|
899
|
-
const d = r.row.original, g = (d.purchaseOrder ? c(d.purchaseOrder) : []).map((
|
|
900
|
-
|
|
899
|
+
const d = r.row.original, g = (d.purchaseOrder ? c(d.purchaseOrder) : []).map((C) => C.value === ye.Print ? {
|
|
900
|
+
...C,
|
|
901
901
|
translationKey: "inventory.transfer.receiveRequest.details.printDeliveryOrder"
|
|
902
|
-
} :
|
|
902
|
+
} : C);
|
|
903
903
|
return mt(
|
|
904
904
|
g,
|
|
905
|
-
(
|
|
905
|
+
(C) => d.purchaseOrder ? x(C, d.purchaseOrder, d) : void 0
|
|
906
906
|
);
|
|
907
907
|
},
|
|
908
908
|
enableSorting: !1,
|
|
@@ -913,7 +913,7 @@ function Qn(C, a, o) {
|
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
915
|
];
|
|
916
|
-
if (
|
|
916
|
+
if (h.isEnabled) {
|
|
917
917
|
const r = [
|
|
918
918
|
{
|
|
919
919
|
id: "netsuiteTransferOrder",
|
|
@@ -942,8 +942,8 @@ function Qn(C, a, o) {
|
|
|
942
942
|
},
|
|
943
943
|
header: () => "NetSuite Transaction No.",
|
|
944
944
|
cell(d) {
|
|
945
|
-
var g,
|
|
946
|
-
return ((
|
|
945
|
+
var g, C;
|
|
946
|
+
return ((C = (g = d.row.original.netSuite) == null ? void 0 : g.additionalInfo) == null ? void 0 : C.transactionnumber) ?? "N/A";
|
|
947
947
|
},
|
|
948
948
|
enableSorting: !1,
|
|
949
949
|
size: 200,
|
|
@@ -958,7 +958,7 @@ function Qn(C, a, o) {
|
|
|
958
958
|
return w;
|
|
959
959
|
}
|
|
960
960
|
return {
|
|
961
|
-
columnDefs: Y(() =>
|
|
961
|
+
columnDefs: Y(() => $ === "receive/request" ? u() : T())
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
964
|
const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, ts = { class: "flex flex-col gap-8" }, ss = { class: "flex w-full justify-end gap-16" }, rs = /* @__PURE__ */ $e({
|
|
@@ -968,12 +968,12 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
968
968
|
confirm: { type: Function }
|
|
969
969
|
},
|
|
970
970
|
emits: ["update:show"],
|
|
971
|
-
setup(
|
|
972
|
-
const o =
|
|
971
|
+
setup($, { emit: a }) {
|
|
972
|
+
const o = $, f = Rt({
|
|
973
973
|
id: "",
|
|
974
974
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
975
975
|
items: []
|
|
976
|
-
}),
|
|
976
|
+
}), h = J(), n = a;
|
|
977
977
|
yt(() => {
|
|
978
978
|
o.purchaseOrder && (f.items = o.purchaseOrder.items.map((t) => ({
|
|
979
979
|
id: t.id,
|
|
@@ -984,10 +984,10 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
984
984
|
});
|
|
985
985
|
const A = Y(() => f.items.length <= 10);
|
|
986
986
|
return (t, c) => {
|
|
987
|
-
const S =
|
|
987
|
+
const S = G("FmTable"), x = G("FmButton"), u = G("FmForm");
|
|
988
988
|
return l(), re(u, {
|
|
989
989
|
ref_key: "formRef",
|
|
990
|
-
ref:
|
|
990
|
+
ref: h,
|
|
991
991
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
992
992
|
onValidationFailed: console.log,
|
|
993
993
|
onValidationSuccess: c[1] || (c[1] = () => o.confirm(f))
|
|
@@ -1000,8 +1000,8 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1000
1000
|
"column-defs": [
|
|
1001
1001
|
{
|
|
1002
1002
|
header: "Code",
|
|
1003
|
-
cell: (
|
|
1004
|
-
const N = o.purchaseOrder.items.find((w) => w.id ===
|
|
1003
|
+
cell: (T) => {
|
|
1004
|
+
const N = o.purchaseOrder.items.find((w) => w.id === T.row.original.id || w.sku._id === T.row.original.sku._id);
|
|
1005
1005
|
return L(
|
|
1006
1006
|
v(Je).FmTooltip,
|
|
1007
1007
|
{
|
|
@@ -1022,8 +1022,8 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1022
1022
|
},
|
|
1023
1023
|
{
|
|
1024
1024
|
header: "Name",
|
|
1025
|
-
cell: (
|
|
1026
|
-
const N = o.purchaseOrder.items.find((w) => w.id ===
|
|
1025
|
+
cell: (T) => {
|
|
1026
|
+
const N = o.purchaseOrder.items.find((w) => w.id === T.row.original.id || w.sku._id === T.row.original.sku._id);
|
|
1027
1027
|
return L(
|
|
1028
1028
|
v(Je).FmTooltip,
|
|
1029
1029
|
{
|
|
@@ -1044,8 +1044,8 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1044
1044
|
},
|
|
1045
1045
|
{
|
|
1046
1046
|
header: "Amount",
|
|
1047
|
-
cell: (
|
|
1048
|
-
const N =
|
|
1047
|
+
cell: (T) => {
|
|
1048
|
+
const N = T.row.original, w = o.purchaseOrder.items.find((r) => r.id === N.id || r.sku._id === N.sku._id), O = N.amount ?? {
|
|
1049
1049
|
amount: 1,
|
|
1050
1050
|
precision: 0
|
|
1051
1051
|
};
|
|
@@ -1067,9 +1067,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1067
1067
|
disableUnit: !0,
|
|
1068
1068
|
rules: [
|
|
1069
1069
|
v(zt)(
|
|
1070
|
-
+v(
|
|
1070
|
+
+v(be)({ amount: 0, precision: 0 })
|
|
1071
1071
|
),
|
|
1072
|
-
v(Kt)(+v(
|
|
1072
|
+
v(Kt)(+v(be)(w.quantity))
|
|
1073
1073
|
],
|
|
1074
1074
|
applyDefaultRules: !0
|
|
1075
1075
|
});
|
|
@@ -1174,17 +1174,17 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1174
1174
|
isTransferBetweenOutlets: { type: Boolean },
|
|
1175
1175
|
scope: {}
|
|
1176
1176
|
},
|
|
1177
|
-
setup(
|
|
1178
|
-
const a =
|
|
1177
|
+
setup($) {
|
|
1178
|
+
const a = $, o = et(), f = Be(), h = tt(), n = J(!1);
|
|
1179
1179
|
Y(() => {
|
|
1180
|
-
var x, u,
|
|
1180
|
+
var x, u, T, N;
|
|
1181
1181
|
let t = !0;
|
|
1182
1182
|
o.isEnabled || (t = !1);
|
|
1183
1183
|
const c = a.purchaseOrder, S = a.poRequest;
|
|
1184
|
-
return c && ((x = c == null ? void 0 : c.supplier) != null && x.internal ? (!S && c.status == se.enum.DRAFT && (t = !1), S && !((u = S == null ? void 0 : S.netSuite) != null && u.id) && (t = !1), a.isTransferBetweenOutlets && (t = !1)) : ((c == null ? void 0 : c.status) !== se.enum.REQUESTING && c.supplier.internal && (t = !1), !S && !((
|
|
1184
|
+
return c && ((x = c == null ? void 0 : c.supplier) != null && x.internal ? (!S && c.status == se.enum.DRAFT && (t = !1), S && !((u = S == null ? void 0 : S.netSuite) != null && u.id) && (t = !1), a.isTransferBetweenOutlets && (t = !1)) : ((c == null ? void 0 : c.status) !== se.enum.REQUESTING && c.supplier.internal && (t = !1), !S && !((T = c == null ? void 0 : c.netSuite) != null && T.id) && (t = !1), !S && ((N = c == null ? void 0 : c.netSuite) != null && N.id) && (c == null ? void 0 : c.status) == se.enum.REQUESTING && (t = !1))), t;
|
|
1185
1185
|
});
|
|
1186
1186
|
async function A() {
|
|
1187
|
-
n.value ||
|
|
1187
|
+
n.value || h.open({
|
|
1188
1188
|
title: "Sync with NetSuite",
|
|
1189
1189
|
contentComponent: L("div", [
|
|
1190
1190
|
L("p", "Are you sure you want to sync now?"),
|
|
@@ -1213,7 +1213,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1213
1213
|
title: "Sync with NetSuite",
|
|
1214
1214
|
message: "Requested to sync with NetSuite. Please wait a moment.",
|
|
1215
1215
|
type: "success"
|
|
1216
|
-
}), await new Promise((
|
|
1216
|
+
}), await new Promise((T) => setTimeout(T, 5e3)), n.value = !1;
|
|
1217
1217
|
} catch {
|
|
1218
1218
|
f.open({
|
|
1219
1219
|
title: "Error",
|
|
@@ -1224,8 +1224,8 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1224
1224
|
});
|
|
1225
1225
|
}
|
|
1226
1226
|
return (t, c) => {
|
|
1227
|
-
const S =
|
|
1228
|
-
return l(),
|
|
1227
|
+
const S = G("FmButton");
|
|
1228
|
+
return l(), b("div", os, [
|
|
1229
1229
|
D(S, {
|
|
1230
1230
|
"prepend-icon": "sync",
|
|
1231
1231
|
variant: "secondary",
|
|
@@ -1248,7 +1248,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1248
1248
|
}, us = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ds = { class: "fm-typo-en-body-lg-600" }, ms = { key: 0 }, ps = { key: 1 }, fs = {
|
|
1249
1249
|
key: 1,
|
|
1250
1250
|
class: "flex flex-col gap-4"
|
|
1251
|
-
}, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vs = { class: "fm-typo-en-body-lg-600" },
|
|
1251
|
+
}, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vs = { class: "fm-typo-en-body-lg-600" }, hs = { key: 0 }, bs = { key: 1 }, gs = {
|
|
1252
1252
|
key: 2,
|
|
1253
1253
|
class: "flex flex-col gap-4"
|
|
1254
1254
|
}, _s = { class: "fm-typo-en-body-lg-600" }, Ss = {
|
|
@@ -1264,60 +1264,60 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1264
1264
|
isTransferBetweenOutlets: { type: Boolean },
|
|
1265
1265
|
scope: {}
|
|
1266
1266
|
},
|
|
1267
|
-
setup(
|
|
1268
|
-
const a =
|
|
1267
|
+
setup($) {
|
|
1268
|
+
const a = $, o = et(), f = je(), h = J(a.poRequest);
|
|
1269
1269
|
yt(async () => {
|
|
1270
1270
|
var c;
|
|
1271
1271
|
if (!a.poRequest && ((c = a.purchaseOrder) != null && c._id)) {
|
|
1272
1272
|
const S = await f.getLatestPurchaseOrderRequest(a.purchaseOrder._id);
|
|
1273
|
-
|
|
1273
|
+
h.value = S;
|
|
1274
1274
|
}
|
|
1275
1275
|
});
|
|
1276
1276
|
const n = Y(
|
|
1277
1277
|
() => {
|
|
1278
|
-
var c, S, x, u,
|
|
1278
|
+
var c, S, x, u, T, N;
|
|
1279
1279
|
return o.getSubsidiaryFullName(
|
|
1280
|
-
((x = (S = (c = a.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : S.subsidiary) == null ? void 0 : x.id) || ((N = (
|
|
1280
|
+
((x = (S = (c = a.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : S.subsidiary) == null ? void 0 : x.id) || ((N = (T = (u = a.poRequest) == null ? void 0 : u.netSuite) == null ? void 0 : T.subsidiary) == null ? void 0 : N.id)
|
|
1281
1281
|
).fullName;
|
|
1282
1282
|
}
|
|
1283
1283
|
), A = Y(() => {
|
|
1284
|
-
var c, S, x, u,
|
|
1285
|
-
return (x = (S = (c = a.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : S.additionalInfo) != null && x.transactionnumber ? (N = (
|
|
1284
|
+
var c, S, x, u, T, N, w, O, r, d, i, g;
|
|
1285
|
+
return (x = (S = (c = a.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : S.additionalInfo) != null && x.transactionnumber ? (N = (T = (u = a.purchaseOrder) == null ? void 0 : u.netSuite) == null ? void 0 : T.additionalInfo) == null ? void 0 : N.transactionnumber : (r = (O = (w = h.value) == null ? void 0 : w.netSuite) == null ? void 0 : O.additionalInfo) != null && r.transactionnumber ? (g = (i = (d = h.value) == null ? void 0 : d.netSuite) == null ? void 0 : i.additionalInfo) == null ? void 0 : g.transactionnumber : null;
|
|
1286
1286
|
}), t = Y(() => {
|
|
1287
|
-
var c, S, x, u,
|
|
1288
|
-
return (S = (c = a.purchaseOrder) == null ? void 0 : c.deliveryFullfillment) != null && S.length && ((u = (x = a.purchaseOrder) == null ? void 0 : x.deliveryFullfillment) == null ? void 0 : u.length) > 0 ? (N = (
|
|
1287
|
+
var c, S, x, u, T, N;
|
|
1288
|
+
return (S = (c = a.purchaseOrder) == null ? void 0 : c.deliveryFullfillment) != null && S.length && ((u = (x = a.purchaseOrder) == null ? void 0 : x.deliveryFullfillment) == null ? void 0 : u.length) > 0 ? (N = (T = a.purchaseOrder) == null ? void 0 : T.deliveryFullfillment) == null ? void 0 : N.map((w) => {
|
|
1289
1289
|
var O;
|
|
1290
1290
|
return (O = w.netSuite) == null ? void 0 : O.refNo;
|
|
1291
1291
|
}).join(", ") : "N/A";
|
|
1292
1292
|
});
|
|
1293
1293
|
return (c, S) => {
|
|
1294
|
-
var x, u,
|
|
1295
|
-
return v(o).isEnabled ? (l(),
|
|
1294
|
+
var x, u, T, N, w, O, r, d, i, g, C, K, R, X, z, Q;
|
|
1295
|
+
return v(o).isEnabled ? (l(), b("div", as, [
|
|
1296
1296
|
e("div", ls, [
|
|
1297
1297
|
S[0] || (S[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1298
1298
|
e("div", is, y(n.value || "N/A"), 1)
|
|
1299
1299
|
]),
|
|
1300
|
-
!c.isTransferBetweenOutlets && c.scope === v(lt).RECEIVE_REQUEST ? (l(),
|
|
1301
|
-
e("div", us, " NetSuite " + y((u = (x = c.purchaseOrder) == null ? void 0 : x.netSuite) != null && u.recordType ? v(
|
|
1300
|
+
!c.isTransferBetweenOutlets && c.scope === v(lt).RECEIVE_REQUEST ? (l(), b("div", cs, [
|
|
1301
|
+
e("div", us, " NetSuite " + y((u = (x = c.purchaseOrder) == null ? void 0 : x.netSuite) != null && u.recordType ? v(ht)((N = (T = c.purchaseOrder) == null ? void 0 : T.netSuite) == null ? void 0 : N.recordType) : c.transferType === v(Ge).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1302
1302
|
e("div", ds, [
|
|
1303
|
-
(O = (w = c.purchaseOrder) == null ? void 0 : w.netSuite) != null && O.id ? (l(),
|
|
1303
|
+
(O = (w = c.purchaseOrder) == null ? void 0 : w.netSuite) != null && O.id ? (l(), b("span", ms, y((d = (r = c.purchaseOrder) == null ? void 0 : r.netSuite) == null ? void 0 : d.refNo) + " (" + y((g = (i = c.purchaseOrder) == null ? void 0 : i.netSuite) == null ? void 0 : g.id) + ") ", 1)) : (l(), b("span", ps, "N/A"))
|
|
1304
1304
|
])
|
|
1305
|
-
])) :
|
|
1306
|
-
!c.isTransferBetweenOutlets &&
|
|
1305
|
+
])) : B("", !0),
|
|
1306
|
+
!c.isTransferBetweenOutlets && h.value || c.scope === v(lt).APPROVAL ? (l(), b("div", fs, [
|
|
1307
1307
|
e("div", ys, " (Request) NetSuite " + y(c.transferType === v(Ge).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1308
1308
|
e("div", vs, [
|
|
1309
|
-
(K = (
|
|
1309
|
+
(K = (C = h.value) == null ? void 0 : C.netSuite) != null && K.id ? (l(), b("span", hs, y((X = (R = h.value) == null ? void 0 : R.netSuite) == null ? void 0 : X.refNo) + " (" + y((Q = (z = h.value) == null ? void 0 : z.netSuite) == null ? void 0 : Q.id) + ") ", 1)) : (l(), b("span", bs, "N/A"))
|
|
1310
1310
|
])
|
|
1311
|
-
])) :
|
|
1312
|
-
A.value ? (l(),
|
|
1311
|
+
])) : B("", !0),
|
|
1312
|
+
A.value ? (l(), b("div", gs, [
|
|
1313
1313
|
S[1] || (S[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1314
1314
|
e("div", _s, y(A.value), 1)
|
|
1315
|
-
])) :
|
|
1316
|
-
v(o).isEnabled && c.transferType === v(Ge).enum.transfer && !c.isTransferBetweenOutlets ? (l(),
|
|
1315
|
+
])) : B("", !0),
|
|
1316
|
+
v(o).isEnabled && c.transferType === v(Ge).enum.transfer && !c.isTransferBetweenOutlets ? (l(), b("div", Ss, [
|
|
1317
1317
|
S[2] || (S[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1318
1318
|
e("div", xs, y(t.value), 1)
|
|
1319
|
-
])) :
|
|
1320
|
-
])) :
|
|
1319
|
+
])) : B("", !0)
|
|
1320
|
+
])) : B("", !0);
|
|
1321
1321
|
};
|
|
1322
1322
|
}
|
|
1323
1323
|
}), ws = { class: "flex flex-row-reverse" }, $s = /* @__PURE__ */ $e({
|
|
@@ -1326,11 +1326,11 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1326
1326
|
netsuiteId: {},
|
|
1327
1327
|
purchaseOrderId: {}
|
|
1328
1328
|
},
|
|
1329
|
-
setup(
|
|
1329
|
+
setup($) {
|
|
1330
1330
|
const a = Be(), o = dt();
|
|
1331
|
-
async function f(
|
|
1331
|
+
async function f(h, n) {
|
|
1332
1332
|
const A = [];
|
|
1333
|
-
if (
|
|
1333
|
+
if (h && A.push(`body.message:*${h}*`), n) {
|
|
1334
1334
|
const x = n.replace(/:/g, "\\:");
|
|
1335
1335
|
A.push(`${x}`);
|
|
1336
1336
|
}
|
|
@@ -1350,14 +1350,14 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1350
1350
|
800
|
|
1351
1351
|
), await new Promise((x) => setTimeout(x, 800)), window.open(S, "_blank");
|
|
1352
1352
|
}
|
|
1353
|
-
return (
|
|
1354
|
-
const A =
|
|
1355
|
-
return l(),
|
|
1353
|
+
return (h, n) => {
|
|
1354
|
+
const A = G("FmButton");
|
|
1355
|
+
return l(), b("div", ws, [
|
|
1356
1356
|
D(A, {
|
|
1357
1357
|
"prepend-icon": "history",
|
|
1358
1358
|
variant: "secondary",
|
|
1359
1359
|
label: "Logs",
|
|
1360
|
-
onClick: n[0] || (n[0] = (t) => f(
|
|
1360
|
+
onClick: n[0] || (n[0] = (t) => f(h.netsuiteId, h.purchaseOrderId)),
|
|
1361
1361
|
"text-color": "primary",
|
|
1362
1362
|
"bg-color": "transparent",
|
|
1363
1363
|
"border-color": "primary"
|
|
@@ -1380,15 +1380,15 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1380
1380
|
netsuiteId: {},
|
|
1381
1381
|
purchaseOrderId: {}
|
|
1382
1382
|
},
|
|
1383
|
-
setup(
|
|
1384
|
-
const a =
|
|
1383
|
+
setup($) {
|
|
1384
|
+
const a = $, o = dt(), f = J(!1), h = De(), n = J(!0), A = J(!1), t = J(!1), c = J(!1), S = J(null), x = J([]);
|
|
1385
1385
|
async function u() {
|
|
1386
1386
|
if (!S.value) {
|
|
1387
1387
|
f.value = !0;
|
|
1388
1388
|
try {
|
|
1389
1389
|
n.value = !0;
|
|
1390
1390
|
const O = await o.getMoreInfo(
|
|
1391
|
-
|
|
1391
|
+
h.currentLocation.dbName,
|
|
1392
1392
|
a.purchaseOrderId
|
|
1393
1393
|
);
|
|
1394
1394
|
S.value = O, A.value = !1;
|
|
@@ -1397,10 +1397,10 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1397
1397
|
} finally {
|
|
1398
1398
|
n.value = !1;
|
|
1399
1399
|
}
|
|
1400
|
-
await
|
|
1400
|
+
await T();
|
|
1401
1401
|
}
|
|
1402
1402
|
}
|
|
1403
|
-
async function
|
|
1403
|
+
async function T() {
|
|
1404
1404
|
if (!(x.value.length > 0))
|
|
1405
1405
|
try {
|
|
1406
1406
|
t.value = !0;
|
|
@@ -1436,8 +1436,8 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1436
1436
|
});
|
|
1437
1437
|
}
|
|
1438
1438
|
return (O, r) => {
|
|
1439
|
-
const d =
|
|
1440
|
-
return l(),
|
|
1439
|
+
const d = G("FmButton"), i = G("FmLabel"), g = G("FmCircularProgress"), C = G("FmIcon"), K = G("FmDialog");
|
|
1440
|
+
return l(), b("div", Cs, [
|
|
1441
1441
|
D(K, {
|
|
1442
1442
|
modelValue: f.value,
|
|
1443
1443
|
"onUpdate:modelValue": r[2] || (r[2] = (R) => f.value = R),
|
|
@@ -1459,11 +1459,11 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1459
1459
|
e("div", null, "NetSuite latest info", -1)
|
|
1460
1460
|
])),
|
|
1461
1461
|
default: ee(() => [
|
|
1462
|
-
n.value ? (l(),
|
|
1463
|
-
A.value ? (l(),
|
|
1462
|
+
n.value ? (l(), b("div", Rs, "Loading...")) : (l(), b("div", ks, [
|
|
1463
|
+
A.value ? (l(), b("p", Hs, "Something went wrong.")) : (l(), b(de, { key: 0 }, [
|
|
1464
1464
|
e("div", Ds, [
|
|
1465
1465
|
r[4] || (r[4] = e("h3", { class: "fm-typo-en-body-lg-600 mb-4" }, "NetSuite Order Details", -1)),
|
|
1466
|
-
(l(!0),
|
|
1466
|
+
(l(!0), b(de, null, xe(S.value, (R, X) => (l(), b("div", {
|
|
1467
1467
|
key: X,
|
|
1468
1468
|
class: "mb-2"
|
|
1469
1469
|
}, [
|
|
@@ -1472,18 +1472,18 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1472
1472
|
label: v(it)(X)
|
|
1473
1473
|
}, null, 8, ["label"]),
|
|
1474
1474
|
e("div", As, [
|
|
1475
|
-
Array.isArray(R) ? (l(),
|
|
1475
|
+
Array.isArray(R) ? (l(), b("span", Ns, y(R.length > 0 ? R.join(", ") : "N/A"), 1)) : (l(), b("span", Fs, y(R), 1))
|
|
1476
1476
|
])
|
|
1477
1477
|
])
|
|
1478
1478
|
]))), 128))
|
|
1479
1479
|
]),
|
|
1480
|
-
t.value ? (l(),
|
|
1480
|
+
t.value ? (l(), b("div", Ts, [
|
|
1481
1481
|
r[5] || (r[5] = e("span", null, "Change Log Loading...", -1)),
|
|
1482
1482
|
D(g, { size: "md" })
|
|
1483
|
-
])) :
|
|
1484
|
-
!t.value && x.value.length > 0 ? (l(),
|
|
1483
|
+
])) : B("", !0),
|
|
1484
|
+
!t.value && x.value.length > 0 ? (l(), b("div", Is, [
|
|
1485
1485
|
e("h3", Ps, [
|
|
1486
|
-
D(
|
|
1486
|
+
D(C, {
|
|
1487
1487
|
name: "error",
|
|
1488
1488
|
color: "#ff9500",
|
|
1489
1489
|
size: "sm"
|
|
@@ -1509,7 +1509,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1509
1509
|
])
|
|
1510
1510
|
], -1)),
|
|
1511
1511
|
e("tbody", null, [
|
|
1512
|
-
(l(!0),
|
|
1512
|
+
(l(!0), b(de, null, xe(x.value, (R, X) => (l(), b("tr", {
|
|
1513
1513
|
key: X,
|
|
1514
1514
|
class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
|
|
1515
1515
|
}, [
|
|
@@ -1528,7 +1528,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1528
1528
|
])
|
|
1529
1529
|
])
|
|
1530
1530
|
])
|
|
1531
|
-
])) : (l(),
|
|
1531
|
+
])) : (l(), b("div", Gs, r[8] || (r[8] = [
|
|
1532
1532
|
e("p", null, "No change logs available.", -1)
|
|
1533
1533
|
])))
|
|
1534
1534
|
], 64))
|
|
@@ -1560,12 +1560,12 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1560
1560
|
transferToDbName: {},
|
|
1561
1561
|
scope: {}
|
|
1562
1562
|
},
|
|
1563
|
-
setup(
|
|
1564
|
-
const a =
|
|
1565
|
-
return (
|
|
1563
|
+
setup($) {
|
|
1564
|
+
const a = $, o = Ht(), f = Y(() => o.isNetSuiteEnabled);
|
|
1565
|
+
return (h, n) => {
|
|
1566
1566
|
var t, c;
|
|
1567
|
-
const A =
|
|
1568
|
-
return f.value ? (l(),
|
|
1567
|
+
const A = G("FmMenuDivider");
|
|
1568
|
+
return f.value ? (l(), b("div", Ys, [
|
|
1569
1569
|
e("div", Qs, [
|
|
1570
1570
|
n[0] || (n[0] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1571
1571
|
e("div", Js, [
|
|
@@ -1575,44 +1575,44 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1575
1575
|
var S, x, u;
|
|
1576
1576
|
return [
|
|
1577
1577
|
D(Ws, {
|
|
1578
|
-
"netsuite-id": (x = (S =
|
|
1579
|
-
"purchase-order-id": (u =
|
|
1578
|
+
"netsuite-id": (x = (S = h.purchaseOrder) == null ? void 0 : S.netSuite) == null ? void 0 : x.id,
|
|
1579
|
+
"purchase-order-id": (u = h.purchaseOrder) == null ? void 0 : u._id
|
|
1580
1580
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
1581
1581
|
];
|
|
1582
1582
|
}),
|
|
1583
1583
|
_: 1
|
|
1584
|
-
})) :
|
|
1584
|
+
})) : B("", !0),
|
|
1585
1585
|
D(Ve, null, {
|
|
1586
1586
|
default: ee(() => {
|
|
1587
1587
|
var S, x, u;
|
|
1588
1588
|
return [
|
|
1589
1589
|
D($s, {
|
|
1590
|
-
"netsuite-id": (x = (S =
|
|
1591
|
-
"purchase-order-id": (u =
|
|
1590
|
+
"netsuite-id": (x = (S = h.purchaseOrder) == null ? void 0 : S.netSuite) == null ? void 0 : x.id,
|
|
1591
|
+
"purchase-order-id": (u = h.purchaseOrder) == null ? void 0 : u._id
|
|
1592
1592
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
1593
1593
|
];
|
|
1594
1594
|
}),
|
|
1595
1595
|
_: 1
|
|
1596
1596
|
}),
|
|
1597
1597
|
D(ns, {
|
|
1598
|
-
"po-request":
|
|
1599
|
-
"purchase-order":
|
|
1598
|
+
"po-request": h.poRequest,
|
|
1599
|
+
"purchase-order": h.purchaseOrder,
|
|
1600
1600
|
"is-transfer-between-outlets": !f.value,
|
|
1601
|
-
scope:
|
|
1601
|
+
scope: h.scope
|
|
1602
1602
|
}, null, 8, ["po-request", "purchase-order", "is-transfer-between-outlets", "scope"])
|
|
1603
1603
|
])
|
|
1604
1604
|
])
|
|
1605
1605
|
]),
|
|
1606
1606
|
D(A),
|
|
1607
1607
|
D(Os, {
|
|
1608
|
-
"po-request":
|
|
1609
|
-
"purchase-order":
|
|
1610
|
-
"transfer-type":
|
|
1611
|
-
"transfer-to-db-name":
|
|
1608
|
+
"po-request": h.poRequest,
|
|
1609
|
+
"purchase-order": h.purchaseOrder,
|
|
1610
|
+
"transfer-type": h.transferType,
|
|
1611
|
+
"transfer-to-db-name": h.transferToDbName,
|
|
1612
1612
|
"is-transfer-between-outlets": !f.value,
|
|
1613
|
-
scope:
|
|
1613
|
+
scope: h.scope
|
|
1614
1614
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1615
|
-
])) :
|
|
1615
|
+
])) : B("", !0);
|
|
1616
1616
|
};
|
|
1617
1617
|
}
|
|
1618
1618
|
}), er = { class: "flex flex-col gap-3" }, tr = { class: "flex flex-col gap-4" }, sr = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, rr = { class: "flex flex-col gap-4" }, or = { class: "flex justify-between items-center py-1 gap-4" }, nr = { class: "flex flex-col" }, ar = { class: "fm-typo-en-body-lg-600" }, lr = { class: "fm-typo-en-body-md-400" }, ir = { class: "flex flex-col gap-2 items-end" }, cr = { class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ur = {
|
|
@@ -1624,27 +1624,27 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1624
1624
|
}, mr = { class: "flex flex-col gap-4" }, pr = { class: "flex flex-col gap-4" }, fr = { class: "flex flex-col gap-4" }, yr = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, vr = {
|
|
1625
1625
|
key: 0,
|
|
1626
1626
|
class: "flex flex-col gap-4"
|
|
1627
|
-
},
|
|
1627
|
+
}, hr = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, br = /* @__PURE__ */ $e({
|
|
1628
1628
|
__name: "EditForm",
|
|
1629
1629
|
props: {
|
|
1630
1630
|
purchaseOrder: {},
|
|
1631
1631
|
deliveryOrder: {}
|
|
1632
1632
|
},
|
|
1633
1633
|
emits: ["submitted"],
|
|
1634
|
-
setup(
|
|
1634
|
+
setup($, { emit: a }) {
|
|
1635
1635
|
Yt();
|
|
1636
|
-
const o = Ue(), f = Be(),
|
|
1636
|
+
const o = Ue(), f = Be(), h = J(!1), n = $, A = a, t = St("deliveryOrder"), c = je(), S = Y(
|
|
1637
1637
|
() => {
|
|
1638
1638
|
var d;
|
|
1639
1639
|
return ((d = n.purchaseOrder.deliveryFullfillment) == null ? void 0 : d.findIndex(
|
|
1640
1640
|
(i) => n.deliveryOrder.fullfillmentId && i.id === n.deliveryOrder.fullfillmentId
|
|
1641
1641
|
)) ?? -1;
|
|
1642
1642
|
}
|
|
1643
|
-
), x = o.enablePurchaseOrderReceiveWithCustomCost, u = o.enablePortalDeliveryOrderWrite,
|
|
1643
|
+
), x = o.enablePurchaseOrderReceiveWithCustomCost, u = o.enablePortalDeliveryOrderWrite, T = J({}), N = Y(() => n.purchaseOrder.items.map((d, i) => Y({
|
|
1644
1644
|
get: () => {
|
|
1645
|
-
var
|
|
1646
|
-
const g = (
|
|
1647
|
-
return g ? +
|
|
1645
|
+
var C;
|
|
1646
|
+
const g = (C = t.received[i]) == null ? void 0 : C.cost;
|
|
1647
|
+
return g ? +be(g) : 0;
|
|
1648
1648
|
},
|
|
1649
1649
|
set: (g) => {
|
|
1650
1650
|
t.received[i].cost = {
|
|
@@ -1654,17 +1654,17 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1654
1654
|
}
|
|
1655
1655
|
}))), w = Y(() => n.deliveryOrder.received.map((d, i) => Y({
|
|
1656
1656
|
get: () => {
|
|
1657
|
-
var
|
|
1658
|
-
const g = (
|
|
1659
|
-
return g ? +
|
|
1657
|
+
var C;
|
|
1658
|
+
const g = (C = t.received[i]) == null ? void 0 : C.amount;
|
|
1659
|
+
return g ? +be(g) : 0;
|
|
1660
1660
|
},
|
|
1661
1661
|
set: (g) => {
|
|
1662
1662
|
t.received[i].amount = Qe(g, 2);
|
|
1663
1663
|
}
|
|
1664
1664
|
})));
|
|
1665
1665
|
function O(d) {
|
|
1666
|
-
const i = !
|
|
1667
|
-
if (
|
|
1666
|
+
const i = !T.value[d];
|
|
1667
|
+
if (T.value[d] = i, i) {
|
|
1668
1668
|
const g = n.deliveryOrder.received[d];
|
|
1669
1669
|
g.cost ? t.received[d].cost = {
|
|
1670
1670
|
currency: g.cost.currency,
|
|
@@ -1694,14 +1694,14 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1694
1694
|
type: "success"
|
|
1695
1695
|
},
|
|
1696
1696
|
1e4
|
|
1697
|
-
),
|
|
1697
|
+
), h.value = !1, A("submitted");
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
1700
|
return (d, i) => {
|
|
1701
|
-
const g =
|
|
1701
|
+
const g = G("FmButton"), C = G("FmStepperField"), K = G("FmSwitch"), R = G("FmTextField"), X = G("FmDialog");
|
|
1702
1702
|
return l(), re(X, {
|
|
1703
|
-
modelValue:
|
|
1704
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1703
|
+
modelValue: h.value,
|
|
1704
|
+
"onUpdate:modelValue": i[1] || (i[1] = (z) => h.value = z),
|
|
1705
1705
|
overlay: !0
|
|
1706
1706
|
}, {
|
|
1707
1707
|
"dialog-button": ee(() => [
|
|
@@ -1711,7 +1711,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1711
1711
|
label: "Edit",
|
|
1712
1712
|
size: "md",
|
|
1713
1713
|
"prepend-icon": "edit"
|
|
1714
|
-
})) :
|
|
1714
|
+
})) : B("", !0)
|
|
1715
1715
|
]),
|
|
1716
1716
|
"dialog-header": ee(() => [
|
|
1717
1717
|
e("div", null, "Received on " + y(v(He)(n.deliveryOrder.createdAt)), 1)
|
|
@@ -1734,32 +1734,32 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1734
1734
|
]),
|
|
1735
1735
|
e("div", rr, [
|
|
1736
1736
|
i[4] || (i[4] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received items", -1)),
|
|
1737
|
-
(l(!0),
|
|
1737
|
+
(l(!0), b(de, null, xe(n.deliveryOrder.received, (z, Q) => {
|
|
1738
1738
|
var ve;
|
|
1739
|
-
return l(),
|
|
1739
|
+
return l(), b("div", { key: Q }, [
|
|
1740
1740
|
e("div", or, [
|
|
1741
1741
|
e("div", nr, [
|
|
1742
|
-
e("span", ar, y(
|
|
1743
|
-
e("span", lr, y(
|
|
1742
|
+
e("span", ar, y(z.sku.name), 1),
|
|
1743
|
+
e("span", lr, y(z.sku.code), 1)
|
|
1744
1744
|
]),
|
|
1745
1745
|
e("div", ir, [
|
|
1746
|
-
D(
|
|
1746
|
+
D(C, {
|
|
1747
1747
|
label: "Receive Quantity",
|
|
1748
1748
|
modelValue: w.value[Q].value,
|
|
1749
1749
|
"onUpdate:modelValue": (ie) => w.value[Q].value = ie,
|
|
1750
1750
|
min: 0,
|
|
1751
|
-
"append-text": ((ve =
|
|
1751
|
+
"append-text": ((ve = z.measurement) == null ? void 0 : ve.abbrev) ?? z.sku.unit.abbrev
|
|
1752
1752
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"]),
|
|
1753
|
-
e("div", cr, y(`${
|
|
1754
|
-
v(x) ? (l(),
|
|
1753
|
+
e("div", cr, y(`${z.cost ? `${v(Ke)(z.cost)}` : ""}`), 1),
|
|
1754
|
+
v(x) ? (l(), b("div", ur, [
|
|
1755
1755
|
D(K, {
|
|
1756
|
-
"model-value":
|
|
1756
|
+
"model-value": T.value[Q],
|
|
1757
1757
|
"onUpdate:modelValue": (ie) => O(Q),
|
|
1758
1758
|
size: "sm"
|
|
1759
1759
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1760
1760
|
i[3] || (i[3] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
1761
|
-
])) :
|
|
1762
|
-
v(x) &&
|
|
1761
|
+
])) : B("", !0),
|
|
1762
|
+
v(x) && T.value[Q] ? (l(), re(C, {
|
|
1763
1763
|
key: 1,
|
|
1764
1764
|
modelValue: N.value[Q].value,
|
|
1765
1765
|
"onUpdate:modelValue": (ie) => N.value[Q].value = ie,
|
|
@@ -1769,10 +1769,10 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1769
1769
|
placeholder: "0.0000",
|
|
1770
1770
|
size: "sm",
|
|
1771
1771
|
"append-text": v(Ce)()
|
|
1772
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) :
|
|
1772
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : B("", !0)
|
|
1773
1773
|
])
|
|
1774
1774
|
]),
|
|
1775
|
-
Q < n.purchaseOrder.items.length - 1 ? (l(),
|
|
1775
|
+
Q < n.purchaseOrder.items.length - 1 ? (l(), b("div", dr)) : B("", !0)
|
|
1776
1776
|
]);
|
|
1777
1777
|
}), 128))
|
|
1778
1778
|
]),
|
|
@@ -1781,7 +1781,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1781
1781
|
e("div", pr, [
|
|
1782
1782
|
D(R, {
|
|
1783
1783
|
modelValue: v(t).deliveryOrderNumber,
|
|
1784
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1784
|
+
"onUpdate:modelValue": i[0] || (i[0] = (z) => v(t).deliveryOrderNumber = z),
|
|
1785
1785
|
size: "md",
|
|
1786
1786
|
placeholder: n.deliveryOrder.deliveryOrderNumber
|
|
1787
1787
|
}, null, 8, ["modelValue", "placeholder"])
|
|
@@ -1791,10 +1791,10 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1791
1791
|
i[6] || (i[6] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
|
|
1792
1792
|
e("div", yr, y(n.deliveryOrder.remark || "N/A"), 1)
|
|
1793
1793
|
]),
|
|
1794
|
-
S.value >= 0 ? (l(),
|
|
1794
|
+
S.value >= 0 ? (l(), b("div", vr, [
|
|
1795
1795
|
i[7] || (i[7] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fulfilment's sequence ", -1)),
|
|
1796
|
-
e("div",
|
|
1797
|
-
])) :
|
|
1796
|
+
e("div", hr, y(S.value + 1), 1)
|
|
1797
|
+
])) : B("", !0)
|
|
1798
1798
|
])
|
|
1799
1799
|
])
|
|
1800
1800
|
]),
|
|
@@ -1824,9 +1824,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1824
1824
|
receivedInfoMap: {}
|
|
1825
1825
|
},
|
|
1826
1826
|
emits: ["submitted"],
|
|
1827
|
-
setup(
|
|
1828
|
-
var
|
|
1829
|
-
const { t: o } = ut(), f = J(!1),
|
|
1827
|
+
setup($, { emit: a }) {
|
|
1828
|
+
var j, V, oe;
|
|
1829
|
+
const { t: o } = ut(), f = J(!1), h = ct(), n = $, A = a, t = St("", {
|
|
1830
1830
|
default: {
|
|
1831
1831
|
deliveryOrderNumber: "",
|
|
1832
1832
|
remark: "",
|
|
@@ -1836,21 +1836,21 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1836
1836
|
measurement: k.measurement
|
|
1837
1837
|
})),
|
|
1838
1838
|
createdBy: {
|
|
1839
|
-
id: ((
|
|
1840
|
-
name: ((
|
|
1839
|
+
id: ((j = h.sessionUser.value) == null ? void 0 : j.id) || "",
|
|
1840
|
+
name: ((V = h.sessionUser.value) == null ? void 0 : V.displayName) || ""
|
|
1841
1841
|
},
|
|
1842
1842
|
createdAt: ""
|
|
1843
1843
|
}
|
|
1844
|
-
}), c = je(), S = tt(), x = Ue(), u = ((oe = n.purchaseOrder) == null ? void 0 : oe.supplier.internal) != null,
|
|
1844
|
+
}), c = je(), S = tt(), x = Ue(), u = ((oe = n.purchaseOrder) == null ? void 0 : oe.supplier.internal) != null, T = u && x.enablePOSTransferRequireFulfillment, N = x.enablePortalDeliveryOrderWrite && (n.purchaseOrder.status === se.Enum.RECEIVING || n.purchaseOrder.status === se.Enum.COMPLETE) && (u ? !T : !0), w = x.enablePurchaseOrderReceiveWithCustomCost, O = x.enableBackdateReceive, r = J({}), d = Be(), i = Y({
|
|
1845
1845
|
get() {
|
|
1846
1846
|
if (!t.createdAt) return "";
|
|
1847
|
-
const k = new Date(t.createdAt), _ = k.getFullYear(), F = String(k.getMonth() + 1).padStart(2, "0"),
|
|
1848
|
-
return `${_}-${F}-${
|
|
1847
|
+
const k = new Date(t.createdAt), _ = k.getFullYear(), F = String(k.getMonth() + 1).padStart(2, "0"), H = String(k.getDate()).padStart(2, "0");
|
|
1848
|
+
return `${_}-${F}-${H}`;
|
|
1849
1849
|
},
|
|
1850
1850
|
set(k) {
|
|
1851
1851
|
if (k) {
|
|
1852
|
-
const _ = t.createdAt ? new Date(t.createdAt) : /* @__PURE__ */ new Date(), [F,
|
|
1853
|
-
_.setFullYear(parseInt(F)), _.setMonth(parseInt(
|
|
1852
|
+
const _ = t.createdAt ? new Date(t.createdAt) : /* @__PURE__ */ new Date(), [F, H, ce] = k.split("-");
|
|
1853
|
+
_.setFullYear(parseInt(F)), _.setMonth(parseInt(H) - 1), _.setDate(parseInt(ce)), t.createdAt = _.toISOString();
|
|
1854
1854
|
}
|
|
1855
1855
|
}
|
|
1856
1856
|
}), g = Y({
|
|
@@ -1861,37 +1861,37 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1861
1861
|
},
|
|
1862
1862
|
set(k) {
|
|
1863
1863
|
if (k) {
|
|
1864
|
-
const _ = t.createdAt ? new Date(t.createdAt) : /* @__PURE__ */ new Date(), [F,
|
|
1865
|
-
_.setHours(parseInt(F)), _.setMinutes(parseInt(
|
|
1864
|
+
const _ = t.createdAt ? new Date(t.createdAt) : /* @__PURE__ */ new Date(), [F, H] = k.split(":");
|
|
1865
|
+
_.setHours(parseInt(F)), _.setMinutes(parseInt(H)), t.createdAt = _.toISOString();
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
|
-
}),
|
|
1868
|
+
}), C = Y(() => {
|
|
1869
1869
|
const k = Ye(n.purchaseOrder._id);
|
|
1870
1870
|
if (!k) return "";
|
|
1871
|
-
const _ = new Date(k), F = _.getFullYear(),
|
|
1872
|
-
return `${F}-${
|
|
1871
|
+
const _ = new Date(k), F = _.getFullYear(), H = String(_.getMonth() + 1).padStart(2, "0"), ce = String(_.getDate()).padStart(2, "0");
|
|
1872
|
+
return `${F}-${H}-${ce}`;
|
|
1873
1873
|
}), K = Y(() => {
|
|
1874
1874
|
const k = Ye(n.purchaseOrder._id);
|
|
1875
1875
|
return k ? new Date(k) : null;
|
|
1876
1876
|
}), R = Y(() => {
|
|
1877
1877
|
if (!i.value || !g.value || !K.value) return null;
|
|
1878
1878
|
if (/* @__PURE__ */ new Date(`${i.value}T${g.value}:00`) < K.value) {
|
|
1879
|
-
const _ =
|
|
1879
|
+
const _ = C.value, F = K.value.getHours(), H = K.value.getMinutes(), ce = F >= 12 ? "PM" : "AM", s = F % 12 || 12, m = `${String(s).padStart(2, "0")}:${String(H).padStart(2, "0")} ${ce}`;
|
|
1880
1880
|
return `Delivery date & time cannot be earlier than order creation (${_} ${m})`;
|
|
1881
1881
|
}
|
|
1882
1882
|
return null;
|
|
1883
1883
|
}), X = Y(() => R.value ? !1 : t.received.some((_) => {
|
|
1884
1884
|
const F = _.amount;
|
|
1885
|
-
return F ? +
|
|
1885
|
+
return F ? +be(F) > 0 : !1;
|
|
1886
1886
|
}));
|
|
1887
|
-
function
|
|
1887
|
+
function z() {
|
|
1888
1888
|
t.createdAt = "";
|
|
1889
1889
|
}
|
|
1890
1890
|
const Q = Y(() => n.purchaseOrder.items.map((k, _) => Y({
|
|
1891
1891
|
get: () => {
|
|
1892
|
-
var
|
|
1893
|
-
const F = (
|
|
1894
|
-
return F ? +
|
|
1892
|
+
var H;
|
|
1893
|
+
const F = (H = t.received[_]) == null ? void 0 : H.amount;
|
|
1894
|
+
return F ? +be(F) : 0;
|
|
1895
1895
|
},
|
|
1896
1896
|
set: (F) => {
|
|
1897
1897
|
t.received[_].amount = Qe(F, 2);
|
|
@@ -1916,9 +1916,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1916
1916
|
}
|
|
1917
1917
|
const ie = Y(() => n.purchaseOrder.items.map((k, _) => Y({
|
|
1918
1918
|
get: () => {
|
|
1919
|
-
var
|
|
1920
|
-
const F = (
|
|
1921
|
-
return F ? +
|
|
1919
|
+
var H;
|
|
1920
|
+
const F = (H = t.received[_]) == null ? void 0 : H.cost;
|
|
1921
|
+
return F ? +be(F) : 0;
|
|
1922
1922
|
},
|
|
1923
1923
|
set: (F) => {
|
|
1924
1924
|
t.received[_].cost = {
|
|
@@ -1960,10 +1960,10 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1960
1960
|
});
|
|
1961
1961
|
}
|
|
1962
1962
|
return (k, _) => {
|
|
1963
|
-
const F =
|
|
1964
|
-
return l(), re(
|
|
1963
|
+
const F = G("FmButton"), H = G("FmDatePicker"), ce = G("FmTimePicker"), s = G("FmIcon"), m = G("FmStepperField"), P = G("FmSwitch"), M = G("FmTextField"), W = G("FmDialog");
|
|
1964
|
+
return l(), re(W, {
|
|
1965
1965
|
modelValue: f.value,
|
|
1966
|
-
"onUpdate:modelValue": _[4] || (_[4] = (
|
|
1966
|
+
"onUpdate:modelValue": _[4] || (_[4] = (E) => f.value = E),
|
|
1967
1967
|
overlay: !0,
|
|
1968
1968
|
"min-width": 800
|
|
1969
1969
|
}, {
|
|
@@ -1975,7 +1975,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1975
1975
|
size: "md",
|
|
1976
1976
|
"prepend-icon": "add",
|
|
1977
1977
|
class: "w-full"
|
|
1978
|
-
})) :
|
|
1978
|
+
})) : B("", !0)
|
|
1979
1979
|
]),
|
|
1980
1980
|
"dialog-header": ee(() => [
|
|
1981
1981
|
e("div", null, "Order #" + y(n.purchaseOrder.seqNumber) + " (New Delivery Order)", 1)
|
|
@@ -1991,104 +1991,104 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1991
1991
|
}, null, 8, ["disabled"])
|
|
1992
1992
|
]),
|
|
1993
1993
|
default: ee(() => {
|
|
1994
|
-
var
|
|
1994
|
+
var E;
|
|
1995
1995
|
return [
|
|
1996
1996
|
e("div", gr, [
|
|
1997
1997
|
e("div", _r, [
|
|
1998
1998
|
_[5] || (_[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received by", -1)),
|
|
1999
|
-
e("div", Sr, y((
|
|
1999
|
+
e("div", Sr, y((E = v(h).sessionUser.value) == null ? void 0 : E.displayName), 1)
|
|
2000
2000
|
]),
|
|
2001
|
-
v(O) ? (l(),
|
|
2001
|
+
v(O) ? (l(), b("div", xr, [
|
|
2002
2002
|
e("div", Or, [
|
|
2003
2003
|
e("div", wr, [
|
|
2004
2004
|
_[6] || (_[6] = ke(" Delivery Date & Time ")),
|
|
2005
|
-
!i.value && !g.value ? (l(),
|
|
2005
|
+
!i.value && !g.value ? (l(), b("div", $r, " Leave blank to use current date & time ")) : B("", !0)
|
|
2006
2006
|
]),
|
|
2007
2007
|
i.value || g.value ? (l(), re(F, {
|
|
2008
2008
|
key: 0,
|
|
2009
2009
|
variant: "tertiary",
|
|
2010
2010
|
label: "Clear",
|
|
2011
2011
|
"prepend-icon": "close",
|
|
2012
|
-
onClick:
|
|
2013
|
-
})) :
|
|
2012
|
+
onClick: z
|
|
2013
|
+
})) : B("", !0)
|
|
2014
2014
|
]),
|
|
2015
2015
|
e("div", Cr, [
|
|
2016
2016
|
e("div", Rr, [
|
|
2017
|
-
D(
|
|
2017
|
+
D(H, {
|
|
2018
2018
|
modelValue: i.value,
|
|
2019
|
-
"onUpdate:modelValue": _[0] || (_[0] = (
|
|
2019
|
+
"onUpdate:modelValue": _[0] || (_[0] = (I) => i.value = I)
|
|
2020
2020
|
}, null, 8, ["modelValue"])
|
|
2021
2021
|
]),
|
|
2022
2022
|
e("div", kr, [
|
|
2023
2023
|
D(ce, {
|
|
2024
2024
|
modelValue: g.value,
|
|
2025
|
-
"onUpdate:modelValue": _[1] || (_[1] = (
|
|
2025
|
+
"onUpdate:modelValue": _[1] || (_[1] = (I) => g.value = I)
|
|
2026
2026
|
}, null, 8, ["modelValue"])
|
|
2027
2027
|
])
|
|
2028
2028
|
]),
|
|
2029
|
-
R.value ? (l(),
|
|
2029
|
+
R.value ? (l(), b("div", Dr, [
|
|
2030
2030
|
D(s, {
|
|
2031
2031
|
name: "error",
|
|
2032
2032
|
class: "inline-block mr-1",
|
|
2033
2033
|
size: "sm"
|
|
2034
2034
|
}),
|
|
2035
2035
|
e("div", Ar, y(R.value), 1)
|
|
2036
|
-
])) :
|
|
2037
|
-
])) :
|
|
2036
|
+
])) : B("", !0)
|
|
2037
|
+
])) : B("", !0),
|
|
2038
2038
|
e("div", Nr, [
|
|
2039
2039
|
_[8] || (_[8] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Items going to receive ", -1)),
|
|
2040
|
-
(l(!0),
|
|
2040
|
+
(l(!0), b(de, null, xe(n.purchaseOrder.items, (I, p) => {
|
|
2041
2041
|
var Z, ae, ne;
|
|
2042
|
-
return l(),
|
|
2042
|
+
return l(), b("div", { key: p }, [
|
|
2043
2043
|
e("div", Fr, [
|
|
2044
2044
|
e("div", Tr, [
|
|
2045
|
-
e("span", Ir, y(
|
|
2046
|
-
e("span", Pr, y(
|
|
2045
|
+
e("span", Ir, y(I.sku.name), 1),
|
|
2046
|
+
e("span", Pr, y(I.sku.code), 1)
|
|
2047
2047
|
]),
|
|
2048
2048
|
e("div", qr, [
|
|
2049
2049
|
D(m, {
|
|
2050
2050
|
label: "Receive Quantity",
|
|
2051
2051
|
modelValue: Q.value[p].value,
|
|
2052
|
-
"onUpdate:modelValue": (
|
|
2052
|
+
"onUpdate:modelValue": (q) => Q.value[p].value = q,
|
|
2053
2053
|
"helper-text": `${v(o)("inventory.transfer.receiveRequest.details.received")} ${v(qe).toFormatString(
|
|
2054
2054
|
{
|
|
2055
|
-
value: (Z = k.receivedInfoMap[
|
|
2055
|
+
value: (Z = k.receivedInfoMap[I.sku._id]) == null ? void 0 : Z.received
|
|
2056
2056
|
}
|
|
2057
|
-
)} ${((ae =
|
|
2057
|
+
)} ${((ae = I.measurement) == null ? void 0 : ae.abbrev) ?? I.sku.unit.abbrev}`,
|
|
2058
2058
|
min: 0,
|
|
2059
|
-
"append-text": ((ne =
|
|
2059
|
+
"append-text": ((ne = I.measurement) == null ? void 0 : ne.abbrev) ?? I.sku.unit.abbrev
|
|
2060
2060
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "helper-text", "append-text"]),
|
|
2061
|
-
v(w) ? (l(),
|
|
2062
|
-
D(
|
|
2061
|
+
v(w) ? (l(), b("div", Vr, [
|
|
2062
|
+
D(P, {
|
|
2063
2063
|
"model-value": r.value[p],
|
|
2064
|
-
"onUpdate:modelValue": (
|
|
2064
|
+
"onUpdate:modelValue": (q) => ve(p),
|
|
2065
2065
|
size: "sm"
|
|
2066
2066
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2067
2067
|
_[7] || (_[7] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
2068
|
-
])) :
|
|
2068
|
+
])) : B("", !0),
|
|
2069
2069
|
v(w) && r.value[p] ? (l(), re(m, {
|
|
2070
2070
|
key: 1,
|
|
2071
2071
|
modelValue: ie.value[p].value,
|
|
2072
|
-
"onUpdate:modelValue": (
|
|
2072
|
+
"onUpdate:modelValue": (q) => ie.value[p].value = q,
|
|
2073
2073
|
label: "Total Cost",
|
|
2074
2074
|
step: 1e-4,
|
|
2075
2075
|
min: 0,
|
|
2076
2076
|
placeholder: "0.0000",
|
|
2077
2077
|
size: "sm",
|
|
2078
2078
|
"append-text": v(Ce)()
|
|
2079
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) :
|
|
2079
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "append-text"])) : B("", !0)
|
|
2080
2080
|
])
|
|
2081
2081
|
]),
|
|
2082
|
-
p < n.purchaseOrder.items.length - 1 ? (l(),
|
|
2082
|
+
p < n.purchaseOrder.items.length - 1 ? (l(), b("div", Er)) : B("", !0)
|
|
2083
2083
|
]);
|
|
2084
2084
|
}), 128))
|
|
2085
2085
|
]),
|
|
2086
2086
|
e("div", Lr, [
|
|
2087
2087
|
_[9] || (_[9] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Delivery order no.", -1)),
|
|
2088
2088
|
e("div", Mr, [
|
|
2089
|
-
D(
|
|
2089
|
+
D(M, {
|
|
2090
2090
|
modelValue: v(t).deliveryOrderNumber,
|
|
2091
|
-
"onUpdate:modelValue": _[2] || (_[2] = (
|
|
2091
|
+
"onUpdate:modelValue": _[2] || (_[2] = (I) => v(t).deliveryOrderNumber = I),
|
|
2092
2092
|
size: "md"
|
|
2093
2093
|
}, null, 8, ["modelValue"])
|
|
2094
2094
|
])
|
|
@@ -2096,9 +2096,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2096
2096
|
e("div", Ur, [
|
|
2097
2097
|
_[10] || (_[10] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Remark", -1)),
|
|
2098
2098
|
e("div", Br, [
|
|
2099
|
-
D(
|
|
2099
|
+
D(M, {
|
|
2100
2100
|
modelValue: v(t).remark,
|
|
2101
|
-
"onUpdate:modelValue": _[3] || (_[3] = (
|
|
2101
|
+
"onUpdate:modelValue": _[3] || (_[3] = (I) => v(t).remark = I),
|
|
2102
2102
|
size: "md"
|
|
2103
2103
|
}, null, 8, ["modelValue"])
|
|
2104
2104
|
])
|
|
@@ -2124,18 +2124,18 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2124
2124
|
props: {
|
|
2125
2125
|
netsuiteId: {}
|
|
2126
2126
|
},
|
|
2127
|
-
setup(
|
|
2128
|
-
const a =
|
|
2127
|
+
setup($) {
|
|
2128
|
+
const a = $, o = dt(), f = J(!1), h = J(!1), n = J(!1), A = J([]);
|
|
2129
2129
|
async function t() {
|
|
2130
2130
|
if (!(A.value.length > 0))
|
|
2131
2131
|
try {
|
|
2132
|
-
|
|
2132
|
+
h.value = !0;
|
|
2133
2133
|
const x = await o.getChangeLogs(a.netsuiteId);
|
|
2134
2134
|
A.value = x, n.value = !1;
|
|
2135
2135
|
} catch {
|
|
2136
2136
|
n.value = !0;
|
|
2137
2137
|
} finally {
|
|
2138
|
-
|
|
2138
|
+
h.value = !1;
|
|
2139
2139
|
}
|
|
2140
2140
|
}
|
|
2141
2141
|
function c(x) {
|
|
@@ -2162,8 +2162,8 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2162
2162
|
});
|
|
2163
2163
|
}
|
|
2164
2164
|
return (x, u) => {
|
|
2165
|
-
const
|
|
2166
|
-
return l(),
|
|
2165
|
+
const T = G("FmButton"), N = G("FmCircularProgress"), w = G("FmIcon"), O = G("FmDialog");
|
|
2166
|
+
return l(), b("div", zr, [
|
|
2167
2167
|
D(O, {
|
|
2168
2168
|
modelValue: f.value,
|
|
2169
2169
|
"onUpdate:modelValue": u[2] || (u[2] = (r) => f.value = r),
|
|
@@ -2171,7 +2171,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2171
2171
|
"max-width": 800
|
|
2172
2172
|
}, {
|
|
2173
2173
|
"dialog-button": ee(() => [
|
|
2174
|
-
D(
|
|
2174
|
+
D(T, {
|
|
2175
2175
|
"prepend-icon": "info",
|
|
2176
2176
|
variant: "secondary",
|
|
2177
2177
|
label: "NetSuite",
|
|
@@ -2185,11 +2185,11 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2185
2185
|
e("div", null, "NetSuite info", -1)
|
|
2186
2186
|
])),
|
|
2187
2187
|
default: ee(() => [
|
|
2188
|
-
|
|
2188
|
+
h.value ? (l(), b("div", Kr, [
|
|
2189
2189
|
u[4] || (u[4] = e("span", null, "Change Log Loading...", -1)),
|
|
2190
2190
|
D(N, { size: "md" })
|
|
2191
|
-
])) :
|
|
2192
|
-
!
|
|
2191
|
+
])) : B("", !0),
|
|
2192
|
+
!h.value && A.value.length > 0 ? (l(), b("div", Gr, [
|
|
2193
2193
|
e("h3", Hr, [
|
|
2194
2194
|
D(w, {
|
|
2195
2195
|
name: "error",
|
|
@@ -2217,7 +2217,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2217
2217
|
])
|
|
2218
2218
|
], -1)),
|
|
2219
2219
|
e("tbody", null, [
|
|
2220
|
-
(l(!0),
|
|
2220
|
+
(l(!0), b(de, null, xe(A.value, (r, d) => (l(), b("tr", {
|
|
2221
2221
|
key: d,
|
|
2222
2222
|
class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
|
|
2223
2223
|
}, [
|
|
@@ -2236,12 +2236,12 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2236
2236
|
])
|
|
2237
2237
|
])
|
|
2238
2238
|
])
|
|
2239
|
-
])) : (l(),
|
|
2239
|
+
])) : (l(), b("div", oo, u[7] || (u[7] = [
|
|
2240
2240
|
e("p", null, "No change logs available.", -1)
|
|
2241
2241
|
])))
|
|
2242
2242
|
]),
|
|
2243
2243
|
"dialog-footer": ee(() => [
|
|
2244
|
-
D(
|
|
2244
|
+
D(T, {
|
|
2245
2245
|
class: "ml-auto sm:w-full xs:w-full",
|
|
2246
2246
|
label: "Close",
|
|
2247
2247
|
size: "md",
|
|
@@ -2257,7 +2257,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2257
2257
|
}), ao = { class: "flex flex-col w-full gap-3" }, lo = { class: "flex" }, io = { class: "fm-typo-en-title-md-600 text-fm-color-typo-primary" }, co = { class: "flex flex-col gap-16 w-full h-full" }, uo = { class: "flex justify-between" }, mo = { class: "fm-typo-en-body-lg-600" }, po = { class: "flex gap-2" }, fo = {
|
|
2258
2258
|
key: 0,
|
|
2259
2259
|
class: "flex items-center gap-1"
|
|
2260
|
-
}, yo = { class: "fm-typo-en-body-md-400" }, vo = { class: "flex flex-col gap-8" },
|
|
2260
|
+
}, yo = { class: "fm-typo-en-body-md-400" }, vo = { class: "flex flex-col gap-8" }, ho = { class: "flex flex-col gap-4" }, bo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, go = { class: "flex gap-1" }, _o = { class: "fm-typo-en-body-lg-600" }, So = {
|
|
2261
2261
|
key: 0,
|
|
2262
2262
|
class: "flex flex-col gap-4"
|
|
2263
2263
|
}, xo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oo = { class: "fm-typo-en-body-lg-600" }, wo = { class: "flex flex-col gap-4" }, $o = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Co = { class: "fm-typo-en-body-lg-600" }, Ro = {
|
|
@@ -2290,7 +2290,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2290
2290
|
}, un = { class: "flex-1 flex flex-col items-center" }, dn = { class: "h-40 w-40 bg-fm-color-primary rounded-full flex items-center justify-center" }, mn = { class: "flex-1 flex flex-col items-center" }, pn = { class: "flex w-full items-center gap-4" }, fn = {
|
|
2291
2291
|
class: "py-12 flex flex-col gap-4",
|
|
2292
2292
|
name: "received-at header"
|
|
2293
|
-
}, yn = { class: "fm-typo-en-body-lg-400" }, vn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" },
|
|
2293
|
+
}, yn = { class: "fm-typo-en-body-lg-400" }, vn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, hn = { class: "ml-auto flex gap-1" }, bn = { class: "flex gap-12 content-stretch" }, gn = {
|
|
2294
2294
|
class: "flex flex-col w-40",
|
|
2295
2295
|
name: "circles"
|
|
2296
2296
|
}, _n = { class: "flex-1 flex flex-col items-center" }, Sn = {
|
|
@@ -2311,8 +2311,8 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2311
2311
|
shipments: {}
|
|
2312
2312
|
},
|
|
2313
2313
|
emits: ["update:show", "submitted"],
|
|
2314
|
-
setup(
|
|
2315
|
-
const o =
|
|
2314
|
+
setup($, { emit: a }) {
|
|
2315
|
+
const o = $, f = a, h = tt(), n = Be(), A = Ue(), t = De(), c = ct(), S = Y(
|
|
2316
2316
|
() => {
|
|
2317
2317
|
var s, m;
|
|
2318
2318
|
return {
|
|
@@ -2320,30 +2320,30 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2320
2320
|
name: ((m = c.sessionUser.value) == null ? void 0 : m.displayName) ?? ""
|
|
2321
2321
|
};
|
|
2322
2322
|
}
|
|
2323
|
-
), x = wt(), { t: u } = ut(),
|
|
2323
|
+
), x = wt(), { t: u } = ut(), T = Y(
|
|
2324
2324
|
() => {
|
|
2325
|
-
var s, m,
|
|
2326
|
-
return ((m = (s = o.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : m.internal) === "restaurant" || ((
|
|
2325
|
+
var s, m, P, M;
|
|
2326
|
+
return ((m = (s = o.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : m.internal) === "restaurant" || ((M = (P = o.purchaseOrder) == null ? void 0 : P.supplier) == null ? void 0 : M.internal) === "warehouse" ? Ge.enum.transfer : Ge.enum.purchase;
|
|
2327
2327
|
}
|
|
2328
2328
|
), N = Y(() => {
|
|
2329
|
-
var
|
|
2330
|
-
const s = (
|
|
2331
|
-
var
|
|
2332
|
-
return
|
|
2329
|
+
var P;
|
|
2330
|
+
const s = (P = o.shipments) == null ? void 0 : P.find((M) => {
|
|
2331
|
+
var W;
|
|
2332
|
+
return M.ref === ((W = o.purchaseOrder) == null ? void 0 : W._id);
|
|
2333
2333
|
});
|
|
2334
2334
|
let m = null;
|
|
2335
2335
|
if (s != null && s.milestones && s.milestones.length > 0) {
|
|
2336
|
-
const
|
|
2337
|
-
if (
|
|
2338
|
-
const
|
|
2339
|
-
m = `${
|
|
2336
|
+
const M = s.milestones[s.milestones.length - 1];
|
|
2337
|
+
if (M.estimatedTime) {
|
|
2338
|
+
const W = new Date(M.estimatedTime), E = W.getDate().toString().padStart(2, "0");
|
|
2339
|
+
m = `${W.toLocaleString("en-US", { month: "short" })} ${E}`;
|
|
2340
2340
|
}
|
|
2341
2341
|
}
|
|
2342
2342
|
return m;
|
|
2343
|
-
}), w = J(!1), O = J(""), r = J(!0), d = je(), i = Gt(d.getWorkflowConfig), g = Ot(),
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2343
|
+
}), w = J(!1), O = J(""), r = J(!0), d = je(), i = Gt(d.getWorkflowConfig), g = Ot(), C = [
|
|
2344
|
+
U.enum.receiveStock,
|
|
2345
|
+
U.enum.processRequest,
|
|
2346
|
+
U.enum.closeRequest
|
|
2347
2347
|
], K = Y(() => {
|
|
2348
2348
|
if (!o.purchaseOrder)
|
|
2349
2349
|
return [];
|
|
@@ -2353,27 +2353,28 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2353
2353
|
const m = {
|
|
2354
2354
|
user: S.value,
|
|
2355
2355
|
executedAt: t.locations.computeFirst(
|
|
2356
|
-
(
|
|
2357
|
-
var
|
|
2358
|
-
return
|
|
2356
|
+
(I) => {
|
|
2357
|
+
var p;
|
|
2358
|
+
return I.dbName === ((p = t._currentLocation) == null ? void 0 : p.dbName) ? I : null;
|
|
2359
2359
|
}
|
|
2360
2360
|
),
|
|
2361
2361
|
purchaseOrderRequest: o.poRequest,
|
|
2362
2362
|
purchaseOrder: o.purchaseOrder
|
|
2363
|
-
},
|
|
2364
|
-
|
|
2363
|
+
}, P = A.useOperatePurchaseOrderV2, M = A.poWorkflowAllowToMarkCompleted, W = [...C];
|
|
2364
|
+
P && !M && W.push(U.enum.completeReceive);
|
|
2365
|
+
let E = [];
|
|
2365
2366
|
try {
|
|
2366
|
-
s.state === pt.error ? (console.error("Error fetching workflow config:", s.error),
|
|
2367
|
+
s.state === pt.error ? (console.error("Error fetching workflow config:", s.error), E = st.getAvailableActions({
|
|
2367
2368
|
...m,
|
|
2368
2369
|
orderConfig: st.getDefaultConfig()
|
|
2369
|
-
}).actions.filter((
|
|
2370
|
+
}).actions.filter((I) => !W.includes(I))) : E = st.getAvailableActions({
|
|
2370
2371
|
...m,
|
|
2371
2372
|
orderConfig: s.data
|
|
2372
|
-
}).actions.filter((
|
|
2373
|
-
} catch (
|
|
2374
|
-
console.error("Error getting available actions:",
|
|
2373
|
+
}).actions.filter((I) => !W.includes(I));
|
|
2374
|
+
} catch (I) {
|
|
2375
|
+
console.error("Error getting available actions:", I);
|
|
2375
2376
|
}
|
|
2376
|
-
return o.scope === "approval" && (
|
|
2377
|
+
return o.scope === "approval" && (E = E.filter((I) => I !== U.enum.completeReceive)), E;
|
|
2377
2378
|
}), R = Vt(o, "show"), X = Y(() => [
|
|
2378
2379
|
{
|
|
2379
2380
|
label: u("inventory.transfer.receiveRequest.details.overview"),
|
|
@@ -2383,11 +2384,11 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2383
2384
|
label: u("inventory.transfer.receiveRequest.details.deliveryHistory"),
|
|
2384
2385
|
value: "deliveryHistory"
|
|
2385
2386
|
}
|
|
2386
|
-
]),
|
|
2387
|
+
]), z = J(X.value[0]);
|
|
2387
2388
|
kt(
|
|
2388
2389
|
() => o.show,
|
|
2389
2390
|
(s) => {
|
|
2390
|
-
s && (
|
|
2391
|
+
s && (z.value = X.value[0]);
|
|
2391
2392
|
}
|
|
2392
2393
|
);
|
|
2393
2394
|
function Q(s) {
|
|
@@ -2399,18 +2400,18 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2399
2400
|
}
|
|
2400
2401
|
}));
|
|
2401
2402
|
}
|
|
2402
|
-
async function ve(s, m,
|
|
2403
|
-
return new Promise((
|
|
2404
|
-
|
|
2403
|
+
async function ve(s, m, P, M, W) {
|
|
2404
|
+
return new Promise((E, I) => {
|
|
2405
|
+
h.open({
|
|
2405
2406
|
closeButton: !1,
|
|
2406
|
-
title:
|
|
2407
|
-
message:
|
|
2408
|
-
primaryActions:
|
|
2407
|
+
title: M.title,
|
|
2408
|
+
message: M.message,
|
|
2409
|
+
primaryActions: M.primaryActions,
|
|
2409
2410
|
secondaryActions: { text: "No", close: !1 }
|
|
2410
2411
|
}).onPrimary(async () => {
|
|
2411
|
-
var Z, ae, ne,
|
|
2412
|
+
var Z, ae, ne, q;
|
|
2412
2413
|
const p = [];
|
|
2413
|
-
|
|
2414
|
+
P === U.enum.approveRequest ? (p.push({
|
|
2414
2415
|
action: "approveRequest",
|
|
2415
2416
|
payload: null
|
|
2416
2417
|
}), m.fulfillment && p.push({
|
|
@@ -2422,7 +2423,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2422
2423
|
items: Q(m.fulfillment.items),
|
|
2423
2424
|
createdBy: S.value
|
|
2424
2425
|
}
|
|
2425
|
-
})) :
|
|
2426
|
+
})) : P === U.enum.processRequest ? m.fulfillment && p.push({
|
|
2426
2427
|
action: "processRequest",
|
|
2427
2428
|
payload: {
|
|
2428
2429
|
fulfillmentId: "",
|
|
@@ -2431,43 +2432,43 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2431
2432
|
items: Q(m.fulfillment.items),
|
|
2432
2433
|
createdBy: S.value
|
|
2433
2434
|
}
|
|
2434
|
-
}) :
|
|
2435
|
+
}) : P === U.enum.rejectRequest ? p.push({
|
|
2435
2436
|
action: "rejectRequest",
|
|
2436
2437
|
payload: null
|
|
2437
|
-
}) :
|
|
2438
|
+
}) : P === U.enum.closeRequest && p.push({
|
|
2438
2439
|
action: "closeRequest",
|
|
2439
2440
|
payload: null
|
|
2440
2441
|
});
|
|
2441
2442
|
try {
|
|
2442
2443
|
await g({
|
|
2443
2444
|
operate: {
|
|
2444
|
-
operation:
|
|
2445
|
+
operation: P,
|
|
2445
2446
|
doc: s,
|
|
2446
2447
|
options: m
|
|
2447
2448
|
},
|
|
2448
2449
|
operateV2: {
|
|
2449
2450
|
_id: ((Z = o.purchaseOrder) == null ? void 0 : Z._id) ?? "",
|
|
2450
2451
|
_rev: ((ae = o.purchaseOrder) == null ? void 0 : ae._rev) ?? "",
|
|
2451
|
-
action:
|
|
2452
|
+
action: P,
|
|
2452
2453
|
payloads: p
|
|
2453
2454
|
// add payload if action is receiveStock or processRequest
|
|
2454
2455
|
},
|
|
2455
|
-
transferTo: (
|
|
2456
|
-
}).delayed(1e3),
|
|
2456
|
+
transferTo: (q = (ne = o.poRequest) == null ? void 0 : ne.to) == null ? void 0 : q.dbName
|
|
2457
|
+
}).delayed(1e3), E("submitted");
|
|
2457
2458
|
} catch (me) {
|
|
2458
|
-
|
|
2459
|
+
I(me);
|
|
2459
2460
|
}
|
|
2460
2461
|
}).onSecondary(() => {
|
|
2461
|
-
|
|
2462
|
-
for (let p = 0; p <
|
|
2463
|
-
|
|
2462
|
+
E("cancelled");
|
|
2463
|
+
for (let p = 0; p < W + 2; p++)
|
|
2464
|
+
h.close();
|
|
2464
2465
|
}).onClose(() => {
|
|
2465
2466
|
});
|
|
2466
2467
|
});
|
|
2467
2468
|
}
|
|
2468
2469
|
async function ie(s) {
|
|
2469
|
-
var
|
|
2470
|
-
if (s ===
|
|
2470
|
+
var W, E, I, p;
|
|
2471
|
+
if (s === U.enum.receiveStock)
|
|
2471
2472
|
return;
|
|
2472
2473
|
const m = xt[s];
|
|
2473
2474
|
if (!m) {
|
|
@@ -2478,19 +2479,19 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2478
2479
|
});
|
|
2479
2480
|
return;
|
|
2480
2481
|
}
|
|
2481
|
-
const { successMessage:
|
|
2482
|
+
const { successMessage: P, ...M } = m;
|
|
2482
2483
|
if (o.purchaseOrder) {
|
|
2483
2484
|
O.value = `${s}`, w.value = !0, r.value = !1;
|
|
2484
2485
|
const Z = {};
|
|
2485
2486
|
let ae = 0;
|
|
2486
|
-
if ((s ===
|
|
2487
|
-
s ===
|
|
2487
|
+
if ((s === U.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
2488
|
+
s === U.enum.completeReceive) && A.autoReceiveWarehouse)
|
|
2488
2489
|
Z.autoReceive = !0;
|
|
2489
|
-
else if ((s ===
|
|
2490
|
-
const ne = (
|
|
2491
|
-
if (ne &&
|
|
2490
|
+
else if ((s === U.enum.approveRequest || s === U.enum.processRequest) && A.acceptRequireFulfillment) {
|
|
2491
|
+
const ne = (E = (W = o.poRequest) == null ? void 0 : W.from) == null ? void 0 : E.dbName, q = (p = (I = o.poRequest) == null ? void 0 : I.to) == null ? void 0 : p.dbName;
|
|
2492
|
+
if (ne && q && (ne.startsWith("warehouse_") || q.startsWith("warehouse_"))) {
|
|
2492
2493
|
const me = await new Promise((Oe, Fe) => {
|
|
2493
|
-
|
|
2494
|
+
h.open({
|
|
2494
2495
|
closeButton: !1,
|
|
2495
2496
|
title: "Confirm transfer amount",
|
|
2496
2497
|
dialogComponent: rs,
|
|
@@ -2498,7 +2499,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2498
2499
|
purchaseOrder: o.purchaseOrder,
|
|
2499
2500
|
confirm: Oe,
|
|
2500
2501
|
"onUpdate:show": (Te) => {
|
|
2501
|
-
Te || (O.value = "", w.value = !1, r.value = !0, ae++,
|
|
2502
|
+
Te || (O.value = "", w.value = !1, r.value = !0, ae++, h.close()), Fe("cancelled");
|
|
2502
2503
|
}
|
|
2503
2504
|
}
|
|
2504
2505
|
});
|
|
@@ -2515,7 +2516,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2515
2516
|
ae
|
|
2516
2517
|
) === "submitted" && (n.open({
|
|
2517
2518
|
title: "Success",
|
|
2518
|
-
message:
|
|
2519
|
+
message: P,
|
|
2519
2520
|
type: "success"
|
|
2520
2521
|
}), f("update:show", !1), f("submitted"));
|
|
2521
2522
|
} catch (ne) {
|
|
@@ -2532,18 +2533,18 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2532
2533
|
const Ae = Y(() => {
|
|
2533
2534
|
var s, m;
|
|
2534
2535
|
return ((s = o.purchaseOrder) == null ? void 0 : s.status) === se.enum.RECEIVING || ((m = o.purchaseOrder) == null ? void 0 : m.status) === se.enum.COMPLETE;
|
|
2535
|
-
}), Ne = Y(() => o.purchaseOrder ? Xe(o.purchaseOrder) : {}),
|
|
2536
|
+
}), Ne = Y(() => o.purchaseOrder ? Xe(o.purchaseOrder) : {}), j = Y(() => {
|
|
2536
2537
|
const s = o.purchaseOrder;
|
|
2537
2538
|
if (!s) return { status: "", statusClass: "" };
|
|
2538
|
-
const { partial: m, over:
|
|
2539
|
-
let
|
|
2540
|
-
return
|
|
2541
|
-
status:
|
|
2542
|
-
statusClass: `fm-status-badge fm-status-badge-${
|
|
2539
|
+
const { partial: m, over: P } = nt(Ne.value), M = at(s.status, m, P);
|
|
2540
|
+
let W = u(`inventory.transfer.status.${M}`), E = `${s.status}`.toLocaleLowerCase("en-us");
|
|
2541
|
+
return M === se.enum.CLOSE && (W = `${u(`inventory.transfer.status.${se.enum.COMPLETE}`)}`), M === "PARTIAL_RECEIVED" && E === se.enum.PROCESSING.toLocaleLowerCase("en-us") && (E = se.enum.RECEIVING.toLocaleLowerCase("en-us")), {
|
|
2542
|
+
status: W,
|
|
2543
|
+
statusClass: `fm-status-badge fm-status-badge-${E}`
|
|
2543
2544
|
};
|
|
2544
|
-
}),
|
|
2545
|
-
var
|
|
2546
|
-
const s = ((
|
|
2545
|
+
}), V = Y(() => {
|
|
2546
|
+
var E, I;
|
|
2547
|
+
const s = ((E = o.purchaseOrder) == null ? void 0 : E.deliveryOrder) ?? [], m = ((I = o.purchaseOrder) == null ? void 0 : I.deliveryFullfillment) ?? [], P = [
|
|
2547
2548
|
...s.map((p) => ({
|
|
2548
2549
|
createdAt: p.createdAt,
|
|
2549
2550
|
type: "grn",
|
|
@@ -2555,11 +2556,11 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2555
2556
|
doc: p
|
|
2556
2557
|
}))
|
|
2557
2558
|
];
|
|
2558
|
-
|
|
2559
|
-
function
|
|
2560
|
-
var ne,
|
|
2559
|
+
P.reverse().sort((p, Z) => p.createdAt.localeCompare(Z.createdAt));
|
|
2560
|
+
function M(p) {
|
|
2561
|
+
var ne, q, me, Oe, Fe, Te, te, le, pe, he, _e, Re;
|
|
2561
2562
|
const Z = m.findIndex((ue) => ue.id === p.fullfillmentId), ae = [
|
|
2562
|
-
(
|
|
2563
|
+
(q = (ne = m[Z]) == null ? void 0 : ne.netSuite) != null && q.id ? {
|
|
2563
2564
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
2564
2565
|
values: [
|
|
2565
2566
|
`${((Oe = (me = m[Z]) == null ? void 0 : me.netSuite) == null ? void 0 : Oe.refNo) ?? "N/A"} (${((Te = (Fe = m[Z]) == null ? void 0 : Fe.netSuite) == null ? void 0 : Te.id) ?? "-"})`
|
|
@@ -2569,9 +2570,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2569
2570
|
label: "Netsuite ref no.",
|
|
2570
2571
|
values: [`${((le = p == null ? void 0 : p.netSuite) == null ? void 0 : le.refNo) ?? "N/A"} (${((pe = p == null ? void 0 : p.netSuite) == null ? void 0 : pe.id) ?? "-"})`]
|
|
2571
2572
|
} : null,
|
|
2572
|
-
(
|
|
2573
|
+
(he = p == null ? void 0 : p.netSuite) != null && he.recordType ? {
|
|
2573
2574
|
label: "Netsuite Type",
|
|
2574
|
-
values: [
|
|
2575
|
+
values: [ht((_e = p == null ? void 0 : p.netSuite) == null ? void 0 : _e.recordType)]
|
|
2575
2576
|
} : null
|
|
2576
2577
|
];
|
|
2577
2578
|
return {
|
|
@@ -2639,7 +2640,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2639
2640
|
{
|
|
2640
2641
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
2641
2642
|
},
|
|
2642
|
-
|
|
2643
|
+
be(ue.amount, !1)
|
|
2643
2644
|
),
|
|
2644
2645
|
L(
|
|
2645
2646
|
"span",
|
|
@@ -2680,9 +2681,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2680
2681
|
].filter((ue) => !!ue)
|
|
2681
2682
|
};
|
|
2682
2683
|
}
|
|
2683
|
-
function
|
|
2684
|
+
function W(p) {
|
|
2684
2685
|
var ae, ne;
|
|
2685
|
-
const Z = m.findIndex((
|
|
2686
|
+
const Z = m.findIndex((q) => q.id === p.id);
|
|
2686
2687
|
return {
|
|
2687
2688
|
header: "Fulfillment",
|
|
2688
2689
|
date: He(new Date(p.createdAt)),
|
|
@@ -2693,7 +2694,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2693
2694
|
},
|
|
2694
2695
|
{
|
|
2695
2696
|
label: "Receiveable items",
|
|
2696
|
-
values: p.items.map((
|
|
2697
|
+
values: p.items.map((q) => {
|
|
2697
2698
|
var me;
|
|
2698
2699
|
return L("div", [
|
|
2699
2700
|
L(
|
|
@@ -2713,14 +2714,14 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2713
2714
|
{
|
|
2714
2715
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
2715
2716
|
},
|
|
2716
|
-
`${
|
|
2717
|
+
`${q.sku.name}`
|
|
2717
2718
|
),
|
|
2718
2719
|
L(
|
|
2719
2720
|
"span",
|
|
2720
2721
|
{
|
|
2721
2722
|
class: "fm-typo-en-body-md-400"
|
|
2722
2723
|
},
|
|
2723
|
-
`${
|
|
2724
|
+
`${q.sku.code} `
|
|
2724
2725
|
)
|
|
2725
2726
|
]
|
|
2726
2727
|
),
|
|
@@ -2741,14 +2742,14 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2741
2742
|
{
|
|
2742
2743
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
2743
2744
|
},
|
|
2744
|
-
|
|
2745
|
+
be(q.amount, !1)
|
|
2745
2746
|
),
|
|
2746
2747
|
L(
|
|
2747
2748
|
"span",
|
|
2748
2749
|
{
|
|
2749
2750
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
2750
2751
|
},
|
|
2751
|
-
((me =
|
|
2752
|
+
((me = q.measurement) == null ? void 0 : me.abbrev) ?? q.sku.unit.abbrev
|
|
2752
2753
|
)
|
|
2753
2754
|
]
|
|
2754
2755
|
),
|
|
@@ -2757,7 +2758,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2757
2758
|
{
|
|
2758
2759
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
2759
2760
|
},
|
|
2760
|
-
`${
|
|
2761
|
+
`${q.cost ? `(${Ke(q.cost)})` : ""}`
|
|
2761
2762
|
)
|
|
2762
2763
|
]
|
|
2763
2764
|
)
|
|
@@ -2770,15 +2771,15 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2770
2771
|
label: "Ref no. (Netsuite)",
|
|
2771
2772
|
values: [(ne = p.netSuite) == null ? void 0 : ne.refNo]
|
|
2772
2773
|
} : null
|
|
2773
|
-
].filter((
|
|
2774
|
+
].filter((q) => !!q)
|
|
2774
2775
|
};
|
|
2775
2776
|
}
|
|
2776
|
-
return
|
|
2777
|
+
return P.map((p) => {
|
|
2777
2778
|
switch (p.type) {
|
|
2778
2779
|
case "grn":
|
|
2779
|
-
return
|
|
2780
|
+
return M(p.doc);
|
|
2780
2781
|
case "fulfillment":
|
|
2781
|
-
return
|
|
2782
|
+
return W(p.doc);
|
|
2782
2783
|
}
|
|
2783
2784
|
});
|
|
2784
2785
|
}), oe = Y(() => {
|
|
@@ -2787,101 +2788,101 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2787
2788
|
...gt(0),
|
|
2788
2789
|
currency: Ce()
|
|
2789
2790
|
};
|
|
2790
|
-
return ((m = o.purchaseOrder) == null ? void 0 : m.items.reduce((
|
|
2791
|
-
...
|
|
2791
|
+
return ((m = o.purchaseOrder) == null ? void 0 : m.items.reduce((P, M) => ({
|
|
2792
|
+
...bt(P, M.totalCost ?? s),
|
|
2792
2793
|
currency: Ce()
|
|
2793
2794
|
}), s)) ?? s;
|
|
2794
2795
|
});
|
|
2795
2796
|
function k(s) {
|
|
2796
|
-
var
|
|
2797
|
-
const
|
|
2798
|
-
return `<span class="${_(s)} fm-typo-en-body-lg-600">${qe.toFormatString({ value:
|
|
2797
|
+
var E;
|
|
2798
|
+
const P = (((E = o.purchaseOrder) == null ? void 0 : E.version) ?? Pe.enum[1]) === Pe.enum[2] ? s.id : s.sku._id, M = o.receivedMap[P];
|
|
2799
|
+
return `<span class="${_(s)} fm-typo-en-body-lg-600">${qe.toFormatString({ value: M.received })}</span>/${Ut(s.quantity, s.sku.unit, s.measurement)}`;
|
|
2799
2800
|
}
|
|
2800
2801
|
function _(s) {
|
|
2801
2802
|
var Z;
|
|
2802
|
-
const
|
|
2803
|
-
return
|
|
2803
|
+
const P = (((Z = o.purchaseOrder) == null ? void 0 : Z.version) ?? Pe.enum[1]) === Pe.enum[2] ? s.id : s.sku._id, M = o.receivedMap[P], { isPartialReceive: W, isNoReceive: E, isOverReceive: I, isFullReceive: p } = Jt(M);
|
|
2804
|
+
return E ? "text-fm-color-typo-tertiary" : W ? "text-fm-color-system-warning-300" : I ? "text-fm-color-system-error-300" : p ? "text-fm-color-system-success-300" : "";
|
|
2804
2805
|
}
|
|
2805
2806
|
const F = Y(() => {
|
|
2806
|
-
var s, m,
|
|
2807
|
-
return (s = o.purchaseOrder) != null && s.itemsAtSubmission ? ((m = o.purchaseOrder) == null ? void 0 : m.version) === Pe.enum[2] ? o.purchaseOrder.items.reduce((
|
|
2808
|
-
var
|
|
2809
|
-
const
|
|
2810
|
-
(Z) => Z.id ===
|
|
2807
|
+
var s, m, P;
|
|
2808
|
+
return (s = o.purchaseOrder) != null && s.itemsAtSubmission ? ((m = o.purchaseOrder) == null ? void 0 : m.version) === Pe.enum[2] ? o.purchaseOrder.items.reduce((M, W) => {
|
|
2809
|
+
var I, p;
|
|
2810
|
+
const E = (p = (I = o.purchaseOrder) == null ? void 0 : I.itemsAtSubmission) == null ? void 0 : p.find(
|
|
2811
|
+
(Z) => Z.id === W.id
|
|
2811
2812
|
);
|
|
2812
|
-
return
|
|
2813
|
-
originalAmount: Number(qe.toFormatString({ value:
|
|
2814
|
-
newAmount: Number(qe.toFormatString({ value:
|
|
2815
|
-
}),
|
|
2816
|
-
}, /* @__PURE__ */ new Map()) : (
|
|
2813
|
+
return E && E.quantity !== W.quantity && M.set(W.sku.code, {
|
|
2814
|
+
originalAmount: Number(qe.toFormatString({ value: E.quantity })),
|
|
2815
|
+
newAmount: Number(qe.toFormatString({ value: W.quantity }))
|
|
2816
|
+
}), M;
|
|
2817
|
+
}, /* @__PURE__ */ new Map()) : (P = o.purchaseOrder) == null ? void 0 : P.items.reduce((M, W) => {
|
|
2817
2818
|
var Z, ae;
|
|
2818
|
-
const
|
|
2819
|
-
(ne) => ne.sku._id ===
|
|
2820
|
-
),
|
|
2821
|
-
return
|
|
2822
|
-
originalAmount:
|
|
2819
|
+
const E = (ae = (Z = o.purchaseOrder) == null ? void 0 : Z.itemsAtSubmission) == null ? void 0 : ae.find(
|
|
2820
|
+
(ne) => ne.sku._id === W.sku._id
|
|
2821
|
+
), I = E ? Number(qe.toFormatString({ value: E.quantity })) : 0, p = Number(qe.toFormatString({ value: W.quantity }));
|
|
2822
|
+
return E && I !== p && M.set(W.sku.code, {
|
|
2823
|
+
originalAmount: I,
|
|
2823
2824
|
newAmount: p
|
|
2824
|
-
}),
|
|
2825
|
+
}), M;
|
|
2825
2826
|
}, /* @__PURE__ */ new Map()) : /* @__PURE__ */ new Map();
|
|
2826
|
-
}),
|
|
2827
|
-
var
|
|
2827
|
+
}), H = (s) => {
|
|
2828
|
+
var P, M;
|
|
2828
2829
|
const m = F.value;
|
|
2829
|
-
return ((
|
|
2830
|
+
return ((P = o.purchaseOrder) == null ? void 0 : P.version) === Pe.enum[2] ? m.has(s.id) : m.has((M = s.sku) == null ? void 0 : M.code);
|
|
2830
2831
|
}, ce = (s) => {
|
|
2831
|
-
var
|
|
2832
|
+
var P, M;
|
|
2832
2833
|
const m = F.value;
|
|
2833
|
-
return ((
|
|
2834
|
+
return ((P = o.purchaseOrder) == null ? void 0 : P.version) === Pe.enum[2] ? m.get(s.id) : m.get((M = s.sku) == null ? void 0 : M.code);
|
|
2834
2835
|
};
|
|
2835
2836
|
return (s, m) => {
|
|
2836
|
-
const
|
|
2837
|
+
const P = G("FmButton"), M = G("FmButtonGroup"), W = G("FmChip"), E = G("FmIcon"), I = G("FmMenuDivider"), p = G("FmCard"), Z = G("FmTooltip"), ae = G("FmSpacer"), ne = G("FmSideSheet");
|
|
2837
2838
|
return l(), re(ne, {
|
|
2838
2839
|
modelValue: v(R),
|
|
2839
|
-
"onUpdate:modelValue": m[8] || (m[8] = (
|
|
2840
|
+
"onUpdate:modelValue": m[8] || (m[8] = (q) => Dt(R) ? R.value = q : null),
|
|
2840
2841
|
"dismiss-away": r.value,
|
|
2841
2842
|
"max-width": 600,
|
|
2842
2843
|
"close-button": !1
|
|
2843
2844
|
}, {
|
|
2844
2845
|
"side-sheet-header": ee(() => {
|
|
2845
|
-
var
|
|
2846
|
+
var q, me;
|
|
2846
2847
|
return [
|
|
2847
2848
|
e("div", ao, [
|
|
2848
2849
|
e("div", lo, [
|
|
2849
|
-
e("div", io, y(v(u)("inventory.transfer.receiveRequest.details.title") + ((
|
|
2850
|
-
D(
|
|
2850
|
+
e("div", io, y(v(u)("inventory.transfer.receiveRequest.details.title") + ((q = s.purchaseOrder) != null && q.seqNumber ? ` #${(me = s.purchaseOrder) == null ? void 0 : me.seqNumber}` : "")), 1),
|
|
2851
|
+
D(P, {
|
|
2851
2852
|
class: "ml-auto -m-2",
|
|
2852
2853
|
variant: "tertiary",
|
|
2853
2854
|
"prepend-icon": "close",
|
|
2854
2855
|
onClick: m[0] || (m[0] = (Oe) => f("update:show", !1))
|
|
2855
2856
|
})
|
|
2856
2857
|
]),
|
|
2857
|
-
D(
|
|
2858
|
+
D(M, {
|
|
2858
2859
|
items: X.value,
|
|
2859
|
-
modelValue:
|
|
2860
|
-
"onUpdate:modelValue": m[1] || (m[1] = (Oe) =>
|
|
2860
|
+
modelValue: z.value,
|
|
2861
|
+
"onUpdate:modelValue": m[1] || (m[1] = (Oe) => z.value = Oe)
|
|
2861
2862
|
}, null, 8, ["items", "modelValue"]),
|
|
2862
|
-
s.purchaseOrder &&
|
|
2863
|
+
s.purchaseOrder && z.value.value === "deliveryHistory" ? (l(), re(jr, {
|
|
2863
2864
|
key: 0,
|
|
2864
2865
|
"purchase-order": s.purchaseOrder,
|
|
2865
2866
|
"received-info-map": Ne.value,
|
|
2866
2867
|
onSubmitted: m[2] || (m[2] = () => {
|
|
2867
2868
|
f("update:show", !1), f("submitted");
|
|
2868
2869
|
})
|
|
2869
|
-
}, null, 8, ["purchase-order", "received-info-map"])) :
|
|
2870
|
+
}, null, 8, ["purchase-order", "received-info-map"])) : B("", !0)
|
|
2870
2871
|
])
|
|
2871
2872
|
];
|
|
2872
2873
|
}),
|
|
2873
2874
|
default: ee(() => {
|
|
2874
|
-
var
|
|
2875
|
+
var q, me, Oe, Fe, Te;
|
|
2875
2876
|
return [
|
|
2876
2877
|
e("div", co, [
|
|
2877
|
-
|
|
2878
|
+
z.value.value === "overview" ? (l(), b(de, { key: 0 }, [
|
|
2878
2879
|
e("div", null, [
|
|
2879
2880
|
D(p, {
|
|
2880
2881
|
variant: "outlined",
|
|
2881
2882
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
2882
2883
|
}, {
|
|
2883
2884
|
default: ee(() => {
|
|
2884
|
-
var te, le, pe,
|
|
2885
|
+
var te, le, pe, he, _e, Re, ue, fe, Ie;
|
|
2885
2886
|
return [
|
|
2886
2887
|
e("div", uo, [
|
|
2887
2888
|
e("div", mo, y(v(u)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
@@ -2895,54 +2896,54 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2895
2896
|
}),
|
|
2896
2897
|
_: 1
|
|
2897
2898
|
}),
|
|
2898
|
-
D(
|
|
2899
|
-
label:
|
|
2900
|
-
class: Me(
|
|
2899
|
+
D(W, {
|
|
2900
|
+
label: j.value.status,
|
|
2901
|
+
class: Me(j.value.statusClass),
|
|
2901
2902
|
compact: ""
|
|
2902
2903
|
}, null, 8, ["label", "class"]),
|
|
2903
|
-
N.value ? (l(),
|
|
2904
|
-
D(
|
|
2904
|
+
N.value ? (l(), b("div", fo, [
|
|
2905
|
+
D(E, {
|
|
2905
2906
|
name: "local_shipping",
|
|
2906
2907
|
color: "#666666"
|
|
2907
2908
|
}),
|
|
2908
2909
|
e("span", yo, y(N.value), 1)
|
|
2909
|
-
])) :
|
|
2910
|
+
])) : B("", !0)
|
|
2910
2911
|
])
|
|
2911
2912
|
]),
|
|
2912
|
-
D(
|
|
2913
|
+
D(I),
|
|
2913
2914
|
e("div", vo, [
|
|
2914
|
-
e("div",
|
|
2915
|
-
e("div",
|
|
2915
|
+
e("div", ho, [
|
|
2916
|
+
e("div", bo, [
|
|
2916
2917
|
e("div", go, y(v(u)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
2917
2918
|
]),
|
|
2918
2919
|
e("div", _o, y(v(We)(((te = s.purchaseOrder) == null ? void 0 : te._id) ?? "")), 1)
|
|
2919
2920
|
]),
|
|
2920
|
-
(le = s.purchaseOrder) != null && le.effectiveAt ? (l(),
|
|
2921
|
+
(le = s.purchaseOrder) != null && le.effectiveAt ? (l(), b("div", So, [
|
|
2921
2922
|
e("div", xo, y(v(u)("inventory.transfer.receiveRequest.details.backdatedTo")), 1),
|
|
2922
2923
|
e("div", Oo, y(v(_t)(new Date((pe = s.purchaseOrder) == null ? void 0 : pe.effectiveAt))), 1)
|
|
2923
|
-
])) :
|
|
2924
|
+
])) : B("", !0),
|
|
2924
2925
|
e("div", wo, [
|
|
2925
2926
|
e("div", $o, y(v(u)("inventory.transfer.receiveRequest.details.type.title")), 1),
|
|
2926
2927
|
e("div", Co, y(v(u)(
|
|
2927
|
-
`inventory.transfer.receiveRequest.details.type.${
|
|
2928
|
+
`inventory.transfer.receiveRequest.details.type.${T.value.toLocaleLowerCase("en-US")}`
|
|
2928
2929
|
)), 1)
|
|
2929
2930
|
]),
|
|
2930
|
-
(_e = (
|
|
2931
|
+
(_e = (he = s.purchaseOrder) == null ? void 0 : he.supplier) != null && _e.name ? (l(), b("div", Ro, [
|
|
2931
2932
|
e("div", ko, y(v(u)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
2932
2933
|
e("div", Do, y((ue = (Re = s.purchaseOrder) == null ? void 0 : Re.supplier) == null ? void 0 : ue.name), 1)
|
|
2933
|
-
])) :
|
|
2934
|
-
s.transferTo ? (l(),
|
|
2934
|
+
])) : B("", !0),
|
|
2935
|
+
s.transferTo ? (l(), b("div", Ao, [
|
|
2935
2936
|
e("div", No, y(v(u)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
2936
2937
|
e("div", Fo, y(s.transferTo), 1)
|
|
2937
|
-
])) :
|
|
2938
|
-
(fe = s.purchaseOrder) != null && fe.ref ? (l(),
|
|
2938
|
+
])) : B("", !0),
|
|
2939
|
+
(fe = s.purchaseOrder) != null && fe.ref ? (l(), b("div", To, [
|
|
2939
2940
|
e("div", Io, y(v(u)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
2940
2941
|
e("div", Po, y(s.purchaseOrder.ref), 1)
|
|
2941
|
-
])) :
|
|
2942
|
-
(Ie = s.purchaseOrder) != null && Ie.remark ? (l(),
|
|
2942
|
+
])) : B("", !0),
|
|
2943
|
+
(Ie = s.purchaseOrder) != null && Ie.remark ? (l(), b("div", qo, [
|
|
2943
2944
|
e("div", Vo, y(v(u)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
2944
2945
|
e("div", Eo, y(s.purchaseOrder.remark), 1)
|
|
2945
|
-
])) :
|
|
2946
|
+
])) : B("", !0)
|
|
2946
2947
|
])
|
|
2947
2948
|
];
|
|
2948
2949
|
}),
|
|
@@ -2952,7 +2953,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2952
2953
|
D(Zs, {
|
|
2953
2954
|
"po-request": s.poRequest,
|
|
2954
2955
|
purchaseOrder: s.purchaseOrder,
|
|
2955
|
-
transferType:
|
|
2956
|
+
transferType: T.value,
|
|
2956
2957
|
transferToDbName: s.transferToDbName,
|
|
2957
2958
|
scope: s.scope
|
|
2958
2959
|
}, null, 8, ["po-request", "purchaseOrder", "transferType", "transferToDbName", "scope"]),
|
|
@@ -2961,7 +2962,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2961
2962
|
e("div", Uo, [
|
|
2962
2963
|
e("span", Bo, [
|
|
2963
2964
|
ke(y(Ae.value ? v(u)("inventory.transfer.receiveRequest.details.receivedItems") : v(u)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
2964
|
-
(me = (
|
|
2965
|
+
(me = (q = s.purchaseOrder) == null ? void 0 : q.netSuite) != null && me.missingItems && ((Fe = (Oe = s.purchaseOrder) == null ? void 0 : Oe.netSuite) == null ? void 0 : Fe.missingItems.length) > 0 ? (l(), re(Z, {
|
|
2965
2966
|
key: 0,
|
|
2966
2967
|
variant: "rich",
|
|
2967
2968
|
placement: "top",
|
|
@@ -2971,11 +2972,11 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2971
2972
|
var te, le;
|
|
2972
2973
|
return [
|
|
2973
2974
|
e("div", jo, [
|
|
2974
|
-
(l(!0),
|
|
2975
|
+
(l(!0), b(de, null, xe((le = (te = s.purchaseOrder) == null ? void 0 : te.netSuite) == null ? void 0 : le.missingItems, (pe, he) => (l(), b("div", {
|
|
2975
2976
|
class: "flex justify-center align-middle",
|
|
2976
|
-
key:
|
|
2977
|
+
key: he
|
|
2977
2978
|
}, [
|
|
2978
|
-
D(
|
|
2979
|
+
D(E, {
|
|
2979
2980
|
name: "arrow_right",
|
|
2980
2981
|
size: "sm"
|
|
2981
2982
|
}),
|
|
@@ -2985,51 +2986,51 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2985
2986
|
];
|
|
2986
2987
|
}),
|
|
2987
2988
|
default: ee(() => [
|
|
2988
|
-
D(
|
|
2989
|
+
D(E, {
|
|
2989
2990
|
name: "error",
|
|
2990
2991
|
color: "#ff2c2c",
|
|
2991
2992
|
size: "sm"
|
|
2992
2993
|
})
|
|
2993
2994
|
]),
|
|
2994
2995
|
_: 1
|
|
2995
|
-
})) :
|
|
2996
|
+
})) : B("", !0)
|
|
2996
2997
|
])
|
|
2997
2998
|
]),
|
|
2998
|
-
D(
|
|
2999
|
-
(l(!0),
|
|
2999
|
+
D(I),
|
|
3000
|
+
(l(!0), b(de, null, xe(((Te = s.purchaseOrder) == null ? void 0 : Te.items) ?? [], (te, le) => {
|
|
3000
3001
|
var pe;
|
|
3001
|
-
return l(),
|
|
3002
|
+
return l(), b("div", {
|
|
3002
3003
|
key: le,
|
|
3003
3004
|
class: "flex flex-col"
|
|
3004
3005
|
}, [
|
|
3005
3006
|
e("div", zo, [
|
|
3006
3007
|
e("div", Ko, [
|
|
3007
3008
|
ke(y(te.name) + " ", 1),
|
|
3008
|
-
|
|
3009
|
+
H(te) ? (l(), re(Z, {
|
|
3009
3010
|
key: 0,
|
|
3010
3011
|
variant: "rich",
|
|
3011
3012
|
placement: "top",
|
|
3012
3013
|
"z-index": 51
|
|
3013
3014
|
}, {
|
|
3014
3015
|
content: ee(() => {
|
|
3015
|
-
var
|
|
3016
|
+
var he, _e;
|
|
3016
3017
|
return [
|
|
3017
3018
|
e("div", Go, [
|
|
3018
3019
|
m[9] || (m[9] = e("div", { class: "font-semibold" }, "Submission changes", -1)),
|
|
3019
|
-
e("div", null, "Original Amount: " + y((
|
|
3020
|
+
e("div", null, "Original Amount: " + y((he = ce(te)) == null ? void 0 : he.originalAmount), 1),
|
|
3020
3021
|
e("div", null, " New Amount: " + y((_e = ce(te)) == null ? void 0 : _e.newAmount), 1)
|
|
3021
3022
|
])
|
|
3022
3023
|
];
|
|
3023
3024
|
}),
|
|
3024
3025
|
default: ee(() => [
|
|
3025
|
-
D(
|
|
3026
|
+
D(E, {
|
|
3026
3027
|
name: "error",
|
|
3027
3028
|
color: "#ff9500",
|
|
3028
3029
|
size: "sm"
|
|
3029
3030
|
})
|
|
3030
3031
|
]),
|
|
3031
3032
|
_: 2
|
|
3032
|
-
}, 1024)) :
|
|
3033
|
+
}, 1024)) : B("", !0)
|
|
3033
3034
|
]),
|
|
3034
3035
|
e("div", Ho, [
|
|
3035
3036
|
e("span", {
|
|
@@ -3039,26 +3040,26 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3039
3040
|
]),
|
|
3040
3041
|
e("div", Yo, [
|
|
3041
3042
|
e("div", Qo, y(te.code), 1),
|
|
3042
|
-
(pe = te.totalCost) != null && pe.amount && v(A).enableTotalCost ? (l(),
|
|
3043
|
+
(pe = te.totalCost) != null && pe.amount && v(A).enableTotalCost ? (l(), b("div", Jo, " (" + y(v(Ke)(te.totalCost)) + ") ", 1)) : B("", !0)
|
|
3043
3044
|
])
|
|
3044
3045
|
]);
|
|
3045
3046
|
}), 128)),
|
|
3046
|
-
+v(
|
|
3047
|
+
+v(be)(oe.value) ? (l(), b(de, { key: 0 }, [
|
|
3047
3048
|
e("div", Xo, [
|
|
3048
|
-
D(
|
|
3049
|
+
D(I)
|
|
3049
3050
|
]),
|
|
3050
3051
|
e("div", Zo, [
|
|
3051
3052
|
m[10] || (m[10] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Total:", -1)),
|
|
3052
3053
|
e("div", en, y(v(Ke)(oe.value)), 1)
|
|
3053
3054
|
])
|
|
3054
|
-
], 64)) :
|
|
3055
|
+
], 64)) : B("", !0)
|
|
3055
3056
|
])
|
|
3056
3057
|
])
|
|
3057
|
-
], 64)) :
|
|
3058
|
-
|
|
3059
|
-
(l(!0),
|
|
3060
|
-
var pe,
|
|
3061
|
-
return l(),
|
|
3058
|
+
], 64)) : z.value.value === "deliveryHistory" ? (l(), b("div", tn, [
|
|
3059
|
+
V.value.length ? (l(), b("div", an, [
|
|
3060
|
+
(l(!0), b(de, null, xe(V.value, (te, le) => {
|
|
3061
|
+
var pe, he, _e, Re, ue;
|
|
3062
|
+
return l(), b(de, { key: le }, [
|
|
3062
3063
|
e("div", ln, [
|
|
3063
3064
|
e("div", cn, [
|
|
3064
3065
|
e("div", un, [
|
|
@@ -3073,19 +3074,19 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3073
3074
|
}, null, 2)
|
|
3074
3075
|
]),
|
|
3075
3076
|
e("div", dn, [
|
|
3076
|
-
te.header === "Received" ? (l(), re(
|
|
3077
|
+
te.header === "Received" ? (l(), re(E, {
|
|
3077
3078
|
key: 0,
|
|
3078
3079
|
name: "local_shipping",
|
|
3079
3080
|
outline: "",
|
|
3080
3081
|
color: "#ffffff"
|
|
3081
|
-
})) :
|
|
3082
|
+
})) : B("", !0)
|
|
3082
3083
|
]),
|
|
3083
3084
|
e("div", mn, [
|
|
3084
3085
|
e("div", {
|
|
3085
3086
|
class: Me([
|
|
3086
3087
|
{
|
|
3087
|
-
"bg-fm-color-primary": le <
|
|
3088
|
-
"bg-white": le >=
|
|
3088
|
+
"bg-fm-color-primary": le < V.value.length - 1,
|
|
3089
|
+
"bg-white": le >= V.value.length - 1
|
|
3089
3090
|
},
|
|
3090
3091
|
"w-[2px] h-full"
|
|
3091
3092
|
])
|
|
@@ -3097,16 +3098,16 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3097
3098
|
e("div", yn, y(te.header), 1),
|
|
3098
3099
|
e("div", vn, y(te.date), 1)
|
|
3099
3100
|
]),
|
|
3100
|
-
e("div",
|
|
3101
|
-
te.header === "Received" && te.deliveryOrder && s.purchaseOrder ? (l(), re(
|
|
3101
|
+
e("div", hn, [
|
|
3102
|
+
te.header === "Received" && te.deliveryOrder && s.purchaseOrder ? (l(), re(br, {
|
|
3102
3103
|
key: 0,
|
|
3103
3104
|
deliveryOrder: te.deliveryOrder,
|
|
3104
3105
|
purchaseOrder: s.purchaseOrder,
|
|
3105
3106
|
onSubmitted: m[3] || (m[3] = () => {
|
|
3106
3107
|
f("update:show", !1), f("submitted");
|
|
3107
3108
|
})
|
|
3108
|
-
}, null, 8, ["deliveryOrder", "purchaseOrder"])) :
|
|
3109
|
-
(
|
|
3109
|
+
}, null, 8, ["deliveryOrder", "purchaseOrder"])) : B("", !0),
|
|
3110
|
+
(he = (pe = te.deliveryOrder) == null ? void 0 : pe.netSuite) != null && he.id ? (l(), re(Ve, { key: 1 }, {
|
|
3110
3111
|
default: ee(() => {
|
|
3111
3112
|
var fe, Ie;
|
|
3112
3113
|
return [
|
|
@@ -3116,23 +3117,23 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3116
3117
|
];
|
|
3117
3118
|
}),
|
|
3118
3119
|
_: 2
|
|
3119
|
-
}, 1024)) :
|
|
3120
|
+
}, 1024)) : B("", !0),
|
|
3120
3121
|
s.purchaseOrder && ((_e = te.deliveryOrder) != null && _e.id) ? (l(), re(Bt, {
|
|
3121
3122
|
key: 2,
|
|
3122
3123
|
"purchase-order-id": (Re = s.purchaseOrder) == null ? void 0 : Re._id,
|
|
3123
3124
|
"delivery-order-id": (ue = te.deliveryOrder) == null ? void 0 : ue.id
|
|
3124
|
-
}, null, 8, ["purchase-order-id", "delivery-order-id"])) :
|
|
3125
|
+
}, null, 8, ["purchase-order-id", "delivery-order-id"])) : B("", !0)
|
|
3125
3126
|
])
|
|
3126
3127
|
])
|
|
3127
3128
|
]),
|
|
3128
|
-
e("div",
|
|
3129
|
+
e("div", bn, [
|
|
3129
3130
|
e("div", gn, [
|
|
3130
3131
|
e("div", _n, [
|
|
3131
3132
|
e("div", {
|
|
3132
3133
|
class: Me([
|
|
3133
3134
|
{
|
|
3134
|
-
"bg-fm-color-primary": le <
|
|
3135
|
-
"bg-white": le >=
|
|
3135
|
+
"bg-fm-color-primary": le < V.value.length - 1,
|
|
3136
|
+
"bg-white": le >= V.value.length - 1
|
|
3136
3137
|
},
|
|
3137
3138
|
"w-[2px] h-full"
|
|
3138
3139
|
])
|
|
@@ -3146,17 +3147,17 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3146
3147
|
}, {
|
|
3147
3148
|
default: ee(() => [
|
|
3148
3149
|
e("div", xn, [
|
|
3149
|
-
(l(!0),
|
|
3150
|
+
(l(!0), b(de, null, xe(te.info, (fe, Ie) => (l(), b("div", {
|
|
3150
3151
|
key: Ie,
|
|
3151
3152
|
class: "flex flex-col gap-4"
|
|
3152
3153
|
}, [
|
|
3153
3154
|
e("div", On, y(fe == null ? void 0 : fe.label), 1),
|
|
3154
3155
|
e("div", wn, [
|
|
3155
|
-
(l(!0),
|
|
3156
|
+
(l(!0), b(de, null, xe(fe == null ? void 0 : fe.values, (Ee, $t) => (l(), b("div", {
|
|
3156
3157
|
key: $t,
|
|
3157
3158
|
class: "fm-typo-en-body-lg-600"
|
|
3158
3159
|
}, [
|
|
3159
|
-
typeof Ee == "string" ? (l(),
|
|
3160
|
+
typeof Ee == "string" ? (l(), b(de, { key: 0 }, [
|
|
3160
3161
|
ke(y(Ee), 1)
|
|
3161
3162
|
], 64)) : (l(), re(At(Ee), { key: 1 }))
|
|
3162
3163
|
]))), 128))
|
|
@@ -3170,7 +3171,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3170
3171
|
])
|
|
3171
3172
|
], 64);
|
|
3172
3173
|
}), 128))
|
|
3173
|
-
])) : (l(),
|
|
3174
|
+
])) : (l(), b("div", sn, [
|
|
3174
3175
|
D(ae),
|
|
3175
3176
|
e("div", null, [
|
|
3176
3177
|
e("img", {
|
|
@@ -3183,47 +3184,47 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3183
3184
|
D(ae),
|
|
3184
3185
|
D(ae)
|
|
3185
3186
|
]))
|
|
3186
|
-
])) :
|
|
3187
|
+
])) : B("", !0)
|
|
3187
3188
|
])
|
|
3188
3189
|
];
|
|
3189
3190
|
}),
|
|
3190
3191
|
"side-sheet-footer": ee(() => [
|
|
3191
3192
|
e("div", $n, [
|
|
3192
|
-
(l(!0),
|
|
3193
|
-
v(ot)[
|
|
3194
|
-
key:
|
|
3195
|
-
label: v(u)(v(ot)[
|
|
3196
|
-
onClick: (me) => ie(
|
|
3197
|
-
loading: O.value ===
|
|
3198
|
-
disabled: O.value !==
|
|
3199
|
-
variant: v(ot)[
|
|
3200
|
-
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) :
|
|
3193
|
+
(l(!0), b(de, null, xe(K.value, (q) => (l(), b(de, null, [
|
|
3194
|
+
v(ot)[q].available != !1 ? (l(), re(P, {
|
|
3195
|
+
key: q,
|
|
3196
|
+
label: v(u)(v(ot)[q].translationKey),
|
|
3197
|
+
onClick: (me) => ie(q),
|
|
3198
|
+
loading: O.value === q,
|
|
3199
|
+
disabled: O.value !== q && w.value,
|
|
3200
|
+
variant: v(ot)[q].buttonVariant
|
|
3201
|
+
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : B("", !0)
|
|
3201
3202
|
], 64))), 256)),
|
|
3202
|
-
v(x).ableToMarkReceived(s.purchaseOrder) && !K.value.includes("completeReceive") ? (l(), re(
|
|
3203
|
+
v(x).ableToMarkReceived(s.purchaseOrder) && !K.value.includes("completeReceive") ? (l(), re(P, {
|
|
3203
3204
|
key: 0,
|
|
3204
3205
|
label: v(u)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
3205
|
-
onClick: m[4] || (m[4] = (
|
|
3206
|
+
onClick: m[4] || (m[4] = (q) => ie("completeReceive")),
|
|
3206
3207
|
loading: O.value === "completeReceive",
|
|
3207
3208
|
disabled: O.value !== "completeReceive" && w.value
|
|
3208
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
3209
|
-
v(x).ableToMarkApproved(s.purchaseOrder) && s.canApprove && !K.value.includes("approveRequest") ? (l(), re(
|
|
3209
|
+
}, null, 8, ["label", "loading", "disabled"])) : B("", !0),
|
|
3210
|
+
v(x).ableToMarkApproved(s.purchaseOrder) && s.canApprove && !K.value.includes("approveRequest") ? (l(), re(P, {
|
|
3210
3211
|
key: 1,
|
|
3211
3212
|
label: v(u)("inventory.transfer.approval.actions.approveRequest"),
|
|
3212
|
-
onClick: m[5] || (m[5] = (
|
|
3213
|
+
onClick: m[5] || (m[5] = (q) => ie("approveRequest")),
|
|
3213
3214
|
loading: O.value === "approveRequest",
|
|
3214
3215
|
disabled: O.value !== "approveRequest" && w.value
|
|
3215
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
3216
|
-
v(x).ableToCreateFulfillment(s.purchaseOrder, s.poRequest) && o.scope === "approval" ? (l(), re(
|
|
3216
|
+
}, null, 8, ["label", "loading", "disabled"])) : B("", !0),
|
|
3217
|
+
v(x).ableToCreateFulfillment(s.purchaseOrder, s.poRequest) && o.scope === "approval" ? (l(), re(P, {
|
|
3217
3218
|
key: 2,
|
|
3218
3219
|
label: v(u)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
3219
|
-
onClick: m[6] || (m[6] = (
|
|
3220
|
+
onClick: m[6] || (m[6] = (q) => ie("processRequest")),
|
|
3220
3221
|
loading: O.value === "processRequest",
|
|
3221
3222
|
disabled: O.value !== "processRequest" && w.value
|
|
3222
|
-
}, null, 8, ["label", "loading", "disabled"])) :
|
|
3223
|
-
D(
|
|
3223
|
+
}, null, 8, ["label", "loading", "disabled"])) : B("", !0),
|
|
3224
|
+
D(P, {
|
|
3224
3225
|
label: v(u)("common.close"),
|
|
3225
3226
|
variant: "tertiary",
|
|
3226
|
-
onClick: m[7] || (m[7] = (
|
|
3227
|
+
onClick: m[7] || (m[7] = (q) => f("update:show", !1))
|
|
3227
3228
|
}, null, 8, ["label"])
|
|
3228
3229
|
])
|
|
3229
3230
|
]),
|