Added Errors to IncomingInvoices

Added Vorbereitet to IncomingInvoices
This commit is contained in:
2025-06-30 13:45:06 +02:00
parent 93d0f97a56
commit ff6ee91075
4 changed files with 85 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ let unpaidOverdueInvoicesCount = ref(0)
let draftInvoicesSum = ref(0)
let draftInvoicesCount = ref(0)
let countUnfinishedOpenIncomingInvoices = ref(0)
let countPreparedOpenIncomingInvoices = ref(0)
const setupPage = async () => {
let items = (await useSupabaseSelect("createddocuments","*, statementallocations(*), customer(id,name), linkedDocument(*)")).filter(i => !i.archived)
@@ -45,8 +45,7 @@ const setupPage = async () => {
})
draftInvoicesCount.value = draftDocuments.length
let filetype = (await supabase.from("filetags").select().eq("tenant",profileStore.currentTenant).eq("incomingDocumentType","invoices").single()).data.id
countUnfinishedOpenIncomingInvoices.value = (await supabase.from("files").select("id").eq("tenant",profileStore.currentTenant).eq("type", filetype).is("incominginvoice",null)).data.length
countPreparedOpenIncomingInvoices.value = (await supabase.from("incominginvoices").select("id").eq("tenant",profileStore.currentTenant).eq("state", "Vorbereitet")).data.length
}
@@ -84,9 +83,9 @@ setupPage()
<tr>
<td class="break-all">ToDo Eingangsrechnungsrechnungen:</td>
<td
v-if="countUnfinishedOpenIncomingInvoices > 0"
v-if="countPreparedOpenIncomingInvoices > 0"
class="text-orange-500 font-bold text-nowrap"
>{{countUnfinishedOpenIncomingInvoices}} Stk </td>
>{{countPreparedOpenIncomingInvoices}} Stk </td>
<td v-else class="text-primary-500 font-bold text-no-wrap">0 Stk</td>
</tr>
</table>