adding transaction rules.

This commit is contained in:
Bryce Covert
2019-05-07 07:10:21 -07:00
parent 918f2e5be1
commit a1abb4b05e
15 changed files with 266 additions and 15 deletions

View File

@@ -24,6 +24,7 @@
[auto-ap.graphql.checks :as gq-checks]
[auto-ap.graphql.invoices :as gq-invoices]
[auto-ap.graphql.transactions :as gq-transactions]
[auto-ap.graphql.transaction-rules :as gq-transaction-rules]
[auto-ap.time :as time]
[clojure.walk :as walk]
[clojure.string :as str])
@@ -173,6 +174,17 @@
:bank_account {:type :bank_account}
:date {:type 'String}
:post_date {:type 'String}}}
:transaction_rule {:fields {:id {:type :id}
:note {:type 'String}
:client {:type :client}
:bank_account {:type :bank_account}
:yodlee_merchant {:type :yodlee_merchant}
:description {:type 'String}
:amount_lte {:type 'String}
:amount_gte {:type 'String}
:vendor {:type :vendor}}}
:invoice_payment
{:fields {:id {:type :id}
:amount {:type 'String}
@@ -237,6 +249,12 @@
:start {:type 'Int}
:end {:type 'Int}}}
:transaction_rule_page {:fields {:transaction_rules {:type '(list :transaction_rule)}
:count {:type 'Int}
:total {:type 'Int}
:start {:type 'Int}
:end {:type 'Int}}}
:ledger_page {:fields {:journal_entries {:type '(list :journal_entry)}
:count {:type 'Int}
:total {:type 'Int}
@@ -334,6 +352,13 @@
:resolve :get-transaction-page}
:transaction_rule_page {:type :transaction_rule_page
:args {:client_id {:type :id}
:start {:type 'Int}
:sort_by {:type 'String}
:asc {:type 'Boolean}}
:resolve :get-transaction-rule-page}
:ledger_page {:type :ledger_page
:args {:client_id {:type :id}
:bank_account_id {:type :id}
@@ -699,6 +724,7 @@
:get-ledger-page gq-ledger/get-ledger-page
:get-balance-sheet gq-ledger/get-balance-sheet
:get-profit-and-loss gq-ledger/get-profit-and-loss
:get-transaction-rule-page gq-transaction-rules/get-transaction-rule-page
:get-expense-account-stats get-expense-account-stats
:get-invoice-stats get-invoice-stats