Compare commits

..

5 Commits

Author SHA1 Message Date
7749f6ab45 Bump version to 0.9.3
All checks were successful
Test / Run tests (push) Successful in 2m29s
Deploy / Build and Deploy (push) Successful in 2m38s
2024-08-02 12:22:52 +02:00
cf05a0c658 DeliveryJournalData: Add delivery and member branch to excel export
All checks were successful
Test / Run tests (push) Successful in 2m52s
2024-08-02 11:42:27 +02:00
5567d9f25a Bump version to 0.9.2
All checks were successful
Test / Run tests (push) Successful in 2m7s
Deploy / Build and Deploy (push) Successful in 2m50s
2024-08-01 16:06:13 +02:00
4403754ada MemberAdminWindow: Fix error when saving telephone numbers
All checks were successful
Test / Run tests (push) Successful in 2m23s
2024-08-01 15:57:49 +02:00
8db6007264 MainWindow: Fix closing behaviour when other windows are open
All checks were successful
Test / Run tests (push) Successful in 2m24s
2024-08-01 13:49:04 +02:00
8 changed files with 54 additions and 15 deletions

View File

@ -3,6 +3,31 @@ Changelog
========= =========
[v0.9.3][v0.9.3] (2024-08-02) {#v0.9.3}
---------------------------------------
### Sonstiges {#v0.9.3-misc}
* Das Lieferjournal als Excel-Liste beinhaltet nun auch Liefer-Zweigstelle und Stamm-Zweigstelle des Liefernaten. (cf05a0c658)
[v0.9.3]: https://git.necronda.net/winzer/elwig/releases/tag/v0.9.3
[v0.9.2][v0.9.2] (2024-08-01) {#v0.9.2}
---------------------------------------
### Behobene Fehler {#v0.9.2-bugfixes}
* Verhalten beim Schließen des Haupt-Fensters (`MainWindow`) nicht immer richtig. (8db6007264)
* Im Mitglieder-Fenster (`MemberAdminWindow`) führt beim Erstellen eines Mitglied das Eingeben einer Tel.-Nr. zu einem Fehler. (4403754ada)
[v0.9.2]: https://git.necronda.net/winzer/elwig/releases/tag/v0.9.2
[v0.9.1][v0.9.1] (2024-08-01) {#v0.9.1} [v0.9.1][v0.9.1] (2024-08-01) {#v0.9.1}
--------------------------------------- ---------------------------------------

View File

@ -49,7 +49,7 @@
<td class="center">@(Model.BillingData.ConsiderContractPenalties ? "Ja" : "Nein")</td> <td class="center">@(Model.BillingData.ConsiderContractPenalties ? "Ja" : "Nein")</td>
</tr> </tr>
<tr> <tr>
<th style="overflow: visible;">Nto./bto.-Zuschl:</th> <th style="overflow: visible;">Rebel-Zuschl.:</th>
<td colspan="3" class="center"> <td colspan="3" class="center">
@($"{Utils.GetSign(Model.BillingData.NetWeightModifier)}{Math.Abs(Model.BillingData.NetWeightModifier) * 100:N2}") % / @($"{Utils.GetSign(Model.BillingData.NetWeightModifier)}{Math.Abs(Model.BillingData.NetWeightModifier) * 100:N2}") % /
@($"{Utils.GetSign(Model.BillingData.GrossWeightModifier)}{Math.Abs(Model.BillingData.GrossWeightModifier) * 100:N2}") % @($"{Utils.GetSign(Model.BillingData.GrossWeightModifier)}{Math.Abs(Model.BillingData.GrossWeightModifier) * 100:N2}") %

View File

@ -7,7 +7,7 @@
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon> <ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
<Version>0.9.1</Version> <Version>0.9.3</Version>
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages> <SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>

View File

@ -197,7 +197,7 @@ namespace Elwig.Helpers {
} }
public static void MailTo(string emailAddress) { public static void MailTo(string emailAddress) {
MailTo(new string[] { emailAddress }); MailTo([emailAddress]);
} }
public static void MailTo(IEnumerable<string> emailAddresses) { public static void MailTo(IEnumerable<string> emailAddresses) {

View File

@ -14,16 +14,18 @@ namespace Elwig.Models.Dtos {
("Pos", "Pos.", null, 10), ("Pos", "Pos.", null, 10),
("Date", "Datum", null, 20), ("Date", "Datum", null, 20),
("Time", "Zeit", null, 20), ("Time", "Zeit", null, 20),
("DeliveryBranch", "Zweigstelle", null, 30),
("MgNr", "MgNr.", null, 12), ("MgNr", "MgNr.", null, 12),
("Name1", "Name", null, 40), ("Name1", "Name", null, 40),
("Name2", "Vorname", null, 40), ("Name2", "Vorname", null, 40),
("MemberBranch", "Stamm-Zwst.", null, 30),
("SortId", "Sorte", null, 10), ("SortId", "Sorte", null, 10),
("AttrId", "Attr.", null, 15), ("AttrId", "Attr.", null, 15),
("CultId", "Bewirt.", null, 15), ("CultId", "Bewirt.", null, 15),
("QualId", "Qualität", null, 15), ("QualId", "Qualität", null, 15),
("Gradation", "Gradation", "°Oe|°KMW", 40), ("Gradation", "Gradation", "°Oe|°KMW", 40),
("Weight", "Gewicht", "kg", 20), ("Weight", "Gewicht", "kg", 20),
("NetGross", "bto./nto.", null, 20), ("IsNetWeight", "Gerebelt", null, 20),
("HkId", "Herkunft", null, 20), ("HkId", "Herkunft", null, 20),
("Modifiers", "Zu-/Abschläge", null, 40), ("Modifiers", "Zu-/Abschläge", null, 40),
("Comment", "Anmerkung", null, 60), ("Comment", "Anmerkung", null, 60),
@ -35,7 +37,7 @@ namespace Elwig.Models.Dtos {
public static async Task<DeliveryJournalData> FromQuery(IQueryable<DeliveryPart> query, List<string> filterNames) { public static async Task<DeliveryJournalData> FromQuery(IQueryable<DeliveryPart> query, List<string> filterNames) {
return new((await query return new((await query
.Include(p => p.Delivery.Member) .Include(p => p.Delivery.Member.Branch)
.Include(p => p.Delivery.Branch) .Include(p => p.Delivery.Branch)
.Include(p => p.PartModifiers).ThenInclude(m => m.Modifier) .Include(p => p.PartModifiers).ThenInclude(m => m.Modifier)
.Include(p => p.Variety) .Include(p => p.Variety)
@ -53,10 +55,12 @@ namespace Elwig.Models.Dtos {
public int Pos; public int Pos;
public DateOnly Date; public DateOnly Date;
public TimeOnly? Time; public TimeOnly? Time;
public string DeliveryBranch;
public int MgNr; public int MgNr;
public string Name1; public string Name1;
public string Name2; public string Name2;
public string AdministrativeName; public string AdministrativeName;
public string? MemberBranch;
public string SortId; public string SortId;
public string Variety; public string Variety;
public string? AttrId; public string? AttrId;
@ -71,7 +75,6 @@ namespace Elwig.Models.Dtos {
public double Oe => Gradation.Oe; public double Oe => Gradation.Oe;
public int Weight { get; set; } public int Weight { get; set; }
public bool IsNetWeight; public bool IsNetWeight;
public string NetGross => IsNetWeight ? "n" : "b";
public string? Modifiers; public string? Modifiers;
public string? Comment; public string? Comment;
@ -83,10 +86,12 @@ namespace Elwig.Models.Dtos {
Pos = p.DPNr; Pos = p.DPNr;
Date = d.Date; Date = d.Date;
Time = d.Time; Time = d.Time;
DeliveryBranch = d.Branch.Name;
MgNr = m.MgNr; MgNr = m.MgNr;
Name1 = m.FamilyName; Name1 = m.FamilyName;
Name2 = m.AdministrativeName2; Name2 = m.AdministrativeName2;
AdministrativeName = m.AdministrativeName; AdministrativeName = m.AdministrativeName;
MemberBranch = m.Branch?.Name;
SortId = p.SortId; SortId = p.SortId;
Variety = p.Variety.Name; Variety = p.Variety.Name;

View File

@ -549,7 +549,7 @@ namespace Elwig.Services {
ctx.RemoveRange(ctx.MemberTelephoneNrs.Where(t => t.MgNr == oldMgNr)); ctx.RemoveRange(ctx.MemberTelephoneNrs.Where(t => t.MgNr == oldMgNr));
ctx.AddRange(vm.PhoneNrs ctx.AddRange(vm.PhoneNrs
.Where(input => input.Number != null) .Where(input => input.Number != null && input.Number != "")
.Select((input, i) => new MemberTelNr { .Select((input, i) => new MemberTelNr {
MgNr = m.MgNr, MgNr = m.MgNr,
Nr = i + 1, Nr = i + 1,

View File

@ -402,7 +402,7 @@ namespace Elwig.Windows {
protected bool InputLostFocus(TextBox input, ValidationResult res, string? msg = null) { protected bool InputLostFocus(TextBox input, ValidationResult res, string? msg = null) {
if (DoShowWarningWindows && !res.IsValid && !IsClosing && (IsEditing || IsCreating)) if (DoShowWarningWindows && !res.IsValid && !IsClosing && (IsEditing || IsCreating))
MessageBox.Show(res.ErrorContent.ToString(), msg ?? res.ErrorContent.ToString(), MessageBoxButton.OK, MessageBoxImage.Warning); MessageBox.Show(res.ErrorContent?.ToString(), msg ?? res.ErrorContent?.ToString(), MessageBoxButton.OK, MessageBoxImage.Warning);
return res.IsValid; return res.IsValid;
} }

View File

@ -13,6 +13,7 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Net.Http; using System.Net.Http;
using System.Reflection; using System.Reflection;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
@ -37,13 +38,21 @@ namespace Elwig.Windows {
} }
private void Window_Closing(object sender, CancelEventArgs evt) { private void Window_Closing(object sender, CancelEventArgs evt) {
if (App.NumWindows > 1 && !App.ForceShutdown && !App.Current.Windows.Cast<Window>().Any(w => ((w as AdministrationWindow)?.IsEditing ?? false) || ((w as AdministrationWindow)?.IsCreating ?? false))) { if (App.NumWindows > 1 && !App.ForceShutdown) {
var res = MessageBox.Show("Es sind noch weitere Fenster geöffnet.\nSollen alle Fenster geschlossen werden?", foreach (var w in App.Current.Windows.Cast<Window>().Where(w => ((w as AdministrationWindow)?.IsEditing ?? false) || ((w as AdministrationWindow)?.IsCreating ?? false))) {
"Elwig beenden", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No); try {
if (res != MessageBoxResult.Yes) { w.Close();
evt.Cancel = true; } catch { }
} else { }
Application.Current.Shutdown(); Thread.Sleep(100);
if (App.NumWindows > 1 && !App.Current.Windows.Cast<Window>().Any(w => ((w as AdministrationWindow)?.IsEditing ?? false) || ((w as AdministrationWindow)?.IsCreating ?? false))) {
var res = MessageBox.Show("Es sind noch weitere Fenster geöffnet.\nSollen alle Fenster geschlossen werden?",
"Elwig beenden", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No);
if (res != MessageBoxResult.Yes) {
evt.Cancel = true;
} else {
Application.Current.Shutdown();
}
} }
} }
} }