www/js/prod_edit.js

changeset 757
d13be50c0049
parent 756
b702c25661e7
child 758
e6814bed4cb1
--- a/www/js/prod_edit.js	Sun Jun 27 10:15:09 2021 +0200
+++ b/www/js/prod_edit.js	Sun Jun 27 11:12:24 2021 +0200
@@ -4882,8 +4882,13 @@
    data: data,
    async: false,
    type: 'POST',
-   success: function(data, status, xhr) {
-    console.log('saveRecord(' + goback + ') success');
+   success: function(data) {
+    if (data.error) {
+     console.log('saveRecord(' + goback + ') error ' + data.msg);
+     alert('SQL fout: ' + data.msg);
+    } else {
+     console.log('saveRecord(' + goback + ') success');
+    }
     if (goback)
      window.location.href = my_return;
     else

mercurial