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';
|
||||
|
||||
class Controller {
|
||||
constructor($scope, $http, $timeout, $element) {
|
||||
constructor($scope, $http, $timeout, $element, $translate, vnApp) {
|
||||
this.$ = $scope;
|
||||
this.$timeout = $timeout;
|
||||
this.$http = $http;
|
||||
this.$element = $element;
|
||||
this.$translate = $translate;
|
||||
this.vnApp = vnApp;
|
||||
this.totalBasquet = 0;
|
||||
}
|
||||
set prices(value) {
|
||||
|
@ -115,13 +117,14 @@ class Controller {
|
|||
};
|
||||
|
||||
this.$http.post(`/order/api/OrderRows/addToOrder`, params).then(res => {
|
||||
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
|
||||
this.$.popover.hide();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope', '$http', '$timeout', '$element'];
|
||||
Controller.$inject = ['$scope', '$http', '$timeout', '$element', '$translate', 'vnApp'];
|
||||
|
||||
ngModule.component('vnOrderPricesPopover', {
|
||||
template: require('./index.html'),
|
||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
|||
promises.push(
|
||||
Self.rawSql(
|
||||
`CALL hedera.orderAddItem(?, ?, ?, ?)`,
|
||||
[item.warehouseFk, item.itemFk, item.quantity, params.orderFk]
|
||||
[params.orderFk, item.warehouseFk, item.itemFk, item.quantity]
|
||||
)
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue