Updating to include extra fields.

This commit is contained in:
BC
2019-02-02 17:13:22 -08:00
parent 7662569111
commit a257468b75
6 changed files with 12 additions and 11 deletions

View File

@@ -22,7 +22,7 @@
(def default-read '(pull ?e [*
{:invoice-payment/_payment [* {:invoice-payment/invoice [*]}]}
{:payment/client [:client/name :db/id]}
{:payment/client [:client/name :db/id :client/code]}
{:payment/bank-account [*]}
{:payment/vendor [:vendor/name :vendor/default-expense-account :db/id {:vendor/primary-contact [*]} {:vendor/address [*]}]}
{:payment/status [:db/ident]}

View File

@@ -15,7 +15,7 @@
(reduce #(update-in %1 [:query :where] conj %2) query rest)))
(def default-read '(pull ?e [*
{:invoice/client [:client/name :db/id :client/locations]}
{:invoice/client [:client/name :db/id :client/locations :client/code]}
{:invoice/vendor [* {:vendor/address [*]}]}
{:invoice/status [:db/ident]}
{:invoice-payment/_invoice [* {:invoice-payment/payment [* {:payment/status [*]}

View File

@@ -112,8 +112,8 @@
true (apply-pagination args))))
(defn graphql-results [ids db args]
(->> (d/pull-many db '[* {:transaction/client [:client/name :db/id]
:transaction/bank-account [:bank-account/name :bank-account/yodlee-account-id :db/id]}]
(->> (d/pull-many db '[* {:transaction/client [:client/name :db/id :client/code]
:transaction/bank-account [:bank-account/name :bank-account/code :bank-account/yodlee-account-id :db/id]}]
ids)
(map #(update % :transaction/date c/from-date))
(map #(update % :transaction/post-date c/from-date))