1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

convert decimal after division

This commit is contained in:
Kyle Spearrin 2017-04-10 12:45:32 -04:00
parent be20bef494
commit 58aa0482ba

View File

@ -112,7 +112,7 @@ namespace Bit.Core.Models.Api
if(item.Plan != null)
{
Name = item.Plan.Name;
Amount = item.Plan.Amount / 100;
Amount = item.Plan.Amount / 100M;
Interval = item.Plan.Interval;
}
@ -130,7 +130,7 @@ namespace Bit.Core.Models.Api
{
public BillingInvoice(StripeInvoice inv)
{
Amount = inv.AmountDue / 100;
Amount = inv.AmountDue / 100M;
Date = inv.Date.Value;
}
@ -142,8 +142,8 @@ namespace Bit.Core.Models.Api
{
public BillingCharge(StripeCharge charge)
{
Amount = charge.Amount / 100;
RefundedAmount = charge.AmountRefunded / 100;
Amount = charge.Amount / 100M;
RefundedAmount = charge.AmountRefunded / 100M;
PaymentSource = charge.Source != null ? new BillingSource(charge.Source) : null;
CreatedDate = charge.Created;
FailureMessage = charge.FailureMessage;