Compare commits

...

238 Commits

Author SHA1 Message Date
Mauricio 7cad4093d4 Fix in global invoice 2023-04-20 13:21:19 -06:00
Mauricio 7caf6423e1 Fix in global invoice 2023-04-20 13:20:48 -06:00
Mauricio 8a3aea41eb Add index in tickets 2023-04-15 19:23:56 -06:00
Mauricio bd49356d3f Add index in tickets 2023-04-15 18:13:45 -06:00
Mauricio 3b54ef0a36 Fix in global invoice 2023-04-14 17:56:12 -06:00
Mauricio 497a4be392 Update version 2023-04-14 17:55:48 -06:00
Mauricio 7fc6264322 Fix in global invoice 2023-04-14 17:55:00 -06:00
Mauricio c5d0e97212 Fix: al obtener la clave del sat al facturar en lote 2023-04-01 15:10:07 -06:00
Mauricio 5bbad9ef58 Fix: al obtener la clave del sat al facturar en lote 2023-04-01 15:09:27 -06:00
Mauricio 8e7aa23d1b Validate exists partner in edit 2023-03-29 17:36:17 -06:00
Mauricio f3d8b1dae5 Fix issue #97 2023-03-29 13:32:31 -06:00
Mauricio 2c684ae6bd Fix issue #97 2023-03-29 13:31:23 -06:00
el Mau febea3f289 Fix #96 2023-03-21 10:56:55 -06:00
el Mau 5facb96662 Fix #96 2023-03-21 10:55:16 -06:00
el Mau 6411c2e51e Fix in taxes in invoice pay 2023-03-13 17:16:30 -06:00
el Mau eeb128fda6 Fix in taxes in invoice pay 2023-03-13 17:16:15 -06:00
el Mau a078e27703 Fix in taxes in invoice pay 2023-03-13 14:01:26 -06:00
el Mau 28ef53043f Fix in taxes in invoice pay 2023-03-13 13:59:24 -06:00
el Mau e956c243f7 Fix in invoice pay 2023-03-10 14:56:19 -06:00
el Mau 1b33413de2 Fix in invoice pay 2023-03-10 14:55:57 -06:00
el Mau 64541a84b9 Fix in invoice pay with tax IVA 0 2023-03-07 11:53:28 -06:00
el Mau 834c1faae6 Fix in invoice pay with tax IVA 0 2023-03-07 11:53:04 -06:00
el Mau affe57bfcd Add validate for cancel movement bank 2023-03-06 16:10:07 -06:00
el Mau 4dc54ade1e Add validate for cancel movement bank 2023-03-06 16:09:37 -06:00
el Mau e72739a5fe Add cancel invoice pay in admin list 2023-03-06 00:48:01 -06:00
el Mau dd7b9c1680 Add cancel invoice pay in admin list 2023-03-06 00:47:34 -06:00
el Mau 9823bd967f Fix for exempted tax 2023-03-03 01:38:37 -06:00
el Mau aee467d98f Fix for exempted tax 2023-03-03 01:38:19 -06:00
el Mau 64917527f7 Validate tax object 2023-03-01 22:24:26 -06:00
el Mau 5f56179ebb Validate tax object 2023-03-01 22:24:00 -06:00
el Mau 955a0348f8 Can select month in global invoice 2023-03-01 18:45:50 -06:00
el Mau 0826b0cea2 Can select month in global invoice 2023-03-01 18:45:21 -06:00
el Mau 8b0f9fbc64 Can select global options for public invoice 2023-03-01 18:17:56 -06:00
el Mau f3d827364b Can select global options for public invoice 2023-03-01 18:16:52 -06:00
el Mau 50cbb3bae8 Fix in tax IVA retention 2023-03-01 14:32:33 -06:00
el Mau a7c8d80219 Fix in tax IVA retention 2023-03-01 14:32:01 -06:00
el Mau ca9d7a02e3 Update requirements.txt 2023-02-24 14:08:14 -06:00
el Mau 31fcb63e51 Update requirements.txt 2023-02-24 14:07:44 -06:00
el Mau bd7a31ea8a Fix global invoice 2023-02-24 12:45:52 -06:00
el Mau 6a6b6ca395 Fix global invoice 2023-02-23 18:20:10 -06:00
el Mau 3148c5ba82 Fix type change in deposit 2023-02-22 11:07:38 -06:00
el Mau 5f62ad7750 Fix type change in deposit 2023-02-22 11:06:37 -06:00
el Mau ff44162622 Fix type change in deposit 2023-02-21 22:16:25 -06:00
el Mau a37b3a5c23 Fix type change in deposit 2023-02-21 22:09:42 -06:00
el Mau 4fdea6173b Fix invoice pay in others currencies 2023-02-20 19:15:40 -06:00
el Mau 968c2744ec Fix pay invoice in other currencies 2023-02-20 19:10:29 -06:00
el Mau c9d85ca2e7 Fix make PDF from pays 1.0 2023-02-19 14:00:06 -06:00
el Mau 93e64eafd8 Fix make PDF from pays 1.0 2023-02-18 12:56:22 -06:00
el Mau 1984103ff5 Fix make PDF from pays 1.0 2023-02-18 12:40:05 -06:00
el Mau e4ba06c0ff Fix in tax object 04 2023-02-17 14:24:33 -06:00
el Mau 38bb267e55 Fix in tax object 04 2023-02-17 14:24:17 -06:00
el Mau 602467c8e9 Fix in tax object 04 2023-02-17 13:44:42 -06:00
el Mau 4020237f68 Fix in tax object 04 2023-02-17 13:43:43 -06:00
el Mau 933c9820e6 Fix with tax exento 2023-02-16 23:38:03 -06:00
el Mau 51daf0ad5e Stamp with tax exento 2023-02-16 23:09:35 -06:00
el Mau 709c524830 Show message when delete product 2023-02-16 22:30:08 -06:00
el Mau 434e15bb5b Fix in cancel with Finkok 2023-02-08 21:43:38 -06:00
el Mau af5fa3c812 Fix in templates 2023-02-01 22:45:48 -06:00
el Mau 8003fc42b9 Add template in json for 4.0 2023-02-01 22:27:13 -06:00
el Mau 83bebde169 Fix use cfdi P01 2023-02-01 08:56:55 -06:00
el Mau 5f641c632e Get message error in import invoice by lote 2023-01-31 22:07:43 -06:00
el Mau 1c11a1b013 Fix get sum by tax ISR 2023-01-30 22:16:07 -06:00
el Mau f13491d983 Fix get sum basy pay for IVA 2023-01-30 20:12:09 -06:00
el Mau a90f218c76 Fix node tax in invoice pay 2023-01-27 12:00:36 -06:00
el Mau 746c827492 Validate regimen fiscal in pay invoice 2023-01-23 16:18:11 -06:00
el Mau 661eff1dc3 Validate regimen fiscal in pay invoice 2023-01-23 16:05:38 -06:00
el Mau 2526a8f5aa Validate regimen fiscal in pay invoice 2023-01-23 15:39:04 -06:00
el Mau 296874a9b1 Admin regimenes 2023-01-22 12:57:35 -06:00
el Mau 86e7f50621 Fix in validate CP 2023-01-13 22:25:48 -06:00
el Mau 260ba62b2e Fix in validate CP 2023-01-12 12:02:02 -06:00
el Mau 8e2446e8f5 Fix in complement pay without taxes 2023-01-12 00:33:39 -06:00
el Mau 29e02e649d Fix error in nomina 2023-01-11 00:27:42 -06:00
el Mau d47e059d93 CFDI 4.0 2023-01-10 00:07:17 -06:00
el Mau 24777f691e CFDI 4.0 2023-01-07 07:37:32 -06:00
El Mau 3a5fbc609b Regresar productos en orden al refacturar 2022-04-01 09:50:10 -06:00
El Mau 5e888d2337 Regresar productos en orden al refacturar 2022-04-01 09:49:15 -06:00
El Mau de856f28ab Soporte basico para complemento Comercio Exterior 2022-03-28 21:34:10 -06:00
El Mau ae21403c59 Error al timbrar nomina 2022-03-10 20:26:27 -06:00
El Mau b68d79d0ca Fix issue #54 2022-02-18 14:59:01 -06:00
El Mau 68c0203039 Fix issue #53 2022-02-15 23:51:27 -06:00
El Mau 51af15f311 Error al generar Carta Porte sin remolque 2022-02-01 21:31:49 -06:00
El Mau 64ef75fbf5 Mejoras en Carta Porte 2022-01-30 14:50:05 -06:00
El Mau bd6ba5d4d0 Mejoras en Carta Porte 2022-01-27 22:18:28 -06:00
El Mau dd606be46b Arreglado el error al cancelar con CD 2022-01-26 22:32:38 -06:00
El Mau cc0eee1443 Fix - Issue #40 2022-01-23 23:11:08 -06:00
El Mau a609c0c6f5 Actualizar cancelación con XML firmado con CD 2022-01-21 17:09:29 -06:00
El Mau 9daf07693a Corregir error al enviar correo 2022-01-20 17:04:35 -06:00
El Mau d2f879c224 Importar carta porte desde json 2022-01-20 00:10:22 -06:00
El Mau ff8bc31f50 Agregar opción STARTTLS para envío de correo 2022-01-19 15:03:26 -06:00
El Mau d2c361e174 Representación impresa para Carta Porte 2022-01-19 13:30:22 -06:00
El Mau 6de30c3417 Actualizar lista de cambios 2022-01-10 14:28:16 -06:00
El Mau 47ec5ad360 Resolver conflictos 2021-12-12 22:30:15 -06:00
Mauricio Baeza 416bc65174 Can products without taxes 2021-09-14 21:53:00 -05:00
Mauricio Baeza 3dd88f14d6 Update version 2021-09-14 21:51:58 -05:00
Mauricio Baeza fb24346601 Can add or edit products without taxes 2021-09-14 21:49:21 -05:00
Mauricio Baeza a518278b55 Ticket #5 2021-05-31 13:01:03 -05:00
Mauricio Baeza 565f36be3a Option cancel only by admins 2021-05-24 12:54:11 -05:00
Mauricio Baeza 1a9087b13a Fix ticket #4 2021-04-13 22:29:29 -05:00
Mauricio Baeza 952dcba7ae Fix issue #3 2021-02-12 19:37:11 -06:00
Mauricio Baeza 12a24c1117 Fix issue #2 2021-02-12 12:23:34 -06:00
Mauricio Baeza fa01e6cf01 Fix issue #1 2021-02-11 18:10:37 -06:00
Mauricio Baeza b5bdcbbeb3 Import clients form CSV 2021-02-10 23:02:12 -06:00
Mauricio Baeza b03fbebe09 Fix get status sat, issue #422 2021-02-09 23:04:49 -06:00
Mauricio Baeza c98cdd7fff Fix get status sat, issue #422 2021-02-09 23:01:28 -06:00
Mauricio Baeza 537cecbb0b Fix get status sat, issue #422 2021-02-09 22:49:57 -06:00
Mauricio Baeza 5b8cd0ecb2 Fix show version of Empresa Libre 2021-02-02 22:10:13 -06:00
Mauricio Baeza 5c047ee9d5 Update changelog 2021-01-19 12:16:41 -06:00
Mauricio Baeza 431422361b Fix passed argument to pac 2021-01-18 19:06:59 -06:00
Mauricio Baeza 739ac08205 Add migrate auth 2021-01-13 19:15:38 -06:00
Mauricio Baeza de06f706a6 Fix get version in proforma 2021-01-11 14:43:50 -06:00
Mauricio Baeza aaccece897 Fix get folios 2021-01-10 19:18:48 -06:00
Mauricio Baeza f813fb4dd8 Fix set error in pac Finkok 2021-01-10 15:24:35 -06:00
Mauricio Baeza 51b4386b24 Fix add backend in cert 2021-01-10 14:23:58 -06:00
Mauricio Baeza e678083eea Fix add backend in cert 2021-01-10 14:21:51 -06:00
Mauricio Baeza 32679fced3 Fix in function name export cert 2021-01-10 14:17:32 -06:00
Mauricio Baeza 0084197906 Fix in get year for preinvoices 2021-01-08 20:53:29 -06:00
Mauricio Baeza 17fa99e45b Add migrate certificates 2021-01-06 22:15:30 -06:00
Mauricio Baeza cca598310b Fix in import conf for pacs 2021-01-05 18:53:13 -06:00
Mauricio Baeza 21fd903943 Refactory stamp and cancel 2021-01-05 17:32:38 -06:00
Mauricio Baeza 1f3e51861d Update version 2020-09-17 13:53:01 -05:00
Mauricio Baeza 1c6f9cd5f7 Fix - Namespaces for IEDU 2020-09-17 13:46:41 -05:00
Mauricio Baeza 8d815bf570 Update date in change log 2020-08-25 23:03:12 -05:00
Mauricio Baeza 443b916056 Fix - Validate namespace 2020-08-25 15:17:59 -05:00
Mauricio Baeza 980a7aafdb Fix: nomina stamp asimilados 2020-03-30 19:04:50 -06:00
Mauricio Baeza 267a96ebbc Global invoice by ticket 2020-03-08 15:27:53 -06:00
Mauricio Baeza 763f3c21fb Support for tax legends 2020-03-02 17:27:28 -06:00
Mauricio Baeza 26e4ce3d13 Options for show documents 2020-02-25 21:52:17 -06:00
Mauricio Baeza a202f12a17 Add filter by sucursal 2020-02-24 22:35:24 -06:00
Mauricio Baeza a17345c0fd Fix stamp nomina 2020-02-09 22:34:58 -06:00
Mauricio Baeza d509bfb8be Fix new validate nomina SAT 2020-01-29 16:03:20 -06:00
Mauricio Baeza 71bd536cb1 Update catalog SAT 2020-01-27 22:40:57 -06:00
Mauricio Baeza e94cda3577 Fix import conf.py 2020-01-24 10:02:24 -06:00
Mauricio Baeza 77b35f8322 Add new PAC 2020-01-22 15:25:40 -06:00
Mauricio Baeza 1c55fbd7c7 Fix #355 2020-01-07 21:48:57 -06:00
Mauricio Baeza 6f3d9cc3fa Fix - al crear PDF 2019-10-28 20:04:28 -06:00
Mauricio Baeza ce0e960534 Merge branch 'develop'
Fix #369
2019-08-29 09:13:43 -05:00
Mauricio Baeza abbb4cc608 Merge branch 'develop'
Envío de nómina por correo
Actualización de catalogos del SAT
2019-04-23 23:12:25 -05:00
Mauricio Baeza 692477f41a Merge branch 'develop'
Actualización de catálogos del SAT en Nómina
2019-03-24 21:49:26 -06:00
Mauricio Baeza 519a61e132 Merge branch 'develop'
Permitir editar la descripción en un movimiento bancario
Fix #343
2019-03-08 22:10:19 -06:00
Mauricio Baeza 4bff2703a4 Merge branch 'develop'
Fix - Send pay invoice
2019-03-04 19:44:59 -06:00
Mauricio Baeza 6cef8fe669 Merge branch 'develop'
Fix - In filter invoice by dates
2019-03-04 19:22:56 -06:00
Mauricio Baeza 2cacb786b6 Merge branch 'develop'
Error al enviar prefactura por correo
2019-02-20 23:40:07 -06:00
Mauricio Baeza 79cea5b092 Merge branch 'develop'
Soporte para complemento de divisas
2019-02-17 22:12:39 -06:00
Mauricio Baeza 43684b7fe9 Merge branch 'develop'
Fix - Al cancelar nómina
2019-01-23 13:33:32 -06:00
Mauricio Baeza 3d300146f1 Merge branch 'develop'
Permitir capturar folio manualmente
2019-01-17 22:10:17 -06:00
Mauricio Baeza dbf3a342bf Merge branch 'develop'
Guardar logos de emisor en carpeta correcta
2019-01-16 23:38:05 -06:00
Mauricio Baeza 997dfe90ba Merge branch 'develop'
Generar PDF desde plantilla JSON
2019-01-15 00:51:05 -06:00
Mauricio Baeza ff0ee73a73 Merge branch 'develop'
Error al importar nómina y factura en lote
2018-11-07 19:15:54 -06:00
Mauricio Baeza 4660e1d4e0 Merge branch 'develop'
Error: Consulta de  estatus en el SAT
2018-11-06 22:57:06 -06:00
Mauricio Baeza dc8aeaebba Merge branch 'develop'
Mejora: Permitir importar CFDI 3.2
2018-10-30 16:37:15 -06:00
Mauricio Baeza 0bddc189b4 Merge branch 'develop'
Mejora al generar factura en lote
2018-10-27 01:15:42 -05:00
Mauricio Baeza bbaf709e0e Merge branch 'develop'
Error unicode
2018-10-24 00:02:08 -05:00
Mauricio Baeza 2765958a23 Merge branch 'develop'
Error #307
2018-10-14 22:24:34 -05:00
Mauricio Baeza 2090aa743d Merge branch 'develop'
Error #287
Mejora - Facturas de pago con datos bancarios
2018-10-12 01:23:17 -05:00
Mauricio Baeza 63fc8e9a78 Merge branch 'develop'
Error #295
Cuentas de banco para clientes
2018-10-08 01:14:24 -05:00
Mauricio Baeza 425f2ee079 Merge branch 'develop'
Relacionar facturas v3.2
2018-10-03 23:40:52 -05:00
Mauricio Baeza acd8604e92 Merge branch 'develop'
Error #291
2018-10-03 15:23:17 -05:00
Mauricio Baeza 71d773f999 Merge branch 'develop'
Mejora #280
Mejora #288
Error #290
2018-09-28 02:24:12 -05:00
Mauricio Baeza 2e98d69685 Merge branch 'develop'
Error #282
2018-09-27 00:37:29 -05:00
Mauricio Baeza 135d469f3e Merge branch 'develop'
Soporte para facturas de pagos con documentos en otras monedas
2018-09-26 01:30:34 -05:00
Mauricio Baeza 18b1880772 Merge branch 'develop'
Aactualizar versión 1.16.1
2018-09-18 10:58:04 -05:00
Mauricio Baeza 66111d9080 Merge branch 'develop'
Error #268
2018-09-18 10:52:34 -05:00
Mauricio Baeza 127ceceada Merge branch 'develop'
Se puede modidicar el saldo del cliente
Se muestra la cantidad de facturas de pago en los movimientos
2018-09-16 22:10:15 -05:00
Mauricio Baeza b6b5aa3447 Merge branch 'develop'
Fix # 257
2018-09-12 23:23:58 -05:00
Mauricio Baeza b0de7655cc Merge branch 'develop'
Personalizar plantilla para factura de pago
2018-09-10 23:08:38 -05:00
Mauricio Baeza dea511d161 Merge branch 'develop'
Fix - Al agregar cuenta de banco
2018-09-10 17:35:28 -05:00
Mauricio Baeza 9081d54865 Merge branch 'develop'
Cancelar factura de pago
2018-09-10 00:18:39 -05:00
Mauricio Baeza f0ab9246e0 Merge branch 'develop'
Fix - al migrar tablas
2018-09-03 02:18:29 -05:00
Mauricio Baeza 8de2b20dcf Merge branch 'develop'
Soporte para Factura de pagos
2018-09-03 00:55:28 -05:00
Mauricio Baeza 4608246b7d Merge branch 'develop'
Quitar columnas en tabla facturaspagos
Actualizar version y lista de cambios
2018-08-21 18:52:55 -05:00
Mauricio Baeza 94240f2356 Merge branch 'develop'
Error al cerrar plantilla
2018-08-09 15:51:34 -05:00
Mauricio Baeza 3163fef0d5 Merge branch 'develop'
Cambio en consulta de timbres
2018-07-25 16:28:22 -05:00
Mauricio Baeza 32ec443a19 Merge branch 'develop'
Precios con cuatro decimales. Ticket #229
2018-07-10 23:37:35 -05:00
Mauricio Baeza 64caf4f415 Merge branch 'develop'
Actualizar versión
2018-07-08 23:46:21 -05:00
Mauricio Baeza 13836add29 Merge branch 'develop'
Fix - Ticket #231
2018-07-08 23:43:19 -05:00
Mauricio Baeza f3309429e6 Merge branch 'develop'
Actualizar versión
2018-07-05 23:56:08 -05:00
Mauricio Baeza f9e4bced15 Merge branch 'develop'
Fix - Ticket #230
2018-07-05 23:53:02 -05:00
Mauricio Baeza c3d92ff45e Merge branch 'develop'
Fix - Al mostrar el título
2018-06-25 22:58:03 -05:00
Mauricio Baeza 3424f7f78a Merge branch 'develop'
Add - Ticket #223
Fix - Ticket #224
2018-06-18 14:11:26 -05:00
Mauricio Baeza de40cb0453 Merge branch 'develop'
Fix - Ticket #222
2018-06-14 22:22:30 -05:00
Mauricio Baeza da84fbafb6 Merge branch 'develop'
- Se permiten 4 decimales en Tipo de cambio
- Se agrega el campo {total_cantidades} al generar el PDF
- Se agrega opción para generar respaldos de la BD en MV
- Fix: Al generar con complemento EDU
2018-06-03 22:45:23 -05:00
Mauricio Baeza 32926740be Merge branch 'develop'
Actualizar lista de cambios
2018-05-23 23:47:38 -05:00
Mauricio Baeza 57dce9670b Merge branch 'develop'
Soporte para truncar impuestos
2018-05-23 23:44:38 -05:00
Mauricio Baeza 03ac074c66 Merge branch 'develop'
Fix - Formato de celdas en conceptos
2018-05-08 13:22:43 -05:00
Mauricio Baeza 1f043746dd Merge branch 'develop'
Fix - Nómina separación
2018-04-09 21:43:09 -05:00
Mauricio Baeza 5b15166c7a Merge branch 'develop'
Fix - Issue #211
2018-03-29 16:20:56 -06:00
Mauricio Baeza 0a48580f0c Merge branch 'develop'
Fix - Issue #209
2018-03-20 22:51:47 -06:00
Mauricio Baeza 2f797af8b2 Merge branch 'develop'
Ejecutar LibreOffice como otra instancia
2018-03-09 00:23:46 -06:00
Mauricio Baeza aac5c04a3f Merge branch 'develop'
Fix - CFDI sin folio
2018-03-06 21:33:05 -06:00
Mauricio Baeza 348f2d4443 Merge branch 'develop'
Quitar registro patronal en contrato 09, 10 y 99
2018-03-06 10:42:01 -06:00
Mauricio Baeza 313af2cce1 Merge branch 'develop'
Fix - Issue #199
2018-03-01 22:29:34 -06:00
Mauricio Baeza 7308ec86ae Merge branch 'develop'
Traslados
2018-03-01 22:07:37 -06:00
Mauricio Baeza dc68b54f08 Merge branch 'develop'
Timbrar XML grandes con Ecodex
2018-02-22 15:12:19 -06:00
Mauricio Baeza b90e0a26ba Merge branch 'develop'
Quitar forma de pago en PDF
2018-02-20 18:05:01 -06:00
Mauricio Baeza 9ae0d7d924 Merge branch 'develop'
Quitar forma de pago en traslado
2018-02-20 16:07:46 -06:00
Mauricio Baeza 07d51db625 Merge branch 'develop'
Fix - Issue #191
2018-02-20 11:03:40 -06:00
Mauricio Baeza eedd253e6a Merge branch 'develop'
Timbrar a extranjeros
2018-02-18 23:57:58 -06:00
Mauricio Baeza 73eb2f0b8c Merge branch 'develop'
Fix - Issue #190
2018-02-16 22:17:18 -06:00
Mauricio Baeza fd334eade4 Merge branch 'develop'
Fix - Issue #189
2018-02-16 14:55:54 -06:00
Mauricio Baeza 7bbfcd6cae Merge branch 'develop'
Fix - Issue #188
2018-02-16 13:54:22 -06:00
Mauricio Baeza 6381975518 Merge branch 'develop'
Obtener timbres disponibles
2018-02-13 23:15:18 -06:00
Mauricio Baeza edd1be81ed Merge branch 'develop'
Fix - Issue #185
2018-02-13 12:07:29 -06:00
Mauricio Baeza e7a4d38681 Merge branch 'develop'
Fix - Issue #172
2018-02-12 23:52:00 -06:00
Mauricio Baeza 9a0f74eb52 Merge branch 'develop'
Fix - Issue #136
2018-02-12 23:14:57 -06:00
Mauricio Baeza cf73669e3a Merge branch 'develop'
Activar, desactivar cuentas de banco
2018-02-12 21:49:48 -06:00
Mauricio Baeza 3db6775f57 Merge branch 'develop'
Fix - Issue #174
2018-02-12 17:44:46 -06:00
Mauricio Baeza 8a03dba323 Merge branch 'develop'
Fix - Precio con impuestos al facturar
2018-02-10 12:13:13 -06:00
Mauricio Baeza 874bf11447 Merge branch 'develop'
Fix - En notas
2018-02-10 11:00:46 -06:00
Mauricio Baeza bb3f6d3aed Merge branch 'develop'
Permitir repetir productos al facturar
2018-02-09 20:38:46 -06:00
Mauricio Baeza 0ee99296a6 Merge branch 'develop'
Cambiar orden en movimientos bancarios
2018-02-07 21:36:56 -06:00
Mauricio Baeza e1424e2e70 Merge branch 'develop'
Quitar namespace de Nómina cuando no se usa
2018-02-07 12:54:41 -06:00
Mauricio Baeza 5bfcc4ca07 Merge branch 'develop'
Importar XML
2018-02-07 00:48:26 -06:00
Mauricio Baeza b2148e1789 Merge branch 'develop'
Plantilla Nómina #173
2018-02-06 12:07:54 -06:00
Mauricio Baeza badf1b0f5f Merge branch 'develop'
Borrar temporales
2018-02-06 00:01:27 -06:00
Mauricio Baeza 1c65205bea Merge branch 'develop'
Generar PDF de Nómina
2018-02-03 01:26:26 -06:00
Mauricio Baeza 4bd7e335d8 Merge branch 'develop'
Fix Issue #170
2018-02-02 13:49:09 -06:00
Mauricio Baeza 09ccffdc62 Merge branch 'develop'
Eliminar tabla de estatod del SAT
2018-02-01 18:50:53 -06:00
Mauricio Baeza 0207b9fa78 Merge branch 'develop'
Fix - Issue #160
2018-01-31 23:41:28 -06:00
Mauricio Baeza 785cb32773 Merge branch 'develop'
Fix - Issue #167
2018-01-31 22:46:51 -06:00
Mauricio Baeza 77ff862400 Merge branch 'develop'
Fix - Fecha de ingreso vacía
2018-01-31 22:41:09 -06:00
Mauricio Baeza da730801d6 Merge branch 'develop'
Importar nóminas canceladas
2018-01-31 16:13:38 -06:00
Mauricio Baeza 13d82f1df8 Merge branch 'develop'
Fix - Al generar PDF de una línea
Fix - Al mostrar buscar alumno
2018-01-31 01:47:19 -06:00
Mauricio Baeza dcfc80edc8 Merge branch 'develop'
Cookies no seguras cuando no hay HTTPS
2018-01-30 23:41:05 -06:00
Mauricio Baeza 3376505ea1 Merge branch 'develop'
Actualizar changelog y requerimientos
2018-01-30 22:17:33 -06:00
Mauricio Baeza 21eafd9e4a Merge branch 'develop'
Timbrado de Nómina
Complemento EDU
2018-01-30 22:01:48 -06:00
Mauricio Baeza b7b96611a6 Fix - Al eliminar nivel educativo 2018-01-30 10:10:09 -06:00
Mauricio Baeza 2141f84402 EDU - Quitar RFC como obligatorio 2018-01-29 14:23:37 -06:00
Mauricio Baeza 0e909628dc Complemento EDU 2018-01-29 13:21:48 -06:00
Mauricio Baeza 012331b523 Validar clave SAT al importar productos 2018-01-26 14:01:27 -06:00
Mauricio Baeza 64f5dd9170 Fix - Issue #153 2018-01-26 13:46:56 -06:00
Mauricio Baeza e1b975f0f9 Change in default template 2018-01-25 23:10:40 -06:00
Mauricio Baeza b73d0d6284 Config title app 2018-01-25 23:06:23 -06:00
Mauricio Baeza 83dff5bc5f Fix - Issue #149 2018-01-25 22:07:30 -06:00
Mauricio Baeza ac481862d9 Fix - Issue #150 2018-01-25 21:43:38 -06:00
Mauricio Baeza 14f17a6188 Fix - Issue #148 2018-01-25 15:44:40 -06:00
Mauricio Baeza 7e91476e47 Fix - Issue #147 2018-01-25 12:51:16 -06:00
Mauricio Baeza e728d948d0 Fix - Issue #147 2018-01-25 12:07:23 -06:00
Mauricio Baeza 5a791eec7c Fix - Al agregar empresa en MV 2018-01-25 10:22:22 -06:00
25 changed files with 627 additions and 164 deletions

