lots of changes to make ledger actually visible.

This commit is contained in:
Bryce Covert
2019-04-11 19:41:41 -07:00
parent d335055de8
commit 9549afb3ef
15 changed files with 454 additions and 55 deletions

View File

@@ -17,6 +17,7 @@
[auto-ap.datomic.invoices :as d-invoices]
[auto-ap.datomic.vendors :as d-vendors]
[auto-ap.graphql.users :as gq-users]
[auto-ap.graphql.ledger :as gq-ledger]
[auto-ap.graphql.accounts :as gq-accounts]
[auto-ap.graphql.clients :as gq-clients]
[auto-ap.graphql.vendors :as gq-vendors]
@@ -92,9 +93,22 @@
:scheduled {:type 'String}
:sent {:type 'String}
:vendor {:type :vendor}
}
}
}}
:journal_entry_line
{:fields {:id {:type :id}
:account {:type :account}
:location {:type 'String}
:debit {:type 'String}
:credit {:type 'String}}}
:journal_entry
{:fields {:id {:type :id}
:source {:type 'String}
:amount {:type 'String}
:client {:type :client}
:vendor {:type :vendor}
:date {:type 'String}
:line_items {:type '(list :journal_entry_line)}}}
:check {:fields {:id {:type :id}
@@ -209,6 +223,12 @@
:start {:type 'Int}
:end {:type 'Int}}}
:ledger_page {:fields {:journal_entries {:type '(list :journal_entry)}
:count {:type 'Int}
:total {:type 'Int}
:start {:type 'Int}
:end {:type 'Int}}}
:reminder_page {:fields {:reminders {:type '(list :reminder)}
:count {:type 'Int}
:total {:type 'Int}
@@ -275,6 +295,15 @@
:resolve :get-transaction-page}
:ledger_page {:type :ledger_page
:args {:client_id {:type :id}
:bank_account_id {:type :id}
:start {:type 'Int}
:sort_by {:type 'String}
:asc {:type 'Boolean}}
:resolve :get-ledger-page}
:payment_page {:type '(list :payment_page)
:args {:client_id {:type :id}
:vendor_id {:type :id}
@@ -582,6 +611,7 @@
:get-payment-page gq-checks/get-payment-page
:get-accounts gq-accounts/get-accounts
:get-transaction-page gq-transactions/get-transaction-page
:get-ledger-page gq-ledger/get-ledger-page
:get-expense-account-stats get-expense-account-stats
:get-invoice-stats get-invoice-stats
@@ -647,4 +677,4 @@
(throw e)))))
#_(query nil "{ accounts(account_set: \"default\") { numeric_code, name }}" nil)
#_(query nil "{ ledger_page { count }}" nil)