[#54] Member: Add IsJuridicalPerson
All checks were successful
Test / Run tests (push) Successful in 2m49s
All checks were successful
Test / Run tests (push) Successful in 2m49s
This commit is contained in:
@ -45,12 +45,12 @@ namespace Elwig.Windows {
|
||||
var members = await ctx.Members
|
||||
.Select(m => new {
|
||||
m.MgNr,
|
||||
m.FamilyName,
|
||||
m.Name,
|
||||
m.GivenName,
|
||||
m.BusinessShares,
|
||||
m.IsActive,
|
||||
})
|
||||
.OrderBy(m => m.FamilyName)
|
||||
.OrderBy(m => m.Name)
|
||||
.ThenBy(m => m.GivenName)
|
||||
.ThenBy(m => m.MgNr)
|
||||
.ToListAsync();
|
||||
@ -70,7 +70,7 @@ namespace Elwig.Windows {
|
||||
|
||||
var list = members
|
||||
.Select(m => new {
|
||||
m.MgNr, m.FamilyName, m.GivenName,
|
||||
m.MgNr, m.Name, m.GivenName,
|
||||
m.IsActive,
|
||||
BusinessShares = m.BusinessShares - history.GetValueOrDefault(m.MgNr, 0),
|
||||
DeliveryObligation = (m.BusinessShares - history.GetValueOrDefault(m.MgNr, 0)) * season.MinKgPerBusinessShare,
|
||||
@ -78,7 +78,7 @@ namespace Elwig.Windows {
|
||||
Adjust = history.TryGetValue(m.MgNr, out int v2) ? (int?)v2 : null,
|
||||
})
|
||||
.Select(m => new {
|
||||
m.MgNr, m.FamilyName, m.GivenName,
|
||||
m.MgNr, m.Name, m.GivenName,
|
||||
m.BusinessShares,
|
||||
Weight = weight.GetValueOrDefault(m.MgNr, 0),
|
||||
OverUnder = weight.TryGetValue(m.MgNr, out int v1) ?
|
||||
@ -89,7 +89,7 @@ namespace Elwig.Windows {
|
||||
AdjustAmount = m.Adjust * -season.BusinessShareValue,
|
||||
})
|
||||
.Select(m => new {
|
||||
m.MgNr, m.FamilyName, m.GivenName,
|
||||
m.MgNr, m.Name, m.GivenName,
|
||||
m.BusinessShares, m.Weight, m.OverUnder,
|
||||
PenaltyBs = m.OverUnder != null && m.OverUnder < 0 ?
|
||||
(season.PenaltyPerKg * m.OverUnder ?? 0) +
|
||||
@ -106,7 +106,7 @@ namespace Elwig.Windows {
|
||||
Custom = CustomPayments!.GetValueOrDefault(m.MgNr, null)?.Amount,
|
||||
})
|
||||
.Select(m => new {
|
||||
m.MgNr, m.FamilyName, m.GivenName,
|
||||
m.MgNr, m.Name, m.GivenName,
|
||||
m.BusinessShares, m.Weight, m.OverUnder,
|
||||
PenaltyBs = m.PenaltyBs == null || m.PenaltyBs == 0 ? (decimal?)null : Math.Round((decimal)m.PenaltyBs, 2),
|
||||
PenaltyAc = m.PenaltyAc == null ? (decimal?)null : Math.Round((decimal)m.PenaltyAc, 2),
|
||||
@ -115,13 +115,13 @@ namespace Elwig.Windows {
|
||||
m.Custom
|
||||
})
|
||||
.Select(m => new {
|
||||
m.MgNr, m.FamilyName, m.GivenName,
|
||||
m.MgNr, m.Name, m.GivenName,
|
||||
m.BusinessShares, m.Weight, m.OverUnder,
|
||||
m.PenaltyBs, m.PenaltyAc, m.Adjust, m.AdjustAmount, m.Custom,
|
||||
Total = (m.PenaltyBs ?? 0) + (m.PenaltyAc ?? 0) + (m.AdjustAmount ?? 0) + (m.Custom ?? 0),
|
||||
})
|
||||
.Select(m => new {
|
||||
m.MgNr, m.FamilyName, m.GivenName,
|
||||
m.MgNr, m.Name, m.GivenName,
|
||||
m.BusinessShares, m.Weight, m.OverUnder,
|
||||
m.PenaltyBs, m.PenaltyAc, m.Adjust, m.AdjustAmount, m.Custom,
|
||||
m.Total,
|
||||
@ -130,7 +130,7 @@ namespace Elwig.Windows {
|
||||
})
|
||||
.Where(m => m.OverUnder != null || m.Adjust != null || m.PenaltyBs != null || m.PenaltyAc != null || m.Custom != null)
|
||||
.OrderByDescending(m => m.OverUnder ?? 0)
|
||||
.ThenBy(m => m.FamilyName)
|
||||
.ThenBy(m => m.Name)
|
||||
.ThenBy(m => m.GivenName)
|
||||
.ThenBy(m => m.MgNr)
|
||||
.ToList();
|
||||
@ -146,7 +146,7 @@ namespace Elwig.Windows {
|
||||
NonDeliveries.Text = $"{list.Count(r => r.Weight == 0):N0}";
|
||||
|
||||
ControlUtils.RenewItemsSource(MemberInput, await ctx.Members
|
||||
.OrderBy(m => m.FamilyName)
|
||||
.OrderBy(m => m.Name)
|
||||
.ThenBy(m => m.GivenName)
|
||||
.ThenBy(m => m.MgNr)
|
||||
.ToListAsync());
|
||||
|
Reference in New Issue
Block a user