View File

@ -1,3 +1,26 @@
v 2.0.2 [01-Abr-2023]
---------------------
- Fix: Obtener la clave del sat al facturar por lote.
v 2.0.1 [29-Mar-2023]
---------------------
- Fix ticket #97
Es necesario hacer una migración:
```
cd /opt/empresa-libre
git pull origin master
cd source/app/models
python main.py -bk
python main.py -m -r RFC
```
v 2.0.0 [08-Ene-2023]
----------------------
- Liberamos para todos la versión CFDI 4.0
@ -168,7 +191,7 @@ v 1.42.2 [14-Sep-2021]
- Los productos pueden no llevar ningún impuesto.
v 1.42.1 [31-May-2021]
v 1.42.1 [01-Jun-2021]
----------------------
- Error - Ticket #5

View File

@ -12,3 +12,4 @@
* Crea nueva documentación
* Propon nuevas funcionalidades
* Difunde Empresa Libre

View File

@ -1,2 +1,3 @@
[ ] Permitir más de un remolque en la Carta Porte
[ ] Campos de captura de Comercio Exterior
[ ] Representación impresa de Comercio Exterior

View File

@ -1 +1 @@
2.0.0
2.0.4

View File

@ -14,9 +14,4 @@ cryptography==3.4.8
xmlsec
segno
# pyqrcode
# pypng
# python-escpos
# pyusb
# pyserial
# qrcode

