DeliveryAdminWindow: Only show active modifiers in receipt mode
All checks were successful
Test / Run tests (push) Successful in 1m53s
All checks were successful
Test / Run tests (push) Successful in 1m53s
This commit is contained in:
@ -1084,7 +1084,7 @@ namespace Elwig.Windows {
|
||||
ControlUtils.RenewItemsSource(CultivationInput, cultList, null, ControlUtils.RenewSourceDefault.First);
|
||||
ControlUtils.RenewItemsSource(WineQualityLevelInput, await ctx.WineQualityLevels.ToListAsync());
|
||||
ControlUtils.RenewItemsSource(ModifiersInput, await ctx.Modifiers
|
||||
.Where(m => m.Year == y)
|
||||
.Where(m => m.Year == y && (!IsCreating || m.IsActive))
|
||||
.OrderBy(m => m.Ordering)
|
||||
.Include(m => m.Season.Currency)
|
||||
.ToListAsync());
|
||||
@ -1116,14 +1116,14 @@ namespace Elwig.Windows {
|
||||
using var ctx = new AppDbContext();
|
||||
if (DeliveryList.SelectedItem is Delivery d) {
|
||||
ControlUtils.RenewItemsSource(ModifiersInput, await ctx.Modifiers
|
||||
.Where(m => m.Year == d.Year)
|
||||
.Where(m => m.Year == d.Year && (!IsCreating || m.IsActive))
|
||||
.OrderBy(m => m.Ordering)
|
||||
.Include(m => m.Season.Currency)
|
||||
.ToListAsync());
|
||||
ControlUtils.RenewItemsSource(DeliveryPartList, d.FilteredParts.OrderBy(p => p.DPNr).ToList(), DeliveryPartList_SelectionChanged, ControlUtils.RenewSourceDefault.First);
|
||||
} else {
|
||||
ControlUtils.RenewItemsSource(ModifiersInput, await ctx.Modifiers
|
||||
.Where(m => m.Year == SeasonInput.Value)
|
||||
.Where(m => m.Year == SeasonInput.Value && (!IsCreating || m.IsActive))
|
||||
.OrderBy(m => m.Ordering)
|
||||
.Include(m => m.Season.Currency)
|
||||
.ToListAsync());
|
||||
@ -1555,6 +1555,11 @@ namespace Elwig.Windows {
|
||||
var attrList = await ctx.WineAttributes.Where(a => a.IsActive).OrderBy(a => a.Name).Cast<object>().ToListAsync();
|
||||
attrList.Insert(0, new NullItem(""));
|
||||
ControlUtils.RenewItemsSource(AttributeInput, attrList, null, ControlUtils.RenewSourceDefault.First);
|
||||
ControlUtils.RenewItemsSource(ModifiersInput, await ctx.Modifiers
|
||||
.Where(m => m.Year == SeasonInput.Value && m.IsActive)
|
||||
.OrderBy(m => m.Ordering)
|
||||
.Include(m => m.Season.Currency)
|
||||
.ToListAsync());
|
||||
ControlUtils.RenewItemsSource(MemberInput, await ctx.Members
|
||||
.Where(m => m.IsActive || !IsReceipt)
|
||||
.Include(m => m.PostalDest.AtPlz!.Ort)
|
||||
|
Reference in New Issue
Block a user