@voyant-travel/finance-react 0.119.5
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/LICENSE +201 -0
- package/README.md +75 -0
- package/dist/admin/booking-invoices-widget.d.ts +19 -0
- package/dist/admin/booking-invoices-widget.d.ts.map +1 -0
- package/dist/admin/booking-invoices-widget.js +204 -0
- package/dist/admin/booking-payment-policy-widget.d.ts +21 -0
- package/dist/admin/booking-payment-policy-widget.d.ts.map +1 -0
- package/dist/admin/booking-payment-policy-widget.js +128 -0
- package/dist/admin/booking-pending-payment-sessions-widget.d.ts +24 -0
- package/dist/admin/booking-pending-payment-sessions-widget.d.ts.map +1 -0
- package/dist/admin/booking-pending-payment-sessions-widget.js +139 -0
- package/dist/admin/credit-note-dialog.d.ts +9 -0
- package/dist/admin/credit-note-dialog.d.ts.map +1 -0
- package/dist/admin/credit-note-dialog.js +70 -0
- package/dist/admin/finance-shared.d.ts +7 -0
- package/dist/admin/finance-shared.d.ts.map +1 -0
- package/dist/admin/finance-shared.js +30 -0
- package/dist/admin/index.d.ts +99 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +286 -0
- package/dist/admin/invoice-detail-host.d.ts +19 -0
- package/dist/admin/invoice-detail-host.d.ts.map +1 -0
- package/dist/admin/invoice-detail-host.js +147 -0
- package/dist/admin/invoice-detail-sections.d.ts +31 -0
- package/dist/admin/invoice-detail-sections.d.ts.map +1 -0
- package/dist/admin/invoice-detail-sections.js +109 -0
- package/dist/admin/invoice-detail-skeleton.d.ts +11 -0
- package/dist/admin/invoice-detail-skeleton.d.ts.map +1 -0
- package/dist/admin/invoice-detail-skeleton.js +33 -0
- package/dist/admin/line-item-dialog.d.ts +10 -0
- package/dist/admin/line-item-dialog.d.ts.map +1 -0
- package/dist/admin/line-item-dialog.js +91 -0
- package/dist/admin/pages/invoice-detail.d.ts +8 -0
- package/dist/admin/pages/invoice-detail.d.ts.map +1 -0
- package/dist/admin/pages/invoice-detail.js +11 -0
- package/dist/admin/pages/invoices-index.d.ts +8 -0
- package/dist/admin/pages/invoices-index.d.ts.map +1 -0
- package/dist/admin/pages/invoices-index.js +14 -0
- package/dist/admin/pages/payment-detail.d.ts +8 -0
- package/dist/admin/pages/payment-detail.d.ts.map +1 -0
- package/dist/admin/pages/payment-detail.js +11 -0
- package/dist/admin/pages/payments-index.d.ts +9 -0
- package/dist/admin/pages/payments-index.d.ts.map +1 -0
- package/dist/admin/pages/payments-index.js +21 -0
- package/dist/admin/pages/profitability.d.ts +10 -0
- package/dist/admin/pages/profitability.d.ts.map +1 -0
- package/dist/admin/pages/profitability.js +32 -0
- package/dist/admin/pages/supplier-invoice-detail.d.ts +20 -0
- package/dist/admin/pages/supplier-invoice-detail.d.ts.map +1 -0
- package/dist/admin/pages/supplier-invoice-detail.js +102 -0
- package/dist/admin/pages/supplier-invoices-index.d.ts +9 -0
- package/dist/admin/pages/supplier-invoices-index.d.ts.map +1 -0
- package/dist/admin/pages/supplier-invoices-index.js +16 -0
- package/dist/admin/payment-detail-host.d.ts +12 -0
- package/dist/admin/payment-detail-host.d.ts.map +1 -0
- package/dist/admin/payment-detail-host.js +108 -0
- package/dist/admin/payment-detail-skeleton.d.ts +8 -0
- package/dist/admin/payment-detail-skeleton.d.ts.map +1 -0
- package/dist/admin/payment-detail-skeleton.js +15 -0
- package/dist/admin/payment-dialog.d.ts +9 -0
- package/dist/admin/payment-dialog.d.ts.map +1 -0
- package/dist/admin/payment-dialog.js +99 -0
- package/dist/admin/record-payment-dialog.d.ts +16 -0
- package/dist/admin/record-payment-dialog.d.ts.map +1 -0
- package/dist/admin/record-payment-dialog.js +219 -0
- package/dist/admin/supplier-payment-policy-widget.d.ts +18 -0
- package/dist/admin/supplier-payment-policy-widget.d.ts.map +1 -0
- package/dist/admin/supplier-payment-policy-widget.js +31 -0
- package/dist/admin/use-supplier-picker.d.ts +19 -0
- package/dist/admin/use-supplier-picker.d.ts.map +1 -0
- package/dist/admin/use-supplier-picker.js +30 -0
- package/dist/checkout-components/collect-payment-dialog.d.ts +45 -0
- package/dist/checkout-components/collect-payment-dialog.d.ts.map +1 -0
- package/dist/checkout-components/collect-payment-dialog.js +121 -0
- package/dist/checkout-components/payment-link-landing-page.d.ts +76 -0
- package/dist/checkout-components/payment-link-landing-page.d.ts.map +1 -0
- package/dist/checkout-components/payment-link-landing-page.js +173 -0
- package/dist/checkout-components/payment-step.d.ts +42 -0
- package/dist/checkout-components/payment-step.d.ts.map +1 -0
- package/dist/checkout-components/payment-step.js +113 -0
- package/dist/checkout-hooks/index.d.ts +5 -0
- package/dist/checkout-hooks/index.d.ts.map +1 -0
- package/dist/checkout-hooks/index.js +4 -0
- package/dist/checkout-hooks/use-checkout-payment-link-config.d.ts +20 -0
- package/dist/checkout-hooks/use-checkout-payment-link-config.d.ts.map +1 -0
- package/dist/checkout-hooks/use-checkout-payment-link-config.js +26 -0
- package/dist/checkout-hooks/use-collect-payment.d.ts +227 -0
- package/dist/checkout-hooks/use-collect-payment.d.ts.map +1 -0
- package/dist/checkout-hooks/use-collect-payment.js +80 -0
- package/dist/checkout-hooks/use-initiate-checkout-collection.d.ts +308 -0
- package/dist/checkout-hooks/use-initiate-checkout-collection.d.ts.map +1 -0
- package/dist/checkout-hooks/use-initiate-checkout-collection.js +35 -0
- package/dist/checkout-hooks/use-preview-checkout-collection.d.ts +65 -0
- package/dist/checkout-hooks/use-preview-checkout-collection.d.ts.map +1 -0
- package/dist/checkout-hooks/use-preview-checkout-collection.js +27 -0
- package/dist/checkout-i18n/en.d.ts +3 -0
- package/dist/checkout-i18n/en.d.ts.map +1 -0
- package/dist/checkout-i18n/en.js +127 -0
- package/dist/checkout-i18n/index.d.ts +5 -0
- package/dist/checkout-i18n/index.d.ts.map +1 -0
- package/dist/checkout-i18n/index.js +3 -0
- package/dist/checkout-i18n/messages.d.ts +121 -0
- package/dist/checkout-i18n/messages.d.ts.map +1 -0
- package/dist/checkout-i18n/messages.js +1 -0
- package/dist/checkout-i18n/provider.d.ts +26 -0
- package/dist/checkout-i18n/provider.d.ts.map +1 -0
- package/dist/checkout-i18n/provider.js +41 -0
- package/dist/checkout-i18n/ro.d.ts +3 -0
- package/dist/checkout-i18n/ro.d.ts.map +1 -0
- package/dist/checkout-i18n/ro.js +127 -0
- package/dist/checkout-types.d.ts +53 -0
- package/dist/checkout-types.d.ts.map +1 -0
- package/dist/checkout-types.js +1 -0
- package/dist/checkout-ui.d.ts +7 -0
- package/dist/checkout-ui.d.ts.map +1 -0
- package/dist/checkout-ui.js +4 -0
- package/dist/checkout.d.ts +5 -0
- package/dist/checkout.d.ts.map +1 -0
- package/dist/checkout.js +3 -0
- package/dist/client.d.ts +16 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +79 -0
- package/dist/components/accountant-portal/body.d.ts +8 -0
- package/dist/components/accountant-portal/body.d.ts.map +1 -0
- package/dist/components/accountant-portal/body.js +114 -0
- package/dist/components/accountant-portal/widgets.d.ts +13 -0
- package/dist/components/accountant-portal/widgets.d.ts.map +1 -0
- package/dist/components/accountant-portal/widgets.js +27 -0
- package/dist/components/accountant-portal.d.ts +10 -0
- package/dist/components/accountant-portal.d.ts.map +1 -0
- package/dist/components/accountant-portal.js +22 -0
- package/dist/components/accountant-share-dialog.d.ts +6 -0
- package/dist/components/accountant-share-dialog.d.ts.map +1 -0
- package/dist/components/accountant-share-dialog.js +53 -0
- package/dist/components/async-combobox.d.ts +33 -0
- package/dist/components/async-combobox.d.ts.map +1 -0
- package/dist/components/async-combobox.js +100 -0
- package/dist/components/booking-invoice-dialog.d.ts +63 -0
- package/dist/components/booking-invoice-dialog.d.ts.map +1 -0
- package/dist/components/booking-invoice-dialog.js +383 -0
- package/dist/components/cost-categories-page.d.ts +5 -0
- package/dist/components/cost-categories-page.d.ts.map +1 -0
- package/dist/components/cost-categories-page.js +30 -0
- package/dist/components/invoice-action-ledger-card.d.ts +15 -0
- package/dist/components/invoice-action-ledger-card.d.ts.map +1 -0
- package/dist/components/invoice-action-ledger-card.js +76 -0
- package/dist/components/invoice-bulk-actions.d.ts +10 -0
- package/dist/components/invoice-bulk-actions.d.ts.map +1 -0
- package/dist/components/invoice-bulk-actions.js +19 -0
- package/dist/components/invoice-detail-page/cards.d.ts +44 -0
- package/dist/components/invoice-detail-page/cards.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/cards.js +43 -0
- package/dist/components/invoice-detail-page/header.d.ts +15 -0
- package/dist/components/invoice-detail-page/header.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/header.js +30 -0
- package/dist/components/invoice-detail-page/notes-dialogs.d.ts +28 -0
- package/dist/components/invoice-detail-page/notes-dialogs.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/notes-dialogs.js +104 -0
- package/dist/components/invoice-detail-page/primitives.d.ts +47 -0
- package/dist/components/invoice-detail-page/primitives.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/primitives.js +76 -0
- package/dist/components/invoice-detail-page-with-action-ledger.d.ts +7 -0
- package/dist/components/invoice-detail-page-with-action-ledger.d.ts.map +1 -0
- package/dist/components/invoice-detail-page-with-action-ledger.js +11 -0
- package/dist/components/invoice-detail-page.d.ts +46 -0
- package/dist/components/invoice-detail-page.d.ts.map +1 -0
- package/dist/components/invoice-detail-page.js +134 -0
- package/dist/components/invoice-dialog.d.ts +9 -0
- package/dist/components/invoice-dialog.d.ts.map +1 -0
- package/dist/components/invoice-dialog.js +145 -0
- package/dist/components/invoice-number-series-dialog.d.ts +9 -0
- package/dist/components/invoice-number-series-dialog.d.ts.map +1 -0
- package/dist/components/invoice-number-series-dialog.js +134 -0
- package/dist/components/invoice-number-series-format.d.ts +3 -0
- package/dist/components/invoice-number-series-format.d.ts.map +1 -0
- package/dist/components/invoice-number-series-format.js +4 -0
- package/dist/components/invoice-number-series-page.d.ts +5 -0
- package/dist/components/invoice-number-series-page.d.ts.map +1 -0
- package/dist/components/invoice-number-series-page.js +55 -0
- package/dist/components/invoice-table-parts.d.ts +25 -0
- package/dist/components/invoice-table-parts.d.ts.map +1 -0
- package/dist/components/invoice-table-parts.js +32 -0
- package/dist/components/invoices-page-skeleton.d.ts +5 -0
- package/dist/components/invoices-page-skeleton.d.ts.map +1 -0
- package/dist/components/invoices-page-skeleton.js +13 -0
- package/dist/components/invoices-page.d.ts +6 -0
- package/dist/components/invoices-page.d.ts.map +1 -0
- package/dist/components/invoices-page.js +145 -0
- package/dist/components/payment-detail-page.d.ts +47 -0
- package/dist/components/payment-detail-page.d.ts.map +1 -0
- package/dist/components/payment-detail-page.js +90 -0
- package/dist/components/payment-policy-form.d.ts +49 -0
- package/dist/components/payment-policy-form.d.ts.map +1 -0
- package/dist/components/payment-policy-form.js +82 -0
- package/dist/components/payments-page/controls.d.ts +23 -0
- package/dist/components/payments-page/controls.d.ts.map +1 -0
- package/dist/components/payments-page/controls.js +20 -0
- package/dist/components/payments-page-skeleton.d.ts +5 -0
- package/dist/components/payments-page-skeleton.d.ts.map +1 -0
- package/dist/components/payments-page-skeleton.js +13 -0
- package/dist/components/payments-page.d.ts +20 -0
- package/dist/components/payments-page.d.ts.map +1 -0
- package/dist/components/payments-page.js +143 -0
- package/dist/components/profitability-page/sections.d.ts +24 -0
- package/dist/components/profitability-page/sections.d.ts.map +1 -0
- package/dist/components/profitability-page/sections.js +43 -0
- package/dist/components/profitability-page.d.ts +13 -0
- package/dist/components/profitability-page.d.ts.map +1 -0
- package/dist/components/profitability-page.js +175 -0
- package/dist/components/record-booking-payment-dialog/shared.d.ts +54 -0
- package/dist/components/record-booking-payment-dialog/shared.d.ts.map +1 -0
- package/dist/components/record-booking-payment-dialog/shared.js +47 -0
- package/dist/components/record-booking-payment-dialog.d.ts +4 -0
- package/dist/components/record-booking-payment-dialog.d.ts.map +1 -0
- package/dist/components/record-booking-payment-dialog.js +256 -0
- package/dist/components/supplier-invoice-detail-page/dialogs.d.ts +34 -0
- package/dist/components/supplier-invoice-detail-page/dialogs.d.ts.map +1 -0
- package/dist/components/supplier-invoice-detail-page/dialogs.js +119 -0
- package/dist/components/supplier-invoice-detail-page/shared.d.ts +64 -0
- package/dist/components/supplier-invoice-detail-page/shared.d.ts.map +1 -0
- package/dist/components/supplier-invoice-detail-page/shared.js +70 -0
- package/dist/components/supplier-invoice-detail-page.d.ts +4 -0
- package/dist/components/supplier-invoice-detail-page.d.ts.map +1 -0
- package/dist/components/supplier-invoice-detail-page.js +101 -0
- package/dist/components/supplier-invoice-form-dialog.d.ts +45 -0
- package/dist/components/supplier-invoice-form-dialog.d.ts.map +1 -0
- package/dist/components/supplier-invoice-form-dialog.js +102 -0
- package/dist/components/supplier-invoices-page.d.ts +14 -0
- package/dist/components/supplier-invoices-page.d.ts.map +1 -0
- package/dist/components/supplier-invoices-page.js +69 -0
- package/dist/components/supplier-payment-dialog.d.ts +7 -0
- package/dist/components/supplier-payment-dialog.d.ts.map +1 -0
- package/dist/components/supplier-payment-dialog.js +103 -0
- package/dist/components/taxes-page/policy-profile-sheet.d.ts +8 -0
- package/dist/components/taxes-page/policy-profile-sheet.d.ts.map +1 -0
- package/dist/components/taxes-page/policy-profile-sheet.js +52 -0
- package/dist/components/taxes-page/policy-rule-sheet.d.ts +10 -0
- package/dist/components/taxes-page/policy-rule-sheet.d.ts.map +1 -0
- package/dist/components/taxes-page/policy-rule-sheet.js +137 -0
- package/dist/components/taxes-page/shared.d.ts +128 -0
- package/dist/components/taxes-page/shared.d.ts.map +1 -0
- package/dist/components/taxes-page/shared.js +288 -0
- package/dist/components/taxes-page/sheets.d.ts +4 -0
- package/dist/components/taxes-page/sheets.d.ts.map +1 -0
- package/dist/components/taxes-page/sheets.js +3 -0
- package/dist/components/taxes-page/tax-sheet.d.ts +9 -0
- package/dist/components/taxes-page/tax-sheet.d.ts.map +1 -0
- package/dist/components/taxes-page/tax-sheet.js +108 -0
- package/dist/components/taxes-page.d.ts +4 -0
- package/dist/components/taxes-page.d.ts.map +1 -0
- package/dist/components/taxes-page.js +165 -0
- package/dist/hooks/index.d.ts +53 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +52 -0
- package/dist/hooks/use-accountant-share-mutation.d.ts +20 -0
- package/dist/hooks/use-accountant-share-mutation.d.ts.map +1 -0
- package/dist/hooks/use-accountant-share-mutation.js +27 -0
- package/dist/hooks/use-accountant-shares.d.ts +13 -0
- package/dist/hooks/use-accountant-shares.d.ts.map +1 -0
- package/dist/hooks/use-accountant-shares.js +8 -0
- package/dist/hooks/use-admin-booking-payments.d.ts +30 -0
- package/dist/hooks/use-admin-booking-payments.d.ts.map +1 -0
- package/dist/hooks/use-admin-booking-payments.js +18 -0
- package/dist/hooks/use-all-payments.d.ts +35 -0
- package/dist/hooks/use-all-payments.d.ts.map +1 -0
- package/dist/hooks/use-all-payments.js +12 -0
- package/dist/hooks/use-booking-guarantees.d.ts +82 -0
- package/dist/hooks/use-booking-guarantees.d.ts.map +1 -0
- package/dist/hooks/use-booking-guarantees.js +46 -0
- package/dist/hooks/use-booking-payment-schedule-regenerate-mutation.d.ts +44 -0
- package/dist/hooks/use-booking-payment-schedule-regenerate-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-payment-schedule-regenerate-mutation.js +27 -0
- package/dist/hooks/use-booking-payment-schedules.d.ts +63 -0
- package/dist/hooks/use-booking-payment-schedules.d.ts.map +1 -0
- package/dist/hooks/use-booking-payment-schedules.js +47 -0
- package/dist/hooks/use-cost-categories.d.ts +14 -0
- package/dist/hooks/use-cost-categories.d.ts.map +1 -0
- package/dist/hooks/use-cost-categories.js +9 -0
- package/dist/hooks/use-cost-category-mutation.d.ts +31 -0
- package/dist/hooks/use-cost-category-mutation.d.ts.map +1 -0
- package/dist/hooks/use-cost-category-mutation.js +27 -0
- package/dist/hooks/use-departure-profitability.d.ts +56 -0
- package/dist/hooks/use-departure-profitability.d.ts.map +1 -0
- package/dist/hooks/use-departure-profitability.js +12 -0
- package/dist/hooks/use-finance-action-ledger.d.ts +94 -0
- package/dist/hooks/use-finance-action-ledger.d.ts.map +1 -0
- package/dist/hooks/use-finance-action-ledger.js +20 -0
- package/dist/hooks/use-invoice-attachment-mutation.d.ts +43 -0
- package/dist/hooks/use-invoice-attachment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-attachment-mutation.js +39 -0
- package/dist/hooks/use-invoice-attachments.d.ts +18 -0
- package/dist/hooks/use-invoice-attachments.d.ts.map +1 -0
- package/dist/hooks/use-invoice-attachments.js +12 -0
- package/dist/hooks/use-invoice-bulk-status-mutation.d.ts +51 -0
- package/dist/hooks/use-invoice-bulk-status-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-bulk-status-mutation.js +66 -0
- package/dist/hooks/use-invoice-credit-note-mutation.d.ts +38 -0
- package/dist/hooks/use-invoice-credit-note-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-credit-note-mutation.js +35 -0
- package/dist/hooks/use-invoice-credit-notes.d.ts +17 -0
- package/dist/hooks/use-invoice-credit-notes.d.ts.map +1 -0
- package/dist/hooks/use-invoice-credit-notes.js +12 -0
- package/dist/hooks/use-invoice-fx-rate.d.ts +19 -0
- package/dist/hooks/use-invoice-fx-rate.d.ts.map +1 -0
- package/dist/hooks/use-invoice-fx-rate.js +13 -0
- package/dist/hooks/use-invoice-line-item-mutation.d.ts +40 -0
- package/dist/hooks/use-invoice-line-item-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-line-item-mutation.js +42 -0
- package/dist/hooks/use-invoice-line-items.d.ts +17 -0
- package/dist/hooks/use-invoice-line-items.d.ts.map +1 -0
- package/dist/hooks/use-invoice-line-items.js +12 -0
- package/dist/hooks/use-invoice-mutation.d.ts +225 -0
- package/dist/hooks/use-invoice-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-mutation.js +121 -0
- package/dist/hooks/use-invoice-note-mutation.d.ts +11 -0
- package/dist/hooks/use-invoice-note-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-note-mutation.js +23 -0
- package/dist/hooks/use-invoice-notes.d.ts +13 -0
- package/dist/hooks/use-invoice-notes.d.ts.map +1 -0
- package/dist/hooks/use-invoice-notes.js +12 -0
- package/dist/hooks/use-invoice-number-series-mutation.d.ts +62 -0
- package/dist/hooks/use-invoice-number-series-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-number-series-mutation.js +39 -0
- package/dist/hooks/use-invoice-number-series.d.ts +28 -0
- package/dist/hooks/use-invoice-number-series.d.ts.map +1 -0
- package/dist/hooks/use-invoice-number-series.js +12 -0
- package/dist/hooks/use-invoice-payment-mutation.d.ts +29 -0
- package/dist/hooks/use-invoice-payment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-payment-mutation.js +35 -0
- package/dist/hooks/use-invoice-payments.d.ts +21 -0
- package/dist/hooks/use-invoice-payments.d.ts.map +1 -0
- package/dist/hooks/use-invoice-payments.js +12 -0
- package/dist/hooks/use-invoice.d.ts +32 -0
- package/dist/hooks/use-invoice.d.ts.map +1 -0
- package/dist/hooks/use-invoice.js +12 -0
- package/dist/hooks/use-invoices.d.ts +36 -0
- package/dist/hooks/use-invoices.d.ts.map +1 -0
- package/dist/hooks/use-invoices.js +12 -0
- package/dist/hooks/use-payment-mutation.d.ts +57 -0
- package/dist/hooks/use-payment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-payment-mutation.js +59 -0
- package/dist/hooks/use-payment-session-mutation.d.ts +205 -0
- package/dist/hooks/use-payment-session-mutation.d.ts.map +1 -0
- package/dist/hooks/use-payment-session-mutation.js +38 -0
- package/dist/hooks/use-payment-sessions.d.ts +97 -0
- package/dist/hooks/use-payment-sessions.d.ts.map +1 -0
- package/dist/hooks/use-payment-sessions.js +17 -0
- package/dist/hooks/use-payment.d.ts +31 -0
- package/dist/hooks/use-payment.d.ts.map +1 -0
- package/dist/hooks/use-payment.js +12 -0
- package/dist/hooks/use-product-profitability.d.ts +52 -0
- package/dist/hooks/use-product-profitability.d.ts.map +1 -0
- package/dist/hooks/use-product-profitability.js +12 -0
- package/dist/hooks/use-public-booking-documents.d.ts +29 -0
- package/dist/hooks/use-public-booking-documents.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-documents.js +12 -0
- package/dist/hooks/use-public-booking-payment-options.d.ts +47 -0
- package/dist/hooks/use-public-booking-payment-options.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-payment-options.js +12 -0
- package/dist/hooks/use-public-booking-payments.d.ts +24 -0
- package/dist/hooks/use-public-booking-payments.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-payments.js +12 -0
- package/dist/hooks/use-public-finance-document-by-reference.d.ts +27 -0
- package/dist/hooks/use-public-finance-document-by-reference.d.ts.map +1 -0
- package/dist/hooks/use-public-finance-document-by-reference.js +12 -0
- package/dist/hooks/use-public-payment-session-mutation.d.ts +82 -0
- package/dist/hooks/use-public-payment-session-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-payment-session-mutation.js +33 -0
- package/dist/hooks/use-public-payment-session.d.ts +73 -0
- package/dist/hooks/use-public-payment-session.d.ts.map +1 -0
- package/dist/hooks/use-public-payment-session.js +12 -0
- package/dist/hooks/use-public-voucher-validation-mutation.d.ts +23 -0
- package/dist/hooks/use-public-voucher-validation-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-voucher-validation-mutation.js +17 -0
- package/dist/hooks/use-supplier-invoice-attachments.d.ts +17 -0
- package/dist/hooks/use-supplier-invoice-attachments.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice-attachments.js +12 -0
- package/dist/hooks/use-supplier-invoice-mutation.d.ts +353 -0
- package/dist/hooks/use-supplier-invoice-mutation.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice-mutation.js +81 -0
- package/dist/hooks/use-supplier-invoice-payments.d.ts +26 -0
- package/dist/hooks/use-supplier-invoice-payments.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice-payments.js +12 -0
- package/dist/hooks/use-supplier-invoice.d.ts +65 -0
- package/dist/hooks/use-supplier-invoice.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice.js +12 -0
- package/dist/hooks/use-supplier-invoices.d.ts +36 -0
- package/dist/hooks/use-supplier-invoices.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoices.js +12 -0
- package/dist/hooks/use-supplier-payment-mutation.d.ts +55 -0
- package/dist/hooks/use-supplier-payment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-supplier-payment-mutation.js +35 -0
- package/dist/hooks/use-supplier-payments.d.ts +27 -0
- package/dist/hooks/use-supplier-payments.d.ts.map +1 -0
- package/dist/hooks/use-supplier-payments.js +12 -0
- package/dist/hooks/use-traveler-profitability.d.ts +24 -0
- package/dist/hooks/use-traveler-profitability.d.ts.map +1 -0
- package/dist/hooks/use-traveler-profitability.js +11 -0
- package/dist/hooks/use-voucher-mutation.d.ts +105 -0
- package/dist/hooks/use-voucher-mutation.d.ts.map +1 -0
- package/dist/hooks/use-voucher-mutation.js +50 -0
- package/dist/hooks/use-voucher.d.ts +38 -0
- package/dist/hooks/use-voucher.d.ts.map +1 -0
- package/dist/hooks/use-voucher.js +17 -0
- package/dist/hooks/use-vouchers.d.ts +34 -0
- package/dist/hooks/use-vouchers.d.ts.map +1 -0
- package/dist/hooks/use-vouchers.js +18 -0
- package/dist/i18n/en/invoices.d.ts +278 -0
- package/dist/i18n/en/invoices.d.ts.map +1 -0
- package/dist/i18n/en/invoices.js +277 -0
- package/dist/i18n/en/numberingAndPayments.d.ts +387 -0
- package/dist/i18n/en/numberingAndPayments.d.ts.map +1 -0
- package/dist/i18n/en/numberingAndPayments.js +386 -0
- package/dist/i18n/en/profitability.d.ts +147 -0
- package/dist/i18n/en/profitability.d.ts.map +1 -0
- package/dist/i18n/en/profitability.js +146 -0
- package/dist/i18n/en/suppliers.d.ts +187 -0
- package/dist/i18n/en/suppliers.d.ts.map +1 -0
- package/dist/i18n/en/suppliers.js +186 -0
- package/dist/i18n/en.d.ts +998 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +22 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/messages/core.d.ts +18 -0
- package/dist/i18n/messages/core.d.ts.map +1 -0
- package/dist/i18n/messages/core.js +30 -0
- package/dist/i18n/messages/invoices.d.ts +252 -0
- package/dist/i18n/messages/invoices.d.ts.map +1 -0
- package/dist/i18n/messages/invoices.js +1 -0
- package/dist/i18n/messages/numberingAndPayments.d.ts +277 -0
- package/dist/i18n/messages/numberingAndPayments.d.ts.map +1 -0
- package/dist/i18n/messages/numberingAndPayments.js +1 -0
- package/dist/i18n/messages/profitability.d.ts +151 -0
- package/dist/i18n/messages/profitability.d.ts.map +1 -0
- package/dist/i18n/messages/profitability.js +1 -0
- package/dist/i18n/messages/suppliers.d.ts +167 -0
- package/dist/i18n/messages/suppliers.d.ts.map +1 -0
- package/dist/i18n/messages/suppliers.js +1 -0
- package/dist/i18n/messages.d.ts +29 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +2018 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +44 -0
- package/dist/i18n/ro/invoices.d.ts +278 -0
- package/dist/i18n/ro/invoices.d.ts.map +1 -0
- package/dist/i18n/ro/invoices.js +277 -0
- package/dist/i18n/ro/numberingAndPayments.d.ts +387 -0
- package/dist/i18n/ro/numberingAndPayments.d.ts.map +1 -0
- package/dist/i18n/ro/numberingAndPayments.js +386 -0
- package/dist/i18n/ro/profitability.d.ts +147 -0
- package/dist/i18n/ro/profitability.d.ts.map +1 -0
- package/dist/i18n/ro/profitability.js +146 -0
- package/dist/i18n/ro/suppliers.d.ts +187 -0
- package/dist/i18n/ro/suppliers.d.ts.map +1 -0
- package/dist/i18n/ro/suppliers.js +186 -0
- package/dist/i18n/ro.d.ts +998 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +22 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/operations.d.ts +484 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +52 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +1 -0
- package/dist/query-keys.d.ts +195 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +49 -0
- package/dist/query-options/public-reporting.d.ts +2129 -0
- package/dist/query-options/public-reporting.d.ts.map +1 -0
- package/dist/query-options/public-reporting.js +193 -0
- package/dist/query-options-action-ledger.d.ts +382 -0
- package/dist/query-options-action-ledger.d.ts.map +1 -0
- package/dist/query-options-action-ledger.js +36 -0
- package/dist/query-options.d.ts +2057 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +328 -0
- package/dist/schemas/accountant.d.ts +168 -0
- package/dist/schemas/accountant.d.ts.map +1 -0
- package/dist/schemas/accountant.js +53 -0
- package/dist/schemas/action-ledger.d.ts +206 -0
- package/dist/schemas/action-ledger.d.ts.map +1 -0
- package/dist/schemas/action-ledger.js +83 -0
- package/dist/schemas/common.d.ts +17 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +10 -0
- package/dist/schemas/invoice.d.ts +1451 -0
- package/dist/schemas/invoice.d.ts.map +1 -0
- package/dist/schemas/invoice.js +438 -0
- package/dist/schemas/profitability.d.ts +333 -0
- package/dist/schemas/profitability.d.ts.map +1 -0
- package/dist/schemas/profitability.js +84 -0
- package/dist/schemas/public.d.ts +481 -0
- package/dist/schemas/public.d.ts.map +1 -0
- package/dist/schemas/public.js +9 -0
- package/dist/schemas/responses.d.ts +632 -0
- package/dist/schemas/responses.d.ts.map +1 -0
- package/dist/schemas/responses.js +27 -0
- package/dist/schemas/supplier.d.ts +226 -0
- package/dist/schemas/supplier.d.ts.map +1 -0
- package/dist/schemas/supplier.js +103 -0
- package/dist/schemas/vouchers.d.ts +283 -0
- package/dist/schemas/vouchers.d.ts.map +1 -0
- package/dist/schemas/vouchers.js +49 -0
- package/dist/schemas.d.ts +10 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +9 -0
- package/dist/ui.d.ts +27 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +26 -0
- package/package.json +181 -0
- package/src/styles.css +12 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { type ApServiceType } from "../schemas.js";
|
|
2
|
+
export interface SupplierInvoiceLineInput {
|
|
3
|
+
description: string;
|
|
4
|
+
serviceType?: ApServiceType;
|
|
5
|
+
costCategoryId?: string | null;
|
|
6
|
+
supplierServiceId?: string | null;
|
|
7
|
+
quantity?: number;
|
|
8
|
+
unitAmountCents: number;
|
|
9
|
+
taxRateBps?: number | null;
|
|
10
|
+
taxAmountCents?: number;
|
|
11
|
+
totalAmountCents: number;
|
|
12
|
+
sortOrder?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface SupplierCostAllocationInput {
|
|
15
|
+
supplierInvoiceLineId?: string | null;
|
|
16
|
+
targetType: "departure" | "product" | "booking" | "traveler" | "unattributed";
|
|
17
|
+
departureId?: string | null;
|
|
18
|
+
productId?: string | null;
|
|
19
|
+
bookingId?: string | null;
|
|
20
|
+
bookingItemId?: string | null;
|
|
21
|
+
travelerId?: string | null;
|
|
22
|
+
amountCents: number;
|
|
23
|
+
baseAmountCents?: number | null;
|
|
24
|
+
splitMethod?: "manual" | "per_pax" | "equal" | "weighted";
|
|
25
|
+
}
|
|
26
|
+
export interface CreateSupplierInvoiceInput {
|
|
27
|
+
supplierId: string;
|
|
28
|
+
supplierInvoiceNo: string;
|
|
29
|
+
internalRef?: string | null;
|
|
30
|
+
status?: "draft" | "received" | "approved" | "partially_paid" | "paid" | "disputed" | "void";
|
|
31
|
+
currency: string;
|
|
32
|
+
baseCurrency?: string | null;
|
|
33
|
+
fxRateSetId?: string | null;
|
|
34
|
+
subtotalCents?: number;
|
|
35
|
+
taxCents?: number;
|
|
36
|
+
totalCents?: number;
|
|
37
|
+
taxRegimeId?: string | null;
|
|
38
|
+
issueDate: string;
|
|
39
|
+
dueDate?: string | null;
|
|
40
|
+
storageKey?: string | null;
|
|
41
|
+
notes?: string | null;
|
|
42
|
+
lines?: SupplierInvoiceLineInput[];
|
|
43
|
+
allocations?: SupplierCostAllocationInput[];
|
|
44
|
+
}
|
|
45
|
+
export type UpdateSupplierInvoiceInput = Partial<Omit<CreateSupplierInvoiceInput, "lines" | "allocations">>;
|
|
46
|
+
export interface CreateSupplierInvoiceAttachmentInput {
|
|
47
|
+
name: string;
|
|
48
|
+
kind?: string;
|
|
49
|
+
mimeType?: string | null;
|
|
50
|
+
fileSize?: number | null;
|
|
51
|
+
storageKey?: string | null;
|
|
52
|
+
checksum?: string | null;
|
|
53
|
+
}
|
|
54
|
+
export interface RecordSupplierPaymentInput {
|
|
55
|
+
amountCents: number;
|
|
56
|
+
currency: string;
|
|
57
|
+
paymentMethod: string;
|
|
58
|
+
status?: "pending" | "completed" | "failed" | "refunded";
|
|
59
|
+
paymentDate: string;
|
|
60
|
+
referenceNumber?: string | null;
|
|
61
|
+
notes?: string | null;
|
|
62
|
+
baseCurrency?: string | null;
|
|
63
|
+
baseAmountCents?: number | null;
|
|
64
|
+
fxRateSetId?: string | null;
|
|
65
|
+
supplierId?: string | null;
|
|
66
|
+
bookingId?: string | null;
|
|
67
|
+
}
|
|
68
|
+
export declare function useSupplierInvoiceMutation(): {
|
|
69
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
70
|
+
id: string;
|
|
71
|
+
supplierId: string;
|
|
72
|
+
supplierInvoiceNo: string;
|
|
73
|
+
internalRef: string | null;
|
|
74
|
+
status: "draft" | "partially_paid" | "paid" | "void" | "received" | "approved" | "disputed";
|
|
75
|
+
currency: string;
|
|
76
|
+
baseCurrency: string | null;
|
|
77
|
+
fxRateSetId: string | null;
|
|
78
|
+
subtotalCents: number;
|
|
79
|
+
taxCents: number;
|
|
80
|
+
totalCents: number;
|
|
81
|
+
paidCents: number;
|
|
82
|
+
balanceDueCents: number;
|
|
83
|
+
taxRegimeId: string | null;
|
|
84
|
+
issueDate: string;
|
|
85
|
+
dueDate: string | null;
|
|
86
|
+
receivedAt: string | null;
|
|
87
|
+
approvedAt: string | null;
|
|
88
|
+
approvedBy: string | null;
|
|
89
|
+
storageKey: string | null;
|
|
90
|
+
extractionId: string | null;
|
|
91
|
+
notes: string | null;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
updatedAt: string;
|
|
94
|
+
lines: {
|
|
95
|
+
id: string;
|
|
96
|
+
supplierInvoiceId: string;
|
|
97
|
+
description: string;
|
|
98
|
+
serviceType: "other" | "accommodation" | "transport" | "flight" | "guide" | "meal" | "experience" | "insurance";
|
|
99
|
+
supplierServiceId: string | null;
|
|
100
|
+
quantity: number;
|
|
101
|
+
unitAmountCents: number;
|
|
102
|
+
taxRateBps: number | null;
|
|
103
|
+
taxAmountCents: number;
|
|
104
|
+
totalAmountCents: number;
|
|
105
|
+
sortOrder: number;
|
|
106
|
+
createdAt: string;
|
|
107
|
+
updatedAt: string;
|
|
108
|
+
costCategoryId?: string | null | undefined;
|
|
109
|
+
}[];
|
|
110
|
+
allocations: {
|
|
111
|
+
id: string;
|
|
112
|
+
supplierInvoiceId: string;
|
|
113
|
+
supplierInvoiceLineId: string | null;
|
|
114
|
+
targetType: "booking" | "departure" | "product" | "traveler" | "unattributed";
|
|
115
|
+
departureId: string | null;
|
|
116
|
+
productId: string | null;
|
|
117
|
+
bookingId: string | null;
|
|
118
|
+
bookingItemId: string | null;
|
|
119
|
+
travelerId: string | null;
|
|
120
|
+
amountCents: number;
|
|
121
|
+
baseAmountCents: number | null;
|
|
122
|
+
splitMethod: "manual" | "per_pax" | "equal" | "weighted";
|
|
123
|
+
createdAt: string;
|
|
124
|
+
updatedAt: string;
|
|
125
|
+
targetLabel?: string | null | undefined;
|
|
126
|
+
}[];
|
|
127
|
+
}, Error, CreateSupplierInvoiceInput, unknown>;
|
|
128
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
129
|
+
id: string;
|
|
130
|
+
supplierId: string;
|
|
131
|
+
supplierInvoiceNo: string;
|
|
132
|
+
internalRef: string | null;
|
|
133
|
+
status: "draft" | "partially_paid" | "paid" | "void" | "received" | "approved" | "disputed";
|
|
134
|
+
currency: string;
|
|
135
|
+
baseCurrency: string | null;
|
|
136
|
+
fxRateSetId: string | null;
|
|
137
|
+
subtotalCents: number;
|
|
138
|
+
taxCents: number;
|
|
139
|
+
totalCents: number;
|
|
140
|
+
paidCents: number;
|
|
141
|
+
balanceDueCents: number;
|
|
142
|
+
taxRegimeId: string | null;
|
|
143
|
+
issueDate: string;
|
|
144
|
+
dueDate: string | null;
|
|
145
|
+
receivedAt: string | null;
|
|
146
|
+
approvedAt: string | null;
|
|
147
|
+
approvedBy: string | null;
|
|
148
|
+
storageKey: string | null;
|
|
149
|
+
extractionId: string | null;
|
|
150
|
+
notes: string | null;
|
|
151
|
+
createdAt: string;
|
|
152
|
+
updatedAt: string;
|
|
153
|
+
lines: {
|
|
154
|
+
id: string;
|
|
155
|
+
supplierInvoiceId: string;
|
|
156
|
+
description: string;
|
|
157
|
+
serviceType: "other" | "accommodation" | "transport" | "flight" | "guide" | "meal" | "experience" | "insurance";
|
|
158
|
+
supplierServiceId: string | null;
|
|
159
|
+
quantity: number;
|
|
160
|
+
unitAmountCents: number;
|
|
161
|
+
taxRateBps: number | null;
|
|
162
|
+
taxAmountCents: number;
|
|
163
|
+
totalAmountCents: number;
|
|
164
|
+
sortOrder: number;
|
|
165
|
+
createdAt: string;
|
|
166
|
+
updatedAt: string;
|
|
167
|
+
costCategoryId?: string | null | undefined;
|
|
168
|
+
}[];
|
|
169
|
+
allocations: {
|
|
170
|
+
id: string;
|
|
171
|
+
supplierInvoiceId: string;
|
|
172
|
+
supplierInvoiceLineId: string | null;
|
|
173
|
+
targetType: "booking" | "departure" | "product" | "traveler" | "unattributed";
|
|
174
|
+
departureId: string | null;
|
|
175
|
+
productId: string | null;
|
|
176
|
+
bookingId: string | null;
|
|
177
|
+
bookingItemId: string | null;
|
|
178
|
+
travelerId: string | null;
|
|
179
|
+
amountCents: number;
|
|
180
|
+
baseAmountCents: number | null;
|
|
181
|
+
splitMethod: "manual" | "per_pax" | "equal" | "weighted";
|
|
182
|
+
createdAt: string;
|
|
183
|
+
updatedAt: string;
|
|
184
|
+
targetLabel?: string | null | undefined;
|
|
185
|
+
}[];
|
|
186
|
+
}, Error, {
|
|
187
|
+
id: string;
|
|
188
|
+
input: UpdateSupplierInvoiceInput;
|
|
189
|
+
}, unknown>;
|
|
190
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
191
|
+
data: {
|
|
192
|
+
id: string;
|
|
193
|
+
} | null;
|
|
194
|
+
}, Error, string, unknown>;
|
|
195
|
+
setLines: import("@tanstack/react-query").UseMutationResult<{
|
|
196
|
+
id: string;
|
|
197
|
+
supplierId: string;
|
|
198
|
+
supplierInvoiceNo: string;
|
|
199
|
+
internalRef: string | null;
|
|
200
|
+
status: "draft" | "partially_paid" | "paid" | "void" | "received" | "approved" | "disputed";
|
|
201
|
+
currency: string;
|
|
202
|
+
baseCurrency: string | null;
|
|
203
|
+
fxRateSetId: string | null;
|
|
204
|
+
subtotalCents: number;
|
|
205
|
+
taxCents: number;
|
|
206
|
+
totalCents: number;
|
|
207
|
+
paidCents: number;
|
|
208
|
+
balanceDueCents: number;
|
|
209
|
+
taxRegimeId: string | null;
|
|
210
|
+
issueDate: string;
|
|
211
|
+
dueDate: string | null;
|
|
212
|
+
receivedAt: string | null;
|
|
213
|
+
approvedAt: string | null;
|
|
214
|
+
approvedBy: string | null;
|
|
215
|
+
storageKey: string | null;
|
|
216
|
+
extractionId: string | null;
|
|
217
|
+
notes: string | null;
|
|
218
|
+
createdAt: string;
|
|
219
|
+
updatedAt: string;
|
|
220
|
+
lines: {
|
|
221
|
+
id: string;
|
|
222
|
+
supplierInvoiceId: string;
|
|
223
|
+
description: string;
|
|
224
|
+
serviceType: "other" | "accommodation" | "transport" | "flight" | "guide" | "meal" | "experience" | "insurance";
|
|
225
|
+
supplierServiceId: string | null;
|
|
226
|
+
quantity: number;
|
|
227
|
+
unitAmountCents: number;
|
|
228
|
+
taxRateBps: number | null;
|
|
229
|
+
taxAmountCents: number;
|
|
230
|
+
totalAmountCents: number;
|
|
231
|
+
sortOrder: number;
|
|
232
|
+
createdAt: string;
|
|
233
|
+
updatedAt: string;
|
|
234
|
+
costCategoryId?: string | null | undefined;
|
|
235
|
+
}[];
|
|
236
|
+
allocations: {
|
|
237
|
+
id: string;
|
|
238
|
+
supplierInvoiceId: string;
|
|
239
|
+
supplierInvoiceLineId: string | null;
|
|
240
|
+
targetType: "booking" | "departure" | "product" | "traveler" | "unattributed";
|
|
241
|
+
departureId: string | null;
|
|
242
|
+
productId: string | null;
|
|
243
|
+
bookingId: string | null;
|
|
244
|
+
bookingItemId: string | null;
|
|
245
|
+
travelerId: string | null;
|
|
246
|
+
amountCents: number;
|
|
247
|
+
baseAmountCents: number | null;
|
|
248
|
+
splitMethod: "manual" | "per_pax" | "equal" | "weighted";
|
|
249
|
+
createdAt: string;
|
|
250
|
+
updatedAt: string;
|
|
251
|
+
targetLabel?: string | null | undefined;
|
|
252
|
+
}[];
|
|
253
|
+
}, Error, {
|
|
254
|
+
id: string;
|
|
255
|
+
lines: SupplierInvoiceLineInput[];
|
|
256
|
+
}, unknown>;
|
|
257
|
+
setAllocations: import("@tanstack/react-query").UseMutationResult<{
|
|
258
|
+
id: string;
|
|
259
|
+
supplierId: string;
|
|
260
|
+
supplierInvoiceNo: string;
|
|
261
|
+
internalRef: string | null;
|
|
262
|
+
status: "draft" | "partially_paid" | "paid" | "void" | "received" | "approved" | "disputed";
|
|
263
|
+
currency: string;
|
|
264
|
+
baseCurrency: string | null;
|
|
265
|
+
fxRateSetId: string | null;
|
|
266
|
+
subtotalCents: number;
|
|
267
|
+
taxCents: number;
|
|
268
|
+
totalCents: number;
|
|
269
|
+
paidCents: number;
|
|
270
|
+
balanceDueCents: number;
|
|
271
|
+
taxRegimeId: string | null;
|
|
272
|
+
issueDate: string;
|
|
273
|
+
dueDate: string | null;
|
|
274
|
+
receivedAt: string | null;
|
|
275
|
+
approvedAt: string | null;
|
|
276
|
+
approvedBy: string | null;
|
|
277
|
+
storageKey: string | null;
|
|
278
|
+
extractionId: string | null;
|
|
279
|
+
notes: string | null;
|
|
280
|
+
createdAt: string;
|
|
281
|
+
updatedAt: string;
|
|
282
|
+
lines: {
|
|
283
|
+
id: string;
|
|
284
|
+
supplierInvoiceId: string;
|
|
285
|
+
description: string;
|
|
286
|
+
serviceType: "other" | "accommodation" | "transport" | "flight" | "guide" | "meal" | "experience" | "insurance";
|
|
287
|
+
supplierServiceId: string | null;
|
|
288
|
+
quantity: number;
|
|
289
|
+
unitAmountCents: number;
|
|
290
|
+
taxRateBps: number | null;
|
|
291
|
+
taxAmountCents: number;
|
|
292
|
+
totalAmountCents: number;
|
|
293
|
+
sortOrder: number;
|
|
294
|
+
createdAt: string;
|
|
295
|
+
updatedAt: string;
|
|
296
|
+
costCategoryId?: string | null | undefined;
|
|
297
|
+
}[];
|
|
298
|
+
allocations: {
|
|
299
|
+
id: string;
|
|
300
|
+
supplierInvoiceId: string;
|
|
301
|
+
supplierInvoiceLineId: string | null;
|
|
302
|
+
targetType: "booking" | "departure" | "product" | "traveler" | "unattributed";
|
|
303
|
+
departureId: string | null;
|
|
304
|
+
productId: string | null;
|
|
305
|
+
bookingId: string | null;
|
|
306
|
+
bookingItemId: string | null;
|
|
307
|
+
travelerId: string | null;
|
|
308
|
+
amountCents: number;
|
|
309
|
+
baseAmountCents: number | null;
|
|
310
|
+
splitMethod: "manual" | "per_pax" | "equal" | "weighted";
|
|
311
|
+
createdAt: string;
|
|
312
|
+
updatedAt: string;
|
|
313
|
+
targetLabel?: string | null | undefined;
|
|
314
|
+
}[];
|
|
315
|
+
}, Error, {
|
|
316
|
+
id: string;
|
|
317
|
+
allocations: SupplierCostAllocationInput[];
|
|
318
|
+
}, unknown>;
|
|
319
|
+
recordPayment: import("@tanstack/react-query").UseMutationResult<{
|
|
320
|
+
id: string;
|
|
321
|
+
bookingId: string | null;
|
|
322
|
+
supplierId: string | null;
|
|
323
|
+
amountCents: number;
|
|
324
|
+
currency: string;
|
|
325
|
+
paymentMethod: string;
|
|
326
|
+
status: "pending" | "completed" | "failed" | "refunded";
|
|
327
|
+
referenceNumber: string | null;
|
|
328
|
+
paymentDate: string;
|
|
329
|
+
createdAt: string;
|
|
330
|
+
supplierInvoiceId?: string | null | undefined;
|
|
331
|
+
baseCurrency?: string | null | undefined;
|
|
332
|
+
baseAmountCents?: number | null | undefined;
|
|
333
|
+
fxRateSetId?: string | null | undefined;
|
|
334
|
+
notes?: string | null | undefined;
|
|
335
|
+
} | null, Error, {
|
|
336
|
+
id: string;
|
|
337
|
+
input: RecordSupplierPaymentInput;
|
|
338
|
+
}, unknown>;
|
|
339
|
+
addAttachment: import("@tanstack/react-query").UseMutationResult<{
|
|
340
|
+
[x: string]: unknown;
|
|
341
|
+
id: string;
|
|
342
|
+
}, Error, {
|
|
343
|
+
id: string;
|
|
344
|
+
input: CreateSupplierInvoiceAttachmentInput;
|
|
345
|
+
}, unknown>;
|
|
346
|
+
removeAttachment: import("@tanstack/react-query").UseMutationResult<{
|
|
347
|
+
success: boolean;
|
|
348
|
+
}, Error, {
|
|
349
|
+
id: string;
|
|
350
|
+
attachmentId: string;
|
|
351
|
+
}, unknown>;
|
|
352
|
+
};
|
|
353
|
+
//# sourceMappingURL=use-supplier-invoice-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-supplier-invoice-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-supplier-invoice-mutation.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { fetchWithValidation } from "../client.js";
|
|
5
|
+
import { useVoyantFinanceContext } from "../provider.js";
|
|
6
|
+
import { financeQueryKeys } from "../query-keys.js";
|
|
7
|
+
import { supplierInvoiceSingleResponse, supplierPaymentRecordSchema, } from "../schemas.js";
|
|
8
|
+
const supplierPaymentSingleResponse = z.object({ data: supplierPaymentRecordSchema.nullable() });
|
|
9
|
+
export function useSupplierInvoiceMutation() {
|
|
10
|
+
const { baseUrl, fetcher } = useVoyantFinanceContext();
|
|
11
|
+
const queryClient = useQueryClient();
|
|
12
|
+
const client = { baseUrl, fetcher };
|
|
13
|
+
const invalidate = (id) => {
|
|
14
|
+
void queryClient.invalidateQueries({ queryKey: financeQueryKeys.supplierInvoices() });
|
|
15
|
+
if (id)
|
|
16
|
+
void queryClient.invalidateQueries({ queryKey: financeQueryKeys.supplierInvoice(id) });
|
|
17
|
+
};
|
|
18
|
+
const invalidateAttachments = (id) => void queryClient.invalidateQueries({
|
|
19
|
+
queryKey: financeQueryKeys.supplierInvoiceAttachments(id),
|
|
20
|
+
});
|
|
21
|
+
const create = useMutation({
|
|
22
|
+
mutationFn: async (input) => {
|
|
23
|
+
const { data } = await fetchWithValidation("/v1/admin/finance/supplier-invoices", supplierInvoiceSingleResponse, client, { method: "POST", body: JSON.stringify(input) });
|
|
24
|
+
return data;
|
|
25
|
+
},
|
|
26
|
+
onSuccess: (data) => invalidate(data.id),
|
|
27
|
+
});
|
|
28
|
+
const update = useMutation({
|
|
29
|
+
mutationFn: async ({ id, input }) => {
|
|
30
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/supplier-invoices/${id}`, supplierInvoiceSingleResponse, client, { method: "PATCH", body: JSON.stringify(input) });
|
|
31
|
+
return data;
|
|
32
|
+
},
|
|
33
|
+
onSuccess: (data) => invalidate(data.id),
|
|
34
|
+
});
|
|
35
|
+
const remove = useMutation({
|
|
36
|
+
mutationFn: async (id) => fetchWithValidation(`/v1/admin/finance/supplier-invoices/${id}`, z.object({ data: z.object({ id: z.string() }).nullable() }), client, { method: "DELETE" }),
|
|
37
|
+
onSuccess: (_data, id) => invalidate(id),
|
|
38
|
+
});
|
|
39
|
+
const setLines = useMutation({
|
|
40
|
+
mutationFn: async ({ id, lines }) => {
|
|
41
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/supplier-invoices/${id}/lines`, supplierInvoiceSingleResponse, client, { method: "PUT", body: JSON.stringify({ lines }) });
|
|
42
|
+
return data;
|
|
43
|
+
},
|
|
44
|
+
onSuccess: (data) => invalidate(data.id),
|
|
45
|
+
});
|
|
46
|
+
const setAllocations = useMutation({
|
|
47
|
+
mutationFn: async ({ id, allocations, }) => {
|
|
48
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/supplier-invoices/${id}/allocations`, supplierInvoiceSingleResponse, client, { method: "PUT", body: JSON.stringify({ allocations }) });
|
|
49
|
+
return data;
|
|
50
|
+
},
|
|
51
|
+
onSuccess: (data) => invalidate(data.id),
|
|
52
|
+
});
|
|
53
|
+
const recordPayment = useMutation({
|
|
54
|
+
mutationFn: async ({ id, input }) => {
|
|
55
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/supplier-invoices/${id}/payments`, supplierPaymentSingleResponse, client, { method: "POST", body: JSON.stringify(input) });
|
|
56
|
+
return data;
|
|
57
|
+
},
|
|
58
|
+
onSuccess: (_data, variables) => invalidate(variables.id),
|
|
59
|
+
});
|
|
60
|
+
const addAttachment = useMutation({
|
|
61
|
+
mutationFn: async ({ id, input, }) => {
|
|
62
|
+
const { data } = await fetchWithValidation(`/v1/admin/finance/supplier-invoices/${id}/attachments`, z.object({ data: z.object({ id: z.string() }).passthrough() }), client, { method: "POST", body: JSON.stringify(input) });
|
|
63
|
+
return data;
|
|
64
|
+
},
|
|
65
|
+
onSuccess: (_data, variables) => invalidateAttachments(variables.id),
|
|
66
|
+
});
|
|
67
|
+
const removeAttachment = useMutation({
|
|
68
|
+
mutationFn: async ({ id, attachmentId }) => fetchWithValidation(`/v1/admin/finance/supplier-invoices/${id}/attachments/${attachmentId}`, z.object({ success: z.boolean() }), client, { method: "DELETE" }),
|
|
69
|
+
onSuccess: (_data, variables) => invalidateAttachments(variables.id),
|
|
70
|
+
});
|
|
71
|
+
return {
|
|
72
|
+
create,
|
|
73
|
+
update,
|
|
74
|
+
remove,
|
|
75
|
+
setLines,
|
|
76
|
+
setAllocations,
|
|
77
|
+
recordPayment,
|
|
78
|
+
addAttachment,
|
|
79
|
+
removeAttachment,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface UseSupplierInvoicePaymentsOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useSupplierInvoicePayments(id: string | null | undefined, options?: UseSupplierInvoicePaymentsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
bookingId: string | null;
|
|
8
|
+
supplierId: string | null;
|
|
9
|
+
amountCents: number;
|
|
10
|
+
currency: string;
|
|
11
|
+
paymentMethod: string;
|
|
12
|
+
status: "pending" | "completed" | "failed" | "refunded";
|
|
13
|
+
referenceNumber: string | null;
|
|
14
|
+
paymentDate: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
supplierInvoiceId?: string | null | undefined;
|
|
17
|
+
baseCurrency?: string | null | undefined;
|
|
18
|
+
baseAmountCents?: number | null | undefined;
|
|
19
|
+
fxRateSetId?: string | null | undefined;
|
|
20
|
+
notes?: string | null | undefined;
|
|
21
|
+
}[];
|
|
22
|
+
total: number;
|
|
23
|
+
limit: number;
|
|
24
|
+
offset: number;
|
|
25
|
+
}, Error>;
|
|
26
|
+
//# sourceMappingURL=use-supplier-invoice-payments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-supplier-invoice-payments.d.ts","sourceRoot":"","sources":["../../src/hooks/use-supplier-invoice-payments.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,iCAAiC;IAChD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,0BAA0B,CACxC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7B,OAAO,GAAE,iCAAsC;;;;;;;;;;;;;;;;;;;;;UAShD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantFinanceContext } from "../provider.js";
|
|
4
|
+
import { getSupplierInvoicePaymentsQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useSupplierInvoicePayments(id, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantFinanceContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getSupplierInvoicePaymentsQueryOptions({ baseUrl, fetcher }, id),
|
|
10
|
+
enabled: enabled && Boolean(id),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export interface UseSupplierInvoiceOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function useSupplierInvoice(id: string | null | undefined, options?: UseSupplierInvoiceOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
supplierId: string;
|
|
8
|
+
supplierInvoiceNo: string;
|
|
9
|
+
internalRef: string | null;
|
|
10
|
+
status: "draft" | "partially_paid" | "paid" | "void" | "received" | "approved" | "disputed";
|
|
11
|
+
currency: string;
|
|
12
|
+
baseCurrency: string | null;
|
|
13
|
+
fxRateSetId: string | null;
|
|
14
|
+
subtotalCents: number;
|
|
15
|
+
taxCents: number;
|
|
16
|
+
totalCents: number;
|
|
17
|
+
paidCents: number;
|
|
18
|
+
balanceDueCents: number;
|
|
19
|
+
taxRegimeId: string | null;
|
|
20
|
+
issueDate: string;
|
|
21
|
+
dueDate: string | null;
|
|
22
|
+
receivedAt: string | null;
|
|
23
|
+
approvedAt: string | null;
|
|
24
|
+
approvedBy: string | null;
|
|
25
|
+
storageKey: string | null;
|
|
26
|
+
extractionId: string | null;
|
|
27
|
+
notes: string | null;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
lines: {
|
|
31
|
+
id: string;
|
|
32
|
+
supplierInvoiceId: string;
|
|
33
|
+
description: string;
|
|
34
|
+
serviceType: "other" | "accommodation" | "transport" | "flight" | "guide" | "meal" | "experience" | "insurance";
|
|
35
|
+
supplierServiceId: string | null;
|
|
36
|
+
quantity: number;
|
|
37
|
+
unitAmountCents: number;
|
|
38
|
+
taxRateBps: number | null;
|
|
39
|
+
taxAmountCents: number;
|
|
40
|
+
totalAmountCents: number;
|
|
41
|
+
sortOrder: number;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
updatedAt: string;
|
|
44
|
+
costCategoryId?: string | null | undefined;
|
|
45
|
+
}[];
|
|
46
|
+
allocations: {
|
|
47
|
+
id: string;
|
|
48
|
+
supplierInvoiceId: string;
|
|
49
|
+
supplierInvoiceLineId: string | null;
|
|
50
|
+
targetType: "booking" | "departure" | "product" | "traveler" | "unattributed";
|
|
51
|
+
departureId: string | null;
|
|
52
|
+
productId: string | null;
|
|
53
|
+
bookingId: string | null;
|
|
54
|
+
bookingItemId: string | null;
|
|
55
|
+
travelerId: string | null;
|
|
56
|
+
amountCents: number;
|
|
57
|
+
baseAmountCents: number | null;
|
|
58
|
+
splitMethod: "manual" | "per_pax" | "equal" | "weighted";
|
|
59
|
+
createdAt: string;
|
|
60
|
+
updatedAt: string;
|
|
61
|
+
targetLabel?: string | null | undefined;
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
}, Error>;
|
|
65
|
+
//# sourceMappingURL=use-supplier-invoice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-supplier-invoice.d.ts","sourceRoot":"","sources":["../../src/hooks/use-supplier-invoice.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,kBAAkB,CAChC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7B,OAAO,GAAE,yBAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UASxC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantFinanceContext } from "../provider.js";
|
|
4
|
+
import { getSupplierInvoiceQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useSupplierInvoice(id, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantFinanceContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getSupplierInvoiceQueryOptions({ baseUrl, fetcher }, id),
|
|
10
|
+
enabled: enabled && Boolean(id),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { FinanceSupplierInvoiceListFilters } from "../query-keys.js";
|
|
2
|
+
export interface UseSupplierInvoicesOptions extends FinanceSupplierInvoiceListFilters {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useSupplierInvoices(options?: UseSupplierInvoicesOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
6
|
+
data: {
|
|
7
|
+
id: string;
|
|
8
|
+
supplierId: string;
|
|
9
|
+
supplierInvoiceNo: string;
|
|
10
|
+
internalRef: string | null;
|
|
11
|
+
status: "draft" | "partially_paid" | "paid" | "void" | "received" | "approved" | "disputed";
|
|
12
|
+
currency: string;
|
|
13
|
+
baseCurrency: string | null;
|
|
14
|
+
fxRateSetId: string | null;
|
|
15
|
+
subtotalCents: number;
|
|
16
|
+
taxCents: number;
|
|
17
|
+
totalCents: number;
|
|
18
|
+
paidCents: number;
|
|
19
|
+
balanceDueCents: number;
|
|
20
|
+
taxRegimeId: string | null;
|
|
21
|
+
issueDate: string;
|
|
22
|
+
dueDate: string | null;
|
|
23
|
+
receivedAt: string | null;
|
|
24
|
+
approvedAt: string | null;
|
|
25
|
+
approvedBy: string | null;
|
|
26
|
+
storageKey: string | null;
|
|
27
|
+
extractionId: string | null;
|
|
28
|
+
notes: string | null;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
}[];
|
|
32
|
+
total: number;
|
|
33
|
+
limit: number;
|
|
34
|
+
offset: number;
|
|
35
|
+
}, Error>;
|
|
36
|
+
//# sourceMappingURL=use-supplier-invoices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-supplier-invoices.d.ts","sourceRoot":"","sources":["../../src/hooks/use-supplier-invoices.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,kBAAkB,CAAA;AAGzE,MAAM,WAAW,0BAA2B,SAAQ,iCAAiC;IACnF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,0BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQ3E"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantFinanceContext } from "../provider.js";
|
|
4
|
+
import { getSupplierInvoicesQueryOptions } from "../query-options.js";
|
|
5
|
+
export function useSupplierInvoices(options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantFinanceContext();
|
|
7
|
+
const { enabled = true, ...filters } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getSupplierInvoicesQueryOptions({ baseUrl, fetcher }, filters),
|
|
10
|
+
enabled,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export interface CreateSupplierPaymentInput {
|
|
2
|
+
bookingId: string;
|
|
3
|
+
supplierId?: string | null;
|
|
4
|
+
amountCents: number;
|
|
5
|
+
currency: string;
|
|
6
|
+
baseCurrency?: string | null;
|
|
7
|
+
baseAmountCents?: number | null;
|
|
8
|
+
fxRateSetId?: string | null;
|
|
9
|
+
paymentMethod: "bank_transfer" | "credit_card" | "cash" | "cheque" | "other";
|
|
10
|
+
status: "pending" | "completed" | "failed" | "refunded";
|
|
11
|
+
referenceNumber?: string | null;
|
|
12
|
+
paymentDate: string;
|
|
13
|
+
notes?: string | null;
|
|
14
|
+
}
|
|
15
|
+
export type UpdateSupplierPaymentInput = Partial<CreateSupplierPaymentInput>;
|
|
16
|
+
export declare function useSupplierPaymentMutation(): {
|
|
17
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
18
|
+
id: string;
|
|
19
|
+
bookingId: string | null;
|
|
20
|
+
supplierId: string | null;
|
|
21
|
+
amountCents: number;
|
|
22
|
+
currency: string;
|
|
23
|
+
paymentMethod: string;
|
|
24
|
+
status: "pending" | "completed" | "failed" | "refunded";
|
|
25
|
+
referenceNumber: string | null;
|
|
26
|
+
paymentDate: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
supplierInvoiceId?: string | null | undefined;
|
|
29
|
+
baseCurrency?: string | null | undefined;
|
|
30
|
+
baseAmountCents?: number | null | undefined;
|
|
31
|
+
fxRateSetId?: string | null | undefined;
|
|
32
|
+
notes?: string | null | undefined;
|
|
33
|
+
}, Error, CreateSupplierPaymentInput, unknown>;
|
|
34
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
35
|
+
id: string;
|
|
36
|
+
bookingId: string | null;
|
|
37
|
+
supplierId: string | null;
|
|
38
|
+
amountCents: number;
|
|
39
|
+
currency: string;
|
|
40
|
+
paymentMethod: string;
|
|
41
|
+
status: "pending" | "completed" | "failed" | "refunded";
|
|
42
|
+
referenceNumber: string | null;
|
|
43
|
+
paymentDate: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
supplierInvoiceId?: string | null | undefined;
|
|
46
|
+
baseCurrency?: string | null | undefined;
|
|
47
|
+
baseAmountCents?: number | null | undefined;
|
|
48
|
+
fxRateSetId?: string | null | undefined;
|
|
49
|
+
notes?: string | null | undefined;
|
|
50
|
+
}, Error, {
|
|
51
|
+
id: string;
|
|
52
|
+
input: UpdateSupplierPaymentInput;
|
|
53
|
+
}, unknown>;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=use-supplier-payment-mutation.d.ts.map
|