mostly supporting showing when something cleared.
This commit is contained in:
@@ -18,7 +18,8 @@
|
|||||||
{:invoice/client [:client/name :db/id :client/locations]}
|
{:invoice/client [:client/name :db/id :client/locations]}
|
||||||
{:invoice/vendor [:vendor/name :db/id]}
|
{:invoice/vendor [:vendor/name :db/id]}
|
||||||
{:invoice/status [:db/ident]}
|
{:invoice/status [:db/ident]}
|
||||||
{:invoice-payment/_invoice [* {:invoice-payment/payment [*]}]}]))
|
{:invoice-payment/_invoice [* {:invoice-payment/payment [* {:payment/status [*]}
|
||||||
|
{:transaction/_payment [*]}]}]}]))
|
||||||
|
|
||||||
(defn <-datomic [x]
|
(defn <-datomic [x]
|
||||||
(->> x
|
(->> x
|
||||||
|
|||||||
@@ -30,7 +30,9 @@
|
|||||||
{
|
{
|
||||||
:scalars {:id {
|
:scalars {:id {
|
||||||
:parse (schema/as-conformer #(Long/parseLong %))
|
:parse (schema/as-conformer #(Long/parseLong %))
|
||||||
:serialize (schema/as-conformer #(.toString %))}}
|
:serialize (schema/as-conformer #(.toString %))}
|
||||||
|
:ident {:parse (schema/as-conformer (fn [x] {:ident x}))
|
||||||
|
:serialize (schema/as-conformer #(do (println %) (:ident %)))}}
|
||||||
:objects
|
:objects
|
||||||
{
|
{
|
||||||
:client
|
:client
|
||||||
@@ -109,7 +111,8 @@
|
|||||||
:memo {:type 'String}
|
:memo {:type 'String}
|
||||||
:s3_url {:type 'String}
|
:s3_url {:type 'String}
|
||||||
:check_number {:type 'Int}
|
:check_number {:type 'Int}
|
||||||
:status {:type 'String}
|
:status {:type :ident}
|
||||||
|
:transaction {:type :transaction}
|
||||||
:invoices {:type '(list :invoice_payment)}
|
:invoices {:type '(list :invoice_payment)}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,8 @@
|
|||||||
[:expense_accounts [:amount :id :expense_account_id :location
|
[:expense_accounts [:amount :id :expense_account_id :location
|
||||||
[:expense_account [:id :name :location [:parent [:id :name]]]]]]
|
[:expense_account [:id :name :location [:parent [:id :name]]]]]]
|
||||||
[:client [:name :id :locations]]
|
[:client [:name :id :locations]]
|
||||||
[:payments [:amount :id [:payment [:id :amount :s3_url :check_number ]]]]
|
[:payments [:amount :id [:payment [:id :status :amount :s3_url :check_number
|
||||||
]]
|
[:transaction [:post_date]]]]]]]]
|
||||||
:total
|
:total
|
||||||
:start
|
:start
|
||||||
:end]]]})
|
:end]]]})
|
||||||
@@ -208,6 +208,10 @@
|
|||||||
[:a.dropdown-item {:href (:s3-url (:payment payment)) :target "_new"} [:i.fa.fa-money-check] [:span.icon [:i.fa.fa-money]] (str " " (:check-number (:payment payment)) " (" (gstring/format "$%.2f" (:amount payment) ) ")")]
|
[:a.dropdown-item {:href (:s3-url (:payment payment)) :target "_new"} [:i.fa.fa-money-check] [:span.icon [:i.fa.fa-money]] (str " " (:check-number (:payment payment)) " (" (gstring/format "$%.2f" (:amount payment) ) ")")]
|
||||||
|
|
||||||
^{:key (:id payment)}
|
^{:key (:id payment)}
|
||||||
[:span.dropdown-item [:i.fa.fa-money-check] [:span.icon [:i.fa.fa-money]] (str " " (:check-number (:payment payment)) " (" (gstring/format "$%.2f" (:amount payment) ) ")")]))]]])
|
[:span.dropdown-item [:span.icon {:class [(when (= :cleared (:status (:payment payment)))
|
||||||
|
"has-text-success")]}
|
||||||
|
[:i.fa.fa-money]] (str " " (:check-number (:payment payment)) " (" (gstring/format "$%.2f" (:amount payment) ) ") "
|
||||||
|
(when (= :cleared (:status (:payment payment)))
|
||||||
|
(str " - " (:post-date (:transaction (:payment payment))))))]))]]])
|
||||||
|
|
||||||
]]))]]]))))
|
]]))]]]))))
|
||||||
|
|||||||
Reference in New Issue
Block a user