Commit d512ee74 by Yvon Kerdoncuff

properly show error

parent ee7f7169
Pipeline #3911 canceled with stage
......@@ -707,7 +707,9 @@ function do_stock_movement() {
},
error: function(data) {
if(data.responseJSON.error == "Failed api execute : <Fault 2: \"Could not reserve all requested products. Please use the 'Mark as Todo' button to handle the reservation manually.\">")
let could_not_reserve_error = "Failed api execute : <Fault 2: \"Could not reserve all requested products. Please use the 'Mark as Todo' button to handle the reservation manually.\">";
if(data.responseJSON.errors.length > 0
&& data.responseJSON.errors[0] == could_not_reserve_error)
{
closeModal();
reset_focus();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment