Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d27b4c307 | ||
|
|
4ce6ce8248 | ||
|
|
2ed559eb3f | ||
|
|
5cdb83601d | ||
|
|
808e834284 | ||
|
|
18e8396a8d |
No files matched your search
+19
-1
@@ -2,6 +2,24 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
[v1.2.2.0][v1.2.2.0] (2026-12-02) {#v1.2.2.0}
|
||||
---------------------------------------------
|
||||
|
||||
### Behobene Fehler {#v1.2.2.0-bugfixes}
|
||||
|
||||
- Hotfix: Seit [v1.2.1.0](#v1.2.1.0) (2026-11-30) können PDF-Dokumente nicht mehr erstellt werden.
|
||||
Siehe [.NET Runtime Issue auf GitHub](https://github.com/dotnet/runtime/issues/137382). (5cdb83601d, 2ed559eb3f)
|
||||
- Der Wert `abgewertet` in `v_delivery` spiegelt nun wider, ob die Qualiätsstufe gleich "Wein" ist und nicht mehr, ob die ausgewählte Qualitässtufe der maximal möglichen entspricht. (4ce6ce8248)
|
||||
|
||||
### Sonstiges {#v1.2.2.0-misc}
|
||||
|
||||
- Überall dort, wo man per Tool Tip mehr Informationen erhalten kann, ist nun ein `(i)` Symbol sichtbar. (18e8396a8d, 808e834284)
|
||||
|
||||
[v1.2.2.0]: https://git.necronda.net/winzer/elwig/releases/tag/v1.2.2.0
|
||||
|
||||
|
||||
|
||||
|
||||
[v1.2.1.0][v1.2.1.0] (2026-11-30) {#v1.2.1.0}
|
||||
---------------------------------------------
|
||||
|
||||
@@ -913,7 +931,7 @@ Changelog
|
||||
|
||||
### Neue Funktionen {#v0.13.2-features}
|
||||
|
||||
- Im Lieferungen-Fenster den Menüpunkt _Abwertungsliste_ (`DeliveryDepreciationList`) hinzugefügt. (3cbffdbf27)
|
||||
- Im Lieferungen-Fenster den Menüpunkt _Abwertungsliste_ (`DeliveryDevaluationList`) hinzugefügt. (3cbffdbf27)
|
||||
|
||||
### Behobene Fehler {#v0.13.2-bugfixes}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
|
||||
<RadioButton x:Name="DepreciateModeInput" GroupName="ModeInput" Content="Abwerten" Margin="15,10,10,10" IsChecked="True"
|
||||
<RadioButton x:Name="DevalueModeInput" GroupName="ModeInput" Content="Abwerten" Margin="15,10,10,10" IsChecked="True"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Checked="ModeInput_Changed"/>
|
||||
<RadioButton x:Name="MemberModeInput" GroupName="ModeInput" Content="Auf Mitglied übertragen" Margin="15,30,10,10"
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Elwig.Dialogs {
|
||||
}
|
||||
|
||||
private void ConfirmButton_Click(object sender, RoutedEventArgs evt) {
|
||||
if (DepreciateModeInput.IsChecked == true) {
|
||||
if (DevalueModeInput.IsChecked == true) {
|
||||
MgNr = null;
|
||||
LsNr = null;
|
||||
} else if (MemberModeInput.IsChecked == true) {
|
||||
@@ -72,7 +72,7 @@ namespace Elwig.Dialogs {
|
||||
private void ModeInput_Changed(object sender, RoutedEventArgs evt) {
|
||||
if (!IsLoaded) return;
|
||||
CheckValidity();
|
||||
if (DepreciateModeInput.IsChecked == true) {
|
||||
if (DevalueModeInput.IsChecked == true) {
|
||||
MgNrInput.Visibility = Visibility.Hidden;
|
||||
MemberInput.Visibility = Visibility.Hidden;
|
||||
MemberReferenceButton.Visibility = Visibility.Hidden;
|
||||
@@ -95,7 +95,7 @@ namespace Elwig.Dialogs {
|
||||
var total = DeliveryParts.Sum(r => r.Part.Weight);
|
||||
InfoBlock.Text = $"Insgesamt {weight:N0} kg / {total:N0} kg ausgewählt.";
|
||||
ConfirmButton.IsEnabled = DeliveryParts.Any(r => r.SplitCompletely || r.SplitWeight > 0) && (
|
||||
DepreciateModeInput.IsChecked == true ||
|
||||
DevalueModeInput.IsChecked == true ||
|
||||
(MemberModeInput.IsChecked == true && MemberInput.SelectedItem != null && !DeliveryParts.All(r => r.SplitCompletely)) ||
|
||||
(DeliveryModeInput.IsChecked == true && DeliveryInput.SelectedItem != null));
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace Elwig.Documents {
|
||||
}
|
||||
|
||||
protected override void RenderBody(iText.Layout.Document doc, PdfDocument pdf) {
|
||||
if (_data == null) throw new Exception("Call LoadData before RenderBody");
|
||||
if (_data == null) throw new InvalidOperationException("Call LoadData before RenderBody");
|
||||
base.RenderBody(doc, pdf);
|
||||
doc.Add(NewCreditTable(_data));
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Elwig.Documents {
|
||||
}
|
||||
|
||||
protected override void BeforeRenderBody(iText.Layout.Document doc, PdfDocument pdf) {
|
||||
if (Data == null) throw new Exception("Call LoadData before BeforeRenderBody");
|
||||
if (Data == null) throw new InvalidOperationException("Call LoadData before BeforeRenderBody");
|
||||
base.BeforeRenderBody(doc, pdf);
|
||||
var firstDay = Data.Rows.MinBy(r => r.Date)?.Date;
|
||||
var lastDay = Data.Rows.MaxBy(r => r.Date)?.Date;
|
||||
@@ -62,7 +62,7 @@ namespace Elwig.Documents {
|
||||
}
|
||||
|
||||
protected override void RenderBody(iText.Layout.Document doc, PdfDocument pdf) {
|
||||
if (Season == null || Data == null) throw new Exception("Call LoadData before RenderBody");
|
||||
if (Season == null || Data == null) throw new InvalidOperationException("Call LoadData before RenderBody");
|
||||
base.RenderBody(doc, pdf);
|
||||
|
||||
doc.Add(NewDeliveryListTable(Data));
|
||||
@@ -165,7 +165,7 @@ namespace Elwig.Documents {
|
||||
.SetPaddingsMM(1, 1, 0, 1))
|
||||
.AddCell(NewTd("Davon abgewertet:", 10, colspan: 7)
|
||||
.SetPaddingsMM(0, 1, 0.5f, 1))
|
||||
.AddCell(NewTd($"{data.Rows.Where(p => p.IsDepreciated).Sum(p => p.Weight):N0}", 10, colspan: 2, right: true)
|
||||
.AddCell(NewTd($"{data.Rows.Where(p => p.IsDevalued).Sum(p => p.Weight):N0}", 10, colspan: 2, right: true)
|
||||
.SetPaddingsMM(0, 1, 0.5f, 1))
|
||||
.AddCell(NewCell(colspan: 2)
|
||||
.SetPaddingsMM(0, 1, 0.5f, 1));
|
||||
|
||||
+3
-3
@@ -6,20 +6,20 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Elwig.Documents {
|
||||
public class DeliveryDepreciationList : Document {
|
||||
public class DeliveryDevaluationList : Document {
|
||||
|
||||
public new static string Name => "Abwertungsliste";
|
||||
|
||||
public string Filter;
|
||||
public List<DeliveryJournalRow> Deliveries;
|
||||
|
||||
public DeliveryDepreciationList(string filter, IEnumerable<DeliveryJournalRow> deliveries) :
|
||||
public DeliveryDevaluationList(string filter, IEnumerable<DeliveryJournalRow> deliveries) :
|
||||
base($"{Name} {filter}") {
|
||||
Filter = filter;
|
||||
Deliveries = [.. deliveries];
|
||||
}
|
||||
|
||||
public DeliveryDepreciationList(string filter, DeliveryJournalData data) :
|
||||
public DeliveryDevaluationList(string filter, DeliveryJournalData data) :
|
||||
this(filter, data.Rows) {
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Elwig.Documents {
|
||||
}
|
||||
|
||||
protected override void RenderBody(iText.Layout.Document doc, PdfDocument pdf) {
|
||||
if (Season == null) throw new Exception("Call LoadData before RenderBody");
|
||||
if (Season == null) throw new InvalidOperationException("Call LoadData before RenderBody");
|
||||
base.RenderBody(doc, pdf);
|
||||
doc.Add(NewMemberData(Season).SetMarginBottomMM(5));
|
||||
doc.Add(NewBucketTable(Season, MemberBuckets, MemberDeliveredWeightRed, MemberDeliveredWeightWhite, includeDelivery: false));
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Elwig.Documents {
|
||||
}
|
||||
|
||||
protected override void RenderBody(iText.Layout.Document doc, PdfDocument pdf) {
|
||||
if (Data == null || Modifiers == null || ModifierStat == null) throw new Exception("Call LoadData before RenderBody");
|
||||
if (Data == null || Modifiers == null || ModifierStat == null) throw new InvalidOperationException("Call LoadData before RenderBody");
|
||||
base.RenderBody(doc, pdf);
|
||||
doc.Add(new KernedParagraph($"{Name} Lese {Variant.Year}", 24)
|
||||
.SetTextAlignment(TextAlignment.CENTER).SetFont(BF)
|
||||
|
||||
+3
-1
@@ -9,10 +9,12 @@
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
|
||||
<Version>1.2.1.0</Version>
|
||||
<Version>1.2.2.0</Version>
|
||||
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ApplicationManifest>App.manifest</ApplicationManifest>
|
||||
<!-- FIXME remove with .NET 11.0.1 -->
|
||||
<StartupObject>Elwig.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Elwig.Helpers {
|
||||
public static class AppDbUpdater {
|
||||
|
||||
// Don't forget to update value in Tests/fetch-resources.bat!
|
||||
public static readonly int RequiredSchemaVersion = 43;
|
||||
public static readonly int RequiredSchemaVersion = 44;
|
||||
|
||||
private static int VersionOffset = 0;
|
||||
|
||||
@@ -57,9 +57,9 @@ namespace Elwig.Helpers {
|
||||
if (fromVersion == toVersion) {
|
||||
return;
|
||||
} else if (fromVersion > toVersion) {
|
||||
throw new Exception("schema_version of database is too new");
|
||||
throw new DatabaseVersionTooNewException("schema_version of database is too new");
|
||||
} else if (fromVersion <= 0) {
|
||||
throw new Exception("schema_version of database is invalid");
|
||||
throw new DatabaseIntegrityException("schema_version of database is invalid");
|
||||
}
|
||||
|
||||
var asm = Assembly.GetExecutingAssembly();
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace Elwig.Helpers.Billing {
|
||||
SELECT mgnr, did, dpnr, sortid, weight, kmw, qualid, attrid, modifiers, contracted
|
||||
FROM v_delivery
|
||||
WHERE year = {Year}
|
||||
ORDER BY mgnr, sortid, abgewertet ASC, {(honorContracted ? "contracted IS NOT NULL DESC, contracted DESC," : "")}
|
||||
ORDER BY mgnr, sortid, devalued ASC, {(honorContracted ? "contracted IS NOT NULL DESC, contracted DESC," : "")}
|
||||
attribute_prio DESC, COALESCE(attrid, '~'), kmw DESC, lsnr, dpnr
|
||||
""";
|
||||
using var reader = await cmd.ExecuteReaderAsync();
|
||||
|
||||
@@ -451,7 +451,7 @@ namespace Elwig.Helpers.Billing {
|
||||
foreach (var c in entry.Vaributes) {
|
||||
var v = new RawVaribute(c.Variety!.SortId, c.Attribute?.AttrId ?? "", c.Cultivation?.CultId);
|
||||
if (v.CultId == "") v.CultId = null;
|
||||
if (entry.Abgewertet) {;
|
||||
if (entry.IsDevalued) {;
|
||||
qualityWei[v.ToString()] = node.DeepClone();
|
||||
} else {
|
||||
payment[v.ToString()] = node.DeepClone();
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Elwig.Helpers.Billing {
|
||||
}
|
||||
|
||||
public async Task Calculate(bool strictPrices = true, bool? honorContracted = null, bool? allowAttrsIntoLower = null, bool? avoidUnderDeliveries = null) {
|
||||
if (PaymentVariant == null || Data == null) throw new Exception("Call Load before Calculate");
|
||||
if (PaymentVariant == null || Data == null) throw new InvalidOperationException("Call Load before Calculate");
|
||||
using var cnx = await AppDbContext.ConnectAsync();
|
||||
using var tx = await cnx.BeginTransactionAsync();
|
||||
await CalculateBuckets(honorContracted, allowAttrsIntoLower, avoidUnderDeliveries, cnx);
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace Elwig.Helpers.Billing {
|
||||
var list = (await CreateGraphEntries(ctx, season.Precision, curves, entries)).Where(e => e.Vaributes.Count > 0);
|
||||
foreach (var e in list) {
|
||||
e.Id += idOffset;
|
||||
e.Abgewertet = true;
|
||||
e.IsDevalued = true;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Elwig.Helpers.Billing {
|
||||
|
||||
public int Id { get; set; }
|
||||
public BillingData.CurveMode Mode { get; set; }
|
||||
public bool Abgewertet { get; set; }
|
||||
public bool IsDevalued { get; set; }
|
||||
|
||||
public Graph DataGraph { get; set; }
|
||||
public Graph? ContractedGraph { get; set; }
|
||||
@@ -38,9 +38,9 @@ namespace Elwig.Helpers.Billing {
|
||||
}
|
||||
|
||||
public List<Varibute> Vaributes { get; set; }
|
||||
public string VaributeStringSimple => (Abgewertet ? "Abgew.: " : "") + (Vaributes.Count != 0 ? (Vaributes.Count >= 25 ? "Restliche Sorten" : string.Join(", ", Vaributes.Select(c => c.Listing))) : "-");
|
||||
public string VaributeStringSimple => (IsDevalued ? "Abgew.: " : "") + (Vaributes.Count != 0 ? (Vaributes.Count >= 25 ? "Restliche Sorten" : string.Join(", ", Vaributes.Select(c => c.Listing))) : "-");
|
||||
public string VaributeString => Vaributes.Count != 0 ? string.Join("\n", Vaributes.Select(c => c.FullName)) : "-";
|
||||
public string VaributeStringChange => (Abgewertet ? "A." : "") + string.Join(",", Vaributes.Select(c => c.Listing));
|
||||
public string VaributeStringChange => (IsDevalued ? "A." : "") + string.Join(",", Vaributes.Select(c => c.Listing));
|
||||
public Brush? Color => Vaributes.Select(v => v.Variety?.Color).Distinct().SingleOrDefault();
|
||||
private readonly int Precision;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Elwig.Helpers.Billing {
|
||||
public WineAttr? Attribute { get; }
|
||||
public WineCult? Cultivation { get; }
|
||||
public int? AssignedGraphId { get; set; }
|
||||
public int? AssignedAbgewGraphId { get; set; }
|
||||
public int? AssignedDevaluedGraphId { get; set; }
|
||||
|
||||
public string Listing => $"{Variety?.SortId}" +
|
||||
(Attribute != null ? $"/{Attribute.AttrId}" : "") +
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Elwig.Helpers {
|
||||
public class DatabaseIntegrityException(string? message = null) : SystemException(message) { }
|
||||
public class DatabaseForeignKeyViolationException(string? message = null) : DatabaseIntegrityException(message) { }
|
||||
public class DatabaseVersionTooNewException(string? message = null) : DatabaseIntegrityException(message) { }
|
||||
public class WeighingException(string? message = null) : ApplicationException(message) { }
|
||||
}
|
||||
@@ -32,7 +32,7 @@ namespace Elwig.Helpers.Export {
|
||||
if (transactions.Any(tx => tx.Amount < 0)) {
|
||||
throw new ArgumentException("Tranaction amount may not be negative");
|
||||
} else if (App.Client.Iban == null) {
|
||||
throw new ArgumentException("Client IBAN has to be set");
|
||||
throw new ApplicationException("Mandanten-IBAN muss gesetzt sein");
|
||||
}
|
||||
progress?.Report(0.0);
|
||||
var nbOfTxs = transactions.Count();
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace Elwig.Helpers {
|
||||
return pwd;
|
||||
} catch { }
|
||||
}
|
||||
throw new InvalidDataException("No matching password found");
|
||||
throw new ApplicationException("Kein passendes Passwort gefunden");
|
||||
}
|
||||
|
||||
public static async Task<ReadOnlyMemory<char>> CheckIntegrity(this ZipArchive zip, IEnumerable<ReadOnlyMemory<char>> passwords) {
|
||||
@@ -162,7 +162,7 @@ namespace Elwig.Helpers {
|
||||
}
|
||||
|
||||
if (list.Count != 1 || list[0] != "ok") {
|
||||
throw new FileFormatException($"Integrity problems ({list.Count}):\n" + string.Join("\n", list.Take(50)));
|
||||
throw new DatabaseIntegrityException($"Integrity problems ({list.Count}):\n" + string.Join("\n", list.Take(50)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace Elwig.Helpers {
|
||||
}
|
||||
|
||||
if (list.Count != 1 || list[0] != "ok") {
|
||||
throw new FileFormatException($"Integrity problems ({list.Count}):\n" + string.Join("\n", list.Take(50)));
|
||||
throw new DatabaseIntegrityException($"Integrity problems ({list.Count}):\n" + string.Join("\n", list.Take(50)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace Elwig.Helpers {
|
||||
}
|
||||
|
||||
if (list.Count > 0) {
|
||||
throw new InvalidDataException($"Foreign key violations ({list.Count}):\n" + string.Join("\n", list.Take(50)
|
||||
throw new DatabaseForeignKeyViolationException($"Foreign key violations ({list.Count}):\n" + string.Join("\n", list.Take(50)
|
||||
.Select(v => $"{v.Table} - {v.RowId} - {v.Parent} - {v.FkId}")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Elwig.Helpers.Printing {
|
||||
public string PrinterName { get; init; }
|
||||
|
||||
public PdfPrinter(string? printerName = null) {
|
||||
PrinterName = printerName ?? GetDefaultPrinterName() ?? throw new InvalidOperationException("No default Windows printer is configured.");
|
||||
PrinterName = printerName ?? GetDefaultPrinterName() ?? throw new ApplicationException("Kein Standard-Drucker in Windows festgelegt.");
|
||||
}
|
||||
|
||||
public void Print(string pdfPath, int copies = 1, bool doublePaged = false) {
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Elwig.Helpers.Weighing {
|
||||
public class WeighingException(string? message = null) : Exception(message) {
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@ namespace Elwig.Models.Dtos {
|
||||
FROM v_delivery v
|
||||
JOIN delivery_part p ON (p.year, p.did, p.dpnr) = (v.year, v.did, v.dpnr)
|
||||
WHERE (p.year = {year} OR {year} IS NULL) AND (v.mgnr = {mgnr} OR {mgnr} IS NULL)
|
||||
ORDER BY p.year, v.mgnr, v.sortid, v.abgewertet ASC, v.attribute_prio DESC, COALESCE(v.attrid, '~'), v.kmw DESC, v.lsnr, v.dpnr
|
||||
ORDER BY p.year, v.mgnr, v.sortid, v.devalued ASC, v.attribute_prio DESC, COALESCE(v.attrid, '~'), v.kmw DESC, v.lsnr, v.dpnr
|
||||
""").IgnoreAutoIncludes().ToListAsync();
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ namespace Elwig.Models.Dtos {
|
||||
public string? Cultivation;
|
||||
public string QualityLevel;
|
||||
public string QualId;
|
||||
public bool IsDepreciated;
|
||||
public bool IsDevalued;
|
||||
public (double Oe, double Kmw) Gradation;
|
||||
public string[] Modifiers;
|
||||
public int Weight;
|
||||
@@ -89,7 +89,7 @@ namespace Elwig.Models.Dtos {
|
||||
Cultivation = p.Cultivation?.Name;
|
||||
QualityLevel = p.Quality.Name;
|
||||
QualId = p.Quality.QualId;
|
||||
IsDepreciated = p.QualId == "WEI";
|
||||
IsDevalued = p.QualId == "WEI";
|
||||
Gradation = (p.Oe, p.Kmw);
|
||||
Modifiers = [.. p.Modifiers.Select(m => m.Name)];
|
||||
Weight = p.Weight;
|
||||
|
||||
@@ -61,6 +61,9 @@ namespace Elwig.Models.Entities {
|
||||
[ForeignKey("QualId")]
|
||||
public virtual WineQualLevel Quality { get; init; } = null!;
|
||||
|
||||
[NotMapped]
|
||||
public bool IsDevalued => QualId == "WEI";
|
||||
|
||||
[Column("hkid")]
|
||||
public required string HkId { get; set; }
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Elwig {
|
||||
// FIXME remove with .NET 11.0.1
|
||||
public static class Program {
|
||||
[STAThread]
|
||||
public static int Main(string[] args) {
|
||||
if (Environment.GetEnvironmentVariable("DOTNET_JITMinOpts") != "1" && Environment.ProcessPath is string exePath) {
|
||||
if (Process.Start(new ProcessStartInfo(exePath, args) {
|
||||
UseShellExecute = false,
|
||||
Environment = { ["DOTNET_JITMinOpts"] = "1" },
|
||||
}) != null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
var app = new App();
|
||||
app.InitializeComponent();
|
||||
return app.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
-- schema version 43 to 44
|
||||
|
||||
PRAGMA writable_schema = ON;
|
||||
|
||||
UPDATE sqlite_schema SET sql = REPLACE(sql,
|
||||
'IN (SELECT l.qualid FROM wine_quality_level l WHERE NOT l.predicate AND (p.kmw >= l.min_kmw OR l.min_kmw IS NULL) ORDER BY l.min_kmw DESC LIMIT 1,100) AS abgewertet',
|
||||
'= ''WEI'' AS devalued')
|
||||
WHERE type = 'view' AND name = 'v_delivery';
|
||||
|
||||
PRAGMA schema_version = 4301;
|
||||
PRAGMA writable_schema = OFF;
|
||||
@@ -720,7 +720,7 @@ namespace Elwig.Services {
|
||||
});
|
||||
}
|
||||
|
||||
public static async Task DepreciateDelivery(int year, int did, int[] weights) {
|
||||
public static async Task DevalueDelivery(int year, int did, int[] weights) {
|
||||
await Task.Run(async () => {
|
||||
using var ctx = new AppDbContext();
|
||||
var d = await ctx.Deliveries
|
||||
@@ -890,7 +890,7 @@ namespace Elwig.Services {
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task GenerateDeliveryDepreciationList(this DeliveryAdminViewModel vm, ExportSubject subject, ExportMode mode) {
|
||||
public static async Task GenerateDeliveryDevaluationList(this DeliveryAdminViewModel vm, ExportSubject subject, ExportMode mode) {
|
||||
using var ctx = new AppDbContext();
|
||||
IQueryable<DeliveryPart> query;
|
||||
List<string> filterNames = [];
|
||||
@@ -917,17 +917,17 @@ namespace Elwig.Services {
|
||||
filterNames.Remove("abgewertet");
|
||||
|
||||
if (mode == ExportMode.SaveList) {
|
||||
var filename = InteractionService.SaveFile(DeliveryDepreciationList.Name, $"{DeliveryDepreciationList.Name}-{vm.FilterSeason ?? Utils.CurrentLastSeason}", "ods");
|
||||
var filename = InteractionService.SaveFile(DeliveryDevaluationList.Name, $"{DeliveryDevaluationList.Name}-{vm.FilterSeason ?? Utils.CurrentLastSeason}", "ods");
|
||||
if (filename != null) {
|
||||
await Utils.RunForeground(async () => {
|
||||
using var ods = new OdsFile(filename);
|
||||
var tblTotal = await DeliveryJournalData.FromQuery(query, filterNames);
|
||||
tblTotal.FullName = DeliveryDepreciationList.Name;
|
||||
tblTotal.FullName = DeliveryDevaluationList.Name;
|
||||
tblTotal.Name = "Gesamt";
|
||||
await ods.AddTable(tblTotal);
|
||||
foreach (var branch in await ctx.FetchBranches().ToListAsync()) {
|
||||
var tbl = await DeliveryJournalData.FromQuery(query.Where(p => p.Delivery.ZwstId == branch.ZwstId), filterNames);
|
||||
tbl.FullName = DeliveryDepreciationList.Name;
|
||||
tbl.FullName = DeliveryDevaluationList.Name;
|
||||
tbl.Name = branch.Name;
|
||||
await ods.AddTable(tbl);
|
||||
}
|
||||
@@ -936,7 +936,7 @@ namespace Elwig.Services {
|
||||
} else {
|
||||
await Utils.RunForeground(async () => {
|
||||
var data = await DeliveryJournalData.FromQuery(query, filterNames);
|
||||
using var doc = new DeliveryDepreciationList(string.Join(" / ", filterNames), data);
|
||||
using var doc = new DeliveryDevaluationList(string.Join(" / ", filterNames), data);
|
||||
await Utils.ExportDocument(doc, mode);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using iText.Commons.Exceptions;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows;
|
||||
|
||||
@@ -118,6 +120,7 @@ namespace Elwig.Services {
|
||||
}
|
||||
|
||||
public static void ShowException(string title, string? text, Exception exc, bool showExcType = false, bool isError = true) {
|
||||
bool fatal = false;
|
||||
text = text == null ? "" : text + (text.EndsWith('.') || text.EndsWith('!') || text.EndsWith('?') ? "" : ":") + "\n\n";
|
||||
if ((exc.InnerException ?? exc) is SqliteException sql) {
|
||||
if (sql.SqliteErrorCode == 5 || sql.SqliteErrorCode == 6) {
|
||||
@@ -145,10 +148,14 @@ namespace Elwig.Services {
|
||||
if (exc.InnerException != null) text += "\n\n" + exc.InnerException.Message;
|
||||
}
|
||||
} else {
|
||||
text += exc.Message + (showExcType ? $" ({exc.GetType().Name})" : "");
|
||||
if (exc is SystemException and not FileNotFoundException and not OperationCanceledException and not FileFormatException and not IOException and not TimeoutException || exc is ITextException) {
|
||||
text += "Schwerwiegender Fehler; unbedingt den Programmierern melden:\n\n";
|
||||
fatal = true;
|
||||
}
|
||||
text += exc.Message + (showExcType || fatal ? $" ({exc.GetType().Name})" : "");
|
||||
if (exc.InnerException != null) text += "\n\n" + exc.InnerException.Message;
|
||||
}
|
||||
if (App.Config.Debug && exc.StackTrace != null) {
|
||||
if ((fatal || App.Config.Debug) && exc.StackTrace != null) {
|
||||
var m = Regex.Match(exc.StackTrace, @"\\([^:\\]*):line ([0-9]+)");
|
||||
if (m != null) text += "\n\n" + m.Groups[1] + ": line " + m.Groups[2];
|
||||
}
|
||||
@@ -167,7 +174,11 @@ namespace Elwig.Services {
|
||||
text = text == null ? "" : text + (text.EndsWith('.') || text.EndsWith('!') || text.EndsWith('?') ? "" : ":") + "\n\n";
|
||||
text += exc.Message;
|
||||
if (exc.InnerException != null) text += "\n\n" + exc.InnerException.Message;
|
||||
if (Override != null) {
|
||||
if (NextError != null) {
|
||||
NextError(title, text);
|
||||
NextError = null;
|
||||
return false;
|
||||
} else if (Override != null) {
|
||||
return Override("error", title, text) != null;
|
||||
} else {
|
||||
return MessageBox.Show(text, title, MessageBoxButton.YesNo, MessageBoxImage.Error, MessageBoxResult.No) == MessageBoxResult.Yes;
|
||||
|
||||
@@ -39,13 +39,13 @@ namespace Elwig.Services {
|
||||
vm.EnableMemberReferenceButton = false;
|
||||
vm.StatusDeliveriesLastSeason = "-";
|
||||
vm.StatusDeliveriesLastSeasonInfo = $"{Utils.CurrentLastSeason - 1}";
|
||||
vm.StatusDeliveriesLastSeasonToolTip = null;
|
||||
vm.StatusDeliveriesLastSeasonToolTip?.Content = null;
|
||||
vm.StatusDeliveriesThisSeason = "-";
|
||||
vm.StatusDeliveriesThisSeasonInfo = $"{Utils.CurrentLastSeason}";
|
||||
vm.StatusDeliveriesThisSeasonToolTip = null;
|
||||
vm.StatusDeliveriesThisSeasonToolTip?.Content = null;
|
||||
vm.StatusAreaCommitment = "-";
|
||||
vm.StatusAreaCommitmentInfo = $"{Utils.CurrentLastSeason}";
|
||||
vm.StatusAreaCommitmentToolTip = null;
|
||||
vm.StatusAreaCommitmentToolTip?.Content = null;
|
||||
vm.Age = "-";
|
||||
vm.CreatedAt = "-";
|
||||
vm.ModifiedAt = "-";
|
||||
@@ -163,13 +163,13 @@ namespace Elwig.Services {
|
||||
|
||||
vm.StatusDeliveriesLastSeasonInfo = $"{Utils.CurrentLastSeason - 1}";
|
||||
vm.StatusDeliveriesLastSeason = "...";
|
||||
vm.StatusDeliveriesLastSeasonToolTip = null;
|
||||
vm.StatusDeliveriesLastSeasonToolTip?.Content = null;
|
||||
vm.StatusDeliveriesThisSeasonInfo = $"{Utils.CurrentLastSeason}";
|
||||
vm.StatusDeliveriesThisSeason = "...";
|
||||
vm.StatusDeliveriesThisSeasonToolTip = null;
|
||||
vm.StatusDeliveriesThisSeasonToolTip?.Content = null;
|
||||
vm.StatusAreaCommitmentInfo = $"{Utils.CurrentLastSeason}";
|
||||
vm.StatusAreaCommitment = "...";
|
||||
vm.StatusAreaCommitmentToolTip = null;
|
||||
vm.StatusAreaCommitmentToolTip?.Content = null;
|
||||
|
||||
Utils.RunBackground("Mitgliederdaten laden", async () => {
|
||||
if (App.Current?.Dispatcher == null) return;
|
||||
@@ -204,13 +204,13 @@ namespace Elwig.Services {
|
||||
var grid = AreaCmtService.GenerateToolTip(gridData);
|
||||
vm.StatusDeliveriesLastSeasonInfo = $"{Utils.CurrentLastSeason - 1}";
|
||||
vm.StatusDeliveriesLastSeason = textLast;
|
||||
vm.StatusDeliveriesLastSeasonToolTip = d1Grid;
|
||||
vm.StatusDeliveriesLastSeasonToolTip?.Content = d1Grid;
|
||||
vm.StatusDeliveriesThisSeasonInfo = $"{Utils.CurrentLastSeason}";
|
||||
vm.StatusDeliveriesThisSeason = textThis;
|
||||
vm.StatusDeliveriesThisSeasonToolTip = d2Grid;
|
||||
vm.StatusDeliveriesThisSeasonToolTip?.Content = d2Grid;
|
||||
vm.StatusAreaCommitmentInfo = $"{Utils.CurrentLastSeason}";
|
||||
vm.StatusAreaCommitment = text;
|
||||
vm.StatusAreaCommitmentToolTip = grid;
|
||||
vm.StatusAreaCommitmentToolTip?.Content = grid;
|
||||
vm.MemberHasDeliveries = [.. Enumerable.Range(0, 9999).Select(i => deliveries.GetValueOrDefault(i, false))];
|
||||
});
|
||||
});
|
||||
|
||||
@@ -114,16 +114,16 @@ namespace Elwig.Services {
|
||||
return [];
|
||||
|
||||
TracesCertificate[] certs = [.. jsonCerts.Select(j => new TracesCertificate {
|
||||
Id = j!["reference"]?.GetValue<string>() ?? throw new Exception(),
|
||||
AuthorityCode = j["issuingBody"]?["code"]?.GetValue<string>() ?? throw new Exception(),
|
||||
OperatorId = j["operatorIdentifier"]?.GetValue<string>() ?? throw new Exception(),
|
||||
OperatorName = j["operator"]?["name"]?.GetValue<string>() ?? throw new Exception(),
|
||||
Activities = [.. j["activities"]?.AsArray().Select(a => Enum.Parse<TracesActivity>(a?["id"]?.GetValue<string>().ToUpper().Replace("_IMPORT", "IMPORT") ?? throw new Exception())) ?? []],
|
||||
CategoriesOfProduct = [.. j["categoriesOfProduct"]?.AsArray().Select(c => Enum.Parse<TracesCategoryOfProduct>(c?["id"]?.GetValue<string>() ?? throw new Exception())) ?? []],
|
||||
IssuedOn = DateOnly.FromDateTime(DateTime.ParseExact(j["issuedOn"]?.GetValue<string>() ?? throw new Exception(), "yyyy-MM-ddTHH:mm:ss.fffK", CultureInfo.InvariantCulture, DateTimeStyles.None)),
|
||||
ExpiresOn = DateOnly.ParseExact(j["expiresOn"]?.GetValue<string>() ?? throw new Exception(), "yyyy-MM-dd"),
|
||||
LastStatusUpdateOn = DateOnly.FromDateTime(DateTime.ParseExact(j["lastStatusUpdateDateTime"]?.GetValue<string>() ?? throw new Exception(), "yyyy-MM-ddTHH:mm:ss.fffK", CultureInfo.InvariantCulture, DateTimeStyles.None)),
|
||||
Status = Enum.Parse<TracesStatus>(j["status"]?["id"]?.GetValue<string>() ?? throw new Exception()),
|
||||
Id = j!["reference"]?.GetValue<string>() ?? throw new KeyNotFoundException(),
|
||||
AuthorityCode = j["issuingBody"]?["code"]?.GetValue<string>() ?? throw new KeyNotFoundException(),
|
||||
OperatorId = j["operatorIdentifier"]?.GetValue<string>() ?? throw new KeyNotFoundException(),
|
||||
OperatorName = j["operator"]?["name"]?.GetValue<string>() ?? throw new KeyNotFoundException(),
|
||||
Activities = [.. j["activities"]?.AsArray().Select(a => Enum.Parse<TracesActivity>(a?["id"]?.GetValue<string>().ToUpper().Replace("_IMPORT", "IMPORT") ?? throw new KeyNotFoundException())) ?? []],
|
||||
CategoriesOfProduct = [.. j["categoriesOfProduct"]?.AsArray().Select(c => Enum.Parse<TracesCategoryOfProduct>(c?["id"]?.GetValue<string>() ?? throw new KeyNotFoundException())) ?? []],
|
||||
IssuedOn = DateOnly.FromDateTime(DateTime.ParseExact(j["issuedOn"]?.GetValue<string>() ?? throw new KeyNotFoundException(), "yyyy-MM-ddTHH:mm:ss.fffK", CultureInfo.InvariantCulture, DateTimeStyles.None)),
|
||||
ExpiresOn = DateOnly.ParseExact(j["expiresOn"]?.GetValue<string>() ?? throw new KeyNotFoundException(), "yyyy-MM-dd"),
|
||||
LastStatusUpdateOn = DateOnly.FromDateTime(DateTime.ParseExact(j["lastStatusUpdateDateTime"]?.GetValue<string>() ?? throw new KeyNotFoundException(), "yyyy-MM-ddTHH:mm:ss.fffK", CultureInfo.InvariantCulture, DateTimeStyles.None)),
|
||||
Status = Enum.Parse<TracesStatus>(j["status"]?["id"]?.GetValue<string>() ?? throw new KeyNotFoundException()),
|
||||
})];
|
||||
|
||||
return (!searchedByName || certs.Where(c => c.Status == TracesStatus.ISSUED).Select(c => c.OperatorId).ToHashSet().Count == 1) ? certs : [];
|
||||
|
||||
@@ -27,6 +27,10 @@ namespace Elwig.ViewModels {
|
||||
set => FilterSeasonString = $"{value}";
|
||||
}
|
||||
|
||||
public void Init() {
|
||||
StatusAreaToolTip = new();
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string? FbNrString { get; set; }
|
||||
public int? FbNr {
|
||||
@@ -97,6 +101,6 @@ namespace Elwig.ViewModels {
|
||||
[ObservableProperty]
|
||||
public partial string StatusArea { get; set; } = "-";
|
||||
[ObservableProperty]
|
||||
public partial Grid? StatusAreaToolTip { get; set; }
|
||||
public partial ToolTip? StatusAreaToolTip { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,11 @@ namespace Elwig.ViewModels {
|
||||
public partial string? SearchQuery { get; set; } = "";
|
||||
public List<string> TextFilter => [.. SearchQuery?.ToLower().Split(' ', StringSplitOptions.RemoveEmptyEntries) ?? []];
|
||||
|
||||
public void Init() {
|
||||
StatusWeightToolTip = new();
|
||||
StatusGradationToolTip = new();
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string? LastScaleError { get; set; }
|
||||
[ObservableProperty]
|
||||
@@ -112,7 +117,7 @@ namespace Elwig.ViewModels {
|
||||
[ObservableProperty]
|
||||
public partial IEnumerable<WineQualLevel> WineQualityLevelSource { get; set; } = [];
|
||||
[ObservableProperty]
|
||||
public partial bool Abgewertet { get; set; }
|
||||
public partial bool IsDevalued { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string? WeightString { get; set; }
|
||||
@@ -212,8 +217,8 @@ namespace Elwig.ViewModels {
|
||||
public partial string StatusGradation { get; set; } = "-";
|
||||
|
||||
[ObservableProperty]
|
||||
public partial Grid? StatusWeightToolTip { get; set; }
|
||||
public partial ToolTip? StatusWeightToolTip { get; private set; }
|
||||
[ObservableProperty]
|
||||
public partial Grid? StatusGradationToolTip { get; set; }
|
||||
public partial ToolTip? StatusGradationToolTip { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,10 @@ namespace Elwig.ViewModels {
|
||||
set => FilterSeasonString = $"{value}";
|
||||
}
|
||||
|
||||
public void Init() {
|
||||
StatusWeightToolTip = new();
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
public partial DeliveryAncmt? SelectedDeliveryAncmt { get; set; }
|
||||
[ObservableProperty]
|
||||
@@ -79,7 +83,7 @@ namespace Elwig.ViewModels {
|
||||
public partial string StatusAncmtModified { get; set; } = "-";
|
||||
|
||||
[ObservableProperty]
|
||||
public partial Grid? StatusWeightToolTip { get; set; }
|
||||
public partial ToolTip? StatusWeightToolTip { get; private set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial Visibility ControlButtonsVisibility { get; set; } = Visibility.Visible;
|
||||
|
||||
@@ -32,6 +32,14 @@ namespace Elwig.ViewModels {
|
||||
[ObservableProperty]
|
||||
public partial IEnumerable<Member> Members { get; set; } = [];
|
||||
|
||||
public void Init() {
|
||||
StatusMembersToolTip = new();
|
||||
StatusBusinessSharesToolTip = new();
|
||||
StatusDeliveriesLastSeasonToolTip = new();
|
||||
StatusDeliveriesThisSeasonToolTip = new();
|
||||
StatusAreaCommitmentToolTip = new();
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
public partial bool IsMemberSelected { get; set; }
|
||||
[ObservableProperty]
|
||||
@@ -218,25 +226,25 @@ namespace Elwig.ViewModels {
|
||||
[ObservableProperty]
|
||||
public partial string StatusMembers { get; set; } = "-";
|
||||
[ObservableProperty]
|
||||
public partial string? StatusMembersToolTip { get; set; }
|
||||
public partial ToolTip? StatusMembersToolTip { get; private set; }
|
||||
[ObservableProperty]
|
||||
public partial TextBlock? StatusBusinessShares { get; set; }
|
||||
public partial ToolTip? StatusBusinessSharesToolTip { get; private set; }
|
||||
[ObservableProperty]
|
||||
public partial string StatusDeliveriesLastSeason { get; set; } = "-";
|
||||
[ObservableProperty]
|
||||
public partial string StatusDeliveriesLastSeasonInfo { get; set; } = "letzte Saison";
|
||||
[ObservableProperty]
|
||||
public partial Grid? StatusDeliveriesLastSeasonToolTip { get; set; }
|
||||
public partial ToolTip? StatusDeliveriesLastSeasonToolTip { get; private set; }
|
||||
[ObservableProperty]
|
||||
public partial string StatusDeliveriesThisSeason { get; set; } = "-";
|
||||
[ObservableProperty]
|
||||
public partial string StatusDeliveriesThisSeasonInfo { get; set; } = "aktuelle Saison";
|
||||
[ObservableProperty]
|
||||
public partial Grid? StatusDeliveriesThisSeasonToolTip { get; set; }
|
||||
public partial ToolTip? StatusDeliveriesThisSeasonToolTip { get; private set; }
|
||||
[ObservableProperty]
|
||||
public partial string StatusAreaCommitment { get; set; } = "-";
|
||||
[ObservableProperty]
|
||||
public partial Grid? StatusAreaCommitmentToolTip { get; set; }
|
||||
public partial ToolTip? StatusAreaCommitmentToolTip { get; private set; }
|
||||
[ObservableProperty]
|
||||
public partial string StatusAreaCommitmentInfo { get; set; } = "aktuelle Saison";
|
||||
|
||||
|
||||
@@ -619,5 +619,27 @@ namespace Elwig.Windows {
|
||||
TextBox_TextChanged(sender, evt);
|
||||
}
|
||||
}
|
||||
|
||||
protected void ToolTipInfo_MouseEnter(object sender, MouseEventArgs evt) {
|
||||
if (sender is Grid g && g.Children[^1] is TextBlock b && g.ToolTip is ToolTip t) {
|
||||
b.Text = "\uF167";
|
||||
if (t.Content != null) t.IsOpen = true;
|
||||
} else if (sender is TextBlock i && i.Parent is Grid p) {
|
||||
i.Text = "\uF167";
|
||||
var s = p.Children[p.Children.IndexOf(i) - 1] as TextBox;
|
||||
(s?.ToolTip as ToolTip)?.IsOpen = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected void ToolTipInfo_MouseLeave(object sender, MouseEventArgs evt) {
|
||||
if (sender is Grid g && g.Children[^1] is TextBlock b && g.ToolTip is ToolTip t) {
|
||||
b.Text = "\uE946";
|
||||
t.IsOpen = false;
|
||||
} else if (sender is TextBlock i && i.Parent is Grid p) {
|
||||
i.Text = "\uE946";
|
||||
var s = p.Children[p.Children.IndexOf(i) - 1] as TextBox;
|
||||
(s?.ToolTip as ToolTip)?.IsOpen = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,22 +77,28 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox x:Name="SearchInput" Text="{Binding SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.ColumnSpan="3" Margin="5,5,66,0" IsReadOnly="False"
|
||||
Grid.ColumnSpan="3" Margin="5,5,66,0" Padding="2,2,20,2" IsReadOnly="False"
|
||||
TextChanged="SearchInput_TextChanged">
|
||||
<TextBox.ToolTip>
|
||||
<TextBlock>
|
||||
<Bold>Strg+F</Bold><LineBreak/><LineBreak/>
|
||||
Flächenbindungen filtern und durchsuchen. Die Filter sind beliebig kombinierbar.<LineBreak/>
|
||||
Groß- und Kleinschreibung ist in den meisten Fällen egal.<LineBreak/>
|
||||
<LineBreak/>
|
||||
Filtern nach:<LineBreak/>
|
||||
<Bold>Sorte</Bold>: z.B. GV, zw, RR, ...<LineBreak/>
|
||||
<Bold>Attribut</Bold>: z.B. Kabinett, dac, ...<LineBreak/>
|
||||
<Bold>Flächenbindung</Bold>: z.B. GVK, GVD, ...<LineBreak/>
|
||||
<Bold>Saison</Bold>: z.B. 2020, 2019... (in dieser Saison aktiv)
|
||||
</TextBlock>
|
||||
<ToolTip>
|
||||
<TextBlock>
|
||||
<Bold>Strg+F</Bold><LineBreak/><LineBreak/>
|
||||
Flächenbindungen filtern und durchsuchen. Die Filter sind beliebig kombinierbar.<LineBreak/>
|
||||
Groß- und Kleinschreibung ist in den meisten Fällen egal.<LineBreak/>
|
||||
<LineBreak/>
|
||||
Filtern nach:<LineBreak/>
|
||||
<Bold>Sorte</Bold>: z.B. GV, zw, RR, ...<LineBreak/>
|
||||
<Bold>Attribut</Bold>: z.B. Kabinett, dac, ...<LineBreak/>
|
||||
<Bold>Flächenbindung</Bold>: z.B. GVK, GVD, ...<LineBreak/>
|
||||
<Bold>Saison</Bold>: z.B. 2020, 2019... (in dieser Saison aktiv)
|
||||
</TextBlock>
|
||||
</ToolTip>
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
<TextBlock Grid.ColumnSpan="3" FontFamily="Segoe MDL2 Assets" Text=""
|
||||
FontSize="16" Width="16" Height="16" Margin="1,1,70,0" HorizontalAlignment="Right"
|
||||
MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave"/>
|
||||
|
||||
<ctrl:IntegerUpDown x:Name="SeasonInput" Text="{Binding FilterSeasonString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.ColumnSpan="3" Height="25" Width="56" FontSize="14" Minimum="1900" Maximum="9999"
|
||||
Margin="0,5,5,0" VerticalAlignment="Top" HorizontalAlignment="Right"
|
||||
@@ -313,10 +319,17 @@
|
||||
</TextBlock>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="1"/>
|
||||
<StatusBarItem Grid.Column="2">
|
||||
<TextBlock ToolTip="{Binding StatusAreaToolTip}">
|
||||
Fläche: <Run Text="{Binding StatusArea}"/>
|
||||
</TextBlock>
|
||||
<StatusBarItem Grid.Column="2" HorizontalContentAlignment="Stretch">
|
||||
<Grid ToolTip="{Binding StatusAreaToolTip}" MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="0,0,2,0" TextTrimming="CharacterEllipsis">
|
||||
Fläche: <Run Text="{Binding StatusArea}"/>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" FontFamily="Segoe MDL2 Assets" Text="" FontSize="16" Margin="1,1,0,0"/>
|
||||
</Grid>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="3"/>
|
||||
<StatusBarItem Grid.Column="4">
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace Elwig.Windows {
|
||||
FbNrInput, MgNrInput, MemberInput, YearFromInput, KgInput, RdInput,
|
||||
GstNrInput, AreaInput, AreaCmtTypeInput, WineCultivationInput
|
||||
];
|
||||
ViewModel.Init();
|
||||
|
||||
ControlUtils.InitializeDelayTimer(SearchInput, SearchInput_TextChanged);
|
||||
SearchInput.TextChanged -= SearchInput_TextChanged;
|
||||
@@ -86,11 +87,11 @@ namespace Elwig.Windows {
|
||||
ViewModel.StatusAreaCommitments = $"{areaCmtCount:N0}";
|
||||
var (text, gridData) = stat;
|
||||
ViewModel.StatusArea = text;
|
||||
ViewModel.StatusAreaToolTip = AreaCmtService.GenerateToolTip(gridData);
|
||||
ViewModel.StatusAreaToolTip?.Content = AreaCmtService.GenerateToolTip(gridData);
|
||||
} else {
|
||||
ViewModel.StatusAreaCommitments = $"{contracts.Count:N0}";
|
||||
ViewModel.StatusArea = $"{areaCmts.Sum(a => a.Area):N0} m²";
|
||||
ViewModel.StatusAreaToolTip = null;
|
||||
ViewModel.StatusAreaToolTip?.Content = null;
|
||||
}
|
||||
var groups = areaCmts.GroupBy(a => $"{a.AreaCmtType.SortId}{a.AreaCmtType.AttrId}").Select(a => (a.Key, a.Sum(b => b.Area))).OrderByDescending(a => a.Item2).ToList();
|
||||
ViewModel.StatusContracts = $"{groups.Count:N0}";
|
||||
|
||||
@@ -79,13 +79,13 @@
|
||||
<TextBlock Text="{Binding Attribute.Name}" Width="80"/>
|
||||
<TextBlock Text="{Binding Cultivation.Name}" Width="80"/>
|
||||
<TextBlock Text="{Binding AssignedGraphId}" Width="30"/>
|
||||
<TextBlock Text="{Binding AssignedAbgewGraphId}" Width="30"/>
|
||||
<TextBlock Text="{Binding AssignedDevaluedGraphId}" Width="30"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ctrl:CheckComboBox.ItemTemplate>
|
||||
</ctrl:CheckComboBox>
|
||||
|
||||
<CheckBox x:Name="AbgewertetInput" Content="Abgewertet" IsEnabled="False" Checked="AbgewertetInput_Changed" Unchecked="AbgewertetInput_Changed"
|
||||
<CheckBox x:Name="DevaluedInput" Content="Abgewertet" IsEnabled="False" Checked="DevaluedInput_Changed" Unchecked="DevaluedInput_Changed"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,0" Grid.Column="1"/>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Elwig.Windows {
|
||||
private GraphEntry? SelectedGraphEntry => (GraphEntry)GraphList.SelectedItem;
|
||||
private List<Varibute> Vaributes = [];
|
||||
private bool AllVaributesAssigned => Vaributes.All(v => v.AssignedGraphId != null);
|
||||
private bool AllVaributesAssignedAbgew => Vaributes.All(v => v.AssignedAbgewGraphId != null);
|
||||
private bool AllVaributesAssignedDevalued => Vaributes.All(v => v.AssignedDevaluedGraphId != null);
|
||||
|
||||
public ChartWindow(int year, int avnr) {
|
||||
InitializeComponent();
|
||||
@@ -126,8 +126,8 @@ namespace Elwig.Windows {
|
||||
e.Vaributes.ForEach(v => {
|
||||
var found = Vaributes.Find(a => a.Variety?.SortId == v.Variety?.SortId && a.Attribute?.AttrId == v.Attribute?.AttrId && a.Cultivation?.CultId == v.Cultivation?.CultId);
|
||||
if (found == null) return;
|
||||
if (e.Abgewertet) {
|
||||
found.AssignedAbgewGraphId = e.Id;
|
||||
if (e.IsDevalued) {
|
||||
found.AssignedDevaluedGraphId = e.Id;
|
||||
} else {
|
||||
found.AssignedGraphId = e.Id;
|
||||
}
|
||||
@@ -153,7 +153,7 @@ namespace Elwig.Windows {
|
||||
ContractedTypeGraph.IsEnabled = true;
|
||||
ContractedTypeNone.IsEnabled = true;
|
||||
VaributeInput.IsEnabled = true;
|
||||
AbgewertetInput.IsEnabled = true;
|
||||
DevaluedInput.IsEnabled = true;
|
||||
EnableOptionButtons();
|
||||
FillInputs();
|
||||
} else {
|
||||
@@ -172,7 +172,7 @@ namespace Elwig.Windows {
|
||||
ContractedTypeGraph.IsEnabled = false;
|
||||
ContractedTypeNone.IsEnabled = false;
|
||||
VaributeInput.IsEnabled = false;
|
||||
AbgewertetInput.IsEnabled = false;
|
||||
DevaluedInput.IsEnabled = false;
|
||||
}
|
||||
GC.Collect();
|
||||
}
|
||||
@@ -180,7 +180,7 @@ namespace Elwig.Windows {
|
||||
private void FillInputs() {
|
||||
FillingInputs = true;
|
||||
|
||||
AbgewertetInput.IsChecked = SelectedGraphEntry?.Abgewertet;
|
||||
DevaluedInput.IsChecked = SelectedGraphEntry?.IsDevalued;
|
||||
if (SelectedGraphEntry?.ContractedFlatBonus is double bonus) {
|
||||
ContractedTypeFixed.IsChecked = true;
|
||||
ContractedFlatBonus.Text = $"{bonus}";
|
||||
@@ -652,7 +652,7 @@ namespace Elwig.Windows {
|
||||
using var ctx = new AppDbContext();
|
||||
var origData = BillingData.FromJson(PaymentVar.Data);
|
||||
var data = BillingData.FromGraphEntries(GraphEntries, origData, await Utils.GetVaributes(ctx, Year),
|
||||
AllVaributesAssigned, AllVaributesAssignedAbgew);
|
||||
AllVaributesAssigned, AllVaributesAssignedDevalued);
|
||||
|
||||
PaymentVar.Data = data.ToJsonString();
|
||||
ctx.Update(PaymentVar);
|
||||
@@ -747,8 +747,8 @@ namespace Elwig.Windows {
|
||||
foreach (var i in evt.AddedItems) {
|
||||
if (i is not Varibute v) continue;
|
||||
if (RemoveVaributeFromOthers(v.ToString())) {
|
||||
if (AbgewertetInput.IsChecked == true) {
|
||||
v.AssignedAbgewGraphId = SelectedGraphEntry?.Id;
|
||||
if (DevaluedInput.IsChecked == true) {
|
||||
v.AssignedDevaluedGraphId = SelectedGraphEntry?.Id;
|
||||
} else {
|
||||
v.AssignedGraphId = SelectedGraphEntry?.Id;
|
||||
}
|
||||
@@ -758,8 +758,8 @@ namespace Elwig.Windows {
|
||||
}
|
||||
foreach (var i in evt.RemovedItems) {
|
||||
if (i is not Varibute v) continue;
|
||||
if (AbgewertetInput.IsChecked == true) {
|
||||
v.AssignedAbgewGraphId = null;
|
||||
if (DevaluedInput.IsChecked == true) {
|
||||
v.AssignedDevaluedGraphId = null;
|
||||
} else {
|
||||
v.AssignedGraphId = null;
|
||||
}
|
||||
@@ -775,7 +775,7 @@ namespace Elwig.Windows {
|
||||
private bool RemoveVaributeFromOthers(string? varibute) {
|
||||
if (varibute == null) return true;
|
||||
foreach (var ge in GraphEntries) {
|
||||
if (ge != SelectedGraphEntry && ge.Abgewertet == SelectedGraphEntry?.Abgewertet) {
|
||||
if (ge != SelectedGraphEntry && ge.IsDevalued == SelectedGraphEntry?.IsDevalued) {
|
||||
var toRemove = ge.Vaributes.Where(c => c.Listing.Equals(varibute)).ToList();
|
||||
if (toRemove.Count == 0) continue;
|
||||
if (!InteractionService.AskConfirmation("Entfernen bestätigen", $"Achtung: {string.Join(", ", toRemove)} ist bereits in Kurve {ge.Id} in Verwendung!\nSoll die Zuweisung dort entfernt werden?")) {
|
||||
@@ -787,10 +787,10 @@ namespace Elwig.Windows {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void AbgewertetInput_Changed(object sender, RoutedEventArgs e) {
|
||||
private void DevaluedInput_Changed(object sender, RoutedEventArgs e) {
|
||||
if (FillingInputs) return;
|
||||
if (SelectedGraphEntry == null) return;
|
||||
SelectedGraphEntry.Abgewertet = AbgewertetInput.IsChecked == true;
|
||||
SelectedGraphEntry.IsDevalued = DevaluedInput.IsChecked == true;
|
||||
SetHasChanged();
|
||||
GraphList.Items.Refresh();
|
||||
}
|
||||
|
||||
@@ -109,24 +109,24 @@
|
||||
<MenuItem x:Name="Menu_DeliveryJournal_PrintToday" Header="...von heute drucken"
|
||||
Click="Menu_DeliveryJournal_PrintToday_Click" InputGestureText="Strg+J"/>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Abwertungsliste" x:Name="Menu_DeliveryDepreciationList">
|
||||
<MenuItem x:Name="Menu_DeliveryDepreciationList_SaveFilters" Header="...aus Filtern speichern... (Excel)"
|
||||
Click="Menu_DeliveryDepreciationList_SaveFilters_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDepreciationList_ShowFilters" Header="...aus Filtern anzeigen (PDF)"
|
||||
Click="Menu_DeliveryDepreciationList_ShowFilters_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDepreciationList_SavePdfFilters" Header="...aus Filtern speichern... (PDF)"
|
||||
Click="Menu_DeliveryDepreciationList_SavePdfFilters_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDepreciationList_PrintFilters" Header="...aus Filtern drucken"
|
||||
Click="Menu_DeliveryDepreciationList_PrintFilters_Click"/>
|
||||
<MenuItem Header="Abwertungsliste" x:Name="Menu_DeliveryDevaluationList">
|
||||
<MenuItem x:Name="Menu_DeliveryDevaluationList_SaveFilters" Header="...aus Filtern speichern... (Excel)"
|
||||
Click="Menu_DeliveryDevaluationList_SaveFilters_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDevaluationList_ShowFilters" Header="...aus Filtern anzeigen (PDF)"
|
||||
Click="Menu_DeliveryDevaluationList_ShowFilters_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDevaluationList_SavePdfFilters" Header="...aus Filtern speichern... (PDF)"
|
||||
Click="Menu_DeliveryDevaluationList_SavePdfFilters_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDevaluationList_PrintFilters" Header="...aus Filtern drucken"
|
||||
Click="Menu_DeliveryDevaluationList_PrintFilters_Click"/>
|
||||
<Separator/>
|
||||
<MenuItem x:Name="Menu_DeliveryDepreciationList_SaveSeason" Header="...von Saison speichern... (Excel)"
|
||||
Click="Menu_DeliveryDepreciationList_SaveSeason_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDepreciationList_ShowSeason" Header="...von Saison anzeigen (PDF)"
|
||||
Click="Menu_DeliveryDepreciationList_ShowSeason_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDepreciationList_SavePdfSeason" Header="...von Saison speichern... (PDF)"
|
||||
Click="Menu_DeliveryDepreciationList_SavePdfSeason_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDepreciationList_PrintSeason" Header="...von Saison drucken"
|
||||
Click="Menu_DeliveryDepreciationList_PrintSeason_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDevaluationList_SaveSeason" Header="...von Saison speichern... (Excel)"
|
||||
Click="Menu_DeliveryDevaluationList_SaveSeason_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDevaluationList_ShowSeason" Header="...von Saison anzeigen (PDF)"
|
||||
Click="Menu_DeliveryDevaluationList_ShowSeason_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDevaluationList_SavePdfSeason" Header="...von Saison speichern... (PDF)"
|
||||
Click="Menu_DeliveryDevaluationList_SavePdfSeason_Click"/>
|
||||
<MenuItem x:Name="Menu_DeliveryDevaluationList_PrintSeason" Header="...von Saison drucken"
|
||||
Click="Menu_DeliveryDevaluationList_PrintSeason_Click"/>
|
||||
</MenuItem>
|
||||
<MenuItem Header="Liefermengen" x:Name="Menu_DeliveryDataList">
|
||||
<MenuItem x:Name="Menu_DeliveryDataList_SaveFilters" Header="...aus Filtern speichern... (Excel)"
|
||||
@@ -227,36 +227,42 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox x:Name="SearchInput" Text="{Binding SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.ColumnSpan="3" Margin="5,10,156,0" IsReadOnly="False"
|
||||
Grid.ColumnSpan="3" Margin="5,10,156,0" IsReadOnly="False" Padding="2,2,20,2"
|
||||
TextChanged="SearchInput_TextChanged">
|
||||
<TextBox.ToolTip>
|
||||
<TextBlock>
|
||||
<Bold>Strg+F</Bold><LineBreak/><LineBreak/>
|
||||
Lieferungen filtern und durchsuchen. Die Filter sind beliebig kombinierbar.<LineBreak/>
|
||||
Groß- und Kleinschreibung ist in den meisten Fällen egal.<LineBreak/>
|
||||
<LineBreak/>
|
||||
Filtern nach:<LineBreak/>
|
||||
<Bold>Sorte</Bold>: z.B. GV, ZW, rr, sa, !gv (ausgenommen GV), ...<LineBreak/>
|
||||
<Bold>Rot/Weiß</Bold>: z.B. r, Rot, w, weiß, ...<LineBreak/>
|
||||
<Bold>Qualitätsstufe</Bold>: z.B. QUW, kab, !ldw (ausgenommen LDW), abgew[ertet], ...<LineBreak/>
|
||||
<Bold>Gradation</Bold>: z.B. >73, <15, 17-18, 15-, >17,5, 62-75, ...<LineBreak/>
|
||||
<Bold>Mitglied</Bold>: z.B. 1234, 987, ...<LineBreak/>
|
||||
<Bold>Saison</Bold>: z.B. 2020, >2015, 2017-2019, <2005, 2019-, ...<LineBreak/>
|
||||
<Bold>Zweigstelle</Bold>: z.B. musterort, ...<LineBreak/>
|
||||
<Bold>Attribut</Bold>: z.B. kabinett, !kabinett (alle außer kabinett), ...<LineBreak/>
|
||||
<Bold>Bewirtschaftung</Bold>: z.B. bio, !kip (alle außer KIP), ...<LineBreak/>
|
||||
<Bold>Gewicht</Bold>: z.B. <500kg, >6000kg, ... (gilt für Menge der gesamten Lieferung)<LineBreak/>
|
||||
<Bold>Datum</Bold>: z.B. 1.9., 15.9.-10.10., -15.10.2020, ...<LineBreak/>
|
||||
<Bold>Uhrzeit</Bold>: z.B. 06:00-08:00, 18:00-, ...<LineBreak/>
|
||||
<Bold>Handwiegung</Bold>: handw[iegung], !Handw[iegung] (alle ohne Handwiegung)<LineBreak/>
|
||||
<Bold>Handlese</Bold>: Handl[ese], !handl[ese] (alle ohne Handlese)<LineBreak/>
|
||||
<Bold>Anlieferung</Bold>: Plane[nwagen]/Kipp[er], !plane[nwagen]/!kipp[er], Lesew[agen], !lesew[agen], kiste[n], !kiste[n]<LineBreak/>
|
||||
<Bold>Gebunden</Bold>: geb[unden], ungeb[unden], !geb[unden], !ungeb[unden]<LineBreak/>
|
||||
<Bold>Gerebelt</Bold>: gerebelt, !Gerebelt (nicht gerebelt gewogen)<LineBreak/>
|
||||
<Bold>Freitext</Bold>: z.B. Lieferscheinnummern, Anmerkung, "quw" (sucht nach dem Text "quw")
|
||||
</TextBlock>
|
||||
<ToolTip>
|
||||
<TextBlock>
|
||||
<Bold>Strg+F</Bold><LineBreak/><LineBreak/>
|
||||
Lieferungen filtern und durchsuchen. Die Filter sind beliebig kombinierbar.<LineBreak/>
|
||||
Groß- und Kleinschreibung ist in den meisten Fällen egal.<LineBreak/>
|
||||
<LineBreak/>
|
||||
Filtern nach:<LineBreak/>
|
||||
<Bold>Sorte</Bold>: z.B. GV, ZW, rr, sa, !gv (ausgenommen GV), ...<LineBreak/>
|
||||
<Bold>Rot/Weiß</Bold>: z.B. r, Rot, w, weiß, ...<LineBreak/>
|
||||
<Bold>Qualitätsstufe</Bold>: z.B. QUW, kab, !ldw (ausgenommen LDW), abgew[ertet], ...<LineBreak/>
|
||||
<Bold>Gradation</Bold>: z.B. >73, <15, 17-18, 15-, >17,5, 62-75, ...<LineBreak/>
|
||||
<Bold>Mitglied</Bold>: z.B. 1234, 987, ...<LineBreak/>
|
||||
<Bold>Saison</Bold>: z.B. 2020, >2015, 2017-2019, <2005, 2019-, ...<LineBreak/>
|
||||
<Bold>Zweigstelle</Bold>: z.B. musterort, ...<LineBreak/>
|
||||
<Bold>Attribut</Bold>: z.B. kabinett, !kabinett (alle außer kabinett), ...<LineBreak/>
|
||||
<Bold>Bewirtschaftung</Bold>: z.B. bio, !kip (alle außer KIP), ...<LineBreak/>
|
||||
<Bold>Gewicht</Bold>: z.B. <500kg, >6000kg, ... (gilt für Menge der gesamten Lieferung)<LineBreak/>
|
||||
<Bold>Datum</Bold>: z.B. 1.9., 15.9.-10.10., -15.10.2020, ...<LineBreak/>
|
||||
<Bold>Uhrzeit</Bold>: z.B. 06:00-08:00, 18:00-, ...<LineBreak/>
|
||||
<Bold>Handwiegung</Bold>: handw[iegung], !Handw[iegung] (alle ohne Handwiegung)<LineBreak/>
|
||||
<Bold>Handlese</Bold>: Handl[ese], !handl[ese] (alle ohne Handlese)<LineBreak/>
|
||||
<Bold>Anlieferung</Bold>: Plane[nwagen]/Kipp[er], !plane[nwagen]/!kipp[er], Lesew[agen], !lesew[agen], kiste[n], !kiste[n]<LineBreak/>
|
||||
<Bold>Gebunden</Bold>: geb[unden], ungeb[unden], !geb[unden], !ungeb[unden]<LineBreak/>
|
||||
<Bold>Gerebelt</Bold>: gerebelt, !Gerebelt (nicht gerebelt gewogen)<LineBreak/>
|
||||
<Bold>Freitext</Bold>: z.B. Lieferscheinnummern, Anmerkung, "quw" (sucht nach dem Text "quw")
|
||||
</TextBlock>
|
||||
</ToolTip>
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
<TextBlock Grid.ColumnSpan="3" FontFamily="Segoe MDL2 Assets" Text="" SnapsToDevicePixels="True"
|
||||
FontSize="16" Width="16" Height="16" Margin="1,4,160,0" HorizontalAlignment="Right"
|
||||
MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave"/>
|
||||
|
||||
<ctrl:IntegerUpDown x:Name="SeasonInput" Text="{Binding FilterSeasonString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.ColumnSpan="3" Height="25" Width="56" FontSize="14" Minimum="1900" Maximum="9999"
|
||||
Margin="0,10,95,0" VerticalAlignment="Top" HorizontalAlignment="Right"
|
||||
@@ -351,10 +357,10 @@
|
||||
<TextBlock FontWeight="Bold">Alt+Einfg</TextBlock>
|
||||
</Button.ToolTip>
|
||||
</Button>
|
||||
<Button x:Name="DepreciateButton" Content="Abwert./Aufteil." IsEnabled="False"
|
||||
<Button x:Name="DevalueButton" Content="Abwert./Aufteil." IsEnabled="False"
|
||||
ToolTip="Lieferung vollständig oder teilweise abwerten bzw. auf anderes Mitglied aufteilen"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="5,5,2.5,10" Grid.Column="0" Grid.Row="2"
|
||||
Click="DepreciateButton_Click"/>
|
||||
Click="DevalueButton_Click"/>
|
||||
<Button x:Name="EditDeliveryButton" Content="Bearbeiten" IsEnabled="False"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="2.5,5,2.5,10" Grid.Column="1" Grid.Row="2"
|
||||
Click="EditDeliveryButton_Click">
|
||||
@@ -549,7 +555,7 @@
|
||||
</ComboBox.ItemTemplateSelector>
|
||||
</ComboBox>
|
||||
|
||||
<CheckBox x:Name="AbgewertetInput" IsChecked="{Binding Abgewertet, Mode=TwoWay}"
|
||||
<CheckBox x:Name="DevaluedInput" IsChecked="{Binding IsDevalued, Mode=TwoWay}"
|
||||
Content="Abgewertet" IsEnabled="False"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,75,10,10" Grid.Column="0" Grid.ColumnSpan="2"/>
|
||||
</Grid>
|
||||
@@ -726,16 +732,30 @@
|
||||
</TextBlock>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="5"/>
|
||||
<StatusBarItem Grid.Column="6">
|
||||
<TextBlock ToolTip="{Binding StatusWeightToolTip}">
|
||||
Menge: <Run Text="{Binding StatusWeight}"/>
|
||||
</TextBlock>
|
||||
<StatusBarItem Grid.Column="6" HorizontalContentAlignment="Stretch">
|
||||
<Grid ToolTip="{Binding StatusWeightToolTip}" MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="0,0,2,0" TextTrimming="CharacterEllipsis">
|
||||
Menge: <Run Text="{Binding StatusWeight}"/>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" FontFamily="Segoe MDL2 Assets" Text="" FontSize="16" Margin="1,1,0,0" SnapsToDevicePixels="True"/>
|
||||
</Grid>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="7"/>
|
||||
<StatusBarItem Grid.Column="8">
|
||||
<TextBlock ToolTip="{Binding StatusGradationToolTip}">
|
||||
Gradation: <Run Text="{Binding StatusGradation}"/>
|
||||
</TextBlock>
|
||||
<StatusBarItem Grid.Column="8" HorizontalContentAlignment="Stretch">
|
||||
<Grid ToolTip="{Binding StatusGradationToolTip}" MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="0,0,2,0" TextTrimming="CharacterEllipsis">
|
||||
Gradation: <Run Text="{Binding StatusGradation}"/>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" FontFamily="Segoe MDL2 Assets" Text="" FontSize="16" Margin="1,1,0,0" SnapsToDevicePixels="True"/>
|
||||
</Grid>
|
||||
</StatusBarItem>
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
|
||||
@@ -65,6 +65,7 @@ namespace Elwig.Windows {
|
||||
WeighingButtons = [
|
||||
WeighingAButton, WeighingBButton, WeighingCButton, WeighingDButton,
|
||||
];
|
||||
ViewModel.Init();
|
||||
ViewModel.IsReceipt = receipt;
|
||||
|
||||
SecondsTimer = new DispatcherTimer();
|
||||
@@ -260,22 +261,22 @@ namespace Elwig.Windows {
|
||||
private async void Menu_Statistic_Locality_SaveFilters_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateLocalityStatistics(DeliveryService.ExportSubject.FromFilters);
|
||||
|
||||
private async void Menu_DeliveryDepreciationList_SaveFilters_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDepreciationList(DeliveryService.ExportSubject.FromFilters, ExportMode.SaveList);
|
||||
private async void Menu_DeliveryDepreciationList_ShowFilters_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDepreciationList(DeliveryService.ExportSubject.FromFilters, ExportMode.Show);
|
||||
private async void Menu_DeliveryDepreciationList_SavePdfFilters_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDepreciationList(DeliveryService.ExportSubject.FromFilters, ExportMode.SavePdf);
|
||||
private async void Menu_DeliveryDepreciationList_PrintFilters_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDepreciationList(DeliveryService.ExportSubject.FromFilters, ExportMode.Print);
|
||||
private async void Menu_DeliveryDepreciationList_SaveSeason_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDepreciationList(DeliveryService.ExportSubject.FromSeason, ExportMode.SaveList);
|
||||
private async void Menu_DeliveryDepreciationList_ShowSeason_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDepreciationList(DeliveryService.ExportSubject.FromSeason, ExportMode.Show);
|
||||
private async void Menu_DeliveryDepreciationList_SavePdfSeason_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDepreciationList(DeliveryService.ExportSubject.FromSeason, ExportMode.SavePdf);
|
||||
private async void Menu_DeliveryDepreciationList_PrintSeason_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDepreciationList(DeliveryService.ExportSubject.FromSeason, ExportMode.Print);
|
||||
private async void Menu_DeliveryDevaluationList_SaveFilters_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDevaluationList(DeliveryService.ExportSubject.FromFilters, ExportMode.SaveList);
|
||||
private async void Menu_DeliveryDevaluationList_ShowFilters_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDevaluationList(DeliveryService.ExportSubject.FromFilters, ExportMode.Show);
|
||||
private async void Menu_DeliveryDevaluationList_SavePdfFilters_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDevaluationList(DeliveryService.ExportSubject.FromFilters, ExportMode.SavePdf);
|
||||
private async void Menu_DeliveryDevaluationList_PrintFilters_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDevaluationList(DeliveryService.ExportSubject.FromFilters, ExportMode.Print);
|
||||
private async void Menu_DeliveryDevaluationList_SaveSeason_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDevaluationList(DeliveryService.ExportSubject.FromSeason, ExportMode.SaveList);
|
||||
private async void Menu_DeliveryDevaluationList_ShowSeason_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDevaluationList(DeliveryService.ExportSubject.FromSeason, ExportMode.Show);
|
||||
private async void Menu_DeliveryDevaluationList_SavePdfSeason_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDevaluationList(DeliveryService.ExportSubject.FromSeason, ExportMode.SavePdf);
|
||||
private async void Menu_DeliveryDevaluationList_PrintSeason_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDevaluationList(DeliveryService.ExportSubject.FromSeason, ExportMode.Print);
|
||||
|
||||
private async void Menu_DeliveryDataList_SaveFilters_Click(object sender, RoutedEventArgs evt) =>
|
||||
await ViewModel.GenerateDeliveryDataList(DeliveryService.ExportSubject.FromFilters, ExportMode.SaveList);
|
||||
@@ -471,11 +472,15 @@ namespace Elwig.Windows {
|
||||
var (wText, wData, gText, gData) = stat;
|
||||
ViewModel.StatusWeight = wText;
|
||||
ViewModel.StatusGradation = gText;
|
||||
(ViewModel.StatusWeightToolTip, ViewModel.StatusGradationToolTip) = DeliveryService.GenerateToolTip(wData, gData);
|
||||
var (w, g) = DeliveryService.GenerateToolTip(wData, gData);
|
||||
ViewModel.StatusWeightToolTip?.Content = w;
|
||||
ViewModel.StatusGradationToolTip?.Content = g;
|
||||
} else {
|
||||
ViewModel.StatusVarieties = "-";
|
||||
ViewModel.StatusWeight = "-";
|
||||
ViewModel.StatusGradation = "-";
|
||||
ViewModel.StatusWeightToolTip?.Content = null;
|
||||
ViewModel.StatusGradationToolTip?.Content = null;
|
||||
}
|
||||
|
||||
if (updateSort && DeliveryList.SelectedItem != null)
|
||||
@@ -757,10 +762,10 @@ namespace Elwig.Windows {
|
||||
private void DeliveryPartList_SelectionChanged(object? sender, SelectionChangedEventArgs? evt) {
|
||||
RefreshInputs();
|
||||
if (DeliveryPartList.SelectedItem is DeliveryPart p) {
|
||||
DepreciateButton.IsEnabled = true;
|
||||
DevalueButton.IsEnabled = true;
|
||||
EditDeliveryButton.IsEnabled = true;
|
||||
} else {
|
||||
DepreciateButton.IsEnabled = false;
|
||||
DevalueButton.IsEnabled = false;
|
||||
EditDeliveryButton.IsEnabled = false;
|
||||
}
|
||||
}
|
||||
@@ -954,7 +959,7 @@ namespace Elwig.Windows {
|
||||
LockSearchInputs();
|
||||
}
|
||||
|
||||
private async void DepreciateButton_Click(object sender, RoutedEventArgs evt) {
|
||||
private async void DevalueButton_Click(object sender, RoutedEventArgs evt) {
|
||||
if (DeliveryList.SelectedItem is not Delivery d) return;
|
||||
var res = Utils.ShowDeliverySplittingDialog(d);
|
||||
if (res == null)
|
||||
@@ -966,7 +971,7 @@ namespace Elwig.Windows {
|
||||
var weights = res.Value.Item2;
|
||||
if (id == null) {
|
||||
// abwerten
|
||||
await DeliveryService.DepreciateDelivery(d.Year, d.DId, weights);
|
||||
await DeliveryService.DevalueDelivery(d.Year, d.DId, weights);
|
||||
} else if (id.All(char.IsAsciiDigit)) {
|
||||
// auf Mitglied übertragen
|
||||
var n = await DeliveryService.SplitDeliveryToMember(d.Year, d.DId, weights, int.Parse(id));
|
||||
@@ -1015,7 +1020,7 @@ namespace Elwig.Windows {
|
||||
UnlockInputs();
|
||||
LockSearchInputs();
|
||||
|
||||
DepreciateButton.IsEnabled = false;
|
||||
DevalueButton.IsEnabled = false;
|
||||
}
|
||||
|
||||
protected override void ShortcutDelete() {
|
||||
@@ -1086,7 +1091,7 @@ namespace Elwig.Windows {
|
||||
await EnsureContextRenewed();
|
||||
|
||||
Mouse.OverrideCursor = null;
|
||||
DepreciateButton.IsEnabled = true;
|
||||
DevalueButton.IsEnabled = true;
|
||||
}
|
||||
|
||||
protected override void ShortcutReset() {
|
||||
@@ -1119,7 +1124,7 @@ namespace Elwig.Windows {
|
||||
LockInputs();
|
||||
UnlockSearchInputs();
|
||||
|
||||
DepreciateButton.IsEnabled = DeliveryPartList.SelectedItem != null;
|
||||
DevalueButton.IsEnabled = DeliveryPartList.SelectedItem != null;
|
||||
}
|
||||
|
||||
private void ShowSaveResetCancelButtons() {
|
||||
@@ -1142,22 +1147,22 @@ namespace Elwig.Windows {
|
||||
|
||||
private void ShowNewEditDeleteButtons() {
|
||||
NewDeliveryButton.IsEnabled = ViewModel.IsReceipt;
|
||||
DepreciateButton.IsEnabled = DeliveryList.SelectedItem != null;
|
||||
DevalueButton.IsEnabled = DeliveryList.SelectedItem != null;
|
||||
EditDeliveryButton.IsEnabled = DeliveryPartList.SelectedItem != null;
|
||||
DeleteDeliveryButton.IsEnabled = DeliveryList.SelectedItem != null;
|
||||
NewDeliveryButton.Visibility = ViewModel.IsReceipt ? Visibility.Visible : Visibility.Hidden;
|
||||
DepreciateButton.Visibility = !ViewModel.IsReceipt ? Visibility.Visible : Visibility.Hidden;
|
||||
DevalueButton.Visibility = !ViewModel.IsReceipt ? Visibility.Visible : Visibility.Hidden;
|
||||
EditDeliveryButton.Visibility = Visibility.Visible;
|
||||
DeleteDeliveryButton.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private void HideNewEditDeleteButtons() {
|
||||
NewDeliveryButton.IsEnabled = false;
|
||||
DepreciateButton.IsEnabled = false;
|
||||
DevalueButton.IsEnabled = false;
|
||||
EditDeliveryButton.IsEnabled = false;
|
||||
DeleteDeliveryButton.IsEnabled = false;
|
||||
NewDeliveryButton.Visibility = Visibility.Hidden;
|
||||
DepreciateButton.Visibility = Visibility.Hidden;
|
||||
DevalueButton.Visibility = Visibility.Hidden;
|
||||
EditDeliveryButton.Visibility = Visibility.Hidden;
|
||||
DeleteDeliveryButton.Visibility = Visibility.Hidden;
|
||||
}
|
||||
@@ -1207,7 +1212,7 @@ namespace Elwig.Windows {
|
||||
if (WineKgInput.SelectedItem == null)
|
||||
WineRdInput.IsEnabled = false;
|
||||
WeightInput.IsReadOnly = true;
|
||||
AbgewertetInput.IsEnabled = false;
|
||||
DevaluedInput.IsEnabled = false;
|
||||
ManualWeighingInput.IsEnabled = false;
|
||||
LsNrInput.IsReadOnly = true;
|
||||
DateInput.IsReadOnly = !Menu_Settings_EnableFreeEditing.IsChecked;
|
||||
@@ -1490,7 +1495,7 @@ namespace Elwig.Windows {
|
||||
|
||||
private void WineQualityLevelInput_SelectionChanged(object sender, SelectionChangedEventArgs evt) {
|
||||
UpdateWineOrigin();
|
||||
UpdateAbgewertet();
|
||||
UpdateDevalued();
|
||||
}
|
||||
|
||||
private void UpdateRdInput() {
|
||||
@@ -1512,10 +1517,10 @@ namespace Elwig.Windows {
|
||||
UpdateRdInput();
|
||||
}
|
||||
|
||||
private void UpdateAbgewertet() {
|
||||
private void UpdateDevalued() {
|
||||
if (!GetInputValid(GradationKmwInput))
|
||||
return;
|
||||
AbgewertetInput.IsChecked = WineQualityLevelInput.SelectedItem is WineQualLevel { QualId: "WEI" };
|
||||
DevaluedInput.IsChecked = WineQualityLevelInput.SelectedItem is WineQualLevel { QualId: "WEI" };
|
||||
}
|
||||
|
||||
private void WeightInput_TextChanged(object sender, TextChangedEventArgs evt) {
|
||||
|
||||
@@ -109,26 +109,32 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox x:Name="SearchInput" Text="{Binding SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding EnableSearchInputs}"
|
||||
Grid.ColumnSpan="3" Margin="5,10,174,0" IsReadOnly="False"
|
||||
Grid.ColumnSpan="3" Margin="5,10,174,0" Padding="2,2,20,2" IsReadOnly="False"
|
||||
TextChanged="SearchInput_TextChanged">
|
||||
<TextBox.ToolTip>
|
||||
<TextBlock>
|
||||
<Bold>Strg+F</Bold><LineBreak/><LineBreak/>
|
||||
Anmeldungen filtern und durchsuchen. Die Filter sind beliebig kombinierbar.<LineBreak/>
|
||||
Groß- und Kleinschreibung ist in den meisten Fällen egal.<LineBreak/>
|
||||
<LineBreak/>
|
||||
Filtern nach:<LineBreak/>
|
||||
<Bold>Sorte</Bold>: z.B. GV, ZW, rr, sa, !gv (ausgenommen GV), ...<LineBreak/>
|
||||
<Bold>Rot/Weiß</Bold>: z.B. r, Rot, w, weiß, ...<LineBreak/>
|
||||
<Bold>Mitglied</Bold>: z.B. 1234, 987, ...<LineBreak/>
|
||||
<Bold>Zweigstelle</Bold>: z.B. musterort, ...<LineBreak/>
|
||||
<Bold>Attribut</Bold>: z.B. kabinett, !kabinett (alle außer kabinett), ...<LineBreak/>
|
||||
<Bold>Bewirtschaftung</Bold>: z.B. bio, !kip (alle außer KIP), ...<LineBreak/>
|
||||
<Bold>Menge</Bold>: z.B. <500kg, >6000kg, ...<LineBreak/>
|
||||
<Bold>Datum</Bold>: z.B. 1.9., 15.9.-10.10., -15.10.2020, ...
|
||||
</TextBlock>
|
||||
<ToolTip>
|
||||
<TextBlock>
|
||||
<Bold>Strg+F</Bold><LineBreak/><LineBreak/>
|
||||
Anmeldungen filtern und durchsuchen. Die Filter sind beliebig kombinierbar.<LineBreak/>
|
||||
Groß- und Kleinschreibung ist in den meisten Fällen egal.<LineBreak/>
|
||||
<LineBreak/>
|
||||
Filtern nach:<LineBreak/>
|
||||
<Bold>Sorte</Bold>: z.B. GV, ZW, rr, sa, !gv (ausgenommen GV), ...<LineBreak/>
|
||||
<Bold>Rot/Weiß</Bold>: z.B. r, Rot, w, weiß, ...<LineBreak/>
|
||||
<Bold>Mitglied</Bold>: z.B. 1234, 987, ...<LineBreak/>
|
||||
<Bold>Zweigstelle</Bold>: z.B. musterort, ...<LineBreak/>
|
||||
<Bold>Attribut</Bold>: z.B. kabinett, !kabinett (alle außer kabinett), ...<LineBreak/>
|
||||
<Bold>Bewirtschaftung</Bold>: z.B. bio, !kip (alle außer KIP), ...<LineBreak/>
|
||||
<Bold>Menge</Bold>: z.B. <500kg, >6000kg, ...<LineBreak/>
|
||||
<Bold>Datum</Bold>: z.B. 1.9., 15.9.-10.10., -15.10.2020, ...
|
||||
</TextBlock>
|
||||
</ToolTip>
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
<TextBlock Grid.ColumnSpan="3" FontFamily="Segoe MDL2 Assets" Text="" SnapsToDevicePixels="True"
|
||||
FontSize="16" Width="16" Height="16" Margin="1,4,178,0" HorizontalAlignment="Right"
|
||||
MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave"/>
|
||||
|
||||
<ctrl:IntegerUpDown x:Name="SeasonInput" Text="{Binding FilterSeasonString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding EnableSearchInputs}"
|
||||
Grid.ColumnSpan="3" Height="25" Width="56" FontSize="14" Minimum="1900" Maximum="9999"
|
||||
Margin="5,10,113,0" VerticalAlignment="Top" HorizontalAlignment="Right"
|
||||
@@ -362,10 +368,17 @@
|
||||
</TextBlock>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="1"/>
|
||||
<StatusBarItem Grid.Column="2">
|
||||
<TextBlock ToolTip="{Binding StatusWeightToolTip}">
|
||||
Menge: <Run Text="{Binding StatusWeight}"/>
|
||||
</TextBlock>
|
||||
<StatusBarItem Grid.Column="2" HorizontalContentAlignment="Stretch">
|
||||
<Grid ToolTip="{Binding StatusWeightToolTip}" MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="0,0,2,0" TextTrimming="CharacterEllipsis">
|
||||
Menge: <Run Text="{Binding StatusWeight}"/>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" FontFamily="Segoe MDL2 Assets" Text="" FontSize="16" Margin="1,1,0,0" SnapsToDevicePixels="True"/>
|
||||
</Grid>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="3"/>
|
||||
<StatusBarItem Grid.Column="4">
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace Elwig.Windows {
|
||||
RequiredInputs = [
|
||||
MgNrInput, MemberInput, DeliveryScheduleInput, SortIdInput, WineVarietyInput, WeightInput,
|
||||
];
|
||||
ViewModel.Init();
|
||||
|
||||
DoShowWarningWindows = false;
|
||||
|
||||
@@ -145,10 +146,10 @@ namespace Elwig.Windows {
|
||||
if (filter.Count == 0) {
|
||||
var (text, data) = stat;
|
||||
ViewModel.StatusWeight = text;
|
||||
ViewModel.StatusWeightToolTip = DeliveryAncmtService.GenerateToolTip(data);
|
||||
ViewModel.StatusWeightToolTip?.Content = DeliveryAncmtService.GenerateToolTip(data);
|
||||
} else {
|
||||
ViewModel.StatusWeight = $"{deliveryAncmts.Sum(a => a.Weight):N0} kg";
|
||||
ViewModel.StatusWeightToolTip = null;
|
||||
ViewModel.StatusWeightToolTip?.Content = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,23 +80,29 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox x:Name="SearchInput" Text="{Binding SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding EnableSearchInputs}"
|
||||
Grid.ColumnSpan="3" Margin="5,5,174,0" IsReadOnly="False"
|
||||
Grid.ColumnSpan="3" Margin="5,5,174,0" Padding="2,2,20,2" IsReadOnly="False"
|
||||
TextChanged="SearchInput_TextChanged">
|
||||
<TextBox.ToolTip>
|
||||
<TextBlock>
|
||||
<Bold>Strg+F</Bold><LineBreak/><LineBreak/>
|
||||
Lesepläne filtern und durchsuchen. Die Filter sind beliebig kombinierbar.<LineBreak/>
|
||||
Groß- und Kleinschreibung ist in den meisten Fällen egal.<LineBreak/>
|
||||
<LineBreak/>
|
||||
Filtern nach:<LineBreak/>
|
||||
<Bold>Sorte</Bold>: z.B. GV, ZW, rr, sa, !gv (ausgenommen GV), ...<LineBreak/>
|
||||
<Bold>Rot/Weiß</Bold>: z.B. r, Rot, w, weiß, ...<LineBreak/>
|
||||
<Bold>Zweigstelle</Bold>: z.B. musterort, ...<LineBreak/>
|
||||
<Bold>Datum</Bold>: z.B. 1.9., 15.9.-10.10., -15.10.2020, ...<LineBreak/>
|
||||
<Bold>Beschreibung</Bold>: z.B. Bio, ...
|
||||
</TextBlock>
|
||||
<ToolTip>
|
||||
<TextBlock>
|
||||
<Bold>Strg+F</Bold><LineBreak/><LineBreak/>
|
||||
Lesepläne filtern und durchsuchen. Die Filter sind beliebig kombinierbar.<LineBreak/>
|
||||
Groß- und Kleinschreibung ist in den meisten Fällen egal.<LineBreak/>
|
||||
<LineBreak/>
|
||||
Filtern nach:<LineBreak/>
|
||||
<Bold>Sorte</Bold>: z.B. GV, ZW, rr, sa, !gv (ausgenommen GV), ...<LineBreak/>
|
||||
<Bold>Rot/Weiß</Bold>: z.B. r, Rot, w, weiß, ...<LineBreak/>
|
||||
<Bold>Zweigstelle</Bold>: z.B. musterort, ...<LineBreak/>
|
||||
<Bold>Datum</Bold>: z.B. 1.9., 15.9.-10.10., -15.10.2020, ...<LineBreak/>
|
||||
<Bold>Beschreibung</Bold>: z.B. Bio, ...
|
||||
</TextBlock>
|
||||
</ToolTip>
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
<TextBlock Grid.ColumnSpan="3" FontFamily="Segoe MDL2 Assets" Text="" SnapsToDevicePixels="True"
|
||||
FontSize="16" Width="16" Height="16" Margin="1,1,178,0" HorizontalAlignment="Right"
|
||||
MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave"/>
|
||||
|
||||
<ctrl:IntegerUpDown x:Name="SeasonInput" Text="{Binding FilterSeasonString, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding EnableSearchInputs}"
|
||||
Grid.ColumnSpan="3" Height="25" Width="56" FontSize="14" Minimum="1900" Maximum="9999"
|
||||
Margin="5,5,113,0" VerticalAlignment="Top" HorizontalAlignment="Right"
|
||||
|
||||
@@ -190,34 +190,40 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox x:Name="SearchInput" Text="{Binding SearchQuery, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding EnableSearchInputs}"
|
||||
Grid.ColumnSpan="3" Margin="5,5,140,0"
|
||||
Grid.ColumnSpan="3" Margin="5,5,140,0" Padding="2,2,20,2"
|
||||
TextChanged="SearchInput_TextChanged">
|
||||
<TextBox.ToolTip>
|
||||
<TextBlock>
|
||||
<Bold>Strg+F</Bold><LineBreak/><LineBreak/>
|
||||
Mitglieder filtern und durchsuchen. Die Filter sind beliebig kombinierbar.<LineBreak/>
|
||||
Groß- und Kleinschreibung ist in den meisten Fällen egal.<LineBreak/>
|
||||
<LineBreak/>
|
||||
Filtern nach:<LineBreak/>
|
||||
<Bold>MgNr.</Bold>: z.B. 1234, 89, ...<LineBreak/>
|
||||
<Bold>Vor-/Nachname</Bold>: z.B. Max Mustermann... <LineBreak/>
|
||||
<Bold>Stamm-Zweigstelle</Bold>: z.B. zwst:Matzen, zwst:wolkersdorf, ...<LineBreak/>
|
||||
<Bold>Stammgemeinde</Bold>: z.B. matzen, Wolkersdorf, ...<LineBreak/>
|
||||
<Bold>UID</Bold>: z.B. ATU12345678, ...<LineBreak/>
|
||||
<Bold>Betriebs-Nr.</Bold>: z.B. 0123456, ...<LineBreak/>
|
||||
<Bold>Aktiv</Bold>: aktiv, !Aktiv (nicht-aktiv)<LineBreak/>
|
||||
<Bold>Bio-Betrieb</Bold>: BIO, !bio (ausgenommen Bio)<LineBreak/>
|
||||
<Bold>Buchführend</Bold>: buchf[ührend], Pauschal[iert], !buchf[ührend]<LineBreak/>
|
||||
<Bold>Vollablieferer</Bold>: voll[ablieferer], voll[lieferant], !Voll[lieferant] (nicht-Vollablieferer)<LineBreak/>
|
||||
<Bold>Funktionär</Bold>: Funkt[ionär], !funkt[ionär] (nicht-Funktionär)<LineBreak/>
|
||||
<Bold>Telefon-Nr.</Bold>: z.B. +436641234, ....<LineBreak/>
|
||||
<Bold>Kontaktdaten</Bold>: email (mind. 1 E-Mail-Adr.), telnr (mind. 1 Tel.-Nr.), !email (keine E-Mail-Adr.), !telnr (keine Tel.-Nr.)<LineBreak/>
|
||||
<Bold>Kontaktart</Bold>: kontakt:email, kontakt:post, !kontakt:email, !kontakt:post<LineBreak/>
|
||||
<Bold>Flächenbindungen</Bold>: z.B. zw, GVK, WRB, Fläch[enbindung], !GVK, ... (Mitglieder mit aktiven Flächenbindungen)<LineBreak/>
|
||||
<Bold>Freitext</Bold>: z.B. Rechnungsaddresse, Anmerkung, "matzen" (sucht nach dem Text "matzen")
|
||||
</TextBlock>
|
||||
<ToolTip>
|
||||
<TextBlock>
|
||||
<Bold>Strg+F</Bold><LineBreak/><LineBreak/>
|
||||
Mitglieder filtern und durchsuchen. Die Filter sind beliebig kombinierbar.<LineBreak/>
|
||||
Groß- und Kleinschreibung ist in den meisten Fällen egal.<LineBreak/>
|
||||
<LineBreak/>
|
||||
Filtern nach:<LineBreak/>
|
||||
<Bold>MgNr.</Bold>: z.B. 1234, 89, ...<LineBreak/>
|
||||
<Bold>Vor-/Nachname</Bold>: z.B. Max Mustermann... <LineBreak/>
|
||||
<Bold>Stamm-Zweigstelle</Bold>: z.B. zwst:Matzen, zwst:wolkersdorf, ...<LineBreak/>
|
||||
<Bold>Stammgemeinde</Bold>: z.B. matzen, Wolkersdorf, ...<LineBreak/>
|
||||
<Bold>UID</Bold>: z.B. ATU12345678, ...<LineBreak/>
|
||||
<Bold>Betriebs-Nr.</Bold>: z.B. 0123456, ...<LineBreak/>
|
||||
<Bold>Aktiv</Bold>: aktiv, !Aktiv (nicht-aktiv)<LineBreak/>
|
||||
<Bold>Bio-Betrieb</Bold>: BIO, !bio (ausgenommen Bio)<LineBreak/>
|
||||
<Bold>Buchführend</Bold>: buchf[ührend], Pauschal[iert], !buchf[ührend]<LineBreak/>
|
||||
<Bold>Vollablieferer</Bold>: voll[ablieferer], voll[lieferant], !Voll[lieferant] (nicht-Vollablieferer)<LineBreak/>
|
||||
<Bold>Funktionär</Bold>: Funkt[ionär], !funkt[ionär] (nicht-Funktionär)<LineBreak/>
|
||||
<Bold>Telefon-Nr.</Bold>: z.B. +436641234, ....<LineBreak/>
|
||||
<Bold>Kontaktdaten</Bold>: email (mind. 1 E-Mail-Adr.), telnr (mind. 1 Tel.-Nr.), !email (keine E-Mail-Adr.), !telnr (keine Tel.-Nr.)<LineBreak/>
|
||||
<Bold>Kontaktart</Bold>: kontakt:email, kontakt:post, !kontakt:email, !kontakt:post<LineBreak/>
|
||||
<Bold>Flächenbindungen</Bold>: z.B. zw, GVK, WRB, Fläch[enbindung], !GVK, ... (Mitglieder mit aktiven Flächenbindungen)<LineBreak/>
|
||||
<Bold>Freitext</Bold>: z.B. Rechnungsaddresse, Anmerkung, "matzen" (sucht nach dem Text "matzen")
|
||||
</TextBlock>
|
||||
</ToolTip>
|
||||
</TextBox.ToolTip>
|
||||
</TextBox>
|
||||
<TextBlock Grid.ColumnSpan="3" FontFamily="Segoe MDL2 Assets" Text="" SnapsToDevicePixels="True"
|
||||
FontSize="16" Width="16" Height="16" Margin="1,1,144,0" HorizontalAlignment="Right"
|
||||
MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave"/>
|
||||
|
||||
<CheckBox x:Name="ActiveMemberInput" Content="Nur aktive anzeigen"
|
||||
IsChecked="{Binding ShowOnlyActiveMembers, Mode=TwoWay}" IsEnabled="{Binding EnableSearchInputs}"
|
||||
Checked="ActiveMemberInput_Changed" Unchecked="ActiveMemberInput_Changed"
|
||||
@@ -784,30 +790,69 @@
|
||||
</Grid>
|
||||
</ItemsPanelTemplate>
|
||||
</StatusBar.ItemsPanel>
|
||||
<StatusBarItem>
|
||||
<TextBlock ToolTip="{Binding StatusMembersToolTip}">
|
||||
Mitglieder: <Run Text="{Binding StatusMembers}"/>
|
||||
</TextBlock>
|
||||
<StatusBarItem HorizontalContentAlignment="Stretch">
|
||||
<Grid ToolTip="{Binding StatusMembersToolTip}" MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="0,0,2,0" TextTrimming="CharacterEllipsis">
|
||||
Mitglieder: <Run Text="{Binding StatusMembers}"/>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" FontFamily="Segoe MDL2 Assets" Text="" FontSize="16" Margin="1,1,0,0" SnapsToDevicePixels="True"/>
|
||||
</Grid>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="1"/>
|
||||
<StatusBarItem Grid.Column="2" Content="{Binding StatusBusinessShares}"/>
|
||||
<StatusBarItem Grid.Column="2" HorizontalContentAlignment="Stretch">
|
||||
<Grid ToolTip="{Binding StatusBusinessSharesToolTip}" MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock x:Name="StatusBusinessShares" Margin="0,0,2,0" TextTrimming="CharacterEllipsis">
|
||||
Geschäftsanteile: -
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" FontFamily="Segoe MDL2 Assets" Text="" FontSize="16" Margin="1,1,0,0" SnapsToDevicePixels="True"/>
|
||||
</Grid>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="3"/>
|
||||
<StatusBarItem Grid.Column="4">
|
||||
<TextBlock ToolTip="{Binding StatusAreaCommitmentToolTip}">
|
||||
Gebundene Fläche (<Run Text="{Binding StatusAreaCommitmentInfo}"/>): <Run Text="{Binding StatusAreaCommitment}"/>
|
||||
</TextBlock>
|
||||
<StatusBarItem Grid.Column="4" HorizontalContentAlignment="Stretch">
|
||||
<Grid ToolTip="{Binding StatusAreaCommitmentToolTip}" MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="0,0,2,0" TextTrimming="CharacterEllipsis">
|
||||
Gebundene Fläche (<Run Text="{Binding StatusAreaCommitmentInfo}"/>): <Run Text="{Binding StatusAreaCommitment}"/>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" FontFamily="Segoe MDL2 Assets" Text="" FontSize="16" Margin="1,1,0,0" SnapsToDevicePixels="True"/>
|
||||
</Grid>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="5"/>
|
||||
<StatusBarItem Grid.Column="6">
|
||||
<TextBlock ToolTip="{Binding StatusDeliveriesThisSeasonToolTip}">
|
||||
Lieferungen (<Run Text="{Binding StatusDeliveriesThisSeasonInfo}"/>): <Run Text="{Binding StatusDeliveriesThisSeason}"/>
|
||||
</TextBlock>
|
||||
<StatusBarItem Grid.Column="6" HorizontalContentAlignment="Stretch">
|
||||
<Grid ToolTip="{Binding StatusDeliveriesThisSeasonToolTip}" MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="0,0,2,0" TextTrimming="CharacterEllipsis">
|
||||
Lieferungen (<Run Text="{Binding StatusDeliveriesThisSeasonInfo}"/>): <Run Text="{Binding StatusDeliveriesThisSeason}"/>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" FontFamily="Segoe MDL2 Assets" Text="" FontSize="16" Margin="1,1,0,0" SnapsToDevicePixels="True"/>
|
||||
</Grid>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="7"/>
|
||||
<StatusBarItem Grid.Column="8">
|
||||
<TextBlock ToolTip="{Binding StatusDeliveriesLastSeasonToolTip}">
|
||||
Lieferungen (<Run Text="{Binding StatusDeliveriesLastSeasonInfo}"/>): <Run Text="{Binding StatusDeliveriesLastSeason}"/>
|
||||
</TextBlock>
|
||||
<StatusBarItem Grid.Column="8" HorizontalContentAlignment="Stretch">
|
||||
<Grid ToolTip="{Binding StatusDeliveriesLastSeasonToolTip}" MouseEnter="ToolTipInfo_MouseEnter" MouseLeave="ToolTipInfo_MouseLeave">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="16"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="0,0,2,0" TextTrimming="CharacterEllipsis">
|
||||
Lieferungen (<Run Text="{Binding StatusDeliveriesLastSeasonInfo}"/>): <Run Text="{Binding StatusDeliveriesLastSeason}"/>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" FontFamily="Segoe MDL2 Assets" Text="" FontSize="16" Margin="1,1,0,0" SnapsToDevicePixels="True"/>
|
||||
</Grid>
|
||||
</StatusBarItem>
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace Elwig.Windows {
|
||||
ControlUtils.InitializeDelayTimer(SearchInput, SearchInput_TextChanged);
|
||||
SearchInput.TextChanged -= SearchInput_TextChanged;
|
||||
|
||||
ViewModel.Init();
|
||||
ViewModel.MemberListOrderByMgNr = false;
|
||||
ViewModel.MemberListOrderByName = false;
|
||||
ViewModel.MemberListOrderByOrt = false;
|
||||
@@ -222,12 +223,8 @@ namespace Elwig.Windows {
|
||||
.. b.Select(i => new Run($"{i.Count:N0}") { Foreground = i.Color ?? Brushes.Black }).Join(() => new("+")),
|
||||
new(")")
|
||||
];
|
||||
if (ViewModel.StatusBusinessShares == null) {
|
||||
ViewModel.StatusBusinessShares = new();
|
||||
} else {
|
||||
ViewModel.StatusBusinessShares.Inlines.Clear();
|
||||
}
|
||||
ViewModel.StatusBusinessShares.Inlines.AddRange(inlines);
|
||||
StatusBusinessShares.Inlines.Clear();
|
||||
StatusBusinessShares.Inlines.AddRange(inlines);
|
||||
}
|
||||
|
||||
private void RefreshInputs(bool validate = false) {
|
||||
@@ -368,7 +365,7 @@ namespace Elwig.Windows {
|
||||
var mM = Math.Max(mA.Length, Math.Max(mI.Length, mT.Length));
|
||||
var mS = mM > 3;
|
||||
if (mS) mM--;
|
||||
ViewModel.StatusMembersToolTip =
|
||||
ViewModel.StatusMembersToolTip?.Content =
|
||||
$"{new string(s1, Math.Max(0, mM - mA.Length))}{(mS && mA.Length < 4 ? s2 : "")}{mA} aktive Mitglieder\n" +
|
||||
$"{new string(s1, Math.Max(0, mM - mI.Length))}{(mS && mI.Length < 4 ? s2 : "")}{mI} nicht aktive Mitglieder\n" +
|
||||
$"{new string(s1, Math.Max(0, mM - mT.Length))}{(mS && mT.Length < 4 ? s2 : "")}{mT} Mitglieder gesamt";
|
||||
@@ -419,7 +416,7 @@ namespace Elwig.Windows {
|
||||
grid.AddToolTipCell($"{stat.Sum(g => g.Value.SharesDormant):N0}", 3, 2, alignRight: true, bold: true);
|
||||
grid.AddToolTipCell($"{stat.Sum(g => g.Value.SharesTotal):N0}", 3, 3, alignRight: true, bold: true);
|
||||
}
|
||||
ViewModel.StatusBusinessShares?.ToolTip = grid;
|
||||
ViewModel.StatusBusinessSharesToolTip?.Content = grid;
|
||||
}
|
||||
|
||||
private void SetPhoneNrInputVisible(int nr, bool visible, int? position = null) {
|
||||
|
||||
@@ -13,7 +13,7 @@ About
|
||||
**Product:** Elwig
|
||||
**Description:** Electronic Management for Vintners' Cooperatives
|
||||
**Type:** ERP system
|
||||
**Version:** 1.2.1.0 ([Changelog](./CHANGELOG.md))
|
||||
**Version:** 1.2.2.0 ([Changelog](./CHANGELOG.md))
|
||||
**License:** [GNU General Public License 3.0 (GPLv3)](./LICENSE)
|
||||
**Website:** https://elwig.at/
|
||||
**Source code:** https://git.necronda.net/winzer/elwig
|
||||
@@ -33,7 +33,7 @@ Packaging: [WiX Toolset](https://www.firegiant.com/wixtoolset/)
|
||||
**Produkt:** Elwig
|
||||
**Beschreibung:** Elektronische Winzergenossenschaftsverwaltung
|
||||
**Typ:** Warenwirtschaftssystem (ERP-System)
|
||||
**Version:** 1.2.1.0 ([Änderungsprotokoll](./CHANGELOG.md))
|
||||
**Version:** 1.2.2.0 ([Änderungsprotokoll](./CHANGELOG.md))
|
||||
**Lizenz:** [GNU General Public License 3.0 (GPLv3)](./LICENSE)
|
||||
**Website:** https://elwig.at/
|
||||
**Quellcode:** https://git.necronda.net/winzer/elwig
|
||||
|
||||
@@ -4,13 +4,13 @@ using Elwig.Models.Dtos;
|
||||
|
||||
namespace Tests.UnitTests.DocumentTests {
|
||||
[TestFixture]
|
||||
public class DeliveryDepreciationListTest {
|
||||
public class DeliveryDevaluationListTest {
|
||||
|
||||
[Test]
|
||||
public async Task Test_01_DepreciatedDeliveries2020() {
|
||||
public async Task Test_01_DevaluedDeliveries2020() {
|
||||
using var ctx = new AppDbContext();
|
||||
var data = await DeliveryJournalData.FromQuery(ctx.Deliveries.Where(d => d.Year == 2020).SelectMany(d => d.Parts).Where(d => d.QualId == "WEI"), ["Saison 2020"]);
|
||||
using var doc = new DeliveryDepreciationList("Saison 2020", data);
|
||||
using var doc = new DeliveryDevaluationList("Saison 2020", data);
|
||||
var text = await Utils.GeneratePdfText(doc, true);
|
||||
var table = Utils.ExtractTable(text);
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
|
||||
@@ -202,9 +202,9 @@ namespace Tests.UnitTests.ExportTests {
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
Assert.That(title, Is.EqualTo("Fehler beim Importieren"));
|
||||
Assert.That(text, Contains.Substring($"""
|
||||
Die Elwig-Export-Datei '{Path.GetFileName(filename)}' konnte nicht verarbeitet werden und wird übersprungen:
|
||||
Die Elwig-Export-Datei '{Path.GetFileName(filename)}' konnte nicht verarbeitet werden. Soll sie in Zukunft übersprungen werden?
|
||||
|
||||
No matching password found
|
||||
Kein passendes Passwort gefunden
|
||||
""".Replace("\r\n", "\n")));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -721,7 +721,7 @@ namespace Tests.UnitTests.HelperTests {
|
||||
[73] = 0.2m,
|
||||
}, null), GetSelection(["ZW/-"]))
|
||||
];
|
||||
entries[0].Abgewertet = true;
|
||||
entries[0].IsDevalued = true;
|
||||
var data = BillingData.FromGraphEntries(entries);
|
||||
Assert.That(data.ToJsonString(JsonOpts), Is.EqualTo("""
|
||||
{
|
||||
|
||||
@@ -408,7 +408,7 @@ namespace Tests.UnitTests.ServiceTests {
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TestSplit_01_Depreciate_One() {
|
||||
public async Task TestSplit_01_Devalue_One() {
|
||||
var d = await GetDelivery("20231001X001");
|
||||
Assert.That(d, Is.Not.Null);
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
@@ -420,7 +420,7 @@ namespace Tests.UnitTests.ServiceTests {
|
||||
Assert.That(ps[2].QualId, Is.Not.EqualTo("WEI"));
|
||||
}
|
||||
|
||||
await Assert.DoesNotThrowAsync(async () => await DeliveryService.DepreciateDelivery(d.Year, d.DId, [1000, 0, 0]));
|
||||
await Assert.DoesNotThrowAsync(async () => await DeliveryService.DevalueDelivery(d.Year, d.DId, [1000, 0, 0]));
|
||||
d = await GetDelivery("20231001X001");
|
||||
Assert.That(d, Is.Not.Null);
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
@@ -434,7 +434,7 @@ namespace Tests.UnitTests.ServiceTests {
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TestSplit_02_Depreciate_Partial() {
|
||||
public async Task TestSplit_02_Devalue_Partial() {
|
||||
var d = await GetDelivery("20231001X002");
|
||||
Assert.That(d, Is.Not.Null);
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
@@ -446,7 +446,7 @@ namespace Tests.UnitTests.ServiceTests {
|
||||
Assert.That(ps[2].QualId, Is.Not.EqualTo("WEI"));
|
||||
}
|
||||
|
||||
await Assert.DoesNotThrowAsync(async () => await DeliveryService.DepreciateDelivery(d.Year, d.DId, [600, 0, 0]));
|
||||
await Assert.DoesNotThrowAsync(async () => await DeliveryService.DevalueDelivery(d.Year, d.DId, [600, 0, 0]));
|
||||
d = await GetDelivery("20231001X002");
|
||||
Assert.That(d, Is.Not.Null);
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
@@ -462,7 +462,7 @@ namespace Tests.UnitTests.ServiceTests {
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TestSplit_03_Depreciate_Mixed() {
|
||||
public async Task TestSplit_03_Devalue_Mixed() {
|
||||
var d = await GetDelivery("20231001X003");
|
||||
Assert.That(d, Is.Not.Null);
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
@@ -475,7 +475,7 @@ namespace Tests.UnitTests.ServiceTests {
|
||||
Assert.That(ps[2].QualId, Is.Not.EqualTo("WEI"));
|
||||
}
|
||||
|
||||
await Assert.DoesNotThrowAsync(async () => await DeliveryService.DepreciateDelivery(d.Year, d.DId, [1000, 700, -5]));
|
||||
await Assert.DoesNotThrowAsync(async () => await DeliveryService.DevalueDelivery(d.Year, d.DId, [1000, 700, -5]));
|
||||
d = await GetDelivery("20231001X003");
|
||||
Assert.That(d, Is.Not.Null);
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
@@ -493,7 +493,7 @@ namespace Tests.UnitTests.ServiceTests {
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TestSplit_04_Depreciate_Complete() {
|
||||
public async Task TestSplit_04_Devalue_Complete() {
|
||||
var d = await GetDelivery("20231001X004");
|
||||
Assert.That(d, Is.Not.Null);
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
@@ -507,7 +507,7 @@ namespace Tests.UnitTests.ServiceTests {
|
||||
Assert.That(ps[2].QualId, Is.Not.EqualTo("WEI"));
|
||||
}
|
||||
|
||||
await Assert.DoesNotThrowAsync(async () => await DeliveryService.DepreciateDelivery(d.Year, d.DId, [1000, 1100, int.MaxValue]));
|
||||
await Assert.DoesNotThrowAsync(async () => await DeliveryService.DevalueDelivery(d.Year, d.DId, [1000, 1100, int.MaxValue]));
|
||||
d = await GetDelivery("20231001X004");
|
||||
Assert.That(d, Is.Not.Null);
|
||||
using (Assert.EnterMultipleScope()) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Helpers.Weighing;
|
||||
|
||||
namespace Tests.UnitTests.WeighingTests {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Helpers.Weighing;
|
||||
|
||||
namespace Tests.UnitTests.WeighingTests {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Helpers.Weighing;
|
||||
|
||||
namespace Tests.UnitTests.WeighingTests {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Helpers.Weighing;
|
||||
|
||||
namespace Tests.UnitTests.WeighingTests {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Elwig.Helpers;
|
||||
using Elwig.Helpers.Weighing;
|
||||
|
||||
namespace Tests.UnitTests.WeighingTests {
|
||||
|
||||
@@ -1 +1 @@
|
||||
curl --fail -s -L "https://elwig.at/files/create.sql?v=43" -u "elwig:ganzGeheim123!" -o "Resources\Sql\Create.sql"
|
||||
curl --fail -s -L "https://elwig.at/files/create.sql?v=44" -u "elwig:ganzGeheim123!" -o "Resources\Sql\Create.sql"
|
||||
Reference in new issue
Block a user