Commit 1ef53506a0b3f46c8b6eb40dbb23d5cb6e86d0f3

Authored by Jose Pinto
1 parent 18d87d47eb
Exists in master and in 1 other branch develop

ok mail

Showing 1 changed file with 5 additions and 8 deletions   Show diff stats
src/js/controller.js
... ... @@ -5,11 +5,11 @@ angular.module('focaModalResumenCuenta')
5 5 '$scope',
6 6 '$uibModalInstance',
7 7 'focaModalResumenCuentaService',
8   - 'idCliente',
  8 + 'cliente',
9 9 '$uibModal',
10 10 'focaModalService',
11 11 function($timeout, $filter, $scope, $uibModalInstance,
12   - focaModalResumenCuentaService, idCliente, $uibModal, focaModalService) {
  12 + focaModalResumenCuentaService, cliente, $uibModal, focaModalService) {
13 13 var fecha = new Date();
14 14 $scope.generado = false;
15 15 $scope.fechaDesde = new Date(fecha.setMonth(fecha.getMonth() - 1));
... ... @@ -20,7 +20,7 @@ angular.module('focaModalResumenCuenta')
20 20  
21 21 $scope.generar = function() {
22 22 focaModalResumenCuentaService
23   - .getResumenCuenta(idCliente, $scope.fechaDesde)
  23 + .getResumenCuenta(cliente.COD, $scope.fechaDesde)
24 24 .then(function(res) {
25 25 res.data.facturas = calcularSaldos(res.data.facturas);
26 26 $scope.generado = true;
... ... @@ -42,14 +42,12 @@ angular.module('focaModalResumenCuenta')
42 42 focaModalService.mail(
43 43 {
44 44 titulo: 'Enviar comprobante',
45   - //TODO: CONFIGURAR DESCARGA
46 45 descarga: {
47 46 nombre: factura.numeroFactura + '.pdf',
48 47 url: '/mail/comprobante/descargar',
49 48 },
50 49 envio: {
51   - //TODO: TOMAR EMAIL DEL CLIENTE
52   - mailCliente: 'jpinto@focasoftware.com',
  50 + mailCliente: cliente.MAIL,
53 51 url: '/mail/comprobante'
54 52 },
55 53 options: {
... ... @@ -68,8 +66,7 @@ angular.module('focaModalResumenCuenta')
68 66 url: '/mail/resumen-cuenta/descargar',
69 67 },
70 68 envio: {
71   - //TODO: TOMAR EMAIL DEL CLIENTE
72   - mailCliente: 'jpinto@focasoftware.com',
  69 + mailCliente: cliente.MAIL,
73 70 url: '/mail/resumen-cuenta',
74 71 },
75 72 options: {