brmbar-cli userlog

This commit is contained in:
brmbar 2016-01-10 21:03:59 +01:00
parent 0e306912d7
commit a9e72d736c
2 changed files with 11 additions and 3 deletions

View file

@ -107,8 +107,7 @@ CREATE VIEW transaction_nicesplits AS
FROM transaction_splits AS ts LEFT JOIN accounts AS a ON a.id = ts.account
ORDER BY ts.id;
-- List transactions with summary information regarding their cash element
-- (except in case of transfers between cash and debt accounts, which will cancel out).
-- List transactions with summary information regarding their cash element.
CREATE VIEW transaction_cashsums AS
SELECT t.id AS id, t.time AS time, SUM(credit_cash) AS cash_credit, SUM(debit_cash) AS cash_debit, t.description AS description
FROM transactions AS t
@ -124,4 +123,4 @@ CREATE VIEW transaction_cashsums AS
WHERE a.currency = (SELECT currency FROM accounts WHERE name = 'BrmBar Cash')
AND a.acctype IN ('cash', 'debt')
AND dts.amount > 0) debit ON dts_t = t.id
GROUP BY t.id ORDER BY t.id;
GROUP BY t.id ORDER BY t.id DESC;