Bug #730 order.catalog no añade lineas
This commit is contained in:
parent
3151bca0bd
commit
7ed52d455d
|
@ -2,11 +2,13 @@ import ngModule from '../module';
|
||||||
import './style.scss';
|
import './style.scss';
|
||||||
|
|
||||||
class Controller {
|
class Controller {
|
||||||
constructor($scope, $http, $timeout, $element) {
|
constructor($scope, $http, $timeout, $element, $translate, vnApp) {
|
||||||
this.$ = $scope;
|
this.$ = $scope;
|
||||||
this.$timeout = $timeout;
|
this.$timeout = $timeout;
|
||||||
this.$http = $http;
|
this.$http = $http;
|
||||||
this.$element = $element;
|
this.$element = $element;
|
||||||
|
this.$translate = $translate;
|
||||||
|
this.vnApp = vnApp;
|
||||||
this.totalBasquet = 0;
|
this.totalBasquet = 0;
|
||||||
}
|
}
|
||||||
set prices(value) {
|
set prices(value) {
|
||||||
|
@ -115,13 +117,14 @@ class Controller {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$http.post(`/order/api/OrderRows/addToOrder`, params).then(res => {
|
this.$http.post(`/order/api/OrderRows/addToOrder`, params).then(res => {
|
||||||
|
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
|
||||||
this.$.popover.hide();
|
this.$.popover.hide();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.$inject = ['$scope', '$http', '$timeout', '$element'];
|
Controller.$inject = ['$scope', '$http', '$timeout', '$element', '$translate', 'vnApp'];
|
||||||
|
|
||||||
ngModule.component('vnOrderPricesPopover', {
|
ngModule.component('vnOrderPricesPopover', {
|
||||||
template: require('./index.html'),
|
template: require('./index.html'),
|
||||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
||||||
promises.push(
|
promises.push(
|
||||||
Self.rawSql(
|
Self.rawSql(
|
||||||
`CALL hedera.orderAddItem(?, ?, ?, ?)`,
|
`CALL hedera.orderAddItem(?, ?, ?, ?)`,
|
||||||
[item.warehouseFk, item.itemFk, item.quantity, params.orderFk]
|
[params.orderFk, item.warehouseFk, item.itemFk, item.quantity]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue