@wisemen/wise-invoicing-web 1.0.0 → 1.2.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/AccountingSettingsViewDataProvider-BtDPqr_P.js +981 -0
- package/dist/{ApprovalReminderSettingsViewDataProvider-DyrHExKn.js → ApprovalReminderSettingsViewDataProvider-CuFo2JF5.js} +287 -287
- package/dist/{BillingDocumentDetailViewDataProvider-kFzqhrxW.js → BillingDocumentDetailViewDataProvider-qKW6LiRR.js} +1629 -1604
- package/dist/{BillingDocumentPdf-Dp6HSypy.js → BillingDocumentPdf-CgnrE4eq.js} +5 -5
- package/dist/{DataProvider-BtnD-BzI.js → DataProvider-Dj5ckiN2.js} +6 -9
- package/dist/{DunningCaseSendDialog-1S6OD9wd.js → DunningCaseSendDialog-CQ1yvbUt.js} +36 -36
- package/dist/{InvoiceApprovalOutOfSyncIndicator-DaM5hQVT.js → InvoiceApprovalOutOfSyncIndicator-BeqzoD3H.js} +2 -2
- package/dist/{InvoiceApprovalOverviewView-DM_LiO19.js → InvoiceApprovalOverviewView-B0ulYsYy.js} +230 -230
- package/dist/{InvoiceApprovalStatusBadge-mbYHYU3x.js → InvoiceApprovalStatusBadge-BZuyVHKk.js} +4 -4
- package/dist/{InvoicePdfView-YbDJpTIA.js → InvoicePdfView-BBTa7EaO.js} +2 -2
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-BgAhcvB6.js → InvoicePublicProFormaPdfViewDataProvider-_Tbt2pTv.js} +4 -4
- package/dist/{InvoiceRejectDialogDataProvider-yegAlkDB.js → InvoiceRejectDialogDataProvider-ma2UsSzC.js} +33 -33
- package/dist/{InvoiceStatusBadge-Bo5PDjEy.js → InvoiceStatusBadge-JIR1gUDL.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-DVh22OUB.js → InvoicingFileUploadProvider-B-eq6i9v.js} +14 -14
- package/dist/{IssuerSettingsViewDataProvider-BgSFemZr.js → IssuerSettingsViewDataProvider-CHyCCy9K.js} +66 -66
- package/dist/{PeppolSettingsViewDataProvider-_Bx0xx9e.js → PeppolSettingsViewDataProvider-j1btvXOf.js} +4 -4
- package/dist/{api.util-lGbimoKL.js → api.util-BkwbrwEm.js} +1026 -800
- package/dist/billingDocumentDetail.transformer-B-GSRQc0.js +324 -0
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +10 -1
- package/dist/client/types.gen.d.ts +452 -1
- package/dist/client/zod.gen.d.ts +524 -0
- package/dist/composables/invoicingConfig.composable.d.ts +3 -0
- package/dist/{creditNoteDetail.query-CqJeWeRV.js → creditNoteDetail.query-Tg4s5B8Q.js} +34 -34
- package/dist/{customFieldDefinitionIndex.query-Co7hoMow.js → customFieldDefinitionIndex.query-DtMibcTn.js} +28 -28
- package/dist/{deliveryReason.util-ny1rA7Sm.js → deliveryReason.util-BuCD1Fuz.js} +6 -6
- package/dist/{dist-CrNFh-CR.js → dist-AbMUaDf-.js} +93 -93
- package/dist/{dist-DmVrfBOT.js → dist-DaJ08k0k.js} +231 -119
- package/dist/{documentTitle.composable-aTEYXgaZ.js → documentTitle.composable-Bxu0YL71.js} +27 -19
- package/dist/{i18n.lib-B1H9r0km.js → i18n.lib-C8TA6PCf.js} +162 -2
- package/dist/index.d.ts +160 -0
- package/dist/index.js +1576 -1554
- package/dist/instant.transformer-KmBsH3E9.js +18 -0
- package/dist/{invoice.service-D9ubyWPb.js → invoice.service-BtgRZKrv.js} +152 -151
- package/dist/{invoiceApproval.service-BtDIOHIo.js → invoiceApproval.service-DEvaL-MH.js} +22 -21
- package/dist/invoiceApprovalStatus.util-NpxAuQ0t.js +83 -0
- package/dist/{invoiceCustomer.service-D0AtVrLg.js → invoiceCustomer.service-Cowdna7o.js} +6 -6
- package/dist/{invoiceDetail.query-BNL6MkvC.js → invoiceDetail.query-nEhWRrdL.js} +1 -1
- package/dist/{invoicingConfig.composable-DEF0lzNP.js → invoicingConfig.composable-CW47czLa.js} +20 -19
- package/dist/{issuerSettings.query-Cu-I6OAg.js → issuerSettings.query-CIWw1Zku.js} +27 -27
- package/dist/libs/i18n.lib.d.ts +160 -0
- package/dist/locales/en-US.json.d.ts +81 -1
- package/dist/locales/nl-BE.json.d.ts +81 -1
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +7 -1
- package/dist/modules/accounting/api/mutations/accountingConnectionDisconnect.mutation.d.ts +4 -0
- package/dist/modules/accounting/api/mutations/accountingPostingProfileUpdate.mutation.d.ts +15 -0
- package/dist/modules/accounting/api/mutations/exactAccountingConnect.mutation.d.ts +6 -0
- package/dist/modules/accounting/api/queries/accountingConnection.query.d.ts +1 -0
- package/dist/modules/accounting/api/queries/exactAuthorizationConfig.query.d.ts +1 -0
- package/dist/modules/accounting/api/queries/exactGlAccounts.query.d.ts +3 -0
- package/dist/modules/accounting/api/queries/exactJournals.query.d.ts +3 -0
- package/dist/modules/accounting/api/query-keys/accounting.queryKeys.d.ts +24 -0
- package/dist/modules/accounting/api/services/accountingConnection.service.d.ts +19 -0
- package/dist/modules/accounting/components/AccountingPostingProfileFields.vue.d.ts +14 -0
- package/dist/modules/accounting/components/AccountingSyncStatusBadge.vue.d.ts +7 -0
- package/dist/modules/accounting/components/ExactGlAccountField.vue.d.ts +12 -0
- package/dist/modules/accounting/components/ExactLogo.vue.d.ts +3 -0
- package/dist/modules/accounting/composables/exactLookupError.composable.d.ts +19 -0
- package/dist/modules/accounting/models/accountingConnection.model.d.ts +34 -0
- package/dist/modules/accounting/models/accountingConnection.transformer.d.ts +23 -0
- package/dist/modules/accounting/models/accountingConnection.transformer.spec.d.ts +1 -0
- package/dist/modules/accounting/models/accountingConnectionReadiness.util.d.ts +10 -0
- package/dist/modules/accounting/models/accountingConnectionUuid.model.d.ts +3 -0
- package/dist/modules/accounting/models/accountingError.util.d.ts +13 -0
- package/dist/modules/accounting/models/accountingError.util.spec.d.ts +1 -0
- package/dist/modules/accounting/models/accountingPostingProfileForm.model.d.ts +14 -0
- package/dist/modules/accounting/models/accountingPostingProfileForm.model.spec.d.ts +1 -0
- package/dist/modules/accounting/models/accountingPostingProfileUpdateForm.model.d.ts +17 -0
- package/dist/modules/accounting/models/exactAccountingConnectForm.model.d.ts +9 -0
- package/dist/modules/accounting/models/exactAccountingConnectForm.model.spec.d.ts +1 -0
- package/dist/modules/accounting/models/exactLookupOption.model.d.ts +5 -0
- package/dist/modules/accounting/models/exactLookupOption.util.d.ts +4 -0
- package/dist/modules/accounting/models/exactRegion.util.d.ts +5 -0
- package/dist/modules/accounting/models/exactRegion.util.spec.d.ts +1 -0
- package/dist/modules/accounting/routes/accounting.routes.d.ts +9 -0
- package/dist/modules/accounting/use-cases/settings/components/AccountingConnectionDetails.vue.d.ts +7 -0
- package/dist/modules/accounting/use-cases/settings/components/AccountingConnectionNotice.vue.d.ts +11 -0
- package/dist/modules/accounting/use-cases/settings/components/AccountingPostingProfileForm.vue.d.ts +8 -0
- package/dist/modules/accounting/use-cases/settings/components/ExactAccountingConnectForm.vue.d.ts +12 -0
- package/dist/modules/accounting/use-cases/settings/composables/accountingAuthorizationResult.composable.d.ts +5 -0
- package/dist/modules/accounting/use-cases/settings/composables/exactConnect.composable.d.ts +11 -0
- package/dist/modules/accounting/use-cases/settings/dialogs/AccountingConnectionDisconnectDialog.vue.d.ts +11 -0
- package/dist/modules/accounting/use-cases/settings/views/AccountingSettingsView.vue.d.ts +9 -0
- package/dist/modules/accounting/use-cases/settings/views/AccountingSettingsViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
- package/dist/{plainDate.transformer-Bhiz9jW7.js → plainDate.transformer-BxvJpJOv.js} +4 -17
- package/dist/{reminderConfig.query-DHMHVOeX.js → reminderConfig.query-nb1P7ufx.js} +38 -37
- package/dist/types/queryKey.type.d.ts +3 -2
- package/dist/ui/data-provider/DataProvider.vue.d.ts +5 -1
- package/package.json +1 -1
- package/dist/billingDocumentDetail.transformer-C5-zjIhL.js +0 -319
- package/dist/invoiceApprovalStatus.util-Bqq_bILG.js +0 -83
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Temporal as e } from "temporal-polyfill";
|
|
2
|
+
//#region src/utils/instant.transformer.ts
|
|
3
|
+
var t = class {
|
|
4
|
+
static fromDto(t) {
|
|
5
|
+
return e.Instant.from(t);
|
|
6
|
+
}
|
|
7
|
+
static fromNullableDto(e) {
|
|
8
|
+
return e === null ? null : this.fromDto(e);
|
|
9
|
+
}
|
|
10
|
+
static toDto(e) {
|
|
11
|
+
return e.toString();
|
|
12
|
+
}
|
|
13
|
+
static toNullableDto(e) {
|
|
14
|
+
return e === null ? null : this.toDto(e);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { t };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { $ as e, A as t,
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { r as
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import { t as
|
|
1
|
+
import { $ as e, A as t, Ct as n, D as r, E as ee, F as te, G as ne, L as i, M as a, Mt as o, N as s, O as c, Ot as re, R as ie, St as ae, W as oe, _ as se, a as l, b as ce, ct as le, et as ue, h as de, i as fe, j as pe, k as me, kt as he, l as ge, n as _e, nt as ve, o as ye, r as be, t as u, tt as xe, u as Se, v as Ce, w as we, wt as Te, x as Ee, z as De } from "./api.util-BkwbrwEm.js";
|
|
2
|
+
import { B as d, D as Oe, O as f, S as p, l as m, o as ke, v as Ae } from "./documentTitle.composable-Bxu0YL71.js";
|
|
3
|
+
import { n as je } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
+
import { r as Me } from "./src-Vz2dm4sM.js";
|
|
5
|
+
import { t as h } from "./address.transformer-jGddczLV.js";
|
|
6
|
+
import { t as g } from "./instant.transformer-KmBsH3E9.js";
|
|
7
|
+
import { a as _, i as v, n as y, o as b, r as x, t as Ne } from "./billingDocumentDetail.transformer-B-GSRQc0.js";
|
|
8
|
+
import { t as S } from "./dist-CwkVU5yS.js";
|
|
9
|
+
import { n as C, t as w } from "./plainDate.transformer-BxvJpJOv.js";
|
|
9
10
|
import { n as T, t as Pe } from "./percentage.util-Bl78kSSk.js";
|
|
10
11
|
import E from "zod";
|
|
11
12
|
import { ref as Fe } from "vue";
|
|
@@ -39,7 +40,7 @@ var O = class e {
|
|
|
39
40
|
}
|
|
40
41
|
static toForm(e) {
|
|
41
42
|
return {
|
|
42
|
-
approvalMode: e ??
|
|
43
|
+
approvalMode: e ?? m.PRO_FORMA,
|
|
43
44
|
requiresApproval: e !== null
|
|
44
45
|
};
|
|
45
46
|
}
|
|
@@ -47,12 +48,12 @@ var O = class e {
|
|
|
47
48
|
static toDto(e) {
|
|
48
49
|
return {
|
|
49
50
|
fileUuids: e.files.map((e) => e.uuid),
|
|
50
|
-
internalNote:
|
|
51
|
+
internalNote: S.trimOrNull(e.internalNote)
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
54
|
static toForm(e, t) {
|
|
54
55
|
return {
|
|
55
|
-
files: t.map(
|
|
56
|
+
files: t.map(x.toForm),
|
|
56
57
|
internalNote: e
|
|
57
58
|
};
|
|
58
59
|
}
|
|
@@ -60,12 +61,12 @@ var O = class e {
|
|
|
60
61
|
static toDto(e) {
|
|
61
62
|
return {
|
|
62
63
|
fileUuids: e.files.map((e) => e.uuid),
|
|
63
|
-
internalNote:
|
|
64
|
+
internalNote: S.trimOrNull(e.internalNote)
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
67
|
static toForm(e, t) {
|
|
67
68
|
return {
|
|
68
|
-
files: t.map(
|
|
69
|
+
files: t.map(x.toForm),
|
|
69
70
|
internalNote: e
|
|
70
71
|
};
|
|
71
72
|
}
|
|
@@ -74,13 +75,13 @@ var O = class e {
|
|
|
74
75
|
if (e.reason === null) throw Error("A rejection reason is required");
|
|
75
76
|
return {
|
|
76
77
|
fileUuids: e.files.map((e) => e.uuid),
|
|
77
|
-
internalNote:
|
|
78
|
+
internalNote: S.trimOrNull(e.internalNote),
|
|
78
79
|
reason: e.reason
|
|
79
80
|
};
|
|
80
81
|
}
|
|
81
82
|
static toForm(e, t) {
|
|
82
83
|
return {
|
|
83
|
-
files: t.map(
|
|
84
|
+
files: t.map(x.toForm),
|
|
84
85
|
internalNote: e,
|
|
85
86
|
reason: null
|
|
86
87
|
};
|
|
@@ -94,8 +95,8 @@ var O = class e {
|
|
|
94
95
|
}, P = class {
|
|
95
96
|
static toDateRangeDto(e) {
|
|
96
97
|
if (e != null && e.from !== null && e.until !== null) return {
|
|
97
|
-
startDate:
|
|
98
|
-
endDate:
|
|
98
|
+
startDate: w.toDto(e.from),
|
|
99
|
+
endDate: w.toDto(e.until)
|
|
99
100
|
};
|
|
100
101
|
}
|
|
101
102
|
static toDto(e) {
|
|
@@ -104,11 +105,11 @@ var O = class e {
|
|
|
104
105
|
pagination: e.pagination,
|
|
105
106
|
search: N.toDto(e.search),
|
|
106
107
|
sort: Ie.toDto(e.sort, {
|
|
107
|
-
created_at:
|
|
108
|
-
issued_on:
|
|
109
|
-
customer:
|
|
110
|
-
netAmount:
|
|
111
|
-
sequence:
|
|
108
|
+
created_at: d.CREATED_AT,
|
|
109
|
+
issued_on: d.ISSUED_ON,
|
|
110
|
+
customer: d.CUSTOMER,
|
|
111
|
+
netAmount: d.NET_AMOUNT,
|
|
112
|
+
sequence: d.SEQUENCE
|
|
112
113
|
})
|
|
113
114
|
};
|
|
114
115
|
}
|
|
@@ -119,12 +120,12 @@ var O = class e {
|
|
|
119
120
|
}, F = class {
|
|
120
121
|
static toDto(e) {
|
|
121
122
|
if (e.type === "invoices") return { filter: { invoiceUuids: {
|
|
122
|
-
scope:
|
|
123
|
+
scope: p.INCLUDE,
|
|
123
124
|
values: e.invoiceUuids
|
|
124
125
|
} } };
|
|
125
126
|
let t = P.toFilterDto(e.queryParams.filters);
|
|
126
127
|
return e.excludedInvoiceUuids.length > 0 && (t.invoiceUuids = {
|
|
127
|
-
scope:
|
|
128
|
+
scope: p.EXCLUDE,
|
|
128
129
|
values: e.excludedInvoiceUuids
|
|
129
130
|
}), {
|
|
130
131
|
filter: t,
|
|
@@ -138,16 +139,16 @@ var O = class e {
|
|
|
138
139
|
}, I = class {
|
|
139
140
|
static fromDetailDto(e) {
|
|
140
141
|
return {
|
|
141
|
-
reminderSentAt:
|
|
142
|
-
sentAt:
|
|
142
|
+
reminderSentAt: g.fromNullableDto(e.reminderSentAt),
|
|
143
|
+
sentAt: g.fromNullableDto(e.sentAt),
|
|
143
144
|
level: e.level,
|
|
144
145
|
status: e.status
|
|
145
146
|
};
|
|
146
147
|
}
|
|
147
148
|
static fromIndexDto(e) {
|
|
148
149
|
return e === null ? null : {
|
|
149
|
-
reminderSentAt:
|
|
150
|
-
sentAt:
|
|
150
|
+
reminderSentAt: g.fromNullableDto(e.reminderSentAt),
|
|
151
|
+
sentAt: g.fromNullableDto(e.sentAt),
|
|
151
152
|
level: e.level,
|
|
152
153
|
status: e.status
|
|
153
154
|
};
|
|
@@ -165,9 +166,9 @@ var O = class e {
|
|
|
165
166
|
static fromDto(t) {
|
|
166
167
|
let n = e.findActiveApproval(t), r = t.approval.find((e) => e.rejectionReason !== null) ?? null;
|
|
167
168
|
return {
|
|
168
|
-
...Ne.fromViewInvoiceDetailDto(t, t.uuid,
|
|
169
|
+
...Ne.fromViewInvoiceDetailDto(t, t.uuid, f.STANDARD),
|
|
169
170
|
approvalUuid: n === null ? null : n.uuid,
|
|
170
|
-
approvalAnsweredAt:
|
|
171
|
+
approvalAnsweredAt: g.fromNullableDto(n?.answeredAt ?? null),
|
|
171
172
|
hasApprovalHistory: t.approval.length > 0,
|
|
172
173
|
hasChangesSinceApprovalSent: t.hasChangesSinceApprovalSent,
|
|
173
174
|
isEditable: t.isEditable,
|
|
@@ -175,36 +176,36 @@ var O = class e {
|
|
|
175
176
|
approvalEmail: t.approvalRecipient?.email ?? null,
|
|
176
177
|
approvalInternalNote: n?.internalNote ?? null,
|
|
177
178
|
approvalMode: t.approvalMode,
|
|
178
|
-
approvalProFormaFile: n === null ? null :
|
|
179
|
+
approvalProFormaFile: n === null ? null : x.fromNullableDto(n.proFormaFile),
|
|
179
180
|
rejection: r === null ? null : I.rejectionFromDetailDto(r),
|
|
180
|
-
requiresPriorApproval: t.approvalMode ===
|
|
181
|
+
requiresPriorApproval: t.approvalMode === m.PRO_FORMA
|
|
181
182
|
};
|
|
182
183
|
}
|
|
183
184
|
}, ze = class {
|
|
184
185
|
static fromDto(e) {
|
|
185
186
|
return {
|
|
186
187
|
uuid: e.uuid,
|
|
187
|
-
createdAt:
|
|
188
|
-
dueOn:
|
|
189
|
-
issuedOn:
|
|
188
|
+
createdAt: g.fromDto(e.createdAt),
|
|
189
|
+
dueOn: w.fromNullableDto(e.dueOn),
|
|
190
|
+
issuedOn: w.fromNullableDto(e.issuedOn),
|
|
190
191
|
hasChangesSinceApprovalSent: e.hasChangesSinceApprovalSent,
|
|
191
192
|
isDisputed: e.isDisputed,
|
|
192
193
|
isOverdue: e.isOverdue,
|
|
193
194
|
approval: I.fromIndexDto(e.approval),
|
|
194
|
-
balanceDueAmount:
|
|
195
|
+
balanceDueAmount: C.fromNullableDto(e.balanceDueAmount),
|
|
195
196
|
customerName: e.customer.name,
|
|
196
|
-
customFields: e.customFields.map(
|
|
197
|
+
customFields: e.customFields.map(y.fromDto),
|
|
197
198
|
deliveryStatus: e.deliveryStatus,
|
|
198
|
-
grossAmount:
|
|
199
|
+
grossAmount: C.fromDto(e.grossAmount),
|
|
199
200
|
lifecycleStatus: e.lifecycleStatus,
|
|
200
|
-
paidAmount:
|
|
201
|
-
requiresPriorApproval: e.approvalMode ===
|
|
201
|
+
paidAmount: C.fromNullableDto(e.paidAmount),
|
|
202
|
+
requiresPriorApproval: e.approvalMode === m.PRO_FORMA,
|
|
202
203
|
sequence: e.sequence,
|
|
203
204
|
settlementStatus: e.settlementStatus,
|
|
204
205
|
status: e.status,
|
|
205
206
|
subject: e.subject,
|
|
206
|
-
total:
|
|
207
|
-
totalCreditedAmount:
|
|
207
|
+
total: C.fromDto(e.netAmount),
|
|
208
|
+
totalCreditedAmount: C.fromNullableDto(e.totalCreditedAmount),
|
|
208
209
|
type: e.type
|
|
209
210
|
};
|
|
210
211
|
}
|
|
@@ -394,7 +395,7 @@ var Ve = class {
|
|
|
394
395
|
static toDto(e) {
|
|
395
396
|
return {
|
|
396
397
|
amount: O.toDto({
|
|
397
|
-
amount:
|
|
398
|
+
amount: Me(e.amount, e.precision),
|
|
398
399
|
currency: e.currency,
|
|
399
400
|
precision: e.precision
|
|
400
401
|
}),
|
|
@@ -409,7 +410,7 @@ var Ve = class {
|
|
|
409
410
|
function We(e) {
|
|
410
411
|
return {
|
|
411
412
|
uuid: e.uuid,
|
|
412
|
-
createdAt:
|
|
413
|
+
createdAt: g.fromDto(e.createdAt),
|
|
413
414
|
sequence: e.sequence,
|
|
414
415
|
status: e.status
|
|
415
416
|
};
|
|
@@ -419,15 +420,15 @@ function q(e) {
|
|
|
419
420
|
uuid: e.uuid,
|
|
420
421
|
isDiscount: e.isDiscount,
|
|
421
422
|
name: e.name,
|
|
422
|
-
customFields: e.customFields.map(
|
|
423
|
+
customFields: e.customFields.map(y.fromDto),
|
|
423
424
|
description: e.description,
|
|
424
|
-
discount:
|
|
425
|
-
grossAmount:
|
|
426
|
-
netAmount:
|
|
425
|
+
discount: _.fromDto(e.discount),
|
|
426
|
+
grossAmount: C.fromDto(e.grossAmount),
|
|
427
|
+
netAmount: C.fromDto(e.netAmount),
|
|
427
428
|
position: e.position,
|
|
428
429
|
quantity: e.quantity,
|
|
429
430
|
unit: e.unit,
|
|
430
|
-
unitPrice:
|
|
431
|
+
unitPrice: C.fromDto(e.unitPrice),
|
|
431
432
|
vatRate: e.vatRate,
|
|
432
433
|
vatRatePercentage: T.fromDto(e.vatRatePercentage)
|
|
433
434
|
};
|
|
@@ -436,7 +437,7 @@ function J(e) {
|
|
|
436
437
|
return {
|
|
437
438
|
uuid: e.uuid,
|
|
438
439
|
name: e.name,
|
|
439
|
-
customFields: e.customFields.map(
|
|
440
|
+
customFields: e.customFields.map(y.fromDto),
|
|
440
441
|
description: e.description,
|
|
441
442
|
groups: e.groups.toSorted((e, t) => e.position - t.position).map(J),
|
|
442
443
|
lines: e.lines.toSorted((e, t) => e.position - t.position).map(q),
|
|
@@ -444,14 +445,14 @@ function J(e) {
|
|
|
444
445
|
};
|
|
445
446
|
}
|
|
446
447
|
function Ge(e) {
|
|
447
|
-
return [...e.ungroupedLines, ...
|
|
448
|
+
return [...e.ungroupedLines, ...v.flattenLines(e.groups)].toSorted((e, t) => e.position - t.position);
|
|
448
449
|
}
|
|
449
450
|
var Y = class e {
|
|
450
451
|
static fromPublicDto(t) {
|
|
451
452
|
return {
|
|
452
453
|
...e.fromPublicProFormaDto(t),
|
|
453
|
-
deliveredOn:
|
|
454
|
-
dueOn:
|
|
454
|
+
deliveredOn: w.fromNullableDto(t.deliveredOn),
|
|
455
|
+
dueOn: w.fromNullableDto(t.dueOn),
|
|
455
456
|
originalInvoice: t.originalInvoice === null ? null : We(t.originalInvoice),
|
|
456
457
|
recipient: t.recipient === null ? null : {
|
|
457
458
|
name: t.recipient.name,
|
|
@@ -464,15 +465,15 @@ var Y = class e {
|
|
|
464
465
|
}
|
|
465
466
|
static fromPublicProFormaDto(e) {
|
|
466
467
|
return {
|
|
467
|
-
createdAt:
|
|
468
|
+
createdAt: g.fromDto(e.createdAt),
|
|
468
469
|
deliveredOn: null,
|
|
469
470
|
dueOn: null,
|
|
470
|
-
issueOn:
|
|
471
|
-
updatedAt:
|
|
471
|
+
issueOn: w.fromNullableDto(e.issueOn),
|
|
472
|
+
updatedAt: g.fromDto(e.updatedAt),
|
|
472
473
|
issuer: {
|
|
473
474
|
uuid: e.issuer.uuid,
|
|
474
475
|
name: e.issuer.name,
|
|
475
|
-
address:
|
|
476
|
+
address: h.fromNullableDto(e.issuer.address),
|
|
476
477
|
alternativeBankAccountNumber: e.issuer.alternativeBankAccountNumber,
|
|
477
478
|
bankAccountNumber: e.issuer.bankAccountNumber,
|
|
478
479
|
email: e.issuer.email,
|
|
@@ -480,37 +481,37 @@ var Y = class e {
|
|
|
480
481
|
vatNumber: e.issuer.vatNumber,
|
|
481
482
|
website: e.issuer.website
|
|
482
483
|
},
|
|
483
|
-
advancePaymentAmount:
|
|
484
|
+
advancePaymentAmount: C.fromNullableDto(e.advancePaymentAmount),
|
|
484
485
|
customer: {
|
|
485
486
|
uuid: e.customer.uuid,
|
|
486
487
|
name: e.customer.name,
|
|
487
|
-
address:
|
|
488
|
+
address: h.fromNullableDto(e.customer.address),
|
|
488
489
|
email: e.customer.email,
|
|
489
490
|
phoneNumber: e.customer.phoneNumber,
|
|
490
491
|
vatNumber: e.customer.vatNumber
|
|
491
492
|
},
|
|
492
|
-
customFields: e.customFields.map(
|
|
493
|
-
effectiveNet:
|
|
493
|
+
customFields: e.customFields.map(y.fromDto),
|
|
494
|
+
effectiveNet: C.fromDto(e.effectiveNet),
|
|
494
495
|
externalRemarks: e.externalRemarks,
|
|
495
|
-
globalDiscount:
|
|
496
|
-
grossAmount:
|
|
496
|
+
globalDiscount: _.fromDto(e.globalDiscount),
|
|
497
|
+
grossAmount: C.fromDto(e.grossAmount),
|
|
497
498
|
groups: e.groups.toSorted((e, t) => e.position - t.position).map(J),
|
|
498
499
|
lines: Ge(e).map(q),
|
|
499
|
-
netAmount:
|
|
500
|
+
netAmount: C.fromDto(e.netAmount),
|
|
500
501
|
originalInvoice: null,
|
|
501
502
|
paymentReference: e.paymentReference,
|
|
502
503
|
poNumber: e.poNumber,
|
|
503
504
|
recipient: null,
|
|
504
505
|
sequence: null,
|
|
505
|
-
status:
|
|
506
|
+
status: Oe.READY,
|
|
506
507
|
subject: e.subject,
|
|
507
|
-
totalDiscountAmount:
|
|
508
|
-
type:
|
|
508
|
+
totalDiscountAmount: C.fromNullableDto(e.totalDiscountAmount),
|
|
509
|
+
type: f.STANDARD,
|
|
509
510
|
ungroupedLines: e.ungroupedLines.map(q),
|
|
510
|
-
vatAmount:
|
|
511
|
+
vatAmount: C.fromDto(e.vatAmount),
|
|
511
512
|
vatSummaries: e.vatSummaries.map((e) => ({
|
|
512
|
-
netAmount:
|
|
513
|
-
vatAmount:
|
|
513
|
+
netAmount: C.fromDto(e.netAmount),
|
|
514
|
+
vatAmount: C.fromDto(e.vatAmount),
|
|
514
515
|
vatRate: e.vatRate
|
|
515
516
|
}))
|
|
516
517
|
};
|
|
@@ -518,14 +519,14 @@ var Y = class e {
|
|
|
518
519
|
}, Ke = class {
|
|
519
520
|
static toDto(e) {
|
|
520
521
|
let t = Math.abs(e.value);
|
|
521
|
-
return e.type ===
|
|
522
|
+
return e.type === Ae.PERCENTAGE ? { discount: {
|
|
522
523
|
amount: null,
|
|
523
524
|
description: null,
|
|
524
525
|
percentage: T.toDto(new Pe(t)),
|
|
525
526
|
type: e.type
|
|
526
527
|
} } : { discount: {
|
|
527
|
-
amount:
|
|
528
|
-
amount:
|
|
528
|
+
amount: C.toDto({
|
|
529
|
+
amount: je(t, e.precision),
|
|
529
530
|
currency: e.currency,
|
|
530
531
|
precision: e.precision
|
|
531
532
|
}),
|
|
@@ -552,14 +553,14 @@ var Y = class e {
|
|
|
552
553
|
static toDto(e) {
|
|
553
554
|
return {
|
|
554
555
|
preparedByUuid: e.preparedBy.uuid,
|
|
555
|
-
deliveredOn:
|
|
556
|
-
dueOn:
|
|
557
|
-
issuedOn:
|
|
558
|
-
customFields: e.customFields.map(
|
|
559
|
-
externalRemarks:
|
|
560
|
-
poNumber:
|
|
561
|
-
reference:
|
|
562
|
-
subject:
|
|
556
|
+
deliveredOn: w.toNullableDto(e.deliveredOn),
|
|
557
|
+
dueOn: w.toDto(e.dueOn),
|
|
558
|
+
issuedOn: w.toDto(e.issuedOn),
|
|
559
|
+
customFields: e.customFields.map(y.toDto),
|
|
560
|
+
externalRemarks: S.trimOrNull(e.externalRemarks),
|
|
561
|
+
poNumber: S.trimOrNull(e.poNumber),
|
|
562
|
+
reference: S.trimOrNull(e.reference),
|
|
563
|
+
subject: S.trimOrNull(e.subject)
|
|
563
564
|
};
|
|
564
565
|
}
|
|
565
566
|
static toForm(e) {
|
|
@@ -583,13 +584,13 @@ function Q(e) {
|
|
|
583
584
|
externalId: e.externalId,
|
|
584
585
|
isDiscount: e.quantity < 0 || e.isDiscount,
|
|
585
586
|
name: e.name,
|
|
586
|
-
customFields: e.customFields.map(
|
|
587
|
+
customFields: e.customFields.map(y.toDto),
|
|
587
588
|
description: e.description,
|
|
588
|
-
discount:
|
|
589
|
+
discount: _.toDto(e.discount),
|
|
589
590
|
position: e.position,
|
|
590
591
|
quantity: e.quantity,
|
|
591
592
|
unit: e.unit,
|
|
592
|
-
unitPrice:
|
|
593
|
+
unitPrice: C.toDto(e.unitPrice),
|
|
593
594
|
vatRate: e.vatRate
|
|
594
595
|
};
|
|
595
596
|
}
|
|
@@ -597,7 +598,7 @@ function $(e) {
|
|
|
597
598
|
return {
|
|
598
599
|
externalId: e.externalId,
|
|
599
600
|
name: e.name,
|
|
600
|
-
customFields: e.customFields.map(
|
|
601
|
+
customFields: e.customFields.map(y.toDto),
|
|
601
602
|
description: e.description,
|
|
602
603
|
groups: e.groups.map($),
|
|
603
604
|
lines: e.lines.map(Q),
|
|
@@ -613,74 +614,74 @@ var qe = class {
|
|
|
613
614
|
}
|
|
614
615
|
}, Je = class {
|
|
615
616
|
static async applyDiscount(e, t) {
|
|
616
|
-
let n = await
|
|
617
|
+
let n = await u.fromPromise(_e({
|
|
617
618
|
body: Ke.toDto(t),
|
|
618
619
|
path: { uuid: e }
|
|
619
620
|
}));
|
|
620
|
-
return
|
|
621
|
+
return u.void(n);
|
|
621
622
|
}
|
|
622
623
|
static async approveApproval(e, t) {
|
|
623
|
-
let n = await
|
|
624
|
+
let n = await u.fromPromise(be({
|
|
624
625
|
body: j.toDto(t),
|
|
625
626
|
path: { uuid: e }
|
|
626
627
|
}));
|
|
627
|
-
return
|
|
628
|
+
return u.void(n);
|
|
628
629
|
}
|
|
629
630
|
static async archiveApproval(e) {
|
|
630
|
-
let t = await
|
|
631
|
-
return
|
|
631
|
+
let t = await u.fromPromise(Se({ path: { uuid: e } }));
|
|
632
|
+
return u.void(t);
|
|
632
633
|
}
|
|
633
634
|
static async bulkDelete(e) {
|
|
634
|
-
return (await
|
|
635
|
+
return (await u.fromPromise(fe({ query: F.toDto(e) }))).map((e) => e.data);
|
|
635
636
|
}
|
|
636
637
|
static async bulkFinalize(e, t) {
|
|
637
|
-
return (await
|
|
638
|
+
return (await u.fromPromise(l({
|
|
638
639
|
body: { sendOnFinalization: t },
|
|
639
640
|
query: F.toDto(e)
|
|
640
641
|
}))).map((e) => e.data);
|
|
641
642
|
}
|
|
642
643
|
static async bulkMarkAsReady(e) {
|
|
643
|
-
return (await
|
|
644
|
+
return (await u.fromPromise(ye({ query: F.toDto(e) }))).map((e) => e.data);
|
|
644
645
|
}
|
|
645
646
|
static async bulkSendApproval(e) {
|
|
646
|
-
return (await
|
|
647
|
+
return (await u.fromPromise(ge({ query: F.toDto(e) }))).map((e) => e.data);
|
|
647
648
|
}
|
|
648
649
|
static async create(e) {
|
|
649
|
-
return (await
|
|
650
|
+
return (await u.fromPromise(se({ body: Le.toDto(e) }))).map((e) => e.data.uuid);
|
|
650
651
|
}
|
|
651
652
|
static async createCreditNote(e) {
|
|
652
|
-
return (await
|
|
653
|
+
return (await u.fromPromise(de({ path: { uuid: e } }))).map((e) => e.data.uuid);
|
|
653
654
|
}
|
|
654
655
|
static async createPayment(e, t) {
|
|
655
|
-
let n = await
|
|
656
|
+
let n = await u.fromPromise(Ce({
|
|
656
657
|
body: Ue.toDto(t),
|
|
657
658
|
path: { uuid: e }
|
|
658
659
|
}));
|
|
659
|
-
return
|
|
660
|
+
return u.void(n);
|
|
660
661
|
}
|
|
661
662
|
static async delete(e) {
|
|
662
|
-
let t = await
|
|
663
|
-
return
|
|
663
|
+
let t = await u.fromPromise(ce({ path: { uuid: e } }));
|
|
664
|
+
return u.void(t);
|
|
664
665
|
}
|
|
665
666
|
static async deletePayment(e, t) {
|
|
666
|
-
let n = await
|
|
667
|
+
let n = await u.fromPromise(Ee({ path: {
|
|
667
668
|
uuid: e,
|
|
668
669
|
paymentUuid: t
|
|
669
670
|
} }));
|
|
670
|
-
return
|
|
671
|
+
return u.void(n);
|
|
671
672
|
}
|
|
672
673
|
static async duplicate(e) {
|
|
673
|
-
return (await
|
|
674
|
+
return (await u.fromPromise(we({ path: { uuid: e } }))).map((e) => e.data.uuid);
|
|
674
675
|
}
|
|
675
676
|
static async finalize(e) {
|
|
676
|
-
let t = await
|
|
677
|
+
let t = await u.fromPromise(ee({
|
|
677
678
|
body: {},
|
|
678
679
|
path: { uuid: e }
|
|
679
680
|
}));
|
|
680
|
-
return
|
|
681
|
+
return u.void(t);
|
|
681
682
|
}
|
|
682
683
|
static async getActivityLogs(e, t) {
|
|
683
|
-
return (await
|
|
684
|
+
return (await u.fromPromise(le({ query: {
|
|
684
685
|
filter: {
|
|
685
686
|
entityUuids: [e],
|
|
686
687
|
roles: [ke.INVOICE]
|
|
@@ -690,12 +691,12 @@ var qe = class {
|
|
|
690
691
|
limit: t.pagination.limit
|
|
691
692
|
}
|
|
692
693
|
} }))).map((e) => ({
|
|
693
|
-
data: e.data.logs.map(
|
|
694
|
+
data: e.data.logs.map(b.fromDto),
|
|
694
695
|
meta: { next: e.data.nextKey }
|
|
695
696
|
}));
|
|
696
697
|
}
|
|
697
698
|
static async getAll(e) {
|
|
698
|
-
return (await
|
|
699
|
+
return (await u.fromPromise(n({
|
|
699
700
|
query: P.toDto(e),
|
|
700
701
|
responseValidator: void 0
|
|
701
702
|
}))).map((e) => ({
|
|
@@ -704,102 +705,102 @@ var qe = class {
|
|
|
704
705
|
}));
|
|
705
706
|
}
|
|
706
707
|
static async getByUuid(e) {
|
|
707
|
-
return (await
|
|
708
|
+
return (await u.fromPromise(ae({ path: { uuid: e } }))).map((e) => Re.fromDto(e.data));
|
|
708
709
|
}
|
|
709
710
|
static async getPayments(e) {
|
|
710
|
-
return (await
|
|
711
|
+
return (await u.fromPromise(Te({ path: { uuid: e } }))).map((e) => e.data.items.map(He.fromDto));
|
|
711
712
|
}
|
|
712
713
|
static async getPublicDetail(e) {
|
|
713
|
-
return (await
|
|
714
|
+
return (await u.fromPromise(re({ query: { token: e } }))).map((e) => Y.fromPublicDto(e.data));
|
|
714
715
|
}
|
|
715
716
|
static async getPublicProFormaDetail(e) {
|
|
716
|
-
return (await
|
|
717
|
+
return (await u.fromPromise(he({ query: { token: e } }))).map((e) => Y.fromPublicProFormaDto(e.data));
|
|
717
718
|
}
|
|
718
719
|
static async markAsDraft(e) {
|
|
719
|
-
let t = await
|
|
720
|
-
return
|
|
720
|
+
let t = await u.fromPromise(c({ path: { uuid: e } }));
|
|
721
|
+
return u.void(t);
|
|
721
722
|
}
|
|
722
723
|
static async markAsPaid(e) {
|
|
723
|
-
let t = await
|
|
724
|
-
return
|
|
724
|
+
let t = await u.fromPromise(me({ path: { uuid: e } }));
|
|
725
|
+
return u.void(t);
|
|
725
726
|
}
|
|
726
727
|
static async markAsProtested(e) {
|
|
727
|
-
let t = await
|
|
728
|
-
return
|
|
728
|
+
let t = await u.fromPromise(r({ path: { uuid: e } }));
|
|
729
|
+
return u.void(t);
|
|
729
730
|
}
|
|
730
731
|
static async markAsReady(e) {
|
|
731
|
-
let
|
|
732
|
-
return
|
|
732
|
+
let n = await u.fromPromise(t({ path: { uuid: e } }));
|
|
733
|
+
return u.void(n);
|
|
733
734
|
}
|
|
734
735
|
static async previewBulkDelete(e) {
|
|
735
|
-
return (await
|
|
736
|
+
return (await u.fromPromise(pe({ query: F.toDto(e) }))).map((e) => e.data);
|
|
736
737
|
}
|
|
737
738
|
static async previewBulkFinalize(e) {
|
|
738
|
-
return (await
|
|
739
|
+
return (await u.fromPromise(a({ query: F.toDto(e) }))).map((e) => e.data);
|
|
739
740
|
}
|
|
740
741
|
static async previewBulkMarkAsReady(e) {
|
|
741
|
-
return (await
|
|
742
|
+
return (await u.fromPromise(s({ query: F.toDto(e) }))).map((e) => e.data);
|
|
742
743
|
}
|
|
743
744
|
static async previewBulkSendApproval(e) {
|
|
744
|
-
return (await
|
|
745
|
+
return (await u.fromPromise(te({ query: F.toDto(e) }))).map((e) => e.data);
|
|
745
746
|
}
|
|
746
747
|
static async rejectApproval(e, t) {
|
|
747
|
-
let n = await
|
|
748
|
+
let n = await u.fromPromise(i({
|
|
748
749
|
body: M.toDto(t),
|
|
749
750
|
path: { uuid: e }
|
|
750
751
|
}));
|
|
751
|
-
return
|
|
752
|
+
return u.void(n);
|
|
752
753
|
}
|
|
753
754
|
static async restartApproval(e) {
|
|
754
|
-
let t = await
|
|
755
|
-
return
|
|
755
|
+
let t = await u.fromPromise(ie({ path: { uuid: e } }));
|
|
756
|
+
return u.void(t);
|
|
756
757
|
}
|
|
757
758
|
static async restoreFromProForma(e) {
|
|
758
|
-
let t = await
|
|
759
|
-
return
|
|
759
|
+
let t = await u.fromPromise(De({ path: { uuid: e } }));
|
|
760
|
+
return u.void(t);
|
|
760
761
|
}
|
|
761
762
|
static async sendApproval(e) {
|
|
762
|
-
let t = await
|
|
763
|
-
return
|
|
763
|
+
let t = await u.fromPromise(oe({ path: { uuid: e } }));
|
|
764
|
+
return u.void(t);
|
|
764
765
|
}
|
|
765
766
|
static async setApprovalMode(e, t) {
|
|
766
|
-
let n = await
|
|
767
|
+
let n = await u.fromPromise(ne({
|
|
767
768
|
body: k.toDto(t),
|
|
768
769
|
path: { uuid: e }
|
|
769
770
|
}));
|
|
770
|
-
return
|
|
771
|
+
return u.void(n);
|
|
771
772
|
}
|
|
772
|
-
static async update(
|
|
773
|
-
let
|
|
774
|
-
body: Z.toDto(
|
|
775
|
-
path: { uuid:
|
|
773
|
+
static async update(e, t) {
|
|
774
|
+
let n = await u.fromPromise(ve({
|
|
775
|
+
body: Z.toDto(t),
|
|
776
|
+
path: { uuid: e }
|
|
776
777
|
}));
|
|
777
|
-
return
|
|
778
|
+
return u.void(n);
|
|
778
779
|
}
|
|
779
|
-
static async updateApproval(
|
|
780
|
-
let
|
|
781
|
-
body: A.toDto(
|
|
782
|
-
path: { uuid:
|
|
780
|
+
static async updateApproval(t, n) {
|
|
781
|
+
let r = await u.fromPromise(e({
|
|
782
|
+
body: A.toDto(n),
|
|
783
|
+
path: { uuid: t }
|
|
783
784
|
}));
|
|
784
|
-
return
|
|
785
|
+
return u.void(r);
|
|
785
786
|
}
|
|
786
787
|
static async updateAttachments(e, t) {
|
|
787
|
-
let n = await
|
|
788
|
+
let n = await u.fromPromise(ue({
|
|
788
789
|
body: X.toDto(t),
|
|
789
790
|
path: { uuid: e }
|
|
790
791
|
}));
|
|
791
|
-
return
|
|
792
|
+
return u.void(n);
|
|
792
793
|
}
|
|
793
794
|
static async updateLines(e, t) {
|
|
794
|
-
let n = await
|
|
795
|
+
let n = await u.fromPromise(xe({
|
|
795
796
|
body: qe.toDto(t),
|
|
796
797
|
path: { uuid: e }
|
|
797
798
|
}));
|
|
798
|
-
return
|
|
799
|
+
return u.void(n);
|
|
799
800
|
}
|
|
800
801
|
static async withdrawProtest(e) {
|
|
801
|
-
let t = await
|
|
802
|
-
return
|
|
802
|
+
let t = await u.fromPromise(o({ path: { uuid: e } }));
|
|
803
|
+
return u.void(t);
|
|
803
804
|
}
|
|
804
805
|
};
|
|
805
806
|
//#endregion
|