@feedmepos/mf-payment 1.5.34-dev → 1.5.34
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/{Chargeback-CQkYS7zA.js → Chargeback-BkVFinyh.js} +1 -1
- package/dist/{OnboardForm-wAD3F3VU.js → OnboardForm--wUvq0Bz.js} +1 -1
- package/dist/{OnboardForm-C8aDH-Z2.js → OnboardForm-B04cZaFV.js} +1 -1
- package/dist/{PayoutAccount-DyLs9JCT.js → PayoutAccount-E5ujCJqw.js} +1 -1
- package/dist/{PayoutAccount-Dc_zZpAf.js → PayoutAccount-jlCtwsaD.js} +1 -1
- package/dist/{Settlement-CRlYjp36.js → Settlement-DJ6ETp2U.js} +1 -1
- package/dist/Settlement-SoOQIN8y.js +490 -0
- package/dist/{SettlementTransactions-C4F8UT8k.js → SettlementTransactions-DF2ybUos.js} +2 -2
- package/dist/{SettlementTransactions-C0vRk4kI.js → SettlementTransactions-cYUYH2RJ.js} +17 -21
- package/dist/{Transaction-yG_6hsqm.js → Transaction-A-sOT2PE.js} +72 -57
- package/dist/Transaction-CbZRbUDH.js +482 -0
- package/dist/{TransactionOld-r7nV-5_S.js → TransactionOld-DttRuS3v.js} +1 -1
- package/dist/api/settlement/index.d.ts +4 -10
- package/dist/api/transaction/index.d.ts +1 -1
- package/dist/{app-DmsKi6me.js → app-qtpxMy1_.js} +132 -141
- package/dist/app.js +1 -1
- package/dist/components/SourceSelector.vue.d.ts +0 -2
- package/dist/{index-CiCmB-Rg.js → index-BRhAeH7J.js} +7 -13
- package/dist/{index-_EfmUlsc.js → index-BcmesiC4.js} +19 -21
- package/dist/package.json +1 -1
- package/dist/{payout-account-Ce3mmpiT.js → payout-account-Ca3Ayv7S.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/Settlement-BAeQCoUt.js +0 -610
- package/dist/Transaction-D9hFp-bx.js +0 -482
- package/dist/components/SettlementSelector.vue.d.ts +0 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as D, ref as k, onMounted as P, resolveComponent as d, openBlock as v, createBlock as B, withCtx as F, createVNode as c, unref as g, createElementVNode as _, createElementBlock as Y, Fragment as U, renderList as K, watch as M, isRef as R, h as S } from "vue";
|
|
2
|
-
import { t as V } from "./index-
|
|
2
|
+
import { t as V } from "./index-BRhAeH7J.js";
|
|
3
3
|
import { h as b } from "./moment-h96o7c8I.js";
|
|
4
4
|
import "./index-T2CVm7-_.js";
|
|
5
5
|
import { d as A } from "./dinero-CIVmXLL-.js";
|
|
@@ -8,7 +8,7 @@ import { p as En } from "./index-Dq4IAN2N.js";
|
|
|
8
8
|
import { useSnackbar as Vn, useFormChild as Kn, useDialog as Qn } from "@feedmepos/ui-library";
|
|
9
9
|
import { u as yn } from "./index-T2CVm7-_.js";
|
|
10
10
|
import { s as Sn } from "./vue-signature-pad.esm-IXPjf4fL.js";
|
|
11
|
-
import { P as Un } from "./payout-account-
|
|
11
|
+
import { P as Un } from "./payout-account-Ca3Ayv7S.js";
|
|
12
12
|
import { useRouter as In } from "vue-router";
|
|
13
13
|
const _n = { class: "flex" }, $n = { class: "justify-self-center font-semibold" }, nt = ["src"], tt = ["src"], C = /* @__PURE__ */ rn({
|
|
14
14
|
__name: "UploadButton",
|
|
@@ -3,7 +3,7 @@ import { o as z } from "./index-DhYZ6Ghe.js";
|
|
|
3
3
|
import { u as Z, p as oe } from "./index-T2CVm7-_.js";
|
|
4
4
|
import { useRouter as re } from "vue-router";
|
|
5
5
|
import { z as u, a as d } from "./validator-DzjyJnvv.js";
|
|
6
|
-
import { P as ie } from "./payout-account-
|
|
6
|
+
import { P as ie } from "./payout-account-Ca3Ayv7S.js";
|
|
7
7
|
import { _ } from "./DocumentViewer.vue_vue_type_script_setup_true_lang-3pmwclcO.js";
|
|
8
8
|
import { s as ue } from "./vue-signature-pad.esm-IXPjf4fL.js";
|
|
9
9
|
import { _ as ee } from "./Status.vue_vue_type_script_setup_true_lang-B41rO8q8.js";
|
|
@@ -2,7 +2,7 @@ import { defineComponent as _, resolveComponent as p, openBlock as y, createBloc
|
|
|
2
2
|
import { u as K } from "./index-Q0ELb0wB.js";
|
|
3
3
|
import { p as D } from "./index-T2CVm7-_.js";
|
|
4
4
|
import { _ as $ } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
|
|
5
|
-
import { P } from "./payout-account-
|
|
5
|
+
import { P } from "./payout-account-Ca3Ayv7S.js";
|
|
6
6
|
import { p as A } from "./index-Dq4IAN2N.js";
|
|
7
7
|
import "@feedmepos/ui-library";
|
|
8
8
|
import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-CkzD8rQP.js";
|
|
@@ -3,7 +3,7 @@ import { defineStore as rA, storeToRefs as lA } from "pinia";
|
|
|
3
3
|
import { p as J } from "./index-Dq4IAN2N.js";
|
|
4
4
|
import { p as Z, u as nA, e as cA } from "./index-T2CVm7-_.js";
|
|
5
5
|
import { useI18n as L, useCoreStore as sA } from "@feedmepos/mf-common";
|
|
6
|
-
import { c as BA, a as AA, P as k } from "./payout-account-
|
|
6
|
+
import { c as BA, a as AA, P as k } from "./payout-account-Ca3Ayv7S.js";
|
|
7
7
|
import { useDialogChild as uA, useDialog as wA } from "@feedmepos/ui-library";
|
|
8
8
|
import { z as X, a as q } from "./validator-DzjyJnvv.js";
|
|
9
9
|
import { P as tA } from "./PDFViewer-CIPPbzWD.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as M, ref as h, computed as T, resolveComponent as d, openBlock as F, createBlock as Y, h as E, watch as C, onMounted as L, unref as r, withCtx as g, createElementVNode as k, createVNode as i, isRef as R, createElementBlock as N, Fragment as O, renderList as P } from "vue";
|
|
2
2
|
import { u as A } from "./index-T2CVm7-_.js";
|
|
3
3
|
import { h as S } from "./moment-h96o7c8I.js";
|
|
4
|
-
import { s as _ } from "./index-
|
|
4
|
+
import { s as _ } from "./index-BcmesiC4.js";
|
|
5
5
|
import { useSnackbar as U } from "@feedmepos/ui-library";
|
|
6
6
|
import { d as w } from "./dinero-CIVmXLL-.js";
|
|
7
7
|
import { _ as q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
|
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import { defineComponent as C, resolveComponent as w, openBlock as V, createBlock as $, ref as x, computed as T, createElementBlock as I, Fragment as B, unref as e, withDirectives as q, vShow as z, createCommentVNode as M, createVNode as i, h as N, watch as P, createElementVNode as m, withCtx as k, toDisplayString as c, createTextVNode as h, onMounted as E, isRef as R } from "vue";
|
|
2
|
+
import { u as H } from "./index-T2CVm7-_.js";
|
|
3
|
+
import { h as S } from "./moment-h96o7c8I.js";
|
|
4
|
+
import { useCoreStore as O, useI18n as K } from "@feedmepos/mf-common";
|
|
5
|
+
import { _ as L } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
+
import { s as A } from "./index-BcmesiC4.js";
|
|
7
|
+
import { useDialog as J } from "@feedmepos/ui-library";
|
|
8
|
+
import { d as f } from "./dinero-CIVmXLL-.js";
|
|
9
|
+
import { _ as j } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
|
|
10
|
+
import { useRouter as Q } from "vue-router";
|
|
11
|
+
import { u as W } from "./index-Q0ELb0wB.js";
|
|
12
|
+
import { _ as G } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
13
|
+
import { _ as X } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DG3iyjkK.js";
|
|
14
|
+
import { _ as Z } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
|
|
15
|
+
const ee = /* @__PURE__ */ C({
|
|
16
|
+
__name: "InvoiceStatus",
|
|
17
|
+
props: {
|
|
18
|
+
data: {}
|
|
19
|
+
},
|
|
20
|
+
setup(p) {
|
|
21
|
+
const t = p;
|
|
22
|
+
function u() {
|
|
23
|
+
return t.data && t.data !== "" ? "#66BB6A" : "#EF5350";
|
|
24
|
+
}
|
|
25
|
+
function l() {
|
|
26
|
+
return t.data && t.data !== "" ? "check" : "close";
|
|
27
|
+
}
|
|
28
|
+
return (s, g) => {
|
|
29
|
+
const _ = w("FmIcon");
|
|
30
|
+
return V(), $(_, {
|
|
31
|
+
name: l(),
|
|
32
|
+
color: u(),
|
|
33
|
+
size: "lg"
|
|
34
|
+
}, null, 8, ["name", "color"]);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}), te = /* @__PURE__ */ C({
|
|
38
|
+
__name: "SettlementTable",
|
|
39
|
+
props: {
|
|
40
|
+
data: {
|
|
41
|
+
type: Array,
|
|
42
|
+
required: !0
|
|
43
|
+
},
|
|
44
|
+
loading: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
required: !0
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
emits: ["row-click"],
|
|
50
|
+
setup(p, { emit: t }) {
|
|
51
|
+
const { currentCountry: u, namespace: l } = O(), { t: s } = K(), g = x(!0), _ = p, F = t, r = x(""), a = [
|
|
52
|
+
{
|
|
53
|
+
header: () => s("payment.settlements.table.id"),
|
|
54
|
+
accessorKey: "id",
|
|
55
|
+
cell: ({ cell: o }) => N(j, { data: o.getValue() })
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
header: () => s("payment.settlements.table.bank"),
|
|
59
|
+
accessorKey: "bank"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
header: () => s("payment.settlements.table.account"),
|
|
63
|
+
accessorKey: "accountNo"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
header: () => s("payment.settlements.table.created_at"),
|
|
67
|
+
accessorKey: "transactionAt",
|
|
68
|
+
meta: {
|
|
69
|
+
width: "180px"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
header: () => s("payment.settlements.table.sales_amount"),
|
|
74
|
+
accessorKey: "amount"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
header: () => s("payment.settlements.table.fee"),
|
|
78
|
+
accessorKey: "fee"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
header: () => s("payment.settlements.table.settlement_amount"),
|
|
82
|
+
accessorKey: "payout"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
header: () => s("payment.settlements.table.invoice_status"),
|
|
86
|
+
accessorKey: "invoiceId",
|
|
87
|
+
cell: ({ cell: o }) => N(ee, { data: o.getValue() })
|
|
88
|
+
}
|
|
89
|
+
], n = T(() => _.data.map((o) => ({
|
|
90
|
+
id: o._id,
|
|
91
|
+
bank: o.beneficiaryBank.name,
|
|
92
|
+
accountNo: o.beneficiaryBank.accountNumber,
|
|
93
|
+
transactionAt: S(o.createdAt).format("YYYY-MM-DD"),
|
|
94
|
+
amount: f(o.totalAmount).toFormat("$0.00"),
|
|
95
|
+
fee: f(o.totalFee).toFormat("$0.00"),
|
|
96
|
+
payout: f(o.totalPayout).toFormat("$0.00"),
|
|
97
|
+
invoiceId: o.invoiceId
|
|
98
|
+
}))), y = () => {
|
|
99
|
+
let o = "https://license.feedme.cc/invoices";
|
|
100
|
+
l.value === "dev" && (o = "https://license.feedmedev.cc/invoices"), open(o, "_blank");
|
|
101
|
+
};
|
|
102
|
+
return (o, b) => {
|
|
103
|
+
const D = w("FmSnackbar"), v = w("FmTable");
|
|
104
|
+
return V(), I(B, null, [
|
|
105
|
+
e(u) === "MY" ? q((V(), $(D, {
|
|
106
|
+
key: 0,
|
|
107
|
+
class: "mb-10",
|
|
108
|
+
title: e(s)("payment.settlements.invoice.title"),
|
|
109
|
+
description: e(s)("payment.settlements.invoice.description"),
|
|
110
|
+
action: e(s)("payment.settlements.invoice.action"),
|
|
111
|
+
variant: "info",
|
|
112
|
+
dismissable: "",
|
|
113
|
+
onOnDismiss: b[0] || (b[0] = (d) => g.value = !1),
|
|
114
|
+
onOnAction: y
|
|
115
|
+
}, null, 8, ["title", "description", "action"])), [
|
|
116
|
+
[z, g.value]
|
|
117
|
+
]) : M("", !0),
|
|
118
|
+
i(v, {
|
|
119
|
+
modelValue: r.value,
|
|
120
|
+
"onUpdate:modelValue": b[1] || (b[1] = (d) => r.value = d),
|
|
121
|
+
"row-data": n.value,
|
|
122
|
+
"shrink-at": !1,
|
|
123
|
+
"column-defs": a,
|
|
124
|
+
loading: _.loading,
|
|
125
|
+
onRowClick: b[2] || (b[2] = (d) => F("row-click", _.data.at(d.index)))
|
|
126
|
+
}, null, 8, ["modelValue", "row-data", "loading"])
|
|
127
|
+
], 64);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
}), ae = /* @__PURE__ */ C({
|
|
131
|
+
__name: "FiuuSettlementTable",
|
|
132
|
+
props: {
|
|
133
|
+
data: {
|
|
134
|
+
type: Array,
|
|
135
|
+
required: !0
|
|
136
|
+
},
|
|
137
|
+
loading: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
required: !0
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
emits: ["row-click"],
|
|
143
|
+
setup(p, { emit: t }) {
|
|
144
|
+
const { t: u } = K(), l = p, s = t, g = x(""), _ = [
|
|
145
|
+
{
|
|
146
|
+
header: () => u("payment.settlements.table.id"),
|
|
147
|
+
accessorKey: "id",
|
|
148
|
+
cell: ({ cell: r }) => N(j, { data: r.getValue() })
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
header: () => u("payment.settlements.table.bank"),
|
|
152
|
+
accessorKey: "bank"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
header: () => u("payment.settlements.table.account"),
|
|
156
|
+
accessorKey: "accountNo"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
header: () => u("payment.settlements.table.created_at"),
|
|
160
|
+
accessorKey: "transactionAt",
|
|
161
|
+
meta: {
|
|
162
|
+
width: "180px"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
header: () => u("payment.settlements.table.sales_amount"),
|
|
167
|
+
accessorKey: "amount"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
header: () => u("payment.settlements.table.fee"),
|
|
171
|
+
accessorKey: "fee"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
header: () => u("payment.settlements.table.settlement_amount"),
|
|
175
|
+
accessorKey: "payout"
|
|
176
|
+
}
|
|
177
|
+
], F = T(() => l.data.map((r) => ({
|
|
178
|
+
id: r.summary.referenceNo,
|
|
179
|
+
bank: r.summary.bank.name,
|
|
180
|
+
accountNo: r.summary.bank.accountNo,
|
|
181
|
+
transactionAt: S(r.summary.completedAt).format("YYYY-MM-DD"),
|
|
182
|
+
amount: f(r.summary.amount).toFormat("$0.00"),
|
|
183
|
+
fee: f(r.summary.commission).toFormat("$0.00"),
|
|
184
|
+
payout: f(r.summary.payout).toFormat("$0.00")
|
|
185
|
+
})));
|
|
186
|
+
return (r, a) => {
|
|
187
|
+
const n = w("FmTable");
|
|
188
|
+
return V(), $(n, {
|
|
189
|
+
modelValue: g.value,
|
|
190
|
+
"onUpdate:modelValue": a[0] || (a[0] = (y) => g.value = y),
|
|
191
|
+
"row-data": F.value,
|
|
192
|
+
"shrink-at": !1,
|
|
193
|
+
"column-defs": _,
|
|
194
|
+
loading: l.loading,
|
|
195
|
+
onRowClick: a[1] || (a[1] = (y) => s("row-click", l.data.at(y.index)))
|
|
196
|
+
}, null, 8, ["modelValue", "row-data", "loading"]);
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
}), ne = {
|
|
200
|
+
id: "fiuu-settlement-dialog",
|
|
201
|
+
class: "flex mb-6"
|
|
202
|
+
}, oe = { class: "my-6 w-[240px]" }, le = /* @__PURE__ */ C({
|
|
203
|
+
__name: "FiuuSettlementTransactions",
|
|
204
|
+
props: {
|
|
205
|
+
settlement: {
|
|
206
|
+
type: Object,
|
|
207
|
+
required: !0
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
setup(p) {
|
|
211
|
+
const { t } = K(), l = x(
|
|
212
|
+
p.settlement.record.map((a) => (Object.assign(a, {
|
|
213
|
+
__localAmount: f(a.amount).toFormat("0.00"),
|
|
214
|
+
__localComission: f(a.commission).toFormat("0.00"),
|
|
215
|
+
__localNetAMount: f(a.netAmount).toFormat("0.00")
|
|
216
|
+
}), a))
|
|
217
|
+
), s = x(l.value), g = x(""), _ = [
|
|
218
|
+
{
|
|
219
|
+
header: () => t("payment.settlements.dialog.fiuu.id"),
|
|
220
|
+
accessorKey: "referenceNo"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
header: () => t("payment.settlements.dialog.fiuu.type"),
|
|
224
|
+
accessorKey: "group"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
header: () => t("payment.settlements.dialog.fiuu.transaction_at"),
|
|
228
|
+
accessorKey: "completedAt",
|
|
229
|
+
meta: {
|
|
230
|
+
width: "180px"
|
|
231
|
+
},
|
|
232
|
+
cell: ({ cell: a }) => S(a.getValue()).format("YYYY-MM-DD HH:mm:ss")
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
header: () => t("payment.settlements.dialog.fiuu.sales_amount"),
|
|
236
|
+
accessorKey: "amount",
|
|
237
|
+
cell: ({ cell: a }) => f(a.getValue()).toFormat("$0.00")
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
header: () => t("payment.settlements.dialog.fiuu.fee"),
|
|
241
|
+
accessorKey: "commission",
|
|
242
|
+
cell: ({ cell: a }) => f(a.getValue()).toFormat("$0.00")
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
header: () => t("payment.settlements.dialog.fiuu.settlement_amount"),
|
|
246
|
+
accessorKey: "netAmount",
|
|
247
|
+
cell: ({ cell: a }) => f(a.getValue()).toFormat("$0.00")
|
|
248
|
+
}
|
|
249
|
+
], F = x("");
|
|
250
|
+
let r;
|
|
251
|
+
return P(F, async () => {
|
|
252
|
+
r && clearTimeout(r), r = setTimeout(() => {
|
|
253
|
+
var a = new RegExp(F.value, "i");
|
|
254
|
+
s.value = l.value.filter((n) => {
|
|
255
|
+
const y = JSON.stringify(n);
|
|
256
|
+
return a.test(y);
|
|
257
|
+
});
|
|
258
|
+
}, 700);
|
|
259
|
+
}), (a, n) => {
|
|
260
|
+
const y = w("FmCardHeader"), o = w("FmCardSection"), b = w("FmCard"), D = w("FmSearch"), v = w("FmTable");
|
|
261
|
+
return V(), I(B, null, [
|
|
262
|
+
m("div", ne, [
|
|
263
|
+
i(b, {
|
|
264
|
+
horizontal: "",
|
|
265
|
+
class: "flex-1 p-6",
|
|
266
|
+
variant: "elevated"
|
|
267
|
+
}, {
|
|
268
|
+
default: k(() => [
|
|
269
|
+
i(o, { class: "flex flex-col gap-16 justify-between" }, {
|
|
270
|
+
default: k(() => [
|
|
271
|
+
i(y, {
|
|
272
|
+
class: "p-0",
|
|
273
|
+
title: e(t)("payment.settlements.dialog.info.transaction.title"),
|
|
274
|
+
subtitle: ""
|
|
275
|
+
}, null, 8, ["title"]),
|
|
276
|
+
i(o, { class: "p-0" }, {
|
|
277
|
+
default: k(() => [
|
|
278
|
+
m("b", null, c(e(t)("payment.settlements.dialog.info.transaction.for")), 1),
|
|
279
|
+
h(": " + c(p.settlement.summary.group) + " ", 1),
|
|
280
|
+
n[2] || (n[2] = m("br", null, null, -1)),
|
|
281
|
+
m("b", null, c(e(t)("payment.settlements.dialog.info.transaction.reference")), 1),
|
|
282
|
+
h(": " + c(p.settlement.summary.referenceNo), 1),
|
|
283
|
+
n[3] || (n[3] = m("br", null, null, -1)),
|
|
284
|
+
m("b", null, c(e(t)("payment.settlements.dialog.info.transaction.count")), 1),
|
|
285
|
+
h(": " + c(l.value.length), 1)
|
|
286
|
+
]),
|
|
287
|
+
_: 1
|
|
288
|
+
})
|
|
289
|
+
]),
|
|
290
|
+
_: 1
|
|
291
|
+
})
|
|
292
|
+
]),
|
|
293
|
+
_: 1
|
|
294
|
+
}),
|
|
295
|
+
i(b, {
|
|
296
|
+
horizontal: "",
|
|
297
|
+
class: "flex-1 p-6 mx-6",
|
|
298
|
+
variant: "elevated"
|
|
299
|
+
}, {
|
|
300
|
+
default: k(() => [
|
|
301
|
+
i(o, { class: "flex flex-col gap-16 justify-between" }, {
|
|
302
|
+
default: k(() => [
|
|
303
|
+
i(y, {
|
|
304
|
+
class: "p-0",
|
|
305
|
+
title: e(t)("payment.settlements.dialog.info.bank.title"),
|
|
306
|
+
subtitle: ""
|
|
307
|
+
}, null, 8, ["title"]),
|
|
308
|
+
i(o, { class: "p-0" }, {
|
|
309
|
+
default: k(() => [
|
|
310
|
+
m("b", null, c(e(t)("payment.settlements.dialog.info.bank.for")), 1),
|
|
311
|
+
h(": " + c(p.settlement.summary.bank.name), 1),
|
|
312
|
+
n[4] || (n[4] = m("br", null, null, -1)),
|
|
313
|
+
m("b", null, c(e(t)("payment.settlements.dialog.info.bank.name")), 1),
|
|
314
|
+
h(": " + c(p.settlement.summary.bank.holderName), 1),
|
|
315
|
+
n[5] || (n[5] = m("br", null, null, -1)),
|
|
316
|
+
m("b", null, c(e(t)("payment.settlements.dialog.info.bank.number")), 1),
|
|
317
|
+
h(": " + c(p.settlement.summary.bank.accountNo), 1)
|
|
318
|
+
]),
|
|
319
|
+
_: 1
|
|
320
|
+
})
|
|
321
|
+
]),
|
|
322
|
+
_: 1
|
|
323
|
+
})
|
|
324
|
+
]),
|
|
325
|
+
_: 1
|
|
326
|
+
}),
|
|
327
|
+
i(b, {
|
|
328
|
+
horizontal: "",
|
|
329
|
+
class: "flex-1 p-6",
|
|
330
|
+
variant: "elevated"
|
|
331
|
+
}, {
|
|
332
|
+
default: k(() => [
|
|
333
|
+
i(o, { class: "flex flex-col gap-16 justify-between" }, {
|
|
334
|
+
default: k(() => [
|
|
335
|
+
i(y, {
|
|
336
|
+
class: "p-0",
|
|
337
|
+
title: e(t)("payment.settlements.dialog.info.payout.title"),
|
|
338
|
+
subtitle: ""
|
|
339
|
+
}, null, 8, ["title"]),
|
|
340
|
+
i(o, { class: "p-0" }, {
|
|
341
|
+
default: k(() => [
|
|
342
|
+
m("b", null, c(e(t)("payment.settlements.dialog.info.payout.amount")), 1),
|
|
343
|
+
h(": " + c(e(f)(p.settlement.summary.amount).toFormat("$0.00")), 1),
|
|
344
|
+
n[6] || (n[6] = m("br", null, null, -1)),
|
|
345
|
+
m("b", null, c(e(t)("payment.settlements.dialog.info.payout.fee")), 1),
|
|
346
|
+
h(": " + c(e(f)(p.settlement.summary.commission).toFormat("$0.00")), 1),
|
|
347
|
+
n[7] || (n[7] = m("br", null, null, -1)),
|
|
348
|
+
m("b", null, c(e(t)("payment.settlements.dialog.info.payout.payout")), 1),
|
|
349
|
+
h(": " + c(e(f)(p.settlement.summary.payout).toFormat("$0.00")), 1)
|
|
350
|
+
]),
|
|
351
|
+
_: 1
|
|
352
|
+
})
|
|
353
|
+
]),
|
|
354
|
+
_: 1
|
|
355
|
+
})
|
|
356
|
+
]),
|
|
357
|
+
_: 1
|
|
358
|
+
})
|
|
359
|
+
]),
|
|
360
|
+
m("div", oe, [
|
|
361
|
+
i(D, {
|
|
362
|
+
modelValue: F.value,
|
|
363
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => F.value = d),
|
|
364
|
+
placeholder: e(t)("payment.settlements.dialog.search")
|
|
365
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
366
|
+
]),
|
|
367
|
+
i(v, {
|
|
368
|
+
modelValue: g.value,
|
|
369
|
+
"onUpdate:modelValue": n[1] || (n[1] = (d) => g.value = d),
|
|
370
|
+
"shrink-at": !1,
|
|
371
|
+
"row-data": s.value,
|
|
372
|
+
"column-defs": _
|
|
373
|
+
}, null, 8, ["modelValue", "row-data"])
|
|
374
|
+
], 64);
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
}), se = { class: "flex justify-between items-center mb-6" }, me = { class: "flex space-x-8 items-center" }, re = { class: "flex space-x-4 self-center" }, ie = { class: "mb-6" }, xe = /* @__PURE__ */ C({
|
|
378
|
+
__name: "Settlement",
|
|
379
|
+
setup(p) {
|
|
380
|
+
const t = Q(), { tab: u, dateRange: l } = W({
|
|
381
|
+
tab: "feedme",
|
|
382
|
+
dateRange: {
|
|
383
|
+
startDate: S().startOf("day").format("YYYY-MM-DD"),
|
|
384
|
+
endDate: S().endOf("day").format("YYYY-MM-DD")
|
|
385
|
+
}
|
|
386
|
+
}), { t: s } = K(), { isLoading: g, startAsyncCall: _ } = H(!0), { currentRestaurant: F } = O(), r = J(), a = x([]), n = x([]);
|
|
387
|
+
async function y() {
|
|
388
|
+
const v = await A.readRestaurantSettlements({
|
|
389
|
+
start: l.value.startDate,
|
|
390
|
+
end: l.value.endDate
|
|
391
|
+
});
|
|
392
|
+
a.value = v;
|
|
393
|
+
}
|
|
394
|
+
async function o() {
|
|
395
|
+
const v = await A.readRestaurantRMSSettlements({
|
|
396
|
+
start: l.value.startDate,
|
|
397
|
+
end: l.value.endDate
|
|
398
|
+
});
|
|
399
|
+
n.value = v;
|
|
400
|
+
}
|
|
401
|
+
async function b() {
|
|
402
|
+
await _(async () => Promise.all([y(), o()]));
|
|
403
|
+
}
|
|
404
|
+
async function D(v) {
|
|
405
|
+
const d = S(v.summary.completedAt).format("YYYY/MM/DD");
|
|
406
|
+
r.open({
|
|
407
|
+
title: `${s("payment.settlements.dialog.title")} (${v.summary.referenceNo})`,
|
|
408
|
+
subTitle: `${s("payment.settlements.dialog.date")}: ${d}`,
|
|
409
|
+
minWidth: "90%",
|
|
410
|
+
primaryActions: { text: "Close", close: !0 },
|
|
411
|
+
contentComponent: le,
|
|
412
|
+
contentComponentProps: { settlement: v }
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
return E(b), P([F, l], b), (v, d) => {
|
|
416
|
+
const U = w("FmTabs");
|
|
417
|
+
return V(), $(L, {
|
|
418
|
+
title: e(s)("payment.settlements.title"),
|
|
419
|
+
description: e(s)("payment.settlements.description"),
|
|
420
|
+
loading: !1
|
|
421
|
+
}, {
|
|
422
|
+
default: k(() => [
|
|
423
|
+
m("div", se, [
|
|
424
|
+
m("div", me, [
|
|
425
|
+
i(X),
|
|
426
|
+
i(Z, {
|
|
427
|
+
modelValue: e(l),
|
|
428
|
+
"onUpdate:modelValue": d[0] || (d[0] = (Y) => R(l) ? l.value = Y : null)
|
|
429
|
+
}, null, 8, ["modelValue"])
|
|
430
|
+
]),
|
|
431
|
+
m("div", re, [
|
|
432
|
+
i(G, {
|
|
433
|
+
button: {
|
|
434
|
+
appendIcon: "file_download",
|
|
435
|
+
variant: "primary",
|
|
436
|
+
label: "Export"
|
|
437
|
+
},
|
|
438
|
+
handler: async () => {
|
|
439
|
+
await e(A).downloadRestaurantSettlementReport({
|
|
440
|
+
start: e(l).startDate,
|
|
441
|
+
end: e(l).endDate
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
}, null, 8, ["handler"])
|
|
445
|
+
])
|
|
446
|
+
]),
|
|
447
|
+
m("div", ie, [
|
|
448
|
+
i(U, {
|
|
449
|
+
modelValue: e(u),
|
|
450
|
+
"onUpdate:modelValue": d[1] || (d[1] = (Y) => R(u) ? u.value = Y : null),
|
|
451
|
+
items: [
|
|
452
|
+
{
|
|
453
|
+
label: "FeedMe",
|
|
454
|
+
value: "feedme",
|
|
455
|
+
icon: "summarize"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
label: "Fiuu (RMS)",
|
|
459
|
+
value: "fiuu",
|
|
460
|
+
icon: "overview"
|
|
461
|
+
}
|
|
462
|
+
]
|
|
463
|
+
}, null, 8, ["modelValue"])
|
|
464
|
+
]),
|
|
465
|
+
e(u) === "fiuu" ? (V(), $(ae, {
|
|
466
|
+
key: 0,
|
|
467
|
+
loading: e(g),
|
|
468
|
+
data: n.value,
|
|
469
|
+
onRowClick: D
|
|
470
|
+
}, null, 8, ["loading", "data"])) : M("", !0),
|
|
471
|
+
e(u) === "feedme" ? (V(), $(te, {
|
|
472
|
+
key: 1,
|
|
473
|
+
loading: e(g),
|
|
474
|
+
data: a.value,
|
|
475
|
+
onRowClick: d[2] || (d[2] = (Y) => e(t).push({
|
|
476
|
+
name: "mf-payment-settlement-transaction",
|
|
477
|
+
params: {
|
|
478
|
+
settlementId: Y._id
|
|
479
|
+
}
|
|
480
|
+
}))
|
|
481
|
+
}, null, 8, ["loading", "data"])) : M("", !0)
|
|
482
|
+
]),
|
|
483
|
+
_: 1
|
|
484
|
+
}, 8, ["title", "description"]);
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
export {
|
|
489
|
+
xe as default
|
|
490
|
+
};
|
|
@@ -3,10 +3,10 @@ import { u as H } from "./index-T2CVm7-_.js";
|
|
|
3
3
|
import { useDialog as U, useSnackbar as q } from "@feedmepos/ui-library";
|
|
4
4
|
import { d as B } from "./dinero-CIVmXLL-.js";
|
|
5
5
|
import { g as J, a as Q, _ as W, t as X } from "./assets-gWQvONT9.js";
|
|
6
|
-
import { t as L } from "./index-
|
|
6
|
+
import { t as L } from "./index-BRhAeH7J.js";
|
|
7
7
|
import { _ as Z } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
8
8
|
import { useRouter as ee } from "vue-router";
|
|
9
|
-
import { s as te } from "./index-
|
|
9
|
+
import { s as te } from "./index-BcmesiC4.js";
|
|
10
10
|
import { u as ae } from "./error-K1CakhA9.js";
|
|
11
11
|
import { w as ne } from "./Modal-DB8M9o1T.js";
|
|
12
12
|
import { h as oe } from "./moment-h96o7c8I.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as $, resolveComponent as f, openBlock as C, createBlock as K, withCtx as i, createElementVNode as n, unref as a, ref as h, onMounted as
|
|
1
|
+
import { defineComponent as $, resolveComponent as f, openBlock as C, createBlock as K, withCtx as i, createElementVNode as n, unref as a, ref as h, onMounted as D, watch as L, createVNode as o, toDisplayString as l, createTextVNode as d, h as k } from "vue";
|
|
2
2
|
import { u as G } from "./index-T2CVm7-_.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
4
|
import { d as I } from "./dinero-CIVmXLL-.js";
|
|
5
5
|
import { g as H, a as P, _ as U, t as q } from "./assets-gWQvONT9.js";
|
|
6
|
-
import { t as J } from "./index-
|
|
6
|
+
import { t as J } from "./index-BRhAeH7J.js";
|
|
7
7
|
import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
8
8
|
import { useRouter as W } from "vue-router";
|
|
9
|
-
import { s as X } from "./index-
|
|
9
|
+
import { s as X } from "./index-BcmesiC4.js";
|
|
10
10
|
import { useI18n as Z, useCoreStore as ee } from "@feedmepos/mf-common";
|
|
11
11
|
import { h as te } from "./moment-h96o7c8I.js";
|
|
12
12
|
const ae = ["src"], ne = /* @__PURE__ */ $({
|
|
@@ -69,22 +69,18 @@ const ae = ["src"], ne = /* @__PURE__ */ $({
|
|
|
69
69
|
},
|
|
70
70
|
setup(u) {
|
|
71
71
|
const { t } = Z(), b = u, { isLoading: y, startAsyncCall: E } = G(!0), { currentRestaurant: M } = ee(), O = W(), m = h(), x = h([]), w = h([]);
|
|
72
|
-
async function
|
|
72
|
+
async function R(s = !1) {
|
|
73
73
|
E(async () => {
|
|
74
|
-
s || (m.value = await X.
|
|
75
|
-
|
|
76
|
-
));
|
|
77
|
-
const e = await J.readBusinessTransactionsBySettlementId(
|
|
78
|
-
b.settlementId
|
|
79
|
-
);
|
|
74
|
+
s || (m.value = await X.readRestaurantSettlementById(b.settlementId));
|
|
75
|
+
const e = await J.readRestaurantTransactionsBySettlementId(b.settlementId);
|
|
80
76
|
x.value = q(e), w.value = x.value;
|
|
81
77
|
});
|
|
82
78
|
}
|
|
83
79
|
function N() {
|
|
84
|
-
|
|
80
|
+
R();
|
|
85
81
|
}
|
|
86
|
-
|
|
87
|
-
const S = h(""),
|
|
82
|
+
D(N), L(M, N);
|
|
83
|
+
const S = h(""), Y = [
|
|
88
84
|
{
|
|
89
85
|
header: () => t("payment.settlements.dialog.feedme.id"),
|
|
90
86
|
accessorKey: "id"
|
|
@@ -161,11 +157,11 @@ const ae = ["src"], ne = /* @__PURE__ */ $({
|
|
|
161
157
|
});
|
|
162
158
|
}, 700);
|
|
163
159
|
}), (s, e) => {
|
|
164
|
-
var V,
|
|
165
|
-
const v = f("FmCardHeader"), g = f("FmCardSection"), T = f("FmCard"),
|
|
160
|
+
var V, A;
|
|
161
|
+
const v = f("FmCardHeader"), g = f("FmCardSection"), T = f("FmCard"), j = f("FmSearch"), z = f("FmTable");
|
|
166
162
|
return C(), K(Q, {
|
|
167
163
|
title: `${a(t)("payment.settlements.dialog.title")} (${(V = m.value) == null ? void 0 : V._id})`,
|
|
168
|
-
description: `${a(t)("payment.settlements.dialog.date")}: ${a(te)((
|
|
164
|
+
description: `${a(t)("payment.settlements.dialog.date")}: ${a(te)((A = m.value) == null ? void 0 : A.createdAt).format("YYYY-MM-DD")}`,
|
|
169
165
|
loading: a(y),
|
|
170
166
|
onBack: a(O).back
|
|
171
167
|
}, {
|
|
@@ -186,13 +182,13 @@ const ae = ["src"], ne = /* @__PURE__ */ $({
|
|
|
186
182
|
}, null, 8, ["title"]),
|
|
187
183
|
o(g, { class: "p-0" }, {
|
|
188
184
|
default: i(() => {
|
|
189
|
-
var r, c, p,
|
|
185
|
+
var r, c, p, B;
|
|
190
186
|
return [
|
|
191
187
|
n("b", null, l(a(t)("payment.settlements.dialog.info.transaction.for")), 1),
|
|
192
188
|
d(": " + l((c = (r = m.value) == null ? void 0 : r.store) == null ? void 0 : c.event) + " ", 1),
|
|
193
189
|
e[2] || (e[2] = n("br", null, null, -1)),
|
|
194
190
|
n("b", null, l(a(t)("payment.settlements.dialog.info.transaction.reference")), 1),
|
|
195
|
-
d(": " + l((
|
|
191
|
+
d(": " + l((B = (p = m.value) == null ? void 0 : p.store) == null ? void 0 : B.id), 1),
|
|
196
192
|
e[3] || (e[3] = n("br", null, null, -1)),
|
|
197
193
|
n("b", null, l(a(t)("payment.settlements.dialog.info.transaction.count")), 1),
|
|
198
194
|
d(": " + l(x.value.length), 1)
|
|
@@ -278,19 +274,19 @@ const ae = ["src"], ne = /* @__PURE__ */ $({
|
|
|
278
274
|
})
|
|
279
275
|
]),
|
|
280
276
|
n("div", re, [
|
|
281
|
-
o(
|
|
277
|
+
o(j, {
|
|
282
278
|
modelValue: _.value,
|
|
283
279
|
"onUpdate:modelValue": e[0] || (e[0] = (r) => _.value = r),
|
|
284
280
|
placeholder: a(t)("payment.settlements.dialog.search")
|
|
285
281
|
}, null, 8, ["modelValue", "placeholder"])
|
|
286
282
|
]),
|
|
287
|
-
o(
|
|
283
|
+
o(z, {
|
|
288
284
|
modelValue: S.value,
|
|
289
285
|
"onUpdate:modelValue": e[1] || (e[1] = (r) => S.value = r),
|
|
290
286
|
"shrink-at": !1,
|
|
291
287
|
"search-value": _.value,
|
|
292
288
|
"row-data": w.value,
|
|
293
|
-
"column-defs":
|
|
289
|
+
"column-defs": Y,
|
|
294
290
|
loading: a(y)
|
|
295
291
|
}, null, 8, ["modelValue", "search-value", "row-data", "loading"])
|
|
296
292
|
]),
|