@feedmepos/mf-report 5.17.0-beta.0 → 5.17.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DeU7iMbf.js → App-DDzviLPJ.js} +3 -3
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-DKvsNtlh.js → BaseDialog.vue_vue_type_script_setup_true_lang-C6V_Qiwh.js} +683 -682
- package/dist/{Default.vue_vue_type_script_setup_true_lang-BQWV9Bgr.js → Default.vue_vue_type_script_setup_true_lang-Cf-9pNKR.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-CdRZh5dG.js → DynamicWidget.vue_vue_type_script_setup_true_lang-5sBXvHf3.js} +1 -1
- package/dist/{InsightView-CJVbMpiM.js → InsightView-Cwp5iFMb.js} +2 -2
- package/dist/{Integration-Cq_c3vS2.js → Integration-DwkFaxGn.js} +445 -428
- package/dist/{Layout-B55svxvZ.js → Layout-DFCV3cM6.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-2Z_LbV9u.js → MenuTab.vue_vue_type_script_setup_true_lang-BGaopPsY.js} +2 -2
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-Br3jELGp.js → NavigationTab.vue_vue_type_script_setup_true_lang-CA8R0VVG.js} +1 -1
- package/dist/{OverviewView-Dhbkita5.js → OverviewView-NIjCH6mr.js} +4 -4
- package/dist/{Report-C-4RmuGl.js → Report-D9xejKHn.js} +2 -2
- package/dist/{ReportEditor-BZTwbyTR.js → ReportEditor-CxD4mjIt.js} +3 -3
- package/dist/{ReportView-BgWZV2uu.js → ReportView-CzpxL-Bx.js} +5 -5
- package/dist/{Setting-CJ5CbG9S.js → Setting-3OEOs2-P.js} +2 -2
- package/dist/{TileEditor-DAjEySJH.js → TileEditor-D1YNLoQt.js} +3 -3
- package/dist/{TransitionFade-dnZ63soG.js → TransitionFade-w5Of7pis.js} +2 -2
- package/dist/app.js +10 -10
- package/dist/assets/formatChartData.worker-VUlqRZS1.js +8 -0
- package/package.json +1 -1
- package/dist/assets/formatChartData.worker-DThPQ5tB.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Q, mergeModels as Se, useModel as W, computed as
|
|
1
|
+
import { defineComponent as Q, mergeModels as Se, useModel as W, computed as Y, resolveComponent as K, createElementBlock as P, openBlock as b, createElementVNode as t, createCommentVNode as O, normalizeClass as je, Fragment as xe, createBlock as M, withCtx as we, toDisplayString as C, renderList as Ce, createVNode as n, unref as r, normalizeStyle as Je, createTextVNode as Ze, ref as q, onUnmounted as Ae, watch as _e, isRef as $e, h as A, resolveDynamicComponent as Ve, mergeProps as Be, onMounted as qe } from "vue";
|
|
2
2
|
import { useRouter as ue, useRoute as et } from "vue-router";
|
|
3
3
|
import { u as J, I as ge, d as Me, v as tt, e as ke, f as De, b as fe, z as ot, n as at, y as Ke, A as Te, B as Fe, E as Ne, G as Ee, H as lt, J as nt, K as st, L as be, M as Oe, N as it, O as rt, P as dt, Q as mt } from "./vue-i18n-BgRNnwPF.js";
|
|
4
4
|
import { u as Ue } from "./message-dialog-UoMWOnil.js";
|
|
@@ -37,7 +37,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
37
37
|
}),
|
|
38
38
|
emits: /* @__PURE__ */ Se(["remove"], ["update:modelValue"]),
|
|
39
39
|
setup(v, { emit: o }) {
|
|
40
|
-
const e = W(v, "modelValue"), i = v, y =
|
|
40
|
+
const e = W(v, "modelValue"), i = v, y = Y(
|
|
41
41
|
() => Object.keys(i.options).map((U) => {
|
|
42
42
|
const x = i.options[U];
|
|
43
43
|
return {
|
|
@@ -56,8 +56,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
56
56
|
}
|
|
57
57
|
const $ = o;
|
|
58
58
|
return (U, x) => {
|
|
59
|
-
var
|
|
60
|
-
const _ =
|
|
59
|
+
var T;
|
|
60
|
+
const _ = K("FmTextField"), u = K("FmTooltip"), N = K("FmIcon");
|
|
61
61
|
return b(), P("div", pt, [
|
|
62
62
|
t("div", {
|
|
63
63
|
class: je(`${v.removable ? "w-[calc(100%-24px)]" : "w-[100%]"} flex flex-col items-start gap-[4px]`)
|
|
@@ -73,7 +73,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
73
73
|
"onUpdate:modelValue": x[0] || (x[0] = (p) => V(y.value[0].key, p))
|
|
74
74
|
}, null, 8, ["model-value", "placeholder", "type", "rules"])) : (b(), M(u, {
|
|
75
75
|
key: 1,
|
|
76
|
-
content: (
|
|
76
|
+
content: (T = e.value[y.value[0].key]) == null ? void 0 : T.toString(),
|
|
77
77
|
class: "w-[100%]"
|
|
78
78
|
}, {
|
|
79
79
|
default: we(() => [
|
|
@@ -177,7 +177,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
177
177
|
}),
|
|
178
178
|
emits: ["update:modelValue"],
|
|
179
179
|
setup(v) {
|
|
180
|
-
const { t: o } = J(), e = W(v, "modelValue"), i =
|
|
180
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = Y(() => {
|
|
181
181
|
switch (e.value.name) {
|
|
182
182
|
case ge.AutoCount:
|
|
183
183
|
case ge.SQL:
|
|
@@ -189,7 +189,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
189
189
|
});
|
|
190
190
|
return (y, V) => {
|
|
191
191
|
var _, u;
|
|
192
|
-
const $ =
|
|
192
|
+
const $ = K("FmSwitch"), U = K("FmTextField"), x = K("FmTimePicker");
|
|
193
193
|
return b(), P(xe, null, [
|
|
194
194
|
t("div", xt, [
|
|
195
195
|
t("div", bt, C(r(o)("report.integration.auto", { label: v.label })), 1),
|
|
@@ -287,7 +287,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
287
287
|
}),
|
|
288
288
|
emits: /* @__PURE__ */ Se(["remove"], ["update:modelValue"]),
|
|
289
289
|
setup(v, { emit: o }) {
|
|
290
|
-
const e = W(v, "modelValue"), i = v, y =
|
|
290
|
+
const e = W(v, "modelValue"), i = v, y = Y(
|
|
291
291
|
() => Object.keys(i.options).map((_) => {
|
|
292
292
|
const u = i.options[_];
|
|
293
293
|
return {
|
|
@@ -307,7 +307,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
307
307
|
return i.singleValueMode ? i.options.key.placeholder : (u = e.value[_.key]) == null ? void 0 : u.toString();
|
|
308
308
|
}, U = (_) => i.singleValueMode ? e.value : e.value[_.key], x = o;
|
|
309
309
|
return (_, u) => {
|
|
310
|
-
const N =
|
|
310
|
+
const N = K("FmSelect"), T = K("FmTextField"), p = K("FmTooltip"), f = K("FmIcon");
|
|
311
311
|
return b(), P("div", Tt, [
|
|
312
312
|
t("div", {
|
|
313
313
|
class: je(`${v.removable ? "w-[calc(100%-24px)] flex-row" : "w-[100%] flex-col"} flex items-center gap-[4px]`),
|
|
@@ -327,7 +327,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
327
327
|
items: m.dropdownOptions,
|
|
328
328
|
"shift-menu": !0,
|
|
329
329
|
"onUpdate:modelValue": (g) => V(g, m.key)
|
|
330
|
-
}, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (b(), M(
|
|
330
|
+
}, null, 8, ["model-value", "placeholder", "items", "onUpdate:modelValue"])) : (b(), M(T, {
|
|
331
331
|
key: 1,
|
|
332
332
|
"model-value": U(m),
|
|
333
333
|
placeholder: m.placeholder,
|
|
@@ -373,7 +373,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
373
373
|
},
|
|
374
374
|
emits: ["remove", "update:rows"],
|
|
375
375
|
setup(v, { emit: o }) {
|
|
376
|
-
const e = v, i =
|
|
376
|
+
const e = v, i = Y(() => e.rows.length > 1 ? Math.min(e.rows.length, e.columnsPerRow) : 1), y = o;
|
|
377
377
|
return (V, $) => (b(), P("div", Ut, [
|
|
378
378
|
(b(!0), P(xe, null, Ce(e.rows, (U, x) => (b(), P("div", {
|
|
379
379
|
key: x,
|
|
@@ -426,7 +426,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
426
426
|
}), Pt = {
|
|
427
427
|
key: 0,
|
|
428
428
|
class: "flex flex-col h-full"
|
|
429
|
-
}, Rt = { class: "flex flex-col gap-[16px] pb-[24px]" }, Mt = { class: "flex flex-row justify-between items-center gap-2" }, jt = { class: "flex flex-row gap-2 items-center" }, Ot = { class: "relative group cursor-pointer" }, Lt = { class: "flex flex-col gap-16 pt-[24px] overflow-scroll" }, Et = { class: "w-[90%] flex flex-col gap-24" }, Bt = { class: "flex flex-row items-center justify-between gap-2" },
|
|
429
|
+
}, Rt = { class: "flex flex-col gap-[16px] pb-[24px]" }, Mt = { class: "flex flex-row justify-between items-center gap-2" }, jt = { class: "flex flex-row gap-2 items-center" }, Ot = { class: "relative group cursor-pointer" }, Lt = { class: "flex flex-col gap-16 pt-[24px] overflow-scroll" }, Et = { class: "w-[90%] flex flex-col gap-24" }, Bt = { class: "flex flex-row items-center justify-between gap-2" }, qt = { class: "w-[25%]" }, Yt = { class: "flex flex-col gap-[16px]" }, zt = { class: "flex flex-col max-w-[100%] justify-between" }, Ht = { class: "flex-grow" }, Gt = { class: "flex flex-col max-w-[100%] justify-between" }, Qt = { class: "flex flex-col max-w-[100%] justify-between" }, Xt = { class: "flex-grow" }, Wt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, Jt = { class: "flex-grow" }, Zt = { class: "flex flex-row items-center max-w-[100%] justify-between" }, eo = { class: "flex-grow" }, to = { class: "flex flex-col gap-[16px]" }, oo = { class: "flex flex-row items-center justify-between gap-x-16" }, ao = {
|
|
430
430
|
key: 0,
|
|
431
431
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
432
432
|
}, lo = { class: "flex flex-row items-center justify-between gap-x-16" }, no = {
|
|
@@ -459,12 +459,12 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
459
459
|
}),
|
|
460
460
|
emits: ["update:modelValue"],
|
|
461
461
|
setup(v) {
|
|
462
|
-
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ =
|
|
462
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ = q(!1), u = Y(
|
|
463
463
|
() => x.map((l) => ({ label: l.name, value: l.id }))
|
|
464
|
-
), N =
|
|
464
|
+
), N = Y(() => {
|
|
465
465
|
var l, a;
|
|
466
466
|
return _.value ? "Connecting" : (a = (l = e.value) == null ? void 0 : l.platform) != null && a.accessToken ? "Disconnect" : "Connect";
|
|
467
|
-
}),
|
|
467
|
+
}), T = q(0);
|
|
468
468
|
async function p() {
|
|
469
469
|
var l;
|
|
470
470
|
if (_.value)
|
|
@@ -479,12 +479,12 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
479
479
|
const a = await at(e.value._id);
|
|
480
480
|
_.value = !0;
|
|
481
481
|
const d = setInterval(async () => {
|
|
482
|
-
var
|
|
483
|
-
|
|
482
|
+
var D;
|
|
483
|
+
T.value += 1;
|
|
484
484
|
try {
|
|
485
485
|
await y.getSettings();
|
|
486
486
|
} finally {
|
|
487
|
-
(
|
|
487
|
+
(T.value === 12 || (D = e.value.platform) != null && D.accessToken) && (_.value = !1, d && clearInterval(d), T.value = 0);
|
|
488
488
|
}
|
|
489
489
|
}, 5e3);
|
|
490
490
|
window.open(a.redirect, "_blank");
|
|
@@ -523,8 +523,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
525
|
function w(l, a) {
|
|
526
|
-
var d,
|
|
527
|
-
(
|
|
526
|
+
var d, D;
|
|
527
|
+
(D = (d = e.value.platform) == null ? void 0 : d.mappings) != null && D[l] && (e.value.platform.mappings[l] = e.value.platform.mappings[l].filter(
|
|
528
528
|
(I, j) => j !== a
|
|
529
529
|
));
|
|
530
530
|
}
|
|
@@ -557,8 +557,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
557
557
|
return Ae(async () => {
|
|
558
558
|
await y.getSettings();
|
|
559
559
|
}), (l, a) => {
|
|
560
|
-
var G, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, h, F, c, R, S, z, ye,
|
|
561
|
-
const d =
|
|
560
|
+
var G, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, h, F, c, R, S, z, ye, Ye, ze, He, Ge, Qe, Xe;
|
|
561
|
+
const d = K("FmIcon"), D = K("FmButton"), I = K("FmMenuDivider"), j = K("FmCircularProgress"), B = K("FmSelect"), E = K("FmTextField"), H = K("FmSwitch");
|
|
562
562
|
return (ee = (G = e.value) == null ? void 0 : G.platform) != null && ee.mappings ? (b(), P("div", Pt, [
|
|
563
563
|
t("div", Rt, [
|
|
564
564
|
t("div", Mt, [
|
|
@@ -572,12 +572,12 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
572
572
|
}),
|
|
573
573
|
a[18] || (a[18] = t("span", { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, " Repopulate the fields based on the dates selected in Preview. ", -1))
|
|
574
574
|
]),
|
|
575
|
-
n(
|
|
575
|
+
n(D, {
|
|
576
576
|
variant: "tertiary",
|
|
577
577
|
label: "Delete",
|
|
578
578
|
onClick: f
|
|
579
579
|
}),
|
|
580
|
-
n(
|
|
580
|
+
n(D, {
|
|
581
581
|
variant: "primary",
|
|
582
582
|
label: r(o)("report.common.update"),
|
|
583
583
|
"prepend-icon": "update",
|
|
@@ -589,10 +589,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
589
589
|
n(I, { style: { margin: 0 } }),
|
|
590
590
|
t("div", Lt, [
|
|
591
591
|
t("div", Et, [
|
|
592
|
-
a[
|
|
592
|
+
a[30] || (a[30] = t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Authenticate with your official Xero account to enable FeedMe to securely upload data to Xero. ", -1)),
|
|
593
593
|
t("div", Bt, [
|
|
594
|
-
t("div",
|
|
595
|
-
n(
|
|
594
|
+
t("div", qt, [
|
|
595
|
+
n(D, {
|
|
596
596
|
disabled: _.value,
|
|
597
597
|
variant: "primary",
|
|
598
598
|
label: N.value,
|
|
@@ -612,8 +612,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
612
612
|
}, null, 8, ["items", "model-value", "placeholder"])
|
|
613
613
|
]),
|
|
614
614
|
n(I, { style: { margin: 0 } }),
|
|
615
|
-
t("div",
|
|
616
|
-
a[
|
|
615
|
+
t("div", Yt, [
|
|
616
|
+
a[25] || (a[25] = t("div", { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, "General", -1)),
|
|
617
617
|
t("div", zt, [
|
|
618
618
|
a[20] || (a[20] = t("div", { class: "w-[25%] font-semibold" }, "Name", -1)),
|
|
619
619
|
t("div", Ht, [
|
|
@@ -633,56 +633,54 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
633
633
|
placeholder: "Select location",
|
|
634
634
|
class: "flex-grow"
|
|
635
635
|
}, null, 8, ["modelValue", "items"])
|
|
636
|
-
])
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
modelValue: e.value.platform,
|
|
641
|
-
"onUpdate:modelValue": a[2] || (a[2] = (Z) => e.value.platform = Z),
|
|
642
|
-
label: "upload",
|
|
643
|
-
"last-upload-date": (le = e.value.platform) == null ? void 0 : le.lastUploadDate
|
|
644
|
-
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
645
|
-
n(I, { style: { margin: 0 } }),
|
|
646
|
-
t("div", Qt, [
|
|
647
|
-
a[30] || (a[30] = t("div", { class: "flex flex-row items-center fm-typo-en-title-sm-800 h-[36px]" }, "Mapping", -1)),
|
|
648
|
-
t("div", Xt, [
|
|
649
|
-
a[23] || (a[23] = t("div", { class: "w-[25%] font-semibold" }, "Contact", -1)),
|
|
650
|
-
t("div", Wt, [
|
|
636
|
+
]),
|
|
637
|
+
t("div", Qt, [
|
|
638
|
+
a[22] || (a[22] = t("div", { class: "w-[25%] font-semibold" }, "Contact", -1)),
|
|
639
|
+
t("div", Xt, [
|
|
651
640
|
n(E, {
|
|
652
641
|
modelValue: e.value.platform.mappings.contact.xeroAccount,
|
|
653
|
-
"onUpdate:modelValue": a[
|
|
642
|
+
"onUpdate:modelValue": a[2] || (a[2] = (Z) => e.value.platform.mappings.contact.xeroAccount = Z),
|
|
654
643
|
placeholder: "Contact account number"
|
|
655
644
|
}, null, 8, ["modelValue"])
|
|
656
645
|
])
|
|
657
646
|
]),
|
|
658
|
-
t("div",
|
|
659
|
-
a[
|
|
660
|
-
t("div",
|
|
647
|
+
t("div", Wt, [
|
|
648
|
+
a[23] || (a[23] = t("div", { class: "w-[25%] font-semibold" }, "Discount as Item", -1)),
|
|
649
|
+
t("div", Jt, [
|
|
661
650
|
n(H, {
|
|
662
651
|
"model-value": e.value.platform.discountItem ?? !1,
|
|
663
652
|
style: { gap: 0 },
|
|
664
|
-
"onUpdate:modelValue": a[
|
|
653
|
+
"onUpdate:modelValue": a[3] || (a[3] = (Z) => {
|
|
665
654
|
e.value.platform.discountItem = Z;
|
|
666
655
|
})
|
|
667
656
|
}, null, 8, ["model-value"])
|
|
668
657
|
])
|
|
669
658
|
]),
|
|
670
|
-
t("div",
|
|
671
|
-
a[
|
|
672
|
-
t("div",
|
|
659
|
+
t("div", Zt, [
|
|
660
|
+
a[24] || (a[24] = t("div", { class: "w-[25%] font-semibold" }, "Combine Refund", -1)),
|
|
661
|
+
t("div", eo, [
|
|
673
662
|
n(H, {
|
|
674
663
|
"model-value": e.value.platform.mappings.isCombineRefund ?? !1,
|
|
675
664
|
style: { gap: 0 },
|
|
676
|
-
"onUpdate:modelValue": a[
|
|
665
|
+
"onUpdate:modelValue": a[4] || (a[4] = (Z) => {
|
|
677
666
|
e.value.platform.mappings.isCombineRefund = Z;
|
|
678
667
|
})
|
|
679
668
|
}, null, 8, ["model-value"])
|
|
680
669
|
])
|
|
681
|
-
])
|
|
682
|
-
|
|
670
|
+
])
|
|
671
|
+
]),
|
|
672
|
+
n(I, { style: { margin: 0 } }),
|
|
673
|
+
n(Re, {
|
|
674
|
+
modelValue: e.value.platform,
|
|
675
|
+
"onUpdate:modelValue": a[5] || (a[5] = (Z) => e.value.platform = Z),
|
|
676
|
+
label: "upload",
|
|
677
|
+
"last-upload-date": (le = e.value.platform) == null ? void 0 : le.lastUploadDate
|
|
678
|
+
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
679
|
+
n(I, { style: { margin: 0 } }),
|
|
680
|
+
t("div", to, [
|
|
683
681
|
t("div", oo, [
|
|
684
682
|
a[26] || (a[26] = t("div", { class: "fm-typo-en-title-sm-800" }, "Taxes", -1)),
|
|
685
|
-
n(
|
|
683
|
+
n(D, {
|
|
686
684
|
variant: "secondary",
|
|
687
685
|
"prepend-icon": "add",
|
|
688
686
|
label: "Add taxes",
|
|
@@ -718,7 +716,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
718
716
|
n(I, { style: { margin: 0 } }),
|
|
719
717
|
t("div", lo, [
|
|
720
718
|
a[27] || (a[27] = t("div", { class: "fm-typo-en-title-sm-800" }, "Tax Rounding Adjustment", -1)),
|
|
721
|
-
n(
|
|
719
|
+
n(D, {
|
|
722
720
|
variant: "secondary",
|
|
723
721
|
"prepend-icon": "add",
|
|
724
722
|
label: "Add tax rounding adjustments",
|
|
@@ -754,7 +752,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
754
752
|
n(I, { style: { margin: 0 } }),
|
|
755
753
|
t("div", so, [
|
|
756
754
|
a[28] || (a[28] = t("div", { class: "fm-typo-en-title-sm-800" }, "Items", -1)),
|
|
757
|
-
n(
|
|
755
|
+
n(D, {
|
|
758
756
|
variant: "secondary",
|
|
759
757
|
"prepend-icon": "add",
|
|
760
758
|
label: "Add items",
|
|
@@ -769,7 +767,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
769
767
|
((S = v.accountCodeOptions.data) == null ? void 0 : S.length) > 0 ? (b(), M(X, {
|
|
770
768
|
key: 8,
|
|
771
769
|
"header-items": ["Feedme Key", "Item Code"],
|
|
772
|
-
rows: ((
|
|
770
|
+
rows: ((Ye = (ye = (z = e.value) == null ? void 0 : z.platform) == null ? void 0 : ye.mappings) == null ? void 0 : Ye.items) || [],
|
|
773
771
|
"columns-per-row": 2,
|
|
774
772
|
removable: !0,
|
|
775
773
|
"mapping-type": "items",
|
|
@@ -790,7 +788,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
790
788
|
n(I, { style: { margin: 0 } }),
|
|
791
789
|
t("div", ro, [
|
|
792
790
|
a[29] || (a[29] = t("div", { class: "fm-typo-en-title-sm-800" }, "Payments", -1)),
|
|
793
|
-
n(
|
|
791
|
+
n(D, {
|
|
794
792
|
variant: "secondary",
|
|
795
793
|
"prepend-icon": "add",
|
|
796
794
|
label: "Add payments",
|
|
@@ -840,17 +838,17 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
840
838
|
},
|
|
841
839
|
emits: ["update:modelValue"],
|
|
842
840
|
setup(v) {
|
|
843
|
-
const o =
|
|
841
|
+
const o = q([]), { t: e } = J(), i = Y(
|
|
844
842
|
() => o.value.reduce((u, N) => {
|
|
845
|
-
const
|
|
846
|
-
u[
|
|
843
|
+
const T = u.length, { invoice: p, payments: f } = N;
|
|
844
|
+
u[T] = {
|
|
847
845
|
date: p.Date,
|
|
848
846
|
contact: p.Contact.ContactID,
|
|
849
847
|
status: p.Status,
|
|
850
848
|
ref: p.Reference
|
|
851
849
|
};
|
|
852
850
|
for (let m = 0; m < Math.max(p.LineItems.length, f.length); m++) {
|
|
853
|
-
const g =
|
|
851
|
+
const g = T + m;
|
|
854
852
|
u[g] || (u[g] = {}), p.LineItems[m] && (u[g] = {
|
|
855
853
|
...u[g],
|
|
856
854
|
itemDescription: p.LineItems[m].Description,
|
|
@@ -947,7 +945,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
947
945
|
header: "Payment Amount",
|
|
948
946
|
enableSorting: !1
|
|
949
947
|
}
|
|
950
|
-
], V = W(v, "modelValue"), $ =
|
|
948
|
+
], V = W(v, "modelValue"), $ = q(!1), U = ve(), { dateRange: x } = Ie(fe());
|
|
951
949
|
_e(
|
|
952
950
|
() => x.value,
|
|
953
951
|
async () => {
|
|
@@ -974,7 +972,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
974
972
|
}
|
|
975
973
|
}
|
|
976
974
|
return (u, N) => {
|
|
977
|
-
const
|
|
975
|
+
const T = K("FmButton"), p = K("FmCircularProgress"), f = K("FmTable");
|
|
978
976
|
return b(), P("div", co, [
|
|
979
977
|
t("div", uo, [
|
|
980
978
|
n(Pe, {
|
|
@@ -982,7 +980,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
982
980
|
"onUpdate:dateRange": N[0] || (N[0] = (m) => $e(x) ? x.value = m : null),
|
|
983
981
|
compare: !1
|
|
984
982
|
}, null, 8, ["date-range"]),
|
|
985
|
-
n(
|
|
983
|
+
n(T, {
|
|
986
984
|
loading: $.value,
|
|
987
985
|
variant: "primary",
|
|
988
986
|
label: "Upload",
|
|
@@ -1009,7 +1007,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1009
1007
|
},
|
|
1010
1008
|
emits: ["update:modelValue"],
|
|
1011
1009
|
setup(v) {
|
|
1012
|
-
const { t: o } = J(), e = W(v, "modelValue"), i =
|
|
1010
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = q("setting"), y = q({}), V = q({}), $ = q({}), U = [
|
|
1013
1011
|
{
|
|
1014
1012
|
label: o("report.integration.setting"),
|
|
1015
1013
|
value: "setting",
|
|
@@ -1020,7 +1018,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1020
1018
|
value: "preview",
|
|
1021
1019
|
icon: "table"
|
|
1022
1020
|
}
|
|
1023
|
-
], x = ue(), _ =
|
|
1021
|
+
], x = ue(), _ = Y(() => {
|
|
1024
1022
|
switch (i.value) {
|
|
1025
1023
|
case "preview":
|
|
1026
1024
|
return { component: go };
|
|
@@ -1065,7 +1063,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1065
1063
|
V.value.isLoaded = !0;
|
|
1066
1064
|
}
|
|
1067
1065
|
}
|
|
1068
|
-
async function
|
|
1066
|
+
async function T() {
|
|
1069
1067
|
if (e.value._id)
|
|
1070
1068
|
try {
|
|
1071
1069
|
const p = await st(e.value._id);
|
|
@@ -1085,12 +1083,12 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1085
1083
|
return (p = e.value.platform) == null ? void 0 : p.accessToken;
|
|
1086
1084
|
},
|
|
1087
1085
|
(p) => {
|
|
1088
|
-
p && (u(), N(),
|
|
1086
|
+
p && (u(), N(), T());
|
|
1089
1087
|
},
|
|
1090
1088
|
{ immediate: !0 }
|
|
1091
1089
|
), (p, f) => {
|
|
1092
1090
|
var w, k, s;
|
|
1093
|
-
const m =
|
|
1091
|
+
const m = K("FmPageHead"), g = K("FmTabs");
|
|
1094
1092
|
return b(), P("div", yo, [
|
|
1095
1093
|
n(m, {
|
|
1096
1094
|
title: ((w = e.value) == null ? void 0 : w.name) || "Xero",
|
|
@@ -1192,7 +1190,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1192
1190
|
}
|
|
1193
1191
|
];
|
|
1194
1192
|
return (y, V) => {
|
|
1195
|
-
const $ =
|
|
1193
|
+
const $ = K("FmIcon"), U = K("FmTable"), x = K("FmSideSheet");
|
|
1196
1194
|
return b(), M(x, {
|
|
1197
1195
|
header: r(o)("report.integration.refNumFormatInfo"),
|
|
1198
1196
|
"dismiss-away": "",
|
|
@@ -1228,7 +1226,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1228
1226
|
}), ho = {
|
|
1229
1227
|
key: 0,
|
|
1230
1228
|
class: "flex flex-col h-full"
|
|
1231
|
-
}, ko = { class: "flex flex-col gap-16 pb-[24px]" }, Co = { class: "flex flex-row justify-between items-center gap-2" }, $o = { class: "fm-typo-en-title-sm-800" }, Vo = { class: "flex flex-row gap-2 items-center" }, So = { class: "relative group cursor-pointer" }, Ao = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Do = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ko = { class: "w-[90%] flex flex-col gap-24" }, To = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fo = { class: "flex flex-col justify-between" }, No = { class: "w-[25%] font-semibold" }, Uo = { class: "flex-grow" }, Io = { class: "flex flex-col justify-between" }, Po = { class: "w-[25%] font-semibold" }, Ro = { class: "flex-grow" }, Mo = { class: "flex flex-col gap-16" }, jo = { class: "fm-typo-en-title-sm-800" }, Oo = { class: "flex flex-col max-w-[100%]" }, Lo = { class: "w-[25%] font-semibold" }, Eo = { class: "flex-grow" }, Bo = { class: "flex flex-col max-w-[100%]" },
|
|
1229
|
+
}, ko = { class: "flex flex-col gap-16 pb-[24px]" }, Co = { class: "flex flex-row justify-between items-center gap-2" }, $o = { class: "fm-typo-en-title-sm-800" }, Vo = { class: "flex flex-row gap-2 items-center" }, So = { class: "relative group cursor-pointer" }, Ao = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Do = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ko = { class: "w-[90%] flex flex-col gap-24" }, To = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fo = { class: "flex flex-col justify-between" }, No = { class: "w-[25%] font-semibold" }, Uo = { class: "flex-grow" }, Io = { class: "flex flex-col justify-between" }, Po = { class: "w-[25%] font-semibold" }, Ro = { class: "flex-grow" }, Mo = { class: "flex flex-col gap-16" }, jo = { class: "fm-typo-en-title-sm-800" }, Oo = { class: "flex flex-col max-w-[100%]" }, Lo = { class: "w-[25%] font-semibold" }, Eo = { class: "flex-grow" }, Bo = { class: "flex flex-col max-w-[100%]" }, qo = { class: "w-[25%] font-semibold" }, Yo = { class: "flex flex-col max-w-[100%]" }, zo = { class: "w-[25%] font-semibold" }, Ho = { class: "flex flex-col max-w-[100%]" }, Go = { class: "flex flex-col gap-16" }, Qo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Xo = { class: "flex flex-col gap-16 pt-3 pb-3" }, Wo = { class: "flex flex-row items-center gap-5" }, Jo = { class: "fm-typo-en-title-sm-800" }, Zo = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, ea = { class: "flex flex-row items-center justify-between gap-x-16" }, ta = { class: "fm-typo-en-title-sm-800" }, oa = { class: "flex flex-row items-center justify-between gap-x-16" }, aa = { class: "fm-typo-en-title-sm-800" }, la = { class: "flex flex-row items-center justify-between gap-x-16" }, na = { class: "fm-typo-en-title-sm-800" }, sa = { class: "flex flex-row items-center justify-between gap-x-16" }, ia = { class: "fm-typo-en-title-sm-800" }, ra = /* @__PURE__ */ Q({
|
|
1232
1230
|
__name: "Setting",
|
|
1233
1231
|
props: {
|
|
1234
1232
|
modelValue: { required: !0 },
|
|
@@ -1236,7 +1234,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1236
1234
|
},
|
|
1237
1235
|
emits: ["update:modelValue"],
|
|
1238
1236
|
setup(v) {
|
|
1239
|
-
const o = W(v, "modelValue"), e = ve(), i = ke(), y = ue(), { promptLoader: V } = De(), { promptMessage: $ } = Ue(), { restaurants: U } = fe(), x =
|
|
1237
|
+
const o = W(v, "modelValue"), e = ve(), i = ke(), y = ue(), { promptLoader: V } = De(), { promptMessage: $ } = Ue(), { restaurants: U } = fe(), x = Y(
|
|
1240
1238
|
() => U.map((s) => ({ label: s.name, value: s.id }))
|
|
1241
1239
|
), { t: _ } = J();
|
|
1242
1240
|
async function u() {
|
|
@@ -1260,9 +1258,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1260
1258
|
}
|
|
1261
1259
|
});
|
|
1262
1260
|
}
|
|
1263
|
-
function
|
|
1264
|
-
var
|
|
1265
|
-
const a = (
|
|
1261
|
+
function T(s, l) {
|
|
1262
|
+
var D;
|
|
1263
|
+
const a = (D = o.value.platform) == null ? void 0 : D.mappings;
|
|
1266
1264
|
if (!a) return;
|
|
1267
1265
|
if (["items", "taxes", "payments", "taxRoundingAdjustments"].includes(s)) {
|
|
1268
1266
|
const I = s;
|
|
@@ -1361,7 +1359,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1361
1359
|
await i.getSettings();
|
|
1362
1360
|
}), (s, l) => {
|
|
1363
1361
|
var B, E, H, G, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, h, F;
|
|
1364
|
-
const a =
|
|
1362
|
+
const a = K("FmIcon"), d = K("FmButton"), D = K("FmMenuDivider"), I = K("FmTextField"), j = K("FmSelect");
|
|
1365
1363
|
return (E = (B = o.value) == null ? void 0 : B.platform) != null && E.mappings ? (b(), P("div", ho, [
|
|
1366
1364
|
t("div", ko, [
|
|
1367
1365
|
t("div", Co, [
|
|
@@ -1389,7 +1387,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1389
1387
|
])
|
|
1390
1388
|
])
|
|
1391
1389
|
]),
|
|
1392
|
-
n(
|
|
1390
|
+
n(D, { style: { margin: 0 } }),
|
|
1393
1391
|
t("div", Do, [
|
|
1394
1392
|
t("div", Ko, [
|
|
1395
1393
|
t("div", To, C(r(_)("report.integration.bukku.authentication")), 1),
|
|
@@ -1413,7 +1411,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1413
1411
|
}, null, 8, ["modelValue", "placeholder"])
|
|
1414
1412
|
])
|
|
1415
1413
|
]),
|
|
1416
|
-
n(
|
|
1414
|
+
n(D, { style: { margin: 0 } }),
|
|
1417
1415
|
t("div", Mo, [
|
|
1418
1416
|
t("div", jo, C(r(_)("report.integration.general")), 1),
|
|
1419
1417
|
t("div", Oo, [
|
|
@@ -1426,7 +1424,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1426
1424
|
])
|
|
1427
1425
|
]),
|
|
1428
1426
|
t("div", Bo, [
|
|
1429
|
-
t("div",
|
|
1427
|
+
t("div", qo, C(r(_)("report.common.location")), 1),
|
|
1430
1428
|
n(j, {
|
|
1431
1429
|
modelValue: o.value.platform.locationIds,
|
|
1432
1430
|
"onUpdate:modelValue": l[3] || (l[3] = (c) => o.value.platform.locationIds = c),
|
|
@@ -1436,7 +1434,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1436
1434
|
class: "flex-grow"
|
|
1437
1435
|
}, null, 8, ["modelValue", "items"])
|
|
1438
1436
|
]),
|
|
1439
|
-
t("div",
|
|
1437
|
+
t("div", Yo, [
|
|
1440
1438
|
t("div", zo, C(r(_)("report.integration.grouping.title")), 1),
|
|
1441
1439
|
n(j, {
|
|
1442
1440
|
modelValue: o.value.platform.grouping,
|
|
@@ -1509,7 +1507,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1509
1507
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
1510
1508
|
])
|
|
1511
1509
|
]),
|
|
1512
|
-
n(
|
|
1510
|
+
n(D, { style: { margin: 0 } }),
|
|
1513
1511
|
t("div", Xo, [
|
|
1514
1512
|
t("div", Wo, [
|
|
1515
1513
|
t("div", Jo, C(r(_)("report.integration.refNumFormat")), 1),
|
|
@@ -1550,14 +1548,14 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1550
1548
|
}, null, 8, ["model-value", "options"])
|
|
1551
1549
|
])
|
|
1552
1550
|
]),
|
|
1553
|
-
n(
|
|
1551
|
+
n(D, { style: { margin: 0 } }),
|
|
1554
1552
|
n(Re, {
|
|
1555
1553
|
modelValue: o.value.platform,
|
|
1556
1554
|
"onUpdate:modelValue": l[12] || (l[12] = (c) => o.value.platform = c),
|
|
1557
1555
|
label: "upload",
|
|
1558
1556
|
"last-upload-date": (te = o.value.platform) == null ? void 0 : te.lastUploadDate
|
|
1559
1557
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
1560
|
-
n(
|
|
1558
|
+
n(D, { style: { margin: 0 } }),
|
|
1561
1559
|
t("div", ea, [
|
|
1562
1560
|
t("div", ta, C(r(_)("report.integration.items")), 1),
|
|
1563
1561
|
n(d, {
|
|
@@ -1577,13 +1575,13 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1577
1575
|
key: { placeholder: "Key", editable: !0 },
|
|
1578
1576
|
account: { placeholder: "Account code", editable: !0 }
|
|
1579
1577
|
},
|
|
1580
|
-
onRemove: l[14] || (l[14] = (c, R) =>
|
|
1578
|
+
onRemove: l[14] || (l[14] = (c, R) => T(c, R)),
|
|
1581
1579
|
"onUpdate:rows": l[15] || (l[15] = (c) => {
|
|
1582
1580
|
var R, S;
|
|
1583
1581
|
(S = (R = o.value) == null ? void 0 : R.platform) != null && S.mappings && (o.value.platform.mappings.items = c);
|
|
1584
1582
|
})
|
|
1585
1583
|
}, null, 8, ["rows"]),
|
|
1586
|
-
n(
|
|
1584
|
+
n(D, { style: { margin: 0 } }),
|
|
1587
1585
|
t("div", oa, [
|
|
1588
1586
|
t("div", aa, C(r(_)("report.integration.taxes")), 1),
|
|
1589
1587
|
n(d, {
|
|
@@ -1603,13 +1601,13 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1603
1601
|
key: { placeholder: "Key", editable: !0 },
|
|
1604
1602
|
account: { placeholder: "Account code", editable: !0 }
|
|
1605
1603
|
},
|
|
1606
|
-
onRemove: l[17] || (l[17] = (c, R) =>
|
|
1604
|
+
onRemove: l[17] || (l[17] = (c, R) => T(c, R)),
|
|
1607
1605
|
"onUpdate:rows": l[18] || (l[18] = (c) => {
|
|
1608
1606
|
var R, S;
|
|
1609
1607
|
(S = (R = o.value) == null ? void 0 : R.platform) != null && S.mappings && (o.value.platform.mappings.taxes = c);
|
|
1610
1608
|
})
|
|
1611
1609
|
}, null, 8, ["rows"]),
|
|
1612
|
-
n(
|
|
1610
|
+
n(D, { style: { margin: 0 } }),
|
|
1613
1611
|
t("div", la, [
|
|
1614
1612
|
t("div", na, C(r(_)("report.integration.taxRoundingAdjustments")), 1),
|
|
1615
1613
|
n(d, {
|
|
@@ -1629,13 +1627,13 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1629
1627
|
key: { placeholder: "Key", editable: !0 },
|
|
1630
1628
|
account: { placeholder: "Account code", editable: !0 }
|
|
1631
1629
|
},
|
|
1632
|
-
onRemove: l[20] || (l[20] = (c, R) =>
|
|
1630
|
+
onRemove: l[20] || (l[20] = (c, R) => T(c, R)),
|
|
1633
1631
|
"onUpdate:rows": l[21] || (l[21] = (c) => {
|
|
1634
1632
|
var R, S;
|
|
1635
1633
|
(S = (R = o.value) == null ? void 0 : R.platform) != null && S.mappings && (o.value.platform.mappings.taxRoundingAdjustments = c);
|
|
1636
1634
|
})
|
|
1637
1635
|
}, null, 8, ["rows"]),
|
|
1638
|
-
n(
|
|
1636
|
+
n(D, { style: { margin: 0 } }),
|
|
1639
1637
|
t("div", sa, [
|
|
1640
1638
|
t("div", ia, C(r(_)("report.integration.payments")), 1),
|
|
1641
1639
|
n(d, {
|
|
@@ -1656,7 +1654,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1656
1654
|
method: { placeholder: "Method", editable: !0 },
|
|
1657
1655
|
account: { placeholder: "Account code", editable: !0 }
|
|
1658
1656
|
},
|
|
1659
|
-
onRemove: l[23] || (l[23] = (c, R) =>
|
|
1657
|
+
onRemove: l[23] || (l[23] = (c, R) => T(c, R)),
|
|
1660
1658
|
"onUpdate:rows": l[24] || (l[24] = (c) => {
|
|
1661
1659
|
var R, S;
|
|
1662
1660
|
(S = (R = o.value) == null ? void 0 : R.platform) != null && S.mappings && (o.value.platform.mappings.payments = c);
|
|
@@ -1678,10 +1676,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1678
1676
|
},
|
|
1679
1677
|
emits: ["update:modelValue"],
|
|
1680
1678
|
setup(v) {
|
|
1681
|
-
const o =
|
|
1679
|
+
const o = q([]), e = Y(
|
|
1682
1680
|
() => o.value.reduce((u, N) => {
|
|
1683
|
-
const
|
|
1684
|
-
u[
|
|
1681
|
+
const T = u.length, { invoice: p, payments: f } = N;
|
|
1682
|
+
u[T] = {
|
|
1685
1683
|
no: p.number,
|
|
1686
1684
|
date: p.date,
|
|
1687
1685
|
contact: p._contact_name,
|
|
@@ -1689,7 +1687,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1689
1687
|
title: p.title
|
|
1690
1688
|
};
|
|
1691
1689
|
for (let m = 0; m < Math.max(p.form_items.length, f.length); m++) {
|
|
1692
|
-
const g =
|
|
1690
|
+
const g = T + m;
|
|
1693
1691
|
u[g] || (u[g] = {});
|
|
1694
1692
|
const w = p.form_items[m];
|
|
1695
1693
|
w && (u[g] = {
|
|
@@ -1798,7 +1796,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1798
1796
|
header: "Payment Amount",
|
|
1799
1797
|
enableSorting: !1
|
|
1800
1798
|
}
|
|
1801
|
-
], V = W(v, "modelValue"), $ =
|
|
1799
|
+
], V = W(v, "modelValue"), $ = q(!1), U = ve(), { dateRange: x } = Ie(fe());
|
|
1802
1800
|
_e(
|
|
1803
1801
|
() => x.value,
|
|
1804
1802
|
async () => {
|
|
@@ -1825,7 +1823,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1825
1823
|
}
|
|
1826
1824
|
}
|
|
1827
1825
|
return (u, N) => {
|
|
1828
|
-
const
|
|
1826
|
+
const T = K("FmButton"), p = K("FmCircularProgress"), f = K("FmTable");
|
|
1829
1827
|
return b(), P("div", da, [
|
|
1830
1828
|
t("div", ma, [
|
|
1831
1829
|
n(Pe, {
|
|
@@ -1833,7 +1831,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1833
1831
|
"onUpdate:dateRange": N[0] || (N[0] = (m) => $e(x) ? x.value = m : null),
|
|
1834
1832
|
compare: !1
|
|
1835
1833
|
}, null, 8, ["date-range"]),
|
|
1836
|
-
n(
|
|
1834
|
+
n(T, {
|
|
1837
1835
|
loading: $.value,
|
|
1838
1836
|
variant: "primary",
|
|
1839
1837
|
label: r(i)("report.common.upload"),
|
|
@@ -1860,7 +1858,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1860
1858
|
},
|
|
1861
1859
|
emits: ["update:modelValue"],
|
|
1862
1860
|
setup(v) {
|
|
1863
|
-
const { t: o } = J(), e = W(v, "modelValue"), i =
|
|
1861
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = q("setting"), y = [
|
|
1864
1862
|
{
|
|
1865
1863
|
label: o("report.integration.setting"),
|
|
1866
1864
|
value: "setting",
|
|
@@ -1871,7 +1869,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1871
1869
|
value: "preview",
|
|
1872
1870
|
icon: "table"
|
|
1873
1871
|
}
|
|
1874
|
-
], V = ue(), $ =
|
|
1872
|
+
], V = ue(), $ = Y(() => {
|
|
1875
1873
|
switch (i.value) {
|
|
1876
1874
|
case "preview":
|
|
1877
1875
|
return ua;
|
|
@@ -1883,7 +1881,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1883
1881
|
});
|
|
1884
1882
|
return (U, x) => {
|
|
1885
1883
|
var N;
|
|
1886
|
-
const _ =
|
|
1884
|
+
const _ = K("FmPageHead"), u = K("FmTabs");
|
|
1887
1885
|
return b(), P("div", fa, [
|
|
1888
1886
|
n(_, {
|
|
1889
1887
|
title: ((N = e.value) == null ? void 0 : N.name) || "Bukku",
|
|
@@ -1898,13 +1896,13 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1898
1896
|
}, 8, ["title", "onClick:back"]),
|
|
1899
1897
|
n(u, {
|
|
1900
1898
|
"model-value": i.value,
|
|
1901
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
1899
|
+
"onUpdate:modelValue": x[0] || (x[0] = (T) => i.value = T),
|
|
1902
1900
|
items: y
|
|
1903
1901
|
}, null, 8, ["model-value"]),
|
|
1904
1902
|
t("div", va, [
|
|
1905
1903
|
(b(), M(Ve($.value), {
|
|
1906
1904
|
modelValue: e.value,
|
|
1907
|
-
"onUpdate:modelValue": x[1] || (x[1] = (
|
|
1905
|
+
"onUpdate:modelValue": x[1] || (x[1] = (T) => e.value = T)
|
|
1908
1906
|
}, null, 8, ["modelValue"]))
|
|
1909
1907
|
])
|
|
1910
1908
|
]);
|
|
@@ -1913,7 +1911,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1913
1911
|
}), ya = {
|
|
1914
1912
|
key: 0,
|
|
1915
1913
|
class: "flex flex-col h-full"
|
|
1916
|
-
}, xa = { class: "flex flex-col gap-16 pb-[24px]" }, ba = { class: "flex flex-row justify-between items-center gap-2" }, wa = { class: "flex flex-row gap-2 items-center" }, _a = { class: "relative group cursor-pointer" }, ha = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, ka = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ca = { class: "w-[90%] flex flex-col gap-24" }, $a = { class: "flex flex-col gap-16" }, Va = { class: "fm-typo-en-title-sm-800" }, Sa = { class: "flex flex-col max-w-[100%]" }, Aa = { class: "w-[25%] font-semibold" }, Da = { class: "flex-grow" }, Ka = { class: "flex flex-col max-w-[100%]" }, Ta = { class: "w-[25%] font-semibold" }, Fa = { class: "flex flex-col max-w-[100%]" }, Na = { class: "w-[25%] font-semibold" }, Ua = { class: "flex flex-col gap-16" }, Ia = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Pa = { class: "flex flex-col gap-16 pt-3 pb-3" }, Ra = { class: "flex flex-row items-center gap-5" }, Ma = { class: "fm-typo-en-title-sm-800" }, ja = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Oa = { class: "flex flex-row items-center justify-between gap-x-16" }, La = { class: "fm-typo-en-title-sm-800" }, Ea = { class: "flex flex-row items-center justify-between gap-x-16" }, Ba = { class: "fm-typo-en-title-sm-800" },
|
|
1914
|
+
}, xa = { class: "flex flex-col gap-16 pb-[24px]" }, ba = { class: "flex flex-row justify-between items-center gap-2" }, wa = { class: "flex flex-row gap-2 items-center" }, _a = { class: "relative group cursor-pointer" }, ha = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, ka = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, Ca = { class: "w-[90%] flex flex-col gap-24" }, $a = { class: "flex flex-col gap-16" }, Va = { class: "fm-typo-en-title-sm-800" }, Sa = { class: "flex flex-col max-w-[100%]" }, Aa = { class: "w-[25%] font-semibold" }, Da = { class: "flex-grow" }, Ka = { class: "flex flex-col max-w-[100%]" }, Ta = { class: "w-[25%] font-semibold" }, Fa = { class: "flex flex-col max-w-[100%]" }, Na = { class: "w-[25%] font-semibold" }, Ua = { class: "flex flex-col gap-16" }, Ia = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Pa = { class: "flex flex-col gap-16 pt-3 pb-3" }, Ra = { class: "flex flex-row items-center gap-5" }, Ma = { class: "fm-typo-en-title-sm-800" }, ja = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Oa = { class: "flex flex-row items-center justify-between gap-x-16" }, La = { class: "fm-typo-en-title-sm-800" }, Ea = { class: "flex flex-row items-center justify-between gap-x-16" }, Ba = { class: "fm-typo-en-title-sm-800" }, qa = { class: "flex flex-row items-center justify-between gap-x-16" }, Ya = { class: "fm-typo-en-title-sm-800" }, za = { class: "flex flex-row items-center justify-between gap-x-16" }, Ha = { class: "fm-typo-en-title-sm-800" }, Ga = /* @__PURE__ */ Q({
|
|
1917
1915
|
__name: "Setting",
|
|
1918
1916
|
props: {
|
|
1919
1917
|
modelValue: { required: !0 },
|
|
@@ -1921,7 +1919,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1921
1919
|
},
|
|
1922
1920
|
emits: ["update:modelValue"],
|
|
1923
1921
|
setup(v) {
|
|
1924
|
-
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ =
|
|
1922
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ = Y(
|
|
1925
1923
|
() => x.map((k) => ({ label: k.name, value: k.id }))
|
|
1926
1924
|
);
|
|
1927
1925
|
async function u() {
|
|
@@ -1945,13 +1943,13 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
1945
1943
|
}
|
|
1946
1944
|
});
|
|
1947
1945
|
}
|
|
1948
|
-
function
|
|
1946
|
+
function T(k, s) {
|
|
1949
1947
|
var d;
|
|
1950
1948
|
const l = (d = e.value.platform) == null ? void 0 : d.mappings;
|
|
1951
1949
|
if (!l) return;
|
|
1952
1950
|
if (["items", "taxes", "payments", "taxRoundingAdjustments"].includes(k)) {
|
|
1953
|
-
const
|
|
1954
|
-
l[
|
|
1951
|
+
const D = k;
|
|
1952
|
+
l[D] && Array.isArray(l[D]) && (l[D] = l[D].filter(
|
|
1955
1953
|
(I, j) => j !== s
|
|
1956
1954
|
));
|
|
1957
1955
|
}
|
|
@@ -2010,7 +2008,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2010
2008
|
await y.getSettings();
|
|
2011
2009
|
}), (k, s) => {
|
|
2012
2010
|
var j, B, E, H, G, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe;
|
|
2013
|
-
const l =
|
|
2011
|
+
const l = K("FmIcon"), a = K("FmButton"), d = K("FmMenuDivider"), D = K("FmTextField"), I = K("FmSelect");
|
|
2014
2012
|
return (B = (j = e.value) == null ? void 0 : j.platform) != null && B.mappings ? (b(), P("div", ya, [
|
|
2015
2013
|
t("div", xa, [
|
|
2016
2014
|
t("div", ba, [
|
|
@@ -2046,7 +2044,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2046
2044
|
t("div", Sa, [
|
|
2047
2045
|
t("div", Aa, C(r(o)("report.common.name")), 1),
|
|
2048
2046
|
t("div", Da, [
|
|
2049
|
-
n(
|
|
2047
|
+
n(D, {
|
|
2050
2048
|
modelValue: e.value.name,
|
|
2051
2049
|
"onUpdate:modelValue": s[0] || (s[0] = (h) => e.value.name = h)
|
|
2052
2050
|
}, null, 8, ["modelValue"])
|
|
@@ -2177,7 +2175,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2177
2175
|
key: { placeholder: "Key", editable: !0 },
|
|
2178
2176
|
account: { placeholder: "Account code", editable: !0 }
|
|
2179
2177
|
},
|
|
2180
|
-
onRemove: s[12] || (s[12] = (h, F) =>
|
|
2178
|
+
onRemove: s[12] || (s[12] = (h, F) => T(h, F)),
|
|
2181
2179
|
"onUpdate:rows": s[13] || (s[13] = (h) => {
|
|
2182
2180
|
var F, c;
|
|
2183
2181
|
(c = (F = e.value) == null ? void 0 : F.platform) != null && c.mappings && (e.value.platform.mappings.items = h);
|
|
@@ -2203,15 +2201,15 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2203
2201
|
key: { placeholder: "Key", editable: !0 },
|
|
2204
2202
|
account: { placeholder: "Account code", editable: !0 }
|
|
2205
2203
|
},
|
|
2206
|
-
onRemove: s[15] || (s[15] = (h, F) =>
|
|
2204
|
+
onRemove: s[15] || (s[15] = (h, F) => T(h, F)),
|
|
2207
2205
|
"onUpdate:rows": s[16] || (s[16] = (h) => {
|
|
2208
2206
|
var F, c;
|
|
2209
2207
|
(c = (F = e.value) == null ? void 0 : F.platform) != null && c.mappings && (e.value.platform.mappings.taxes = h);
|
|
2210
2208
|
})
|
|
2211
2209
|
}, null, 8, ["rows"]),
|
|
2212
2210
|
n(d, { style: { margin: 0 } }),
|
|
2213
|
-
t("div",
|
|
2214
|
-
t("div",
|
|
2211
|
+
t("div", qa, [
|
|
2212
|
+
t("div", Ya, C(r(o)("report.integration.taxRoundingAdjustments")), 1),
|
|
2215
2213
|
n(a, {
|
|
2216
2214
|
variant: "secondary",
|
|
2217
2215
|
"prepend-icon": "add",
|
|
@@ -2229,7 +2227,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2229
2227
|
key: { placeholder: "Key", editable: !0 },
|
|
2230
2228
|
account: { placeholder: "Account code", editable: !0 }
|
|
2231
2229
|
},
|
|
2232
|
-
onRemove: s[18] || (s[18] = (h, F) =>
|
|
2230
|
+
onRemove: s[18] || (s[18] = (h, F) => T(h, F)),
|
|
2233
2231
|
"onUpdate:rows": s[19] || (s[19] = (h) => {
|
|
2234
2232
|
var F, c;
|
|
2235
2233
|
(c = (F = e.value) == null ? void 0 : F.platform) != null && c.mappings && (e.value.platform.mappings.taxRoundingAdjustments = h);
|
|
@@ -2255,7 +2253,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2255
2253
|
key: { placeholder: "Key", editable: !0 },
|
|
2256
2254
|
account: { placeholder: "Payment name", editable: !0 }
|
|
2257
2255
|
},
|
|
2258
|
-
onRemove: s[21] || (s[21] = (h, F) =>
|
|
2256
|
+
onRemove: s[21] || (s[21] = (h, F) => T("payments", F)),
|
|
2259
2257
|
"onUpdate:rows": s[22] || (s[22] = (h) => {
|
|
2260
2258
|
var F, c;
|
|
2261
2259
|
(c = (F = e.value) == null ? void 0 : F.platform) != null && c.mappings && (e.value.platform.mappings.payments = h);
|
|
@@ -2277,10 +2275,10 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2277
2275
|
},
|
|
2278
2276
|
emits: ["update:modelValue"],
|
|
2279
2277
|
setup(v) {
|
|
2280
|
-
const { t: o } = J(), e =
|
|
2278
|
+
const { t: o } = J(), e = q([]), i = Y(
|
|
2281
2279
|
() => e.value.reduce((u, N) => {
|
|
2282
|
-
const
|
|
2283
|
-
u[
|
|
2280
|
+
const T = u.length, { invoice: p, payments: f } = N;
|
|
2281
|
+
u[T] = {
|
|
2284
2282
|
date: p.DocDate,
|
|
2285
2283
|
docNo: p.DocNo,
|
|
2286
2284
|
projNo: p.ProjNo,
|
|
@@ -2288,7 +2286,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2288
2286
|
description: p.Description
|
|
2289
2287
|
};
|
|
2290
2288
|
for (let m = 0; m < Math.max(p._items.length, f.length); m++) {
|
|
2291
|
-
const g =
|
|
2289
|
+
const g = T + m;
|
|
2292
2290
|
u[g] || (u[g] = {}), p._items[m] && (u[g] = {
|
|
2293
2291
|
...u[g],
|
|
2294
2292
|
itemDescription: p._items[m].DetailDescription,
|
|
@@ -2377,7 +2375,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2377
2375
|
header: "Payment Amount",
|
|
2378
2376
|
enableSorting: !1
|
|
2379
2377
|
}
|
|
2380
|
-
], V = W(v, "modelValue"), $ =
|
|
2378
|
+
], V = W(v, "modelValue"), $ = q(!1), U = ve(), { dateRange: x } = Ie(fe());
|
|
2381
2379
|
_e(
|
|
2382
2380
|
() => x.value,
|
|
2383
2381
|
async () => {
|
|
@@ -2404,7 +2402,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2404
2402
|
}
|
|
2405
2403
|
}
|
|
2406
2404
|
return (u, N) => {
|
|
2407
|
-
const
|
|
2405
|
+
const T = K("FmButton"), p = K("FmCircularProgress"), f = K("FmTable");
|
|
2408
2406
|
return b(), P("div", Qa, [
|
|
2409
2407
|
t("div", Xa, [
|
|
2410
2408
|
n(Pe, {
|
|
@@ -2412,7 +2410,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2412
2410
|
"onUpdate:dateRange": N[0] || (N[0] = (m) => $e(x) ? x.value = m : null),
|
|
2413
2411
|
compare: !1
|
|
2414
2412
|
}, null, 8, ["date-range"]),
|
|
2415
|
-
n(
|
|
2413
|
+
n(T, {
|
|
2416
2414
|
loading: $.value,
|
|
2417
2415
|
variant: "primary",
|
|
2418
2416
|
label: r(o)("report.common.download"),
|
|
@@ -2439,7 +2437,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2439
2437
|
},
|
|
2440
2438
|
emits: ["update:modelValue"],
|
|
2441
2439
|
setup(v) {
|
|
2442
|
-
const { t: o } = J(), e = W(v, "modelValue"), i =
|
|
2440
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = q("setting"), y = [
|
|
2443
2441
|
{
|
|
2444
2442
|
label: o("report.integration.setting"),
|
|
2445
2443
|
value: "setting",
|
|
@@ -2450,7 +2448,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2450
2448
|
value: "preview",
|
|
2451
2449
|
icon: "table"
|
|
2452
2450
|
}
|
|
2453
|
-
], V = ue(), $ =
|
|
2451
|
+
], V = ue(), $ = Y(() => {
|
|
2454
2452
|
switch (i.value) {
|
|
2455
2453
|
case "preview":
|
|
2456
2454
|
return Za;
|
|
@@ -2462,7 +2460,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2462
2460
|
});
|
|
2463
2461
|
return (U, x) => {
|
|
2464
2462
|
var N;
|
|
2465
|
-
const _ =
|
|
2463
|
+
const _ = K("FmPageHead"), u = K("FmTabs");
|
|
2466
2464
|
return b(), P("div", el, [
|
|
2467
2465
|
n(_, {
|
|
2468
2466
|
title: ((N = e.value) == null ? void 0 : N.name) || "AutoCount",
|
|
@@ -2477,13 +2475,13 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2477
2475
|
}, 8, ["title", "onClick:back"]),
|
|
2478
2476
|
n(u, {
|
|
2479
2477
|
"model-value": i.value,
|
|
2480
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
2478
|
+
"onUpdate:modelValue": x[0] || (x[0] = (T) => i.value = T),
|
|
2481
2479
|
items: y
|
|
2482
2480
|
}, null, 8, ["model-value"]),
|
|
2483
2481
|
t("div", tl, [
|
|
2484
2482
|
(b(), M(Ve($.value), {
|
|
2485
2483
|
modelValue: e.value,
|
|
2486
|
-
"onUpdate:modelValue": x[1] || (x[1] = (
|
|
2484
|
+
"onUpdate:modelValue": x[1] || (x[1] = (T) => e.value = T)
|
|
2487
2485
|
}, null, 8, ["modelValue"]))
|
|
2488
2486
|
])
|
|
2489
2487
|
]);
|
|
@@ -2500,7 +2498,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2500
2498
|
},
|
|
2501
2499
|
emits: ["update:modelValue"],
|
|
2502
2500
|
setup(v) {
|
|
2503
|
-
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ =
|
|
2501
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ = Y(
|
|
2504
2502
|
() => x.map((k) => ({ label: k.name, value: k.id }))
|
|
2505
2503
|
);
|
|
2506
2504
|
async function u() {
|
|
@@ -2524,13 +2522,13 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2524
2522
|
}
|
|
2525
2523
|
});
|
|
2526
2524
|
}
|
|
2527
|
-
function
|
|
2525
|
+
function T(k, s) {
|
|
2528
2526
|
var d;
|
|
2529
2527
|
const l = (d = e.value.platform) == null ? void 0 : d.mappings;
|
|
2530
2528
|
if (!l) return;
|
|
2531
2529
|
if (["items", "taxes", "payments", "taxRoundingAdjustments"].includes(k)) {
|
|
2532
|
-
const
|
|
2533
|
-
l[
|
|
2530
|
+
const D = k;
|
|
2531
|
+
l[D] && Array.isArray(l[D]) && (l[D] = l[D].filter(
|
|
2534
2532
|
(I, j) => j !== s
|
|
2535
2533
|
));
|
|
2536
2534
|
}
|
|
@@ -2590,7 +2588,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2590
2588
|
await y.getSettings();
|
|
2591
2589
|
}), (k, s) => {
|
|
2592
2590
|
var j, B, E, H, G, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe;
|
|
2593
|
-
const l =
|
|
2591
|
+
const l = K("FmIcon"), a = K("FmButton"), d = K("FmMenuDivider"), D = K("FmTextField"), I = K("FmSelect");
|
|
2594
2592
|
return (B = (j = e.value) == null ? void 0 : j.platform) != null && B.mappings ? (b(), P("div", al, [
|
|
2595
2593
|
t("div", ll, [
|
|
2596
2594
|
t("div", nl, [
|
|
@@ -2626,7 +2624,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2626
2624
|
t("div", ul, [
|
|
2627
2625
|
t("div", fl, C(r(o)("report.common.name")), 1),
|
|
2628
2626
|
t("div", vl, [
|
|
2629
|
-
n(
|
|
2627
|
+
n(D, {
|
|
2630
2628
|
modelValue: e.value.name,
|
|
2631
2629
|
"onUpdate:modelValue": s[0] || (s[0] = (h) => e.value.name = h)
|
|
2632
2630
|
}, null, 8, ["modelValue"])
|
|
@@ -2777,7 +2775,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2777
2775
|
account: { placeholder: "Account code", editable: !0 },
|
|
2778
2776
|
code: { placeholder: "Item code", editable: !0 }
|
|
2779
2777
|
},
|
|
2780
|
-
onRemove: s[13] || (s[13] = (h, F) =>
|
|
2778
|
+
onRemove: s[13] || (s[13] = (h, F) => T(h, F)),
|
|
2781
2779
|
"onUpdate:rows": s[14] || (s[14] = (h) => {
|
|
2782
2780
|
var F, c;
|
|
2783
2781
|
(c = (F = e.value) == null ? void 0 : F.platform) != null && c.mappings && (e.value.platform.mappings.items = h);
|
|
@@ -2803,7 +2801,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2803
2801
|
key: { placeholder: "Key", editable: !0 },
|
|
2804
2802
|
account: { placeholder: "Account code", editable: !0 }
|
|
2805
2803
|
},
|
|
2806
|
-
onRemove: s[16] || (s[16] = (h, F) =>
|
|
2804
|
+
onRemove: s[16] || (s[16] = (h, F) => T(h, F)),
|
|
2807
2805
|
"onUpdate:rows": s[17] || (s[17] = (h) => {
|
|
2808
2806
|
var F, c;
|
|
2809
2807
|
(c = (F = e.value) == null ? void 0 : F.platform) != null && c.mappings && (e.value.platform.mappings.taxes = h);
|
|
@@ -2829,7 +2827,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2829
2827
|
key: { placeholder: "Key", editable: !0 },
|
|
2830
2828
|
account: { placeholder: "Account code", editable: !0 }
|
|
2831
2829
|
},
|
|
2832
|
-
onRemove: s[19] || (s[19] = (h, F) =>
|
|
2830
|
+
onRemove: s[19] || (s[19] = (h, F) => T(h, F)),
|
|
2833
2831
|
"onUpdate:rows": s[20] || (s[20] = (h) => {
|
|
2834
2832
|
var F, c;
|
|
2835
2833
|
(c = (F = e.value) == null ? void 0 : F.platform) != null && c.mappings && (e.value.platform.mappings.taxRoundingAdjustments = h);
|
|
@@ -2855,7 +2853,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2855
2853
|
key: { placeholder: "Key", editable: !0 },
|
|
2856
2854
|
account: { placeholder: "Method", editable: !0 }
|
|
2857
2855
|
},
|
|
2858
|
-
onRemove: s[22] || (s[22] = (h, F) =>
|
|
2856
|
+
onRemove: s[22] || (s[22] = (h, F) => T(h, F)),
|
|
2859
2857
|
"onUpdate:rows": s[23] || (s[23] = (h) => {
|
|
2860
2858
|
var F, c;
|
|
2861
2859
|
(c = (F = e.value) == null ? void 0 : F.platform) != null && c.mappings && (e.value.platform.mappings.payments = h);
|
|
@@ -2877,17 +2875,17 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2877
2875
|
},
|
|
2878
2876
|
emits: ["update:modelValue"],
|
|
2879
2877
|
setup(v) {
|
|
2880
|
-
const { t: o } = J(), e =
|
|
2878
|
+
const { t: o } = J(), e = q([]), i = Y(
|
|
2881
2879
|
() => e.value.reduce((u, N) => {
|
|
2882
|
-
const
|
|
2883
|
-
u[
|
|
2880
|
+
const T = u.length, { invoice: p, payments: f } = N;
|
|
2881
|
+
u[T] = {
|
|
2884
2882
|
date: p.DocDate,
|
|
2885
2883
|
docNo: p.DocNo,
|
|
2886
2884
|
debtor: p.Code,
|
|
2887
2885
|
description: p.Description_HDR
|
|
2888
2886
|
};
|
|
2889
2887
|
for (let m = 0; m < Math.max(p._items.length, f.length); m++) {
|
|
2890
|
-
const g =
|
|
2888
|
+
const g = T + m;
|
|
2891
2889
|
u[g] || (u[g] = {}), p._items[m] && (u[g] = {
|
|
2892
2890
|
...u[g],
|
|
2893
2891
|
itemDescription: p._items[m].Description_DTL,
|
|
@@ -2972,7 +2970,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2972
2970
|
header: "Payment Amount",
|
|
2973
2971
|
enableSorting: !1
|
|
2974
2972
|
}
|
|
2975
|
-
], V = W(v, "modelValue"), $ =
|
|
2973
|
+
], V = W(v, "modelValue"), $ = q(!1), U = ve(), { dateRange: x } = Ie(fe());
|
|
2976
2974
|
_e(
|
|
2977
2975
|
() => x.value,
|
|
2978
2976
|
async () => {
|
|
@@ -2999,7 +2997,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
2999
2997
|
}
|
|
3000
2998
|
}
|
|
3001
2999
|
return (u, N) => {
|
|
3002
|
-
const
|
|
3000
|
+
const T = K("FmButton"), p = K("FmCircularProgress"), f = K("FmTable");
|
|
3003
3001
|
return b(), P("div", Pl, [
|
|
3004
3002
|
t("div", Rl, [
|
|
3005
3003
|
n(Pe, {
|
|
@@ -3007,7 +3005,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3007
3005
|
"onUpdate:dateRange": N[0] || (N[0] = (m) => $e(x) ? x.value = m : null),
|
|
3008
3006
|
compare: !1
|
|
3009
3007
|
}, null, 8, ["date-range"]),
|
|
3010
|
-
n(
|
|
3008
|
+
n(T, {
|
|
3011
3009
|
loading: $.value,
|
|
3012
3010
|
variant: "primary",
|
|
3013
3011
|
label: r(o)("report.common.download"),
|
|
@@ -3034,7 +3032,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3034
3032
|
},
|
|
3035
3033
|
emits: ["update:modelValue"],
|
|
3036
3034
|
setup(v) {
|
|
3037
|
-
const { t: o } = J(), e = W(v, "modelValue"), i =
|
|
3035
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = q("setting"), y = [
|
|
3038
3036
|
{
|
|
3039
3037
|
label: o("report.integration.setting"),
|
|
3040
3038
|
value: "setting",
|
|
@@ -3045,7 +3043,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3045
3043
|
value: "preview",
|
|
3046
3044
|
icon: "table"
|
|
3047
3045
|
}
|
|
3048
|
-
], V = ue(), $ =
|
|
3046
|
+
], V = ue(), $ = Y(() => {
|
|
3049
3047
|
switch (i.value) {
|
|
3050
3048
|
case "preview":
|
|
3051
3049
|
return Ol;
|
|
@@ -3057,7 +3055,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3057
3055
|
});
|
|
3058
3056
|
return (U, x) => {
|
|
3059
3057
|
var N;
|
|
3060
|
-
const _ =
|
|
3058
|
+
const _ = K("FmPageHead"), u = K("FmTabs");
|
|
3061
3059
|
return b(), P("div", Ll, [
|
|
3062
3060
|
n(_, {
|
|
3063
3061
|
title: ((N = e.value) == null ? void 0 : N.name) || "SQL",
|
|
@@ -3072,22 +3070,22 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3072
3070
|
}, 8, ["title", "onClick:back"]),
|
|
3073
3071
|
n(u, {
|
|
3074
3072
|
"model-value": i.value,
|
|
3075
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
3073
|
+
"onUpdate:modelValue": x[0] || (x[0] = (T) => i.value = T),
|
|
3076
3074
|
items: y
|
|
3077
3075
|
}, null, 8, ["model-value"]),
|
|
3078
3076
|
t("div", El, [
|
|
3079
3077
|
(b(), M(Ve($.value), {
|
|
3080
3078
|
modelValue: e.value,
|
|
3081
|
-
"onUpdate:modelValue": x[1] || (x[1] = (
|
|
3079
|
+
"onUpdate:modelValue": x[1] || (x[1] = (T) => e.value = T)
|
|
3082
3080
|
}, null, 8, ["modelValue"]))
|
|
3083
3081
|
])
|
|
3084
3082
|
]);
|
|
3085
3083
|
};
|
|
3086
3084
|
}
|
|
3087
|
-
}),
|
|
3085
|
+
}), ql = {
|
|
3088
3086
|
key: 0,
|
|
3089
3087
|
class: "flex flex-col h-full"
|
|
3090
|
-
},
|
|
3088
|
+
}, Yl = { class: "flex flex-col gap-16 pb-[24px]" }, zl = { class: "flex flex-row justify-between items-center gap-2" }, Hl = { class: "fm-typo-en-title-sm-800" }, Gl = { class: "flex flex-row gap-2 items-center" }, Ql = { class: "flex flex-row gap-2 items-center" }, Xl = { class: "relative group cursor-pointer" }, Wl = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Jl = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, Zl = { class: "w-[90%] flex flex-col gap-24" }, en = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, tn = { class: "flex flex-col max-w-[100%]" }, on = { class: "w-[25%] font-semibold" }, an = { class: "flex-grow" }, ln = { class: "flex flex-col gap-24 pt-[24px]" }, nn = { class: "flex flex-col justify-between" }, sn = { class: "w-[25%] font-semibold" }, rn = { class: "flex-grow" }, dn = { class: "flex flex-col justify-between" }, mn = { class: "w-[25%] font-semibold" }, pn = { class: "flex-grow" }, cn = { class: "flex flex-col gap-16" }, un = { class: "fm-typo-en-title-sm-800" }, fn = { class: "flex flex-col max-w-[100%]" }, vn = { class: "w-[25%] font-semibold" }, gn = { class: "flex-grow" }, yn = { class: "flex flex-col max-w-[100%]" }, xn = { class: "w-[25%] font-semibold" }, bn = { class: "flex flex-col max-w-[100%]" }, wn = { class: "w-[25%] font-semibold" }, _n = {
|
|
3091
3089
|
key: 0,
|
|
3092
3090
|
class: "flex flex-col max-w-[100%]"
|
|
3093
3091
|
}, hn = { class: "flex flex-col gap-16" }, kn = { class: "xs:grid-cols-1 grid gap-16" }, Cn = { key: 1 }, $n = { class: "flex flex-col gap-16 pt-3 pb-3" }, Vn = { class: "flex flex-row items-center gap-5" }, Sn = { class: "fm-typo-en-title-sm-800" }, An = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Dn = { class: "flex flex-row items-center justify-between gap-x-16" }, Kn = { class: "fm-typo-en-title-sm-800" }, Tn = { class: "flex flex-row items-center justify-between gap-x-16" }, Fn = { class: "fm-typo-en-title-sm-800" }, Nn = { class: "flex flex-row items-center justify-between gap-x-16" }, Un = { class: "fm-typo-en-title-sm-800" }, In = { class: "flex flex-row items-center justify-between gap-x-16" }, Pn = { class: "fm-typo-en-title-sm-800" }, Rn = { class: "flex flex-row items-center justify-between" }, Mn = { class: "flex-grow" }, jn = {
|
|
@@ -3116,13 +3114,13 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3116
3114
|
}),
|
|
3117
3115
|
emits: ["update:modelValue"],
|
|
3118
3116
|
setup(v) {
|
|
3119
|
-
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ =
|
|
3117
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ = Y(
|
|
3120
3118
|
() => x.map((s) => ({ label: s.name, value: s.id }))
|
|
3121
3119
|
);
|
|
3122
3120
|
function u(s) {
|
|
3123
3121
|
var l;
|
|
3124
3122
|
!((l = v.retrievedMethods) != null && l.data) || !Array.isArray(v.retrievedMethods.data) || s.forEach((a) => {
|
|
3125
|
-
const d = v.retrievedMethods.data.find((
|
|
3123
|
+
const d = v.retrievedMethods.data.find((D) => D.value == a.id);
|
|
3126
3124
|
d && (a.cnId = d.cnId);
|
|
3127
3125
|
});
|
|
3128
3126
|
}
|
|
@@ -3138,7 +3136,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3138
3136
|
}
|
|
3139
3137
|
});
|
|
3140
3138
|
}
|
|
3141
|
-
async function
|
|
3139
|
+
async function T() {
|
|
3142
3140
|
await $(async () => {
|
|
3143
3141
|
var s, l, a;
|
|
3144
3142
|
try {
|
|
@@ -3149,8 +3147,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3149
3147
|
});
|
|
3150
3148
|
}
|
|
3151
3149
|
function p(s, l) {
|
|
3152
|
-
var
|
|
3153
|
-
const a = (
|
|
3150
|
+
var D;
|
|
3151
|
+
const a = (D = e.value.platform) == null ? void 0 : D.mappings;
|
|
3154
3152
|
if (!a) return;
|
|
3155
3153
|
if (["items", "taxes", "paymentMethods", "taxRoundingAdjustments"].includes(s)) {
|
|
3156
3154
|
const I = s;
|
|
@@ -3204,22 +3202,22 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3204
3202
|
s && s.forEach((l, a) => {
|
|
3205
3203
|
var I;
|
|
3206
3204
|
const d = l.key || "";
|
|
3207
|
-
let
|
|
3208
|
-
if (!
|
|
3205
|
+
let D = l.account;
|
|
3206
|
+
if (!D && d) {
|
|
3209
3207
|
switch (d) {
|
|
3210
3208
|
case "SST_SV":
|
|
3211
|
-
|
|
3209
|
+
D = "SST-6";
|
|
3212
3210
|
break;
|
|
3213
3211
|
case "SST_SV8":
|
|
3214
|
-
|
|
3212
|
+
D = "SST-8";
|
|
3215
3213
|
break;
|
|
3216
3214
|
case "SST_EX":
|
|
3217
|
-
|
|
3215
|
+
D = "SST-0";
|
|
3218
3216
|
break;
|
|
3219
3217
|
}
|
|
3220
3218
|
(I = e.value.platform) != null && I.mappings && (e.value.platform.mappings.taxes[a] = {
|
|
3221
3219
|
...l,
|
|
3222
|
-
account:
|
|
3220
|
+
account: D
|
|
3223
3221
|
});
|
|
3224
3222
|
}
|
|
3225
3223
|
});
|
|
@@ -3231,8 +3229,8 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3231
3229
|
return (a = (l = (s = e.value) == null ? void 0 : s.platform) == null ? void 0 : l.mappings) == null ? void 0 : a.version;
|
|
3232
3230
|
},
|
|
3233
3231
|
(s) => {
|
|
3234
|
-
var l, a, d,
|
|
3235
|
-
s === "v1" && !((d = (a = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : a.mappings) != null && d.payee) && (I = (
|
|
3232
|
+
var l, a, d, D, I;
|
|
3233
|
+
s === "v1" && !((d = (a = (l = e.value) == null ? void 0 : l.platform) == null ? void 0 : a.mappings) != null && d.payee) && (I = (D = e.value) == null ? void 0 : D.platform) != null && I.mappings && (e.value.platform.mappings.payee = {
|
|
3236
3234
|
id: 1,
|
|
3237
3235
|
name: ""
|
|
3238
3236
|
});
|
|
@@ -3252,9 +3250,9 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3252
3250
|
await y.getSettings();
|
|
3253
3251
|
}), (s, l) => {
|
|
3254
3252
|
var E, H, G, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, h, F;
|
|
3255
|
-
const a =
|
|
3256
|
-
return (H = (E = e.value) == null ? void 0 : E.platform) != null && H.mappings ? (b(), P("div",
|
|
3257
|
-
t("div",
|
|
3253
|
+
const a = K("FmIcon"), d = K("FmButton"), D = K("FmSelect"), I = K("FmMenuDivider"), j = K("FmTextField"), B = K("FmCircularProgress");
|
|
3254
|
+
return (H = (E = e.value) == null ? void 0 : E.platform) != null && H.mappings ? (b(), P("div", ql, [
|
|
3255
|
+
t("div", Yl, [
|
|
3258
3256
|
t("div", zl, [
|
|
3259
3257
|
t("div", Hl, C(r(o)("report.integration.connect")), 1),
|
|
3260
3258
|
t("div", Gl, [
|
|
@@ -3276,7 +3274,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3276
3274
|
variant: "primary",
|
|
3277
3275
|
label: r(o)("report.common.update"),
|
|
3278
3276
|
"prepend-icon": "update",
|
|
3279
|
-
onClick:
|
|
3277
|
+
onClick: T
|
|
3280
3278
|
}, null, 8, ["label"])
|
|
3281
3279
|
])
|
|
3282
3280
|
])
|
|
@@ -3288,7 +3286,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3288
3286
|
t("div", tn, [
|
|
3289
3287
|
t("div", on, " Biztory " + C(r(o)("report.integration.biztory.version")), 1),
|
|
3290
3288
|
t("div", an, [
|
|
3291
|
-
n(
|
|
3289
|
+
n(D, {
|
|
3292
3290
|
modelValue: e.value.platform.mappings.version,
|
|
3293
3291
|
"onUpdate:modelValue": l[0] || (l[0] = (c) => e.value.platform.mappings.version = c),
|
|
3294
3292
|
items: [
|
|
@@ -3334,7 +3332,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3334
3332
|
]),
|
|
3335
3333
|
t("div", yn, [
|
|
3336
3334
|
t("div", xn, C(r(o)("report.common.location")), 1),
|
|
3337
|
-
n(
|
|
3335
|
+
n(D, {
|
|
3338
3336
|
modelValue: e.value.platform.locationIds,
|
|
3339
3337
|
"onUpdate:modelValue": l[4] || (l[4] = (c) => e.value.platform.locationIds = c),
|
|
3340
3338
|
multiselect: !0,
|
|
@@ -3345,7 +3343,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3345
3343
|
]),
|
|
3346
3344
|
t("div", bn, [
|
|
3347
3345
|
t("div", wn, C(r(o)("report.integration.grouping.title")), 1),
|
|
3348
|
-
n(
|
|
3346
|
+
n(D, {
|
|
3349
3347
|
modelValue: e.value.platform.grouping,
|
|
3350
3348
|
"onUpdate:modelValue": l[5] || (l[5] = (c) => e.value.platform.grouping = c),
|
|
3351
3349
|
multiselect: !1,
|
|
@@ -3583,7 +3581,7 @@ const pt = { class: "flex flex-row items-center w-[100%] gap-[4px] justify-betwe
|
|
|
3583
3581
|
});
|
|
3584
3582
|
function Bn(v) {
|
|
3585
3583
|
return v.reduce((o, e) => {
|
|
3586
|
-
var V, $, U, x, _, u, N,
|
|
3584
|
+
var V, $, U, x, _, u, N, T, p, f, m, g, w, k, s, l, a, d, D, I, j, B;
|
|
3587
3585
|
const { invoice: i } = e, y = o.length;
|
|
3588
3586
|
o[y] = {
|
|
3589
3587
|
invoice_date: i.invoice_date,
|
|
@@ -3598,7 +3596,7 @@ function Bn(v) {
|
|
|
3598
3596
|
item_tax: (x = i.items[0]) == null ? void 0 : x.total_tax,
|
|
3599
3597
|
item_tax_label: ((_ = i.items[0]) == null ? void 0 : _.tax_label) || "-",
|
|
3600
3598
|
payment_amount: ((N = (u = i.transactions) == null ? void 0 : u[0]) == null ? void 0 : N.amount) || void 0,
|
|
3601
|
-
payment_method: ((p = (
|
|
3599
|
+
payment_method: ((p = (T = i.transactions) == null ? void 0 : T[0]) == null ? void 0 : p.payment_method) || "-",
|
|
3602
3600
|
payment_term: ((f = i == null ? void 0 : i.payment_term) == null ? void 0 : f.name) || ""
|
|
3603
3601
|
};
|
|
3604
3602
|
for (let E = 1; E < Math.max(((m = i.items) == null ? void 0 : m.length) || 0, ((g = i.transactions) == null ? void 0 : g.length) || 0); E++) {
|
|
@@ -3616,7 +3614,7 @@ function Bn(v) {
|
|
|
3616
3614
|
payment_method: ((l = (s = i.transactions) == null ? void 0 : s[E]) == null ? void 0 : l.payment_method) || "-",
|
|
3617
3615
|
payment_term: ((a = i == null ? void 0 : i.payment_term) == null ? void 0 : a.name) || ""
|
|
3618
3616
|
} : o[H] = {
|
|
3619
|
-
payment_amount: ((
|
|
3617
|
+
payment_amount: ((D = (d = i.transactions) == null ? void 0 : d[E]) == null ? void 0 : D.amount) || void 0,
|
|
3620
3618
|
payment_method: ((j = (I = i.transactions) == null ? void 0 : I[E]) == null ? void 0 : j.payment_method) || "-",
|
|
3621
3619
|
payment_term: ((B = i == null ? void 0 : i.payment_term) == null ? void 0 : B.name) || ""
|
|
3622
3620
|
};
|
|
@@ -3624,7 +3622,7 @@ function Bn(v) {
|
|
|
3624
3622
|
return o;
|
|
3625
3623
|
}, []);
|
|
3626
3624
|
}
|
|
3627
|
-
const
|
|
3625
|
+
const qn = [
|
|
3628
3626
|
{
|
|
3629
3627
|
accessorKey: "invoice_date",
|
|
3630
3628
|
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Date"),
|
|
@@ -3696,9 +3694,9 @@ const Yn = [
|
|
|
3696
3694
|
enableSorting: !1
|
|
3697
3695
|
}
|
|
3698
3696
|
];
|
|
3699
|
-
function
|
|
3697
|
+
function Yn(v) {
|
|
3700
3698
|
return v.reduce((o, e) => {
|
|
3701
|
-
var U, x, _, u, N,
|
|
3699
|
+
var U, x, _, u, N, T, p, f, m, g, w, k, s, l;
|
|
3702
3700
|
const { invoice: i, payments: y } = e, V = o.length;
|
|
3703
3701
|
o[V] = {
|
|
3704
3702
|
invoice_date: i.invoice_date,
|
|
@@ -3708,7 +3706,7 @@ function qn(v) {
|
|
|
3708
3706
|
item_description: (_ = i.items[0]) == null ? void 0 : _.description,
|
|
3709
3707
|
item_price: (u = i.items[0]) == null ? void 0 : u.price,
|
|
3710
3708
|
item_tax_label: ((N = i.items[0]) == null ? void 0 : N.tax_label) ?? "",
|
|
3711
|
-
item_tax_amount: ((
|
|
3709
|
+
item_tax_amount: ((T = i.items[0]) == null ? void 0 : T.total_tax) ?? "",
|
|
3712
3710
|
service_charge_amount: ((p = i.service_charges[0]) == null ? void 0 : p.total) ?? "",
|
|
3713
3711
|
rounding: i.rounding ?? 0,
|
|
3714
3712
|
payment_term_id: i.payment_term.name ?? "",
|
|
@@ -3723,14 +3721,14 @@ function qn(v) {
|
|
|
3723
3721
|
for (let a = 1; a < $; a++) {
|
|
3724
3722
|
const d = V + a;
|
|
3725
3723
|
o[d] || (o[d] = {});
|
|
3726
|
-
const
|
|
3727
|
-
|
|
3724
|
+
const D = i.items[a], I = y[a];
|
|
3725
|
+
D ? o[d] = {
|
|
3728
3726
|
...o[d],
|
|
3729
|
-
item_code:
|
|
3730
|
-
item_description:
|
|
3731
|
-
item_price:
|
|
3732
|
-
item_tax_label:
|
|
3733
|
-
item_tax_amount:
|
|
3727
|
+
item_code: D.code,
|
|
3728
|
+
item_description: D.description,
|
|
3729
|
+
item_price: D.total,
|
|
3730
|
+
item_tax_label: D.tax_label == "?" ? "" : D.tax_label ?? "",
|
|
3731
|
+
item_tax_amount: D.total_tax ?? "",
|
|
3734
3732
|
payment_term_id: i.payment_term.name ?? "",
|
|
3735
3733
|
payment_term_amount: ((s = I == null ? void 0 : I.ids[0]) == null ? void 0 : s.amount) ?? "",
|
|
3736
3734
|
payment_method: (I == null ? void 0 : I.payment_method_name) || ""
|
|
@@ -3821,7 +3819,7 @@ const zn = [
|
|
|
3821
3819
|
},
|
|
3822
3820
|
emits: ["update:modelValue"],
|
|
3823
3821
|
setup(v) {
|
|
3824
|
-
const { t: o } = J(), e = W(v, "modelValue"), i =
|
|
3822
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = q(!1), y = ve(), { dateRange: V } = Ie(fe()), $ = q([]);
|
|
3825
3823
|
_e(
|
|
3826
3824
|
() => V.value,
|
|
3827
3825
|
async () => {
|
|
@@ -3838,18 +3836,18 @@ const zn = [
|
|
|
3838
3836
|
immediate: !0
|
|
3839
3837
|
}
|
|
3840
3838
|
);
|
|
3841
|
-
const U =
|
|
3839
|
+
const U = Y(() => {
|
|
3842
3840
|
switch (e.value.platform.mappings.version) {
|
|
3843
3841
|
case "v1":
|
|
3844
3842
|
return Bn($.value);
|
|
3845
3843
|
case "v2":
|
|
3846
|
-
return
|
|
3844
|
+
return Yn($.value);
|
|
3847
3845
|
}
|
|
3848
3846
|
return [];
|
|
3849
|
-
}), x =
|
|
3847
|
+
}), x = Y(() => {
|
|
3850
3848
|
switch (e.value.platform.mappings.version) {
|
|
3851
3849
|
case "v1":
|
|
3852
|
-
return
|
|
3850
|
+
return qn;
|
|
3853
3851
|
case "v2":
|
|
3854
3852
|
return zn;
|
|
3855
3853
|
}
|
|
@@ -3865,7 +3863,7 @@ const zn = [
|
|
|
3865
3863
|
}
|
|
3866
3864
|
}
|
|
3867
3865
|
return (u, N) => {
|
|
3868
|
-
const
|
|
3866
|
+
const T = K("FmButton"), p = K("FmCircularProgress"), f = K("FmTable");
|
|
3869
3867
|
return b(), P("div", Hn, [
|
|
3870
3868
|
t("div", Gn, [
|
|
3871
3869
|
n(Pe, {
|
|
@@ -3873,7 +3871,7 @@ const zn = [
|
|
|
3873
3871
|
"onUpdate:dateRange": N[0] || (N[0] = (m) => $e(V) ? V.value = m : null),
|
|
3874
3872
|
compare: !1
|
|
3875
3873
|
}, null, 8, ["date-range"]),
|
|
3876
|
-
n(
|
|
3874
|
+
n(T, {
|
|
3877
3875
|
loading: i.value,
|
|
3878
3876
|
variant: "primary",
|
|
3879
3877
|
label: "Upload",
|
|
@@ -3900,7 +3898,7 @@ const zn = [
|
|
|
3900
3898
|
},
|
|
3901
3899
|
emits: ["update:modelValue"],
|
|
3902
3900
|
setup(v) {
|
|
3903
|
-
const { t: o } = J(), e = W(v, "modelValue"), i =
|
|
3901
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = q("setting"), y = [
|
|
3904
3902
|
{
|
|
3905
3903
|
label: o("report.integration.setting"),
|
|
3906
3904
|
value: "setting",
|
|
@@ -3911,7 +3909,7 @@ const zn = [
|
|
|
3911
3909
|
value: "preview",
|
|
3912
3910
|
icon: "table"
|
|
3913
3911
|
}
|
|
3914
|
-
], V = ue(), $ =
|
|
3912
|
+
], V = ue(), $ = Y(() => {
|
|
3915
3913
|
switch (i.value) {
|
|
3916
3914
|
case "preview":
|
|
3917
3915
|
return {
|
|
@@ -3928,11 +3926,11 @@ const zn = [
|
|
|
3928
3926
|
default:
|
|
3929
3927
|
return null;
|
|
3930
3928
|
}
|
|
3931
|
-
}), U =
|
|
3929
|
+
}), U = q({}), x = q({}), _ = (f, m) => f.map((g) => ({
|
|
3932
3930
|
label: m.length > 2 ? `ID:${g[m[2]]} [${g[m[0]]}] ${g[m[1]]}` : `[${g[m[0]]}] ${g[m[1]]}`,
|
|
3933
3931
|
value: g.id,
|
|
3934
3932
|
cnId: g.cnId ? g.cnId : null
|
|
3935
|
-
})), u = (f) => _(f, ["wallet", "name"]), N = (f) => _(f, ["id", "name"]),
|
|
3933
|
+
})), u = (f) => _(f, ["wallet", "name"]), N = (f) => _(f, ["id", "name"]), T = async (f, m, g, w) => {
|
|
3936
3934
|
try {
|
|
3937
3935
|
const k = await f(e.value._id);
|
|
3938
3936
|
g.value.data = m(k);
|
|
@@ -3943,24 +3941,24 @@ const zn = [
|
|
|
3943
3941
|
}
|
|
3944
3942
|
}, p = async () => {
|
|
3945
3943
|
var f, m;
|
|
3946
|
-
(f = e.value.platform.mappings) != null && f.version && await
|
|
3944
|
+
(f = e.value.platform.mappings) != null && f.version && await T(
|
|
3947
3945
|
it,
|
|
3948
3946
|
u,
|
|
3949
3947
|
U,
|
|
3950
3948
|
"Failed to fetch payment methods:"
|
|
3951
|
-
), ((m = e.value.platform.mappings) == null ? void 0 : m.version) == "v2" && await
|
|
3949
|
+
), ((m = e.value.platform.mappings) == null ? void 0 : m.version) == "v2" && await T(
|
|
3952
3950
|
rt,
|
|
3953
3951
|
N,
|
|
3954
3952
|
x,
|
|
3955
3953
|
"Failed to fetch customers:"
|
|
3956
3954
|
), U.value.isLoaded = !0, x.value.isLoaded = !0;
|
|
3957
3955
|
};
|
|
3958
|
-
return
|
|
3956
|
+
return qe(p), _e(() => {
|
|
3959
3957
|
var f;
|
|
3960
3958
|
return (f = e.value.platform.mappings) == null ? void 0 : f.version;
|
|
3961
3959
|
}, p), (f, m) => {
|
|
3962
3960
|
var k, s, l;
|
|
3963
|
-
const g =
|
|
3961
|
+
const g = K("FmPageHead"), w = K("FmTabs");
|
|
3964
3962
|
return b(), P("div", Jn, [
|
|
3965
3963
|
n(g, {
|
|
3966
3964
|
title: ((k = e.value) == null ? void 0 : k.name) || "Biztory",
|
|
@@ -3998,7 +3996,7 @@ const zn = [
|
|
|
3998
3996
|
},
|
|
3999
3997
|
emits: ["update:modelValue"],
|
|
4000
3998
|
setup(v) {
|
|
4001
|
-
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ =
|
|
3999
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ = Y(
|
|
4002
4000
|
() => x.map((m) => ({ label: m.name, value: m.id }))
|
|
4003
4001
|
);
|
|
4004
4002
|
async function u() {
|
|
@@ -4022,7 +4020,7 @@ const zn = [
|
|
|
4022
4020
|
}
|
|
4023
4021
|
});
|
|
4024
4022
|
}
|
|
4025
|
-
function
|
|
4023
|
+
function T(m, g) {
|
|
4026
4024
|
var w, k;
|
|
4027
4025
|
(k = (w = e.value.platform) == null ? void 0 : w.mappings) != null && k[m] && (e.value.platform.mappings[m] = e.value.platform.mappings[m].filter(
|
|
4028
4026
|
(s, l) => l !== g
|
|
@@ -4052,9 +4050,9 @@ const zn = [
|
|
|
4052
4050
|
return Ae(async () => {
|
|
4053
4051
|
await y.getSettings();
|
|
4054
4052
|
}), (m, g) => {
|
|
4055
|
-
var d,
|
|
4056
|
-
const w =
|
|
4057
|
-
return (
|
|
4053
|
+
var d, D, I, j, B;
|
|
4054
|
+
const w = K("FmIcon"), k = K("FmButton"), s = K("FmMenuDivider"), l = K("FmTextField"), a = K("FmSelect");
|
|
4055
|
+
return (D = (d = e.value) == null ? void 0 : d.platform) != null && D.mappings ? (b(), P("div", ts, [
|
|
4058
4056
|
t("div", os, [
|
|
4059
4057
|
t("div", as, [
|
|
4060
4058
|
g[6] || (g[6] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
@@ -4134,7 +4132,7 @@ const zn = [
|
|
|
4134
4132
|
badgeNo: { placeholder: "Badge No", editable: !0 },
|
|
4135
4133
|
employeeNo: { placeholder: "Employee No", editable: !0 }
|
|
4136
4134
|
},
|
|
4137
|
-
onRemove: g[4] || (g[4] = (E, H) =>
|
|
4135
|
+
onRemove: g[4] || (g[4] = (E, H) => T("employees", H)),
|
|
4138
4136
|
"onUpdate:rows": g[5] || (g[5] = (E) => {
|
|
4139
4137
|
var H, G;
|
|
4140
4138
|
(G = (H = e.value) == null ? void 0 : H.platform) != null && G.mappings && (e.value.platform.mappings.employees = E);
|
|
@@ -4156,7 +4154,7 @@ const zn = [
|
|
|
4156
4154
|
},
|
|
4157
4155
|
emits: ["update:modelValue"],
|
|
4158
4156
|
setup(v) {
|
|
4159
|
-
const { t: o } = J(), e =
|
|
4157
|
+
const { t: o } = J(), e = q([]), i = [
|
|
4160
4158
|
{
|
|
4161
4159
|
accessorKey: "name",
|
|
4162
4160
|
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Name"),
|
|
@@ -4182,7 +4180,7 @@ const zn = [
|
|
|
4182
4180
|
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Time"),
|
|
4183
4181
|
enableSorting: !1
|
|
4184
4182
|
}
|
|
4185
|
-
], y = W(v, "modelValue"), V =
|
|
4183
|
+
], y = W(v, "modelValue"), V = q(!1), $ = ve(), { dateRange: U } = Ie(fe());
|
|
4186
4184
|
_e(
|
|
4187
4185
|
() => U.value,
|
|
4188
4186
|
async () => {
|
|
@@ -4209,7 +4207,7 @@ const zn = [
|
|
|
4209
4207
|
}
|
|
4210
4208
|
}
|
|
4211
4209
|
return (_, u) => {
|
|
4212
|
-
const N =
|
|
4210
|
+
const N = K("FmButton"), T = K("FmCircularProgress"), p = K("FmTable");
|
|
4213
4211
|
return b(), P("div", bs, [
|
|
4214
4212
|
t("div", ws, [
|
|
4215
4213
|
n(Pe, {
|
|
@@ -4225,7 +4223,7 @@ const zn = [
|
|
|
4225
4223
|
}, null, 8, ["loading", "label"])
|
|
4226
4224
|
]),
|
|
4227
4225
|
V.value ? (b(), P("div", _s, [
|
|
4228
|
-
n(
|
|
4226
|
+
n(T, { size: "xl" }),
|
|
4229
4227
|
t("span", hs, C(r(o)("report.common.isLoading")), 1)
|
|
4230
4228
|
])) : e.value.length > 0 ? (b(), M(p, {
|
|
4231
4229
|
key: 1,
|
|
@@ -4244,7 +4242,7 @@ const zn = [
|
|
|
4244
4242
|
},
|
|
4245
4243
|
emits: ["update:modelValue"],
|
|
4246
4244
|
setup(v) {
|
|
4247
|
-
const { t: o } = J(), e = W(v, "modelValue"), i =
|
|
4245
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = q("setting"), y = [
|
|
4248
4246
|
{
|
|
4249
4247
|
label: o("report.integration.setting"),
|
|
4250
4248
|
value: "setting",
|
|
@@ -4255,7 +4253,7 @@ const zn = [
|
|
|
4255
4253
|
value: "preview",
|
|
4256
4254
|
icon: "table"
|
|
4257
4255
|
}
|
|
4258
|
-
], V = ue(), $ =
|
|
4256
|
+
], V = ue(), $ = Y(() => {
|
|
4259
4257
|
switch (i.value) {
|
|
4260
4258
|
case "preview":
|
|
4261
4259
|
return ks;
|
|
@@ -4267,7 +4265,7 @@ const zn = [
|
|
|
4267
4265
|
});
|
|
4268
4266
|
return (U, x) => {
|
|
4269
4267
|
var N;
|
|
4270
|
-
const _ =
|
|
4268
|
+
const _ = K("FmPageHead"), u = K("FmTabs");
|
|
4271
4269
|
return b(), P("div", Cs, [
|
|
4272
4270
|
n(_, {
|
|
4273
4271
|
title: ((N = e.value) == null ? void 0 : N.name) || "AutoCount",
|
|
@@ -4282,13 +4280,13 @@ const zn = [
|
|
|
4282
4280
|
}, 8, ["title", "onClick:back"]),
|
|
4283
4281
|
n(u, {
|
|
4284
4282
|
"model-value": i.value,
|
|
4285
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
4283
|
+
"onUpdate:modelValue": x[0] || (x[0] = (T) => i.value = T),
|
|
4286
4284
|
items: y
|
|
4287
4285
|
}, null, 8, ["model-value"]),
|
|
4288
4286
|
t("div", $s, [
|
|
4289
4287
|
(b(), M(Ve($.value), {
|
|
4290
4288
|
modelValue: e.value,
|
|
4291
|
-
"onUpdate:modelValue": x[1] || (x[1] = (
|
|
4289
|
+
"onUpdate:modelValue": x[1] || (x[1] = (T) => e.value = T)
|
|
4292
4290
|
}, null, 8, ["modelValue"]))
|
|
4293
4291
|
])
|
|
4294
4292
|
]);
|
|
@@ -4297,19 +4295,19 @@ const zn = [
|
|
|
4297
4295
|
}), Ss = {
|
|
4298
4296
|
key: 0,
|
|
4299
4297
|
class: "flex flex-col h-full"
|
|
4300
|
-
}, As = { class: "flex flex-col gap-16 pb-[24px]" }, Ds = { class: "flex flex-row justify-between items-center gap-2" }, Ks = { class: "fm-typo-en-title-sm-800" }, Ts = { class: "flex flex-row gap-2 items-center" }, Fs = { class: "flex flex-row gap-2 items-center" }, Ns = { class: "relative group cursor-pointer" }, Us = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Is = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, Ps = { class: "flex flex-col gap-24 w-[90%]" }, Rs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ms = { class: "flex flex-col gap-24 overflow-y-auto overflow-x-hidden" }, js = { class: "flex flex-col justify-between" }, Os = { class: "w-[25%] font-semibold" }, Ls = { class: "flex-grow" }, Es = { class: "flex flex-col justify-between" }, Bs = { class: "w-[25%] font-semibold" },
|
|
4298
|
+
}, As = { class: "flex flex-col gap-16 pb-[24px]" }, Ds = { class: "flex flex-row justify-between items-center gap-2" }, Ks = { class: "fm-typo-en-title-sm-800" }, Ts = { class: "flex flex-row gap-2 items-center" }, Fs = { class: "flex flex-row gap-2 items-center" }, Ns = { class: "relative group cursor-pointer" }, Us = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Is = { class: "flex flex-col gap-24 pt-[24px] overflow-y-auto overflow-x-hidden" }, Ps = { class: "flex flex-col gap-24 w-[90%]" }, Rs = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ms = { class: "flex flex-col gap-24 overflow-y-auto overflow-x-hidden" }, js = { class: "flex flex-col justify-between" }, Os = { class: "w-[25%] font-semibold" }, Ls = { class: "flex-grow" }, Es = { class: "flex flex-col justify-between" }, Bs = { class: "w-[25%] font-semibold" }, qs = { class: "flex-grow" }, Ys = { class: "flex flex-col justify-between" }, zs = { class: "w-[25%] font-semibold" }, Hs = { class: "flex-grow" }, Gs = { class: "flex flex-col gap-16" }, Qs = { class: "flex flex-row items-center gap-5" }, Xs = { class: "fm-typo-en-title-sm-800" }, Ws = { class: "flex flex-col max-w-[100%]" }, Js = { class: "w-[25%] font-semibold" }, Zs = { class: "flex-grow" }, ei = { class: "flex flex-col max-w-[100%]" }, ti = { class: "w-[25%] font-semibold" }, oi = { class: "flex flex-row items-center max-w-[100%] justify-between" }, ai = { class: "flex-grow" }, li = { class: "flex flex-col max-w-[100%]" }, ni = { class: "w-[25%] font-semibold" }, si = { class: "flex flex-col max-w-[100%]" }, ii = { class: "w-[25%] font-semibold" }, ri = {
|
|
4301
4299
|
key: 1,
|
|
4302
4300
|
class: "w-[100%] flex flex-col gap-2"
|
|
4303
|
-
},
|
|
4301
|
+
}, di = {
|
|
4304
4302
|
key: 2,
|
|
4305
4303
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
4306
|
-
},
|
|
4304
|
+
}, mi = { class: "flex flex-col max-w-[100%]" }, pi = { class: "w-[25%] font-semibold" }, ci = {
|
|
4307
4305
|
key: 1,
|
|
4308
4306
|
class: "w-[100%] flex flex-col gap-2"
|
|
4309
|
-
},
|
|
4307
|
+
}, ui = {
|
|
4310
4308
|
key: 2,
|
|
4311
4309
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
4312
|
-
},
|
|
4310
|
+
}, fi = { class: "flex flex-col gap-16" }, vi = { class: "fm-typo-en-title-sm-800" }, gi = { class: "flex flex-row items-center w-[100%] justify-start" }, yi = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, xi = { class: "flex flex-row items-center w-[100%] justify-start" }, bi = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, wi = { class: "flex flex-row items-center w-[100%] justify-start" }, _i = { class: "text-nowrap w-[calc(25%-4px)] overflow-hidden text-ellipsis" }, hi = { class: "flex flex-col gap-16 pt-3 pb-3" }, ki = { class: "flex flex-row items-center gap-5" }, Ci = { class: "fm-typo-en-title-sm-800" }, $i = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Vi = { class: "flex flex-row items-center justify-between gap-x-16" }, Si = { class: "fm-typo-en-title-sm-800" }, Ai = { class: "flex flex-row items-center justify-between gap-x-16" }, Di = { class: "fm-typo-en-title-sm-800" }, Ki = { class: "flex flex-row items-center justify-between gap-x-16" }, Ti = { class: "fm-typo-en-title-sm-800" }, Fi = { class: "flex flex-row items-center justify-between gap-x-16" }, Ni = { class: "fm-typo-en-title-sm-800" }, Ui = { class: "xs:grid-cols-1 grid-cols-2 grid gap-16" }, Ii = /* @__PURE__ */ Q({
|
|
4313
4311
|
__name: "Setting",
|
|
4314
4312
|
props: /* @__PURE__ */ Se({
|
|
4315
4313
|
retrievedDebtors: {
|
|
@@ -4326,10 +4324,10 @@ const zn = [
|
|
|
4326
4324
|
}),
|
|
4327
4325
|
emits: ["update:modelValue"],
|
|
4328
4326
|
setup(v) {
|
|
4329
|
-
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ =
|
|
4327
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ = Y(
|
|
4330
4328
|
() => x.map((l) => ({ label: l.name, value: l.id }))
|
|
4331
4329
|
);
|
|
4332
|
-
let u =
|
|
4330
|
+
let u = q("");
|
|
4333
4331
|
async function N() {
|
|
4334
4332
|
await U({
|
|
4335
4333
|
message: o("report.messages.confirmDelete", { name: e.value.name }),
|
|
@@ -4342,7 +4340,7 @@ const zn = [
|
|
|
4342
4340
|
}
|
|
4343
4341
|
});
|
|
4344
4342
|
}
|
|
4345
|
-
async function
|
|
4343
|
+
async function T() {
|
|
4346
4344
|
await $(async () => {
|
|
4347
4345
|
try {
|
|
4348
4346
|
await Te(e.value._id, e.value), await y.getSettings();
|
|
@@ -4401,8 +4399,8 @@ const zn = [
|
|
|
4401
4399
|
key: l,
|
|
4402
4400
|
value: a
|
|
4403
4401
|
}) {
|
|
4404
|
-
var d,
|
|
4405
|
-
(
|
|
4402
|
+
var d, D;
|
|
4403
|
+
(D = (d = e.value) == null ? void 0 : d.platform) != null && D.mappings && (e.value.platform.mappings[l] = a);
|
|
4406
4404
|
}
|
|
4407
4405
|
function k(l) {
|
|
4408
4406
|
return {
|
|
@@ -4425,7 +4423,7 @@ const zn = [
|
|
|
4425
4423
|
var a;
|
|
4426
4424
|
if (l && ((a = v.retrievedDebtors.data) == null ? void 0 : a.length) > 0) {
|
|
4427
4425
|
const d = v.retrievedDebtors.data.find(
|
|
4428
|
-
(
|
|
4426
|
+
(D) => D.valueAccNo === e.value.platform.mappings.debtorCode
|
|
4429
4427
|
);
|
|
4430
4428
|
d != null && (u.value = d.value);
|
|
4431
4429
|
}
|
|
@@ -4433,7 +4431,7 @@ const zn = [
|
|
|
4433
4431
|
{ immediate: !0 }
|
|
4434
4432
|
), (l, a) => {
|
|
4435
4433
|
var G, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe, h, F, c, R;
|
|
4436
|
-
const d =
|
|
4434
|
+
const d = K("FmIcon"), D = K("FmButton"), I = K("FmMenuDivider"), j = K("FmTextField"), B = K("FmSelect"), E = K("FmSwitch"), H = K("FmCircularProgress");
|
|
4437
4435
|
return (ee = (G = e.value) == null ? void 0 : G.platform) != null && ee.mappings ? (b(), P("div", Ss, [
|
|
4438
4436
|
t("div", As, [
|
|
4439
4437
|
t("div", Ds, [
|
|
@@ -4448,16 +4446,16 @@ const zn = [
|
|
|
4448
4446
|
}),
|
|
4449
4447
|
t("span", Us, C(r(o)("report.integration.refreshSetting")), 1)
|
|
4450
4448
|
]),
|
|
4451
|
-
n(
|
|
4449
|
+
n(D, {
|
|
4452
4450
|
variant: "tertiary",
|
|
4453
4451
|
label: r(o)("report.common.delete"),
|
|
4454
4452
|
onClick: N
|
|
4455
4453
|
}, null, 8, ["label"]),
|
|
4456
|
-
n(
|
|
4454
|
+
n(D, {
|
|
4457
4455
|
variant: "primary",
|
|
4458
4456
|
label: r(o)("report.common.update"),
|
|
4459
4457
|
"prepend-icon": "update",
|
|
4460
|
-
onClick:
|
|
4458
|
+
onClick: T
|
|
4461
4459
|
}, null, 8, ["label"])
|
|
4462
4460
|
])
|
|
4463
4461
|
])
|
|
@@ -4480,7 +4478,7 @@ const zn = [
|
|
|
4480
4478
|
]),
|
|
4481
4479
|
t("div", Es, [
|
|
4482
4480
|
t("div", Bs, C(r(o)("report.integration.apiKey")), 1),
|
|
4483
|
-
t("div",
|
|
4481
|
+
t("div", qs, [
|
|
4484
4482
|
n(j, {
|
|
4485
4483
|
modelValue: e.value.platform.apiKey,
|
|
4486
4484
|
"onUpdate:modelValue": a[1] || (a[1] = (S) => e.value.platform.apiKey = S),
|
|
@@ -4488,7 +4486,7 @@ const zn = [
|
|
|
4488
4486
|
}, null, 8, ["modelValue", "placeholder"])
|
|
4489
4487
|
])
|
|
4490
4488
|
]),
|
|
4491
|
-
t("div",
|
|
4489
|
+
t("div", Ys, [
|
|
4492
4490
|
t("div", zs, C(r(o)("report.integration.autocount.accountBookId")), 1),
|
|
4493
4491
|
t("div", Hs, [
|
|
4494
4492
|
n(j, {
|
|
@@ -4524,27 +4522,39 @@ const zn = [
|
|
|
4524
4522
|
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
4525
4523
|
]),
|
|
4526
4524
|
t("div", oi, [
|
|
4527
|
-
t("div",
|
|
4525
|
+
a[33] || (a[33] = t("div", { class: "w-[25%] font-semibold" }, "Discount as Item", -1)),
|
|
4526
|
+
t("div", ai, [
|
|
4527
|
+
n(E, {
|
|
4528
|
+
"model-value": e.value.platform.discountItem ?? !1,
|
|
4529
|
+
style: { gap: 0 },
|
|
4530
|
+
"onUpdate:modelValue": a[5] || (a[5] = (S) => {
|
|
4531
|
+
e.value.platform.discountItem = S;
|
|
4532
|
+
})
|
|
4533
|
+
}, null, 8, ["model-value"])
|
|
4534
|
+
])
|
|
4535
|
+
]),
|
|
4536
|
+
t("div", li, [
|
|
4537
|
+
t("div", ni, C(r(o)("report.integration.grouping.title")), 1),
|
|
4528
4538
|
n(B, {
|
|
4529
4539
|
modelValue: e.value.platform.grouping,
|
|
4530
|
-
"onUpdate:modelValue": a[
|
|
4540
|
+
"onUpdate:modelValue": a[6] || (a[6] = (S) => e.value.platform.grouping = S),
|
|
4531
4541
|
multiselect: !1,
|
|
4532
4542
|
items: m,
|
|
4533
4543
|
placeholder: r(o)("report.integration.grouping.title"),
|
|
4534
4544
|
class: "flex-grow"
|
|
4535
4545
|
}, null, 8, ["modelValue", "placeholder"])
|
|
4536
4546
|
]),
|
|
4537
|
-
t("div",
|
|
4538
|
-
t("div",
|
|
4539
|
-
v.retrievedDebtors.isLoaded ? O("", !0) : (b(), M(
|
|
4547
|
+
t("div", si, [
|
|
4548
|
+
t("div", ii, C(r(o)("report.integration.autocount.debtor")), 1),
|
|
4549
|
+
v.retrievedDebtors.isLoaded ? O("", !0) : (b(), M(H, {
|
|
4540
4550
|
key: 0,
|
|
4541
4551
|
size: "xl"
|
|
4542
4552
|
})),
|
|
4543
|
-
v.retrievedDebtors.isLoaded && v.retrievedDebtors.data && ((te = v.retrievedDebtors.data) == null ? void 0 : te.length) != 0 && !v.retrievedDebtors.isError ? (b(), P("div",
|
|
4553
|
+
v.retrievedDebtors.isLoaded && v.retrievedDebtors.data && ((te = v.retrievedDebtors.data) == null ? void 0 : te.length) != 0 && !v.retrievedDebtors.isError ? (b(), P("div", ri, [
|
|
4544
4554
|
n(B, {
|
|
4545
4555
|
modelValue: r(u),
|
|
4546
4556
|
"onUpdate:modelValue": [
|
|
4547
|
-
a[
|
|
4557
|
+
a[7] || (a[7] = (S) => $e(u) ? u.value = S : u = S),
|
|
4548
4558
|
s
|
|
4549
4559
|
],
|
|
4550
4560
|
items: v.retrievedDebtors.data,
|
|
@@ -4552,68 +4562,68 @@ const zn = [
|
|
|
4552
4562
|
class: "flex-grow",
|
|
4553
4563
|
disabled: !v.retrievedDebtors.isLoaded
|
|
4554
4564
|
}, null, 8, ["modelValue", "items", "placeholder", "disabled"])
|
|
4555
|
-
])) : v.retrievedDebtors.isError ? (b(), P("div",
|
|
4565
|
+
])) : v.retrievedDebtors.isError ? (b(), P("div", di, C(r(o)("report.integration.errorFetchingDebtor")), 1)) : O("", !0)
|
|
4556
4566
|
]),
|
|
4557
|
-
t("div",
|
|
4558
|
-
t("div",
|
|
4559
|
-
v.retrievedLocations.isLoaded ? O("", !0) : (b(), M(
|
|
4567
|
+
t("div", mi, [
|
|
4568
|
+
t("div", pi, C(r(o)("report.integration.autocount.location")), 1),
|
|
4569
|
+
v.retrievedLocations.isLoaded ? O("", !0) : (b(), M(H, {
|
|
4560
4570
|
key: 0,
|
|
4561
4571
|
size: "xl"
|
|
4562
4572
|
})),
|
|
4563
|
-
v.retrievedLocations.isLoaded && v.retrievedLocations.data && ((oe = v.retrievedLocations.data) == null ? void 0 : oe.length) != 0 && !v.retrievedLocations.isError ? (b(), P("div",
|
|
4573
|
+
v.retrievedLocations.isLoaded && v.retrievedLocations.data && ((oe = v.retrievedLocations.data) == null ? void 0 : oe.length) != 0 && !v.retrievedLocations.isError ? (b(), P("div", ci, [
|
|
4564
4574
|
n(B, {
|
|
4565
4575
|
modelValue: e.value.platform.mappings.salesLocation,
|
|
4566
|
-
"onUpdate:modelValue": a[
|
|
4576
|
+
"onUpdate:modelValue": a[8] || (a[8] = (S) => e.value.platform.mappings.salesLocation = S),
|
|
4567
4577
|
items: v.retrievedLocations.data,
|
|
4568
4578
|
placeholder: r(o)("report.integration.autocount.selectLocation"),
|
|
4569
4579
|
class: "flex-grow",
|
|
4570
4580
|
disabled: !v.retrievedLocations.isLoaded
|
|
4571
4581
|
}, null, 8, ["modelValue", "items", "placeholder", "disabled"])
|
|
4572
|
-
])) : v.retrievedLocations.isError ? (b(), P("div",
|
|
4582
|
+
])) : v.retrievedLocations.isError ? (b(), P("div", ui, C(r(o)("report.integration.errorFetchingLocation")), 1)) : O("", !0)
|
|
4573
4583
|
])
|
|
4574
4584
|
]),
|
|
4575
4585
|
n(I, { style: { margin: 0 } }),
|
|
4576
|
-
t("div",
|
|
4577
|
-
t("div",
|
|
4578
|
-
t("div",
|
|
4579
|
-
t("div",
|
|
4580
|
-
n(
|
|
4586
|
+
t("div", fi, [
|
|
4587
|
+
t("div", vi, C(r(o)("report.integration.autocount.saveAndApprove")), 1),
|
|
4588
|
+
t("div", gi, [
|
|
4589
|
+
t("div", yi, C(r(o)("report.integration.autocount.invoice")), 1),
|
|
4590
|
+
n(E, {
|
|
4581
4591
|
modelValue: e.value.platform.mappings.saveApproveInvoice,
|
|
4582
|
-
"onUpdate:modelValue": a[
|
|
4592
|
+
"onUpdate:modelValue": a[9] || (a[9] = (S) => e.value.platform.mappings.saveApproveInvoice = S),
|
|
4583
4593
|
style: { gap: "0px" }
|
|
4584
4594
|
}, null, 8, ["modelValue"])
|
|
4585
4595
|
]),
|
|
4586
|
-
t("div",
|
|
4587
|
-
t("div",
|
|
4588
|
-
n(
|
|
4596
|
+
t("div", xi, [
|
|
4597
|
+
t("div", bi, C(r(o)("report.integration.autocount.creditNote")), 1),
|
|
4598
|
+
n(E, {
|
|
4589
4599
|
modelValue: e.value.platform.mappings.saveApproveCreditNote,
|
|
4590
|
-
"onUpdate:modelValue": a[
|
|
4600
|
+
"onUpdate:modelValue": a[10] || (a[10] = (S) => e.value.platform.mappings.saveApproveCreditNote = S),
|
|
4591
4601
|
style: { gap: "0px" }
|
|
4592
4602
|
}, null, 8, ["modelValue"])
|
|
4593
4603
|
]),
|
|
4594
|
-
t("div",
|
|
4595
|
-
t("div",
|
|
4596
|
-
n(
|
|
4604
|
+
t("div", wi, [
|
|
4605
|
+
t("div", _i, C(r(o)("report.integration.autocount.payment")), 1),
|
|
4606
|
+
n(E, {
|
|
4597
4607
|
modelValue: e.value.platform.mappings.saveApprovePayment,
|
|
4598
|
-
"onUpdate:modelValue": a[
|
|
4608
|
+
"onUpdate:modelValue": a[11] || (a[11] = (S) => e.value.platform.mappings.saveApprovePayment = S),
|
|
4599
4609
|
style: { gap: "0px" }
|
|
4600
4610
|
}, null, 8, ["modelValue"])
|
|
4601
4611
|
])
|
|
4602
4612
|
]),
|
|
4603
4613
|
n(I, { style: { margin: 0 } }),
|
|
4604
|
-
t("div",
|
|
4605
|
-
t("div",
|
|
4606
|
-
t("div",
|
|
4614
|
+
t("div", hi, [
|
|
4615
|
+
t("div", ki, [
|
|
4616
|
+
t("div", Ci, C(r(o)("report.integration.refNumFormat")), 1),
|
|
4607
4617
|
n(Le)
|
|
4608
4618
|
]),
|
|
4609
|
-
t("div",
|
|
4619
|
+
t("div", $i, [
|
|
4610
4620
|
n(L, {
|
|
4611
4621
|
"model-value": {
|
|
4612
4622
|
key: "Invoice no",
|
|
4613
4623
|
account: e.value.platform.mappings.invoiceDocNo
|
|
4614
4624
|
},
|
|
4615
4625
|
options: k("Invoice no"),
|
|
4616
|
-
"onUpdate:modelValue": a[
|
|
4626
|
+
"onUpdate:modelValue": a[12] || (a[12] = (S) => w({ key: "invoiceDocNo", value: S.account }))
|
|
4617
4627
|
}, null, 8, ["model-value", "options"]),
|
|
4618
4628
|
n(L, {
|
|
4619
4629
|
"model-value": {
|
|
@@ -4621,7 +4631,7 @@ const zn = [
|
|
|
4621
4631
|
account: e.value.platform.mappings.creditNoteDocNo
|
|
4622
4632
|
},
|
|
4623
4633
|
options: k("Credit note no"),
|
|
4624
|
-
"onUpdate:modelValue": a[
|
|
4634
|
+
"onUpdate:modelValue": a[13] || (a[13] = (S) => w({ key: "creditNoteDocNo", value: S.account }))
|
|
4625
4635
|
}, null, 8, ["model-value", "options"]),
|
|
4626
4636
|
n(L, {
|
|
4627
4637
|
"model-value": {
|
|
@@ -4629,7 +4639,7 @@ const zn = [
|
|
|
4629
4639
|
account: e.value.platform.mappings.paymentDocNo
|
|
4630
4640
|
},
|
|
4631
4641
|
options: k("Payment no"),
|
|
4632
|
-
"onUpdate:modelValue": a[
|
|
4642
|
+
"onUpdate:modelValue": a[14] || (a[14] = (S) => w({ key: "paymentDocNo", value: S.account }))
|
|
4633
4643
|
}, null, 8, ["model-value", "options"]),
|
|
4634
4644
|
n(L, {
|
|
4635
4645
|
"model-value": {
|
|
@@ -4637,28 +4647,28 @@ const zn = [
|
|
|
4637
4647
|
account: e.value.platform.mappings.refundDocNo
|
|
4638
4648
|
},
|
|
4639
4649
|
options: k("Refund no"),
|
|
4640
|
-
"onUpdate:modelValue": a[
|
|
4650
|
+
"onUpdate:modelValue": a[15] || (a[15] = (S) => w({ key: "refundDocNo", value: S.account }))
|
|
4641
4651
|
}, null, 8, ["model-value", "options"])
|
|
4642
4652
|
])
|
|
4643
4653
|
]),
|
|
4644
4654
|
n(I, { style: { margin: 0 } }),
|
|
4645
4655
|
n(Re, {
|
|
4646
4656
|
modelValue: e.value.platform,
|
|
4647
|
-
"onUpdate:modelValue": a[
|
|
4657
|
+
"onUpdate:modelValue": a[16] || (a[16] = (S) => e.value.platform = S),
|
|
4648
4658
|
label: "upload",
|
|
4649
4659
|
"last-upload-date": (ae = e.value.platform) == null ? void 0 : ae.lastUploadDate
|
|
4650
4660
|
}, null, 8, ["modelValue", "last-upload-date"]),
|
|
4651
4661
|
n(I, { style: { margin: 0 } }),
|
|
4652
|
-
t("div",
|
|
4653
|
-
t("div",
|
|
4654
|
-
n(
|
|
4662
|
+
t("div", Vi, [
|
|
4663
|
+
t("div", Si, C(r(o)("report.integration.biztory.items")), 1),
|
|
4664
|
+
n(D, {
|
|
4655
4665
|
variant: "secondary",
|
|
4656
4666
|
"prepend-icon": "add",
|
|
4657
4667
|
label: "Add items",
|
|
4658
|
-
onClick: a[
|
|
4668
|
+
onClick: a[17] || (a[17] = () => f("items"))
|
|
4659
4669
|
})
|
|
4660
4670
|
]),
|
|
4661
|
-
a[
|
|
4671
|
+
a[34] || (a[34] = t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, C("`ROUNDING` items: Auto set `Product Code` to blank to support AutoCount Cloud syncing."), -1)),
|
|
4662
4672
|
n(X, {
|
|
4663
4673
|
"header-items": [
|
|
4664
4674
|
r(o)("report.integration.autocount.feedmeKey"),
|
|
@@ -4683,20 +4693,20 @@ const zn = [
|
|
|
4683
4693
|
editable: !0
|
|
4684
4694
|
}
|
|
4685
4695
|
},
|
|
4686
|
-
onRemove: a[
|
|
4687
|
-
"onUpdate:rows": a[
|
|
4696
|
+
onRemove: a[18] || (a[18] = (S, z) => p(S, z)),
|
|
4697
|
+
"onUpdate:rows": a[19] || (a[19] = (S) => {
|
|
4688
4698
|
var z, ye;
|
|
4689
4699
|
(ye = (z = e.value) == null ? void 0 : z.platform) != null && ye.mappings && (e.value.platform.mappings.items = S);
|
|
4690
4700
|
})
|
|
4691
4701
|
}, null, 8, ["header-items", "rows", "fields-options"]),
|
|
4692
4702
|
n(I, { style: { margin: 0 } }),
|
|
4693
|
-
t("div",
|
|
4694
|
-
t("div",
|
|
4695
|
-
n(
|
|
4703
|
+
t("div", Ai, [
|
|
4704
|
+
t("div", Di, C(r(o)("report.integration.biztory.taxes")), 1),
|
|
4705
|
+
n(D, {
|
|
4696
4706
|
variant: "secondary",
|
|
4697
4707
|
"prepend-icon": "add",
|
|
4698
4708
|
label: "Add taxes",
|
|
4699
|
-
onClick: a[
|
|
4709
|
+
onClick: a[20] || (a[20] = () => f("taxes"))
|
|
4700
4710
|
})
|
|
4701
4711
|
]),
|
|
4702
4712
|
n(X, {
|
|
@@ -4718,20 +4728,20 @@ const zn = [
|
|
|
4718
4728
|
editable: !0
|
|
4719
4729
|
}
|
|
4720
4730
|
},
|
|
4721
|
-
onRemove: a[
|
|
4722
|
-
"onUpdate:rows": a[
|
|
4731
|
+
onRemove: a[21] || (a[21] = (S, z) => p(S, z)),
|
|
4732
|
+
"onUpdate:rows": a[22] || (a[22] = (S) => {
|
|
4723
4733
|
var z, ye;
|
|
4724
4734
|
(ye = (z = e.value) == null ? void 0 : z.platform) != null && ye.mappings && (e.value.platform.mappings.taxes = S);
|
|
4725
4735
|
})
|
|
4726
4736
|
}, null, 8, ["header-items", "rows", "fields-options"]),
|
|
4727
4737
|
n(I, { style: { margin: 0 } }),
|
|
4728
|
-
t("div",
|
|
4729
|
-
t("div",
|
|
4730
|
-
n(
|
|
4738
|
+
t("div", Ki, [
|
|
4739
|
+
t("div", Ti, C(r(o)("report.integration.taxRoundingAdjustments")), 1),
|
|
4740
|
+
n(D, {
|
|
4731
4741
|
variant: "secondary",
|
|
4732
4742
|
"prepend-icon": "add",
|
|
4733
4743
|
label: "Add tax rounding adjustments",
|
|
4734
|
-
onClick: a[
|
|
4744
|
+
onClick: a[23] || (a[23] = () => f("taxRoundingAdjustments"))
|
|
4735
4745
|
})
|
|
4736
4746
|
]),
|
|
4737
4747
|
n(X, {
|
|
@@ -4753,30 +4763,30 @@ const zn = [
|
|
|
4753
4763
|
editable: !0
|
|
4754
4764
|
}
|
|
4755
4765
|
},
|
|
4756
|
-
onRemove: a[
|
|
4757
|
-
"onUpdate:rows": a[
|
|
4766
|
+
onRemove: a[24] || (a[24] = (S, z) => p(S, z)),
|
|
4767
|
+
"onUpdate:rows": a[25] || (a[25] = (S) => {
|
|
4758
4768
|
var z, ye;
|
|
4759
4769
|
(ye = (z = e.value) == null ? void 0 : z.platform) != null && ye.mappings && (e.value.platform.mappings.taxRoundingAdjustments = S);
|
|
4760
4770
|
})
|
|
4761
4771
|
}, null, 8, ["header-items", "rows", "fields-options"]),
|
|
4762
4772
|
n(I, { style: { margin: 0 } }),
|
|
4763
|
-
t("div",
|
|
4764
|
-
t("div",
|
|
4765
|
-
n(
|
|
4773
|
+
t("div", Fi, [
|
|
4774
|
+
t("div", Ni, C(r(o)("report.integration.biztory.payments")), 1),
|
|
4775
|
+
n(D, {
|
|
4766
4776
|
variant: "secondary",
|
|
4767
4777
|
"prepend-icon": "add",
|
|
4768
4778
|
label: "Add payments",
|
|
4769
|
-
onClick: a[
|
|
4779
|
+
onClick: a[26] || (a[26] = () => f("payments"))
|
|
4770
4780
|
})
|
|
4771
4781
|
]),
|
|
4772
|
-
t("div",
|
|
4782
|
+
t("div", Ui, [
|
|
4773
4783
|
n(L, {
|
|
4774
4784
|
"model-value": {
|
|
4775
4785
|
key: "Credit Term",
|
|
4776
4786
|
account: e.value.platform.mappings.creditTerm
|
|
4777
4787
|
},
|
|
4778
4788
|
options: k("creditTerm"),
|
|
4779
|
-
"onUpdate:modelValue": a[
|
|
4789
|
+
"onUpdate:modelValue": a[27] || (a[27] = (S) => w({ key: "creditTerm", value: S.account }))
|
|
4780
4790
|
}, null, 8, ["model-value", "options"]),
|
|
4781
4791
|
n(L, {
|
|
4782
4792
|
"model-value": {
|
|
@@ -4784,7 +4794,7 @@ const zn = [
|
|
|
4784
4794
|
account: e.value.platform.mappings.currencyCode
|
|
4785
4795
|
},
|
|
4786
4796
|
options: k("currencyCode"),
|
|
4787
|
-
"onUpdate:modelValue": a[
|
|
4797
|
+
"onUpdate:modelValue": a[28] || (a[28] = (S) => w({ key: "currencyCode", value: S.account }))
|
|
4788
4798
|
}, null, 8, ["model-value", "options"]),
|
|
4789
4799
|
n(L, {
|
|
4790
4800
|
"model-value": {
|
|
@@ -4792,7 +4802,7 @@ const zn = [
|
|
|
4792
4802
|
account: e.value.platform.mappings.journalType
|
|
4793
4803
|
},
|
|
4794
4804
|
options: k("journalType"),
|
|
4795
|
-
"onUpdate:modelValue": a[
|
|
4805
|
+
"onUpdate:modelValue": a[29] || (a[29] = (S) => w({ key: "journalType", value: S.account }))
|
|
4796
4806
|
}, null, 8, ["model-value", "options"]),
|
|
4797
4807
|
n(L, {
|
|
4798
4808
|
"model-value": {
|
|
@@ -4800,7 +4810,7 @@ const zn = [
|
|
|
4800
4810
|
account: e.value.platform.mappings.currencyRate
|
|
4801
4811
|
},
|
|
4802
4812
|
options: k("currencyRate"),
|
|
4803
|
-
"onUpdate:modelValue": a[
|
|
4813
|
+
"onUpdate:modelValue": a[30] || (a[30] = (S) => w({ key: "currencyRate", value: S.account }))
|
|
4804
4814
|
}, null, 8, ["model-value", "options"])
|
|
4805
4815
|
]),
|
|
4806
4816
|
n(X, {
|
|
@@ -4827,8 +4837,8 @@ const zn = [
|
|
|
4827
4837
|
editable: !0
|
|
4828
4838
|
}
|
|
4829
4839
|
},
|
|
4830
|
-
onRemove: a[
|
|
4831
|
-
"onUpdate:rows": a[
|
|
4840
|
+
onRemove: a[31] || (a[31] = (S, z) => p(S, z)),
|
|
4841
|
+
"onUpdate:rows": a[32] || (a[32] = (S) => {
|
|
4832
4842
|
var z, ye;
|
|
4833
4843
|
(ye = (z = e.value) == null ? void 0 : z.platform) != null && ye.mappings && (e.value.platform.mappings.payments = S);
|
|
4834
4844
|
})
|
|
@@ -4840,9 +4850,9 @@ const zn = [
|
|
|
4840
4850
|
};
|
|
4841
4851
|
}
|
|
4842
4852
|
});
|
|
4843
|
-
function
|
|
4853
|
+
function Pi(v) {
|
|
4844
4854
|
return v.reduce((o, e) => {
|
|
4845
|
-
var U, x, _, u, N,
|
|
4855
|
+
var U, x, _, u, N, T, p, f, m, g, w, k, s, l;
|
|
4846
4856
|
const { invoice: i, payments: y } = e, V = o.length;
|
|
4847
4857
|
o[V] = {
|
|
4848
4858
|
docNo: i.master.docNo,
|
|
@@ -4850,48 +4860,50 @@ function Ui(v) {
|
|
|
4850
4860
|
debtorName: i.master.debtorName,
|
|
4851
4861
|
itemProductCode: (U = i.details[0]) == null ? void 0 : U.productCode,
|
|
4852
4862
|
description: (x = i.details[0]) == null ? void 0 : x.description,
|
|
4853
|
-
|
|
4863
|
+
qty: (_ = i.details[0]) == null ? void 0 : _.qty,
|
|
4864
|
+
unitPrice: (u = i.details[0]) == null ? void 0 : u.unitPrice,
|
|
4854
4865
|
roundAdj: i.master.roundAdj,
|
|
4855
|
-
discount: (
|
|
4856
|
-
taxCode: (
|
|
4866
|
+
discount: (N = i.details[0]) == null ? void 0 : N.discount,
|
|
4867
|
+
taxCode: (T = i.details[0]) == null ? void 0 : T.taxCode,
|
|
4857
4868
|
creditTerm: i.master.creditTerm,
|
|
4858
|
-
docType: (
|
|
4859
|
-
paymentMethod: (
|
|
4860
|
-
amount: ((
|
|
4861
|
-
currencyCode: (
|
|
4862
|
-
journalType: (
|
|
4869
|
+
docType: (p = y[0]) == null ? void 0 : p.master.docType,
|
|
4870
|
+
paymentMethod: (m = (f = y[0]) == null ? void 0 : f.paymentDetails[0]) == null ? void 0 : m.paymentMethod,
|
|
4871
|
+
amount: ((g = y[0]) == null ? void 0 : g.details[0].amount) || 0,
|
|
4872
|
+
currencyCode: (w = y[0]) == null ? void 0 : w.master.currencyCode,
|
|
4873
|
+
journalType: (k = y[0]) == null ? void 0 : k.master.journalType
|
|
4863
4874
|
};
|
|
4864
4875
|
const $ = Math.max(i.details.length, (y == null ? void 0 : y.length) || 0);
|
|
4865
|
-
for (let
|
|
4866
|
-
const
|
|
4867
|
-
o[
|
|
4868
|
-
const
|
|
4869
|
-
|
|
4870
|
-
...o[
|
|
4876
|
+
for (let a = 1; a < $; a++) {
|
|
4877
|
+
const d = V + a;
|
|
4878
|
+
o[d] || (o[d] = {});
|
|
4879
|
+
const D = i.details[a], I = y[a];
|
|
4880
|
+
D && (o[d] = {
|
|
4881
|
+
...o[d],
|
|
4871
4882
|
debtorCode: i.master.debtorCode,
|
|
4872
4883
|
debtorName: i.master.debtorName,
|
|
4873
4884
|
creditTerm: i.master.creditTerm,
|
|
4874
|
-
itemProductCode:
|
|
4875
|
-
description:
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4885
|
+
itemProductCode: D.productCode,
|
|
4886
|
+
description: D.description,
|
|
4887
|
+
qty: D.qty,
|
|
4888
|
+
unitPrice: D.unitPrice,
|
|
4889
|
+
discount: D.discount,
|
|
4890
|
+
taxCode: D.taxCode
|
|
4891
|
+
}), I && (o[d] = {
|
|
4892
|
+
...o[d],
|
|
4881
4893
|
debtorCode: i.master.debtorCode,
|
|
4882
4894
|
debtorName: i.master.debtorName,
|
|
4883
4895
|
creditTerm: i.master.creditTerm,
|
|
4884
|
-
docType:
|
|
4885
|
-
paymentMethod: (
|
|
4886
|
-
amount: ((
|
|
4887
|
-
currencyCode:
|
|
4888
|
-
journalType:
|
|
4896
|
+
docType: I.master.docType,
|
|
4897
|
+
paymentMethod: (s = I.paymentDetails[0]) == null ? void 0 : s.paymentMethod,
|
|
4898
|
+
amount: ((l = I.details[0]) == null ? void 0 : l.amount) || 0,
|
|
4899
|
+
currencyCode: I.master.currencyCode,
|
|
4900
|
+
journalType: I.master.journalType
|
|
4889
4901
|
});
|
|
4890
4902
|
}
|
|
4891
4903
|
return o;
|
|
4892
4904
|
}, []);
|
|
4893
4905
|
}
|
|
4894
|
-
const
|
|
4906
|
+
const Ri = [
|
|
4895
4907
|
{
|
|
4896
4908
|
accessorKey: "docNo",
|
|
4897
4909
|
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Doc No"),
|
|
@@ -4927,6 +4939,11 @@ const Ii = [
|
|
|
4927
4939
|
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Tax Code"),
|
|
4928
4940
|
enableSorting: !1
|
|
4929
4941
|
},
|
|
4942
|
+
{
|
|
4943
|
+
accessorKey: "qty",
|
|
4944
|
+
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Qty"),
|
|
4945
|
+
enableSorting: !1
|
|
4946
|
+
},
|
|
4930
4947
|
{
|
|
4931
4948
|
accessorKey: "unitPrice",
|
|
4932
4949
|
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Price"),
|
|
@@ -4962,10 +4979,10 @@ const Ii = [
|
|
|
4962
4979
|
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "Journal Type"),
|
|
4963
4980
|
enableSorting: !1
|
|
4964
4981
|
}
|
|
4965
|
-
],
|
|
4982
|
+
], Mi = { class: "h-full flex flex-col gap-16" }, ji = { class: "flex flex-row gap-2 justify-between items-center" }, Oi = { class: "flex flex-row gap-5" }, Li = {
|
|
4966
4983
|
key: 0,
|
|
4967
4984
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-y-auto"
|
|
4968
|
-
},
|
|
4985
|
+
}, Ei = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bi = /* @__PURE__ */ Q({
|
|
4969
4986
|
__name: "Preview",
|
|
4970
4987
|
props: {
|
|
4971
4988
|
modelValue: { required: !0 },
|
|
@@ -4973,7 +4990,7 @@ const Ii = [
|
|
|
4973
4990
|
},
|
|
4974
4991
|
emits: ["update:modelValue"],
|
|
4975
4992
|
setup(v) {
|
|
4976
|
-
const { t: o } = J(), e = W(v, "modelValue"), i =
|
|
4993
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = q(!1), y = ve(), { dateRange: V } = Ie(fe()), { options: $, isFeatureAvailable: U } = ke(), x = q([]);
|
|
4977
4994
|
_e(
|
|
4978
4995
|
() => V.value,
|
|
4979
4996
|
async () => {
|
|
@@ -4990,14 +5007,14 @@ const Ii = [
|
|
|
4990
5007
|
immediate: !0
|
|
4991
5008
|
}
|
|
4992
5009
|
);
|
|
4993
|
-
const _ =
|
|
5010
|
+
const _ = Y(() => Pi(x.value)), u = Y(() => Ri), N = Y(() => {
|
|
4994
5011
|
var m;
|
|
4995
5012
|
const f = (m = $.find(
|
|
4996
5013
|
(g) => g.platform === ge.AutoCountCloud
|
|
4997
5014
|
)) == null ? void 0 : m.flags;
|
|
4998
5015
|
return f ? U(f) : !1;
|
|
4999
5016
|
});
|
|
5000
|
-
async function
|
|
5017
|
+
async function T() {
|
|
5001
5018
|
try {
|
|
5002
5019
|
e.value._id && e.value.platform.apiKey ? (i.value = !0, await Ee(e.value._id), y.open({ message: o("report.integration.uploadSuccess"), type: "success" })) : y.open({ message: o("report.integration.invalidSetting"), type: "error" });
|
|
5003
5020
|
} catch (f) {
|
|
@@ -5016,21 +5033,21 @@ const Ii = [
|
|
|
5016
5033
|
}
|
|
5017
5034
|
}
|
|
5018
5035
|
return (f, m) => {
|
|
5019
|
-
const g =
|
|
5020
|
-
return b(), P("div",
|
|
5021
|
-
t("div",
|
|
5036
|
+
const g = K("FmButton"), w = K("FmCircularProgress"), k = K("FmTable");
|
|
5037
|
+
return b(), P("div", Mi, [
|
|
5038
|
+
t("div", ji, [
|
|
5022
5039
|
n(Pe, {
|
|
5023
5040
|
"date-range": r(V),
|
|
5024
5041
|
"onUpdate:dateRange": m[0] || (m[0] = (s) => $e(V) ? V.value = s : null),
|
|
5025
5042
|
compare: !1
|
|
5026
5043
|
}, null, 8, ["date-range"]),
|
|
5027
|
-
t("div",
|
|
5044
|
+
t("div", Oi, [
|
|
5028
5045
|
N.value ? (b(), M(g, {
|
|
5029
5046
|
key: 0,
|
|
5030
5047
|
loading: i.value,
|
|
5031
5048
|
variant: "primary",
|
|
5032
5049
|
label: r(o)("report.common.upload"),
|
|
5033
|
-
onClick:
|
|
5050
|
+
onClick: T
|
|
5034
5051
|
}, null, 8, ["loading", "label"])) : O("", !0),
|
|
5035
5052
|
n(g, {
|
|
5036
5053
|
loading: i.value,
|
|
@@ -5040,9 +5057,9 @@ const Ii = [
|
|
|
5040
5057
|
}, null, 8, ["loading", "label"])
|
|
5041
5058
|
])
|
|
5042
5059
|
]),
|
|
5043
|
-
i.value ? (b(), P("div",
|
|
5060
|
+
i.value ? (b(), P("div", Li, [
|
|
5044
5061
|
n(w, { size: "xl" }),
|
|
5045
|
-
t("span",
|
|
5062
|
+
t("span", Ei, C(r(o)("report.common.isLoading")), 1)
|
|
5046
5063
|
])) : (b(), M(k, {
|
|
5047
5064
|
key: 1,
|
|
5048
5065
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg h-auto",
|
|
@@ -5052,7 +5069,7 @@ const Ii = [
|
|
|
5052
5069
|
]);
|
|
5053
5070
|
};
|
|
5054
5071
|
}
|
|
5055
|
-
}),
|
|
5072
|
+
}), qi = { class: "h-full relative flex flex-col" }, Yi = { class: "py-16 px-16 overflow-hidden flex-grow relative" }, zi = /* @__PURE__ */ Q({
|
|
5056
5073
|
__name: "AutocountCloud",
|
|
5057
5074
|
props: {
|
|
5058
5075
|
modelValue: { required: !0 },
|
|
@@ -5060,7 +5077,7 @@ const Ii = [
|
|
|
5060
5077
|
},
|
|
5061
5078
|
emits: ["update:modelValue"],
|
|
5062
5079
|
setup(v) {
|
|
5063
|
-
const { t: o } = J(), e = W(v, "modelValue"), i =
|
|
5080
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = q("setting"), y = [
|
|
5064
5081
|
{
|
|
5065
5082
|
label: o("report.integration.setting"),
|
|
5066
5083
|
value: "setting",
|
|
@@ -5071,15 +5088,15 @@ const Ii = [
|
|
|
5071
5088
|
value: "preview",
|
|
5072
5089
|
icon: "table"
|
|
5073
5090
|
}
|
|
5074
|
-
], V = ue(), $ =
|
|
5091
|
+
], V = ue(), $ = Y(() => {
|
|
5075
5092
|
switch (i.value) {
|
|
5076
5093
|
case "preview":
|
|
5077
5094
|
return {
|
|
5078
|
-
component:
|
|
5095
|
+
component: Bi
|
|
5079
5096
|
};
|
|
5080
5097
|
case "setting":
|
|
5081
5098
|
return {
|
|
5082
|
-
component:
|
|
5099
|
+
component: Ii,
|
|
5083
5100
|
props: {
|
|
5084
5101
|
retrievedLocations: U.value,
|
|
5085
5102
|
retrievedDebtors: x.value
|
|
@@ -5088,7 +5105,7 @@ const Ii = [
|
|
|
5088
5105
|
default:
|
|
5089
5106
|
return null;
|
|
5090
5107
|
}
|
|
5091
|
-
}), U =
|
|
5108
|
+
}), U = q({}), x = q({}), _ = (p) => p.data.map((f) => ({
|
|
5092
5109
|
label: f.location + " - " + f.description,
|
|
5093
5110
|
value: f.location
|
|
5094
5111
|
})), u = (p) => p.data.map((f) => ({
|
|
@@ -5105,7 +5122,7 @@ const Ii = [
|
|
|
5105
5122
|
} finally {
|
|
5106
5123
|
m.value.isLoaded = !0;
|
|
5107
5124
|
}
|
|
5108
|
-
},
|
|
5125
|
+
}, T = async () => {
|
|
5109
5126
|
await N(
|
|
5110
5127
|
dt,
|
|
5111
5128
|
u,
|
|
@@ -5118,12 +5135,12 @@ const Ii = [
|
|
|
5118
5135
|
"Failed to fetch locations:"
|
|
5119
5136
|
), U.value.isLoaded = !0, x.value.isLoaded = !0;
|
|
5120
5137
|
};
|
|
5121
|
-
return
|
|
5122
|
-
e.value.platform.apiKey && e.value.platform.accountBookId && e.value.platform.keyId ?
|
|
5138
|
+
return qe(() => {
|
|
5139
|
+
e.value.platform.apiKey && e.value.platform.accountBookId && e.value.platform.keyId ? T() : (U.value.isLoaded = !0, x.value.isLoaded = !0, U.value.isError = !0, x.value.isError = !0);
|
|
5123
5140
|
}), (p, f) => {
|
|
5124
5141
|
var w, k, s;
|
|
5125
|
-
const m =
|
|
5126
|
-
return b(), P("div",
|
|
5142
|
+
const m = K("FmPageHead"), g = K("FmTabs");
|
|
5143
|
+
return b(), P("div", qi, [
|
|
5127
5144
|
n(m, {
|
|
5128
5145
|
title: ((w = e.value) == null ? void 0 : w.name) || "Autocount Cloud",
|
|
5129
5146
|
"back-button": !0,
|
|
@@ -5140,7 +5157,7 @@ const Ii = [
|
|
|
5140
5157
|
"onUpdate:modelValue": f[0] || (f[0] = (l) => i.value = l),
|
|
5141
5158
|
items: y
|
|
5142
5159
|
}, null, 8, ["model-value"]),
|
|
5143
|
-
t("div",
|
|
5160
|
+
t("div", Yi, [
|
|
5144
5161
|
(b(), M(Ve((k = $.value) == null ? void 0 : k.component), Be({
|
|
5145
5162
|
modelValue: e.value,
|
|
5146
5163
|
"onUpdate:modelValue": f[1] || (f[1] = (l) => e.value = l)
|
|
@@ -5149,10 +5166,10 @@ const Ii = [
|
|
|
5149
5166
|
]);
|
|
5150
5167
|
};
|
|
5151
5168
|
}
|
|
5152
|
-
}),
|
|
5169
|
+
}), Hi = {
|
|
5153
5170
|
key: 0,
|
|
5154
5171
|
class: "flex flex-col h-full w-full"
|
|
5155
|
-
},
|
|
5172
|
+
}, Gi = { class: "flex flex-col gap-16 pb-[24px]" }, Qi = { class: "flex flex-row justify-between items-center gap-2" }, Xi = { class: "flex flex-row gap-2 items-center" }, Wi = { class: "relative group cursor-pointer" }, Ji = { class: "absolute left-1/2 -translate-x-2/3 top-full mt-2 w-max bg-gray-900 text-white text-sm px-2 py-1 rounded opacity-0 group-hover:opacity-100 transition-opacity" }, Zi = { class: "flex flex-col gap-24 pt-[24px] overflow-scroll" }, er = { class: "w-[90%] flex flex-col gap-24" }, tr = { class: "flex flex-col gap-16" }, or = { class: "fm-typo-en-title-sm-800" }, ar = { class: "flex flex-col max-w-[100%]" }, lr = { class: "w-[25%] font-semibold" }, nr = { class: "flex-grow" }, sr = { class: "flex flex-col max-w-[100%]" }, ir = { class: "w-[25%] font-semibold" }, rr = { class: "flex flex-col max-w-[100%]" }, dr = { class: "w-[25%] font-semibold" }, mr = { class: "flex flex-col gap-16" }, pr = { class: "grid-cols-2 grid gap-16" }, cr = { class: "flex flex-row items-center justify-between gap-x-16" }, ur = { class: "flex flex-row items-center justify-between gap-x-16" }, fr = { class: "fm-typo-en-title-sm-800" }, vr = { class: "flex flex-row items-center justify-between gap-x-16" }, gr = { class: "flex flex-row items-center justify-between gap-x-16" }, yr = /* @__PURE__ */ Q({
|
|
5156
5173
|
__name: "Setting",
|
|
5157
5174
|
props: {
|
|
5158
5175
|
modelValue: { required: !0 },
|
|
@@ -5160,7 +5177,7 @@ const Ii = [
|
|
|
5160
5177
|
},
|
|
5161
5178
|
emits: ["update:modelValue"],
|
|
5162
5179
|
setup(v) {
|
|
5163
|
-
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ =
|
|
5180
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = ve(), y = ke(), V = ue(), { promptLoader: $ } = De(), { promptMessage: U } = Ue(), { restaurants: x } = fe(), _ = Y(
|
|
5164
5181
|
() => x.map((g) => ({ label: g.name, value: g.id }))
|
|
5165
5182
|
);
|
|
5166
5183
|
async function u() {
|
|
@@ -5184,12 +5201,12 @@ const Ii = [
|
|
|
5184
5201
|
}
|
|
5185
5202
|
});
|
|
5186
5203
|
}
|
|
5187
|
-
function
|
|
5204
|
+
function T(g, w, k) {
|
|
5188
5205
|
var l, a;
|
|
5189
5206
|
if (!((l = e.value.platform) != null && l.mappings)) return;
|
|
5190
5207
|
k || (g === "taxes" ? k = "invoice" : g === "suppliers" ? k = "inventory" : k = "invoice");
|
|
5191
5208
|
const s = (a = e.value.platform.mappings[k]) == null ? void 0 : a[g];
|
|
5192
|
-
s && Array.isArray(s) && (e.value.platform.mappings[k][g] = s.filter((d,
|
|
5209
|
+
s && Array.isArray(s) && (e.value.platform.mappings[k][g] = s.filter((d, D) => D !== w));
|
|
5193
5210
|
}
|
|
5194
5211
|
function p(g, w) {
|
|
5195
5212
|
var k;
|
|
@@ -5219,20 +5236,20 @@ const Ii = [
|
|
|
5219
5236
|
return Ae(async () => {
|
|
5220
5237
|
await y.getSettings();
|
|
5221
5238
|
}), (g, w) => {
|
|
5222
|
-
var
|
|
5223
|
-
const k =
|
|
5224
|
-
return (I = (
|
|
5225
|
-
t("div",
|
|
5226
|
-
t("div",
|
|
5239
|
+
var D, I, j, B, E, H, G, ee, te, oe, ae, le, ne, se, ie, re, de, me, pe;
|
|
5240
|
+
const k = K("FmIcon"), s = K("FmButton"), l = K("FmMenuDivider"), a = K("FmTextField"), d = K("FmSelect");
|
|
5241
|
+
return (I = (D = e.value) == null ? void 0 : D.platform) != null && I.mappings ? (b(), P("div", Hi, [
|
|
5242
|
+
t("div", Gi, [
|
|
5243
|
+
t("div", Qi, [
|
|
5227
5244
|
w[17] || (w[17] = t("div", { class: "fm-typo-en-title-sm-800" }, null, -1)),
|
|
5228
|
-
t("div",
|
|
5229
|
-
t("div",
|
|
5245
|
+
t("div", Xi, [
|
|
5246
|
+
t("div", Wi, [
|
|
5230
5247
|
n(k, {
|
|
5231
5248
|
name: "refresh",
|
|
5232
5249
|
class: "p-2 bg-gray-100 rounded-full",
|
|
5233
5250
|
onClick: m
|
|
5234
5251
|
}),
|
|
5235
|
-
t("span",
|
|
5252
|
+
t("span", Ji, C(r(o)("report.integration.refreshSetting")), 1)
|
|
5236
5253
|
]),
|
|
5237
5254
|
n(s, {
|
|
5238
5255
|
variant: "tertiary",
|
|
@@ -5249,21 +5266,21 @@ const Ii = [
|
|
|
5249
5266
|
])
|
|
5250
5267
|
]),
|
|
5251
5268
|
n(l, { style: { margin: 0 } }),
|
|
5252
|
-
t("div",
|
|
5253
|
-
t("div",
|
|
5254
|
-
t("div",
|
|
5255
|
-
t("div",
|
|
5256
|
-
t("div",
|
|
5257
|
-
t("div",
|
|
5258
|
-
t("div",
|
|
5269
|
+
t("div", Zi, [
|
|
5270
|
+
t("div", er, [
|
|
5271
|
+
t("div", tr, [
|
|
5272
|
+
t("div", or, C(r(o)("report.integration.general")), 1),
|
|
5273
|
+
t("div", ar, [
|
|
5274
|
+
t("div", lr, C(r(o)("report.common.name")), 1),
|
|
5275
|
+
t("div", nr, [
|
|
5259
5276
|
n(a, {
|
|
5260
5277
|
modelValue: e.value.name,
|
|
5261
5278
|
"onUpdate:modelValue": w[0] || (w[0] = (h) => e.value.name = h)
|
|
5262
5279
|
}, null, 8, ["modelValue"])
|
|
5263
5280
|
])
|
|
5264
5281
|
]),
|
|
5265
|
-
t("div",
|
|
5266
|
-
t("div",
|
|
5282
|
+
t("div", sr, [
|
|
5283
|
+
t("div", ir, C(r(o)("report.integration.location")), 1),
|
|
5267
5284
|
n(d, {
|
|
5268
5285
|
modelValue: e.value.platform.locationIds,
|
|
5269
5286
|
"onUpdate:modelValue": w[1] || (w[1] = (h) => e.value.platform.locationIds = h),
|
|
@@ -5276,8 +5293,8 @@ const Ii = [
|
|
|
5276
5293
|
]),
|
|
5277
5294
|
n(l, { style: { margin: 0 } }),
|
|
5278
5295
|
w[18] || (w[18] = t("div", { class: "fm-typo-en-title-sm-800" }, "Sales Invoice", -1)),
|
|
5279
|
-
t("div",
|
|
5280
|
-
t("div",
|
|
5296
|
+
t("div", rr, [
|
|
5297
|
+
t("div", dr, C(r(o)("report.integration.grouping.title")), 1),
|
|
5281
5298
|
n(d, {
|
|
5282
5299
|
modelValue: e.value.platform.grouping,
|
|
5283
5300
|
"onUpdate:modelValue": w[2] || (w[2] = (h) => e.value.platform.grouping = h),
|
|
@@ -5288,7 +5305,7 @@ const Ii = [
|
|
|
5288
5305
|
}, null, 8, ["modelValue"])
|
|
5289
5306
|
])
|
|
5290
5307
|
]),
|
|
5291
|
-
t("div",
|
|
5308
|
+
t("div", mr, [
|
|
5292
5309
|
n(L, {
|
|
5293
5310
|
"is-take-whole-row": !0,
|
|
5294
5311
|
"model-value": {
|
|
@@ -5306,7 +5323,7 @@ const Ii = [
|
|
|
5306
5323
|
(S = (R = (c = (F = e.value) == null ? void 0 : F.platform) == null ? void 0 : c.mappings) == null ? void 0 : R.invoice) != null && S.debtor && (e.value.platform.mappings.invoice.debtor.name = h.name, e.value.platform.mappings.invoice.debtor.code = h.code);
|
|
5307
5324
|
})
|
|
5308
5325
|
}, null, 8, ["model-value"]),
|
|
5309
|
-
t("div",
|
|
5326
|
+
t("div", pr, [
|
|
5310
5327
|
n(L, {
|
|
5311
5328
|
"model-value": {
|
|
5312
5329
|
key: "Rounding",
|
|
@@ -5336,7 +5353,7 @@ const Ii = [
|
|
|
5336
5353
|
])
|
|
5337
5354
|
]),
|
|
5338
5355
|
n(l, { style: { margin: 0 } }),
|
|
5339
|
-
t("div",
|
|
5356
|
+
t("div", cr, [
|
|
5340
5357
|
w[19] || (w[19] = t("div", { class: "fm-typo-en-title-sm-800" }, "Sales Invoice Items", -1)),
|
|
5341
5358
|
n(s, {
|
|
5342
5359
|
variant: "secondary",
|
|
@@ -5365,7 +5382,7 @@ const Ii = [
|
|
|
5365
5382
|
});
|
|
5366
5383
|
return;
|
|
5367
5384
|
}
|
|
5368
|
-
|
|
5385
|
+
T("items", F);
|
|
5369
5386
|
}),
|
|
5370
5387
|
"onUpdate:rows": w[7] || (w[7] = (h) => {
|
|
5371
5388
|
var F, c;
|
|
@@ -5373,8 +5390,8 @@ const Ii = [
|
|
|
5373
5390
|
})
|
|
5374
5391
|
}, null, 8, ["rows"]),
|
|
5375
5392
|
n(l, { style: { margin: 0 } }),
|
|
5376
|
-
t("div",
|
|
5377
|
-
t("div",
|
|
5393
|
+
t("div", ur, [
|
|
5394
|
+
t("div", fr, C(r(o)("report.integration.taxes")), 1),
|
|
5378
5395
|
n(s, {
|
|
5379
5396
|
variant: "secondary",
|
|
5380
5397
|
"prepend-icon": "add",
|
|
@@ -5393,7 +5410,7 @@ const Ii = [
|
|
|
5393
5410
|
code: { placeholder: "Account code", editable: !0 }
|
|
5394
5411
|
},
|
|
5395
5412
|
onRemove: w[9] || (w[9] = (h, F) => {
|
|
5396
|
-
|
|
5413
|
+
T("taxes", F, "invoice");
|
|
5397
5414
|
}),
|
|
5398
5415
|
"onUpdate:rows": w[10] || (w[10] = (h) => {
|
|
5399
5416
|
var F, c;
|
|
@@ -5401,7 +5418,7 @@ const Ii = [
|
|
|
5401
5418
|
})
|
|
5402
5419
|
}, null, 8, ["rows"]),
|
|
5403
5420
|
n(l, { style: { margin: 0 } }),
|
|
5404
|
-
t("div",
|
|
5421
|
+
t("div", vr, [
|
|
5405
5422
|
w[20] || (w[20] = t("div", { class: "fm-typo-en-title-sm-800" }, "Inventory Items", -1)),
|
|
5406
5423
|
n(s, {
|
|
5407
5424
|
variant: "secondary",
|
|
@@ -5430,7 +5447,7 @@ const Ii = [
|
|
|
5430
5447
|
});
|
|
5431
5448
|
return;
|
|
5432
5449
|
}
|
|
5433
|
-
|
|
5450
|
+
T("items", F, "inventory");
|
|
5434
5451
|
}),
|
|
5435
5452
|
"onUpdate:rows": w[13] || (w[13] = (h) => {
|
|
5436
5453
|
var F, c;
|
|
@@ -5438,7 +5455,7 @@ const Ii = [
|
|
|
5438
5455
|
})
|
|
5439
5456
|
}, null, 8, ["rows"]),
|
|
5440
5457
|
n(l, { style: { margin: 0 } }),
|
|
5441
|
-
t("div",
|
|
5458
|
+
t("div", gr, [
|
|
5442
5459
|
w[21] || (w[21] = t("div", { class: "fm-typo-en-title-sm-800" }, "Supplier", -1)),
|
|
5443
5460
|
n(s, {
|
|
5444
5461
|
variant: "secondary",
|
|
@@ -5459,7 +5476,7 @@ const Ii = [
|
|
|
5459
5476
|
name: { placeholder: "Name", editable: !0 }
|
|
5460
5477
|
},
|
|
5461
5478
|
onRemove: w[15] || (w[15] = (h, F) => {
|
|
5462
|
-
|
|
5479
|
+
T("suppliers", F, "inventory");
|
|
5463
5480
|
}),
|
|
5464
5481
|
"onUpdate:rows": w[16] || (w[16] = (h) => {
|
|
5465
5482
|
var F, c;
|
|
@@ -5471,13 +5488,13 @@ const Ii = [
|
|
|
5471
5488
|
])) : O("", !0);
|
|
5472
5489
|
};
|
|
5473
5490
|
}
|
|
5474
|
-
}),
|
|
5491
|
+
}), xr = { class: "h-full w-full flex flex-col" }, br = { class: "flex flex-row gap-2 justify-between items-center" }, wr = {
|
|
5475
5492
|
key: 0,
|
|
5476
5493
|
class: "flex gap-24 w-full h-full justify-center items-center overflow-scroll"
|
|
5477
|
-
},
|
|
5494
|
+
}, _r = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, hr = {
|
|
5478
5495
|
key: 1,
|
|
5479
5496
|
class: "w-full h-full flex flex-col flex-grow"
|
|
5480
|
-
},
|
|
5497
|
+
}, kr = /* @__PURE__ */ Q({
|
|
5481
5498
|
__name: "Preview",
|
|
5482
5499
|
props: {
|
|
5483
5500
|
modelValue: { required: !0 },
|
|
@@ -5485,13 +5502,13 @@ const Ii = [
|
|
|
5485
5502
|
},
|
|
5486
5503
|
emits: ["update:modelValue"],
|
|
5487
5504
|
setup(v) {
|
|
5488
|
-
const { t: o } = J(), e =
|
|
5505
|
+
const { t: o } = J(), e = q({
|
|
5489
5506
|
invoices: [],
|
|
5490
5507
|
rawInvoices: [],
|
|
5491
5508
|
creditNotes: [],
|
|
5492
5509
|
deliveryOrders: [],
|
|
5493
5510
|
purchaseOrders: []
|
|
5494
|
-
}), i =
|
|
5511
|
+
}), i = Y(() => e.value.invoices.reduce((l, a) => {
|
|
5495
5512
|
for (const d of a._items)
|
|
5496
5513
|
l.push({
|
|
5497
5514
|
rDate: Me(a.rDate).format("D-MMM-YY"),
|
|
@@ -5515,7 +5532,7 @@ const Ii = [
|
|
|
5515
5532
|
accountCode: d.accountCode
|
|
5516
5533
|
});
|
|
5517
5534
|
return l;
|
|
5518
|
-
}, [])), y =
|
|
5535
|
+
}, [])), y = Y(() => e.value.rawInvoices.reduce((l, a) => {
|
|
5519
5536
|
for (const d of a._items)
|
|
5520
5537
|
l.push({
|
|
5521
5538
|
locationCode: a.locationCode,
|
|
@@ -5542,7 +5559,7 @@ const Ii = [
|
|
|
5542
5559
|
cardType: d.cardType
|
|
5543
5560
|
});
|
|
5544
5561
|
return l;
|
|
5545
|
-
}, [])), V =
|
|
5562
|
+
}, [])), V = Y(() => e.value.creditNotes.reduce((l, a) => {
|
|
5546
5563
|
for (const d of a._items)
|
|
5547
5564
|
l.push({
|
|
5548
5565
|
rDate: Me(a.rDate).format("D-MMM-YY"),
|
|
@@ -5566,7 +5583,7 @@ const Ii = [
|
|
|
5566
5583
|
accountCode: d.accountCode
|
|
5567
5584
|
});
|
|
5568
5585
|
return l;
|
|
5569
|
-
}, [])), $ =
|
|
5586
|
+
}, [])), $ = Y(() => e.value.purchaseOrders.reduce((l, a) => {
|
|
5570
5587
|
for (const d of a._skus)
|
|
5571
5588
|
l.push({
|
|
5572
5589
|
_date: Me(a._date).format("D-MMM-YY"),
|
|
@@ -5577,7 +5594,7 @@ const Ii = [
|
|
|
5577
5594
|
unitPrice: d.unitPrice
|
|
5578
5595
|
});
|
|
5579
5596
|
return l;
|
|
5580
|
-
}, [])), U =
|
|
5597
|
+
}, [])), U = Y(() => e.value.deliveryOrders.reduce((l, a) => {
|
|
5581
5598
|
for (const d of a._skus)
|
|
5582
5599
|
l.push({
|
|
5583
5600
|
poNo: a.poNo,
|
|
@@ -5741,7 +5758,7 @@ const Ii = [
|
|
|
5741
5758
|
header: () => A("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Unit Price"),
|
|
5742
5759
|
enableSorting: !1
|
|
5743
5760
|
}
|
|
5744
|
-
],
|
|
5761
|
+
], T = [
|
|
5745
5762
|
{
|
|
5746
5763
|
accessorKey: "rNo",
|
|
5747
5764
|
header: () => A("p", { class: "min-w-[90px] text-nowrap text-ellipsis" }, "No"),
|
|
@@ -5832,7 +5849,7 @@ const Ii = [
|
|
|
5832
5849
|
header: () => A("p", { class: "min-w-[100px] text-nowrap text-ellipsis" }, "Account Code"),
|
|
5833
5850
|
enableSorting: !1
|
|
5834
5851
|
}
|
|
5835
|
-
], p = W(v, "modelValue"), f =
|
|
5852
|
+
], p = W(v, "modelValue"), f = q(!1), m = ve(), { dateRange: g } = Ie(fe());
|
|
5836
5853
|
_e(
|
|
5837
5854
|
() => g.value,
|
|
5838
5855
|
async () => {
|
|
@@ -5884,11 +5901,11 @@ const Ii = [
|
|
|
5884
5901
|
value: "RAW_INVOICE"
|
|
5885
5902
|
/* RAW_INVOICE */
|
|
5886
5903
|
}
|
|
5887
|
-
], s =
|
|
5904
|
+
], s = q(k[0].value);
|
|
5888
5905
|
return (l, a) => {
|
|
5889
|
-
const d =
|
|
5890
|
-
return b(), P("div",
|
|
5891
|
-
t("div",
|
|
5906
|
+
const d = K("FmButton"), D = K("FmCircularProgress"), I = K("FmTabs"), j = K("FmTable");
|
|
5907
|
+
return b(), P("div", xr, [
|
|
5908
|
+
t("div", br, [
|
|
5892
5909
|
n(Pe, {
|
|
5893
5910
|
"date-range": r(g),
|
|
5894
5911
|
"onUpdate:dateRange": a[0] || (a[0] = (B) => $e(g) ? g.value = B : null),
|
|
@@ -5901,10 +5918,10 @@ const Ii = [
|
|
|
5901
5918
|
onClick: w
|
|
5902
5919
|
}, null, 8, ["loading", "label"])
|
|
5903
5920
|
]),
|
|
5904
|
-
f.value ? (b(), P("div",
|
|
5905
|
-
n(
|
|
5906
|
-
t("span",
|
|
5907
|
-
])) : (b(), P("div",
|
|
5921
|
+
f.value ? (b(), P("div", wr, [
|
|
5922
|
+
n(D, { size: "xl" }),
|
|
5923
|
+
t("span", _r, C(r(o)("report.common.isLoading")), 1)
|
|
5924
|
+
])) : (b(), P("div", hr, [
|
|
5908
5925
|
n(I, {
|
|
5909
5926
|
"model-value": s.value,
|
|
5910
5927
|
"onUpdate:modelValue": a[1] || (a[1] = (B) => s.value = B),
|
|
@@ -5925,7 +5942,7 @@ const Ii = [
|
|
|
5925
5942
|
key: 2,
|
|
5926
5943
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
|
|
5927
5944
|
"row-data": U.value,
|
|
5928
|
-
"column-defs":
|
|
5945
|
+
"column-defs": T
|
|
5929
5946
|
}, null, 8, ["row-data"])) : s.value === "PURCHASE_ORDER" ? (b(), M(j, {
|
|
5930
5947
|
key: 3,
|
|
5931
5948
|
class: "flex overflow-y-auto p-5 border border-fm-color-border-secondary rounded-lg",
|
|
@@ -5942,7 +5959,7 @@ const Ii = [
|
|
|
5942
5959
|
]);
|
|
5943
5960
|
};
|
|
5944
5961
|
}
|
|
5945
|
-
}),
|
|
5962
|
+
}), Cr = { class: "h-full w-full flex flex-col" }, $r = { class: "py-16 px-16 flex h-full w-full overflow-hidden" }, Vr = /* @__PURE__ */ Q({
|
|
5946
5963
|
__name: "SynergyExport",
|
|
5947
5964
|
props: {
|
|
5948
5965
|
modelValue: {},
|
|
@@ -5950,7 +5967,7 @@ const Ii = [
|
|
|
5950
5967
|
},
|
|
5951
5968
|
emits: ["update:modelValue"],
|
|
5952
5969
|
setup(v) {
|
|
5953
|
-
const { t: o } = J(), e = W(v, "modelValue"), i =
|
|
5970
|
+
const { t: o } = J(), e = W(v, "modelValue"), i = q("setting"), y = [
|
|
5954
5971
|
{
|
|
5955
5972
|
label: o("report.integration.setting"),
|
|
5956
5973
|
value: "setting",
|
|
@@ -5961,20 +5978,20 @@ const Ii = [
|
|
|
5961
5978
|
value: "preview",
|
|
5962
5979
|
icon: "table"
|
|
5963
5980
|
}
|
|
5964
|
-
], V = ue(), $ =
|
|
5981
|
+
], V = ue(), $ = Y(() => {
|
|
5965
5982
|
switch (i.value) {
|
|
5966
5983
|
case "preview":
|
|
5967
|
-
return
|
|
5984
|
+
return kr;
|
|
5968
5985
|
case "setting":
|
|
5969
|
-
return
|
|
5986
|
+
return yr;
|
|
5970
5987
|
default:
|
|
5971
5988
|
return null;
|
|
5972
5989
|
}
|
|
5973
5990
|
});
|
|
5974
5991
|
return (U, x) => {
|
|
5975
5992
|
var N;
|
|
5976
|
-
const _ =
|
|
5977
|
-
return b(), P("div",
|
|
5993
|
+
const _ = K("FmPageHead"), u = K("FmTabs");
|
|
5994
|
+
return b(), P("div", Cr, [
|
|
5978
5995
|
n(_, {
|
|
5979
5996
|
title: ((N = e.value) == null ? void 0 : N.name) || "Synergy",
|
|
5980
5997
|
"back-button": !0,
|
|
@@ -5988,23 +6005,23 @@ const Ii = [
|
|
|
5988
6005
|
}, 8, ["title", "onClick:back"]),
|
|
5989
6006
|
n(u, {
|
|
5990
6007
|
"model-value": i.value,
|
|
5991
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
6008
|
+
"onUpdate:modelValue": x[0] || (x[0] = (T) => i.value = T),
|
|
5992
6009
|
items: y
|
|
5993
6010
|
}, null, 8, ["model-value"]),
|
|
5994
|
-
t("div",
|
|
6011
|
+
t("div", $r, [
|
|
5995
6012
|
(b(), M(Ve($.value), {
|
|
5996
6013
|
modelValue: e.value,
|
|
5997
|
-
"onUpdate:modelValue": x[1] || (x[1] = (
|
|
6014
|
+
"onUpdate:modelValue": x[1] || (x[1] = (T) => e.value = T)
|
|
5998
6015
|
}, null, 8, ["modelValue"]))
|
|
5999
6016
|
])
|
|
6000
6017
|
]);
|
|
6001
6018
|
};
|
|
6002
6019
|
}
|
|
6003
|
-
}),
|
|
6020
|
+
}), Sr = { class: "px-24 h-full relative" }, Ir = /* @__PURE__ */ Q({
|
|
6004
6021
|
__name: "Integration",
|
|
6005
6022
|
setup(v) {
|
|
6006
|
-
const o =
|
|
6007
|
-
|
|
6023
|
+
const o = q(void 0), { params: e } = et(), i = ke(), y = q();
|
|
6024
|
+
qe(async () => {
|
|
6008
6025
|
i.settings.length === 0 && await i.getSettings();
|
|
6009
6026
|
}), _e(
|
|
6010
6027
|
() => i.settings,
|
|
@@ -6015,7 +6032,7 @@ const Ii = [
|
|
|
6015
6032
|
},
|
|
6016
6033
|
{ immediate: !0 }
|
|
6017
6034
|
);
|
|
6018
|
-
const V =
|
|
6035
|
+
const V = Y(() => {
|
|
6019
6036
|
switch (o.value) {
|
|
6020
6037
|
case ge.Xero:
|
|
6021
6038
|
return bo;
|
|
@@ -6030,14 +6047,14 @@ const Ii = [
|
|
|
6030
6047
|
case ge.Biztory:
|
|
6031
6048
|
return es;
|
|
6032
6049
|
case ge.AutoCountCloud:
|
|
6033
|
-
return
|
|
6050
|
+
return zi;
|
|
6034
6051
|
case ge.SynergyExport:
|
|
6035
|
-
return
|
|
6052
|
+
return Vr;
|
|
6036
6053
|
default:
|
|
6037
6054
|
return null;
|
|
6038
6055
|
}
|
|
6039
6056
|
});
|
|
6040
|
-
return ($, U) => (b(), P("div",
|
|
6057
|
+
return ($, U) => (b(), P("div", Sr, [
|
|
6041
6058
|
(b(), M(Ve(V.value), {
|
|
6042
6059
|
modelValue: y.value,
|
|
6043
6060
|
"onUpdate:modelValue": U[0] || (U[0] = (x) => y.value = x)
|
|
@@ -6046,5 +6063,5 @@ const Ii = [
|
|
|
6046
6063
|
}
|
|
6047
6064
|
});
|
|
6048
6065
|
export {
|
|
6049
|
-
|
|
6066
|
+
Ir as default
|
|
6050
6067
|
};
|