@@ -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)
|
||||
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"
|
||||
|
||||
@@ -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'"
|
||||
|
||||
Reference in New Issue
Block a user