Windows: Remove SeasonFinishWindow and TestWindow

This commit is contained in:
2024-03-31 17:11:10 +02:00
parent cbc0d0ebff
commit a9f38a3ccb
11 changed files with 205 additions and 294 deletions

View File

@ -449,7 +449,20 @@ namespace Elwig.Windows {
if (doc.Type == DocType.DeliveryConfirmation) {
var details = ((int, bool))doc.Details!;
var year = details.Item1;
dcData[year] = await DeliveryConfirmationDeliveryData.ForSeason(ctx.DeliveryParts, year);
try {
var b = new Billing(year);
await b.FinishSeason();
await b.CalculateBuckets();
await App.HintContextChange();
dcData[year] = await DeliveryConfirmationDeliveryData.ForSeason(ctx.DeliveryParts, year);
} catch (Exception exc) {
MessageBox.Show(exc.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
GenerateButton.IsEnabled = true;
Mouse.OverrideCursor = null;
return;
}
} else if (doc.Type == DocType.CreditNote) {
var details = ((int, int))doc.Details!;
var year = details.Item1;