2 Commits

Author SHA1 Message Date
fierke acaf0856ed [chore:] filter by germany for running-sheet creation 2026-06-08 08:52:46 +02:00
fierke 2da822e0e7 [chore:] added IsGermany()-function 2026-06-08 08:52:06 +02:00
2 changed files with 13 additions and 2 deletions
+11
View File
@@ -180,6 +180,17 @@ public class KasPerson
public string used_plz { get; set; } = "";
public bool IsGermany()
{
var trimmedLand = (land ?? "").Trim();
var trimmedLowerLand = trimmedLand.ToLower();
var isGermany = trimmedLowerLand == "germany" || trimmedLowerLand == "ger" ||
trimmedLowerLand == "" || trimmedLowerLand == "de" ||
trimmedLowerLand == "deutschland";
return isGermany;
}
public static void SetUsedPLZ(int id, string plz)
{
foreach (var set in Settings._instance.addressSets.addresses)
+1 -1
View File
@@ -604,7 +604,7 @@ public class PdfBuilder
List<IGrouping<string, KasPerson>> sorted_list = list.KasPersons
.Where(x => !string.IsNullOrEmpty(x?.used_plz) &&
x.used_plz.Length >= stpoint)
x.used_plz.Length >= stpoint && x.IsGermany())
.OrderBy(x => x.used_plz)
.GroupBy(x => x.used_plz.Substring(0, stpoint))
.ToList();