diff --git a/CHANGELOG.md b/CHANGELOG.md index b1e0a4b..50e3b2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +v 1.31.1 [28-ago-2019] +---------------------- + - Error: Al agregar nuevo impuesto #369 + + v 1.31.0 [23-abr-2019] ---------------------- - Error: Validar cantidad o valor unitario cero en tickets diff --git a/README.md b/README.md index 9935ff6..44f0eed 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ contratar: administracion ARROBA empresalibre.net * Servidor web, recomendado Nginx * uwsgi -* python3 +* python3.6+ * xsltproc * openssl * xmlsec diff --git a/VERSION b/VERSION index 34aae15..6bae540 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.31.0 +1.31.1 diff --git a/source/app/models/main.py b/source/app/models/main.py index c90c18e..59fcd25 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -3663,6 +3663,8 @@ class Facturas(BaseModel): @classmethod def validate_count_partners(cls, ids): + """Validate if invoices IDs are of unique client""" + filters = (Facturas.id.in_(tuple(ids.keys()))) partners = (Facturas.select(fn.COUNT(Socios.rfc)) .where(filters) @@ -5275,6 +5277,16 @@ class Facturas(BaseModel): return {'ok': False} + # ~ v2 + @classmethod + def uncancel(cls, id): + obj = Facturas.get(Facturas.id==id) + if obj.uuid is None: + msg = 'La factura no esta timbrada' + return {'ok': False, 'msg': msg} + + return + class PreFacturas(BaseModel): cliente = ForeignKeyField(Socios) @@ -9974,6 +9986,8 @@ def _exportar_documentos(): if not month: month = str(n.month) + without_stamp = [] + filters = { 'year': year, 'month': month, @@ -9986,6 +10000,8 @@ def _exportar_documentos(): i+1, t, row['serie'], row['folio']) log.info(msg) _, name = Facturas.get_xml(row['id']) + if not row['uuid']: + without_stamp.append(f"{row['serie']}-{row['folio']}") msg = '\tXML extraido...' log.info(msg) name = name[:-3] + 'pdf' @@ -9998,6 +10014,8 @@ def _exportar_documentos(): log.info(msg) log.info('Documentos exportados...') + for i in without_stamp: + log.info(i) return diff --git a/source/app/settings.py b/source/app/settings.py index b5b809d..dbe8d15 100644 --- a/source/app/settings.py +++ b/source/app/settings.py @@ -47,7 +47,7 @@ except ImportError: DEBUG = DEBUG -VERSION = '1.31.0' +VERSION = '1.31.1' EMAIL_SUPPORT = ('soporte@empresalibre.mx',) TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION) diff --git a/source/static/js/controller/admin.js b/source/static/js/controller/admin.js index cbc3392..650b713 100644 --- a/source/static/js/controller/admin.js +++ b/source/static/js/controller/admin.js @@ -1640,7 +1640,7 @@ function cmd_agregar_impuesto_click(){ return } - if(impuesto='ISR' || tasa > 0){ + if(impuesto=='ISR' && tasa > 0){ msg = 'El impuesto ISR debe ser tipo RetenciĆ³n' msg_error(msg) return