Bug #730 order.catalog no añade lineas

This commit is contained in:
Gerard 2018-10-15 10:48:06 +02:00
parent 3151bca0bd
commit 7ed52d455d
2 changed files with 6 additions and 3 deletions

View File

@ -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'),

View File

@ -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]
) )
); );
}); });