@spaceinvoices/react-ui 0.4.7 → 0.4.10
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/src/common/autocomplete.tsx +69 -6
- package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +124 -285
- package/src/components/advance-invoices/create/locales/de.ts +2 -1
- package/src/components/advance-invoices/create/locales/es.ts +2 -1
- package/src/components/advance-invoices/create/locales/fr.ts +2 -1
- package/src/components/advance-invoices/create/locales/hr.ts +2 -1
- package/src/components/advance-invoices/create/locales/it.ts +2 -1
- package/src/components/advance-invoices/create/locales/nl.ts +2 -1
- package/src/components/advance-invoices/create/locales/pl.ts +2 -1
- package/src/components/advance-invoices/create/locales/pt.ts +2 -1
- package/src/components/advance-invoices/create/locales/sl.ts +2 -1
- package/src/components/advance-invoices/list/list-table.tsx +10 -3
- package/src/components/advance-invoices/list/locales/de.ts +2 -0
- package/src/components/advance-invoices/list/locales/en.ts +1 -0
- package/src/components/advance-invoices/list/locales/es.ts +1 -0
- package/src/components/advance-invoices/list/locales/fr.ts +1 -0
- package/src/components/advance-invoices/list/locales/hr.ts +1 -0
- package/src/components/advance-invoices/list/locales/it.ts +1 -0
- package/src/components/advance-invoices/list/locales/nl.ts +1 -0
- package/src/components/advance-invoices/list/locales/pl.ts +1 -0
- package/src/components/advance-invoices/list/locales/pt.ts +1 -0
- package/src/components/advance-invoices/list/locales/sl.ts +1 -0
- package/src/components/advance-invoices/list/use-advance-invoice-download.ts +1 -12
- package/src/components/credit-notes/create/create-credit-note-form.tsx +116 -238
- package/src/components/credit-notes/create/locales/de.ts +2 -1
- package/src/components/credit-notes/create/locales/es.ts +2 -1
- package/src/components/credit-notes/create/locales/fr.ts +2 -1
- package/src/components/credit-notes/create/locales/hr.ts +2 -1
- package/src/components/credit-notes/create/locales/it.ts +2 -1
- package/src/components/credit-notes/create/locales/nl.ts +2 -1
- package/src/components/credit-notes/create/locales/pl.ts +2 -1
- package/src/components/credit-notes/create/locales/pt.ts +2 -1
- package/src/components/credit-notes/create/locales/sl.ts +2 -1
- package/src/components/credit-notes/list/list-table.tsx +6 -3
- package/src/components/credit-notes/list/use-credit-note-download.ts +1 -12
- package/src/components/customers/customer-autocomplete.tsx +64 -11
- package/src/components/customers/customer-list-table/customer-list-table.tsx +3 -2
- package/src/components/dashboard/collection-rate-card/collection-rate-card.tsx +9 -1
- package/src/components/dashboard/collection-rate-card/locales/bg.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/cs.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/et.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/fi.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/is.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/nb.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/sk.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/sv.ts +3 -0
- package/src/components/dashboard/invoice-status-chart/invoice-status-chart.tsx +10 -2
- package/src/components/dashboard/invoice-status-chart/locales/bg.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/cs.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/de.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/es.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/et.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/fi.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/fr.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/hr.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/is.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/it.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/nb.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/nl.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/pl.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/pt.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/sk.ts +10 -0
- package/src/components/dashboard/invoice-status-chart/locales/sl.ts +1 -0
- package/src/components/dashboard/invoice-status-chart/locales/sv.ts +10 -0
- package/src/components/dashboard/payment-methods-chart/locales/bg.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/cs.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/et.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/fi.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/is.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/nb.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/sk.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/sv.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/payment-methods-chart.tsx +9 -1
- package/src/components/dashboard/payment-trend-chart/locales/bg.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/cs.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/de.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/es.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/et.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/fi.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/fr.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/hr.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/is.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/it.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/nb.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/nl.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/pl.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/pt.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/sk.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/locales/sl.ts +1 -0
- package/src/components/dashboard/payment-trend-chart/locales/sv.ts +6 -0
- package/src/components/dashboard/payment-trend-chart/payment-trend-chart.tsx +15 -8
- package/src/components/dashboard/revenue-trend-chart/locales/bg.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/cs.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/de.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/es.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/et.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/fi.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/fr.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/hr.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/is.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/it.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/nb.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/nl.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/pl.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/pt.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/sk.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/locales/sl.ts +1 -0
- package/src/components/dashboard/revenue-trend-chart/locales/sv.ts +6 -0
- package/src/components/dashboard/revenue-trend-chart/revenue-trend-chart.tsx +15 -8
- package/src/components/dashboard/tax-collected-card/locales.ts +110 -0
- package/src/components/dashboard/tax-collected-card/tax-collected-card.tsx +8 -2
- package/src/components/dashboard/tax-collected-card/use-tax-collected.ts +4 -4
- package/src/components/dashboard/top-customers-chart/locales/bg.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/cs.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/de.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/es.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/et.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/fi.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/fr.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/hr.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/is.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/it.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/nb.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/nl.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/pl.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/pt.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/sk.ts +7 -0
- package/src/components/dashboard/top-customers-chart/locales/sl.ts +2 -0
- package/src/components/dashboard/top-customers-chart/locales/sv.ts +7 -0
- package/src/components/dashboard/top-customers-chart/top-customers-chart.tsx +23 -12
- package/src/components/delivery-notes/create/create-delivery-note-form.tsx +33 -20
- package/src/components/delivery-notes/create/locales/de.ts +2 -1
- package/src/components/delivery-notes/create/locales/es.ts +2 -1
- package/src/components/delivery-notes/create/locales/fr.ts +2 -1
- package/src/components/delivery-notes/create/locales/hr.ts +2 -1
- package/src/components/delivery-notes/create/locales/it.ts +2 -1
- package/src/components/delivery-notes/create/locales/nl.ts +2 -1
- package/src/components/delivery-notes/create/locales/pl.ts +2 -1
- package/src/components/delivery-notes/create/locales/pt.ts +2 -1
- package/src/components/delivery-notes/create/locales/sl.ts +2 -1
- package/src/components/delivery-notes/list/list-table.tsx +22 -13
- package/src/components/delivery-notes/list/locales/de.ts +2 -0
- package/src/components/delivery-notes/list/locales/en.ts +1 -0
- package/src/components/delivery-notes/list/locales/es.ts +1 -0
- package/src/components/delivery-notes/list/locales/fr.ts +1 -0
- package/src/components/delivery-notes/list/locales/hr.ts +1 -0
- package/src/components/delivery-notes/list/locales/it.ts +1 -0
- package/src/components/delivery-notes/list/locales/nl.ts +1 -0
- package/src/components/delivery-notes/list/locales/pl.ts +1 -0
- package/src/components/delivery-notes/list/locales/pt.ts +1 -0
- package/src/components/delivery-notes/list/locales/sl.ts +1 -0
- package/src/components/delivery-notes/list/use-delivery-note-download.ts +1 -12
- package/src/components/documents/create/document-add-item-form.tsx +28 -16
- package/src/components/documents/create/document-add-item-tax-rate-field.tsx +12 -2
- package/src/components/documents/create/document-items-section.tsx +70 -39
- package/src/components/documents/create/document-recipient-section.tsx +10 -1
- package/src/components/documents/create/live-preview.tsx +113 -15
- package/src/components/documents/create/prepare-document-submission.ts +35 -16
- package/src/components/documents/create/use-document-customer-form.ts +14 -3
- package/src/components/documents/documents.hooks.ts +7 -2
- package/src/components/documents/shared/document-preview-display.tsx +136 -67
- package/src/components/documents/shared/scaled-document-preview.tsx +45 -5
- package/src/components/documents/view/document-actions-bar.tsx +284 -182
- package/src/components/documents/view/document-activities-list.tsx +3 -0
- package/src/components/documents/view/document-payments-list.tsx +3 -0
- package/src/components/documents/view/locales/de.ts +8 -0
- package/src/components/documents/view/locales/es.ts +8 -0
- package/src/components/documents/view/locales/fr.ts +8 -0
- package/src/components/documents/view/locales/hr.ts +8 -0
- package/src/components/documents/view/locales/it.ts +8 -0
- package/src/components/documents/view/locales/nl.ts +8 -0
- package/src/components/documents/view/locales/pl.ts +8 -0
- package/src/components/documents/view/locales/pt.ts +8 -0
- package/src/components/documents/view/locales/sl.ts +8 -0
- package/src/components/documents/view/use-document-download.ts +14 -25
- package/src/components/entities/create-entity-form.tsx +101 -16
- package/src/components/entities/entity-settings-form/locales/de.ts +6 -3
- package/src/components/entities/entity-settings-form/locales/es.ts +6 -3
- package/src/components/entities/entity-settings-form/locales/fr.ts +6 -3
- package/src/components/entities/entity-settings-form/locales/hr.ts +4 -2
- package/src/components/entities/entity-settings-form/locales/it.ts +6 -3
- package/src/components/entities/entity-settings-form/locales/nl.ts +6 -3
- package/src/components/entities/entity-settings-form/locales/pl.ts +6 -2
- package/src/components/entities/entity-settings-form/locales/pt.ts +6 -3
- package/src/components/entities/entity-settings-form/locales/sl.ts +4 -2
- package/src/components/entities/fina-settings-form/fina-operator-required-dialog.tsx +3 -3
- package/src/components/entities/fina-settings-form/fina-settings-form.tsx +78 -124
- package/src/components/entities/fina-settings-form/sections/certificate-settings-section.tsx +8 -1
- package/src/components/entities/fina-settings-form/sections/premises-management-section.tsx +14 -2
- package/src/components/entities/fina-settings-form/sections/register-premise-dialog.tsx +7 -2
- package/src/components/entities/furs-settings-form/furs-settings-form.tsx +56 -130
- package/src/components/entities/furs-settings-form/sections/certificate-settings-section.tsx +8 -1
- package/src/components/entities/furs-settings-form/sections/enable-fiscalization-section.tsx +1 -0
- package/src/components/entities/furs-settings-form/sections/general-settings-section.tsx +15 -2
- package/src/components/entities/furs-settings-form/sections/premises-management-section.tsx +20 -3
- package/src/components/entities/furs-settings-form/sections/register-premise-dialog.tsx +38 -12
- package/src/components/entities/settings/eslog-settings-form.tsx +13 -1
- package/src/components/entities/settings/pdf-template-selector/demo-invoice-data.ts +3 -22
- package/src/components/entities/shared/fiscalization-step-flow.ts +77 -0
- package/src/components/entities/shared/fiscalization-step-tabs.tsx +71 -0
- package/src/components/estimates/create/create-estimate-form.tsx +34 -21
- package/src/components/estimates/create/locales/de.ts +2 -1
- package/src/components/estimates/create/locales/es.ts +2 -1
- package/src/components/estimates/create/locales/fr.ts +2 -1
- package/src/components/estimates/create/locales/hr.ts +2 -1
- package/src/components/estimates/create/locales/it.ts +2 -1
- package/src/components/estimates/create/locales/nl.ts +2 -1
- package/src/components/estimates/create/locales/pl.ts +2 -1
- package/src/components/estimates/create/locales/pt.ts +2 -1
- package/src/components/estimates/create/locales/sl.ts +2 -1
- package/src/components/estimates/list/list-table.tsx +23 -14
- package/src/components/estimates/list/locales/de.ts +2 -0
- package/src/components/estimates/list/locales/en.ts +1 -0
- package/src/components/estimates/list/locales/es.ts +1 -0
- package/src/components/estimates/list/locales/fr.ts +1 -0
- package/src/components/estimates/list/locales/hr.ts +1 -0
- package/src/components/estimates/list/locales/it.ts +1 -0
- package/src/components/estimates/list/locales/nl.ts +1 -0
- package/src/components/estimates/list/locales/pl.ts +1 -0
- package/src/components/estimates/list/locales/pt.ts +1 -0
- package/src/components/estimates/list/locales/sl.ts +1 -0
- package/src/components/estimates/list/use-estimate-download.ts +1 -12
- package/src/components/export/document-export-form.tsx +33 -7
- package/src/components/export/sales-per-item-export-form.tsx +23 -7
- package/src/components/invoices/create/create-invoice-form.tsx +295 -329
- package/src/components/invoices/create/locales/de.ts +2 -1
- package/src/components/invoices/create/locales/es.ts +2 -1
- package/src/components/invoices/create/locales/fr.ts +2 -1
- package/src/components/invoices/create/locales/hr.ts +2 -1
- package/src/components/invoices/create/locales/it.ts +2 -1
- package/src/components/invoices/create/locales/nl.ts +2 -1
- package/src/components/invoices/create/locales/pl.ts +2 -1
- package/src/components/invoices/create/locales/pt.ts +2 -1
- package/src/components/invoices/create/locales/sl.ts +2 -1
- package/src/components/invoices/create/prepare-invoice-submission.ts +0 -8
- package/src/components/invoices/list/list-table.tsx +7 -4
- package/src/components/invoices/list/use-invoice-download.ts +1 -11
- package/src/components/invoices/send-email-dialog/locales/de.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/es.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/fr.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/hr.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/it.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/nl.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/pl.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/pt.ts +2 -0
- package/src/components/invoices/send-email-dialog/locales/sl.ts +2 -0
- package/src/components/invoices/send-email-dialog/send-email-dialog.tsx +77 -8
- package/src/components/invoices/view/eslog-info-display.tsx +17 -1
- package/src/components/invoices/view/fiscalization-status-card.tsx +7 -3
- package/src/components/items/item-combobox.tsx +26 -6
- package/src/components/items/item-list-table/item-list-table.tsx +5 -2
- package/src/components/payments/list/list-table.tsx +14 -4
- package/src/components/recurring-invoices/list/list-table.tsx +7 -4
- package/src/components/request-logs/locales.ts +412 -0
- package/src/components/request-logs/request-log-detail.tsx +37 -21
- package/src/components/request-logs/request-log-list-table.tsx +57 -11
- package/src/components/table/data-table.tsx +5 -2
- package/src/components/table/date-cell.tsx +3 -1
- package/src/components/table/filter-bar.tsx +14 -2
- package/src/components/table/hooks/use-table-query.ts +1 -1
- package/src/components/table/locales.ts +1116 -0
- package/src/components/table/search-input.tsx +12 -3
- package/src/components/table/selection-toolbar.tsx +23 -6
- package/src/components/table/table-empty-state.tsx +43 -3
- package/src/components/table/table-no-results.tsx +3 -3
- package/src/components/table/table-pagination.tsx +4 -3
- package/src/components/table/types.ts +1 -0
- package/src/components/tax-reports/index.ts +1 -0
- package/src/components/tax-reports/kir-export-form.tsx +46 -8
- package/src/components/tax-reports/slovenia-tax-profile-step.tsx +191 -0
- package/src/components/tax-reports/slovenia-yearly-export-form.tsx +509 -0
- package/src/components/tax-reports/slovenia-yearly-review-step.tsx +253 -0
- package/src/components/tax-reports/slovenia-yearly-summary.tsx +19 -0
- package/src/components/taxes/tax-list-table/tax-list-table.tsx +3 -2
- package/src/components/ui/sticky-form-footer.tsx +7 -1
- package/src/components/webhook-logs/index.ts +6 -0
- package/src/components/webhook-logs/locales.ts +392 -0
- package/src/components/webhook-logs/webhook-delivery-detail.tsx +255 -0
- package/src/components/webhook-logs/webhook-delivery-list-table.tsx +278 -0
- package/src/components/wl-subscription/index.ts +1 -0
- package/src/components/wl-subscription/locked-feature.tsx +1 -0
- package/src/components/wl-subscription/paywall.tsx +193 -0
- package/src/components/wl-subscription/upgrade-modal.tsx +93 -29
- package/src/generate-schemas.ts +10 -5
- package/src/generated/schemas/customer.ts +2 -0
- package/src/generated/schemas/entity.ts +34 -0
- package/src/generated/schemas/me.ts +20 -1
- package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +40 -34
- package/src/generated/schemas/rendercreditnotepreview_body.ts +42 -36
- package/src/generated/schemas/renderdeliverynotepreview_body.ts +23 -13
- package/src/generated/schemas/renderestimatepreview_body.ts +23 -13
- package/src/generated/schemas/renderinvoicepreview_body.ts +40 -34
- package/src/generated/schemas/sendemail_body.ts +44 -0
- package/src/generated/schemas/startpdfexport_body.ts +91 -1
- package/src/generated/schemas/webhook.ts +10 -0
- package/src/hooks/use-duplicate-document.ts +51 -13
- package/src/hooks/use-eslog-validation.ts +59 -0
- package/src/hooks/use-premise-selection.ts +186 -0
- package/src/lib/browser-cookies.ts +4 -4
- package/src/lib/date-fns-locale.ts +48 -0
- package/src/lib/fiscalization-options.ts +81 -0
- package/src/lib/locale.ts +38 -0
- package/src/lib/template-variables.tsx +1 -1
- package/src/lib/translation.ts +14 -3
- package/src/providers/entities-context.tsx +1 -0
- package/src/providers/entities-provider.tsx +102 -3
- package/src/providers/form-footer-context.tsx +37 -4
- package/src/providers/sdk-provider.tsx +7 -2
- package/src/providers/white-label-provider.tsx +4 -1
- package/src/providers/wl-subscription-provider.tsx +90 -3
|
@@ -122,6 +122,14 @@ export default {
|
|
|
122
122
|
Dutch: "Neerlandês",
|
|
123
123
|
Polish: "Polaco",
|
|
124
124
|
Croatian: "Croata",
|
|
125
|
+
Swedish: "Sueco",
|
|
126
|
+
Finnish: "Finlandês",
|
|
127
|
+
Estonian: "Estónio",
|
|
128
|
+
Bulgarian: "Búlgaro",
|
|
129
|
+
Czech: "Checo",
|
|
130
|
+
Slovak: "Eslovaco",
|
|
131
|
+
Norwegian: "Norueguês",
|
|
132
|
+
Icelandic: "Islandês",
|
|
125
133
|
|
|
126
134
|
// Linked documents
|
|
127
135
|
"Linked documents": "Documentos vinculados",
|
|
@@ -123,6 +123,14 @@ export default {
|
|
|
123
123
|
Dutch: "Nizozemščina",
|
|
124
124
|
Polish: "Poljščina",
|
|
125
125
|
Croatian: "Hrvaščina",
|
|
126
|
+
Swedish: "Švedščina",
|
|
127
|
+
Finnish: "Finščina",
|
|
128
|
+
Estonian: "Estonščina",
|
|
129
|
+
Bulgarian: "Bolgarščina",
|
|
130
|
+
Czech: "Češčina",
|
|
131
|
+
Slovak: "Slovaščina",
|
|
132
|
+
Norwegian: "Norveščina",
|
|
133
|
+
Icelandic: "Islandščina",
|
|
126
134
|
|
|
127
135
|
// Linked documents
|
|
128
136
|
"Linked documents": "Povezani dokumenti",
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
type AdvanceInvoice,
|
|
3
|
+
type CreditNote,
|
|
4
|
+
type DeliveryNote,
|
|
5
|
+
downloadBlob,
|
|
6
|
+
type Estimate,
|
|
7
|
+
type Invoice,
|
|
8
|
+
} from "@spaceinvoices/js-sdk";
|
|
2
9
|
import { useState } from "react";
|
|
3
10
|
import { useEntities } from "@/ui/providers/entities-context";
|
|
4
11
|
import { useSDK } from "@/ui/providers/sdk-provider";
|
|
@@ -36,11 +43,10 @@ export function useDocumentDownload({
|
|
|
36
43
|
const [isDownloadingEslog, setIsDownloadingEslog] = useState(false);
|
|
37
44
|
|
|
38
45
|
/**
|
|
39
|
-
* Download PDF with optional
|
|
40
|
-
*
|
|
41
|
-
* The language param only changes labels/translations on the PDF.
|
|
46
|
+
* Download PDF with optional locale override.
|
|
47
|
+
* When a locale is selected, it is sent as both the formatting locale and label language.
|
|
42
48
|
*/
|
|
43
|
-
const downloadPdf = async (document: Document, documentType: DocumentType,
|
|
49
|
+
const downloadPdf = async (document: Document, documentType: DocumentType, locale?: string) => {
|
|
44
50
|
if (!sdk || !activeEntity?.id) {
|
|
45
51
|
onDownloadError?.("Download failed");
|
|
46
52
|
return;
|
|
@@ -53,21 +59,11 @@ export function useDocumentDownload({
|
|
|
53
59
|
// SDK signature: renderPdf(id, params?, SDKMethodOptions?)
|
|
54
60
|
// entity_id goes in SDKMethodOptions (last arg), not params
|
|
55
61
|
// Note: renderPdf is on invoices module but works with any document ID via /documents/{id}/pdf
|
|
56
|
-
|
|
57
|
-
const params = language ? { language } : {};
|
|
58
|
-
const blob = await sdk.invoices.renderPdf(document.id, params, { entity_id: activeEntity.id });
|
|
59
|
-
const downloadUrl = window.URL.createObjectURL(blob);
|
|
60
|
-
const link = window.document.createElement("a");
|
|
61
|
-
link.href = downloadUrl;
|
|
62
|
-
|
|
62
|
+
const params = locale ? { locale, language: locale } : {};
|
|
63
63
|
const typeLabel = TYPE_LABELS[documentType] || "Document";
|
|
64
64
|
const fileName = `${typeLabel} ${document.number}.pdf`;
|
|
65
|
-
link.download = fileName;
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
link.click();
|
|
69
|
-
window.document.body.removeChild(link);
|
|
70
|
-
window.URL.revokeObjectURL(downloadUrl);
|
|
66
|
+
await sdk.invoices.downloadPdf(document.id, fileName, params, { entity_id: activeEntity.id });
|
|
71
67
|
|
|
72
68
|
onDownloadSuccess?.(fileName);
|
|
73
69
|
} catch (error) {
|
|
@@ -106,14 +102,7 @@ export function useDocumentDownload({
|
|
|
106
102
|
const xml = await eSlogModule.download(document.id, typeMap[documentType], { entity_id: activeEntity.id });
|
|
107
103
|
|
|
108
104
|
const blob = new Blob([xml], { type: "application/xml" });
|
|
109
|
-
|
|
110
|
-
const a = window.document.createElement("a");
|
|
111
|
-
a.href = url;
|
|
112
|
-
a.download = `${document.number}.xml`;
|
|
113
|
-
window.document.body.appendChild(a);
|
|
114
|
-
a.click();
|
|
115
|
-
window.URL.revokeObjectURL(url);
|
|
116
|
-
window.document.body.removeChild(a);
|
|
105
|
+
downloadBlob(blob, `${document.number}.xml`);
|
|
117
106
|
} catch (error) {
|
|
118
107
|
console.error("Error downloading e-SLOG:", error);
|
|
119
108
|
onDownloadError?.("e-SLOG download failed");
|
|
@@ -10,6 +10,7 @@ import { Button } from "@/ui/components/ui/button";
|
|
|
10
10
|
import { Checkbox } from "@/ui/components/ui/checkbox";
|
|
11
11
|
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/ui/components/ui/form";
|
|
12
12
|
import { type CreateEntitySchema, createEntitySchema } from "@/ui/generated/schemas";
|
|
13
|
+
import { createTranslation } from "@/ui/lib/translation";
|
|
13
14
|
|
|
14
15
|
import ButtonLoader from "../button-loader";
|
|
15
16
|
import { useCreateEntity } from "./entities.hooks";
|
|
@@ -27,10 +28,85 @@ export type CreateEntityFormProps = {
|
|
|
27
28
|
onError?: (error: unknown) => void;
|
|
28
29
|
};
|
|
29
30
|
|
|
30
|
-
const
|
|
31
|
+
const translations = {
|
|
32
|
+
en: {
|
|
33
|
+
name: "Name",
|
|
34
|
+
"search-hint": "Search companies by name",
|
|
35
|
+
"no-results": "No companies found",
|
|
36
|
+
country: "Country",
|
|
37
|
+
address: "Address",
|
|
38
|
+
"address-2": "Address 2",
|
|
39
|
+
"post-code": "Post Code",
|
|
40
|
+
city: "City",
|
|
41
|
+
state: "State",
|
|
42
|
+
"tax-number": "Tax Number",
|
|
43
|
+
"is-tax-subject": "Tax subject",
|
|
44
|
+
"company-number": "Company Number",
|
|
45
|
+
submit: "Create entity",
|
|
46
|
+
},
|
|
47
|
+
} as const;
|
|
48
|
+
|
|
49
|
+
const ISO_COUNTRY_CODES = [
|
|
50
|
+
"AD", "AE", "AF", "AG", "AL", "AM", "AO", "AR", "AT", "AU", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI",
|
|
51
|
+
"BJ", "BN", "BO", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CD", "CF", "CG", "CH", "CI", "CL", "CM", "CN", "CO",
|
|
52
|
+
"CR", "CU", "CV", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "ER", "ES", "ET", "FI", "FJ",
|
|
53
|
+
"FM", "FR", "GA", "GB", "GD", "GE", "GH", "GM", "GN", "GQ", "GR", "GT", "GW", "GY", "HK", "HN", "HR", "HT", "HU",
|
|
54
|
+
"ID", "IE", "IL", "IN", "IQ", "IR", "IS", "IT", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR",
|
|
55
|
+
"KW", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MG", "MH",
|
|
56
|
+
"MK", "ML", "MM", "MN", "MR", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NE", "NG", "NI", "NL", "NO", "NP",
|
|
57
|
+
"NR", "NZ", "OM", "PA", "PE", "PG", "PH", "PK", "PL", "PT", "PW", "PY", "QA", "RO", "RS", "RU", "RW", "SA", "SB",
|
|
58
|
+
"SC", "SD", "SE", "SG", "SI", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SY", "SZ", "TD", "TG", "TH",
|
|
59
|
+
"TJ", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VA", "VC", "VE", "VN",
|
|
60
|
+
"VU", "WS", "XK", "YE", "ZA", "ZM", "ZW",
|
|
61
|
+
] as const;
|
|
62
|
+
|
|
63
|
+
const COUNTRY_CODE_ALIASES: Record<string, string> = {
|
|
64
|
+
uk: "GB",
|
|
65
|
+
"u.k.": "GB",
|
|
66
|
+
usa: "US",
|
|
67
|
+
"u.s.": "US",
|
|
68
|
+
"u.s.a.": "US",
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
function normalizeCountryName(value: string): string {
|
|
72
|
+
return value
|
|
73
|
+
.normalize("NFKD")
|
|
74
|
+
.replace(/\p{Diacritic}/gu, "")
|
|
75
|
+
.replace(/[.'’]/g, "")
|
|
76
|
+
.replace(/\s+/g, " ")
|
|
77
|
+
.trim()
|
|
78
|
+
.toLowerCase();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function resolveCountryCodeFromName(value: string | undefined, locale: string): string | undefined {
|
|
82
|
+
const trimmed = value?.trim();
|
|
83
|
+
if (!trimmed) return undefined;
|
|
84
|
+
|
|
85
|
+
const alias = COUNTRY_CODE_ALIASES[normalizeCountryName(trimmed)];
|
|
86
|
+
if (alias) return alias;
|
|
87
|
+
|
|
88
|
+
const upper = trimmed.toUpperCase();
|
|
89
|
+
if (upper.length === 2 && ISO_COUNTRY_CODES.includes(upper as (typeof ISO_COUNTRY_CODES)[number])) {
|
|
90
|
+
return upper;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const localesToTry = Array.from(new Set([locale, "en", "en-US"]));
|
|
94
|
+
|
|
95
|
+
for (const candidateLocale of localesToTry) {
|
|
96
|
+
const displayNames = new Intl.DisplayNames([candidateLocale], { type: "region" });
|
|
97
|
+
for (const code of ISO_COUNTRY_CODES) {
|
|
98
|
+
const label = displayNames.of(code);
|
|
99
|
+
if (label && normalizeCountryName(label) === normalizeCountryName(trimmed)) {
|
|
100
|
+
return code;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
31
107
|
|
|
32
108
|
export function CreateEntityForm({
|
|
33
|
-
t
|
|
109
|
+
t,
|
|
34
110
|
namespace = "",
|
|
35
111
|
accountId,
|
|
36
112
|
environment,
|
|
@@ -41,7 +117,7 @@ export function CreateEntityForm({
|
|
|
41
117
|
onSuccess,
|
|
42
118
|
onError,
|
|
43
119
|
}: CreateEntityFormProps) {
|
|
44
|
-
const translate = (
|
|
120
|
+
const translate = createTranslation({ t, namespace, locale, translations });
|
|
45
121
|
|
|
46
122
|
const countryName = countryCode ? new Intl.DisplayNames([locale], { type: "region" }).of(countryCode) : undefined;
|
|
47
123
|
|
|
@@ -50,12 +126,13 @@ export function CreateEntityForm({
|
|
|
50
126
|
const autoFilledCountryRef = useRef(countryName);
|
|
51
127
|
|
|
52
128
|
// Company registry autocomplete state
|
|
129
|
+
// showAutocomplete is based on the initial countryCode prop to avoid component switch mid-typing
|
|
53
130
|
const [nameSearch, setNameSearch] = useState("");
|
|
54
|
-
const { isSupported: isRegistrySupported } = useIsCountrySupported(
|
|
131
|
+
const { isSupported: isRegistrySupported } = useIsCountrySupported(countryCode || "");
|
|
55
132
|
const { data: searchData, isLoading: isSearching } = useCompanyRegistrySearch(activeCountryCode || "", nameSearch);
|
|
56
133
|
const companies = searchData?.data || [];
|
|
57
134
|
|
|
58
|
-
const showAutocomplete = !!
|
|
135
|
+
const showAutocomplete = !!countryCode && isRegistrySupported;
|
|
59
136
|
|
|
60
137
|
const nameOptions = companies.map((company) => {
|
|
61
138
|
const addressParts = [company.address, company.city].filter(Boolean);
|
|
@@ -97,13 +174,14 @@ export function CreateEntityForm({
|
|
|
97
174
|
// Watch country field — clear activeCountryCode when user edits away from auto-filled value
|
|
98
175
|
const countryValue = form.watch("country");
|
|
99
176
|
useEffect(() => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
177
|
+
const nextCountryCode =
|
|
178
|
+
countryValue === autoFilledCountryRef.current
|
|
179
|
+
? countryCode
|
|
180
|
+
: resolveCountryCodeFromName(countryValue, locale) || undefined;
|
|
181
|
+
|
|
182
|
+
setActiveCountryCode(nextCountryCode);
|
|
183
|
+
form.setValue("country_code", nextCountryCode || "");
|
|
184
|
+
}, [countryValue, countryCode, form, locale]);
|
|
107
185
|
|
|
108
186
|
const handleCompanySelect = (company: CompanyRegistryResult) => {
|
|
109
187
|
form.setValue("name", company.name);
|
|
@@ -133,9 +211,10 @@ export function CreateEntityForm({
|
|
|
133
211
|
|
|
134
212
|
const onSubmit = async (values: CreateEntitySchema) => {
|
|
135
213
|
try {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
214
|
+
const resolvedCountryCode = values.country_code || resolveCountryCodeFromName(values.country, locale);
|
|
215
|
+
const { country_code: _countryCode, ...rest } = values;
|
|
216
|
+
const payload = resolvedCountryCode ? { ...rest, country_code: resolvedCountryCode } : rest;
|
|
217
|
+
createEntity(payload as CreateEntityRequest);
|
|
139
218
|
} catch (e) {
|
|
140
219
|
onError?.(e);
|
|
141
220
|
form.setError("root", {
|
|
@@ -259,7 +338,13 @@ export function CreateEntityForm({
|
|
|
259
338
|
placeholder={translate("company-number")}
|
|
260
339
|
/>
|
|
261
340
|
|
|
262
|
-
<Button
|
|
341
|
+
<Button
|
|
342
|
+
type="submit"
|
|
343
|
+
className="w-full cursor-pointer"
|
|
344
|
+
disabled={isPending}
|
|
345
|
+
aria-busy={isPending}
|
|
346
|
+
data-testid="entity-create-submit"
|
|
347
|
+
>
|
|
263
348
|
{isPending ? <ButtonLoader /> : translate("submit")}
|
|
264
349
|
</Button>
|
|
265
350
|
</form>
|
|
@@ -184,9 +184,12 @@ export default {
|
|
|
184
184
|
"tax-clauses.intra_eu_b2b.description":
|
|
185
185
|
"Für Verkäufe an EU-Unternehmen mit gültiger USt-IdNr. Enthält typischerweise eine Reverse-Charge-Erklärung.",
|
|
186
186
|
"Enter reverse charge clause...": "Reverse-Charge-Klausel eingeben...",
|
|
187
|
-
"tax-clauses.
|
|
188
|
-
"tax-clauses.
|
|
189
|
-
"Für Verkäufe an
|
|
187
|
+
"tax-clauses.3w_b2b.label": "Nicht-EU B2B (Export)",
|
|
188
|
+
"tax-clauses.3w_b2b.description":
|
|
189
|
+
"Für Verkäufe an Unternehmen außerhalb der EU. Enthält typischerweise die Steuerbefreiung für Exporte.",
|
|
190
|
+
"tax-clauses.3w_b2c.label": "Nicht-EU B2C (Export)",
|
|
191
|
+
"tax-clauses.3w_b2c.description":
|
|
192
|
+
"Für Verkäufe an Verbraucher außerhalb der EU. Enthält typischerweise die Steuerbefreiung für Exporte.",
|
|
190
193
|
"Enter export exemption clause...": "Exportbefreiungsklausel eingeben...",
|
|
191
194
|
"tax-clauses.domestic.label": "Standard / Inländisch",
|
|
192
195
|
"tax-clauses.domestic.description":
|
|
@@ -189,9 +189,12 @@ export default {
|
|
|
189
189
|
"tax-clauses.intra_eu_b2b.description":
|
|
190
190
|
"Para ventas a empresas de la UE con números de IVA válidos. Normalmente incluye una declaración de inversión del sujeto pasivo.",
|
|
191
191
|
"Enter reverse charge clause...": "Introduzca la cláusula de inversión del sujeto pasivo...",
|
|
192
|
-
"tax-clauses.
|
|
193
|
-
"tax-clauses.
|
|
194
|
-
"Para ventas a
|
|
192
|
+
"tax-clauses.3w_b2b.label": "Fuera de UE B2B (exportación)",
|
|
193
|
+
"tax-clauses.3w_b2b.description":
|
|
194
|
+
"Para ventas a empresas fuera de la UE. Normalmente indica la exención de IVA por exportación.",
|
|
195
|
+
"tax-clauses.3w_b2c.label": "Fuera de UE B2C (exportación)",
|
|
196
|
+
"tax-clauses.3w_b2c.description":
|
|
197
|
+
"Para ventas a consumidores fuera de la UE. Normalmente indica la exención de IVA por exportación.",
|
|
195
198
|
"Enter export exemption clause...": "Introduzca la cláusula de exención de exportación...",
|
|
196
199
|
"tax-clauses.domestic.label": "Predeterminado / Nacional",
|
|
197
200
|
"tax-clauses.domestic.description":
|
|
@@ -188,9 +188,12 @@ export default {
|
|
|
188
188
|
"tax-clauses.intra_eu_b2b.description":
|
|
189
189
|
"Pour les ventes à des entreprises UE avec des numéros de TVA valides. Inclut généralement une déclaration d'autoliquidation.",
|
|
190
190
|
"Enter reverse charge clause...": "Entrez la clause d'autoliquidation...",
|
|
191
|
-
"tax-clauses.
|
|
192
|
-
"tax-clauses.
|
|
193
|
-
"Pour les ventes à des
|
|
191
|
+
"tax-clauses.3w_b2b.label": "Hors UE B2B (exportation)",
|
|
192
|
+
"tax-clauses.3w_b2b.description":
|
|
193
|
+
"Pour les ventes à des entreprises hors UE. Indique généralement l'exonération de TVA à l'exportation.",
|
|
194
|
+
"tax-clauses.3w_b2c.label": "Hors UE B2C (exportation)",
|
|
195
|
+
"tax-clauses.3w_b2c.description":
|
|
196
|
+
"Pour les ventes à des consommateurs hors UE. Indique généralement l'exonération de TVA à l'exportation.",
|
|
194
197
|
"Enter export exemption clause...": "Entrez la clause d'exonération à l'exportation...",
|
|
195
198
|
"tax-clauses.domestic.label": "Par défaut / National",
|
|
196
199
|
"tax-clauses.domestic.description":
|
|
@@ -182,8 +182,10 @@ export default {
|
|
|
182
182
|
"tax-clauses.intra_eu_b2b.description":
|
|
183
183
|
"Za prodaju EU tvrtkama s valjanim PDV brojevima. Obično uključuje izjavu o prijenosu porezne obveze.",
|
|
184
184
|
"Enter reverse charge clause...": "Unesite klauzulu o prijenosu porezne obveze...",
|
|
185
|
-
"tax-clauses.
|
|
186
|
-
"tax-clauses.
|
|
185
|
+
"tax-clauses.3w_b2b.label": "Izvan EU B2B (izvoz)",
|
|
186
|
+
"tax-clauses.3w_b2b.description": "Za prodaju poduzećima izvan EU. Obično navodi oslobođenje od PDV-a za izvoz.",
|
|
187
|
+
"tax-clauses.3w_b2c.label": "Izvan EU B2C (izvoz)",
|
|
188
|
+
"tax-clauses.3w_b2c.description": "Za prodaju potrošačima izvan EU. Obično navodi oslobođenje od PDV-a za izvoz.",
|
|
187
189
|
"Enter export exemption clause...": "Unesite klauzulu o oslobođenju od izvoza...",
|
|
188
190
|
"tax-clauses.domestic.label": "Zadano / Domaće",
|
|
189
191
|
"tax-clauses.domestic.description":
|
|
@@ -187,9 +187,12 @@ export default {
|
|
|
187
187
|
"tax-clauses.intra_eu_b2b.description":
|
|
188
188
|
"Per vendite a imprese UE con numeri IVA validi. Di solito include una dichiarazione di inversione contabile.",
|
|
189
189
|
"Enter reverse charge clause...": "Inserisci la clausola di inversione contabile...",
|
|
190
|
-
"tax-clauses.
|
|
191
|
-
"tax-clauses.
|
|
192
|
-
"Per vendite a
|
|
190
|
+
"tax-clauses.3w_b2b.label": "Extra-UE B2B (esportazione)",
|
|
191
|
+
"tax-clauses.3w_b2b.description":
|
|
192
|
+
"Per vendite a imprese extra-UE. Di solito indica l'esenzione IVA per esportazione.",
|
|
193
|
+
"tax-clauses.3w_b2c.label": "Extra-UE B2C (esportazione)",
|
|
194
|
+
"tax-clauses.3w_b2c.description":
|
|
195
|
+
"Per vendite a consumatori extra-UE. Di solito indica l'esenzione IVA per esportazione.",
|
|
193
196
|
"Enter export exemption clause...": "Inserisci la clausola di esenzione per esportazione...",
|
|
194
197
|
"tax-clauses.domestic.label": "Predefinito / Nazionale",
|
|
195
198
|
"tax-clauses.domestic.description":
|
|
@@ -184,9 +184,12 @@ export default {
|
|
|
184
184
|
"tax-clauses.intra_eu_b2b.description":
|
|
185
185
|
"Voor verkopen aan EU-bedrijven met geldige btw-nummers. Bevat meestal een verklaring van verlegging.",
|
|
186
186
|
"Enter reverse charge clause...": "Voer de verleggingsclausule in...",
|
|
187
|
-
"tax-clauses.
|
|
188
|
-
"tax-clauses.
|
|
189
|
-
"Voor verkopen aan
|
|
187
|
+
"tax-clauses.3w_b2b.label": "Niet-EU B2B (export)",
|
|
188
|
+
"tax-clauses.3w_b2b.description":
|
|
189
|
+
"Voor verkopen aan bedrijven buiten de EU. Vermeldt meestal de btw-vrijstelling voor export.",
|
|
190
|
+
"tax-clauses.3w_b2c.label": "Niet-EU B2C (export)",
|
|
191
|
+
"tax-clauses.3w_b2c.description":
|
|
192
|
+
"Voor verkopen aan consumenten buiten de EU. Vermeldt meestal de btw-vrijstelling voor export.",
|
|
190
193
|
"Enter export exemption clause...": "Voer de exportvrijstellingsclausule in...",
|
|
191
194
|
"tax-clauses.domestic.label": "Standaard / Binnenlands",
|
|
192
195
|
"tax-clauses.domestic.description":
|
|
@@ -186,8 +186,12 @@ export default {
|
|
|
186
186
|
"tax-clauses.intra_eu_b2b.description":
|
|
187
187
|
"Dla sprzedaży firmom w UE z ważnymi numerami VAT. Zwykle zawiera oświadczenie o odwrotnym obciążeniu.",
|
|
188
188
|
"Enter reverse charge clause...": "Wprowadź klauzulę odwrotnego obciążenia...",
|
|
189
|
-
"tax-clauses.
|
|
190
|
-
"tax-clauses.
|
|
189
|
+
"tax-clauses.3w_b2b.label": "Poza UE B2B (eksport)",
|
|
190
|
+
"tax-clauses.3w_b2b.description":
|
|
191
|
+
"Dla sprzedaży do przedsiębiorstw spoza UE. Zwykle wskazuje zwolnienie z VAT na eksport.",
|
|
192
|
+
"tax-clauses.3w_b2c.label": "Poza UE B2C (eksport)",
|
|
193
|
+
"tax-clauses.3w_b2c.description":
|
|
194
|
+
"Dla sprzedaży do konsumentów spoza UE. Zwykle wskazuje zwolnienie z VAT na eksport.",
|
|
191
195
|
"Enter export exemption clause...": "Wprowadź klauzulę zwolnienia eksportowego...",
|
|
192
196
|
"tax-clauses.domestic.label": "Domyślne / Krajowe",
|
|
193
197
|
"tax-clauses.domestic.description":
|
|
@@ -186,9 +186,12 @@ export default {
|
|
|
186
186
|
"tax-clauses.intra_eu_b2b.description":
|
|
187
187
|
"Para vendas a empresas da UE com números de IVA válidos. Normalmente inclui uma declaração de autoliquidação.",
|
|
188
188
|
"Enter reverse charge clause...": "Introduza a cláusula de autoliquidação...",
|
|
189
|
-
"tax-clauses.
|
|
190
|
-
"tax-clauses.
|
|
191
|
-
"Para vendas a
|
|
189
|
+
"tax-clauses.3w_b2b.label": "Fora da UE B2B (exportação)",
|
|
190
|
+
"tax-clauses.3w_b2b.description":
|
|
191
|
+
"Para vendas a empresas fora da UE. Normalmente indica a isenção de IVA por exportação.",
|
|
192
|
+
"tax-clauses.3w_b2c.label": "Fora da UE B2C (exportação)",
|
|
193
|
+
"tax-clauses.3w_b2c.description":
|
|
194
|
+
"Para vendas a consumidores fora da UE. Normalmente indica a isenção de IVA por exportação.",
|
|
192
195
|
"Enter export exemption clause...": "Introduza a cláusula de isenção de exportação...",
|
|
193
196
|
"tax-clauses.domestic.label": "Predefinido / Nacional",
|
|
194
197
|
"tax-clauses.domestic.description":
|
|
@@ -181,8 +181,10 @@ export default {
|
|
|
181
181
|
"tax-clauses.intra_eu_b2b.description":
|
|
182
182
|
"Za prodajo EU podjetjem z veljavnimi DDV številkami. Običajno vključuje izjavo o obrnjeni davčni obveznosti.",
|
|
183
183
|
"Enter reverse charge clause...": "Vnesite klavzulo za samoobdavčitev...",
|
|
184
|
-
"tax-clauses.
|
|
185
|
-
"tax-clauses.
|
|
184
|
+
"tax-clauses.3w_b2b.label": "Izven EU B2B (izvoz)",
|
|
185
|
+
"tax-clauses.3w_b2b.description": "Za prodajo podjetjem izven EU. Običajno navaja oprostitev DDV za izvoz.",
|
|
186
|
+
"tax-clauses.3w_b2c.label": "Izven EU B2C (izvoz)",
|
|
187
|
+
"tax-clauses.3w_b2c.description": "Za prodajo potrošnikom izven EU. Običajno navaja oprostitev DDV za izvoz.",
|
|
186
188
|
"Enter export exemption clause...": "Vnesite klavzulo za izvozno oprostitev...",
|
|
187
189
|
"tax-clauses.domestic.label": "Privzeto / Domače",
|
|
188
190
|
"tax-clauses.domestic.description":
|
|
@@ -40,18 +40,18 @@ export const FinaOperatorRequiredDialog: FC<FinaOperatorRequiredDialogProps> = (
|
|
|
40
40
|
const handleSubmit = (e: React.FormEvent) => {
|
|
41
41
|
e.preventDefault();
|
|
42
42
|
e.stopPropagation();
|
|
43
|
-
if (!operatorOib
|
|
43
|
+
if (!operatorOib) return;
|
|
44
44
|
updateUserSettings({
|
|
45
45
|
entityId,
|
|
46
46
|
data: {
|
|
47
47
|
operator_oib: operatorOib,
|
|
48
|
-
operator_label: operatorLabel,
|
|
48
|
+
operator_label: operatorLabel || undefined,
|
|
49
49
|
},
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
const oibError = operatorOib !== "" && !/^\d{11}$/.test(operatorOib);
|
|
54
|
-
const isValid = /^\d{11}$/.test(operatorOib)
|
|
54
|
+
const isValid = /^\d{11}$/.test(operatorOib);
|
|
55
55
|
|
|
56
56
|
return (
|
|
57
57
|
<Dialog open={open} onOpenChange={onOpenChange}>
|