Commit 3c88aaf632ba2dfc2491333e8bb41cc9e51b11b6
1 parent
5e73c4e810
Exists in
master
agrego boton "resumen cuenta"
Showing
3 changed files
with
29 additions
and
1 deletions
Show diff stats
README.md
src/js/controller.js
| ... | ... | @@ -356,6 +356,30 @@ angular.module('focaCrearCobranza') .controller('cobranzaController', |
| 356 | 356 | modalInstance.result.then(setearCobranza); |
| 357 | 357 | }; |
| 358 | 358 | |
| 359 | + $scope.seleccionarResumenDeCuenta = function() { | |
| 360 | + if (!$scope.cobranza.cliente.COD) { | |
| 361 | + focaModalService.alert('Seleccione primero un cliente'); | |
| 362 | + return; | |
| 363 | + } | |
| 364 | + var modalInstance = $uibModal.open( | |
| 365 | + { | |
| 366 | + ariaLabelledBy: 'Resumen de cuentas', | |
| 367 | + templateUrl: 'modal-resumen-cuenta.html', | |
| 368 | + controller: 'focaModalResumenCuentaController', | |
| 369 | + resolve: { | |
| 370 | + idCliente: function() { return $scope.cobranza.cliente.COD; } | |
| 371 | + }, | |
| 372 | + size: 'lg' | |
| 373 | + } | |
| 374 | + ); | |
| 375 | + modalInstance.result.then( | |
| 376 | + function(cliente) { | |
| 377 | + $scope.abrirModalDomicilios(cliente); | |
| 378 | + $scope.cliente = cliente; | |
| 379 | + }, function() {} | |
| 380 | + ); | |
| 381 | + }; | |
| 382 | + | |
| 359 | 383 | $scope.seleccionarCliente = function() { |
| 360 | 384 | if(!$scope.cobranza.cobrador) { |
| 361 | 385 | focaModalService.alert('Ingrese primero cobrador'); |