[#20][#80] Elwig: Update member_history and add different types of shares
Test / Run tests (push) Successful in 2m31s
Test / Run tests (push) Successful in 2m31s
This commit is contained in:
@@ -47,23 +47,23 @@ namespace Elwig.Windows {
|
||||
SeasonVatFlatrateInput.Text = (s.VatFlatrate * 100).ToString();
|
||||
SeasonStartInput.Text = $"{s.StartDate:dd.MM.yyyy}";
|
||||
SeasonEndInput.Text = $"{s.EndDate:dd.MM.yyyy}";
|
||||
SeasonMinKgPerBsInput.Text = s.MinKgPerBusinessShare.ToString();
|
||||
SeasonMaxKgPerBsInput.Text = s.MaxKgPerBusinessShare.ToString();
|
||||
SeasonMinKgPerShareInput.Text = s.MinKgPerShare.ToString();
|
||||
SeasonMaxKgPerShareInput.Text = s.MaxKgPerShare.ToString();
|
||||
SeasonPenaltyPerKgInput.Text = s.PenaltyPerKg?.ToString() ?? "";
|
||||
SeasonPenaltyInput.Text = s.PenaltyAmount?.ToString() ?? "";
|
||||
SeasonPenaltyNoneInput.Text = s.PenaltyNone?.ToString() ?? "";
|
||||
SeasonPenaltyPerBsInput.Text = s.PenaltyPerBsAmount?.ToString() ?? "";
|
||||
SeasonPenaltyPerBsNoneInput.Text = s.PenaltyPerBsNone?.ToString() ?? "";
|
||||
SeasonBsValueInput.Text = s.BusinessShareValue?.ToString() ?? "";
|
||||
SeasonPenaltyPerShareInput.Text = s.PenaltyPerShareAmount?.ToString() ?? "";
|
||||
SeasonPenaltyPerShareNoneInput.Text = s.PenaltyPerShareNone?.ToString() ?? "";
|
||||
SeasonShareValueInput.Text = s.BusinessShareValue?.ToString() ?? "";
|
||||
|
||||
var sym = s.Currency.Symbol ?? s.Currency.Code;
|
||||
SeasonModifierAbsInput.Unit = $"{sym}/kg";
|
||||
SeasonPenaltyPerKgInput.Unit = $"{sym}/kg";
|
||||
SeasonPenaltyInput.Unit = sym;
|
||||
SeasonPenaltyNoneInput.Unit = sym;
|
||||
SeasonPenaltyPerBsInput.Unit = $"{sym}/GA";
|
||||
SeasonPenaltyPerBsNoneInput.Unit = $"{sym}/GA";
|
||||
SeasonBsValueInput.Unit = $"{sym}/GA";
|
||||
SeasonPenaltyPerShareInput.Unit = $"{sym}/GA";
|
||||
SeasonPenaltyPerShareNoneInput.Unit = $"{sym}/GA";
|
||||
SeasonShareValueInput.Unit = $"{sym}/GA";
|
||||
AreaCommitmentTypePenaltyPerKgInput.Unit = $"{sym}/kg";
|
||||
AreaCommitmentTypePenaltyInput.Unit = sym;
|
||||
AreaCommitmentTypePenaltyNoneInput.Unit = sym;
|
||||
@@ -74,14 +74,14 @@ namespace Elwig.Windows {
|
||||
SeasonVatFlatrateInput.Text = "";
|
||||
SeasonStartInput.Text = "";
|
||||
SeasonEndInput.Text = "";
|
||||
SeasonMinKgPerBsInput.Text = "";
|
||||
SeasonMaxKgPerBsInput.Text = "";
|
||||
SeasonMinKgPerShareInput.Text = "";
|
||||
SeasonMaxKgPerShareInput.Text = "";
|
||||
SeasonPenaltyPerKgInput.Text = "";
|
||||
SeasonPenaltyInput.Text = "";
|
||||
SeasonPenaltyNoneInput.Text = "";
|
||||
SeasonPenaltyPerBsInput.Text = "";
|
||||
SeasonPenaltyPerBsNoneInput.Text = "";
|
||||
SeasonBsValueInput.Text = "";
|
||||
SeasonPenaltyPerShareInput.Text = "";
|
||||
SeasonPenaltyPerShareNoneInput.Text = "";
|
||||
SeasonShareValueInput.Text = "";
|
||||
}
|
||||
_seasonUpdate = false;
|
||||
}
|
||||
@@ -96,16 +96,16 @@ namespace Elwig.Windows {
|
||||
s.VatNormal = double.Parse(SeasonVatNormalInput.Text) / 100;
|
||||
if (SeasonVatFlatrateInput.Text.Length > 0)
|
||||
s.VatFlatrate = double.Parse(SeasonVatFlatrateInput.Text) / 100;
|
||||
if (SeasonMinKgPerBsInput.Text.Length > 0)
|
||||
s.MinKgPerBusinessShare = int.Parse(SeasonMinKgPerBsInput.Text);
|
||||
if (SeasonMaxKgPerBsInput.Text.Length > 0)
|
||||
s.MaxKgPerBusinessShare = int.Parse(SeasonMaxKgPerBsInput.Text);
|
||||
if (SeasonMinKgPerShareInput.Text.Length > 0)
|
||||
s.MinKgPerShare = int.Parse(SeasonMinKgPerShareInput.Text);
|
||||
if (SeasonMaxKgPerShareInput.Text.Length > 0)
|
||||
s.MaxKgPerShare = int.Parse(SeasonMaxKgPerShareInput.Text);
|
||||
s.PenaltyPerKg = (SeasonPenaltyPerKgInput.Text.Length > 0) ? decimal.Parse(SeasonPenaltyPerKgInput.Text) : null;
|
||||
s.PenaltyAmount = (SeasonPenaltyInput.Text.Length > 0) ? decimal.Parse(SeasonPenaltyInput.Text) : null;
|
||||
s.PenaltyNone = (SeasonPenaltyNoneInput.Text.Length > 0) ? decimal.Parse(SeasonPenaltyNoneInput.Text) : null;
|
||||
s.PenaltyPerBsAmount = (SeasonPenaltyPerBsInput.Text.Length > 0) ? decimal.Parse(SeasonPenaltyPerBsInput.Text) : null;
|
||||
s.PenaltyPerBsNone = (SeasonPenaltyPerBsNoneInput.Text.Length > 0) ? decimal.Parse(SeasonPenaltyPerBsNoneInput.Text) : null;
|
||||
s.BusinessShareValue = (SeasonBsValueInput.Text.Length > 0) ? decimal.Parse(SeasonBsValueInput.Text) : null;
|
||||
s.PenaltyPerShareAmount = (SeasonPenaltyPerShareInput.Text.Length > 0) ? decimal.Parse(SeasonPenaltyPerShareInput.Text) : null;
|
||||
s.PenaltyPerShareNone = (SeasonPenaltyPerShareNoneInput.Text.Length > 0) ? decimal.Parse(SeasonPenaltyPerShareNoneInput.Text) : null;
|
||||
s.BusinessShareValue = (SeasonShareValueInput.Text.Length > 0) ? decimal.Parse(SeasonShareValueInput.Text) : null;
|
||||
|
||||
UpdateButtons();
|
||||
}
|
||||
@@ -131,7 +131,7 @@ namespace Elwig.Windows {
|
||||
Season_Changed(sender, evt);
|
||||
}
|
||||
|
||||
private void SeasonPenaltyPerBsInput_TextChanged(object sender, TextChangedEventArgs evt) {
|
||||
private void SeasonPenaltyPerShareInput_TextChanged(object sender, TextChangedEventArgs evt) {
|
||||
if (SeasonList.SelectedItem is not Season s) return;
|
||||
InputTextChanged((TextBox)sender, Validator.CheckDecimal((TextBox)sender, false, 4, s.Precision));
|
||||
Season_Changed(sender, evt);
|
||||
@@ -160,13 +160,13 @@ namespace Elwig.Windows {
|
||||
MaxKgPerHa = s?.MaxKgPerHa ?? 10000,
|
||||
VatNormal = s?.VatNormal ?? 0.10,
|
||||
VatFlatrate = s?.VatFlatrate ?? 0.13,
|
||||
MinKgPerBusinessShare = s?.MinKgPerBusinessShare ?? 500,
|
||||
MaxKgPerBusinessShare = s?.MaxKgPerBusinessShare ?? 1000,
|
||||
MinKgPerShare = s?.MinKgPerShare ?? 500,
|
||||
MaxKgPerShare = s?.MaxKgPerShare ?? 1000,
|
||||
PenaltyPerKgValue = s?.PenaltyPerKgValue,
|
||||
PenaltyAmoutValue = s?.PenaltyAmoutValue,
|
||||
PenaltyNoneValue = s?.PenaltyNoneValue,
|
||||
PenaltyPerBsAmountValue = s?.PenaltyPerBsAmountValue,
|
||||
PenaltyPerBsNoneValue = s?.PenaltyPerBsNoneValue,
|
||||
PenaltyPerShareAmountValue = s?.PenaltyPerShareAmountValue,
|
||||
PenaltyPerShareNoneValue = s?.PenaltyPerShareNoneValue,
|
||||
BusinessShareValueValue = s?.BusinessShareValueValue,
|
||||
CalcMode = s?.CalcMode ?? 0,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user