Compare commits

..

15 Commits

Author SHA1 Message Date
b58dee6d3f Bump version to 1.0.3.4
All checks were successful
Deploy / Build and Deploy (push) Successful in 2m28s
2026-02-19 19:33:22 +01:00
0e2b004b0d Elwig: Update dependencies
All checks were successful
Test / Run tests (push) Successful in 2m46s
2026-02-19 19:26:39 +01:00
19c3322ef2 Tests: Update dependencies 2026-02-19 19:26:29 +01:00
6f081811c4 MailWindow: Allow users to double click on avaiable/selected documents
All checks were successful
Test / Run tests (push) Successful in 2m58s
2026-02-19 18:10:26 +01:00
432c511b85 Billing: Create credit notes only for members who receive a payment 2026-02-19 18:10:22 +01:00
7e22759c33 PaymentVariantsWindow: Never lock seasons
All checks were successful
Test / Run tests (push) Successful in 2m27s
2026-02-19 16:12:54 +01:00
a47904cf0b SyncService: Catch exceptions in ChangesAvailable()
All checks were successful
Test / Run tests (push) Successful in 3m16s
2026-02-19 15:59:23 +01:00
6818491ae3 Export: Fix importing delivery parts with no kgnr 2026-02-19 15:58:51 +01:00
23db4de1ee Database: Fix xtime/mtime for delivery parts
All checks were successful
Test / Run tests (push) Successful in 3m17s
2026-02-19 15:31:36 +01:00
9e5f709d42 DeliveryConfirmation: Show 'Davon abgewertet' below total sum 2026-02-19 15:26:09 +01:00
4cd7ef85a1 Printing: Replace PdfiumViewer with native pdfium.dll binary
All checks were successful
Test / Run tests (push) Successful in 3m47s
2026-02-18 23:02:18 +01:00
2c0b000073 MainWindow: Fix Tooltip for 'Sorten-/Qual.aufschlüssel.' Button
All checks were successful
Test / Run tests (push) Successful in 2m31s
2026-02-18 23:01:35 +01:00
f1737af2a2 Bump version to 1.0.3.3
All checks were successful
Test / Run tests (push) Successful in 2m26s
Deploy / Build and Deploy (push) Successful in 2m21s
2026-02-05 23:52:33 +01:00
8f423e3e92 Pdfium: Use updated fork of PdfiumViewer
All checks were successful
Test / Run tests (push) Successful in 2m46s
2026-02-05 23:21:28 +01:00
c8911c0acb Pdfium: Explicitly add WindowsForms after dotnet 10 upgrade
All checks were successful
Test / Run tests (push) Successful in 3m5s
2026-02-05 22:50:06 +01:00
21 changed files with 267 additions and 75 deletions

View File

