From 58aa0482ba05ab98519d5c2b53e2330408ccb912 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 10 Apr 2017 12:45:32 -0400 Subject: [PATCH] convert decimal after division --- src/Core/Models/Api/Response/OrganizationResponseModel.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Core/Models/Api/Response/OrganizationResponseModel.cs b/src/Core/Models/Api/Response/OrganizationResponseModel.cs index 1050aa211..e3efa7ad5 100644 --- a/src/Core/Models/Api/Response/OrganizationResponseModel.cs +++ b/src/Core/Models/Api/Response/OrganizationResponseModel.cs @@ -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;