Changed Colors
Added IncomingInvoicesUnfinishedCount
This commit is contained in:
@@ -31,7 +31,7 @@ const calculateOpenSum = (statement) => {
|
||||
<tr>
|
||||
<td colspan="2">Nicht zugewiesene Bankbuchungen:</td>
|
||||
<td>
|
||||
<span v-if="unallocatedStatements > 0" class="text-rose-600 font-bold">{{unallocatedStatements}}</span>
|
||||
<span v-if="unallocatedStatements > 0" class="text-orange-500 font-bold">{{unallocatedStatements}}</span>
|
||||
<span v-else class="text-primary-500 font-bold">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -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()
|
||||
<td>Angelegte Rechnungsentwürfe:</td>
|
||||
<td
|
||||
v-if="draftInvoicesSum > 0"
|
||||
class="text-rose-600 font-bold text-nowrap"
|
||||
class="text-orange-500 font-bold text-nowrap"
|
||||
>{{draftInvoicesCount}} Stk /<br> {{useCurrency(draftInvoicesSum)}}</td>
|
||||
<td v-else class="text-primary-500 font-bold text-no-wrap">0 Stk / 0,00€</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ToDo Eingangsrechnungsrechnungen:</td>
|
||||
<td
|
||||
v-if="countUnfinishedOpenIncomingInvoices > 0"
|
||||
class="text-orange-500 font-bold text-nowrap"
|
||||
>{{countUnfinishedOpenIncomingInvoices}} Stk </td>
|
||||
<td v-else class="text-primary-500 font-bold text-no-wrap">0 Stk</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user