@spaceinvoices/react-ui 0.4.11 → 0.4.12
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/cli/dist/index.js +1 -1
- package/package.json +3 -2
- package/registry.json +30 -31
- package/src/common/autocomplete.tsx +41 -25
- package/src/components/activities/locales/bg.ts +21 -0
- package/src/components/activities/locales/cs.ts +21 -0
- package/src/components/activities/locales/en.ts +21 -0
- package/src/components/activities/locales/et.ts +21 -0
- package/src/components/activities/locales/fi.ts +21 -0
- package/src/components/activities/locales/is.ts +21 -0
- package/src/components/activities/locales/nb.ts +21 -0
- package/src/components/activities/locales/sk.ts +21 -0
- package/src/components/activities/locales/sv.ts +21 -0
- package/src/components/advance-invoices/advance-invoices.hooks.ts +2 -3
- package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +290 -69
- package/src/components/advance-invoices/create/locales/bg.ts +48 -0
- package/src/components/advance-invoices/create/locales/cs.ts +48 -0
- package/src/components/advance-invoices/create/locales/en.ts +48 -0
- package/src/components/advance-invoices/create/locales/et.ts +48 -0
- package/src/components/advance-invoices/create/locales/fi.ts +48 -0
- package/src/components/advance-invoices/create/locales/hr.ts +17 -17
- package/src/components/advance-invoices/create/locales/is.ts +48 -0
- package/src/components/advance-invoices/create/locales/nb.ts +48 -0
- package/src/components/advance-invoices/create/locales/sk.ts +48 -0
- package/src/components/advance-invoices/create/locales/sl.ts +9 -7
- package/src/components/advance-invoices/create/locales/sv.ts +48 -0
- package/src/components/advance-invoices/create/prepare-advance-invoice-submission.ts +16 -2
- package/src/components/advance-invoices/list/list-row-actions.tsx +48 -16
- package/src/components/advance-invoices/list/list-table.tsx +33 -8
- package/src/components/advance-invoices/list/locales/bg.ts +51 -0
- package/src/components/advance-invoices/list/locales/cs.ts +51 -0
- package/src/components/advance-invoices/list/locales/en.ts +33 -2
- package/src/components/advance-invoices/list/locales/et.ts +51 -0
- package/src/components/advance-invoices/list/locales/fi.ts +51 -0
- package/src/components/advance-invoices/list/locales/hr.ts +15 -15
- package/src/components/advance-invoices/list/locales/is.ts +51 -0
- package/src/components/advance-invoices/list/locales/nb.ts +51 -0
- package/src/components/advance-invoices/list/locales/sk.ts +51 -0
- package/src/components/advance-invoices/list/locales/sv.ts +51 -0
- package/src/components/advance-invoices/list/use-advance-invoice-download.ts +3 -5
- package/src/components/common/autocomplete-locales.ts +101 -0
- package/src/components/company-registry/company-registry.hooks.ts +3 -7
- package/src/components/credit-notes/create/create-credit-note-form.tsx +211 -22
- package/src/components/credit-notes/create/locales/bg.ts +87 -0
- package/src/components/credit-notes/create/locales/cs.ts +87 -0
- package/src/components/credit-notes/create/locales/en.ts +87 -0
- package/src/components/credit-notes/create/locales/et.ts +87 -0
- package/src/components/credit-notes/create/locales/fi.ts +87 -0
- package/src/components/credit-notes/create/locales/hr.ts +24 -24
- package/src/components/credit-notes/create/locales/is.ts +87 -0
- package/src/components/credit-notes/create/locales/nb.ts +87 -0
- package/src/components/credit-notes/create/locales/sk.ts +87 -0
- package/src/components/credit-notes/create/locales/sl.ts +9 -9
- package/src/components/credit-notes/create/locales/sv.ts +87 -0
- package/src/components/credit-notes/create/prepare-credit-note-submission.ts +32 -0
- package/src/components/credit-notes/credit-notes.hooks.ts +15 -3
- package/src/components/credit-notes/list/list-row-actions.tsx +19 -7
- package/src/components/credit-notes/list/list-table.tsx +58 -7
- package/src/components/credit-notes/list/locales/bg.ts +48 -0
- package/src/components/credit-notes/list/locales/cs.ts +48 -0
- package/src/components/credit-notes/list/locales/en.ts +31 -2
- package/src/components/credit-notes/list/locales/et.ts +48 -0
- package/src/components/credit-notes/list/locales/fi.ts +48 -0
- package/src/components/credit-notes/list/locales/hr.ts +12 -12
- package/src/components/credit-notes/list/locales/is.ts +48 -0
- package/src/components/credit-notes/list/locales/nb.ts +48 -0
- package/src/components/credit-notes/list/locales/sk.ts +48 -0
- package/src/components/credit-notes/list/locales/sv.ts +48 -0
- package/src/components/credit-notes/list/use-credit-note-download.ts +3 -5
- package/src/components/customers/create-customer-form/locales/bg.ts +21 -0
- package/src/components/customers/create-customer-form/locales/cs.ts +21 -0
- package/src/components/customers/create-customer-form/locales/en.ts +21 -0
- package/src/components/customers/create-customer-form/locales/et.ts +21 -0
- package/src/components/customers/create-customer-form/locales/fi.ts +21 -0
- package/src/components/customers/create-customer-form/locales/hr.ts +11 -11
- package/src/components/customers/create-customer-form/locales/is.ts +21 -0
- package/src/components/customers/create-customer-form/locales/nb.ts +21 -0
- package/src/components/customers/create-customer-form/locales/sk.ts +21 -0
- package/src/components/customers/create-customer-form/locales/sv.ts +21 -0
- package/src/components/customers/customer-autocomplete.tsx +32 -4
- package/src/components/customers/customer-list-table/customer-list-table.tsx +8 -6
- package/src/components/customers/customer-list-table/locales/bg.ts +25 -0
- package/src/components/customers/customer-list-table/locales/cs.ts +25 -0
- package/src/components/customers/customer-list-table/locales/en.ts +17 -2
- package/src/components/customers/customer-list-table/locales/et.ts +25 -0
- package/src/components/customers/customer-list-table/locales/fi.ts +25 -0
- package/src/components/customers/customer-list-table/locales/hr.ts +11 -11
- package/src/components/customers/customer-list-table/locales/is.ts +25 -0
- package/src/components/customers/customer-list-table/locales/nb.ts +25 -0
- package/src/components/customers/customer-list-table/locales/sk.ts +25 -0
- package/src/components/customers/customer-list-table/locales/sv.ts +25 -0
- package/src/components/customers/customers.hooks.ts +14 -17
- package/src/components/customers/edit-customer-form/locales/bg.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/cs.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/en.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/et.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/fi.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/hr.ts +5 -5
- package/src/components/customers/edit-customer-form/locales/is.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/nb.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/sk.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/sv.ts +13 -0
- package/src/components/dashboard/collection-rate-card/collection-rate-card.tsx +7 -6
- package/src/components/dashboard/collection-rate-card/locales/en.ts +3 -0
- package/src/components/dashboard/collection-rate-card/use-collection-rate.ts +8 -7
- package/src/components/dashboard/invoice-status-chart/invoice-status-chart.tsx +7 -4
- package/src/components/dashboard/invoice-status-chart/locales/bg.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/cs.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/de.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/en.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/es.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/et.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/fi.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/fr.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/hr.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/is.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/it.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/nb.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/nl.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/pl.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/pt.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/sk.ts +5 -5
- package/src/components/dashboard/invoice-status-chart/locales/sl.ts +1 -1
- package/src/components/dashboard/invoice-status-chart/locales/sv.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/bg.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/cs.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/en.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/et.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/fi.ts +6 -6
- package/src/components/dashboard/payment-methods-chart/locales/hr.ts +3 -3
- package/src/components/dashboard/payment-methods-chart/locales/is.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/nb.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/sk.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/locales/sv.ts +5 -5
- package/src/components/dashboard/payment-methods-chart/payment-methods-chart.tsx +4 -3
- package/src/components/dashboard/payment-trend-chart/locales/bg.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/cs.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/en.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/et.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/fi.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/is.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/nb.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/sk.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/locales/sv.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/payment-trend-chart.tsx +4 -3
- package/src/components/dashboard/payment-trend-chart/use-payment-trend.ts +12 -9
- package/src/components/dashboard/revenue-card.tsx +3 -3
- package/src/components/dashboard/revenue-trend-chart/locales/bg.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/cs.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/en.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/et.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/fi.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/is.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/nb.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/sk.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/locales/sv.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/revenue-trend-chart.tsx +4 -3
- package/src/components/dashboard/revenue-trend-chart/use-revenue-trend.ts +4 -3
- package/src/components/dashboard/shared/local-date.ts +11 -0
- package/src/components/dashboard/shared/use-revenue-data.ts +6 -5
- package/src/components/dashboard/shared/use-stats-query.ts +7 -11
- package/src/components/dashboard/stat-card.tsx +3 -3
- package/src/components/dashboard/tax-collected-card/tax-collected-card.tsx +11 -9
- package/src/components/dashboard/tax-collected-card/use-tax-collected.ts +3 -2
- package/src/components/dashboard/top-customers-chart/locales/bg.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/cs.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/en.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/et.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/fi.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/is.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/nb.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/sk.ts +2 -2
- package/src/components/dashboard/top-customers-chart/locales/sv.ts +2 -2
- package/src/components/dashboard/top-customers-chart/top-customers-chart.tsx +4 -3
- package/src/components/dashboard/top-customers-chart/use-top-customers.ts +7 -20
- package/src/components/delivery-notes/create/create-delivery-note-form.tsx +61 -31
- package/src/components/delivery-notes/create/locales/bg.ts +68 -0
- package/src/components/delivery-notes/create/locales/cs.ts +68 -0
- package/src/components/delivery-notes/create/locales/en.ts +68 -0
- package/src/components/delivery-notes/create/locales/et.ts +68 -0
- package/src/components/delivery-notes/create/locales/fi.ts +68 -0
- package/src/components/delivery-notes/create/locales/hr.ts +6 -6
- package/src/components/delivery-notes/create/locales/is.ts +68 -0
- package/src/components/delivery-notes/create/locales/nb.ts +68 -0
- package/src/components/delivery-notes/create/locales/sk.ts +68 -0
- package/src/components/delivery-notes/create/locales/sl.ts +5 -5
- package/src/components/delivery-notes/create/locales/sv.ts +68 -0
- package/src/components/delivery-notes/delivery-notes.hooks.ts +20 -3
- package/src/components/delivery-notes/list/list-row-actions.tsx +62 -16
- package/src/components/delivery-notes/list/list-table.tsx +42 -9
- package/src/components/delivery-notes/list/locales/bg.ts +40 -0
- package/src/components/delivery-notes/list/locales/cs.ts +40 -0
- package/src/components/delivery-notes/list/locales/et.ts +40 -0
- package/src/components/delivery-notes/list/locales/fi.ts +40 -0
- package/src/components/delivery-notes/list/locales/is.ts +40 -0
- package/src/components/delivery-notes/list/locales/nb.ts +40 -0
- package/src/components/delivery-notes/list/locales/sk.ts +40 -0
- package/src/components/delivery-notes/list/locales/sv.ts +40 -0
- package/src/components/delivery-notes/list/use-delivery-note-download.ts +3 -5
- package/src/components/documents/create/document-add-item-form.tsx +256 -147
- package/src/components/documents/create/document-add-item-tax-rate-field.tsx +2 -1
- package/src/components/documents/create/document-details-section.tsx +30 -12
- package/src/components/documents/create/document-item-validation.ts +50 -0
- package/src/components/documents/create/document-items-section.tsx +44 -6
- package/src/components/documents/create/document-recipient-section.tsx +10 -2
- package/src/components/documents/create/linked-documents-info.tsx +4 -3
- package/src/components/documents/create/live-preview.tsx +19 -15
- package/src/components/documents/create/mark-as-paid-section.tsx +77 -20
- package/src/components/documents/create/payment-rows.ts +291 -0
- package/src/components/documents/create/prepare-document-submission.ts +24 -13
- package/src/components/documents/create/scroll-to-first-invalid-field.ts +27 -0
- package/src/components/documents/create/smart-code-insert-button.tsx +5 -53
- package/src/components/documents/create/use-document-customer-form.ts +74 -25
- package/src/components/documents/documents.hooks.ts +3 -5
- package/src/components/documents/index.ts +1 -0
- package/src/components/documents/public/index.ts +1 -0
- package/src/components/documents/public/public-document-summary.tsx +343 -0
- package/src/components/documents/shared/document-preview-display.tsx +65 -39
- package/src/components/documents/shared/index.ts +6 -1
- package/src/components/documents/shared/scaled-document-preview.tsx +33 -19
- package/src/components/documents/types.ts +24 -0
- package/src/components/documents/view/document-actions-bar.tsx +241 -62
- package/src/components/documents/view/document-activities-list.tsx +23 -11
- package/src/components/documents/view/document-details-card.tsx +7 -27
- package/src/components/documents/view/document-payments-list.tsx +114 -57
- package/src/components/documents/view/document-relations-list.tsx +26 -6
- package/src/components/documents/view/document-sidebar.tsx +25 -3
- package/src/components/documents/view/document-version-history.tsx +137 -0
- package/src/components/documents/view/index.ts +1 -0
- package/src/components/documents/view/locales/bg.ts +143 -0
- package/src/components/documents/view/locales/cs.ts +143 -0
- package/src/components/documents/view/locales/de.ts +13 -0
- package/src/components/documents/view/locales/en.ts +143 -0
- package/src/components/documents/view/locales/es.ts +13 -0
- package/src/components/documents/view/locales/et.ts +143 -0
- package/src/components/documents/view/locales/fi.ts +143 -0
- package/src/components/documents/view/locales/fr.ts +13 -0
- package/src/components/documents/view/locales/hr.ts +13 -0
- package/src/components/documents/view/locales/is.ts +143 -0
- package/src/components/documents/view/locales/it.ts +13 -0
- package/src/components/documents/view/locales/nb.ts +143 -0
- package/src/components/documents/view/locales/nl.ts +13 -0
- package/src/components/documents/view/locales/pl.ts +13 -0
- package/src/components/documents/view/locales/pt.ts +13 -0
- package/src/components/documents/view/locales/sk.ts +143 -0
- package/src/components/documents/view/locales/sl.ts +13 -0
- package/src/components/documents/view/locales/sv.ts +143 -0
- package/src/components/documents/view/use-document-download.ts +18 -17
- package/src/components/entities/create-entity-form.tsx +200 -12
- package/src/components/entities/entities.hooks.ts +15 -7
- package/src/components/entities/entity-settings-form/entity-settings-form.tsx +121 -65
- package/src/components/entities/entity-settings-form/input-with-preview.tsx +28 -4
- package/src/components/entities/entity-settings-form/locales/bg.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/cs.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/de.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/en.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/es.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/et.ts +198 -0
- package/src/components/entities/entity-settings-form/locales/fi.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/fr.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/hr.ts +16 -11
- package/src/components/entities/entity-settings-form/locales/is.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/it.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/nb.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/nl.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/pl.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/pt.ts +8 -3
- package/src/components/entities/entity-settings-form/locales/sk.ts +199 -0
- package/src/components/entities/entity-settings-form/locales/sl.ts +20 -15
- package/src/components/entities/entity-settings-form/locales/sv.ts +205 -0
- package/src/components/entities/fina-settings-form/fina-operator-required-dialog.tsx +34 -9
- package/src/components/entities/fina-settings-form/fina-settings-form.tsx +2 -0
- package/src/components/entities/fina-settings-form/fina-settings.hooks.ts +14 -45
- package/src/components/entities/fina-settings-form/locales/bg.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/cs.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/et.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/fi.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/hr.ts +11 -10
- package/src/components/entities/fina-settings-form/locales/is.ts +164 -0
- package/src/components/entities/fina-settings-form/locales/nb.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/sk.ts +163 -0
- package/src/components/entities/fina-settings-form/locales/sl.ts +8 -7
- package/src/components/entities/fina-settings-form/locales/sv.ts +165 -0
- package/src/components/entities/furs-settings-form/furs-operator-required-dialog.tsx +34 -9
- package/src/components/entities/furs-settings-form/furs-settings-form.tsx +13 -1
- package/src/components/entities/furs-settings-form/furs-settings.hooks.ts +141 -42
- package/src/components/entities/furs-settings-form/locales/bg.ts +242 -0
- package/src/components/entities/furs-settings-form/locales/cs.ts +241 -0
- package/src/components/entities/furs-settings-form/locales/de.ts +42 -15
- package/src/components/entities/furs-settings-form/locales/en.ts +24 -0
- package/src/components/entities/furs-settings-form/locales/es.ts +42 -15
- package/src/components/entities/furs-settings-form/locales/et.ts +242 -0
- package/src/components/entities/furs-settings-form/locales/fi.ts +243 -0
- package/src/components/entities/furs-settings-form/locales/fr.ts +43 -15
- package/src/components/entities/furs-settings-form/locales/hr.ts +44 -19
- package/src/components/entities/furs-settings-form/locales/is.ts +242 -0
- package/src/components/entities/furs-settings-form/locales/it.ts +42 -15
- package/src/components/entities/furs-settings-form/locales/nb.ts +242 -0
- package/src/components/entities/furs-settings-form/locales/nl.ts +42 -15
- package/src/components/entities/furs-settings-form/locales/pl.ts +40 -15
- package/src/components/entities/furs-settings-form/locales/pt.ts +42 -15
- package/src/components/entities/furs-settings-form/locales/sk.ts +243 -0
- package/src/components/entities/furs-settings-form/locales/sl.ts +34 -10
- package/src/components/entities/furs-settings-form/locales/sv.ts +242 -0
- package/src/components/entities/furs-settings-form/sections/enable-fiscalization-section.tsx +11 -0
- package/src/components/entities/furs-settings-form/sections/furs-internal-act-download-card.tsx +111 -0
- package/src/components/entities/furs-settings-form/sections/general-settings-section.tsx +27 -0
- package/src/components/entities/furs-settings-form/sections/premises-management-section.tsx +23 -16
- package/src/components/entities/furs-settings-form/sections/register-premise-dialog.tsx +89 -31
- package/src/components/entities/settings/branding-settings-form.tsx +11 -30
- package/src/components/entities/settings/company-settings-form.tsx +2 -1
- package/src/components/entities/settings/defaults-settings-form.tsx +106 -3
- package/src/components/entities/settings/email-settings-form.tsx +245 -3
- package/src/components/entities/settings/eslog-settings-form.tsx +2 -1
- package/src/components/entities/settings/number-format-settings-form.tsx +2 -1
- package/src/components/entities/settings/pdf-template-selector/locales/bg.ts +20 -0
- package/src/components/entities/settings/pdf-template-selector/locales/cs.ts +20 -0
- package/src/components/entities/settings/pdf-template-selector/locales/en.ts +20 -0
- package/src/components/entities/settings/pdf-template-selector/locales/et.ts +19 -0
- package/src/components/entities/settings/pdf-template-selector/locales/fi.ts +20 -0
- package/src/components/entities/settings/pdf-template-selector/locales/is.ts +19 -0
- package/src/components/entities/settings/pdf-template-selector/locales/nb.ts +19 -0
- package/src/components/entities/settings/pdf-template-selector/locales/sk.ts +20 -0
- package/src/components/entities/settings/pdf-template-selector/locales/sv.ts +19 -0
- package/src/components/entities/settings/tax-rules-settings-form.tsx +21 -6
- package/src/components/estimates/create/create-estimate-form.tsx +70 -34
- package/src/components/estimates/create/locales/bg.ts +76 -0
- package/src/components/estimates/create/locales/cs.ts +76 -0
- package/src/components/estimates/create/locales/en.ts +76 -0
- package/src/components/estimates/create/locales/et.ts +76 -0
- package/src/components/estimates/create/locales/fi.ts +76 -0
- package/src/components/estimates/create/locales/hr.ts +8 -8
- package/src/components/estimates/create/locales/is.ts +76 -0
- package/src/components/estimates/create/locales/nb.ts +76 -0
- package/src/components/estimates/create/locales/sk.ts +76 -0
- package/src/components/estimates/create/locales/sl.ts +8 -8
- package/src/components/estimates/create/locales/sv.ts +76 -0
- package/src/components/estimates/create/prepare-estimate-submission.ts +4 -1
- package/src/components/estimates/estimates.hooks.ts +15 -3
- package/src/components/estimates/list/list-row-actions.tsx +34 -7
- package/src/components/estimates/list/list-table.tsx +78 -10
- package/src/components/estimates/list/locales/bg.ts +38 -0
- package/src/components/estimates/list/locales/cs.ts +38 -0
- package/src/components/estimates/list/locales/en.ts +27 -2
- package/src/components/estimates/list/locales/et.ts +38 -0
- package/src/components/estimates/list/locales/fi.ts +38 -0
- package/src/components/estimates/list/locales/hr.ts +2 -2
- package/src/components/estimates/list/locales/is.ts +38 -0
- package/src/components/estimates/list/locales/nb.ts +38 -0
- package/src/components/estimates/list/locales/sk.ts +38 -0
- package/src/components/estimates/list/locales/sv.ts +38 -0
- package/src/components/estimates/list/use-estimate-download.ts +3 -5
- package/src/components/export/document-export-form.tsx +72 -15
- package/src/components/export/sales-per-item-export-form.tsx +3 -2
- package/src/components/invoices/create/create-invoice-form.tsx +294 -76
- package/src/components/invoices/create/eslog-validation.ts +97 -8
- package/src/components/invoices/create/locales/bg.ts +164 -0
- package/src/components/invoices/create/locales/cs.ts +164 -0
- package/src/components/invoices/create/locales/de.ts +24 -0
- package/src/components/invoices/create/locales/en.ts +164 -0
- package/src/components/invoices/create/locales/es.ts +24 -0
- package/src/components/invoices/create/locales/et.ts +164 -0
- package/src/components/invoices/create/locales/fi.ts +164 -0
- package/src/components/invoices/create/locales/fr.ts +23 -0
- package/src/components/invoices/create/locales/hr.ts +32 -9
- package/src/components/invoices/create/locales/is.ts +164 -0
- package/src/components/invoices/create/locales/it.ts +24 -0
- package/src/components/invoices/create/locales/nb.ts +164 -0
- package/src/components/invoices/create/locales/nl.ts +23 -0
- package/src/components/invoices/create/locales/pl.ts +23 -0
- package/src/components/invoices/create/locales/pt.ts +24 -0
- package/src/components/invoices/create/locales/sk.ts +164 -0
- package/src/components/invoices/create/locales/sl.ts +32 -9
- package/src/components/invoices/create/locales/sv.ts +166 -0
- package/src/components/invoices/create/prepare-invoice-submission.ts +19 -2
- package/src/components/invoices/invoices-furs.hooks.ts +11 -8
- package/src/components/invoices/invoices.hooks.ts +27 -10
- package/src/components/invoices/list/list-row-actions.tsx +54 -21
- package/src/components/invoices/list/list-table.tsx +92 -11
- package/src/components/invoices/list/locales/bg.ts +49 -0
- package/src/components/invoices/list/locales/cs.ts +49 -0
- package/src/components/invoices/list/locales/en.ts +34 -2
- package/src/components/invoices/list/locales/et.ts +49 -0
- package/src/components/invoices/list/locales/fi.ts +49 -0
- package/src/components/invoices/list/locales/is.ts +49 -0
- package/src/components/invoices/list/locales/nb.ts +49 -0
- package/src/components/invoices/list/locales/sk.ts +49 -0
- package/src/components/invoices/list/locales/sv.ts +49 -0
- package/src/components/invoices/list/use-invoice-download.ts +3 -5
- package/src/components/invoices/send-email-dialog/locales/bg.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/cs.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/de.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/en.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/es.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/et.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/fi.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/fr.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/hr.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/is.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/it.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/nb.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/nl.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/pl.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/pt.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/sk.ts +58 -0
- package/src/components/invoices/send-email-dialog/locales/sl.ts +21 -0
- package/src/components/invoices/send-email-dialog/locales/sv.ts +58 -0
- package/src/components/invoices/send-email-dialog/send-email-dialog.tsx +188 -93
- package/src/components/invoices/view/eslog-info-display.tsx +2 -0
- package/src/components/invoices/view/fiscalization-status-card.tsx +2 -0
- package/src/components/items/create-item-form/create-item-form.tsx +29 -0
- package/src/components/items/create-item-form/locales/bg.ts +13 -0
- package/src/components/items/create-item-form/locales/cs.ts +13 -0
- package/src/components/items/create-item-form/locales/et.ts +13 -0
- package/src/components/items/create-item-form/locales/fi.ts +13 -0
- package/src/components/items/create-item-form/locales/is.ts +13 -0
- package/src/components/items/create-item-form/locales/nb.ts +13 -0
- package/src/components/items/create-item-form/locales/sk.ts +13 -0
- package/src/components/items/create-item-form/locales/sv.ts +13 -0
- package/src/components/items/edit-item-form/edit-item-form.tsx +39 -1
- package/src/components/items/edit-item-form/locales/bg.ts +12 -0
- package/src/components/items/edit-item-form/locales/cs.ts +12 -0
- package/src/components/items/edit-item-form/locales/en.ts +12 -0
- package/src/components/items/edit-item-form/locales/et.ts +12 -0
- package/src/components/items/edit-item-form/locales/fi.ts +12 -0
- package/src/components/items/edit-item-form/locales/is.ts +12 -0
- package/src/components/items/edit-item-form/locales/nb.ts +12 -0
- package/src/components/items/edit-item-form/locales/sk.ts +12 -0
- package/src/components/items/edit-item-form/locales/sv.ts +12 -0
- package/src/components/items/item-combobox.tsx +51 -18
- package/src/components/items/item-list-table/item-list-table.tsx +47 -23
- package/src/components/items/item-list-table/locales/bg.ts +16 -0
- package/src/components/items/item-list-table/locales/cs.ts +16 -0
- package/src/components/items/item-list-table/locales/en.ts +4 -3
- package/src/components/items/item-list-table/locales/et.ts +16 -0
- package/src/components/items/item-list-table/locales/fi.ts +16 -0
- package/src/components/items/item-list-table/locales/is.ts +16 -0
- package/src/components/items/item-list-table/locales/nb.ts +16 -0
- package/src/components/items/item-list-table/locales/sk.ts +16 -0
- package/src/components/items/item-list-table/locales/sv.ts +16 -0
- package/src/components/items/items.hooks.ts +15 -15
- package/src/components/payments/create-payment-form/create-payment-form.tsx +11 -7
- package/src/components/payments/create-payment-form/locales/bg.ts +20 -0
- package/src/components/payments/create-payment-form/locales/cs.ts +20 -0
- package/src/components/payments/create-payment-form/locales/en.ts +20 -0
- package/src/components/payments/create-payment-form/locales/et.ts +20 -0
- package/src/components/payments/create-payment-form/locales/fi.ts +20 -0
- package/src/components/payments/create-payment-form/locales/hr.ts +2 -2
- package/src/components/payments/create-payment-form/locales/is.ts +20 -0
- package/src/components/payments/create-payment-form/locales/nb.ts +20 -0
- package/src/components/payments/create-payment-form/locales/sk.ts +20 -0
- package/src/components/payments/create-payment-form/locales/sl.ts +4 -4
- package/src/components/payments/create-payment-form/locales/sv.ts +20 -0
- package/src/components/payments/edit-payment-form/edit-payment-form.tsx +5 -1
- package/src/components/payments/edit-payment-form/locales/bg.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/cs.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/en.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/et.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/fi.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/hr.ts +2 -2
- package/src/components/payments/edit-payment-form/locales/is.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/nb.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/sk.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/sl.ts +4 -4
- package/src/components/payments/edit-payment-form/locales/sv.ts +20 -0
- package/src/components/payments/list/list-row-actions.tsx +10 -2
- package/src/components/payments/list/list-table.tsx +51 -45
- package/src/components/payments/list/locales/bg.ts +42 -0
- package/src/components/payments/list/locales/cs.ts +42 -0
- package/src/components/payments/list/locales/de.ts +18 -0
- package/src/components/payments/list/locales/en.ts +37 -2
- package/src/components/payments/list/locales/es.ts +18 -0
- package/src/components/payments/list/locales/et.ts +42 -0
- package/src/components/payments/list/locales/fi.ts +42 -0
- package/src/components/payments/list/locales/fr.ts +18 -0
- package/src/components/payments/list/locales/hr.ts +18 -0
- package/src/components/payments/list/locales/is.ts +42 -0
- package/src/components/payments/list/locales/it.ts +18 -0
- package/src/components/payments/list/locales/nb.ts +42 -0
- package/src/components/payments/list/locales/nl.ts +18 -0
- package/src/components/payments/list/locales/pl.ts +18 -0
- package/src/components/payments/list/locales/pt.ts +18 -0
- package/src/components/payments/list/locales/sk.ts +42 -0
- package/src/components/payments/list/locales/sl.ts +18 -1
- package/src/components/payments/list/locales/sv.ts +42 -0
- package/src/components/payments/payments.hooks.ts +13 -6
- package/src/components/recurring-invoices/create-recurring-invoice-form/create-recurring-invoice-form.tsx +23 -17
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/bg.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/cs.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/en.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/et.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/fi.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/hr.ts +6 -6
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/is.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/nb.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/sk.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/sl.ts +4 -4
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/sv.ts +44 -0
- package/src/components/recurring-invoices/list/list-row-actions.tsx +3 -5
- package/src/components/recurring-invoices/list/list-table.tsx +10 -7
- package/src/components/recurring-invoices/list/locales/bg.ts +28 -0
- package/src/components/recurring-invoices/list/locales/cs.ts +28 -0
- package/src/components/recurring-invoices/list/locales/en.ts +23 -0
- package/src/components/recurring-invoices/list/locales/et.ts +28 -0
- package/src/components/recurring-invoices/list/locales/fi.ts +28 -0
- package/src/components/recurring-invoices/list/locales/is.ts +28 -0
- package/src/components/recurring-invoices/list/locales/nb.ts +28 -0
- package/src/components/recurring-invoices/list/locales/sk.ts +28 -0
- package/src/components/recurring-invoices/list/locales/sv.ts +28 -0
- package/src/components/recurring-invoices/recurring-invoices.hooks.ts +11 -8
- package/src/components/request-logs/request-log-detail.tsx +30 -23
- package/src/components/request-logs/request-log-list-table.tsx +88 -45
- package/src/components/table/README.md +47 -9
- package/src/components/table/data-table.tsx +232 -92
- package/src/components/table/filter-bar.tsx +1 -1
- package/src/components/table/filter-panel.tsx +51 -22
- package/src/components/table/hooks/use-table-state.ts +64 -11
- package/src/components/table/index.ts +3 -0
- package/src/components/table/locales.ts +119 -4
- package/src/components/table/selection-toolbar.tsx +65 -9
- package/src/components/table/sorting.ts +80 -0
- package/src/components/table/table-skeleton.tsx +15 -9
- package/src/components/table/types.ts +17 -0
- package/src/components/tax-reports/index.ts +8 -0
- package/src/components/tax-reports/kir-export-form.tsx +4 -5
- package/src/components/tax-reports/slovenia-accounting-mappings-fields.tsx +271 -0
- package/src/components/tax-reports/slovenia-tax-profile-step.tsx +21 -10
- package/src/components/tax-reports/slovenia-vod-export-form.tsx +452 -0
- package/src/components/tax-reports/slovenia-yearly-export-form.tsx +17 -16
- package/src/components/tax-reports/slovenia-yearly-review-step.tsx +40 -18
- package/src/components/taxes/create-tax-form/create-tax-form.tsx +48 -2
- package/src/components/taxes/create-tax-form/locales/bg.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/cs.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/et.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/fi.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/is.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/nb.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/sk.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/sv.ts +8 -0
- package/src/components/taxes/edit-tax-form/edit-tax-form.tsx +80 -11
- package/src/components/taxes/edit-tax-form/locales/bg.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/cs.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/en.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/et.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/fi.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/is.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/nb.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/sk.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/sv.ts +6 -0
- package/src/components/taxes/tax-list-table/locales/bg.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/cs.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/en.ts +4 -3
- package/src/components/taxes/tax-list-table/locales/et.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/fi.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/is.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/nb.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/sk.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/sv.ts +17 -0
- package/src/components/taxes/tax-list-table/tax-list-table.tsx +53 -19
- package/src/components/taxes/taxes.hooks.ts +53 -12
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/drawer.tsx +2 -2
- package/src/components/ui/form.tsx +118 -2
- package/src/components/ui/progress.tsx +6 -4
- package/src/components/ui/select.tsx +118 -1
- package/src/components/ui/sonner.tsx +17 -36
- package/src/components/ui/sticky-form-footer.tsx +6 -1
- package/src/components/ui/tooltip.tsx +15 -2
- package/src/components/webhook-logs/webhook-delivery-detail.tsx +22 -22
- package/src/components/webhook-logs/webhook-delivery-list-table.tsx +92 -17
- package/src/components/wl-subscription/locked-feature.tsx +11 -10
- package/src/components/wl-subscription/paywall.tsx +184 -72
- package/src/components/wl-subscription/upgrade-modal.tsx +28 -31
- package/src/generate-schemas.ts +14 -4
- package/src/generated/schemas/account_webhook.ts +43 -0
- package/src/generated/schemas/accountwebhook.ts +67 -0
- package/src/generated/schemas/entity.ts +255 -16
- package/src/generated/schemas/exportsloveniavodxml_body.ts +16 -0
- package/src/generated/schemas/furssettings.ts +1 -0
- package/src/generated/schemas/incomingpurchasedocument.ts +198 -0
- package/src/generated/schemas/incomingpurchasedocumentpayment.ts +38 -0
- package/src/generated/schemas/index.ts +10 -0
- package/src/generated/schemas/item.ts +36 -0
- package/src/generated/schemas/me.ts +23 -19
- package/src/generated/schemas/order.ts +2 -0
- package/src/generated/schemas/orderintegration.ts +8 -4
- package/src/generated/schemas/payment.ts +5 -0
- package/src/generated/schemas/ptatcudseries.ts +30 -0
- package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +35 -3
- package/src/generated/schemas/rendercreditnotepreview_body.ts +35 -3
- package/src/generated/schemas/renderdeliverynotepreview_body.ts +12 -5
- package/src/generated/schemas/renderestimatepreview_body.ts +38 -5
- package/src/generated/schemas/renderinvoicepreview_body.ts +39 -5
- package/src/generated/schemas/senddocument_body.ts +1 -0
- package/src/generated/schemas/sendemail_body.ts +67 -39
- package/src/generated/schemas/sloveniataxprofile.ts +97 -21
- package/src/generated/schemas/starteslogexport_body.ts +33 -0
- package/src/generated/schemas/startpdfexport_body.ts +94 -78
- package/src/generated/schemas/supplier.ts +59 -0
- package/src/generated/schemas/syncshopifyorders_body.ts +20 -0
- package/src/generated/schemas/tax.ts +2 -0
- package/src/generated/schemas/uploadfile_body.ts +1 -0
- package/src/generated/schemas/userptsettings.ts +26 -0
- package/src/generated/schemas/voidinvoice_body.ts +20 -0
- package/src/generated/schemas/webhook.ts +2 -0
- package/src/hooks/create-resource-hooks.ts +22 -19
- package/src/hooks/use-duplicate-document.ts +10 -8
- package/src/hooks/use-eslog-validation.ts +5 -1
- package/src/hooks/use-next-document-number.ts +13 -6
- package/src/hooks/use-resolved-entity-id.ts +14 -0
- package/src/hooks/use-resource-mutation.ts +11 -30
- package/src/hooks/use-transaction-type-check.ts +3 -8
- package/src/lib/browser-cookies.ts +1 -1
- package/src/lib/country-capabilities.ts +114 -0
- package/src/lib/date-fns-locale.ts +1 -20
- package/src/lib/eslog-export.ts +32 -0
- package/src/lib/fiscalization-options.ts +21 -1
- package/src/lib/formatting.ts +27 -0
- package/src/lib/furs-error-utils.ts +29 -0
- package/src/lib/locale.ts +4 -0
- package/src/lib/payment-display.ts +95 -0
- package/src/lib/pt-document-input.ts +67 -0
- package/src/lib/schemas/shared.ts +1 -0
- package/src/lib/template-variables.tsx +102 -4
- package/src/lib/translation.ts +51 -33
- package/src/lib/white-label-capabilities.ts +626 -0
- package/src/lib/zod-validation-message.ts +291 -0
- package/src/providers/entities-provider.tsx +32 -14
- package/src/providers/sdk-provider.tsx +112 -12
- package/src/providers/space-invoices-provider.tsx +129 -0
- package/src/providers/white-label-provider.tsx +96 -4
- package/src/providers/wl-subscription-provider.tsx +144 -10
|
@@ -19,19 +19,30 @@ const createEntitySchemaDefinition = z.object({
|
|
|
19
19
|
country: z.string().min(1).max(100),
|
|
20
20
|
country_code: z.union([z.string(), z.null()]).optional(),
|
|
21
21
|
currency_code: z.union([z.string(), z.null()]).optional(),
|
|
22
|
-
locale: z.string().
|
|
22
|
+
locale: z.union([z.string(), z.null()]).optional(),
|
|
23
23
|
tax_number: z.union([z.string(), z.null()]).optional(),
|
|
24
24
|
tax_number_2: z.union([z.string(), z.null()]).optional(),
|
|
25
25
|
company_number: z.union([z.string(), z.null()]).optional(),
|
|
26
|
+
phone: z.union([z.string(), z.null()]).optional(),
|
|
26
27
|
email: z.union([z.string(), z.null()]).optional(),
|
|
27
28
|
website: z.union([z.string(), z.null()]).optional(),
|
|
29
|
+
fiscal_region_code: z.union([z.string(), z.null()]).optional(),
|
|
30
|
+
starting_capital: z.union([z.number(), z.null()]).optional(),
|
|
28
31
|
environment: z.enum(["live", "sandbox"]).optional(),
|
|
29
32
|
is_tax_subject: z.boolean().optional(),
|
|
30
33
|
is_enabled: z.boolean().optional(),
|
|
31
34
|
settings: z
|
|
32
35
|
.object({
|
|
33
36
|
pdf_template: z.union([
|
|
34
|
-
z.enum([
|
|
37
|
+
z.enum([
|
|
38
|
+
"modern",
|
|
39
|
+
"classic",
|
|
40
|
+
"condensed",
|
|
41
|
+
"minimal",
|
|
42
|
+
"fashion",
|
|
43
|
+
"timeless_modern_full_data",
|
|
44
|
+
null,
|
|
45
|
+
]),
|
|
35
46
|
z.null(),
|
|
36
47
|
]),
|
|
37
48
|
number_formats: z.union([
|
|
@@ -48,6 +59,7 @@ const createEntitySchemaDefinition = z.object({
|
|
|
48
59
|
z.null(),
|
|
49
60
|
]),
|
|
50
61
|
primary_color: z.union([z.string(), z.null()]),
|
|
62
|
+
logo_scale_percent: z.union([z.number(), z.null()]),
|
|
51
63
|
has_logo: z.union([z.boolean(), z.null()]),
|
|
52
64
|
has_signature: z.union([z.boolean(), z.null()]),
|
|
53
65
|
default_invoice_due_days: z.union([z.number(), z.null()]),
|
|
@@ -59,6 +71,12 @@ const createEntitySchemaDefinition = z.object({
|
|
|
59
71
|
invoice_body: z.union([z.string(), z.null()]),
|
|
60
72
|
estimate_subject: z.union([z.string(), z.null()]),
|
|
61
73
|
estimate_body: z.union([z.string(), z.null()]),
|
|
74
|
+
credit_note_subject: z.union([z.string(), z.null()]),
|
|
75
|
+
credit_note_body: z.union([z.string(), z.null()]),
|
|
76
|
+
advance_invoice_subject: z.union([z.string(), z.null()]),
|
|
77
|
+
advance_invoice_body: z.union([z.string(), z.null()]),
|
|
78
|
+
delivery_note_subject: z.union([z.string(), z.null()]),
|
|
79
|
+
delivery_note_body: z.union([z.string(), z.null()]),
|
|
62
80
|
})
|
|
63
81
|
.partial()
|
|
64
82
|
.passthrough(),
|
|
@@ -70,25 +88,27 @@ const createEntitySchemaDefinition = z.object({
|
|
|
70
88
|
default_estimate_payment_terms: z.union([z.string(), z.null()]),
|
|
71
89
|
default_credit_note_note: z.union([z.string(), z.null()]),
|
|
72
90
|
default_credit_note_payment_terms: z.union([z.string(), z.null()]),
|
|
91
|
+
default_advance_invoice_note: z.union([z.string(), z.null()]),
|
|
92
|
+
default_delivery_note_note: z.union([z.string(), z.null()]),
|
|
73
93
|
document_footer: z.union([z.string(), z.null()]),
|
|
74
94
|
default_document_signature: z.union([z.string(), z.null()]),
|
|
75
95
|
slovenia: z.union([
|
|
76
96
|
z
|
|
77
97
|
.object({
|
|
78
98
|
business_form: z.union([
|
|
79
|
-
z.enum(["sp", "doo", "dno", "club"]),
|
|
99
|
+
z.enum(["sp", "doo", "dno", "club", null]),
|
|
80
100
|
z.null(),
|
|
81
101
|
]),
|
|
82
102
|
income_tax_regime: z.union([
|
|
83
|
-
z.enum(["normirani", "dejanski"]),
|
|
103
|
+
z.enum(["normirani", "dejanski", null]),
|
|
84
104
|
z.null(),
|
|
85
105
|
]),
|
|
86
106
|
vat_profile: z.union([
|
|
87
|
-
z.enum(["standard", "special_vat_identified"]),
|
|
107
|
+
z.enum(["standard", "special_vat_identified", null]),
|
|
88
108
|
z.null(),
|
|
89
109
|
]),
|
|
90
110
|
tax_residency: z.union([
|
|
91
|
-
z.enum(["resident", "non_resident"]),
|
|
111
|
+
z.enum(["resident", "non_resident", null]),
|
|
92
112
|
z.null(),
|
|
93
113
|
]),
|
|
94
114
|
yearly_reporting: z.union([
|
|
@@ -97,11 +117,11 @@ const createEntitySchemaDefinition = z.object({
|
|
|
97
117
|
activity_code: z.union([z.string(), z.null()]),
|
|
98
118
|
registration_number: z.union([z.string(), z.null()]),
|
|
99
119
|
accounting_type: z.union([
|
|
100
|
-
z.enum(["records", "single_entry", "double_entry"]),
|
|
120
|
+
z.enum(["records", "single_entry", "double_entry", null]),
|
|
101
121
|
z.null(),
|
|
102
122
|
]),
|
|
103
123
|
normiranec_insurance_basis: z.union([
|
|
104
|
-
z.enum(["full_time_self_employed", "other"]),
|
|
124
|
+
z.enum(["full_time_self_employed", "other", null]),
|
|
105
125
|
z.null(),
|
|
106
126
|
]),
|
|
107
127
|
default_withholding_tax_amount: z.union([
|
|
@@ -117,6 +137,91 @@ const createEntitySchemaDefinition = z.object({
|
|
|
117
137
|
.passthrough(),
|
|
118
138
|
z.null(),
|
|
119
139
|
]),
|
|
140
|
+
accounting_exports: z.union([
|
|
141
|
+
z
|
|
142
|
+
.object({
|
|
143
|
+
preferred_format: z.union([
|
|
144
|
+
z.enum(["vod_xml", "vasco_xml", "minimax_xml", null]),
|
|
145
|
+
z.null(),
|
|
146
|
+
]),
|
|
147
|
+
konto_mappings: z.union([
|
|
148
|
+
z
|
|
149
|
+
.object({
|
|
150
|
+
receivables: z.union([z.string(), z.null()]),
|
|
151
|
+
payables: z.union([z.string(), z.null()]),
|
|
152
|
+
sales_vat_22: z.union([z.string(), z.null()]),
|
|
153
|
+
sales_vat_95: z.union([z.string(), z.null()]),
|
|
154
|
+
sales_vat_5: z.union([z.string(), z.null()]),
|
|
155
|
+
purchase_vat_recoverable_22: z.union([
|
|
156
|
+
z.string(),
|
|
157
|
+
z.null(),
|
|
158
|
+
]),
|
|
159
|
+
purchase_vat_recoverable_95: z.union([
|
|
160
|
+
z.string(),
|
|
161
|
+
z.null(),
|
|
162
|
+
]),
|
|
163
|
+
purchase_vat_recoverable_5: z.union([
|
|
164
|
+
z.string(),
|
|
165
|
+
z.null(),
|
|
166
|
+
]),
|
|
167
|
+
sales_revenue_22: z.union([z.string(), z.null()]),
|
|
168
|
+
sales_revenue_95: z.union([z.string(), z.null()]),
|
|
169
|
+
sales_revenue_5: z.union([z.string(), z.null()]),
|
|
170
|
+
sales_revenue_exempt: z.union([z.string(), z.null()]),
|
|
171
|
+
sales_revenue_eu_goods: z.union([z.string(), z.null()]),
|
|
172
|
+
sales_revenue_eu_services: z.union([
|
|
173
|
+
z.string(),
|
|
174
|
+
z.null(),
|
|
175
|
+
]),
|
|
176
|
+
sales_revenue_reverse_charge: z.union([
|
|
177
|
+
z.string(),
|
|
178
|
+
z.null(),
|
|
179
|
+
]),
|
|
180
|
+
sales_revenue_third_country_goods: z.union([
|
|
181
|
+
z.string(),
|
|
182
|
+
z.null(),
|
|
183
|
+
]),
|
|
184
|
+
sales_revenue_third_country_services: z.union([
|
|
185
|
+
z.string(),
|
|
186
|
+
z.null(),
|
|
187
|
+
]),
|
|
188
|
+
purchase_expense_22: z.union([z.string(), z.null()]),
|
|
189
|
+
purchase_expense_95: z.union([z.string(), z.null()]),
|
|
190
|
+
purchase_expense_5: z.union([z.string(), z.null()]),
|
|
191
|
+
purchase_expense_exempt: z.union([
|
|
192
|
+
z.string(),
|
|
193
|
+
z.null(),
|
|
194
|
+
]),
|
|
195
|
+
purchase_expense_eu_goods: z.union([
|
|
196
|
+
z.string(),
|
|
197
|
+
z.null(),
|
|
198
|
+
]),
|
|
199
|
+
purchase_expense_eu_services: z.union([
|
|
200
|
+
z.string(),
|
|
201
|
+
z.null(),
|
|
202
|
+
]),
|
|
203
|
+
purchase_expense_reverse_charge: z.union([
|
|
204
|
+
z.string(),
|
|
205
|
+
z.null(),
|
|
206
|
+
]),
|
|
207
|
+
purchase_expense_third_country_goods: z.union([
|
|
208
|
+
z.string(),
|
|
209
|
+
z.null(),
|
|
210
|
+
]),
|
|
211
|
+
purchase_expense_third_country_services: z.union([
|
|
212
|
+
z.string(),
|
|
213
|
+
z.null(),
|
|
214
|
+
]),
|
|
215
|
+
})
|
|
216
|
+
.partial()
|
|
217
|
+
.passthrough(),
|
|
218
|
+
z.null(),
|
|
219
|
+
]),
|
|
220
|
+
})
|
|
221
|
+
.partial()
|
|
222
|
+
.passthrough(),
|
|
223
|
+
z.null(),
|
|
224
|
+
]),
|
|
120
225
|
})
|
|
121
226
|
.partial()
|
|
122
227
|
.passthrough(),
|
|
@@ -126,6 +231,7 @@ const createEntitySchemaDefinition = z.object({
|
|
|
126
231
|
z
|
|
127
232
|
.object({
|
|
128
233
|
enabled: z.boolean().default(false),
|
|
234
|
+
default_skip_fiscalization: z.boolean().default(false),
|
|
129
235
|
numbering_strategy: z.enum(["B", "C"]),
|
|
130
236
|
operator_tax_number: z.string(),
|
|
131
237
|
operator_label: z.string(),
|
|
@@ -151,6 +257,17 @@ const createEntitySchemaDefinition = z.object({
|
|
|
151
257
|
.passthrough(),
|
|
152
258
|
z.null(),
|
|
153
259
|
]),
|
|
260
|
+
pt: z.union([
|
|
261
|
+
z
|
|
262
|
+
.object({
|
|
263
|
+
operator_first_name: z.string().min(1),
|
|
264
|
+
operator_last_name: z.string().min(1),
|
|
265
|
+
operator_tax_number: z.string().regex(/^\d{9}$/),
|
|
266
|
+
})
|
|
267
|
+
.partial()
|
|
268
|
+
.passthrough(),
|
|
269
|
+
z.null(),
|
|
270
|
+
]),
|
|
154
271
|
tax_rules: z.any().optional(),
|
|
155
272
|
overdue_notifications: z.union([
|
|
156
273
|
z
|
|
@@ -193,6 +310,7 @@ const createEntitySchemaDefinition = z.object({
|
|
|
193
310
|
eslog_validation_enabled: z.union([z.boolean(), z.null()]),
|
|
194
311
|
delivery_note_hide_prices: z.union([z.boolean(), z.null()]),
|
|
195
312
|
credit_note_negative_values: z.union([z.boolean(), z.null()]),
|
|
313
|
+
show_payment_amounts: z.union([z.boolean(), z.null()]),
|
|
196
314
|
receipt_note: z.union([z.string(), z.null()]),
|
|
197
315
|
receipt_footer: z.union([z.string(), z.null()]),
|
|
198
316
|
receipt_signature: z.union([z.string(), z.null()]),
|
|
@@ -243,18 +361,29 @@ const patchEntitySchemaDefinition = z
|
|
|
243
361
|
city: z.union([z.string(), z.null()]),
|
|
244
362
|
state: z.union([z.string(), z.null()]),
|
|
245
363
|
currency_code: z.union([z.string(), z.null()]),
|
|
246
|
-
locale: z.string().
|
|
364
|
+
locale: z.union([z.string(), z.null()]),
|
|
247
365
|
tax_number: z.union([z.string(), z.null()]),
|
|
248
366
|
tax_number_2: z.union([z.string(), z.null()]),
|
|
249
367
|
company_number: z.union([z.string(), z.null()]),
|
|
368
|
+
phone: z.union([z.string(), z.null()]),
|
|
250
369
|
email: z.union([z.string(), z.null()]),
|
|
251
370
|
website: z.union([z.string(), z.null()]),
|
|
371
|
+
fiscal_region_code: z.union([z.string(), z.null()]),
|
|
372
|
+
starting_capital: z.union([z.number(), z.null()]),
|
|
252
373
|
is_tax_subject: z.boolean(),
|
|
253
374
|
is_enabled: z.boolean(),
|
|
254
375
|
settings: z
|
|
255
376
|
.object({
|
|
256
377
|
pdf_template: z.union([
|
|
257
|
-
z.enum([
|
|
378
|
+
z.enum([
|
|
379
|
+
"modern",
|
|
380
|
+
"classic",
|
|
381
|
+
"condensed",
|
|
382
|
+
"minimal",
|
|
383
|
+
"fashion",
|
|
384
|
+
"timeless_modern_full_data",
|
|
385
|
+
null,
|
|
386
|
+
]),
|
|
258
387
|
z.null(),
|
|
259
388
|
]),
|
|
260
389
|
number_formats: z.union([
|
|
@@ -271,6 +400,7 @@ const patchEntitySchemaDefinition = z
|
|
|
271
400
|
z.null(),
|
|
272
401
|
]),
|
|
273
402
|
primary_color: z.union([z.string(), z.null()]),
|
|
403
|
+
logo_scale_percent: z.union([z.number(), z.null()]),
|
|
274
404
|
has_logo: z.union([z.boolean(), z.null()]),
|
|
275
405
|
has_signature: z.union([z.boolean(), z.null()]),
|
|
276
406
|
default_invoice_due_days: z.union([z.number(), z.null()]),
|
|
@@ -282,6 +412,12 @@ const patchEntitySchemaDefinition = z
|
|
|
282
412
|
invoice_body: z.union([z.string(), z.null()]),
|
|
283
413
|
estimate_subject: z.union([z.string(), z.null()]),
|
|
284
414
|
estimate_body: z.union([z.string(), z.null()]),
|
|
415
|
+
credit_note_subject: z.union([z.string(), z.null()]),
|
|
416
|
+
credit_note_body: z.union([z.string(), z.null()]),
|
|
417
|
+
advance_invoice_subject: z.union([z.string(), z.null()]),
|
|
418
|
+
advance_invoice_body: z.union([z.string(), z.null()]),
|
|
419
|
+
delivery_note_subject: z.union([z.string(), z.null()]),
|
|
420
|
+
delivery_note_body: z.union([z.string(), z.null()]),
|
|
285
421
|
})
|
|
286
422
|
.partial()
|
|
287
423
|
.passthrough(),
|
|
@@ -293,25 +429,27 @@ const patchEntitySchemaDefinition = z
|
|
|
293
429
|
default_estimate_payment_terms: z.union([z.string(), z.null()]),
|
|
294
430
|
default_credit_note_note: z.union([z.string(), z.null()]),
|
|
295
431
|
default_credit_note_payment_terms: z.union([z.string(), z.null()]),
|
|
432
|
+
default_advance_invoice_note: z.union([z.string(), z.null()]),
|
|
433
|
+
default_delivery_note_note: z.union([z.string(), z.null()]),
|
|
296
434
|
document_footer: z.union([z.string(), z.null()]),
|
|
297
435
|
default_document_signature: z.union([z.string(), z.null()]),
|
|
298
436
|
slovenia: z.union([
|
|
299
437
|
z
|
|
300
438
|
.object({
|
|
301
439
|
business_form: z.union([
|
|
302
|
-
z.enum(["sp", "doo", "dno", "club"]),
|
|
440
|
+
z.enum(["sp", "doo", "dno", "club", null]),
|
|
303
441
|
z.null(),
|
|
304
442
|
]),
|
|
305
443
|
income_tax_regime: z.union([
|
|
306
|
-
z.enum(["normirani", "dejanski"]),
|
|
444
|
+
z.enum(["normirani", "dejanski", null]),
|
|
307
445
|
z.null(),
|
|
308
446
|
]),
|
|
309
447
|
vat_profile: z.union([
|
|
310
|
-
z.enum(["standard", "special_vat_identified"]),
|
|
448
|
+
z.enum(["standard", "special_vat_identified", null]),
|
|
311
449
|
z.null(),
|
|
312
450
|
]),
|
|
313
451
|
tax_residency: z.union([
|
|
314
|
-
z.enum(["resident", "non_resident"]),
|
|
452
|
+
z.enum(["resident", "non_resident", null]),
|
|
315
453
|
z.null(),
|
|
316
454
|
]),
|
|
317
455
|
yearly_reporting: z.union([
|
|
@@ -320,11 +458,11 @@ const patchEntitySchemaDefinition = z
|
|
|
320
458
|
activity_code: z.union([z.string(), z.null()]),
|
|
321
459
|
registration_number: z.union([z.string(), z.null()]),
|
|
322
460
|
accounting_type: z.union([
|
|
323
|
-
z.enum(["records", "single_entry", "double_entry"]),
|
|
461
|
+
z.enum(["records", "single_entry", "double_entry", null]),
|
|
324
462
|
z.null(),
|
|
325
463
|
]),
|
|
326
464
|
normiranec_insurance_basis: z.union([
|
|
327
|
-
z.enum(["full_time_self_employed", "other"]),
|
|
465
|
+
z.enum(["full_time_self_employed", "other", null]),
|
|
328
466
|
z.null(),
|
|
329
467
|
]),
|
|
330
468
|
default_withholding_tax_amount: z.union([
|
|
@@ -340,6 +478,94 @@ const patchEntitySchemaDefinition = z
|
|
|
340
478
|
.passthrough(),
|
|
341
479
|
z.null(),
|
|
342
480
|
]),
|
|
481
|
+
accounting_exports: z.union([
|
|
482
|
+
z
|
|
483
|
+
.object({
|
|
484
|
+
preferred_format: z.union([
|
|
485
|
+
z.enum(["vod_xml", "vasco_xml", "minimax_xml", null]),
|
|
486
|
+
z.null(),
|
|
487
|
+
]),
|
|
488
|
+
konto_mappings: z.union([
|
|
489
|
+
z
|
|
490
|
+
.object({
|
|
491
|
+
receivables: z.union([z.string(), z.null()]),
|
|
492
|
+
payables: z.union([z.string(), z.null()]),
|
|
493
|
+
sales_vat_22: z.union([z.string(), z.null()]),
|
|
494
|
+
sales_vat_95: z.union([z.string(), z.null()]),
|
|
495
|
+
sales_vat_5: z.union([z.string(), z.null()]),
|
|
496
|
+
purchase_vat_recoverable_22: z.union([
|
|
497
|
+
z.string(),
|
|
498
|
+
z.null(),
|
|
499
|
+
]),
|
|
500
|
+
purchase_vat_recoverable_95: z.union([
|
|
501
|
+
z.string(),
|
|
502
|
+
z.null(),
|
|
503
|
+
]),
|
|
504
|
+
purchase_vat_recoverable_5: z.union([
|
|
505
|
+
z.string(),
|
|
506
|
+
z.null(),
|
|
507
|
+
]),
|
|
508
|
+
sales_revenue_22: z.union([z.string(), z.null()]),
|
|
509
|
+
sales_revenue_95: z.union([z.string(), z.null()]),
|
|
510
|
+
sales_revenue_5: z.union([z.string(), z.null()]),
|
|
511
|
+
sales_revenue_exempt: z.union([z.string(), z.null()]),
|
|
512
|
+
sales_revenue_eu_goods: z.union([
|
|
513
|
+
z.string(),
|
|
514
|
+
z.null(),
|
|
515
|
+
]),
|
|
516
|
+
sales_revenue_eu_services: z.union([
|
|
517
|
+
z.string(),
|
|
518
|
+
z.null(),
|
|
519
|
+
]),
|
|
520
|
+
sales_revenue_reverse_charge: z.union([
|
|
521
|
+
z.string(),
|
|
522
|
+
z.null(),
|
|
523
|
+
]),
|
|
524
|
+
sales_revenue_third_country_goods: z.union([
|
|
525
|
+
z.string(),
|
|
526
|
+
z.null(),
|
|
527
|
+
]),
|
|
528
|
+
sales_revenue_third_country_services: z.union([
|
|
529
|
+
z.string(),
|
|
530
|
+
z.null(),
|
|
531
|
+
]),
|
|
532
|
+
purchase_expense_22: z.union([z.string(), z.null()]),
|
|
533
|
+
purchase_expense_95: z.union([z.string(), z.null()]),
|
|
534
|
+
purchase_expense_5: z.union([z.string(), z.null()]),
|
|
535
|
+
purchase_expense_exempt: z.union([
|
|
536
|
+
z.string(),
|
|
537
|
+
z.null(),
|
|
538
|
+
]),
|
|
539
|
+
purchase_expense_eu_goods: z.union([
|
|
540
|
+
z.string(),
|
|
541
|
+
z.null(),
|
|
542
|
+
]),
|
|
543
|
+
purchase_expense_eu_services: z.union([
|
|
544
|
+
z.string(),
|
|
545
|
+
z.null(),
|
|
546
|
+
]),
|
|
547
|
+
purchase_expense_reverse_charge: z.union([
|
|
548
|
+
z.string(),
|
|
549
|
+
z.null(),
|
|
550
|
+
]),
|
|
551
|
+
purchase_expense_third_country_goods: z.union([
|
|
552
|
+
z.string(),
|
|
553
|
+
z.null(),
|
|
554
|
+
]),
|
|
555
|
+
purchase_expense_third_country_services: z.union([
|
|
556
|
+
z.string(),
|
|
557
|
+
z.null(),
|
|
558
|
+
]),
|
|
559
|
+
})
|
|
560
|
+
.partial()
|
|
561
|
+
.passthrough(),
|
|
562
|
+
z.null(),
|
|
563
|
+
]),
|
|
564
|
+
})
|
|
565
|
+
.partial()
|
|
566
|
+
.passthrough(),
|
|
567
|
+
z.null(),
|
|
568
|
+
]),
|
|
343
569
|
})
|
|
344
570
|
.partial()
|
|
345
571
|
.passthrough(),
|
|
@@ -349,6 +575,7 @@ const patchEntitySchemaDefinition = z
|
|
|
349
575
|
z
|
|
350
576
|
.object({
|
|
351
577
|
enabled: z.boolean().default(false),
|
|
578
|
+
default_skip_fiscalization: z.boolean().default(false),
|
|
352
579
|
numbering_strategy: z.enum(["B", "C"]),
|
|
353
580
|
operator_tax_number: z.string(),
|
|
354
581
|
operator_label: z.string(),
|
|
@@ -374,6 +601,17 @@ const patchEntitySchemaDefinition = z
|
|
|
374
601
|
.passthrough(),
|
|
375
602
|
z.null(),
|
|
376
603
|
]),
|
|
604
|
+
pt: z.union([
|
|
605
|
+
z
|
|
606
|
+
.object({
|
|
607
|
+
operator_first_name: z.string().min(1),
|
|
608
|
+
operator_last_name: z.string().min(1),
|
|
609
|
+
operator_tax_number: z.string().regex(/^\d{9}$/),
|
|
610
|
+
})
|
|
611
|
+
.partial()
|
|
612
|
+
.passthrough(),
|
|
613
|
+
z.null(),
|
|
614
|
+
]),
|
|
377
615
|
tax_rules: z.any().optional(),
|
|
378
616
|
overdue_notifications: z.union([
|
|
379
617
|
z
|
|
@@ -416,6 +654,7 @@ const patchEntitySchemaDefinition = z
|
|
|
416
654
|
eslog_validation_enabled: z.union([z.boolean(), z.null()]),
|
|
417
655
|
delivery_note_hide_prices: z.union([z.boolean(), z.null()]),
|
|
418
656
|
credit_note_negative_values: z.union([z.boolean(), z.null()]),
|
|
657
|
+
show_payment_amounts: z.union([z.boolean(), z.null()]),
|
|
419
658
|
receipt_note: z.union([z.string(), z.null()]),
|
|
420
659
|
receipt_footer: z.union([z.string(), z.null()]),
|
|
421
660
|
receipt_signature: z.union([z.string(), z.null()]),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated using 'bun generate-schemas'.
|
|
3
|
+
* Do not edit this file manually. To update, run the generator again.
|
|
4
|
+
* @generated
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
|
|
9
|
+
// Schemas for exportsloveniavodxml_body endpoints
|
|
10
|
+
|
|
11
|
+
// Dependency schema for exportsloveniavodxml_body
|
|
12
|
+
const exportSloveniaVodXml_Body = z
|
|
13
|
+
.object({ date_from: z.string(), date_to: z.string() })
|
|
14
|
+
.passthrough();
|
|
15
|
+
|
|
16
|
+
|
|
@@ -12,6 +12,7 @@ import { z } from 'zod';
|
|
|
12
12
|
const updateFursSettingsSchemaDefinition = z
|
|
13
13
|
.object({
|
|
14
14
|
enabled: z.boolean(),
|
|
15
|
+
default_skip_fiscalization: z.boolean(),
|
|
15
16
|
numbering_strategy: z.enum(["B", "C"]),
|
|
16
17
|
operator_tax_number: z.string(),
|
|
17
18
|
operator_label: z.string(),
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated using 'bun generate-schemas'.
|
|
3
|
+
* Do not edit this file manually. To update, run the generator again.
|
|
4
|
+
* @generated
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
|
|
9
|
+
// Schemas for incomingpurchasedocument endpoints
|
|
10
|
+
|
|
11
|
+
// Dependency schema for incomingpurchasedocument
|
|
12
|
+
const IncomingPurchaseDocumentSupplier = z.union([
|
|
13
|
+
z.object({
|
|
14
|
+
name: z.string().min(1),
|
|
15
|
+
email: z.union([z.string(), z.null()]).optional(),
|
|
16
|
+
address: z.union([z.string(), z.null()]).optional(),
|
|
17
|
+
address_2: z.union([z.string(), z.null()]).optional(),
|
|
18
|
+
post_code: z.union([z.string(), z.null()]).optional(),
|
|
19
|
+
city: z.union([z.string(), z.null()]).optional(),
|
|
20
|
+
state: z.union([z.string(), z.null()]).optional(),
|
|
21
|
+
country: z.union([z.string(), z.null()]).optional(),
|
|
22
|
+
country_code: z.union([z.string(), z.null()]).optional(),
|
|
23
|
+
tax_number: z.union([z.string(), z.null()]).optional(),
|
|
24
|
+
company_number: z.union([z.string(), z.null()]).optional(),
|
|
25
|
+
phone: z.union([z.string(), z.null()]).optional(),
|
|
26
|
+
peppol_id: z.union([z.string(), z.null()]).optional(),
|
|
27
|
+
is_tax_subject: z.union([z.boolean(), z.null()]).optional(),
|
|
28
|
+
}),
|
|
29
|
+
z.null(),
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
// Dependency schema for incomingpurchasedocument
|
|
34
|
+
const LineDiscount = z.object({
|
|
35
|
+
value: z.number().gte(0),
|
|
36
|
+
type: z.enum(["percent", "amount"]).optional().default("percent"),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
// Dependency schema for incomingpurchasedocument
|
|
41
|
+
const DocumentItemTax = z
|
|
42
|
+
.object({
|
|
43
|
+
rate: z.union([z.number(), z.null()]),
|
|
44
|
+
tax_id: z.union([z.string(), z.null()]),
|
|
45
|
+
classification: z.union([z.string(), z.null()]),
|
|
46
|
+
reverse_charge: z.union([z.boolean(), z.null()]),
|
|
47
|
+
amount: z.union([z.number(), z.null()]),
|
|
48
|
+
pt_exemption_code: z.union([z.string(), z.null()]),
|
|
49
|
+
pt_exemption_reason: z.union([z.string(), z.null()]),
|
|
50
|
+
})
|
|
51
|
+
.partial();
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
// Dependency schema for incomingpurchasedocument
|
|
55
|
+
const IncomingPurchaseDocumentItem = z.object({
|
|
56
|
+
name: z.string().min(1),
|
|
57
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
58
|
+
quantity: z.number(),
|
|
59
|
+
unit: z.union([z.string(), z.null()]).optional(),
|
|
60
|
+
classification: z.enum(["product", "service"]),
|
|
61
|
+
price: z.number(),
|
|
62
|
+
gross_price: z.union([z.number(), z.null()]).optional(),
|
|
63
|
+
discounts: z.array(LineDiscount).optional().default([]),
|
|
64
|
+
taxes: z.array(DocumentItemTax).optional().default([]),
|
|
65
|
+
total: z.number(),
|
|
66
|
+
total_with_tax: z.number(),
|
|
67
|
+
total_tax: z.number(),
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
// Dependency schema for incomingpurchasedocument
|
|
72
|
+
const IncomingPurchaseDocumentSummaryTax = z
|
|
73
|
+
.object({
|
|
74
|
+
rate: z.union([z.number(), z.null()]),
|
|
75
|
+
tax_id: z.union([z.string(), z.null()]).optional(),
|
|
76
|
+
base: z.number(),
|
|
77
|
+
total_tax: z.number(),
|
|
78
|
+
reverse_charged: z.union([z.boolean(), z.null()]).optional(),
|
|
79
|
+
is_deductible: z.union([z.boolean(), z.null()]).optional(),
|
|
80
|
+
})
|
|
81
|
+
.passthrough();
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
// Dependency schema for incomingpurchasedocument
|
|
85
|
+
const ExchangeRate = z.union([
|
|
86
|
+
z
|
|
87
|
+
.object({
|
|
88
|
+
rate: z.number(),
|
|
89
|
+
source: z.string(),
|
|
90
|
+
date: z.string().datetime({ offset: true }),
|
|
91
|
+
quote_currency: z.string(),
|
|
92
|
+
})
|
|
93
|
+
.passthrough(),
|
|
94
|
+
z.null(),
|
|
95
|
+
]);
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
// Dependency schema for incomingpurchasedocument
|
|
99
|
+
const IncomingPurchaseDocumentSummaryClassification = z.union([
|
|
100
|
+
z.enum(["goods", "services", null]),
|
|
101
|
+
z.null(),
|
|
102
|
+
]);
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
// Schema for create incomingpurchasedocument operation
|
|
106
|
+
const createIncomingPurchaseDocumentSchemaDefinition = z.object({
|
|
107
|
+
type: z.enum(["invoice", "credit_note", "advance_invoice"]),
|
|
108
|
+
is_draft: z.union([z.boolean(), z.null()]).optional(),
|
|
109
|
+
supplier_id: z.union([z.string(), z.null()]).optional(),
|
|
110
|
+
supplier: IncomingPurchaseDocumentSupplier.optional(),
|
|
111
|
+
save_supplier: z.union([z.boolean(), z.null()]).optional(),
|
|
112
|
+
supplier_document_number: z.union([z.string(), z.null()]).optional(),
|
|
113
|
+
date: z.union([z.string(), z.null()]).optional(),
|
|
114
|
+
date_received: z.union([z.string(), z.null()]).optional(),
|
|
115
|
+
date_due: z.union([z.string(), z.null()]).optional(),
|
|
116
|
+
date_service: z.union([z.string(), z.null()]).optional(),
|
|
117
|
+
date_service_to: z.union([z.string(), z.null()]).optional(),
|
|
118
|
+
currency_code: z.union([z.string(), z.null()]).optional(),
|
|
119
|
+
transaction_type: z
|
|
120
|
+
.union([
|
|
121
|
+
z.enum([
|
|
122
|
+
"domestic",
|
|
123
|
+
"intra_eu_b2b",
|
|
124
|
+
"intra_eu_b2c",
|
|
125
|
+
"3w_b2b",
|
|
126
|
+
"3w_b2c",
|
|
127
|
+
"export",
|
|
128
|
+
null,
|
|
129
|
+
]),
|
|
130
|
+
z.null(),
|
|
131
|
+
])
|
|
132
|
+
.optional(),
|
|
133
|
+
reference: z.union([z.string(), z.null()]).optional(),
|
|
134
|
+
note: z.union([z.string(), z.null()]).optional(),
|
|
135
|
+
items: z.union([z.array(IncomingPurchaseDocumentItem), z.null()]).optional(),
|
|
136
|
+
taxes: z
|
|
137
|
+
.union([z.array(IncomingPurchaseDocumentSummaryTax), z.null()])
|
|
138
|
+
.optional(),
|
|
139
|
+
total: z.union([z.number(), z.null()]).optional(),
|
|
140
|
+
total_with_tax: z.union([z.number(), z.null()]).optional(),
|
|
141
|
+
total_discount: z.union([z.number(), z.null()]).optional(),
|
|
142
|
+
exchange_rate: ExchangeRate.optional(),
|
|
143
|
+
summary_classification:
|
|
144
|
+
IncomingPurchaseDocumentSummaryClassification.optional(),
|
|
145
|
+
cancelled_at: z.union([z.string(), z.null()]).optional(),
|
|
146
|
+
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
// Type for create incomingpurchasedocument operation
|
|
150
|
+
export type CreateIncomingPurchaseDocumentSchema = z.infer<typeof createIncomingPurchaseDocumentSchemaDefinition>;
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
// Schema for update incomingpurchasedocument operation
|
|
154
|
+
const updateIncomingPurchaseDocumentSchemaDefinition = z
|
|
155
|
+
.object({
|
|
156
|
+
is_draft: z.union([z.boolean(), z.null()]),
|
|
157
|
+
supplier_id: z.union([z.string(), z.null()]),
|
|
158
|
+
supplier: IncomingPurchaseDocumentSupplier,
|
|
159
|
+
save_supplier: z.union([z.boolean(), z.null()]),
|
|
160
|
+
supplier_document_number: z.union([z.string(), z.null()]),
|
|
161
|
+
date: z.union([z.string(), z.null()]),
|
|
162
|
+
date_received: z.union([z.string(), z.null()]),
|
|
163
|
+
date_due: z.union([z.string(), z.null()]),
|
|
164
|
+
date_service: z.union([z.string(), z.null()]),
|
|
165
|
+
date_service_to: z.union([z.string(), z.null()]),
|
|
166
|
+
currency_code: z.union([z.string(), z.null()]),
|
|
167
|
+
transaction_type: z.union([
|
|
168
|
+
z.enum([
|
|
169
|
+
"domestic",
|
|
170
|
+
"intra_eu_b2b",
|
|
171
|
+
"intra_eu_b2c",
|
|
172
|
+
"3w_b2b",
|
|
173
|
+
"3w_b2c",
|
|
174
|
+
"export",
|
|
175
|
+
null,
|
|
176
|
+
]),
|
|
177
|
+
z.null(),
|
|
178
|
+
]),
|
|
179
|
+
reference: z.union([z.string(), z.null()]),
|
|
180
|
+
note: z.union([z.string(), z.null()]),
|
|
181
|
+
items: z.union([z.array(IncomingPurchaseDocumentItem), z.null()]),
|
|
182
|
+
taxes: z.union([z.array(IncomingPurchaseDocumentSummaryTax), z.null()]),
|
|
183
|
+
total: z.union([z.number(), z.null()]),
|
|
184
|
+
total_with_tax: z.union([z.number(), z.null()]),
|
|
185
|
+
total_discount: z.union([z.number(), z.null()]),
|
|
186
|
+
exchange_rate: ExchangeRate,
|
|
187
|
+
summary_classification: IncomingPurchaseDocumentSummaryClassification,
|
|
188
|
+
cancelled_at: z.union([z.string(), z.null()]),
|
|
189
|
+
metadata: z.union([z.record(z.string(), z.any()), z.null()]),
|
|
190
|
+
type: z.enum(["invoice", "credit_note", "advance_invoice"]),
|
|
191
|
+
})
|
|
192
|
+
.partial();
|
|
193
|
+
|
|
194
|
+
// Type for update incomingpurchasedocument operation
|
|
195
|
+
export type UpdateIncomingPurchaseDocumentSchema = z.infer<typeof updateIncomingPurchaseDocumentSchemaDefinition>;
|
|
196
|
+
|
|
197
|
+
export const createIncomingPurchaseDocumentSchema = createIncomingPurchaseDocumentSchemaDefinition;
|
|
198
|
+
export const updateIncomingPurchaseDocumentSchema = updateIncomingPurchaseDocumentSchemaDefinition;
|