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:
@@ -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}`
|
||||
|
||||
Reference in New Issue
Block a user