diff --git a/src/clj/auto_ap/graphql.clj b/src/clj/auto_ap/graphql.clj index 50b28313..ad844674 100644 --- a/src/clj/auto_ap/graphql.clj +++ b/src/clj/auto_ap/graphql.clj @@ -150,6 +150,7 @@ :total {:type 'String} :outstanding_balance {:type 'String} :invoice_number {:type 'String} + :status {:type 'String} :expense_accounts {:type '(list :invoices_expense_accounts) :resolve :get-invoices-expense-accounts} :date {:type 'String} diff --git a/src/clj/auto_ap/routes/exports.clj b/src/clj/auto_ap/routes/exports.clj index 30823ab1..5bcb76c4 100644 --- a/src/clj/auto_ap/routes/exports.clj +++ b/src/clj/auto_ap/routes/exports.clj @@ -25,10 +25,9 @@ (GET "/invoices/export" {:keys [query-params identity] :as request} (assert-admin identity) (let [query [[:all_invoices - {:company-id (query-params "company") - :statuses ["unpaid" "paid"]} + {:company-id (query-params "company")} - [:id :total :outstanding-balance :invoice-number :date + [:id :total :outstanding-balance :invoice-number :date :status [:checks [:amount [:check [:check-number :memo [:bank_account [:id :number :bank-name :bank-code]]]]]] [:vendor [:name :id :primary_contact [:address [:street1 :city :state :zip]]]] [:expense_accounts [:amount :id :expense_account_id :location @@ -39,9 +38,8 @@ (GET "/checks/export" {:keys [query-params identity]} (assert-admin identity) (let [query [[:all_checks - {:company-id (query-params "company") - :statuses ["pending" "cleared"]} - [:id :check-number :amount :memo :date + {:company-id (query-params "company")} + [:id :check-number :amount :memo :date :status [:invoices [:invoice-id :amount]] [:bank-account [:number :bank-name :bank-code :id]] [:vendor [:name :id :primary-contact :primary-email :primary-phone :default-expense-account [:address [:street1 :city :state :zip]]]]