Commit f5040c914a95b81484677553c515c557c78a6c2c
1 parent
342c7663c4
Exists in
master
and in
2 other branches
móvil
Showing
1 changed file
with
4 additions
and
3 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -34,9 +34,9 @@ angular.module('focaModalDetalleCisternas') |
| 34 | 34 | } |
| 35 | 35 | Promise.all([promesaVehiculo, promesaCisternas, promesaRemito]).then(function(res) { |
| 36 | 36 | if (idRemito !== -1 && !validarCargas(res[1].data, res[2].data)) { |
| 37 | - focaModalService.alert('Los artículos del remito exceden ' + | |
| 38 | - 'la cantidad disponible del vehiculo'); | |
| 39 | - $uibModalInstance.close(true); | |
| 37 | + var error = 'Los artículos del remito exceden la cantidad disponible del ' + | |
| 38 | + 'vehiculo'; | |
| 39 | + $uibModalInstance.dismiss(error); | |
| 40 | 40 | return; |
| 41 | 41 | } |
| 42 | 42 | $scope.cargandoDatos = false; |
| ... | ... | @@ -333,6 +333,7 @@ angular.module('focaModalDetalleCisternas') |
| 333 | 333 | |
| 334 | 334 | articulos.forEach(function(articulo) { |
| 335 | 335 | cisternas.forEach(function(cisterna) { |
| 336 | + if(!cisterna.cisternaCarga) cisterna.cisternaCarga = {}; | |
| 336 | 337 | //SI LA CISTERNA ESTA VACIA O |
| 337 | 338 | //SI LA CISTERNA TIENE EL MISMO PRODUCTO |
| 338 | 339 | //Y AUN TIENE LUGAR |