Commit faee029b955e998cfd0b970c7b4d17f014bdb6c1
1 parent
2cddee92b6
Exists in
master
and in
2 other branches
delete de remitos y no mostrar información cuando no tiene remitos
Showing
2 changed files
with
3 additions
and
1 deletions
Show diff stats
src/js/controller.js
... | ... | @@ -33,7 +33,7 @@ angular.module('focaModalDetalleCisternas') |
33 | 33 | promesaRemito = focaModalDetalleCisternasService.obtenerRemitoById(idRemito); |
34 | 34 | } |
35 | 35 | Promise.all([promesaVehiculo, promesaCisternas, promesaRemito]).then(function(res) { |
36 | - if (!validarCargas(res[1].data, res[2].data)) { | |
36 | + if (idRemito !== -1 && !validarCargas(res[1].data, res[2].data)) { | |
37 | 37 | focaModalService.alert('Los artículos del remito exceden ' + |
38 | 38 | 'la cantidad disponible del vehiculo'); |
39 | 39 | $uibModalInstance.close(); |
... | ... | @@ -82,6 +82,7 @@ angular.module('focaModalDetalleCisternas') |
82 | 82 | $scope.cisternasCarga[i].idUsuarioProceso = |
83 | 83 | focaModalDetalleCisternasService.idUsuario; |
84 | 84 | delete $scope.cisternasCarga[i].articulo; |
85 | + delete $scope.cisternasCarga[i].remitos; | |
85 | 86 | } |
86 | 87 | var cisterna = { |
87 | 88 | cisternaMovimientos: cisternaMovimientos, |
src/views/foca-detalle-vehiculo.html