diff --git a/source/app/controllers/helper.py b/source/app/controllers/helper.py index 0f1dbe8..e1f346e 100644 --- a/source/app/controllers/helper.py +++ b/source/app/controllers/helper.py @@ -252,13 +252,18 @@ class SendMail(object): def _login(self): try: - if self._config['ssl']: + if self._config['ssl'] and 'gmail' in self._config['servidor']: self._server = smtplib.SMTP( self._config['servidor'], self._config['puerto'], timeout=10) self._server.ehlo() self._server.starttls() self._server.ehlo() + elif self._config['ssl']: + self._server = smtplib.SMTP_SSL( + self._config['servidor'], + self._config['puerto'], timeout=10) + self._server.ehlo() else: self._server = smtplib.SMTP( self._config['servidor'], diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py index ef7d370..8f83bca 100644 --- a/source/app/controllers/util.py +++ b/source/app/controllers/util.py @@ -1666,10 +1666,10 @@ class ImportFacturaLibreGambas(object): data = {} tables = ( ('receptores', 'Socios'), - # ~ ('cfdifacturas', 'Facturas'), - # ~ ('categorias', 'Categorias'), - # ~ ('productos', 'Productos'), - # ~ ('tickets', 'Tickets'), + ('cfdifacturas', 'Facturas'), + ('categorias', 'Categorias'), + ('productos', 'Productos'), + ('tickets', 'Tickets'), ) for source, target in tables: data[target] = self._get_table(source) @@ -1757,6 +1757,7 @@ class ImportFacturaLibreGambas(object): '0': 0.0, '16': 0.16, '16.00': 0.16, + '0.16': 0.16, '11': 0.11, '-10': 0.10, '-2': 0.02, @@ -2007,7 +2008,7 @@ class ImportFacturaLibreGambas(object): if not new['uuid']: new['uuid'] = None - elif new['uuid'] in('ok', '123'): + elif new['uuid'] in('ok', '123', '??'): new['uuid'] = None new['estatus'] = 'Cancelada' new['cancelada'] = True diff --git a/source/app/models/main.py b/source/app/models/main.py index 2d41ce8..20cf77b 100644 --- a/source/app/models/main.py +++ b/source/app/models/main.py @@ -4972,10 +4972,10 @@ def _importar_factura_libre_gambas(conexion): data = app.import_data() _importar_socios(data['Socios']) - # ~ _importar_facturas(data['Facturas']) - # ~ _importar_categorias(data['Categorias']) - # ~ _importar_productos_gambas(data['Productos']) - # ~ _import_tickets(data['Tickets']) + _importar_facturas(data['Facturas']) + _importar_categorias(data['Categorias']) + _importar_productos_gambas(data['Productos']) + _import_tickets(data['Tickets']) log.info('ImportaciĆ³n terminada...') return