This commit is contained in:
shadowik 2023-05-20 08:00:06 +04:00
parent e0cfaef3ee
commit 04da8bc056
8 changed files with 14 additions and 25 deletions

View File

@ -168,7 +168,7 @@ namespace BankYouBankruptBusinessLogic.BusinessLogics
int sum = 0;
foreach (var key in cashWithdrawals.Keys.Union(moneyTransfers.Keys).Union(moneyTransfers.Keys))
foreach (var key in cashWithdrawals.Keys.Union(moneyTransfers.Keys).Union(moneyTransfers.Keys).OrderBy(x => x.Item1 * 12 + x.Item2))
{
if (cashWithdrawals.ContainsKey(key)) sum += cashWithdrawals.GetValueOrDefault(key);
if (moneyTransfers.ContainsKey(key)) sum += moneyTransfers.GetValueOrDefault(key);

View File

@ -112,7 +112,7 @@ namespace BankYouBankruptBusinessLogic.BusinessLogics
.Select(x => new { x.Key.Month, x.Key.Year, Sum = x.Select(y => y.Sum).Sum() }).ToDictionary(x => (x.Month, x.Year), x => (x.Sum));
List<ClientDiagramElementsViewModel> result = new();
foreach (var key in debitings.Keys.Union(creditings.Keys)) {
foreach (var key in debitings.Keys.Union(creditings.Keys).OrderBy(x => x.Item1 * 12 + x.Item2)) {
int sum = 0;
if (debitings.ContainsKey(key)) sum -= debitings.GetValueOrDefault(key);
if (creditings.ContainsKey(key)) sum += creditings.GetValueOrDefault(key);

View File

@ -430,7 +430,7 @@ namespace BankYouBankruptCashierApp.Controllers
APICashier.Debiting = APICashier.GetRequest<DebitingViewModel>($"/api/Account/FindDebiting?id={id}");
APICashier.Crediting = APICashier.GetRequest<CreditingViewModel>($"/api/Account/FindDebiting?id={id}");
APICashier.Crediting = APICashier.GetRequest<CreditingViewModel>($"/api/Account/FindCrediting?id={id}");
if(APICashier.Debiting == null)
{

View File

@ -15,9 +15,6 @@
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<style>
html {
font-size: 19px;
}
body {
margin-bottom: 60px;
@ -141,16 +138,16 @@
@{
if (APICashier.Cashier == null)
{
<div class="col-md-3 text-end">
<a class="btn btn-warning me-2" asp-controller="Home" asp-action="Login">Войти</a>
<a class="btn btn-warning" asp-controller="Home" asp-action="Register">Регистрация</a>
</div>
<div class="col-md-3 text-end">
<a class="btn btn-warning me-2" asp-controller="Home" asp-action="Login">Войти</a>
<a class="btn btn-warning" asp-controller="Home" asp-action="Register">Регистрация</a>
</div>
}
else
{
<div class="col-md-3 text-end">
<a class="btn btn-warning me-2" id="exit" name="exit" asp-controller="Home" asp-action="Privacy">@APICashier.Cashier.Surname @APICashier.Cashier.Name</a>
</div>
<div class="col-md-3 text-end">
<a class="btn btn-warning me-2" id="exit" name="exit" asp-controller="Home" asp-action="Privacy">@APICashier.Cashier.Surname @APICashier.Cashier.Name</a>
</div>
}
}
</header>

View File

@ -8,15 +8,7 @@ html {
}
}
html {
position: relative;
min-height: 100%;
}
body {
margin-bottom: 60px;
background-color: #cdcdcd;
}

View File

@ -7,7 +7,7 @@
</div>
<form method="post">
<div class="row mb-2">
<div class="col-4">Номер счета:</div>
<div class="col-4">Номер карты:</div>
<div class="col-8">
<select id="cardId" name="cardId" class="form-control" asp-items="@(new SelectList( @ViewBag.Cards, "Id", "Number"))"></select>
</div>

View File

@ -7,7 +7,7 @@
</div>
<form method="post">
<div class="row mb-2">
<div class="col-4">Номер счета:</div>
<div class="col-4">Номер карты:</div>
<div class="col-8">
<select id="cardId" name="cardId" class="form-control" asp-items="@(new SelectList( @ViewBag.Cards, "Id", "Number"))"></select>
</div>

View File

@ -103,7 +103,7 @@
@Html.DisplayFor(modelItem => item.Sum)
</td>
<td>
@Html.DisplayFor(modelItem => item.Status)
@item.Status.ToString().Replace("_", " ");
</td>
<td>
@Html.DisplayFor(modelItem => item.DateOpen)