Merge pull request #1909 from siiky/fix/lam-1489/include-re-paired-machine-bills
LAM-1489 fix: includes bills from re-paired machines
This commit is contained in:
commit
7ed9b88ccd
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ const getBills = filters => {
|
||||||
FROM cash_in_txs
|
FROM cash_in_txs
|
||||||
WHERE ${AND(
|
WHERE ${AND(
|
||||||
deviceIDCondition,
|
deviceIDCondition,
|
||||||
'device_id NOT IN (SELECT device_id FROM unpaired_devices)',
|
'device_id IN (SELECT device_id FROM devices WHERE paired)',
|
||||||
)}
|
)}
|
||||||
) AS cit
|
) AS cit
|
||||||
ON cit.id = b.cash_in_txs_id
|
ON cit.id = b.cash_in_txs_id
|
||||||
|
|
@ -46,7 +46,7 @@ const getBills = filters => {
|
||||||
WHERE ${AND(
|
WHERE ${AND(
|
||||||
deviceIDCondition,
|
deviceIDCondition,
|
||||||
batchIDCondition,
|
batchIDCondition,
|
||||||
'b.device_id NOT IN (SELECT device_id FROM unpaired_devices)',
|
'b.device_id IN (SELECT device_id FROM devices WHERE paired)',
|
||||||
)}`
|
)}`
|
||||||
|
|
||||||
return Promise.all([db.any(cashboxBills), db.any(recyclerBills)]).then(
|
return Promise.all([db.any(cashboxBills), db.any(recyclerBills)]).then(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue