checking for existing invoices.
This commit is contained in:
@@ -279,7 +279,8 @@
|
||||
[:expense_accounts [:amount :id :expense_account_id
|
||||
:location
|
||||
[:expense_account [:id :name [:parent [:id :name]]]]]]]]}]}
|
||||
:on-success [::invoice-edited]}})))
|
||||
:on-success [::invoice-edited]
|
||||
:on-error [::invoice-edit-failed]}})))
|
||||
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
@@ -361,6 +362,12 @@
|
||||
i)) is)))
|
||||
(dissoc ::edit-invoice))}))
|
||||
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::invoice-edit-failed
|
||||
(fn [{:keys [db]} [_ data]]
|
||||
{:dispatch [::events/modal-failed ::edit-invoice "That invoice already exists."]}))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::invoice-voided
|
||||
(fn [{:keys [db]} [_ {:keys [void-invoice]}]]
|
||||
|
||||
Reference in New Issue
Block a user