feat(accounting): Ausgangsrechnungen als ZUGFeRD-E-Rechnung (EN 16931) erzeugen

Rechnungen, Abschlags-, Storno- und Serienrechnungen erhalten beim
Fertigstellen ein eingebettetes factur-x.xml (CII, Profil EN 16931) samt
Factur-X-XMP-Metadaten. Das XML wird serverseitig aus dem gespeicherten
Beleg erzeugt; fehlende Pflichtangaben werden als Hinweis gemeldet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 10:15:23 +01:00
parent bd768e404d
commit 549b469a41
9 changed files with 726 additions and 8 deletions

View File

@@ -34,15 +34,19 @@ export const useFunctions = () => {
return (await useNuxtApp().$api(`/api/banking/link/${institutionId}`)).link
}
const useCreatePDF = async (data,path,type) => {
// options.createdDocumentId: gespeicherter Beleg, aus dem das Backend die eingebettete E-Rechnung (ZUGFeRD) erzeugt
const useCreatePDF = async (data,path,type,options = {}) => {
const returnData = await useNuxtApp().$api(`/api/functions/pdf/${type}`, {
method: "POST",
body: {
data: data,
backgroundPath: path,
...(options.createdDocumentId ? { createdDocumentId: options.createdDocumentId } : {}),
}
})
if (options.onResult) options.onResult(returnData)
console.log(returnData)
return `data:${returnData.mimeType};base64,${returnData.base64}`