Commit 10f053b7894ce7263e5a0e672fc89c36b43169c4
1 parent
af8cfbe551
Exists in
master
and in
1 other branch
fix error notaPedido undefined
Showing
1 changed file
with
5 additions
and
3 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -23,6 +23,7 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 23 | 23 | |
| 24 | 24 | function config() { |
| 25 | 25 | // PARAMETROS INICIALES PARA FUNCIONAMIENTO DEL PROGRAMA |
| 26 | + $scope.notaPedido = {}; | |
| 26 | 27 | $scope.isNumber = angular.isNumber; |
| 27 | 28 | $scope.datepickerAbierto = false; |
| 28 | 29 | $scope.show = false; |
| ... | ... | @@ -76,10 +77,10 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 76 | 77 | domicilio: {dom: ''}, |
| 77 | 78 | vendedor: {}, |
| 78 | 79 | fechaCarga: new Date(), |
| 79 | - cotizacion: $scope.cotizacionPorDefecto | |
| 80 | + cotizacion: $scope.cotizacionPorDefecto, | |
| 81 | + articulosNotaPedido: [] | |
| 80 | 82 | }; |
| 81 | 83 | |
| 82 | - $scope.notaPedido.articulosNotaPedido = []; | |
| 83 | 84 | $scope.idLista = undefined; |
| 84 | 85 | |
| 85 | 86 | crearNotaPedidoService.getNumeroNotaPedido().then( |
| ... | ... | @@ -188,7 +189,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 188 | 189 | data.data.id, |
| 189 | 190 | '' |
| 190 | 191 | ); |
| 191 | - notaPedidoBusinessService.addArticulos($scope.notaPedido.articulosNotaPedido, | |
| 192 | + notaPedidoBusinessService.addArticulos( | |
| 193 | + $scope.notaPedido.articulosNotaPedido, | |
| 192 | 194 | data.data.id, $scope.notaPedido.cotizacion.VENDEDOR); |
| 193 | 195 | |
| 194 | 196 | if($scope.notaPedido.notaPedidoPuntoDescarga) { |