checks are now stored
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
{:venia/queries [[:invoice_page
|
||||
(assoc params
|
||||
:company-id (:id @(re-frame/subscribe [::subs/company])))
|
||||
[[:invoices [:id :total :invoice-number :date [:vendor [:name :id]] [:company [:name :id]]]]
|
||||
[[:invoices [:id :total :invoice-number :date [:vendor [:name :id]] [:company [:name :id]] [:checks [:amount [:check [:amount :s3_url :check_number ]]]]]]
|
||||
:total
|
||||
:start
|
||||
:end]]]})
|
||||
@@ -44,41 +44,42 @@
|
||||
(when check-boxes
|
||||
[:th])
|
||||
[sorted-column {:on-sort opc
|
||||
:style {:width "25%" :cursor "pointer"}
|
||||
:style {:width "23%" :cursor "pointer"}
|
||||
:sort-key "vendor"
|
||||
:sort-by sort-by
|
||||
:asc asc}
|
||||
"Vendor"]
|
||||
[sorted-column {:on-sort opc
|
||||
:style {:width "25%" :cursor "pointer"}
|
||||
:style {:width "23%" :cursor "pointer"}
|
||||
:sort-key "company"
|
||||
:sort-by sort-by
|
||||
:asc asc}
|
||||
"Company"]
|
||||
[sorted-column {:on-sort opc
|
||||
:style {:width "18%" :cursor "pointer"}
|
||||
:style {:width "16%" :cursor "pointer"}
|
||||
:sort-key "invoice-number"
|
||||
:sort-by sort-by
|
||||
:asc asc}
|
||||
"Invoice #"]
|
||||
[sorted-column {:on-sort opc
|
||||
:style {:width "16%" :cursor "pointer"}
|
||||
:style {:width "14%" :cursor "pointer"}
|
||||
:sort-key "date"
|
||||
:sort-by sort-by
|
||||
:asc asc}
|
||||
"Date"]
|
||||
[sorted-column {:on-sort opc
|
||||
:style {:width "16%" :cursor "pointer"}
|
||||
:style {:width "14%" :cursor "pointer"}
|
||||
:sort-key "total"
|
||||
:sort-by sort-by
|
||||
:asc asc}
|
||||
"Amount"]]]
|
||||
"Amount"]
|
||||
[:th {:style {:width "10%"}} "" ]]]
|
||||
[:tbody
|
||||
(if (:loading @status)
|
||||
[:tr
|
||||
[:td {:col-span 5}
|
||||
[:i.fa.fa-spin.fa-spinner]]]
|
||||
(for [{:keys [company invoice-number date total id vendor] :as i} (:invoices @invoice-page)]
|
||||
(for [{:keys [company checks invoice-number date total id vendor] :as i} (:invoices @invoice-page)]
|
||||
^{:key id}
|
||||
[:tr
|
||||
(when check-boxes
|
||||
@@ -93,4 +94,7 @@
|
||||
[:td invoice-number]
|
||||
[:td (date->str date) ]
|
||||
|
||||
[:td (gstring/format "$%.2f" total )]]))]]]))))
|
||||
[:td (gstring/format "$%.2f" total )]
|
||||
[:td (for [check checks]
|
||||
^{:key (:id check)}
|
||||
[:a.tag {:href (:s3-url (:check check)) :target "_new"} (str "check " (:check-number (:check check)))])]]))]]]))))
|
||||
|
||||
Reference in New Issue
Block a user