all functions work
This commit is contained in:
@@ -157,23 +157,19 @@
|
||||
(re-frame/reg-event-db
|
||||
::advanced-print-checks
|
||||
(fn [db _]
|
||||
(let [{:keys [checked invoices]} (get-in db [::invoice-page])]
|
||||
(let [invoices @(re-frame/subscribe [::checked-invoices])]
|
||||
(-> db
|
||||
(forms/stop-form ::form/form)
|
||||
(update-in [::invoice-page :print-checks-shown?] #(not %) )
|
||||
(assoc-in [::advanced-print-checks] {:shown? true
|
||||
:bank-account-id (:id (first @(re-frame/subscribe [::subs/bank-accounts])))
|
||||
:invoices (->> checked
|
||||
vals
|
||||
(map #(assoc % :amount (:outstanding-balance %))))} )))))
|
||||
:invoices (map #(assoc % :amount (:outstanding-balance %)) invoices )} )))))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::handwrite-checks
|
||||
(fn [{:keys [db]} _]
|
||||
(let [{:keys [checked invoices]} (get-in db [::invoice-page])
|
||||
invoices (->> checked
|
||||
vals
|
||||
(map #(assoc % :amount (:outstanding-balance %))))]
|
||||
(let [invoices @(re-frame/subscribe [::checked-invoices])
|
||||
invoices (map #(assoc % :amount (:outstanding-balance %)) invoices)]
|
||||
|
||||
{:dispatch [::events/modal-status ::handwrite-checks {:visible? true}]
|
||||
:db (-> db
|
||||
|
||||
Reference in New Issue
Block a user