From b0c90bc4b3a4cbf9c673b4f8903c91ec06156e94 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 23 Feb 2019 07:53:47 -0500 Subject: [PATCH] amounts are positive always --- src/Core/Models/Business/BillingInfo.cs | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/Core/Models/Business/BillingInfo.cs b/src/Core/Models/Business/BillingInfo.cs index 38cc68c33..1c32d4e1c 100644 --- a/src/Core/Models/Business/BillingInfo.cs +++ b/src/Core/Models/Business/BillingInfo.cs @@ -93,25 +93,8 @@ namespace Bit.Core.Models.Business Type = transaction.Type; PaymentMethodType = transaction.PaymentMethodType; Details = transaction.Details; - - if(transaction.RefundedAmount.HasValue) - { - RefundedAmount = Math.Abs(transaction.RefundedAmount.Value); - } - switch(transaction.Type) - { - case TransactionType.Charge: - case TransactionType.Credit: - case TransactionType.PromotionalCredit: - case TransactionType.ReferralCredit: - Amount = -1 * Math.Abs(transaction.Amount); - break; - case TransactionType.Refund: - Amount = Math.Abs(transaction.Amount); - break; - default: - break; - } + Amount = transaction.Amount; + RefundedAmount = transaction.RefundedAmount; } public DateTime CreatedDate { get; set; }