diff --git a/src/js/controller.js b/src/js/controller.js index 51d4b88..7a63ce4 100644 --- a/src/js/controller.js +++ b/src/js/controller.js @@ -3,7 +3,7 @@ angular.module('focaCrearNotaPedido') ['$scope', '$uibModal', 'crearNotaPedidoService', 'focaModalService', function($scope, $uibModal, crearNotaPedidoService, focaModalService) { $scope.botonera = [ - {texto: 'moneda', accion: function() {console.log('moneda');}}, + {texto: 'moneda', accion: function() {$scope.abrirModalMoneda();}}, { texto: 'precios y condiciones', accion: function() {$scope.abrirModalListaPrecio();}}, @@ -283,6 +283,23 @@ angular.module('focaCrearNotaPedido') } ); }; + $scope.abrirModalMoneda = function() { + var modalInstance = $uibModal.open( + { + ariaLabelledBy: 'Busqueda de Moneda', + templateUrl: 'modal-moneda.html', + controller: 'focaModalMonedaController', + size: 'lg' + } + ); + modalInstance.result.then( + function(moneda) { + console.log('moneda', moneda); + }, function() { + + } + ); + }; $scope.agregarATabla = function(key) { if(key === 13) { if($scope.articuloACargar.cantidad === undefined ||