Commit ee7f7169 by Yvon Kerdoncuff

show stock unsuffisant error

parent 2ca192ec
Pipeline #3910 canceled with stage
...@@ -707,6 +707,15 @@ function do_stock_movement() { ...@@ -707,6 +707,15 @@ function do_stock_movement() {
}, },
error: function(data) { 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.\">")
{
closeModal();
reset_focus();
$.notify("Erreur lors de l'opération : échec de la réservation d'un produit.", {
globalPosition:"top right",
className: "error"
});
}
// server error // server error
err = {msg: "erreur serveur lors de l'enregistrement du mouvement de stock", ctx: 'do_stock_movement'}; err = {msg: "erreur serveur lors de l'enregistrement du mouvement de stock", ctx: 'do_stock_movement'};
if (typeof data.responseJSON != 'undefined' && typeof data.responseJSON.error != 'undefined') { if (typeof data.responseJSON != 'undefined' && typeof data.responseJSON.error != 'undefined') {
......
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