diff --git a/Schaad.Accounting.Common/Models/Transaction.cs b/Schaad.Accounting.Common/Models/Transaction.cs
index 8dc7ee0..bd91f84 100644
--- a/Schaad.Accounting.Common/Models/Transaction.cs
+++ b/Schaad.Accounting.Common/Models/Transaction.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
+using System.Xml.Serialization;
namespace Schaad.Accounting.Models
{
@@ -42,6 +43,9 @@ namespace Schaad.Accounting.Models
[Display(Name = "Währungskurs")]
public decimal? FxRate { get; set; }
+
+ [XmlIgnore]
+ public bool ReadOnly {get; set;}
public Transaction()
{
diff --git a/Schaad.Accounting.UI/Components/Pages/Home.razor b/Schaad.Accounting.UI/Components/Pages/Home.razor
index a3acae4..d526f59 100644
--- a/Schaad.Accounting.UI/Components/Pages/Home.razor
+++ b/Schaad.Accounting.UI/Components/Pages/Home.razor
@@ -41,10 +41,10 @@ else
| Buchungsdatum |
Valutadatum |
- Betrag |
Zusatzinfo |
Text |
Konto |
+ Betrag |
|
|
@@ -59,15 +59,12 @@ else
@transaction.ValueDate.ToString("dd.MM.yyyy")
|
-
- @Math.Abs(transaction.Value).ToFormattedString()
- |
@transaction.BankTransactionText
|
|
+
+ @Math.Abs(transaction.Value).ToFormattedString()
+ |
+ OnClick="@(() => SplitBankTransactionAsync(transaction))" Disabled="@(transaction.Value > 0 || transaction.ReadOnly)" />
|
+ OnClick="@(() => BookBankTransactionAsync(transaction))"
+ Disabled="@transaction.ReadOnly" />
|
}
diff --git a/Schaad.Accounting.UI/Components/Pages/Home.razor.cs b/Schaad.Accounting.UI/Components/Pages/Home.razor.cs
index f8ae71d..5a7bbbd 100644
--- a/Schaad.Accounting.UI/Components/Pages/Home.razor.cs
+++ b/Schaad.Accounting.UI/Components/Pages/Home.razor.cs
@@ -166,7 +166,7 @@ public partial class Home : ComponentBase
return;
}
transactionRepository.SaveTransaction(transaction);
- ReloadPage();
+ transaction.ReadOnly = true;
await Task.CompletedTask;
}
diff --git a/Schaad.Accounting.UI/Components/Pages/Home.razor.css b/Schaad.Accounting.UI/Components/Pages/Home.razor.css
index e8088fd..0d00a3e 100644
--- a/Schaad.Accounting.UI/Components/Pages/Home.razor.css
+++ b/Schaad.Accounting.UI/Components/Pages/Home.razor.css
@@ -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%;
@@ -35,9 +36,4 @@ th:nth-child(8), td:nth-child(8) { width: 40px; text-align: center; }
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
-}
-
-.betrag-column {
- text-align: right;
- white-space: nowrap;
-}
+}
\ No newline at end of file