@using BankContracts.ViewModels

@model List<ReportTransferCurrencyPurchaseViewModel>

@{
	ViewData["Title"] = "View Report";
}

<div class="text-center">
	<h1 class="display-4">Отчёт о зачислениях</h1>
	<h1 class="display4">C @ViewBag.DateFrom по @ViewBag.DateTo</h1>
</div>


<div class="text-center">
	@{
		if (Model == null)
		{
							<h3 class="display-4">Авторизируйтесь</h3>
			return;
		}
				<table class="table">
					<thead>
						<tr>
							<th>
								Номер зачисления
							</th>
							<th>
								Дата зачисления
							</th>
							<th>
								Номер закупки
							</th>
							<th>
								Сумма
							</th>
							<th>
								Валюта
							</th>
							<th>
								Дата закупки
							</th>
						</tr>
					</thead>
					<tbody>
				@foreach (var item in Model)
				{
					<tr>
						<td>
							Зачисление №@item.TransferId
										</td>
										<td>
							@Html.DisplayFor(modelItem => item.TransferDate)
										</td>
										<td>
										</td>
										<td>
										</td>
										<td>
										</td>
										<td>
										</td>
									</tr>
							@foreach (var purchase in item.Purchases){
												<tr>
													<td>
													</td>
													<td>
													</td>
													<td>
													Закупка №@purchase.Id
													</td>
													<td>
								@Html.DisplayFor(modelItem => purchase.Amount)
													</td>
													<td>
								@Html.DisplayFor(modelItem => purchase.CurrencyName)
													</td>
													<td>
								@Html.DisplayFor(modelItem => purchase.PurchaseDate)
													</td>
												</tr>
							}
				}
					</tbody>
				</table>
	}
</div>