diff --git a/frontend/pages/createDocument/edit/[[id]].vue b/frontend/pages/createDocument/edit/[[id]].vue index 85af0cb..24f74ed 100644 --- a/frontend/pages/createDocument/edit/[[id]].vue +++ b/frontend/pages/createDocument/edit/[[id]].vue @@ -204,7 +204,8 @@ const setupPage = async () => { processDieselPosition() } - } else if (route.query.loadMode === "finalInvoice") { + } + else if (route.query.loadMode === "finalInvoice") { let linkedDocuments = (await useEntities("createddocuments").select()).filter(i => JSON.parse(route.query.linkedDocuments).includes(i.id)) //TODO: Implement Checking for Same Customer, Contact and Project @@ -355,6 +356,8 @@ const setupPage = async () => { } + await setCustomerData(null, true) + } @@ -459,7 +462,11 @@ const setCustomerData = async (customerId, loadOnlyAdress = false) => { let customer = customers.value.find(i => i.id === itemInfo.value.customer) console.log(customer) - itemInfo.value.contact = null + if(!loadOnlyAdress) { + itemInfo.value.contact = null + } + + if (customer) { itemInfo.value.address.street = customer.infoData.street itemInfo.value.address.zip = customer.infoData.zip @@ -2057,7 +2064,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = { > { E-Mail