mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 03:39:11 +00:00
[webshop] shopping cart settings, update price list, taxes and shipping rule on change of address, apply defaults on creation of fresh quotation
This commit is contained in:
@@ -55,6 +55,15 @@ wn.call = function(opts) {
|
||||
$(opts.btn).addClass("btn-danger");
|
||||
setTimeout(function() { $(opts.btn).removeClass("btn-danger"); }, 1000);
|
||||
}
|
||||
try {
|
||||
var err = JSON.parse(data.exc);
|
||||
if($.isArray(err)) {
|
||||
err = err.join("\n");
|
||||
}
|
||||
console.error ? console.error(err) : console.log(err);
|
||||
} catch(e) {
|
||||
console.log(data.exc);
|
||||
}
|
||||
} else{
|
||||
if(opts.btn) {
|
||||
$(opts.btn).addClass("btn-success");
|
||||
@@ -66,6 +75,9 @@ wn.call = function(opts) {
|
||||
}
|
||||
if(opts.callback)
|
||||
opts.callback(data);
|
||||
},
|
||||
error: function(response) {
|
||||
console.error ? console.error(response) : console.log(response);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user