KI-AGENT: BWA-Ausgaben nach Kontosaldo berechnen
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 23s
Build and Push Docker Images / build-frontend (push) Successful in 1m11s
Build and Push Docker Images / build-website (push) Successful in 23s
Build and Push Docker Images / build-central-services-api (push) Successful in 22s
Build and Push Docker Images / build-central-services-admin (push) Successful in 22s
Build and Push Docker Images / build-docs (push) Successful in 1m20s
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 23s
Build and Push Docker Images / build-frontend (push) Successful in 1m11s
Build and Push Docker Images / build-website (push) Successful in 23s
Build and Push Docker Images / build-central-services-api (push) Successful in 22s
Build and Push Docker Images / build-central-services-admin (push) Successful in 22s
Build and Push Docker Images / build-docs (push) Successful in 1m20s
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
getIncomingInvoiceDepreciationRows,
|
||||
getIncomingInvoiceImmediateExpenseNet,
|
||||
getStatementAllocationImmediateExpenseAmount,
|
||||
getStatementAllocationImmediateExpenseImpact
|
||||
getStatementAccountExpenseTotal
|
||||
} from "~/composables/useDepreciation"
|
||||
|
||||
const loading = ref(true)
|
||||
@@ -74,11 +74,19 @@ const loadSummary = async () => {
|
||||
})
|
||||
|
||||
const directAccountAllocations = (allocations || []).filter((allocation: any) => {
|
||||
const statementDate = allocation?.bankstatement?.date || allocation?.bankstatement?.valueDate || allocation?.date || allocation?.created_at
|
||||
const statementDate = allocation?.bankstatement?.date
|
||||
|| allocation?.bankstatement?.valueDate
|
||||
|| allocation?.date
|
||||
|| allocation?.manualBookingDate
|
||||
|| allocation?.created_at
|
||||
const date = dayjs(statementDate)
|
||||
const impact = getStatementAllocationImmediateExpenseImpact(allocation)
|
||||
const touchesAccount = (
|
||||
allocation?.account !== null && allocation?.account !== undefined
|
||||
) || (
|
||||
allocation?.contraAccount !== null && allocation?.contraAccount !== undefined
|
||||
)
|
||||
|
||||
return impact !== 0 && date.isValid() && !date.isBefore(bounds.start, "day") && !date.isAfter(bounds.end, "day")
|
||||
return touchesAccount && date.isValid() && !date.isBefore(bounds.start, "day") && !date.isAfter(bounds.end, "day")
|
||||
})
|
||||
|
||||
const income = outputDocs.reduce((sum: number, doc: any) => {
|
||||
@@ -99,9 +107,7 @@ const loadSummary = async () => {
|
||||
return sum + getIncomingInvoiceImmediateExpenseNet(invoice)
|
||||
}, 0)
|
||||
|
||||
const directAccountExpenses = directAccountAllocations.reduce((sum: number, allocation: any) => {
|
||||
return sum + Number(getStatementAllocationImmediateExpenseImpact(allocation) || 0)
|
||||
}, 0)
|
||||
const directAccountExpenses = getStatementAccountExpenseTotal(directAccountAllocations)
|
||||
|
||||
const depreciationRows = [
|
||||
...inputDocs.flatMap((invoice: any) => getIncomingInvoiceDepreciationRows(invoice, bounds.start, bounds.end))
|
||||
|
||||
Reference in New Issue
Block a user