@wisemen/wise-invoicing-web 0.2.0 → 0.3.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/{ApprovalReminderSettingsViewDataProvider-D-qXZrPT.js → ApprovalReminderSettingsViewDataProvider-DwtfyQpx.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-DDdtlW-2.js → BillingDocumentDetailViewDataProvider-TJUwMhtn.js} +1373 -1217
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-ehdFB6mr.js → BillingDocumentPdf-PU9Ldfhs.js} +20 -13
- package/dist/{CreditNoteDetailViewDataProvider-11a-JO3H.js → CreditNoteDetailViewDataProvider-DOPmal5D.js} +89 -89
- package/dist/{CreditNotePdfViewDataProvider-bfeaya3P.js → CreditNotePdfViewDataProvider-BH7MaReQ.js} +2 -2
- package/dist/{CustomFieldValueText-CZQXGE5F.js → CustomFieldValueText-BjRVovZL.js} +25 -25
- package/dist/DunningCaseDetailViewDataProvider-CW8ijY3H.js +439 -0
- package/dist/{DunningCaseOverviewView-y_bCmi5j.js → DunningCaseOverviewView-Cfo-4VIw.js} +255 -203
- package/dist/{DunningCaseReminderPdfViewDataProvider-DNODfED_.js → DunningCaseReminderPdfViewDataProvider-Dr-CS_VQ.js} +4 -3
- package/dist/{DunningCaseSendDialog-BPXcqit5.js → DunningCaseSendDialog-BYFXJYMM.js} +83 -72
- package/dist/InvoiceApprovalOutOfSyncIndicator-CP2GLaeh.js +45 -0
- package/dist/InvoiceApprovalOverviewView-Cjdu9iZC.js +814 -0
- package/dist/InvoiceApprovalStatusBadge-CcX8agTF.js +127 -0
- package/dist/InvoiceApproveDialogDataProvider-4wNAetBn.js +377 -0
- package/dist/{InvoiceDetailViewDataProvider-BYeaaQzL.js → InvoiceDetailViewDataProvider-C9O3hXGo.js} +750 -692
- package/dist/InvoiceOverviewViewDataProvider-DBdw7FvZ.js +1892 -0
- package/dist/{InvoicePdfView-BJRTg_TH.js → InvoicePdfView-CvU9bRVd.js} +10 -4
- package/dist/{InvoicePdfViewDataProvider-CwI_uGm3.js → InvoicePdfViewDataProvider-CFjHQ58K.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-uZUfsr5K.js → InvoicePublicPdfViewDataProvider-DDv-LdBU.js} +3 -3
- package/dist/InvoicePublicProFormaPdfViewDataProvider-BTjJnELb.js +47 -0
- package/dist/{InvoicingFileUploadProvider-D9Xk4rQM.js → InvoicingFileUploadProvider-Kcq7kSSt.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-CGRa8F-2.js → IssuerSettingsViewDataProvider-BuSIVnIl.js} +3 -3
- package/dist/{ReminderSettingsViewDataProvider-1ucp3z2T.js → ReminderSettingsViewDataProvider-CH7gSXnj.js} +100 -102
- package/dist/{api.util-C_kMGlJN.js → api.util-CkIRZS3h.js} +985 -930
- package/dist/{billingDocumentDetail.transformer-Da6_-Hv9.js → billingDocumentDetail.transformer-Bfd8geNo.js} +5 -7
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +2 -1
- package/dist/client/types.gen.d.ts +114 -31
- package/dist/client/zod.gen.d.ts +343 -78
- package/dist/composables/sending-refetch/sendingRefetch.composable.d.ts +7 -0
- package/dist/composables/sending-refetch/sendingRefetch.composable.spec.d.ts +1 -0
- package/dist/{creditNoteDetail.query-DLR7L0Ep.js → creditNoteDetail.query-tLnfqsEB.js} +27 -27
- package/dist/customerUuid.model-ClN4Vi9n.js +18 -0
- package/dist/{dist-Cxdm09Lp.js → dist-BD7Allff.js} +143 -95
- package/dist/{dist-CoztMdYH.js → dist-D5agTXFI.js} +61 -61
- package/dist/{documentTitle.composable-DsBbzhXN.js → documentTitle.composable-CRJjS6p-.js} +19 -17
- package/dist/{i18n.lib-Cvr8pcDw.js → i18n.lib--mzprLMR.js} +88 -54
- package/dist/index.d.ts +56 -22
- package/dist/index.js +193 -201
- package/dist/{invoice.service-DEEA9mal.js → invoice.service-B1w16_Md.js} +184 -172
- package/dist/{invoiceApproval.service-DvL3LliM.js → invoiceApproval.service-BHAJmFkU.js} +8 -8
- package/dist/{invoiceApprovalStatus.util-3Zh10Pj8.js → invoiceApprovalStatus.util-DohOKR4q.js} +42 -38
- package/dist/invoiceCustomer.service-DpVfpQUD.js +39 -0
- package/dist/{invoiceDetail.query-CRoH_SgM.js → invoiceDetail.query-CfyNSXLS.js} +1 -1
- package/dist/{invoiceDeliveryStatus.util-nCsqDypY.js → invoiceIndexCache.util-jHsrFwcA.js} +128 -51
- package/dist/{invoicingConfig.composable-rxjGK882.js → invoicingConfig.composable-COn1rKRf.js} +2 -2
- package/dist/{issuerSettings.query-Dc5gsaEm.js → issuerSettings.query-CDFk2GiP.js} +3 -2
- package/dist/libs/i18n.lib.d.ts +56 -22
- package/dist/locales/en-US.json.d.ts +44 -27
- package/dist/locales/nl-BE.json.d.ts +44 -27
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.model.d.ts +8 -1
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.d.ts +12 -0
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +2 -6
- package/dist/modules/dunning-case/api/mutations/dunningCaseReminderRetry.mutation.d.ts +4 -0
- package/dist/modules/dunning-case/api/services/dunningCase.service.d.ts +2 -1
- package/dist/modules/dunning-case/models/dunningCase.model.d.ts +5 -0
- package/dist/modules/dunning-case/models/dunningCaseReminderPdf.model.d.ts +0 -4
- package/dist/modules/dunning-case/models/dunningCaseReminderPdf.transformer.d.ts +0 -1
- package/dist/modules/dunning-case/test/builders/dunningCaseReminderPdfDto.builder.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue.d.ts +2 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.d.ts +2 -2
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfTable.vue.d.ts +0 -4
- package/dist/modules/dunning-case/use-cases/send/dialogs/DunningCaseBulkSendDialog.vue.d.ts +2 -1
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +4 -4
- package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +2 -2
- package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.spec.d.ts +1 -0
- package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +8 -0
- package/dist/modules/invoice/api/queries/invoicePublicProFormaDetail.query.d.ts +2 -0
- package/dist/modules/invoice/api/query-keys/invoice.queryKeys.d.ts +6 -0
- package/dist/modules/invoice/api/services/invoice.service.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +4 -2
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +8 -0
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +2 -3
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +2 -9
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +4 -2
- package/dist/modules/invoice/models/invoice/payment/invoicePaymentCreate.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.transformer.d.ts +2 -1
- package/dist/modules/invoice/routes/invoice.routes.d.ts +4 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialogDataProvider.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoicePaymentDeleteDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.d.ts +2 -3
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.d.ts +11 -9
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +2 -2
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +3 -1
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +7 -4
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.spec.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/components/BillingDocumentPdf.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/components/InvoicePdfWatermark.vue.d.ts +4 -1
- package/dist/modules/invoice/use-cases/pdf/views/InvoicePdfView.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/views/InvoicePublicProFormaPdfViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +2 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +5 -6
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +0 -5
- package/dist/modules/settings/models/issuer-settings/issuerSettings.model.d.ts +1 -0
- package/dist/{reminderConfig.query-snaHQmrY.js → reminderConfig.query-DSO0ekC_.js} +112 -105
- package/dist/routes/invoicingPublicRoutes.composable.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/ui/billing-document/sidebar/BillingDocumentDetailSidebarActivityApprovalDetails.vue.d.ts +7 -0
- package/package.json +2 -2
- package/dist/DunningCaseDetailViewDataProvider-DC-ziMoO.js +0 -409
- package/dist/InvoiceApprovalOverviewView-DZ14mi4L.js +0 -870
- package/dist/InvoiceApprovalStatusBadge-U-dW2hR4.js +0 -161
- package/dist/InvoiceApproveDialog-2LXneG2r.js +0 -308
- package/dist/InvoiceOverviewBulkSendApprovalDialog-99dfuN4i.js +0 -318
- package/dist/InvoiceOverviewViewDataProvider-CZIQeftL.js +0 -1620
- package/dist/customerUuid.model-GUFYq3O2.js +0 -5
- package/dist/modules/invoice-approval/actions/invoiceApprovalUnmarkAsNeedsApproval.action.d.ts +0 -1
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r,
|
|
2
|
-
import {
|
|
1
|
+
import { A as e, C as t, D as n, E as r, H as ee, I as i, L as a, M as o, N as s, R as c, S as l, T as te, U as ne, W as re, a as ie, b as u, c as ae, ct as oe, d as se, dt as ce, g as le, h as ue, i as de, it as fe, j as pe, k as d, l as f, m as me, n as he, nt as ge, p as _e, q as ve, r as ye, rt as be, s as xe, st as Se, t as p, v as Ce, w as m, x as h } from "./api.util-CkIRZS3h.js";
|
|
2
|
+
import { b as g, f as _, h as v, k as y, r as b, x } from "./documentTitle.composable-CRJjS6p-.js";
|
|
3
3
|
import { n as S } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
4
|
import { r as C } from "./src-DUSgQTKr.js";
|
|
5
5
|
import { t as w } from "./address.transformer-jGddczLV.js";
|
|
6
6
|
import { n as T, r as E, t as D } from "./plainDate.transformer-Bhiz9jW7.js";
|
|
7
7
|
import { n as O, t as k } from "./percentage.util-Bl78kSSk.js";
|
|
8
|
-
import { a as A, i as j, n as M, r as
|
|
9
|
-
import { t as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { Temporal as I } from "temporal-polyfill";
|
|
8
|
+
import { a as A, i as j, n as M, r as we, t as Te } from "./billingDocumentDetail.transformer-Bfd8geNo.js";
|
|
9
|
+
import { t as N } from "./dist-BFx8U4Su.js";
|
|
10
|
+
import P from "zod";
|
|
11
|
+
import { ref as Ee } from "vue";
|
|
12
|
+
import { SortUtil as De } from "@wisemen/vue-core-api-utils";
|
|
13
|
+
import { Temporal as F } from "temporal-polyfill";
|
|
15
14
|
//#region ../toolkit/src/utils/monetary/monetary.util.ts
|
|
16
|
-
var
|
|
15
|
+
var I = class e {
|
|
17
16
|
static fromDto(e) {
|
|
18
17
|
return {
|
|
19
18
|
amount: e.amount,
|
|
@@ -34,33 +33,34 @@ var L = class e {
|
|
|
34
33
|
static toNullableDto(t) {
|
|
35
34
|
return t === null ? null : e.toDto(t);
|
|
36
35
|
}
|
|
37
|
-
},
|
|
36
|
+
}, Oe = class {
|
|
38
37
|
static toDto(e) {
|
|
39
38
|
let t = e.remarks?.trim() ?? "";
|
|
40
39
|
return {
|
|
41
|
-
|
|
40
|
+
fileUuids: e.proofOfApproval.map((e) => e.uuid),
|
|
42
41
|
remarks: t === "" ? null : t
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
|
-
},
|
|
44
|
+
}, ke = class {
|
|
46
45
|
static toDto(e) {
|
|
47
46
|
if (e.reason === null) throw Error("A rejection reason is required");
|
|
48
47
|
let t = e.remarks?.trim() ?? "";
|
|
49
48
|
return {
|
|
49
|
+
fileUuids: e.attachments.map((e) => e.uuid),
|
|
50
50
|
reason: e.reason,
|
|
51
51
|
remarks: t === "" ? null : t
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
},
|
|
54
|
+
}, Ae = class {
|
|
55
55
|
static toDto(e) {
|
|
56
56
|
return { customerUuid: e.customer.uuid };
|
|
57
57
|
}
|
|
58
|
-
},
|
|
58
|
+
}, L = class {
|
|
59
59
|
static fromDetailDto(e) {
|
|
60
60
|
return {
|
|
61
|
-
reminderSentAt:
|
|
61
|
+
reminderSentAt: E.fromNullableDto(e.reminderSentAt),
|
|
62
62
|
sentAt: E.fromNullableDto(e.sentAt),
|
|
63
|
-
level:
|
|
63
|
+
level: e.level,
|
|
64
64
|
status: e.status
|
|
65
65
|
};
|
|
66
66
|
}
|
|
@@ -78,24 +78,25 @@ var L = class e {
|
|
|
78
78
|
remark: e.customerRemark
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
},
|
|
81
|
+
}, je = class e {
|
|
82
82
|
static findActiveApproval(e) {
|
|
83
83
|
return e.approval.find((e) => e.isActive) ?? null;
|
|
84
84
|
}
|
|
85
85
|
static fromDto(t) {
|
|
86
|
-
let n = e.findActiveApproval(t);
|
|
86
|
+
let n = e.findActiveApproval(t), r = t.approval.find((e) => e.rejectionReason !== null) ?? null;
|
|
87
87
|
return {
|
|
88
|
-
...
|
|
88
|
+
...Te.fromViewInvoiceDetailDto(t, t.uuid, x.STANDARD),
|
|
89
89
|
approvalUuid: n === null ? null : n.uuid,
|
|
90
90
|
hasApprovalHistory: t.approval.length > 0,
|
|
91
91
|
hasChangesSinceApprovalSent: t.hasChangesSinceApprovalSent,
|
|
92
|
-
approval: n === null ? null :
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
approval: n === null ? null : L.fromDetailDto(n),
|
|
93
|
+
approvalEmail: t.customer.approvalEmail,
|
|
94
|
+
approvalProFormaFile: n === null ? null : we.fromNullableDto(n.proFormaFile),
|
|
95
|
+
rejection: r === null ? null : L.rejectionFromDetailDto(r),
|
|
95
96
|
requiresPriorApproval: t.requiresPriorApproval
|
|
96
97
|
};
|
|
97
98
|
}
|
|
98
|
-
},
|
|
99
|
+
}, Me = class {
|
|
99
100
|
static fromDto(e) {
|
|
100
101
|
return {
|
|
101
102
|
uuid: e.uuid,
|
|
@@ -105,7 +106,7 @@ var L = class e {
|
|
|
105
106
|
hasChangesSinceApprovalSent: e.hasChangesSinceApprovalSent,
|
|
106
107
|
isDisputed: e.isDisputed,
|
|
107
108
|
isOverdue: e.isOverdue,
|
|
108
|
-
approval:
|
|
109
|
+
approval: L.fromIndexDto(e.approval),
|
|
109
110
|
balanceDueAmount: T.fromNullableDto(e.balanceDueAmount),
|
|
110
111
|
customerName: e.customer.name,
|
|
111
112
|
customFields: e.customFields.map(M.fromDto),
|
|
@@ -123,13 +124,13 @@ var L = class e {
|
|
|
123
124
|
type: e.type
|
|
124
125
|
};
|
|
125
126
|
}
|
|
126
|
-
},
|
|
127
|
+
}, R = class {
|
|
127
128
|
static toDto(e) {
|
|
128
129
|
if (e == null) return;
|
|
129
130
|
let t = e.trim();
|
|
130
131
|
return t === "" ? void 0 : t;
|
|
131
132
|
}
|
|
132
|
-
},
|
|
133
|
+
}, Ne = class {
|
|
133
134
|
static toDateRangeDto(e) {
|
|
134
135
|
if (e != null && e.from !== null && e.until !== null) return {
|
|
135
136
|
startDate: D.toDto(e.from),
|
|
@@ -138,39 +139,35 @@ var L = class e {
|
|
|
138
139
|
}
|
|
139
140
|
static toDto(e) {
|
|
140
141
|
let t = {};
|
|
141
|
-
|
|
142
|
-
let n = Ce.toIndexFilter(e.filters.approvalStatus);
|
|
143
|
-
t.approvalStatus = n.approvalStatus, t.level = n.level;
|
|
144
|
-
}
|
|
145
|
-
return e.filters?.customerExternalIds?.length && (t.customerExternalIds = e.filters.customerExternalIds), e.filters?.hasChangesSinceApprovalSent !== null && e.filters?.hasChangesSinceApprovalSent !== void 0 && (t.hasChangesSinceApprovalSent = e.filters.hasChangesSinceApprovalSent), e.filters?.customerUuids?.length && (t.customerUuids = e.filters.customerUuids), e.filters?.customFields?.length && (t.customFields = e.filters.customFields), e.filters?.issuedOnRange && (t.issuedOnRange = this.toDateRangeDto(e.filters.issuedOnRange)), e.filters?.dueOnRange && (t.dueOnRange = this.toDateRangeDto(e.filters.dueOnRange)), e.filters?.isOverdue !== null && e.filters?.isOverdue !== void 0 && (t.isOverdue = e.filters.isOverdue), e.filters?.lifecycleStatuses?.length && (t.lifecycleStatuses = e.filters.lifecycleStatuses), e.filters?.settlementStatuses?.length && (t.settlementStatuses = e.filters.settlementStatuses), e.filters?.statuses && (t.statuses = e.filters.statuses), {
|
|
142
|
+
return e.filters?.approvalStatuses?.length && (t.approvalStatuses = e.filters.approvalStatuses), e.filters?.customerExternalIds?.length && (t.customerExternalIds = e.filters.customerExternalIds), e.filters?.hasChangesSinceApprovalSent !== null && e.filters?.hasChangesSinceApprovalSent !== void 0 && (t.hasChangesSinceApprovalSent = e.filters.hasChangesSinceApprovalSent), e.filters?.customerUuids?.length && (t.customerUuids = e.filters.customerUuids), e.filters?.customFields?.length && (t.customFields = e.filters.customFields), e.filters?.issuedOnRange && (t.issuedOnRange = this.toDateRangeDto(e.filters.issuedOnRange)), e.filters?.dueOnRange && (t.dueOnRange = this.toDateRangeDto(e.filters.dueOnRange)), e.filters?.isOverdue !== null && e.filters?.isOverdue !== void 0 && (t.isOverdue = e.filters.isOverdue), e.filters?.lifecycleStatuses?.length && (t.lifecycleStatuses = e.filters.lifecycleStatuses), e.filters?.settlementStatuses?.length && (t.settlementStatuses = e.filters.settlementStatuses), e.filters?.statuses && (t.statuses = e.filters.statuses), {
|
|
146
143
|
filter: t,
|
|
147
144
|
pagination: e.pagination,
|
|
148
|
-
search:
|
|
149
|
-
sort:
|
|
150
|
-
created_at:
|
|
151
|
-
issued_on:
|
|
152
|
-
customer:
|
|
153
|
-
netAmount:
|
|
154
|
-
sequence:
|
|
145
|
+
search: R.toDto(e.search),
|
|
146
|
+
sort: De.toDto(e.sort, {
|
|
147
|
+
created_at: y.CREATED_AT,
|
|
148
|
+
issued_on: y.ISSUED_ON,
|
|
149
|
+
customer: y.CUSTOMER,
|
|
150
|
+
netAmount: y.NET_AMOUNT,
|
|
151
|
+
sequence: y.SEQUENCE
|
|
155
152
|
})
|
|
156
153
|
};
|
|
157
154
|
}
|
|
158
|
-
},
|
|
155
|
+
}, z = class {
|
|
159
156
|
static getCurrentLocale() {
|
|
160
157
|
return Intl.DateTimeFormat(navigator.language).resolvedOptions().locale;
|
|
161
158
|
}
|
|
162
|
-
},
|
|
159
|
+
}, B = class {
|
|
163
160
|
static earliest(...e) {
|
|
164
161
|
return e.reduce((e, t) => t.epochMilliseconds < e.epochMilliseconds ? t : e);
|
|
165
162
|
}
|
|
166
163
|
static getNow() {
|
|
167
|
-
return
|
|
164
|
+
return F.Now.instant();
|
|
168
165
|
}
|
|
169
|
-
static getToday(e =
|
|
166
|
+
static getToday(e = V.getCurrentTimeZone()) {
|
|
170
167
|
return this.getNow().toZonedDateTimeISO(e).toPlainDate();
|
|
171
168
|
}
|
|
172
169
|
static instantFrom(e) {
|
|
173
|
-
return
|
|
170
|
+
return F.Instant.from(e);
|
|
174
171
|
}
|
|
175
172
|
static instantFromDateAndTime(e, t, n) {
|
|
176
173
|
return e.toPlainDateTime(t).toZonedDateTime(n).toInstant();
|
|
@@ -196,12 +193,12 @@ var L = class e {
|
|
|
196
193
|
static latest(...e) {
|
|
197
194
|
return e.reduce((e, t) => t.epochMilliseconds > e.epochMilliseconds ? t : e);
|
|
198
195
|
}
|
|
199
|
-
static plainDateAndTimeToZonedDateTime(e, t, n =
|
|
196
|
+
static plainDateAndTimeToZonedDateTime(e, t, n = V.getCurrentTimeZone()) {
|
|
200
197
|
return this.plainDateTimeFromDateAndTime(e, t).toZonedDateTime(n);
|
|
201
198
|
}
|
|
202
199
|
static plainDateRangeToDateTimeInstantRange(e) {
|
|
203
200
|
if (e.startDate === null || e.endDate === null) return null;
|
|
204
|
-
let t =
|
|
201
|
+
let t = V.getCurrentTimeZone();
|
|
205
202
|
return {
|
|
206
203
|
startDate: e.startDate.toZonedDateTime({ timeZone: t }).toInstant(),
|
|
207
204
|
endDate: e.endDate.toZonedDateTime({ timeZone: t }).with({
|
|
@@ -213,15 +210,15 @@ var L = class e {
|
|
|
213
210
|
};
|
|
214
211
|
}
|
|
215
212
|
static plainDateTimeFromDateAndTime(e, t) {
|
|
216
|
-
return
|
|
213
|
+
return F.PlainDate.from(e).toPlainDateTime(F.PlainTime.from(t));
|
|
217
214
|
}
|
|
218
|
-
static plainDateTimeToZonedDateTime(e, t =
|
|
215
|
+
static plainDateTimeToZonedDateTime(e, t = V.getCurrentTimeZone()) {
|
|
219
216
|
return e.toZonedDateTime(t);
|
|
220
217
|
}
|
|
221
218
|
static plainDateToInstant(e, t) {
|
|
222
219
|
return e.toZonedDateTime(t).toInstant();
|
|
223
220
|
}
|
|
224
|
-
},
|
|
221
|
+
}, V = class {
|
|
225
222
|
static getAvailableTimeZones() {
|
|
226
223
|
return Intl.supportedValuesOf("timeZone");
|
|
227
224
|
}
|
|
@@ -229,24 +226,24 @@ var L = class e {
|
|
|
229
226
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
230
227
|
}
|
|
231
228
|
static getOffset(e) {
|
|
232
|
-
let { offset: t } =
|
|
229
|
+
let { offset: t } = B.getNow().toZonedDateTimeISO(e), [n, r] = t.split(":");
|
|
233
230
|
return r === "00" ? n : t;
|
|
234
231
|
}
|
|
235
|
-
},
|
|
236
|
-
appLanguage:
|
|
232
|
+
}, Pe = {
|
|
233
|
+
appLanguage: z.getCurrentLocale(),
|
|
237
234
|
hourCycle: "locale-default",
|
|
238
|
-
locale:
|
|
239
|
-
timeZone:
|
|
235
|
+
locale: z.getCurrentLocale(),
|
|
236
|
+
timeZone: V.getCurrentTimeZone()
|
|
240
237
|
};
|
|
241
|
-
|
|
238
|
+
Ee(Pe);
|
|
242
239
|
//#endregion
|
|
243
240
|
//#region ../date/src/models/form/plainDateField.model.ts
|
|
244
|
-
var
|
|
245
|
-
date:
|
|
246
|
-
time:
|
|
247
|
-
}),
|
|
248
|
-
date:
|
|
249
|
-
time:
|
|
241
|
+
var H = P.instanceof(F.PlainDate, { error: () => "Invalid date format" }), U = P.instanceof(F.PlainTime, { error: () => "Invalid time format" }), W = P.object({
|
|
242
|
+
date: H,
|
|
243
|
+
time: U
|
|
244
|
+
}), G = P.object({
|
|
245
|
+
date: H.nullable(),
|
|
246
|
+
time: U.nullable()
|
|
250
247
|
}).superRefine(({ date: e, time: t }, n) => {
|
|
251
248
|
e === null != (t === null) && n.addIssue({
|
|
252
249
|
code: "custom",
|
|
@@ -254,44 +251,44 @@ var U = F.instanceof(I.PlainDate, { error: () => "Invalid date format" }), W = F
|
|
|
254
251
|
path: [e === null ? "date" : "time"]
|
|
255
252
|
});
|
|
256
253
|
});
|
|
257
|
-
function
|
|
258
|
-
return
|
|
254
|
+
function K(e) {
|
|
255
|
+
return F.PlainDate.from(e.date).toPlainDateTime(F.PlainTime.from(e.time));
|
|
259
256
|
}
|
|
260
|
-
function
|
|
261
|
-
return
|
|
257
|
+
function q(e, t) {
|
|
258
|
+
return K(e).since(K(t)).total("seconds") < 0;
|
|
262
259
|
}
|
|
263
|
-
|
|
264
|
-
end:
|
|
265
|
-
start:
|
|
260
|
+
P.object({
|
|
261
|
+
end: W,
|
|
262
|
+
start: W
|
|
266
263
|
}).superRefine(({ end: e, start: t }, n) => {
|
|
267
|
-
|
|
264
|
+
q(t, e) || n.addIssue({
|
|
268
265
|
code: "custom",
|
|
269
266
|
message: "End date/time must be after start date/time",
|
|
270
267
|
path: ["end", "time"]
|
|
271
268
|
});
|
|
272
|
-
}),
|
|
273
|
-
end:
|
|
274
|
-
start:
|
|
269
|
+
}), P.object({
|
|
270
|
+
end: G,
|
|
271
|
+
start: G
|
|
275
272
|
}).superRefine(({ end: e, start: t }, n) => {
|
|
276
|
-
t.date !== null && t.time !== null && e.date !== null && e.time !== null && (
|
|
273
|
+
t.date !== null && t.time !== null && e.date !== null && e.time !== null && (q(t, e) || n.addIssue({
|
|
277
274
|
code: "custom",
|
|
278
275
|
message: "End date/time must be after start date/time",
|
|
279
276
|
path: ["end", "time"]
|
|
280
277
|
}));
|
|
281
|
-
}),
|
|
282
|
-
end:
|
|
283
|
-
start:
|
|
278
|
+
}), P.object({
|
|
279
|
+
end: W,
|
|
280
|
+
start: G
|
|
284
281
|
}).superRefine(({ end: e, start: t }, n) => {
|
|
285
|
-
t.time !== null && t.date !== null && (
|
|
282
|
+
t.time !== null && t.date !== null && (q(t, e) || n.addIssue({
|
|
286
283
|
code: "custom",
|
|
287
284
|
message: "End date/time must be after start date/time",
|
|
288
285
|
path: ["end", "time"]
|
|
289
286
|
}));
|
|
290
|
-
}),
|
|
291
|
-
end:
|
|
292
|
-
start:
|
|
287
|
+
}), P.object({
|
|
288
|
+
end: G,
|
|
289
|
+
start: W
|
|
293
290
|
}).superRefine(({ end: e, start: t }, n) => {
|
|
294
|
-
e.date !== null && e.time !== null && (
|
|
291
|
+
e.date !== null && e.time !== null && (q(t, e) || n.addIssue({
|
|
295
292
|
code: "custom",
|
|
296
293
|
message: "End date/time must be after start date/time",
|
|
297
294
|
path: ["end", "time"]
|
|
@@ -299,9 +296,9 @@ F.object({
|
|
|
299
296
|
});
|
|
300
297
|
//#endregion
|
|
301
298
|
//#region ../date/src/transformers/instant.transformer.ts
|
|
302
|
-
var
|
|
299
|
+
var Fe = class {
|
|
303
300
|
static fromDto(e) {
|
|
304
|
-
return
|
|
301
|
+
return F.Instant.from(e);
|
|
305
302
|
}
|
|
306
303
|
static fromNullableDto(e) {
|
|
307
304
|
return e === null ? null : this.fromDto(e);
|
|
@@ -312,9 +309,9 @@ var Ne = class {
|
|
|
312
309
|
static toNullableDto(e) {
|
|
313
310
|
return e === null ? null : this.toDto(e);
|
|
314
311
|
}
|
|
315
|
-
},
|
|
312
|
+
}, J = class {
|
|
316
313
|
static fromDto(e) {
|
|
317
|
-
return
|
|
314
|
+
return F.PlainDate.from(e);
|
|
318
315
|
}
|
|
319
316
|
static fromNullableDto(e) {
|
|
320
317
|
return e === null ? null : this.fromDto(e);
|
|
@@ -325,35 +322,35 @@ var Ne = class {
|
|
|
325
322
|
static toNullableDto(e) {
|
|
326
323
|
return e === null ? null : this.toDto(e);
|
|
327
324
|
}
|
|
328
|
-
},
|
|
325
|
+
}, Ie = class {
|
|
329
326
|
static fromDto(e) {
|
|
330
327
|
return {
|
|
331
328
|
uuid: e.uuid,
|
|
332
|
-
createdAt:
|
|
333
|
-
amount:
|
|
334
|
-
date:
|
|
329
|
+
createdAt: Fe.fromDto(e.createdAt),
|
|
330
|
+
amount: I.fromDto(e.amount),
|
|
331
|
+
date: J.fromDto(e.date),
|
|
335
332
|
paymentReference: e.paymentReference,
|
|
336
333
|
remarks: e.remarks,
|
|
337
334
|
source: e.source
|
|
338
335
|
};
|
|
339
336
|
}
|
|
340
|
-
},
|
|
337
|
+
}, Le = class {
|
|
341
338
|
static toDto(e) {
|
|
342
339
|
return {
|
|
343
|
-
amount:
|
|
340
|
+
amount: I.toDto({
|
|
344
341
|
amount: C(e.amount, e.precision),
|
|
345
342
|
currency: e.currency,
|
|
346
343
|
precision: e.precision
|
|
347
344
|
}),
|
|
348
|
-
date:
|
|
349
|
-
paymentReference: e.paymentReference,
|
|
350
|
-
remarks: e.remarks
|
|
345
|
+
date: J.toDto(e.date),
|
|
346
|
+
paymentReference: e.paymentReference === "" ? null : e.paymentReference,
|
|
347
|
+
remarks: e.remarks === "" ? null : e.remarks
|
|
351
348
|
};
|
|
352
349
|
}
|
|
353
350
|
};
|
|
354
351
|
//#endregion
|
|
355
352
|
//#region src/modules/invoice/models/invoice/pdf/invoicePdfDetail.transformer.ts
|
|
356
|
-
function
|
|
353
|
+
function Re(e) {
|
|
357
354
|
return {
|
|
358
355
|
uuid: e.uuid,
|
|
359
356
|
createdAt: E.fromDto(e.createdAt),
|
|
@@ -361,7 +358,7 @@ function Ie(e) {
|
|
|
361
358
|
status: e.status
|
|
362
359
|
};
|
|
363
360
|
}
|
|
364
|
-
function
|
|
361
|
+
function Y(e) {
|
|
365
362
|
return {
|
|
366
363
|
uuid: e.uuid,
|
|
367
364
|
isDiscount: e.isDiscount,
|
|
@@ -379,25 +376,41 @@ function X(e) {
|
|
|
379
376
|
vatRatePercentage: O.fromDto(e.vatRatePercentage)
|
|
380
377
|
};
|
|
381
378
|
}
|
|
382
|
-
function
|
|
379
|
+
function ze(e) {
|
|
383
380
|
return {
|
|
384
381
|
uuid: e.uuid,
|
|
385
382
|
name: e.name,
|
|
386
383
|
customFields: e.customFields.map(M.fromDto),
|
|
387
384
|
description: e.description,
|
|
388
|
-
lines: e.lines.toSorted((e, t) => e.position - t.position).map(
|
|
385
|
+
lines: e.lines.toSorted((e, t) => e.position - t.position).map(Y),
|
|
389
386
|
position: e.position
|
|
390
387
|
};
|
|
391
388
|
}
|
|
392
|
-
function
|
|
389
|
+
function Be(e) {
|
|
393
390
|
return [...e.ungroupedLines, ...e.groups.flatMap((e) => e.lines)].toSorted((e, t) => e.position - t.position);
|
|
394
391
|
}
|
|
395
|
-
var
|
|
396
|
-
static fromPublicDto(
|
|
392
|
+
var X = class e {
|
|
393
|
+
static fromPublicDto(t) {
|
|
394
|
+
return {
|
|
395
|
+
...e.fromPublicProFormaDto(t),
|
|
396
|
+
deliveredOn: D.fromNullableDto(t.deliveredOn),
|
|
397
|
+
dueOn: D.fromNullableDto(t.dueOn),
|
|
398
|
+
originalInvoice: t.originalInvoice === null ? null : Re(t.originalInvoice),
|
|
399
|
+
recipient: t.recipient === null ? null : {
|
|
400
|
+
uuid: t.recipient.uuid,
|
|
401
|
+
name: t.recipient.name,
|
|
402
|
+
email: t.recipient.email
|
|
403
|
+
},
|
|
404
|
+
sequence: t.sequence,
|
|
405
|
+
status: t.status,
|
|
406
|
+
type: t.type
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
static fromPublicProFormaDto(e) {
|
|
397
410
|
return {
|
|
398
411
|
createdAt: E.fromDto(e.createdAt),
|
|
399
|
-
deliveredOn:
|
|
400
|
-
dueOn:
|
|
412
|
+
deliveredOn: null,
|
|
413
|
+
dueOn: null,
|
|
401
414
|
issueOn: D.fromNullableDto(e.issueOn),
|
|
402
415
|
updatedAt: E.fromDto(e.updatedAt),
|
|
403
416
|
issuer: {
|
|
@@ -424,23 +437,19 @@ var ze = class {
|
|
|
424
437
|
externalRemarks: e.externalRemarks,
|
|
425
438
|
globalDiscount: j.fromDto(e.globalDiscount),
|
|
426
439
|
grossAmount: T.fromDto(e.grossAmount),
|
|
427
|
-
groups: e.groups.toSorted((e, t) => e.position - t.position).map(
|
|
428
|
-
lines:
|
|
440
|
+
groups: e.groups.toSorted((e, t) => e.position - t.position).map(ze),
|
|
441
|
+
lines: Be(e).map(Y),
|
|
429
442
|
netAmount: T.fromDto(e.netAmount),
|
|
430
|
-
originalInvoice:
|
|
443
|
+
originalInvoice: null,
|
|
431
444
|
paymentReference: e.paymentReference,
|
|
432
445
|
poNumber: e.poNumber,
|
|
433
|
-
recipient:
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
email: e.recipient.email
|
|
437
|
-
},
|
|
438
|
-
sequence: e.sequence,
|
|
439
|
-
status: e.status,
|
|
446
|
+
recipient: null,
|
|
447
|
+
sequence: null,
|
|
448
|
+
status: g.READY,
|
|
440
449
|
subject: e.subject,
|
|
441
450
|
totalDiscountAmount: T.fromNullableDto(e.totalDiscountAmount),
|
|
442
|
-
type:
|
|
443
|
-
ungroupedLines: e.ungroupedLines.map(
|
|
451
|
+
type: x.STANDARD,
|
|
452
|
+
ungroupedLines: e.ungroupedLines.map(Y),
|
|
444
453
|
vatAmount: T.fromDto(e.vatAmount),
|
|
445
454
|
vatSummaries: e.vatSummaries.map((e) => ({
|
|
446
455
|
netAmount: T.fromDto(e.netAmount),
|
|
@@ -449,10 +458,10 @@ var ze = class {
|
|
|
449
458
|
}))
|
|
450
459
|
};
|
|
451
460
|
}
|
|
452
|
-
},
|
|
461
|
+
}, Ve = class {
|
|
453
462
|
static toDto(e) {
|
|
454
463
|
let t = Math.abs(e.value);
|
|
455
|
-
return e.type ===
|
|
464
|
+
return e.type === _.PERCENTAGE ? { discount: {
|
|
456
465
|
amount: null,
|
|
457
466
|
description: null,
|
|
458
467
|
percentage: O.toDto(new k(t)),
|
|
@@ -490,9 +499,9 @@ var ze = class {
|
|
|
490
499
|
dueOn: D.toDto(e.dueOn),
|
|
491
500
|
issuedOn: D.toDto(e.issuedOn),
|
|
492
501
|
customFields: e.customFields.map(M.toDto),
|
|
493
|
-
externalRemarks:
|
|
494
|
-
poNumber:
|
|
495
|
-
subject:
|
|
502
|
+
externalRemarks: N.trimOrNull(e.externalRemarks),
|
|
503
|
+
poNumber: N.trimOrNull(e.poNumber),
|
|
504
|
+
subject: N.trimOrNull(e.subject)
|
|
496
505
|
};
|
|
497
506
|
}
|
|
498
507
|
static toForm(e) {
|
|
@@ -524,7 +533,7 @@ function $(e) {
|
|
|
524
533
|
vatRate: e.vatRate
|
|
525
534
|
};
|
|
526
535
|
}
|
|
527
|
-
var
|
|
536
|
+
var He = class {
|
|
528
537
|
static toDto(e) {
|
|
529
538
|
return {
|
|
530
539
|
groups: e.groups.map((e) => ({
|
|
@@ -537,85 +546,85 @@ var Ve = class {
|
|
|
537
546
|
ungroupedLines: e.ungroupedLines.map($)
|
|
538
547
|
};
|
|
539
548
|
}
|
|
540
|
-
},
|
|
549
|
+
}, Ue = class {
|
|
541
550
|
static async applyDiscount(e, t) {
|
|
542
|
-
let n = await p.fromPromise(
|
|
543
|
-
body:
|
|
551
|
+
let n = await p.fromPromise(he({
|
|
552
|
+
body: Ve.toDto(t),
|
|
544
553
|
path: { uuid: e }
|
|
545
554
|
}));
|
|
546
555
|
return p.void(n);
|
|
547
556
|
}
|
|
548
557
|
static async approveApproval(e, t) {
|
|
549
|
-
let n = await p.fromPromise(
|
|
550
|
-
body:
|
|
558
|
+
let n = await p.fromPromise(ye({
|
|
559
|
+
body: Oe.toDto(t),
|
|
551
560
|
path: { uuid: e }
|
|
552
561
|
}));
|
|
553
562
|
return p.void(n);
|
|
554
563
|
}
|
|
555
564
|
static async archiveApproval(e) {
|
|
556
|
-
let t = await p.fromPromise(
|
|
565
|
+
let t = await p.fromPromise(f({ path: { uuid: e } }));
|
|
557
566
|
return p.void(t);
|
|
558
567
|
}
|
|
559
568
|
static async bulkFinalize(e) {
|
|
560
|
-
return (await p.fromPromise(
|
|
561
|
-
scope:
|
|
569
|
+
return (await p.fromPromise(de({ query: { filter: { invoiceUuids: {
|
|
570
|
+
scope: v.INCLUDE,
|
|
562
571
|
values: e
|
|
563
572
|
} } } }))).map((e) => e.data);
|
|
564
573
|
}
|
|
565
574
|
static async bulkMarkAsReady(e) {
|
|
566
|
-
return (await p.fromPromise(
|
|
567
|
-
scope:
|
|
575
|
+
return (await p.fromPromise(ie({ query: { filter: { invoiceUuids: {
|
|
576
|
+
scope: v.INCLUDE,
|
|
568
577
|
values: e
|
|
569
578
|
} } } }))).map((e) => e.data);
|
|
570
579
|
}
|
|
571
580
|
static async bulkSend(e) {
|
|
572
|
-
return (await p.fromPromise(
|
|
573
|
-
scope:
|
|
581
|
+
return (await p.fromPromise(ae({ query: { filter: { invoiceUuids: {
|
|
582
|
+
scope: v.INCLUDE,
|
|
574
583
|
values: e
|
|
575
584
|
} } } }))).map((e) => e.data);
|
|
576
585
|
}
|
|
577
586
|
static async bulkSendApproval(e) {
|
|
578
|
-
return (await p.fromPromise(
|
|
579
|
-
scope:
|
|
587
|
+
return (await p.fromPromise(xe({ query: { filter: { invoiceUuids: {
|
|
588
|
+
scope: v.INCLUDE,
|
|
580
589
|
values: e
|
|
581
590
|
} } } }))).map((e) => e.data);
|
|
582
591
|
}
|
|
583
592
|
static async create(e) {
|
|
584
|
-
return (await p.fromPromise(_e({ body:
|
|
593
|
+
return (await p.fromPromise(_e({ body: Ae.toDto(e) }))).map((e) => e.data.uuid);
|
|
585
594
|
}
|
|
586
595
|
static async createCreditNote(e) {
|
|
587
|
-
return (await p.fromPromise(
|
|
596
|
+
return (await p.fromPromise(se({ path: { uuid: e } }))).map((e) => e.data.uuid);
|
|
588
597
|
}
|
|
589
598
|
static async createPayment(e, t) {
|
|
590
|
-
let n = await p.fromPromise(
|
|
591
|
-
body:
|
|
599
|
+
let n = await p.fromPromise(me({
|
|
600
|
+
body: Le.toDto(t),
|
|
592
601
|
path: { uuid: e }
|
|
593
602
|
}));
|
|
594
603
|
return p.void(n);
|
|
595
604
|
}
|
|
596
605
|
static async delete(e) {
|
|
597
|
-
let t = await p.fromPromise(
|
|
606
|
+
let t = await p.fromPromise(ue({ path: { uuid: e } }));
|
|
598
607
|
return p.void(t);
|
|
599
608
|
}
|
|
600
609
|
static async deletePayment(e, t) {
|
|
601
|
-
let n = await p.fromPromise(
|
|
610
|
+
let n = await p.fromPromise(le({ path: {
|
|
602
611
|
uuid: e,
|
|
603
612
|
paymentUuid: t
|
|
604
613
|
} }));
|
|
605
614
|
return p.void(n);
|
|
606
615
|
}
|
|
607
616
|
static async duplicate(e) {
|
|
608
|
-
return (await p.fromPromise(
|
|
617
|
+
return (await p.fromPromise(Ce({ path: { uuid: e } }))).map((e) => e.data.uuid);
|
|
609
618
|
}
|
|
610
619
|
static async finalize(e) {
|
|
611
|
-
let t = await p.fromPromise(
|
|
620
|
+
let t = await p.fromPromise(u({ path: { uuid: e } }));
|
|
612
621
|
return p.void(t);
|
|
613
622
|
}
|
|
614
623
|
static async getActivityLogs(e, t) {
|
|
615
|
-
return (await p.fromPromise(
|
|
624
|
+
return (await p.fromPromise(ve({ query: {
|
|
616
625
|
filter: {
|
|
617
626
|
entityUuids: [e],
|
|
618
|
-
roles: [
|
|
627
|
+
roles: [b.INVOICE]
|
|
619
628
|
},
|
|
620
629
|
pagination: {
|
|
621
630
|
key: t.pagination.key ?? null,
|
|
@@ -627,25 +636,28 @@ var Ve = class {
|
|
|
627
636
|
}));
|
|
628
637
|
}
|
|
629
638
|
static async getAll(e) {
|
|
630
|
-
return (await p.fromPromise(
|
|
631
|
-
query:
|
|
639
|
+
return (await p.fromPromise(be({
|
|
640
|
+
query: Ne.toDto(e),
|
|
632
641
|
responseValidator: void 0
|
|
633
642
|
}))).map((e) => ({
|
|
634
|
-
data: e.data.items.map(
|
|
643
|
+
data: e.data.items.map(Me.fromDto),
|
|
635
644
|
meta: e.data.meta
|
|
636
645
|
}));
|
|
637
646
|
}
|
|
638
647
|
static async getByUuid(e) {
|
|
639
|
-
return (await p.fromPromise(
|
|
648
|
+
return (await p.fromPromise(ge({ path: { uuid: e } }))).map((e) => je.fromDto(e.data));
|
|
640
649
|
}
|
|
641
650
|
static async getPayments(e) {
|
|
642
|
-
return (await p.fromPromise(
|
|
651
|
+
return (await p.fromPromise(fe({ path: { uuid: e } }))).map((e) => e.data.items.map(Ie.fromDto));
|
|
643
652
|
}
|
|
644
653
|
static async getPublicDetail(e) {
|
|
645
|
-
return (await p.fromPromise(
|
|
654
|
+
return (await p.fromPromise(Se({ query: { token: e } }))).map((e) => X.fromPublicDto(e.data));
|
|
655
|
+
}
|
|
656
|
+
static async getPublicProFormaDetail(e) {
|
|
657
|
+
return (await p.fromPromise(oe({ query: { token: e } }))).map((e) => X.fromPublicProFormaDto(e.data));
|
|
646
658
|
}
|
|
647
659
|
static async markAsDraft(e) {
|
|
648
|
-
let t = await p.fromPromise(
|
|
660
|
+
let t = await p.fromPromise(l({ path: { uuid: e } }));
|
|
649
661
|
return p.void(t);
|
|
650
662
|
}
|
|
651
663
|
static async markAsPaid(e) {
|
|
@@ -653,54 +665,54 @@ var Ve = class {
|
|
|
653
665
|
return p.void(n);
|
|
654
666
|
}
|
|
655
667
|
static async markAsPriorApprovalRequired(e) {
|
|
656
|
-
let t = await p.fromPromise(
|
|
668
|
+
let t = await p.fromPromise(m({ path: { uuid: e } }));
|
|
657
669
|
return p.void(t);
|
|
658
670
|
}
|
|
659
671
|
static async markAsProtested(e) {
|
|
660
|
-
let t = await p.fromPromise(
|
|
672
|
+
let t = await p.fromPromise(h({ path: { uuid: e } }));
|
|
661
673
|
return p.void(t);
|
|
662
674
|
}
|
|
663
675
|
static async markAsReady(e) {
|
|
664
|
-
let t = await p.fromPromise(
|
|
676
|
+
let t = await p.fromPromise(te({ path: { uuid: e } }));
|
|
665
677
|
return p.void(t);
|
|
666
678
|
}
|
|
667
679
|
static async previewBulkFinalize(e) {
|
|
668
680
|
return (await p.fromPromise(r({ query: { filter: { invoiceUuids: {
|
|
669
|
-
scope:
|
|
681
|
+
scope: v.INCLUDE,
|
|
670
682
|
values: e
|
|
671
683
|
} } } }))).map((e) => e.data);
|
|
672
684
|
}
|
|
673
685
|
static async previewBulkMarkAsReady(e) {
|
|
674
686
|
return (await p.fromPromise(n({ query: { filter: { invoiceUuids: {
|
|
675
|
-
scope:
|
|
687
|
+
scope: v.INCLUDE,
|
|
676
688
|
values: e
|
|
677
689
|
} } } }))).map((e) => e.data);
|
|
678
690
|
}
|
|
679
691
|
static async previewBulkSend(t) {
|
|
680
692
|
return (await p.fromPromise(e({ query: { filter: { invoiceUuids: {
|
|
681
|
-
scope:
|
|
693
|
+
scope: v.INCLUDE,
|
|
682
694
|
values: t
|
|
683
695
|
} } } }))).map((e) => e.data);
|
|
684
696
|
}
|
|
685
697
|
static async previewBulkSendApproval(e) {
|
|
686
|
-
return (await p.fromPromise(
|
|
687
|
-
scope:
|
|
698
|
+
return (await p.fromPromise(d({ query: { filter: { invoiceUuids: {
|
|
699
|
+
scope: v.INCLUDE,
|
|
688
700
|
values: e
|
|
689
701
|
} } } }))).map((e) => e.data);
|
|
690
702
|
}
|
|
691
703
|
static async rejectApproval(e, t) {
|
|
692
|
-
let n = await p.fromPromise(
|
|
693
|
-
body:
|
|
704
|
+
let n = await p.fromPromise(pe({
|
|
705
|
+
body: ke.toDto(t),
|
|
694
706
|
path: { uuid: e }
|
|
695
707
|
}));
|
|
696
708
|
return p.void(n);
|
|
697
709
|
}
|
|
698
710
|
static async restartApproval(e) {
|
|
699
|
-
let t = await p.fromPromise(
|
|
711
|
+
let t = await p.fromPromise(o({ path: { uuid: e } }));
|
|
700
712
|
return p.void(t);
|
|
701
713
|
}
|
|
702
714
|
static async restoreFromProForma(e) {
|
|
703
|
-
let t = await p.fromPromise(
|
|
715
|
+
let t = await p.fromPromise(s({ path: { uuid: e } }));
|
|
704
716
|
return p.void(t);
|
|
705
717
|
}
|
|
706
718
|
static async send(e) {
|
|
@@ -708,38 +720,38 @@ var Ve = class {
|
|
|
708
720
|
return p.void(t);
|
|
709
721
|
}
|
|
710
722
|
static async sendApproval(e) {
|
|
711
|
-
let t = await p.fromPromise(
|
|
723
|
+
let t = await p.fromPromise(i({ path: { uuid: e } }));
|
|
712
724
|
return p.void(t);
|
|
713
725
|
}
|
|
714
726
|
static async unmarkAsPriorApprovalRequired(e) {
|
|
715
|
-
let t = await p.fromPromise(
|
|
727
|
+
let t = await p.fromPromise(c({ path: { uuid: e } }));
|
|
716
728
|
return p.void(t);
|
|
717
729
|
}
|
|
718
730
|
static async update(e, t) {
|
|
719
|
-
let n = await p.fromPromise(
|
|
731
|
+
let n = await p.fromPromise(re({
|
|
720
732
|
body: Q.toDto(t),
|
|
721
733
|
path: { uuid: e }
|
|
722
734
|
}));
|
|
723
735
|
return p.void(n);
|
|
724
736
|
}
|
|
725
737
|
static async updateAttachments(e, t) {
|
|
726
|
-
let n = await p.fromPromise(
|
|
738
|
+
let n = await p.fromPromise(ee({
|
|
727
739
|
body: Z.toDto(t),
|
|
728
740
|
path: { uuid: e }
|
|
729
741
|
}));
|
|
730
742
|
return p.void(n);
|
|
731
743
|
}
|
|
732
744
|
static async updateLines(e, t) {
|
|
733
|
-
let n = await p.fromPromise(
|
|
734
|
-
body:
|
|
745
|
+
let n = await p.fromPromise(ne({
|
|
746
|
+
body: He.toDto(t),
|
|
735
747
|
path: { uuid: e }
|
|
736
748
|
}));
|
|
737
749
|
return p.void(n);
|
|
738
750
|
}
|
|
739
751
|
static async withdrawProtest(e) {
|
|
740
|
-
let t = await p.fromPromise(
|
|
752
|
+
let t = await p.fromPromise(ce({ path: { uuid: e } }));
|
|
741
753
|
return p.void(t);
|
|
742
754
|
}
|
|
743
755
|
};
|
|
744
756
|
//#endregion
|
|
745
|
-
export {
|
|
757
|
+
export { B as a, H as i, Q as n, R as o, Z as r, Ue as t };
|