@wisemen/wise-invoicing-web 0.1.0 → 0.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/ApprovalReminderSettingsViewDataProvider-D-qXZrPT.js +151 -0
- package/dist/{BillingDocumentDetailViewDataProvider-BemnzVNY.js → BillingDocumentDetailViewDataProvider-DDdtlW-2.js} +1417 -1459
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-5vi2pgRM.js → BillingDocumentPdf-ehdFB6mr.js} +4 -4
- package/dist/{CreditNoteDetailViewDataProvider-BuY9ELoK.js → CreditNoteDetailViewDataProvider-11a-JO3H.js} +201 -201
- package/dist/{CreditNotePdfViewDataProvider-DI4eQkpM.js → CreditNotePdfViewDataProvider-bfeaya3P.js} +3 -3
- package/dist/{CustomFieldValueText-BGbQwhON.js → CustomFieldValueText-CZQXGE5F.js} +81 -81
- package/dist/DataProvider-C3uEds9v.js +75 -0
- package/dist/{DunningCaseDetailViewDataProvider-DKuuysqS.js → DunningCaseDetailViewDataProvider-DC-ziMoO.js} +35 -35
- package/dist/{DunningCaseOverviewView-aWttPLrC.js → DunningCaseOverviewView-y_bCmi5j.js} +180 -180
- package/dist/{DunningCaseReminderPdfViewDataProvider-I0I_WQQB.js → DunningCaseReminderPdfViewDataProvider-DNODfED_.js} +22 -23
- package/dist/{DunningCaseSendDialog-DyvA5R1p.js → DunningCaseSendDialog-BPXcqit5.js} +82 -82
- package/dist/InvoiceApprovalOverviewView-DZ14mi4L.js +870 -0
- package/dist/InvoiceApprovalStatusBadge-U-dW2hR4.js +161 -0
- package/dist/InvoiceApproveDialog-2LXneG2r.js +308 -0
- package/dist/InvoiceDetailViewDataProvider-BYeaaQzL.js +2156 -0
- package/dist/InvoiceOverviewBulkSendApprovalDialog-99dfuN4i.js +318 -0
- package/dist/InvoiceOverviewViewDataProvider-CZIQeftL.js +1620 -0
- package/dist/{InvoicePdfView-C-7m2g3b.js → InvoicePdfView-BJRTg_TH.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-BPiK110e.js → InvoicePdfViewDataProvider-CwI_uGm3.js} +4 -4
- package/dist/InvoicePublicPdfViewDataProvider-uZUfsr5K.js +45 -0
- package/dist/InvoicingFileUploadProvider-D9Xk4rQM.js +94 -0
- package/dist/{IssuerSettingsViewDataProvider-COqHGUE6.js → IssuerSettingsViewDataProvider-CGRa8F-2.js} +4 -4
- package/dist/{ReminderSettingsViewDataProvider-Dys4bUU7.js → ReminderSettingsViewDataProvider-1ucp3z2T.js} +58 -58
- package/dist/{api.util-BCSgCfpS.js → api.util-C_kMGlJN.js} +1456 -846
- package/dist/{billingDocumentDetail.transformer-BBn9R_cx.js → billingDocumentDetail.transformer-Da6_-Hv9.js} +58 -59
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +18 -1
- package/dist/client/types.gen.d.ts +1059 -106
- package/dist/client/zod.gen.d.ts +32759 -16136
- package/dist/{creditNoteDetail.query-BcPsB96h.js → creditNoteDetail.query-DLR7L0Ep.js} +30 -30
- package/dist/{dist-BBjpqvUl.js → dist-CoztMdYH.js} +614 -614
- package/dist/{dist-D9lp7NDv.js → dist-Cxdm09Lp.js} +210 -98
- package/dist/{documentTitle.composable-4ApFl9TZ.js → documentTitle.composable-DsBbzhXN.js} +23 -15
- package/dist/{customFieldValue.util-BwsX8exl.js → download.util-B5Q7KUC9.js} +6 -6
- package/dist/{i18n.lib-C6eb-F-e.js → i18n.lib-Cvr8pcDw.js} +272 -8
- package/dist/index.d.ts +297 -31
- package/dist/index.js +344 -324
- package/dist/invoice.service-DEEA9mal.js +745 -0
- package/dist/invoiceApproval.service-DvL3LliM.js +72 -0
- package/dist/invoiceApprovalStatus.util-3Zh10Pj8.js +79 -0
- package/dist/invoiceDeliveryStatus.util-nCsqDypY.js +211 -0
- package/dist/{invoiceDetail.query-Cek8nyaw.js → invoiceDetail.query-CRoH_SgM.js} +1 -1
- package/dist/{invoicingConfig.composable-DTmad1fe.js → invoicingConfig.composable-rxjGK882.js} +2 -2
- package/dist/{issuerSettings.query-Bvz-Oj5D.js → issuerSettings.query-Dc5gsaEm.js} +5 -5
- package/dist/libs/i18n.lib.d.ts +270 -6
- package/dist/locales/en-US.json.d.ts +136 -4
- package/dist/locales/nl-BE.json.d.ts +136 -4
- package/dist/modules/dunning-case/models/dunningCase.transformer.d.ts +0 -1
- package/dist/modules/invoice/api/mutations/invoiceApproveApproval.mutation.d.ts +16 -0
- package/dist/modules/invoice/api/mutations/invoiceArchiveApproval.mutation.d.ts +6 -0
- package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +5 -0
- package/dist/modules/invoice/api/mutations/invoiceMarkAsPriorApprovalRequired.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +9 -0
- package/dist/modules/invoice/api/mutations/invoiceRestoreFromProForma.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/mutations/invoiceSendApproval.mutation.d.ts +5 -0
- package/dist/modules/invoice/api/mutations/invoiceUnmarkAsPriorApprovalRequired.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/services/invoice.service.d.ts +14 -1
- package/dist/modules/invoice/components/InvoiceApprovalOutOfSyncIndicator.vue.d.ts +3 -0
- package/dist/{ui/DisplayState.vue.d.ts → modules/invoice/components/InvoiceApprovalStatusBadge.vue.d.ts} +7 -10
- package/dist/modules/invoice/components/InvoiceApprovalStatusChip.vue.d.ts +16 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprovalTransformers.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprovalUuid.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprove.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +13 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceReject.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +7 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +13 -1
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.transformer.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndex.model.d.ts +4 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/invoiceApproval.transformer.d.ts +7 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +34 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +10 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.spec.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/components/InvoiceApprovalBanner.vue.d.ts +19 -0
- package/dist/modules/invoice/use-cases/detail/components/InvoiceDetailHeaderSection.vue.d.ts +4 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailHeaderActions.composable.d.ts +5 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalArchiveDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalRevertDialog.vue.d.ts +15 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceFinalizeOutOfSyncDialog.vue.d.ts +21 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceRejectDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +3 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewTableApprovalCell.vue.d.ts +9 -0
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.d.ts +3 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +12 -0
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +2 -0
- package/dist/modules/invoice/use-cases/overview/views/InvoiceOverviewView.vue.d.ts +0 -5
- package/dist/modules/invoice-approval/actions/invoiceApproval.actions.d.ts +5 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalArchive.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalReject.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalUnmarkAsNeedsApproval.action.d.ts +1 -0
- package/dist/modules/invoice-approval/api/mutations/approvalReminderConfigUpdate.mutation.d.ts +8 -0
- package/dist/modules/invoice-approval/api/queries/approvalReminderConfig.query.d.ts +1 -0
- package/dist/modules/invoice-approval/api/queries/invoiceApprovalIndex.query.d.ts +3 -0
- package/dist/modules/invoice-approval/api/query-keys/invoiceApproval.queryKeys.d.ts +15 -0
- package/dist/modules/invoice-approval/api/services/invoiceApproval.service.d.ts +10 -0
- package/dist/modules/invoice-approval/components/InvoiceApprovalReminderLevelIndicator.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfig.transformer.d.ts +6 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfigForm.model.d.ts +11 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfigForm.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.model.d.ts +21 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.d.ts +5 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.model.d.ts +9 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.d.ts +6 -0
- package/dist/modules/invoice-approval/routes/invoiceApproval.routes.d.ts +24 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewActionsCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewAmountCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewInvoiceCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewMetrics.vue.d.ts +18 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewNextReminderCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewStatusCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +42 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +10 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewTableColumns.composable.d.ts +3 -0
- package/dist/modules/invoice-approval/use-cases/overview/views/InvoiceApprovalOverviewView.vue.d.ts +3 -0
- package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsView.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
- package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Bhiz9jW7.js} +17 -4
- package/dist/reminderConfig.query-snaHQmrY.js +309 -0
- package/dist/routes/invoicingRoutes.composable.d.ts +14 -6
- package/dist/search.composable-CU9OpyUB.js +52 -0
- package/dist/{src-BFgnUugN.js → src-DUSgQTKr.js} +45 -45
- package/dist/style.css +1 -1
- package/dist/types/queryKey.type.d.ts +3 -2
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +15 -0
- package/dist/utils/html.util.d.ts +4 -0
- package/package.json +2 -1
- package/dist/AddOpenBoundaryIcon-9SqBHfoz.js +0 -25
- package/dist/AirlineIcon-Z6sH_StM.js +0 -26
- package/dist/AirplaneIcon-C-nSkD1w.js +0 -19
- package/dist/AirportIcon-m4itDKCV.js +0 -16
- package/dist/AlertTriangleIcon-DtYLCC-Y.js +0 -23
- package/dist/AllocationsIcon-hcg93Sll.js +0 -16
- package/dist/ArrowNarrowRightIcon-2-Sml68f.js +0 -23
- package/dist/AssetIcon-qOYs6Wna.js +0 -16
- package/dist/BarChartIcon-DDyzpV_3.js +0 -22
- package/dist/BellIcon-DF1OBFta.js +0 -21
- package/dist/BuildingIcon-CC5PMNeP.js +0 -22
- package/dist/ChargerIcon-aM_endLr.js +0 -16
- package/dist/ChevronDownIcon-4QiK-Z6-.js +0 -23
- package/dist/ChevronUpIcon-qBsjZ5Dz.js +0 -23
- package/dist/ClockIcon-BNiPCaiB.js +0 -23
- package/dist/ClockSnoozeIcon-BxGfwJB6.js +0 -23
- package/dist/CopyIcon-DH5ly0dZ.js +0 -19
- package/dist/DataProvider-Dj34ljUX.js +0 -75
- package/dist/DownloadCloudIcon-Cf8ftklG.js +0 -22
- package/dist/EditIcon-Dr7OHBBR.js +0 -21
- package/dist/EraserIcon-B1VJSvdI.js +0 -23
- package/dist/FileIcon-ssmQI5Yl.js +0 -23
- package/dist/FilterLinesIcon-C7YdyPBk.js +0 -23
- package/dist/GlobeIcon-BfRM6Ike.js +0 -22
- package/dist/HelpIcon-BrJ49P5y.js +0 -22
- package/dist/HourGlassIcon-D9rfU1Is.js +0 -22
- package/dist/InfoCircleIcon-Ee0SyiMc.js +0 -23
- package/dist/InvoiceDetailViewDataProvider-D6E7YVV1.js +0 -1670
- package/dist/InvoiceOverviewViewDataProvider-i8tXATJE.js +0 -1677
- package/dist/InvoicePublicPdfViewDataProvider-BJe-8hC5.js +0 -45
- package/dist/KeyboardIcon-T3o_g-1c.js +0 -22
- package/dist/LinkExternalIcon-BkHS4fCx.js +0 -22
- package/dist/LinkIcon-DuPwae98.js +0 -22
- package/dist/MarkerIcon-B1Jqenjb.js +0 -28
- package/dist/MobileBatteryIcon-GZ1SMRDV.js +0 -16
- package/dist/MonitorIcon-pbK22reU.js +0 -22
- package/dist/NotificationIcon-Ctv8vyWt.js +0 -19
- package/dist/ParkingIcon-DnUPW3pB.js +0 -24
- package/dist/PlanningIcon-CXvrskgj.js +0 -16
- package/dist/PreferenceIcon-BHS8uDyi.js +0 -22
- package/dist/ReceiptCheckIcon-QTestqCJ.js +0 -23
- package/dist/RefreshIcon-DShY-aoS.js +0 -22
- package/dist/RemoveOpenBoundaryIcon-CN8YWs6o.js +0 -28
- package/dist/RewindIcon-GWg2AQax.js +0 -22
- package/dist/SettingsIcon-CBLJ6B5u.js +0 -25
- package/dist/ShieldIcon-CVnrOcxl.js +0 -19
- package/dist/ShieldOffIcon-B9l0dDVb.js +0 -23
- package/dist/SignOutIcon-CmDkjJ5F.js +0 -21
- package/dist/SlashCircleIcon-jY5FBko5.js +0 -22
- package/dist/StandIcon-CoYnBLMn.js +0 -23
- package/dist/StarsIcon-D7ZlqOW7.js +0 -22
- package/dist/StopwatchIcon-BK0vh1lg.js +0 -22
- package/dist/TargetIcon-HMWj77-Q.js +0 -22
- package/dist/ThreeDotsIcon-BtFruOKz.js +0 -32
- package/dist/ToolIcon-DRfDb7fE.js +0 -22
- package/dist/TrashIcon-BwxBjHv5.js +0 -19
- package/dist/TurnaroundIcon-b1X61TwZ.js +0 -27
- package/dist/UploadCloudIcon-BF0equKg.js +0 -22
- package/dist/UserIcon-B0rCC6KE.js +0 -22
- package/dist/UsersIcon-cK5l_zKG.js +0 -22
- package/dist/VerifiedIcon-CELYlqcv.js +0 -22
- package/dist/WifiIcon--JPvMNEF.js +0 -23
- package/dist/WifiOffIcon-BS2KftcP.js +0 -23
- package/dist/ZapIcon-BHwcIQc0.js +0 -23
- package/dist/ZoomInIcon-Cu6r915V.js +0 -23
- package/dist/ZoomOutIcon-DwB4FRj-.js +0 -23
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/instant.transformer-KmBsH3E9.js +0 -18
- package/dist/invoice.service-Bb8VqQvc.js +0 -635
- package/dist/invoiceDeliveryStatus.util-BPkGCQM6.js +0 -331
- package/dist/reminderConfig.query-DsJNqqi7.js +0 -331
- package/dist/search.composable-BCtYqudV.js +0 -52
|
@@ -0,0 +1,745 @@
|
|
|
1
|
+
import { A as e, C as t, D as n, E as r, F as ee, H as i, I as a, K as o, L as s, M as c, N as l, S as u, T as d, U as f, V as te, a as ne, b as re, c as ie, d as ae, g as oe, h as se, i as ce, j as le, k as ue, l as de, lt as fe, m as pe, n as me, nt as he, ot as ge, p as _e, r as ve, rt as ye, s as be, t as p, tt as xe, v as m, w as h, x as g } from "./api.util-C_kMGlJN.js";
|
|
2
|
+
import { O as _, b as v, d as y, m as b, r as x } from "./documentTitle.composable-DsBbzhXN.js";
|
|
3
|
+
import { n as S } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
+
import { r as C } from "./src-DUSgQTKr.js";
|
|
5
|
+
import { t as w } from "./address.transformer-jGddczLV.js";
|
|
6
|
+
import { n as T, r as E, t as D } from "./plainDate.transformer-Bhiz9jW7.js";
|
|
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 N, t as Se } from "./billingDocumentDetail.transformer-Da6_-Hv9.js";
|
|
9
|
+
import { t as P } from "./dist-BFx8U4Su.js";
|
|
10
|
+
import { t as Ce } from "./invoiceApprovalStatus.util-3Zh10Pj8.js";
|
|
11
|
+
import F from "zod";
|
|
12
|
+
import { ref as we } from "vue";
|
|
13
|
+
import { SortUtil as Te } from "@wisemen/vue-core-api-utils";
|
|
14
|
+
import { Temporal as I } from "temporal-polyfill";
|
|
15
|
+
//#region ../toolkit/src/utils/monetary/monetary.util.ts
|
|
16
|
+
var L = class e {
|
|
17
|
+
static fromDto(e) {
|
|
18
|
+
return {
|
|
19
|
+
amount: e.amount,
|
|
20
|
+
currency: e.currency,
|
|
21
|
+
precision: e.precision
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static fromNullableDto(t) {
|
|
25
|
+
return t == null ? null : e.fromDto(t);
|
|
26
|
+
}
|
|
27
|
+
static toDto(e) {
|
|
28
|
+
return {
|
|
29
|
+
amount: e.amount,
|
|
30
|
+
currency: e.currency,
|
|
31
|
+
precision: e.precision
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static toNullableDto(t) {
|
|
35
|
+
return t === null ? null : e.toDto(t);
|
|
36
|
+
}
|
|
37
|
+
}, Ee = class {
|
|
38
|
+
static toDto(e) {
|
|
39
|
+
let t = e.remarks?.trim() ?? "";
|
|
40
|
+
return {
|
|
41
|
+
fileUuid: e.proofOfApproval.at(0)?.uuid ?? null,
|
|
42
|
+
remarks: t === "" ? null : t
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}, De = class {
|
|
46
|
+
static toDto(e) {
|
|
47
|
+
if (e.reason === null) throw Error("A rejection reason is required");
|
|
48
|
+
let t = e.remarks?.trim() ?? "";
|
|
49
|
+
return {
|
|
50
|
+
reason: e.reason,
|
|
51
|
+
remarks: t === "" ? null : t
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}, Oe = class {
|
|
55
|
+
static toDto(e) {
|
|
56
|
+
return { customerUuid: e.customer.uuid };
|
|
57
|
+
}
|
|
58
|
+
}, R = class {
|
|
59
|
+
static fromDetailDto(e) {
|
|
60
|
+
return {
|
|
61
|
+
reminderSentAt: null,
|
|
62
|
+
sentAt: E.fromNullableDto(e.sentAt),
|
|
63
|
+
level: null,
|
|
64
|
+
status: e.status
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
static fromIndexDto(e) {
|
|
68
|
+
return e === null ? null : {
|
|
69
|
+
reminderSentAt: E.fromNullableDto(e.reminderSentAt),
|
|
70
|
+
sentAt: E.fromNullableDto(e.sentAt),
|
|
71
|
+
level: e.level,
|
|
72
|
+
status: e.status
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
static rejectionFromDetailDto(e) {
|
|
76
|
+
return e.rejectionReason === null ? null : {
|
|
77
|
+
reason: e.rejectionReason,
|
|
78
|
+
remark: e.customerRemark
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}, ke = class e {
|
|
82
|
+
static findActiveApproval(e) {
|
|
83
|
+
return e.approval.find((e) => e.isActive) ?? null;
|
|
84
|
+
}
|
|
85
|
+
static fromDto(t) {
|
|
86
|
+
let n = e.findActiveApproval(t);
|
|
87
|
+
return {
|
|
88
|
+
...Se.fromViewInvoiceDetailDto(t, t.uuid, v.STANDARD),
|
|
89
|
+
approvalUuid: n === null ? null : n.uuid,
|
|
90
|
+
hasApprovalHistory: t.approval.length > 0,
|
|
91
|
+
hasChangesSinceApprovalSent: t.hasChangesSinceApprovalSent,
|
|
92
|
+
approval: n === null ? null : R.fromDetailDto(n),
|
|
93
|
+
approvalProFormaFile: n === null ? null : N.fromNullableDto(n.proFormaFile),
|
|
94
|
+
rejection: n === null ? null : R.rejectionFromDetailDto(n),
|
|
95
|
+
requiresPriorApproval: t.requiresPriorApproval
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}, Ae = class {
|
|
99
|
+
static fromDto(e) {
|
|
100
|
+
return {
|
|
101
|
+
uuid: e.uuid,
|
|
102
|
+
createdAt: E.fromDto(e.createdAt),
|
|
103
|
+
dueOn: D.fromNullableDto(e.dueOn),
|
|
104
|
+
issuedOn: D.fromNullableDto(e.issuedOn),
|
|
105
|
+
hasChangesSinceApprovalSent: e.hasChangesSinceApprovalSent,
|
|
106
|
+
isDisputed: e.isDisputed,
|
|
107
|
+
isOverdue: e.isOverdue,
|
|
108
|
+
approval: R.fromIndexDto(e.approval),
|
|
109
|
+
balanceDueAmount: T.fromNullableDto(e.balanceDueAmount),
|
|
110
|
+
customerName: e.customer.name,
|
|
111
|
+
customFields: e.customFields.map(M.fromDto),
|
|
112
|
+
deliveryStatus: e.deliveryStatus,
|
|
113
|
+
grossAmount: T.fromDto(e.grossAmount),
|
|
114
|
+
lifecycleStatus: e.lifecycleStatus,
|
|
115
|
+
paidAmount: T.fromNullableDto(e.paidAmount),
|
|
116
|
+
requiresPriorApproval: e.requiresPriorApproval,
|
|
117
|
+
sequence: e.sequence,
|
|
118
|
+
settlementStatus: e.settlementStatus,
|
|
119
|
+
status: e.status,
|
|
120
|
+
subject: e.subject,
|
|
121
|
+
total: T.fromDto(e.netAmount),
|
|
122
|
+
totalCreditedAmount: T.fromNullableDto(e.totalCreditedAmount),
|
|
123
|
+
type: e.type
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}, z = class {
|
|
127
|
+
static toDto(e) {
|
|
128
|
+
if (e == null) return;
|
|
129
|
+
let t = e.trim();
|
|
130
|
+
return t === "" ? void 0 : t;
|
|
131
|
+
}
|
|
132
|
+
}, je = class {
|
|
133
|
+
static toDateRangeDto(e) {
|
|
134
|
+
if (e != null && e.from !== null && e.until !== null) return {
|
|
135
|
+
startDate: D.toDto(e.from),
|
|
136
|
+
endDate: D.toDto(e.until)
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
static toDto(e) {
|
|
140
|
+
let t = {};
|
|
141
|
+
if (e.filters?.approvalStatus) {
|
|
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), {
|
|
146
|
+
filter: t,
|
|
147
|
+
pagination: e.pagination,
|
|
148
|
+
search: z.toDto(e.search),
|
|
149
|
+
sort: Te.toDto(e.sort, {
|
|
150
|
+
created_at: _.CREATED_AT,
|
|
151
|
+
issued_on: _.ISSUED_ON,
|
|
152
|
+
customer: _.CUSTOMER,
|
|
153
|
+
netAmount: _.NET_AMOUNT,
|
|
154
|
+
sequence: _.SEQUENCE
|
|
155
|
+
})
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}, B = class {
|
|
159
|
+
static getCurrentLocale() {
|
|
160
|
+
return Intl.DateTimeFormat(navigator.language).resolvedOptions().locale;
|
|
161
|
+
}
|
|
162
|
+
}, V = class {
|
|
163
|
+
static earliest(...e) {
|
|
164
|
+
return e.reduce((e, t) => t.epochMilliseconds < e.epochMilliseconds ? t : e);
|
|
165
|
+
}
|
|
166
|
+
static getNow() {
|
|
167
|
+
return I.Now.instant();
|
|
168
|
+
}
|
|
169
|
+
static getToday(e = H.getCurrentTimeZone()) {
|
|
170
|
+
return this.getNow().toZonedDateTimeISO(e).toPlainDate();
|
|
171
|
+
}
|
|
172
|
+
static instantFrom(e) {
|
|
173
|
+
return I.Instant.from(e);
|
|
174
|
+
}
|
|
175
|
+
static instantFromDateAndTime(e, t, n) {
|
|
176
|
+
return e.toPlainDateTime(t).toZonedDateTime(n).toInstant();
|
|
177
|
+
}
|
|
178
|
+
static instantToPlainDate(e, t) {
|
|
179
|
+
return e.toZonedDateTimeISO(t).toPlainDate();
|
|
180
|
+
}
|
|
181
|
+
static instantToPlainTime(e, t) {
|
|
182
|
+
return e.toZonedDateTimeISO(t).toPlainTime();
|
|
183
|
+
}
|
|
184
|
+
static instantToZonedDateTime(e, t) {
|
|
185
|
+
return e.toZonedDateTimeISO(t);
|
|
186
|
+
}
|
|
187
|
+
static isAfter(e, t) {
|
|
188
|
+
return e.epochMilliseconds > t.epochMilliseconds;
|
|
189
|
+
}
|
|
190
|
+
static isBefore(e, t) {
|
|
191
|
+
return e.epochMilliseconds < t.epochMilliseconds;
|
|
192
|
+
}
|
|
193
|
+
static isEqual(e, t) {
|
|
194
|
+
return e.epochMilliseconds === t.epochMilliseconds;
|
|
195
|
+
}
|
|
196
|
+
static latest(...e) {
|
|
197
|
+
return e.reduce((e, t) => t.epochMilliseconds > e.epochMilliseconds ? t : e);
|
|
198
|
+
}
|
|
199
|
+
static plainDateAndTimeToZonedDateTime(e, t, n = H.getCurrentTimeZone()) {
|
|
200
|
+
return this.plainDateTimeFromDateAndTime(e, t).toZonedDateTime(n);
|
|
201
|
+
}
|
|
202
|
+
static plainDateRangeToDateTimeInstantRange(e) {
|
|
203
|
+
if (e.startDate === null || e.endDate === null) return null;
|
|
204
|
+
let t = H.getCurrentTimeZone();
|
|
205
|
+
return {
|
|
206
|
+
startDate: e.startDate.toZonedDateTime({ timeZone: t }).toInstant(),
|
|
207
|
+
endDate: e.endDate.toZonedDateTime({ timeZone: t }).with({
|
|
208
|
+
hour: 23,
|
|
209
|
+
millisecond: 999,
|
|
210
|
+
minute: 59,
|
|
211
|
+
second: 59
|
|
212
|
+
}).toInstant()
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
static plainDateTimeFromDateAndTime(e, t) {
|
|
216
|
+
return I.PlainDate.from(e).toPlainDateTime(I.PlainTime.from(t));
|
|
217
|
+
}
|
|
218
|
+
static plainDateTimeToZonedDateTime(e, t = H.getCurrentTimeZone()) {
|
|
219
|
+
return e.toZonedDateTime(t);
|
|
220
|
+
}
|
|
221
|
+
static plainDateToInstant(e, t) {
|
|
222
|
+
return e.toZonedDateTime(t).toInstant();
|
|
223
|
+
}
|
|
224
|
+
}, H = class {
|
|
225
|
+
static getAvailableTimeZones() {
|
|
226
|
+
return Intl.supportedValuesOf("timeZone");
|
|
227
|
+
}
|
|
228
|
+
static getCurrentTimeZone() {
|
|
229
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
230
|
+
}
|
|
231
|
+
static getOffset(e) {
|
|
232
|
+
let { offset: t } = V.getNow().toZonedDateTimeISO(e), [n, r] = t.split(":");
|
|
233
|
+
return r === "00" ? n : t;
|
|
234
|
+
}
|
|
235
|
+
}, Me = {
|
|
236
|
+
appLanguage: B.getCurrentLocale(),
|
|
237
|
+
hourCycle: "locale-default",
|
|
238
|
+
locale: B.getCurrentLocale(),
|
|
239
|
+
timeZone: H.getCurrentTimeZone()
|
|
240
|
+
};
|
|
241
|
+
we(Me);
|
|
242
|
+
//#endregion
|
|
243
|
+
//#region ../date/src/models/form/plainDateField.model.ts
|
|
244
|
+
var U = F.instanceof(I.PlainDate, { error: () => "Invalid date format" }), W = F.instanceof(I.PlainTime, { error: () => "Invalid time format" }), G = F.object({
|
|
245
|
+
date: U,
|
|
246
|
+
time: W
|
|
247
|
+
}), K = F.object({
|
|
248
|
+
date: U.nullable(),
|
|
249
|
+
time: W.nullable()
|
|
250
|
+
}).superRefine(({ date: e, time: t }, n) => {
|
|
251
|
+
e === null != (t === null) && n.addIssue({
|
|
252
|
+
code: "custom",
|
|
253
|
+
message: "Date and time must both be filled in or both be empty",
|
|
254
|
+
path: [e === null ? "date" : "time"]
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
function q(e) {
|
|
258
|
+
return I.PlainDate.from(e.date).toPlainDateTime(I.PlainTime.from(e.time));
|
|
259
|
+
}
|
|
260
|
+
function J(e, t) {
|
|
261
|
+
return q(e).since(q(t)).total("seconds") < 0;
|
|
262
|
+
}
|
|
263
|
+
F.object({
|
|
264
|
+
end: G,
|
|
265
|
+
start: G
|
|
266
|
+
}).superRefine(({ end: e, start: t }, n) => {
|
|
267
|
+
J(t, e) || n.addIssue({
|
|
268
|
+
code: "custom",
|
|
269
|
+
message: "End date/time must be after start date/time",
|
|
270
|
+
path: ["end", "time"]
|
|
271
|
+
});
|
|
272
|
+
}), F.object({
|
|
273
|
+
end: K,
|
|
274
|
+
start: K
|
|
275
|
+
}).superRefine(({ end: e, start: t }, n) => {
|
|
276
|
+
t.date !== null && t.time !== null && e.date !== null && e.time !== null && (J(t, e) || n.addIssue({
|
|
277
|
+
code: "custom",
|
|
278
|
+
message: "End date/time must be after start date/time",
|
|
279
|
+
path: ["end", "time"]
|
|
280
|
+
}));
|
|
281
|
+
}), F.object({
|
|
282
|
+
end: G,
|
|
283
|
+
start: K
|
|
284
|
+
}).superRefine(({ end: e, start: t }, n) => {
|
|
285
|
+
t.time !== null && t.date !== null && (J(t, e) || n.addIssue({
|
|
286
|
+
code: "custom",
|
|
287
|
+
message: "End date/time must be after start date/time",
|
|
288
|
+
path: ["end", "time"]
|
|
289
|
+
}));
|
|
290
|
+
}), F.object({
|
|
291
|
+
end: K,
|
|
292
|
+
start: G
|
|
293
|
+
}).superRefine(({ end: e, start: t }, n) => {
|
|
294
|
+
e.date !== null && e.time !== null && (J(t, e) || n.addIssue({
|
|
295
|
+
code: "custom",
|
|
296
|
+
message: "End date/time must be after start date/time",
|
|
297
|
+
path: ["end", "time"]
|
|
298
|
+
}));
|
|
299
|
+
});
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region ../date/src/transformers/instant.transformer.ts
|
|
302
|
+
var Ne = class {
|
|
303
|
+
static fromDto(e) {
|
|
304
|
+
return I.Instant.from(e);
|
|
305
|
+
}
|
|
306
|
+
static fromNullableDto(e) {
|
|
307
|
+
return e === null ? null : this.fromDto(e);
|
|
308
|
+
}
|
|
309
|
+
static toDto(e) {
|
|
310
|
+
return e.toString();
|
|
311
|
+
}
|
|
312
|
+
static toNullableDto(e) {
|
|
313
|
+
return e === null ? null : this.toDto(e);
|
|
314
|
+
}
|
|
315
|
+
}, Y = class {
|
|
316
|
+
static fromDto(e) {
|
|
317
|
+
return I.PlainDate.from(e);
|
|
318
|
+
}
|
|
319
|
+
static fromNullableDto(e) {
|
|
320
|
+
return e === null ? null : this.fromDto(e);
|
|
321
|
+
}
|
|
322
|
+
static toDto(e) {
|
|
323
|
+
return e.toString();
|
|
324
|
+
}
|
|
325
|
+
static toNullableDto(e) {
|
|
326
|
+
return e === null ? null : this.toDto(e);
|
|
327
|
+
}
|
|
328
|
+
}, Pe = class {
|
|
329
|
+
static fromDto(e) {
|
|
330
|
+
return {
|
|
331
|
+
uuid: e.uuid,
|
|
332
|
+
createdAt: Ne.fromDto(e.createdAt),
|
|
333
|
+
amount: L.fromDto(e.amount),
|
|
334
|
+
date: Y.fromDto(e.date),
|
|
335
|
+
paymentReference: e.paymentReference,
|
|
336
|
+
remarks: e.remarks,
|
|
337
|
+
source: e.source
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
}, Fe = class {
|
|
341
|
+
static toDto(e) {
|
|
342
|
+
return {
|
|
343
|
+
amount: L.toDto({
|
|
344
|
+
amount: C(e.amount, e.precision),
|
|
345
|
+
currency: e.currency,
|
|
346
|
+
precision: e.precision
|
|
347
|
+
}),
|
|
348
|
+
date: Y.toDto(e.date),
|
|
349
|
+
paymentReference: e.paymentReference,
|
|
350
|
+
remarks: e.remarks
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
//#endregion
|
|
355
|
+
//#region src/modules/invoice/models/invoice/pdf/invoicePdfDetail.transformer.ts
|
|
356
|
+
function Ie(e) {
|
|
357
|
+
return {
|
|
358
|
+
uuid: e.uuid,
|
|
359
|
+
createdAt: E.fromDto(e.createdAt),
|
|
360
|
+
sequence: e.sequence,
|
|
361
|
+
status: e.status
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
function X(e) {
|
|
365
|
+
return {
|
|
366
|
+
uuid: e.uuid,
|
|
367
|
+
isDiscount: e.isDiscount,
|
|
368
|
+
name: e.name,
|
|
369
|
+
customFields: e.customFields.map(M.fromDto),
|
|
370
|
+
description: e.description,
|
|
371
|
+
discount: j.fromDto(e.discount),
|
|
372
|
+
grossAmount: T.fromDto(e.grossAmount),
|
|
373
|
+
netAmount: T.fromDto(e.netAmount),
|
|
374
|
+
position: e.position,
|
|
375
|
+
quantity: e.quantity,
|
|
376
|
+
unit: e.unit,
|
|
377
|
+
unitPrice: T.fromDto(e.unitPrice),
|
|
378
|
+
vatRate: e.vatRate,
|
|
379
|
+
vatRatePercentage: O.fromDto(e.vatRatePercentage)
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
function Le(e) {
|
|
383
|
+
return {
|
|
384
|
+
uuid: e.uuid,
|
|
385
|
+
name: e.name,
|
|
386
|
+
customFields: e.customFields.map(M.fromDto),
|
|
387
|
+
description: e.description,
|
|
388
|
+
lines: e.lines.toSorted((e, t) => e.position - t.position).map(X),
|
|
389
|
+
position: e.position
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
function Re(e) {
|
|
393
|
+
return [...e.ungroupedLines, ...e.groups.flatMap((e) => e.lines)].toSorted((e, t) => e.position - t.position);
|
|
394
|
+
}
|
|
395
|
+
var ze = class {
|
|
396
|
+
static fromPublicDto(e) {
|
|
397
|
+
return {
|
|
398
|
+
createdAt: E.fromDto(e.createdAt),
|
|
399
|
+
deliveredOn: D.fromNullableDto(e.deliveredOn),
|
|
400
|
+
dueOn: D.fromNullableDto(e.dueOn),
|
|
401
|
+
issueOn: D.fromNullableDto(e.issueOn),
|
|
402
|
+
updatedAt: E.fromDto(e.updatedAt),
|
|
403
|
+
issuer: {
|
|
404
|
+
uuid: e.issuer.uuid,
|
|
405
|
+
name: e.issuer.name,
|
|
406
|
+
address: w.fromNullableDto(e.issuer.address),
|
|
407
|
+
alternativeBankAccountNumber: e.issuer.alternativeBankAccountNumber,
|
|
408
|
+
bankAccountNumber: e.issuer.bankAccountNumber,
|
|
409
|
+
email: e.issuer.email,
|
|
410
|
+
phoneNumber: e.issuer.phoneNumber,
|
|
411
|
+
vatNumber: e.issuer.vatNumber,
|
|
412
|
+
website: e.issuer.website
|
|
413
|
+
},
|
|
414
|
+
customer: {
|
|
415
|
+
uuid: e.customer.uuid,
|
|
416
|
+
name: e.customer.name,
|
|
417
|
+
address: w.fromNullableDto(e.customer.address),
|
|
418
|
+
email: e.customer.email,
|
|
419
|
+
phoneNumber: e.customer.phoneNumber,
|
|
420
|
+
vatNumber: e.customer.vatNumber
|
|
421
|
+
},
|
|
422
|
+
customFields: e.customFields.map(M.fromDto),
|
|
423
|
+
effectiveNet: T.fromDto(e.effectiveNet),
|
|
424
|
+
externalRemarks: e.externalRemarks,
|
|
425
|
+
globalDiscount: j.fromDto(e.globalDiscount),
|
|
426
|
+
grossAmount: T.fromDto(e.grossAmount),
|
|
427
|
+
groups: e.groups.toSorted((e, t) => e.position - t.position).map(Le),
|
|
428
|
+
lines: Re(e).map(X),
|
|
429
|
+
netAmount: T.fromDto(e.netAmount),
|
|
430
|
+
originalInvoice: e.originalInvoice === null ? null : Ie(e.originalInvoice),
|
|
431
|
+
paymentReference: e.paymentReference,
|
|
432
|
+
poNumber: e.poNumber,
|
|
433
|
+
recipient: e.recipient === null ? null : {
|
|
434
|
+
uuid: e.recipient.uuid,
|
|
435
|
+
name: e.recipient.name,
|
|
436
|
+
email: e.recipient.email
|
|
437
|
+
},
|
|
438
|
+
sequence: e.sequence,
|
|
439
|
+
status: e.status,
|
|
440
|
+
subject: e.subject,
|
|
441
|
+
totalDiscountAmount: T.fromNullableDto(e.totalDiscountAmount),
|
|
442
|
+
type: e.type,
|
|
443
|
+
ungroupedLines: e.ungroupedLines.map(X),
|
|
444
|
+
vatAmount: T.fromDto(e.vatAmount),
|
|
445
|
+
vatSummaries: e.vatSummaries.map((e) => ({
|
|
446
|
+
netAmount: T.fromDto(e.netAmount),
|
|
447
|
+
vatAmount: T.fromDto(e.vatAmount),
|
|
448
|
+
vatRate: e.vatRate
|
|
449
|
+
}))
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
}, Be = class {
|
|
453
|
+
static toDto(e) {
|
|
454
|
+
let t = Math.abs(e.value);
|
|
455
|
+
return e.type === y.PERCENTAGE ? { discount: {
|
|
456
|
+
amount: null,
|
|
457
|
+
description: null,
|
|
458
|
+
percentage: O.toDto(new k(t)),
|
|
459
|
+
type: e.type
|
|
460
|
+
} } : { discount: {
|
|
461
|
+
amount: T.toDto({
|
|
462
|
+
amount: S(t, e.precision),
|
|
463
|
+
currency: e.currency,
|
|
464
|
+
precision: e.precision
|
|
465
|
+
}),
|
|
466
|
+
description: null,
|
|
467
|
+
percentage: null,
|
|
468
|
+
type: e.type
|
|
469
|
+
} };
|
|
470
|
+
}
|
|
471
|
+
}, Z = class {
|
|
472
|
+
static toDto(e) {
|
|
473
|
+
return { fileUuids: e.attachments.map((e) => e.uuid) };
|
|
474
|
+
}
|
|
475
|
+
static toForm(e) {
|
|
476
|
+
return { attachments: e.map((e, t) => ({
|
|
477
|
+
uuid: e.uuid,
|
|
478
|
+
name: e.name,
|
|
479
|
+
blurHash: e.blurHash,
|
|
480
|
+
mimeType: e.mimeType,
|
|
481
|
+
order: t,
|
|
482
|
+
url: null
|
|
483
|
+
})) };
|
|
484
|
+
}
|
|
485
|
+
}, Q = class {
|
|
486
|
+
static toDto(e) {
|
|
487
|
+
return {
|
|
488
|
+
preparedByUuid: e.preparedBy.uuid,
|
|
489
|
+
deliveredOn: D.toNullableDto(e.deliveredOn),
|
|
490
|
+
dueOn: D.toDto(e.dueOn),
|
|
491
|
+
issuedOn: D.toDto(e.issuedOn),
|
|
492
|
+
customFields: e.customFields.map(M.toDto),
|
|
493
|
+
externalRemarks: P.trimOrNull(e.externalRemarks),
|
|
494
|
+
poNumber: P.trimOrNull(e.poNumber),
|
|
495
|
+
subject: P.trimOrNull(e.subject)
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
static toForm(e) {
|
|
499
|
+
return {
|
|
500
|
+
deliveredOn: e.deliveredOn,
|
|
501
|
+
dueOn: e.dueOn,
|
|
502
|
+
issuedOn: e.issueOn,
|
|
503
|
+
customFields: e.customFields,
|
|
504
|
+
externalRemarks: e.externalRemarks ?? "",
|
|
505
|
+
poNumber: e.poNumber ?? "",
|
|
506
|
+
preparedBy: e.preparedBy,
|
|
507
|
+
subject: e.subject ?? ""
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
//#endregion
|
|
512
|
+
//#region src/modules/invoice/models/invoice/update/invoiceUpdateLines.transformer.ts
|
|
513
|
+
function $(e) {
|
|
514
|
+
return {
|
|
515
|
+
isDiscount: e.quantity < 0 || e.isDiscount,
|
|
516
|
+
name: e.name,
|
|
517
|
+
customFields: e.customFields.map(M.toDto),
|
|
518
|
+
description: e.description,
|
|
519
|
+
discount: j.toDto(e.discount),
|
|
520
|
+
position: e.position,
|
|
521
|
+
quantity: e.quantity,
|
|
522
|
+
unit: e.unit,
|
|
523
|
+
unitPrice: T.toDto(e.unitPrice),
|
|
524
|
+
vatRate: e.vatRate
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
var Ve = class {
|
|
528
|
+
static toDto(e) {
|
|
529
|
+
return {
|
|
530
|
+
groups: e.groups.map((e) => ({
|
|
531
|
+
name: e.name,
|
|
532
|
+
customFields: e.customFields.map(M.toDto),
|
|
533
|
+
description: e.description,
|
|
534
|
+
lines: e.lines.map($),
|
|
535
|
+
position: e.position
|
|
536
|
+
})),
|
|
537
|
+
ungroupedLines: e.ungroupedLines.map($)
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
}, He = class {
|
|
541
|
+
static async applyDiscount(e, t) {
|
|
542
|
+
let n = await p.fromPromise(me({
|
|
543
|
+
body: Be.toDto(t),
|
|
544
|
+
path: { uuid: e }
|
|
545
|
+
}));
|
|
546
|
+
return p.void(n);
|
|
547
|
+
}
|
|
548
|
+
static async approveApproval(e, t) {
|
|
549
|
+
let n = await p.fromPromise(ve({
|
|
550
|
+
body: Ee.toDto(t),
|
|
551
|
+
path: { uuid: e }
|
|
552
|
+
}));
|
|
553
|
+
return p.void(n);
|
|
554
|
+
}
|
|
555
|
+
static async archiveApproval(e) {
|
|
556
|
+
let t = await p.fromPromise(de({ path: { uuid: e } }));
|
|
557
|
+
return p.void(t);
|
|
558
|
+
}
|
|
559
|
+
static async bulkFinalize(e) {
|
|
560
|
+
return (await p.fromPromise(ce({ query: { filter: { invoiceUuids: {
|
|
561
|
+
scope: b.INCLUDE,
|
|
562
|
+
values: e
|
|
563
|
+
} } } }))).map((e) => e.data);
|
|
564
|
+
}
|
|
565
|
+
static async bulkMarkAsReady(e) {
|
|
566
|
+
return (await p.fromPromise(ne({ query: { filter: { invoiceUuids: {
|
|
567
|
+
scope: b.INCLUDE,
|
|
568
|
+
values: e
|
|
569
|
+
} } } }))).map((e) => e.data);
|
|
570
|
+
}
|
|
571
|
+
static async bulkSend(e) {
|
|
572
|
+
return (await p.fromPromise(ie({ query: { filter: { invoiceUuids: {
|
|
573
|
+
scope: b.INCLUDE,
|
|
574
|
+
values: e
|
|
575
|
+
} } } }))).map((e) => e.data);
|
|
576
|
+
}
|
|
577
|
+
static async bulkSendApproval(e) {
|
|
578
|
+
return (await p.fromPromise(be({ query: { filter: { invoiceUuids: {
|
|
579
|
+
scope: b.INCLUDE,
|
|
580
|
+
values: e
|
|
581
|
+
} } } }))).map((e) => e.data);
|
|
582
|
+
}
|
|
583
|
+
static async create(e) {
|
|
584
|
+
return (await p.fromPromise(_e({ body: Oe.toDto(e) }))).map((e) => e.data.uuid);
|
|
585
|
+
}
|
|
586
|
+
static async createCreditNote(e) {
|
|
587
|
+
return (await p.fromPromise(ae({ path: { uuid: e } }))).map((e) => e.data.uuid);
|
|
588
|
+
}
|
|
589
|
+
static async createPayment(e, t) {
|
|
590
|
+
let n = await p.fromPromise(pe({
|
|
591
|
+
body: Fe.toDto(t),
|
|
592
|
+
path: { uuid: e }
|
|
593
|
+
}));
|
|
594
|
+
return p.void(n);
|
|
595
|
+
}
|
|
596
|
+
static async delete(e) {
|
|
597
|
+
let t = await p.fromPromise(se({ path: { uuid: e } }));
|
|
598
|
+
return p.void(t);
|
|
599
|
+
}
|
|
600
|
+
static async deletePayment(e, t) {
|
|
601
|
+
let n = await p.fromPromise(oe({ path: {
|
|
602
|
+
uuid: e,
|
|
603
|
+
paymentUuid: t
|
|
604
|
+
} }));
|
|
605
|
+
return p.void(n);
|
|
606
|
+
}
|
|
607
|
+
static async duplicate(e) {
|
|
608
|
+
return (await p.fromPromise(m({ path: { uuid: e } }))).map((e) => e.data.uuid);
|
|
609
|
+
}
|
|
610
|
+
static async finalize(e) {
|
|
611
|
+
let t = await p.fromPromise(re({ path: { uuid: e } }));
|
|
612
|
+
return p.void(t);
|
|
613
|
+
}
|
|
614
|
+
static async getActivityLogs(e, t) {
|
|
615
|
+
return (await p.fromPromise(o({ query: {
|
|
616
|
+
filter: {
|
|
617
|
+
entityUuids: [e],
|
|
618
|
+
roles: [x.INVOICE]
|
|
619
|
+
},
|
|
620
|
+
pagination: {
|
|
621
|
+
key: t.pagination.key ?? null,
|
|
622
|
+
limit: t.pagination.limit
|
|
623
|
+
}
|
|
624
|
+
} }))).map((e) => ({
|
|
625
|
+
data: e.data.logs.map(A.fromDto),
|
|
626
|
+
meta: { next: e.data.nextKey }
|
|
627
|
+
}));
|
|
628
|
+
}
|
|
629
|
+
static async getAll(e) {
|
|
630
|
+
return (await p.fromPromise(he({
|
|
631
|
+
query: je.toDto(e),
|
|
632
|
+
responseValidator: void 0
|
|
633
|
+
}))).map((e) => ({
|
|
634
|
+
data: e.data.items.map(Ae.fromDto),
|
|
635
|
+
meta: e.data.meta
|
|
636
|
+
}));
|
|
637
|
+
}
|
|
638
|
+
static async getByUuid(e) {
|
|
639
|
+
return (await p.fromPromise(xe({ path: { uuid: e } }))).map((e) => ke.fromDto(e.data));
|
|
640
|
+
}
|
|
641
|
+
static async getPayments(e) {
|
|
642
|
+
return (await p.fromPromise(ye({ path: { uuid: e } }))).map((e) => e.data.items.map(Pe.fromDto));
|
|
643
|
+
}
|
|
644
|
+
static async getPublicDetail(e) {
|
|
645
|
+
return (await p.fromPromise(ge({ query: { token: e } }))).map((e) => ze.fromPublicDto(e.data));
|
|
646
|
+
}
|
|
647
|
+
static async markAsDraft(e) {
|
|
648
|
+
let t = await p.fromPromise(u({ path: { uuid: e } }));
|
|
649
|
+
return p.void(t);
|
|
650
|
+
}
|
|
651
|
+
static async markAsPaid(e) {
|
|
652
|
+
let n = await p.fromPromise(t({ path: { uuid: e } }));
|
|
653
|
+
return p.void(n);
|
|
654
|
+
}
|
|
655
|
+
static async markAsPriorApprovalRequired(e) {
|
|
656
|
+
let t = await p.fromPromise(h({ path: { uuid: e } }));
|
|
657
|
+
return p.void(t);
|
|
658
|
+
}
|
|
659
|
+
static async markAsProtested(e) {
|
|
660
|
+
let t = await p.fromPromise(g({ path: { uuid: e } }));
|
|
661
|
+
return p.void(t);
|
|
662
|
+
}
|
|
663
|
+
static async markAsReady(e) {
|
|
664
|
+
let t = await p.fromPromise(d({ path: { uuid: e } }));
|
|
665
|
+
return p.void(t);
|
|
666
|
+
}
|
|
667
|
+
static async previewBulkFinalize(e) {
|
|
668
|
+
return (await p.fromPromise(r({ query: { filter: { invoiceUuids: {
|
|
669
|
+
scope: b.INCLUDE,
|
|
670
|
+
values: e
|
|
671
|
+
} } } }))).map((e) => e.data);
|
|
672
|
+
}
|
|
673
|
+
static async previewBulkMarkAsReady(e) {
|
|
674
|
+
return (await p.fromPromise(n({ query: { filter: { invoiceUuids: {
|
|
675
|
+
scope: b.INCLUDE,
|
|
676
|
+
values: e
|
|
677
|
+
} } } }))).map((e) => e.data);
|
|
678
|
+
}
|
|
679
|
+
static async previewBulkSend(t) {
|
|
680
|
+
return (await p.fromPromise(e({ query: { filter: { invoiceUuids: {
|
|
681
|
+
scope: b.INCLUDE,
|
|
682
|
+
values: t
|
|
683
|
+
} } } }))).map((e) => e.data);
|
|
684
|
+
}
|
|
685
|
+
static async previewBulkSendApproval(e) {
|
|
686
|
+
return (await p.fromPromise(ue({ query: { filter: { invoiceUuids: {
|
|
687
|
+
scope: b.INCLUDE,
|
|
688
|
+
values: e
|
|
689
|
+
} } } }))).map((e) => e.data);
|
|
690
|
+
}
|
|
691
|
+
static async rejectApproval(e, t) {
|
|
692
|
+
let n = await p.fromPromise(le({
|
|
693
|
+
body: De.toDto(t),
|
|
694
|
+
path: { uuid: e }
|
|
695
|
+
}));
|
|
696
|
+
return p.void(n);
|
|
697
|
+
}
|
|
698
|
+
static async restartApproval(e) {
|
|
699
|
+
let t = await p.fromPromise(c({ path: { uuid: e } }));
|
|
700
|
+
return p.void(t);
|
|
701
|
+
}
|
|
702
|
+
static async restoreFromProForma(e) {
|
|
703
|
+
let t = await p.fromPromise(l({ path: { uuid: e } }));
|
|
704
|
+
return p.void(t);
|
|
705
|
+
}
|
|
706
|
+
static async send(e) {
|
|
707
|
+
let t = await p.fromPromise(a({ path: { uuid: e } }));
|
|
708
|
+
return p.void(t);
|
|
709
|
+
}
|
|
710
|
+
static async sendApproval(e) {
|
|
711
|
+
let t = await p.fromPromise(ee({ path: { uuid: e } }));
|
|
712
|
+
return p.void(t);
|
|
713
|
+
}
|
|
714
|
+
static async unmarkAsPriorApprovalRequired(e) {
|
|
715
|
+
let t = await p.fromPromise(s({ path: { uuid: e } }));
|
|
716
|
+
return p.void(t);
|
|
717
|
+
}
|
|
718
|
+
static async update(e, t) {
|
|
719
|
+
let n = await p.fromPromise(f({
|
|
720
|
+
body: Q.toDto(t),
|
|
721
|
+
path: { uuid: e }
|
|
722
|
+
}));
|
|
723
|
+
return p.void(n);
|
|
724
|
+
}
|
|
725
|
+
static async updateAttachments(e, t) {
|
|
726
|
+
let n = await p.fromPromise(te({
|
|
727
|
+
body: Z.toDto(t),
|
|
728
|
+
path: { uuid: e }
|
|
729
|
+
}));
|
|
730
|
+
return p.void(n);
|
|
731
|
+
}
|
|
732
|
+
static async updateLines(e, t) {
|
|
733
|
+
let n = await p.fromPromise(i({
|
|
734
|
+
body: Ve.toDto(t),
|
|
735
|
+
path: { uuid: e }
|
|
736
|
+
}));
|
|
737
|
+
return p.void(n);
|
|
738
|
+
}
|
|
739
|
+
static async withdrawProtest(e) {
|
|
740
|
+
let t = await p.fromPromise(fe({ path: { uuid: e } }));
|
|
741
|
+
return p.void(t);
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
//#endregion
|
|
745
|
+
export { V as a, U as i, Q as n, z as o, Z as r, He as t };
|