you can't add an existing invoice.
This commit is contained in:
@@ -259,7 +259,8 @@
|
||||
:location
|
||||
[:expense_account [:id :name [:parent [:id :name]]]]]]
|
||||
]]}]}
|
||||
:on-success [::invoice-created]}})))
|
||||
:on-success [::invoice-created]
|
||||
:on-error [::invoice-create-failed]}})))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::edit-invoice-save
|
||||
@@ -331,6 +332,11 @@
|
||||
invoices)))
|
||||
(dissoc ::handwrite-checks))})))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::invoice-create-failed
|
||||
(fn [{:keys [db]} [_ data]]
|
||||
{:dispatch [::events/modal-failed ::new-invoice "That invoice already exists."]}))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::invoice-created
|
||||
(fn [{:keys [db]} [_ {:keys [add-invoice]}]]
|
||||
|
||||
Reference in New Issue
Block a user