Commit d45453cc51eb44a798c0e7f53875d596ebddfee7
1 parent
7ea2b0fbbe
Exists in
master
and in
1 other branch
bug moneda
Showing
1 changed file
with
2 additions
and
7 deletions
Show diff stats
src/js/controller.js
| ... | ... | @@ -44,13 +44,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 44 | 44 | var monedaPorDefecto; |
| 45 | 45 | //Trabajo con la cotización más reciente, por eso uso siempre la primera '[0]' |
| 46 | 46 | crearNotaPedidoService.getCotizacionByIdMoneda(1).then(function(res) { |
| 47 | - monedaPorDefecto = { | |
| 48 | - id: res.data[0].ID, | |
| 49 | - detalle: res.data[0].DETALLE, | |
| 50 | - simbolo: res.data[0].SIMBOLO, | |
| 51 | - cotizaciones: res.data[0].cotizaciones | |
| 52 | - }; | |
| 53 | - addCabecera('Moneda:', monedaPorDefecto.detalle); | |
| 47 | + monedaPorDefecto = res.data[0]; | |
| 48 | + addCabecera('Moneda:', monedaPorDefecto.DETALLE); | |
| 54 | 49 | addCabecera('Fecha cotizacion:', |
| 55 | 50 | new Date(monedaPorDefecto.cotizaciones[0].FECHA).toLocaleDateString()); |
| 56 | 51 | addCabecera('Cotizacion:', monedaPorDefecto.cotizaciones[0].VENDEDOR); |