Commit 0d9d736d2cceea6539cbdc58c1eb6634a3cf2976

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'master'

Master (pmarco)

See merge request modulos-npm/foca-crear-nota-pedido!18
src/js/controller.js
... ... @@ -3,7 +3,7 @@ angular.module('focaCrearNotaPedido')
3 3 ['$scope', '$uibModal', 'crearNotaPedidoService', 'focaModalService',
4 4 function($scope, $uibModal, crearNotaPedidoService, focaModalService) {
5 5 $scope.botonera = [
6   - {texto: 'moneda', accion: function() {console.log('moneda');}},
  6 + {texto: 'moneda', accion: function() {$scope.abrirModalMoneda();}},
7 7 {
8 8 texto: 'precios y condiciones',
9 9 accion: function() {$scope.abrirModalListaPrecio();}},
... ... @@ -283,6 +283,23 @@ angular.module('focaCrearNotaPedido')
283 283 }
284 284 );
285 285 };
  286 + $scope.abrirModalMoneda = function() {
  287 + var modalInstance = $uibModal.open(
  288 + {
  289 + ariaLabelledBy: 'Busqueda de Moneda',
  290 + templateUrl: 'modal-moneda.html',
  291 + controller: 'focaModalMonedaController',
  292 + size: 'lg'
  293 + }
  294 + );
  295 + modalInstance.result.then(
  296 + function(moneda) {
  297 + console.log('moneda', moneda);
  298 + }, function() {
  299 +
  300 + }
  301 + );
  302 + };
286 303 $scope.agregarATabla = function(key) {
287 304 if(key === 13) {
288 305 if($scope.articuloACargar.cantidad === undefined ||