@feedmepos/mf-inventory-portal 1.2.43-dev.3 → 1.2.43
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-DkzM4M0_.js → App-DVsAv4k3.js} +3 -3
- package/dist/{ApprovalView-Dd5bg0yE.js → ApprovalView-EHDiLsmL.js} +5 -5
- package/dist/{BindingsDialog-FoyqtujI.js → BindingsDialog-DL2Dgzpf.js} +8 -8
- package/dist/{BindingsPicker-D-DS3PdA.js → BindingsPicker-BpdNqjSm.js} +3 -3
- package/dist/{BindingsTable-viPFJCPm.js → BindingsTable-C6KWR_kl.js} +3 -3
- package/dist/{ClosingDraftView-BlaIq6iS.js → ClosingDraftView-Byx8Zp15.js} +8 -8
- package/dist/{ClosingHistoryView-Byb3JIG8.js → ClosingHistoryView-BpFFNCqD.js} +22 -22
- package/dist/{ClosingTemplateView-Dil7tncI.js → ClosingTemplateView-DqfxzSBi.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-zvfi--WO.js → DeliveryOrderPrintPreview-DvaTq4XO.js} +9 -9
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-_dZiJ1_p.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Dadg0d7W.js} +60 -59
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DBSjX9GC.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-yp0tPBLr.js} +2 -2
- package/dist/{FmMultiselectDialog-CEnIfKkK.js → FmMultiselectDialog-M-tcECkK.js} +2 -2
- package/dist/{FmMultiselectDialog-D0HzUEWj.js → FmMultiselectDialog-iXXJJ181.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BG2lia-P.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CzYmgtjx.js} +3 -3
- package/dist/{ImportView-XUXFdNd5.js → ImportView-BGbe571V.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DgutuH9i.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-SkZJQR4H.js} +1 -1
- package/dist/{IngredientGroupView-7UTiTjiy.js → IngredientGroupView-B5AhZqGE.js} +5 -5
- package/dist/{IngredientsView-BkK-S9zb.js → IngredientsView-BkORfSgQ.js} +14 -14
- package/dist/{IntegrationView-BTXcGlp6.js → IntegrationView-DC1u6d1K.js} +12 -12
- package/dist/{InventoryBindingForm-Ch3ltUK8.js → InventoryBindingForm-D4ht1PMO.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dnv5PN-O.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CFWTE_sj.js} +14 -14
- package/dist/{InventoryBindingSummary-BVKjiIfs.js → InventoryBindingSummary-DKYKoLOt.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CbK0JN-7.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D1hfyifk.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-dv4OBeHd.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BfsTUKPQ.js} +2 -2
- package/dist/{PublishView-g_HbS6jK.js → PublishView-CMTQJ7Nv.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-BReNCrqT.js → PurchaseOrderPrintPreview-CzYlYowQ.js} +9 -9
- package/dist/ReceiveRequestView-CMHZZ9ul.js +2841 -0
- package/dist/{RecipeView-CtpQ2a0y.js → RecipeView-CIwSZuEd.js} +8 -8
- package/dist/{StockView-CEbdj6YL.js → StockView-DBY2sHlj.js} +341 -344
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bofw0-xa.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-VY2KygFc.js} +1 -1
- package/dist/{SupplierView-DzmEjA3j.js → SupplierView-CGsqiXR4.js} +11 -11
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-0A8OWe8S.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-BUs4-nO6.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-bxporBJ4.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-plLh-5S3.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-cDwtvgIk.js → TransferDetails.vue_vue_type_script_setup_true_lang-C8DluFT4.js} +306 -306
- package/dist/{TransferTemplateView-ySDW6lRS.js → TransferTemplateView-BEXsC7mp.js} +354 -354
- package/dist/{UnitView-Bv91T6ab.js → UnitView-BGRkT8Hr.js} +6 -6
- package/dist/{WarehouseView-kPmRof7c.js → WarehouseView-D7og7WBg.js} +5 -5
- package/dist/{WastageTemplateView-CZq9b3sy.js → WastageTemplateView-CwEUAwCw.js} +14 -14
- package/dist/{app-CV3h70p4.js → app-CioeggUO.js} +2296 -2343
- package/dist/app.js +7 -7
- package/dist/{closing-template-BBIWBX0k.js → closing-template-DrBlhTbC.js} +1 -1
- package/dist/{date2-CkCGGaAb.js → date2-mucf0HV-.js} +1 -1
- package/dist/{dayjs.min-Dd-afiDx.js → dayjs.min-C5lVIjQ1.js} +21 -21
- package/dist/{decimal-CS-CxyFz.js → decimal-EYAs7CPT.js} +2 -2
- package/dist/{defineDeepModel-D_bZeRgl.js → defineDeepModel-BQ_3cF8o.js} +1 -1
- package/dist/{duplicate-template-DPXszoh-.js → duplicate-template-K_oezMr4.js} +1 -1
- package/dist/feature-BkR98vGd.js +20161 -0
- package/dist/{format-time-from-id-BmBEi-Jw.js → format-time-from-id-qnJY4xQY.js} +1 -1
- package/dist/{format-unit-display-CDKsLgE4.js → format-unit-display-6I_PHQ9C.js} +246 -245
- package/dist/helper/form.d.ts +0 -1
- package/dist/helper/object.d.ts +0 -21
- package/dist/{import-export.helper-BLfWO3Yr.js → import-export.helper-vmA8rXwv.js} +5 -5
- package/dist/{index-DU9SwtH5.js → index-5yza2WJR.js} +1 -1
- package/dist/{index-BRDlwURl.js → index-DXJ9MIiE.js} +9 -9
- package/dist/{index-DAnsA0Mm.js → index-DqMYKP87.js} +3 -3
- package/dist/{lodash-CYR2InSF.js → lodash-D6iOSfR7.js} +1 -1
- package/dist/{netsuite-CPkzurdj.js → netsuite-DKE_ORM0.js} +70 -70
- package/dist/{purchase-order-template-DNQiObjY.js → purchase-order-template-Brpbfw8K.js} +1 -1
- package/dist/{rules-2RvCSF3q.js → rules-fd3m4inF.js} +3 -3
- package/dist/{stock-RjFuloPL.js → stock-8-vRigjE.js} +1 -1
- package/dist/{stock-BWBlXMgT.js → stock-CLX4SKxt.js} +3 -3
- package/dist/{supplier-8UMBjffB.js → supplier-Dlv1Clk5.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-DsrecsJw.js → use-ingredient-select-dialog-2j3Nbou_.js} +2 -2
- package/dist/{use-inventory-binding-dialog-C4bcTum8.js → use-inventory-binding-dialog-_S2XGoVU.js} +2 -2
- package/dist/{use-template-enabled-locations-2-_G7NryCx.js → use-template-enabled-locations-2-CWlQQnyD.js} +2 -2
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -1
- package/dist/views/receive-request/components/netsuite/NetSuitePanel.vue.d.ts +2 -3
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -3
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +3159 -0
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +0 -6
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -3
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +1 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +6 -6
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +7 -7
- package/dist/views/receive-request/constants/purchase-order-transaction-type.d.ts +2 -2
- package/dist/views/receive-request/helper/get-transfer-type.d.ts +2 -1
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -3
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +2 -3
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +3 -4
- package/dist/{vue-i18n-BU7aJfqP.js → vue-i18n-CCrvzsiW.js} +432 -432
- package/dist/{xlsx-JEiDJdww.js → xlsx-oL4emcgf.js} +398 -398
- package/dist/{xlsx.util-Cc50iTml.js → xlsx.util-JOeDOZ3P.js} +1 -1
- package/package.json +2 -2
- package/dist/ReceiveRequestView-ClT4-xel.js +0 -2894
- package/dist/feature-B_VTGztb.js +0 -25699
- package/dist/helper/reactivity.d.ts +0 -11
- package/dist/helper/reactivity.spec.d.ts +0 -1
- package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +0 -628
- package/dist/views/receive-request/components/transfer-form/composables/use-purchase-order-form-controller.d.ts +0 -22
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { p as $t, f as We } from "./format-time-from-id-
|
|
2
|
-
import { ref as J, computed as Q, h as L, defineComponent as $e, reactive as Ct, onMounted as yt, resolveComponent as
|
|
1
|
+
import { p as $t, f as We } from "./format-time-from-id-qnJY4xQY.js";
|
|
2
|
+
import { ref as J, computed as Q, h as L, defineComponent as $e, reactive as Ct, onMounted as yt, resolveComponent as G, openBlock as i, createBlock as re, withCtx as Z, createElementVNode as e, createVNode as D, unref as v, createElementBlock as _, toDisplayString as y, createCommentVNode as U, Fragment as ue, renderList as xe, createTextVNode as ke, normalizeClass as Me, watch as Rt, isRef as kt, resolveDynamicComponent as Dt } 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 At, u as De,
|
|
6
|
-
import { l as
|
|
7
|
-
import { F as Ft } from "./decimal-
|
|
8
|
-
import { t as Tt, c as
|
|
9
|
-
import { u as Ue, F as
|
|
5
|
+
import { o as At, u as De, P as M, Q as Ze, K as te, C as Nt, c as vt, t as it, T as bt, H as Ce, z as Qe, s as Pe, A as Te } from "./app-CioeggUO.js";
|
|
6
|
+
import { l as ht, d as gt, a as be, t as Ye, e as Ke } from "./rules-fd3m4inF.js";
|
|
7
|
+
import { F as Ft } from "./decimal-EYAs7CPT.js";
|
|
8
|
+
import { t as Tt, c as Pt, h as _t, a as He } from "./date2-mucf0HV-.js";
|
|
9
|
+
import { u as Ue, F as It, a as st } from "./feature-BkR98vGd.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-
|
|
12
|
-
import { useDialog as tt, useSnackbar as Be, components as Je, FmButtonVariant as
|
|
13
|
-
import { F as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { u as je, _ as Ut } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { _ as Bt, a as jt, b as zt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
11
|
+
import { u as et, a as dt, S as we } from "./netsuite-DKE_ORM0.js";
|
|
12
|
+
import { useDialog as tt, useSnackbar as Be, components as Je, FmButtonVariant as he, useProxiedModel as qt } from "@feedmepos/ui-library";
|
|
13
|
+
import { F as Ie } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
14
|
+
import { u as Vt, a as Et, P as Ge, f as Lt } from "./format-unit-display-6I_PHQ9C.js";
|
|
15
|
+
import { E as Mt } from "./empty-placeholder-wf6-BWE8.js";
|
|
16
|
+
import { u as je, _ as Ut } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-BUs4-nO6.js";
|
|
17
|
+
import { _ as Bt, a as jt, b as zt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CzYmgtjx.js";
|
|
18
18
|
import { u as Kt, R as pt } from "./usePromise-CbVUCxhj.js";
|
|
19
|
-
import { c as
|
|
20
|
-
import { i as
|
|
19
|
+
import { c as Ht } from "./index-DXJ9MIiE.js";
|
|
20
|
+
import { i as Gt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-yp0tPBLr.js";
|
|
21
21
|
import { F as ft } from "./form-mode.enum-BKiNVH6A.js";
|
|
22
|
-
import { d as St } from "./defineDeepModel-
|
|
23
|
-
import { u as Wt } from "./vue-i18n-
|
|
22
|
+
import { d as St } from "./defineDeepModel-BQ_3cF8o.js";
|
|
23
|
+
import { u as Wt } from "./vue-i18n-CCrvzsiW.js";
|
|
24
24
|
const Qt = At((C, a) => {
|
|
25
25
|
const o = De();
|
|
26
26
|
return {
|
|
27
27
|
async getShipments({
|
|
28
28
|
start: f,
|
|
29
|
-
end:
|
|
29
|
+
end: b
|
|
30
30
|
}) {
|
|
31
31
|
const n = o.currentLocationDBName, g = `${C.inventoryBackendUrl}/${n}/shipments`;
|
|
32
|
-
return await a.get(`${g}?start=${f}&end=${
|
|
32
|
+
return await a.get(`${g}?start=${f}&end=${b}`);
|
|
33
33
|
},
|
|
34
34
|
async getShipmentsByIds(f) {
|
|
35
35
|
if (f.length === 0)
|
|
36
36
|
return [];
|
|
37
|
-
const
|
|
37
|
+
const b = o.currentLocationDBName, n = `${C.inventoryBackendUrl}/${b}/shipments/get`;
|
|
38
38
|
return await a.post(n, { shipmentIds: f });
|
|
39
39
|
}
|
|
40
40
|
};
|
|
@@ -137,26 +137,26 @@ function Ot() {
|
|
|
137
137
|
const s = C.currentLocationDBName;
|
|
138
138
|
return n.doc.supplier.internal && n.operation === M.enum.confirmDraft && (n.operation = M.enum.submitRequest), await a.processPurchaseOrder(n, g || s);
|
|
139
139
|
}
|
|
140
|
-
async function
|
|
140
|
+
async function b(n, g) {
|
|
141
141
|
const s = C.currentLocationDBName;
|
|
142
142
|
return await a.processPurchaseOrderV2(n, g || s);
|
|
143
143
|
}
|
|
144
|
-
return (n) => o.useOperatePurchaseOrderV2 ?
|
|
144
|
+
return (n) => o.useOperatePurchaseOrderV2 ? b(n.operateV2, n.transferTo) : f(n.operate, n.transferTo);
|
|
145
145
|
}
|
|
146
146
|
var lt = /* @__PURE__ */ ((C) => (C.RECEIVE_REQUEST = "receive/request", C.APPROVAL = "approval", C))(lt || {});
|
|
147
147
|
const ze = J(), rt = J();
|
|
148
148
|
function Qn(C, a) {
|
|
149
|
-
const o = tt(), f = De(),
|
|
149
|
+
const o = tt(), f = De(), b = Ue();
|
|
150
150
|
et();
|
|
151
|
-
const n =
|
|
152
|
-
a != null && a.startDate && (a != null && a.endDate) ? a :
|
|
151
|
+
const n = Vt(), g = Et(), s = J(!1), c = Be(), O = je(), w = Qt(), d = J(new Array()), T = J(new Array()), S = J(
|
|
152
|
+
a != null && a.startDate && (a != null && a.endDate) ? a : Gt()
|
|
153
153
|
), A = Q(() => {
|
|
154
154
|
const B = new Date(S.value.startDate), q = new Date(S.value.endDate);
|
|
155
155
|
return {
|
|
156
156
|
start: Tt(B).toISOString(),
|
|
157
|
-
end:
|
|
157
|
+
end: Pt(q).toISOString()
|
|
158
158
|
};
|
|
159
|
-
}), l = J(new Array()), t = Nt(),
|
|
159
|
+
}), l = J(new Array()), t = Nt(), h = J(null);
|
|
160
160
|
async function u(B) {
|
|
161
161
|
function q(k) {
|
|
162
162
|
const x = {
|
|
@@ -167,12 +167,12 @@ function Qn(C, a) {
|
|
|
167
167
|
ze.value.show = N;
|
|
168
168
|
},
|
|
169
169
|
templateId: k,
|
|
170
|
-
lastClosingDate:
|
|
170
|
+
lastClosingDate: h.value
|
|
171
171
|
};
|
|
172
172
|
ze.value = x;
|
|
173
173
|
}
|
|
174
174
|
let oe;
|
|
175
|
-
|
|
175
|
+
b.mustUsePoTemplate && !(B != null && B.template) ? o.open({
|
|
176
176
|
title: "Create transfer",
|
|
177
177
|
message: "",
|
|
178
178
|
primaryActions: {
|
|
@@ -198,11 +198,11 @@ function Qn(C, a) {
|
|
|
198
198
|
"onUpdate:show"(oe) {
|
|
199
199
|
ze.value.show = oe;
|
|
200
200
|
},
|
|
201
|
-
lastClosingDate:
|
|
201
|
+
lastClosingDate: h.value
|
|
202
202
|
};
|
|
203
203
|
ze.value = q;
|
|
204
204
|
}
|
|
205
|
-
async function
|
|
205
|
+
async function P() {
|
|
206
206
|
d.value = [], T.value = [], s.value = !0;
|
|
207
207
|
try {
|
|
208
208
|
const B = await O.getPurchaseOrders(A.value);
|
|
@@ -210,7 +210,7 @@ function Qn(C, a) {
|
|
|
210
210
|
const q = B.flatMap((W) => W.shipmentIds || []).filter(Boolean), oe = q.length > 0 ? await w.getShipmentsByIds(q) : [];
|
|
211
211
|
T.value = oe;
|
|
212
212
|
const k = await t.readCurrentLocationLastClosing(!0), x = k == null ? void 0 : k._id;
|
|
213
|
-
x && (
|
|
213
|
+
x && (h.value = $t(x)), await b.awaitFeatureLoaded(() => b.mustUsePoTemplate) && await g.fetchTemplates();
|
|
214
214
|
const N = d.value.map((W) => {
|
|
215
215
|
var ie;
|
|
216
216
|
return ((ie = W.request) == null ? void 0 : ie.id) ?? "";
|
|
@@ -247,7 +247,7 @@ function Qn(C, a) {
|
|
|
247
247
|
function R() {
|
|
248
248
|
switch (C) {
|
|
249
249
|
case "receive/request":
|
|
250
|
-
return
|
|
250
|
+
return P();
|
|
251
251
|
case "approval":
|
|
252
252
|
return z();
|
|
253
253
|
}
|
|
@@ -302,7 +302,7 @@ function Qn(C, a) {
|
|
|
302
302
|
options: (
|
|
303
303
|
// auto receive for supplier to warehouse
|
|
304
304
|
(q === M.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
305
|
-
q === M.enum.completeReceive) &&
|
|
305
|
+
q === M.enum.completeReceive) && b.autoReceiveWarehouse ? {
|
|
306
306
|
autoReceive: !0
|
|
307
307
|
} : void 0
|
|
308
308
|
)
|
|
@@ -394,15 +394,15 @@ function Qn(C, a) {
|
|
|
394
394
|
}
|
|
395
395
|
function Jt(C, a) {
|
|
396
396
|
return a.reduce(
|
|
397
|
-
(f,
|
|
398
|
-
const n =
|
|
399
|
-
return n && (f =
|
|
397
|
+
(f, b) => {
|
|
398
|
+
const n = b.received.find((g) => g.sku._id === C._id);
|
|
399
|
+
return n && (f = ht(f, n.amount)), f;
|
|
400
400
|
},
|
|
401
401
|
Ft.toPrecision(gt(0), C.unit.precision)
|
|
402
402
|
);
|
|
403
403
|
}
|
|
404
404
|
function Xt(C) {
|
|
405
|
-
const { po: a, currentLocation: o, business: f, fulfilling:
|
|
405
|
+
const { po: a, currentLocation: o, business: f, fulfilling: b, por: n } = C, { name: g, address: s, regNo: c, legalName: O } = o.doc.profile, w = {
|
|
406
406
|
name: g,
|
|
407
407
|
legalName: O,
|
|
408
408
|
registrationNumber: c,
|
|
@@ -422,31 +422,31 @@ function Xt(C) {
|
|
|
422
422
|
city: a.supplier.address.city,
|
|
423
423
|
state: a.supplier.address.state,
|
|
424
424
|
country: a.supplier.address.country
|
|
425
|
-
}, T = a.items.map((
|
|
426
|
-
const { sku: z, measurement: R } =
|
|
427
|
-
Jt(
|
|
425
|
+
}, T = a.items.map((P) => {
|
|
426
|
+
const { sku: z, measurement: R } = P, Y = be(
|
|
427
|
+
Jt(P.sku, a.deliveryOrder || []),
|
|
428
428
|
!1
|
|
429
429
|
);
|
|
430
430
|
return {
|
|
431
431
|
code: z.code,
|
|
432
432
|
description: z.name,
|
|
433
|
-
quantity:
|
|
433
|
+
quantity: be(P.quantity, !1),
|
|
434
434
|
unit: (R == null ? void 0 : R.abbrev) || z.unit.abbrev,
|
|
435
435
|
received: Y,
|
|
436
|
-
cost:
|
|
437
|
-
value:
|
|
436
|
+
cost: P.totalCost ? `${P.totalCost.currency} ${It.toFormatString({
|
|
437
|
+
value: P.totalCost
|
|
438
438
|
})}` : void 0
|
|
439
439
|
};
|
|
440
|
-
}), S = a.deliveryOrder.map((
|
|
441
|
-
createdAt: _t(new Date(
|
|
442
|
-
ref:
|
|
443
|
-
remark:
|
|
444
|
-
items:
|
|
440
|
+
}), S = a.deliveryOrder.map((P) => ({
|
|
441
|
+
createdAt: _t(new Date(P.createdAt)),
|
|
442
|
+
ref: P.deliveryOrderNumber,
|
|
443
|
+
remark: P.remark || "",
|
|
444
|
+
items: P.received.map((z) => {
|
|
445
445
|
var R;
|
|
446
446
|
return {
|
|
447
447
|
code: z.sku.code,
|
|
448
448
|
description: z.sku.name,
|
|
449
|
-
quantity:
|
|
449
|
+
quantity: be(z.amount),
|
|
450
450
|
unit: ((R = z.measurement) == null ? void 0 : R.abbrev) || z.sku.unit.abbrev
|
|
451
451
|
};
|
|
452
452
|
})
|
|
@@ -458,10 +458,10 @@ function Xt(C) {
|
|
|
458
458
|
];
|
|
459
459
|
let l = "Inventory Receive Note";
|
|
460
460
|
if (a.supplier.internal ? (l = "Inventory Transfer Note", A.includes((f == null ? void 0 : f._id) || "") && (l = "Stock Request")) : l = "Purchase Order", n) {
|
|
461
|
-
const
|
|
462
|
-
o.dbName ===
|
|
461
|
+
const P = n.from.dbName;
|
|
462
|
+
o.dbName === P || (l = "Inventory Receive Note");
|
|
463
463
|
}
|
|
464
|
-
const
|
|
464
|
+
const h = {
|
|
465
465
|
title: l,
|
|
466
466
|
businessName: f == null ? void 0 : f.name,
|
|
467
467
|
logo: f == null ? void 0 : f.thumbnail,
|
|
@@ -474,8 +474,8 @@ function Xt(C) {
|
|
|
474
474
|
items: T,
|
|
475
475
|
status: a.status,
|
|
476
476
|
deliveryOrders: S
|
|
477
|
-
}, u = new URL(window.location.href), $ =
|
|
478
|
-
u.pathname = u.hostname.includes("portal.feedme") ? `/inventory/${$}` : `/${$}`, u.searchParams.append("data", JSON.stringify(
|
|
477
|
+
}, u = new URL(window.location.href), $ = b && (a.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
478
|
+
u.pathname = u.hostname.includes("portal.feedme") ? `/inventory/${$}` : `/${$}`, u.searchParams.append("data", JSON.stringify(h)), window.open(u.href, "_blank", "noreferrer");
|
|
479
479
|
}
|
|
480
480
|
const Le = {
|
|
481
481
|
submitRequest: {
|
|
@@ -540,7 +540,7 @@ const Le = {
|
|
|
540
540
|
}
|
|
541
541
|
};
|
|
542
542
|
function Yn(C, a, o) {
|
|
543
|
-
const f = De(),
|
|
543
|
+
const f = De(), b = et(), n = ct(), { t: g } = ut();
|
|
544
544
|
function s(S) {
|
|
545
545
|
switch (S.status) {
|
|
546
546
|
case "DRAFT":
|
|
@@ -575,7 +575,7 @@ function Yn(C, a, o) {
|
|
|
575
575
|
return Object.values(M.enum).includes(S);
|
|
576
576
|
}
|
|
577
577
|
async function O(S, A, l) {
|
|
578
|
-
var
|
|
578
|
+
var h, u, $, P, z, R;
|
|
579
579
|
const t = vt(A);
|
|
580
580
|
if (S === ye.Print) {
|
|
581
581
|
const Y = (l == null ? void 0 : l.toInventoryLocation) ?? f.currentLocation;
|
|
@@ -583,7 +583,7 @@ function Yn(C, a, o) {
|
|
|
583
583
|
const K = f.locationRestaurantFromCore(Y.doc._id);
|
|
584
584
|
K !== null && (Y.doc = K);
|
|
585
585
|
}
|
|
586
|
-
((
|
|
586
|
+
((h = l == null ? void 0 : l.netSuite) != null && h.refNo || (u = t.netSuite) != null && u.refNo) && (t.ref = [(($ = l == null ? void 0 : l.netSuite) == null ? void 0 : $.refNo) || ((P = t.netSuite) == null ? void 0 : P.refNo)].filter((K) => K).join(" ")), Xt({
|
|
587
587
|
po: t,
|
|
588
588
|
currentLocation: Y,
|
|
589
589
|
business: n.currentBusiness.value,
|
|
@@ -633,14 +633,14 @@ function Yn(C, a, o) {
|
|
|
633
633
|
accessorKey: "items.length",
|
|
634
634
|
header: () => g("inventory.transfer.table.noOfItems"),
|
|
635
635
|
cell: (l) => {
|
|
636
|
-
const t = l.row.original.version || "1",
|
|
636
|
+
const t = l.row.original.version || "1", h = l.getValue();
|
|
637
637
|
return L("div", { class: "flex items-center gap-2" }, [
|
|
638
|
-
|
|
638
|
+
h,
|
|
639
639
|
t !== "1" ? L(
|
|
640
640
|
"div",
|
|
641
641
|
{ class: "py-3" },
|
|
642
642
|
L(
|
|
643
|
-
|
|
643
|
+
Ie,
|
|
644
644
|
L(
|
|
645
645
|
"div",
|
|
646
646
|
{
|
|
@@ -666,7 +666,7 @@ function Yn(C, a, o) {
|
|
|
666
666
|
...(A = n.sessionUser.value) != null && A.role.isAdmin ? [
|
|
667
667
|
{
|
|
668
668
|
id: "statusForAdmin",
|
|
669
|
-
header: () => L(
|
|
669
|
+
header: () => L(Ie, {}, () => `${g("inventory.transfer.table.status")}`),
|
|
670
670
|
cell(l) {
|
|
671
671
|
return l.row.original.status;
|
|
672
672
|
},
|
|
@@ -678,9 +678,9 @@ function Yn(C, a, o) {
|
|
|
678
678
|
accessorKey: "status",
|
|
679
679
|
header: () => g("inventory.transfer.table.status"),
|
|
680
680
|
cell(l) {
|
|
681
|
-
const t = l.getValue(),
|
|
682
|
-
let z = g(`inventory.transfer.status.${
|
|
683
|
-
|
|
681
|
+
const t = l.getValue(), h = Xe(l.row.original), { partial: u, over: $ } = nt(h), P = at(t ?? "", u, $);
|
|
682
|
+
let z = g(`inventory.transfer.status.${P}`), R = `${t ?? ""}`.toLocaleLowerCase("en-us");
|
|
683
|
+
P === te.enum.CLOSE && (z = `${g(`inventory.transfer.status.${te.enum.COMPLETE}`)}`), P === "PARTIAL_RECEIVED" && R === te.enum.PROCESSING.toLocaleLowerCase("en-us") && (R = te.enum.RECEIVING.toLocaleLowerCase("en-us"));
|
|
684
684
|
let Y = null;
|
|
685
685
|
const K = o.value.find((se) => se.ref === l.row.original._id);
|
|
686
686
|
if (K != null && K.milestones && K.milestones.length > 0) {
|
|
@@ -740,8 +740,8 @@ function Yn(C, a, o) {
|
|
|
740
740
|
{
|
|
741
741
|
id: "action",
|
|
742
742
|
cell(l) {
|
|
743
|
-
const t = l.row.original,
|
|
744
|
-
return mt(
|
|
743
|
+
const t = l.row.original, h = s(t);
|
|
744
|
+
return mt(h, (u) => O(u, t));
|
|
745
745
|
},
|
|
746
746
|
enableSorting: !1,
|
|
747
747
|
size: 40,
|
|
@@ -751,19 +751,19 @@ function Yn(C, a, o) {
|
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
753
|
];
|
|
754
|
-
if (
|
|
754
|
+
if (b.isEnabled) {
|
|
755
755
|
const l = [
|
|
756
756
|
{
|
|
757
757
|
id: "netsuiteTransferOrder",
|
|
758
758
|
accessorFn: (t) => {
|
|
759
|
-
var
|
|
760
|
-
return (
|
|
759
|
+
var h;
|
|
760
|
+
return (h = t.netSuite) != null && h.id ? `${t.netSuite.refNo} (${t.netSuite.id})` : "N/A";
|
|
761
761
|
},
|
|
762
762
|
header: () => "NetSuite Order (ID)",
|
|
763
763
|
cell(t) {
|
|
764
764
|
var u;
|
|
765
|
-
const
|
|
766
|
-
return (u =
|
|
765
|
+
const h = t.row.original;
|
|
766
|
+
return (u = h.netSuite) != null && u.id ? `${h.netSuite.refNo} (${h.netSuite.id})` : "N/A";
|
|
767
767
|
},
|
|
768
768
|
enableSorting: !1,
|
|
769
769
|
size: 200,
|
|
@@ -775,8 +775,8 @@ function Yn(C, a, o) {
|
|
|
775
775
|
{
|
|
776
776
|
id: "netsuiteTransactionNumber",
|
|
777
777
|
accessorFn: (t) => {
|
|
778
|
-
var
|
|
779
|
-
return ((u = (
|
|
778
|
+
var h, u;
|
|
779
|
+
return ((u = (h = t.netSuite) == null ? void 0 : h.additionalInfo) == null ? void 0 : u.transactionnumber) ?? "N/A";
|
|
780
780
|
},
|
|
781
781
|
header: () => "NetSuite Transaction No.",
|
|
782
782
|
cell(t) {
|
|
@@ -833,7 +833,7 @@ function Yn(C, a, o) {
|
|
|
833
833
|
...(A = n.sessionUser.value) != null && A.role.isAdmin ? [
|
|
834
834
|
{
|
|
835
835
|
id: "statusForAdmin",
|
|
836
|
-
header: () => L(
|
|
836
|
+
header: () => L(Ie, {}, () => `${g("inventory.transfer.table.status")}`),
|
|
837
837
|
cell(l) {
|
|
838
838
|
return l.row.original.status;
|
|
839
839
|
},
|
|
@@ -845,14 +845,14 @@ function Yn(C, a, o) {
|
|
|
845
845
|
accessorKey: "purchaseOrder.status",
|
|
846
846
|
header: () => g("inventory.transfer.table.status"),
|
|
847
847
|
cell(l) {
|
|
848
|
-
const t = l.row.original,
|
|
848
|
+
const t = l.row.original, h = l.getValue();
|
|
849
849
|
if (!t.purchaseOrder)
|
|
850
850
|
return L(Je.FmChip, {
|
|
851
851
|
label: "N/A",
|
|
852
852
|
compact: !0
|
|
853
853
|
});
|
|
854
|
-
const u = Xe(t.purchaseOrder), { partial: $, over:
|
|
855
|
-
let R = g(`inventory.transfer.status.${z}`), Y = `${
|
|
854
|
+
const u = Xe(t.purchaseOrder), { partial: $, over: P } = nt(u), z = at(h ?? "", $, P);
|
|
855
|
+
let R = g(`inventory.transfer.status.${z}`), Y = `${h ?? ""}`.toLocaleLowerCase("en-us");
|
|
856
856
|
return z === te.enum.CLOSE && (R = `${g(`inventory.transfer.status.${te.enum.COMPLETE}`)}`), z === "PARTIAL_RECEIVED" && Y === te.enum.PROCESSING.toLocaleLowerCase("en-us") && (Y = te.enum.RECEIVING.toLocaleLowerCase("en-us")), t.rejectedAt && (R = g("inventory.transfer.status.REJECT"), Y = te.enum.REJECT.toLocaleLowerCase("en-us")), L(
|
|
857
857
|
"div",
|
|
858
858
|
{
|
|
@@ -864,7 +864,7 @@ function Yn(C, a, o) {
|
|
|
864
864
|
class: [
|
|
865
865
|
"fm-status-badge",
|
|
866
866
|
`fm-status-badge-${Y}`,
|
|
867
|
-
|
|
867
|
+
P && "fm-status-badge-error"
|
|
868
868
|
].filter(Boolean).join(" ")
|
|
869
869
|
},
|
|
870
870
|
`${R}`
|
|
@@ -893,19 +893,19 @@ function Yn(C, a, o) {
|
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
895
|
];
|
|
896
|
-
if (
|
|
896
|
+
if (b.isEnabled) {
|
|
897
897
|
const l = [
|
|
898
898
|
{
|
|
899
899
|
id: "netsuiteTransferOrder",
|
|
900
900
|
accessorFn: (t) => {
|
|
901
|
-
var
|
|
902
|
-
return (
|
|
901
|
+
var h;
|
|
902
|
+
return (h = t.netSuite) != null && h.id ? `${t.netSuite.refNo} (${t.netSuite.id})` : "N/A";
|
|
903
903
|
},
|
|
904
904
|
header: () => "NetSuite Order (ID)",
|
|
905
905
|
cell(t) {
|
|
906
906
|
var u;
|
|
907
|
-
const
|
|
908
|
-
return (u =
|
|
907
|
+
const h = t.row.original;
|
|
908
|
+
return (u = h.netSuite) != null && u.id ? `${h.netSuite.refNo} (${h.netSuite.id})` : "N/A";
|
|
909
909
|
},
|
|
910
910
|
enableSorting: !1,
|
|
911
911
|
size: 200,
|
|
@@ -917,8 +917,8 @@ function Yn(C, a, o) {
|
|
|
917
917
|
{
|
|
918
918
|
id: "netsuiteTransactionNumber",
|
|
919
919
|
accessorFn: (t) => {
|
|
920
|
-
var
|
|
921
|
-
return ((u = (
|
|
920
|
+
var h, u;
|
|
921
|
+
return ((u = (h = t.netSuite) == null ? void 0 : h.additionalInfo) == null ? void 0 : u.transactionnumber) ?? "N/A";
|
|
922
922
|
},
|
|
923
923
|
header: () => "NetSuite Transaction No.",
|
|
924
924
|
cell(t) {
|
|
@@ -953,7 +953,7 @@ const Zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
953
953
|
id: "",
|
|
954
954
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
955
955
|
items: []
|
|
956
|
-
}),
|
|
956
|
+
}), b = J(), n = a;
|
|
957
957
|
yt(() => {
|
|
958
958
|
o.purchaseOrder && (f.items = o.purchaseOrder.items.map((s) => ({
|
|
959
959
|
id: s.id,
|
|
@@ -964,10 +964,10 @@ const Zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
964
964
|
});
|
|
965
965
|
const g = Q(() => f.items.length <= 10);
|
|
966
966
|
return (s, c) => {
|
|
967
|
-
const O =
|
|
967
|
+
const O = G("FmTable"), w = G("FmButton"), d = G("FmForm");
|
|
968
968
|
return i(), re(d, {
|
|
969
969
|
ref_key: "formRef",
|
|
970
|
-
ref:
|
|
970
|
+
ref: b,
|
|
971
971
|
class: "bg-white flex flex-col gap-32 rounded-3xl p-24 w-[800px]",
|
|
972
972
|
onValidationFailed: console.log,
|
|
973
973
|
onValidationSuccess: c[1] || (c[1] = () => o.confirm(f))
|
|
@@ -1041,15 +1041,15 @@ const Zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1041
1041
|
unit: S.sku.unit,
|
|
1042
1042
|
"onUpdate:modelValue": (t) => {
|
|
1043
1043
|
if (!t) return;
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1044
|
+
const h = f.items.find((u) => u.id === S.id || u.sku._id === S.sku._id);
|
|
1045
|
+
h && (h.amount = t.amount);
|
|
1046
1046
|
},
|
|
1047
1047
|
disableUnit: !0,
|
|
1048
1048
|
rules: [
|
|
1049
1049
|
v(jt)(
|
|
1050
|
-
+v(
|
|
1050
|
+
+v(be)({ amount: 0, precision: 0 })
|
|
1051
1051
|
),
|
|
1052
|
-
v(zt)(+v(
|
|
1052
|
+
v(zt)(+v(be)(A.quantity))
|
|
1053
1053
|
],
|
|
1054
1054
|
applyDefaultRules: !0
|
|
1055
1055
|
});
|
|
@@ -1086,64 +1086,64 @@ const Zt = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1086
1086
|
submitRequest: {
|
|
1087
1087
|
translationKey: "inventory.transfer.receiveRequest.actions.submitRequest",
|
|
1088
1088
|
color: "primary",
|
|
1089
|
-
buttonVariant:
|
|
1089
|
+
buttonVariant: he.Primary
|
|
1090
1090
|
},
|
|
1091
1091
|
confirmDraft: {
|
|
1092
1092
|
translationKey: "inventory.transfer.receiveRequest.actions.confirmDraft",
|
|
1093
1093
|
color: "primary",
|
|
1094
|
-
buttonVariant:
|
|
1094
|
+
buttonVariant: he.Primary
|
|
1095
1095
|
},
|
|
1096
1096
|
cancelDraft: {
|
|
1097
1097
|
translationKey: "inventory.transfer.receiveRequest.actions.cancelDraft",
|
|
1098
1098
|
color: "system-error-300",
|
|
1099
|
-
buttonVariant:
|
|
1099
|
+
buttonVariant: he.Destructive
|
|
1100
1100
|
},
|
|
1101
1101
|
approveDraft: {
|
|
1102
1102
|
translationKey: "inventory.transfer.receiveRequest.actions.approveDraft",
|
|
1103
1103
|
color: "primary",
|
|
1104
|
-
buttonVariant:
|
|
1104
|
+
buttonVariant: he.Primary
|
|
1105
1105
|
},
|
|
1106
1106
|
rejectDraft: {
|
|
1107
1107
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectDraft",
|
|
1108
1108
|
color: "system-error-300",
|
|
1109
|
-
buttonVariant:
|
|
1109
|
+
buttonVariant: he.Destructive
|
|
1110
1110
|
},
|
|
1111
1111
|
approveRequest: {
|
|
1112
1112
|
translationKey: "inventory.transfer.receiveRequest.actions.approveRequest",
|
|
1113
1113
|
color: "primary",
|
|
1114
|
-
buttonVariant:
|
|
1114
|
+
buttonVariant: he.Primary
|
|
1115
1115
|
},
|
|
1116
1116
|
processRequest: {
|
|
1117
1117
|
translationKey: "inventory.transfer.receiveRequest.actions.processRequest",
|
|
1118
1118
|
color: "primary",
|
|
1119
|
-
buttonVariant:
|
|
1119
|
+
buttonVariant: he.Primary
|
|
1120
1120
|
},
|
|
1121
1121
|
receiveStock: {
|
|
1122
1122
|
translationKey: "inventory.transfer.receiveRequest.actions.receiveStock",
|
|
1123
1123
|
color: "primary",
|
|
1124
|
-
buttonVariant:
|
|
1124
|
+
buttonVariant: he.Primary,
|
|
1125
1125
|
available: !1
|
|
1126
1126
|
},
|
|
1127
1127
|
completeReceive: {
|
|
1128
1128
|
translationKey: "inventory.transfer.receiveRequest.actions.completeReceive",
|
|
1129
1129
|
color: "primary",
|
|
1130
|
-
buttonVariant:
|
|
1130
|
+
buttonVariant: he.Plain
|
|
1131
1131
|
},
|
|
1132
1132
|
rejectRequest: {
|
|
1133
1133
|
translationKey: "inventory.transfer.receiveRequest.actions.rejectRequest",
|
|
1134
1134
|
color: "system-error-300",
|
|
1135
|
-
buttonVariant:
|
|
1135
|
+
buttonVariant: he.Destructive
|
|
1136
1136
|
},
|
|
1137
1137
|
closeRequest: {
|
|
1138
1138
|
translationKey: "inventory.transfer.receiveRequest.actions.closeRequest",
|
|
1139
1139
|
color: "system-error-300",
|
|
1140
|
-
buttonVariant:
|
|
1140
|
+
buttonVariant: he.Destructive,
|
|
1141
1141
|
available: !1
|
|
1142
1142
|
},
|
|
1143
1143
|
returnStock: {
|
|
1144
1144
|
translationKey: "inventory.transfer.receiveRequest.actions.returnStock",
|
|
1145
1145
|
color: "primary",
|
|
1146
|
-
buttonVariant:
|
|
1146
|
+
buttonVariant: he.Primary,
|
|
1147
1147
|
available: !1
|
|
1148
1148
|
}
|
|
1149
1149
|
};
|
|
@@ -1162,8 +1162,8 @@ function rs() {
|
|
|
1162
1162
|
var n, g;
|
|
1163
1163
|
if (!C.acceptRequireFulfillment || !a || !o || a.status !== te.enum.PROCESSING || !o.processedAt)
|
|
1164
1164
|
return !1;
|
|
1165
|
-
const f = (n = o == null ? void 0 : o.from) == null ? void 0 : n.dbName,
|
|
1166
|
-
return !(f.startsWith("restaurant_") &&
|
|
1165
|
+
const f = (n = o == null ? void 0 : o.from) == null ? void 0 : n.dbName, b = (g = o == null ? void 0 : o.to) == null ? void 0 : g.dbName;
|
|
1166
|
+
return !(f.startsWith("restaurant_") && b.startsWith("restaurant_"));
|
|
1167
1167
|
}
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
@@ -1176,7 +1176,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1176
1176
|
scope: {}
|
|
1177
1177
|
},
|
|
1178
1178
|
setup(C) {
|
|
1179
|
-
const a = C, o = et(), f = Be(),
|
|
1179
|
+
const a = C, o = et(), f = Be(), b = tt(), n = J(!1);
|
|
1180
1180
|
Q(() => {
|
|
1181
1181
|
var w, d, T, S;
|
|
1182
1182
|
let s = !0;
|
|
@@ -1185,7 +1185,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1185
1185
|
return c && ((w = c == null ? void 0 : c.supplier) != null && w.internal ? (!O && c.status == te.enum.DRAFT && (s = !1), O && !((d = O == null ? void 0 : O.netSuite) != null && d.id) && (s = !1), a.isTransferBetweenOutlets && (s = !1)) : ((c == null ? void 0 : c.status) !== te.enum.REQUESTING && c.supplier.internal && (s = !1), !O && !((T = c == null ? void 0 : c.netSuite) != null && T.id) && (s = !1), !O && ((S = c == null ? void 0 : c.netSuite) != null && S.id) && (c == null ? void 0 : c.status) == te.enum.REQUESTING && (s = !1))), s;
|
|
1186
1186
|
});
|
|
1187
1187
|
async function g() {
|
|
1188
|
-
n.value ||
|
|
1188
|
+
n.value || b.open({
|
|
1189
1189
|
title: "Sync with NetSuite",
|
|
1190
1190
|
contentComponent: L("div", [
|
|
1191
1191
|
L("p", "Are you sure you want to sync now?"),
|
|
@@ -1225,7 +1225,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1225
1225
|
});
|
|
1226
1226
|
}
|
|
1227
1227
|
return (s, c) => {
|
|
1228
|
-
const O =
|
|
1228
|
+
const O = G("FmButton");
|
|
1229
1229
|
return i(), _("div", os, [
|
|
1230
1230
|
D(O, {
|
|
1231
1231
|
"prepend-icon": "sync",
|
|
@@ -1249,7 +1249,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1249
1249
|
}, 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 = {
|
|
1250
1250
|
key: 1,
|
|
1251
1251
|
class: "flex flex-col gap-4"
|
|
1252
|
-
}, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vs = { class: "fm-typo-en-body-lg-600" },
|
|
1252
|
+
}, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vs = { class: "fm-typo-en-body-lg-600" }, bs = { key: 0 }, hs = { key: 1 }, gs = {
|
|
1253
1253
|
key: 2,
|
|
1254
1254
|
class: "flex flex-col gap-4"
|
|
1255
1255
|
}, _s = { class: "fm-typo-en-body-lg-600" }, Ss = {
|
|
@@ -1266,12 +1266,12 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1266
1266
|
scope: {}
|
|
1267
1267
|
},
|
|
1268
1268
|
setup(C) {
|
|
1269
|
-
const a = C, o = et(), f = je(),
|
|
1269
|
+
const a = C, o = et(), f = je(), b = J(a.poRequest);
|
|
1270
1270
|
yt(async () => {
|
|
1271
1271
|
var c;
|
|
1272
1272
|
if (!a.poRequest && ((c = a.purchaseOrder) != null && c._id)) {
|
|
1273
1273
|
const O = await f.getLatestPurchaseOrderRequest(a.purchaseOrder._id);
|
|
1274
|
-
|
|
1274
|
+
b.value = O;
|
|
1275
1275
|
}
|
|
1276
1276
|
});
|
|
1277
1277
|
const n = Q(
|
|
@@ -1282,8 +1282,8 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1282
1282
|
).fullName;
|
|
1283
1283
|
}
|
|
1284
1284
|
), g = Q(() => {
|
|
1285
|
-
var c, O, w, d, T, S, A, l, t,
|
|
1286
|
-
return (w = (O = (c = a.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : O.additionalInfo) != null && w.transactionnumber ? (S = (T = (d = a.purchaseOrder) == null ? void 0 : d.netSuite) == null ? void 0 : T.additionalInfo) == null ? void 0 : S.transactionnumber : (t = (l = (A =
|
|
1285
|
+
var c, O, w, d, T, S, A, l, t, h, u, $;
|
|
1286
|
+
return (w = (O = (c = a.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : O.additionalInfo) != null && w.transactionnumber ? (S = (T = (d = a.purchaseOrder) == null ? void 0 : d.netSuite) == null ? void 0 : T.additionalInfo) == null ? void 0 : S.transactionnumber : (t = (l = (A = b.value) == null ? void 0 : A.netSuite) == null ? void 0 : l.additionalInfo) != null && t.transactionnumber ? ($ = (u = (h = b.value) == null ? void 0 : h.netSuite) == null ? void 0 : u.additionalInfo) == null ? void 0 : $.transactionnumber : null;
|
|
1287
1287
|
}), s = Q(() => {
|
|
1288
1288
|
var c, O, w, d, T, S;
|
|
1289
1289
|
return (O = (c = a.purchaseOrder) == null ? void 0 : c.deliveryFullfillment) != null && O.length && ((d = (w = a.purchaseOrder) == null ? void 0 : w.deliveryFullfillment) == null ? void 0 : d.length) > 0 ? (S = (T = a.purchaseOrder) == null ? void 0 : T.deliveryFullfillment) == null ? void 0 : S.map((A) => {
|
|
@@ -1292,29 +1292,29 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1292
1292
|
}).join(", ") : "N/A";
|
|
1293
1293
|
});
|
|
1294
1294
|
return (c, O) => {
|
|
1295
|
-
var w, d, T, S, A, l, t,
|
|
1295
|
+
var w, d, T, S, A, l, t, h, u, $, P, z, R, Y, K, se;
|
|
1296
1296
|
return v(o).isEnabled ? (i(), _("div", as, [
|
|
1297
1297
|
e("div", ls, [
|
|
1298
1298
|
O[0] || (O[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1299
1299
|
e("div", is, y(n.value || "N/A"), 1)
|
|
1300
1300
|
]),
|
|
1301
1301
|
!c.isTransferBetweenOutlets && c.scope === v(lt).RECEIVE_REQUEST ? (i(), _("div", cs, [
|
|
1302
|
-
e("div", us, " NetSuite " + y((d = (w = c.purchaseOrder) == null ? void 0 : w.netSuite) != null && d.recordType ? v(
|
|
1302
|
+
e("div", us, " NetSuite " + y((d = (w = c.purchaseOrder) == null ? void 0 : w.netSuite) != null && d.recordType ? v(bt)((S = (T = c.purchaseOrder) == null ? void 0 : T.netSuite) == null ? void 0 : S.recordType) : c.transferType === v(Ge).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1303
1303
|
e("div", ds, [
|
|
1304
|
-
(l = (A = c.purchaseOrder) == null ? void 0 : A.netSuite) != null && l.id ? (i(), _("span", ms, y((
|
|
1304
|
+
(l = (A = c.purchaseOrder) == null ? void 0 : A.netSuite) != null && l.id ? (i(), _("span", ms, y((h = (t = c.purchaseOrder) == null ? void 0 : t.netSuite) == null ? void 0 : h.refNo) + " (" + y(($ = (u = c.purchaseOrder) == null ? void 0 : u.netSuite) == null ? void 0 : $.id) + ") ", 1)) : (i(), _("span", ps, "N/A"))
|
|
1305
1305
|
])
|
|
1306
1306
|
])) : U("", !0),
|
|
1307
|
-
!c.isTransferBetweenOutlets &&
|
|
1308
|
-
e("div", ys, " (Request) NetSuite " + y(c.transferType === v(Ge).
|
|
1307
|
+
!c.isTransferBetweenOutlets && b.value || c.scope === v(lt).APPROVAL ? (i(), _("div", fs, [
|
|
1308
|
+
e("div", ys, " (Request) NetSuite " + y(c.transferType === v(Ge).PURCHASE ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1309
1309
|
e("div", vs, [
|
|
1310
|
-
(z = (
|
|
1310
|
+
(z = (P = b.value) == null ? void 0 : P.netSuite) != null && z.id ? (i(), _("span", bs, y((Y = (R = b.value) == null ? void 0 : R.netSuite) == null ? void 0 : Y.refNo) + " (" + y((se = (K = b.value) == null ? void 0 : K.netSuite) == null ? void 0 : se.id) + ") ", 1)) : (i(), _("span", hs, "N/A"))
|
|
1311
1311
|
])
|
|
1312
1312
|
])) : U("", !0),
|
|
1313
1313
|
g.value ? (i(), _("div", gs, [
|
|
1314
1314
|
O[1] || (O[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1315
1315
|
e("div", _s, y(g.value), 1)
|
|
1316
1316
|
])) : U("", !0),
|
|
1317
|
-
v(o).isEnabled && c.transferType === v(Ge).
|
|
1317
|
+
v(o).isEnabled && c.transferType === v(Ge).TRANSFER && !c.isTransferBetweenOutlets ? (i(), _("div", Ss, [
|
|
1318
1318
|
O[2] || (O[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
1319
1319
|
e("div", xs, y(s.value), 1)
|
|
1320
1320
|
])) : U("", !0)
|
|
@@ -1329,9 +1329,9 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1329
1329
|
},
|
|
1330
1330
|
setup(C) {
|
|
1331
1331
|
const a = Be(), o = dt();
|
|
1332
|
-
async function f(
|
|
1332
|
+
async function f(b, n) {
|
|
1333
1333
|
const g = [];
|
|
1334
|
-
if (
|
|
1334
|
+
if (b && g.push(`body.message:*${b}*`), n) {
|
|
1335
1335
|
const w = n.replace(/:/g, "\\:");
|
|
1336
1336
|
g.push(`${w}`);
|
|
1337
1337
|
}
|
|
@@ -1351,14 +1351,14 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1351
1351
|
800
|
|
1352
1352
|
), await new Promise((w) => setTimeout(w, 800)), window.open(O, "_blank");
|
|
1353
1353
|
}
|
|
1354
|
-
return (
|
|
1355
|
-
const g =
|
|
1354
|
+
return (b, n) => {
|
|
1355
|
+
const g = G("FmButton");
|
|
1356
1356
|
return i(), _("div", ws, [
|
|
1357
1357
|
D(g, {
|
|
1358
1358
|
"prepend-icon": "history",
|
|
1359
1359
|
variant: "secondary",
|
|
1360
1360
|
label: "Logs",
|
|
1361
|
-
onClick: n[0] || (n[0] = (s) => f(
|
|
1361
|
+
onClick: n[0] || (n[0] = (s) => f(b.netsuiteId, b.purchaseOrderId)),
|
|
1362
1362
|
"text-color": "primary",
|
|
1363
1363
|
"bg-color": "transparent",
|
|
1364
1364
|
"border-color": "primary"
|
|
@@ -1369,27 +1369,27 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1369
1369
|
}), Cs = { class: "flex flex-row-reverse" }, Rs = { key: 0 }, ks = { key: 1 }, Ds = { class: "mb-6" }, As = { class: "fm-typo-en-body-md-400" }, Ns = { key: 0 }, Fs = { key: 1 }, Ts = {
|
|
1370
1370
|
key: 0,
|
|
1371
1371
|
class: "flex"
|
|
1372
|
-
},
|
|
1372
|
+
}, Ps = {
|
|
1373
1373
|
key: 1,
|
|
1374
1374
|
class: "border-t pt-6"
|
|
1375
|
-
},
|
|
1375
|
+
}, Is = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, qs = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, Vs = { class: "w-full" }, Es = {
|
|
1376
1376
|
class: "p-3 fm-typo-en-body-sm-600",
|
|
1377
1377
|
style: { "min-width": "130px" }
|
|
1378
|
-
}, Ls = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ms = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Us = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Bs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, js = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, zs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ks = { class: "p-3 fm-typo-en-body-sm-600" },
|
|
1378
|
+
}, Ls = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ms = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Us = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Bs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, js = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, zs = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ks = { class: "p-3 fm-typo-en-body-sm-600" }, Hs = { key: 2 }, Gs = { key: 1 }, Ws = /* @__PURE__ */ $e({
|
|
1379
1379
|
__name: "NetSuiteLatestInfo",
|
|
1380
1380
|
props: {
|
|
1381
1381
|
netsuiteId: {},
|
|
1382
1382
|
purchaseOrderId: {}
|
|
1383
1383
|
},
|
|
1384
1384
|
setup(C) {
|
|
1385
|
-
const a = C, o = dt(), f = J(!1),
|
|
1385
|
+
const a = C, o = dt(), f = J(!1), b = De(), n = J(!0), g = J(!1), s = J(!1), c = J(!1), O = J(null), w = J([]);
|
|
1386
1386
|
async function d() {
|
|
1387
1387
|
if (!O.value) {
|
|
1388
1388
|
f.value = !0;
|
|
1389
1389
|
try {
|
|
1390
1390
|
n.value = !0;
|
|
1391
1391
|
const l = await o.getMoreInfo(
|
|
1392
|
-
|
|
1392
|
+
b.currentLocation.dbName,
|
|
1393
1393
|
a.purchaseOrderId
|
|
1394
1394
|
);
|
|
1395
1395
|
O.value = l, g.value = !1;
|
|
@@ -1437,7 +1437,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
1439
1439
|
return (l, t) => {
|
|
1440
|
-
const
|
|
1440
|
+
const h = G("FmButton"), u = G("FmLabel"), $ = G("FmCircularProgress"), P = G("FmIcon"), z = G("FmDialog");
|
|
1441
1441
|
return i(), _("div", Cs, [
|
|
1442
1442
|
D(z, {
|
|
1443
1443
|
modelValue: f.value,
|
|
@@ -1446,7 +1446,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1446
1446
|
"max-width": 800
|
|
1447
1447
|
}, {
|
|
1448
1448
|
"dialog-button": Z(() => [
|
|
1449
|
-
D(
|
|
1449
|
+
D(h, {
|
|
1450
1450
|
"prepend-icon": "info",
|
|
1451
1451
|
variant: "secondary",
|
|
1452
1452
|
label: "Latest Info",
|
|
@@ -1461,7 +1461,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1461
1461
|
])),
|
|
1462
1462
|
default: Z(() => [
|
|
1463
1463
|
n.value ? (i(), _("div", Rs, "Loading...")) : (i(), _("div", ks, [
|
|
1464
|
-
g.value ? (i(), _("p",
|
|
1464
|
+
g.value ? (i(), _("p", Gs, "Something went wrong.")) : (i(), _(ue, { key: 0 }, [
|
|
1465
1465
|
e("div", Ds, [
|
|
1466
1466
|
t[4] || (t[4] = e("h3", { class: "fm-typo-en-body-lg-600 mb-4" }, "NetSuite Order Details", -1)),
|
|
1467
1467
|
(i(!0), _(ue, null, xe(O.value, (R, Y) => (i(), _("div", {
|
|
@@ -1482,9 +1482,9 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1482
1482
|
t[5] || (t[5] = e("span", null, "Change Log Loading...", -1)),
|
|
1483
1483
|
D($, { size: "md" })
|
|
1484
1484
|
])) : U("", !0),
|
|
1485
|
-
!s.value && w.value.length > 0 ? (i(), _("div",
|
|
1486
|
-
e("h3",
|
|
1487
|
-
D(
|
|
1485
|
+
!s.value && w.value.length > 0 ? (i(), _("div", Ps, [
|
|
1486
|
+
e("h3", Is, [
|
|
1487
|
+
D(P, {
|
|
1488
1488
|
name: "error",
|
|
1489
1489
|
color: "#ff9500",
|
|
1490
1490
|
size: "sm"
|
|
@@ -1529,14 +1529,14 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1529
1529
|
])
|
|
1530
1530
|
])
|
|
1531
1531
|
])
|
|
1532
|
-
])) : (i(), _("div",
|
|
1532
|
+
])) : (i(), _("div", Hs, t[8] || (t[8] = [
|
|
1533
1533
|
e("p", null, "No change logs available.", -1)
|
|
1534
1534
|
])))
|
|
1535
1535
|
], 64))
|
|
1536
1536
|
]))
|
|
1537
1537
|
]),
|
|
1538
1538
|
"dialog-footer": Z(() => [
|
|
1539
|
-
D(
|
|
1539
|
+
D(h, {
|
|
1540
1540
|
class: "ml-auto sm:w-full xs:w-full",
|
|
1541
1541
|
label: "Close",
|
|
1542
1542
|
size: "md",
|
|
@@ -1562,56 +1562,56 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1562
1562
|
scope: {}
|
|
1563
1563
|
},
|
|
1564
1564
|
setup(C) {
|
|
1565
|
-
const a = C, o =
|
|
1566
|
-
return (
|
|
1565
|
+
const a = C, o = Ht(), f = Q(() => o.isNetSuiteEnabled);
|
|
1566
|
+
return (b, n) => {
|
|
1567
1567
|
var s, c;
|
|
1568
|
-
const g =
|
|
1568
|
+
const g = G("FmMenuDivider");
|
|
1569
1569
|
return f.value ? (i(), _("div", Qs, [
|
|
1570
1570
|
e("div", Ys, [
|
|
1571
1571
|
n[0] || (n[0] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
1572
1572
|
e("div", Js, [
|
|
1573
1573
|
e("div", Xs, [
|
|
1574
|
-
(c = (s = a.purchaseOrder) == null ? void 0 : s.netSuite) != null && c.id ? (i(), re(
|
|
1574
|
+
(c = (s = a.purchaseOrder) == null ? void 0 : s.netSuite) != null && c.id ? (i(), re(Ie, { key: 0 }, {
|
|
1575
1575
|
default: Z(() => {
|
|
1576
1576
|
var O, w, d;
|
|
1577
1577
|
return [
|
|
1578
1578
|
D(Ws, {
|
|
1579
|
-
"netsuite-id": (w = (O =
|
|
1580
|
-
"purchase-order-id": (d =
|
|
1579
|
+
"netsuite-id": (w = (O = b.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : w.id,
|
|
1580
|
+
"purchase-order-id": (d = b.purchaseOrder) == null ? void 0 : d._id
|
|
1581
1581
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
1582
1582
|
];
|
|
1583
1583
|
}),
|
|
1584
1584
|
_: 1
|
|
1585
1585
|
})) : U("", !0),
|
|
1586
|
-
D(
|
|
1586
|
+
D(Ie, null, {
|
|
1587
1587
|
default: Z(() => {
|
|
1588
1588
|
var O, w, d;
|
|
1589
1589
|
return [
|
|
1590
1590
|
D($s, {
|
|
1591
|
-
"netsuite-id": (w = (O =
|
|
1592
|
-
"purchase-order-id": (d =
|
|
1591
|
+
"netsuite-id": (w = (O = b.purchaseOrder) == null ? void 0 : O.netSuite) == null ? void 0 : w.id,
|
|
1592
|
+
"purchase-order-id": (d = b.purchaseOrder) == null ? void 0 : d._id
|
|
1593
1593
|
}, null, 8, ["netsuite-id", "purchase-order-id"])
|
|
1594
1594
|
];
|
|
1595
1595
|
}),
|
|
1596
1596
|
_: 1
|
|
1597
1597
|
}),
|
|
1598
1598
|
D(ns, {
|
|
1599
|
-
"po-request":
|
|
1600
|
-
"purchase-order":
|
|
1599
|
+
"po-request": b.poRequest,
|
|
1600
|
+
"purchase-order": b.purchaseOrder,
|
|
1601
1601
|
"is-transfer-between-outlets": !f.value,
|
|
1602
|
-
scope:
|
|
1602
|
+
scope: b.scope
|
|
1603
1603
|
}, null, 8, ["po-request", "purchase-order", "is-transfer-between-outlets", "scope"])
|
|
1604
1604
|
])
|
|
1605
1605
|
])
|
|
1606
1606
|
]),
|
|
1607
1607
|
D(g),
|
|
1608
1608
|
D(Os, {
|
|
1609
|
-
"po-request":
|
|
1610
|
-
"purchase-order":
|
|
1611
|
-
"transfer-type":
|
|
1612
|
-
"transfer-to-db-name":
|
|
1609
|
+
"po-request": b.poRequest,
|
|
1610
|
+
"purchase-order": b.purchaseOrder,
|
|
1611
|
+
"transfer-type": b.transferType,
|
|
1612
|
+
"transfer-to-db-name": b.transferToDbName,
|
|
1613
1613
|
"is-transfer-between-outlets": !f.value,
|
|
1614
|
-
scope:
|
|
1614
|
+
scope: b.scope
|
|
1615
1615
|
}, null, 8, ["po-request", "purchase-order", "transfer-type", "transfer-to-db-name", "is-transfer-between-outlets", "scope"])
|
|
1616
1616
|
])) : U("", !0);
|
|
1617
1617
|
};
|
|
@@ -1625,7 +1625,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1625
1625
|
}, 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 = {
|
|
1626
1626
|
key: 0,
|
|
1627
1627
|
class: "flex flex-col gap-4"
|
|
1628
|
-
},
|
|
1628
|
+
}, br = { class: "flex flex-col gap-4 fm-typo-en-body-lg-600" }, hr = /* @__PURE__ */ $e({
|
|
1629
1629
|
__name: "EditForm",
|
|
1630
1630
|
props: {
|
|
1631
1631
|
purchaseOrder: {},
|
|
@@ -1634,18 +1634,18 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1634
1634
|
emits: ["submitted"],
|
|
1635
1635
|
setup(C, { emit: a }) {
|
|
1636
1636
|
Wt();
|
|
1637
|
-
const o = Ue(), f = Be(),
|
|
1637
|
+
const o = Ue(), f = Be(), b = J(!1), n = C, g = a, s = St("deliveryOrder"), c = je(), O = Q(
|
|
1638
1638
|
() => {
|
|
1639
|
-
var
|
|
1640
|
-
return ((
|
|
1639
|
+
var h;
|
|
1640
|
+
return ((h = n.purchaseOrder.deliveryFullfillment) == null ? void 0 : h.findIndex(
|
|
1641
1641
|
(u) => n.deliveryOrder.fullfillmentId && u.id === n.deliveryOrder.fullfillmentId
|
|
1642
1642
|
)) ?? -1;
|
|
1643
1643
|
}
|
|
1644
|
-
), w = o.enablePurchaseOrderReceiveWithCustomCost, d = o.enablePortalDeliveryOrderWrite, T = J({}), S = Q(() => n.purchaseOrder.items.map((
|
|
1644
|
+
), w = o.enablePurchaseOrderReceiveWithCustomCost, d = o.enablePortalDeliveryOrderWrite, T = J({}), S = Q(() => n.purchaseOrder.items.map((h, u) => Q({
|
|
1645
1645
|
get: () => {
|
|
1646
|
-
var
|
|
1647
|
-
const $ = (
|
|
1648
|
-
return $ ? +
|
|
1646
|
+
var P;
|
|
1647
|
+
const $ = (P = s.received[u]) == null ? void 0 : P.cost;
|
|
1648
|
+
return $ ? +be($) : 0;
|
|
1649
1649
|
},
|
|
1650
1650
|
set: ($) => {
|
|
1651
1651
|
s.received[u].cost = {
|
|
@@ -1653,31 +1653,31 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1653
1653
|
...Ye($, 4)
|
|
1654
1654
|
};
|
|
1655
1655
|
}
|
|
1656
|
-
}))), A = Q(() => n.deliveryOrder.received.map((
|
|
1656
|
+
}))), A = Q(() => n.deliveryOrder.received.map((h, u) => Q({
|
|
1657
1657
|
get: () => {
|
|
1658
|
-
var
|
|
1659
|
-
const $ = (
|
|
1660
|
-
return $ ? +
|
|
1658
|
+
var P;
|
|
1659
|
+
const $ = (P = s.received[u]) == null ? void 0 : P.amount;
|
|
1660
|
+
return $ ? +be($) : 0;
|
|
1661
1661
|
},
|
|
1662
1662
|
set: ($) => {
|
|
1663
1663
|
s.received[u].amount = Ye($, 2);
|
|
1664
1664
|
}
|
|
1665
1665
|
})));
|
|
1666
|
-
function l(
|
|
1667
|
-
const u = !T.value[
|
|
1668
|
-
if (T.value[
|
|
1669
|
-
const $ = n.deliveryOrder.received[
|
|
1670
|
-
$.cost ? s.received[
|
|
1666
|
+
function l(h) {
|
|
1667
|
+
const u = !T.value[h];
|
|
1668
|
+
if (T.value[h] = u, u) {
|
|
1669
|
+
const $ = n.deliveryOrder.received[h];
|
|
1670
|
+
$.cost ? s.received[h].cost = {
|
|
1671
1671
|
currency: $.cost.currency,
|
|
1672
1672
|
amount: $.cost.amount,
|
|
1673
1673
|
precision: $.cost.precision
|
|
1674
|
-
} : s.received[
|
|
1674
|
+
} : s.received[h].cost = {
|
|
1675
1675
|
currency: Ce(),
|
|
1676
1676
|
amount: 0,
|
|
1677
1677
|
precision: 4
|
|
1678
1678
|
};
|
|
1679
1679
|
} else
|
|
1680
|
-
delete s.received[
|
|
1680
|
+
delete s.received[h].cost;
|
|
1681
1681
|
}
|
|
1682
1682
|
function t() {
|
|
1683
1683
|
c.updateDeliveryOrder({
|
|
@@ -1695,14 +1695,14 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1695
1695
|
type: "success"
|
|
1696
1696
|
},
|
|
1697
1697
|
1e4
|
|
1698
|
-
),
|
|
1698
|
+
), b.value = !1, g("submitted");
|
|
1699
1699
|
});
|
|
1700
1700
|
}
|
|
1701
|
-
return (
|
|
1702
|
-
const $ =
|
|
1701
|
+
return (h, u) => {
|
|
1702
|
+
const $ = G("FmButton"), P = G("FmStepperField"), z = G("FmSwitch"), R = G("FmTextField"), Y = G("FmDialog");
|
|
1703
1703
|
return i(), re(Y, {
|
|
1704
|
-
modelValue:
|
|
1705
|
-
"onUpdate:modelValue": u[1] || (u[1] = (K) =>
|
|
1704
|
+
modelValue: b.value,
|
|
1705
|
+
"onUpdate:modelValue": u[1] || (u[1] = (K) => b.value = K),
|
|
1706
1706
|
overlay: !0
|
|
1707
1707
|
}, {
|
|
1708
1708
|
"dialog-button": Z(() => [
|
|
@@ -1744,7 +1744,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1744
1744
|
e("span", lr, y(K.sku.code), 1)
|
|
1745
1745
|
]),
|
|
1746
1746
|
e("div", ir, [
|
|
1747
|
-
D(
|
|
1747
|
+
D(P, {
|
|
1748
1748
|
label: "Receive Quantity",
|
|
1749
1749
|
modelValue: A.value[se].value,
|
|
1750
1750
|
"onUpdate:modelValue": (de) => A.value[se].value = de,
|
|
@@ -1760,7 +1760,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1760
1760
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1761
1761
|
u[3] || (u[3] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
1762
1762
|
])) : U("", !0),
|
|
1763
|
-
v(w) && T.value[se] ? (i(), re(
|
|
1763
|
+
v(w) && T.value[se] ? (i(), re(P, {
|
|
1764
1764
|
key: 1,
|
|
1765
1765
|
modelValue: S.value[se].value,
|
|
1766
1766
|
"onUpdate:modelValue": (de) => S.value[se].value = de,
|
|
@@ -1794,7 +1794,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1794
1794
|
]),
|
|
1795
1795
|
O.value >= 0 ? (i(), _("div", vr, [
|
|
1796
1796
|
u[7] || (u[7] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Fulfilment's sequence ", -1)),
|
|
1797
|
-
e("div",
|
|
1797
|
+
e("div", br, y(O.value + 1), 1)
|
|
1798
1798
|
])) : U("", !0)
|
|
1799
1799
|
])
|
|
1800
1800
|
])
|
|
@@ -1812,7 +1812,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1812
1812
|
}, Cr = { class: "flex gap-4" }, Rr = { class: "flex-1" }, kr = { class: "flex-1" }, Dr = {
|
|
1813
1813
|
key: 0,
|
|
1814
1814
|
class: "flex items-center text-fm-color-system-error-300"
|
|
1815
|
-
}, Ar = { class: "fm-typo-en-body-md-400" }, Nr = { class: "flex flex-col gap-4" }, Fr = { class: "flex justify-between items-center py-1 gap-4" }, Tr = { class: "flex flex-col" },
|
|
1815
|
+
}, Ar = { class: "fm-typo-en-body-md-400" }, Nr = { class: "flex flex-col gap-4" }, Fr = { class: "flex justify-between items-center py-1 gap-4" }, Tr = { class: "flex flex-col" }, Pr = { class: "fm-typo-en-body-lg-600" }, Ir = { class: "fm-typo-en-body-md-400" }, qr = { class: "flex flex-col gap-2 items-end" }, Vr = {
|
|
1816
1816
|
key: 0,
|
|
1817
1817
|
class: "flex items-center gap-2"
|
|
1818
1818
|
}, Er = {
|
|
@@ -1827,22 +1827,22 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1827
1827
|
emits: ["submitted"],
|
|
1828
1828
|
setup(C, { emit: a }) {
|
|
1829
1829
|
var B, q, oe;
|
|
1830
|
-
const { t: o } = ut(), f = J(!1),
|
|
1830
|
+
const { t: o } = ut(), f = J(!1), b = ct(), n = C, g = a, s = St("", {
|
|
1831
1831
|
default: {
|
|
1832
1832
|
deliveryOrderNumber: "",
|
|
1833
1833
|
remark: "",
|
|
1834
1834
|
received: n.purchaseOrder.items.map((k) => ({
|
|
1835
1835
|
sku: k.sku,
|
|
1836
|
-
amount:
|
|
1836
|
+
amount: Pe.fromNumber(0),
|
|
1837
1837
|
measurement: k.measurement
|
|
1838
1838
|
})),
|
|
1839
1839
|
createdBy: {
|
|
1840
|
-
id: ((B =
|
|
1841
|
-
name: ((q =
|
|
1840
|
+
id: ((B = b.sessionUser.value) == null ? void 0 : B.id) || "",
|
|
1841
|
+
name: ((q = b.sessionUser.value) == null ? void 0 : q.displayName) || ""
|
|
1842
1842
|
},
|
|
1843
1843
|
createdAt: ""
|
|
1844
1844
|
}
|
|
1845
|
-
}), c = je(), O = tt(), w = Ue(), d = ((oe = n.purchaseOrder) == null ? void 0 : oe.supplier.internal) != null, T = d && w.enablePOSTransferRequireFulfillment, S = w.enablePortalDeliveryOrderWrite && (n.purchaseOrder.status === te.Enum.RECEIVING || n.purchaseOrder.status === te.Enum.COMPLETE) && (d ? !T : !0), A = w.enablePurchaseOrderReceiveWithCustomCost, l = w.enableBackdateReceive, t = J({}),
|
|
1845
|
+
}), c = je(), O = tt(), w = Ue(), d = ((oe = n.purchaseOrder) == null ? void 0 : oe.supplier.internal) != null, T = d && w.enablePOSTransferRequireFulfillment, S = w.enablePortalDeliveryOrderWrite && (n.purchaseOrder.status === te.Enum.RECEIVING || n.purchaseOrder.status === te.Enum.COMPLETE) && (d ? !T : !0), A = w.enablePurchaseOrderReceiveWithCustomCost, l = w.enableBackdateReceive, t = J({}), h = Be(), u = Q({
|
|
1846
1846
|
get() {
|
|
1847
1847
|
if (!s.createdAt) return "";
|
|
1848
1848
|
const k = new Date(s.createdAt), x = k.getFullYear(), N = String(k.getMonth() + 1).padStart(2, "0"), W = String(k.getDate()).padStart(2, "0");
|
|
@@ -1866,7 +1866,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1866
1866
|
x.setHours(parseInt(N)), x.setMinutes(parseInt(W)), s.createdAt = x.toISOString();
|
|
1867
1867
|
}
|
|
1868
1868
|
}
|
|
1869
|
-
}),
|
|
1869
|
+
}), P = Q(() => {
|
|
1870
1870
|
const k = Qe(n.purchaseOrder._id);
|
|
1871
1871
|
if (!k) return "";
|
|
1872
1872
|
const x = new Date(k), N = x.getFullYear(), W = String(x.getMonth() + 1).padStart(2, "0"), ie = String(x.getDate()).padStart(2, "0");
|
|
@@ -1877,13 +1877,13 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1877
1877
|
}), R = Q(() => {
|
|
1878
1878
|
if (!u.value || !$.value || !z.value) return null;
|
|
1879
1879
|
if (/* @__PURE__ */ new Date(`${u.value}T${$.value}:00`) < z.value) {
|
|
1880
|
-
const x =
|
|
1880
|
+
const x = P.value, N = z.value.getHours(), W = z.value.getMinutes(), ie = N >= 12 ? "PM" : "AM", r = N % 12 || 12, m = `${String(r).padStart(2, "0")}:${String(W).padStart(2, "0")} ${ie}`;
|
|
1881
1881
|
return `Delivery date & time cannot be earlier than order creation (${x} ${m})`;
|
|
1882
1882
|
}
|
|
1883
1883
|
return null;
|
|
1884
1884
|
}), Y = Q(() => R.value ? !1 : s.received.some((x) => {
|
|
1885
1885
|
const N = x.amount;
|
|
1886
|
-
return N ? +
|
|
1886
|
+
return N ? +be(N) > 0 : !1;
|
|
1887
1887
|
}));
|
|
1888
1888
|
function K() {
|
|
1889
1889
|
s.createdAt = "";
|
|
@@ -1892,7 +1892,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1892
1892
|
get: () => {
|
|
1893
1893
|
var W;
|
|
1894
1894
|
const N = (W = s.received[x]) == null ? void 0 : W.amount;
|
|
1895
|
-
return N ? +
|
|
1895
|
+
return N ? +be(N) : 0;
|
|
1896
1896
|
},
|
|
1897
1897
|
set: (N) => {
|
|
1898
1898
|
s.received[x].amount = Ye(N, 2);
|
|
@@ -1919,7 +1919,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1919
1919
|
get: () => {
|
|
1920
1920
|
var W;
|
|
1921
1921
|
const N = (W = s.received[x]) == null ? void 0 : W.cost;
|
|
1922
|
-
return N ? +
|
|
1922
|
+
return N ? +be(N) : 0;
|
|
1923
1923
|
},
|
|
1924
1924
|
set: (N) => {
|
|
1925
1925
|
s.received[x].cost = {
|
|
@@ -1950,7 +1950,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1950
1950
|
purchaseOrderRev: n.purchaseOrder._rev,
|
|
1951
1951
|
currency: Ce()
|
|
1952
1952
|
}).then(() => {
|
|
1953
|
-
|
|
1953
|
+
h.open(
|
|
1954
1954
|
{
|
|
1955
1955
|
title: "Success",
|
|
1956
1956
|
message: `New delivery order created for PO# ${n.purchaseOrder.seqNumber}`,
|
|
@@ -1961,8 +1961,8 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1961
1961
|
});
|
|
1962
1962
|
}
|
|
1963
1963
|
return (k, x) => {
|
|
1964
|
-
const N =
|
|
1965
|
-
return i(), re(
|
|
1964
|
+
const N = G("FmButton"), W = G("FmDatePicker"), ie = G("FmTimePicker"), r = G("FmIcon"), m = G("FmStepperField"), V = G("FmSwitch"), E = G("FmTextField"), H = G("FmDialog");
|
|
1965
|
+
return i(), re(H, {
|
|
1966
1966
|
modelValue: f.value,
|
|
1967
1967
|
"onUpdate:modelValue": x[4] || (x[4] = (F) => f.value = F),
|
|
1968
1968
|
overlay: !0,
|
|
@@ -1997,7 +1997,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
1997
1997
|
e("div", gr, [
|
|
1998
1998
|
e("div", _r, [
|
|
1999
1999
|
x[5] || (x[5] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, "Received by", -1)),
|
|
2000
|
-
e("div", Sr, y((F = v(
|
|
2000
|
+
e("div", Sr, y((F = v(b).sessionUser.value) == null ? void 0 : F.displayName), 1)
|
|
2001
2001
|
]),
|
|
2002
2002
|
v(l) ? (i(), _("div", xr, [
|
|
2003
2003
|
e("div", Or, [
|
|
@@ -2043,15 +2043,15 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2043
2043
|
return i(), _("div", { key: p }, [
|
|
2044
2044
|
e("div", Fr, [
|
|
2045
2045
|
e("div", Tr, [
|
|
2046
|
-
e("span",
|
|
2047
|
-
e("span",
|
|
2046
|
+
e("span", Pr, y(j.sku.name), 1),
|
|
2047
|
+
e("span", Ir, y(j.sku.code), 1)
|
|
2048
2048
|
]),
|
|
2049
2049
|
e("div", qr, [
|
|
2050
2050
|
D(m, {
|
|
2051
2051
|
label: "Receive Quantity",
|
|
2052
2052
|
modelValue: se.value[p].value,
|
|
2053
|
-
"onUpdate:modelValue": (
|
|
2054
|
-
"helper-text": `${v(o)("inventory.transfer.receiveRequest.details.received")} ${v(
|
|
2053
|
+
"onUpdate:modelValue": (I) => se.value[p].value = I,
|
|
2054
|
+
"helper-text": `${v(o)("inventory.transfer.receiveRequest.details.received")} ${v(Pe).toFormatString(
|
|
2055
2055
|
{
|
|
2056
2056
|
value: (X = k.receivedInfoMap[j.sku._id]) == null ? void 0 : X.received
|
|
2057
2057
|
}
|
|
@@ -2062,7 +2062,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2062
2062
|
v(A) ? (i(), _("div", Vr, [
|
|
2063
2063
|
D(V, {
|
|
2064
2064
|
"model-value": t.value[p],
|
|
2065
|
-
"onUpdate:modelValue": (
|
|
2065
|
+
"onUpdate:modelValue": (I) => ge(p),
|
|
2066
2066
|
size: "sm"
|
|
2067
2067
|
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
2068
2068
|
x[7] || (x[7] = e("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Override cost ", -1))
|
|
@@ -2070,7 +2070,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2070
2070
|
v(A) && t.value[p] ? (i(), re(m, {
|
|
2071
2071
|
key: 1,
|
|
2072
2072
|
modelValue: de.value[p].value,
|
|
2073
|
-
"onUpdate:modelValue": (
|
|
2073
|
+
"onUpdate:modelValue": (I) => de.value[p].value = I,
|
|
2074
2074
|
label: "Total Cost",
|
|
2075
2075
|
step: 1e-4,
|
|
2076
2076
|
min: 0,
|
|
@@ -2114,10 +2114,10 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2114
2114
|
}), zr = { class: "flex flex-row-reverse" }, Kr = {
|
|
2115
2115
|
key: 0,
|
|
2116
2116
|
class: "flex"
|
|
2117
|
-
},
|
|
2117
|
+
}, Hr = {
|
|
2118
2118
|
key: 1,
|
|
2119
2119
|
class: "border-t pt-6"
|
|
2120
|
-
},
|
|
2120
|
+
}, Gr = { class: "fm-typo-en-body-lg-600 mb-4 flex items-center gap-2" }, Wr = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg overflow-y-auto" }, Qr = { class: "w-full" }, Yr = {
|
|
2121
2121
|
class: "p-3 fm-typo-en-body-sm-600",
|
|
2122
2122
|
style: { "min-width": "130px" }
|
|
2123
2123
|
}, Jr = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Xr = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Zr = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, eo = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, to = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, so = { class: "p-3 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ro = { class: "p-3 fm-typo-en-body-sm-600" }, oo = { key: 2 }, no = /* @__PURE__ */ $e({
|
|
@@ -2126,17 +2126,17 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2126
2126
|
netsuiteId: {}
|
|
2127
2127
|
},
|
|
2128
2128
|
setup(C) {
|
|
2129
|
-
const a = C, o = dt(), f = J(!1),
|
|
2129
|
+
const a = C, o = dt(), f = J(!1), b = J(!1), n = J(!1), g = J([]);
|
|
2130
2130
|
async function s() {
|
|
2131
2131
|
if (!(g.value.length > 0))
|
|
2132
2132
|
try {
|
|
2133
|
-
|
|
2133
|
+
b.value = !0;
|
|
2134
2134
|
const w = await o.getChangeLogs(a.netsuiteId);
|
|
2135
2135
|
g.value = w, n.value = !1;
|
|
2136
2136
|
} catch {
|
|
2137
2137
|
n.value = !0;
|
|
2138
2138
|
} finally {
|
|
2139
|
-
|
|
2139
|
+
b.value = !1;
|
|
2140
2140
|
}
|
|
2141
2141
|
}
|
|
2142
2142
|
function c(w) {
|
|
@@ -2163,7 +2163,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2163
2163
|
});
|
|
2164
2164
|
}
|
|
2165
2165
|
return (w, d) => {
|
|
2166
|
-
const T =
|
|
2166
|
+
const T = G("FmButton"), S = G("FmCircularProgress"), A = G("FmIcon"), l = G("FmDialog");
|
|
2167
2167
|
return i(), _("div", zr, [
|
|
2168
2168
|
D(l, {
|
|
2169
2169
|
modelValue: f.value,
|
|
@@ -2186,12 +2186,12 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2186
2186
|
e("div", null, "NetSuite info", -1)
|
|
2187
2187
|
])),
|
|
2188
2188
|
default: Z(() => [
|
|
2189
|
-
|
|
2189
|
+
b.value ? (i(), _("div", Kr, [
|
|
2190
2190
|
d[4] || (d[4] = e("span", null, "Change Log Loading...", -1)),
|
|
2191
2191
|
D(S, { size: "md" })
|
|
2192
2192
|
])) : U("", !0),
|
|
2193
|
-
!
|
|
2194
|
-
e("h3",
|
|
2193
|
+
!b.value && g.value.length > 0 ? (i(), _("div", Hr, [
|
|
2194
|
+
e("h3", Gr, [
|
|
2195
2195
|
D(A, {
|
|
2196
2196
|
name: "error",
|
|
2197
2197
|
color: "#ff9500",
|
|
@@ -2218,8 +2218,8 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2218
2218
|
])
|
|
2219
2219
|
], -1)),
|
|
2220
2220
|
e("tbody", null, [
|
|
2221
|
-
(i(!0), _(ue, null, xe(g.value, (t,
|
|
2222
|
-
key:
|
|
2221
|
+
(i(!0), _(ue, null, xe(g.value, (t, h) => (i(), _("tr", {
|
|
2222
|
+
key: h,
|
|
2223
2223
|
class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
|
|
2224
2224
|
}, [
|
|
2225
2225
|
e("td", Yr, y(O(t._dateiso8601)), 1),
|
|
@@ -2258,7 +2258,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2258
2258
|
}), 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 = {
|
|
2259
2259
|
key: 0,
|
|
2260
2260
|
class: "flex items-center gap-1"
|
|
2261
|
-
}, yo = { class: "fm-typo-en-body-md-400" }, vo = { class: "flex flex-col gap-8" },
|
|
2261
|
+
}, yo = { class: "fm-typo-en-body-md-400" }, vo = { class: "flex flex-col gap-8" }, bo = { class: "flex flex-col gap-4" }, ho = { 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 = {
|
|
2262
2262
|
key: 0,
|
|
2263
2263
|
class: "flex flex-col gap-4"
|
|
2264
2264
|
}, 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 = {
|
|
@@ -2270,10 +2270,10 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2270
2270
|
}, No = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fo = { class: "fm-typo-en-body-lg-600" }, To = {
|
|
2271
2271
|
key: 3,
|
|
2272
2272
|
class: "flex flex-col gap-4"
|
|
2273
|
-
},
|
|
2273
|
+
}, Po = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Io = { class: "fm-typo-en-body-lg-600" }, qo = {
|
|
2274
2274
|
key: 4,
|
|
2275
2275
|
class: "flex flex-col gap-4"
|
|
2276
|
-
}, Vo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Eo = { class: "fm-typo-en-body-lg-600" }, Lo = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Mo = { class: "flex flex-col gap-8" }, Uo = { class: "flex gap-8 items-center" }, Bo = { class: "flex-1 fm-typo-en-body-lg-600" }, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, zo = { class: "flex w-full gap-4" }, Ko = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" },
|
|
2276
|
+
}, Vo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Eo = { class: "fm-typo-en-body-lg-600" }, Lo = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, Mo = { class: "flex flex-col gap-8" }, Uo = { class: "flex gap-8 items-center" }, Bo = { class: "flex-1 fm-typo-en-body-lg-600" }, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-4" }, zo = { class: "flex w-full gap-4" }, Ko = { class: "basis-1/2 shrink-0 grow fm-typo-en-body-lg-400 line-clamp-2 flex items-center gap-2" }, Ho = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary flex flex-col gap-2" }, Go = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Wo = ["innerHTML"], Qo = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, Yo = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-1" }, Jo = {
|
|
2277
2277
|
key: 0,
|
|
2278
2278
|
class: "line-clamp-1 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
2279
2279
|
}, Xo = { class: "py-8" }, Zo = { class: "flex justify-end gap-4 items-center" }, en = { class: "fm-typo-en-body-lg-600" }, tn = {
|
|
@@ -2291,7 +2291,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2291
2291
|
}, 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 = {
|
|
2292
2292
|
class: "py-12 flex flex-col gap-4",
|
|
2293
2293
|
name: "received-at header"
|
|
2294
|
-
}, yn = { class: "fm-typo-en-body-lg-400" }, vn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" },
|
|
2294
|
+
}, yn = { class: "fm-typo-en-body-lg-400" }, vn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, bn = { class: "ml-auto flex gap-1" }, hn = { class: "flex gap-12 content-stretch" }, gn = {
|
|
2295
2295
|
class: "flex flex-col w-40",
|
|
2296
2296
|
name: "circles"
|
|
2297
2297
|
}, _n = { class: "flex-1 flex flex-col items-center" }, Sn = {
|
|
@@ -2313,7 +2313,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2313
2313
|
},
|
|
2314
2314
|
emits: ["update:show", "submitted"],
|
|
2315
2315
|
setup(C, { emit: a }) {
|
|
2316
|
-
const o = C, f = a,
|
|
2316
|
+
const o = C, f = a, b = tt(), n = Be(), g = Ue(), s = De(), c = ct(), O = Q(
|
|
2317
2317
|
() => {
|
|
2318
2318
|
var r, m;
|
|
2319
2319
|
return {
|
|
@@ -2324,24 +2324,24 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2324
2324
|
), w = rs(), { t: d } = ut(), T = Q(
|
|
2325
2325
|
() => {
|
|
2326
2326
|
var r, m, V, E;
|
|
2327
|
-
return ((m = (r = o.purchaseOrder) == null ? void 0 : r.supplier) == null ? void 0 : m.internal) === "restaurant" || ((E = (V = o.purchaseOrder) == null ? void 0 : V.supplier) == null ? void 0 : E.internal) === "warehouse" ? Ge.
|
|
2327
|
+
return ((m = (r = o.purchaseOrder) == null ? void 0 : r.supplier) == null ? void 0 : m.internal) === "restaurant" || ((E = (V = o.purchaseOrder) == null ? void 0 : V.supplier) == null ? void 0 : E.internal) === "warehouse" ? Ge.TRANSFER : Ge.PURCHASE;
|
|
2328
2328
|
}
|
|
2329
2329
|
), S = Q(() => {
|
|
2330
2330
|
var V;
|
|
2331
2331
|
const r = (V = o.shipments) == null ? void 0 : V.find((E) => {
|
|
2332
|
-
var
|
|
2333
|
-
return E.ref === ((
|
|
2332
|
+
var H;
|
|
2333
|
+
return E.ref === ((H = o.purchaseOrder) == null ? void 0 : H._id);
|
|
2334
2334
|
});
|
|
2335
2335
|
let m = null;
|
|
2336
2336
|
if (r != null && r.milestones && r.milestones.length > 0) {
|
|
2337
2337
|
const E = r.milestones[r.milestones.length - 1];
|
|
2338
2338
|
if (E.estimatedTime) {
|
|
2339
|
-
const
|
|
2340
|
-
m = `${
|
|
2339
|
+
const H = new Date(E.estimatedTime), F = H.getDate().toString().padStart(2, "0");
|
|
2340
|
+
m = `${H.toLocaleString("en-US", { month: "short" })} ${F}`;
|
|
2341
2341
|
}
|
|
2342
2342
|
}
|
|
2343
2343
|
return m;
|
|
2344
|
-
}), A = J(!1), l = J(""), t = J(!0),
|
|
2344
|
+
}), A = J(!1), l = J(""), t = J(!0), h = je(), u = Kt(h.getWorkflowConfig), $ = Ot(), P = [
|
|
2345
2345
|
M.enum.receiveStock,
|
|
2346
2346
|
M.enum.processRequest,
|
|
2347
2347
|
M.enum.closeRequest
|
|
@@ -2361,20 +2361,20 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2361
2361
|
),
|
|
2362
2362
|
purchaseOrderRequest: o.poRequest,
|
|
2363
2363
|
purchaseOrder: o.purchaseOrder
|
|
2364
|
-
}, E = g.useOperatePurchaseOrderV2 ? [...
|
|
2365
|
-
let
|
|
2364
|
+
}, E = g.useOperatePurchaseOrderV2 ? [...P, M.enum.completeReceive] : P;
|
|
2365
|
+
let H = [];
|
|
2366
2366
|
try {
|
|
2367
|
-
r.state === pt.error ? (console.error("Error fetching workflow config:", r.error),
|
|
2367
|
+
r.state === pt.error ? (console.error("Error fetching workflow config:", r.error), H = st.getAvailableActions({
|
|
2368
2368
|
...m,
|
|
2369
2369
|
orderConfig: st.getDefaultConfig()
|
|
2370
|
-
}).actions.filter((F) => !E.includes(F))) :
|
|
2370
|
+
}).actions.filter((F) => !E.includes(F))) : H = st.getAvailableActions({
|
|
2371
2371
|
...m,
|
|
2372
2372
|
orderConfig: r.data
|
|
2373
2373
|
}).actions.filter((F) => !E.includes(F));
|
|
2374
2374
|
} catch (F) {
|
|
2375
2375
|
console.error("Error getting available actions:", F);
|
|
2376
2376
|
}
|
|
2377
|
-
return o.scope === "approval" && (
|
|
2377
|
+
return o.scope === "approval" && (H = H.filter((F) => F !== M.enum.completeReceive)), H;
|
|
2378
2378
|
}), R = qt(o, "show"), Y = Q(() => [
|
|
2379
2379
|
{
|
|
2380
2380
|
label: d("inventory.transfer.receiveRequest.details.overview"),
|
|
@@ -2400,16 +2400,16 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2400
2400
|
}
|
|
2401
2401
|
}));
|
|
2402
2402
|
}
|
|
2403
|
-
async function ge(r, m, V, E,
|
|
2403
|
+
async function ge(r, m, V, E, H) {
|
|
2404
2404
|
return new Promise((F, j) => {
|
|
2405
|
-
|
|
2405
|
+
b.open({
|
|
2406
2406
|
closeButton: !1,
|
|
2407
2407
|
title: E.title,
|
|
2408
2408
|
message: E.message,
|
|
2409
2409
|
primaryActions: E.primaryActions,
|
|
2410
2410
|
secondaryActions: { text: "No", close: !1 }
|
|
2411
2411
|
}).onPrimary(async () => {
|
|
2412
|
-
var X, ae, ne,
|
|
2412
|
+
var X, ae, ne, I;
|
|
2413
2413
|
const p = [];
|
|
2414
2414
|
V === M.enum.approveRequest ? (p.push({
|
|
2415
2415
|
action: "approveRequest",
|
|
@@ -2453,21 +2453,21 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2453
2453
|
payloads: p
|
|
2454
2454
|
// add payload if action is receiveStock or processRequest
|
|
2455
2455
|
},
|
|
2456
|
-
transferTo: (
|
|
2456
|
+
transferTo: (I = (ne = o.poRequest) == null ? void 0 : ne.to) == null ? void 0 : I.dbName
|
|
2457
2457
|
}).delayed(1e3), F("submitted");
|
|
2458
2458
|
} catch (me) {
|
|
2459
2459
|
j(me);
|
|
2460
2460
|
}
|
|
2461
2461
|
}).onSecondary(() => {
|
|
2462
2462
|
F("cancelled");
|
|
2463
|
-
for (let p = 0; p <
|
|
2464
|
-
|
|
2463
|
+
for (let p = 0; p < H + 2; p++)
|
|
2464
|
+
b.close();
|
|
2465
2465
|
}).onClose(() => {
|
|
2466
2466
|
});
|
|
2467
2467
|
});
|
|
2468
2468
|
}
|
|
2469
2469
|
async function de(r) {
|
|
2470
|
-
var
|
|
2470
|
+
var H, F, j, p;
|
|
2471
2471
|
if (r === M.enum.receiveStock)
|
|
2472
2472
|
return;
|
|
2473
2473
|
const m = xt[r];
|
|
@@ -2488,10 +2488,10 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2488
2488
|
r === M.enum.completeReceive) && g.autoReceiveWarehouse)
|
|
2489
2489
|
X.autoReceive = !0;
|
|
2490
2490
|
else if ((r === M.enum.approveRequest || r === M.enum.processRequest) && g.acceptRequireFulfillment) {
|
|
2491
|
-
const ne = (F = (
|
|
2492
|
-
if (ne &&
|
|
2491
|
+
const ne = (F = (H = o.poRequest) == null ? void 0 : H.from) == null ? void 0 : F.dbName, I = (p = (j = o.poRequest) == null ? void 0 : j.to) == null ? void 0 : p.dbName;
|
|
2492
|
+
if (ne && I && (ne.startsWith("warehouse_") || I.startsWith("warehouse_"))) {
|
|
2493
2493
|
const me = await new Promise((Oe, Ae) => {
|
|
2494
|
-
|
|
2494
|
+
b.open({
|
|
2495
2495
|
closeButton: !1,
|
|
2496
2496
|
title: "Confirm transfer amount",
|
|
2497
2497
|
dialogComponent: ss,
|
|
@@ -2499,7 +2499,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2499
2499
|
purchaseOrder: o.purchaseOrder,
|
|
2500
2500
|
confirm: Oe,
|
|
2501
2501
|
"onUpdate:show": (Ne) => {
|
|
2502
|
-
Ne || (l.value = "", A.value = !1, t.value = !0, ae++,
|
|
2502
|
+
Ne || (l.value = "", A.value = !1, t.value = !0, ae++, b.close()), Ae("cancelled");
|
|
2503
2503
|
}
|
|
2504
2504
|
}
|
|
2505
2505
|
});
|
|
@@ -2537,9 +2537,9 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2537
2537
|
const r = o.purchaseOrder;
|
|
2538
2538
|
if (!r) return { status: "", statusClass: "" };
|
|
2539
2539
|
const { partial: m, over: V } = nt(Ve.value), E = at(r.status, m, V);
|
|
2540
|
-
let
|
|
2541
|
-
return E === te.enum.CLOSE && (
|
|
2542
|
-
status:
|
|
2540
|
+
let H = d(`inventory.transfer.status.${E}`), F = `${r.status}`.toLocaleLowerCase("en-us");
|
|
2541
|
+
return E === te.enum.CLOSE && (H = `${d(`inventory.transfer.status.${te.enum.COMPLETE}`)}`), E === "PARTIAL_RECEIVED" && F === te.enum.PROCESSING.toLocaleLowerCase("en-us") && (F = te.enum.RECEIVING.toLocaleLowerCase("en-us")), {
|
|
2542
|
+
status: H,
|
|
2543
2543
|
statusClass: `fm-status-badge fm-status-badge-${F}`
|
|
2544
2544
|
};
|
|
2545
2545
|
}), q = Q(() => {
|
|
@@ -2558,9 +2558,9 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2558
2558
|
];
|
|
2559
2559
|
V.reverse().sort((p, X) => p.createdAt.localeCompare(X.createdAt));
|
|
2560
2560
|
function E(p) {
|
|
2561
|
-
var ne,
|
|
2561
|
+
var ne, I, me, Oe, Ae, Ne, ee, le, pe, ve, _e, Re;
|
|
2562
2562
|
const X = m.findIndex((ce) => ce.id === p.fullfillmentId), ae = [
|
|
2563
|
-
(
|
|
2563
|
+
(I = (ne = m[X]) == null ? void 0 : ne.netSuite) != null && I.id ? {
|
|
2564
2564
|
label: "Fulfillment's ref no. (Netsuite)",
|
|
2565
2565
|
values: [
|
|
2566
2566
|
`${((Oe = (me = m[X]) == null ? void 0 : me.netSuite) == null ? void 0 : Oe.refNo) ?? "N/A"} (${((Ne = (Ae = m[X]) == null ? void 0 : Ae.netSuite) == null ? void 0 : Ne.id) ?? "-"})`
|
|
@@ -2572,7 +2572,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2572
2572
|
} : null,
|
|
2573
2573
|
(ve = p == null ? void 0 : p.netSuite) != null && ve.recordType ? {
|
|
2574
2574
|
label: "Netsuite Type",
|
|
2575
|
-
values: [
|
|
2575
|
+
values: [bt((_e = p == null ? void 0 : p.netSuite) == null ? void 0 : _e.recordType)]
|
|
2576
2576
|
} : null
|
|
2577
2577
|
];
|
|
2578
2578
|
return {
|
|
@@ -2640,7 +2640,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2640
2640
|
{
|
|
2641
2641
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
2642
2642
|
},
|
|
2643
|
-
|
|
2643
|
+
be(ce.amount, !1)
|
|
2644
2644
|
),
|
|
2645
2645
|
L(
|
|
2646
2646
|
"span",
|
|
@@ -2681,9 +2681,9 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2681
2681
|
].filter((ce) => !!ce)
|
|
2682
2682
|
};
|
|
2683
2683
|
}
|
|
2684
|
-
function
|
|
2684
|
+
function H(p) {
|
|
2685
2685
|
var ae, ne;
|
|
2686
|
-
const X = m.findIndex((
|
|
2686
|
+
const X = m.findIndex((I) => I.id === p.id);
|
|
2687
2687
|
return {
|
|
2688
2688
|
header: "Fulfillment",
|
|
2689
2689
|
date: He(new Date(p.createdAt)),
|
|
@@ -2694,7 +2694,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2694
2694
|
},
|
|
2695
2695
|
{
|
|
2696
2696
|
label: "Receiveable items",
|
|
2697
|
-
values: p.items.map((
|
|
2697
|
+
values: p.items.map((I) => {
|
|
2698
2698
|
var me;
|
|
2699
2699
|
return L("div", [
|
|
2700
2700
|
L(
|
|
@@ -2714,14 +2714,14 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2714
2714
|
{
|
|
2715
2715
|
class: "fm-typo-en-body-lg-800 basis-1/2 shrink-0 grow"
|
|
2716
2716
|
},
|
|
2717
|
-
`${
|
|
2717
|
+
`${I.sku.name}`
|
|
2718
2718
|
),
|
|
2719
2719
|
L(
|
|
2720
2720
|
"span",
|
|
2721
2721
|
{
|
|
2722
2722
|
class: "fm-typo-en-body-md-400"
|
|
2723
2723
|
},
|
|
2724
|
-
`${
|
|
2724
|
+
`${I.sku.code} `
|
|
2725
2725
|
)
|
|
2726
2726
|
]
|
|
2727
2727
|
),
|
|
@@ -2742,14 +2742,14 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2742
2742
|
{
|
|
2743
2743
|
class: "fm-typo-en-body-lg-600 self-end"
|
|
2744
2744
|
},
|
|
2745
|
-
|
|
2745
|
+
be(I.amount, !1)
|
|
2746
2746
|
),
|
|
2747
2747
|
L(
|
|
2748
2748
|
"span",
|
|
2749
2749
|
{
|
|
2750
2750
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
2751
2751
|
},
|
|
2752
|
-
((me =
|
|
2752
|
+
((me = I.measurement) == null ? void 0 : me.abbrev) ?? I.sku.unit.abbrev
|
|
2753
2753
|
)
|
|
2754
2754
|
]
|
|
2755
2755
|
),
|
|
@@ -2758,7 +2758,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2758
2758
|
{
|
|
2759
2759
|
class: "flex self-end fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
2760
2760
|
},
|
|
2761
|
-
`${
|
|
2761
|
+
`${I.cost ? `(${Ke(I.cost)})` : ""}`
|
|
2762
2762
|
)
|
|
2763
2763
|
]
|
|
2764
2764
|
)
|
|
@@ -2771,7 +2771,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2771
2771
|
label: "Ref no. (Netsuite)",
|
|
2772
2772
|
values: [(ne = p.netSuite) == null ? void 0 : ne.refNo]
|
|
2773
2773
|
} : null
|
|
2774
|
-
].filter((
|
|
2774
|
+
].filter((I) => !!I)
|
|
2775
2775
|
};
|
|
2776
2776
|
}
|
|
2777
2777
|
return V.map((p) => {
|
|
@@ -2779,7 +2779,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2779
2779
|
case "grn":
|
|
2780
2780
|
return E(p.doc);
|
|
2781
2781
|
case "fulfillment":
|
|
2782
|
-
return
|
|
2782
|
+
return H(p.doc);
|
|
2783
2783
|
}
|
|
2784
2784
|
});
|
|
2785
2785
|
}), oe = Q(() => {
|
|
@@ -2789,37 +2789,37 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2789
2789
|
currency: Ce()
|
|
2790
2790
|
};
|
|
2791
2791
|
return ((m = o.purchaseOrder) == null ? void 0 : m.items.reduce((V, E) => ({
|
|
2792
|
-
...
|
|
2792
|
+
...ht(V, E.totalCost ?? r),
|
|
2793
2793
|
currency: Ce()
|
|
2794
2794
|
}), r)) ?? r;
|
|
2795
2795
|
});
|
|
2796
2796
|
function k(r) {
|
|
2797
2797
|
var F;
|
|
2798
2798
|
const V = (((F = o.purchaseOrder) == null ? void 0 : F.version) ?? Te.enum[1]) === Te.enum[2] ? r.id : r.sku._id, E = o.receivedMap[V];
|
|
2799
|
-
return `<span class="${x(r)} fm-typo-en-body-lg-600">${
|
|
2799
|
+
return `<span class="${x(r)} fm-typo-en-body-lg-600">${Pe.toFormatString({ value: E.received })}</span>/${Lt(r.quantity, r.sku.unit, r.measurement)}`;
|
|
2800
2800
|
}
|
|
2801
2801
|
function x(r) {
|
|
2802
2802
|
var X;
|
|
2803
|
-
const V = (((X = o.purchaseOrder) == null ? void 0 : X.version) ?? Te.enum[1]) === Te.enum[2] ? r.id : r.sku._id, E = o.receivedMap[V], { isPartialReceive:
|
|
2804
|
-
return F ? "text-fm-color-typo-tertiary" :
|
|
2803
|
+
const V = (((X = o.purchaseOrder) == null ? void 0 : X.version) ?? Te.enum[1]) === Te.enum[2] ? r.id : r.sku._id, E = o.receivedMap[V], { isPartialReceive: H, isNoReceive: F, isOverReceive: j, isFullReceive: p } = Yt(E);
|
|
2804
|
+
return F ? "text-fm-color-typo-tertiary" : H ? "text-fm-color-system-warning-300" : j ? "text-fm-color-system-error-300" : p ? "text-fm-color-system-success-300" : "";
|
|
2805
2805
|
}
|
|
2806
2806
|
const N = Q(() => {
|
|
2807
2807
|
var r, m, V;
|
|
2808
|
-
return (r = o.purchaseOrder) != null && r.itemsAtSubmission ? ((m = o.purchaseOrder) == null ? void 0 : m.version) === Te.enum[2] ? o.purchaseOrder.items.reduce((E,
|
|
2808
|
+
return (r = o.purchaseOrder) != null && r.itemsAtSubmission ? ((m = o.purchaseOrder) == null ? void 0 : m.version) === Te.enum[2] ? o.purchaseOrder.items.reduce((E, H) => {
|
|
2809
2809
|
var j, p;
|
|
2810
2810
|
const F = (p = (j = o.purchaseOrder) == null ? void 0 : j.itemsAtSubmission) == null ? void 0 : p.find(
|
|
2811
|
-
(X) => X.id ===
|
|
2811
|
+
(X) => X.id === H.id
|
|
2812
2812
|
);
|
|
2813
|
-
return F && F.quantity !==
|
|
2814
|
-
originalAmount: Number(
|
|
2815
|
-
newAmount: Number(
|
|
2813
|
+
return F && F.quantity !== H.quantity && E.set(H.sku.code, {
|
|
2814
|
+
originalAmount: Number(Pe.toFormatString({ value: F.quantity })),
|
|
2815
|
+
newAmount: Number(Pe.toFormatString({ value: H.quantity }))
|
|
2816
2816
|
}), E;
|
|
2817
|
-
}, /* @__PURE__ */ new Map()) : (V = o.purchaseOrder) == null ? void 0 : V.items.reduce((E,
|
|
2817
|
+
}, /* @__PURE__ */ new Map()) : (V = o.purchaseOrder) == null ? void 0 : V.items.reduce((E, H) => {
|
|
2818
2818
|
var X, ae;
|
|
2819
2819
|
const F = (ae = (X = o.purchaseOrder) == null ? void 0 : X.itemsAtSubmission) == null ? void 0 : ae.find(
|
|
2820
|
-
(ne) => ne.sku._id ===
|
|
2821
|
-
), j = F ? Number(
|
|
2822
|
-
return F && j !== p && E.set(
|
|
2820
|
+
(ne) => ne.sku._id === H.sku._id
|
|
2821
|
+
), j = F ? Number(Pe.toFormatString({ value: F.quantity })) : 0, p = Number(Pe.toFormatString({ value: H.quantity }));
|
|
2822
|
+
return F && j !== p && E.set(H.sku.code, {
|
|
2823
2823
|
originalAmount: j,
|
|
2824
2824
|
newAmount: p
|
|
2825
2825
|
}), E;
|
|
@@ -2834,20 +2834,20 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2834
2834
|
return ((V = o.purchaseOrder) == null ? void 0 : V.version) === Te.enum[2] ? m.get(r.id) : m.get((E = r.sku) == null ? void 0 : E.code);
|
|
2835
2835
|
};
|
|
2836
2836
|
return (r, m) => {
|
|
2837
|
-
const V =
|
|
2837
|
+
const V = G("FmButton"), E = G("FmButtonGroup"), H = G("FmChip"), F = G("FmIcon"), j = G("FmMenuDivider"), p = G("FmCard"), X = G("FmTooltip"), ae = G("FmSpacer"), ne = G("FmSideSheet");
|
|
2838
2838
|
return i(), re(ne, {
|
|
2839
2839
|
modelValue: v(R),
|
|
2840
|
-
"onUpdate:modelValue": m[8] || (m[8] = (
|
|
2840
|
+
"onUpdate:modelValue": m[8] || (m[8] = (I) => kt(R) ? R.value = I : null),
|
|
2841
2841
|
"dismiss-away": t.value,
|
|
2842
2842
|
"max-width": 600,
|
|
2843
2843
|
"close-button": !1
|
|
2844
2844
|
}, {
|
|
2845
2845
|
"side-sheet-header": Z(() => {
|
|
2846
|
-
var
|
|
2846
|
+
var I, me;
|
|
2847
2847
|
return [
|
|
2848
2848
|
e("div", ao, [
|
|
2849
2849
|
e("div", lo, [
|
|
2850
|
-
e("div", io, y(v(d)("inventory.transfer.receiveRequest.details.title") + ((
|
|
2850
|
+
e("div", io, y(v(d)("inventory.transfer.receiveRequest.details.title") + ((I = r.purchaseOrder) != null && I.seqNumber ? ` #${(me = r.purchaseOrder) == null ? void 0 : me.seqNumber}` : "")), 1),
|
|
2851
2851
|
D(V, {
|
|
2852
2852
|
class: "ml-auto -m-2",
|
|
2853
2853
|
variant: "tertiary",
|
|
@@ -2872,7 +2872,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2872
2872
|
];
|
|
2873
2873
|
}),
|
|
2874
2874
|
default: Z(() => {
|
|
2875
|
-
var
|
|
2875
|
+
var I, me, Oe, Ae, Ne;
|
|
2876
2876
|
return [
|
|
2877
2877
|
e("div", co, [
|
|
2878
2878
|
K.value.value === "overview" ? (i(), _(ue, { key: 0 }, [
|
|
@@ -2887,7 +2887,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2887
2887
|
e("div", uo, [
|
|
2888
2888
|
e("div", mo, y(v(d)("inventory.transfer.receiveRequest.details.requestSummary")), 1),
|
|
2889
2889
|
e("div", po, [
|
|
2890
|
-
D(
|
|
2890
|
+
D(Ie, null, {
|
|
2891
2891
|
default: Z(() => {
|
|
2892
2892
|
var Ee;
|
|
2893
2893
|
return [
|
|
@@ -2896,7 +2896,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2896
2896
|
}),
|
|
2897
2897
|
_: 1
|
|
2898
2898
|
}),
|
|
2899
|
-
D(
|
|
2899
|
+
D(H, {
|
|
2900
2900
|
label: B.value.status,
|
|
2901
2901
|
class: Me(B.value.statusClass),
|
|
2902
2902
|
compact: ""
|
|
@@ -2912,8 +2912,8 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2912
2912
|
]),
|
|
2913
2913
|
D(j),
|
|
2914
2914
|
e("div", vo, [
|
|
2915
|
-
e("div",
|
|
2916
|
-
e("div",
|
|
2915
|
+
e("div", bo, [
|
|
2916
|
+
e("div", ho, [
|
|
2917
2917
|
e("div", go, y(v(d)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
2918
2918
|
]),
|
|
2919
2919
|
e("div", _o, y(v(We)(((ee = r.purchaseOrder) == null ? void 0 : ee._id) ?? "")), 1)
|
|
@@ -2937,8 +2937,8 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2937
2937
|
e("div", Fo, y(r.transferTo), 1)
|
|
2938
2938
|
])) : U("", !0),
|
|
2939
2939
|
(fe = r.purchaseOrder) != null && fe.ref ? (i(), _("div", To, [
|
|
2940
|
-
e("div",
|
|
2941
|
-
e("div",
|
|
2940
|
+
e("div", Po, y(v(d)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
2941
|
+
e("div", Io, y(r.purchaseOrder.ref), 1)
|
|
2942
2942
|
])) : U("", !0),
|
|
2943
2943
|
(Fe = r.purchaseOrder) != null && Fe.remark ? (i(), _("div", qo, [
|
|
2944
2944
|
e("div", Vo, y(v(d)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
@@ -2962,7 +2962,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
2962
2962
|
e("div", Uo, [
|
|
2963
2963
|
e("span", Bo, [
|
|
2964
2964
|
ke(y(qe.value ? v(d)("inventory.transfer.receiveRequest.details.receivedItems") : v(d)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
2965
|
-
(me = (
|
|
2965
|
+
(me = (I = r.purchaseOrder) == null ? void 0 : I.netSuite) != null && me.missingItems && ((Ae = (Oe = r.purchaseOrder) == null ? void 0 : Oe.netSuite) == null ? void 0 : Ae.missingItems.length) > 0 ? (i(), re(X, {
|
|
2966
2966
|
key: 0,
|
|
2967
2967
|
variant: "rich",
|
|
2968
2968
|
placement: "top",
|
|
@@ -3015,7 +3015,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
3015
3015
|
content: Z(() => {
|
|
3016
3016
|
var ve, _e;
|
|
3017
3017
|
return [
|
|
3018
|
-
e("div",
|
|
3018
|
+
e("div", Ho, [
|
|
3019
3019
|
m[9] || (m[9] = e("div", { class: "font-semibold" }, "Submission changes", -1)),
|
|
3020
3020
|
e("div", null, "Original Amount: " + y((ve = ie(ee)) == null ? void 0 : ve.originalAmount), 1),
|
|
3021
3021
|
e("div", null, " New Amount: " + y((_e = ie(ee)) == null ? void 0 : _e.newAmount), 1)
|
|
@@ -3032,7 +3032,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
3032
3032
|
_: 2
|
|
3033
3033
|
}, 1024)) : U("", !0)
|
|
3034
3034
|
]),
|
|
3035
|
-
e("div",
|
|
3035
|
+
e("div", Go, [
|
|
3036
3036
|
e("span", {
|
|
3037
3037
|
innerHTML: k(ee)
|
|
3038
3038
|
}, null, 8, Wo)
|
|
@@ -3044,7 +3044,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
3044
3044
|
])
|
|
3045
3045
|
]);
|
|
3046
3046
|
}), 128)),
|
|
3047
|
-
+v(
|
|
3047
|
+
+v(be)(oe.value) ? (i(), _(ue, { key: 0 }, [
|
|
3048
3048
|
e("div", Xo, [
|
|
3049
3049
|
D(j)
|
|
3050
3050
|
]),
|
|
@@ -3098,8 +3098,8 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
3098
3098
|
e("div", yn, y(ee.header), 1),
|
|
3099
3099
|
e("div", vn, y(ee.date), 1)
|
|
3100
3100
|
]),
|
|
3101
|
-
e("div",
|
|
3102
|
-
ee.header === "Received" && ee.deliveryOrder && r.purchaseOrder ? (i(), re(
|
|
3101
|
+
e("div", bn, [
|
|
3102
|
+
ee.header === "Received" && ee.deliveryOrder && r.purchaseOrder ? (i(), re(hr, {
|
|
3103
3103
|
key: 0,
|
|
3104
3104
|
deliveryOrder: ee.deliveryOrder,
|
|
3105
3105
|
purchaseOrder: r.purchaseOrder,
|
|
@@ -3107,7 +3107,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
3107
3107
|
f("update:show", !1), f("submitted");
|
|
3108
3108
|
})
|
|
3109
3109
|
}, null, 8, ["deliveryOrder", "purchaseOrder"])) : U("", !0),
|
|
3110
|
-
(ve = (pe = ee.deliveryOrder) == null ? void 0 : pe.netSuite) != null && ve.id ? (i(), re(
|
|
3110
|
+
(ve = (pe = ee.deliveryOrder) == null ? void 0 : pe.netSuite) != null && ve.id ? (i(), re(Ie, { key: 1 }, {
|
|
3111
3111
|
default: Z(() => {
|
|
3112
3112
|
var fe, Fe;
|
|
3113
3113
|
return [
|
|
@@ -3126,7 +3126,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
3126
3126
|
])
|
|
3127
3127
|
])
|
|
3128
3128
|
]),
|
|
3129
|
-
e("div",
|
|
3129
|
+
e("div", hn, [
|
|
3130
3130
|
e("div", gn, [
|
|
3131
3131
|
e("div", _n, [
|
|
3132
3132
|
e("div", {
|
|
@@ -3175,7 +3175,7 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
3175
3175
|
D(ae),
|
|
3176
3176
|
e("div", null, [
|
|
3177
3177
|
e("img", {
|
|
3178
|
-
src: v(
|
|
3178
|
+
src: v(Mt),
|
|
3179
3179
|
alt: "List is empty"
|
|
3180
3180
|
}, null, 8, rn)
|
|
3181
3181
|
]),
|
|
@@ -3190,41 +3190,41 @@ const os = { class: "flex flex-row-reverse" }, ns = /* @__PURE__ */ $e({
|
|
|
3190
3190
|
}),
|
|
3191
3191
|
"side-sheet-footer": Z(() => [
|
|
3192
3192
|
e("div", $n, [
|
|
3193
|
-
(i(!0), _(ue, null, xe(z.value, (
|
|
3194
|
-
v(ot)[
|
|
3195
|
-
key:
|
|
3196
|
-
label: v(d)(v(ot)[
|
|
3197
|
-
onClick: (me) => de(
|
|
3198
|
-
loading: l.value ===
|
|
3199
|
-
disabled: l.value !==
|
|
3200
|
-
variant: v(ot)[
|
|
3193
|
+
(i(!0), _(ue, null, xe(z.value, (I) => (i(), _(ue, null, [
|
|
3194
|
+
v(ot)[I].available != !1 ? (i(), re(V, {
|
|
3195
|
+
key: I,
|
|
3196
|
+
label: v(d)(v(ot)[I].translationKey),
|
|
3197
|
+
onClick: (me) => de(I),
|
|
3198
|
+
loading: l.value === I,
|
|
3199
|
+
disabled: l.value !== I && A.value,
|
|
3200
|
+
variant: v(ot)[I].buttonVariant
|
|
3201
3201
|
}, null, 8, ["label", "onClick", "loading", "disabled", "variant"])) : U("", !0)
|
|
3202
3202
|
], 64))), 256)),
|
|
3203
3203
|
v(w).ableToMarkReceived(r.purchaseOrder) && !z.value.includes("completeReceive") ? (i(), re(V, {
|
|
3204
3204
|
key: 0,
|
|
3205
3205
|
label: v(d)("inventory.transfer.receiveRequest.actions.completeReceive"),
|
|
3206
|
-
onClick: m[4] || (m[4] = (
|
|
3206
|
+
onClick: m[4] || (m[4] = (I) => de("completeReceive")),
|
|
3207
3207
|
loading: l.value === "completeReceive",
|
|
3208
3208
|
disabled: l.value !== "completeReceive" && A.value
|
|
3209
3209
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
3210
3210
|
v(w).ableToMarkApproved(r.purchaseOrder) && r.canApprove && !z.value.includes("approveRequest") ? (i(), re(V, {
|
|
3211
3211
|
key: 1,
|
|
3212
3212
|
label: v(d)("inventory.transfer.approval.actions.approveRequest"),
|
|
3213
|
-
onClick: m[5] || (m[5] = (
|
|
3213
|
+
onClick: m[5] || (m[5] = (I) => de("approveRequest")),
|
|
3214
3214
|
loading: l.value === "approveRequest",
|
|
3215
3215
|
disabled: l.value !== "approveRequest" && A.value
|
|
3216
3216
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
3217
3217
|
v(w).ableToCreateFulfillment(r.purchaseOrder, r.poRequest) && o.scope === "approval" ? (i(), re(V, {
|
|
3218
3218
|
key: 2,
|
|
3219
3219
|
label: v(d)("inventory.transfer.receiveRequest.actions.processRequest"),
|
|
3220
|
-
onClick: m[6] || (m[6] = (
|
|
3220
|
+
onClick: m[6] || (m[6] = (I) => de("processRequest")),
|
|
3221
3221
|
loading: l.value === "processRequest",
|
|
3222
3222
|
disabled: l.value !== "processRequest" && A.value
|
|
3223
3223
|
}, null, 8, ["label", "loading", "disabled"])) : U("", !0),
|
|
3224
3224
|
D(V, {
|
|
3225
3225
|
label: v(d)("common.close"),
|
|
3226
3226
|
variant: "tertiary",
|
|
3227
|
-
onClick: m[7] || (m[7] = (
|
|
3227
|
+
onClick: m[7] || (m[7] = (I) => f("update:show", !1))
|
|
3228
3228
|
}, null, 8, ["label"])
|
|
3229
3229
|
])
|
|
3230
3230
|
]),
|