@feedmepos/mf-inventory-portal 1.2.50-dev.2 → 1.2.51-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DAO7XF9h.js → App-bY_YcLwH.js} +24 -23
- package/dist/{ApprovalView-BUHefc15.js → ApprovalView-vzIiBqt2.js} +5 -5
- package/dist/{BindingsDialog-Cx9ngX7X.js → BindingsDialog-DCh2ORem.js} +2 -2
- package/dist/{BindingsPicker-CIZ9FVgv.js → BindingsPicker-DcNG03p-.js} +2 -2
- package/dist/{BindingsTable-CMyZkvyn.js → BindingsTable-B_Yaq-z3.js} +3 -3
- package/dist/{ClosingDraftView-D4CMfSvf.js → ClosingDraftView-C0T8cWEB.js} +9 -9
- package/dist/{ClosingHistoryView-J_2EA-F4.js → ClosingHistoryView-DkKAjh7T.js} +27 -27
- package/dist/{ClosingTemplateView-Bz21bJLn.js → ClosingTemplateView-DpH1EyW5.js} +14 -14
- package/dist/{DeliveryOrderPrintPreview-D9xRJSBT.js → DeliveryOrderPrintPreview-B2ecLaLu.js} +1 -1
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CI4z5XYQ.js +188 -0
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BcJ1ydJ1.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-kVpsL4cx.js} +2 -2
- package/dist/{FmMultiselectDialog-B5F93-xV.js → FmMultiselectDialog-BviFuAM5.js} +81 -84
- package/dist/{FmMultiselectDialog-Cxj6_Bbq.js → FmMultiselectDialog-DGUwruxs.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-CJsg-6qm.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CRTG3VFo.js} +3 -3
- package/dist/{ImportView-mq9p_YKN.js → ImportView-Bk4Z7nGh.js} +6 -6
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-CvdNblLJ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BEJ19Uej.js} +1 -1
- package/dist/{IngredientGroupView-1YQdweWW.js → IngredientGroupView-8GHMMOux.js} +5 -5
- package/dist/{IngredientsView-rZZDO37M.js → IngredientsView-DbmODx-v.js} +14 -14
- package/dist/{IntegrationView-0KCNTL9w.js → IntegrationView-DC0O_Lk4.js} +12 -12
- package/dist/{InventoryBindingForm-Cz6tMVlQ.js → InventoryBindingForm-ln0q25n_.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-9jHxMOEn.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CFgk9rSe.js} +21 -21
- package/dist/{InventoryBindingSummary-DarjH7Dn.js → InventoryBindingSummary-BlNXhS4v.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BR6U0SpT.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BY_mXqPr.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C9ffyR0d.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BhNjwE3X.js} +2 -2
- package/dist/{PublishView-Bam4W7ko.js → PublishView-5GkTzxbi.js} +3 -3
- package/dist/{PurchaseOrderPrintPreview-DEKkUMB6.js → PurchaseOrderPrintPreview-Dj5lJ5Ou.js} +1 -1
- package/dist/ReceiveRequestView-BAYczSpW.js +2913 -0
- package/dist/{RecipeView-CwwKtDRg.js → RecipeView-OLPRwnVx.js} +8 -8
- package/dist/{StockView-CVN5MKbj.js → StockView-TcA5zJqr.js} +15 -15
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bm1MxmBR.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DZ6TDkKR.js} +1 -1
- package/dist/{SupplierView-BhnmPv7N.js → SupplierView-77qI9YCg.js} +11 -11
- package/dist/{SurchargeView-nlkL3YIK.js → SurchargeView-CxW2ZZ8a.js} +6 -6
- package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DdPVsOZY.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-_8YeihNH.js} +2 -2
- package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bp49G_dV.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-ByPIjcED.js} +1 -1
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BQFBZ0CH.js → TransferDetails.vue_vue_type_script_setup_true_lang-7BoFD5wV.js} +128 -128
- package/dist/{TransferTemplateView-7AJGTAAy.js → TransferTemplateView-CI0U36Tr.js} +81 -80
- package/dist/{UnitView-Dz4bgzmW.js → UnitView-fNFFUNlb.js} +6 -6
- package/dist/{WarehouseView-DEYOa_Ol.js → WarehouseView-BAXgnZnO.js} +5 -5
- package/dist/{WastageTemplateView-DdPkFfyQ.js → WastageTemplateView-C5qCXWqZ.js} +14 -14
- package/dist/{app-kim0oKgm.js → app-CddcvygU.js} +25 -25
- package/dist/app.js +1 -1
- package/dist/{closing-template-MLHUWgwA.js → closing-template-DxdLqlb1.js} +1 -1
- package/dist/{date2-Ck1fxOS1.js → date2-CVZy20Q_.js} +1 -1
- package/dist/{dayjs.min-CgHxLw1P.js → dayjs.min-NrRtjg32.js} +26 -26
- package/dist/{decimal-DVjzMCmx.js → decimal-Du3Grkk9.js} +2 -2
- package/dist/{defineDeepModel-CLo1ie3w.js → defineDeepModel-DgRoiQBp.js} +1 -1
- package/dist/{duplicate-template-B_f_fYhs.js → duplicate-template-DvnZ4BW6.js} +1 -1
- package/dist/{feature-D4HcMaGK.js → feature-CTA18HlL.js} +7530 -5425
- package/dist/{format-time-from-id-CwtHJpC0.js → format-time-from-id-6kt1RMWs.js} +1 -1
- package/dist/{format-unit-display-DRIOlVir.js → format-unit-display-mVJ-nuJe.js} +10 -10
- package/dist/{import-export.helper-BrcydEPI.js → import-export.helper-DWwlJy7N.js} +5 -5
- package/dist/{index-Wd74fJNj.js → index-BEcj1jGd.js} +3 -3
- package/dist/{index-ChruXaud.js → index-BfcdagSF.js} +1 -1
- package/dist/{index-D9dtwK1d.js → index-By-jyWOP.js} +1 -1
- package/dist/{lodash-MkfFbMhZ.js → lodash-D0COOw3m.js} +1 -1
- package/dist/{netsuite-D4cXyIr7.js → netsuite-3LgQ5ztL.js} +36 -36
- package/dist/{purchase-order-template-BdKUiSPI.js → purchase-order-template-CJCmABzP.js} +1 -1
- package/dist/{rules-KSzt3qOJ.js → rules-hQBVd1Mn.js} +9 -9
- package/dist/{stock-DZliLQNR.js → stock-4xGaezEy.js} +3 -3
- package/dist/{stock-BHWNLsBc.js → stock-B6QW-S14.js} +1 -1
- package/dist/stores/feature.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-CiMOpHKx.js → supplier-C-dmFnqw.js} +2 -2
- package/dist/{surcharge-CjdNdcm1.js → surcharge-Db4IiSEQ.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CK_Ldhwm.js → use-ingredient-select-dialog-DgYSZDN8.js} +2 -2
- package/dist/{use-inventory-binding-dialog-jfME3m3c.js → use-inventory-binding-dialog-CnYcA_Fo.js} +2 -2
- package/dist/{use-template-enabled-locations-2-Dbk_RoRj.js → use-template-enabled-locations-2-B_aZrMUU.js} +2 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +3 -1
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
- package/dist/{vue-i18n-DUlOMRWF.js → vue-i18n-BCEDBY4T.js} +368 -368
- package/dist/{xlsx-CiNXr9Ie.js → xlsx-CJsXiiEq.js} +398 -398
- package/dist/{xlsx.util-D81JjCsx.js → xlsx.util-CSudzOii.js} +1 -1
- package/package.json +4 -4
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-ifkxhq6-.js +0 -231
- package/dist/ReceiveRequestView-DDfHVcG2.js +0 -3028
- package/dist/cypress/component/receive-request/KDI-15-total-price-currency.cy.d.ts +0 -2
- package/dist/views/ingredients/helper/calculate-default-cost.d.ts +0 -9
- package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +0 -22
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { p as Ct, f as We } from "./format-time-from-id-
|
|
2
|
-
import { ref as J, computed as Y, h as L, defineComponent as $e, reactive as Rt, onMounted as yt, resolveComponent as H, openBlock as l, createBlock as re, withCtx as ee, createElementVNode as e, createVNode as D, unref as v, createElementBlock as h, toDisplayString as y, createCommentVNode as U, Fragment as de, renderList as xe, createTextVNode as ke, normalizeClass as Me, watch as kt, isRef as Dt, resolveDynamicComponent as
|
|
1
|
+
import { p as Ct, f as We } from "./format-time-from-id-6kt1RMWs.js";
|
|
2
|
+
import { ref as J, computed as Y, h as L, defineComponent as $e, reactive as Rt, onMounted as yt, resolveComponent as H, openBlock as l, createBlock as re, withCtx as ee, createElementVNode as e, createVNode as D, unref as v, createElementBlock as h, toDisplayString as y, createCommentVNode as U, Fragment as de, renderList as xe, createTextVNode as ke, normalizeClass as Me, watch as kt, isRef as Dt, resolveDynamicComponent as Nt } from "vue";
|
|
3
3
|
import { c as mt } from "./component-DpCUABT3.js";
|
|
4
4
|
import { R as ye, D as Se } from "./row-action.enum-BcW_L_nE.js";
|
|
5
|
-
import { o as
|
|
6
|
-
import { l as ht, d as gt, a as he, t as Qe, e as Ke } from "./rules-
|
|
7
|
-
import { F as Tt } from "./decimal-
|
|
8
|
-
import { t as It, c as Pt, h as _t, a as He } from "./date2-
|
|
9
|
-
import { u as Ue, F as qt, a as st } from "./feature-
|
|
5
|
+
import { o as At, u as De, W as M, X as Ze, M as se, E as Ft, c as vt, v as it, Y as bt, t as Ge, s as Ce, B as Ye, w as qe, C as Pe } from "./app-CddcvygU.js";
|
|
6
|
+
import { l as ht, d as gt, a as he, t as Qe, e as Ke } from "./rules-hQBVd1Mn.js";
|
|
7
|
+
import { F as Tt } from "./decimal-Du3Grkk9.js";
|
|
8
|
+
import { t as It, c as Pt, h as _t, a as He } from "./date2-CVZy20Q_.js";
|
|
9
|
+
import { u as Ue, F as qt, a as st } from "./feature-CTA18HlL.js";
|
|
10
10
|
import { useCoreStore as ct, useI18n as ut } from "@feedmepos/mf-common";
|
|
11
|
-
import { u as et, a as dt, S as we } from "./netsuite-
|
|
11
|
+
import { u as et, a as dt, S as we } from "./netsuite-3LgQ5ztL.js";
|
|
12
12
|
import { useDialog as tt, useSnackbar as Be, components as Je, FmButtonVariant as ge, useProxiedModel as Vt } from "@feedmepos/ui-library";
|
|
13
13
|
import { F as Ve } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CWZkVCAj.js";
|
|
14
14
|
import { E as Et } from "./empty-placeholder-wf6-BWE8.js";
|
|
15
|
-
import { u as Lt, a as Mt, f as Ut } from "./format-unit-display-
|
|
16
|
-
import { u as je, _ as Bt } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-
|
|
17
|
-
import { _ as jt, a as zt, b as Kt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-
|
|
15
|
+
import { u as Lt, a as Mt, f as Ut } from "./format-unit-display-mVJ-nuJe.js";
|
|
16
|
+
import { u as je, _ as Bt } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-_8YeihNH.js";
|
|
17
|
+
import { _ as jt, a as zt, b as Kt } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CRTG3VFo.js";
|
|
18
18
|
import { u as Gt, R as pt } from "./usePromise-CbVUCxhj.js";
|
|
19
|
-
import { c as Ht } from "./index-
|
|
20
|
-
import { i as Wt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
19
|
+
import { c as Ht } from "./index-BEcj1jGd.js";
|
|
20
|
+
import { i as Wt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-kVpsL4cx.js";
|
|
21
21
|
import { F as ft } from "./form-mode.enum-BKiNVH6A.js";
|
|
22
|
-
import { d as St } from "./defineDeepModel-
|
|
23
|
-
import { u as Yt } from "./vue-i18n-
|
|
24
|
-
const Qt =
|
|
22
|
+
import { d as St } from "./defineDeepModel-DgRoiQBp.js";
|
|
23
|
+
import { u as Yt } from "./vue-i18n-BCEDBY4T.js";
|
|
24
|
+
const Qt = At((C, a) => {
|
|
25
25
|
const o = De();
|
|
26
26
|
return {
|
|
27
27
|
async getShipments({
|
|
28
28
|
start: f,
|
|
29
29
|
end: b
|
|
30
30
|
}) {
|
|
31
|
-
const n = o.currentLocationDBName,
|
|
32
|
-
return await a.get(`${
|
|
31
|
+
const n = o.currentLocationDBName, N = `${C.inventoryBackendUrl}/${n}/shipments`;
|
|
32
|
+
return await a.get(`${N}?start=${f}&end=${b}`);
|
|
33
33
|
},
|
|
34
34
|
async getShipmentsByIds(f) {
|
|
35
35
|
if (f.length === 0)
|
|
@@ -133,13 +133,13 @@ function at(C, a, o) {
|
|
|
133
133
|
}
|
|
134
134
|
function Ot() {
|
|
135
135
|
const C = De(), a = je(), o = Ue();
|
|
136
|
-
async function f(n,
|
|
136
|
+
async function f(n, N) {
|
|
137
137
|
const t = C.currentLocationDBName;
|
|
138
|
-
return n.doc.supplier.internal && n.operation === M.enum.confirmDraft && (n.operation = M.enum.submitRequest), await a.processPurchaseOrder(n,
|
|
138
|
+
return n.doc.supplier.internal && n.operation === M.enum.confirmDraft && (n.operation = M.enum.submitRequest), await a.processPurchaseOrder(n, N || t);
|
|
139
139
|
}
|
|
140
|
-
async function b(n,
|
|
140
|
+
async function b(n, N) {
|
|
141
141
|
const t = C.currentLocationDBName;
|
|
142
|
-
return await a.processPurchaseOrderV2(n,
|
|
142
|
+
return await a.processPurchaseOrderV2(n, N || t);
|
|
143
143
|
}
|
|
144
144
|
return (n) => o.useOperatePurchaseOrderV2 ? b(n.operateV2, n.transferTo) : f(n.operate, n.transferTo);
|
|
145
145
|
}
|
|
@@ -148,10 +148,10 @@ const ze = J(), rt = J();
|
|
|
148
148
|
function Yn(C, a) {
|
|
149
149
|
const o = tt(), f = De(), b = Ue();
|
|
150
150
|
et();
|
|
151
|
-
const n = Lt(),
|
|
151
|
+
const n = Lt(), N = Mt(), t = J(!1), c = Be(), S = je(), x = Qt(), u = J(new Array()), I = J(new Array()), A = J(
|
|
152
152
|
a != null && a.startDate && (a != null && a.endDate) ? a : Wt()
|
|
153
153
|
), w = Y(() => {
|
|
154
|
-
const B = new Date(
|
|
154
|
+
const B = new Date(A.value.startDate), q = new Date(A.value.endDate);
|
|
155
155
|
return {
|
|
156
156
|
start: It(B).toISOString(),
|
|
157
157
|
end: Pt(q).toISOString()
|
|
@@ -210,7 +210,7 @@ function Yn(C, a) {
|
|
|
210
210
|
const q = B.flatMap((W) => W.shipmentIds || []).filter(Boolean), oe = q.length > 0 ? await x.getShipmentsByIds(q) : [];
|
|
211
211
|
I.value = oe;
|
|
212
212
|
const k = await r.readCurrentLocationLastClosing(!0), _ = k == null ? void 0 : k._id;
|
|
213
|
-
_ && (d.value = Ct(_)), await b.awaitFeatureLoaded(() => b.mustUsePoTemplate) && await
|
|
213
|
+
_ && (d.value = Ct(_)), await b.awaitFeatureLoaded(() => b.mustUsePoTemplate) && await N.fetchTemplates();
|
|
214
214
|
const F = u.value.map((W) => {
|
|
215
215
|
var ce;
|
|
216
216
|
return ((ce = W.request) == null ? void 0 : ce.id) ?? "";
|
|
@@ -253,7 +253,7 @@ function Yn(C, a) {
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
function X(B, q) {
|
|
256
|
-
|
|
256
|
+
A.value = {
|
|
257
257
|
startDate: B,
|
|
258
258
|
endDate: q
|
|
259
259
|
}, R();
|
|
@@ -335,7 +335,7 @@ function Yn(C, a) {
|
|
|
335
335
|
t.value = !1, R();
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
async function
|
|
338
|
+
async function Ne(B, q, oe) {
|
|
339
339
|
const k = xt[q];
|
|
340
340
|
if (!k) {
|
|
341
341
|
c.open({
|
|
@@ -354,7 +354,7 @@ function Yn(C, a) {
|
|
|
354
354
|
ie(B, q, _, oe);
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
|
-
async function
|
|
357
|
+
async function Ae() {
|
|
358
358
|
o.open({
|
|
359
359
|
title: "Upload Transfer",
|
|
360
360
|
primaryActions: {
|
|
@@ -387,23 +387,23 @@ function Yn(C, a) {
|
|
|
387
387
|
promptUpdateTransferDialog: g,
|
|
388
388
|
transferDetailsProps: j,
|
|
389
389
|
promptShowTransferDetails: ve,
|
|
390
|
-
submitAction:
|
|
390
|
+
submitAction: Ne,
|
|
391
391
|
xilnexImportDialogProps: rt,
|
|
392
|
-
promptUploadTransferDialog:
|
|
392
|
+
promptUploadTransferDialog: Ae
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
function Xt(C, a) {
|
|
396
396
|
return a.reduce(
|
|
397
397
|
(f, b) => {
|
|
398
|
-
const n = b.received.find((
|
|
398
|
+
const n = b.received.find((N) => N.sku._id === C._id);
|
|
399
399
|
return n && (f = ht(f, n.amount)), f;
|
|
400
400
|
},
|
|
401
401
|
Tt.toPrecision(gt(0), C.unit.precision)
|
|
402
402
|
);
|
|
403
403
|
}
|
|
404
404
|
function Zt(C) {
|
|
405
|
-
const { po: a, currentLocation: o, business: f, fulfilling: b, por: n } = C, { name:
|
|
406
|
-
name:
|
|
405
|
+
const { po: a, currentLocation: o, business: f, fulfilling: b, por: n } = C, { name: N, address: t, regNo: c, legalName: S } = o.doc.profile, x = {
|
|
406
|
+
name: N,
|
|
407
407
|
legalName: S,
|
|
408
408
|
registrationNumber: c,
|
|
409
409
|
line1: t == null ? void 0 : t.line1,
|
|
@@ -437,7 +437,7 @@ function Zt(C) {
|
|
|
437
437
|
value: $.totalCost
|
|
438
438
|
})}` : void 0
|
|
439
439
|
};
|
|
440
|
-
}),
|
|
440
|
+
}), A = a.deliveryOrder.map(($) => ({
|
|
441
441
|
createdAt: _t(new Date($.createdAt)),
|
|
442
442
|
ref: $.deliveryOrderNumber,
|
|
443
443
|
remark: $.remark || "",
|
|
@@ -473,7 +473,7 @@ function Zt(C) {
|
|
|
473
473
|
supplier: u,
|
|
474
474
|
items: I,
|
|
475
475
|
status: a.status,
|
|
476
|
-
deliveryOrders:
|
|
476
|
+
deliveryOrders: A
|
|
477
477
|
}, i = new URL(window.location.href), g = b && (a.deliveryFullfillment || []).length > 0 ? "receive-request/delivery-print-preview" : "receive-request/print-preview";
|
|
478
478
|
i.pathname = i.hostname.includes("portal.feedme") ? `/inventory/${g}` : `/${g}`, i.searchParams.append("data", JSON.stringify(d)), window.open(i.href, "_blank", "noreferrer");
|
|
479
479
|
}
|
|
@@ -551,16 +551,16 @@ function wt() {
|
|
|
551
551
|
return !(!a || (a == null ? void 0 : a.status) !== se.enum.REQUESTING);
|
|
552
552
|
},
|
|
553
553
|
ableToCreateFulfillment(a, o) {
|
|
554
|
-
var n,
|
|
554
|
+
var n, N;
|
|
555
555
|
if (!C.acceptRequireFulfillment || !a || !o || a.status !== se.enum.PROCESSING || !o.processedAt)
|
|
556
556
|
return !1;
|
|
557
|
-
const f = (n = o == null ? void 0 : o.from) == null ? void 0 : n.dbName, b = (
|
|
557
|
+
const f = (n = o == null ? void 0 : o.from) == null ? void 0 : n.dbName, b = (N = o == null ? void 0 : o.to) == null ? void 0 : N.dbName;
|
|
558
558
|
return !(f.startsWith("restaurant_") && b.startsWith("restaurant_"));
|
|
559
559
|
}
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
562
|
function Qn(C, a, o) {
|
|
563
|
-
const f = De(), b = et(), n = ct(),
|
|
563
|
+
const f = De(), b = et(), n = ct(), N = wt(), { t } = ut();
|
|
564
564
|
function c(w) {
|
|
565
565
|
switch (w.status) {
|
|
566
566
|
case "DRAFT":
|
|
@@ -572,7 +572,7 @@ function Qn(C, a, o) {
|
|
|
572
572
|
];
|
|
573
573
|
case "RECEIVING":
|
|
574
574
|
return [
|
|
575
|
-
...
|
|
575
|
+
...N.ableToMarkReceived(w) ? [Le[M.enum.completeReceive]] : [],
|
|
576
576
|
Se[ye.Details],
|
|
577
577
|
Se[ye.Print]
|
|
578
578
|
];
|
|
@@ -706,8 +706,8 @@ function Qn(C, a, o) {
|
|
|
706
706
|
if (Q != null && Q.milestones && Q.milestones.length > 0) {
|
|
707
707
|
const ve = Q.milestones[Q.milestones.length - 1];
|
|
708
708
|
if (ve.estimatedTime) {
|
|
709
|
-
const ie = new Date(ve.estimatedTime),
|
|
710
|
-
j = `${ie.toLocaleString("en-US", { month: "short" })} ${
|
|
709
|
+
const ie = new Date(ve.estimatedTime), Ne = ie.getDate().toString().padStart(2, "0");
|
|
710
|
+
j = `${ie.toLocaleString("en-US", { month: "short" })} ${Ne}`;
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
713
|
return L(
|
|
@@ -982,7 +982,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
982
982
|
amount: t.quantity ?? { amount: 1, precision: 0 }
|
|
983
983
|
})));
|
|
984
984
|
});
|
|
985
|
-
const
|
|
985
|
+
const N = Y(() => f.items.length <= 10);
|
|
986
986
|
return (t, c) => {
|
|
987
987
|
const S = H("FmTable"), x = H("FmButton"), u = H("FmForm");
|
|
988
988
|
return l(), re(u, {
|
|
@@ -1001,11 +1001,11 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1001
1001
|
{
|
|
1002
1002
|
header: "Code",
|
|
1003
1003
|
cell: (I) => {
|
|
1004
|
-
const
|
|
1004
|
+
const A = o.purchaseOrder.items.find((w) => w.id === I.row.original.id || w.sku._id === I.row.original.sku._id);
|
|
1005
1005
|
return L(
|
|
1006
1006
|
v(Je).FmTooltip,
|
|
1007
1007
|
{
|
|
1008
|
-
content:
|
|
1008
|
+
content: A.code,
|
|
1009
1009
|
placement: "top",
|
|
1010
1010
|
variant: "plain",
|
|
1011
1011
|
zIndex: 50
|
|
@@ -1015,7 +1015,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1015
1015
|
{
|
|
1016
1016
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
1017
1017
|
},
|
|
1018
|
-
|
|
1018
|
+
A.code
|
|
1019
1019
|
)
|
|
1020
1020
|
);
|
|
1021
1021
|
}
|
|
@@ -1023,11 +1023,11 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1023
1023
|
{
|
|
1024
1024
|
header: "Name",
|
|
1025
1025
|
cell: (I) => {
|
|
1026
|
-
const
|
|
1026
|
+
const A = o.purchaseOrder.items.find((w) => w.id === I.row.original.id || w.sku._id === I.row.original.sku._id);
|
|
1027
1027
|
return L(
|
|
1028
1028
|
v(Je).FmTooltip,
|
|
1029
1029
|
{
|
|
1030
|
-
content:
|
|
1030
|
+
content: A.name,
|
|
1031
1031
|
placement: "top",
|
|
1032
1032
|
variant: "plain",
|
|
1033
1033
|
zIndex: 50
|
|
@@ -1037,7 +1037,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1037
1037
|
{
|
|
1038
1038
|
class: "flex-auto line-clamp-2 text-ellipsis break-all"
|
|
1039
1039
|
},
|
|
1040
|
-
|
|
1040
|
+
A.name
|
|
1041
1041
|
)
|
|
1042
1042
|
);
|
|
1043
1043
|
}
|
|
@@ -1045,7 +1045,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1045
1045
|
{
|
|
1046
1046
|
header: "Amount",
|
|
1047
1047
|
cell: (I) => {
|
|
1048
|
-
const
|
|
1048
|
+
const A = I.row.original, w = o.purchaseOrder.items.find((r) => r.id === A.id || r.sku._id === A.sku._id), O = A.amount ?? {
|
|
1049
1049
|
amount: 1,
|
|
1050
1050
|
precision: 0
|
|
1051
1051
|
};
|
|
@@ -1055,13 +1055,13 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1055
1055
|
},
|
|
1056
1056
|
modelValue: {
|
|
1057
1057
|
amount: O,
|
|
1058
|
-
measurement:
|
|
1058
|
+
measurement: A.measurement ?? null
|
|
1059
1059
|
},
|
|
1060
|
-
key:
|
|
1061
|
-
unit:
|
|
1060
|
+
key: A.id ?? A.sku._id,
|
|
1061
|
+
unit: A.sku.unit,
|
|
1062
1062
|
"onUpdate:modelValue": (r) => {
|
|
1063
1063
|
if (!r) return;
|
|
1064
|
-
const d = f.items.find((i) => i.id ===
|
|
1064
|
+
const d = f.items.find((i) => i.id === A.id || i.sku._id === A.sku._id);
|
|
1065
1065
|
d && (d.amount = r.amount);
|
|
1066
1066
|
},
|
|
1067
1067
|
disableUnit: !0,
|
|
@@ -1077,7 +1077,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1077
1077
|
}
|
|
1078
1078
|
],
|
|
1079
1079
|
"row-data": f.items,
|
|
1080
|
-
"hide-footer":
|
|
1080
|
+
"hide-footer": N.value
|
|
1081
1081
|
}, null, 8, ["column-defs", "row-data", "hide-footer"])
|
|
1082
1082
|
])
|
|
1083
1083
|
]),
|
|
@@ -1177,13 +1177,13 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1177
1177
|
setup(C) {
|
|
1178
1178
|
const a = C, o = et(), f = Be(), b = tt(), n = J(!1);
|
|
1179
1179
|
Y(() => {
|
|
1180
|
-
var x, u, I,
|
|
1180
|
+
var x, u, I, A;
|
|
1181
1181
|
let t = !0;
|
|
1182
1182
|
o.isEnabled || (t = !1);
|
|
1183
1183
|
const c = a.purchaseOrder, S = a.poRequest;
|
|
1184
|
-
return c && ((x = c == null ? void 0 : c.supplier) != null && x.internal ? (!S && c.status == se.enum.DRAFT && (t = !1), S && !((u = S == null ? void 0 : S.netSuite) != null && u.id) && (t = !1), a.isTransferBetweenOutlets && (t = !1)) : ((c == null ? void 0 : c.status) !== se.enum.REQUESTING && c.supplier.internal && (t = !1), !S && !((I = c == null ? void 0 : c.netSuite) != null && I.id) && (t = !1), !S && ((
|
|
1184
|
+
return c && ((x = c == null ? void 0 : c.supplier) != null && x.internal ? (!S && c.status == se.enum.DRAFT && (t = !1), S && !((u = S == null ? void 0 : S.netSuite) != null && u.id) && (t = !1), a.isTransferBetweenOutlets && (t = !1)) : ((c == null ? void 0 : c.status) !== se.enum.REQUESTING && c.supplier.internal && (t = !1), !S && !((I = c == null ? void 0 : c.netSuite) != null && I.id) && (t = !1), !S && ((A = c == null ? void 0 : c.netSuite) != null && A.id) && (c == null ? void 0 : c.status) == se.enum.REQUESTING && (t = !1))), t;
|
|
1185
1185
|
});
|
|
1186
|
-
async function
|
|
1186
|
+
async function N() {
|
|
1187
1187
|
n.value || b.open({
|
|
1188
1188
|
title: "Sync with NetSuite",
|
|
1189
1189
|
contentComponent: L("div", [
|
|
@@ -1231,7 +1231,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1231
1231
|
variant: "secondary",
|
|
1232
1232
|
label: "Sync",
|
|
1233
1233
|
loading: n.value,
|
|
1234
|
-
onClick:
|
|
1234
|
+
onClick: N,
|
|
1235
1235
|
"text-color": "primary",
|
|
1236
1236
|
"bg-color": "transparent",
|
|
1237
1237
|
"border-color": "primary"
|
|
@@ -1275,30 +1275,30 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1275
1275
|
});
|
|
1276
1276
|
const n = Y(
|
|
1277
1277
|
() => {
|
|
1278
|
-
var c, S, x, u, I,
|
|
1278
|
+
var c, S, x, u, I, A;
|
|
1279
1279
|
return o.getSubsidiaryFullName(
|
|
1280
|
-
((x = (S = (c = a.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : S.subsidiary) == null ? void 0 : x.id) || ((
|
|
1280
|
+
((x = (S = (c = a.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : S.subsidiary) == null ? void 0 : x.id) || ((A = (I = (u = a.poRequest) == null ? void 0 : u.netSuite) == null ? void 0 : I.subsidiary) == null ? void 0 : A.id)
|
|
1281
1281
|
).fullName;
|
|
1282
1282
|
}
|
|
1283
|
-
),
|
|
1284
|
-
var c, S, x, u, I,
|
|
1285
|
-
return (x = (S = (c = a.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : S.additionalInfo) != null && x.transactionnumber ? (
|
|
1283
|
+
), N = Y(() => {
|
|
1284
|
+
var c, S, x, u, I, A, w, O, r, d, i, g;
|
|
1285
|
+
return (x = (S = (c = a.purchaseOrder) == null ? void 0 : c.netSuite) == null ? void 0 : S.additionalInfo) != null && x.transactionnumber ? (A = (I = (u = a.purchaseOrder) == null ? void 0 : u.netSuite) == null ? void 0 : I.additionalInfo) == null ? void 0 : A.transactionnumber : (r = (O = (w = b.value) == null ? void 0 : w.netSuite) == null ? void 0 : O.additionalInfo) != null && r.transactionnumber ? (g = (i = (d = b.value) == null ? void 0 : d.netSuite) == null ? void 0 : i.additionalInfo) == null ? void 0 : g.transactionnumber : null;
|
|
1286
1286
|
}), t = Y(() => {
|
|
1287
|
-
var c, S, x, u, I,
|
|
1288
|
-
return (S = (c = a.purchaseOrder) == null ? void 0 : c.deliveryFullfillment) != null && S.length && ((u = (x = a.purchaseOrder) == null ? void 0 : x.deliveryFullfillment) == null ? void 0 : u.length) > 0 ? (
|
|
1287
|
+
var c, S, x, u, I, A;
|
|
1288
|
+
return (S = (c = a.purchaseOrder) == null ? void 0 : c.deliveryFullfillment) != null && S.length && ((u = (x = a.purchaseOrder) == null ? void 0 : x.deliveryFullfillment) == null ? void 0 : u.length) > 0 ? (A = (I = a.purchaseOrder) == null ? void 0 : I.deliveryFullfillment) == null ? void 0 : A.map((w) => {
|
|
1289
1289
|
var O;
|
|
1290
1290
|
return (O = w.netSuite) == null ? void 0 : O.refNo;
|
|
1291
1291
|
}).join(", ") : "N/A";
|
|
1292
1292
|
});
|
|
1293
1293
|
return (c, S) => {
|
|
1294
|
-
var x, u, I,
|
|
1294
|
+
var x, u, I, A, w, O, r, d, i, g, $, K, R, X, j, Q;
|
|
1295
1295
|
return v(o).isEnabled ? (l(), h("div", as, [
|
|
1296
1296
|
e("div", ls, [
|
|
1297
1297
|
S[0] || (S[0] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "NetSuite subsidiary", -1)),
|
|
1298
1298
|
e("div", is, y(n.value || "N/A"), 1)
|
|
1299
1299
|
]),
|
|
1300
1300
|
!c.isTransferBetweenOutlets && c.scope === v(lt).RECEIVE_REQUEST ? (l(), h("div", cs, [
|
|
1301
|
-
e("div", us, " NetSuite " + y((u = (x = c.purchaseOrder) == null ? void 0 : x.netSuite) != null && u.recordType ? v(bt)((
|
|
1301
|
+
e("div", us, " NetSuite " + y((u = (x = c.purchaseOrder) == null ? void 0 : x.netSuite) != null && u.recordType ? v(bt)((A = (I = c.purchaseOrder) == null ? void 0 : I.netSuite) == null ? void 0 : A.recordType) : c.transferType === v(Ge).enum.purchase ? "Purchase Order" : "Transfer Order") + " (ID) ", 1),
|
|
1302
1302
|
e("div", ds, [
|
|
1303
1303
|
(O = (w = c.purchaseOrder) == null ? void 0 : w.netSuite) != null && O.id ? (l(), h("span", ms, y((d = (r = c.purchaseOrder) == null ? void 0 : r.netSuite) == null ? void 0 : d.refNo) + " (" + y((g = (i = c.purchaseOrder) == null ? void 0 : i.netSuite) == null ? void 0 : g.id) + ") ", 1)) : (l(), h("span", ps, "N/A"))
|
|
1304
1304
|
])
|
|
@@ -1309,9 +1309,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1309
1309
|
(K = ($ = b.value) == null ? void 0 : $.netSuite) != null && K.id ? (l(), h("span", bs, y((X = (R = b.value) == null ? void 0 : R.netSuite) == null ? void 0 : X.refNo) + " (" + y((Q = (j = b.value) == null ? void 0 : j.netSuite) == null ? void 0 : Q.id) + ") ", 1)) : (l(), h("span", hs, "N/A"))
|
|
1310
1310
|
])
|
|
1311
1311
|
])) : U("", !0),
|
|
1312
|
-
|
|
1312
|
+
N.value ? (l(), h("div", gs, [
|
|
1313
1313
|
S[1] || (S[1] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite Transaction Number ", -1)),
|
|
1314
|
-
e("div", _s, y(
|
|
1314
|
+
e("div", _s, y(N.value), 1)
|
|
1315
1315
|
])) : U("", !0),
|
|
1316
1316
|
v(o).isEnabled && c.transferType === v(Ge).enum.transfer && !c.isTransferBetweenOutlets ? (l(), h("div", Ss, [
|
|
1317
1317
|
S[2] || (S[2] = e("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " NetSuite fulfillment IDs ", -1)),
|
|
@@ -1329,19 +1329,19 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1329
1329
|
setup(C) {
|
|
1330
1330
|
const a = Be(), o = dt();
|
|
1331
1331
|
async function f(b, n) {
|
|
1332
|
-
const
|
|
1333
|
-
if (b &&
|
|
1332
|
+
const N = [];
|
|
1333
|
+
if (b && N.push(`body.message:*${b}*`), n) {
|
|
1334
1334
|
const x = n.replace(/:/g, "\\:");
|
|
1335
|
-
|
|
1335
|
+
N.push(`${x}`);
|
|
1336
1336
|
}
|
|
1337
|
-
if (
|
|
1337
|
+
if (N.length === 0) {
|
|
1338
1338
|
a.open({
|
|
1339
1339
|
message: "Cannot open logs without valid filters.",
|
|
1340
1340
|
type: "error"
|
|
1341
1341
|
});
|
|
1342
1342
|
return;
|
|
1343
1343
|
}
|
|
1344
|
-
const c = `attributes.pod:netsuite* AND (${
|
|
1344
|
+
const c = `attributes.pod:netsuite* AND (${N.join(" OR ")})`, { url: S } = await o.getSyncLogs(c);
|
|
1345
1345
|
a.open(
|
|
1346
1346
|
{
|
|
1347
1347
|
message: "Opening NetSuite logs...",
|
|
@@ -1351,9 +1351,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1351
1351
|
), await new Promise((x) => setTimeout(x, 800)), window.open(S, "_blank");
|
|
1352
1352
|
}
|
|
1353
1353
|
return (b, n) => {
|
|
1354
|
-
const
|
|
1354
|
+
const N = H("FmButton");
|
|
1355
1355
|
return l(), h("div", ws, [
|
|
1356
|
-
D(
|
|
1356
|
+
D(N, {
|
|
1357
1357
|
"prepend-icon": "history",
|
|
1358
1358
|
variant: "secondary",
|
|
1359
1359
|
label: "Logs",
|
|
@@ -1365,7 +1365,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1365
1365
|
]);
|
|
1366
1366
|
};
|
|
1367
1367
|
}
|
|
1368
|
-
}), Cs = { class: "flex flex-row-reverse" }, Rs = { key: 0 }, ks = { key: 1 }, Ds = { class: "mb-6" },
|
|
1368
|
+
}), Cs = { class: "flex flex-row-reverse" }, Rs = { key: 0 }, ks = { key: 1 }, Ds = { class: "mb-6" }, Ns = { class: "fm-typo-en-body-md-400" }, As = { key: 0 }, Fs = { key: 1 }, Ts = {
|
|
1369
1369
|
key: 0,
|
|
1370
1370
|
class: "flex"
|
|
1371
1371
|
}, Is = {
|
|
@@ -1381,7 +1381,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1381
1381
|
purchaseOrderId: {}
|
|
1382
1382
|
},
|
|
1383
1383
|
setup(C) {
|
|
1384
|
-
const a = C, o = dt(), f = J(!1), b = De(), n = J(!0),
|
|
1384
|
+
const a = C, o = dt(), f = J(!1), b = De(), n = J(!0), N = J(!1), t = J(!1), c = J(!1), S = J(null), x = J([]);
|
|
1385
1385
|
async function u() {
|
|
1386
1386
|
if (!S.value) {
|
|
1387
1387
|
f.value = !0;
|
|
@@ -1391,9 +1391,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1391
1391
|
b.currentLocation.dbName,
|
|
1392
1392
|
a.purchaseOrderId
|
|
1393
1393
|
);
|
|
1394
|
-
S.value = O,
|
|
1394
|
+
S.value = O, N.value = !1;
|
|
1395
1395
|
} catch {
|
|
1396
|
-
|
|
1396
|
+
N.value = !0;
|
|
1397
1397
|
} finally {
|
|
1398
1398
|
n.value = !1;
|
|
1399
1399
|
}
|
|
@@ -1412,7 +1412,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1412
1412
|
t.value = !1;
|
|
1413
1413
|
}
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function A(O) {
|
|
1416
1416
|
switch (O) {
|
|
1417
1417
|
case we.Create:
|
|
1418
1418
|
return "text-green-600 bg-green-100";
|
|
@@ -1460,7 +1460,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1460
1460
|
])),
|
|
1461
1461
|
default: ee(() => [
|
|
1462
1462
|
n.value ? (l(), h("div", Rs, "Loading...")) : (l(), h("div", ks, [
|
|
1463
|
-
|
|
1463
|
+
N.value ? (l(), h("p", Hs, "Something went wrong.")) : (l(), h(de, { key: 0 }, [
|
|
1464
1464
|
e("div", Ds, [
|
|
1465
1465
|
r[4] || (r[4] = e("h3", { class: "fm-typo-en-body-lg-600 mb-4" }, "NetSuite Order Details", -1)),
|
|
1466
1466
|
(l(!0), h(de, null, xe(S.value, (R, X) => (l(), h("div", {
|
|
@@ -1471,8 +1471,8 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1471
1471
|
D(i, {
|
|
1472
1472
|
label: v(it)(X)
|
|
1473
1473
|
}, null, 8, ["label"]),
|
|
1474
|
-
e("div",
|
|
1475
|
-
Array.isArray(R) ? (l(), h("span",
|
|
1474
|
+
e("div", Ns, [
|
|
1475
|
+
Array.isArray(R) ? (l(), h("span", As, y(R.length > 0 ? R.join(", ") : "N/A"), 1)) : (l(), h("span", Fs, y(R), 1))
|
|
1476
1476
|
])
|
|
1477
1477
|
])
|
|
1478
1478
|
]))), 128))
|
|
@@ -1518,7 +1518,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1518
1518
|
e("td", Ms, y(R._employeename), 1),
|
|
1519
1519
|
e("td", Us, y(R._contextname), 1),
|
|
1520
1520
|
e("td", {
|
|
1521
|
-
class: Me(`p-3 fm-typo-en-body-sm-600 ${
|
|
1521
|
+
class: Me(`p-3 fm-typo-en-body-sm-600 ${A(Number(R.type) - 1)}`)
|
|
1522
1522
|
}, y(v(we)[Number(R.type) - 1]), 3),
|
|
1523
1523
|
e("td", Bs, y(R.lineid || ""), 1),
|
|
1524
1524
|
e("td", js, y(R._fieldname), 1),
|
|
@@ -1564,7 +1564,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1564
1564
|
const a = C, o = Ht(), f = Y(() => o.isNetSuiteEnabled);
|
|
1565
1565
|
return (b, n) => {
|
|
1566
1566
|
var t, c;
|
|
1567
|
-
const
|
|
1567
|
+
const N = H("FmMenuDivider");
|
|
1568
1568
|
return f.value ? (l(), h("div", Ys, [
|
|
1569
1569
|
e("div", Qs, [
|
|
1570
1570
|
n[0] || (n[0] = e("span", { class: "flex-1 fm-typo-en-body-lg-600" }, "NetSuite Info", -1)),
|
|
@@ -1603,7 +1603,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1603
1603
|
])
|
|
1604
1604
|
])
|
|
1605
1605
|
]),
|
|
1606
|
-
D(
|
|
1606
|
+
D(N),
|
|
1607
1607
|
D(Os, {
|
|
1608
1608
|
"po-request": b.poRequest,
|
|
1609
1609
|
"purchase-order": b.purchaseOrder,
|
|
@@ -1633,14 +1633,14 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1633
1633
|
emits: ["submitted"],
|
|
1634
1634
|
setup(C, { emit: a }) {
|
|
1635
1635
|
Yt();
|
|
1636
|
-
const o = Ue(), f = Be(), b = J(!1), n = C,
|
|
1636
|
+
const o = Ue(), f = Be(), b = J(!1), n = C, N = a, t = St("deliveryOrder"), c = je(), S = Y(
|
|
1637
1637
|
() => {
|
|
1638
1638
|
var d;
|
|
1639
1639
|
return ((d = n.purchaseOrder.deliveryFullfillment) == null ? void 0 : d.findIndex(
|
|
1640
1640
|
(i) => n.deliveryOrder.fullfillmentId && i.id === n.deliveryOrder.fullfillmentId
|
|
1641
1641
|
)) ?? -1;
|
|
1642
1642
|
}
|
|
1643
|
-
), x = o.enablePurchaseOrderReceiveWithCustomCost, u = o.enablePortalDeliveryOrderWrite, I = J({}),
|
|
1643
|
+
), x = o.enablePurchaseOrderReceiveWithCustomCost, u = o.enablePortalDeliveryOrderWrite, I = J({}), A = Y(() => n.purchaseOrder.items.map((d, i) => Y({
|
|
1644
1644
|
get: () => {
|
|
1645
1645
|
var $;
|
|
1646
1646
|
const g = ($ = t.received[i]) == null ? void 0 : $.cost;
|
|
@@ -1694,7 +1694,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1694
1694
|
type: "success"
|
|
1695
1695
|
},
|
|
1696
1696
|
1e4
|
|
1697
|
-
), b.value = !1,
|
|
1697
|
+
), b.value = !1, N("submitted");
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
1700
|
return (d, i) => {
|
|
@@ -1761,8 +1761,8 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1761
1761
|
])) : U("", !0),
|
|
1762
1762
|
v(x) && I.value[Q] ? (l(), re($, {
|
|
1763
1763
|
key: 1,
|
|
1764
|
-
modelValue:
|
|
1765
|
-
"onUpdate:modelValue": (ie) =>
|
|
1764
|
+
modelValue: A.value[Q].value,
|
|
1765
|
+
"onUpdate:modelValue": (ie) => A.value[Q].value = ie,
|
|
1766
1766
|
label: "Total Cost",
|
|
1767
1767
|
step: 1e-4,
|
|
1768
1768
|
min: 0,
|
|
@@ -1811,7 +1811,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1811
1811
|
}, Cr = { class: "flex gap-4" }, Rr = { class: "flex-1" }, kr = { class: "flex-1" }, Dr = {
|
|
1812
1812
|
key: 0,
|
|
1813
1813
|
class: "flex items-center text-fm-color-system-error-300"
|
|
1814
|
-
},
|
|
1814
|
+
}, Nr = { class: "fm-typo-en-body-md-400" }, Ar = { class: "flex flex-col gap-4" }, Fr = { class: "flex justify-between items-center py-1 gap-4" }, Tr = { class: "flex flex-col" }, Ir = { class: "fm-typo-en-body-lg-600" }, Pr = { class: "fm-typo-en-body-md-400" }, qr = { class: "flex flex-col gap-2 items-end" }, Vr = {
|
|
1815
1815
|
key: 0,
|
|
1816
1816
|
class: "flex items-center gap-2"
|
|
1817
1817
|
}, Er = {
|
|
@@ -1826,7 +1826,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1826
1826
|
emits: ["submitted"],
|
|
1827
1827
|
setup(C, { emit: a }) {
|
|
1828
1828
|
var B, q, oe;
|
|
1829
|
-
const { t: o } = ut(), f = J(!1), b = ct(), n = C,
|
|
1829
|
+
const { t: o } = ut(), f = J(!1), b = ct(), n = C, N = a, t = St("", {
|
|
1830
1830
|
default: {
|
|
1831
1831
|
deliveryOrderNumber: "",
|
|
1832
1832
|
remark: "",
|
|
@@ -1841,7 +1841,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1841
1841
|
},
|
|
1842
1842
|
createdAt: ""
|
|
1843
1843
|
}
|
|
1844
|
-
}), c = je(), S = tt(), x = Ue(), u = ((oe = n.purchaseOrder) == null ? void 0 : oe.supplier.internal) != null, I = u && x.enablePOSTransferRequireFulfillment,
|
|
1844
|
+
}), c = je(), S = tt(), x = Ue(), u = ((oe = n.purchaseOrder) == null ? void 0 : oe.supplier.internal) != null, I = u && x.enablePOSTransferRequireFulfillment, A = x.enablePortalDeliveryOrderWrite && (n.purchaseOrder.status === se.Enum.RECEIVING || n.purchaseOrder.status === se.Enum.COMPLETE) && (u ? !I : !0), w = x.enablePurchaseOrderReceiveWithCustomCost, O = x.enableBackdateReceive, r = J({}), d = Be(), i = Y({
|
|
1845
1845
|
get() {
|
|
1846
1846
|
if (!t.createdAt) return "";
|
|
1847
1847
|
const k = new Date(t.createdAt), _ = k.getFullYear(), F = String(k.getMonth() + 1).padStart(2, "0"), W = String(k.getDate()).padStart(2, "0");
|
|
@@ -1927,7 +1927,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1927
1927
|
};
|
|
1928
1928
|
}
|
|
1929
1929
|
})));
|
|
1930
|
-
function
|
|
1930
|
+
function Ne() {
|
|
1931
1931
|
S.open({
|
|
1932
1932
|
title: "Confirm Create Delivery Order",
|
|
1933
1933
|
message: `Are you sure you want to create delivery order for PO# ${n.purchaseOrder.seqNumber}?`,
|
|
@@ -1940,9 +1940,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1940
1940
|
text: "Cancel",
|
|
1941
1941
|
close: !0
|
|
1942
1942
|
}
|
|
1943
|
-
}).onPrimary(() =>
|
|
1943
|
+
}).onPrimary(() => Ae());
|
|
1944
1944
|
}
|
|
1945
|
-
function
|
|
1945
|
+
function Ae() {
|
|
1946
1946
|
c.createDeliveryOrder({
|
|
1947
1947
|
deliveryOrder: t,
|
|
1948
1948
|
purchaseOrderId: n.purchaseOrder._id,
|
|
@@ -1956,7 +1956,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1956
1956
|
type: "success"
|
|
1957
1957
|
},
|
|
1958
1958
|
1e4
|
|
1959
|
-
), f.value = !1,
|
|
1959
|
+
), f.value = !1, N("submitted");
|
|
1960
1960
|
});
|
|
1961
1961
|
}
|
|
1962
1962
|
return (k, _) => {
|
|
@@ -1968,7 +1968,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1968
1968
|
"min-width": 800
|
|
1969
1969
|
}, {
|
|
1970
1970
|
"dialog-button": ee(() => [
|
|
1971
|
-
v(
|
|
1971
|
+
v(A) ? (l(), re(F, {
|
|
1972
1972
|
key: 0,
|
|
1973
1973
|
variant: "primary",
|
|
1974
1974
|
label: "Create",
|
|
@@ -1987,7 +1987,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
1987
1987
|
size: "md",
|
|
1988
1988
|
variant: "destructive",
|
|
1989
1989
|
disabled: !X.value,
|
|
1990
|
-
onClick:
|
|
1990
|
+
onClick: Ne
|
|
1991
1991
|
}, null, 8, ["disabled"])
|
|
1992
1992
|
]),
|
|
1993
1993
|
default: ee(() => {
|
|
@@ -2032,10 +2032,10 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2032
2032
|
class: "inline-block mr-1",
|
|
2033
2033
|
size: "sm"
|
|
2034
2034
|
}),
|
|
2035
|
-
e("div",
|
|
2035
|
+
e("div", Nr, y(R.value), 1)
|
|
2036
2036
|
])) : U("", !0)
|
|
2037
2037
|
])) : U("", !0),
|
|
2038
|
-
e("div",
|
|
2038
|
+
e("div", Ar, [
|
|
2039
2039
|
_[8] || (_[8] = e("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Items going to receive ", -1)),
|
|
2040
2040
|
(l(!0), h(de, null, xe(n.purchaseOrder.items, (z, p) => {
|
|
2041
2041
|
var Z, ae, ne;
|
|
@@ -2125,13 +2125,13 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2125
2125
|
netsuiteId: {}
|
|
2126
2126
|
},
|
|
2127
2127
|
setup(C) {
|
|
2128
|
-
const a = C, o = dt(), f = J(!1), b = J(!1), n = J(!1),
|
|
2128
|
+
const a = C, o = dt(), f = J(!1), b = J(!1), n = J(!1), N = J([]);
|
|
2129
2129
|
async function t() {
|
|
2130
|
-
if (!(
|
|
2130
|
+
if (!(N.value.length > 0))
|
|
2131
2131
|
try {
|
|
2132
2132
|
b.value = !0;
|
|
2133
2133
|
const x = await o.getChangeLogs(a.netsuiteId);
|
|
2134
|
-
|
|
2134
|
+
N.value = x, n.value = !1;
|
|
2135
2135
|
} catch {
|
|
2136
2136
|
n.value = !0;
|
|
2137
2137
|
} finally {
|
|
@@ -2162,7 +2162,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2162
2162
|
});
|
|
2163
2163
|
}
|
|
2164
2164
|
return (x, u) => {
|
|
2165
|
-
const I = H("FmButton"),
|
|
2165
|
+
const I = H("FmButton"), A = H("FmCircularProgress"), w = H("FmIcon"), O = H("FmDialog");
|
|
2166
2166
|
return l(), h("div", zr, [
|
|
2167
2167
|
D(O, {
|
|
2168
2168
|
modelValue: f.value,
|
|
@@ -2187,9 +2187,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2187
2187
|
default: ee(() => [
|
|
2188
2188
|
b.value ? (l(), h("div", Kr, [
|
|
2189
2189
|
u[4] || (u[4] = e("span", null, "Change Log Loading...", -1)),
|
|
2190
|
-
D(
|
|
2190
|
+
D(A, { size: "md" })
|
|
2191
2191
|
])) : U("", !0),
|
|
2192
|
-
!b.value &&
|
|
2192
|
+
!b.value && N.value.length > 0 ? (l(), h("div", Gr, [
|
|
2193
2193
|
e("h3", Hr, [
|
|
2194
2194
|
D(w, {
|
|
2195
2195
|
name: "error",
|
|
@@ -2217,7 +2217,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2217
2217
|
])
|
|
2218
2218
|
], -1)),
|
|
2219
2219
|
e("tbody", null, [
|
|
2220
|
-
(l(!0), h(de, null, xe(
|
|
2220
|
+
(l(!0), h(de, null, xe(N.value, (r, d) => (l(), h("tr", {
|
|
2221
2221
|
key: d,
|
|
2222
2222
|
class: "border-b border-fm-color-neutral-gray-200 last:border-b-0"
|
|
2223
2223
|
}, [
|
|
@@ -2263,10 +2263,10 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2263
2263
|
}, xo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oo = { class: "fm-typo-en-body-lg-600" }, wo = { class: "flex flex-col gap-4" }, $o = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Co = { class: "fm-typo-en-body-lg-600" }, Ro = {
|
|
2264
2264
|
key: 1,
|
|
2265
2265
|
class: "flex flex-col gap-4"
|
|
2266
|
-
}, ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Do = { class: "fm-typo-en-body-lg-600" },
|
|
2266
|
+
}, ko = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Do = { class: "fm-typo-en-body-lg-600" }, No = {
|
|
2267
2267
|
key: 2,
|
|
2268
2268
|
class: "flex flex-col gap-4"
|
|
2269
|
-
},
|
|
2269
|
+
}, Ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fo = { class: "fm-typo-en-body-lg-600" }, To = {
|
|
2270
2270
|
key: 3,
|
|
2271
2271
|
class: "flex flex-col gap-4"
|
|
2272
2272
|
}, Io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Po = { class: "fm-typo-en-body-lg-600" }, qo = {
|
|
@@ -2312,7 +2312,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2312
2312
|
},
|
|
2313
2313
|
emits: ["update:show", "submitted"],
|
|
2314
2314
|
setup(C, { emit: a }) {
|
|
2315
|
-
const o = C, f = a, b = tt(), n = Be(),
|
|
2315
|
+
const o = C, f = a, b = tt(), n = Be(), N = Ue(), t = De(), c = ct(), S = Y(
|
|
2316
2316
|
() => {
|
|
2317
2317
|
var s, m;
|
|
2318
2318
|
return {
|
|
@@ -2325,7 +2325,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2325
2325
|
var s, m, V, E;
|
|
2326
2326
|
return ((m = (s = o.purchaseOrder) == null ? void 0 : s.supplier) == null ? void 0 : m.internal) === "restaurant" || ((E = (V = o.purchaseOrder) == null ? void 0 : V.supplier) == null ? void 0 : E.internal) === "warehouse" ? Ge.enum.transfer : Ge.enum.purchase;
|
|
2327
2327
|
}
|
|
2328
|
-
),
|
|
2328
|
+
), A = Y(() => {
|
|
2329
2329
|
var V;
|
|
2330
2330
|
const s = (V = o.shipments) == null ? void 0 : V.find((E) => {
|
|
2331
2331
|
var G;
|
|
@@ -2360,7 +2360,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2360
2360
|
),
|
|
2361
2361
|
purchaseOrderRequest: o.poRequest,
|
|
2362
2362
|
purchaseOrder: o.purchaseOrder
|
|
2363
|
-
}, E =
|
|
2363
|
+
}, E = N.useOperatePurchaseOrderV2 ? [...$, M.enum.completeReceive] : $;
|
|
2364
2364
|
let G = [];
|
|
2365
2365
|
try {
|
|
2366
2366
|
s.state === pt.error ? (console.error("Error fetching workflow config:", s.error), G = st.getAvailableActions({
|
|
@@ -2484,9 +2484,9 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2484
2484
|
const Z = {};
|
|
2485
2485
|
let ae = 0;
|
|
2486
2486
|
if ((s === M.enum.confirmDraft || // auto receive for warehouse to warehouse
|
|
2487
|
-
s === M.enum.completeReceive) &&
|
|
2487
|
+
s === M.enum.completeReceive) && N.autoReceiveWarehouse)
|
|
2488
2488
|
Z.autoReceive = !0;
|
|
2489
|
-
else if ((s === M.enum.approveRequest || s === M.enum.processRequest) &&
|
|
2489
|
+
else if ((s === M.enum.approveRequest || s === M.enum.processRequest) && N.acceptRequireFulfillment) {
|
|
2490
2490
|
const ne = (T = (G = o.poRequest) == null ? void 0 : G.from) == null ? void 0 : T.dbName, P = (p = (z = o.poRequest) == null ? void 0 : z.to) == null ? void 0 : p.dbName;
|
|
2491
2491
|
if (ne && P && (ne.startsWith("warehouse_") || P.startsWith("warehouse_"))) {
|
|
2492
2492
|
const me = await new Promise((Oe, Fe) => {
|
|
@@ -2529,13 +2529,13 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2529
2529
|
}
|
|
2530
2530
|
}
|
|
2531
2531
|
}
|
|
2532
|
-
const
|
|
2532
|
+
const Ne = Y(() => {
|
|
2533
2533
|
var s, m;
|
|
2534
2534
|
return ((s = o.purchaseOrder) == null ? void 0 : s.status) === se.enum.RECEIVING || ((m = o.purchaseOrder) == null ? void 0 : m.status) === se.enum.COMPLETE;
|
|
2535
|
-
}),
|
|
2535
|
+
}), Ae = Y(() => o.purchaseOrder ? Xe(o.purchaseOrder) : {}), B = Y(() => {
|
|
2536
2536
|
const s = o.purchaseOrder;
|
|
2537
2537
|
if (!s) return { status: "", statusClass: "" };
|
|
2538
|
-
const { partial: m, over: V } = nt(
|
|
2538
|
+
const { partial: m, over: V } = nt(Ae.value), E = at(s.status, m, V);
|
|
2539
2539
|
let G = u(`inventory.transfer.status.${E}`), T = `${s.status}`.toLocaleLowerCase("en-us");
|
|
2540
2540
|
return E === se.enum.CLOSE && (G = `${u(`inventory.transfer.status.${se.enum.COMPLETE}`)}`), E === "PARTIAL_RECEIVED" && T === se.enum.PROCESSING.toLocaleLowerCase("en-us") && (T = se.enum.RECEIVING.toLocaleLowerCase("en-us")), {
|
|
2541
2541
|
status: G,
|
|
@@ -2862,7 +2862,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2862
2862
|
s.purchaseOrder && j.value.value === "deliveryHistory" ? (l(), re(jr, {
|
|
2863
2863
|
key: 0,
|
|
2864
2864
|
"purchase-order": s.purchaseOrder,
|
|
2865
|
-
"received-info-map":
|
|
2865
|
+
"received-info-map": Ae.value,
|
|
2866
2866
|
onSubmitted: m[2] || (m[2] = () => {
|
|
2867
2867
|
f("update:show", !1), f("submitted");
|
|
2868
2868
|
})
|
|
@@ -2900,12 +2900,12 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2900
2900
|
class: Me(B.value.statusClass),
|
|
2901
2901
|
compact: ""
|
|
2902
2902
|
}, null, 8, ["label", "class"]),
|
|
2903
|
-
|
|
2903
|
+
A.value ? (l(), h("div", fo, [
|
|
2904
2904
|
D(T, {
|
|
2905
2905
|
name: "local_shipping",
|
|
2906
2906
|
color: "#666666"
|
|
2907
2907
|
}),
|
|
2908
|
-
e("span", yo, y(
|
|
2908
|
+
e("span", yo, y(A.value), 1)
|
|
2909
2909
|
])) : U("", !0)
|
|
2910
2910
|
])
|
|
2911
2911
|
]),
|
|
@@ -2931,8 +2931,8 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2931
2931
|
e("div", ko, y(v(u)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
2932
2932
|
e("div", Do, y((ue = (Re = s.purchaseOrder) == null ? void 0 : Re.supplier) == null ? void 0 : ue.name), 1)
|
|
2933
2933
|
])) : U("", !0),
|
|
2934
|
-
s.transferTo ? (l(), h("div",
|
|
2935
|
-
e("div",
|
|
2934
|
+
s.transferTo ? (l(), h("div", No, [
|
|
2935
|
+
e("div", Ao, y(v(u)("inventory.transfer.receiveRequest.details.to")), 1),
|
|
2936
2936
|
e("div", Fo, y(s.transferTo), 1)
|
|
2937
2937
|
])) : U("", !0),
|
|
2938
2938
|
(fe = s.purchaseOrder) != null && fe.ref ? (l(), h("div", To, [
|
|
@@ -2960,7 +2960,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
2960
2960
|
e("div", Mo, [
|
|
2961
2961
|
e("div", Uo, [
|
|
2962
2962
|
e("span", Bo, [
|
|
2963
|
-
ke(y(
|
|
2963
|
+
ke(y(Ne.value ? v(u)("inventory.transfer.receiveRequest.details.receivedItems") : v(u)("inventory.transfer.receiveRequest.details.requestedItems")) + " ", 1),
|
|
2964
2964
|
(me = (P = s.purchaseOrder) == null ? void 0 : P.netSuite) != null && me.missingItems && ((Fe = (Oe = s.purchaseOrder) == null ? void 0 : Oe.netSuite) == null ? void 0 : Fe.missingItems.length) > 0 ? (l(), re(Z, {
|
|
2965
2965
|
key: 0,
|
|
2966
2966
|
variant: "rich",
|
|
@@ -3039,7 +3039,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3039
3039
|
]),
|
|
3040
3040
|
e("div", Yo, [
|
|
3041
3041
|
e("div", Qo, y(te.code), 1),
|
|
3042
|
-
(pe = te.totalCost) != null && pe.amount && v(
|
|
3042
|
+
(pe = te.totalCost) != null && pe.amount && v(N).enableTotalCost ? (l(), h("div", Jo, " (" + y(v(Ke)(te.totalCost)) + ") ", 1)) : U("", !0)
|
|
3043
3043
|
])
|
|
3044
3044
|
]);
|
|
3045
3045
|
}), 128)),
|
|
@@ -3158,7 +3158,7 @@ const es = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg
|
|
|
3158
3158
|
}, [
|
|
3159
3159
|
typeof Ee == "string" ? (l(), h(de, { key: 0 }, [
|
|
3160
3160
|
ke(y(Ee), 1)
|
|
3161
|
-
], 64)) : (l(), re(
|
|
3161
|
+
], 64)) : (l(), re(Nt(Ee), { key: 1 }))
|
|
3162
3162
|
]))), 128))
|
|
3163
3163
|
])
|
|
3164
3164
|
]))), 128))
|