btcpayserver/BTCPayServer/Services/Invoices/Amounts.cs
Nicolas Dorier 22435a2bf5
Refactor logic for calculating due amount of invoices (#5174)
* Refactor logic for calculating due amount of invoices

* Remove Money type from the accounting

* Fix tests

* Fix a corner case

* fix bug

* Rename PaymentCurrency to Currency

* Fix bug

* Rename PaymentCurrency -> Currency

* Payment objects should have access to the InvoiceEntity

* Set Currency USD in tests

* Simplify some code

* Remove useless code

* Simplify code, kukks comment
2023-07-19 18:47:32 +09:00

19 lines
506 B
C#

namespace BTCPayServer.Services.Invoices
{
public class Amounts
{
public string Currency { get; set; }
/// <summary>
/// An amount with fee included
/// </summary>
public decimal Gross { get; set; }
/// <summary>
/// An amount without fee included
/// </summary>
public decimal Net { get; set; }
public override string ToString()
{
return $"{Currency}: Net={Net}, Gross={Gross}";
}
}
}