1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

proration adjustments for next bill amount

This commit is contained in:
Kyle Spearrin
2017-07-29 16:59:18 -04:00
parent 89bb0a05e9
commit d6d9ceab87
2 changed files with 9 additions and 3 deletions

View File

@ -196,7 +196,11 @@ namespace Bit.Core.Models.Business
public BillingInvoice(Subscription sub)
{
Amount = sub.NextBillAmount.GetValueOrDefault();
Amount = sub.NextBillAmount.GetValueOrDefault() + sub.Balance.GetValueOrDefault();
if(Amount < 0)
{
Amount = 0;
}
Date = sub.NextBillingDate;
}