@@ -204,7 +204,8 @@ const setupPage = async () => {
|
|||||||
processDieselPosition()
|
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))
|
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
|
//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)
|
let customer = customers.value.find(i => i.id === itemInfo.value.customer)
|
||||||
console.log(customer)
|
console.log(customer)
|
||||||
itemInfo.value.contact = null
|
if(!loadOnlyAdress) {
|
||||||
|
itemInfo.value.contact = null
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (customer) {
|
if (customer) {
|
||||||
itemInfo.value.address.street = customer.infoData.street
|
itemInfo.value.address.street = customer.infoData.street
|
||||||
itemInfo.value.address.zip = customer.infoData.zip
|
itemInfo.value.address.zip = customer.infoData.zip
|
||||||
@@ -2057,7 +2064,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
>
|
>
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
:options="plants.filter(i => i.customer === itemInfo.customer)"
|
:options="plants.filter(i => i.customer?.id === itemInfo.customer)"
|
||||||
v-model="itemInfo.plant"
|
v-model="itemInfo.plant"
|
||||||
value-attribute="id"
|
value-attribute="id"
|
||||||
option-attribute="name"
|
option-attribute="name"
|
||||||
@@ -2095,7 +2102,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
>
|
>
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<USelectMenu
|
<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"
|
v-model="itemInfo.project"
|
||||||
value-attribute="id"
|
value-attribute="id"
|
||||||
option-attribute="name"
|
option-attribute="name"
|
||||||
@@ -2134,7 +2141,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
>
|
>
|
||||||
<InputGroup>
|
<InputGroup>
|
||||||
<USelectMenu
|
<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"
|
v-model="itemInfo.contract"
|
||||||
value-attribute="id"
|
value-attribute="id"
|
||||||
option-attribute="name"
|
option-attribute="name"
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ const openBankstatements = () => {
|
|||||||
E-Mail
|
E-Mail
|
||||||
</UButton>
|
</UButton>
|
||||||
<UButton
|
<UButton
|
||||||
@click="router.push(`/createDocument/edit/?linkedDocument=${itemInfo.id}&loadMode=storno`)"
|
@click="router.push(`/createDocument/edit/?createddocument=${itemInfo.id}&loadMode=storno`)"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
color="rose"
|
color="rose"
|
||||||
v-if="itemInfo.type === 'invoices' || itemInfo.type === 'advanceInvoices'"
|
v-if="itemInfo.type === 'invoices' || itemInfo.type === 'advanceInvoices'"
|
||||||
|
|||||||
Reference in New Issue
Block a user