Compare commits
3 commits
main
...
dont-reloa
| Author | SHA1 | Date | |
|---|---|---|---|
| 7236434f8a | |||
| b46d0fe5f1 | |||
| 3d3a6af103 |
4 changed files with 22 additions and 21 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
namespace Schaad.Accounting.Models
|
namespace Schaad.Accounting.Models
|
||||||
{
|
{
|
||||||
|
|
@ -43,6 +44,9 @@ namespace Schaad.Accounting.Models
|
||||||
[Display(Name = "Währungskurs")]
|
[Display(Name = "Währungskurs")]
|
||||||
public decimal? FxRate { get; set; }
|
public decimal? FxRate { get; set; }
|
||||||
|
|
||||||
|
[XmlIgnore]
|
||||||
|
public bool ReadOnly {get; set;}
|
||||||
|
|
||||||
public Transaction()
|
public Transaction()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,10 @@ else
|
||||||
<tr>
|
<tr>
|
||||||
<th>Buchungsdatum</th>
|
<th>Buchungsdatum</th>
|
||||||
<th>Valutadatum</th>
|
<th>Valutadatum</th>
|
||||||
<th>Betrag</th>
|
|
||||||
<th>Zusatzinfo</th>
|
<th>Zusatzinfo</th>
|
||||||
<th>Text</th>
|
<th>Text</th>
|
||||||
<th>Konto</th>
|
<th>Konto</th>
|
||||||
|
<th>Betrag</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -59,15 +59,12 @@ else
|
||||||
<td>
|
<td>
|
||||||
<div>@transaction.ValueDate.ToString("dd.MM.yyyy")</div>
|
<div>@transaction.ValueDate.ToString("dd.MM.yyyy")</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="betrag-column">
|
|
||||||
<div>@Math.Abs(transaction.Value).ToFormattedString()</div>
|
|
||||||
</td>
|
|
||||||
<td class="zusatzinfo-column" title="@transaction.BankTransactionText">
|
<td class="zusatzinfo-column" title="@transaction.BankTransactionText">
|
||||||
<div>@transaction.BankTransactionText</div>
|
<div>@transaction.BankTransactionText</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="text-column">
|
<div class="text-column">
|
||||||
<input list="texts" @bind="@transaction.Text" placeholder="Type or select..."/>
|
<input list="texts" @bind="@transaction.Text" placeholder="Type or select..." readonly="@transaction.ReadOnly"/>
|
||||||
<datalist id="texts">
|
<datalist id="texts">
|
||||||
@foreach (var text in bookingTexts.OrderBy(t => t))
|
@foreach (var text in bookingTexts.OrderBy(t => t))
|
||||||
{
|
{
|
||||||
|
|
@ -86,13 +83,17 @@ else
|
||||||
<AccountSelector Accounts="accounts" @bind-AccountId="@transaction.TargetAccountId" />
|
<AccountSelector Accounts="accounts" @bind-AccountId="@transaction.TargetAccountId" />
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<div>@Math.Abs(transaction.Value).ToFormattedString()</div>
|
||||||
|
</td>
|
||||||
<td style="align-content: center">
|
<td style="align-content: center">
|
||||||
<FluentButton IconEnd="@(new Icons.Regular.Size16.SplitVertical())" Appearance="Appearance.Neutral"
|
<FluentButton IconEnd="@(new Icons.Regular.Size16.SplitVertical())" Appearance="Appearance.Neutral"
|
||||||
OnClick="@(() => SplitBankTransactionAsync(transaction))" Disabled="@(transaction.Value > 0)"/>
|
OnClick="@(() => SplitBankTransactionAsync(transaction))" Disabled="@(transaction.Value > 0 || transaction.ReadOnly)" />
|
||||||
</td>
|
</td>
|
||||||
<td style="align-content: center">
|
<td style="align-content: center">
|
||||||
<FluentButton IconEnd="@(new Icons.Regular.Size16.Save())" Appearance="Appearance.Neutral"
|
<FluentButton IconEnd="@(new Icons.Regular.Size16.Save())" Appearance="Appearance.Neutral"
|
||||||
OnClick="@(() => BookBankTransactionAsync(transaction))"/>
|
OnClick="@(() => BookBankTransactionAsync(transaction))"
|
||||||
|
Disabled="@transaction.ReadOnly" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ public partial class Home : ComponentBase
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
transactionRepository.SaveTransaction(transaction);
|
transactionRepository.SaveTransaction(transaction);
|
||||||
ReloadPage();
|
transaction.ReadOnly = true;
|
||||||
await Task.CompletedTask;
|
await Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,14 @@ th {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
th:nth-child(1), td:nth-child(1) { width: 120px; }
|
th:nth-child(1), td:nth-child(1) { width: 120px; } /* Booking Date */
|
||||||
th:nth-child(2), td:nth-child(2) { width: 120px; }
|
th:nth-child(2), td:nth-child(2) { width: 120px; } /* Valuta Date */
|
||||||
th:nth-child(3), td:nth-child(3) { width: 100px; text-align: right; }
|
th:nth-child(3), td:nth-child(3) { } /* Zusatzinfo */
|
||||||
th:nth-child(5), td:nth-child(5) { width: 240px; }
|
th:nth-child(4), td:nth-child(4) { width: 240px; } /* Text */
|
||||||
th:nth-child(6), td:nth-child(6) { width: 300px; }
|
th:nth-child(5), td:nth-child(5) { width: 300px; } /* Account */
|
||||||
th:nth-child(7), td:nth-child(7),
|
th:nth-child(6), td:nth-child(6) { width: 100px; text-align: right; } /* Amount */
|
||||||
th:nth-child(8), td:nth-child(8) { width: 40px; text-align: center; }
|
th:nth-child(7), td:nth-child(7) { width: 40px; text-align: center; } /* Split */
|
||||||
|
th:nth-child(8), td:nth-child(8) { width: 40px; text-align: center; } /* Save */
|
||||||
|
|
||||||
.text-column input {
|
.text-column input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -36,8 +37,3 @@ th:nth-child(8), td:nth-child(8) { width: 40px; text-align: center; }
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.betrag-column {
|
|
||||||
text-align: right;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue