352 ticket.lines Modificar descuento haciendo click en campo descuento

This commit is contained in:
gerard 2018-07-04 14:42:02 +02:00
parent 36a3d04216
commit 78bab7c5a8
2 changed files with 6 additions and 2 deletions

View File

@ -18,7 +18,7 @@
| currency:' €':2}}</p>
<vn-button
label="Save"
ng-click="$ctrl.updateDiscount()">
ng-click="$ctrl.hide()">
</vn-button>
</div>
</div>

View File

@ -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() {