diff --git a/CHANGELOG.md b/CHANGELOG.md index 14b9eb1..0b9893b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +v 1.38.0 [07-mar-2020] +---------------------- + - Mejora: Factura global por ticket o nota + + v 1.37.0 [02-mar-2020] ---------------------- - Mejora: Soporte para complemento Leyendas Fiscales diff --git a/VERSION b/VERSION index bf50e91..ebeef2f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.37.0 +1.38.0 diff --git a/source/app/models/main.py b/source/app/models/main.py index dd2346c..b1f42ab 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -48,6 +48,7 @@ from settings import ( PATHS, URL, VALUES_PDF, + RFCS, ) FORMAT = '{0:.2f}' @@ -3824,7 +3825,7 @@ class Facturas(BaseModel): obj.acuse = result['Acuse'] or '' self._actualizar_saldo_cliente(self, obj, True) self._update_inventory(self, obj, True) - # ~ self._uncancel_tickets(self, obj) + self._uncancel_tickets(self, obj) else: obj.error = data['msg'] obj.save() @@ -3832,6 +3833,11 @@ class Facturas(BaseModel): @utils.run_in_thread def _uncancel_tickets(self, invoice): + query = (Tickets + .update(estatus='Generado', cancelado=False, factura=None) + .where(Tickets.factura==invoice) + ) + query.execute() return def _cancel_signature(self, id): @@ -7287,7 +7293,8 @@ class Tickets(BaseModel): def _get_payment_type(self, ids): """Get max of payment type""" - query = (Tickets.select( + query = (Tickets + .select( Tickets.forma_pago, fn.Sum(Tickets.subtotal).alias('total')) .where(Tickets.id.in_(ids)) diff --git a/source/app/settings.py b/source/app/settings.py index b1f5bc7..3476f67 100644 --- a/source/app/settings.py +++ b/source/app/settings.py @@ -47,7 +47,7 @@ except ImportError: DEBUG = DEBUG -VERSION = '1.37.0' +VERSION = '1.38.0' EMAIL_SUPPORT = ('soporte@empresalibre.mx',) TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION) @@ -234,6 +234,10 @@ VALUES_PDF = { }, } +RFCS = { + 'PUBLIC': 'XAXX010101000', +} + URL = { 'SEAFILE': 'https://seafile.elmau.net', }