Only shows most recent payments for potential payments for transactions, fixes invoice multiple prints.
This commit is contained in:
@@ -234,7 +234,7 @@
|
||||
:bank-account-id bank-account-id
|
||||
:type type}
|
||||
[:pdf-url [:invoices invoice-read]]]}]}
|
||||
:on-success [::added-and-printed]
|
||||
:on-success [::added-and-printed client]
|
||||
:on-error [::forms/save-error ::form]}})
|
||||
))
|
||||
|
||||
@@ -284,9 +284,9 @@
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::added-and-printed
|
||||
(fn [_ [_ result]]
|
||||
(fn [_ [_ client result]]
|
||||
(let [invoice (first (:invoices (:add-and-print-invoice result)))]
|
||||
{:dispatch-n [[::updated (assoc invoice :class "live-added") :create]
|
||||
{:dispatch-n [[::updated (assoc invoice :class "live-added") :create client]
|
||||
[::checks-printed [invoice] (:pdf-url (:add-and-print-invoice result))]]})))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
|
||||
Reference in New Issue
Block a user