Changes
This commit is contained in:
@@ -17,7 +17,11 @@ const {vendors} = storeToRefs(useDataStore())
|
||||
const {fetchVendorInvoices} = useDataStore()
|
||||
|
||||
const availableDocuments = computed(() => {
|
||||
return dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung' /*&& dataStore.incominginvoices.filter(x => x.document === i).length === 0*/))
|
||||
|
||||
//console.log(dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung') && !dataStore.incominginvoices.find(x => x.document === i.id)))
|
||||
//console.log(dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung')).length)
|
||||
|
||||
return dataStore.documents.filter(i => i.tags.includes('Eingangsrechnung') && !dataStore.incominginvoices.find(x => x.document === i.id))
|
||||
})
|
||||
|
||||
|
||||
@@ -111,7 +115,7 @@ const totalCalculated = computed(() => {
|
||||
itemInfo.value.accounts.forEach(account => {
|
||||
if(account.amountNet) totalNet += account.amountNet
|
||||
|
||||
if(account.taxType === 19 && account.amountTax) {
|
||||
if(account.taxType === "19" && account.amountTax) {
|
||||
totalAmount19Tax += account.amountTax
|
||||
}
|
||||
})
|
||||
@@ -157,11 +161,11 @@ setupPage()
|
||||
</UButton>
|
||||
<UTooltip
|
||||
text="Bearbeiten ist nur im Entwurfsstatus möglich"
|
||||
v-if="mode !== 'edit'"
|
||||
>
|
||||
<UButton
|
||||
:disabled="itemInfo.state !== 'Entwurf'"
|
||||
@click="router.push(`/incominginvoices/edit/${itemInfo.id}`)"
|
||||
v-if="mode !== 'edit'"
|
||||
>
|
||||
Bearbeiten
|
||||
</UButton>
|
||||
@@ -210,9 +214,9 @@ setupPage()
|
||||
v-if="currentDocument ? currentDocument.url : false"
|
||||
:data="currentDocument.url + '#toolbar=0&navpanes=0&scrollbar=0&statusbar=0&messages=0&scrollbar=0'"
|
||||
type="application/pdf"
|
||||
class="mx-5 documentPreview"
|
||||
class="mx-5 documentPreview w-full"
|
||||
/>
|
||||
<div class="w-2/5 mx-5">
|
||||
<div class="w-3/5 mx-5">
|
||||
|
||||
<div v-if="mode === 'show'">
|
||||
|
||||
@@ -444,6 +448,7 @@ setupPage()
|
||||
</UInput>
|
||||
|
||||
</UFormGroup>
|
||||
{{item}}
|
||||
|
||||
|
||||
</InputGroup>
|
||||
@@ -451,7 +456,7 @@ setupPage()
|
||||
|
||||
<UButton
|
||||
class="mt-3"
|
||||
@click="itemInfo.accounts = [...itemInfo.accounts.slice(0,index+1),{account:null, amountNet: null, amountTax:null, taxType: null} , ...itemInfo.accounts.slice(index+1)]"
|
||||
@click="itemInfo.accounts = [...itemInfo.accounts.slice(0,index+1),{account:null, amountNet: null, amountTax:null, taxType: '19'} , ...itemInfo.accounts.slice(index+1)]"
|
||||
>
|
||||
Position hinzufügen
|
||||
</UButton>
|
||||
@@ -477,7 +482,6 @@ setupPage()
|
||||
|
||||
<style scoped>
|
||||
.documentPreview {
|
||||
width: 30vw;
|
||||
aspect-ratio: 1 / 1.414;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user