Billing: small fixes
This commit is contained in:
@ -185,7 +185,7 @@ namespace Elwig.Helpers {
|
|||||||
ORDER BY year, mgnr, LENGTH(bin) DESC, bin;
|
ORDER BY year, mgnr, LENGTH(bin) DESC, bin;
|
||||||
""");
|
""");
|
||||||
|
|
||||||
ExecuteNonQuery(cnx, "ALTER TABLE wine_attribute ADD COLUMN fill_lower_bins INTEGER NOT NULL CHECK (fill_lower_bins IN (TRUE, FALSE))");
|
ExecuteNonQuery(cnx, "ALTER TABLE wine_attribute ADD COLUMN fill_lower_bins INTEGER NOT NULL CHECK (fill_lower_bins IN (TRUE, FALSE)) DEFAULT FALSE");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ namespace Elwig.Helpers.Billing {
|
|||||||
|
|
||||||
public static async Task<(Dictionary<string, int>, Dictionary<string, int>)> GetMemberRightsObligations(SqliteConnection cnx, int year, int mgnr) {
|
public static async Task<(Dictionary<string, int>, Dictionary<string, int>)> GetMemberRightsObligations(SqliteConnection cnx, int year, int mgnr) {
|
||||||
var members = await GetMemberRightsObligations(cnx, year, (int?)mgnr);
|
var members = await GetMemberRightsObligations(cnx, year, (int?)mgnr);
|
||||||
return members[mgnr];
|
return members.GetValueOrDefault(mgnr, (new(), new()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task<Dictionary<string, int>> GetMemberBinWeights(int mgnr, int year, SqliteConnection cnx) {
|
public static async Task<Dictionary<string, int>> GetMemberBinWeights(int mgnr, int year, SqliteConnection cnx) {
|
||||||
|
Reference in New Issue
Block a user