handle negative due numbers when gathering existing cards

This commit is contained in:
Damien Elmes 2020-04-25 18:45:27 +10:00
parent bee0eb1264
commit 5ac3fb5514

View File

@ -17,8 +17,8 @@ select
when 0 then ( when 0 then (
case case
odue odue
when 0 then due when 0 then max(0, due)
else odue else max(odue, 0)
end end
) )
else null else null