Commit 5ada27351ec71ee283ab130132b42b02ed6f5b6a

Authored by Eric Fernandez
1 parent a3321352c9
Exists in master

property to upper

Showing 1 changed file with 10 additions and 4 deletions   Show diff stats
src/js/controller.js
... ... @@ -365,25 +365,31 @@ angular.module('focaCrearCobranza') .controller('cobranzaController',
365 365 focaModalService.alert('Ingrese primero cobrador');
366 366 return;
367 367 }
368   - //TODO: refactor usar foca-modal
369 368 var modalInstance = $uibModal.open(
370 369 {
371 370 ariaLabelledBy: 'Busqueda de Cliente',
372 371 templateUrl: 'foca-busqueda-cliente-modal.html',
373 372 controller: 'focaBusquedaClienteModalController',
374 373 resolve: {
375   - vendedor: function() { return $scope.cobranza.cobrador; }
  374 + vendedor: function() { return null; }
376 375 },
377 376 size: 'lg'
378 377 }
379 378 );
380 379 modalInstance.result.then(
381 380 function(cliente) {
  381 + var clienteMayus = {
  382 + COD: cliente.cod,
  383 + NOM: cliente.nom,
  384 + CUIT: cliente.cuit
  385 + };
  386 +
382 387 $scope.$broadcast('addCabecera', {
383 388 label: 'Cliente:',
384   - valor: $filter('rellenarDigitos')(cliente.COD, 5) + ' - ' + cliente.NOM
  389 + valor: $filter('rellenarDigitos')(clienteMayus.COD, 5) + ' - ' +
  390 + clienteMayus.NOM
385 391 });
386   - $scope.cobranza.cliente = cliente;
  392 + $scope.cobranza.cliente = clienteMayus;
387 393 }
388 394 );
389 395 };