KI-AGENT: Kassenbuch ins Bankportal integrieren

This commit is contained in:
2026-05-28 16:35:50 +02:00
parent 29a9e2b63b
commit b91c9d0fd8
2 changed files with 342 additions and 22 deletions

View File

@@ -285,6 +285,7 @@ export default async function bankingRoutes(server: FastifyInstance) {
const insertedStatements = await tx.insert(bankstatements).values({
account: cashbookId,
date: dayjs(body.date).format("YYYY-MM-DD"),
valueDate: dayjs(body.date).format("YYYY-MM-DD"),
amount: signedAmount,
tenant: req.user.tenant_id,
text: description,
@@ -687,7 +688,7 @@ export default async function bankingRoutes(server: FastifyInstance) {
if (matchesBankAccountId && matchesIban) {
score = 100
reason = "IBAN und hinterlegte Bankverbindung stimmen ueberein"
reason = "IBAN und hinterlegte Bankverbindung stimmen überein"
} else if (matchesBankAccountId) {
score = 95
reason = "Hinterlegte Bankverbindung passt zur IBAN"
@@ -699,7 +700,7 @@ export default async function bankingRoutes(server: FastifyInstance) {
reason = "Name passt exakt zur Buchung"
} else if (partialNameMatch) {
score = 45
reason = "Name aehnelt der Buchung"
reason = "Name ähnelt der Buchung"
}
if (!score) continue
@@ -743,7 +744,7 @@ export default async function bankingRoutes(server: FastifyInstance) {
if (matchesBankAccountId && matchesIban) {
score = 100
reason = "IBAN und hinterlegte Bankverbindung stimmen ueberein"
reason = "IBAN und hinterlegte Bankverbindung stimmen überein"
} else if (matchesBankAccountId) {
score = 95
reason = "Hinterlegte Bankverbindung passt zur IBAN"
@@ -755,7 +756,7 @@ export default async function bankingRoutes(server: FastifyInstance) {
reason = "Name passt exakt zur Buchung"
} else if (partialNameMatch) {
score = 45
reason = "Name aehnelt der Buchung"
reason = "Name ähnelt der Buchung"
}
if (!score) continue