CourseWork_Bank/Bank/BankEmployeeApp/Views/Home/ReportFromOperations.cshtml

61 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using BankContracts.ViewModels;
@model List<BankContracts.ViewModels.PaymentViewModel>?
@{
ViewData["Title"] = "Список операций с оплатами";
}
<h1>@ViewData["Title"]</h1>
<form method="post">
<div class="align-content-center row mb-3">
<div class="col-sm-auto">
<label for="startDate">С:</label>
</div>
<div class="col-3">
<input name="startDate" id="startDate" class="form-control" type="date"/>
</div>
<div class="col-sm-auto">
<label for="endDate">По:</label>
</div>
<div class="col-3">
<input name="endDate" id="endDate" class="form-control" type="date" value="@DateTime.Today.ToString("yyyy-MM-dd")" />
</div>
<div class="col-2">
<input type="submit" name="getReport" class="btn btn-primary" value="Сформировать отчет"/>
</div>
<div class="col-3">
<input type="submit" name="sendToMail" class="btn btn-primary" value="Отправить на почту" />
</div>
</div>
</form>
<div class="text-center">
<table class="table">
<thead>
<tr>
<th>Сделка</th>
<th>Вид операции</th>
<th>Тип операции</th>
<th>Дата оплаты</th>
<th>Внесенная оплата</th>
<th>Полная оплата</th>
</tr>
</thead>
<tbody id="fillReportOperations">
@if (Model != null)
{
foreach (var payment in Model)
{
<tr>
<td>@payment.OperationByPurchase.PurchaseId</td>
<td>@(payment.Operation?.Model ?? string.Empty)</td>
<td>@(payment.Operation?.Mark ?? string.Empty)</td>
<td>@(payment.Date.ToShortDateString() ?? string.Empty)</td>
<td>@payment.PaidPrice</td>
<td>@payment.FullPrice</td>
</tr>
}
}
</tbody>
</table>
</div>