Merge pull request #999 from ubavic/fix/unpaired_machine_transactions
fix: transaction history of unpaired machine
This commit is contained in:
commit
242ba3ad19
1 changed files with 2 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ function batch (
|
||||||
((NOT txs.send_confirmed) AND (txs.created <= now() - interval $1)) AS expired
|
((NOT txs.send_confirmed) AND (txs.created <= now() - interval $1)) AS expired
|
||||||
FROM (SELECT *, ${cashInTx.TRANSACTION_STATES} AS txStatus FROM cash_in_txs) AS txs
|
FROM (SELECT *, ${cashInTx.TRANSACTION_STATES} AS txStatus FROM cash_in_txs) AS txs
|
||||||
LEFT OUTER JOIN customers c ON txs.customer_id = c.id
|
LEFT OUTER JOIN customers c ON txs.customer_id = c.id
|
||||||
INNER JOIN devices d ON txs.device_id = d.device_id
|
LEFT JOIN devices d ON txs.device_id = d.device_id
|
||||||
WHERE txs.created >= $2 AND txs.created <= $3 ${
|
WHERE txs.created >= $2 AND txs.created <= $3 ${
|
||||||
id !== null ? `AND txs.device_id = $6` : ``
|
id !== null ? `AND txs.device_id = $6` : ``
|
||||||
}
|
}
|
||||||
|
|
@ -87,7 +87,7 @@ function batch (
|
||||||
INNER JOIN cash_out_actions actions ON txs.id = actions.tx_id
|
INNER JOIN cash_out_actions actions ON txs.id = actions.tx_id
|
||||||
AND actions.action = 'provisionAddress'
|
AND actions.action = 'provisionAddress'
|
||||||
LEFT OUTER JOIN customers c ON txs.customer_id = c.id
|
LEFT OUTER JOIN customers c ON txs.customer_id = c.id
|
||||||
INNER JOIN devices d ON txs.device_id = d.device_id
|
LEFT JOIN devices d ON txs.device_id = d.device_id
|
||||||
WHERE txs.created >= $2 AND txs.created <= $3 ${
|
WHERE txs.created >= $2 AND txs.created <= $3 ${
|
||||||
id !== null ? `AND txs.device_id = $6` : ``
|
id !== null ? `AND txs.device_id = $6` : ``
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue