Only shows most recent payments for potential payments for transactions, fixes invoice multiple prints.

This commit is contained in:
2023-03-10 14:15:18 -08:00
parent 0ff147a7a0
commit b669984673
2 changed files with 9 additions and 8 deletions

View File

@@ -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