get_vm_price_for_given_vat: Also return discount amount with vat
This commit is contained in:
parent
cde6c51d4b
commit
24740438f7
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
vat = vat.quantize(cents, decimal.ROUND_HALF_UP)
|
||||||
discount = {
|
discount = {
|
||||||
'name': discount_name,
|
'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),
|
return (round(float(price), 2), round(float(vat), 2),
|
||||||
round(float(vat_percent), 2), discount)
|
round(float(vat_percent), 2), discount)
|
||||||
|
|
Loading…
Reference in a new issue