@spaceinvoices/react-ui 0.1.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/dist/index.js +1 -1
- package/package.json +1 -1
- package/registry.json +86 -122
- package/src/components/activities/activity-timeline.tsx +8 -1
- package/src/components/activities/locales/es.ts +30 -0
- package/src/components/activities/locales/fr.ts +30 -0
- package/src/components/activities/locales/hr.ts +30 -0
- package/src/components/activities/locales/it.ts +30 -0
- package/src/components/activities/locales/nl.ts +30 -0
- package/src/components/activities/locales/pl.ts +30 -0
- package/src/components/activities/locales/pt.ts +30 -0
- package/src/components/advance-invoices/advance-invoices.hooks.ts +2 -2
- package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +21 -7
- package/src/components/advance-invoices/create/locales/es.ts +29 -0
- package/src/components/advance-invoices/create/locales/fr.ts +28 -0
- package/src/components/advance-invoices/create/locales/hr.ts +27 -0
- package/src/components/advance-invoices/create/locales/it.ts +29 -0
- package/src/components/advance-invoices/create/locales/nl.ts +28 -0
- package/src/components/advance-invoices/create/locales/pl.ts +28 -0
- package/src/components/advance-invoices/create/locales/pt.ts +29 -0
- package/src/components/advance-invoices/create/prepare-advance-invoice-submission.ts +3 -3
- package/src/components/advance-invoices/list/list-table.tsx +20 -3
- package/src/components/advance-invoices/list/locales/de.ts +9 -0
- package/src/components/advance-invoices/list/locales/en.ts +8 -0
- package/src/components/advance-invoices/list/locales/es.ts +41 -0
- package/src/components/advance-invoices/list/locales/fr.ts +41 -0
- package/src/components/advance-invoices/list/locales/hr.ts +41 -0
- package/src/components/advance-invoices/list/locales/it.ts +41 -0
- package/src/components/advance-invoices/list/locales/nl.ts +41 -0
- package/src/components/advance-invoices/list/locales/pl.ts +41 -0
- package/src/components/advance-invoices/list/locales/pt.ts +41 -0
- package/src/components/advance-invoices/list/locales/sl.ts +9 -0
- package/src/components/credit-notes/create/create-credit-note-form.tsx +19 -5
- package/src/components/credit-notes/create/locales/es.ts +68 -0
- package/src/components/credit-notes/create/locales/fr.ts +69 -0
- package/src/components/credit-notes/create/locales/hr.ts +68 -0
- package/src/components/credit-notes/create/locales/it.ts +68 -0
- package/src/components/credit-notes/create/locales/nl.ts +69 -0
- package/src/components/credit-notes/create/locales/pl.ts +68 -0
- package/src/components/credit-notes/create/locales/pt.ts +68 -0
- package/src/components/credit-notes/list/list-table.tsx +25 -8
- package/src/components/credit-notes/list/locales/de.ts +10 -2
- package/src/components/credit-notes/list/locales/en.ts +8 -0
- package/src/components/credit-notes/list/locales/es.ts +41 -0
- package/src/components/credit-notes/list/locales/fr.ts +41 -0
- package/src/components/credit-notes/list/locales/hr.ts +41 -0
- package/src/components/credit-notes/list/locales/it.ts +41 -0
- package/src/components/credit-notes/list/locales/nl.ts +41 -0
- package/src/components/credit-notes/list/locales/pl.ts +41 -0
- package/src/components/credit-notes/list/locales/pt.ts +41 -0
- package/src/components/credit-notes/list/locales/sl.ts +10 -2
- package/src/components/customers/create-customer-form/create-customer-form.tsx +21 -3
- package/src/components/customers/create-customer-form/locales/de.ts +1 -0
- package/src/components/customers/create-customer-form/locales/es.ts +21 -0
- package/src/components/customers/create-customer-form/locales/fr.ts +21 -0
- package/src/components/customers/create-customer-form/locales/hr.ts +21 -0
- package/src/components/customers/create-customer-form/locales/it.ts +21 -0
- package/src/components/customers/create-customer-form/locales/nl.ts +21 -0
- package/src/components/customers/create-customer-form/locales/pl.ts +21 -0
- package/src/components/customers/create-customer-form/locales/pt.ts +21 -0
- package/src/components/customers/create-customer-form/locales/sl.ts +1 -0
- package/src/components/customers/customer-list-table/customer-list-row-actions.tsx +72 -16
- package/src/components/customers/customer-list-table/customer-list-table.tsx +35 -2
- package/src/components/customers/customer-list-table/locales/de.ts +9 -0
- package/src/components/customers/customer-list-table/locales/en.ts +10 -0
- package/src/components/customers/customer-list-table/locales/es.ts +25 -0
- package/src/components/customers/customer-list-table/locales/fr.ts +25 -0
- package/src/components/customers/customer-list-table/locales/hr.ts +25 -0
- package/src/components/customers/customer-list-table/locales/it.ts +25 -0
- package/src/components/customers/customer-list-table/locales/nl.ts +25 -0
- package/src/components/customers/customer-list-table/locales/pl.ts +25 -0
- package/src/components/customers/customer-list-table/locales/pt.ts +25 -0
- package/src/components/customers/customer-list-table/locales/sl.ts +9 -0
- package/src/components/customers/customers.hooks.test.ts +8 -8
- package/src/components/customers/customers.hooks.ts +6 -1
- package/src/components/customers/edit-customer-form/edit-customer-form.tsx +143 -0
- package/src/components/customers/edit-customer-form/locales/de.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/es.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/fr.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/hr.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/it.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/nl.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/pl.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/pt.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/sl.ts +13 -0
- package/src/components/customers/index.ts +1 -0
- package/src/components/dashboard/collection-rate-card/collection-rate-card.tsx +9 -1
- package/src/components/dashboard/collection-rate-card/locales/de.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/es.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/fr.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/hr.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/it.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/nl.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/pl.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/pt.ts +3 -0
- package/src/components/dashboard/invoice-status-chart/invoice-status-chart.tsx +9 -1
- package/src/components/dashboard/invoice-status-chart/locales/de.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/es.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/fr.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/hr.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/it.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/nl.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/pl.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/pt.ts +9 -0
- package/src/components/dashboard/payment-methods-chart/locales/de.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/es.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/fr.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/hr.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/it.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/nl.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/pl.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/pt.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/payment-methods-chart.tsx +9 -1
- package/src/components/dashboard/payment-trend-chart/locales/de.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/es.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/fr.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/hr.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/it.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/nl.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/pl.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/pt.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/payment-trend-chart.tsx +10 -2
- package/src/components/dashboard/revenue-trend-chart/locales/de.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/es.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/fr.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/hr.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/it.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/nl.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/pl.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/pt.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/revenue-trend-chart.tsx +10 -2
- package/src/components/dashboard/top-customers-chart/locales/de.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/es.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/fr.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/hr.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/it.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/nl.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/pl.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/pt.ts +5 -0
- package/src/components/dashboard/top-customers-chart/top-customers-chart.tsx +10 -2
- package/src/components/documents/create/document-add-item-form.tsx +1 -1
- package/src/components/documents/create/form-types.ts +1 -5
- package/src/components/documents/create/mark-as-paid-section.tsx +60 -23
- package/src/components/documents/create/prepare-document-submission.test.ts +2 -2
- package/src/components/documents/create/prepare-document-submission.ts +12 -7
- package/src/components/documents/create/prepare-preview-data.test.ts +1 -1
- package/src/components/documents/documents.hooks.ts +5 -48
- package/src/components/documents/shared/document-preview-display.tsx +12 -1
- package/src/components/documents/view/document-actions-bar.tsx +28 -13
- package/src/components/documents/view/document-activities-list.tsx +166 -0
- package/src/components/documents/view/document-details-card.tsx +14 -7
- package/src/components/documents/view/document-payments-list.tsx +8 -1
- package/src/components/documents/view/index.ts +1 -0
- package/src/components/documents/view/locales/de.ts +32 -0
- package/src/components/documents/view/locales/es.ts +115 -0
- package/src/components/documents/view/locales/fr.ts +115 -0
- package/src/components/documents/view/locales/hr.ts +115 -0
- package/src/components/documents/view/locales/it.ts +115 -0
- package/src/components/documents/view/locales/nl.ts +116 -0
- package/src/components/documents/view/locales/pl.ts +115 -0
- package/src/components/documents/view/locales/pt.ts +115 -0
- package/src/components/documents/view/locales/sl.ts +32 -0
- package/src/components/entities/create-entity-form.tsx +12 -2
- package/src/components/entities/entity-settings-form/entity-settings-form.tsx +18 -0
- package/src/components/entities/entity-settings-form/locales/de.ts +3 -1
- package/src/components/entities/entity-settings-form/locales/es.ts +197 -0
- package/src/components/entities/entity-settings-form/locales/fr.ts +196 -0
- package/src/components/entities/entity-settings-form/locales/hr.ts +189 -0
- package/src/components/entities/entity-settings-form/locales/it.ts +195 -0
- package/src/components/entities/entity-settings-form/locales/nl.ts +192 -0
- package/src/components/entities/entity-settings-form/locales/pl.ts +193 -0
- package/src/components/entities/entity-settings-form/locales/pt.ts +194 -0
- package/src/components/entities/entity-settings-form/locales/sl.ts +2 -0
- package/src/components/entities/fina-settings-form/fina-settings-form.tsx +461 -0
- package/src/components/entities/fina-settings-form/fina-settings.hooks.ts +215 -0
- package/src/components/entities/fina-settings-form/index.ts +3 -0
- package/src/components/entities/fina-settings-form/locales/de.ts +148 -0
- package/src/components/entities/fina-settings-form/locales/en.ts +145 -0
- package/src/components/entities/fina-settings-form/locales/es.ts +146 -0
- package/src/components/entities/fina-settings-form/locales/fr.ts +145 -0
- package/src/components/entities/fina-settings-form/locales/hr.ts +147 -0
- package/src/components/entities/fina-settings-form/locales/it.ts +147 -0
- package/src/components/entities/fina-settings-form/locales/nl.ts +147 -0
- package/src/components/entities/fina-settings-form/locales/pl.ts +145 -0
- package/src/components/entities/fina-settings-form/locales/pt.ts +147 -0
- package/src/components/entities/fina-settings-form/locales/sl.ts +147 -0
- package/src/components/entities/fina-settings-form/sections/certificate-settings-section.tsx +233 -0
- package/src/components/entities/fina-settings-form/sections/premises-management-section.tsx +363 -0
- package/src/components/entities/fina-settings-form/sections/register-premise-dialog.tsx +395 -0
- package/src/components/entities/furs-settings-form/furs-settings-form.tsx +24 -9
- package/src/components/entities/furs-settings-form/furs-settings.hooks.ts +15 -11
- package/src/components/entities/furs-settings-form/locales/de.ts +54 -88
- package/src/components/entities/furs-settings-form/locales/en.ts +15 -0
- package/src/components/entities/furs-settings-form/locales/es.ts +198 -0
- package/src/components/entities/furs-settings-form/locales/fr.ts +198 -0
- package/src/components/entities/furs-settings-form/locales/hr.ts +197 -0
- package/src/components/entities/furs-settings-form/locales/it.ts +198 -0
- package/src/components/entities/furs-settings-form/locales/nl.ts +197 -0
- package/src/components/entities/furs-settings-form/locales/pl.ts +196 -0
- package/src/components/entities/furs-settings-form/locales/pt.ts +197 -0
- package/src/components/entities/furs-settings-form/locales/sl.ts +16 -0
- package/src/components/entities/furs-settings-form/sections/certificate-settings-section.tsx +19 -4
- package/src/components/entities/furs-settings-form/sections/general-settings-section.tsx +121 -1
- package/src/components/entities/furs-settings-form/sections/register-premise-dialog.tsx +17 -66
- package/src/components/entities/keys.ts +1 -1
- package/src/components/entities/settings/company-settings-form.tsx +28 -0
- package/src/components/entities/settings/pdf-template-selector/locales/es.ts +18 -0
- package/src/components/entities/settings/pdf-template-selector/locales/fr.ts +18 -0
- package/src/components/entities/settings/pdf-template-selector/locales/hr.ts +18 -0
- package/src/components/entities/settings/pdf-template-selector/locales/it.ts +18 -0
- package/src/components/entities/settings/pdf-template-selector/locales/nl.ts +17 -0
- package/src/components/entities/settings/pdf-template-selector/locales/pl.ts +18 -0
- package/src/components/entities/settings/pdf-template-selector/locales/pt.ts +18 -0
- package/src/components/estimates/create/create-estimate-form.tsx +14 -0
- package/src/components/estimates/create/locales/es.ts +57 -0
- package/src/components/estimates/create/locales/fr.ts +58 -0
- package/src/components/estimates/create/locales/hr.ts +57 -0
- package/src/components/estimates/create/locales/it.ts +57 -0
- package/src/components/estimates/create/locales/nl.ts +58 -0
- package/src/components/estimates/create/locales/pl.ts +57 -0
- package/src/components/estimates/create/locales/pt.ts +58 -0
- package/src/components/estimates/create/prepare-estimate-submission.ts +1 -1
- package/src/components/estimates/list/list-table.tsx +20 -3
- package/src/components/estimates/list/locales/de.ts +9 -0
- package/src/components/estimates/list/locales/en.ts +8 -0
- package/src/components/estimates/list/locales/es.ts +32 -0
- package/src/components/estimates/list/locales/fr.ts +32 -0
- package/src/components/estimates/list/locales/hr.ts +32 -0
- package/src/components/estimates/list/locales/it.ts +32 -0
- package/src/components/estimates/list/locales/nl.ts +32 -0
- package/src/components/estimates/list/locales/pl.ts +32 -0
- package/src/components/estimates/list/locales/pt.ts +32 -0
- package/src/components/estimates/list/locales/sl.ts +9 -0
- package/src/components/export/document-export-form.tsx +0 -2
- package/src/components/invoices/create/create-invoice-form.tsx +24 -10
- package/src/components/invoices/create/eslog-validation.test.ts +2 -0
- package/src/components/invoices/create/locales/es.ts +103 -0
- package/src/components/invoices/create/locales/fr.ts +105 -0
- package/src/components/invoices/create/locales/hr.ts +103 -0
- package/src/components/invoices/create/locales/it.ts +105 -0
- package/src/components/invoices/create/locales/nl.ts +104 -0
- package/src/components/invoices/create/locales/pl.ts +104 -0
- package/src/components/invoices/create/locales/pt.ts +105 -0
- package/src/components/invoices/create/prepare-invoice-submission.test.ts +54 -55
- package/src/components/invoices/create/prepare-invoice-submission.ts +3 -3
- package/src/components/invoices/index.ts +1 -1
- package/src/components/invoices/list/list-table.tsx +20 -3
- package/src/components/invoices/list/locales/de.ts +9 -0
- package/src/components/invoices/list/locales/en.ts +8 -0
- package/src/components/invoices/list/locales/es.ts +42 -0
- package/src/components/invoices/list/locales/fr.ts +42 -0
- package/src/components/invoices/list/locales/hr.ts +42 -0
- package/src/components/invoices/list/locales/it.ts +42 -0
- package/src/components/invoices/list/locales/nl.ts +42 -0
- package/src/components/invoices/list/locales/pl.ts +42 -0
- package/src/components/invoices/list/locales/pt.ts +42 -0
- package/src/components/invoices/list/locales/sl.ts +9 -0
- package/src/components/invoices/send-email-dialog/locales/es.ts +18 -0
- package/src/components/invoices/send-email-dialog/locales/fr.ts +18 -0
- package/src/components/invoices/send-email-dialog/locales/hr.ts +17 -0
- package/src/components/invoices/send-email-dialog/locales/it.ts +18 -0
- package/src/components/invoices/send-email-dialog/locales/nl.ts +18 -0
- package/src/components/invoices/send-email-dialog/locales/pl.ts +18 -0
- package/src/components/invoices/send-email-dialog/locales/pt.ts +18 -0
- package/src/components/invoices/send-email-dialog/send-email-dialog.tsx +22 -14
- package/src/components/invoices/shared/scaled-document-preview.tsx +1 -0
- package/src/components/invoices/view/eslog-info-display.tsx +1 -0
- package/src/components/invoices/view/fiscalization-status-card.tsx +121 -0
- package/src/components/items/create-item-form/create-item-form.tsx +14 -0
- package/src/components/items/create-item-form/locales/en.ts +5 -0
- package/src/components/items/create-item-form/locales/es.ts +14 -0
- package/src/components/items/create-item-form/locales/fr.ts +14 -0
- package/src/components/items/create-item-form/locales/hr.ts +14 -0
- package/src/components/items/create-item-form/locales/it.ts +14 -0
- package/src/components/items/create-item-form/locales/nl.ts +14 -0
- package/src/components/items/create-item-form/locales/pl.ts +14 -0
- package/src/components/items/create-item-form/locales/pt.ts +14 -0
- package/src/components/items/edit-item-form/edit-item-form.tsx +170 -0
- package/src/components/items/edit-item-form/locales/de.ts +12 -0
- package/src/components/items/edit-item-form/locales/es.ts +12 -0
- package/src/components/items/edit-item-form/locales/fr.ts +12 -0
- package/src/components/items/edit-item-form/locales/hr.ts +12 -0
- package/src/components/items/edit-item-form/locales/it.ts +12 -0
- package/src/components/items/edit-item-form/locales/nl.ts +12 -0
- package/src/components/items/edit-item-form/locales/pl.ts +12 -0
- package/src/components/items/edit-item-form/locales/pt.ts +12 -0
- package/src/components/items/edit-item-form/locales/sl.ts +12 -0
- package/src/components/items/item-list-table/item-list-table.tsx +20 -13
- package/src/components/items/item-list-table/locales/de.ts +6 -0
- package/src/components/items/item-list-table/locales/en.ts +5 -0
- package/src/components/items/item-list-table/locales/es.ts +16 -0
- package/src/components/items/item-list-table/locales/fr.ts +16 -0
- package/src/components/items/item-list-table/locales/hr.ts +16 -0
- package/src/components/items/item-list-table/locales/it.ts +16 -0
- package/src/components/items/item-list-table/locales/nl.ts +16 -0
- package/src/components/items/item-list-table/locales/pl.ts +16 -0
- package/src/components/items/item-list-table/locales/pt.ts +16 -0
- package/src/components/items/item-list-table/locales/sl.ts +6 -0
- package/src/components/items/items.hooks.ts +7 -2
- package/src/components/payments/create-payment-form/create-payment-form.tsx +14 -0
- package/src/components/payments/create-payment-form/locales/es.ts +20 -0
- package/src/components/payments/create-payment-form/locales/fr.ts +20 -0
- package/src/components/payments/create-payment-form/locales/hr.ts +20 -0
- package/src/components/payments/create-payment-form/locales/it.ts +20 -0
- package/src/components/payments/create-payment-form/locales/nl.ts +20 -0
- package/src/components/payments/create-payment-form/locales/pl.ts +20 -0
- package/src/components/payments/create-payment-form/locales/pt.ts +20 -0
- package/src/components/payments/edit-payment-form/edit-payment-form.tsx +18 -2
- package/src/components/payments/edit-payment-form/locales/es.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/fr.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/hr.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/it.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/nl.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/pl.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/pt.ts +20 -0
- package/src/components/payments/list/list-row-actions.tsx +14 -0
- package/src/components/payments/list/list-table.tsx +21 -2
- package/src/components/payments/list/locales/de.ts +6 -0
- package/src/components/payments/list/locales/en.ts +7 -0
- package/src/components/payments/list/locales/es.ts +25 -0
- package/src/components/payments/list/locales/fr.ts +25 -0
- package/src/components/payments/list/locales/hr.ts +25 -0
- package/src/components/payments/list/locales/it.ts +25 -0
- package/src/components/payments/list/locales/nl.ts +25 -0
- package/src/components/payments/list/locales/pl.ts +25 -0
- package/src/components/payments/list/locales/pt.ts +25 -0
- package/src/components/payments/list/locales/sl.ts +6 -0
- package/src/components/payments/payments.hooks.ts +7 -2
- package/src/components/request-logs/index.ts +1 -1
- package/src/components/table/data-table.tsx +8 -3
- package/src/components/table/filter-panel.tsx +4 -4
- package/src/components/table/hooks/use-table-query.ts +3 -0
- package/src/components/table/table-empty-state.tsx +11 -4
- package/src/components/table/table-no-results.tsx +6 -4
- package/src/components/table/types.ts +2 -2
- package/src/components/tax-reports/kir-export-form.tsx +0 -1
- package/src/components/taxes/create-tax-form/create-tax-form.tsx +14 -0
- package/src/components/taxes/create-tax-form/locales/en.ts +1 -0
- package/src/components/taxes/create-tax-form/locales/es.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/fr.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/hr.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/it.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/nl.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/pl.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/pt.ts +8 -0
- package/src/components/taxes/edit-tax-form/edit-tax-form.tsx +119 -0
- package/src/components/taxes/edit-tax-form/locales/de.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/es.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/fr.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/hr.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/it.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/nl.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/pl.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/pt.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/sl.ts +6 -0
- package/src/components/taxes/tax-list-table/locales/de.ts +6 -0
- package/src/components/taxes/tax-list-table/locales/en.ts +6 -0
- package/src/components/taxes/tax-list-table/locales/es.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/fr.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/hr.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/it.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/nl.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/pl.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/pt.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/sl.ts +6 -0
- package/src/components/taxes/tax-list-table/tax-list-table.tsx +18 -0
- package/src/components/taxes/taxes.hooks.ts +12 -7
- package/src/components/ui/tooltip.tsx +2 -2
- package/src/components/wl-subscription/locked-feature.tsx +1 -0
- package/src/components/wl-subscription/upgrade-modal.tsx +1 -0
- package/src/generated/schemas/acceptentityinvitation_body.ts +17 -0
- package/src/generated/schemas/addentityuser_body.ts +18 -0
- package/src/generated/schemas/advanceinvoice.ts +184 -12
- package/src/generated/schemas/creditnote.ts +99 -127
- package/src/generated/schemas/customadvanceinvoice.ts +246 -0
- package/src/generated/schemas/customcreditnote.ts +237 -0
- package/src/generated/schemas/customer.ts +26 -0
- package/src/generated/schemas/customestimate.ts +181 -0
- package/src/generated/schemas/custominvoice.ts +237 -0
- package/src/generated/schemas/entity.ts +66 -7
- package/src/generated/schemas/entityuserrole.ts +19 -0
- package/src/generated/schemas/estimate.ts +149 -1
- package/src/generated/schemas/finasettings.ts +25 -0
- package/src/generated/schemas/furssettings.ts +1 -2
- package/src/generated/schemas/index.ts +24 -5
- package/src/generated/schemas/invoice.ts +224 -22
- package/src/generated/schemas/me.ts +22 -0
- package/src/generated/schemas/registerfinamovablepremise_body.ts +26 -0
- package/src/generated/schemas/registerfinarealestatepremise_body.ts +37 -0
- package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +342 -0
- package/src/generated/schemas/rendercreditnotepreview_body.ts +344 -0
- package/src/generated/schemas/renderestimatepreview_body.ts +284 -0
- package/src/generated/schemas/renderinvoicepreview_body.ts +344 -0
- package/src/generated/schemas/senddocument_body.ts +23 -0
- package/src/generated/schemas/sendemail_body.ts +8 -10
- package/src/generated/schemas/stripeappconnect_body.ts +18 -0
- package/src/generated/schemas/stripeappcreateinvoice_body.ts +20 -0
- package/src/generated/schemas/stripeappupdatesettings_body.ts +26 -0
- package/src/generated/schemas/webhook.ts +143 -0
- package/src/hooks/create-resource-hooks.ts +85 -1
- package/src/hooks/use-duplicate-document.ts +19 -11
- package/src/hooks/use-next-document-number.ts +1 -1
- package/src/hooks/use-resource-mutation.ts +4 -3
- package/src/lib/browser-cookies.ts +12 -1
- package/src/lib/cookies.ts +2 -2
- package/src/lib/translation.ts +1 -1
- package/src/providers/entities-provider.tsx +105 -39
- package/src/providers/sdk-provider.tsx +7 -3
- package/src/providers/white-label-provider.tsx +5 -2
- package/src/providers/wl-subscription-provider.tsx +1 -0
- package/src/components/invoices/view/furs-info-display.tsx +0 -213
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
|
-
import type { CreateInvoiceSchema } from "@/ui/generated/schemas";
|
|
3
2
|
import { prepareInvoiceSubmission } from "./prepare-invoice-submission";
|
|
4
3
|
|
|
5
4
|
describe("prepareInvoiceSubmission", () => {
|
|
6
5
|
describe("customer data transformation", () => {
|
|
7
6
|
test("sends only customer_id when customer not editable", () => {
|
|
8
|
-
const values:
|
|
7
|
+
const values: any = {
|
|
9
8
|
customer_id: "cust-123",
|
|
10
9
|
customer: {} as any,
|
|
11
10
|
number: "INV-001",
|
|
@@ -29,7 +28,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
29
28
|
address: "123 Test St",
|
|
30
29
|
};
|
|
31
30
|
|
|
32
|
-
const values:
|
|
31
|
+
const values: any = {
|
|
33
32
|
customer_id: "cust-123",
|
|
34
33
|
customer: originalCustomer as any,
|
|
35
34
|
number: "INV-001",
|
|
@@ -58,7 +57,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
58
57
|
address: "456 New St",
|
|
59
58
|
};
|
|
60
59
|
|
|
61
|
-
const values:
|
|
60
|
+
const values: any = {
|
|
62
61
|
customer_id: "cust-123",
|
|
63
62
|
customer: modifiedCustomer as any,
|
|
64
63
|
number: "INV-001",
|
|
@@ -86,7 +85,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
86
85
|
city: "New City",
|
|
87
86
|
};
|
|
88
87
|
|
|
89
|
-
const values:
|
|
88
|
+
const values: any = {
|
|
90
89
|
customer: newCustomer as any,
|
|
91
90
|
number: "INV-001",
|
|
92
91
|
date: "2024-01-01",
|
|
@@ -115,7 +114,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
115
114
|
post_code: "12345",
|
|
116
115
|
};
|
|
117
116
|
|
|
118
|
-
const values:
|
|
117
|
+
const values: any = {
|
|
119
118
|
customer: customerWithEmpty as any,
|
|
120
119
|
number: "INV-001",
|
|
121
120
|
date: "2024-01-01",
|
|
@@ -143,7 +142,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
143
142
|
state: undefined,
|
|
144
143
|
};
|
|
145
144
|
|
|
146
|
-
const values:
|
|
145
|
+
const values: any = {
|
|
147
146
|
customer: emptyCustomer as any,
|
|
148
147
|
number: "INV-001",
|
|
149
148
|
date: "2024-01-01",
|
|
@@ -160,7 +159,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
160
159
|
});
|
|
161
160
|
|
|
162
161
|
test("removes customer_id when empty", () => {
|
|
163
|
-
const values:
|
|
162
|
+
const values: any = {
|
|
164
163
|
customer_id: "",
|
|
165
164
|
number: "INV-001",
|
|
166
165
|
date: "2024-01-01",
|
|
@@ -179,14 +178,14 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
179
178
|
|
|
180
179
|
describe("date conversion", () => {
|
|
181
180
|
test("converts date string to Date object", () => {
|
|
182
|
-
const values:
|
|
181
|
+
const values: any = {
|
|
183
182
|
number: "INV-001",
|
|
184
183
|
date: "2024-01-15",
|
|
185
184
|
date_due: "2024-02-15",
|
|
186
185
|
items: [],
|
|
187
186
|
};
|
|
188
187
|
|
|
189
|
-
const result = prepareInvoiceSubmission(values, {
|
|
188
|
+
const result: any = prepareInvoiceSubmission(values, {
|
|
190
189
|
wasCustomerFormShown: false,
|
|
191
190
|
originalCustomer: null,
|
|
192
191
|
});
|
|
@@ -196,14 +195,14 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
196
195
|
});
|
|
197
196
|
|
|
198
197
|
test("converts date_due string to Date object", () => {
|
|
199
|
-
const values:
|
|
198
|
+
const values: any = {
|
|
200
199
|
number: "INV-001",
|
|
201
200
|
date: "2024-01-15",
|
|
202
201
|
date_due: "2024-02-15",
|
|
203
202
|
items: [],
|
|
204
203
|
};
|
|
205
204
|
|
|
206
|
-
const result = prepareInvoiceSubmission(values, {
|
|
205
|
+
const result: any = prepareInvoiceSubmission(values, {
|
|
207
206
|
wasCustomerFormShown: false,
|
|
208
207
|
originalCustomer: null,
|
|
209
208
|
});
|
|
@@ -213,7 +212,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
213
212
|
});
|
|
214
213
|
|
|
215
214
|
test("handles undefined dates", () => {
|
|
216
|
-
const values:
|
|
215
|
+
const values: any = {
|
|
217
216
|
number: "INV-001",
|
|
218
217
|
items: [],
|
|
219
218
|
} as any;
|
|
@@ -230,79 +229,79 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
230
229
|
|
|
231
230
|
describe("payment data", () => {
|
|
232
231
|
test("adds payment data when markAsPaid is true", () => {
|
|
233
|
-
const values:
|
|
232
|
+
const values: any = {
|
|
234
233
|
number: "INV-001",
|
|
235
234
|
date: "2024-01-15",
|
|
236
235
|
date_due: "2024-02-15",
|
|
237
236
|
items: [],
|
|
238
237
|
};
|
|
239
238
|
|
|
240
|
-
const result = prepareInvoiceSubmission(values, {
|
|
239
|
+
const result: any = prepareInvoiceSubmission(values, {
|
|
241
240
|
wasCustomerFormShown: false,
|
|
242
241
|
originalCustomer: null,
|
|
243
242
|
markAsPaid: true,
|
|
244
|
-
|
|
243
|
+
paymentTypes: ["bank_transfer"],
|
|
245
244
|
});
|
|
246
245
|
|
|
247
|
-
expect(result.
|
|
248
|
-
expect(result.
|
|
249
|
-
expect(result.
|
|
246
|
+
expect(result.payments).toBeDefined();
|
|
247
|
+
expect(result.payments?.[0]?.type).toBe("bank_transfer");
|
|
248
|
+
expect(result.payments?.[0]?.date).toBeInstanceOf(Date);
|
|
250
249
|
});
|
|
251
250
|
|
|
252
251
|
test("uses correct payment type", () => {
|
|
253
|
-
const values:
|
|
252
|
+
const values: any = {
|
|
254
253
|
number: "INV-001",
|
|
255
254
|
date: "2024-01-15",
|
|
256
255
|
date_due: "2024-02-15",
|
|
257
256
|
items: [],
|
|
258
257
|
};
|
|
259
258
|
|
|
260
|
-
const result = prepareInvoiceSubmission(values, {
|
|
259
|
+
const result: any = prepareInvoiceSubmission(values, {
|
|
261
260
|
wasCustomerFormShown: false,
|
|
262
261
|
originalCustomer: null,
|
|
263
262
|
markAsPaid: true,
|
|
264
|
-
|
|
263
|
+
paymentTypes: ["cash"],
|
|
265
264
|
});
|
|
266
265
|
|
|
267
|
-
expect(result.
|
|
266
|
+
expect(result.payments?.[0]?.type).toBe("cash");
|
|
268
267
|
});
|
|
269
268
|
|
|
270
269
|
test("uses default payment type when not specified", () => {
|
|
271
|
-
const values:
|
|
270
|
+
const values: any = {
|
|
272
271
|
number: "INV-001",
|
|
273
272
|
date: "2024-01-15",
|
|
274
273
|
date_due: "2024-02-15",
|
|
275
274
|
items: [],
|
|
276
275
|
};
|
|
277
276
|
|
|
278
|
-
const result = prepareInvoiceSubmission(values, {
|
|
277
|
+
const result: any = prepareInvoiceSubmission(values, {
|
|
279
278
|
wasCustomerFormShown: false,
|
|
280
279
|
originalCustomer: null,
|
|
281
280
|
markAsPaid: true,
|
|
282
281
|
});
|
|
283
282
|
|
|
284
|
-
expect(result.
|
|
283
|
+
expect(result.payments).toBeUndefined();
|
|
285
284
|
});
|
|
286
285
|
|
|
287
286
|
test("does not add payment data when markAsPaid is false", () => {
|
|
288
|
-
const values:
|
|
287
|
+
const values: any = {
|
|
289
288
|
number: "INV-001",
|
|
290
289
|
date: "2024-01-15",
|
|
291
290
|
date_due: "2024-02-15",
|
|
292
291
|
items: [],
|
|
293
292
|
};
|
|
294
293
|
|
|
295
|
-
const result = prepareInvoiceSubmission(values, {
|
|
294
|
+
const result: any = prepareInvoiceSubmission(values, {
|
|
296
295
|
wasCustomerFormShown: false,
|
|
297
296
|
originalCustomer: null,
|
|
298
297
|
markAsPaid: false,
|
|
299
298
|
});
|
|
300
299
|
|
|
301
|
-
expect(result.
|
|
300
|
+
expect(result.payments).toBeUndefined();
|
|
302
301
|
});
|
|
303
302
|
|
|
304
303
|
test("does not add payment data when markAsPaid not provided", () => {
|
|
305
|
-
const values:
|
|
304
|
+
const values: any = {
|
|
306
305
|
number: "INV-001",
|
|
307
306
|
date: "2024-01-15",
|
|
308
307
|
date_due: "2024-02-15",
|
|
@@ -314,7 +313,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
314
313
|
originalCustomer: null,
|
|
315
314
|
});
|
|
316
315
|
|
|
317
|
-
expect(result.
|
|
316
|
+
expect(result.payments).toBeUndefined();
|
|
318
317
|
});
|
|
319
318
|
});
|
|
320
319
|
|
|
@@ -326,7 +325,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
326
325
|
// Missing other fields
|
|
327
326
|
};
|
|
328
327
|
|
|
329
|
-
const values:
|
|
328
|
+
const values: any = {
|
|
330
329
|
customer: customer as any,
|
|
331
330
|
number: "INV-001",
|
|
332
331
|
date: "2024-01-15",
|
|
@@ -347,7 +346,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
347
346
|
});
|
|
348
347
|
|
|
349
348
|
test("preserves other invoice fields", () => {
|
|
350
|
-
const values:
|
|
349
|
+
const values: any = {
|
|
351
350
|
number: "INV-001",
|
|
352
351
|
date: "2024-01-15",
|
|
353
352
|
date_due: "2024-02-15",
|
|
@@ -373,14 +372,14 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
373
372
|
});
|
|
374
373
|
|
|
375
374
|
test("never includes number in payload (server auto-generates)", () => {
|
|
376
|
-
const values:
|
|
375
|
+
const values: any = {
|
|
377
376
|
number: "INV-001", // Even if form has a preview number
|
|
378
377
|
date: "2024-01-15",
|
|
379
378
|
date_due: "2024-02-15",
|
|
380
379
|
items: [],
|
|
381
380
|
};
|
|
382
381
|
|
|
383
|
-
const result = prepareInvoiceSubmission(values, {
|
|
382
|
+
const result: any = prepareInvoiceSubmission(values, {
|
|
384
383
|
wasCustomerFormShown: false,
|
|
385
384
|
originalCustomer: null,
|
|
386
385
|
});
|
|
@@ -392,7 +391,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
392
391
|
|
|
393
392
|
describe("gross price transformation", () => {
|
|
394
393
|
test("transforms items with priceModes[index]=true to send gross_price", () => {
|
|
395
|
-
const values:
|
|
394
|
+
const values: any = {
|
|
396
395
|
number: "INV-001",
|
|
397
396
|
date: "2024-01-15",
|
|
398
397
|
date_due: "2024-02-15",
|
|
@@ -417,7 +416,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
417
416
|
});
|
|
418
417
|
|
|
419
418
|
test("transforms items with priceModes[index]=false to send price", () => {
|
|
420
|
-
const values:
|
|
419
|
+
const values: any = {
|
|
421
420
|
number: "INV-001",
|
|
422
421
|
date: "2024-01-15",
|
|
423
422
|
date_due: "2024-02-15",
|
|
@@ -442,7 +441,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
442
441
|
});
|
|
443
442
|
|
|
444
443
|
test("defaults to net price when priceModes not provided", () => {
|
|
445
|
-
const values:
|
|
444
|
+
const values: any = {
|
|
446
445
|
number: "INV-001",
|
|
447
446
|
date: "2024-01-15",
|
|
448
447
|
date_due: "2024-02-15",
|
|
@@ -466,7 +465,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
466
465
|
});
|
|
467
466
|
|
|
468
467
|
test("handles mixed net and gross price items via priceModes", () => {
|
|
469
|
-
const values:
|
|
468
|
+
const values: any = {
|
|
470
469
|
number: "INV-001",
|
|
471
470
|
date: "2024-01-15",
|
|
472
471
|
date_due: "2024-02-15",
|
|
@@ -501,7 +500,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
501
500
|
|
|
502
501
|
describe("FURS fiscalization data", () => {
|
|
503
502
|
test("adds FURS data when premise and device provided", () => {
|
|
504
|
-
const values:
|
|
503
|
+
const values: any = {
|
|
505
504
|
number: "INV-001",
|
|
506
505
|
date: "2024-01-15",
|
|
507
506
|
date_due: "2024-02-15",
|
|
@@ -524,7 +523,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
524
523
|
});
|
|
525
524
|
|
|
526
525
|
test("does not add FURS data when no options provided", () => {
|
|
527
|
-
const values:
|
|
526
|
+
const values: any = {
|
|
528
527
|
number: "INV-001",
|
|
529
528
|
date: "2024-01-15",
|
|
530
529
|
date_due: "2024-02-15",
|
|
@@ -540,7 +539,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
540
539
|
});
|
|
541
540
|
|
|
542
541
|
test("does not add FURS data when only premise provided", () => {
|
|
543
|
-
const values:
|
|
542
|
+
const values: any = {
|
|
544
543
|
number: "INV-001",
|
|
545
544
|
date: "2024-01-15",
|
|
546
545
|
date_due: "2024-02-15",
|
|
@@ -559,7 +558,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
559
558
|
});
|
|
560
559
|
|
|
561
560
|
test("does not add FURS data when only device provided", () => {
|
|
562
|
-
const values:
|
|
561
|
+
const values: any = {
|
|
563
562
|
number: "INV-001",
|
|
564
563
|
date: "2024-01-15",
|
|
565
564
|
date_due: "2024-02-15",
|
|
@@ -578,7 +577,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
578
577
|
});
|
|
579
578
|
|
|
580
579
|
test("adds skip flag when skip fiscalization is true", () => {
|
|
581
|
-
const values:
|
|
580
|
+
const values: any = {
|
|
582
581
|
number: "INV-001",
|
|
583
582
|
date: "2024-01-15",
|
|
584
583
|
date_due: "2024-02-15",
|
|
@@ -597,7 +596,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
597
596
|
});
|
|
598
597
|
|
|
599
598
|
test("skip flag takes precedence over premise/device", () => {
|
|
600
|
-
const values:
|
|
599
|
+
const values: any = {
|
|
601
600
|
number: "INV-001",
|
|
602
601
|
date: "2024-01-15",
|
|
603
602
|
date_due: "2024-02-15",
|
|
@@ -619,7 +618,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
619
618
|
});
|
|
620
619
|
|
|
621
620
|
test("FURS data works with payment data", () => {
|
|
622
|
-
const values:
|
|
621
|
+
const values: any = {
|
|
623
622
|
number: "INV-001",
|
|
624
623
|
date: "2024-01-15",
|
|
625
624
|
date_due: "2024-02-15",
|
|
@@ -630,7 +629,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
630
629
|
wasCustomerFormShown: false,
|
|
631
630
|
originalCustomer: null,
|
|
632
631
|
markAsPaid: true,
|
|
633
|
-
|
|
632
|
+
paymentTypes: ["cash"],
|
|
634
633
|
furs: {
|
|
635
634
|
business_premise_name: "P1",
|
|
636
635
|
electronic_device_name: "E1",
|
|
@@ -641,14 +640,14 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
641
640
|
business_premise_name: "P1",
|
|
642
641
|
electronic_device_name: "E1",
|
|
643
642
|
});
|
|
644
|
-
expect(result.
|
|
645
|
-
expect(result.
|
|
643
|
+
expect(result.payments).toBeDefined();
|
|
644
|
+
expect(result.payments?.[0]?.type).toBe("cash");
|
|
646
645
|
});
|
|
647
646
|
});
|
|
648
647
|
|
|
649
648
|
describe("draft invoices", () => {
|
|
650
649
|
test("sets is_draft to true when isDraft option is true", () => {
|
|
651
|
-
const values:
|
|
650
|
+
const values: any = {
|
|
652
651
|
number: "INV-001",
|
|
653
652
|
date: "2024-01-15",
|
|
654
653
|
date_due: "2024-02-15",
|
|
@@ -665,7 +664,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
665
664
|
});
|
|
666
665
|
|
|
667
666
|
test("does not set is_draft when isDraft is false", () => {
|
|
668
|
-
const values:
|
|
667
|
+
const values: any = {
|
|
669
668
|
number: "INV-001",
|
|
670
669
|
date: "2024-01-15",
|
|
671
670
|
date_due: "2024-02-15",
|
|
@@ -682,7 +681,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
682
681
|
});
|
|
683
682
|
|
|
684
683
|
test("draft invoice without FURS data (form skips FURS for drafts)", () => {
|
|
685
|
-
const values:
|
|
684
|
+
const values: any = {
|
|
686
685
|
number: "INV-001",
|
|
687
686
|
date: "2024-01-15",
|
|
688
687
|
date_due: "2024-02-15",
|
|
@@ -702,7 +701,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
702
701
|
});
|
|
703
702
|
|
|
704
703
|
test("draft invoice without e-SLOG validation (form skips e-SLOG for drafts)", () => {
|
|
705
|
-
const values:
|
|
704
|
+
const values: any = {
|
|
706
705
|
number: "INV-001",
|
|
707
706
|
date: "2024-01-15",
|
|
708
707
|
date_due: "2024-02-15",
|
|
@@ -722,7 +721,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
722
721
|
});
|
|
723
722
|
|
|
724
723
|
test("draft invoice without payment data (form skips markAsPaid for drafts)", () => {
|
|
725
|
-
const values:
|
|
724
|
+
const values: any = {
|
|
726
725
|
number: "INV-001",
|
|
727
726
|
date: "2024-01-15",
|
|
728
727
|
date_due: "2024-02-15",
|
|
@@ -742,7 +741,7 @@ describe("prepareInvoiceSubmission", () => {
|
|
|
742
741
|
});
|
|
743
742
|
|
|
744
743
|
test("draft invoice preserves all other invoice data", () => {
|
|
745
|
-
const values:
|
|
744
|
+
const values: any = {
|
|
746
745
|
number: "DRAFT-123",
|
|
747
746
|
date: "2024-01-15",
|
|
748
747
|
date_due: "2024-02-15",
|
|
@@ -19,7 +19,7 @@ type PrepareOptions = {
|
|
|
19
19
|
originalCustomer: any;
|
|
20
20
|
wasCustomerFormShown?: boolean;
|
|
21
21
|
markAsPaid?: boolean;
|
|
22
|
-
|
|
22
|
+
paymentTypes?: string[];
|
|
23
23
|
/** FURS fiscalization data (for Slovenia) */
|
|
24
24
|
furs?: FursData;
|
|
25
25
|
/** e-SLOG validation data (for Slovenia) */
|
|
@@ -39,9 +39,9 @@ export function prepareInvoiceSubmission(values: CreateInvoiceSchema, options: P
|
|
|
39
39
|
originalCustomer: options.originalCustomer,
|
|
40
40
|
wasCustomerFormShown: options.wasCustomerFormShown,
|
|
41
41
|
markAsPaid: options.markAsPaid,
|
|
42
|
-
|
|
42
|
+
paymentTypes: options.paymentTypes,
|
|
43
43
|
documentType: "invoice",
|
|
44
|
-
secondaryDate: values.date_due,
|
|
44
|
+
secondaryDate: values.date_due ?? undefined,
|
|
45
45
|
priceModes: options.priceModes,
|
|
46
46
|
isDraft: options.isDraft,
|
|
47
47
|
}) as CreateInvoiceRequest;
|
|
@@ -5,5 +5,5 @@ export * from "./list";
|
|
|
5
5
|
export { SendEmailDialog } from "./send-email-dialog";
|
|
6
6
|
export * from "./shared";
|
|
7
7
|
export { EslogInfoDisplay } from "./view/eslog-info-display";
|
|
8
|
-
export {
|
|
8
|
+
export { FiscalizationStatusCard } from "./view/fiscalization-status-card";
|
|
9
9
|
// Note: InvoicePreviewDisplay is now DocumentPreviewDisplay in documents/shared
|
|
@@ -16,11 +16,27 @@ import { useSDK } from "@/ui/providers/sdk-provider";
|
|
|
16
16
|
|
|
17
17
|
import InvoiceListRowActions from "./list-row-actions";
|
|
18
18
|
import de from "./locales/de";
|
|
19
|
+
import en from "./locales/en";
|
|
20
|
+
import es from "./locales/es";
|
|
21
|
+
import fr from "./locales/fr";
|
|
22
|
+
import hr from "./locales/hr";
|
|
23
|
+
import it from "./locales/it";
|
|
24
|
+
import nl from "./locales/nl";
|
|
25
|
+
import pl from "./locales/pl";
|
|
26
|
+
import pt from "./locales/pt";
|
|
19
27
|
import sl from "./locales/sl";
|
|
20
28
|
|
|
21
29
|
const translations = {
|
|
30
|
+
en,
|
|
22
31
|
sl,
|
|
23
32
|
de,
|
|
33
|
+
it,
|
|
34
|
+
fr,
|
|
35
|
+
es,
|
|
36
|
+
pt,
|
|
37
|
+
nl,
|
|
38
|
+
pl,
|
|
39
|
+
hr,
|
|
24
40
|
} as const;
|
|
25
41
|
|
|
26
42
|
type InvoiceListTableProps = {
|
|
@@ -138,12 +154,13 @@ export default function InvoiceListTable({
|
|
|
138
154
|
onDownloadStart={onDownloadStart}
|
|
139
155
|
onDownloadSuccess={onDownloadSuccess}
|
|
140
156
|
onDownloadError={onDownloadError}
|
|
141
|
-
{
|
|
157
|
+
t={t}
|
|
158
|
+
locale={i18nProps.locale}
|
|
142
159
|
/>
|
|
143
160
|
),
|
|
144
161
|
},
|
|
145
162
|
],
|
|
146
|
-
[t, onRowClick, onAddPayment, onDuplicate, onDownloadStart, onDownloadSuccess, onDownloadError, i18nProps],
|
|
163
|
+
[t, onRowClick, onAddPayment, onDuplicate, onDownloadStart, onDownloadSuccess, onDownloadError, i18nProps.locale],
|
|
147
164
|
);
|
|
148
165
|
|
|
149
166
|
return (
|
|
@@ -152,7 +169,7 @@ export default function InvoiceListTable({
|
|
|
152
169
|
queryParams={queryParams}
|
|
153
170
|
resourceName="invoice"
|
|
154
171
|
cacheKey="invoices"
|
|
155
|
-
createNewLink=
|
|
172
|
+
createNewLink={entityId ? `/app/${entityId}/documents/add/invoice` : undefined}
|
|
156
173
|
onFetch={handleFetch}
|
|
157
174
|
onChangeParams={onChangeParams}
|
|
158
175
|
disableUrlSync={disableUrlSync}
|
|
@@ -30,4 +30,13 @@ export default {
|
|
|
30
30
|
Overdue: "Überfällig",
|
|
31
31
|
Voided: "Storniert",
|
|
32
32
|
"Created At": "Erstellt am",
|
|
33
|
+
Unshare: "Freigabe aufheben",
|
|
34
|
+
// Empty state translations
|
|
35
|
+
"Your list is empty": "Ihre Rechnungsliste ist leer",
|
|
36
|
+
"Get started by creating your first entry": "Erstellen Sie Ihre erste Rechnung",
|
|
37
|
+
"Create new": "Rechnung erstellen",
|
|
38
|
+
// No results translations
|
|
39
|
+
"No results found": "Keine Rechnungen gefunden",
|
|
40
|
+
"Try adjusting your search criteria": "Versuchen Sie, Ihre Suchkriterien anzupassen",
|
|
41
|
+
"Clear search": "Suche zurücksetzen",
|
|
33
42
|
} as const;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
// Empty state translations
|
|
3
|
+
"Your list is empty": "Your invoice list is empty",
|
|
4
|
+
"Get started by creating your first entry": "Get started by creating your first invoice",
|
|
5
|
+
"Create new": "Create invoice",
|
|
6
|
+
// No results translations
|
|
7
|
+
"No results found": "No invoices found",
|
|
8
|
+
} as const;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
Draft: "Borrador",
|
|
3
|
+
Number: "Número",
|
|
4
|
+
Customer: "Cliente",
|
|
5
|
+
Date: "Fecha",
|
|
6
|
+
"Date Due": "Fecha de vencimiento",
|
|
7
|
+
Total: "Total",
|
|
8
|
+
"Total with Tax": "Total con IVA",
|
|
9
|
+
Actions: "Acciones",
|
|
10
|
+
"Open menu": "Abrir menú",
|
|
11
|
+
"Copy invoice ID": "Copiar ID de factura",
|
|
12
|
+
"View invoice": "Ver factura",
|
|
13
|
+
"Add Payment": "Agregar pago",
|
|
14
|
+
"Download PDF": "Descargar PDF",
|
|
15
|
+
"Downloading...": "Descargando...",
|
|
16
|
+
Duplicate: "Duplicar",
|
|
17
|
+
"Send Email": "Enviar correo",
|
|
18
|
+
Invoice: "Factura",
|
|
19
|
+
"Failed to download PDF": "Error al descargar el PDF",
|
|
20
|
+
// Filter translations
|
|
21
|
+
"Search...": "Buscar...",
|
|
22
|
+
Filters: "Filtros",
|
|
23
|
+
"Date Range": "Rango de fechas",
|
|
24
|
+
From: "Desde",
|
|
25
|
+
To: "Hasta",
|
|
26
|
+
"Clear filters": "Limpiar filtros",
|
|
27
|
+
Status: "Estado",
|
|
28
|
+
Paid: "Pagado",
|
|
29
|
+
Unpaid: "No pagado",
|
|
30
|
+
Overdue: "Vencido",
|
|
31
|
+
Voided: "Anulado",
|
|
32
|
+
"Created At": "Creado el",
|
|
33
|
+
Unshare: "Dejar de compartir",
|
|
34
|
+
// Empty state translations
|
|
35
|
+
"Your list is empty": "Su lista de facturas está vacía",
|
|
36
|
+
"Get started by creating your first entry": "Comience creando su primera factura",
|
|
37
|
+
"Create new": "Crear factura",
|
|
38
|
+
// No results translations
|
|
39
|
+
"No results found": "No se encontraron facturas",
|
|
40
|
+
"Try adjusting your search criteria": "Intente ajustar sus criterios de búsqueda",
|
|
41
|
+
"Clear search": "Limpiar búsqueda",
|
|
42
|
+
} as const;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
Draft: "Brouillon",
|
|
3
|
+
Number: "Numéro",
|
|
4
|
+
Customer: "Client",
|
|
5
|
+
Date: "Date",
|
|
6
|
+
"Date Due": "Date d'échéance",
|
|
7
|
+
Total: "Total",
|
|
8
|
+
"Total with Tax": "Total TTC",
|
|
9
|
+
Actions: "Actions",
|
|
10
|
+
"Open menu": "Ouvrir le menu",
|
|
11
|
+
"Copy invoice ID": "Copier l'ID de la facture",
|
|
12
|
+
"View invoice": "Voir la facture",
|
|
13
|
+
"Add Payment": "Ajouter un paiement",
|
|
14
|
+
"Download PDF": "Télécharger le PDF",
|
|
15
|
+
"Downloading...": "Téléchargement...",
|
|
16
|
+
Duplicate: "Dupliquer",
|
|
17
|
+
"Send Email": "Envoyer un e-mail",
|
|
18
|
+
Invoice: "Facture",
|
|
19
|
+
"Failed to download PDF": "Échec du téléchargement du PDF",
|
|
20
|
+
// Filter translations
|
|
21
|
+
"Search...": "Rechercher...",
|
|
22
|
+
Filters: "Filtres",
|
|
23
|
+
"Date Range": "Plage de dates",
|
|
24
|
+
From: "Du",
|
|
25
|
+
To: "Au",
|
|
26
|
+
"Clear filters": "Effacer les filtres",
|
|
27
|
+
Status: "Statut",
|
|
28
|
+
Paid: "Payé",
|
|
29
|
+
Unpaid: "Non payé",
|
|
30
|
+
Overdue: "En retard",
|
|
31
|
+
Voided: "Annulé",
|
|
32
|
+
"Created At": "Créé le",
|
|
33
|
+
Unshare: "Annuler le partage",
|
|
34
|
+
// Empty state translations
|
|
35
|
+
"Your list is empty": "Votre liste de factures est vide",
|
|
36
|
+
"Get started by creating your first entry": "Commencez par créer votre première facture",
|
|
37
|
+
"Create new": "Créer une facture",
|
|
38
|
+
// No results translations
|
|
39
|
+
"No results found": "Aucune facture trouvée",
|
|
40
|
+
"Try adjusting your search criteria": "Essayez de modifier vos critères de recherche",
|
|
41
|
+
"Clear search": "Effacer la recherche",
|
|
42
|
+
} as const;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
Draft: "Nacrt",
|
|
3
|
+
Number: "Broj",
|
|
4
|
+
Customer: "Kupac",
|
|
5
|
+
Date: "Datum",
|
|
6
|
+
"Date Due": "Datum dospijeća",
|
|
7
|
+
Total: "Ukupno",
|
|
8
|
+
"Total with Tax": "Ukupno s PDV-om",
|
|
9
|
+
Actions: "Akcije",
|
|
10
|
+
"Open menu": "Otvori izbornik",
|
|
11
|
+
"Copy invoice ID": "Kopiraj ID računa",
|
|
12
|
+
"View invoice": "Prikaži račun",
|
|
13
|
+
"Add Payment": "Dodaj plaćanje",
|
|
14
|
+
"Download PDF": "Preuzmi PDF",
|
|
15
|
+
"Downloading...": "Preuzimanje...",
|
|
16
|
+
Duplicate: "Dupliciraj",
|
|
17
|
+
"Send Email": "Pošalji e-mail",
|
|
18
|
+
Invoice: "Račun",
|
|
19
|
+
"Failed to download PDF": "Preuzimanje PDF-a nije uspjelo",
|
|
20
|
+
// Filter translations
|
|
21
|
+
"Search...": "Pretraži...",
|
|
22
|
+
Filters: "Filtri",
|
|
23
|
+
"Date Range": "Raspon datuma",
|
|
24
|
+
From: "Od",
|
|
25
|
+
To: "Do",
|
|
26
|
+
"Clear filters": "Očisti filtre",
|
|
27
|
+
Status: "Status",
|
|
28
|
+
Paid: "Plaćeno",
|
|
29
|
+
Unpaid: "Neplaćeno",
|
|
30
|
+
Overdue: "Dospjelo",
|
|
31
|
+
Voided: "Poništeno",
|
|
32
|
+
"Created At": "Kreirano",
|
|
33
|
+
Unshare: "Ukloni dijeljenje",
|
|
34
|
+
// Empty state translations
|
|
35
|
+
"Your list is empty": "Vaš popis računa je prazan",
|
|
36
|
+
"Get started by creating your first entry": "Započnite izradom prvog računa",
|
|
37
|
+
"Create new": "Izradi račun",
|
|
38
|
+
// No results translations
|
|
39
|
+
"No results found": "Nisu pronađeni računi",
|
|
40
|
+
"Try adjusting your search criteria": "Pokušajte prilagoditi kriterije pretrage",
|
|
41
|
+
"Clear search": "Očisti pretragu",
|
|
42
|
+
} as const;
|