From 24740438f7f05eff23561454928a3eb06faa3044 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 29 Jan 2020 16:02:26 +0530 Subject: [PATCH] get_vm_price_for_given_vat: Also return discount amount with vat --- utils/hosting_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/hosting_utils.py b/utils/hosting_utils.py index 3312474d..61f849ad 100644 --- a/utils/hosting_utils.py +++ b/utils/hosting_utils.py @@ -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)