you can now create cash payments.

This commit is contained in:
Bryce Covert
2018-07-27 16:39:44 -07:00
parent 4a0f7d7f77
commit 4069f731e9
10 changed files with 75 additions and 32 deletions

View File

@@ -36,7 +36,7 @@
:graphql {:token (-> cofx :db :user)
:query-obj {:venia/queries [[:check_page
(assoc params :company-id (:id @(re-frame/subscribe [::subs/company])))
[[:checks [:id :status :amount :check_number :s3_url :date [:vendor [:name :id]] [:company [:name :id]]]]
[[:checks [:id :status :amount :type :check_number :s3_url :date [:vendor [:name :id]] [:company [:name :id]]]]
:total
:start
:end]]]}
@@ -107,6 +107,7 @@
:sort-by sort-by
:asc asc}
"Company"])
[sorted-column {:on-sort opc
:style {:width percentage-size :cursor "pointer"}
:sort-key "vendor"
@@ -146,14 +147,16 @@
[:tr
[:td {:col-span 5}
[:i.fa.fa-spin.fa-spinner]]]
(for [{:keys [company s3-url checks check-number date amount id vendor status] :as i} (:checks @check-page)]
(for [{:keys [company s3-url checks type check-number date amount id vendor status] :as i} (:checks @check-page)]
^{:key id}
[:tr {:class (:class i)}
(when-not selected-company
[:td (:name company)])
[:td (:name vendor)]
[:td check-number]
[:td (if (= "cash" type)
"Cash"
check-number)]
[:td (date->str date) ]
[:td (gstring/format "$%.2f" amount )]
[:td status]