Replaced the non standard IFNULL function which postgres does not know with the COALSCE function

This commit is contained in:
Jan Böhmer 2024-06-13 23:01:53 +02:00
parent 33a5e70b70
commit c58ff5861d
3 changed files with 16 additions and 4 deletions

View file

@ -345,7 +345,7 @@ final class PartsDataTable implements DataTableTypeInterface
//Calculate amount sum using a subquery, so we can filter and sort by it
$builder->addSelect(
'(
SELECT IFNULL(SUM(partLot.amount), 0.0)
SELECT COALESCE(SUM(partLot.amount), 0.0)
FROM '.PartLot::class.' partLot
WHERE partLot.part = part.id
AND partLot.instock_unknown = false