due date exists.
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
{:venia/queries [[:invoice_page
|
||||
(assoc params
|
||||
:client-id (:id @(re-frame/subscribe [::subs/client])))
|
||||
[[:invoices [:id :total :outstanding-balance :invoice-number :date :status :client-identifier
|
||||
[[: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 ]]]]
|
||||
@@ -108,6 +108,12 @@
|
||||
:sort-by sort-by
|
||||
:asc asc}
|
||||
"Date"]
|
||||
[sorted-column {:on-sort opc
|
||||
:style {:width "8em" :cursor "pointer"}
|
||||
:sort-key "due"
|
||||
:sort-by sort-by
|
||||
:asc asc}
|
||||
"Due"]
|
||||
[sorted-column {:on-sort opc
|
||||
:style {:width "5em" :cursor "pointer"}
|
||||
:sort-key "location"
|
||||
@@ -143,7 +149,7 @@
|
||||
[:td {:col-span 5}
|
||||
[:i.fa.fa-spin.fa-spinner]]]
|
||||
|
||||
(for [{:keys [client payments expense-accounts invoice-number date total outstanding-balance id vendor] :as i} (:invoices @invoice-page)]
|
||||
(for [{:keys [client payments expense-accounts invoice-number date due total outstanding-balance id vendor] :as i} (:invoices @invoice-page)]
|
||||
^{:key id}
|
||||
[:tr {:class (:class i)}
|
||||
(when check-boxes
|
||||
@@ -161,6 +167,7 @@
|
||||
[:td (:name vendor)]
|
||||
[:td invoice-number]
|
||||
[:td (date->str date) ]
|
||||
[:td (date->str due) ]
|
||||
[:td (str/join ", " (set (map :location expense-accounts)))]
|
||||
|
||||
[:td.has-text-right (nf total )]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(ns auto-ap.views.pages.invoices.common)
|
||||
|
||||
(def invoice-read [:id :total :outstanding-balance :date :invoice-number :status
|
||||
(def invoice-read [:id :total :outstanding-balance :date :due :invoice-number :status
|
||||
[:client [:id :name :locations]]
|
||||
[:payments [:amount [:payment [:amount :s3_url :check_number ]]]]
|
||||
[:vendor [:id :name]]
|
||||
|
||||
@@ -80,7 +80,6 @@
|
||||
(re-frame/reg-event-db
|
||||
::invoice-updated
|
||||
(fn [db [_ invoice]]
|
||||
(println "HERE")
|
||||
(update-in db
|
||||
[::invoice-page :invoices]
|
||||
replace-by :id (assoc invoice :class "live-added"))))
|
||||
@@ -699,10 +698,6 @@
|
||||
:on-check-changed (fn [which invoice]
|
||||
(re-frame/dispatch [::toggle-check which invoice]))
|
||||
:expense-event [::expense-accounts-dialog/change-expense-accounts]}]
|
||||
|
||||
|
||||
|
||||
|
||||
]))
|
||||
:component-will-mount #(re-frame/dispatch-sync [::params-change params]) }))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user