diff --git a/client/order/src/prices-popover/index.js b/client/order/src/prices-popover/index.js index 3567bc6a5..b31dab0f8 100644 --- a/client/order/src/prices-popover/index.js +++ b/client/order/src/prices-popover/index.js @@ -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'), diff --git a/services/order/common/methods/order-row/addToOrder.js b/services/order/common/methods/order-row/addToOrder.js index 18d0c14b9..2d34fc524 100644 --- a/services/order/common/methods/order-row/addToOrder.js +++ b/services/order/common/methods/order-row/addToOrder.js @@ -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] ) ); });