btcpayserver/BTCPayServer/Views/Invoice/InvoicePaymentsPartial.cshtml
Andrew Camilleri 7208e63155 Excerpts from #971 (manual PR) (part1 ) (#1006)
* Excerpts from #971

Relating to selenium tests + small renamings

* fix build
2019-09-03 20:11:36 +09:00

49 lines
1.8 KiB
Text

@model InvoiceDetailsModel
@inject PaymentMethodHandlerDictionary PaymentMethodHandlerDictionary
<div class="row">
<div class="col-md-12 invoice-payments">
<h3>Paid summary</h3>
<table class="table table-sm table-responsive-md">
<thead class="thead-inverse">
<tr>
<th>Payment method</th>
<th>Address</th>
<th class="text-right">Rate</th>
<th class="text-right">Paid</th>
<th class="text-right">Due</th>
@if (Model.StatusException == InvoiceExceptionStatus.PaidOver)
{
<th class="text-right">Overpaid</th>
}
</tr>
</thead>
<tbody>
@foreach (var payment in Model.CryptoPayments)
{
<tr>
<td>@payment.PaymentMethod</td>
<td title="@payment.Address">
<span class="text-truncate d-block" style="max-width: 400px">@payment.Address</span>
</td>
<td class="text-right">@payment.Rate</td>
<td class="text-right">@payment.Paid</td>
<td class="text-right">@payment.Due</td>
@if (Model.StatusException == InvoiceExceptionStatus.PaidOver)
{
<td class="text-right">@payment.Overpaid</td>
}
</tr>
}
</tbody>
</table>
</div>
</div>
@{
var grouped = Model.Payments.GroupBy(payment => payment.GetPaymentMethodId().PaymentType);
}
@foreach (var paymentGroup in grouped)
{
<partial name="@paymentGroup.Key.InvoiceViewPaymentPartialName" model="@paymentGroup.ToList()" />
}