Commit faee029b955e998cfd0b970c7b4d17f014bdb6c1

Authored by Eric Fernandez
1 parent 2cddee92b6
Exists in master and in 2 other branches develop, lab

delete de remitos y no mostrar información cuando no tiene remitos

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
... ... @@ -99,6 +99,7 @@
99 99 <td>
100 100 <button
101 101 class="btn btn-outline-secondary"
  102 + ng-disabled="!cisterna.cisternaCarga.remitos.length"
102 103 ng-click="verRemitos(cisterna.cisternaCarga.remitos)">
103 104 <i class="fa fa-info" aria-hidden="true"></i>
104 105 </button>