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