Arreglo teniendo en cuenta company_id
This commit is contained in:
parent
6c73958307
commit
3d52b0c112
@ -186,6 +186,7 @@ consulta_sql_customer_invoices_issue = (
|
|||||||
"LEFT JOIN customer_invoice_taxes cit on (ci.id = cit.invoice_id) "
|
"LEFT JOIN customer_invoice_taxes cit on (ci.id = cit.invoice_id) "
|
||||||
"LEFT JOIN verifactu_records vr on (ci.id = vr.invoice_id) "
|
"LEFT JOIN verifactu_records vr on (ci.id = vr.invoice_id) "
|
||||||
"WHERE (ci.is_proforma = 0) AND (ci.status= 'issued') "
|
"WHERE (ci.is_proforma = 0) AND (ci.status= 'issued') "
|
||||||
|
"AND (company_id = %s) "
|
||||||
"AND (vr.estado <> 'Correcto') "
|
"AND (vr.estado <> 'Correcto') "
|
||||||
"order by reference"
|
"order by reference"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -19,7 +19,7 @@ def sync_invoices_verifactu(conn_mysql, last_execution_date):
|
|||||||
try:
|
try:
|
||||||
cursor_mysql = conn_mysql.cursor()
|
cursor_mysql = conn_mysql.cursor()
|
||||||
# Ejecutar la consulta de customer invoices a enviar
|
# Ejecutar la consulta de customer invoices a enviar
|
||||||
cursor_mysql.execute(SQL.consulta_sql_customer_invoices_issue)
|
cursor_mysql.execute(SQL.consulta_sql_customer_invoices_issue, (str(config["CTE_COMPANY_ID"]),))
|
||||||
filas = cursor_mysql.fetchall()
|
filas = cursor_mysql.fetchall()
|
||||||
|
|
||||||
# Obtener los nombres de las columnas
|
# Obtener los nombres de las columnas
|
||||||
@ -119,7 +119,7 @@ def procesar_factura_verifactu(
|
|||||||
|
|
||||||
# Creamos registro de factura en verifactu
|
# Creamos registro de factura en verifactu
|
||||||
if factura.get('uuid') == '':
|
if factura.get('uuid') == '':
|
||||||
# logger.info(f"Send to create Verifactu: {factura}")
|
# logger.info(f"Send to create Verifactu: {factura}")
|
||||||
respuesta = crear_factura_verifacti(factura, config)
|
respuesta = crear_factura_verifacti(factura, config)
|
||||||
|
|
||||||
if respuesta.get("status") == 200 and respuesta.get("ok"):
|
if respuesta.get("status") == 200 and respuesta.get("ok"):
|
||||||
|
|||||||
@ -3,15 +3,16 @@ LOCAL_TZ = Europe/Madrid
|
|||||||
STATE_PATH = ./
|
STATE_PATH = ./
|
||||||
#LOG_PATH = ./app.log
|
#LOG_PATH = ./app.log
|
||||||
|
|
||||||
#DESARROLLO ACANA
|
#DESARROLLO RODAX
|
||||||
FACTUGES_HOST = 192.168.0.109
|
FACTUGES_HOST = 192.168.0.156
|
||||||
FACTUGES_PORT = 3050
|
FACTUGES_PORT = 3050
|
||||||
FACTUGES_DATABASE = C:\Codigo Acana\Output\Debug\Database\FACTUGES.FDB
|
FACTUGES_DATABASE = C:\Codigo\Output\Debug\Database\FACTUGES.FDB
|
||||||
FACTUGES_USER = sysdba
|
FACTUGES_USER = sysdba
|
||||||
FACTUGES_PASSWORD = masterkey
|
FACTUGES_PASSWORD = masterkey
|
||||||
#CONFIGURACION ACANA
|
CTE_COMPANY_ID = '5e4dc5b3-96b9-4968-9490-14bd032fec5f'
|
||||||
CTE_COMPANY_ID = '019a9667-6a65-767a-a737-48234ee50a3a'
|
|
||||||
VERIFACTU_API_KEY = vf_test_ei8WYAvEq5dhSdEyQVjgCS8NZaNpEK2BljSHSUXf+Y0=
|
VERIFACTU_API_KEY = vf_test_ei8WYAvEq5dhSdEyQVjgCS8NZaNpEK2BljSHSUXf+Y0=
|
||||||
|
CTE_SERIE = 'F25/'
|
||||||
|
|
||||||
|
|
||||||
#DESARROLLO ALONSO Y SAL
|
#DESARROLLO ALONSO Y SAL
|
||||||
#FACTUGES_HOST = 192.168.0.144
|
#FACTUGES_HOST = 192.168.0.144
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user