Fix: importierte Belege haben kein Belegdatum und werden so nicht angezeigt

This commit is contained in:
fds2610-bot 2026-04-11 19:38:09 +02:00
parent fc317775a3
commit 027bd9c46f

View file

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