fix: add fiat filter to cash in txs

This commit is contained in:
José Oliveira 2021-07-23 18:11:07 +01:00 committed by Josh Harvey
parent 56fc312520
commit 1ff386826f

View file

@ -69,6 +69,7 @@ function customerHistory (customerId, thresholdDays) {
FROM cash_in_txs txIn
WHERE txIn.customer_id = $1
AND txIn.created > now() - interval $2
AND fiat > 0
UNION
SELECT txOut.id, txOut.created, txOut.fiat, 'cashOut' AS direction
FROM cash_out_txs txOut