diff --git a/components/displayBankaccounts.vue b/components/displayBankaccounts.vue
index 5ae7464..147bd71 100644
--- a/components/displayBankaccounts.vue
+++ b/components/displayBankaccounts.vue
@@ -31,7 +31,7 @@ const calculateOpenSum = (statement) => {
| Nicht zugewiesene Bankbuchungen: |
- {{unallocatedStatements}}
+ {{unallocatedStatements}}
0
|
diff --git a/components/displayOpenBalances.vue b/components/displayOpenBalances.vue
index 9d8bda5..9b89048 100644
--- a/components/displayOpenBalances.vue
+++ b/components/displayOpenBalances.vue
@@ -2,12 +2,18 @@
import dayjs from "dayjs";
+const profileStore = useProfileStore();
+const supabase = useSupabaseClient()
+
let unpaidInvoicesSum = ref(0)
let unpaidInvoicesCount = ref(0)
let unpaidOverdueInvoicesSum = ref(0)
let unpaidOverdueInvoicesCount = ref(0)
let draftInvoicesSum = ref(0)
let draftInvoicesCount = ref(0)
+
+let countUnfinishedOpenIncomingInvoices = ref(0)
+
const setupPage = async () => {
let documents = (await useSupabaseSelect("createddocuments","*, statementallocations(*), customer(id,name)")).filter(i => i.type === "invoices" ||i.type === "advanceInvoices"||i.type === "cancellationInvoices").filter(i => !i.archived)
@@ -33,6 +39,10 @@ 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
+
+
}
setupPage()
@@ -61,10 +71,18 @@ setupPage()
Angelegte Rechnungsentwürfe: |
{{draftInvoicesCount}} Stk / {{useCurrency(draftInvoicesSum)}} |
0 Stk / 0,00€ |
+
+ | ToDo Eingangsrechnungsrechnungen: |
+ {{countUnfinishedOpenIncomingInvoices}} Stk |
+ 0 Stk |
+