KI-AGENT: Positive Kontobuchungen mit BWA-Ausgaben verrechnen
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 21s
Build and Push Docker Images / build-frontend (push) Successful in 1m10s
Build and Push Docker Images / build-website (push) Successful in 22s
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 21s
Build and Push Docker Images / build-docs (push) Successful in 1m20s

This commit is contained in:
2026-09-07 20:50:24 +02:00
parent e4fcd79c8e
commit b89fdedeae
3 changed files with 23 additions and 19 deletions

View File

@@ -301,14 +301,20 @@ export const getIncomingInvoiceDepreciationRows = (invoice: any, rangeStart: any
.filter(Boolean)
}
export const getStatementAllocationImmediateExpenseAmount = (allocation: any) => {
export const getStatementAllocationImmediateExpenseImpact = (allocation: any) => {
const hasLinkedDocument = allocation?.incominginvoice || allocation?.createddocument || allocation?.ii_id || allocation?.cd_id
if (hasLinkedDocument) return 0
if (allocation?.account === null || allocation?.account === undefined) return 0
const mode = normalizeExpenseBookingMode(allocation?.bookingMode)
const amount = Number(allocation?.amount || 0)
if (mode !== "expense" || amount >= 0) return 0
return Number(Math.abs(amount).toFixed(2))
if (mode !== "expense") return 0
return Number((-amount).toFixed(2))
}
export const getStatementAllocationImmediateExpenseAmount = (allocation: any) => {
return Math.max(0, getStatementAllocationImmediateExpenseImpact(allocation))
}
export const getStatementAllocationDepreciationAmount = (allocation: any, rangeStart: any, rangeEnd: any) => {