@@ -2,6 +2,45 @@
Changelog Changelog
========= =========
[v1.0.3.4][v1.0.3.4] (2026-02-19) {#v1.0.3.4}
---------------------------------------------
### Neue Funktionen {#v1.0.3.4-features}
* Bei Anlieferungsbestätigungen (`DeliveryConfirmation`) wird nun auch die Summe aller abgewerteten Lieferungen angeführt. (9e5f709d42)
* Bei der Auszahlung werden Traubengutschriften (`CreditNote`) nur noch für Mitglieder erstellt, die einen positiven Betrag ausgezahlt bekommen. (432c511b85)
### Behobene Fehler {#v1.0.3.4-bugfixes}
* Im Haupt-Fenster (`MainWindow`) wurde der Tooltip für den Knopf _Sorten-/Qual.aufschlüssel_ korrigiert. (2c0b000073)
* Falsch gesetzte `xtime` und `mtime` bei Lieferungen korrigiert. (23db4de1ee)
* Beim Import von Lieferungen ohne `kgnr` tritt nun kein Fehler auf. (6818491ae3)
* Beim Abfragen von neuen Daten zum Synchronisieren werden alle Fehler abgefangen. (a47904cf0b)
### Sonstiges {#v1.0.3.4-misc}
* Pdfium wird nun direkt importiert (anstatt über PdfiumViewer). (4cd7ef85a1)
* Auszahlungsvarianten von vergangenen Saisons sind nun nicht mehr für eine Bearbeitung gesperrt. (7e22759c33)
* Im Rundschreiben-Fenster (`MailWindow`) ist es nun möglich Dokumente durch Doppelklick an-/abzuwählen. (6f081811c4)
* Abhängigkeiten aktualisiert. (19c3322ef2, 0e2b004b0d)
[v1.0.3.4]: https://git.necronda.net/winzer/elwig/releases/tag/v1.0.3.4
[v1.0.3.3][v1.0.3.3] (2026-02-05) {#v1.0.3.3}
---------------------------------------------
### Behobene Fehler {#v1.0.3.3-bugfixes}
* Hotfix: Probleme beim Drucken seit der Installation von [v1.0.3.0](#v1.0.3.0). (c8911c0acb, 8f423e3e92)
[v1.0.3.3]: https://git.necronda.net/winzer/elwig/releases/tag/v1.0.3.3
[v1.0.3.2][v1.0.3.2] (2026-02-04) {#v1.0.3.2} [v1.0.3.2][v1.0.3.2] (2026-02-04) {#v1.0.3.2}
--------------------------------------------- ---------------------------------------------
@@ -291,7 +330,7 @@ Changelog
* Bei Traubengutschriften (`CreditNote`) wurde der Rebelzuschlag immer angeführt, auch wenn dieser in der zugrundeliegenden Berechnung nicht berücksichtigt wurde. (336aef5c70) * Bei Traubengutschriften (`CreditNote`) wurde der Rebelzuschlag immer angeführt, auch wenn dieser in der zugrundeliegenden Berechnung nicht berücksichtigt wurde. (336aef5c70)
* In den Variantendaten einer Auszahlungsvariante (`PaymentVariantSummary`) wurde neben den Spalten _gebunden_ und _ungebunden_ noch _attributlos gebunden_ hinzugefügt. Ohne diese neue Spalte wären die Werte der anderen beiden falsch. ([#58][i58]) * In den Variantendaten einer Auszahlungsvariante (`PaymentVariantSummary`) wurde neben den Spalten _gebunden_ und _ungebunden_ noch _attributlos gebunden_ hinzugefügt. Ohne diese neue Spalte wären die Werte der anderen beiden falsch. ([#58][i58])
* Das erste Laden des Ausgangs-Protokoll-Fensters (`MailLogWindow`) hat nicht funktioniert. ([#65][i65]) * Das erste Laden des Ausgangs-Protokoll-Fensters (`MailLogWindow`) hat nicht funktioniert. ([#65][i65])
* Im Lieferungen-Fenster (`DeliveryAdminWindow`) und im Mitglieder-Fenster (`MemberAdminWindow`) wird der Tool-Tip für Gewicht/Gradation mit korrektem Layout angezeigt. (e9f389b885) * Im Lieferungen-Fenster (`DeliveryAdminWindow`) und im Mitglieder-Fenster (`MemberAdminWindow`) wird der Tooltip für Gewicht/Gradation mit korrektem Layout angezeigt. (e9f389b885)
* Bei Traubengutschriften (`CreditNote`) werden längere Freitexte vollständig angezeigt statt abgeschnitten. ([#62][i62]) * Bei Traubengutschriften (`CreditNote`) werden längere Freitexte vollständig angezeigt statt abgeschnitten. ([#62][i62])
### Sonstiges {#v1.0.0.0-misc} ### Sonstiges {#v1.0.0.0-misc}

View File

@@ -100,6 +100,12 @@
<td></td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td colspan="8">Davon abgewertet:</td>
<td colspan="2" class="number">@($"{Model.Data.Rows.Where(p => p.IsDepreciated).Sum(p => p.Weight):N0}")</td>
<td></td>
<td></td>
</tr>
</tbody> </tbody>
</table> </table>
@Raw(BusinessDocument.PrintSortenaufteilung(Model.MemberStats)) @Raw(BusinessDocument.PrintSortenaufteilung(Model.MemberStats))

View File

@@ -3,11 +3,13 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net10.0-windows</TargetFramework> <TargetFramework>net10.0-windows</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon> <ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
<Version>1.0.3.2</Version> <Version>1.0.3.4</Version>
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages> <SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
@@ -21,24 +23,22 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="bblanchon.PDFium.Win32" Version="147.0.7690" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" /> <PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="LinqKit" Version="1.3.9" /> <PackageReference Include="LinqKit" Version="1.3.11" />
<PackageReference Include="MailKit" Version="4.14.1" /> <PackageReference Include="MailKit" Version="4.15.0" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="6.0.36" /> <PackageReference Include="Microsoft.AspNetCore.Razor.Language" Version="6.0.36" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="10.0.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="10.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="10.0.2" /> <PackageReference Include="Microsoft.Extensions.Configuration.Ini" Version="10.0.3" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3650.58" /> <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3800.47" />
<PackageReference Include="NJsonSchema" Version="11.5.2" /> <PackageReference Include="NJsonSchema" Version="11.5.2" />
<PackageReference Include="PdfiumViewer" Version="2.13.0" />
<PackageReference Include="PdfiumViewer.Native.x86_64.no_v8-no_xfa" Version="2018.4.8.256" />
<PackageReference Include="RazorLight" Version="2.3.1" /> <PackageReference Include="RazorLight" Version="2.3.1" />
<PackageReference Include="ScottPlot.WPF" Version="5.1.57" /> <PackageReference Include="ScottPlot.WPF" Version="5.1.57" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="3.0.2" /> <PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="3.0.2" />
<PackageReference Include="System.IO.Hashing" Version="10.0.2" /> <PackageReference Include="System.IO.Hashing" Version="10.0.3" />
<PackageReference Include="System.IO.Ports" Version="10.0.2" /> <PackageReference Include="System.IO.Ports" Version="10.0.3" />
<PackageReference Include="System.Management" Version="10.0.2" /> <PackageReference Include="System.Management" Version="10.0.3" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="10.0.2" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -9,7 +9,7 @@ namespace Elwig.Helpers {
public static class AppDbUpdater { public static class AppDbUpdater {
// Don't forget to update value in Tests/fetch-resources.bat! // Don't forget to update value in Tests/fetch-resources.bat!
public static readonly int RequiredSchemaVersion = 36; public static readonly int RequiredSchemaVersion = 37;
private static int VersionOffset = 0; private static int VersionOffset = 0;

View File

@@ -80,7 +80,7 @@ namespace Elwig.Helpers.Billing {
LEFT JOIN v_penalty_area_commitments u ON (u.year, u.mgnr) = (s.year, m.mgnr) LEFT JOIN v_penalty_area_commitments u ON (u.year, u.mgnr) = (s.year, m.mgnr)
LEFT JOIN v_auto_business_shares a ON (a.year, a.mgnr) = (s.year, m.mgnr) LEFT JOIN v_auto_business_shares a ON (a.year, a.mgnr) = (s.year, m.mgnr)
LEFT JOIN payment_custom x ON (x.year, x.mgnr) = (s.year, m.mgnr) LEFT JOIN payment_custom x ON (x.year, x.mgnr) = (s.year, m.mgnr)
WHERE s.year = {Year} AND v.avnr = {AvNr}; WHERE s.year = {Year} AND v.avnr = {AvNr} AND p.amount > COALESCE(lp.amount, 0);
"""); """);
await cnx.ExecuteBatch($""" await cnx.ExecuteBatch($"""
UPDATE payment_variant SET test_variant = FALSE WHERE (year, avnr) = ({Year}, {AvNr}); UPDATE payment_variant SET test_variant = FALSE WHERE (year, avnr) = ({Year}, {AvNr});

View File

@@ -783,15 +783,15 @@ namespace Elwig.Helpers.Export {
Comment = json["comment"]?.AsValue().GetValue<string>(), Comment = json["comment"]?.AsValue().GetValue<string>(),
ImportedAt = DateTime.Now, ImportedAt = DateTime.Now,
}, json["parts"]!.AsArray().Select(p => p!.AsObject()).Select(p => { }, json["parts"]!.AsArray().Select(p => p!.AsObject()).Select(p => {
var kgnr = p["kgnr"]!.AsValue().GetValue<int>(); var kgnr = p["kgnr"]?.AsValue().GetValue<int>();
var ried = p["ried"]?.AsValue().GetValue<string>(); var ried = p["ried"]?.AsValue().GetValue<string>();
WbRd? rd = null; WbRd? rd = null;
if (ried != null) { if (ried != null && kgnr != null) {
var rde = riede.GetValueOrDefault(kgnr, []); var rde = riede.GetValueOrDefault(kgnr.Value, []);
rd = rde.FirstOrDefault(r => r.Name == ried); rd = rde.FirstOrDefault(r => r.Name == ried);
if (rd == null) { if (rd == null) {
rd = new WbRd { rd = new WbRd {
KgNr = kgnr, KgNr = kgnr.Value,
RdNr = (rde.Count == 0 ? 1 : rde.Max(r => r.RdNr)) + 1, RdNr = (rde.Count == 0 ? 1 : rde.Max(r => r.RdNr)) + 1,
Name = ried, Name = ried,
}; };

View File

@@ -1,5 +1,4 @@
using Elwig.Windows; using Elwig.Windows;
using PdfiumViewer;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
@@ -27,6 +26,7 @@ namespace Elwig.Helpers.Printing {
public static bool IsReady => WinziPrintProc != null; public static bool IsReady => WinziPrintProc != null;
public static async Task Init(Action? evtHandler = null) { public static async Task Init(Action? evtHandler = null) {
PdfiumNative.FPDF_InitLibrary();
// NOTE: If the WinziPrint daemon is already running this will succeed, but the process will fail. // NOTE: If the WinziPrint daemon is already running this will succeed, but the process will fail.
// Should be no problem, as long as the daemon is not closed // Should be no problem, as long as the daemon is not closed
var p = new Process() { StartInfo = new() { var p = new Process() { StartInfo = new() {
@@ -47,6 +47,7 @@ namespace Elwig.Helpers.Printing {
public static Task Cleanup() { public static Task Cleanup() {
WinziPrintProc?.Kill(true); WinziPrintProc?.Kill(true);
WinziPrintProc?.Close(); WinziPrintProc?.Close();
PdfiumNative.FPDF_DestroyLibrary();
return Task.CompletedTask; return Task.CompletedTask;
} }
@@ -123,9 +124,9 @@ namespace Elwig.Helpers.Printing {
public static Task Print(string path, PrinterSettings settings) { public static Task Print(string path, PrinterSettings settings) {
try { try {
using var doc = PdfDocument.Load(path); using var printDoc = new PdfPrintDocument(path) {
using var printDoc = doc.CreatePrintDocument(PdfPrintMode.CutMargin); PrinterSettings = settings,
printDoc.PrinterSettings = settings; };
printDoc.Print(); printDoc.Print();
} catch (Exception e) { } catch (Exception e) {
MessageBox.Show("Beim Drucken ist ein Fehler aufgetreten:\n\n" + e.Message, "Fehler beim Drucken", MessageBoxButton.OK, MessageBoxImage.Error); MessageBox.Show("Beim Drucken ist ein Fehler aufgetreten:\n\n" + e.Message, "Fehler beim Drucken", MessageBoxButton.OK, MessageBoxImage.Error);

View File

@@ -0,0 +1,102 @@
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Printing;
using System.Runtime.InteropServices;
namespace Elwig.Helpers.Printing {
public class PdfPrintDocument : PrintDocument {
private readonly IntPtr _handle;
private readonly int _pageCount;
private readonly double _dpi;
private int _currentPage;
public PdfPrintDocument(string path, string? password = null, double dpi = 300.0) :
base() {
_handle = PdfiumNative.FPDF_LoadDocument(path, password);
_pageCount = PdfiumNative.FPDF_GetPageCount(_handle);
_dpi = dpi;
}
protected override void Dispose(bool disposing) {
PdfiumNative.FPDF_CloseDocument(_handle);
base.Dispose(disposing);
}
protected override void OnBeginPrint(PrintEventArgs evt) {
_currentPage = (PrinterSettings.FromPage != 0) ? (PrinterSettings.FromPage - 1) : 0;
base.OnBeginPrint(evt);
}
protected override void OnPrintPage(PrintPageEventArgs evt) {
if (_currentPage < _pageCount) {
IntPtr page = PdfiumNative.FPDF_LoadPage(_handle, _currentPage);
double width = PdfiumNative.FPDF_GetPageWidth(page);
double height = PdfiumNative.FPDF_GetPageHeight(page);
int pixelWidth = (int)(width / 72.0 * _dpi);
int pixelHeight = (int)(height / 72.0 * _dpi);
IntPtr bitmap = PdfiumNative.FPDFBitmap_Create(pixelWidth, pixelHeight, 1);
PdfiumNative.FPDF_RenderPageBitmap(bitmap, page, 0, 0, pixelWidth, pixelHeight, 0, 0);
IntPtr buffer = PdfiumNative.FPDFBitmap_GetBuffer(bitmap);
int stride = PdfiumNative.FPDFBitmap_GetStride(bitmap);
using (var bmp = new Bitmap(pixelWidth, pixelHeight, stride, PixelFormat.Format32bppArgb, buffer)) {
evt.Graphics?.DrawImage(bmp, evt.PageBounds);
}
_currentPage++;
PdfiumNative.FPDFBitmap_Destroy(bitmap);
PdfiumNative.FPDF_ClosePage(page);
}
evt.HasMorePages = _currentPage < ((PrinterSettings.ToPage == 0) ? _pageCount : Math.Min(PrinterSettings.ToPage, _pageCount));
base.OnPrintPage(evt);
}
}
internal partial class PdfiumNative {
[LibraryImport("pdfium.dll")]
public static partial void FPDF_InitLibrary();
[LibraryImport("pdfium.dll")]
public static partial void FPDF_DestroyLibrary();
[LibraryImport("pdfium.dll", StringMarshalling = StringMarshalling.Utf8)]
public static partial IntPtr FPDF_LoadDocument(string filePath, string? password);
[LibraryImport("pdfium.dll")]
public static partial void FPDF_CloseDocument(IntPtr document);
[LibraryImport("pdfium.dll")]
public static partial int FPDF_GetPageCount(IntPtr document);
[LibraryImport("pdfium.dll")]
public static partial IntPtr FPDF_LoadPage(IntPtr document, int pageIndex);
[LibraryImport("pdfium.dll")]
public static partial void FPDF_ClosePage(IntPtr page);
[LibraryImport("pdfium.dll")]
public static partial double FPDF_GetPageWidth(IntPtr page);
[LibraryImport("pdfium.dll")]
public static partial double FPDF_GetPageHeight(IntPtr page);
[LibraryImport("pdfium.dll")]
public static partial IntPtr FPDFBitmap_Create(int width, int height, int alpha);
[LibraryImport("pdfium.dll")]
public static partial void FPDFBitmap_Destroy(IntPtr bitmap);
[LibraryImport("pdfium.dll")]
public static partial IntPtr FPDFBitmap_GetBuffer(IntPtr bitmap);
[LibraryImport("pdfium.dll")]
public static partial int FPDFBitmap_GetStride(IntPtr bitmap);
[LibraryImport("pdfium.dll")]
public static partial void FPDF_RenderPageBitmap(IntPtr bitmap, IntPtr page, int start_x, int start_y, int size_x, int size_y, int rotate, int flags);
}
}

View File

@@ -75,6 +75,7 @@ namespace Elwig.Models.Dtos {
public string? Attribute; public string? Attribute;
public string? Cultivation; public string? Cultivation;
public string QualityLevel; public string QualityLevel;
public bool IsDepreciated;
public (double Oe, double Kmw) Gradation; public (double Oe, double Kmw) Gradation;
public string[] Modifiers; public string[] Modifiers;
public int Weight; public int Weight;
@@ -89,17 +90,15 @@ namespace Elwig.Models.Dtos {
Attribute = p.Attribute?.Name; Attribute = p.Attribute?.Name;
Cultivation = p.Cultivation?.Name; Cultivation = p.Cultivation?.Name;
QualityLevel = p.Quality.Name; QualityLevel = p.Quality.Name;
IsDepreciated = p.QualId == "WEI";
Gradation = (p.Oe, p.Kmw); Gradation = (p.Oe, p.Kmw);
Modifiers = p.Modifiers Modifiers = [.. p.Modifiers.Select(m => m.Name)];
.Select(m => m.Name)
.ToArray();
Weight = p.Weight; Weight = p.Weight;
IsNetWeight = p.IsNetWeight; IsNetWeight = p.IsNetWeight;
Buckets = p.Buckets Buckets = [.. p.Buckets
.Where(b => b.Value > 0) .Where(b => b.Value > 0)
.OrderByDescending(b => b.BktNr) .OrderByDescending(b => b.BktNr)
.Select(b => (b.Discr == "_" ? "ungeb." : $"geb. {p.SortId}{b.Discr}", b.Value)) .Select(b => (b.Discr == "_" ? "ungeb." : $"geb. {p.SortId}{b.Discr}", b.Value))];
.ToArray();
} }
} }
} }

View File

@@ -1,6 +1,8 @@
-- schema version 34 to 35 -- schema version 34 to 35
UPDATE client_parameter SET value = '0' WHERE param = 'ENABLE_TIME_TRIGGERS';
ALTER TABLE delivery_part ADD COLUMN unloading TEXT DEFAULT NULL; ALTER TABLE delivery_part ADD COLUMN unloading TEXT DEFAULT NULL;
UPDATE delivery_part SET unloading = 'pumped' WHERE lesewagen; UPDATE delivery_part SET unloading = 'pumped' WHERE lesewagen;
UPDATE delivery_part SET unloading = 'box' WHERE (SELECT zwstid IN ('H','S') FROM delivery d WHERE (d.year, d.did) = (delivery_part.year, delivery_part.did)); UPDATE delivery_part SET unloading = 'box' WHERE (SELECT zwstid IN ('H','S') FROM delivery d WHERE (d.year, d.did) = (delivery_part.year, delivery_part.did));
ALTER TABLE delivery_part DROP COLUMN lesewagen; ALTER TABLE delivery_part DROP COLUMN lesewagen;
UPDATE client_parameter SET value = '1' WHERE param = 'ENABLE_TIME_TRIGGERS';

View File

@@ -0,0 +1,12 @@
-- schema version 36 to 37
UPDATE client_parameter SET value = '0' WHERE param = 'ENABLE_TIME_TRIGGERS';
-- fix old deliveries
UPDATE delivery SET xtime = NULL, mtime = ctime WHERE year <= 2022 AND mtime >= 1768521600 AND mtime < 1772323200;
UPDATE delivery_part SET xtime = NULL, mtime = ctime WHERE year <= 2022 AND mtime >= 1768521600 AND mtime < 1772323200;
-- clear xtime at one laptop to force updates from this one
UPDATE delivery SET xtime = NULL WHERE year >= 2023 AND xtime >= 1771200000 AND xtime < 1771286400;
UPDATE delivery_part SET xtime = NULL WHERE year >= 2023 AND xtime >= 1771200000 AND xtime < 1771286400;
UPDATE client_parameter SET value = '1' WHERE param = 'ENABLE_TIME_TRIGGERS';

View File

@@ -271,7 +271,11 @@ namespace Elwig.Services {
} }
public static async Task<bool> ChangesAvailable(AppDbContext ctx, string url, string username, string password) { public static async Task<bool> ChangesAvailable(AppDbContext ctx, string url, string username, string password) {
try {
return await ctx.Members.AnyAsync(ChangedMembers) || await ctx.Deliveries.AnyAsync(ChangedDeliveries) || (Utils.HasInternetConnectivity() && (await GetFilesToImport(url, username, password)).Count > 0); return await ctx.Members.AnyAsync(ChangedMembers) || await ctx.Deliveries.AnyAsync(ChangedDeliveries) || (Utils.HasInternetConnectivity() && (await GetFilesToImport(url, username, password)).Count > 0);
} catch {
return false;
}
} }
} }
} }

View File

@@ -14,7 +14,7 @@ namespace Elwig.ViewModels {
private IEnumerable<PaymentVar> _paymentVariants = []; private IEnumerable<PaymentVar> _paymentVariants = [];
public BillingData? BillingData; public BillingData? BillingData;
public bool SeasonLocked; public bool SeasonLocked = false; // never locked
public bool WeightModifierChanged; public bool WeightModifierChanged;
[ObservableProperty] [ObservableProperty]

View File

@@ -22,7 +22,7 @@
Programmiersprache: C#<LineBreak/> Programmiersprache: C#<LineBreak/>
Framework: Windows Presentation Framework (WPF)<LineBreak/> Framework: Windows Presentation Framework (WPF)<LineBreak/>
Datenbank: <Hyperlink NavigateUri="https://sqlite.org/" RequestNavigate="Hyperlink_RequestNavigate">SQLite</Hyperlink><LineBreak/> Datenbank: <Hyperlink NavigateUri="https://sqlite.org/" RequestNavigate="Hyperlink_RequestNavigate">SQLite</Hyperlink><LineBreak/>
PDF-Erstellung: <Hyperlink NavigateUri="https://weasyprint.org/" RequestNavigate="Hyperlink_RequestNavigate">WeasyPrint</Hyperlink>, <Hyperlink NavigateUri="https://github.com/toddams/RazorLight" RequestNavigate="Hyperlink_RequestNavigate">RazorLight</Hyperlink>, <Hyperlink NavigateUri="https://github.com/pvginkel/PdfiumViewer" RequestNavigate="Hyperlink_RequestNavigate">PdfiumViewer</Hyperlink><LineBreak/> PDF-Erstellung: <Hyperlink NavigateUri="https://weasyprint.org/" RequestNavigate="Hyperlink_RequestNavigate">WeasyPrint</Hyperlink>, <Hyperlink NavigateUri="https://github.com/toddams/RazorLight" RequestNavigate="Hyperlink_RequestNavigate">RazorLight</Hyperlink>, <Hyperlink NavigateUri="https://github.com/bblanchon/pdfium-binaries" RequestNavigate="Hyperlink_RequestNavigate">Pdfium</Hyperlink><LineBreak/>
Paketierung: <Hyperlink NavigateUri="https://www.firegiant.com/wixtoolset/" RequestNavigate="Hyperlink_RequestNavigate">WiX Toolset</Hyperlink> Paketierung: <Hyperlink NavigateUri="https://www.firegiant.com/wixtoolset/" RequestNavigate="Hyperlink_RequestNavigate">WiX Toolset</Hyperlink>
</TextBlock> </TextBlock>

View File

@@ -69,7 +69,7 @@
Grid.Column="0" Margin="10,8,10,10"/> Grid.Column="0" Margin="10,8,10,10"/>
<ListBox x:Name="AvaiableDocumentsList" <ListBox x:Name="AvaiableDocumentsList"
Grid.Column="0" Margin="10,30,10,10" Grid.Column="0" Margin="10,30,10,10"
SelectionChanged="AvaiableDocumentsList_SelectionChanged"/> SelectionChanged="AvaiableDocumentsList_SelectionChanged" MouseDoubleClick="AvaiableDocumentsList_MouseDoubleClick"/>
<Button x:Name="DocumentAddButton" Content="&#xF0AF;" FontFamily="Segoe MDL2 Assets" FontSize="14" <Button x:Name="DocumentAddButton" Content="&#xF0AF;" FontFamily="Segoe MDL2 Assets" FontSize="14"
Grid.Column="1" Margin="0,0,0,30" VerticalAlignment="Center" Height="25" IsEnabled="False" Grid.Column="1" Margin="0,0,0,30" VerticalAlignment="Center" Height="25" IsEnabled="False"
@@ -82,7 +82,7 @@
Grid.Column="2" Margin="10,8,10,10"/> Grid.Column="2" Margin="10,8,10,10"/>
<ListBox x:Name="SelectedDocumentsList" DisplayMemberPath="Name" <ListBox x:Name="SelectedDocumentsList" DisplayMemberPath="Name"
Grid.Column="2" Margin="10,30,10,37" Grid.Column="2" Margin="10,30,10,37"
SelectionChanged="SelectedDocumentsList_SelectionChanged"> SelectionChanged="SelectedDocumentsList_SelectionChanged" MouseDoubleClick="SelectedDocumentsList_MouseDoubleClick">
<ListBox.InputBindings> <ListBox.InputBindings>
<KeyBinding Key="Delete" Command="{Binding Path=DeleteCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:MailWindow}}}"/> <KeyBinding Key="Delete" Command="{Binding Path=DeleteCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type local:MailWindow}}}"/>
</ListBox.InputBindings> </ListBox.InputBindings>
@@ -138,58 +138,61 @@
<RadioButton GroupName="Recipients" x:Name="RecipientsNonDeliveryMembersInput" Content="Nicht-Lieferanten der Saison" <RadioButton GroupName="Recipients" x:Name="RecipientsNonDeliveryMembersInput" Content="Nicht-Lieferanten der Saison"
Margin="10,90,10,10" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,90,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
Checked="RecipientsInput_Changed" Unchecked="RecipientsInput_Changed"/> Checked="RecipientsInput_Changed" Unchecked="RecipientsInput_Changed"/>
<RadioButton GroupName="Recipients" x:Name="RecipientsCustomInput" Content="Benutzerdefiniert" <RadioButton GroupName="Recipients" x:Name="RecipientsCreditMembersInput" Content="Empfänger von Gutschriften"
Margin="10,110,10,10" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,110,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
Checked="RecipientsInput_Changed" Unchecked="RecipientsInput_Changed"/> Checked="RecipientsInput_Changed" Unchecked="RecipientsInput_Changed"/>
<RadioButton GroupName="Recipients" x:Name="RecipientsCustomInput" Content="Benutzerdefiniert"
Margin="10,130,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
Checked="RecipientsInput_Changed" Unchecked="RecipientsInput_Changed"/>
<Label Content="Zwst.:" x:Name="MemberBranchLabel" Margin="10,140,0,10"/> <Label Content="Zwst.:" x:Name="MemberBranchLabel" Margin="10,160,0,10"/>
<ctrl:CheckComboBox x:Name="MemberBranchInput" AllItemsSelectedContent="Alle Stammzweigstellen" Delimiter=", " DisplayMemberPath="Name" <ctrl:CheckComboBox x:Name="MemberBranchInput" AllItemsSelectedContent="Alle Stammzweigstellen" Delimiter=", " DisplayMemberPath="Name"
Margin="50,140,10,10" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="25" Margin="50,160,10,10" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="25"
SelectionChanged="MemberInput_SelectionChanged"/> SelectionChanged="MemberInput_SelectionChanged"/>
<Label Content="Gem.:" x:Name="MemberKgLabel" Margin="10,170,0,10"/> <Label Content="Gem.:" x:Name="MemberKgLabel" Margin="10,190,0,10"/>
<ctrl:CheckComboBox x:Name="MemberKgInput" AllItemsSelectedContent="Alle Stammgemeinden" Delimiter=", " DisplayMemberPath="Name" <ctrl:CheckComboBox x:Name="MemberKgInput" AllItemsSelectedContent="Alle Stammgemeinden" Delimiter=", " DisplayMemberPath="Name"
IsSelectAllActive="True" SelectAllContent="Alle Stammgemeinden" IsSelectAllActive="True" SelectAllContent="Alle Stammgemeinden"
Margin="50,170,10,10" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="25" Margin="50,190,10,10" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="25"
SelectionChanged="MemberInput_SelectionChanged"/> SelectionChanged="MemberInput_SelectionChanged"/>
<Label Content="Bio-Betrieb:" x:Name="MemberOrganicLabel" Margin="10,200,0,10"/> <Label Content="Bio-Betrieb:" x:Name="MemberOrganicLabel" Margin="10,220,0,10"/>
<RadioButton x:Name="MemberOrganicYesInput" Content="Ja" GroupName="MemberOrganic" <RadioButton x:Name="MemberOrganicYesInput" Content="Ja" GroupName="MemberOrganic"
Margin="80,205,10,10" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="80,225,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
Checked="MemberInput_Checked"/> Checked="MemberInput_Checked"/>
<RadioButton x:Name="MemberOrganicNoInput" Content="Nein" GroupName="MemberOrganic" <RadioButton x:Name="MemberOrganicNoInput" Content="Nein" GroupName="MemberOrganic"
Margin="125,205,10,10" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="125,225,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
Checked="MemberInput_Checked"/> Checked="MemberInput_Checked"/>
<RadioButton x:Name="MemberOrganicIndifferentInput" Content="Egal" GroupName="MemberOrganic" <RadioButton x:Name="MemberOrganicIndifferentInput" Content="Egal" GroupName="MemberOrganic"
Margin="180,205,10,10" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="180,225,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
Checked="MemberInput_Checked"/> Checked="MemberInput_Checked"/>
<Label Content="Funktionär:" x:Name="MemberFunktionärLabel" Margin="10,230,0,10"/> <Label Content="Funktionär:" x:Name="MemberFunktionärLabel" Margin="10,250,0,10"/>
<RadioButton x:Name="MemberFunktionärYesInput" Content="Ja" GroupName="MemberFunktionär" <RadioButton x:Name="MemberFunktionärYesInput" Content="Ja" GroupName="MemberFunktionär"
Margin="80,235,10,10" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="80,255,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
Checked="MemberInput_Checked"/> Checked="MemberInput_Checked"/>
<RadioButton x:Name="MemberFunktionärNoInput" Content="Nein" GroupName="MemberFunktionär" <RadioButton x:Name="MemberFunktionärNoInput" Content="Nein" GroupName="MemberFunktionär"
Margin="125,235,10,10" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="125,255,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
Checked="MemberInput_Checked"/> Checked="MemberInput_Checked"/>
<RadioButton x:Name="MemberFunktionärIndifferentInput" Content="Egal" GroupName="MemberFunktionär" <RadioButton x:Name="MemberFunktionärIndifferentInput" Content="Egal" GroupName="MemberFunktionär"
Margin="180,235,10,10" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="180,255,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
Checked="MemberInput_Checked"/> Checked="MemberInput_Checked"/>
<Label Content="Vtrg.:" x:Name="MemberAreaComLabel" Margin="10,260,0,10"/> <Label Content="Vtrg.:" x:Name="MemberAreaComLabel" Margin="10,280,0,10"/>
<ctrl:CheckComboBox x:Name="MemberAreaComInput" AllItemsSelectedContent="Alle Vertragsarten" Delimiter=", " DisplayMemberPath="VtrgId" <ctrl:CheckComboBox x:Name="MemberAreaComInput" AllItemsSelectedContent="Alle Vertragsarten" Delimiter=", " DisplayMemberPath="VtrgId"
IsSelectAllActive="True" SelectAllContent="Alle Vertragsarten" IsSelectAllActive="True" SelectAllContent="Alle Vertragsarten"
Margin="50,260,10,10" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="25" Margin="50,280,10,10" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="25"
SelectionChanged="MemberInput_SelectionChanged"/> SelectionChanged="MemberInput_SelectionChanged"/>
<Label Content="Tag:" x:Name="MemberDeliveryAncmtLabel" Margin="10,260,0,10"/> <Label Content="Tag:" x:Name="MemberDeliveryAncmtLabel" Margin="10,280,0,10"/>
<ctrl:CheckComboBox x:Name="MemberDeliveryAncmtInput" AllItemsSelectedContent="Alle Lesepläne" Delimiter=", " DisplayMemberPath="Identifier" <ctrl:CheckComboBox x:Name="MemberDeliveryAncmtInput" AllItemsSelectedContent="Alle Lesepläne" Delimiter=", " DisplayMemberPath="Identifier"
IsSelectAllActive="True" SelectAllContent="Alle Lesepläne" IsSelectAllActive="True" SelectAllContent="Alle Lesepläne"
Margin="50,260,10,10" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="25" Margin="50,280,10,10" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="25"
SelectionChanged="MemberInput_SelectionChanged"/> SelectionChanged="MemberInput_SelectionChanged"/>
<ctrl:CheckComboBox x:Name="MemberCustomInput" AllItemsSelectedContent="Alle Mitglieder" Delimiter=", " DisplayMemberPath="AdministrativeName" <ctrl:CheckComboBox x:Name="MemberCustomInput" AllItemsSelectedContent="Alle Mitglieder" Delimiter=", " DisplayMemberPath="AdministrativeName"
IsSelectAllActive="True" SelectAllContent="Alle Mitglieder" IsSelectAllActive="True" SelectAllContent="Alle Mitglieder"
Margin="10,140,10,10" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="25" Margin="10,160,10,10" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="25"
SelectionChanged="MemberInput_SelectionChanged"/> SelectionChanged="MemberInput_SelectionChanged"/>
</Grid> </Grid>
</GroupBox> </GroupBox>

View File

@@ -333,7 +333,35 @@ namespace Elwig.Windows {
} }
} }
private async void DocumentAddButton_Click(object sender, RoutedEventArgs evt) { private void AvaiableDocumentsList_MouseDoubleClick(object sender, MouseEventArgs evt) {
if (evt.LeftButton != MouseButtonState.Pressed) return;
var src = evt.OriginalSource;
if (src is Border b) {
src = (b.Child as ContentPresenter)?.Content.ToString();
} else if (src is TextBlock t) {
src = t.Text;
} else {
return;
}
AvaiableDocumentsList.SelectedIndex = AvaiableDocumentsList.ItemsSource.Cast<object?>().ToList().IndexOf(src);
DocumentAddButton_Click(sender, null);
}
private void SelectedDocumentsList_MouseDoubleClick(object sender, MouseEventArgs evt) {
if (evt.LeftButton != MouseButtonState.Pressed) return;
var src = evt.OriginalSource;
if (src is Border b) {
src = (b.Child as ContentPresenter)?.Content.ToString();
} else if (src is TextBlock t) {
src = t.Text;
} else {
return;
}
SelectedDocumentsList.SelectedItem = SelectedDocs.FirstOrDefault(d => d.Name == (string?)src);
DocumentRemoveButton_Click(sender, null);
}
private async void DocumentAddButton_Click(object sender, RoutedEventArgs? evt) {
var idx = AvaiableDocumentsList.SelectedIndex; var idx = AvaiableDocumentsList.SelectedIndex;
using var ctx = new AppDbContext(); using var ctx = new AppDbContext();
if (AvaiableDocumentsList.SelectedItem is not string s) if (AvaiableDocumentsList.SelectedItem is not string s)
@@ -347,13 +375,13 @@ namespace Elwig.Windows {
var name = s.Split(" ")[^1]; var name = s.Split(" ")[^1];
var pv = await ctx.PaymentVariants.SingleAsync(v => v.Year == Year && v.Name == name)!; var pv = await ctx.PaymentVariants.SingleAsync(v => v.Year == Year && v.Name == name)!;
SelectedDocs.Add(new(DocType.CreditNote, s, (pv.Year, pv.AvNr))); SelectedDocs.Add(new(DocType.CreditNote, s, (pv.Year, pv.AvNr)));
RecipientsDeliveryMembersInput.IsChecked = true; RecipientsCreditMembersInput.IsChecked = true;
} }
SelectedDocumentsList.SelectedIndex = SelectedDocs.Count - 1; SelectedDocumentsList.SelectedIndex = SelectedDocs.Count - 1;
await UpdateRecipients(ctx); await UpdateRecipients(ctx);
} }
private async void DocumentRemoveButton_Click(object sender, RoutedEventArgs evt) { private async void DocumentRemoveButton_Click(object sender, RoutedEventArgs? evt) {
DeleteCommand.Execute(null); DeleteCommand.Execute(null);
using var ctx = new AppDbContext(); using var ctx = new AppDbContext();
await UpdateRecipients(ctx); await UpdateRecipients(ctx);
@@ -456,6 +484,9 @@ namespace Elwig.Windows {
query = query.Where(m => m.IsActive && !m.Deliveries.Any(d => d.Year == Year)); query = query.Where(m => m.IsActive && !m.Deliveries.Any(d => d.Year == Year));
} else if (RecipientsActiveMembersInput.IsChecked == true && SelectedDocs.Any(d => d.Type == DocType.DeliveryConfirmation || d.Type == DocType.CreditNote)) { } else if (RecipientsActiveMembersInput.IsChecked == true && SelectedDocs.Any(d => d.Type == DocType.DeliveryConfirmation || d.Type == DocType.CreditNote)) {
query = query.Where(m => m.IsActive || m.Deliveries.Any(d => d.Year == Year)); query = query.Where(m => m.IsActive || m.Deliveries.Any(d => d.Year == Year));
} else if (RecipientsCreditMembersInput.IsChecked == true) {
var avnrs = SelectedDocs.Where(d => d.Type == DocType.CreditNote).Select(d => (((int,int)?)d.Details)?.Item2).ToList();
query = query.Where(m => m.Credits.Any(c => c.Year == Year && avnrs.Contains(c.AvNr)));
} else { } else {
query = query.Where(m => m.IsActive); query = query.Where(m => m.IsActive);
} }
@@ -756,7 +787,7 @@ namespace Elwig.Windows {
var hasPreviewDocs = memberDocs.Any(m => m.Docs.Any(d => d.Doc.IsPreview)); var hasPreviewDocs = memberDocs.Any(m => m.Docs.Any(d => d.Doc.IsPreview));
if (hasPreviewDocs) { if (hasPreviewDocs) {
var res = MessageBox.Show("Einige der ausgewählten Dokumente sind nur als vorläufig zu betrachten und können daher nicht verschickt/ausgedruckt werden!\n\nDies könnte an einer noch nicht festgesetzen Auszahlungsvariante liegen.\n\nSoll mit dem Generieren fortgefahren werden?", var res = MessageBox.Show("Einige der ausgewählten Dokumente sind nur als vorläufig zu betrachten und können daher nicht verschickt/ausgedruckt werden!\n\nDies könnte an einer noch nicht festgesetzen Auszahlungsvariante liegen oder daran, dass nicht alle Adressaten/Empfänger eine Traubengutschrift erhalten\n(\"Empfänger von Gutschriften\").\n\nSoll mit dem Generieren fortgefahren werden?",
"Vorläufige Dokumente", MessageBoxButton.OKCancel, MessageBoxImage.Warning, MessageBoxResult.Cancel); "Vorläufige Dokumente", MessageBoxButton.OKCancel, MessageBoxImage.Warning, MessageBoxResult.Cancel);
if (res != MessageBoxResult.OK) { if (res != MessageBoxResult.OK) {
UnlockInputs(); UnlockInputs();
@@ -1014,7 +1045,7 @@ namespace Elwig.Windows {
var pv = ctx.PaymentVariants.Single(v => v.Year == Year && v.Name == name)!; var pv = ctx.PaymentVariants.Single(v => v.Year == Year && v.Name == name)!;
SelectedDocs.Add(new(DocType.CreditNote, s, (pv.Year, pv.AvNr))); SelectedDocs.Add(new(DocType.CreditNote, s, (pv.Year, pv.AvNr)));
SelectedDocumentsList.SelectedIndex = SelectedDocs.Count - 1; SelectedDocumentsList.SelectedIndex = SelectedDocs.Count - 1;
RecipientsDeliveryMembersInput.IsChecked = true; RecipientsCreditMembersInput.IsChecked = true;
} }
private void DocumentInput_TextChanged(object sender, TextChangedEventArgs evt) { private void DocumentInput_TextChanged(object sender, TextChangedEventArgs evt) {

View File

@@ -248,7 +248,7 @@
<Button x:Name="BreakdownButton" <Button x:Name="BreakdownButton"
Click="BreakdownButton_Click" Click="BreakdownButton_Click"
Margin="195,90,0,10" Width="190" Padding="3,5,5,5" Margin="195,90,0,10" Width="190" Padding="3,5,5,5"
ToolTip="Aufschlüsselung der Menge nach Zweigstelle, Mitglied, Sorte, Attribut/Bewirt., Qualitätsstufe, gebunden/ungebunden"> ToolTip="Aufschlüsselung der Menge nach Zweigstelle, Sorte, Attribut/Bewirt., Qualitätsstufe, gebunden/ungebunden">
<Grid> <Grid>
<TextBlock FontFamily="Segoe MDL2 Assets" FontSize="16" Text="&#xE9F9;" <TextBlock FontFamily="Segoe MDL2 Assets" FontSize="16" Text="&#xE9F9;"
TextAlignment="Left" HorizontalAlignment="Left" Padding="6.5,0.5,0,0"/> TextAlignment="Left" HorizontalAlignment="Left" Padding="6.5,0.5,0,0"/>

View File

@@ -16,16 +16,14 @@ namespace Elwig.Windows {
public partial class PaymentAdjustmentWindow : ContextWindow { public partial class PaymentAdjustmentWindow : ContextWindow {
public readonly int Year; public readonly int Year;
public readonly bool SeasonLocked; public readonly bool SeasonLocked = false; // never locked
public Dictionary<int, PaymentCustom>? CustomPayments; public Dictionary<int, PaymentCustom>? CustomPayments;
public PaymentAdjustmentWindow(int year) { public PaymentAdjustmentWindow(int year) {
InitializeComponent(); InitializeComponent();
Year = year; Year = year;
using (var ctx = new AppDbContext()) { // using (var ctx = new AppDbContext()) { SeasonLocked = ctx.Seasons.Find(Year + 1) != null; }
SeasonLocked = ctx.Seasons.Find(Year + 1) != null;
}
Title = $"Auszahlung anpassen - Lese {Year} - Elwig"; Title = $"Auszahlung anpassen - Lese {Year} - Elwig";
AutoAdjustBsButton.IsEnabled = !SeasonLocked; AutoAdjustBsButton.IsEnabled = !SeasonLocked;
UnAdjustBsButton.IsEnabled = !SeasonLocked; UnAdjustBsButton.IsEnabled = !SeasonLocked;

View File

@@ -1,12 +1,9 @@
using Elwig.Helpers; using Elwig.Helpers;
using Elwig.Helpers.Billing; using Elwig.Helpers.Billing;
using Elwig.Helpers.Export;
using Elwig.Models.Dtos;
using Elwig.Models.Entities; using Elwig.Models.Entities;
using Elwig.Services; using Elwig.Services;
using Elwig.ViewModels; using Elwig.ViewModels;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Win32;
using System; using System;
using System.Linq; using System.Linq;
using System.Text.Json; using System.Text.Json;
@@ -35,9 +32,7 @@ namespace Elwig.Windows {
CommandBindings.Add(new CommandBinding(CtrlÜ, Menu_EbicsSave_Click)); CommandBindings.Add(new CommandBinding(CtrlÜ, Menu_EbicsSave_Click));
CommandBindings.Add(new CommandBinding(CtrlShiftP, Menu_SummaryPrint_Click)); CommandBindings.Add(new CommandBinding(CtrlShiftP, Menu_SummaryPrint_Click));
Year = year; Year = year;
using (var ctx = new AppDbContext()) { // using (var ctx = new AppDbContext()) { ViewModel.SeasonLocked = ctx.Seasons.Find(Year + 1) != null; }
ViewModel.SeasonLocked = ctx.Seasons.Find(Year + 1) != null;
}
Title = $"Auszahlungsvarianten - Lese {Year} - Elwig"; Title = $"Auszahlungsvarianten - Lese {Year} - Elwig";
if (!App.Config.Debug) { if (!App.Config.Debug) {
DataInput.Visibility = Visibility.Hidden; DataInput.Visibility = Visibility.Hidden;

View File

@@ -13,7 +13,7 @@ About
**Product:** Elwig **Product:** Elwig
**Description:** Electronic Management for Vintners' Cooperatives **Description:** Electronic Management for Vintners' Cooperatives
**Type:** ERP system **Type:** ERP system
**Version:** 1.0.3.2 ([Changelog](./CHANGELOG.md)) **Version:** 1.0.3.4 ([Changelog](./CHANGELOG.md))
**License:** [GNU General Public License 3.0 (GPLv3)](./LICENSE) **License:** [GNU General Public License 3.0 (GPLv3)](./LICENSE)
**Website:** https://elwig.at/ **Website:** https://elwig.at/
**Source code:** https://git.necronda.net/winzer/elwig **Source code:** https://git.necronda.net/winzer/elwig
@@ -33,7 +33,7 @@ Packaging: [WiX Toolset](https://www.firegiant.com/wixtoolset/)
**Produkt:** Elwig **Produkt:** Elwig
**Beschreibung:** Elektronische Winzergenossenschaftsverwaltung **Beschreibung:** Elektronische Winzergenossenschaftsverwaltung
**Typ:** Warenwirtschaftssystem (ERP-System) **Typ:** Warenwirtschaftssystem (ERP-System)
**Version:** 1.0.3.2 ([Änderungsprotokoll](./CHANGELOG.md)) **Version:** 1.0.3.4 ([Änderungsprotokoll](./CHANGELOG.md))
**Lizenz:** [GNU General Public License 3.0 (GPLv3)](./LICENSE) **Lizenz:** [GNU General Public License 3.0 (GPLv3)](./LICENSE)
**Website:** https://elwig.at/ **Website:** https://elwig.at/
**Quellcode:** https://git.necronda.net/winzer/elwig **Quellcode:** https://git.necronda.net/winzer/elwig
@@ -43,5 +43,5 @@ Packaging: [WiX Toolset](https://www.firegiant.com/wixtoolset/)
Programmiersprache: C# Programmiersprache: C#
Framework: Windows Presentation Framework (WPF) Framework: Windows Presentation Framework (WPF)
Datenbank: [SQLite](https://sqlite.org/) Datenbank: [SQLite](https://sqlite.org/)
PDF-Erstellung: [WeasyPrint](https://weasyprint.org/), [RazorLight](https://github.com/toddams/RazorLight), [PdfiumViewer](https://github.com/pvginkel/PdfiumViewer) PDF-Erstellung: [WeasyPrint](https://weasyprint.org/), [RazorLight](https://github.com/toddams/RazorLight), [Pdfium](https://github.com/bblanchon/pdfium-binaries)
Paketierung: [WiX Toolset](https://www.firegiant.com/wixtoolset/) Paketierung: [WiX Toolset](https://www.firegiant.com/wixtoolset/)

View File

@@ -22,13 +22,13 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="Appium.WebDriver" Version="4.4.5" /> <PackageReference Include="Appium.WebDriver" Version="4.4.5" />
<PackageReference Include="NReco.PdfRenderer" Version="1.6.0" /> <PackageReference Include="NReco.PdfRenderer" Version="1.6.0" />
<PackageReference Include="NUnit" Version="4.4.0" /> <PackageReference Include="NUnit" Version="4.5.0" />
<PackageReference Include="NUnit3TestAdapter" Version="6.1.0" /> <PackageReference Include="NUnit3TestAdapter" Version="6.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.11.2"> <PackageReference Include="NUnit.Analyzers" Version="4.11.2">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.4"> <PackageReference Include="coverlet.collector" Version="8.0.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>