mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-08 05:14:00 +02:00
brmbar-cli userlog
This commit is contained in:
parent
0e306912d7
commit
a9e72d736c
2 changed files with 11 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue