@spaceinvoices/react-ui 0.4.5 → 0.4.6
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 +91 -35
- 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 +91 -35
- 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/delivery-notes/create/create-delivery-note-form.tsx +47 -0
- 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 +472 -346
- package/src/components/documents/create/prepare-document-submission.ts +3 -1
- package/src/components/documents/create/smart-code-insert-button.tsx +6 -0
- 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 +1 -2
- package/src/components/estimates/create/create-estimate-form.tsx +43 -2
- 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 +130 -40
- package/src/components/invoices/create/locales/de.ts +13 -0
- package/src/components/invoices/create/locales/es.ts +13 -0
- package/src/components/invoices/create/locales/fr.ts +13 -0
- package/src/components/invoices/create/locales/hr.ts +13 -0
- package/src/components/invoices/create/locales/it.ts +13 -0
- package/src/components/invoices/create/locales/nl.ts +13 -0
- package/src/components/invoices/create/locales/pl.ts +13 -0
- package/src/components/invoices/create/locales/pt.ts +13 -0
- package/src/components/invoices/create/locales/sl.ts +13 -0
- package/src/components/invoices/create/prepare-invoice-submission.ts +5 -5
- package/src/components/invoices/invoices.hooks.ts +2 -2
- package/src/components/table/table-pagination.tsx +1 -1
- package/src/generated/schemas/advanceinvoice.ts +2 -0
- package/src/generated/schemas/creditnote.ts +1 -0
- package/src/generated/schemas/deliverynote.ts +1 -0
- package/src/generated/schemas/entity.ts +4 -4
- package/src/generated/schemas/entityapikey.ts +19 -0
- package/src/generated/schemas/estimate.ts +2 -0
- package/src/generated/schemas/index.ts +1 -0
- package/src/generated/schemas/invoice.ts +2 -0
- package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +1 -1
- package/src/generated/schemas/rendercreditnotepreview_body.ts +1 -1
- package/src/generated/schemas/renderdeliverynotepreview_body.ts +1 -1
- package/src/generated/schemas/renderestimatepreview_body.ts +1 -1
- package/src/generated/schemas/renderinvoicepreview_body.ts +1 -1
- package/src/generated/schemas/startpdfexport_body.ts +14 -2
- package/src/generated/schemas/webhook.ts +4 -0
- package/src/lib/template-variables.tsx +167 -0
- package/src/providers/entities-context.tsx +2 -2
package/cli/dist/index.js
CHANGED
|
@@ -870,7 +870,7 @@ async function list(options = {}) {
|
|
|
870
870
|
|
|
871
871
|
// cli/src/index.ts
|
|
872
872
|
var program = new Command();
|
|
873
|
-
program.name("spaceinvoices-ui").description("CLI for adding Space Invoices React UI components to your project").version("0.4.
|
|
873
|
+
program.name("spaceinvoices-ui").description("CLI for adding Space Invoices React UI components to your project").version("0.4.6");
|
|
874
874
|
program.option("--local <path>", "Use local registry from specified path (for development)");
|
|
875
875
|
program.command("init").description("Initialize Space Invoices UI in your project").option("-y, --yes", "Skip prompts and use defaults").option("-f, --force", "Overwrite existing configuration").option("--cwd <path>", "Working directory (defaults to current directory)").action(async (options) => {
|
|
876
876
|
const globalOpts = program.opts();
|
package/package.json
CHANGED
|
@@ -81,8 +81,8 @@ export function setLastUsedFursCombo(entityId: string, combo: FursCombo): void {
|
|
|
81
81
|
const FINA_ADV_LAST_USED_KEY = "hr:fina:adv:last-used";
|
|
82
82
|
|
|
83
83
|
export type FinaCombo = {
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
business_premise_name: string;
|
|
85
|
+
electronic_device_name: string;
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
export function getLastUsedFinaCombo(entityId: string): FinaCombo | null {
|
|
@@ -21,7 +21,9 @@ import { useEntities } from "@/ui/providers/entities-context";
|
|
|
21
21
|
import { useFormFooterRegistration } from "@/ui/providers/form-footer-context";
|
|
22
22
|
import {
|
|
23
23
|
DocumentDetailsSection,
|
|
24
|
+
DocumentFooterField,
|
|
24
25
|
DocumentNoteField,
|
|
26
|
+
DocumentSignatureField,
|
|
25
27
|
DocumentTaxClauseField,
|
|
26
28
|
} from "../../documents/create/document-details-section";
|
|
27
29
|
import { DocumentItemsSection, type PriceModesMap } from "../../documents/create/document-items-section";
|
|
@@ -107,6 +109,7 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
107
109
|
// Get default note from entity settings (use invoice defaults)
|
|
108
110
|
// Note: Advance invoices don't have payment terms - they are documents requesting payment
|
|
109
111
|
const defaultNote = (activeEntity?.settings as any)?.default_invoice_note || "";
|
|
112
|
+
const defaultFooter = (activeEntity?.settings as any)?.document_footer || "";
|
|
110
113
|
|
|
111
114
|
// ============================================================================
|
|
112
115
|
// FURS Settings & Premises
|
|
@@ -143,8 +146,8 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
143
146
|
const hasFinaPremises = activeFinaPremises.length > 0;
|
|
144
147
|
|
|
145
148
|
// FINA premise/device selection state (no skip - all FINA invoices must be fiscalized)
|
|
146
|
-
const [
|
|
147
|
-
const [
|
|
149
|
+
const [selectedFinaBusinessPremiseName, setSelectedFinaBusinessPremiseName] = useState<string | undefined>();
|
|
150
|
+
const [selectedFinaElectronicDeviceName, setSelectedFinaElectronicDeviceName] = useState<string | undefined>();
|
|
148
151
|
|
|
149
152
|
// UI-only state (not part of API schema)
|
|
150
153
|
const [markAsPaid, setMarkAsPaid] = useState(true);
|
|
@@ -239,22 +242,24 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
239
242
|
|
|
240
243
|
// Get active FINA devices for selected premise
|
|
241
244
|
const activeFinaDevices = useMemo(() => {
|
|
242
|
-
if (!
|
|
243
|
-
const premise = activeFinaPremises.find((p: any) => p.
|
|
245
|
+
if (!selectedFinaBusinessPremiseName) return [];
|
|
246
|
+
const premise = activeFinaPremises.find((p: any) => p.business_premise_name === selectedFinaBusinessPremiseName);
|
|
244
247
|
return premise?.Devices?.filter((d: any) => d.is_active) || [];
|
|
245
|
-
}, [activeFinaPremises,
|
|
248
|
+
}, [activeFinaPremises, selectedFinaBusinessPremiseName]);
|
|
246
249
|
|
|
247
250
|
// Initialize FINA selection from localStorage or first active combo
|
|
248
251
|
useEffect(() => {
|
|
249
|
-
if (!isFinaEnabled || !hasFinaPremises ||
|
|
252
|
+
if (!isFinaEnabled || !hasFinaPremises || selectedFinaBusinessPremiseName) return;
|
|
250
253
|
|
|
251
254
|
const lastUsed = getLastUsedFinaCombo(entityId);
|
|
252
255
|
if (lastUsed) {
|
|
253
|
-
const premise = activeFinaPremises.find((p: any) => p.
|
|
254
|
-
const device = premise?.Devices?.find(
|
|
256
|
+
const premise = activeFinaPremises.find((p: any) => p.business_premise_name === lastUsed.business_premise_name);
|
|
257
|
+
const device = premise?.Devices?.find(
|
|
258
|
+
(d: any) => d.electronic_device_name === lastUsed.electronic_device_name && d.is_active,
|
|
259
|
+
);
|
|
255
260
|
if (premise && device) {
|
|
256
|
-
|
|
257
|
-
|
|
261
|
+
setSelectedFinaBusinessPremiseName(lastUsed.business_premise_name);
|
|
262
|
+
setSelectedFinaElectronicDeviceName(lastUsed.electronic_device_name);
|
|
258
263
|
return;
|
|
259
264
|
}
|
|
260
265
|
}
|
|
@@ -262,25 +267,25 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
262
267
|
const firstPremise = activeFinaPremises[0];
|
|
263
268
|
const firstDevice = firstPremise?.Devices?.find((d: any) => d.is_active);
|
|
264
269
|
if (firstPremise && firstDevice) {
|
|
265
|
-
|
|
266
|
-
|
|
270
|
+
setSelectedFinaBusinessPremiseName(firstPremise.business_premise_name);
|
|
271
|
+
setSelectedFinaElectronicDeviceName(firstDevice.electronic_device_name);
|
|
267
272
|
}
|
|
268
|
-
}, [isFinaEnabled, hasFinaPremises, activeFinaPremises, entityId,
|
|
273
|
+
}, [isFinaEnabled, hasFinaPremises, activeFinaPremises, entityId, selectedFinaBusinessPremiseName]);
|
|
269
274
|
|
|
270
275
|
// When FINA premise changes, select first active device
|
|
271
276
|
useEffect(() => {
|
|
272
|
-
if (!
|
|
273
|
-
const premise = activeFinaPremises.find((p: any) => p.
|
|
277
|
+
if (!selectedFinaBusinessPremiseName) return;
|
|
278
|
+
const premise = activeFinaPremises.find((p: any) => p.business_premise_name === selectedFinaBusinessPremiseName);
|
|
274
279
|
const firstDevice = premise?.Devices?.find((d: any) => d.is_active);
|
|
275
|
-
if (firstDevice &&
|
|
280
|
+
if (firstDevice && selectedFinaElectronicDeviceName !== firstDevice.electronic_device_name) {
|
|
276
281
|
const currentDeviceInPremise = premise?.Devices?.find(
|
|
277
|
-
(d: any) => d.
|
|
282
|
+
(d: any) => d.electronic_device_name === selectedFinaElectronicDeviceName && d.is_active,
|
|
278
283
|
);
|
|
279
284
|
if (!currentDeviceInPremise) {
|
|
280
|
-
|
|
285
|
+
setSelectedFinaElectronicDeviceName(firstDevice.electronic_device_name);
|
|
281
286
|
}
|
|
282
287
|
}
|
|
283
|
-
}, [
|
|
288
|
+
}, [selectedFinaBusinessPremiseName, activeFinaPremises, selectedFinaElectronicDeviceName]);
|
|
284
289
|
|
|
285
290
|
const form = useForm<CreateAdvanceInvoiceFormValues>({
|
|
286
291
|
// Cast resolver to accept extended form type (includes UI-only fields)
|
|
@@ -315,8 +320,10 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
315
320
|
},
|
|
316
321
|
],
|
|
317
322
|
currency_code: initialValues?.currency_code || activeEntity?.currency_code || "EUR",
|
|
323
|
+
reference: (initialValues as any)?.reference ?? "",
|
|
318
324
|
note: initialValues?.note ?? defaultNote,
|
|
319
325
|
tax_clause: "",
|
|
326
|
+
footer: (initialValues as any)?.footer ?? defaultFooter,
|
|
320
327
|
},
|
|
321
328
|
});
|
|
322
329
|
|
|
@@ -339,8 +346,9 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
339
346
|
|
|
340
347
|
// FINA selection ready and active checks
|
|
341
348
|
const isFinaSelectionReady =
|
|
342
|
-
!isFinaEnabled || !hasFinaPremises || (!!
|
|
343
|
-
const isFinaActive =
|
|
349
|
+
!isFinaEnabled || !hasFinaPremises || (!!selectedFinaBusinessPremiseName && !!selectedFinaElectronicDeviceName);
|
|
350
|
+
const isFinaActive =
|
|
351
|
+
isFinaEnabled && hasFinaPremises && selectedFinaBusinessPremiseName && selectedFinaElectronicDeviceName;
|
|
344
352
|
|
|
345
353
|
// ============================================================================
|
|
346
354
|
// Next Advance Invoice Number Preview
|
|
@@ -531,10 +539,10 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
531
539
|
electronic_device_name: selectedDeviceName,
|
|
532
540
|
});
|
|
533
541
|
}
|
|
534
|
-
if (isFinaActive &&
|
|
542
|
+
if (isFinaActive && selectedFinaBusinessPremiseName && selectedFinaElectronicDeviceName) {
|
|
535
543
|
setLastUsedFinaCombo(entityId, {
|
|
536
|
-
|
|
537
|
-
|
|
544
|
+
business_premise_name: selectedFinaBusinessPremiseName,
|
|
545
|
+
electronic_device_name: selectedFinaElectronicDeviceName,
|
|
538
546
|
});
|
|
539
547
|
}
|
|
540
548
|
onSuccess?.(data);
|
|
@@ -580,8 +588,16 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
580
588
|
|
|
581
589
|
// Build FINA options (skip for drafts; FINA can't be skipped)
|
|
582
590
|
const finaOptions =
|
|
583
|
-
!isDraft &&
|
|
584
|
-
|
|
591
|
+
!isDraft &&
|
|
592
|
+
isFinaEnabled &&
|
|
593
|
+
!isFinaNonDomestic &&
|
|
594
|
+
selectedFinaBusinessPremiseName &&
|
|
595
|
+
selectedFinaElectronicDeviceName
|
|
596
|
+
? {
|
|
597
|
+
business_premise_name: selectedFinaBusinessPremiseName,
|
|
598
|
+
electronic_device_name: selectedFinaElectronicDeviceName,
|
|
599
|
+
payment_type: paymentTypes[0],
|
|
600
|
+
}
|
|
585
601
|
: undefined;
|
|
586
602
|
|
|
587
603
|
const payload = prepareAdvanceInvoiceSubmission(values, {
|
|
@@ -612,8 +628,8 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
612
628
|
paymentTypes,
|
|
613
629
|
selectedDeviceName,
|
|
614
630
|
selectedPremiseName,
|
|
615
|
-
|
|
616
|
-
|
|
631
|
+
selectedFinaBusinessPremiseName,
|
|
632
|
+
selectedFinaElectronicDeviceName,
|
|
617
633
|
showCustomerForm,
|
|
618
634
|
skipFiscalization,
|
|
619
635
|
],
|
|
@@ -645,12 +661,20 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
645
661
|
},
|
|
646
662
|
});
|
|
647
663
|
|
|
648
|
-
// Set default note from entity settings (advance invoices don't have payment terms)
|
|
664
|
+
// Set default note, footer, and signature from entity settings (advance invoices don't have payment terms)
|
|
649
665
|
useEffect(() => {
|
|
650
666
|
const entityDefaultNote = (activeEntity?.settings as any)?.default_invoice_note;
|
|
651
667
|
if (entityDefaultNote && !form.getValues("note")) {
|
|
652
668
|
form.setValue("note", entityDefaultNote);
|
|
653
669
|
}
|
|
670
|
+
const entityDefaultFooter = (activeEntity?.settings as any)?.document_footer;
|
|
671
|
+
if (entityDefaultFooter && !form.getValues("footer")) {
|
|
672
|
+
form.setValue("footer", entityDefaultFooter);
|
|
673
|
+
}
|
|
674
|
+
const entityDefaultSignature = (activeEntity?.settings as any)?.default_document_signature;
|
|
675
|
+
if (entityDefaultSignature && !form.getValues("signature")) {
|
|
676
|
+
form.setValue("signature", entityDefaultSignature);
|
|
677
|
+
}
|
|
654
678
|
}, [activeEntity, form]);
|
|
655
679
|
|
|
656
680
|
// Auto-add tax field for tax subject entities
|
|
@@ -684,7 +708,9 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
684
708
|
customer: formValues.customer,
|
|
685
709
|
items: transformedItems,
|
|
686
710
|
currency_code: formValues.currency_code,
|
|
711
|
+
reference: formValues.reference,
|
|
687
712
|
note: formValues.note,
|
|
713
|
+
signature: formValues.signature,
|
|
688
714
|
};
|
|
689
715
|
onChange(payload);
|
|
690
716
|
}
|
|
@@ -797,12 +823,18 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
797
823
|
finaInline={
|
|
798
824
|
isFinaEnabled && hasFinaPremises && !isFinaNonDomestic
|
|
799
825
|
? {
|
|
800
|
-
premises: activeFinaPremises.map((p: any) => ({
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
826
|
+
premises: activeFinaPremises.map((p: any) => ({
|
|
827
|
+
id: p.id,
|
|
828
|
+
business_premise_name: p.business_premise_name,
|
|
829
|
+
})),
|
|
830
|
+
devices: activeFinaDevices.map((d: any) => ({
|
|
831
|
+
id: d.id,
|
|
832
|
+
electronic_device_name: d.electronic_device_name,
|
|
833
|
+
})),
|
|
834
|
+
selectedPremise: selectedFinaBusinessPremiseName,
|
|
835
|
+
selectedDevice: selectedFinaElectronicDeviceName,
|
|
836
|
+
onPremiseChange: setSelectedFinaBusinessPremiseName,
|
|
837
|
+
onDeviceChange: setSelectedFinaElectronicDeviceName,
|
|
806
838
|
}
|
|
807
839
|
: undefined
|
|
808
840
|
}
|
|
@@ -864,6 +896,30 @@ export default function CreateAdvanceInvoiceForm({
|
|
|
864
896
|
isTransactionTypeFetching={isViesFetching}
|
|
865
897
|
isFinaNonDomestic={isFinaNonDomestic}
|
|
866
898
|
/>
|
|
899
|
+
|
|
900
|
+
<DocumentSignatureField
|
|
901
|
+
control={form.control}
|
|
902
|
+
t={t}
|
|
903
|
+
entity={activeEntity}
|
|
904
|
+
document={{
|
|
905
|
+
number: formValues.number,
|
|
906
|
+
date: formValues.date,
|
|
907
|
+
currency_code: formValues.currency_code,
|
|
908
|
+
customer: formValues.customer as any,
|
|
909
|
+
}}
|
|
910
|
+
/>
|
|
911
|
+
|
|
912
|
+
<DocumentFooterField
|
|
913
|
+
control={form.control}
|
|
914
|
+
t={t}
|
|
915
|
+
entity={activeEntity}
|
|
916
|
+
document={{
|
|
917
|
+
number: formValues.number,
|
|
918
|
+
date: formValues.date,
|
|
919
|
+
currency_code: formValues.currency_code,
|
|
920
|
+
customer: formValues.customer as any,
|
|
921
|
+
}}
|
|
922
|
+
/>
|
|
867
923
|
</form>
|
|
868
924
|
</Form>
|
|
869
925
|
);
|
|
@@ -30,6 +30,9 @@ export default {
|
|
|
30
30
|
Device: "Gerät",
|
|
31
31
|
"FINA fiscalized invoices always use the current date":
|
|
32
32
|
"FINA-fiskalisierte Dokumente verwenden immer das aktuelle Datum",
|
|
33
|
+
// Signature field
|
|
34
|
+
Signature: "Unterschrift",
|
|
35
|
+
"Add signature text...": "Unterschriftstext hinzufügen...",
|
|
33
36
|
// Separator items
|
|
34
37
|
"Add separator": "Trennzeile hinzufügen",
|
|
35
38
|
"Section header": "Abschnittsüberschrift",
|
|
@@ -45,4 +48,6 @@ export default {
|
|
|
45
48
|
"Diese Rechnung wird nicht fiskalisiert (nicht-inländische Transaktion)",
|
|
46
49
|
"Tax Clause": "Steuerklausel",
|
|
47
50
|
"Add tax clause...": "Steuerklausel hinzufügen...",
|
|
51
|
+
Footer: "Fußzeile",
|
|
52
|
+
"Add document footer...": "Dokumentfußzeile hinzufügen...",
|
|
48
53
|
} as const;
|
|
@@ -30,6 +30,9 @@ export default {
|
|
|
30
30
|
Device: "Dispositivo",
|
|
31
31
|
"FINA fiscalized invoices always use the current date":
|
|
32
32
|
"Los documentos fiscalizados con FINA siempre usan la fecha actual",
|
|
33
|
+
// Signature field
|
|
34
|
+
Signature: "Firma",
|
|
35
|
+
"Add signature text...": "Añadir texto de firma...",
|
|
33
36
|
// Separator items
|
|
34
37
|
"Add separator": "Añadir separador",
|
|
35
38
|
"Section header": "Encabezado de sección",
|
|
@@ -45,4 +48,6 @@ export default {
|
|
|
45
48
|
"Esta factura no será fiscalizada (transacción no nacional)",
|
|
46
49
|
"Tax Clause": "Cláusula fiscal",
|
|
47
50
|
"Add tax clause...": "Agregar cláusula fiscal...",
|
|
51
|
+
Footer: "Pie de página",
|
|
52
|
+
"Add document footer...": "Añadir pie de página del documento...",
|
|
48
53
|
} as const;
|
|
@@ -29,6 +29,9 @@ export default {
|
|
|
29
29
|
Device: "Appareil",
|
|
30
30
|
"FINA fiscalized invoices always use the current date":
|
|
31
31
|
"Les documents fiscalisés FINA utilisent toujours la date actuelle",
|
|
32
|
+
// Signature field
|
|
33
|
+
Signature: "Signature",
|
|
34
|
+
"Add signature text...": "Ajouter un texte de signature...",
|
|
32
35
|
// Separator items
|
|
33
36
|
"Add separator": "Ajouter un séparateur",
|
|
34
37
|
"Section header": "En-tête de section",
|
|
@@ -44,4 +47,6 @@ export default {
|
|
|
44
47
|
"Cette facture ne sera pas fiscalisée (transaction non nationale)",
|
|
45
48
|
"Tax Clause": "Clause fiscale",
|
|
46
49
|
"Add tax clause...": "Ajouter une clause fiscale...",
|
|
50
|
+
Footer: "Pied de page",
|
|
51
|
+
"Add document footer...": "Ajouter un pied de page...",
|
|
47
52
|
} as const;
|
|
@@ -27,6 +27,9 @@ export default {
|
|
|
27
27
|
Premise: "Prostor",
|
|
28
28
|
Device: "Uredaj",
|
|
29
29
|
"FINA fiscalized invoices always use the current date": "FINA fiskalizirani dokumenti uvijek koriste trenutni datum",
|
|
30
|
+
// Signature field
|
|
31
|
+
Signature: "Potpis",
|
|
32
|
+
"Add signature text...": "Dodaj tekst potpisa...",
|
|
30
33
|
// Separator items
|
|
31
34
|
"Add separator": "Dodaj separator",
|
|
32
35
|
"Section header": "Naslov odjeljka",
|
|
@@ -42,4 +45,6 @@ export default {
|
|
|
42
45
|
"Ovaj račun neće biti fiskaliziran (nedomaća transakcija)",
|
|
43
46
|
"Tax Clause": "Porezna klauzula",
|
|
44
47
|
"Add tax clause...": "Dodajte poreznu klauzulu...",
|
|
48
|
+
Footer: "Podnožje",
|
|
49
|
+
"Add document footer...": "Dodajte podnožje dokumenta...",
|
|
45
50
|
} as const;
|
|
@@ -30,6 +30,9 @@ export default {
|
|
|
30
30
|
Device: "Dispositivo",
|
|
31
31
|
"FINA fiscalized invoices always use the current date":
|
|
32
32
|
"I documenti fiscalizzati FINA utilizzano sempre la data corrente",
|
|
33
|
+
// Signature field
|
|
34
|
+
Signature: "Firma",
|
|
35
|
+
"Add signature text...": "Aggiungi testo della firma...",
|
|
33
36
|
// Separator items
|
|
34
37
|
"Add separator": "Aggiungi separatore",
|
|
35
38
|
"Section header": "Intestazione sezione",
|
|
@@ -45,4 +48,6 @@ export default {
|
|
|
45
48
|
"Questa fattura non sarà fiscalizzata (transazione non nazionale)",
|
|
46
49
|
"Tax Clause": "Clausola fiscale",
|
|
47
50
|
"Add tax clause...": "Aggiungi clausola fiscale...",
|
|
51
|
+
Footer: "Piè di pagina",
|
|
52
|
+
"Add document footer...": "Aggiungi piè di pagina del documento...",
|
|
48
53
|
} as const;
|
|
@@ -29,6 +29,9 @@ export default {
|
|
|
29
29
|
Device: "Apparaat",
|
|
30
30
|
"FINA fiscalized invoices always use the current date":
|
|
31
31
|
"FINA-gefiscaliseerde documenten gebruiken altijd de huidige datum",
|
|
32
|
+
// Signature field
|
|
33
|
+
Signature: "Handtekening",
|
|
34
|
+
"Add signature text...": "Handtekeningtekst toevoegen...",
|
|
32
35
|
// Separator items
|
|
33
36
|
"Add separator": "Scheidingslijn toevoegen",
|
|
34
37
|
"Section header": "Sectiekop",
|
|
@@ -44,4 +47,6 @@ export default {
|
|
|
44
47
|
"Deze factuur wordt niet gefiscaliseerd (niet-binnenlandse transactie)",
|
|
45
48
|
"Tax Clause": "Belastingclausule",
|
|
46
49
|
"Add tax clause...": "Belastingclausule toevoegen...",
|
|
50
|
+
Footer: "Voettekst",
|
|
51
|
+
"Add document footer...": "Documentvoettekst toevoegen...",
|
|
47
52
|
} as const;
|
|
@@ -28,6 +28,9 @@ export default {
|
|
|
28
28
|
Premise: "Lokal",
|
|
29
29
|
Device: "Urządzenie",
|
|
30
30
|
"FINA fiscalized invoices always use the current date": "Dokumenty fiskalizowane FINA zawsze używają bieżącej daty",
|
|
31
|
+
// Signature field
|
|
32
|
+
Signature: "Podpis",
|
|
33
|
+
"Add signature text...": "Dodaj tekst podpisu...",
|
|
31
34
|
// Separator items
|
|
32
35
|
"Add separator": "Dodaj separator",
|
|
33
36
|
"Section header": "Nagłówek sekcji",
|
|
@@ -43,4 +46,6 @@ export default {
|
|
|
43
46
|
"Ta faktura nie będzie fiskalizowana (transakcja niekrajowa)",
|
|
44
47
|
"Tax Clause": "Klauzula podatkowa",
|
|
45
48
|
"Add tax clause...": "Dodaj klauzulę podatkową...",
|
|
49
|
+
Footer: "Stopka",
|
|
50
|
+
"Add document footer...": "Dodaj stopkę dokumentu...",
|
|
46
51
|
} as const;
|
|
@@ -29,6 +29,9 @@ export default {
|
|
|
29
29
|
Premise: "Estabelecimento",
|
|
30
30
|
Device: "Dispositivo",
|
|
31
31
|
"FINA fiscalized invoices always use the current date": "Os documentos fiscalizados FINA usam sempre a data atual",
|
|
32
|
+
// Signature field
|
|
33
|
+
Signature: "Assinatura",
|
|
34
|
+
"Add signature text...": "Adicionar texto de assinatura...",
|
|
32
35
|
// Separator items
|
|
33
36
|
"Add separator": "Adicionar separador",
|
|
34
37
|
"Section header": "Cabeçalho da secção",
|
|
@@ -44,4 +47,6 @@ export default {
|
|
|
44
47
|
"Esta fatura não será fiscalizada (transação não nacional)",
|
|
45
48
|
"Tax Clause": "Cláusula fiscal",
|
|
46
49
|
"Add tax clause...": "Adicionar cláusula fiscal...",
|
|
50
|
+
Footer: "Rodapé",
|
|
51
|
+
"Add document footer...": "Adicionar rodapé do documento...",
|
|
47
52
|
} as const;
|
|
@@ -25,6 +25,9 @@ export default {
|
|
|
25
25
|
Premise: "Poslovni prostor",
|
|
26
26
|
Device: "Naprava",
|
|
27
27
|
"FINA fiscalized invoices always use the current date": "FINA fiskalizirani dokumenti vedno uporabijo trenutni datum",
|
|
28
|
+
// Signature field
|
|
29
|
+
Signature: "Podpis",
|
|
30
|
+
"Add signature text...": "Dodaj besedilo podpisa...",
|
|
28
31
|
// Separator items
|
|
29
32
|
"Add separator": "Dodaj ločilnik",
|
|
30
33
|
"Section header": "Naslov razdelka",
|
|
@@ -40,4 +43,6 @@ export default {
|
|
|
40
43
|
"Ta račun ne bo fiskaliziran (nedomača transakcija)",
|
|
41
44
|
"Tax Clause": "Davčna klavzula",
|
|
42
45
|
"Add tax clause...": "Dodajte davčno klavzulo...",
|
|
46
|
+
Footer: "Noga dokumenta",
|
|
47
|
+
"Add document footer...": "Dodajte nogo dokumenta...",
|
|
43
48
|
} 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
|
|
|
@@ -71,10 +71,10 @@ export function prepareAdvanceInvoiceSubmission(
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
// Add FINA data if provided (FINA can't be skipped - all invoices must be fiscalized)
|
|
74
|
-
if (options.fina?.
|
|
74
|
+
if (options.fina?.business_premise_name && options.fina.electronic_device_name) {
|
|
75
75
|
(payload as any).fina = {
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
business_premise_name: options.fina.business_premise_name,
|
|
77
|
+
electronic_device_name: options.fina.electronic_device_name,
|
|
78
78
|
...(options.fina.payment_type && { payment_type: options.fina.payment_type }),
|
|
79
79
|
};
|
|
80
80
|
}
|