bunch of small fixes. balance sheet has optional comparison and titles. trying to make payment unlinkable more easily.

This commit is contained in:
Bryce Covert
2020-12-17 07:42:19 -08:00
parent 1534175608
commit a9da35d7b9
4 changed files with 124 additions and 85 deletions

View File

@@ -180,10 +180,11 @@
comparable-date (coerce/to-date (time/minus (:date args) (time/years 1)))
all-ledger-entries (full-ledger-for-client client-id)
lookup-account (build-account-lookup client-id)]
(log/info "Running balance sheet with " args)
(->graphql
{:balance-sheet-accounts (roll-up-until lookup-account all-ledger-entries end-date)
:comparable-balance-sheet-accounts (roll-up-until lookup-account all-ledger-entries comparable-date)})))
(cond-> {:balance-sheet-accounts (roll-up-until lookup-account all-ledger-entries end-date)}
(:include_comparison args) (assoc :comparable-balance-sheet-accounts (roll-up-until lookup-account all-ledger-entries comparable-date))
true ->graphql)))
(defn get-profit-and-loss [context args value]
(let [client-id (:client_id args)