@spaceinvoices/react-ui 0.4.5 → 0.4.7
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/components/advance-invoices/advance-invoices.hooks.ts +2 -2
- package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +146 -74
- package/src/components/advance-invoices/create/locales/de.ts +5 -0
- package/src/components/advance-invoices/create/locales/es.ts +5 -0
- package/src/components/advance-invoices/create/locales/fr.ts +5 -0
- package/src/components/advance-invoices/create/locales/hr.ts +5 -0
- package/src/components/advance-invoices/create/locales/it.ts +5 -0
- package/src/components/advance-invoices/create/locales/nl.ts +5 -0
- package/src/components/advance-invoices/create/locales/pl.ts +5 -0
- package/src/components/advance-invoices/create/locales/pt.ts +5 -0
- package/src/components/advance-invoices/create/locales/sl.ts +5 -0
- package/src/components/advance-invoices/create/prepare-advance-invoice-submission.ts +5 -5
- package/src/components/credit-notes/create/create-credit-note-form.tsx +138 -72
- package/src/components/credit-notes/create/locales/de.ts +5 -0
- package/src/components/credit-notes/create/locales/es.ts +5 -0
- package/src/components/credit-notes/create/locales/fr.ts +5 -0
- package/src/components/credit-notes/create/locales/hr.ts +5 -0
- package/src/components/credit-notes/create/locales/it.ts +5 -0
- package/src/components/credit-notes/create/locales/nl.ts +5 -0
- package/src/components/credit-notes/create/locales/pl.ts +5 -0
- package/src/components/credit-notes/create/locales/pt.ts +5 -0
- package/src/components/credit-notes/create/locales/sl.ts +5 -0
- package/src/components/credit-notes/credit-notes.hooks.ts +2 -2
- package/src/components/dashboard/collection-rate-card/use-collection-rate.ts +48 -92
- package/src/components/dashboard/invoice-status-chart/use-invoice-status.ts +48 -82
- package/src/components/dashboard/payment-methods-chart/use-payment-methods.ts +22 -31
- package/src/components/dashboard/payment-trend-chart/use-payment-trend.ts +33 -48
- package/src/components/dashboard/revenue-trend-chart/use-revenue-trend.ts +56 -76
- package/src/components/dashboard/shared/index.ts +1 -1
- package/src/components/dashboard/shared/use-revenue-data.ts +106 -182
- package/src/components/dashboard/shared/use-stats-counts.ts +18 -68
- package/src/components/dashboard/shared/use-stats-query.ts +35 -5
- package/src/components/dashboard/tax-collected-card/use-tax-collected.ts +57 -75
- package/src/components/dashboard/top-customers-chart/use-top-customers.ts +38 -49
- package/src/components/delivery-notes/create/create-delivery-note-form.tsx +50 -2
- package/src/components/delivery-notes/create/locales/de.ts +5 -0
- package/src/components/delivery-notes/create/locales/es.ts +5 -0
- package/src/components/delivery-notes/create/locales/fr.ts +5 -0
- package/src/components/delivery-notes/create/locales/hr.ts +5 -0
- package/src/components/delivery-notes/create/locales/it.ts +5 -0
- package/src/components/delivery-notes/create/locales/nl.ts +5 -0
- package/src/components/delivery-notes/create/locales/pl.ts +5 -0
- package/src/components/delivery-notes/create/locales/pt.ts +5 -0
- package/src/components/delivery-notes/create/locales/sl.ts +5 -0
- package/src/components/documents/create/document-details-section.tsx +478 -350
- package/src/components/documents/create/document-recipient-section.tsx +30 -1
- package/src/components/documents/create/live-preview.tsx +15 -28
- package/src/components/documents/create/prepare-document-submission.ts +4 -1
- package/src/components/documents/create/smart-code-insert-button.tsx +6 -0
- package/src/components/documents/create/use-document-customer-form.ts +4 -0
- package/src/components/documents/shared/document-preview-skeleton.tsx +63 -0
- package/src/components/documents/shared/index.ts +1 -0
- package/src/components/documents/view/document-actions-bar.tsx +29 -7
- package/src/components/documents/view/document-details-card.tsx +6 -0
- package/src/components/documents/view/locales/de.ts +1 -0
- package/src/components/documents/view/locales/es.ts +1 -0
- package/src/components/documents/view/locales/fr.ts +1 -0
- package/src/components/documents/view/locales/hr.ts +1 -0
- package/src/components/documents/view/locales/it.ts +1 -0
- package/src/components/documents/view/locales/nl.ts +1 -0
- package/src/components/documents/view/locales/pl.ts +1 -0
- package/src/components/documents/view/locales/pt.ts +1 -0
- package/src/components/documents/view/locales/sl.ts +1 -0
- package/src/components/entities/entity-settings-form/email-template-variables-info.tsx +6 -0
- package/src/components/entities/entity-settings-form/input-with-preview.tsx +2 -145
- package/src/components/entities/entity-settings-form/locales/de.ts +4 -0
- package/src/components/entities/entity-settings-form/locales/es.ts +4 -0
- package/src/components/entities/entity-settings-form/locales/fr.ts +4 -0
- package/src/components/entities/entity-settings-form/locales/hr.ts +4 -0
- package/src/components/entities/entity-settings-form/locales/it.ts +4 -0
- package/src/components/entities/entity-settings-form/locales/nl.ts +4 -0
- package/src/components/entities/entity-settings-form/locales/pl.ts +4 -0
- package/src/components/entities/entity-settings-form/locales/pt.ts +4 -0
- package/src/components/entities/entity-settings-form/locales/sl.ts +4 -0
- package/src/components/entities/fina-settings-form/fina-settings-form.tsx +15 -0
- package/src/components/entities/fina-settings-form/fina-settings.hooks.ts +5 -1
- package/src/components/entities/fina-settings-form/locales/de.ts +3 -0
- package/src/components/entities/fina-settings-form/locales/en.ts +3 -0
- package/src/components/entities/fina-settings-form/locales/es.ts +3 -0
- package/src/components/entities/fina-settings-form/locales/fr.ts +3 -0
- package/src/components/entities/fina-settings-form/locales/hr.ts +3 -0
- package/src/components/entities/fina-settings-form/locales/it.ts +3 -0
- package/src/components/entities/fina-settings-form/locales/nl.ts +3 -0
- package/src/components/entities/fina-settings-form/locales/pl.ts +3 -0
- package/src/components/entities/fina-settings-form/locales/pt.ts +3 -0
- package/src/components/entities/fina-settings-form/locales/sl.ts +3 -0
- package/src/components/entities/fina-settings-form/sections/premises-management-section.tsx +4 -4
- package/src/components/entities/fina-settings-form/sections/register-premise-dialog.tsx +3 -3
- package/src/components/entities/settings/defaults-settings-form.tsx +38 -1
- package/src/components/entities/settings/tax-rules-settings-form.tsx +32 -15
- package/src/components/estimates/create/create-estimate-form.tsx +46 -4
- package/src/components/estimates/create/locales/de.ts +5 -0
- package/src/components/estimates/create/locales/es.ts +5 -0
- package/src/components/estimates/create/locales/fr.ts +5 -0
- package/src/components/estimates/create/locales/hr.ts +5 -0
- package/src/components/estimates/create/locales/it.ts +5 -0
- package/src/components/estimates/create/locales/nl.ts +5 -0
- package/src/components/estimates/create/locales/pl.ts +5 -0
- package/src/components/estimates/create/locales/pt.ts +5 -0
- package/src/components/estimates/create/locales/sl.ts +5 -0
- package/src/components/invoices/create/create-invoice-form.tsx +258 -96
- package/src/components/invoices/create/locales/de.ts +19 -0
- package/src/components/invoices/create/locales/es.ts +19 -0
- package/src/components/invoices/create/locales/fr.ts +19 -0
- package/src/components/invoices/create/locales/hr.ts +19 -0
- package/src/components/invoices/create/locales/it.ts +19 -0
- package/src/components/invoices/create/locales/nl.ts +19 -0
- package/src/components/invoices/create/locales/pl.ts +19 -0
- package/src/components/invoices/create/locales/pt.ts +19 -0
- package/src/components/invoices/create/locales/sl.ts +19 -0
- package/src/components/invoices/create/prepare-invoice-submission.ts +5 -5
- package/src/components/invoices/invoices.hooks.ts +3 -3
- package/src/components/table/table-pagination.tsx +1 -1
- package/src/components/ui/progress.tsx +27 -0
- package/src/generate-schemas.ts +15 -2
- package/src/generated/schemas/advanceinvoice.ts +4 -0
- package/src/generated/schemas/creditnote.ts +3 -0
- package/src/generated/schemas/customer.ts +2 -0
- package/src/generated/schemas/deliverynote.ts +3 -0
- package/src/generated/schemas/entity.ts +14 -4
- package/src/generated/schemas/entityapikey.ts +19 -0
- package/src/generated/schemas/estimate.ts +4 -0
- package/src/generated/schemas/finasettings.ts +4 -3
- package/src/generated/schemas/index.ts +1 -0
- package/src/generated/schemas/invoice.ts +4 -0
- package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +17 -11
- package/src/generated/schemas/rendercreditnotepreview_body.ts +17 -11
- package/src/generated/schemas/renderdeliverynotepreview_body.ts +15 -8
- package/src/generated/schemas/renderestimatepreview_body.ts +15 -8
- package/src/generated/schemas/renderinvoicepreview_body.ts +17 -11
- package/src/generated/schemas/startpdfexport_body.ts +12 -5
- package/src/generated/schemas/webhook.ts +4 -0
- package/src/hooks/use-transaction-type-check.ts +152 -0
- package/src/hooks/use-vies-check.ts +7 -131
- package/src/lib/template-variables.tsx +167 -0
- package/src/providers/entities-context.tsx +2 -2
|
@@ -38,6 +38,9 @@ export default {
|
|
|
38
38
|
Note: "Nota",
|
|
39
39
|
"Insert variable": "Insertar variable",
|
|
40
40
|
"Add payment instructions, terms, or other notes...": "Añada instrucciones de pago, condiciones u otras notas...",
|
|
41
|
+
// Signature field
|
|
42
|
+
Signature: "Firma",
|
|
43
|
+
"Add signature text...": "Añadir texto de firma...",
|
|
41
44
|
"Payment Terms": "Condiciones de pago",
|
|
42
45
|
"Add payment terms...": "Añada condiciones de pago...",
|
|
43
46
|
Entity: "Empresa",
|
|
@@ -106,6 +109,14 @@ export default {
|
|
|
106
109
|
"Advance invoice": "Factura anticipada",
|
|
107
110
|
"FINA fiscalized invoices always use the current date":
|
|
108
111
|
"Las facturas fiscalizadas con FINA siempre usan la fecha actual",
|
|
112
|
+
// Due days selector
|
|
113
|
+
"On receipt": "Al recibir",
|
|
114
|
+
"7 days": "7 días",
|
|
115
|
+
"14 days": "14 días",
|
|
116
|
+
"30 days": "30 días",
|
|
117
|
+
"60 days": "60 días",
|
|
118
|
+
"90 days": "90 días",
|
|
119
|
+
Custom: "Personalizado",
|
|
109
120
|
"Service Date": "Fecha de servicio",
|
|
110
121
|
"Single Date": "Fecha única",
|
|
111
122
|
"Date Range": "Rango de fechas",
|
|
@@ -126,4 +137,12 @@ export default {
|
|
|
126
137
|
"Esta factura no será fiscalizada (transacción no nacional)",
|
|
127
138
|
"Tax Clause": "Cláusula fiscal",
|
|
128
139
|
"Add tax clause...": "Agregar cláusula fiscal...",
|
|
140
|
+
Footer: "Pie de página",
|
|
141
|
+
"Add document footer...": "Añadir pie de página del documento...",
|
|
142
|
+
// Croatian domestic invoice validation
|
|
143
|
+
"End consumer": "Consumidor final",
|
|
144
|
+
"Domestic B2B invoicing in Croatia is not supported":
|
|
145
|
+
"La facturación B2B doméstica en Croacia no está soportada. Croacia requiere conformidad con Fiskalizacija 2.0 para facturación B2B.",
|
|
146
|
+
"FINA fiscalization must be enabled for domestic invoices":
|
|
147
|
+
"La fiscalización FINA debe estar habilitada para facturas domésticas. Habilítela en la configuración de la entidad.",
|
|
129
148
|
} as const;
|
|
@@ -40,6 +40,9 @@ export default {
|
|
|
40
40
|
"Insert variable": "Insérer une variable",
|
|
41
41
|
"Add payment instructions, terms, or other notes...":
|
|
42
42
|
"Ajoutez des instructions de paiement, des conditions ou d'autres notes...",
|
|
43
|
+
// Signature field
|
|
44
|
+
Signature: "Signature",
|
|
45
|
+
"Add signature text...": "Ajouter un texte de signature...",
|
|
43
46
|
"Payment Terms": "Conditions de paiement",
|
|
44
47
|
"Add payment terms...": "Ajoutez des conditions de paiement...",
|
|
45
48
|
Entity: "Entreprise",
|
|
@@ -108,6 +111,14 @@ export default {
|
|
|
108
111
|
"Advance invoice": "Facture d'acompte",
|
|
109
112
|
"FINA fiscalized invoices always use the current date":
|
|
110
113
|
"Les factures fiscalisées FINA utilisent toujours la date actuelle",
|
|
114
|
+
// Due days selector
|
|
115
|
+
"On receipt": "À réception",
|
|
116
|
+
"7 days": "7 jours",
|
|
117
|
+
"14 days": "14 jours",
|
|
118
|
+
"30 days": "30 jours",
|
|
119
|
+
"60 days": "60 jours",
|
|
120
|
+
"90 days": "90 jours",
|
|
121
|
+
Custom: "Personnalisé",
|
|
111
122
|
"Service Date": "Date de service",
|
|
112
123
|
"Single Date": "Date unique",
|
|
113
124
|
"Date Range": "Plage de dates",
|
|
@@ -128,4 +139,12 @@ export default {
|
|
|
128
139
|
"Cette facture ne sera pas fiscalisée (transaction non nationale)",
|
|
129
140
|
"Tax Clause": "Clause fiscale",
|
|
130
141
|
"Add tax clause...": "Ajouter une clause fiscale...",
|
|
142
|
+
Footer: "Pied de page",
|
|
143
|
+
"Add document footer...": "Ajouter un pied de page...",
|
|
144
|
+
// Croatian domestic invoice validation
|
|
145
|
+
"End consumer": "Consommateur final",
|
|
146
|
+
"Domestic B2B invoicing in Croatia is not supported":
|
|
147
|
+
"La facturation B2B domestique en Croatie n'est pas prise en charge. La Croatie exige la conformité à Fiskalizacija 2.0 pour la facturation B2B.",
|
|
148
|
+
"FINA fiscalization must be enabled for domestic invoices":
|
|
149
|
+
"La fiscalisation FINA doit être activée pour les factures domestiques. Activez-la dans les paramètres de l'entité.",
|
|
131
150
|
} as const;
|
|
@@ -38,6 +38,9 @@ export default {
|
|
|
38
38
|
Note: "Napomena",
|
|
39
39
|
"Insert variable": "Umetni varijablu",
|
|
40
40
|
"Add payment instructions, terms, or other notes...": "Dodajte upute za plaćanje, uvjete ili druge napomene...",
|
|
41
|
+
// Signature field
|
|
42
|
+
Signature: "Potpis",
|
|
43
|
+
"Add signature text...": "Dodaj tekst potpisa...",
|
|
41
44
|
"Payment Terms": "Uvjeti plaćanja",
|
|
42
45
|
"Add payment terms...": "Dodajte uvjete plaćanja...",
|
|
43
46
|
Entity: "Tvrtka",
|
|
@@ -105,6 +108,14 @@ export default {
|
|
|
105
108
|
"Credit note": "Odobrenje",
|
|
106
109
|
"Advance invoice": "Avansni račun",
|
|
107
110
|
"FINA fiscalized invoices always use the current date": "FINA fiskalizirani računi uvijek koriste trenutni datum",
|
|
111
|
+
// Due days selector
|
|
112
|
+
"On receipt": "Po primitku",
|
|
113
|
+
"7 days": "7 dana",
|
|
114
|
+
"14 days": "14 dana",
|
|
115
|
+
"30 days": "30 dana",
|
|
116
|
+
"60 days": "60 dana",
|
|
117
|
+
"90 days": "90 dana",
|
|
118
|
+
Custom: "Prilagođeno",
|
|
108
119
|
"Service Date": "Datum usluge",
|
|
109
120
|
"Single Date": "Datum",
|
|
110
121
|
"Date Range": "Raspon datuma",
|
|
@@ -125,4 +136,12 @@ export default {
|
|
|
125
136
|
"Ovaj račun neće biti fiskaliziran (nedomaća transakcija)",
|
|
126
137
|
"Tax Clause": "Porezna klauzula",
|
|
127
138
|
"Add tax clause...": "Dodajte poreznu klauzulu...",
|
|
139
|
+
Footer: "Podnožje",
|
|
140
|
+
"Add document footer...": "Dodajte podnožje dokumenta...",
|
|
141
|
+
// Croatian domestic invoice validation
|
|
142
|
+
"End consumer": "Krajnji potrošač",
|
|
143
|
+
"Domestic B2B invoicing in Croatia is not supported":
|
|
144
|
+
"Domaće B2B fakturiranje u Hrvatskoj nije podržano. Hrvatska zahtijeva usklađenost s Fiskalizacijom 2.0 za B2B fakturiranje.",
|
|
145
|
+
"FINA fiscalization must be enabled for domestic invoices":
|
|
146
|
+
"FINA fiskalizacija mora biti omogućena za domaće račune. Omogućite je u postavkama tvrtke.",
|
|
128
147
|
} as const;
|
|
@@ -39,6 +39,9 @@ export default {
|
|
|
39
39
|
Note: "Nota",
|
|
40
40
|
"Insert variable": "Inserisci variabile",
|
|
41
41
|
"Add payment instructions, terms, or other notes...": "Aggiungi istruzioni di pagamento, condizioni o altre note...",
|
|
42
|
+
// Signature field
|
|
43
|
+
Signature: "Firma",
|
|
44
|
+
"Add signature text...": "Aggiungi testo della firma...",
|
|
42
45
|
"Payment Terms": "Condizioni di pagamento",
|
|
43
46
|
"Add payment terms...": "Aggiungi condizioni di pagamento...",
|
|
44
47
|
Entity: "Azienda",
|
|
@@ -108,6 +111,14 @@ export default {
|
|
|
108
111
|
"Advance invoice": "Fattura di acconto",
|
|
109
112
|
"FINA fiscalized invoices always use the current date":
|
|
110
113
|
"Le fatture fiscalizzate FINA utilizzano sempre la data corrente",
|
|
114
|
+
// Due days selector
|
|
115
|
+
"On receipt": "Alla ricezione",
|
|
116
|
+
"7 days": "7 giorni",
|
|
117
|
+
"14 days": "14 giorni",
|
|
118
|
+
"30 days": "30 giorni",
|
|
119
|
+
"60 days": "60 giorni",
|
|
120
|
+
"90 days": "90 giorni",
|
|
121
|
+
Custom: "Personalizzato",
|
|
111
122
|
"Service Date": "Data del servizio",
|
|
112
123
|
"Single Date": "Data singola",
|
|
113
124
|
"Date Range": "Intervallo di date",
|
|
@@ -128,4 +139,12 @@ export default {
|
|
|
128
139
|
"Questa fattura non sarà fiscalizzata (transazione non nazionale)",
|
|
129
140
|
"Tax Clause": "Clausola fiscale",
|
|
130
141
|
"Add tax clause...": "Aggiungi clausola fiscale...",
|
|
142
|
+
Footer: "Piè di pagina",
|
|
143
|
+
"Add document footer...": "Aggiungi piè di pagina del documento...",
|
|
144
|
+
// Croatian domestic invoice validation
|
|
145
|
+
"End consumer": "Consumatore finale",
|
|
146
|
+
"Domestic B2B invoicing in Croatia is not supported":
|
|
147
|
+
"La fatturazione B2B domestica in Croazia non è supportata. La Croazia richiede la conformità a Fiskalizacija 2.0 per la fatturazione B2B.",
|
|
148
|
+
"FINA fiscalization must be enabled for domestic invoices":
|
|
149
|
+
"La fiscalizzazione FINA deve essere abilitata per le fatture domestiche. Abilitarla nelle impostazioni dell'entità.",
|
|
131
150
|
} as const;
|
|
@@ -39,6 +39,9 @@ export default {
|
|
|
39
39
|
"Insert variable": "Variabele invoegen",
|
|
40
40
|
"Add payment instructions, terms, or other notes...":
|
|
41
41
|
"Voeg betalingsinstructies, voorwaarden of andere notities toe...",
|
|
42
|
+
// Signature field
|
|
43
|
+
Signature: "Handtekening",
|
|
44
|
+
"Add signature text...": "Handtekeningtekst toevoegen...",
|
|
42
45
|
"Payment Terms": "Betalingsvoorwaarden",
|
|
43
46
|
"Add payment terms...": "Voeg betalingsvoorwaarden toe...",
|
|
44
47
|
Entity: "Bedrijf",
|
|
@@ -107,6 +110,14 @@ export default {
|
|
|
107
110
|
"Advance invoice": "Voorschotfactuur",
|
|
108
111
|
"FINA fiscalized invoices always use the current date":
|
|
109
112
|
"FINA-gefiscaliseerde facturen gebruiken altijd de huidige datum",
|
|
113
|
+
// Due days selector
|
|
114
|
+
"On receipt": "Bij ontvangst",
|
|
115
|
+
"7 days": "7 dagen",
|
|
116
|
+
"14 days": "14 dagen",
|
|
117
|
+
"30 days": "30 dagen",
|
|
118
|
+
"60 days": "60 dagen",
|
|
119
|
+
"90 days": "90 dagen",
|
|
120
|
+
Custom: "Aangepast",
|
|
110
121
|
"Service Date": "Servicedatum",
|
|
111
122
|
"Single Date": "Enkele datum",
|
|
112
123
|
"Date Range": "Datumbereik",
|
|
@@ -127,4 +138,12 @@ export default {
|
|
|
127
138
|
"Deze factuur wordt niet gefiscaliseerd (niet-binnenlandse transactie)",
|
|
128
139
|
"Tax Clause": "Belastingclausule",
|
|
129
140
|
"Add tax clause...": "Belastingclausule toevoegen...",
|
|
141
|
+
Footer: "Voettekst",
|
|
142
|
+
"Add document footer...": "Documentvoettekst toevoegen...",
|
|
143
|
+
// Croatian domestic invoice validation
|
|
144
|
+
"End consumer": "Eindconsument",
|
|
145
|
+
"Domestic B2B invoicing in Croatia is not supported":
|
|
146
|
+
"Binnenlandse B2B-facturering in Kroatië wordt niet ondersteund. Kroatië vereist naleving van Fiskalizacija 2.0 voor B2B-facturering.",
|
|
147
|
+
"FINA fiscalization must be enabled for domestic invoices":
|
|
148
|
+
"FINA-fiscalisering moet zijn ingeschakeld voor binnenlandse facturen. Schakel deze in via de bedrijfsinstellingen.",
|
|
130
149
|
} as const;
|
|
@@ -39,6 +39,9 @@ export default {
|
|
|
39
39
|
Note: "Uwaga",
|
|
40
40
|
"Insert variable": "Wstaw zmienną",
|
|
41
41
|
"Add payment instructions, terms, or other notes...": "Dodaj instrukcje płatności, warunki lub inne uwagi...",
|
|
42
|
+
// Signature field
|
|
43
|
+
Signature: "Podpis",
|
|
44
|
+
"Add signature text...": "Dodaj tekst podpisu...",
|
|
42
45
|
"Payment Terms": "Warunki płatności",
|
|
43
46
|
"Add payment terms...": "Dodaj warunki płatności...",
|
|
44
47
|
Entity: "Firma",
|
|
@@ -106,6 +109,14 @@ export default {
|
|
|
106
109
|
"Credit note": "Nota kredytowa",
|
|
107
110
|
"Advance invoice": "Faktura zaliczkowa",
|
|
108
111
|
"FINA fiscalized invoices always use the current date": "Faktury fiskalizowane FINA zawsze używają bieżącej daty",
|
|
112
|
+
// Due days selector
|
|
113
|
+
"On receipt": "Przy odbiorze",
|
|
114
|
+
"7 days": "7 dni",
|
|
115
|
+
"14 days": "14 dni",
|
|
116
|
+
"30 days": "30 dni",
|
|
117
|
+
"60 days": "60 dni",
|
|
118
|
+
"90 days": "90 dni",
|
|
119
|
+
Custom: "Niestandardowe",
|
|
109
120
|
"Service Date": "Data usługi",
|
|
110
121
|
"Single Date": "Pojedyncza data",
|
|
111
122
|
"Date Range": "Zakres dat",
|
|
@@ -126,4 +137,12 @@ export default {
|
|
|
126
137
|
"Ta faktura nie będzie fiskalizowana (transakcja niekrajowa)",
|
|
127
138
|
"Tax Clause": "Klauzula podatkowa",
|
|
128
139
|
"Add tax clause...": "Dodaj klauzulę podatkową...",
|
|
140
|
+
Footer: "Stopka",
|
|
141
|
+
"Add document footer...": "Dodaj stopkę dokumentu...",
|
|
142
|
+
// Croatian domestic invoice validation
|
|
143
|
+
"End consumer": "Konsument końcowy",
|
|
144
|
+
"Domestic B2B invoicing in Croatia is not supported":
|
|
145
|
+
"Krajowe fakturowanie B2B w Chorwacji nie jest obsługiwane. Chorwacja wymaga zgodności z Fiskalizacija 2.0 dla fakturowania B2B.",
|
|
146
|
+
"FINA fiscalization must be enabled for domestic invoices":
|
|
147
|
+
"Fiskalizacja FINA musi być włączona dla faktur krajowych. Włącz ją w ustawieniach podmiotu.",
|
|
129
148
|
} as const;
|
|
@@ -39,6 +39,9 @@ export default {
|
|
|
39
39
|
"Insert variable": "Inserir variável",
|
|
40
40
|
"Add payment instructions, terms, or other notes...":
|
|
41
41
|
"Adicione instruções de pagamento, condições ou outras notas...",
|
|
42
|
+
// Signature field
|
|
43
|
+
Signature: "Assinatura",
|
|
44
|
+
"Add signature text...": "Adicionar texto de assinatura...",
|
|
42
45
|
"Payment Terms": "Condições de pagamento",
|
|
43
46
|
"Add payment terms...": "Adicione condições de pagamento...",
|
|
44
47
|
Entity: "Empresa",
|
|
@@ -107,6 +110,14 @@ export default {
|
|
|
107
110
|
"Credit note": "Nota de crédito",
|
|
108
111
|
"Advance invoice": "Fatura antecipada",
|
|
109
112
|
"FINA fiscalized invoices always use the current date": "As faturas fiscalizadas FINA usam sempre a data atual",
|
|
113
|
+
// Due days selector
|
|
114
|
+
"On receipt": "No recebimento",
|
|
115
|
+
"7 days": "7 dias",
|
|
116
|
+
"14 days": "14 dias",
|
|
117
|
+
"30 days": "30 dias",
|
|
118
|
+
"60 days": "60 dias",
|
|
119
|
+
"90 days": "90 dias",
|
|
120
|
+
Custom: "Personalizado",
|
|
110
121
|
"Service Date": "Data do serviço",
|
|
111
122
|
"Single Date": "Data única",
|
|
112
123
|
"Date Range": "Intervalo de datas",
|
|
@@ -127,4 +138,12 @@ export default {
|
|
|
127
138
|
"Esta fatura não será fiscalizada (transação não nacional)",
|
|
128
139
|
"Tax Clause": "Cláusula fiscal",
|
|
129
140
|
"Add tax clause...": "Adicionar cláusula fiscal...",
|
|
141
|
+
Footer: "Rodapé",
|
|
142
|
+
"Add document footer...": "Adicionar rodapé do documento...",
|
|
143
|
+
// Croatian domestic invoice validation
|
|
144
|
+
"End consumer": "Consumidor final",
|
|
145
|
+
"Domestic B2B invoicing in Croatia is not supported":
|
|
146
|
+
"A faturação B2B doméstica na Croácia não é suportada. A Croácia exige conformidade com Fiskalizacija 2.0 para faturação B2B.",
|
|
147
|
+
"FINA fiscalization must be enabled for domestic invoices":
|
|
148
|
+
"A fiscalização FINA deve estar ativada para faturas domésticas. Ative-a nas configurações da entidade.",
|
|
130
149
|
} as const;
|
|
@@ -39,6 +39,9 @@ export default {
|
|
|
39
39
|
Note: "Opomba",
|
|
40
40
|
"Insert variable": "Vstavi spremenljivko",
|
|
41
41
|
"Add payment instructions, terms, or other notes...": "Dodajte navodila za plačilo, pogoje ali druge opombe...",
|
|
42
|
+
// Signature field
|
|
43
|
+
Signature: "Podpis",
|
|
44
|
+
"Add signature text...": "Dodaj besedilo podpisa...",
|
|
42
45
|
// Payment terms field
|
|
43
46
|
"Payment Terms": "Plačilni pogoji",
|
|
44
47
|
"Add payment terms...": "Dodajte plačilne pogoje...",
|
|
@@ -115,6 +118,14 @@ export default {
|
|
|
115
118
|
"Credit note": "Dobropis",
|
|
116
119
|
"Advance invoice": "Avansni račun",
|
|
117
120
|
"FINA fiscalized invoices always use the current date": "FINA fiskalizirani računi vedno uporabijo trenutni datum",
|
|
121
|
+
// Due days selector
|
|
122
|
+
"On receipt": "Ob prejemu",
|
|
123
|
+
"7 days": "7 dni",
|
|
124
|
+
"14 days": "14 dni",
|
|
125
|
+
"30 days": "30 dni",
|
|
126
|
+
"60 days": "60 dni",
|
|
127
|
+
"90 days": "90 dni",
|
|
128
|
+
Custom: "Po meri",
|
|
118
129
|
// Service date
|
|
119
130
|
"Service Date": "Datum storitve",
|
|
120
131
|
"Single Date": "Datum",
|
|
@@ -136,4 +147,12 @@ export default {
|
|
|
136
147
|
"Ta račun ne bo fiskaliziran (nedomača transakcija)",
|
|
137
148
|
"Tax Clause": "Davčna klavzula",
|
|
138
149
|
"Add tax clause...": "Dodajte davčno klavzulo...",
|
|
150
|
+
Footer: "Noga dokumenta",
|
|
151
|
+
"Add document footer...": "Dodajte nogo dokumenta...",
|
|
152
|
+
// Croatian domestic invoice validation
|
|
153
|
+
"End consumer": "Končni potrošnik",
|
|
154
|
+
"Domestic B2B invoicing in Croatia is not supported":
|
|
155
|
+
"Domače B2B fakturiranje na Hrvaškem ni podprto. Hrvška zahteva skladnost s Fiskalizacijo 2.0 za B2B fakturiranje.",
|
|
156
|
+
"FINA fiscalization must be enabled for domestic invoices":
|
|
157
|
+
"FINA fiskalizacija mora biti omogočena za domače račune. Omogočite jo v nastavitvah podjetja.",
|
|
139
158
|
} as const;
|
|
@@ -9,8 +9,8 @@ type FursData = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
type FinaData = {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
business_premise_name?: string;
|
|
13
|
+
electronic_device_name?: string;
|
|
14
14
|
payment_type?: string;
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -77,10 +77,10 @@ export function prepareInvoiceSubmission(values: CreateInvoiceSchema, options: P
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
// Add FINA data if provided (FINA can't be skipped - all invoices must be fiscalized)
|
|
80
|
-
if (options.fina?.
|
|
80
|
+
if (options.fina?.business_premise_name && options.fina.electronic_device_name) {
|
|
81
81
|
(payload as any).fina = {
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
business_premise_name: options.fina.business_premise_name,
|
|
83
|
+
electronic_device_name: options.fina.electronic_device_name,
|
|
84
84
|
...(options.fina.payment_type && { payment_type: options.fina.payment_type }),
|
|
85
85
|
};
|
|
86
86
|
}
|
|
@@ -66,7 +66,7 @@ export function useNextInvoiceNumber(
|
|
|
66
66
|
return response as NextInvoiceNumberResponse;
|
|
67
67
|
},
|
|
68
68
|
enabled: options?.enabled !== false && !!entityId && !!sdk?.documents,
|
|
69
|
-
staleTime:
|
|
69
|
+
staleTime: 0, // Always refetch when form opens or params change
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -116,8 +116,8 @@ export function setLastUsedFursCombo(entityId: string, combo: FursCombo): void {
|
|
|
116
116
|
const FINA_LAST_USED_KEY = "hr:fina:last-used";
|
|
117
117
|
|
|
118
118
|
export type FinaCombo = {
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
business_premise_name: string;
|
|
120
|
+
electronic_device_name: string;
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
export function getLastUsedFinaCombo(entityId: string): FinaCombo | null {
|
|
@@ -16,7 +16,7 @@ export function Pagination({ prevCursor, nextCursor, onPageChange }: PaginationP
|
|
|
16
16
|
const hasNext = Boolean(nextCursor);
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
|
-
<div className="flex items-center justify-
|
|
19
|
+
<div className="flex items-center justify-start space-x-2">
|
|
20
20
|
<Button
|
|
21
21
|
variant="outline"
|
|
22
22
|
size="sm"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/ui/lib/utils"
|
|
4
|
+
|
|
5
|
+
function Progress({
|
|
6
|
+
value,
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: ProgressPrimitive.Root.Props & { className?: string }) {
|
|
10
|
+
return (
|
|
11
|
+
<ProgressPrimitive.Root
|
|
12
|
+
data-slot="progress"
|
|
13
|
+
value={value}
|
|
14
|
+
className={cn("relative w-full overflow-hidden rounded-full bg-primary/20", className)}
|
|
15
|
+
{...props}
|
|
16
|
+
>
|
|
17
|
+
<ProgressPrimitive.Track>
|
|
18
|
+
<ProgressPrimitive.Indicator
|
|
19
|
+
className="h-full bg-primary transition-all duration-500 ease-in-out"
|
|
20
|
+
style={{ width: `${value ?? 0}%` }}
|
|
21
|
+
/>
|
|
22
|
+
</ProgressPrimitive.Track>
|
|
23
|
+
</ProgressPrimitive.Root>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { Progress }
|
package/src/generate-schemas.ts
CHANGED
|
@@ -26,9 +26,21 @@ async function main() {
|
|
|
26
26
|
await fs.mkdir(SCHEMAS_DIR, { recursive: true });
|
|
27
27
|
await fs.mkdir(GENERATED_DIR, { recursive: true });
|
|
28
28
|
|
|
29
|
-
//
|
|
29
|
+
// Fetch OpenAPI spec from running API and generate schemas
|
|
30
|
+
const API_URL = "http://localhost:3000/openapi.json";
|
|
31
|
+
const openApiPath = path.resolve(GENERATED_DIR, "openapi.json");
|
|
32
|
+
|
|
33
|
+
try {
|
|
34
|
+
const res = await fetch(API_URL);
|
|
35
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
36
|
+
await fs.writeFile(openApiPath, await res.text());
|
|
37
|
+
console.log(`Fetched OpenAPI spec from ${API_URL}`);
|
|
38
|
+
} catch (_error) {
|
|
39
|
+
console.error(`Failed to fetch OpenAPI spec from ${API_URL}. Is the API running?`);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
|
|
30
43
|
try {
|
|
31
|
-
const openApiPath = path.resolve(__dirname, "../../../apps/api/openapi.json");
|
|
32
44
|
execSync(
|
|
33
45
|
`bunx openapi-zod-client ${openApiPath} ` +
|
|
34
46
|
"--output " +
|
|
@@ -299,6 +311,7 @@ export { createInvoiceSchema as createCreditNoteSchema, type CreateInvoiceSchema
|
|
|
299
311
|
|
|
300
312
|
// Clean up temporary files
|
|
301
313
|
await fs.unlink(`${GENERATED_DIR}/schemas.ts`);
|
|
314
|
+
await fs.unlink(`${GENERATED_DIR}/openapi.json`);
|
|
302
315
|
}
|
|
303
316
|
|
|
304
317
|
main().catch(console.error);
|
|
@@ -96,6 +96,9 @@ const createAdvanceInvoiceSchemaDefinition = z.object({
|
|
|
96
96
|
).optional(),
|
|
97
97
|
note: z.union([z.string(), z.null()]).optional(),
|
|
98
98
|
tax_clause: z.union([z.string(), z.null()]).optional(),
|
|
99
|
+
footer: z.union([z.string(), z.null()]).optional(),
|
|
100
|
+
signature: z.union([z.string(), z.null()]).optional(),
|
|
101
|
+
reference: z.union([z.string(), z.null()]).optional(),
|
|
99
102
|
currency_code: z.string().max(3).optional(),
|
|
100
103
|
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
101
104
|
date_due: z.union([z.string(), z.null()]).optional(),
|
|
@@ -228,6 +231,7 @@ const updateAdvanceInvoiceSchemaDefinition = z
|
|
|
228
231
|
)
|
|
229
232
|
.min(1),
|
|
230
233
|
note: z.union([z.string(), z.null()]),
|
|
234
|
+
footer: z.union([z.string(), z.null()]),
|
|
231
235
|
currency_code: z.string(),
|
|
232
236
|
metadata: z.union([z.object({}).partial().passthrough(), z.null()]),
|
|
233
237
|
change_reason: z.string().max(500),
|
|
@@ -110,6 +110,9 @@ const updateCreditNoteSchemaDefinition = z
|
|
|
110
110
|
)
|
|
111
111
|
.min(1),
|
|
112
112
|
note: z.union([z.string(), z.null()]),
|
|
113
|
+
footer: z.union([z.string(), z.null()]),
|
|
114
|
+
signature: z.union([z.string(), z.null()]),
|
|
115
|
+
reference: z.union([z.string(), z.null()]),
|
|
113
116
|
payment_terms: z.union([z.string(), z.null()]),
|
|
114
117
|
currency_code: z.string(),
|
|
115
118
|
metadata: z.union([z.object({}).partial().passthrough(), z.null()]),
|
|
@@ -22,6 +22,7 @@ const createCustomerSchemaDefinition = z.object({
|
|
|
22
22
|
company_number: z.union([z.string(), z.null()]).optional(),
|
|
23
23
|
email: z.union([z.string(), z.null()]).optional(),
|
|
24
24
|
is_tax_subject: z.boolean().optional(),
|
|
25
|
+
is_end_consumer: z.union([z.boolean(), z.null()]).optional(),
|
|
25
26
|
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
26
27
|
});
|
|
27
28
|
|
|
@@ -44,6 +45,7 @@ const updateCustomerSchemaDefinition = z
|
|
|
44
45
|
company_number: z.union([z.string(), z.null()]),
|
|
45
46
|
email: z.union([z.string(), z.null()]),
|
|
46
47
|
is_tax_subject: z.boolean(),
|
|
48
|
+
is_end_consumer: z.union([z.boolean(), z.null()]),
|
|
47
49
|
metadata: z.union([z.record(z.string(), z.any()), z.null()]),
|
|
48
50
|
})
|
|
49
51
|
.partial();
|
|
@@ -84,6 +84,9 @@ const createDeliveryNoteSchemaDefinition = z.object({
|
|
|
84
84
|
note: z.union([z.string(), z.null()]).optional(),
|
|
85
85
|
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
86
86
|
tax_clause: z.union([z.string(), z.null()]).optional(),
|
|
87
|
+
footer: z.union([z.string(), z.null()]).optional(),
|
|
88
|
+
signature: z.union([z.string(), z.null()]).optional(),
|
|
89
|
+
reference: z.union([z.string(), z.null()]).optional(),
|
|
87
90
|
currency_code: z.string().max(3).optional(),
|
|
88
91
|
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
89
92
|
hide_prices: z.boolean().optional(),
|
|
@@ -30,7 +30,7 @@ const createEntitySchemaDefinition = z.object({
|
|
|
30
30
|
settings: z
|
|
31
31
|
.object({
|
|
32
32
|
pdf_template: z.union([
|
|
33
|
-
z.enum(["modern", "classic", "minimal", "fashion"]),
|
|
33
|
+
z.enum(["modern", "classic", "condensed", "minimal", "fashion"]),
|
|
34
34
|
z.null(),
|
|
35
35
|
]),
|
|
36
36
|
number_formats: z.union([
|
|
@@ -70,6 +70,7 @@ const createEntitySchemaDefinition = z.object({
|
|
|
70
70
|
default_credit_note_note: z.union([z.string(), z.null()]),
|
|
71
71
|
default_credit_note_payment_terms: z.union([z.string(), z.null()]),
|
|
72
72
|
document_footer: z.union([z.string(), z.null()]),
|
|
73
|
+
default_document_signature: z.union([z.string(), z.null()]),
|
|
73
74
|
furs: z.union([
|
|
74
75
|
z
|
|
75
76
|
.object({
|
|
@@ -78,6 +79,7 @@ const createEntitySchemaDefinition = z.object({
|
|
|
78
79
|
operator_tax_number: z.string(),
|
|
79
80
|
operator_label: z.string(),
|
|
80
81
|
foreign_operator: z.boolean(),
|
|
82
|
+
environment: z.enum(["test", "production"]),
|
|
81
83
|
})
|
|
82
84
|
.partial()
|
|
83
85
|
.passthrough(),
|
|
@@ -90,7 +92,8 @@ const createEntitySchemaDefinition = z.object({
|
|
|
90
92
|
operator_oib: z.string().min(11).max(11),
|
|
91
93
|
operator_label: z.string(),
|
|
92
94
|
u_sust_pdv: z.boolean().default(true),
|
|
93
|
-
numbering_sequence: z.enum(["N", "P"]).default("
|
|
95
|
+
numbering_sequence: z.enum(["N", "P"]).default("P"),
|
|
96
|
+
unified_numbering: z.union([z.boolean(), z.null()]),
|
|
94
97
|
certificate_expiry: z.string(),
|
|
95
98
|
})
|
|
96
99
|
.partial()
|
|
@@ -144,6 +147,8 @@ const createEntitySchemaDefinition = z.object({
|
|
|
144
147
|
domestic: z.union([z.string(), z.null()]),
|
|
145
148
|
intra_eu_b2b: z.union([z.string(), z.null()]),
|
|
146
149
|
intra_eu_b2c: z.union([z.string(), z.null()]),
|
|
150
|
+
"3w_b2b": z.union([z.string(), z.null()]),
|
|
151
|
+
"3w_b2c": z.union([z.string(), z.null()]),
|
|
147
152
|
export: z.union([z.string(), z.null()]),
|
|
148
153
|
})
|
|
149
154
|
.partial()
|
|
@@ -181,7 +186,7 @@ const patchEntitySchemaDefinition = z
|
|
|
181
186
|
settings: z
|
|
182
187
|
.object({
|
|
183
188
|
pdf_template: z.union([
|
|
184
|
-
z.enum(["modern", "classic", "minimal", "fashion"]),
|
|
189
|
+
z.enum(["modern", "classic", "condensed", "minimal", "fashion"]),
|
|
185
190
|
z.null(),
|
|
186
191
|
]),
|
|
187
192
|
number_formats: z.union([
|
|
@@ -221,6 +226,7 @@ const patchEntitySchemaDefinition = z
|
|
|
221
226
|
default_credit_note_note: z.union([z.string(), z.null()]),
|
|
222
227
|
default_credit_note_payment_terms: z.union([z.string(), z.null()]),
|
|
223
228
|
document_footer: z.union([z.string(), z.null()]),
|
|
229
|
+
default_document_signature: z.union([z.string(), z.null()]),
|
|
224
230
|
furs: z.union([
|
|
225
231
|
z
|
|
226
232
|
.object({
|
|
@@ -229,6 +235,7 @@ const patchEntitySchemaDefinition = z
|
|
|
229
235
|
operator_tax_number: z.string(),
|
|
230
236
|
operator_label: z.string(),
|
|
231
237
|
foreign_operator: z.boolean(),
|
|
238
|
+
environment: z.enum(["test", "production"]),
|
|
232
239
|
})
|
|
233
240
|
.partial()
|
|
234
241
|
.passthrough(),
|
|
@@ -241,7 +248,8 @@ const patchEntitySchemaDefinition = z
|
|
|
241
248
|
operator_oib: z.string().min(11).max(11),
|
|
242
249
|
operator_label: z.string(),
|
|
243
250
|
u_sust_pdv: z.boolean().default(true),
|
|
244
|
-
numbering_sequence: z.enum(["N", "P"]).default("
|
|
251
|
+
numbering_sequence: z.enum(["N", "P"]).default("P"),
|
|
252
|
+
unified_numbering: z.union([z.boolean(), z.null()]),
|
|
245
253
|
certificate_expiry: z.string(),
|
|
246
254
|
})
|
|
247
255
|
.partial()
|
|
@@ -295,6 +303,8 @@ const patchEntitySchemaDefinition = z
|
|
|
295
303
|
domestic: z.union([z.string(), z.null()]),
|
|
296
304
|
intra_eu_b2b: z.union([z.string(), z.null()]),
|
|
297
305
|
intra_eu_b2c: z.union([z.string(), z.null()]),
|
|
306
|
+
"3w_b2b": z.union([z.string(), z.null()]),
|
|
307
|
+
"3w_b2c": z.union([z.string(), z.null()]),
|
|
298
308
|
export: z.union([z.string(), z.null()]),
|
|
299
309
|
})
|
|
300
310
|
.partial()
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was automatically generated using 'bun generate-schemas'.
|
|
3
|
+
* Do not edit this file manually. To update, run the generator again.
|
|
4
|
+
* @generated
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
|
|
9
|
+
// Schemas for entityapikey endpoints
|
|
10
|
+
|
|
11
|
+
// Schema for create entityapikey operation
|
|
12
|
+
const createEntityApiKeySchemaDefinition = z
|
|
13
|
+
.object({ name: z.string().max(255), ttl: z.number().int().gte(60) })
|
|
14
|
+
.partial();
|
|
15
|
+
|
|
16
|
+
// Type for create entityapikey operation
|
|
17
|
+
export type CreateEntityApiKeySchema = z.infer<typeof createEntityApiKeySchemaDefinition>;
|
|
18
|
+
|
|
19
|
+
export const createEntityApiKeySchema = createEntityApiKeySchemaDefinition;
|
|
@@ -86,6 +86,9 @@ const createEstimateSchemaDefinition = z.object({
|
|
|
86
86
|
note: z.union([z.string(), z.null()]).optional(),
|
|
87
87
|
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
88
88
|
tax_clause: z.union([z.string(), z.null()]).optional(),
|
|
89
|
+
footer: z.union([z.string(), z.null()]).optional(),
|
|
90
|
+
signature: z.union([z.string(), z.null()]).optional(),
|
|
91
|
+
reference: z.union([z.string(), z.null()]).optional(),
|
|
89
92
|
currency_code: z.string().max(3).optional(),
|
|
90
93
|
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
91
94
|
date_valid_till: z.union([z.string(), z.null()]).optional(),
|
|
@@ -181,6 +184,7 @@ const updateEstimateSchemaDefinition = z
|
|
|
181
184
|
)
|
|
182
185
|
.min(1),
|
|
183
186
|
note: z.union([z.string(), z.null()]),
|
|
187
|
+
footer: z.union([z.string(), z.null()]),
|
|
184
188
|
payment_terms: z.union([z.string(), z.null()]),
|
|
185
189
|
currency_code: z.string(),
|
|
186
190
|
metadata: z.union([z.object({}).partial().passthrough(), z.null()]),
|
|
@@ -11,11 +11,12 @@ import { z } from 'zod';
|
|
|
11
11
|
// Schema for update finasettings operation
|
|
12
12
|
const updateFinaSettingsSchemaDefinition = z
|
|
13
13
|
.object({
|
|
14
|
-
enabled: z.boolean(),
|
|
14
|
+
enabled: z.boolean().default(false),
|
|
15
15
|
operator_oib: z.string().min(11).max(11),
|
|
16
16
|
operator_label: z.string(),
|
|
17
|
-
u_sust_pdv: z.boolean(),
|
|
18
|
-
numbering_sequence: z.enum(["N", "P"]),
|
|
17
|
+
u_sust_pdv: z.boolean().default(true),
|
|
18
|
+
numbering_sequence: z.enum(["N", "P"]).default("P"),
|
|
19
|
+
unified_numbering: z.union([z.boolean(), z.null()]),
|
|
19
20
|
})
|
|
20
21
|
.partial();
|
|
21
22
|
|
|
@@ -16,6 +16,7 @@ export * from './customestimate';
|
|
|
16
16
|
export * from './custominvoice';
|
|
17
17
|
export * from './deliverynote';
|
|
18
18
|
export * from './entity';
|
|
19
|
+
export * from './entityapikey';
|
|
19
20
|
export * from './entityuserrole';
|
|
20
21
|
export * from './estimate';
|
|
21
22
|
export * from './finasettings';
|
|
@@ -97,6 +97,9 @@ const createInvoiceSchemaDefinition = z.object({
|
|
|
97
97
|
note: z.union([z.string(), z.null()]).optional(),
|
|
98
98
|
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
99
99
|
tax_clause: z.union([z.string(), z.null()]).optional(),
|
|
100
|
+
footer: z.union([z.string(), z.null()]).optional(),
|
|
101
|
+
signature: z.union([z.string(), z.null()]).optional(),
|
|
102
|
+
reference: z.union([z.string(), z.null()]).optional(),
|
|
100
103
|
currency_code: z.string().max(3).optional(),
|
|
101
104
|
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
102
105
|
date_due: z.union([z.string(), z.null()]).optional(),
|
|
@@ -237,6 +240,7 @@ const updateInvoiceSchemaDefinition = z
|
|
|
237
240
|
)
|
|
238
241
|
.min(1),
|
|
239
242
|
note: z.union([z.string(), z.null()]),
|
|
243
|
+
footer: z.union([z.string(), z.null()]),
|
|
240
244
|
payment_terms: z.union([z.string(), z.null()]),
|
|
241
245
|
currency_code: z.string(),
|
|
242
246
|
metadata: z.union([z.object({}).partial().passthrough(), z.null()]),
|