Added Button for DeliveryNote Invoicing
This commit is contained in:
@@ -109,7 +109,7 @@ const setupPage = async() => {
|
|||||||
projecttypes.value = await useSupabaseSelect("projecttypes", "*", "id")
|
projecttypes.value = await useSupabaseSelect("projecttypes", "*", "id")
|
||||||
|
|
||||||
if(mode.value === "show" ){
|
if(mode.value === "show" ){
|
||||||
itemInfo.value = await useSupabaseSelectSingle("projects",route.params.id,"*, customer(*), plant(*)")
|
itemInfo.value = await useSupabaseSelectSingle("projects",route.params.id,"*, customer(*), plant(*), createddocuments(*)")
|
||||||
} else if (mode.value === "edit") {
|
} else if (mode.value === "edit") {
|
||||||
itemInfo.value = await useSupabaseSelectSingle("projects",route.params.id,"*")
|
itemInfo.value = await useSupabaseSelectSingle("projects",route.params.id,"*")
|
||||||
}
|
}
|
||||||
@@ -232,6 +232,10 @@ const renderedPhases = computed(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const invoiceDeliveryNotes = () => {
|
||||||
|
router.push(`/createDocument/edit?type=invoices&linkedDocuments=[${itemInfo.value.createddocuments.filter(i => i.type === "deliveryNotes").map(i => i.id)}]`)
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -422,10 +426,16 @@ const renderedPhases = computed(() => {
|
|||||||
>
|
>
|
||||||
+ Dokument
|
+ Dokument
|
||||||
</UButton>
|
</UButton>
|
||||||
|
<UButton
|
||||||
|
@click="invoiceDeliveryNotes"
|
||||||
|
>
|
||||||
|
Lieferscheine abrechnen
|
||||||
|
</UButton>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
|
|
||||||
|
|
||||||
<UTable
|
<UTable
|
||||||
:rows="dataStore.getCreatedDocumentsByProject(itemInfo.id)"
|
:rows="itemInfo.createddocuments"
|
||||||
:columns="[
|
:columns="[
|
||||||
{
|
{
|
||||||
label: 'Typ',
|
label: 'Typ',
|
||||||
|
|||||||
Reference in New Issue
Block a user