diff --git a/src/js/controller.js b/src/js/controller.js
index 9f89c17..3d51946 100644
--- a/src/js/controller.js
+++ b/src/js/controller.js
@@ -7,8 +7,9 @@ angular.module('focaCrearCobranza') .controller('cobranzaController',
'focaCrearCobranzaService',
'focaModalService',
'$cookies',
+ 'focaSeguimientoService',
function($scope, $uibModal, $location, $filter, focaCrearCobranzaService, focaModalService,
- $cookies)
+ $cookies, focaSeguimientoService)
{
$scope.botonera = [
{texto: 'Cliente', accion: function() {$scope.seleccionarCliente();}},
@@ -208,6 +209,17 @@ angular.module('focaCrearCobranza') .controller('cobranzaController',
focaCrearCobranzaService.guardarCobranza(cobranza).then(function() {
focaModalService.alert('Cobranza guardada con éxito');
+ focaSeguimientoService.guardarPosicion(
+ $scope.sucursal+$scope.comprobante,
+ 'Cobranza',
+ 'Nº: ' + $filter('comprobante')([
+ $scope.puntoVenta,
+ $scope.comprobante
+ ]) + '
' +
+ 'Vendedor: ' + $scope.usuario.NomVen + '
' +
+ 'Total: ' + $filter('currency')($scope.getTotalCobrado())
+ );
+
$scope.cobranza = {
fecha: new Date()
};