customized transactions.

This commit is contained in:
Bryce Covert
2020-04-30 07:22:39 -07:00
parent 8043fb0b81
commit 4a6aeaab8f
18 changed files with 184 additions and 126 deletions

View File

@@ -49,7 +49,7 @@
[[:invoices [:id :total :outstanding-balance :invoice-number :date :due :status :client-identifier
[:vendor [:name :id]]
[:expense_accounts [:amount :id :location
[:account [:id :name :numeric-code :location ]]]]
[:account [:id ]]]]
[:client [:name :id :locations]]
[:payments [:amount :id [:payment [:id :status :amount :s3_url :check_number
[:transaction [:post_date]]]]]]]]
@@ -70,7 +70,9 @@
:dispatch [:auto-ap.views.pages.unpaid-invoices/params-change]}))
(defn row [{:keys [invoice check-boxes checked on-check-changed selected-client overrides expense-event on-edit-invoice on-void-invoice on-unvoid-invoice]}]
(let [{:keys [client payments expense-accounts invoice-number date due total outstanding-balance id vendor] :as i} invoice]
(let [{:keys [client payments expense-accounts invoice-number date due total outstanding-balance id vendor] :as i} invoice
accounts-by-id @(re-frame/subscribe [::subs/accounts-by-id client])
account->name #(:name (accounts-by-id (:id %)))]
[:tr {:class (:class i)}
(when check-boxes
[:td [:input.checkbox {:type "checkbox"
@@ -104,7 +106,7 @@
[:div
(for [e expense-accounts]
^{:key (:id e)}
[:span.dropdown-item (:name (:account e)) " " (gstring/format "$%.2f" (:amount e) ) ])
[:span.dropdown-item (account->name (:account e)) " " (gstring/format "$%.2f" (:amount e) ) ])
[:hr.dropdown-divider]