Fix #47
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 18s
Build and Push Docker Images / build-frontend (push) Successful in 6m2s

Fix #19
Fix Adresse laden bei Dokument kopieren
This commit is contained in:
2026-01-12 18:33:08 +01:00
parent b39a52fb20
commit 905f2e7bf4
2 changed files with 13 additions and 6 deletions

View File

@@ -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 = {
>
<InputGroup>
<USelectMenu
:options="plants.filter(i => i.customer === itemInfo.customer)"
:options="plants.filter(i => i.customer?.id === itemInfo.customer)"
v-model="itemInfo.plant"
value-attribute="id"
option-attribute="name"
@@ -2095,7 +2102,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
>
<InputGroup>
<USelectMenu
:options="projects.filter(i => i.customer === itemInfo.customer && (itemInfo.plant ? itemInfo.plant === i.plant : true))"
:options="projects.filter(i => i.customer?.id === itemInfo.customer && (itemInfo.plant ? itemInfo.plant === i.plant : true))"
v-model="itemInfo.project"
value-attribute="id"
option-attribute="name"
@@ -2134,7 +2141,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
>
<InputGroup>
<USelectMenu
:options="contracts.filter(i => i.customer === itemInfo.customer && (itemInfo.plant ? itemInfo.plant === i.plant : true))"
:options="contracts.filter(i => i.customer?.id === itemInfo.customer && (itemInfo.plant ? itemInfo.plant === i.plant : true))"
v-model="itemInfo.contract"
value-attribute="id"
option-attribute="name"

View File

@@ -81,7 +81,7 @@ const openBankstatements = () => {
E-Mail
</UButton>
<UButton
@click="router.push(`/createDocument/edit/?linkedDocument=${itemInfo.id}&loadMode=storno`)"
@click="router.push(`/createDocument/edit/?createddocument=${itemInfo.id}&loadMode=storno`)"
variant="outline"
color="rose"
v-if="itemInfo.type === 'invoices' || itemInfo.type === 'advanceInvoices'"