forked from elmau/empresa-libre
Update catalog SAT
This commit is contained in:
commit
71bd536cb1
17
CHANGELOG.md
17
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]
|
v 1.33.0 [22-ene-2020]
|
||||||
----------------------
|
----------------------
|
||||||
- Mejora: Cambio del mensaje para cuando se intenta dar de alta un cliente ya existente.
|
- Mejora: Cambio del mensaje para cuando se intenta dar de alta un cliente ya existente.
|
||||||
|
|
|
@ -44,9 +44,6 @@ from pathlib import Path
|
||||||
from xml.etree import ElementTree as ET
|
from xml.etree import ElementTree as ET
|
||||||
from xml.dom.minidom import parseString
|
from xml.dom.minidom import parseString
|
||||||
|
|
||||||
# ~ import pdfkit
|
|
||||||
# ~ from weasyprint import HTML, CSS
|
|
||||||
# ~ from weasyprint.fonts import FontConfiguration
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import uno
|
import uno
|
||||||
|
|
|
@ -52,6 +52,7 @@ import seafileapi
|
||||||
|
|
||||||
from settings import DEBUG, DB_COMPANIES, PATHS
|
from settings import DEBUG, DB_COMPANIES, PATHS
|
||||||
from .comercio import PACComercioDigital
|
from .comercio import PACComercioDigital
|
||||||
|
# ~ from .finkok import PACFinkok
|
||||||
|
|
||||||
|
|
||||||
LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s'
|
LOG_FORMAT = '%(asctime)s - %(levelname)s - %(message)s'
|
||||||
|
@ -73,7 +74,8 @@ if DEBUG:
|
||||||
PSQL = 'psql -h localhost -U postgres'
|
PSQL = 'psql -h localhost -U postgres'
|
||||||
|
|
||||||
PACS = {
|
PACS = {
|
||||||
'comercio': PACComercioDigital
|
# ~ '': PACFinkok,
|
||||||
|
'comercio': PACComercioDigital,
|
||||||
}
|
}
|
||||||
|
|
||||||
#~ https://github.com/kennethreitz/requests/blob/v1.2.3/requests/structures.py#L37
|
#~ 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
|
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):
|
def get_client_balance(auth, name):
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
return '-d'
|
return '-d'
|
||||||
|
|
|
@ -3728,7 +3728,12 @@ class Facturas(BaseModel):
|
||||||
msg = 'No es posible cancelar CFDI 3.2'
|
msg = 'No es posible cancelar CFDI 3.2'
|
||||||
return {'ok': False, 'msg': msg}
|
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)
|
data, result = util.cancel_xml(auth, obj.uuid, certificado)
|
||||||
|
|
||||||
if data['ok']:
|
if data['ok']:
|
||||||
obj.estatus = 'Cancelada'
|
obj.estatus = 'Cancelada'
|
||||||
obj.error = ''
|
obj.error = ''
|
||||||
|
@ -5835,7 +5840,7 @@ class FacturasComplementos(BaseModel):
|
||||||
.select()
|
.select()
|
||||||
.where(FacturasComplementos.factura==factura)
|
.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):
|
class PreFacturasRelacionadas(BaseModel):
|
||||||
|
|
|
@ -47,7 +47,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
DEBUG = DEBUG
|
DEBUG = DEBUG
|
||||||
VERSION = '1.33.1'
|
VERSION = '1.33.2'
|
||||||
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
||||||
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,7 @@
|
||||||
{"key": "28", "name": "Tarjeta de débito", "activo": true},
|
{"key": "28", "name": "Tarjeta de débito", "activo": true},
|
||||||
{"key": "29", "name": "Tarjeta de servicios", "activo": false},
|
{"key": "29", "name": "Tarjeta de servicios", "activo": false},
|
||||||
{"key": "30", "name": "Aplicación de anticipos", "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}
|
{"key": "99", "name": "Por definir", "activo": true}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -684,8 +684,7 @@ var options_admin_otros = [
|
||||||
{cols: [{maxWidth: 15},
|
{cols: [{maxWidth: 15},
|
||||||
{view: 'richselect', id: 'lst_pac', name: 'lst_pac', width: 300,
|
{view: 'richselect', id: 'lst_pac', name: 'lst_pac', width: 300,
|
||||||
label: 'PAC: ', value: 'default', required: false,
|
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},
|
{maxHeight: 20},
|
||||||
{template: 'Ayudas varias', type: 'section'},
|
{template: 'Ayudas varias', type: 'section'},
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<xsl:include href="iedu.xslt"/>
|
<xsl:include href="iedu.xslt"/>
|
||||||
<xsl:include href="pagos10.xslt"/>
|
<xsl:include href="pagos10.xslt"/>
|
||||||
<xsl:include href="divisas.xslt"/>
|
<xsl:include href="divisas.xslt"/>
|
||||||
|
<xsl:include href="servicioconstruccion.xslt"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<xsl:include href="ecc11.xslt"/>
|
<xsl:include href="ecc11.xslt"/>
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:servicioparcial="http://www.sat.gob.mx/servicioparcialconstruccion">
|
||||||
|
<xsl:template match="servicioparcial:parcialesconstruccion">
|
||||||
|
<!--Manejador de nodos tipo parcialesconstruccion-->
|
||||||
|
<xsl:call-template name="Requerido">
|
||||||
|
<xsl:with-param name="valor" select="./@Version" />
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="Requerido">
|
||||||
|
<xsl:with-param name="valor" select="./@NumPerLicoAut" />
|
||||||
|
</xsl:call-template>
|
||||||
|
<!-- Iniciamos el manejo de los nodos dependientes -->
|
||||||
|
<xsl:apply-templates select="./servicioparcial:Inmueble" />
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="servicioparcial:Inmueble">
|
||||||
|
<!-- Iniciamos el tratamiento de los atributos de servicioparcial:Inmueble-->
|
||||||
|
<xsl:call-template name="Requerido">
|
||||||
|
<xsl:with-param name="valor" select="./@Calle" />
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="Opcional">
|
||||||
|
<xsl:with-param name="valor" select="./@NoExterior" />
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="Opcional">
|
||||||
|
<xsl:with-param name="valor" select="./@NoInterior" />
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="Opcional">
|
||||||
|
<xsl:with-param name="valor" select="./@Colonia" />
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="Opcional">
|
||||||
|
<xsl:with-param name="valor" select="./@Localidad" />
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="Opcional">
|
||||||
|
<xsl:with-param name="valor" select="./@Referencia" />
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="Requerido">
|
||||||
|
<xsl:with-param name="valor" select="./@Municipio" />
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="Requerido">
|
||||||
|
<xsl:with-param name="valor" select="./@Estado" />
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="Requerido">
|
||||||
|
<xsl:with-param name="valor" select="./@CodigoPostal" />
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
Loading…
Reference in New Issue