1π
β
I donβt understand if you already have the total price or the price without VAT to begin with. If I understand, you want to calculate the total cost by doing importe_sin_iva * 1.21
extra_context['importe_iva_incluida'] = fact.importe_sin_iva * 1.21
If you want to have the VAT to display in your template, just do
extra_context['iva'] = fact.importe_sin_iva * 0.21
π€Steve K
Source:stackexchange.com