From 6fceee5a07d3aa0bf68dd8e812df23a760d070c5 Mon Sep 17 00:00:00 2001 From: Bastian Wagner Date: Tue, 4 Aug 2026 12:26:23 +0200 Subject: [PATCH] feat: wire receivables into manual and recurring cashbox PDF export Both the manual download endpoint and the recurring email subscription now pass buildReceivableRows() output into buildPdf, so every PDF report includes the Forderungen section regardless of how it was generated. Co-Authored-By: Claude Sonnet 5 --- .../src/cashbox-export/cashbox-export.scheduler.ts | 5 +++-- .../src/cashbox-export/cashbox-export.service.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/myteamwallet_backend/src/cashbox-export/cashbox-export.scheduler.ts b/myteamwallet_backend/src/cashbox-export/cashbox-export.scheduler.ts index f458082..0fef051 100644 --- a/myteamwallet_backend/src/cashbox-export/cashbox-export.scheduler.ts +++ b/myteamwallet_backend/src/cashbox-export/cashbox-export.scheduler.ts @@ -6,7 +6,7 @@ import { Team } from 'src/teams/entities/team.entity'; import { MailService } from 'src/mail/mail.service'; import { LessThanOrEqual, Repository } from 'typeorm'; import { RecurringTransactionIntervalEnum } from 'src/recurring-transactions/recurring-transaction-interval.enum'; -import { buildPdf, buildRows } from './cashbox-export.utils'; +import { buildPdf, buildReceivableRows, buildRows } from './cashbox-export.utils'; import { CashboxExportSubscription } from './entities/cashbox-export-subscription.entity'; const INTERVAL_MONTHS: Record = { @@ -57,7 +57,8 @@ export class CashboxExportScheduler { const { from, to } = this.periodBounds(subscription.nextRunDate, subscription.interval); const rows = buildRows(team, from, to); - const pdf = await buildPdf(team, rows, from, to); + const receivableRows = buildReceivableRows(team, from, to); + const pdf = await buildPdf(team, rows, receivableRows, from, to); const filename = `kassenbuch_${team.alias}_${from}_${to}.pdf`; await this.mailService.cashboxExport( diff --git a/myteamwallet_backend/src/cashbox-export/cashbox-export.service.ts b/myteamwallet_backend/src/cashbox-export/cashbox-export.service.ts index 7a1c75d..c97bea7 100644 --- a/myteamwallet_backend/src/cashbox-export/cashbox-export.service.ts +++ b/myteamwallet_backend/src/cashbox-export/cashbox-export.service.ts @@ -5,7 +5,7 @@ import { TeamRolesEnum } from 'src/team-roles/team-roles.enum'; import { Team } from 'src/teams/entities/team.entity'; import { TeamAccessService } from 'src/teams/team-access.service'; import { Repository } from 'typeorm'; -import { buildCsv, buildPdf, buildRows } from './cashbox-export.utils'; +import { buildCsv, buildPdf, buildReceivableRows, buildRows } from './cashbox-export.utils'; @Injectable() export class CashboxExportService { @@ -56,7 +56,7 @@ export class CashboxExportService { return result; } const result = { - buffer: await buildPdf(team, rows, from, to), + buffer: await buildPdf(team, rows, buildReceivableRows(team, from, to), from, to), contentType: 'application/pdf', filename: `kassenbuch_${team.alias}_${from}_${to}.pdf`, };