Commit 3ece3cbe39b02cb92e1d0b2ce8a92a877d917b2d
1 parent
76df990d5f
Exists in
master
validacion no tiene articulos
Showing
1 changed file
with
5 additions
and
0 deletions
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) { |