Added Title to FinalInvoice Load Mode

This commit is contained in:
2025-07-31 20:46:15 +02:00
parent 7265164b0a
commit 95b1c16cf1

View File

@@ -214,14 +214,31 @@ const setupPage = async () => {
for await (const doc of linkedDocuments.filter(i => i.type === "confirmationOrders")) { for await (const doc of linkedDocuments.filter(i => i.type === "confirmationOrders")) {
let linkedDocument = await useSupabaseSelectSingle("createddocuments",doc.id) 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(...linkedDocument.rows)
} }
for await (const doc of linkedDocuments.filter(i => i.type === "quotes")) { for await (const doc of linkedDocuments.filter(i => i.type === "quotes")) {
let linkedDocument = await useSupabaseSelectSingle("createddocuments",doc.id) 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(...linkedDocument.rows)
} }
itemInfo.value.rows.push({
mode: "title",
text: "Abschlagsrechnungen",
})
for await (const doc of linkedDocuments.filter(i => i.type === "advanceInvoices")) { for await (const doc of linkedDocuments.filter(i => i.type === "advanceInvoices")) {
itemInfo.value.rows.push({ itemInfo.value.rows.push({
mode: "free", mode: "free",
@@ -1311,7 +1328,7 @@ const saveDocument = async (state,resetup = false) => {
let createData = { let createData = {
type: itemInfo.value.type, 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", state: itemInfo.value.state || "Entwurf",
customer: itemInfo.value.customer, customer: itemInfo.value.customer,
contact: itemInfo.value.contact, contact: itemInfo.value.contact,
@@ -2809,7 +2826,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
</UButton> </UButton>
</InputGroup> </InputGroup>
<UDivider <!-- <UDivider
class="mt-5 mb-3" class="mt-5 mb-3"
v-if="openAdvanceInvoices.length > 0 || itemInfo.usedAdvanceInvoices.length > 0" v-if="openAdvanceInvoices.length > 0 || itemInfo.usedAdvanceInvoices.length > 0"
> >
@@ -2840,7 +2857,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
X X
</UButton> </UButton>
</InputGroup> </InputGroup>
</div> </div>-->
<UDivider class="my-3" v-if="Object.keys(documentTotal.titleSums).length > 0">Überschriften</UDivider> <UDivider class="my-3" v-if="Object.keys(documentTotal.titleSums).length > 0">Überschriften</UDivider>