fix: update invoice pdf to use total_ht_net instead of total_ht

This commit is contained in:
Fanilo-Nantenaina 2026-01-07 04:26:56 +03:00
parent bcaa621432
commit cd9dd9348d

View file

@ -286,11 +286,11 @@ class EmailQueue:
y -= 0.8 * cm
pdf.setFont("Helvetica-Bold", 11)
pdf.drawString(12 * cm, y, "Total HT:")
pdf.drawString(15 * cm, y, f"{doc.get('total_ht') or 0:.2f}")
pdf.drawString(15 * cm, y, f"{doc.get('total_ht_net') or 0:.2f}")
y -= 0.6 * cm
pdf.drawString(12 * cm, y, "TVA (20%):")
tva = (doc.get("total_ttc") or 0) - (doc.get("total_ht") or 0)
tva = (doc.get("total_ttc") or 0) - (doc.get("total_ht_net") or 0)
pdf.drawString(15 * cm, y, f"{tva:.2f}")
y -= 0.6 * cm