Commit ee34fd20422459cd72ad7571e53d80aa517b8494
Exists in
master
and in
2 other branches
Merge branch 'master' into 'master'
Master(efernandez) See merge request !6
Showing
1 changed file
Show diff stats
src/js/controller.js
| ... | ... | @@ -51,6 +51,11 @@ angular.module('focaModalDetalleCisternas') |
| 51 | 51 | $uibModalInstance.close(); |
| 52 | 52 | } |
| 53 | 53 | $scope.articulos = $scope.remito.articulosRemito; |
| 54 | + if(!$scope.articulos.length) { | |
| 55 | + focaModalService.alert('El remito no tiene articulos'); | |
| 56 | + $uibModalInstance.dismiss(); | |
| 57 | + return; | |
| 58 | + } | |
| 54 | 59 | $scope.seleccionarArticulo($scope.articulos[0]); |
| 55 | 60 | var tieneUsuario = $scope.cisternas.filter(function(cisterna) { |
| 56 | 61 | if(cisterna.cisternaCarga && cisterna.cisternaCarga.idUsuarioProceso) { |