Billing: Add possibility to automatically add business shares
This commit is contained in:
@ -31,6 +31,7 @@ namespace Elwig.Windows {
|
||||
CalculateBucketsButton.IsEnabled = valid && last;
|
||||
DeliveryConfirmationButton.IsEnabled = valid;
|
||||
OverUnderDeliveryButton.IsEnabled = valid;
|
||||
AutoBusinessSharesButton.IsEnabled = valid;
|
||||
PaymentButton.IsEnabled = valid;
|
||||
}
|
||||
|
||||
@ -82,6 +83,27 @@ namespace Elwig.Windows {
|
||||
Mouse.OverrideCursor = null;
|
||||
}
|
||||
|
||||
private async void AutoBusinessSharesButton_Click(object sender, RoutedEventArgs evt) {
|
||||
if (SeasonInput.Value is not int year)
|
||||
return;
|
||||
if (App.Client.IsMatzen) {
|
||||
AutoBusinessSharesButton.IsEnabled = false;
|
||||
Mouse.OverrideCursor = Cursors.AppStarting;
|
||||
|
||||
var b = new Billing(year);
|
||||
await b.AutoAdjustBusinessShare();
|
||||
|
||||
Mouse.OverrideCursor = null;
|
||||
AutoBusinessSharesButton.IsEnabled = true;
|
||||
} else {
|
||||
MessageBox.Show(
|
||||
"Es ist kein automatisches Nachzeichnen der Geschäftsanteile\n" +
|
||||
"für diese Genossenschaft eingestellt!\n" +
|
||||
"Bitte wenden Sie sich an die Programmierer!", "Fehler",
|
||||
MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
}
|
||||
|
||||
private void PaymentButton_Click(object sender, RoutedEventArgs evt) {
|
||||
if (SeasonInput.Value is not int year)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user