feat: add descuento from RECEPCION.VALORDESC to RDA header

Pulls r.VALORDESC in all SQL queries (automation, test_rda, queries
defaults) and maps it to the top-level descuento field in the
RdaPaciente JSON encabezado.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-01 17:13:46 -05:00
co-authored by Claude Sonnet 4.6
parent f35a39bc9b
commit 15f6ca65db
4 changed files with 5 additions and 1 deletions
+1
View File
@@ -220,6 +220,7 @@ def generar_rda_paciente(rows: list, default_profesional: str = "", default_espe
"numeroAutorizacion": autorizacion,
"fechaAutorizacion": date.today().strftime("%d/%m/%Y"),
"vigenciaAutorizacion": vigencia,
"descuento": int(float(h.get("VALORDESC") or 0)),
"detallePedido": detalle_pedido,
"detalleFormaPago": [{
"codigoFormaPago": cod_forma_pago,