Convert to decimal for type consistency

This commit is contained in:
PCoder 2020-01-24 15:03:07 +05:30
parent 38550ea75c
commit 112f3e17a9
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ def get_vm_price_for_given_vat(cpu, memory, ssd_size, hdd_size=0,
discount_name = pricing.discount_name
discount_amount = round(float(pricing.discount_amount), 2)
vat = (price - discount_amount) * decimal.Decimal(vat_rate) * decimal.Decimal(0.01)
vat = (price - decimal.Decimal(discount_amount)) * decimal.Decimal(vat_rate) * decimal.Decimal(0.01)
vat_percent = vat_rate
cents = decimal.Decimal('.01')