Commit 6a2e1afce424f5997454f3578da1d0f4a4b2f84a

Authored by Eric Fernandez
1 parent 9052ac9459
Exists in master

ya no es necesario obtener el usuario, sino que envío el id del cobrador

Showing 1 changed file with 3 additions and 8 deletions   Show diff stats
src/js/controller.js
... ... @@ -8,14 +8,13 @@ angular.module('focaCrearCobranza') .controller('cobranzaController',
8 8 'focaCrearCobranzaService',
9 9 'focaModalService',
10 10 '$filter',
11   - '$cookies',
12 11 'focaSeguimientoService',
13 12 'focaBotoneraLateralService',
14 13 'APP',
15 14 'focaLoginService',
16 15 function($scope, $rootScope, $timeout, $uibModal, $location, focaCrearCobranzaService,
17   - focaModalService, $filter, $cookies, focaSeguimientoService,
18   - focaBotoneraLateralService, APP, loginService)
  16 + focaModalService, $filter, focaSeguimientoService, focaBotoneraLateralService,
  17 + APP, loginService)
19 18 {
20 19  
21 20 if(APP === 'cobranza') {
... ... @@ -51,10 +50,6 @@ angular.module('focaCrearCobranza') .controller('cobranzaController',
51 50 $scope.facturaTabla = [];
52 51 $scope.cobrosTabla = [];
53 52  
54   - focaCrearCobranzaService.getUsuario($cookies.get('idUsuario')).then(function(data) {
55   - $scope.usuario = data.data;
56   - });
57   -
58 53 $timeout(function() {
59 54 focaBotoneraLateralService.showSalir(false);
60 55 focaBotoneraLateralService.showPausar(true);
... ... @@ -146,7 +141,7 @@ angular.module('focaCrearCobranza') .controller('cobranzaController',
146 141 PCI: $scope.cobrosTabla[j].provincia.ID,
147 142 LPLA: 0,
148 143 PLA: 0,
149   - VEN: $scope.usuario.CodVen,//Id vendedor
  144 + VEN: $scope.cobranza.cobrador.CodVen,//Id vendedor
150 145 CCLIE: $scope.cobranza.cliente.COD,//Id cliente
151 146 REN: 0,
152 147 PVEC: $scope.puntoVenta,