Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
f9ee2cb120 | |||
b27b89f599 | |||
bfbd0a6a22 | |||
e2de7a1f1c |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -2,6 +2,18 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
[v1.0.1.1][v1.0.1.1] (2025-09-21) {#v1.0.1.1}
|
||||
---------------------------------------------
|
||||
|
||||
### Sonstiges {#v1.0.1.1-misc}
|
||||
|
||||
* Eingabe von Sorten und Qualitätsstufen im Übernahme-Fenster (`DeliveryAdminWindows`) verbessert. (e2de7a1f1c, b27b89f599)
|
||||
|
||||
[v1.0.1.1]: https://git.necronda.net/winzer/elwig/releases/tag/v1.0.1.1
|
||||
|
||||
|
||||
|
||||
|
||||
[v1.0.1.0][v1.0.1.0] (2025-09-18) {#v1.0.1.0}
|
||||
---------------------------------------------
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<UseWPF>true</UseWPF>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
|
||||
<Version>1.0.1.0</Version>
|
||||
<Version>1.0.1.1</Version>
|
||||
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
|
@@ -248,14 +248,6 @@ namespace Elwig.Helpers {
|
||||
return c + 1;
|
||||
}
|
||||
|
||||
public async Task<WineQualLevel> GetWineQualityLevel(double kmw, string? maxQualId = null) {
|
||||
return await WineQualityLevels
|
||||
.Where(q => !q.IsPredicate && (q.MinKmw == null || q.MinKmw <= kmw))
|
||||
.Where(q => maxQualId == null || q.QualId == "WEI" || q.QualId == maxQualId)
|
||||
.OrderBy(q => q.MinKmw)
|
||||
.LastAsync();
|
||||
}
|
||||
|
||||
public void UpdateDeliveryPartModifiers(DeliveryPart part, IEnumerable<Modifier> oldModifiers, IEnumerable<Modifier> newModifiers) {
|
||||
foreach (var m in Modifiers.Where(m => m.Year == part.Year)) {
|
||||
var mod = new DeliveryPartModifier {
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<TextBlock Margin="20,10" FontSize="12">
|
||||
<Bold>Produkt:</Bold> Elwig<LineBreak/>
|
||||
<Bold>Beschreibung:</Bold> Elektronische Winzergenossenschaftsverwaltung<LineBreak/>
|
||||
<Bold>Typ:</Bold> Warenwirschaftssystem<LineBreak/>
|
||||
<Bold>Typ:</Bold> Warenwirtschaftssystem (ERP-System)<LineBreak/>
|
||||
<Bold>Version:</Bold> <Run x:Name="Version">0.0.0.0</Run> (<Hyperlink NavigateUri="https://elwig.at/changelog" RequestNavigate="Hyperlink_RequestNavigate">Änderungsprotokoll</Hyperlink>)<LineBreak/>
|
||||
<Bold>Lizenz:</Bold> <Hyperlink NavigateUri="https://www.gnu.org/licenses/gpl-3.0.html" RequestNavigate="Hyperlink_RequestNavigate">GNU General Public License 3.0 (GPLv3)</Hyperlink><LineBreak/>
|
||||
<Bold>Website:</Bold> <Hyperlink NavigateUri="https://elwig.at/" RequestNavigate="Hyperlink_RequestNavigate">https://elwig.at/</Hyperlink><LineBreak/>
|
||||
|
@@ -8,6 +8,7 @@ using Elwig.ViewModels;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
@@ -34,6 +35,8 @@ namespace Elwig.Windows {
|
||||
|
||||
private readonly Button[] WeighingButtons;
|
||||
|
||||
private List<WineQualLevel> WineQualityLevels = [];
|
||||
|
||||
public DeliveryAdminWindow(bool receipt = false) {
|
||||
InitializeComponent();
|
||||
CommandBindings.Add(new CommandBinding(CtrlF, FocusSearchInput));
|
||||
@@ -483,7 +486,8 @@ namespace Elwig.Windows {
|
||||
var cultList = await ctx.WineCultivations.OrderBy(a => a.Name).Cast<object>().ToListAsync();
|
||||
cultList.Insert(0, new NullItem(""));
|
||||
ControlUtils.RenewItemsSource(CultivationInput, cultList, null, ControlUtils.RenewSourceDefault.First);
|
||||
ControlUtils.RenewItemsSource(WineQualityLevelInput, await ctx.WineQualityLevels.ToListAsync());
|
||||
WineQualityLevels = await ctx.WineQualityLevels.ToListAsync();
|
||||
ControlUtils.RenewItemsSource(WineQualityLevelInput, WineQualityLevels);
|
||||
ControlUtils.RenewItemsSource(ModifiersInput, await ctx.Modifiers
|
||||
.Where(m => m.Year == y && (!IsCreating || m.IsActive))
|
||||
.OrderBy(m => m.Ordering)
|
||||
@@ -1230,22 +1234,30 @@ namespace Elwig.Windows {
|
||||
}
|
||||
}
|
||||
|
||||
private WineQualLevel GetWineQualityLevel(double kmw, string? maxQualId = null) {
|
||||
return WineQualityLevels
|
||||
.Where(q => !q.IsPredicate && (q.MinKmw == null || q.MinKmw <= kmw))
|
||||
.Where(q => maxQualId == null || q.QualId == "WEI" || q.QualId == maxQualId)
|
||||
.OrderBy(q => q.MinKmw)
|
||||
.Last();
|
||||
}
|
||||
|
||||
private void UpdateWineQualityLevels() {
|
||||
using var ctx = new AppDbContext();
|
||||
if (!GetInputValid(GradationKmwInput)) {
|
||||
UnsetDefaultValue(WineQualityLevelInput);
|
||||
ComboBox_SelectionChanged(WineQualityLevelInput, null);
|
||||
WineQualityLevelInput.ItemsSource = ctx.WineQualityLevels.ToList();
|
||||
WineQualityLevelInput.ItemsSource = WineQualityLevels;
|
||||
WineQualityLevelInput.SelectedItem = null;
|
||||
return;
|
||||
}
|
||||
var kmw = (double)ViewModel.GradationKmw!;
|
||||
var max = ViewModel.WineVar?.MaxQualId;
|
||||
var quw = ViewModel.WineVar?.IsQuw ?? true;
|
||||
WineQualityLevelInput.ItemsSource = ctx.WineQualityLevels
|
||||
WineQualityLevelInput.ItemsSource = WineQualityLevels
|
||||
.Where(q => q.MinKmw == null || q.MinKmw <= kmw)
|
||||
.Where(q => quw || q.QualId == "WEI" || q.QualId == max)
|
||||
.ToList();
|
||||
var qual = ctx.GetWineQualityLevel(kmw, !quw ? max : null).GetAwaiter().GetResult();
|
||||
var qual = GetWineQualityLevel(kmw, !quw ? max : null);
|
||||
SetDefaultValue(WineQualityLevelInput, qual);
|
||||
if (WineQualityLevelInput.SelectedItem == null || (WineQualityLevelInput.SelectedItem is WineQualLevel selected && !selected.IsPredicate)) {
|
||||
ControlUtils.SelectItem(WineQualityLevelInput, qual);
|
||||
@@ -1385,8 +1397,7 @@ namespace Elwig.Windows {
|
||||
AbgewertetInput.IsChecked = false;
|
||||
return;
|
||||
}
|
||||
using var ctx = new AppDbContext();
|
||||
var defQual = ctx.GetWineQualityLevel(ViewModel.GradationKmw!.Value, !(ViewModel.WineVar?.IsQuw ?? true) ? ViewModel.WineVar?.MaxQualId : null).GetAwaiter().GetResult();
|
||||
var defQual = GetWineQualityLevel(ViewModel.GradationKmw!.Value, !(ViewModel.WineVar?.IsQuw ?? true) ? ViewModel.WineVar?.MaxQualId : null);
|
||||
AbgewertetInput.IsChecked = !qual.IsPredicate && defQual != qual;
|
||||
}
|
||||
|
||||
|
40
README.md
40
README.md
@@ -5,3 +5,43 @@ Elwig
|
||||
**El**ektronische **Wi**nzer**g**enossenschaftsverwaltung (Electronic Management for Vintners' Cooperatives).
|
||||
|
||||
Further information may be found on [the website](https://elwig.at).
|
||||
|
||||
|
||||
About
|
||||
=====
|
||||
|
||||
**Product:** Elwig
|
||||
**Description:** Electronic Management for Vintners' Cooperatives
|
||||
**Type:** ERP system
|
||||
**Version:** 1.0.1.1 ([Changelog](./CHANGELOG.md))
|
||||
**License:** [GNU General Public License 3.0 (GPLv3)](./LICENSE)
|
||||
**Website:** https://elwig.at/
|
||||
**Source code:** https://git.necronda.net/winzer/elwig
|
||||
**Developement period:** 2022–2025
|
||||
|
||||
**Technology Stack:**
|
||||
Language: C#
|
||||
Framework: Windows Presentation Framework (WPF)
|
||||
Database: [SQLite](https://sqlite.org/)
|
||||
PDF creation: [WeasyPrint](https://weasyprint.org/), [RazorLight](https://github.com/toddams/RazorLight), [PdfiumViewer](https://github.com/pvginkel/PdfiumViewer)
|
||||
Packaging: [WiX Toolset](https://www.firegiant.com/wixtoolset/)
|
||||
|
||||
|
||||
Über
|
||||
====
|
||||
|
||||
**Produkt:** Elwig
|
||||
**Beschreibung:** Elektronische Winzergenossenschaftsverwaltung
|
||||
**Typ:** Warenwirtschaftssystem (ERP-System)
|
||||
**Version:** 1.0.1.1 ([Änderungsprotokoll](./CHANGELOG.md))
|
||||
**Lizenz:** [GNU General Public License 3.0 (GPLv3)](./LICENSE)
|
||||
**Website:** https://elwig.at/
|
||||
**Quellcode:** https://git.necronda.net/winzer/elwig
|
||||
**Entwicklungszeitraum:** 2022–2025
|
||||
|
||||
**Verwendete Technologien:**
|
||||
Programmiersprache: C#
|
||||
Framework: Windows Presentation Framework (WPF)
|
||||
Datenbank: [SQLite](https://sqlite.org/)
|
||||
PDF-Erstellung: [WeasyPrint](https://weasyprint.org/), [RazorLight](https://github.com/toddams/RazorLight), [PdfiumViewer](https://github.com/pvginkel/PdfiumViewer)
|
||||
Paketierung: [WiX Toolset](https://www.firegiant.com/wixtoolset/)
|
||||
|
Reference in New Issue
Block a user