View File

@ -387,6 +387,10 @@ class CFDI(object):
for field in fields:
if field in datos:
attributes[field] = datos[field]
if not attributes:
return
node_name = '{}:Impuestos'.format(self._pre)
impuestos = ET.SubElement(self._cfdi, node_name, attributes)

View File

@ -293,7 +293,8 @@ def get_sat_productos(key):
def now():
return datetime.datetime.now().replace(microsecond=0)
n = datetime.datetime.now().replace(microsecond=0)
return n
def today():
@ -741,7 +742,12 @@ class LIBO(object):
if pakings:
col8.append((pakings[i],))
self._total_cantidades += float(cantidad)
if not count:
if not cell_5 is None:
cell_5.CellStyle = self._get_style(cell_5)
if not cell_6 is None:
cell_6.CellStyle = self._get_style(cell_6)
return
style_5 = self._get_style(cell_5)
@ -1125,6 +1131,7 @@ class LIBO(object):
return
def _cfdipays(self, data):
VERSION2 = '2.0'
version = data['Version']
related = data.pop('related', [])
@ -1158,7 +1165,8 @@ class LIBO(object):
cell_1 = self._set_cell('{doc.uuid}', uuid)
cell_2 = self._set_cell('{doc.serie}', serie)
cell_3 = self._set_cell('{doc.folio}', folio)
cell_4 = self._set_cell('{doc.metodopago}', metodo_pago)
if version != VERSION2:
cell_4 = self._set_cell('{doc.metodopago}', metodo_pago)
cell_5 = self._set_cell('{doc.moneda}', moneda)
cell_6 = self._set_cell('{doc.parcialidad}', parcialidad)
cell_7 = self._set_cell('{doc.saldoanterior}', saldo_anterior, value=True)
@ -1168,7 +1176,8 @@ class LIBO(object):
col1.append((uuid,))
col2.append((serie,))
col3.append((folio,))
col4.append((metodo_pago,))
if version != VERSION2:
col4.append((metodo_pago,))
col5.append((moneda,))
col6.append((parcialidad,))
col7.append((float(saldo_anterior),))
@ -1194,8 +1203,9 @@ class LIBO(object):
target2 = self._sheet.getCellRangeByPosition(col, row1, col, row2)
col = cell_3.getCellAddress().Column
target3 = self._sheet.getCellRangeByPosition(col, row1, col, row2)
col = cell_4.getCellAddress().Column
target4 = self._sheet.getCellRangeByPosition(col, row1, col, row2)
if version != VERSION2:
col = cell_4.getCellAddress().Column
target4 = self._sheet.getCellRangeByPosition(col, row1, col, row2)
col = cell_5.getCellAddress().Column
target5 = self._sheet.getCellRangeByPosition(col, row1, col, row2)
col = cell_6.getCellAddress().Column
@ -1210,7 +1220,8 @@ class LIBO(object):
target1.setFormulaArray(tuple(col1))
target2.setDataArray(tuple(col2))
target3.setFormulaArray(tuple(col3))
target4.setDataArray(tuple(col4))
if version != VERSION2:
target4.setDataArray(tuple(col4))
target5.setDataArray(tuple(col5))
target6.setDataArray(tuple(col6))
target7.setDataArray(tuple(col7))
@ -1939,11 +1950,14 @@ def _totales(doc, cfdi, version):
for n in list(node):
tmp = CaseInsensitiveDict(n.attrib.copy())
if version in CFDI_VERSIONS:
tasa = round(float(tmp['tasaocuota']), DECIMALES)
tasa = ''
if 'tasaocuota' in tmp:
tasa = round(float(tmp['tasaocuota']), DECIMALES)
title = 'Traslado {} {}'.format(tn.get(tmp['impuesto']), tasa)
else:
title = 'Traslado {} {}'.format(tmp['impuesto'], tmp['tasa'])
traslados.append((title, float(tmp['importe'])))
if 'importe' in tmp:
traslados.append((title, float(tmp['importe'])))
node = imp.find('{}Retenciones'.format(PRE[version]))
if node is not None:
@ -2137,15 +2151,16 @@ def _get_info_pays_2(node):
def _cfdipays(doc, data, version):
#todo: Obtener versión de complemento
if version == '4.0':
pre_pays = PRE_DEFAULT['PAGOS']['PRE']
pre_pays = PRE_DEFAULT['PAGOS']['PRE']
path = f"{PRE[version]}Complemento/{pre_pays}Pagos"
node = doc.find(path)
if node is None:
pre_pays = PRE['PAGOS']['1.0']
path = f"{PRE[version]}Complemento/{pre_pays}Pagos"
node = doc.find(path)
else:
node = doc.find('{}Complemento/{}Pagos'.format(PRE[version], PRE['pagos']))
if node is None:
log.error('Node pays not found...')
return {}
if version == '4.0':
@ -2296,7 +2311,7 @@ def upload_file(rfc, opt, file_obj):
ext = tmp[-1].lower()
versions = ('_3.2.ods',
'_3.3.ods', '_3.3_cn_1.2.ods', '_3.3_ccp_2.0.ods', '_3.3.json',
'_3.3.ods', '_3.3_cd_1.1.ods', '_3.3_cp_1.0.ods', '_3.3_cn_1.2.ods', '_3.3_ccp_2.0.ods', '_3.3.json',
'_4.0.ods',
'_4.0_cn_1.2.ods',
'_4.0_cp_2.0.ods',

View File

@ -1106,3 +1106,11 @@ def get_qr(data, kind='svg', in_base64=False):
if in_base64:
qr = base64.b64encode(qr.getvalue()).decode()
return qr
def to_date(value):
t = now().time()
d = datetime.datetime.strptime(value.split(' ')[0], '%Y-%m-%d')
dt = datetime.datetime.combine(d, t)
return dt

View File

@ -23,6 +23,7 @@ import sqlite3
from peewee import *
from playhouse.fields import PasswordField, ManyToManyField
from playhouse.shortcuts import case, SQL, cast
from psycopg2.errors import UniqueViolation
if __name__ == '__main__':
@ -226,6 +227,7 @@ def import_invoice():
return {'ok': False, 'msg': msg}
obj = Productos.get(Productos.clave==row[0])
if isinstance(row[2], str):
msg = 'El Precio Unitario debe ser un número, debe ser 0.00, si no quieres cambiarlo'
return {'ok': False, 'msg': msg}
@ -247,6 +249,7 @@ def import_invoice():
'id_product': obj.id,
'delete': '-',
'clave': obj.clave,
'clave_sat': obj.clave_sat,
'descripcion': description or obj.descripcion,
'pedimento': pedimento,
'unidad': obj.unidad.id,
@ -323,7 +326,7 @@ def config_main(user):
'timbres': 0,
'decimales_precios': DECIMALES,
'pagos': Configuracion.get_bool('chk_config_pagos'),
'pays_data_bank': Configuracion.get_bool('chk_cfg_pays_data_bank')
'pays_data_bank': Configuracion.get_bool('chk_cfg_pays_data_bank'),
}
dp = Configuracion.get_bool('chk_config_decimales_precios')
if dp:
@ -365,6 +368,7 @@ def config_timbrar():
'cfdi_folio_custom': Configuracion.get_bool('chk_folio_custom'),
'cfdi_leyendasfiscales': Configuracion.get_bool('chk_config_leyendas_fiscales'),
'cfdi_show_total_cant': Configuracion.get_bool('chk_config_show_total_cant'),
'cfdi_change_date_invoice': Configuracion.get_bool('chk_config_change_date_invoice'),
}
return conf
@ -677,6 +681,7 @@ class Configuracion(BaseModel):
'chk_config_invoice_by_ticket',
'chk_config_show_total_cant',
'chk_cancel_invoices_by_admin',
'chk_config_change_date_invoice',
'chk_cancel_tickets_by_admin',
)
data = (Configuracion
@ -2221,7 +2226,7 @@ class CuentasBanco(BaseModel):
with database_proxy.transaction():
try:
obj = CuentasBanco.create(**values)
except IntegrityError:
except (IntegrityError, UniqueViolation):
msg = 'Esta cuenta ya existe'
return {'ok': False, 'msg': msg}
@ -2963,6 +2968,16 @@ class Socios(BaseModel):
fields.pop('accounts', '')
regimenes = fields.pop('regimenes', ())
w = (
(Socios.rfc==fields['rfc']) &
(Socios.slug==fields['slug']) &
(Socios.id!=id)
)
if Socios.select().where(w).exists():
msg = 'Ya existe otro emisor con este RFC y Razón Social'
data = {'ok': False, 'row': {}, 'new': True, 'msg': msg}
return data
try:
q = Socios.update(**fields).where(Socios.id==id)
q.execute()
@ -3381,11 +3396,25 @@ class MovimientosBanco(BaseModel):
msg = 'El movimiento esta conciliado, no se puede cancelar'
return {'ok': False, 'msg': msg}
# ~ filters = (CfdiPagos.movimiento==obj)
# ~ cp = CfdiPagos.select().where(filters).count()
# ~ if cp > 0:
# ~ msg = 'El movimiento tiene Factura de Pago, no se puede cancelar'
# ~ return {'ok': False, 'msg': msg}
filters = (
(CfdiPagos.movimiento==obj) &
(CfdiPagos.uuid.is_null(False)) &
(CfdiPagos.cancelada==False)
)
cp = CfdiPagos.select().where(filters).count()
if cp > 0:
msg = 'El movimiento tiene Factura de Pago activas, no se puede cancelar'
return {'ok': False, 'msg': msg}
filters = (
(CfdiPagos.movimiento==obj) &
(CfdiPagos.uuid.is_null(True)) &
(CfdiPagos.error!='')
)
cp = CfdiPagos.select().where(filters).count()
if cp > 0:
msg = 'El movimiento tiene Factura de Pago con error, no se puede cancelar'
return {'ok': False, 'msg': msg}
with database_proxy.transaction():
obj.cancelado = True
@ -4335,6 +4364,14 @@ class Productos(BaseModel):
if count:
return False
count = (TicketsDetalle
.select(fn.COUNT(TicketsDetalle.id)).join(Productos)
.where(Productos.id==id)
.count()
)
if count:
return False
with database_proxy.transaction():
obj = Productos.get(Productos.id==id)
obj.impuestos.clear()
@ -5595,6 +5632,15 @@ class Facturas(BaseModel):
leyendas_fiscales = utils.loads(values.pop('leyendas_fiscales', '[]'))
date_invoice = values.pop('date')
if Configuracion.get_bool('chk_config_change_date_invoice'):
values['fecha'] = utils.to_date(date_invoice)
days = (utils.now() - values['fecha']).days
if days > 2:
msg = 'Fecha inválida'
data = {'ok': False, 'row': {}, 'new': True, 'msg': msg}
return data
emisor = Emisor.select()[0]
values['serie'] = cls._get_serie(cls, user, values['serie'])
if Configuracion.get_bool('chk_folio_custom') and folio_custom:
@ -5676,13 +5722,14 @@ class Facturas(BaseModel):
decimales_precios = Configuracion.get_bool('chk_config_decimales_precios')
invoice_by_ticket = Configuracion.get_bool('chk_config_invoice_by_ticket')
is_global = bool(invoice.periodicidad)
base_iva_exento = 0.0
data_global = {}
if is_global:
now = utils.now()
data_global['Periodicidad'] = invoice.periodicidad
data_global['Meses'] = now.strftime('%m')
data_global['Año'] = now.strftime('%Y')
values = invoice.periodicidad.split('|')
data_global['Periodicidad'] = values[0]
data_global['Meses'] = values[1]
data_global['Año'] = values[2]
frm_vu = FORMAT
if decimales_precios:
@ -5768,6 +5815,10 @@ class Facturas(BaseModel):
rows = FacturasDetalle.select().where(FacturasDetalle.factura==invoice)
for row in rows:
object_tax = '02'
if not row.producto is None:
object_tax = row.producto.objeto_impuesto
if is_global:
key_sat = row.clave_sat
key = row.clave
@ -5782,6 +5833,7 @@ class Facturas(BaseModel):
'Descripcion': row.descripcion,
'ValorUnitario': frm_vu.format(row.valor_unitario),
'Importe': FORMAT.format(row.importe),
'ObjetoImp': object_tax,
}
if not is_global:
concepto['Unidad'] = SATUnidades.get(SATUnidades.key==row.unidad).name[:20]
@ -5811,58 +5863,68 @@ class Facturas(BaseModel):
if invoice.tipo_comprobante != 'T':
if is_global:
ticket = (Tickets
.get(fn.Concat(Tickets.serie, Tickets.folio)==row.clave)
)
product_taxes = (TicketsImpuestos
.select()
.where(TicketsImpuestos.ticket==ticket)
)
ticket = None
try:
where = (
(fn.Concat(Tickets.serie, Tickets.folio)==row.clave) &
(Tickets.estatus=='Facturado')
)
ticket = (Tickets
.get(where)
)
product_taxes = (TicketsImpuestos
.select()
.where(TicketsImpuestos.ticket==ticket)
)
except Tickets.DoesNotExist:
product_taxes = row.producto.impuestos
else:
product_taxes = row.producto.impuestos
for impuesto in product_taxes:
base = float(row.importe - row.descuento)
if is_global:
base = float(impuesto.base)
impuesto = impuesto.impuesto
if object_tax == '02':
for impuesto in product_taxes:
base = float(row.importe - row.descuento)
if is_global and not ticket is None:
base = float(impuesto.base)
impuesto = impuesto.impuesto
if impuesto.tipo == 'E':
if impuesto.tipo == 'E':
tax = {
'Base': FORMAT.format(base),
'Impuesto': '002',
'TipoFactor': 'Exento',
}
traslados.append(tax)
base_iva_exento += base
continue
if impuesto.key == '000':
continue
tasa = float(impuesto.tasa)
if tax_decimals:
import_tax = round(tasa * base, DECIMALES_TAX)
tmp += import_tax
xml_importe = FORMAT_TAX.format(import_tax)
else:
import_tax = round(tasa * base, DECIMALES)
xml_importe = FORMAT.format(import_tax)
tipo_factor = 'Tasa'
if impuesto.factor != 'T':
tipo_factor = 'Cuota'
tax = {
'Base': FORMAT.format(base),
'Impuesto': '002',
'TipoFactor': 'Exento',
"Base": FORMAT.format(base),
"Impuesto": impuesto.key,
"TipoFactor": tipo_factor,
"TasaOCuota": str(impuesto.tasa),
"Importe": xml_importe,
}
traslados.append(tax)
continue
if impuesto.key == '000':
continue
tasa = float(impuesto.tasa)
if tax_decimals:
import_tax = round(tasa * base, DECIMALES_TAX)
tmp += import_tax
xml_importe = FORMAT_TAX.format(import_tax)
else:
import_tax = round(tasa * base, DECIMALES)
xml_importe = FORMAT.format(import_tax)
tipo_factor = 'Tasa'
if impuesto.factor != 'T':
tipo_factor = 'Cuota'
tax = {
"Base": FORMAT.format(base),
"Impuesto": impuesto.key,
"TipoFactor": tipo_factor,
"TasaOCuota": str(impuesto.tasa),
"Importe": xml_importe,
}
if impuesto.tipo == 'T':
traslados.append(tax)
else:
retenciones.append(tax)
if impuesto.tipo == 'T':
traslados.append(tax)
else:
retenciones.append(tax)
if traslados:
taxes['traslados'] = traslados
@ -5871,15 +5933,6 @@ class Facturas(BaseModel):
concepto['impuestos'] = taxes
# cfdi4
if not is_global:
concepto['ObjetoImp'] = row.producto.objeto_impuesto
else:
if taxes:
concepto['ObjetoImp'] = '02'
else:
concepto['ObjetoImp'] = '01'
conceptos.append(concepto)
impuestos = {}
@ -5949,6 +6002,14 @@ class Facturas(BaseModel):
}
retenciones.append(retencion)
if base_iva_exento:
traslado = {
'Base': FORMAT.format(base_iva_exento),
'Impuesto': '002',
'TipoFactor': 'Exento',
}
traslados.append(traslado)
impuestos['traslados'] = traslados
impuestos['retenciones'] = retenciones
impuestos['total_locales_trasladados'] = ''
@ -7238,12 +7299,14 @@ class FacturasPagos(BaseModel):
fac = Facturas.get(Facturas.id==int(i))
this_pay = values['this_pay']
importe = values['importe']
type_change = round(1 / values['type_change'], 6)
validate = round(this_pay / type_change, 2)
while validate > importe:
type_change += 0.000001
type_change = 1.00
if mov.moneda != fac.moneda:
type_change = round(1 / values['type_change'], 6)
validate = round(this_pay / type_change, 2)
while validate > importe:
type_change += 0.000001
validate = round(this_pay / type_change, 2)
mov_ant, numero = cls._movimiento_anterior(cls, mov, fac)
nuevo = {
@ -7414,6 +7477,33 @@ class CfdiPagos(BaseModel):
return {'ok': result['ok'], 'msg': result['msg'], 'id': last.id}
def _cancel2(self, values):
args = utils.loads(values['args'])
id = args.pop('id')
obj = CfdiPagos.get(CfdiPagos.id==id)
if not obj.uuid:
msg = 'La Factura de Pago no esta timbrada'
data = {'ok': False, 'msg': msg}
return data
pac = utils.get_pac_by_rfc(obj.xml)
auth = Configuracion.get_({'fields': 'auth_by_pac', 'pac': pac})
certificado = Certificado.get(Certificado.es_fiel==False)
result = utils.cancel_xml_sign(obj, args, auth, certificado)
if result['ok']:
obj.estatus = 'Cancelada'
obj.error = ''
obj.cancelada = True
obj.fecha_cancelacion = result['date']
else:
obj.error = result['msg']
obj.save()
return {'ok': result['ok'], 'msg': result['msg']}
def _get_folio(self, serie):
folio = int(Configuracion.get_('txt_config_cfdipay_folio') or '0')
start = (CfdiPagos
@ -7556,9 +7646,16 @@ class CfdiPagos(BaseModel):
tipo_factor = 'Cuota'
import_dr = round(tax.importe * tax_proporcion, 2)
xml_importe = FORMAT.format(import_dr)
base_dr = round(tax.base * tax_proporcion, 2)
new_import_tax = round(base_dr * tax.impuesto.tasa, 2)
while new_import_tax > import_dr:
base_dr -= Decimal(0.01)
new_import_tax = round(base_dr * tax.impuesto.tasa, 2)
import_dr = new_import_tax
xml_tax_base = FORMAT.format(base_dr)
xml_importe = FORMAT.format(import_dr)
values = {
"BaseDR": xml_tax_base,
@ -7567,6 +7664,7 @@ class CfdiPagos(BaseModel):
"TasaOCuotaDR": str(tax.impuesto.tasa),
"ImporteDR": xml_importe,
}
tax_key = tax.impuesto.key
if tax.impuesto.tipo == 'T':
traslados.append(values)
@ -7594,9 +7692,10 @@ class CfdiPagos(BaseModel):
return impuestos
# ~ Revisar Pagos
def _get_related_xml(self, id_mov, currency):
#TAX ToDo
TAX_IVA_16 = '002|0.160000'
TAX_IVA_0 = '002|0.000000'
filters = (FacturasPagos.movimiento==id_mov)
related = tuple(FacturasPagos.select(
@ -7604,8 +7703,7 @@ class CfdiPagos(BaseModel):
Facturas.serie.alias('Serie'),
Facturas.folio.alias('Folio'),
Facturas.moneda.alias('MonedaDR'),
FacturasPagos.tipo_cambio.alias('TipoCambioDR'),
# ~ Facturas.metodo_pago.alias('MetodoDePagoDR'),
FacturasPagos.tipo_cambio.alias('EquivalenciaDR'),
FacturasPagos.numero.alias('NumParcialidad'),
FacturasPagos.saldo_anterior.alias('ImpSaldoAnt'),
FacturasPagos.importe.alias('ImpPagado'),
@ -7618,15 +7716,15 @@ class CfdiPagos(BaseModel):
for r in related:
r['taxes'] = self._get_taxes_by_pay(self, r, taxes_pay)
# ~ print('\n\nMONEDA', currency, r['MonedaDR'])
r['IdDocumento'] = str(r['IdDocumento'])
r['Folio'] = str(r['Folio'])
r['NumParcialidad'] = str(r['NumParcialidad'])
r['TipoCambioDR'] = FORMAT6.format(r['TipoCambioDR'])
# ~ r['MetodoDePagoDR'] = DEFAULT_CFDIPAY['WAYPAY']
# REVISAR
r['EquivalenciaDR'] = '1'
equivalencia = r['EquivalenciaDR']
if currency == r['MonedaDR']:
r['EquivalenciaDR'] = '1'
else:
r['EquivalenciaDR'] = FORMAT6.format(equivalencia)
r['ObjetoImpDR'] = '01'
if r['taxes']['traslados'] or r['taxes']['retenciones']:
@ -7638,38 +7736,61 @@ class CfdiPagos(BaseModel):
r['ImpSaldoInsoluto'] = '0.00'
else:
r['ImpSaldoInsoluto'] = FORMAT.format(r['ImpSaldoInsoluto'])
if currency == r['MonedaDR']:
del r['TipoCambioDR']
if not r['Serie']:
del r['Serie']
total_tax_iva_16_base = 0
total_tax_iva_0_base = 0
total_tax_iva_16_importe = 0
total_tax_retenciones_isr_importe = 0
total_tax_retenciones_iva_importe = 0
for key, importe in taxes_pay['retenciones'].items():
taxes_pay['retenciones'][key] = FORMAT.format(importe)
total_tax_retenciones_isr_importe += importe
if key == '002':
total_tax_retenciones_iva_importe += importe
else:
total_tax_retenciones_isr_importe += importe
for k, tax in taxes_pay['traslados'].items():
tax_type = taxes_pay['traslados'][k]['ImpuestoP']
tax_tasa = taxes_pay['traslados'][k]['TasaOCuotaP']
tax_base = taxes_pay['traslados'][k]['BaseP']
importe = taxes_pay['traslados'][k]['ImporteP']
if f'{tax_type}|{tax_tasa}' == TAX_IVA_16:
tax_base /= equivalencia
importe /= equivalencia
current_tax = f'{tax_type}|{tax_tasa}'
if current_tax == TAX_IVA_16:
# ~ new_import_tax = round(Decimal(tax_tasa) * tax_base, 2)
# ~ while new_import_tax > importe:
# ~ tax_base -= Decimal(0.01)
# ~ new_import_tax = round(Decimal(tax_tasa) * tax_base, 2)
total_tax_iva_16_base += tax_base
total_tax_iva_16_importe += importe
elif current_tax == TAX_IVA_0:
total_tax_iva_0_base += tax_base
taxes_pay['traslados'][k]['BaseP'] = FORMAT.format(tax_base)
taxes_pay['traslados'][k]['ImporteP'] = FORMAT.format(importe)
taxes_pay['totales'] = {}
if taxes_pay['traslados']:
taxes_pay['totales']['TotalTrasladosBaseIVA16'] = FORMAT.format(total_tax_iva_16_base)
taxes_pay['totales']['TotalTrasladosImpuestoIVA16'] = FORMAT.format(total_tax_iva_16_importe)
if total_tax_iva_16_base:
taxes_pay['totales']['TotalTrasladosBaseIVA16'] = FORMAT.format(total_tax_iva_16_base)
taxes_pay['totales']['TotalTrasladosImpuestoIVA16'] = FORMAT.format(total_tax_iva_16_importe)
if total_tax_iva_0_base:
taxes_pay['totales']['TotalTrasladosBaseIVA0'] = FORMAT.format(total_tax_iva_0_base)
taxes_pay['totales']['TotalTrasladosImpuestoIVA0'] = FORMAT.format(0.0)
if taxes_pay['retenciones']:
taxes_pay['totales']['TotalRetencionesISR'] = FORMAT.format(total_tax_retenciones_isr_importe)
if total_tax_retenciones_isr_importe:
taxes_pay['totales']['TotalRetencionesISR'] = FORMAT.format(total_tax_retenciones_isr_importe)
if total_tax_retenciones_iva_importe:
taxes_pay['totales']['TotalRetencionesIVA'] = FORMAT.format(total_tax_retenciones_iva_importe)
return related, taxes_pay
@ -7891,6 +8012,7 @@ class CfdiPagos(BaseModel):
target = emisor.rfc + '/' + str(obj.fecha)[:7].replace('-', '/')
values = cls._get_not_in_xml(cls, obj, emisor)
data = util.get_data_from_xml(obj, values)
data.update(utils.CfdiToDict(obj.xml).values)
data['informacion_global'] = {}
obj = SATFormaPago.get(SATFormaPago.key==data['pays']['FormaDePagoP'])
@ -8109,6 +8231,9 @@ class Tickets(BaseModel):
class Meta:
order_by = ('fecha',)
indexes = (
(('serie', 'folio'), True),
)
def _get_folio(self, serie):
inicio = (Tickets
@ -8125,7 +8250,9 @@ class Tickets(BaseModel):
return inicio
def _without_tax(self, importe, obj):
# ~ todo
# ~ Por ahora se asume que solo tiene IVA trasladado 0.16
for tax in obj.impuestos:
tasa = 1.0 + float(tax.tasa)
base = round(importe / tasa, DECIMALES)
@ -8189,9 +8316,6 @@ class Tickets(BaseModel):
for tax in totals_tax.values():
if tax.tipo == 'E':
continue
ticket_tax = {
'ticket': ticket.id,
'impuesto': tax.id,
@ -8433,7 +8557,6 @@ class Tickets(BaseModel):
descuento_cfdi += details['descuento']
subtotal += details['importe']
FacturasDetalle.create(**details)
taxes = (TicketsImpuestos
@ -8448,7 +8571,6 @@ class Tickets(BaseModel):
tax_id = r.impuesto.id
tasa = r.impuesto.tasa
tax_importe = round(tasa * r.base, DECIMALES)
if tax_id in tax_sum:
tax_sum[tax_id]['base'] += r.base
tax_sum[tax_id]['importe'] += tax_importe
@ -8495,19 +8617,21 @@ class Tickets(BaseModel):
@classmethod
def invoice(cls, values, user):
is_invoice_day = util.get_bool(values['is_invoice_day'])
periodicidad = values['periodicidad']
periodicidad = values.get('periodicidad', '')
id_client = int(values['client'])
tickets = util.loads(values['tickets'])
invoice_by_ticket = Configuracion.get_bool('chk_config_invoice_by_ticket')
# ~ invoice_by_ticket = Configuracion.get_bool('chk_config_invoice_by_ticket')
invoice_by_ticket = True
if is_invoice_day:
filters = (
Socios.rfc == RFCS['PUBLIC'] and
Socios.slug == 'publico_en_general')
Socios.slug == 'publico_en_general'
)
try:
client = Socios.get(filters)
except Socios.DoesNotExist:
msg = 'No existe el cliente Público en General. Agregalo primero.'
msg = 'No existe el cliente PUBLICO EN GENERAL. Agregalo primero.'
data = {'ok': False, 'msg': msg}
return data
else:
@ -10803,7 +10927,8 @@ def get_title_app(by=1):
2: '<font color="#610B0B">Bienvenido a {}</font>',
3: '<font color="#000000">{}</font>',
}
return html[by].format(TITLE_APP)
# ~ return html[by].format(TITLE_APP)
return html[by].format(f'Empresa Libre v{VERSION_EMPRESA_LIBRE}')
def test_correo(values):
@ -11146,6 +11271,8 @@ def _migrate_tables(rfc=''):
regimen_fiscal = TextField(default='')
migrations.append(migrator.add_column(table, field, regimen_fiscal))
# migrations.append(migrator.add_index('tickets', ('serie', 'folio'), True))
if migrations:
with database_proxy.atomic() as txn:
migrate(*migrations)
@ -11172,6 +11299,10 @@ def _migrate_tables(rfc=''):
else:
log.info('Valores actualizados...')
q = Configuracion.delete().where(Configuracion.clave=='chk_config_tax_decimals')
q.execute()
log.info('Config Tax Update...')
return

View File

@ -42,7 +42,7 @@ except ImportError:
DEBUG = DEBUG
VERSION = '2.0.0'
VERSION = '2.0.4'
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 754 B

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@ -135,6 +135,7 @@ var controllers = {
$$('chk_config_invoice_by_ticket').attachEvent('onItemClick', chk_config_item_click)
$$('chk_config_show_total_cant').attachEvent('onItemClick', chk_config_item_click)
$$('chk_cancel_invoices_by_admin').attachEvent('onItemClick', chk_config_item_click)
$$('chk_config_change_date_invoice').attachEvent('onItemClick', chk_config_item_click)
$$('chk_config_anticipo').attachEvent('onItemClick', chk_config_item_click)

View File

@ -81,6 +81,7 @@ var bancos_controllers = {
$$('grid_bank_invoice_pay').attachEvent('onItemClick', grid_bank_invoice_pay_click)
$$('grid_cuentabanco').attachEvent('onItemDblClick', grid_cuentabanco_double_click)
$$('cmd_invoice_pay_sat').attachEvent('onItemClick', cmd_invoice_pay_sat_click)
$$('cmd_invoice_pay_cancel').attachEvent('onItemClick', cmd_invoice_pay_cancel_click)
init_config_bank()
}
@ -578,13 +579,13 @@ function validate_deposito(values){
return false
}
if(grid.count() && current_currency!=CURRENCY_MN){
if(type_change <= 1.0){
msg = 'El Tipo de Cambio debe ser mayor a 1.00'
msg_error(msg)
return false
}
}
//~ if(grid.count() && current_currency!=CURRENCY_MN){
//~ if(type_change <= 1.0){
//~ msg = 'El Tipo de Cambio debe ser mayor a 1.00'
//~ msg_error(msg)
//~ return false
//~ }
//~ }
var today = new Date()
if(values.deposito_fecha > today){
@ -1426,3 +1427,83 @@ function cmd_invoice_pay_sat_click(){
})
}
function cmd_invoice_pay_cancel_click(){
var g = $$('grid_bank_invoice_pay')
if(g.count() == 0){
return
}
var row = g.getSelectedItem()
if (row == undefined){
msg_error('Selecciona una factura de pago')
return
}
if (row instanceof Array){
msg_error('Selecciona solo una factura de pago')
return
}
if(!row.uuid){
msg_error('La factura de pago no esta timbrada')
return
}
win_invoice_cancel_pay2.init()
$$('win_invoice_cancel_pay2').show()
}
function cmd_invoice_cancel_pay2_click(){
var reason = $$('lst_reasons_cancel2').getValue()
var uuid = $$('txt_cancel_uuid2').getValue()
if(!reason){
msg = 'Selecciona un motivo para esta cancelación'
msg_error(msg)
return
}
if(reason=='01' & !uuid){
msg = 'Debes de capturar el UUID que reemplaza a este CFDI'
msg_error(msg)
return
}
send_invoice_cancel_pay2(reason, uuid)
$$('win_invoice_cancel_pay2').close()
}
function cmd_win_cancel_pay_close2_click(){
$$('win_invoice_cancel_pay2').close()
}
function send_invoice_cancel_pay2(reason='', uuid=''){
var grid = $$('grid_bank_invoice_pay')
var row = grid.getSelectedItem()
var data = {
'opt': 'cancel2',
args: {
id: row.id,
reason: reason,
uuid: uuid,
}
}
webix.ajax().post('cfdipay', data, function(text, data){
var values = data.json()
if(values.ok){
msg_ok(values.msg)
grid.updateItem(row.id, {'estatus': 'Cancelada'})
}else{
msg_error('No fue posible cancelar')
webix.alert({
title: 'Error al Cancelar',
text: values.msg,
type: 'alert-error'
})
}
})
}

View File

@ -23,6 +23,7 @@ var anticipo = false
var donativo = false
var cfg_invoice = new Object()
var values_comercioe = null
var values_global = ''
function init_config_invoices(){
@ -33,6 +34,7 @@ function init_config_invoices(){
g.showColumn('total')
g.showColumn('currency')
}
show('cmd_show_global_information', false)
}
@ -96,6 +98,7 @@ var invoices_controllers = {
$$('cmd_carta_copy_from_invoice').attachEvent('onItemClick', cmd_carta_copy_from_invoice_click)
$$('cmd_carta_import_json').attachEvent('onItemClick', cmd_carta_import_json_click)
$$('cmd_import_json_comercioe').attachEvent('onItemClick', cmd_import_json_comercioe_click)
$$('cmd_show_global_information').attachEvent('onItemClick', cmd_show_global_information_click)
webix.extend($$('grid_invoices'), webix.ProgressBar)
@ -254,7 +257,10 @@ function default_config(){
show('fs_divisas', values.cfdi_divisas)
show('txt_folio_custom', values.cfdi_folio_custom)
show('txt_total_cant', values.cfdi_show_total_cant)
show('date_invoice', values.cfdi_change_date_invoice)
})
values_global = ''
}
@ -296,6 +302,9 @@ function cmd_new_invoice_click(){
lst.setValue('')
lst.getList().clearAll()
$$('date_invoice').setValue(new Date())
show('cmd_show_global_information', false)
form.focus('search_client_name')
}
@ -360,6 +369,21 @@ function cmd_delete_invoice_click(id, e, node){
function validate_invoice(values){
var date_invoice = $$('date_invoice').getValue()
if(date_invoice == null){
msg = 'La fecha es requerida'
msg_error(msg)
$$('date_invoice').setFocus()
return false
}
var now = new Date()
var difference = (now.getTime() - date_invoice.getTime()) / (1000 * 3600 * 24)
if(difference > 3){
msg_error('Fecha inválida')
return false
}
var usar_cartaporte = $$('chk_cfdi_usar_cartaporte').getValue()
if(usar_cartaporte){
value = $$('lst_carta_UnidadPeso').getValue()
@ -509,8 +533,28 @@ function validate_invoice(values){
}
var is_global = $$('cmd_show_global_information').isVisible()
if(is_global){
if(values_global==''){
msg = 'Captura los datos de la Factura Global'
msg_error(msg)
return false
}
}
var rows = grid.data.getRange()
for (i = 0; i < rows.length; i++) {
if(is_global){
var key_sat = rows[i]['clave_sat']
if(key_sat!=KEY_SAT_01){
var msg = 'Clave SAT inválida para Facturar Global en la línea: ' + (i + 1)
msg_error(msg)
return false
}
}
var importe = rows[i]['importe']
if(!importe){
var msg = 'No es posible facturar importes en cero, revisa la línea: ' + (i + 1)
@ -687,6 +731,7 @@ function guardar_y_timbrar(values){
data['id'] = values.id
data['cliente'] = values.id_partner
data['productos'] = rows
data['date'] = $$('date_invoice').getValue()
data['serie'] = $$('lst_serie').getText()
data['forma_pago'] = $$('lst_forma_pago').getValue()
data['condiciones_pago'] = $$('txt_condicion_pago').getValue().trim()
@ -705,6 +750,8 @@ function guardar_y_timbrar(values){
data['folio_custom'] = $$('txt_folio_custom').getValue()
data['divisas'] = $$('opt_divisas').getValue()
data['leyendas_fiscales'] = $$('grid_leyendas_fiscales').getSelectedId(true, true)
data['periodicidad'] = values_global
$$('grid_leyendas_fiscales').unselectAll()
var usar_ine = $$('chk_cfdi_usar_ine').getValue()
@ -798,6 +845,7 @@ function guardar_y_timbrar(values){
}
values_comercioe = null
values_global = ''
$$('chk_cfdi_usar_comercioe').setValue(false)
table_relaciones.clear()
@ -806,6 +854,7 @@ function guardar_y_timbrar(values){
$$('chk_cfdi_anticipo').setValue(0)
$$('chk_cfdi_donativo').setValue(0)
$$('chk_cfdi_usar_ine').setValue(0)
show('cmd_show_global_information', false)
$$('form_invoice').setValues({id_partner: 0, lbl_partner: 'Ninguno', notas:''})
$$('multi_invoices').setValue('invoices_home')
@ -822,6 +871,7 @@ function cmd_timbrar_click(id, e, node){
}
var values = form.getValues()
if(!validate_invoice(values)){
return
}
@ -873,6 +923,10 @@ function cmd_timbrar_click(id, e, node){
}
}
if($$('cmd_show_global_information').isVisible()){
msg += 'Es una Factura Global<BR><BR>'
}
msg += '¿Estás seguro de timbrar esta factura?<BR><BR>'
webix.confirm({
@ -945,6 +999,12 @@ function set_client(row){
}
lst.setValue(lst.getPopup().getList().getFirstId())
if(row.nombre == PUBLICO && row.rfc == RFC_PUBLICO){
show('cmd_show_global_information', true)
}else{
show('cmd_show_global_information', false)
}
form.focus('search_product_id')
}
@ -2903,3 +2963,20 @@ function up_invoice_json_comercioe_on_after_file_add(obj){
}
$$('win_import_json_comercioe').close()
}
function cmd_show_global_information_click(){
win_global_information.init()
$$('win_global_information').show()
}
function cmd_save_global_information_click(){
values_global = $$('lst_global_periodicidad').getValue() + "|"
values_global += $$('lst_global_months').getValue() + "|"
values_global += $$('lst_global_year').getValue()
$$('win_global_information').close()
}
function cmd_win_global_close_click(){
$$('win_global_information').close()
}

View File

@ -232,18 +232,9 @@ function cmd_save_product_click(id, e, node){
}
var rows = $$('grid_product_taxes').getSelectedId(true, true)
//~ if (rows.length == 0){
//~ msg_error('Selecciona un impuesto')
//~ return
//~ }
var values = form.getValues();
//~ if(!isFinite(values.cant_by_packing)){
//~ msg_error('La cantidad por empaque debe ser un número')
//~ return
//~ }
if(!validate_sat_key_product(values.clave_sat, false)){
msg_error('La clave SAT no existe')
return
@ -254,7 +245,19 @@ function cmd_save_product_click(id, e, node){
return
}
if(values['objeto_impuesto']=='01' && rows.length > 0){
msg = 'Si Objeto de Impuestos = 01, no debes seleccionar ningún impuesto'
msg_error(msg)
return
}
if(values['objeto_impuesto']=='02' && rows.length == 0){
msg = 'Si Objeto de Impuestos = 02, debes de seleccionar al menos un impuesto'
msg_error(msg)
return
}
values['taxes'] = JSON.stringify(rows)
webix.ajax().sync().post('products', values, {
error:function(text, data, XmlHttpRequest){
msg = 'Ocurrio un error, consulta a soporte técnico'

View File

@ -149,7 +149,9 @@ function configuracion_inicial_ticket_to_invoice(){
var grid = $$('grid_tickets_active')
var gridt = $$('grid_tickets_invoice')
var form = $$('form_ticket_invoice')
var chk = $$('chk_is_invoice_day')
chk.setValue(false)
get_active_tickets(grid)
form.setValues({id_partner: 0, lbl_tclient: 'Ninguno'})
gridt.attachEvent('onAfterAdd', function(id, index){
@ -613,7 +615,12 @@ function chk_is_invoice_day_change(new_value, old_value){
var value = Boolean(new_value)
show('fs_ticket_search_client', !value)
enable('lst_periodicidad', value)
enable('lst_global_periodicidad_2', value)
enable('lst_global_months_2', value)
var current_date = new Date()
var current_month = (current_date.getMonth() + 1).toString().padStart(2, '0')
$$('lst_global_months_2').setValue(current_month)
}
@ -645,6 +652,7 @@ function save_ticket_to_invoice(data){
if(values.ok){
msg_ok(values.msg)
send_timbrar_invoice(values.id)
$$('chk_is_invoice_day').setValue(false)
$$('multi_tickets').setValue('tickets_home')
}else{
msg_error(values.msg)
@ -681,13 +689,26 @@ function cmd_new_invoice_from_ticket_click(){
})
var data = new Object()
data['opt'] = 'invoice'
data['client'] = values.id_partner
data['tickets'] = tickets
data['is_invoice_day'] = chk.getValue()
data['periodicidad'] = $$('lst_periodicidad').getValue()
data['opt'] = 'invoice'
msg = 'Todos los datos son correctos.<BR><BR>¿Estás seguro de generar esta factura?'
var periodicidad = ''
if(data['is_invoice_day']){
periodicidad = $$('lst_global_periodicidad_2').getValue() + '|'
periodicidad += $$('lst_global_months_2').getValue() + '|'
periodicidad += new Date().getFullYear()
}
data['periodicidad'] = periodicidad
msg = 'Todos los datos son correctos.<BR><BR>'
if(data['is_invoice_day']){
msg += 'Es Factura Global.<BR><BR>'
}
msg += '¿Estás seguro de generar esta factura?'
webix.confirm({
title: 'Generar Factura',
ok: 'Si',

View File

@ -15,7 +15,7 @@
//~ along with this program. If not, see <http://www.gnu.org/licenses/>.
var PUBLICO = "Público en general";
var PUBLICO = "PUBLICO EN GENERAL";
var RFC_PUBLICO = "XAXX010101000";
var RFC_EXTRANJERO = "XEXX010101000";
var PAIS = "México";
@ -24,6 +24,7 @@ var DECIMALES = 2;
var DECIMALES_TAX = 4;
var CLAVE_ANTICIPOS = '84111506';
var CURRENCY_MN = 'MXN';
var KEY_SAT_01 = '01010101';
var db = new loki('data.db');
@ -627,3 +628,33 @@ function grid_parse(grid_name, values){
function activate_tab(parent, name){
$$(parent).getTabbar().setValue(name)
}
var opt_global_periodicidad = [
{id: '01', value: '[01] Diario'},
{id: '02', value: '[02] Semanal'},
{id: '03', value: '[03] Quincenal'},
{id: '04', value: '[04] Mensual'},
{id: '05', value: '[05] Bimestral'},
]
var opt_global_months = [
{id: '01', value: '[01] Enero'},
{id: '02', value: '[02] Febrero'},
{id: '03', value: '[03] Marzo'},
{id: '04', value: '[04] Abril'},
{id: '05', value: '[05] Mayo'},
{id: '06', value: '[06] Junio'},
{id: '07', value: '[07] Julio'},
{id: '08', value: '[08] Agosto'},
{id: '09', value: '[09] Septiembre'},
{id: '10', value: '[10] Octubre'},
{id: '11', value: '[11] Noviembre'},
{id: '12', value: '[12] Diciembre'},
{id: '13', value: '[13] Enero-Febrero'},
{id: '14', value: '[14] Marzo-Abril'},
{id: '15', value: '[15] Mayo-Junio'},
{id: '16', value: '[16] Julio-Agosto'},
{id: '17', value: '[17] Septiembre-Octubre'},
{id: '18', value: '[18] Noviembre-Diciembre'},
]

View File

@ -668,7 +668,7 @@ var options_admin_otros = [
{view: 'checkbox', id: 'chk_config_tax_locales', labelWidth: 0,
labelRight: 'Impuestos locales, calcular antes del descuento'},
{view: 'checkbox', id: 'chk_config_tax_decimals', labelWidth: 0,
labelRight: 'Calcular impuestos con 4 decimales'},
labelRight: 'Calcular impuestos con 4 decimales', hidden: true},
{view: 'checkbox', id: 'chk_config_price_with_taxes_in_invoice', labelWidth: 0,
labelRight: 'Precio incluye impuestos'},
{view: 'checkbox', id: 'chk_config_add_same_product', labelWidth: 0,
@ -694,6 +694,11 @@ var options_admin_otros = [
labelRight: 'Solo admins pueden cancelar'},
{}
]},
{cols: [{maxWidth: 15},
{view: 'checkbox', id: 'chk_config_change_date_invoice', labelWidth: 0,
labelRight: 'Permitir cambiar fecha al facturar [No recomendable]'},
{}
]},
{maxHeight: 15},
{template: 'Timbrado', type: 'section'},

View File

@ -367,11 +367,13 @@ var toolbar_bank_invoice_pay_filter = [
{view: 'richselect', id: 'filter_invoice_pay_year', label: 'Año',
labelAlign: 'right', labelWidth: 50, width: 150, options: []},
{view: 'richselect', id: 'filter_invoice_pay_month', label: 'Mes',
labelAlign: 'right', labelWidth: 50, width: 200, options: months},
labelAlign: 'right', labelWidth: 50, width: 175, options: months},
{view: 'daterangepicker', id: 'filter_invoice_pay_dates', label: 'Fechas',
labelAlign: 'right', width: 300},
labelAlign: 'right', width: 275},
{view: 'button', id: 'cmd_invoice_pay_sat', label: 'SAT',
type: 'iconButton', autowidth: true, icon: 'check-circle'},
{view: 'button', id: 'cmd_invoice_pay_cancel', label: 'Cancelar',
type: 'iconButton', autowidth: true, icon: 'ban'},
{},
]
@ -626,7 +628,7 @@ var body_invoice_cancel_pay = {rows: [{minHeight: 15},
{view: 'richselect', id: 'lst_reasons_cancel', labelPosition: 'top', label: 'Razón de cancelación', options: opt_reasons_cancel_pay, value: '', width: 400},
{view: 'text', id: 'txt_cancel_uuid', labelPosition: 'top', label: 'UUID que sustituye', width: 400},
{view: 'label', label: 'Esta acción no se puede deshacer', autowidth: true, align: 'center'},
{view: 'label', label: '¿Estás segura de continuar?', autowidth: true, align: 'center'},
{view: 'label', label: '¿Estás seguro de continuar?', autowidth: true, align: 'center'},
{cols: [{},
{view: 'button', id: 'cmd_invoice_cancel_pay', width: 100, label: 'Cancelar', type: 'danger', icon: 'ban'},
{maxWidth: 25},
@ -652,3 +654,35 @@ var win_invoice_cancel_pay = {
$$('cmd_win_cancel_pay_close').attachEvent('onItemClick', cmd_win_cancel_pay_close_click)
}
}
var body_invoice_cancel_pay2 = {rows: [{minHeight: 15},
{view: 'richselect', id: 'lst_reasons_cancel2', labelPosition: 'top', label: 'Razón de cancelación', options: opt_reasons_cancel_pay, value: '', width: 400},
{view: 'text', id: 'txt_cancel_uuid2', labelPosition: 'top', label: 'UUID que sustituye', width: 400},
{view: 'label', label: 'Esta acción no se puede deshacer', autowidth: true, align: 'center'},
{view: 'label', label: '¿Estás seguro de continuar?', autowidth: true, align: 'center'},
{cols: [{},
{view: 'button', id: 'cmd_invoice_cancel_pay2', width: 100, label: 'Cancelar', type: 'danger', icon: 'ban'},
{maxWidth: 25},
{view: 'button', id: 'cmd_win_cancel_pay_close2', width: 100, label: 'Cerrar'},
{}
]},
{minHeight: 20},
]}
var win_invoice_cancel_pay2 = {
init: function(){
webix.ui({
view: 'window',
id: 'win_invoice_cancel_pay2',
modal: true,
width: 400,
position: 'center',
head: 'Cancelar CFDI de Pago',
body: body_invoice_cancel_pay2,
})
$$('cmd_invoice_cancel_pay2').attachEvent('onItemClick', cmd_invoice_cancel_pay2_click)
$$('cmd_win_cancel_pay_close2').attachEvent('onItemClick', cmd_win_cancel_pay_close2_click)
}
}

View File

@ -224,6 +224,8 @@ var toolbar_invoices_generate = {view: 'toolbar', elements: [{},
labelWidth: 0, width: 100, hidden: true},
{view: 'checkbox', id: 'chk_cfdi_donativo', labelRight: 'Es Donativo',
labelWidth: 0, width: 100, hidden: true},
{view: 'button', id: 'cmd_show_global_information', label: 'Global',
type: 'iconButton', autowidth: true, hidden: false, icon: 'file-code-o'},
{}]}
@ -485,8 +487,11 @@ var suggest_students = {
}
var body_comprobante = {rows: [{
cols: [
var body_comprobante = {rows: [
{view: 'datepicker', id: 'date_invoice', label: 'Fecha', format: '%d-%F-%Y',
required: true, invalidMessage: 'Selecciona una fecha', hidden: true
},
{cols: [
{
view: 'richselect',
id: 'lst_tipo_comprobante',
@ -1425,3 +1430,44 @@ var win_import_json_comercioe = {
$$('up_invoice_json').attachEvent('onAfterFileAdd', up_invoice_json_comercioe_on_after_file_add)
}
}
var body_global_information = {rows: [{minHeight: 5},
{view: 'richselect', id: 'lst_global_periodicidad', label: 'Periodicidad:', options: opt_global_periodicidad, value: '01'},
{view: 'richselect', id: 'lst_global_months', label: 'Mes:', options: opt_global_months, value: '01'},
{view: 'richselect', id: 'lst_global_year', label: 'Año:', options: []},
{view: 'label', label: '¿Guardar estos datos?', width: 300, align: 'center'},
{cols: [{},
{view: 'button', id: 'cmd_save_global_information', width: 100, label: 'Si Guardar'},
{maxWidth: 25},
{view: 'button', id: 'cmd_win_global_close', width: 100, label: 'No, Cerrar'},
{}
]},
{minHeight: 10},
]}
var win_global_information = {
init: function(){
webix.ui({
view: 'window',
id: 'win_global_information',
modal: true,
width: 400,
position: 'center',
head: 'Información Global',
body: body_global_information,
})
var current_date = new Date()
var current_month = (current_date.getMonth() + 1).toString().padStart(2, '0')
$$('lst_global_months').setValue(current_month)
var current_year = current_date.getFullYear()
$$('lst_global_year').getList().parse([{id: current_year, value: current_year}])
$$('lst_global_year').setValue(current_year)
$$('cmd_save_global_information').attachEvent('onItemClick', cmd_save_global_information_click)
$$('cmd_win_global_close').attachEvent('onItemClick', cmd_win_global_close_click)
}
}

View File

@ -153,13 +153,6 @@ var controls_generals = [
width: 500, labelWidth: 150, labelAlign: "right", required: true,
invalidMessage: 'Este campo es requerido', options: opt_tax_object},
{},
//~ {view: 'text', id: 'cant_by_packing', name: 'cant_by_packing',
//~ labelAlign: 'right', labelWidth: 150, inputAlign: "right",
//~ label: 'Cantidad por empaque:'},
//~ {},
//~ {view: 'text', id: 'tags_producto', name: 'tags_producto',
//~ labelAlign: 'right', label: 'Etiquetas',
//~ placeholder: 'Separadas por comas'}
]},
{cols: [
{view: "currency", type: "text", id: "valor_unitario",

View File

@ -233,20 +233,13 @@ var cells_new_ticket = [
]
var opt_periodicidad = [
{id: '01', value: '[01] Diario'},
{id: '02', value: '[02] Semanal'},
{id: '03', value: '[03] Quincenal'},
{id: '04', value: '[04] Mensual'},
//~ {id: '05', value: '[05] Bimestral'},
]
var toolbar_ticket_invoice = {view: 'toolbar', elements: [{},
{view: 'checkbox', id: 'chk_is_invoice_day', labelWidth: 0, width: 150,
labelRight: 'Es factura del día'},
{view: 'richselect', id: 'lst_periodicidad', labelWidth: 90, width: 250,
label: 'Periodicidad:', options: opt_periodicidad, value: '01', disabled: true},
labelRight: 'Es Factura Global'},
{view: 'richselect', id: 'lst_global_periodicidad_2', labelWidth: 90, width: 225,
label: 'Periodicidad:', options: opt_global_periodicidad, value: '01', disabled: true},
{view: 'richselect', id: 'lst_global_months_2', labelWidth: 50, width: 250,
label: 'Mes:', options: opt_global_months, value: '01', disabled: true},
{},
{view: 'button', id: 'cmd_close_ticket_invoice', label: 'Cerrar',
type: 'danger', autowidth: true, align: 'center'}