Commit 4000a4a2424c96835c91546adcd188b1e413069b

Authored by Eric Fernandez
Exists in master

Merge branch 'master' of http://git.focasoftware.com/npm/foca-crear-cobranza

src/js/controller.js
1 angular.module('focaCrearCobranza') .controller('cobranzaController', 1 angular.module('focaCrearCobranza') .controller('cobranzaController',
2 [ 2 [
3 '$scope', 3 '$scope',
4 '$uibModal', 4 '$uibModal',
5 '$location', 5 '$location',
6 '$filter', 6 '$filter',
7 'focaCrearCobranzaService', 7 'focaCrearCobranzaService',
8 'focaModalService', 8 'focaModalService',
9 '$cookies', 9 '$cookies',
10 'focaSeguimientoService', 10 'focaSeguimientoService',
11 function($scope, $uibModal, $location, $filter, focaCrearCobranzaService, focaModalService, 11 function($scope, $uibModal, $location, $filter, focaCrearCobranzaService, focaModalService,
12 $cookies, focaSeguimientoService) 12 $cookies, focaSeguimientoService)
13 { 13 {
14 $scope.botonera = [ 14 $scope.botonera = [
15 {texto: 'Cliente', accion: function() {$scope.seleccionarCliente();}}, 15 {texto: 'Cliente', accion: function() {$scope.seleccionarCliente();}},
16 {texto: 'Cobrador', accion: function() {$scope.seleccionarCobrador();}}, 16 {texto: 'Cobrador', accion: function() {$scope.seleccionarCobrador();}},
17 {texto: 'Comprobantes', accion: function() {$scope.swichDeuda();}}, 17 {texto: 'Comprobantes', accion: function() {$scope.swichDeuda();}},
18 {texto: 'Cobros', accion: function() {$scope.swichCobro();}}, 18 {texto: 'Cobros', accion: function() {$scope.swichCobro();}},
19 {texto: 'Moneda', accion: function() {$scope.seleccionarMoneda();}}, 19 {texto: 'Moneda', accion: function() {$scope.seleccionarMoneda();}},
20 {texto: '', accion: function() {}}, 20 {texto: '', accion: function() {}},
21 {texto: '', accion: function() {}}, 21 {texto: '', accion: function() {}},
22 {texto: '', accion: function() {}} 22 {texto: '', accion: function() {}}
23 ]; 23 ];
24 $scope.datepickerAbierto = false; 24 $scope.datepickerAbierto = false;
25 $scope.cobroDeuda = true; 25 $scope.cobroDeuda = true;
26 $scope.show = false; 26 $scope.show = false;
27 $scope.cargando = true; 27 $scope.cargando = true;
28 $scope.dateOptions = { 28 $scope.dateOptions = {
29 maxDate: new Date(), 29 maxDate: new Date(),
30 minDate: new Date(2010, 0, 1) 30 minDate: new Date(2010, 0, 1)
31 }; 31 };
32 32
33 $scope.cabecera = []; 33 $scope.cabecera = [];
34 $scope.showCabecera = true; 34 $scope.showCabecera = true;
35 35
36 $scope.cobranza = {}; 36 $scope.cobranza = {};
37 37
38 $scope.fecha = new Date(); 38 $scope.fecha = new Date();
39 $scope.puntoVenta = '0000'; 39 $scope.puntoVenta = '0000';
40 $scope.comprobante = '00000000'; 40 $scope.comprobante = '00000000';
41 $scope.facturaTabla = []; 41 $scope.facturaTabla = [];
42 $scope.cobrosTabla = []; 42 $scope.cobrosTabla = [];
43 43
44 focaCrearCobranzaService.getUsuario($cookies.get('idUsuario')).then(function(data) { 44 focaCrearCobranzaService.getUsuario($cookies.get('idUsuario')).then(function(data) {
45 $scope.usuario = data.data; 45 $scope.usuario = data.data;
46 }); 46 });
47 47
48 $scope.crearCobranza = function() { 48 $scope.crearCobranza = function() {
49 if(!$scope.cobranza.cliente) { 49 if(!$scope.cobranza.cliente) {
50 focaModalService.alert('Ingrese Cliente'); 50 focaModalService.alert('Ingrese Cliente');
51 return; 51 return;
52 } 52 }
53 if(!$scope.cobranza.cobrador) { 53 if(!$scope.cobranza.cobrador) {
54 focaModalService.alert('Ingrese Cobrador'); 54 focaModalService.alert('Ingrese Cobrador');
55 return; 55 return;
56 } 56 }
57 if($scope.facturaTabla.length < 1) { 57 if($scope.facturaTabla.length < 1) {
58 focaModalService.alert('Ingrese al menos una factura'); 58 focaModalService.alert('Ingrese al menos una factura');
59 return; 59 return;
60 } 60 }
61 if($scope.getTotalCobrado() + $scope.getTotalDeuda() !== 0) { 61 if($scope.getTotalCobrado() + $scope.getTotalDeuda() !== 0) {
62 focaModalService.alert('La diferencia debe ser ' + 62 focaModalService.alert('La diferencia debe ser ' +
63 $scope.cobranza.moneda.SIMBOLO + '0,00'); 63 $scope.cobranza.moneda.SIMBOLO + '0,00');
64 return; 64 return;
65 } 65 }
66 var cobranza = {}; 66 var cobranza = {};
67 var cheques = []; 67 var cheques = [];
68 var cuerpos = []; 68 var cuerpos = [];
69 //TODO: habilitar edición
70 $scope.editando = false;
69 //TODO: habilitar edición 71
70 $scope.editando = false; 72 for (var i = 0; i < $scope.facturaTabla.length; i++) {
71 73 var cuerpoFactura = {
72 for (var i = 0; i < $scope.facturaTabla.length; i++) { 74 CYV: 'V',
73 var cuerpoFactura = { 75 TIP: 'C',
74 CYV: 'V', 76 TCO: 'RC',
75 TIP: 'C', 77 PVE: $scope.puntoVenta,
76 TCO: 'RC', 78 NCO: $scope.comprobante,
77 PVE: $scope.puntoVenta, 79 LOP: 'L',
78 NCO: $scope.comprobante, 80 TIL: $scope.facturaTabla[i].TCO,
79 LOP: 'L', 81 COM: $scope.facturaTabla[i].numeroFactura + '-' +
82 $scope.rellenar($scope.facturaTabla[i].NCU,2),
80 TIL: $scope.facturaTabla[i].TCO, 83 FEC: $scope.fecha.toISOString().slice(0, 19).replace('T', ' '),
81 COM: $scope.facturaTabla[i].numeroFactura, 84 IMP: Math.abs($scope.facturaTabla[i].IPA),
82 FEC: $scope.fecha.toISOString().slice(0, 19).replace('T', ' '), 85 RES: 0,//caja de tesorería
83 IMP: $scope.facturaTabla[i].IPA, 86 SUBM: 0
84 RES: 0,//caja de tesorería 87 };
85 SUBM: 0 88 cuerpos.push(cuerpoFactura);
86 }; 89 }
87 cuerpos.push(cuerpoFactura); 90
88 } 91 for (var j = 0; j < $scope.cobrosTabla.length; j++) {
89 92
90 for (var j = 0; j < $scope.cobrosTabla.length; j++) { 93 var efectivo = $scope.cobrosTabla[j].tipo === 'Efectivo' ? true : false;
91 94
92 var efectivo = $scope.cobrosTabla[j].tipo === 'Efectivo' ? true : false; 95 var cuerpoCobros = {
93 96 CYV: 'V',
94 var cuerpoCobros = { 97 TIP: 'C',
95 CYV: 'V', 98 TCO: 'RC',
96 TIP: 'C', 99 PVE: $scope.puntoVenta,
97 TCO: 'RC', 100 NCO: $scope.comprobante,
98 PVE: $scope.puntoVenta, 101 LOP: 'P',
99 NCO: $scope.comprobante, 102 TIL: 'EF',
100 LOP: 'P', 103 COM: efectivo ? 'ef(COBRO EN EFECTIVO)' : 'ch(' +
101 TIL: 'EF', 104 $scope.cobrosTabla[j].numero + ')' + $scope.cobrosTabla[j].banco.desbco,
102 COM: efectivo ? 'ef(COBRO EN EFECTIVO)' : 'ch(' + 105 FEC: efectivo ?
103 $scope.cobrosTabla[j].numero + ')' + $scope.cobrosTabla[j].banco.desbco, 106 $scope.cobrosTabla[j].fecha
104 FEC: efectivo ? 107 .toISOString().slice(0, 19).replace('T', ' ') :
105 $scope.cobrosTabla[j].fecha 108 $scope.cobrosTabla[j].fechaPresentacion
106 .toISOString().slice(0, 19).replace('T', ' ') : 109 .toISOString().slice(0, 19).replace('T', ' '),
107 $scope.cobrosTabla[j].fechaPresentacion 110 IMP: Math.abs($scope.cobrosTabla[j].importe),
108 .toISOString().slice(0, 19).replace('T', ' '), 111 RES: 0,//caja de tesorería
109 IMP: $scope.cobrosTabla[j].importe, 112 SUBM: 0
110 RES: 0,//caja de tesorería 113 };
111 SUBM: 0 114 cuerpos.push(cuerpoCobros);
112 }; 115
113 cuerpos.push(cuerpoCobros); 116 if(!efectivo) {
114 117 var cheque = {
115 if(!efectivo) { 118 BCO: $scope.cobrosTabla[j].banco.ID,
116 var cheque = { 119 NUM: $scope.comprobante,
117 BCO: $scope.cobrosTabla[j].banco.ID, 120 FEP: $scope.cobrosTabla[j].fechaPresentacion
118 NUM: $scope.comprobante, 121 .toISOString().slice(0, 19).replace('T', ' '),
119 FEP: $scope.cobrosTabla[j].fechaPresentacion 122 FEE: $scope.cobrosTabla[j].fechaEmision
120 .toISOString().slice(0, 19).replace('T', ' '), 123 .toISOString().slice(0, 19).replace('T', ' '),
121 FEE: $scope.cobrosTabla[j].fechaEmision 124 LUG: $scope.cobrosTabla[j].localidad.NOMBRE,
122 .toISOString().slice(0, 19).replace('T', ' '), 125 IMP: $scope.cobrosTabla[j].importe,
123 LUG: $scope.cobrosTabla[j].localidad.NOMBRE, 126 LIB: $scope.cobrosTabla[j].librador,
124 IMP: $scope.cobrosTabla[j].importe, 127 EST: 'C',//'D' depositado, 'E' entregado, 'C' en cartera
125 LIB: $scope.cobrosTabla[j].librador, 128 PCI: $scope.cobrosTabla[j].provincia.ID,
126 EST: 'C',//'D' depositado, 'E' entregado, 'C' en cartera 129 LPLA: 0,
127 PCI: $scope.cobrosTabla[j].provincia.ID, 130 PLA: 0,
128 LPLA: 0, 131 VEN: $scope.usuario.CodVen,//Id vendedor
129 PLA: 0, 132 CCLIE: $scope.cobranza.cliente.COD,//Id cliente
130 VEN: $scope.usuario.CodVen,//Id vendedor 133 REN: 0,
131 CCLIE: $scope.cobranza.cliente.COD,//Id cliente 134 PVEC: $scope.puntoVenta,
132 REN: 0, 135 NCOC: $scope.comprobante,
133 PVEC: $scope.puntoVenta, 136 OBSE: $scope.cobrosTabla[j].observaciones,
134 NCOC: $scope.comprobante, 137 LUV: 0,
135 OBSE: $scope.cobrosTabla[j].observaciones, 138 ORI: 've',
136 LUV: 0, 139 FER: '',
137 ORI: 've', 140 BIMP: 0,
138 FER: '', 141 COMP: 'C ' +'RC ' + $scope.puntoVenta + '-' + $scope.comprobante,
139 BIMP: 0, 142 VAL_E: '',//Cuando egresa por ingresos y egresos en el numero de egreso
140 COMP: 'C ' +'RC ' + $scope.puntoVenta + '-' + $scope.comprobante, 143 VAL_I: '',//Cuando Ingresa por ingresos y egresos en el numero ingreso
141 VAL_E: '',//Cuando egresa por ingresos y egresos en el numero de egreso 144 REC_CAJ: 'D',
142 VAL_I: '',//Cuando Ingresa por ingresos y egresos en el numero ingreso 145 TIPO_C: 0,//??
143 REC_CAJ: 'D', 146 SALDO_CAJ: 'S',
144 TIPO_C: 0,//?? 147 FECHA_INGRESO: $scope.fecha
145 SALDO_CAJ: 'S', 148 .toISOString().slice(0, 19).replace('T', ' '),
146 FECHA_INGRESO: $scope.fecha 149 Vendedor_valor: 0,
147 .toISOString().slice(0, 19).replace('T', ' '), 150 FAMILIA: 0,
148 Vendedor_valor: 0, 151 CUIT_LIB: '',
149 FAMILIA: 0, 152 COD_LUG: $scope.cobrosTabla[j].localidad.ID,//código lugar
150 CUIT_LIB: '', 153 SEN: '',
151 COD_LUG: $scope.cobrosTabla[j].localidad.ID,//código lugar 154 NRC: 0,
152 SEN: '', 155 COD_LARGO: '',
153 NRC: 0, 156 VN: 0,
154 COD_LARGO: '', 157 ID_LECTOR: 0,
155 VN: 0, 158 NATHB: ''
156 ID_LECTOR: 0, 159 };
157 NATHB: '' 160 cheques.push(cheque);
158 }; 161 }
159 cheques.push(cheque); 162 }
160 } 163
161 } 164 cobranza = {
162 165 recibo: {
163 cobranza = { 166 CYV: 'V',
164 recibo: { 167 TIP: 'C',
165 CYV: 'V', 168 TCO: 'RC',
166 TIP: 'C', 169 PVE: $scope.puntoVenta, //Sucursar, punto de venta
167 TCO: 'RC', 170 NCO: $scope.comprobante, //Numero de comprobante
168 PVE: $scope.puntoVenta, //Sucursar, punto de venta 171 FEC: $scope.fecha.toISOString().slice(0, 19).replace('T', ' '),
169 NCO: $scope.comprobante, //Numero de comprobante 172 CLI: $scope.cobranza.cliente.COD,
170 FEC: $scope.fecha.toISOString().slice(0, 19).replace('T', ' '), 173 ATO: 0, //número de asiento
171 CLI: $scope.cobranza.cliente.COD, 174 CFE: $scope.cobranza.cobrador.nombre,
172 ATO: 0, //número de asiento 175 PLA: '',//Numero de planilla, sin uso
173 CFE: $scope.cobranza.cobrador.nombre, 176 ID_MONEDA: $scope.cobranza.moneda.ID,
174 PLA: '',//Numero de planilla, sin uso 177 COTIZACION: $scope.cobranza.cotizacion.VENDEDOR,
178 idCobrador: $scope.cobranza.cobrador.id
175 ID_MONEDA: $scope.cobranza.moneda.ID, 179 },
176 COTIZACION: $scope.cobranza.cotizacion.VENDEDOR 180 cuerpo: cuerpos,
177 }, 181 cheques: cheques,
178 cuerpo: cuerpos, 182 acobypag: {
179 cheques: cheques, 183 CYV: 'V',
180 acobypag: { 184 COD: $scope.cobranza.cliente.COD,
181 CYV: 'V', 185 FEP: $scope.fecha.toISOString().slice(0, 19).replace('T', ' '),
182 COD: $scope.cobranza.cliente.COD, 186 TIP: 'C',
183 FEP: $scope.fecha.toISOString().slice(0, 19).replace('T', ' '), 187 TCO: 'RC',
184 TIP: '',//?? 188 SUC: $scope.puntoVenta,
185 TCO: 'RC', 189 NCO: $scope.comprobante,
186 SUC: $scope.puntoVenta, 190 IPA: $scope.getTotalCobrado(),
187 NCO: $scope.comprobante, 191 SAL: '',//??
188 IPA: $scope.getTotalCobrado(), 192 TCA: 1,
189 SAL: '',//?? 193 ZONA: 1,
190 TCA: 1, 194 FPA: 2,//Forma de pago
191 ZONA: 1, 195 REC: 0,
192 FPA: 2,//Forma de pago 196 REP: 0,
193 REC: 0, 197 FER: null,
194 REP: 0, 198 REM: 0,
195 FER: null, 199 FRE: null,//??
196 REM: 0, 200 PRO: 'N',
197 FRE: null,//?? 201 FEV: $scope.fecha.toISOString().slice(0, 19).replace('T', ' ')
198 PRO: 'N', 202 },
199 FEV: $scope.fecha.toISOString().slice(0, 19).replace('T', ' ') 203 datosCobrador: {
200 }, 204 COD: $scope.cobranza.cobrador.id,
201 datosCobrador: { 205 PVE: $scope.puntoVenta,
202 COD: $scope.cobranza.cobrador.id, 206 NUM: $scope.comprobante,
203 PVE: $scope.puntoVenta, 207 EST: 'C',
204 NUM: $scope.comprobante, 208 OBS: 'RC: ' + $scope.comprobante + '-' + $scope.fecha.toLocaleDateString(),
205 EST: 'C', 209 DAT1: 'C',
206 OBS: 'RC: ' + $scope.comprobante + '-' + $scope.fecha.toLocaleDateString(), 210 CLI: $scope.cobranza.cliente.COD
207 DAT1: 'C', 211 }
208 CLI: $scope.cobranza.cliente.COD 212 };
209 } 213 focaCrearCobranzaService.guardarCobranza(cobranza).then(function(result) {
210 }; 214 focaModalService.alert('Cobranza guardada con éxito');
215 console.info(result);
216
217 console.info({
218 numero: result.data.numero,
219 actividad: 'Cobranza',
220 observaciones: 'Nº: ' + $filter('comprobante')([
221 result.data.sucursal,
222 result.data.numero
223 ]) + '<br/>' +
224 'Vendedor: ' + $scope.cobranza.cobrador.nombre + '<br/>' +
225 'Total: ' + $filter('currency')($scope.getTotalCobrado()),
226 sucursal: result.data.sucursal
227 });
211 focaCrearCobranzaService.guardarCobranza(cobranza).then(function() { 228
212 focaModalService.alert('Cobranza guardada con éxito'); 229 focaSeguimientoService.guardarPosicion(
213 230 result.data.numero,
214 focaSeguimientoService.guardarPosicion( 231 'Cobranza',
215 $scope.comprobante, 232 'Nº: ' + $filter('comprobante')([
216 'Cobranza', 233 result.data.sucursal,
217 'Nº: ' + $filter('comprobante')([ 234 result.data.numero
218 $scope.puntoVenta, 235 ]) + '<br/>' +
219 $scope.comprobante 236 'Vendedor: ' + $scope.cobranza.cobrador.nombre + '<br/>' +
220 ]) + '<br/>' + 237 'Total: ' + $filter('currency')($scope.getTotalCobrado()),
238 result.data.sucursal
221 'Vendedor: ' + $scope.cobranza.cobrador.nombre + '<br/>' + 239 );
222 'Total: ' + $filter('currency')($scope.getTotalCobrado()), 240
223 $scope.puntoVenta 241 $scope.cobranza = {
224 ); 242 fecha: new Date()
225 243 };
226 $scope.cobranza = { 244 setearMonedaPorDefecto();
227 fecha: new Date() 245 obtenerNumeroComprobante();
228 }; 246
229 setearMonedaPorDefecto(); 247 $scope.cabecera = [];
230 obtenerNumeroComprobante(); 248 $scope.fecha = new Date();
231 249 $scope.facturaTabla = [];
232 $scope.cabecera = []; 250 $scope.cobrosTabla = [];
233 $scope.fecha = new Date(); 251 });
234 $scope.facturaTabla = []; 252 };
235 $scope.cobrosTabla = []; 253
236 }); 254 $scope.swichCobro = function() {
237 }; 255 $scope.cobroDeuda = false;
238 256 };
239 $scope.swichCobro = function() { 257
240 $scope.cobroDeuda = false; 258 $scope.swichDeuda = function() {
241 }; 259 $scope.cobroDeuda = true;
242 260 };
243 $scope.swichDeuda = function() { 261
262 $scope.seleccionarCobranza = function() {
263
264 var modalInstance = $uibModal.open(
265 {
266 ariaLabelledBy: 'Busqueda de Cobranzas',
267 templateUrl: 'foca-modal-cobranza.html',
268 controller: 'focaModalCobranzaController',
269 size: 'lg'
270 }
271 );
272 modalInstance.result.then(function(cobranza) {
273 $scope.editando = true;
274 $scope.cabecera = [];
275 $scope.facturaTabla = [];
276 $scope.cobrosTabla = [];
277
278 $scope.fecha = new Date(cobranza.fecha);
279
280 addCabecera('Cliente:', cobranza.cliente.NOM);
281 addCabecera('Cobrador:', cobranza.cobrador);
282
283 $scope.facturaTabla = cobranza.facturas;
284 $scope.cobrosTabla = cobranza.cobros;
285
286 });
287 };
288
244 $scope.cobroDeuda = true; 289 $scope.seleccionarCliente = function() {
245 }; 290
246 291 var modalInstance = $uibModal.open(
247 $scope.seleccionarCobranza = function() { 292 {
248 293 ariaLabelledBy: 'Busqueda de Cliente',
249 var modalInstance = $uibModal.open( 294 templateUrl: 'foca-busqueda-cliente-modal.html',
250 { 295 controller: 'focaBusquedaClienteModalController',
251 ariaLabelledBy: 'Busqueda de Cobranzas', 296 size: 'lg'
252 templateUrl: 'foca-modal-cobranza.html', 297 }
253 controller: 'focaModalCobranzaController', 298 );
254 size: 'lg' 299 modalInstance.result.then(
255 } 300 function(cliente) {
256 ); 301 addCabecera('Cliente:', cliente.nom);
257 modalInstance.result.then(function(cobranza) { 302 $scope.cobranza.cliente = {
258 $scope.editando = true; 303 COD: cliente.cod,
259 $scope.cabecera = []; 304 CUIT: cliente.cuit,
260 $scope.facturaTabla = []; 305 NOM: cliente.nom
261 $scope.cobrosTabla = []; 306 };
262 307 }, function() {
263 $scope.fecha = new Date(cobranza.fecha); 308
264 309 }
265 addCabecera('Cliente:', cobranza.cliente.NOM); 310 );
266 addCabecera('Cobrador:', cobranza.cobrador); 311 };
267 312
268 $scope.facturaTabla = cobranza.facturas; 313 $scope.seleccionarFactura = function() {
269 $scope.cobrosTabla = cobranza.cobros; 314 if(!$scope.cobranza.cliente) {
270 315 focaModalService.alert('Seleccione primero un cliente');
271 }); 316 return;
272 }; 317 }
273 318 var modalInstance = $uibModal.open(
274 $scope.seleccionarCliente = function() { 319 {
275 320 ariaLabelledBy: 'Busqueda de Facturas',
276 var modalInstance = $uibModal.open( 321 templateUrl: 'foca-modal-factura.html',
277 { 322 controller: 'focaModalFacturaController',
278 ariaLabelledBy: 'Busqueda de Cliente', 323 size: 'lg',
279 templateUrl: 'foca-busqueda-cliente-modal.html', 324 resolve: {
280 controller: 'focaBusquedaClienteModalController', 325 parametrosFactura: function() {
281 size: 'lg' 326 return {
282 } 327 cliente: $scope.cobranza.cliente.COD,
283 ); 328 simbolo: $scope.cobranza.moneda.SIMBOLO,
284 modalInstance.result.then( 329 cotizacion: $scope.cobranza.cotizacion.VENDEDOR,
285 function(cliente) { 330 moneda: $scope.cobranza.moneda.ID
286 addCabecera('Cliente:', cliente.nom); 331 };
287 $scope.cobranza.cliente = { 332 }
288 COD: cliente.cod, 333 }
289 CUIT: cliente.cuit, 334 }
290 NOM: cliente.nom 335 );
291 }; 336 modalInstance.result.then(
292 }, function() { 337 function(facturas) {
293 338 $scope.facturaTabla = $scope.facturaTabla.concat(facturas);
294 } 339 }, function() {
295 ); 340
296 }; 341 }
297 342 );
298 $scope.seleccionarFactura = function() { 343 };
299 if(!$scope.cobranza.cliente) { 344
300 focaModalService.alert('Seleccione primero un cliente'); 345 $scope.seleccionarCheque = function() {
301 return; 346 var modalInstance = $uibModal.open(
302 } 347 {
303 var modalInstance = $uibModal.open( 348 ariaLabelledBy: 'Carga de cheques',
304 { 349 templateUrl: 'modal-cheque.html',
305 ariaLabelledBy: 'Busqueda de Facturas', 350 controller: 'focaModalChequeController',
306 templateUrl: 'foca-modal-factura.html', 351 size: 'lg'
307 controller: 'focaModalFacturaController', 352 }
308 size: 'lg', 353 );
309 resolve: { 354 modalInstance.result.then(
310 parametrosFactura: function() { 355 function(cheque) {
311 return { 356 var cobro = {
312 cliente: $scope.cobranza.cliente.COD, 357 tipo: 'Ch' + '(' + cheque.numero + ')' + ' ' + cheque.banco.desbco,
313 simbolo: $scope.cobranza.moneda.SIMBOLO, 358 numero: cheque.numero,
314 cotizacion: $scope.cobranza.cotizacion.VENDEDOR, 359 banco: cheque.banco,
315 moneda: $scope.cobranza.moneda.ID 360 fecha: cheque.fechaEmision.toLocaleDateString() + '-' +
316 }; 361 cheque.fechaPresentacion.toLocaleDateString(),
317 } 362 fechaPresentacion: cheque.fechaPresentacion,
318 } 363 fechaEmision: cheque.fechaEmision,
319 } 364 importe: cheque.importe * $scope.cobranza.cotizacion.VENDEDOR,
320 ); 365 localidad: cheque.localidad,
321 modalInstance.result.then( 366 librador: cheque.librador,
322 function(facturas) { 367 provincia: cheque.provincia,
323 $scope.facturaTabla = $scope.facturaTabla.concat(facturas); 368 observaciones: cheque.observaciones
324 }, function() { 369 };
325 370 $scope.cobrosTabla.push(cobro);
326 } 371 }, function() {
327 ); 372
328 }; 373 }
329 374 );
330 $scope.seleccionarCheque = function() { 375 };
331 var modalInstance = $uibModal.open( 376
332 { 377 $scope.seleccionarEfectivo = function() {
333 ariaLabelledBy: 'Carga de cheques', 378 var modalInstance = $uibModal.open(
334 templateUrl: 'modal-cheque.html', 379 {
335 controller: 'focaModalChequeController', 380 ariaLabelledBy: 'Carga de cheques',
336 size: 'lg' 381 templateUrl: 'modal-efectivo.html',
337 } 382 controller: 'focaModalEfectivoController',
338 ); 383 size: 'sm'
339 modalInstance.result.then( 384 }
340 function(cheque) { 385 );
341 var cobro = { 386 modalInstance.result.then(
342 tipo: 'Ch' + '(' + cheque.numero + ')' + ' ' + cheque.banco.desbco, 387 function(efectivo) {
343 numero: cheque.numero, 388 var cobro = {
344 banco: cheque.banco, 389 tipo: 'Efectivo',
345 fecha: cheque.fechaEmision.toLocaleDateString() + '-' + 390 fecha: new Date(),
346 cheque.fechaPresentacion.toLocaleDateString(), 391 importe: efectivo * $scope.cobranza.cotizacion.VENDEDOR
347 fechaPresentacion: cheque.fechaPresentacion, 392 };
348 fechaEmision: cheque.fechaEmision, 393 $scope.cobrosTabla.push(cobro);
349 importe: cheque.importe * $scope.cobranza.cotizacion.VENDEDOR, 394 }, function() {
350 localidad: cheque.localidad, 395
351 librador: cheque.librador, 396 }
352 provincia: cheque.provincia, 397 );
353 observaciones: cheque.observaciones 398 };
354 }; 399
355 $scope.cobrosTabla.push(cobro); 400 $scope.seleccionarMoneda = function() {
356 }, function() { 401 var modalInstance = $uibModal.open(
357 402 {
358 } 403 ariaLabelledBy: 'Busqueda de Moneda',
359 ); 404 templateUrl: 'modal-moneda.html',
360 }; 405 controller: 'focaModalMonedaController',
361 406 size: 'lg'
362 $scope.seleccionarEfectivo = function() { 407 }
363 var modalInstance = $uibModal.open( 408 );
364 { 409 modalInstance.result.then(
365 ariaLabelledBy: 'Carga de cheques', 410 function(moneda) {
366 templateUrl: 'modal-efectivo.html', 411 $scope.seleccionarCotizacion(moneda);
367 controller: 'focaModalEfectivoController', 412 }, function() {
368 size: 'sm' 413
369 } 414 }
370 ); 415 );
371 modalInstance.result.then( 416 };
372 function(efectivo) { 417
373 var cobro = { 418 $scope.seleccionarCotizacion = function(moneda) {
374 tipo: 'Efectivo', 419 var modalInstance = $uibModal.open(
375 fecha: new Date(), 420 {
376 importe: efectivo * $scope.cobranza.cotizacion.VENDEDOR 421 ariaLabelledBy: 'Busqueda de Cotización',
377 }; 422 templateUrl: 'modal-cotizacion.html',
378 $scope.cobrosTabla.push(cobro); 423 controller: 'focaModalCotizacionController',
379 }, function() { 424 size: 'lg',
380 425 resolve: {idMoneda: function() {return moneda.ID;}}
381 } 426 }
382 ); 427 );
383 }; 428 modalInstance.result.then(
384 429 function(cotizacion) {
385 $scope.seleccionarMoneda = function() { 430 $scope.cobranza.moneda = moneda;
386 var modalInstance = $uibModal.open( 431 $scope.cobranza.cotizacion = cotizacion;
387 { 432 addCabecera('Moneda:', moneda.DETALLE);
388 ariaLabelledBy: 'Busqueda de Moneda', 433 addCabecera(
389 templateUrl: 'modal-moneda.html', 434 'Fecha cotizacion:',
390 controller: 'focaModalMonedaController', 435 $filter('date')(cotizacion.FECHA, 'dd/MM/yyyy')
391 size: 'lg' 436 );
392 } 437 addCabecera('Cotizacion:', cotizacion.VENDEDOR);
393 ); 438 }, function() {
394 modalInstance.result.then( 439
395 function(moneda) { 440 }
396 $scope.seleccionarCotizacion(moneda); 441 );
397 }, function() { 442 };
398 443
399 } 444 $scope.seleccionarCobrador = function() {
400 ); 445 var modalInstance = $uibModal.open(
401 }; 446 {
402 447 ariaLabelledBy: 'Busqueda de Cobradores',
403 $scope.seleccionarCotizacion = function(moneda) { 448 templateUrl: 'modal-cobradores.html',
404 var modalInstance = $uibModal.open( 449 controller: 'focaModalCobradoresController',
405 { 450 size: 'lg'
406 ariaLabelledBy: 'Busqueda de Cotización', 451 }
407 templateUrl: 'modal-cotizacion.html', 452 );
408 controller: 'focaModalCotizacionController', 453 modalInstance.result.then(
409 size: 'lg', 454 function(cobrador) {
410 resolve: {idMoneda: function() {return moneda.ID;}} 455 addCabecera('Cobrador:', cobrador.nombre);
411 } 456 $scope.cobranza.cobrador = cobrador;
412 ); 457 }, function() {
413 modalInstance.result.then( 458
414 function(cotizacion) { 459 }
415 $scope.cobranza.moneda = moneda; 460 );
416 $scope.cobranza.cotizacion = cotizacion; 461 };
417 addCabecera('Moneda:', moneda.DETALLE); 462
418 addCabecera( 463 $scope.getTotalDeuda = function() {
419 'Fecha cotizacion:', 464 var total = 0;
420 $filter('date')(cotizacion.FECHA, 'dd/MM/yyyy') 465 for (var i = 0; i < $scope.facturaTabla.length; i++) {
421 ); 466 total += $scope.facturaTabla[i].IPA;
422 addCabecera('Cotizacion:', cotizacion.VENDEDOR); 467 }
423 }, function() { 468 return parseFloat(total.toFixed(2));
424 469 };
425 } 470
426 ); 471 $scope.getTotalCobrado = function() {
427 }; 472 var total = 0;
428 473 for (var i = 0; i < $scope.cobrosTabla.length; i++) {
429 $scope.seleccionarCobrador = function() { 474 total += $scope.cobrosTabla[i].importe;
430 var modalInstance = $uibModal.open( 475 }
431 { 476 return parseFloat(total.toFixed(2));
432 ariaLabelledBy: 'Busqueda de Cobradores', 477 };
433 templateUrl: 'modal-cobradores.html', 478
434 controller: 'focaModalCobradoresController', 479 $scope.getSubTotal = function() {
435 size: 'lg' 480 if($scope.articuloACargar) {
436 } 481 return $scope.articuloACargar.precio * $scope.articuloACargar.cantidad;
437 ); 482 }
438 modalInstance.result.then( 483 };
439 function(cobrador) { 484 //Recibe aviso si el teclado está en uso
440 addCabecera('Cobrador:', cobrador.nombre); 485 // $rootScope.$on('usarTeclado', function(event, data) {
441 $scope.cobranza.cobrador = cobrador; 486 // if(data) {
442 }, function() { 487 // $scope.mostrarTeclado = true;
443 488 // return;
444 } 489 // }
445 ); 490 // $scope.mostrarTeclado = false;
446 }; 491 // })
447 492 $scope.selectFocus = function($event) {
448 $scope.getTotalDeuda = function() { 493 //Si el teclado esta en uso no selecciona el valor
449 var total = 0; 494 // if($scope.mostrarTeclado) {
450 for (var i = 0; i < $scope.facturaTabla.length; i++) { 495 // return;
451 total += $scope.facturaTabla[i].IPA; 496 // }
452 } 497 $event.target.select();
453 return parseFloat(total.toFixed(2)); 498 };
454 }; 499
455 500 $scope.salir = function() {
456 $scope.getTotalCobrado = function() { 501 $location.path('/');
457 var total = 0; 502 };
458 for (var i = 0; i < $scope.cobrosTabla.length; i++) { 503
459 total += $scope.cobrosTabla[i].importe; 504 $scope.parsearATexto = function(articulo) {
460 } 505 articulo.cantidad = parseFloat(articulo.cantidad);
461 return parseFloat(total.toFixed(2)); 506 articulo.precio = parseFloat(articulo.precio);
462 }; 507 };
463 508
464 $scope.getSubTotal = function() { 509 $scope.rellenar = function(relleno, longitud) {
465 if($scope.articuloACargar) { 510 relleno = '' + relleno;
466 return $scope.articuloACargar.precio * $scope.articuloACargar.cantidad; 511 while (relleno.length < longitud) {
467 } 512 relleno = '0' + relleno;
468 }; 513 }
469 //Recibe aviso si el teclado está en uso 514
470 // $rootScope.$on('usarTeclado', function(event, data) { 515 return relleno;
471 // if(data) { 516 };
472 // $scope.mostrarTeclado = true; 517
473 // return; 518 $scope.quitarFactura = function(key) {
474 // } 519 $scope.facturaTabla.splice(key, 1);
475 // $scope.mostrarTeclado = false; 520 };
476 // }) 521
477 $scope.selectFocus = function($event) { 522 $scope.quitarCobro = function(key) {
478 //Si el teclado esta en uso no selecciona el valor 523 $scope.cobrosTabla.splice(key, 1);
479 // if($scope.mostrarTeclado) { 524 };
480 // return; 525
481 // } 526 function addCabecera(label, valor) {
482 $event.target.select(); 527 var propiedad = $filter('filter')($scope.cabecera, {label: label}, true);
483 }; 528 if(propiedad.length === 1) {
484 529 propiedad[0].valor = valor;
485 $scope.salir = function() { 530 } else {
486 $location.path('/'); 531 $scope.cabecera.push({label: label, valor: valor});
487 }; 532 }
488 533 }
489 $scope.parsearATexto = function(articulo) { 534 // TODO: descomentar cuando se use
490 articulo.cantidad = parseFloat(articulo.cantidad); 535 /*function removeCabecera(label) {
491 articulo.precio = parseFloat(articulo.precio); 536 var propiedad = $filter('filter')($scope.cabecera, {label: label}, true);
492 }; 537 if(propiedad.length === 1){
493 538 $scope.cabecera.splice($scope.cabecera.indexOf(propiedad[0]), 1);
494 $scope.rellenar = function(relleno, longitud) { 539 }
495 relleno = '' + relleno; 540 }*/
496 while (relleno.length < longitud) { 541 function setearMonedaPorDefecto() {
497 relleno = '0' + relleno; 542 var monedaPorDefecto;
498 } 543 //Trabajo con la cotización más reciente, por eso uso siempre la primera '[0]'
499 544 focaCrearCobranzaService.getCotizacionByIdMoneda(1).then(function(res) {
500 return relleno; 545 monedaPorDefecto = res.data[0];
501 }; 546 $scope.cobranza.moneda = monedaPorDefecto;
502 547 $scope.cobranza.cotizacion = monedaPorDefecto.cotizaciones[0];
503 $scope.quitarFactura = function(key) { 548 });
504 $scope.facturaTabla.splice(key, 1); 549 }
505 }; 550
506 551 function obtenerNumeroComprobante() {
507 $scope.quitarCobro = function(key) { 552 focaCrearCobranzaService.getNumeroRecibo().then(
508 $scope.cobrosTabla.splice(key, 1); 553 function(res) {
509 }; 554 $scope.puntoVenta = $scope.rellenar(res.data.sucursal, 4);
510 555 $scope.comprobante = $scope.rellenar(res.data.numeroRecibo, 8);
511 function addCabecera(label, valor) { 556 },
512 var propiedad = $filter('filter')($scope.cabecera, {label: label}, true); 557 function(err) {
513 if(propiedad.length === 1) { 558 focaModalService.alert('La terminal no esta configurada correctamente');
514 propiedad[0].valor = valor; 559 console.info(err);
515 } else { 560 }
516 $scope.cabecera.push({label: label, valor: valor}); 561 );
517 } 562 }
518 } 563 obtenerNumeroComprobante();
519 // TODO: descomentar cuando se use 564 setearMonedaPorDefecto();
520 /*function removeCabecera(label) { 565 }
521 var propiedad = $filter('filter')($scope.cabecera, {label: label}, true); 566 ]);
522 if(propiedad.length === 1){ 567
src/views/cobranza.html
1 <div class="crear-nota-pedido"> 1 <div class="crear-nota-pedido">
2 <form name="formCrearNota" ng-submit="crearNotaPedido()" class="mb-0"> 2 <form name="formCrearNota" ng-submit="crearNotaPedido()" class="mb-0">
3 <div class="row"> 3 <div class="row">
4 <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2"> 4 <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2">
5 <div class="row p-1 panel-informativo"> 5 <div class="row p-1 panel-informativo">
6 <div class="col-12"> 6 <div class="col-12">
7 <div class="row"> 7 <div class="row">
8 <div class="col-12 col-sm-4 nota-pedido"> 8 <div class="col-12 col-sm-4 nota-pedido">
9 <strong>RECIBO DE COBRANZA</strong> 9 <strong>RECIBO DE COBRANZA</strong>
10 </div> 10 </div>
11 <div class="col-5 col-sm-4 numero-pedido" 11 <div class="col-5 col-sm-4 numero-pedido"
12 >Nº {{puntoVenta}}-{{comprobante}} 12 >Nº {{puntoVenta}}-{{comprobante}}
13 <button
14 class="btn btn-xs btn-outline-dark"
15 type="button"
16 ng-click="seleccionarCobranza()"
17 >
18 <i class="fa fa-search"></i>
19 </button>
13 <button 20 </div>
14 class="btn btn-xs btn-outline-dark" 21 <div class="col-7 col-sm-4 text-right">
15 type="button" 22 Fecha:
16 ng-click="seleccionarCobranza()" 23 <span
17 > 24 ng-show="!datepickerAbierto"
18 <i class="fa fa-search"></i> 25 ng-bind="fecha | date:'dd/MM/yyyy HH:mm'"
19 </button> 26 ng-click="datepickerAbierto = true"
20 </div> 27 >
21 <div class="col-7 col-sm-4 text-right"> 28 </span>
22 Fecha: 29 <input
23 <span 30 ng-show="datepickerAbierto"
24 ng-show="!datepickerAbierto" 31 type="date"
25 ng-bind="fecha | date:'dd/MM/yyyy HH:mm'" 32 ng-model="fecha"
26 ng-click="datepickerAbierto = true" 33 ng-change="datepickerAbierto = false"
27 > 34 ng-blur="datepickerAbierto = false"
28 </span> 35 class="form-control form-control-sm col-8 float-right"
29 <input 36 foca-focus="datepickerAbierto"
30 ng-show="datepickerAbierto" 37 hasta-hoy
31 type="date" 38 />
32 ng-model="fecha" 39 </div>
33 ng-change="datepickerAbierto = false" 40 </div>
34 ng-blur="datepickerAbierto = false" 41 <div class="row">
35 class="form-control form-control-sm col-8 float-right" 42 <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera">
36 foca-focus="datepickerAbierto" 43 <span class="label" ng-bind="cab.label"></span>
37 hasta-hoy 44 <span class="valor" ng-bind="cab.valor"></span>
38 /> 45 </div>
39 </div> 46 <a
40 </div> 47 class="btn col-12 btn-secondary d-sm-none"
41 <div class="row"> 48 ng-show="cabecera.length > 0"
42 <div class="col-auto" ng-repeat="cab in cabecera" ng-show="showCabecera"> 49 ng-click="showCabecera = !showCabecera"
43 <span class="label" ng-bind="cab.label"></span> 50 >
44 <span class="valor" ng-bind="cab.valor"></span> 51 <i
45 </div> 52 class="fa fa-chevron-down"
46 <a 53 ng-hide="showCabecera"
47 class="btn col-12 btn-secondary d-sm-none" 54 aria-hidden="true"
48 ng-show="cabecera.length > 0" 55 >
49 ng-click="showCabecera = !showCabecera" 56 </i>
50 > 57 <i
51 <i 58 class="fa fa-chevron-up"
52 class="fa fa-chevron-down" 59 ng-show="showCabecera"
53 ng-hide="showCabecera" 60 aria-hidden="true">
54 aria-hidden="true" 61 </i>
55 > 62 </a>
56 </i> 63 </div>
57 <i 64 </div>
58 class="fa fa-chevron-up" 65 </div>
59 ng-show="showCabecera" 66 <div class="row p-1 botonera-secundaria">
60 aria-hidden="true"> 67 <div class="col-12">
61 </i> 68 <div class="row">
62 </a> 69 <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera">
63 </div> 70 <button
64 </div> 71 type="button"
65 </div> 72 class="btn btn-default btn-block btn-xs text-left py-2"
66 <div class="row p-1 botonera-secundaria"> 73 ng-click="boton.accion()"
67 <div class="col-12"> 74 ng-class="{'d-none d-sm-block': boton.texto == ''}"
68 <div class="row"> 75 >
69 <div class="col-6 col-sm-3 px-0 py-0" ng-repeat="boton in botonera"> 76 <i
70 <button 77 class="fa fa-arrow-circle-right"
71 type="button" 78 ng-show="boton.texto != ''"
72 class="btn btn-default btn-block btn-xs text-left py-2" 79 ></i>
73 ng-click="boton.accion()" 80 &nbsp;
74 ng-class="{'d-none d-sm-block': boton.texto == ''}" 81 {{boton.texto}}
75 > 82 </button>
76 <i 83 </div>
77 class="fa fa-arrow-circle-right" 84 </div>
78 ng-show="boton.texto != ''" 85 </div>
79 ></i> 86 </div>
80 &nbsp; 87 </div>
81 {{boton.texto}} 88 </div>
82 </button> 89 </form>
83 </div> 90 <div class="row">
84 </div> 91 <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2">
85 </div> 92 <!-- PC -->
86 </div> 93 <div class="row grilla-articulo align-items-end d-none d-sm-flex" ng-show="cobroDeuda">
87 </div> 94 <table class="table tabla-articulo table-striped table-sm table-dark">
88 </div> 95 <thead>
89 </form> 96 <tr class="d-flex">
90 <div class="row"> 97 <th class="col-auto">#</th>
91 <div class="col-12 col-md-10 col-lg-8 offset-md-1 offset-lg-2"> 98 <th class="col">Comprobante</th>
92 <!-- PC --> 99 <th class="col">Fecha</th>
93 <div class="row grilla-articulo align-items-end d-none d-sm-flex" ng-show="cobroDeuda"> 100 <th class="col">Importe</th>
94 <table class="table tabla-articulo table-striped table-sm table-dark"> 101 <th class="col-auto">
95 <thead> 102 <button
96 <tr class="d-flex"> 103 class="btn btn-outline-secondary selectable"
97 <th class="col-auto">#</th> 104 ng-click="show = !show; masMenos()"
98 <th class="col">Comprobante</th> 105 >
99 <th class="col">Fecha</th> 106 <i
100 <th class="col">Importe</th> 107 class="fa fa-chevron-down"
101 <th class="col-auto"> 108 ng-show="show"
102 <button 109 aria-hidden="true"
103 class="btn btn-outline-secondary selectable" 110 >
104 ng-click="show = !show; masMenos()" 111 </i>
105 > 112 <i
106 <i 113 class="fa fa-chevron-up"
107 class="fa fa-chevron-down" 114 ng-hide="show"
108 ng-show="show" 115 aria-hidden="true">
109 aria-hidden="true" 116 </i>
110 > 117 </button>
111 </i> 118 </th>
112 <i 119 </th>
113 class="fa fa-chevron-up" 120 </tr>
114 ng-hide="show" 121 </thead>
115 aria-hidden="true"> 122 <tbody class="tabla-articulo-body">
116 </i> 123 <tr
117 </button> 124 ng-repeat="(key, factura) in facturaTabla"
118 </th> 125 class="d-flex"
119 </th> 126 ng-show="show || key == facturaTabla.length - 1"
120 </tr> 127 >
121 </thead> 128 <td ng-bind="key + 1" class="col-auto"></td>
122 <tbody class="tabla-articulo-body"> 129 <td class="col" ng-bind="factura.numeroFactura"
123 <tr 130 ></td>
124 ng-repeat="(key, factura) in facturaTabla" 131 <td class="col" ng-bind="factura.FEP | date : 'dd/MM/yyyy'"></td>
125 class="d-flex" 132 <td
126 ng-show="show || key == facturaTabla.length - 1" 133 class="col"
127 > 134 ng-bind="(factura.IPA / cobranza.cotizacion.VENDEDOR) |
128 <td ng-bind="key + 1" class="col-auto"></td> 135 currency: cobranza.moneda.SIMBOLO : 4"></td>
129 <td class="col" ng-bind="factura.numeroFactura" 136 <td class="text-center col-auto">
130 ></td> 137 <button
131 <td class="col" ng-bind="factura.FEP | date : 'dd/MM/yyyy'"></td> 138 class="btn btn-outline-secondary"
132 <td 139 ng-click="quitarFactura(key)"
133 class="col" 140 >
134 ng-bind="(factura.IPA / cobranza.cotizacion.VENDEDOR) | 141 <i class="fa fa-trash"></i>
135 currency: cobranza.moneda.SIMBOLO : 4"></td> 142 </button>
136 <td class="text-center col-auto"> 143 </td>
137 <button 144 </tr>
138 class="btn btn-outline-secondary" 145 </tbody>
139 ng-click="quitarFactura(key)" 146 <tfoot>
140 > 147 <tr ng-show="cargando" class="d-flex">
141 <i class="fa fa-trash"></i> 148 <td class="col-2">
142 </button> 149 <a
143 </td> 150 class="form-control form-control-sm btn btn-secondary"
144 </tr> 151 ng-click="seleccionarFactura()"
145 </tbody> 152 >Pendientes</a>
146 <tfoot> 153 </td>
147 <tr ng-show="cargando" class="d-flex"> 154 </tr>
148 <td class="col-2"> 155 <tr class="d-flex">
149 <a 156 <td class="col-auto px-1">
150 class="form-control form-control-sm btn btn-secondary" 157 <strong>Comprobantes:</strong>
151 ng-click="seleccionarFactura()" 158 <a ng-bind="facturaTabla.length"></a>
152 >Pendientes</a> 159 </td>
153 </td> 160 <td class="text-right ml-auto table-celda-total no-border-top">
154 </tr> 161 <strong>Cancela:</strong>
155 <tr class="d-flex"> 162 </td>
156 <td class="col-auto px-1"> 163 <td class="table-celda-total text-right no-border-top">
157 <strong>Comprobantes:</strong> 164 <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) |
158 <a ng-bind="facturaTabla.length"></a> 165 currency: cobranza.moneda.SIMBOLO}}</strong>
159 </td> 166 </td>
160 <td class="text-right ml-auto table-celda-total no-border-top"> 167 <td class="text-right ml-auto table-celda-total no-border-top">
161 <strong>Cancela:</strong> 168 <strong>Total Cobrado:</strong>
162 </td> 169 </td>
163 <td class="table-celda-total text-right no-border-top"> 170 <td class="table-celda-total text-right no-border-top">
164 <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) | 171 <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) |
165 currency: cobranza.moneda.SIMBOLO}}</strong> 172 currency: cobranza.moneda.SIMBOLO}}</strong>
166 </td> 173 </td>
167 <td class="text-right ml-auto table-celda-total no-border-top"> 174 <td class="text-right ml-auto table-celda-total no-border-top">
168 <strong>Total Cobrado:</strong> 175 <strong>DF:</strong>
169 </td> 176 </td>
170 <td class="table-celda-total text-right no-border-top"> 177 <td class="table-celda-total text-right no-border-top mr-1">
171 <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) | 178 <strong>{{((getTotalCobrado() + getTotalDeuda()) /
172 currency: cobranza.moneda.SIMBOLO}}</strong> 179 cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}
173 </td> 180 </strong>
174 <td class="text-right ml-auto table-celda-total no-border-top"> 181 </td>
175 <strong>DF:</strong> 182 </tr>
176 </td> 183 </tfoot>
177 <td class="table-celda-total text-right no-border-top mr-1"> 184 </table>
178 <strong>{{((getTotalCobrado() + getTotalDeuda()) / 185 </div>
179 cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}} 186 <div class="row grilla-articulo align-items-end d-none d-sm-flex" ng-show="!cobroDeuda">
180 </strong> 187 <table class="table tabla-articulo table-striped table-sm table-dark">
181 </td> 188 <thead>
182 </tr> 189 <tr class="d-flex">
183 </tfoot> 190 <th class="col-auto">#</th>
184 </table> 191 <th class="col">Cobro</th>
185 </div> 192 <th class="col">Fecha</th>
186 <div class="row grilla-articulo align-items-end d-none d-sm-flex" ng-show="!cobroDeuda"> 193 <th class="col">Importe</th>
187 <table class="table tabla-articulo table-striped table-sm table-dark"> 194 <th class="col-auto">
188 <thead> 195 <button
189 <tr class="d-flex"> 196 class="btn btn-outline-secondary selectable"
190 <th class="col-auto">#</th> 197 ng-click="show = !show; masMenos()"
191 <th class="col">Cobro</th> 198 >
192 <th class="col">Fecha</th> 199 <i
193 <th class="col">Importe</th> 200 class="fa fa-chevron-down"
194 <th class="col-auto"> 201 ng-show="show"
195 <button 202 aria-hidden="true"
196 class="btn btn-outline-secondary selectable" 203 >
197 ng-click="show = !show; masMenos()" 204 </i>
198 > 205 <i
199 <i 206 class="fa fa-chevron-up"
200 class="fa fa-chevron-down" 207 ng-hide="show"
201 ng-show="show" 208 aria-hidden="true">
202 aria-hidden="true" 209 </i>
203 > 210 </button>
204 </i> 211 </th>
205 <i 212 </th>
206 class="fa fa-chevron-up" 213 </tr>
207 ng-hide="show" 214 </thead>
208 aria-hidden="true"> 215 <tbody class="tabla-articulo-body">
209 </i> 216 <tr
210 </button> 217 ng-repeat="(key, cobro) in cobrosTabla"
211 </th> 218 class="d-flex"
212 </th> 219 ng-show="show || key == cobrosTabla.length - 1"
213 </tr> 220 >
214 </thead> 221 <td ng-bind="key + 1" class="col-auto"></td>
215 <tbody class="tabla-articulo-body"> 222 <td class="col" ng-bind="cobro.tipo"></td>
216 <tr 223 <td class="col" ng-bind="cobro.fecha | date : 'dd/MM/yyyy'"></td>
217 ng-repeat="(key, cobro) in cobrosTabla" 224 <td
218 class="d-flex" 225 class="col"
219 ng-show="show || key == cobrosTabla.length - 1" 226 ng-bind="(cobro.importe / cobranza.cotizacion.VENDEDOR) |
220 > 227 currency: cobranza.moneda.SIMBOLO : 4"></td>
221 <td ng-bind="key + 1" class="col-auto"></td> 228 <td class="text-center col-auto">
222 <td class="col" ng-bind="cobro.tipo"></td> 229 <button
223 <td class="col" ng-bind="cobro.fecha | date : 'dd/MM/yyyy'"></td> 230 class="btn btn-outline-secondary"
224 <td 231 ng-click="quitarCobro(key)"
225 class="col" 232 >
226 ng-bind="(cobro.importe / cobranza.cotizacion.VENDEDOR) | 233 <i class="fa fa-trash"></i>
227 currency: cobranza.moneda.SIMBOLO : 4"></td> 234 </button>
228 <td class="text-center col-auto"> 235 </td>
229 <button 236 </tr>
230 class="btn btn-outline-secondary" 237 </tbody>
231 ng-click="quitarCobro(key)" 238 <tfoot>
232 > 239 <tr ng-show="cargando" class="d-flex">
233 <i class="fa fa-trash"></i> 240 <td class="col-2">
234 </button> 241 <a
235 </td> 242 class="form-control form-control-sm btn btn-secondary"
236 </tr> 243 ng-click="seleccionarCheque()"
237 </tbody> 244 >Cheque</a>
238 <tfoot> 245 </td>
239 <tr ng-show="cargando" class="d-flex"> 246 <td class="col-2">
240 <td class="col-2"> 247 <a
241 <a 248 class="form-control form-control-sm btn btn-secondary"
242 class="form-control form-control-sm btn btn-secondary" 249 ng-click="seleccionarEfectivo()"
243 ng-click="seleccionarCheque()" 250 >Efectivo</a>
244 >Cheque</a> 251 </td>
245 </td> 252 </tr>
246 <td class="col-2"> 253 <tr class="d-flex">
247 <a 254 <td class="col-auto px-1">
248 class="form-control form-control-sm btn btn-secondary" 255 <strong>Cobros:</strong>
249 ng-click="seleccionarEfectivo()" 256 <a ng-bind="cobrosTabla.length"></a>
250 >Efectivo</a> 257 </td>
251 </td> 258 <td class="text-right ml-auto table-celda-total no-border-top">
252 </tr> 259 <strong>Cancela:</strong>
253 <tr class="d-flex"> 260 </td>
254 <td class="col-auto px-1"> 261 <td class="table-celda-total text-right no-border-top">
255 <strong>Cobros:</strong> 262 <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) |
256 <a ng-bind="cobrosTabla.length"></a> 263 currency: cobranza.moneda.SIMBOLO}}</strong>
257 </td> 264 </td>
258 <td class="text-right ml-auto table-celda-total no-border-top"> 265 <td class="text-right ml-auto table-celda-total no-border-top">
259 <strong>Cancela:</strong> 266 <strong>Total Cobrado:</strong>
260 </td> 267 </td>
261 <td class="table-celda-total text-right no-border-top"> 268 <td class="table-celda-total text-right no-border-top">
262 <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) | 269 <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) |
263 currency: cobranza.moneda.SIMBOLO}}</strong> 270 currency: cobranza.moneda.SIMBOLO}}</strong>
264 </td> 271 </td>
265 <td class="text-right ml-auto table-celda-total no-border-top"> 272 <td class="text-right ml-auto table-celda-total no-border-top">
266 <strong>Total Cobrado:</strong> 273 <strong>DF:</strong>
267 </td> 274 </td>
268 <td class="table-celda-total text-right no-border-top"> 275 <td class="table-celda-total text-right no-border-top mr-1">
269 <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) | 276 <strong>{{((getTotalCobrado() + getTotalDeuda()) /
270 currency: cobranza.moneda.SIMBOLO}}</strong> 277 cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}
271 </td> 278 </strong>
272 <td class="text-right ml-auto table-celda-total no-border-top"> 279 </td>
273 <strong>DF:</strong> 280 </tr>
274 </td> 281 </tfoot>
275 <td class="table-celda-total text-right no-border-top mr-1"> 282 </table>
276 <strong>{{((getTotalCobrado() + getTotalDeuda()) / 283 </div>
277 cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}} 284 <!-- MOBILE -->
278 </strong> 285 <div class="row d-sm-none">
279 </td> 286 <!-- FACTURAS -->
280 </tr> 287 <table class="table table-sm table-striped table-dark" ng-show="cobroDeuda">
281 </tfoot> 288 <thead>
282 </table> 289 <tr class="d-flex">
283 </div> 290 <th class="">#</th>
284 <!-- MOBILE --> 291 <th class="col px-0">
285 <div class="row d-sm-none"> 292 <div class="d-flex">
286 <!-- FACTURAS --> 293 <div class="col-4 px-1">Factura</div>
287 <table class="table table-sm table-striped table-dark" ng-show="cobroDeuda"> 294 <div class="col-4 px-1">Fecha</div>
288 <thead> 295 <div class="col-4 px-1">Importe</div>
289 <tr class="d-flex"> 296 </div>
290 <th class="">#</th> 297 </th>
291 <th class="col px-0"> 298 <th class="text-center tamaño-boton">
292 <div class="d-flex"> 299 &nbsp;
293 <div class="col-4 px-1">Factura</div> 300 </th>
294 <div class="col-4 px-1">Fecha</div> 301 </tr>
295 <div class="col-4 px-1">Importe</div> 302 </thead>
296 </div> 303 <tbody>
297 </th> 304 <tr
298 <th class="text-center tamaño-boton"> 305 ng-repeat="(key, factura) in facturaTabla"
299 &nbsp; 306 ng-show="show || key == facturaTabla.length - 1"
300 </th> 307 >
301 </tr> 308 <td class="w-100 align-middle d-flex p-0">
302 </thead> 309 <div class="align-middle p-1">
303 <tbody> 310 <span ng-bind="key+1" class="align-middle"></span>
304 <tr 311 </div>
305 ng-repeat="(key, factura) in facturaTabla" 312 <div class="col px-0">
306 ng-show="show || key == facturaTabla.length - 1" 313 <div class="d-flex">
307 > 314 <div class="col-4 px-1">
308 <td class="w-100 align-middle d-flex p-0"> 315 <span ng-bind="factura.numeroFactura"
309 <div class="align-middle p-1"> 316 ></span>
310 <span ng-bind="key+1" class="align-middle"></span> 317 </div>
311 </div> 318 <div class="col-4 px-1">
312 <div class="col px-0"> 319 <span ng-bind="factura.FEP | date : 'dd/MM/yyyy'"></span>
313 <div class="d-flex"> 320 </div>
314 <div class="col-4 px-1"> 321 <div class="col-4 px-1">
315 <span ng-bind="factura.numeroFactura" 322 <span
316 ></span> 323 ng-bind="(factura.IPA / cobranza.cotizacion.VENDEDOR) |
317 </div> 324 currency:cobranza.moneda.SIMBOLO : 4"></span>
318 <div class="col-4 px-1"> 325 </div>
319 <span ng-bind="factura.FEP | date : 'dd/MM/yyyy'"></span> 326 </div>
320 </div> 327 </div>
321 <div class="col-4 px-1"> 328 <div class="align-middle p-1">
322 <span 329 <button
323 ng-bind="(factura.IPA / cobranza.cotizacion.VENDEDOR) | 330 class="btn btn-outline-secondary"
324 currency:cobranza.moneda.SIMBOLO : 4"></span> 331 ng-click="quitarFactura(key)"
325 </div> 332 >
326 </div> 333 <i class="fa fa-trash"></i>
327 </div> 334 </button>
328 <div class="align-middle p-1"> 335 </div>
329 <button 336 </td>
330 class="btn btn-outline-secondary" 337 </tr>
331 ng-click="quitarFactura(key)" 338 </tbody>
332 > 339 <tfoot>
333 <i class="fa fa-trash"></i> 340 <!-- SELECCIONAR PRODUCTO -->
334 </button> 341 <tr ng-show="cargando" class="d-flex">
335 </div> 342 <td class="col-12">
336 </td> 343 <input
337 </tr> 344 placeholder="Seleccione Factura"
338 </tbody> 345 class="form-control form-control-sm"
339 <tfoot> 346 readonly
340 <!-- SELECCIONAR PRODUCTO --> 347 ng-click="seleccionarFactura()"
341 <tr ng-show="cargando" class="d-flex"> 348 />
342 <td class="col-12"> 349 </td>
343 <input 350 </tr>
344 placeholder="Seleccione Factura" 351 <!-- TOOGLE EXPANDIR -->
345 class="form-control form-control-sm" 352 <tr>
346 readonly 353 <td class="col">
347 ng-click="seleccionarFactura()" 354 <button
348 /> 355 class="btn btn-outline-secondary selectable w-100"
349 </td> 356 ng-click="show = !show; masMenos()"
350 </tr> 357 ng-show="facturaTabla.length > 0"
351 <!-- TOOGLE EXPANDIR --> 358 >
352 <tr> 359 <i
353 <td class="col"> 360 class="fa fa-chevron-down"
354 <button 361 ng-hide="show"
355 class="btn btn-outline-secondary selectable w-100" 362 aria-hidden="true"
356 ng-click="show = !show; masMenos()" 363 >
357 ng-show="facturaTabla.length > 0" 364 </i>
358 > 365 <i
359 <i 366 class="fa fa-chevron-up"
360 class="fa fa-chevron-down" 367 ng-show="show"
361 ng-hide="show" 368 aria-hidden="true">
362 aria-hidden="true" 369 </i>
363 > 370 </button>
364 </i> 371 </td>
365 <i 372 </tr>
366 class="fa fa-chevron-up" 373 <!-- FOOTER -->
367 ng-show="show" 374 <tr class="d-flex">
368 aria-hidden="true"> 375 <td class="align-middle no-border-top" colspan="2">
369 </i> 376 <strong>Cantidad Items:</strong>
370 </button> 377 <a ng-bind="facturaTabla.length"></a>
371 </td> 378 </td>
372 </tr> 379 </tr>
373 <!-- FOOTER --> 380 </tfoot>
374 <tr class="d-flex"> 381 </table>
375 <td class="align-middle no-border-top" colspan="2"> 382 <!-- COBROS -->
376 <strong>Cantidad Items:</strong> 383 <table class="table table-sm table-striped table-dark" ng-show="!cobroDeuda">
377 <a ng-bind="facturaTabla.length"></a> 384 <thead>
378 </td> 385 <tr class="d-flex">
379 </tr> 386 <th class="">#</th>
380 </tfoot> 387 <th class="col px-0">
381 </table> 388 <div class="d-flex">
382 <!-- COBROS --> 389 <div class="col-4 px-1">Cobro</div>
383 <table class="table table-sm table-striped table-dark" ng-show="!cobroDeuda"> 390 <div class="col-4 px-1">Fecha</div>
384 <thead> 391 <div class="col-4 px-1">Importe</div>
385 <tr class="d-flex"> 392 </div>
386 <th class="">#</th> 393 </th>
387 <th class="col px-0"> 394 <th class="text-center tamaño-boton">
388 <div class="d-flex"> 395 &nbsp;
389 <div class="col-4 px-1">Cobro</div> 396 </th>
390 <div class="col-4 px-1">Fecha</div> 397 </tr>
391 <div class="col-4 px-1">Importe</div> 398 </thead>
392 </div> 399 <tbody>
393 </th> 400 <tr
394 <th class="text-center tamaño-boton"> 401 ng-repeat="(key, cobro) in cobrosTabla"
395 &nbsp; 402 ng-show="show || key == cobrosTabla.length - 1"
396 </th> 403 >
397 </tr> 404 <td class="w-100 align-middle d-flex p-0">
398 </thead> 405 <div class="align-middle p-1">
399 <tbody> 406 <span ng-bind="key+1" class="align-middle"></span>
400 <tr 407 </div>
401 ng-repeat="(key, cobro) in cobrosTabla" 408 <div class="col px-0">
402 ng-show="show || key == cobrosTabla.length - 1" 409 <div class="d-flex">
403 > 410 <div class="col-4 px-1">
404 <td class="w-100 align-middle d-flex p-0"> 411 <span ng-bind="cobro.tipo"
405 <div class="align-middle p-1"> 412 ></span>
406 <span ng-bind="key+1" class="align-middle"></span> 413 </div>
407 </div> 414 <div class="col-4 px-1">
408 <div class="col px-0"> 415 <span ng-bind="cobro.fecha | date : 'dd/MM/yyyy'"></span>
409 <div class="d-flex"> 416 </div>
410 <div class="col-4 px-1"> 417 <div class="col-4 px-1">
411 <span ng-bind="cobro.tipo" 418 <span
412 ></span> 419 ng-bind="(cobro.importe / cobranza.cotizacion.VENDEDOR) |
413 </div> 420 currency: cobranza.moneda.SIMBOLO : 4"></span>
414 <div class="col-4 px-1"> 421 </div>
415 <span ng-bind="cobro.fecha | date : 'dd/MM/yyyy'"></span> 422 </div>
416 </div> 423 </div>
417 <div class="col-4 px-1"> 424 <div class="align-middle p-1">
418 <span 425 <button
419 ng-bind="(cobro.importe / cobranza.cotizacion.VENDEDOR) | 426 class="btn btn-outline-secondary"
420 currency: cobranza.moneda.SIMBOLO : 4"></span> 427 ng-click="quitarCobro(key)"
421 </div> 428 >
422 </div> 429 <i class="fa fa-trash"></i>
423 </div> 430 </button>
424 <div class="align-middle p-1"> 431 </div>
425 <button 432 </td>
426 class="btn btn-outline-secondary" 433 </tr>
427 ng-click="quitarCobro(key)" 434 </tbody>
428 > 435 <tfoot>
429 <i class="fa fa-trash"></i> 436 <!-- SELECCIONAR PRODUCTO -->
430 </button> 437 <tr ng-show="cargando" class="d-flex">
431 </div> 438 <td class="col-6">
432 </td> 439 <input
433 </tr> 440 placeholder="Cheque"
434 </tbody> 441 class="form-control form-control-sm"
435 <tfoot> 442 readonly
436 <!-- SELECCIONAR PRODUCTO --> 443 ng-click="seleccionarCheque()"
437 <tr ng-show="cargando" class="d-flex"> 444 />
438 <td class="col-6"> 445 </td>
439 <input 446 <td class="col-6">
440 placeholder="Cheque" 447 <input
441 class="form-control form-control-sm" 448 placeholder="Efectivo"
442 readonly 449 class="form-control form-control-sm"
443 ng-click="seleccionarCheque()" 450 readonly
444 /> 451 ng-click="seleccionarEfectivo()"
445 </td> 452 />
446 <td class="col-6"> 453 </td>
447 <input 454 </tr>
448 placeholder="Efectivo" 455 <!-- TOOGLE EXPANDIR -->
449 class="form-control form-control-sm" 456 <tr>
450 readonly 457 <td class="col">
451 ng-click="seleccionarEfectivo()" 458 <button
452 /> 459 class="btn btn-outline-secondary selectable w-100"
453 </td> 460 ng-click="show = !show; masMenos()"
454 </tr> 461 ng-show="cobrosTabla.length > 0"
455 <!-- TOOGLE EXPANDIR --> 462 >
456 <tr> 463 <i
457 <td class="col"> 464 class="fa fa-chevron-down"
458 <button 465 ng-hide="show"
459 class="btn btn-outline-secondary selectable w-100" 466 aria-hidden="true"
460 ng-click="show = !show; masMenos()" 467 >
461 ng-show="cobrosTabla.length > 0" 468 </i>
462 > 469 <i
463 <i 470 class="fa fa-chevron-up"
464 class="fa fa-chevron-down" 471 ng-show="show"
465 ng-hide="show" 472 aria-hidden="true">
466 aria-hidden="true" 473 </i>
467 > 474 </button>
468 </i> 475 </td>
469 <i 476 </tr>
470 class="fa fa-chevron-up" 477 <!-- FOOTER -->
471 ng-show="show" 478 <tr class="d-flex">
472 aria-hidden="true"> 479 <td class="align-middle no-border-top col-6">
473 </i> 480 <strong>Cantidad Items:</strong>
474 </button> 481 <a ng-bind="cobrosTabla.length"></a>
475 </td> 482 </td>
476 </tr> 483 </tfoot>
477 <!-- FOOTER --> 484 </table>
478 <tr class="d-flex"> 485 </tr>
479 <td class="align-middle no-border-top col-6"> 486 <!-- DEUDA, COBRADO, DIFERENCIA -->
480 <strong>Cantidad Items:</strong> 487 <table class="table-responsive">
481 <a ng-bind="cobrosTabla.length"></a> 488 <tr class="d-flex row">
482 </td> 489 <td class="text-center ml-auto table-celda-total no-border-top col-4">
483 </tfoot> 490 <strong>Cancela:</strong>
484 </table> 491 </td>
485 </tr> 492 <td class="text-center ml-auto table-celda-total no-border-top col-4">
486 <!-- DEUDA, COBRADO, DIFERENCIA --> 493 <strong>Cobrado:</strong>
487 <table class="table-responsive"> 494 </td>
488 <tr class="d-flex row"> 495 <td class="text-center ml-auto table-celda-total no-border-top col-4">
489 <td class="text-center ml-auto table-celda-total no-border-top col-4"> 496 <strong>Diferencia:</strong>
490 <strong>Cancela:</strong> 497 </td>
491 </td> 498 <td class="table-celda-total text-center no-border-top col-4">
492 <td class="text-center ml-auto table-celda-total no-border-top col-4"> 499 <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong>
493 <strong>Cobrado:</strong> 500 </td>
494 </td> 501 <td class="table-celda-total text-center no-border-top col-4">
495 <td class="text-center ml-auto table-celda-total no-border-top col-4"> 502 <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong>
496 <strong>Diferencia:</strong> 503 </td>
497 </td> 504 <td class="table-celda-total text-center no-border-top col-4">
498 <td class="table-celda-total text-center no-border-top col-4"> 505 <strong>{{((getTotalCobrado() + getTotalDeuda()) / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong>
499 <strong>{{(getTotalDeuda() / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong> 506 </td>
500 </td> 507 </tr>
501 <td class="table-celda-total text-center no-border-top col-4"> 508 </table>
502 <strong>{{(getTotalCobrado() / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong> 509 </div>
503 </td> 510 </div>
504 <td class="table-celda-total text-center no-border-top col-4"> 511 <div class="col-auto my-2 col-lg-2 botonera-lateral d-none d-md-block">
505 <strong>{{((getTotalCobrado() + getTotalDeuda()) / cobranza.cotizacion.VENDEDOR) | currency: cobranza.moneda.SIMBOLO}}</strong> 512 <div class="row align-items-end">
506 </td> 513 <div class="col-12">
507 </tr> 514 <button
508 </table> 515 ng-click="crearCobranza()"
509 </div> 516 title="Crear nota pedido"
510 </div> 517 class="btn btn-default btn-block mb-2"
518 ng-disabled="editando"
519 >
511 <div class="col-auto my-2 col-lg-2 botonera-lateral d-none d-md-block"> 520 Guardar
512 <div class="row align-items-end"> 521 </button>
513 <div class="col-12"> 522 <button
514 <button 523 ng-click="salir()"
515 ng-click="crearCobranza()" 524 type="button"
516 title="Crear nota pedido" 525 title="Salir"
517 class="btn btn-default btn-block mb-2" 526 class="btn btn-default btn-block">
518 ng-disabled="editando" 527 Salir
519 > 528 </button>
520 Guardar 529 </div>
521 </button> 530 </div>
522 <button 531 </div>
523 ng-click="salir()" 532 </div>
524 type="button" 533 <div class="row d-md-none fixed-bottom">
525 title="Salir" 534 <div class="w-100 bg-dark d-flex px-3 acciones-mobile">
526 class="btn btn-default btn-block"> 535 <span class="ml-3 text-muted" ng-click="salir()">Salir</span>
527 Salir 536 <span class="mr-3 ml-auto" ng-click="crearCobranza()" ng-show="!editando">Guardar</span>
528 </button> 537 </div>
529 </div> 538 </div>
530 </div> 539 </div>
531 </div> 540