Recuperar de la BD el número de factura completo, con ceros delante si los tuviera.

Increment version to 0.3.3 and update SQL queries and environment variables for tax settings
This commit is contained in:
David Arranz 2026-09-01 18:50:52 +02:00
parent d53699a242
commit 1490d8baf2
5 changed files with 12 additions and 3 deletions

View File

@ -179,7 +179,7 @@ LIMPIAR_FACTUGES_LINK = (
# OPCION A SACAMOS EL RESUMEN DE LA TAXES DE LA CABECERA
consulta_sql_customer_invoices_issue = (
"SELECT ci.id, ci.invoice_series_code as series, ci.invoice_number, ci.invoice_date, ci.description, ci.customer_tin, ci.customer_name, ci.total_amount_value, ci.total_amount_scale, ci.reference, "
"SELECT ci.id, ci.invoice_series_code as series, SUBSTRING(ci.invoice_reference, LENGTH(ci.invoice_series_code) + 1) AS invoice_number, ci.invoice_date, ci.description, ci.customer_tin, ci.customer_name, ci.total_amount_value, ci.total_amount_scale, ci.reference, "
"cit.taxable_amount_scale, cit.taxes_amount_scale, cit.iva_code, cit.taxable_amount_value, cit.taxes_amount_value, "
"vr.id as vrId, vr.uuid, vr.estado "
"FROM issued_invoices as ci "

View File

@ -28,6 +28,10 @@ services:
CTE_LANGUAGE_CODE: "${CTE_LANGUAGE_CODE}"
CTE_COUNTRY_CODE: "${CTE_COUNTRY_CODE}"
CTE_IS_COMPANY: "${CTE_IS_COMPANY}"
CTE_TAX_MODE: "single"
CTE_DEFAULT_IVA_CODE: "iva_21"
CTE_USES_EQUIVALENCE_SURCHARGE: 0
CTE_USES_RETENTION: 0
CTE_SYNC_RESULT_OK: "${CTE_SYNC_RESULT_OK}"
CTE_SYNC_RESULT_FAIL: "${CTE_SYNC_RESULT_FAIL}"

View File

@ -29,6 +29,10 @@ services:
CTE_LANGUAGE_CODE: "${CTE_LANGUAGE_CODE}"
CTE_COUNTRY_CODE: "${CTE_COUNTRY_CODE}"
CTE_IS_COMPANY: "${CTE_IS_COMPANY}"
CTE_TAX_MODE: "single"
CTE_DEFAULT_IVA_CODE: "iva_21"
CTE_USES_EQUIVALENCE_SURCHARGE: 0
CTE_USES_RETENTION: 0
CTE_SYNC_RESULT_OK: "${CTE_SYNC_RESULT_OK}"
CTE_SYNC_RESULT_FAIL: "${CTE_SYNC_RESULT_FAIL}"

View File

@ -24,6 +24,7 @@ CTE_STATUS_VERIFACTU = 'Pendiente'
CTE_LANGUAGE_CODE = 'es' #En uecko vendrá de su ficha
CTE_COUNTRY_CODE = 'es' #En uecko vendrá de su ficha
CTE_IS_COMPANY = 1
CTE_SYNC_RESULT_OK = 1
CTE_SYNC_RESULT_FAIL = 2

View File

@ -1,6 +1,6 @@
[metadata]
name = factuges-sync
version = 0.3.1
version = 0.3.3
description = ETL job to sync data from legacy DB to MariaDB
author = Rodax Software
author_email = info@rodax-software.com