352 ticket.lines Modificar descuento haciendo click en campo descuento
This commit is contained in:
parent
36a3d04216
commit
78bab7c5a8
|
@ -18,7 +18,7 @@
|
|||
| currency:' €':2}}</p>
|
||||
<vn-button
|
||||
label="Save"
|
||||
ng-click="$ctrl.updateDiscount()">
|
||||
ng-click="$ctrl.hide()">
|
||||
</vn-button>
|
||||
</div>
|
||||
</div>
|
|
@ -45,11 +45,15 @@ class Controller {
|
|||
if (modified) {
|
||||
this.$http.post(`/ticket/api/Sales/updateDiscount`, {editLines}).then(() => {
|
||||
this.hide();
|
||||
this.vnApp.showSuccess(this.translate.instant('Data saved!'));
|
||||
this.clear();
|
||||
modified = false;
|
||||
}).catch(e => {
|
||||
this.vnApp.showError(this.translate.instant(e.data.error.message));
|
||||
});
|
||||
} else {
|
||||
this.vnApp.showError(this.translate.instant('There is no changes to save'));
|
||||
}
|
||||
this.clear();
|
||||
}
|
||||
|
||||
clear() {
|
||||
|
|
Loading…
Reference in New Issue