Commit 16b1be81c4871688c995974f1b3a0836cebf9c67
Exists in
master
and in
1 other branch
Merge branch 'master' into 'master'
Master See merge request !26
Showing
1 changed file
Show diff stats
src/js/controllerCisterna.js
... | ... | @@ -58,7 +58,7 @@ angular.module('focaAbmVehiculo') |
58 | 58 | focaModalService.alert('Ingrese unidad de medida'); |
59 | 59 | return; |
60 | 60 | } |
61 | - validaCodigoCapacidad() | |
61 | + validaCodigo() | |
62 | 62 | .then(function() { |
63 | 63 | $scope.cisterna.idVehiculo = parseInt($routeParams.idVehiculo); |
64 | 64 | delete $scope.cisterna.vehiculo; |
... | ... | @@ -89,7 +89,7 @@ angular.module('focaAbmVehiculo') |
89 | 89 | }); |
90 | 90 | }; |
91 | 91 | |
92 | - function validaCodigoCapacidad() { | |
92 | + function validaCodigo() { | |
93 | 93 | return new Promise(function(resolve, reject) { |
94 | 94 | focaAbmVehiculoService |
95 | 95 | .getCisternas($routeParams.idVehiculo) |
... | ... | @@ -108,15 +108,7 @@ angular.module('focaAbmVehiculo') |
108 | 108 | totalCargado += cisterna.capacidad; |
109 | 109 | } |
110 | 110 | }); |
111 | - | |
112 | - //SI EL TOTAL DE CAPACIDAD DE CISTERNAS ES MAYOR QUE LA DEL VEHICULO | |
113 | - totalCargado = totalCargado + parseInt($scope.cisterna.capacidad); | |
114 | - if(totalCargado > $scope.capacidadVechiulo) { | |
115 | - reject('La capacidad total de las cisternas' + | |
116 | - ' no debe ser mayor a la del vehiculo'); | |
117 | - }else { | |
118 | - resolve(); | |
119 | - } | |
111 | + resolve(); | |
120 | 112 | }); |
121 | 113 | }); |
122 | 114 | } |