Billing: differentiate between flag FillLowerBins
This commit is contained in:
@ -43,6 +43,7 @@ namespace Elwig.Helpers.Billing {
|
||||
}
|
||||
|
||||
public async Task CalculateBins() {
|
||||
var forcedAttr = Context.WineAttributes.Where(a => !a.FillLowerBins).Select(a => a.AttrId).ToArray();
|
||||
using var cnx = await AppDbContext.ConnectAsync();
|
||||
var memberOblRig = await GetMemberRightsObligations(cnx, Year);
|
||||
var inserts = new List<(int, int, int, int, int, int, int)>();
|
||||
@ -84,7 +85,7 @@ namespace Elwig.Helpers.Billing {
|
||||
|
||||
int w = weight;
|
||||
int[] b = new int[4];
|
||||
foreach (var p in Utils.Permutate(attributes)) {
|
||||
foreach (var p in Utils.Permutate(attributes, attributes.Intersect(forcedAttr))) {
|
||||
var c = p.Count();
|
||||
var key = sortid + string.Join("", p);
|
||||
if (rights.ContainsKey(key)) {
|
||||
|
Reference in New Issue
Block a user