get_vm_price_for_given_vat: Also return discount amount with vat

This commit is contained in:
PCoder 2020-01-29 16:02:26 +05:30
parent cde6c51d4b
commit 24740438f7

View file

@ -114,7 +114,8 @@ def get_vm_price_for_given_vat(cpu, memory, ssd_size, hdd_size=0,
vat = vat.quantize(cents, decimal.ROUND_HALF_UP)
discount = {
'name': discount_name,
'amount': discount_amount
'amount': discount_amount,
'amount_with_vat': round(discount_amount * vat_rate, 2)
}
return (round(float(price), 2), round(float(vat), 2),
round(float(vat_percent), 2), discount)