diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue index d93a123..b5e7caf 100644 --- a/pages/createDocument/edit/[[id]].vue +++ b/pages/createDocument/edit/[[id]].vue @@ -74,6 +74,7 @@ const servicecategories = ref([]) const selectedServicecategorie = ref(null) const customers = ref([]) const contacts = ref([]) +const contracts = ref([]) const texttemplates = ref([]) const units = ref([]) const tenantUsers = ref([]) @@ -89,6 +90,7 @@ const setupData = async () => { productcategories.value = await useEntities("productcategories").select("*") customers.value = await useEntities("customers").select("*", "customerNumber") contacts.value = await useEntities("contacts").select("*") + contracts.value = await useEntities("contracts").select("*") texttemplates.value = await useEntities("texttemplates").select("*") units.value = await useEntities("units").selectSpecial("*") tenantUsers.value = (await useNuxtApp().$api(`/api/tenant/users`, { @@ -1158,6 +1160,10 @@ const getDocumentData = async () => { ...itemInfo.value.project ? [{ label: "Projekt", content: projects.value.find(i => i.id === itemInfo.value.project).name + }] : [], + ...itemInfo.value.contract ? [{ + label: "Vertrag", + content: contracts.value.find(i => i.id === itemInfo.value.contract).contractNumber }] : [] ], title: itemInfo.value.title, @@ -1259,6 +1265,7 @@ const saveSerialInvoice = async () => { state: 'Erstellt', customer: itemInfo.value.customer, contact: itemInfo.value.contact, + contract: itemInfo.value.contract, address: itemInfo.value.address, project: itemInfo.value.project, paymentDays: itemInfo.value.paymentDays, @@ -1342,6 +1349,7 @@ const saveDocument = async (state, resetup = false) => { state: itemInfo.value.state || "Entwurf", customer: itemInfo.value.customer, contact: itemInfo.value.contact, + contract: itemInfo.value.contract, address: itemInfo.value.address, project: itemInfo.value.project, plant: itemInfo.value.plant, @@ -2097,6 +2105,45 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = { + + + + + + + + + + +