fix: cashbox count returning null
This commit is contained in:
parent
43118f712d
commit
2e15d576cb
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ const unresponsiveStatus = { label: 'Unresponsive', type: 'error' }
|
||||||
const stuckStatus = { label: 'Stuck', type: 'error' }
|
const stuckStatus = { label: 'Stuck', type: 'error' }
|
||||||
|
|
||||||
const MACHINE_WITH_CALCULATED_FIELD_SQL = `
|
const MACHINE_WITH_CALCULATED_FIELD_SQL = `
|
||||||
select d.*, emptybills + regularbills as cashbox from devices d
|
select d.*, COALESCE(emptybills, 0) + COALESCE(regularbills, 0) as cashbox from devices d
|
||||||
left join (
|
left join (
|
||||||
select count(*) as emptyBills, eub.device_id
|
select count(*) as emptyBills, eub.device_id
|
||||||
from empty_unit_bills eub
|
from empty_unit_bills eub
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue