Merge pull request 'Fix: importierte Belege haben kein Belegdatum und werden so nicht angezeigt' (#30) from fds2610-bot/Steuerkram:main into main

Reviewed-on: https://codeberg.org/fds2610/Steuerkram/pulls/30
This commit is contained in:
fds2610 2026-04-11 19:40:54 +02:00
commit cf5105378c

View file

@ -19,11 +19,11 @@ class Beleg
$params = array_merge($params, [$s, $s, $s, $s]);
}
if (!empty($filter['year'])) {
$where[] = 'YEAR(b.beleg_datum) = ?';
$where[] = '(YEAR(b.beleg_datum) = ? OR b.beleg_datum IS NULL)';
$params[] = (int)$filter['year'];
}
if (!empty($filter['month'])) {
$where[] = 'MONTH(b.beleg_datum) = ?';
$where[] = '(MONTH(b.beleg_datum) = ? OR b.beleg_datum IS NULL)';
$params[] = (int)$filter['month'];
}
if (isset($filter['booked']) && $filter['booked'] !== '') {