diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue index 651ec22..f4dcbf5 100644 --- a/pages/createDocument/edit/[[id]].vue +++ b/pages/createDocument/edit/[[id]].vue @@ -214,14 +214,31 @@ const setupPage = async () => { for await (const doc of linkedDocuments.filter(i => i.type === "confirmationOrders")) { let linkedDocument = await useSupabaseSelectSingle("createddocuments",doc.id) + + itemInfo.value.rows.push({ + mode: "title", + text: linkedDocument.title, + }) + itemInfo.value.rows.push(...linkedDocument.rows) } for await (const doc of linkedDocuments.filter(i => i.type === "quotes")) { let linkedDocument = await useSupabaseSelectSingle("createddocuments",doc.id) + + itemInfo.value.rows.push({ + mode: "title", + text: linkedDocument.title, + }) + itemInfo.value.rows.push(...linkedDocument.rows) } + itemInfo.value.rows.push({ + mode: "title", + text: "Abschlagsrechnungen", + }) + for await (const doc of linkedDocuments.filter(i => i.type === "advanceInvoices")) { itemInfo.value.rows.push({ mode: "free", @@ -1311,7 +1328,7 @@ const saveDocument = async (state,resetup = false) => { let createData = { type: itemInfo.value.type, - taxType: (itemInfo.value.type === "invoices" || itemInfo.value.type === "quotes") ? itemInfo.value.taxType : null, + taxType: ['invoices','cancellationInvoices','advanceInvoices','qoutes','confirmationOrders'].includes(itemInfo.value.type) ? itemInfo.value.taxType : null, state: itemInfo.value.state || "Entwurf", customer: itemInfo.value.customer, contact: itemInfo.value.contact, @@ -2809,7 +2826,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = { - @@ -2840,7 +2857,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = { X - + --> Überschriften