diff --git a/CHANGELOG.md b/CHANGELOG.md
index f2c5570..e36507b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,21 @@
+v 1.33.2 [27-ene-2020]
+----------------------
+ - Se actualizan métodos de pago en catálogos del SAT
+
+* IMPORTANTE:
+Es necesario actualizar los catálogos del SAT
+```
+git pull origin master
+
+cd source/app/models
+
+python main.py -bk
+
+python main.py -us
+```
+
+
v 1.33.0 [22-ene-2020]
----------------------
- Mejora: Cambio del mensaje para cuando se intenta dar de alta un cliente ya existente.
diff --git a/VERSION b/VERSION
index 02261be..80c8c0b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.33.1
+1.33.2
diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py
index 3806ab9..50653ea 100644
--- a/source/app/controllers/util.py
+++ b/source/app/controllers/util.py
@@ -44,9 +44,6 @@ from pathlib import Path
from xml.etree import ElementTree as ET
from xml.dom.minidom import parseString
-# ~ import pdfkit
-# ~ from weasyprint import HTML, CSS
-# ~ from weasyprint.fonts import FontConfiguration
try:
import uno
diff --git a/source/app/controllers/utils.py b/source/app/controllers/utils.py
index fbd64ab..ac24815 100644
--- a/source/app/controllers/utils.py
+++ b/source/app/controllers/utils.py
@@ -52,6 +52,7 @@ import seafileapi
from settings import DEBUG, DB_COMPANIES, PATHS
from .comercio import PACComercioDigital
+# ~ from .finkok import PACFinkok
LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s'
@@ -73,7 +74,8 @@ if DEBUG:
PSQL = 'psql -h localhost -U postgres'
PACS = {
- 'comercio': PACComercioDigital
+ # ~ '': PACFinkok,
+ 'comercio': PACComercioDigital,
}
#~ https://github.com/kennethreitz/requests/blob/v1.2.3/requests/structures.py#L37
@@ -593,6 +595,30 @@ def xml_stamp(xml, auth, name):
return result
+def xml_cancel(xml, auth, cert, name):
+ msg = 'Factura cancelada correctamente'
+ data = {'ok': True, 'msg': msg, 'row': {'estatus': 'Cancelada'}}
+
+ pac = PACS[name]()
+
+ # ~ result = pac.cancel_xml(certificado.rfc, str(uuid).upper(),
+ # ~ certificado.cer_pem.encode(), _get_pem_from_pfx(certificado))
+ # ~ if result:
+ # ~ codes = {None: '',
+ # ~ 'Could not get UUID Text': 'UUID no encontrado',
+ # ~ 'Invalid Passphrase': 'Contraseña inválida',
+ # ~ }
+ # ~ if not result['CodEstatus'] is None:
+ # ~ data['ok'] = False
+ # ~ data['msg'] = codes.get(result['CodEstatus'], result['CodEstatus'])
+ # ~ else:
+ data['ok'] = False
+ data['msg'] = pac.error
+ data['msg'] = 'Error Test'
+
+ return data, result
+
+
def get_client_balance(auth, name):
if DEBUG:
return '-d'
diff --git a/source/app/models/main.py b/source/app/models/main.py
index cc5b047..7a2098d 100644
--- a/source/app/models/main.py
+++ b/source/app/models/main.py
@@ -3728,7 +3728,12 @@ class Facturas(BaseModel):
msg = 'No es posible cancelar CFDI 3.2'
return {'ok': False, 'msg': msg}
+ # ~ pac = Configuracion.get_('lst_pac').lower()
+ # ~ if pac:
+ # ~ data, result = utils.xml_cancel(obj.xml, auth, certificado, pac)
+ # ~ else:
data, result = util.cancel_xml(auth, obj.uuid, certificado)
+
if data['ok']:
obj.estatus = 'Cancelada'
obj.error = ''
@@ -5835,7 +5840,7 @@ class FacturasComplementos(BaseModel):
.select()
.where(FacturasComplementos.factura==factura)
)
- return {r.nombre: util.loads(r.valores) for r in query}
+ return {r.nombre: utils.loads(r.valores) for r in query}
class PreFacturasRelacionadas(BaseModel):
diff --git a/source/app/settings.py b/source/app/settings.py
index c77b7c4..de11348 100644
--- a/source/app/settings.py
+++ b/source/app/settings.py
@@ -47,7 +47,7 @@ except ImportError:
DEBUG = DEBUG
-VERSION = '1.33.1'
+VERSION = '1.33.2'
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
diff --git a/source/db/valores_iniciales.json b/source/db/valores_iniciales.json
index 5b63380..659c993 100644
--- a/source/db/valores_iniciales.json
+++ b/source/db/valores_iniciales.json
@@ -87,6 +87,7 @@
{"key": "28", "name": "Tarjeta de débito", "activo": true},
{"key": "29", "name": "Tarjeta de servicios", "activo": false},
{"key": "30", "name": "Aplicación de anticipos", "activo": false},
+ {"key": "31", "name": "Intermediario pagos", "activo": false},
{"key": "99", "name": "Por definir", "activo": true}
]
},
diff --git a/source/static/js/ui/admin.js b/source/static/js/ui/admin.js
index 4affa44..bdaec11 100644
--- a/source/static/js/ui/admin.js
+++ b/source/static/js/ui/admin.js
@@ -684,8 +684,7 @@ var options_admin_otros = [
{cols: [{maxWidth: 15},
{view: 'richselect', id: 'lst_pac', name: 'lst_pac', width: 300,
label: 'PAC: ', value: 'default', required: false,
- options: options_pac},
- {},
+ options: options_pac}, {view: 'label', label: 'NO cambies este valor, a menos que se te haya indicado'},
]},
{maxHeight: 20},
{template: 'Ayudas varias', type: 'section'},
diff --git a/source/xslt/cadena.xslt b/source/xslt/cadena.xslt
index 4c6e2d5..7cf2b91 100644
--- a/source/xslt/cadena.xslt
+++ b/source/xslt/cadena.xslt
@@ -14,6 +14,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+