diff --git a/src/js/controller.js b/src/js/controller.js index cc2213a..28cbc62 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -23,8 +23,8 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', {texto: '', accion: function() {}} ]; + $scope.isNumber = angular.isNumber; $scope.datepickerAbierto = false; - $scope.show = false; $scope.cargando = true; $scope.dateOptions = { @@ -45,10 +45,6 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', //Trabajo con la cotización más reciente, por eso uso siempre la primera '[0]' crearNotaPedidoService.getCotizacionByIdMoneda(1).then(function(res) { monedaPorDefecto = res.data[0]; - addCabecera('Moneda:', monedaPorDefecto.DETALLE); - addCabecera('Fecha cotizacion:', - new Date(monedaPorDefecto.cotizaciones[0].FECHA).toLocaleDateString()); - addCabecera('Cotizacion:', monedaPorDefecto.cotizaciones[0].VENDEDOR); $scope.notaPedido.moneda = monedaPorDefecto; $scope.notaPedido.cotizacion = monedaPorDefecto.cotizaciones[0]; }); @@ -582,12 +578,18 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', $scope.articulosTabla = articulosTablaTemp; $scope.notaPedido.moneda = moneda; $scope.notaPedido.cotizacion = cotizacion; - addCabecera('Moneda:', moneda.DETALLE); - addCabecera( - 'Fecha cotizacion:', - $filter('date')(cotizacion.FECHA, 'dd/MM/yyyy') - ); - addCabecera('Cotizacion:', cotizacion.VENDEDOR); + if(moneda.DETALLE == "PESOS ARGENTINOS"){ + removeCabecera('Moneda:'); + removeCabecera('Fecha cotizacion:'); + removeCabecera('Cotizacion:'); + }else{ + addCabecera('Moneda:', moneda.DETALLE); + addCabecera( + 'Fecha cotizacion:', + $filter('date')(cotizacion.FECHA, 'dd/MM/yyyy') + ); + addCabecera('Cotizacion:', cotizacion.VENDEDOR); + } }, function() { } diff --git a/src/views/nota-pedido.html b/src/views/nota-pedido.html index efb7892..0a966c6 100644 --- a/src/views/nota-pedido.html +++ b/src/views/nota-pedido.html @@ -41,7 +41,8 @@