Improve payment print styles (#1977)

* Improve payment print styles

Allows for export as invoice PDF to be used in accounting. Closes #1957.

* Change Transaction ID wording

* Minor payment request UI improvements

* Add amount paid, rate and colorize payment status

* Display rate at invoice level

* Inherit text color in print

* Show full date in print view

* Rearrange payment details

* Add received date for payments

* Fix amount calculation

* Fix validInvoice assignment
This commit is contained in:
Dennis Reimann
2020-10-23 10:37:28 +02:00
committed by GitHub
parent 7a711f0690
commit 20322c6ab8
7 changed files with 199 additions and 101 deletions

View File

@@ -1,7 +1,9 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Rates;
using Microsoft.AspNetCore.Mvc.Rendering;
using PaymentRequestData = BTCPayServer.Data.PaymentRequestData;
@@ -139,7 +141,9 @@ namespace BTCPayServer.Models.PaymentRequestViewModels
public DateTime ExpiryDate { get; set; }
public decimal Amount { get; set; }
public string AmountFormatted { get; set; }
public string Status { get; set; }
public InvoiceState State { get; set; }
public InvoiceStatus Status { get; set; }
public string StatusFormatted { get; set; }
public List<PaymentRequestInvoicePayment> Payments { get; set; }
public string Currency { get; set; }
@@ -149,6 +153,10 @@ namespace BTCPayServer.Models.PaymentRequestViewModels
{
public string PaymentMethod { get; set; }
public decimal Amount { get; set; }
public string RateFormatted { get; set; }
public decimal Paid { get; set; }
public string PaidFormatted { get; set; }
public DateTime ReceivedDate { get; set; }
public string Link { get; set; }
public string Id { get; set; }
}