1
0
mirror of https://github.com/bitwarden/web synced 2025-12-15 15:53:18 +00:00

Showed sales tax amount on Go Premium screen (#774)

This commit is contained in:
Addison Beck
2021-01-14 17:53:46 -05:00
committed by GitHub
parent 2e22ca9216
commit 023bf0474c
2 changed files with 24 additions and 5 deletions

View File

@@ -114,7 +114,17 @@ export class PremiumComponent implements OnInit {
return this.storageGbPrice * Math.abs(this.additionalStorage || 0);
}
get subtotal(): number {
return this.premiumPrice + this.additionalStorageTotal;
}
get taxCharges(): number {
return this.taxInfoComponent != null && this.taxInfoComponent.taxRate != null ?
(this.taxInfoComponent.taxRate / 100) * this.subtotal :
0;
}
get total(): number {
return this.additionalStorageTotal + this.premiumPrice;
return (this.subtotal + this.taxCharges) || 0;
}
}