Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
163fe0fac8 | ||
|
|
edf3678154 | ||
|
|
f450dc35b1 | ||
|
|
0c4611024f | ||
|
|
46e596ae23 | ||
|
|
3366cc25eb | ||
|
|
ff71e9fb7f | ||
|
|
7d5d7d9307 | ||
|
|
b468bbce31 |
@@ -2,6 +2,38 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
[v1.1.1.2][v1.1.1.2] (2026-08-25) {#v1.1.1.2}
|
||||
---------------------------------------------
|
||||
|
||||
### Sonstiges {#v1.1.1.2-misc}
|
||||
|
||||
* In Matzen werden für Planenw./Kipper und Lesewagen die Klassen automatisch gesetzt. (3366cc25eb)
|
||||
* Im Lieferungen-Fenster (`DeliveryAdminWindow`) wird für "Nur heute" nicht mehr nur das Datum, sondern die letzten zusammenhängenden Lieferungen verwendet. (46e596ae23)
|
||||
* Für Pamhagen wird als standard Wiege-Methode "brutto" verwendet. (0c4611024f)
|
||||
* Für Waagen kann das automatische setzen von Datum und Uhrzeit nun per Opt-out ausgeschalten werden (Konfigurationsdatei -> `[scale.X]` -> `synctime = false`). (f450dc35b1)
|
||||
|
||||
### Behobene Fehler {#v1.1.1.2-bugfixes}
|
||||
|
||||
* Auf Lieferscheinen (`DeliveryNote`) waren die Mengenangaben nicht rechtsbündig. (ff71e9fb7f)
|
||||
* Beim Importieren von Mitgliedern mit Stamm-KG ohne Großlage kam es zu einem Fehler, obwohl die Großlage automatisch hätte zugewiesen werden müssen. (edf3678154)
|
||||
|
||||
[v1.1.1.2]: https://git.necronda.net/winzer/elwig/releases/tag/v1.1.1.2
|
||||
|
||||
|
||||
|
||||
|
||||
[v1.1.1.1][v1.1.1.1] (2026-08-24) {#v1.1.1.1}
|
||||
---------------------------------------------
|
||||
|
||||
### Sonstiges {#v1.1.1.1-misc}
|
||||
|
||||
* Beim Export der Flächenbindungen im Haupt-Fenster (`MainWindow`) werden neben der zusammengefassten gebundenen Fläche nun auch die jeweiligen Flächenindungen exportiert. (b468bbce31)
|
||||
|
||||
[v1.1.1.1]: https://git.necronda.net/winzer/elwig/releases/tag/v1.1.1.1
|
||||
|
||||
|
||||
|
||||
|
||||
[v1.1.1.0][v1.1.1.0] (2026-08-19) {#v1.1.1.0}
|
||||
---------------------------------------------
|
||||
|
||||
|
||||
+2
-2
@@ -146,7 +146,7 @@ namespace Elwig {
|
||||
foreach (var s in Config.Scales) {
|
||||
try {
|
||||
var scale = Scale.FromConfig(s);
|
||||
if (scale is ICommandScale cmd) {
|
||||
if (s.SyncTime && scale is ICommandScale cmd) {
|
||||
try {
|
||||
await cmd.SetDateAndTime(DateTime.Now);
|
||||
} catch { }
|
||||
@@ -179,7 +179,7 @@ namespace Elwig {
|
||||
Config.WeighingMode = WeighingMode.Net;
|
||||
} else if (Client.IsHaugsdorf || Client.IsSitzendorf) {
|
||||
Config.WeighingMode = WeighingMode.Box;
|
||||
} else if (Client.IsBaden || Client.IsGrInzersdorf) {
|
||||
} else if (Client.IsBaden || Client.IsGrInzersdorf || Client.IsPamhagen) {
|
||||
Config.WeighingMode = WeighingMode.Gross;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace Elwig.Documents {
|
||||
.AddCell(NewDeliveryMainTd(part.Quality.Name))
|
||||
.AddCell(NewDeliveryMainTd($"{part.Oe:N0}", center: true))
|
||||
.AddCell(NewDeliveryMainTd($"{part.Kmw:N1}", center: true))
|
||||
.AddCell(NewDeliveryMainTd($"{part.Weight:N0}", center: true));
|
||||
.AddCell(NewDeliveryMainTd($"{part.Weight:N0}", right: true));
|
||||
|
||||
if (part.Cultivation != null) {
|
||||
var cult = new KernedParagraph(8);
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Elwig.Documents {
|
||||
public Document(string title) {
|
||||
Title = title;
|
||||
Author = App.Client.NameFull;
|
||||
Date = DateOnly.FromDateTime(Utils.Today);
|
||||
Date = DateOnly.FromDateTime(DateTime.Today);
|
||||
}
|
||||
|
||||
~Document() {
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
|
||||
<Version>1.1.1.0</Version>
|
||||
<Version>1.1.1.2</Version>
|
||||
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ApplicationManifest>App.manifest</ApplicationManifest>
|
||||
|
||||
@@ -69,7 +69,8 @@ namespace Elwig.Helpers {
|
||||
public DbSet<OverUnderDeliveryRow> OverUnderDeliveryRows { get; private set; }
|
||||
public DbSet<AreaComUnderDeliveryRowSingle> AreaComUnderDeliveryRows { get; private set; }
|
||||
public DbSet<MemberDeliveryPerVarietyRowSingle> MemberDeliveryPerVariantRows { get; private set; }
|
||||
public DbSet<MemberAreaComsRowSingle> MemberAreaComsRows { get; private set; }
|
||||
public DbSet<MemberAreaComTotalsRowSingle> MemberAreaComTotalsRows { get; private set; }
|
||||
public DbSet<MemberAreaComsRow> MemberAreaComsRows { get; private set; }
|
||||
public DbSet<CreditNoteDeliveryRowSingle> CreditNoteDeliveryRows { get; private set; }
|
||||
public DbSet<CreditNoteRowSingle> CreditNoteRows { get; private set; }
|
||||
public DbSet<WeightBreakdownRow> WeightBreakDownRows { get; private set; }
|
||||
|
||||
@@ -17,10 +17,11 @@ namespace Elwig.Helpers {
|
||||
public string? Filling;
|
||||
public string? Limit;
|
||||
public bool Required;
|
||||
public bool SyncTime;
|
||||
public string? Log;
|
||||
public string? _Log;
|
||||
|
||||
public ScaleConfig(string id, string? type, string? model, string? cnx, string? empty, string? filling, string? limit, bool? required, string? log) {
|
||||
public ScaleConfig(string id, string? type, string? model, string? cnx, string? empty, string? filling, string? limit, bool? required, bool? syncTime, string? log) {
|
||||
Id = id;
|
||||
Type = type;
|
||||
Model = model;
|
||||
@@ -29,6 +30,7 @@ namespace Elwig.Helpers {
|
||||
Filling = filling;
|
||||
Limit = limit;
|
||||
Required = required ?? true;
|
||||
SyncTime = syncTime ?? true;
|
||||
_Log = log;
|
||||
Log = log != null ? Path.Combine(App.DataPath, log) : null;
|
||||
}
|
||||
@@ -37,11 +39,12 @@ namespace Elwig.Helpers {
|
||||
public class Config {
|
||||
|
||||
private static readonly string[] TrueValues = ["1", "true", "yes", "on"];
|
||||
private static readonly string[] FalseValues = ["0", "false", "no", "off"];
|
||||
|
||||
private readonly string FileName;
|
||||
|
||||
public bool Debug;
|
||||
public string DatabaseFile = App.DataPath + "database.sqlite3";
|
||||
public string DatabaseFile = Path.Combine(App.DataPath, "database.sqlite3");
|
||||
public string? DatabaseLog = null;
|
||||
public string? Branch = null;
|
||||
public WeighingMode? WeighingMode;
|
||||
@@ -105,6 +108,7 @@ namespace Elwig.Helpers {
|
||||
s, config[$"scale.{s}:type"], config[$"scale.{s}:model"], config[$"scale.{s}:connection"],
|
||||
config[$"scale.{s}:empty"], config[$"scale.{s}:filling"], config[$"scale.{s}:limit"],
|
||||
config[$"scale.{s}:required"] != null ? TrueValues.Contains(config[$"scale.{s}:required"]?.ToLower()) : null,
|
||||
config[$"scale.{s}:synctime"] != null ? !FalseValues.Contains(config[$"scale.{s}:synctime"]?.ToLower()) : null,
|
||||
config[$"scale.{s}:log"]
|
||||
));
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace Elwig.Helpers.Export {
|
||||
public static class ElwigData {
|
||||
@@ -36,14 +35,16 @@ namespace Elwig.Helpers.Export {
|
||||
public static async Task Import(IEnumerable<string> filenames, ImportMode mode) {
|
||||
try {
|
||||
Dictionary<string, Branch> branches;
|
||||
Dictionary<int, AT_Kg> kgs;
|
||||
Dictionary<int, int> currentDids;
|
||||
Dictionary<string, int> currentLsNrs;
|
||||
Dictionary<int, List<WbRd>> currentWbRde;
|
||||
Dictionary<int, AT_Kg> kgs;
|
||||
Dictionary<int, WbKg> currentWbKgs;
|
||||
List<WbGl> currentWbGls;
|
||||
|
||||
using (var ctx = new AppDbContext()) {
|
||||
branches = await ctx.FetchBranches().ToDictionaryAsync(b => b.ZwstId);
|
||||
kgs = await ctx.Katastralgemeinden.ToDictionaryAsync(k => k.KgNr);
|
||||
currentDids = await ctx.Deliveries
|
||||
.GroupBy(d => d.Year)
|
||||
.ToDictionaryAsync(g => g.Key, g => g.Max(d => d.DId));
|
||||
@@ -52,8 +53,8 @@ namespace Elwig.Helpers.Export {
|
||||
currentWbRde = await ctx.WbRde
|
||||
.GroupBy(r => r.KgNr)
|
||||
.ToDictionaryAsync(g => g.Key, g => g.ToList());
|
||||
currentWbKgs = await ctx.WbKgs.ToDictionaryAsync(k => k.KgNr);
|
||||
currentWbGls = await ctx.WbGls.ToListAsync();
|
||||
kgs = await ctx.Katastralgemeinden.Include(k => k.WbKg).ToDictionaryAsync(k => k.KgNr);
|
||||
}
|
||||
|
||||
var data = new List<(
|
||||
@@ -122,6 +123,7 @@ namespace Elwig.Helpers.Export {
|
||||
var obj = JsonNode.Parse(line)!.AsObject();
|
||||
var (k, g) = obj.ToWbKg(currentWbGls);
|
||||
r.WbKgs.Add(k);
|
||||
currentWbKgs[k.KgNr] = k;
|
||||
if (g != null) {
|
||||
currentWbGls[g.GlNr] = g;
|
||||
r.WbGls.Add(g);
|
||||
@@ -135,7 +137,7 @@ namespace Elwig.Helpers.Export {
|
||||
string? line;
|
||||
while ((line = await reader.ReadLineAsync()) != null) {
|
||||
var obj = JsonNode.Parse(line)!.AsObject();
|
||||
var (m, b, telNrs, emailAddrs, timestamps) = obj.ToMember(kgs);
|
||||
var (m, b, telNrs, emailAddrs, timestamps) = obj.ToMember(kgs, currentWbKgs);
|
||||
r.Members.Add(m);
|
||||
if (b != null) r.BillingAddresses.Add(b);
|
||||
r.TelephoneNumbers.AddRange(telNrs);
|
||||
@@ -163,7 +165,7 @@ namespace Elwig.Helpers.Export {
|
||||
string? line;
|
||||
while ((line = await reader.ReadLineAsync()) != null) {
|
||||
var obj = JsonNode.Parse(line)!.AsObject();
|
||||
var (contract, areaCom, wbrd, timestamps) = obj.ToAreaCom(currentWbRde);
|
||||
var (contract, areaCom, wbrd, timestamps) = obj.ToAreaCom(kgs, currentWbKgs, currentWbRde);
|
||||
r.Contracts.Add(contract);
|
||||
r.AreaCommitments.Add(areaCom);
|
||||
if (wbrd != null) {
|
||||
@@ -182,7 +184,7 @@ namespace Elwig.Helpers.Export {
|
||||
string? line;
|
||||
while ((line = await reader.ReadLineAsync()) != null) {
|
||||
var obj = JsonNode.Parse(line)!.AsObject();
|
||||
var (contract, areaComs, wbrd, timestamps) = obj.ToAreaComContract(currentWbRde);
|
||||
var (contract, areaComs, wbrd, timestamps) = obj.ToAreaComContract(kgs, currentWbKgs, currentWbRde);
|
||||
r.Contracts.Add(contract);
|
||||
r.AreaCommitments.AddRange(areaComs.Select(v => v.Item1));
|
||||
if (wbrd != null) {
|
||||
@@ -203,7 +205,7 @@ namespace Elwig.Helpers.Export {
|
||||
string? line;
|
||||
while ((line = await reader.ReadLineAsync()) != null) {
|
||||
var obj = JsonNode.Parse(line)!.AsObject();
|
||||
var (d, parts, mods, rde, timestamps) = obj.ToDelivery(currentLsNrs, currentDids, kgs, currentWbRde);
|
||||
var (d, parts, mods, rde, timestamps) = obj.ToDelivery(currentLsNrs, currentDids, kgs, currentWbKgs, currentWbRde);
|
||||
r.Deliveries.Add(d);
|
||||
r.DeliveryParts.AddRange(parts.Select(p => p.Item1));
|
||||
r.Modifiers.AddRange(mods);
|
||||
@@ -680,11 +682,11 @@ namespace Elwig.Helpers.Export {
|
||||
};
|
||||
}
|
||||
|
||||
public static (Member, BillingAddr?, List<MemberTelNr>, List<MemberEmailAddr>, (DateTime CreatedAt, DateTime ModifiedAt)?) ToMember(this JsonNode json, Dictionary<int, AT_Kg> kgs) {
|
||||
public static (Member, BillingAddr?, List<MemberTelNr>, List<MemberEmailAddr>, (DateTime CreatedAt, DateTime ModifiedAt)?) ToMember(this JsonNode json, Dictionary<int, AT_Kg> kgs, Dictionary<int, WbKg> currentWbKgs) {
|
||||
var mgnr = json["mgnr"]!.AsValue().GetValue<int>();
|
||||
var kgnr = json["default_kgnr"]?.AsValue().GetValue<int>();
|
||||
if (kgnr != null && !kgs.Values.Any(k => k.WbKg?.KgNr == kgnr)) {
|
||||
throw new ArgumentException($"Für KG {(kgs.TryGetValue(kgnr.Value, out var k) ? k.Name : "?")} ({kgnr:00000}) ist noch keine Großlage festgelegt!\n(Stammdaten → Herkunftshierarchie)");
|
||||
if (kgnr != null && !currentWbKgs.Values.Any(k => k.KgNr == kgnr)) {
|
||||
throw new KeyNotFoundException($"Für KG {(kgs.TryGetValue(kgnr.Value, out var k) ? k.Name : "?")} ({kgnr:00000}) ist noch keine Großlage festgelegt!\n(Stammdaten \u2192 Herkunftshierarchie)");
|
||||
}
|
||||
var createdAt = json["created_at"]?.AsValue().GetValue<string>();
|
||||
var modifiedAt = json["modified_at"]?.AsValue().GetValue<string>();
|
||||
@@ -815,10 +817,13 @@ namespace Elwig.Helpers.Export {
|
||||
};
|
||||
}
|
||||
|
||||
public static (AreaComContract, List<(AreaCom, (DateTime CreatedAt, DateTime ModifiedAt)?)>, WbRd?, (DateTime CreatedAt, DateTime ModifiedAt)?) ToAreaComContract(this JsonNode json, Dictionary<int, List<WbRd>> riede) {
|
||||
public static (AreaComContract, List<(AreaCom, (DateTime CreatedAt, DateTime ModifiedAt)?)>, WbRd?, (DateTime CreatedAt, DateTime ModifiedAt)?) ToAreaComContract(this JsonNode json, Dictionary<int, AT_Kg> kgs, Dictionary<int, WbKg> currentWbKgs, Dictionary<int, List<WbRd>> riede) {
|
||||
var kgnr = json["kgnr"]!.AsValue().GetValue<int>();
|
||||
var ried = json["ried"]?.AsValue().GetValue<string>();
|
||||
var fbnr = json["fbnr"]!.AsValue()!.GetValue<int>();
|
||||
if (!currentWbKgs.Values.Any(k => k.KgNr == kgnr)) {
|
||||
throw new KeyNotFoundException($"Für KG {(kgs.TryGetValue(kgnr, out var k) ? k.Name : "?")} ({kgnr:00000}) ist noch keine Großlage festgelegt!\n(Stammdaten \u2192 Herkunftshierarchie)");
|
||||
}
|
||||
WbRd? rd = null;
|
||||
bool newRd = false;
|
||||
if (ried != null) {
|
||||
@@ -866,9 +871,12 @@ namespace Elwig.Helpers.Export {
|
||||
DateTime.ParseExact(modifiedAt, "yyyy-MM-ddTHH:mm:ssK", CultureInfo.InvariantCulture, DateTimeStyles.None)));
|
||||
}
|
||||
|
||||
public static (AreaComContract, AreaCom, WbRd?, (DateTime CreatedAt, DateTime ModifiedAt)?) ToAreaCom(this JsonNode json, Dictionary<int, List<WbRd>> riede) {
|
||||
public static (AreaComContract, AreaCom, WbRd?, (DateTime CreatedAt, DateTime ModifiedAt)?) ToAreaCom(this JsonNode json, Dictionary<int, AT_Kg> kgs, Dictionary<int, WbKg> currentWbKgs, Dictionary<int, List<WbRd>> riede) {
|
||||
var kgnr = json["kgnr"]!.AsValue().GetValue<int>();
|
||||
var ried = json["ried"]?.AsValue().GetValue<string>();
|
||||
if (!currentWbKgs.Values.Any(k => k.KgNr == kgnr)) {
|
||||
throw new KeyNotFoundException($"Für KG {(kgs.TryGetValue(kgnr, out var k) ? k.Name : "?")} ({kgnr:00000}) ist noch keine Großlage festgelegt!\n(Stammdaten \u2192 Herkunftshierarchie)");
|
||||
}
|
||||
WbRd? rd = null;
|
||||
bool newRd = false;
|
||||
if (ried != null) {
|
||||
@@ -957,7 +965,7 @@ namespace Elwig.Helpers.Export {
|
||||
return obj;
|
||||
}
|
||||
|
||||
public static (Delivery, List<(DeliveryPart, (DateTime CreatedAt, DateTime ModifiedAt)?)>, List<DeliveryPartModifier>, List<WbRd>, (DateTime CreatedAt, DateTime ModifiedAt)?) ToDelivery(this JsonNode json, Dictionary<string, int> currentLsNrs, Dictionary<int, int> currentDids, Dictionary<int, AT_Kg> kgs, Dictionary<int, List<WbRd>> riede) {
|
||||
public static (Delivery, List<(DeliveryPart, (DateTime CreatedAt, DateTime ModifiedAt)?)>, List<DeliveryPartModifier>, List<WbRd>, (DateTime CreatedAt, DateTime ModifiedAt)?) ToDelivery(this JsonNode json, Dictionary<string, int> currentLsNrs, Dictionary<int, int> currentDids, Dictionary<int, AT_Kg> kgs, Dictionary<int, WbKg> currentWbKgs, Dictionary<int, List<WbRd>> riede) {
|
||||
var year = json["year"]!.AsValue().GetValue<int>();
|
||||
var lsnr = json["lsnr"]!.AsValue().GetValue<string>();
|
||||
var did = currentLsNrs.GetValueOrDefault(lsnr, -1);
|
||||
@@ -983,6 +991,9 @@ namespace Elwig.Helpers.Export {
|
||||
}, [.. json["parts"]!.AsArray().Select(p => p!.AsObject()).Select<JsonObject, (DeliveryPart, (DateTime, DateTime)?)>(p => {
|
||||
var kgnr = p["kgnr"]?.AsValue().GetValue<int>();
|
||||
var ried = p["ried"]?.AsValue().GetValue<string>();
|
||||
if (kgnr != null && !currentWbKgs.Values.Any(k => k.KgNr == kgnr)) {
|
||||
throw new KeyNotFoundException($"Für KG {(kgs.TryGetValue(kgnr.Value, out var k) ? k.Name : "?")} ({kgnr:00000}) ist noch keine Großlage festgelegt!\n(Stammdaten \u2192 Herkunftshierarchie)");
|
||||
}
|
||||
WbRd? rd = null;
|
||||
if (ried != null && kgnr != null) {
|
||||
var rde = riede.GetValueOrDefault(kgnr.Value, []);
|
||||
|
||||
@@ -45,7 +45,6 @@ namespace Elwig.Helpers {
|
||||
public static int CurrentNextSeason => DateTime.Now.Year - (DateTime.Now.Month <= 3 ? 1 : 0);
|
||||
public static int CurrentLastSeason => DateTime.Now.Year - (DateTime.Now.Month <= 6 ? 1 : 0);
|
||||
public static int FollowingSeason => DateTime.Now.Year + (DateTime.Now.Month >= 11 ? 1 : 0);
|
||||
public static DateTime Today => (DateTime.Now.Hour >= 3) ? DateTime.Today : DateTime.Today.AddDays(-1);
|
||||
|
||||
[GeneratedRegex("^serial://([A-Za-z0-9]+):([0-9]+)(,([5-9]),([NOEMSnoems]),(0|1|1\\.5|2|))?$", RegexOptions.Compiled)]
|
||||
private static partial Regex GeneratedSerialRegex();
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Elwig.Models.Dtos {
|
||||
class MemberAreaComTotalsData : DataTable<MemberAreaComTotalsRow> {
|
||||
|
||||
private static readonly (string, string, string?, int)[] FieldNames = [
|
||||
("MgNr", "MgNr.", null, 12),
|
||||
("Name1", "Name", null, 40),
|
||||
("Name2", "Vorname", null, 40),
|
||||
("Address", "Adresse", null, 60),
|
||||
("Plz", "PLZ", null, 10),
|
||||
("Locality", "Ort", null, 60),
|
||||
("SortIds", "Sorte", null, 12),
|
||||
("AttrIds", "Attribut", null, 16),
|
||||
("Areas", "Fläche", "m²", 22),
|
||||
("DeliveryObligations", "Lieferpflicht", "kg", 22),
|
||||
("DeliveryRights", "Lieferrecht", "kg", 22),
|
||||
];
|
||||
|
||||
public MemberAreaComTotalsData(IEnumerable<MemberAreaComTotalsRow> rows, int year) :
|
||||
base($"Gebundene Fläche", $"Gebundene Fläche pro Mitglied {year}", rows, FieldNames) {
|
||||
}
|
||||
|
||||
public static async Task<MemberAreaComTotalsData> ForSeason(DbSet<MemberAreaComTotalsRowSingle> table, int year) {
|
||||
return new MemberAreaComTotalsData(
|
||||
(await FromDbSet(table, year)).GroupBy(
|
||||
r => r.MgNr,
|
||||
(k, g) => new MemberAreaComTotalsRow(g)
|
||||
), year);
|
||||
}
|
||||
|
||||
private static async Task<IEnumerable<MemberAreaComTotalsRowSingle>> FromDbSet(DbSet<MemberAreaComTotalsRowSingle> table, int year) {
|
||||
return await table.FromSql($"""
|
||||
SELECT m.mgnr, m.name AS name_1,
|
||||
COALESCE(m.prefix || ' ', '') || m.given_name ||
|
||||
COALESCE(' ' || m.middle_names, '') || COALESCE(' ' || m.suffix, '') AS name_2,
|
||||
p.plz, o.name AS ort, m.address,
|
||||
c.bucket, c.area, c.min_kg, c.max_kg
|
||||
FROM v_area_commitment_bucket_strict c
|
||||
LEFT JOIN member m ON m.mgnr = c.mgnr
|
||||
LEFT JOIN AT_plz_dest p ON p.id = m.postal_dest
|
||||
LEFT JOIN AT_ort o ON o.okz = p.okz
|
||||
WHERE c.year = {year}
|
||||
ORDER BY m.mgnr, c.bucket
|
||||
""").ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
public class MemberAreaComTotalsRow {
|
||||
public int MgNr;
|
||||
public string Name1;
|
||||
public string? Name2;
|
||||
public string Address;
|
||||
public int Plz;
|
||||
public string Locality;
|
||||
public string[] SortIds;
|
||||
public string[] AttrIds;
|
||||
public int[] Areas;
|
||||
public int[] DeliveryObligations;
|
||||
public int[] DeliveryRights;
|
||||
|
||||
public MemberAreaComTotalsRow(IEnumerable<MemberAreaComTotalsRowSingle> rows) {
|
||||
var f = rows.First();
|
||||
MgNr = f.MgNr;
|
||||
Name1 = f.Name1;
|
||||
Name2 = f.Name2;
|
||||
Address = f.Address;
|
||||
Plz = f.Plz;
|
||||
Locality = f.Locality.Split(",")[0];
|
||||
SortIds = [.. rows.Select(r => r.VtrgId[..2])];
|
||||
AttrIds = [.. rows.Select(r => r.VtrgId[2..])];
|
||||
Areas = [.. rows.Select(r => r.Area)];
|
||||
DeliveryObligations = [.. rows.Select(r => r.MinKg)];
|
||||
DeliveryRights = [.. rows.Select(r => r.MaxKg)];
|
||||
}
|
||||
}
|
||||
|
||||
[Keyless]
|
||||
public class MemberAreaComTotalsRowSingle {
|
||||
[Column("mgnr")]
|
||||
public int MgNr { get; set; }
|
||||
[Column("name_1")]
|
||||
public required string Name1 { get; set; }
|
||||
[Column("name_2")]
|
||||
public string? Name2 { get; set; }
|
||||
[Column("address")]
|
||||
public required string Address { get; set; }
|
||||
[Column("plz")]
|
||||
public int Plz { get; set; }
|
||||
[Column("ort")]
|
||||
public required string Locality { get; set; }
|
||||
[Column("bucket")]
|
||||
public required string VtrgId { get; set; }
|
||||
[Column("area")]
|
||||
public int Area { get; set; }
|
||||
[Column("min_kg")]
|
||||
public int MinKg { get; set; }
|
||||
[Column("max_kg")]
|
||||
public int MaxKg { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -14,73 +14,49 @@ namespace Elwig.Models.Dtos {
|
||||
("Address", "Adresse", null, 60),
|
||||
("Plz", "PLZ", null, 10),
|
||||
("Locality", "Ort", null, 60),
|
||||
("SortIds", "Sorte", null, 12),
|
||||
("AttrIds", "Attribut", null, 16),
|
||||
("Areas", "Fläche", "m²", 22),
|
||||
("DeliveryObligations", "Lieferpflicht", "kg", 22),
|
||||
("DeliveryRights", "Lieferrecht", "kg", 22),
|
||||
("SortId", "Sorte", null, 12),
|
||||
("AttrId", "Attribut", null, 16),
|
||||
("CultId", "Bewirt.", null, 16),
|
||||
("GstNr", "Parzelle(n)", null, 25),
|
||||
("Area", "Fläche", "m²", 22),
|
||||
("MinKg", "Lieferpflicht", "kg", 22),
|
||||
("MaxKg", "Lieferrecht", "kg", 22),
|
||||
];
|
||||
|
||||
public MemberAreaComsData(IEnumerable<MemberAreaComsRow> rows, int year) :
|
||||
base($"Flächenbindungen", $"Flächenbindungen pro Mitglied {year}", rows, FieldNames) {
|
||||
}
|
||||
|
||||
public static async Task<MemberAreaComsData> ForSeason(DbSet<MemberAreaComsRowSingle> table, int year) {
|
||||
return new MemberAreaComsData(
|
||||
(await FromDbSet(table, year)).GroupBy(
|
||||
r => r.MgNr,
|
||||
(k, g) => new MemberAreaComsRow(g)
|
||||
), year);
|
||||
public static async Task<MemberAreaComsData> ForSeason(DbSet<MemberAreaComsRow> table, int year) {
|
||||
return new MemberAreaComsData(await FromDbSet(table, year), year);
|
||||
}
|
||||
|
||||
private static async Task<IEnumerable<MemberAreaComsRowSingle>> FromDbSet(DbSet<MemberAreaComsRowSingle> table, int year) {
|
||||
private static async Task<IEnumerable<MemberAreaComsRow>> FromDbSet(DbSet<MemberAreaComsRow> table, int year) {
|
||||
return await table.FromSql($"""
|
||||
SELECT m.mgnr, m.name AS name_1,
|
||||
COALESCE(m.prefix || ' ', '') || m.given_name ||
|
||||
COALESCE(' ' || m.middle_names, '') || COALESCE(' ' || m.suffix, '') AS name_2,
|
||||
p.plz, o.name AS ort, m.address,
|
||||
c.bucket, c.area, c.min_kg, c.max_kg
|
||||
FROM v_area_commitment_bucket_strict c
|
||||
t.sortid, t.attrid, c.cultid,
|
||||
c.gstnr, c.area,
|
||||
CAST(ROUND(area * COALESCE(t.min_kg_per_ha, 0) / 10000.0, 0) AS INTEGER) AS min_kg,
|
||||
CAST(ROUND(area * MIN(COALESCE(a.max_kg_per_ha, s.max_kg_per_ha), s.max_kg_per_ha) / 10000.0, 0) AS INTEGER) AS max_kg
|
||||
FROM v_virtual_season s, area_commitment c
|
||||
JOIN area_commitment_type t ON t.vtrgid = c.vtrgid
|
||||
LEFT JOIN wine_attribute a ON a.attrid = t.attrid
|
||||
LEFT JOIN member m ON m.mgnr = c.mgnr
|
||||
LEFT JOIN AT_plz_dest p ON p.id = m.postal_dest
|
||||
LEFT JOIN AT_ort o ON o.okz = p.okz
|
||||
WHERE c.year = {year}
|
||||
ORDER BY m.mgnr, c.bucket
|
||||
WHERE s.year = {year} AND
|
||||
(year_from IS NULL OR year_from <= s.year) AND
|
||||
(year_to IS NULL OR year_to >= s.year)
|
||||
ORDER BY c.mgnr, t.sortid, t.attrid, c.cultid, c.gstnr;
|
||||
""").ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
public class MemberAreaComsRow {
|
||||
public int MgNr;
|
||||
public string Name1;
|
||||
public string? Name2;
|
||||
public string Address;
|
||||
public int Plz;
|
||||
public string Locality;
|
||||
public string[] SortIds;
|
||||
public string[] AttrIds;
|
||||
public int[] Areas;
|
||||
public int[] DeliveryObligations;
|
||||
public int[] DeliveryRights;
|
||||
|
||||
public MemberAreaComsRow(IEnumerable<MemberAreaComsRowSingle> rows) {
|
||||
var f = rows.First();
|
||||
MgNr = f.MgNr;
|
||||
Name1 = f.Name1;
|
||||
Name2 = f.Name2;
|
||||
Address = f.Address;
|
||||
Plz = f.Plz;
|
||||
Locality = f.Locality.Split(",")[0];
|
||||
SortIds = rows.Select(r => r.VtrgId[..2]).ToArray();
|
||||
AttrIds = rows.Select(r => r.VtrgId[2..]).ToArray();
|
||||
Areas = rows.Select(r => r.Area).ToArray();
|
||||
DeliveryObligations = rows.Select(r => r.MinKg).ToArray();
|
||||
DeliveryRights = rows.Select(r => r.MaxKg).ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
[Keyless]
|
||||
public class MemberAreaComsRowSingle {
|
||||
public class MemberAreaComsRow {
|
||||
[Column("mgnr")]
|
||||
public int MgNr { get; set; }
|
||||
[Column("name_1")]
|
||||
@@ -93,8 +69,14 @@ namespace Elwig.Models.Dtos {
|
||||
public int Plz { get; set; }
|
||||
[Column("ort")]
|
||||
public required string Locality { get; set; }
|
||||
[Column("bucket")]
|
||||
public required string VtrgId { get; set; }
|
||||
[Column("sortid")]
|
||||
public required string SortId { get; set; }
|
||||
[Column("attrid")]
|
||||
public string? AttrId { get; set; }
|
||||
[Column("cultid")]
|
||||
public string? CultId { get; set; }
|
||||
[Column("gstnr")]
|
||||
public required string GstNr { get; set; }
|
||||
[Column("area")]
|
||||
public int Area { get; set; }
|
||||
[Column("min_kg")]
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Elwig.Services {
|
||||
deliveryAncmtQuery = deliveryAncmtQuery.Where(a => a.Year == s.Year && a.DsNr == s.DsNr);
|
||||
filterNames.Add($"{s.Date:dd.MM.yyyy} – {s.Branch.Name} – {s.Description}");
|
||||
} else {
|
||||
deliveryAncmtQuery = deliveryAncmtQuery.Where(a => a.Year == vm.FilterSeason && (!vm.FilterOnlyUpcoming || a.Schedule.DateString.CompareTo(Utils.Today.ToString("yyyy-MM-dd")) >= 0));
|
||||
deliveryAncmtQuery = deliveryAncmtQuery.Where(a => a.Year == vm.FilterSeason && (!vm.FilterOnlyUpcoming || a.Schedule.DateString.CompareTo(DateTime.Today.ToString("yyyy-MM-dd")) >= 0));
|
||||
filterNames.Add($"{vm.FilterSeason}");
|
||||
}
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ namespace Elwig.Services {
|
||||
filterNames.Add($"{vm.FilterSeason}");
|
||||
}
|
||||
if (vm.FilterOnlyUpcoming) {
|
||||
deliveryScheduleQuery = deliveryScheduleQuery.Where(s => s.DateString.CompareTo(Utils.Today.ToString("yyyy-MM-dd")) >= 0);
|
||||
filterNames.Add($"ab {Utils.Today:dd.MM.yyyy}");
|
||||
deliveryScheduleQuery = deliveryScheduleQuery.Where(s => s.DateString.CompareTo(DateTime.Today.ToString("yyyy-MM-dd")) >= 0);
|
||||
filterNames.Add($"ab {DateTime.Today:dd.MM.yyyy}");
|
||||
}
|
||||
|
||||
var filterVar = new List<string>();
|
||||
|
||||
@@ -72,6 +72,31 @@ namespace Elwig.Services {
|
||||
vm.ManualWeighingReason = p.WeighingReason;
|
||||
}
|
||||
|
||||
private static async Task<(Expression<Func<Delivery, bool>>, string)> GetFilterToday(AppDbContext ctx) {
|
||||
var today = DateTime.Today;
|
||||
var timestamps = (await ctx.Deliveries
|
||||
.Where(d => d.DateString.CompareTo(today.AddDays(-1).ToString("yyyy-MM-dd")) >= 0)
|
||||
.OrderBy(d => d.DateString).ThenBy(d => d.TimeString)
|
||||
.Select(d => d.DateString + " " + d.TimeString)
|
||||
.ToListAsync())
|
||||
.Select(s => DateTime.TryParseExact(s, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.None, out var dt) ? (DateTime?)dt : null)
|
||||
.Where(t => t.HasValue)
|
||||
.Cast<DateTime>()
|
||||
.ToArray();
|
||||
if (timestamps.Length > 0) {
|
||||
var latest = timestamps.Last();
|
||||
var since = timestamps.Cast<DateTime>().Reverse().Aggregate(latest, (s, c) => s.Subtract(c).TotalHours <= 6 ? c : s);
|
||||
latest += new TimeSpan(0, 1, -latest.Minute, -latest.Second, -latest.Millisecond, -latest.Microsecond);
|
||||
since += new TimeSpan(0, 0, -since.Minute, -since.Second, -since.Millisecond, -since.Microsecond);
|
||||
|
||||
return (d => (d.DateString == since.ToString("yyyy-MM-dd") && (d.TimeString == null || d.TimeString.CompareTo(since.ToString("HH:mm:ss")) >= 0)) ||
|
||||
(d.DateString.CompareTo(since.ToString("yyyy-MM-dd")) > 0),
|
||||
since.Date == latest.Date ? since.ToString("dd.MM.yyyy") : $"{since:dd.MM.yyyy \\a\\b HH:mm} / {latest:dd.MM.yyyy \\b\\i\\s HH:mm}");
|
||||
} else {
|
||||
return (_ => false, today.ToString("dd.MM.yyyy"));
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<(List<string>, IQueryable<Delivery>, IQueryable<DeliveryPart>, Predicate<DeliveryPart>, List<string>)> GetFilters(this DeliveryAdminViewModel vm, AppDbContext ctx) {
|
||||
List<string> filterNames = [];
|
||||
IQueryable<Delivery> deliveryQuery = ctx.Deliveries;
|
||||
@@ -84,10 +109,9 @@ namespace Elwig.Services {
|
||||
filterNames.Add(vm.FilterMember.AdministrativeName);
|
||||
}
|
||||
if (vm.FilterTodayOnly) {
|
||||
deliveryQuery = deliveryQuery
|
||||
.Where(d => (d.DateString == Utils.Today.ToString("yyyy-MM-dd") && (d.TimeString == null || d.TimeString.CompareTo("03:00:00") > 0)) ||
|
||||
(d.DateString == Utils.Today.AddDays(1).ToString("yyyy-MM-dd") && (d.TimeString == null || d.TimeString.CompareTo("03:00:00") <= 0)));
|
||||
filterNames.Add(Utils.Today.ToString("dd.MM.yyyy"));
|
||||
var (pred, name) = await GetFilterToday(ctx);
|
||||
deliveryQuery = deliveryQuery.Where(pred);
|
||||
filterNames.Add(name);
|
||||
} else if (!vm.FilterAllSeasons) {
|
||||
deliveryQuery = deliveryQuery.Where(d => d.Year == vm.FilterSeason);
|
||||
filterNames.Add($"{vm.FilterSeason}");
|
||||
@@ -730,10 +754,9 @@ namespace Elwig.Services {
|
||||
query = q;
|
||||
filterNames.AddRange(f);
|
||||
} else if (subject == ExportSubject.FromToday) {
|
||||
var date = $"{Utils.Today:yyyy-MM-dd}";
|
||||
query = ctx.DeliveryParts
|
||||
.Where(p => p.Delivery.DateString == date);
|
||||
filterNames.Add($"{Utils.Today:dd.MM.yyyy}");
|
||||
var (pred, name) = await GetFilterToday(ctx);
|
||||
query = ctx.Deliveries.Where(pred).SelectMany(d => d.Parts);
|
||||
filterNames.Add(name);
|
||||
} else if (subject == ExportSubject.FromSeasonAndBranch) {
|
||||
query = ctx.DeliveryParts
|
||||
.Where(p => p.Year == Utils.CurrentLastSeason && p.Delivery.ZwstId == App.ZwstId);
|
||||
@@ -805,10 +828,9 @@ namespace Elwig.Services {
|
||||
query = q;
|
||||
filterNames.AddRange(f);
|
||||
} else if (subject == ExportSubject.FromToday) {
|
||||
var date = $"{Utils.Today:yyyy-MM-dd}";
|
||||
query = ctx.DeliveryParts
|
||||
.Where(p => p.Delivery.DateString == date);
|
||||
filterNames.Add($"{Utils.Today:dd.MM.yyyy}");
|
||||
var (pred, name) = await GetFilterToday(ctx);
|
||||
query = ctx.Deliveries.Where(pred).SelectMany(d => d.Parts);
|
||||
filterNames.Add(name);
|
||||
} else {
|
||||
throw new ArgumentException("Invalid value for ExportSubject");
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using Elwig.Models;
|
||||
using Elwig.Models.Entities;
|
||||
using Elwig.ViewModels;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -11,7 +12,7 @@ namespace Elwig.Services {
|
||||
|
||||
public static async Task InitInputs(this MemberBusinessSharesViewModel vm) {
|
||||
using var ctx = new AppDbContext();
|
||||
vm.DateNoticeString = $"{Utils.Today:dd.MM.yyyy}";
|
||||
vm.DateNoticeString = $"{DateTime.Today:dd.MM.yyyy}";
|
||||
vm.ValuePerShare = (await ctx.Seasons.OrderBy(s => s.Year).LastOrDefaultAsync())?.BusinessShareValue;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace Elwig.Windows {
|
||||
if (await ctx.FetchSeasons(Utils.CurrentYear).SingleOrDefaultAsync() == null) {
|
||||
InteractionService.ShowWarning("Saison noch nicht erstellt",
|
||||
"Die Saison für das aktuelle Jahr wurde noch nicht erstellt. Neue Lieferungen können nicht abgespeichert werden.\n\n" +
|
||||
"(Stammdaten -> Saisons -> Neu anlegen...)");
|
||||
"(Stammdaten \u2192 Saisons \u2192 Neu anlegen...)");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -685,7 +685,7 @@ namespace Elwig.Windows {
|
||||
private async void TodayOnlyInput_Changed(object sender, RoutedEventArgs evt) {
|
||||
if (!HasContextLoaded) return;
|
||||
if (TodayOnlyInput.IsChecked == true && AllSeasonsInput.IsChecked == false) {
|
||||
ViewModel.FilterSeason = Utils.Today.Year;
|
||||
ViewModel.FilterSeason = DateTime.Today.Year;
|
||||
ViewModel.FilterTodayOnly = true;
|
||||
}
|
||||
await RefreshList();
|
||||
@@ -1379,7 +1379,7 @@ namespace Elwig.Windows {
|
||||
var kl = mod.Where(m => m.Name.StartsWith("Klasse ")).Select(m => m.ModId).LastOrDefault("_")[0];
|
||||
if (ViewModel.IsUnloadingPumped && (kl == 'A' || kl == '_')) {
|
||||
kl = 'B';
|
||||
} else if (ViewModel.IsUnloadingDumper && kl == '_') {
|
||||
} else if (ViewModel.IsUnloadingDumper && (kl == 'B' || kl == '_')) {
|
||||
kl = 'A';
|
||||
} else {
|
||||
kl = '_';
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Elwig.Windows {
|
||||
list.ForEach(v => v.Schedule.AnnouncedWeightOverride = v.AnnouncedWeight);
|
||||
var deliverySchedules = list.Select(v => v.Schedule).ToList();
|
||||
ControlUtils.RenewItemsSource(DeliveryScheduleList, deliverySchedules
|
||||
.Where(s => !ViewModel.FilterOnlyUpcoming || s.DateString.CompareTo(Utils.Today.ToString("yyyy-MM-dd")) >= 0)
|
||||
.Where(s => !ViewModel.FilterOnlyUpcoming || s.DateString.CompareTo(DateTime.Today.ToString("yyyy-MM-dd")) >= 0)
|
||||
.ToList(), DeliveryScheduleList_SelectionChanged, ViewModel.FilterFromAllSchedules ? ControlUtils.RenewSourceDefault.None : ControlUtils.RenewSourceDefault.First);
|
||||
ControlUtils.RenewItemsSource(DeliveryScheduleInput, deliverySchedules, DeliveryScheduleInput_SelectionChanged);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace Elwig.Windows {
|
||||
public MailWindow(int? year = null) {
|
||||
InitializeComponent();
|
||||
using (var ctx = new AppDbContext()) {
|
||||
Year = year ?? ctx.Seasons.OrderByDescending(s => s.Year).FirstOrDefault()?.Year ?? Utils.Today.Year;
|
||||
Year = year ?? ctx.Seasons.OrderByDescending(s => s.Year).FirstOrDefault()?.Year ?? DateTime.Today.Year;
|
||||
Title = $"Rundschreiben - Lese {Year} - Elwig";
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace Elwig.Windows {
|
||||
PostalSender1.Text = App.Client.Sender1;
|
||||
PostalSender2.Text = App.Client.Sender2;
|
||||
PostalLocation.Text = App.BranchLocation;
|
||||
PostalDate.Text = $"{Utils.Today:dd.MM.yyyy}";
|
||||
PostalDate.Text = $"{DateTime.Today:dd.MM.yyyy}";
|
||||
EmailSubjectInput.Text = App.Client.TextEmailSubject ?? "Rundschreiben";
|
||||
EmailBodyInput.Text = App.Client.TextEmailBody ?? "Sehr geehrtes Mitglied,\n\nim Anhang finden Sie das aktuelle Rundschreiben.\n\nIhre Winzergenossenschaft\n";
|
||||
}
|
||||
@@ -438,7 +438,7 @@ namespace Elwig.Windows {
|
||||
|
||||
private void Date_LostFocus(object sender, RoutedEventArgs evt) {
|
||||
var res = Validator.CheckDate((TextBox)sender, true);
|
||||
if (!res.IsValid) ((TextBox)sender).Text = $"{Utils.Today:dd.MM.yyyy}";
|
||||
if (!res.IsValid) ((TextBox)sender).Text = $"{DateTime.Today:dd.MM.yyyy}";
|
||||
}
|
||||
|
||||
private async Task UpdateRecipients(AppDbContext ctx) {
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace Elwig.Windows {
|
||||
|
||||
private async void Menu_Database_Backup_Click(object sender, RoutedEventArgs evt) {
|
||||
try {
|
||||
var filename = InteractionService.SaveFile("Datenbank-Sicherung", $"database_{Utils.Today:yyyy-MM-dd}", "sql.zip");
|
||||
var filename = InteractionService.SaveFile("Datenbank-Sicherung", $"database_{DateTime.Today:yyyy-MM-dd}", "sql.zip");
|
||||
if (filename != null) {
|
||||
if (!filename.EndsWith(".sql.zip")) filename += ".sql.zip";
|
||||
Mouse.OverrideCursor = Cursors.Wait;
|
||||
@@ -538,9 +538,11 @@ namespace Elwig.Windows {
|
||||
App.HintContextChange();
|
||||
|
||||
using var ctx = new AppDbContext();
|
||||
var tbl = await MemberAreaComsData.ForSeason(ctx.MemberAreaComsRows, year);
|
||||
var tbl1 = await MemberAreaComTotalsData.ForSeason(ctx.MemberAreaComTotalsRows, year);
|
||||
var tbl2 = await MemberAreaComsData.ForSeason(ctx.MemberAreaComsRows, year);
|
||||
using var ods = new OdsFile(filename);
|
||||
await ods.AddTable(tbl);
|
||||
await ods.AddTable(tbl1);
|
||||
await ods.AddTable(tbl2);
|
||||
} catch (Exception exc) {
|
||||
InteractionService.ShowException(exc);
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace Elwig.Windows {
|
||||
|
||||
int mgnr;
|
||||
try {
|
||||
mgnr = await ViewModel.UpdateMemberHistory(ViewModel.SelectedHistoryEntry?.HistNr, IsEditing || ViewModel.DateNotice >= DateOnly.FromDateTime(Utils.Today).AddDays(-14));
|
||||
mgnr = await ViewModel.UpdateMemberHistory(ViewModel.SelectedHistoryEntry?.HistNr, IsEditing || ViewModel.DateNotice >= DateOnly.FromDateTime(DateTime.Today).AddDays(-14));
|
||||
App.HintContextChange();
|
||||
} catch (Exception exc) {
|
||||
InteractionService.ShowDbException("Geschäftsanteilbewegung aktualisieren", exc);
|
||||
|
||||
@@ -38,6 +38,8 @@ auto = true
|
||||
;limit = 3500
|
||||
; Enables scale logging
|
||||
;log = waage.log
|
||||
; Opt-out of auto time synchronization at startup
|
||||
;synctime = false
|
||||
|
||||
;[scale.B]
|
||||
;type = Avery-Async
|
||||
|
||||
@@ -13,7 +13,7 @@ About
|
||||
**Product:** Elwig
|
||||
**Description:** Electronic Management for Vintners' Cooperatives
|
||||
**Type:** ERP system
|
||||
**Version:** 1.1.1.0 ([Changelog](./CHANGELOG.md))
|
||||
**Version:** 1.1.1.2 ([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.1.1.0 ([Änderungsprotokoll](./CHANGELOG.md))
|
||||
**Version:** 1.1.1.2 ([Änderungsprotokoll](./CHANGELOG.md))
|
||||
**Lizenz:** [GNU General Public License 3.0 (GPLv3)](./LICENSE)
|
||||
**Website:** https://elwig.at/
|
||||
**Quellcode:** https://git.necronda.net/winzer/elwig
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Tests.E2ETests {
|
||||
Session.App.FindElement(By.Name("Rundschreiben")).Click();
|
||||
Thread.Sleep(Utils.WINDOW_OPEN_SLEEP);
|
||||
var window = Session.CreateWindowDriver("MailWindow");
|
||||
Assert.That(window.Title, Is.EqualTo($"Rundschreiben - Lese {Elwig.Helpers.Utils.Today.Year} - Elwig"));
|
||||
Assert.That(window.Title, Is.EqualTo($"Rundschreiben - Lese {DateTime.Today.Year} - Elwig"));
|
||||
window.Close();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Tests.UnitTests.DocumentTests {
|
||||
"""));
|
||||
Assert.That(text, Contains.Substring("0123463")); // Betriebsnummer
|
||||
Assert.That(text, Contains.Substring("pauschaliert"));
|
||||
Assert.That(text, Contains.Substring($"Wolkersdorf, am {Elwig.Helpers.Utils.Today:dd.MM.yyyy}"));
|
||||
Assert.That(text, Contains.Substring($"Wolkersdorf, am {DateTime.Today:dd.MM.yyyy}"));
|
||||
Assert.That(text, Contains.Substring("Traubengutschrift Max Mustermann – Probevariante"));
|
||||
Assert.That(text, Contains.Substring("AT81 1234 5678 9012 3457"));
|
||||
Assert.That(text, Contains.Substring("""
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Tests.UnitTests.DocumentTests {
|
||||
"""));
|
||||
Assert.That(text, Contains.Substring("0123463")); // Betriebsnummer
|
||||
Assert.That(text, Contains.Substring("pauschaliert"));
|
||||
Assert.That(text, Contains.Substring($"Wolkersdorf, am {Elwig.Helpers.Utils.Today:dd.MM.yyyy}"));
|
||||
Assert.That(text, Contains.Substring($"Wolkersdorf, am {DateTime.Today:dd.MM.yyyy}"));
|
||||
Assert.That(text, Contains.Substring("Anlieferungsbestätigung 2020"));
|
||||
Assert.That(text, Contains.Substring("""
|
||||
20201001X001 1 Grüner Veltliner QUW 73 15,0 ungeb.: 3 219 3 219 ☑
|
||||
|
||||
Reference in New Issue
Block a user