Commit 9d5847b3f752766d49186f4597a7dc3caf9f9328
1 parent
93d7038a98
Exists in
master
and in
2 other branches
fix no acumula
Showing
2 changed files
with
7 additions
and
8 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -30,7 +30,7 @@ angular.module('focaModalDetalleCisternas') |
| 30 | 30 | } |
| 31 | 31 | var promesaVehiculo = focaModalDetalleCisternasService.obtenerVehiculoById(idVehiculo); |
| 32 | 32 | var promesaCisternas = focaModalDetalleCisternasService |
| 33 | - .obtenerCisternasPorFecha(idVehiculo); | |
| 33 | + .obtenerCisternasPorFecha(idVehiculo, $scope.orden); | |
| 34 | 34 | |
| 35 | 35 | if (idRemito !== -1) { |
| 36 | 36 | promesaRemito = focaModalDetalleCisternasService.obtenerRemitoById(idRemito); |
| ... | ... | @@ -388,11 +388,6 @@ angular.module('focaModalDetalleCisternas') |
| 388 | 388 | cisterna.disponible = cisterna.capacidad; |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | - if (cisterna.cisternaCarga.orden !== orden) { | |
| 392 | - cisterna.cisternaCarga = { orden: orden }; | |
| 393 | - cisterna.disponible = cisterna.capacidad; | |
| 394 | - } | |
| 395 | - | |
| 396 | 391 | }); |
| 397 | 392 | |
| 398 | 393 | } |
src/js/service.js
| ... | ... | @@ -17,9 +17,13 @@ angular.module('focaModalDetalleCisternas') |
| 17 | 17 | return $http.post(url + '/cisterna/guardar/cargar/' + |
| 18 | 18 | this.idUsuario + '/' + idRemito,cisterna); |
| 19 | 19 | }, |
| 20 | - obtenerCisternasPorFecha: function(idVehiculo) { | |
| 20 | + obtenerCisternasPorFecha: function(idVehiculo, orden) { | |
| 21 | 21 | return $http.post(url + '/cisterna/listar/fecha', |
| 22 | - {idVehiculo: idVehiculo, fechaReparto: this.fecha}); | |
| 22 | + { | |
| 23 | + idVehiculo: idVehiculo, | |
| 24 | + fechaReparto: this.fecha, | |
| 25 | + orden: orden | |
| 26 | + }); | |
| 23 | 27 | } |
| 24 | 28 | }; |
| 25 | 29 | } |