Commit 4145681338195ce6d55816b5b8d71b7650607bac

Authored by Eric Fernandez
1 parent 12a3efbb58
Exists in master

rechazo

Showing 2 changed files with 10 additions and 9 deletions   Show diff stats
src/js/controller.js
... ... @@ -182,14 +182,15 @@ angular.module('focaModalDetalleHojaRuta')
182 182 remitoRechazado.motivoRechazo = motivo;
183 183 remitoRechazado.fechaRemito =
184 184 remitoRechazado.fechaRemito.slice(0, 19).replace('T', ' ');
185   - Promise.all([
186   - focaModalDetalleHojaRutaService
187   - .rechazarRemito(remitoRechazado),
188   - focaSeguimientoService.guardarPosicion(
189   - 'Entrega de producto',
190   - remitoRechazado.id,
191   - motivo)
192   - ]).then(success).catch(error);
  185 + focaModalDetalleHojaRutaService.rechazarRemito(remitoRechazado)
  186 + .then(function(res) {
  187 + focaSeguimientoService.guardarPosicion(
  188 + 'Entrega de producto',
  189 + res.data[1].id,
  190 + motivo);
  191 + success();
  192 + })
  193 + .catch(error);
193 194 $scope.readonly = true;
194 195 });
195 196 };
... ... @@ -17,7 +17,7 @@ angular.module('focaModalDetalleHojaRuta')
17 17 return $http.post(API_ENDPOINT.URL + '/hoja-ruta/movimiento', datos);
18 18 },
19 19 rechazarRemito: function(remito) {
20   - return $http.post(API_ENDPOINT.URL + '/remito/update', {remito: remito});
  20 + return $http.post(API_ENDPOINT.URL + '/remito/rechazar', {remito: remito});
21 21 },
22 22 updatePuntoDescarga: function(puntoDescarga) {
23 23 return $http.post(API_ENDPOINT.URL + '/punto-descarga',