sale now rolls back to olda data when it cant update the price
This commit is contained in:
parent
65ffade0a3
commit
f170f7b621
|
@ -228,7 +228,7 @@
|
||||||
label="Price"
|
label="Price"
|
||||||
model="$ctrl.editedPrice"
|
model="$ctrl.editedPrice"
|
||||||
type="text"
|
type="text"
|
||||||
accept="$ctrl.updatePrice()">
|
on-change="$ctrl.updatePrice()">
|
||||||
<t-right-icons>
|
<t-right-icons>
|
||||||
<span class="filter">€</span>
|
<span class="filter">€</span>
|
||||||
</t-right-icons>
|
</t-right-icons>
|
||||||
|
|
|
@ -309,6 +309,9 @@ class Controller {
|
||||||
this.$http.post(`/ticket/api/Sales/${id}/updateQuantity`, {quantity: parseInt(quantity)}).then(() => {
|
this.$http.post(`/ticket/api/Sales/${id}/updateQuantity`, {quantity: parseInt(quantity)}).then(() => {
|
||||||
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
|
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
|
||||||
this.$scope.model.refresh();
|
this.$scope.model.refresh();
|
||||||
|
}).catch(e => {
|
||||||
|
this.vnApp.showError(e.data.error.message);
|
||||||
|
this.$scope.model.refresh();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue