Elwig: Rename buchführend, funktionär, volllieferant, and gebunden
This commit is contained in:
@@ -574,7 +574,7 @@
|
||||
<CheckBox x:Name="ParameterAvoidUnderDeliveriesInput" Content="Unterlieferungen durch Abzug bei "besseren" Flächenbindungen vermeiden"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,30,10,10"
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"/>
|
||||
<CheckBox x:Name="ParameterHonorGebundenInput" Margin="10,50,10,10" VerticalAlignment="Top"
|
||||
<CheckBox x:Name="ParameterHonorContractedInput" Margin="10,50,10,10" VerticalAlignment="Top"
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed">
|
||||
<TextBlock>Bei Lieferungen das Feld <Italic>Gebunden</Italic> berücksichtigen</TextBlock>
|
||||
</CheckBox>
|
||||
|
||||
@@ -352,7 +352,7 @@ namespace Elwig.Windows {
|
||||
ParameterBusinessShareHistoryInput.IsChecked = p.EnableMemberHistory;
|
||||
ParameterAllowAttrIntoLowerInput.IsChecked = s?.Billing_AllowAttrsIntoLower ?? false;
|
||||
ParameterAvoidUnderDeliveriesInput.IsChecked = s?.Billing_AvoidUnderDeliveries ?? false;
|
||||
ParameterHonorGebundenInput.IsChecked = s?.Billing_HonorGebunden ?? false;
|
||||
ParameterHonorContractedInput.IsChecked = s?.Billing_HonorContracted ?? false;
|
||||
ParameterExportEbicsVersion.SelectedIndex = p.ExportEbicsVersion - 3;
|
||||
ParameterExportEbicsAddress.SelectedIndex = p.ExportEbicsAddress;
|
||||
|
||||
@@ -406,7 +406,7 @@ namespace Elwig.Windows {
|
||||
|
||||
s.Billing_AllowAttrsIntoLower = ParameterAllowAttrIntoLowerInput.IsChecked ?? false;
|
||||
s.Billing_AvoidUnderDeliveries = ParameterAvoidUnderDeliveriesInput.IsChecked ?? false;
|
||||
s.Billing_HonorGebunden = ParameterHonorGebundenInput.IsChecked ?? false;
|
||||
s.Billing_HonorContracted = ParameterHonorContractedInput.IsChecked ?? false;
|
||||
ctx.Update(s);
|
||||
await ctx.SaveChangesAsync();
|
||||
} catch { }
|
||||
|
||||
@@ -138,9 +138,9 @@
|
||||
<Label Content="Oechsle:" Margin="10,10,0,0" Grid.Column="0"/>
|
||||
<ctrl:UnitTextBox x:Name="OechsleInput" Unit="°Oe" TextChanged="OechsleInput_TextChanged" IsEnabled="False"
|
||||
Grid.Column="1" Width="52" Margin="0,10,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
<CheckBox x:Name="GebInput" Content="Geb." IsEnabled="False"
|
||||
<CheckBox x:Name="ContractedInput" Content="Geb." IsEnabled="False"
|
||||
Grid.Column="1" Margin="0,15,10,0" HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
Checked="GebInput_Changed" Unchecked="GebInput_Changed"/>
|
||||
Checked="ContractedInput_Changed" Unchecked="ContractedInput_Changed"/>
|
||||
|
||||
<Label Content="Preis:" Margin="10,40,0,0" Grid.Column="0"/>
|
||||
<ctrl:UnitTextBox x:Name="PriceInput" Unit="€/kg" TextChanged="PriceInput_TextChanged" IsEnabled="False"
|
||||
@@ -148,16 +148,16 @@
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Header="Gebunden Aufschlag" Grid.Row="1" Margin="0,5,5,5">
|
||||
<GroupBox Header="Gebunden-Aufschlag" Grid.Row="1" Margin="0,5,5,5">
|
||||
<Grid>
|
||||
|
||||
<StackPanel Margin="10,10,0,0">
|
||||
<RadioButton x:Name="GebundenTypeFixed" GroupName="GebundenType" Checked="GebundenType_Checked" IsEnabled="False">Fix</RadioButton>
|
||||
<RadioButton x:Name="GebundenTypeGraph" GroupName="GebundenType" Checked="GebundenType_Checked" IsEnabled="False">Frei</RadioButton>
|
||||
<RadioButton x:Name="GebundenTypeNone" GroupName="GebundenType" Checked="GebundenType_Checked" IsEnabled="False">Nein</RadioButton>
|
||||
<RadioButton x:Name="ContractedTypeFixed" GroupName="ContractedType" Checked="ContractedType_Checked" IsEnabled="False">Fix</RadioButton>
|
||||
<RadioButton x:Name="ContractedTypeGraph" GroupName="ContractedType" Checked="ContractedType_Checked" IsEnabled="False">Frei</RadioButton>
|
||||
<RadioButton x:Name="ContractedTypeNone" GroupName="ContractedType" Checked="ContractedType_Checked" IsEnabled="False">Nein</RadioButton>
|
||||
</StackPanel>
|
||||
|
||||
<ctrl:UnitTextBox x:Name="GebundenFlatBonus" Unit="€/kg" TextChanged="GebundenFlatBonus_TextChanged" IsEnabled="False"
|
||||
<ctrl:UnitTextBox x:Name="ContractedFlatBonus" Unit="€/kg" TextChanged="ContractedFlatBonus_TextChanged" IsEnabled="False"
|
||||
Width="90" Margin="5,5,5,5" HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="1"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
@@ -15,8 +15,8 @@ using Elwig.Services;
|
||||
namespace Elwig.Windows {
|
||||
public partial class ChartWindow : ContextWindow {
|
||||
|
||||
public static readonly Color ColorUngebunden = Colors.Blue;
|
||||
public static readonly Color ColorGebunden = Colors.Gold;
|
||||
public static readonly Color ColorUnContracted = Colors.Blue;
|
||||
public static readonly Color ColorContracted = Colors.Gold;
|
||||
|
||||
public readonly int Year;
|
||||
public readonly int AvNr;
|
||||
@@ -27,20 +27,20 @@ namespace Elwig.Windows {
|
||||
private bool Updating = false;
|
||||
|
||||
private Scatter? DataPlot;
|
||||
private Scatter? GebundenPlot;
|
||||
private Scatter? ContractedPlot;
|
||||
private Marker? HighlightedPointPlot;
|
||||
private Marker? PrimaryMarkedPointPlot;
|
||||
private Marker? SecondaryMarkedPointPlot;
|
||||
private Text? TooltipPlot;
|
||||
|
||||
private static readonly LegendItem
|
||||
UngebundenLegend = new() {
|
||||
LabelText = "Ungebunden", LineWidth = 1, LineColor = ColorUngebunden,
|
||||
MarkerStyle = new(MarkerShape.FilledCircle, 5, ColorUngebunden)
|
||||
UnContractedLegend = new() {
|
||||
LabelText = "Ungebunden", LineWidth = 1, LineColor = ColorUnContracted,
|
||||
MarkerStyle = new(MarkerShape.FilledCircle, 5, ColorUnContracted)
|
||||
},
|
||||
GebundenLegend = new() {
|
||||
LabelText = "Gebunden", LineWidth = 1, LineColor = ColorGebunden,
|
||||
MarkerStyle = new(MarkerShape.FilledCircle, 5, ColorGebunden)
|
||||
ContractedLegend = new() {
|
||||
LabelText = "Gebunden", LineWidth = 1, LineColor = ColorContracted,
|
||||
MarkerStyle = new(MarkerShape.FilledCircle, 5, ColorContracted)
|
||||
},
|
||||
LdwLegend = new() {
|
||||
LabelText = "68 °Oe (LDW)", LineWidth = 2, LineColor = Colors.Red, MarkerStyle = MarkerStyle.None
|
||||
@@ -75,7 +75,7 @@ namespace Elwig.Windows {
|
||||
Season = ctx.Seasons.Find(year) ?? throw new ArgumentException("Season not found");
|
||||
CurrencySymbol = Season.Currency.Symbol ?? Season.Currency.Code;
|
||||
PriceInput.Unit = $"{CurrencySymbol}/kg";
|
||||
GebundenFlatBonus.Unit = $"{CurrencySymbol}/kg";
|
||||
ContractedFlatBonus.Unit = $"{CurrencySymbol}/kg";
|
||||
PaymentVar = ctx.PaymentVariants.Find(year, avnr) ?? throw new ArgumentException("PaymentVar not found");
|
||||
Title = $"{PaymentVar.Name} - Lese {year} - Elwig";
|
||||
LockContext = true;
|
||||
@@ -100,7 +100,7 @@ namespace Elwig.Windows {
|
||||
Season = await ctx.FetchSeasons(Year).SingleOrDefaultAsync() ?? throw new ArgumentException("Season not found");
|
||||
CurrencySymbol = Season.Currency.Symbol ?? Season.Currency.Code;
|
||||
PriceInput.Unit = $"{CurrencySymbol}/kg";
|
||||
GebundenFlatBonus.Unit = $"{CurrencySymbol}/kg";
|
||||
ContractedFlatBonus.Unit = $"{CurrencySymbol}/kg";
|
||||
|
||||
try {
|
||||
var data = EditBillingData.FromJson(PaymentVar.Data, await Utils.GetVaributes(ctx, Year));
|
||||
@@ -148,10 +148,10 @@ namespace Elwig.Windows {
|
||||
CopyButton.IsEnabled = true;
|
||||
DeleteButton.IsEnabled = true;
|
||||
EnableTextBox(OechsleInput);
|
||||
GebInput.IsEnabled = SelectedGraphEntry?.GebundenGraph != null;
|
||||
GebundenTypeFixed.IsEnabled = true;
|
||||
GebundenTypeGraph.IsEnabled = true;
|
||||
GebundenTypeNone.IsEnabled = true;
|
||||
ContractedInput.IsEnabled = SelectedGraphEntry?.ContractedGraph != null;
|
||||
ContractedTypeFixed.IsEnabled = true;
|
||||
ContractedTypeGraph.IsEnabled = true;
|
||||
ContractedTypeNone.IsEnabled = true;
|
||||
VaributeInput.IsEnabled = true;
|
||||
AbgewertetInput.IsEnabled = true;
|
||||
EnableOptionButtons();
|
||||
@@ -160,7 +160,7 @@ namespace Elwig.Windows {
|
||||
CopyButton.IsEnabled = false;
|
||||
DeleteButton.IsEnabled = false;
|
||||
DisableTextBox(OechsleInput);
|
||||
GebInput.IsEnabled = false;
|
||||
ContractedInput.IsEnabled = false;
|
||||
DisableOptionButtons();
|
||||
}
|
||||
if (!PaymentVar.TestVariant) {
|
||||
@@ -168,9 +168,9 @@ namespace Elwig.Windows {
|
||||
CopyButton.IsEnabled = false;
|
||||
DeleteButton.IsEnabled = false;
|
||||
DisableTextBox(PriceInput);
|
||||
GebundenTypeFixed.IsEnabled = false;
|
||||
GebundenTypeGraph.IsEnabled = false;
|
||||
GebundenTypeNone.IsEnabled = false;
|
||||
ContractedTypeFixed.IsEnabled = false;
|
||||
ContractedTypeGraph.IsEnabled = false;
|
||||
ContractedTypeNone.IsEnabled = false;
|
||||
VaributeInput.IsEnabled = false;
|
||||
AbgewertetInput.IsEnabled = false;
|
||||
}
|
||||
@@ -181,15 +181,15 @@ namespace Elwig.Windows {
|
||||
FillingInputs = true;
|
||||
|
||||
AbgewertetInput.IsChecked = SelectedGraphEntry?.Abgewertet;
|
||||
if (SelectedGraphEntry?.GebundenFlatBonus is double bonus) {
|
||||
GebundenTypeFixed.IsChecked = true;
|
||||
GebundenFlatBonus.Text = $"{bonus}";
|
||||
} else if (SelectedGraphEntry?.GebundenGraph != null) {
|
||||
GebundenTypeGraph.IsChecked = true;
|
||||
GebundenFlatBonus.Text = "";
|
||||
if (SelectedGraphEntry?.ContractedFlatBonus is double bonus) {
|
||||
ContractedTypeFixed.IsChecked = true;
|
||||
ContractedFlatBonus.Text = $"{bonus}";
|
||||
} else if (SelectedGraphEntry?.ContractedGraph != null) {
|
||||
ContractedTypeGraph.IsChecked = true;
|
||||
ContractedFlatBonus.Text = "";
|
||||
} else {
|
||||
GebundenTypeNone.IsChecked = true;
|
||||
GebundenFlatBonus.Text = "";
|
||||
ContractedTypeNone.IsChecked = true;
|
||||
ContractedFlatBonus.Text = "";
|
||||
}
|
||||
|
||||
ControlUtils.SelectItems(VaributeInput, SelectedGraphEntry?.Vaributes ?? []);
|
||||
@@ -208,21 +208,21 @@ namespace Elwig.Windows {
|
||||
private void InitPlot() {
|
||||
RefreshGradationLines();
|
||||
|
||||
if (SelectedGraphEntry?.GebundenGraph != null) {
|
||||
GebundenPlot = OechslePricePlot.Plot.Add.Scatter(SelectedGraphEntry.GebundenGraph.DataX, SelectedGraphEntry.GebundenGraph.DataY);
|
||||
GebundenPlot.LineStyle.Color = ColorGebunden;
|
||||
GebundenPlot.Color = ColorGebunden;
|
||||
GebundenPlot.MarkerStyle = new MarkerStyle(MarkerShape.FilledCircle, 9, ColorGebunden);
|
||||
if (SelectedGraphEntry?.ContractedGraph != null) {
|
||||
ContractedPlot = OechslePricePlot.Plot.Add.Scatter(SelectedGraphEntry.ContractedGraph.DataX, SelectedGraphEntry.ContractedGraph.DataY);
|
||||
ContractedPlot.LineStyle.Color = ColorContracted;
|
||||
ContractedPlot.Color = ColorContracted;
|
||||
ContractedPlot.MarkerStyle = new MarkerStyle(MarkerShape.FilledCircle, 9, ColorContracted);
|
||||
}
|
||||
|
||||
if (SelectedGraphEntry != null) {
|
||||
DataPlot = OechslePricePlot.Plot.Add.Scatter(SelectedGraphEntry.DataGraph.DataX, SelectedGraphEntry.DataGraph.DataY);
|
||||
DataPlot.LineStyle.Color = ColorUngebunden;
|
||||
DataPlot.Color = ColorUngebunden;
|
||||
DataPlot.MarkerStyle = new MarkerStyle(MarkerShape.FilledCircle, 9, ColorUngebunden);
|
||||
DataPlot.LineStyle.Color = ColorUnContracted;
|
||||
DataPlot.Color = ColorUnContracted;
|
||||
DataPlot.MarkerStyle = new MarkerStyle(MarkerShape.FilledCircle, 9, ColorUnContracted);
|
||||
}
|
||||
|
||||
OechslePricePlot.Plot.Axes.SetLimits(Math.Min(GraphEntry.MinX, GraphEntry.MinXGeb) - 1, GraphEntry.MaxX + 1, -0.1, 1.5);
|
||||
OechslePricePlot.Plot.Axes.SetLimits(Math.Min(GraphEntry.MinX, GraphEntry.MinXCtrd) - 1, GraphEntry.MaxX + 1, -0.1, 1.5);
|
||||
|
||||
HighlightedPointPlot = OechslePricePlot.Plot.Add.Marker(0, 0, MarkerShape.OpenCircle, 10, Colors.Red);
|
||||
HighlightedPointPlot.IsVisible = false;
|
||||
@@ -250,9 +250,9 @@ namespace Elwig.Windows {
|
||||
OechslePricePlot.Plot.Remove(DataPlot);
|
||||
DataPlot = null;
|
||||
}
|
||||
if (GebundenPlot != null) {
|
||||
OechslePricePlot.Plot.Remove(GebundenPlot);
|
||||
GebundenPlot = null;
|
||||
if (ContractedPlot != null) {
|
||||
OechslePricePlot.Plot.Remove(ContractedPlot);
|
||||
ContractedPlot = null;
|
||||
}
|
||||
OechslePricePlot.Plot.Clear();
|
||||
OechslePricePlot.Reset();
|
||||
@@ -365,8 +365,8 @@ namespace Elwig.Windows {
|
||||
OechslePricePlot.Plot.Legend.ManualItems.Add(LdwLegend);
|
||||
OechslePricePlot.Plot.Legend.ManualItems.Add(QuwLegend);
|
||||
OechslePricePlot.Plot.Legend.ManualItems.Add(KabLegend);
|
||||
OechslePricePlot.Plot.Legend.ManualItems.Add(UngebundenLegend);
|
||||
if (SelectedGraphEntry?.GebundenGraph != null) OechslePricePlot.Plot.Legend.ManualItems.Add(GebundenLegend);
|
||||
OechslePricePlot.Plot.Legend.ManualItems.Add(UnContractedLegend);
|
||||
if (SelectedGraphEntry?.ContractedGraph != null) OechslePricePlot.Plot.Legend.ManualItems.Add(ContractedLegend);
|
||||
}
|
||||
|
||||
private void HideLegend() {
|
||||
@@ -408,10 +408,10 @@ namespace Elwig.Windows {
|
||||
UpdateSelectedPoint();
|
||||
}
|
||||
|
||||
private void GebInput_Changed(object sender, RoutedEventArgs evt) {
|
||||
private void ContractedInput_Changed(object sender, RoutedEventArgs evt) {
|
||||
if (Updating)
|
||||
return;
|
||||
var sel = GebInput.IsChecked == true ? SelectedGraphEntry?.GebundenGraph : SelectedGraphEntry?.DataGraph;
|
||||
var sel = ContractedInput.IsChecked == true ? SelectedGraphEntry?.ContractedGraph : SelectedGraphEntry?.DataGraph;
|
||||
if (sel != ActiveGraph) ChangeActiveGraph(sel);
|
||||
UpdateSelectedPoint();
|
||||
}
|
||||
@@ -424,7 +424,7 @@ namespace Elwig.Windows {
|
||||
PrimaryMarkedPointPlot?.Location = new Coordinates(PrimaryMarkedPointPlot.Location.X, price);
|
||||
SetHasChanged();
|
||||
OechslePricePlot.Refresh();
|
||||
CheckGebundenTypeFixed();
|
||||
CheckContractedTypeFixed();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -436,7 +436,7 @@ namespace Elwig.Windows {
|
||||
ActiveGraph.FlattenGraphLeft(PrimaryMarkedPoint);
|
||||
SetHasChanged();
|
||||
OechslePricePlot.Refresh();
|
||||
CheckGebundenTypeFixed();
|
||||
CheckContractedTypeFixed();
|
||||
}
|
||||
|
||||
private void RightFlatButton_Click(object sender, RoutedEventArgs evt) {
|
||||
@@ -446,7 +446,7 @@ namespace Elwig.Windows {
|
||||
ActiveGraph.FlattenGraphRight(PrimaryMarkedPoint);
|
||||
SetHasChanged();
|
||||
OechslePricePlot.Refresh();
|
||||
CheckGebundenTypeFixed();
|
||||
CheckContractedTypeFixed();
|
||||
}
|
||||
|
||||
private void InterpolateButton_Click(object sender, RoutedEventArgs evt) {
|
||||
@@ -456,7 +456,7 @@ namespace Elwig.Windows {
|
||||
ActiveGraph.InterpolateGraph(PrimaryMarkedPoint, SecondaryMarkedPoint);
|
||||
SetHasChanged();
|
||||
OechslePricePlot.Refresh();
|
||||
CheckGebundenTypeFixed();
|
||||
CheckContractedTypeFixed();
|
||||
}
|
||||
|
||||
private void LinearIncreaseButton_Click(object sender, RoutedEventArgs e) {
|
||||
@@ -470,7 +470,7 @@ namespace Elwig.Windows {
|
||||
ActiveGraph.LinearIncreaseGraphToEnd(PrimaryMarkedPoint, priceIncrease.Value);
|
||||
SetHasChanged();
|
||||
OechslePricePlot.Refresh();
|
||||
CheckGebundenTypeFixed();
|
||||
CheckContractedTypeFixed();
|
||||
}
|
||||
|
||||
private void OechslePricePlot_MouseDown(object sender, MouseEventArgs e) {
|
||||
@@ -500,7 +500,7 @@ namespace Elwig.Windows {
|
||||
if (Highlighted.Graph != null) {
|
||||
Updating = true;
|
||||
OechsleInput.Text = Highlighted.Graph.GetOechsleAt(Highlighted.Index).ToString();
|
||||
GebInput.IsChecked = Highlighted.Graph == SelectedGraphEntry?.GebundenGraph;
|
||||
ContractedInput.IsChecked = Highlighted.Graph == SelectedGraphEntry?.ContractedGraph;
|
||||
PriceInput.Text = Math.Round(Highlighted.Graph.GetPriceAt(Highlighted.Index), Season.Precision).ToString();
|
||||
Updating = false;
|
||||
}
|
||||
@@ -509,14 +509,14 @@ namespace Elwig.Windows {
|
||||
} else {
|
||||
PrimaryMarkedPoint = -1;
|
||||
SecondaryMarkedPoint = -1;
|
||||
if (SelectedGraphEntry?.GebundenGraph != null) {
|
||||
if (SelectedGraphEntry?.ContractedGraph != null) {
|
||||
ChangeActiveGraph(null);
|
||||
}
|
||||
ChangeMarker(PrimaryMarkedPointPlot, false);
|
||||
ChangeMarker(SecondaryMarkedPointPlot, false);
|
||||
|
||||
OechsleInput.Text = "";
|
||||
GebInput.IsChecked = false;
|
||||
ContractedInput.IsChecked = false;
|
||||
PriceInput.Text = "";
|
||||
DisableTextBox(PriceInput);
|
||||
|
||||
@@ -549,7 +549,7 @@ namespace Elwig.Windows {
|
||||
}
|
||||
|
||||
var mouseOnData = MouseOnPlot(DataPlot, GetMouseCoordinates(e.GetPosition(OechslePricePlot)));
|
||||
var mouseOnGebunden = MouseOnPlot(GebundenPlot, GetMouseCoordinates(e.GetPosition(OechslePricePlot)));
|
||||
var mouseOnContracted = MouseOnPlot(ContractedPlot, GetMouseCoordinates(e.GetPosition(OechslePricePlot)));
|
||||
|
||||
Highlighted = LastHighlighted;
|
||||
|
||||
@@ -560,13 +560,13 @@ namespace Elwig.Windows {
|
||||
HoverActive = true;
|
||||
if (SelectedGraphEntry?.DataGraph is Graph g)
|
||||
HandleTooltip(mouseOnData.Value.X, mouseOnData.Value.Y, mouseOnData.Value.Index, g, e.GetPosition(OechslePricePlot), e is MouseWheelEventArgs);
|
||||
} else if (mouseOnGebunden != null) {
|
||||
ChangeMarker(HighlightedPointPlot, true, mouseOnGebunden.Value.X, mouseOnGebunden.Value.Y);
|
||||
} else if (mouseOnContracted != null) {
|
||||
ChangeMarker(HighlightedPointPlot, true, mouseOnContracted.Value.X, mouseOnContracted.Value.Y);
|
||||
HighlightedPointPlot?.IsVisible = true;
|
||||
HoverChanged = true ^ HoverActive;
|
||||
HoverActive = true;
|
||||
if (SelectedGraphEntry?.GebundenGraph is Graph g)
|
||||
HandleTooltip(mouseOnGebunden.Value.X, mouseOnGebunden.Value.Y, mouseOnGebunden.Value.Index, g, e.GetPosition(OechslePricePlot), e is MouseWheelEventArgs);
|
||||
if (SelectedGraphEntry?.ContractedGraph is Graph g)
|
||||
HandleTooltip(mouseOnContracted.Value.X, mouseOnContracted.Value.Y, mouseOnContracted.Value.Index, g, e.GetPosition(OechslePricePlot), e is MouseWheelEventArgs);
|
||||
} else {
|
||||
ChangeMarker(HighlightedPointPlot, false);
|
||||
HoverChanged = false ^ HoverActive;
|
||||
@@ -699,25 +699,25 @@ namespace Elwig.Windows {
|
||||
private void ChangeActiveGraph(Graph? g) {
|
||||
if (g != null && g == SelectedGraphEntry?.DataGraph) {
|
||||
EnableTextBox(OechsleInput);
|
||||
if (SelectedGraphEntry?.GebundenGraph != null) ChangeLineWidth(DataPlot, 4);
|
||||
ChangeLineWidth(GebundenPlot, 1);
|
||||
GebInput.IsEnabled = SelectedGraphEntry?.GebundenGraph != null;
|
||||
GebInput.IsChecked = false;
|
||||
} else if (g != null && g == SelectedGraphEntry?.GebundenGraph) {
|
||||
if (SelectedGraphEntry?.ContractedGraph != null) ChangeLineWidth(DataPlot, 4);
|
||||
ChangeLineWidth(ContractedPlot, 1);
|
||||
ContractedInput.IsEnabled = SelectedGraphEntry?.ContractedGraph != null;
|
||||
ContractedInput.IsChecked = false;
|
||||
} else if (g != null && g == SelectedGraphEntry?.ContractedGraph) {
|
||||
EnableTextBox(OechsleInput);
|
||||
ChangeLineWidth(GebundenPlot, 4);
|
||||
ChangeLineWidth(ContractedPlot, 4);
|
||||
ChangeLineWidth(DataPlot, 1);
|
||||
GebInput.IsEnabled = SelectedGraphEntry?.GebundenGraph != null;
|
||||
GebInput.IsChecked = true;
|
||||
ContractedInput.IsEnabled = SelectedGraphEntry?.ContractedGraph != null;
|
||||
ContractedInput.IsChecked = true;
|
||||
} else {
|
||||
DisableTextBox(OechsleInput);
|
||||
DisableTextBox(PriceInput);
|
||||
OechsleInput.Text = "";
|
||||
GebInput.IsEnabled = false;
|
||||
GebInput.IsChecked = false;
|
||||
ContractedInput.IsEnabled = false;
|
||||
ContractedInput.IsChecked = false;
|
||||
PriceInput.Text = "";
|
||||
ChangeLineWidth(DataPlot, 1);
|
||||
ChangeLineWidth(GebundenPlot, 1);
|
||||
ChangeLineWidth(ContractedPlot, 1);
|
||||
}
|
||||
ActiveGraph = g;
|
||||
}
|
||||
@@ -730,11 +730,11 @@ namespace Elwig.Windows {
|
||||
RefreshInputs();
|
||||
}
|
||||
|
||||
private void GebundenFlatBonus_TextChanged(object sender, TextChangedEventArgs e) {
|
||||
private void ContractedFlatBonus_TextChanged(object sender, TextChangedEventArgs e) {
|
||||
if (FillingInputs) return;
|
||||
var r = Validator.CheckDecimal(GebundenFlatBonus, true, 2, Season.Precision);
|
||||
var r = Validator.CheckDecimal(ContractedFlatBonus, true, 2, Season.Precision);
|
||||
if (r.IsValid && SelectedGraphEntry != null) {
|
||||
SelectedGraphEntry.GebundenFlatBonus = double.Parse(GebundenFlatBonus.Text);
|
||||
SelectedGraphEntry.ContractedFlatBonus = double.Parse(ContractedFlatBonus.Text);
|
||||
ResetPlot();
|
||||
InitPlot();
|
||||
}
|
||||
@@ -795,37 +795,37 @@ namespace Elwig.Windows {
|
||||
GraphList.Items.Refresh();
|
||||
}
|
||||
|
||||
private void GebundenType_Checked(object sender, RoutedEventArgs e) {
|
||||
private void ContractedType_Checked(object sender, RoutedEventArgs e) {
|
||||
if (FillingInputs) return;
|
||||
if (SelectedGraphEntry == null) {
|
||||
DisableTextBox(GebundenFlatBonus);
|
||||
DisableTextBox(ContractedFlatBonus);
|
||||
return;
|
||||
}
|
||||
if (GebundenTypeNone.IsChecked == true) {
|
||||
SelectedGraphEntry.RemoveGebundenGraph();
|
||||
DisableTextBox(GebundenFlatBonus);
|
||||
} else if (GebundenTypeFixed.IsChecked == true) {
|
||||
SelectedGraphEntry.GebundenFlatBonus = double.TryParse(GebundenFlatBonus.Text, out var val) ? val : 0.1;
|
||||
SelectedGraphEntry.AddGebundenGraph();
|
||||
EnableTextBox(GebundenFlatBonus);
|
||||
} else if (GebundenTypeGraph.IsChecked == true) {
|
||||
SelectedGraphEntry.AddGebundenGraph();
|
||||
DisableTextBox(GebundenFlatBonus);
|
||||
if (ContractedTypeNone.IsChecked == true) {
|
||||
SelectedGraphEntry.RemoveContractedGraph();
|
||||
DisableTextBox(ContractedFlatBonus);
|
||||
} else if (ContractedTypeFixed.IsChecked == true) {
|
||||
SelectedGraphEntry.ContractedFlatBonus = double.TryParse(ContractedFlatBonus.Text, out var val) ? val : 0.1;
|
||||
SelectedGraphEntry.AddContractedGraph();
|
||||
EnableTextBox(ContractedFlatBonus);
|
||||
} else if (ContractedTypeGraph.IsChecked == true) {
|
||||
SelectedGraphEntry.AddContractedGraph();
|
||||
DisableTextBox(ContractedFlatBonus);
|
||||
}
|
||||
SetHasChanged();
|
||||
RefreshInputs();
|
||||
}
|
||||
|
||||
private void CheckGebundenTypeFixed() {
|
||||
private void CheckContractedTypeFixed() {
|
||||
FillingInputs = true;
|
||||
if (SelectedGraphEntry?.GebundenFlatBonus is double bonus) {
|
||||
GebundenTypeFixed.IsChecked = true;
|
||||
GebundenFlatBonus.Text = $"{bonus}";
|
||||
EnableTextBox(GebundenFlatBonus);
|
||||
} else if (SelectedGraphEntry?.GebundenGraph != null) {
|
||||
GebundenTypeGraph.IsChecked = true;
|
||||
GebundenFlatBonus.Text = "";
|
||||
DisableTextBox(GebundenFlatBonus);
|
||||
if (SelectedGraphEntry?.ContractedFlatBonus is double bonus) {
|
||||
ContractedTypeFixed.IsChecked = true;
|
||||
ContractedFlatBonus.Text = $"{bonus}";
|
||||
EnableTextBox(ContractedFlatBonus);
|
||||
} else if (SelectedGraphEntry?.ContractedGraph != null) {
|
||||
ContractedTypeGraph.IsChecked = true;
|
||||
ContractedFlatBonus.Text = "";
|
||||
DisableTextBox(ContractedFlatBonus);
|
||||
}
|
||||
FillingInputs = false;
|
||||
}
|
||||
|
||||
@@ -682,7 +682,7 @@
|
||||
Margin="0,70,10,10" Grid.Column="1"
|
||||
DisplayMemberPath="Name"/>
|
||||
|
||||
<CheckBox x:Name="GebundenInput" IsChecked="{Binding IsGebunden, Mode=TwoWay}"
|
||||
<CheckBox x:Name="ContractedInput" IsChecked="{Binding IsContracted, Mode=TwoWay}"
|
||||
Content="Gebunden" Margin="10,105,0,0" Grid.Column="0" Grid.ColumnSpan="2" IsThreeState="True"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed" Indeterminate="CheckBox_Changed"/>
|
||||
|
||||
@@ -356,11 +356,11 @@ namespace Elwig.Windows {
|
||||
}
|
||||
|
||||
if (App.Client.IsMatzen || App.Client.IsWinzerkeller || App.Client.IsBaden || App.Client.IsWeinland) {
|
||||
GebundenInput.IsEnabled = false;
|
||||
SetDefaultValue(GebundenInput, null);
|
||||
ContractedInput.IsEnabled = false;
|
||||
SetDefaultValue(ContractedInput, null);
|
||||
} else {
|
||||
GebundenInput.IsEnabled = true;
|
||||
UnsetDefaultValue(GebundenInput);
|
||||
ContractedInput.IsEnabled = true;
|
||||
UnsetDefaultValue(ContractedInput);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace Elwig.Windows {
|
||||
ViewModel.IsNetWeight = App.Config.WeighingMode == WeighingMode.Net;
|
||||
ViewModel.IsHandPicked = App.Config.WeighingMode != WeighingMode.Net ? true : null;
|
||||
ViewModel.Unloading = null;
|
||||
ViewModel.IsGebunden = null;
|
||||
ViewModel.IsContracted = null;
|
||||
InitialDefaultInputs();
|
||||
|
||||
//WineQualityLevelInput.IsEnabled = false; // disable wine quality level input in Übernahme
|
||||
|
||||
@@ -167,14 +167,14 @@
|
||||
Margin="180,225,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Checked="MemberInput_Checked"/>
|
||||
|
||||
<Label Content="Funktionär:" x:Name="MemberFunktionärLabel" Margin="10,250,0,10"/>
|
||||
<RadioButton x:Name="MemberFunktionärYesInput" Content="Ja" GroupName="MemberFunktionär"
|
||||
<Label Content="Funktionär:" x:Name="MemberOfficerLabel" Margin="10,250,0,10"/>
|
||||
<RadioButton x:Name="MemberOfficerYesInput" Content="Ja" GroupName="MemberOfficer"
|
||||
Margin="80,255,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Checked="MemberInput_Checked"/>
|
||||
<RadioButton x:Name="MemberFunktionärNoInput" Content="Nein" GroupName="MemberFunktionär"
|
||||
<RadioButton x:Name="MemberOfficerNoInput" Content="Nein" GroupName="MemberOfficer"
|
||||
Margin="125,255,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Checked="MemberInput_Checked"/>
|
||||
<RadioButton x:Name="MemberFunktionärIndifferentInput" Content="Egal" GroupName="MemberFunktionär"
|
||||
<RadioButton x:Name="MemberOfficerIndifferentInput" Content="Egal" GroupName="MemberOfficer"
|
||||
Margin="180,255,10,10" VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Checked="MemberInput_Checked"/>
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Elwig.Windows {
|
||||
RecipientsActiveMembersInput.IsChecked = true;
|
||||
|
||||
MemberOrganicIndifferentInput.IsChecked = true;
|
||||
MemberFunktionärIndifferentInput.IsChecked = true;
|
||||
MemberOfficerIndifferentInput.IsChecked = true;
|
||||
|
||||
DeliveryConfirmationFooterInput.Text = App.Client.TextDeliveryConfirmation;
|
||||
CreditNoteFooterInput.Text = App.Client.TextCreditNote;
|
||||
@@ -408,10 +408,10 @@ namespace Elwig.Windows {
|
||||
MemberOrganicYesInput.Visibility = vis;
|
||||
MemberOrganicNoInput.Visibility = vis;
|
||||
MemberOrganicIndifferentInput.Visibility = vis;
|
||||
MemberFunktionärLabel.Visibility = vis;
|
||||
MemberFunktionärYesInput.Visibility = vis;
|
||||
MemberFunktionärNoInput.Visibility = vis;
|
||||
MemberFunktionärIndifferentInput.Visibility = vis;
|
||||
MemberOfficerLabel.Visibility = vis;
|
||||
MemberOfficerYesInput.Visibility = vis;
|
||||
MemberOfficerNoInput.Visibility = vis;
|
||||
MemberOfficerIndifferentInput.Visibility = vis;
|
||||
MemberAreaComInput.Visibility = RecipientsAreaComMembersInput.IsChecked == true ? Visibility.Visible : Visibility.Hidden;
|
||||
MemberAreaComLabel.Visibility = RecipientsAreaComMembersInput.IsChecked == true ? Visibility.Visible : Visibility.Hidden;
|
||||
MemberDeliveryAncmtInput.Visibility = RecipientsDeliveryAncmtMembersInput.IsChecked == true ? Visibility.Visible : Visibility.Hidden;
|
||||
@@ -459,10 +459,10 @@ namespace Elwig.Windows {
|
||||
} else if (MemberOrganicNoInput.IsChecked == true) {
|
||||
query = query.Where(m => !m.IsOrganic);
|
||||
}
|
||||
if (MemberFunktionärYesInput.IsChecked == true) {
|
||||
query = query.Where(m => m.IsFunktionär);
|
||||
} else if (MemberFunktionärNoInput.IsChecked == true) {
|
||||
query = query.Where(m => !m.IsFunktionär);
|
||||
if (MemberOfficerYesInput.IsChecked == true) {
|
||||
query = query.Where(m => m.IsOfficer);
|
||||
} else if (MemberOfficerNoInput.IsChecked == true) {
|
||||
query = query.Where(m => !m.IsOfficer);
|
||||
}
|
||||
|
||||
if (RecipientsAreaComMembersInput.IsChecked == true) {
|
||||
|
||||
@@ -301,12 +301,12 @@
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2">Ungebunden:</TextBlock>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" TextAlignment="Right" x:Name="SeasonStatMembersTotal">-</TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" TextAlignment="Right" x:Name="SeasonStatMembersGeb">-</TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" TextAlignment="Right" x:Name="SeasonStatMembersCtrd">-</TextBlock>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" TextAlignment="Right">-</TextBlock>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" TextAlignment="Right" x:Name="SeasonStatWeightTotal">-</TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="2" TextAlignment="Right" x:Name="SeasonStatWeightGeb">-</TextBlock>
|
||||
<TextBlock Grid.Row="3" Grid.Column="2" TextAlignment="Right" x:Name="SeasonStatWeightUngeb">-</TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="2" TextAlignment="Right" x:Name="SeasonStatWeightCtrd">-</TextBlock>
|
||||
<TextBlock Grid.Row="3" Grid.Column="2" TextAlignment="Right" x:Name="SeasonStatWeightUnCtrd">-</TextBlock>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="3" TextAlignment="Right">-</TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="3" TextAlignment="Right" x:Name="SeasonStatArea">-</TextBlock>
|
||||
|
||||
@@ -406,26 +406,26 @@ namespace Elwig.Windows {
|
||||
BreakdownMemberVarietyButton.IsEnabled = valid;
|
||||
|
||||
SeasonStatMembersTotal.Text = "-";
|
||||
SeasonStatMembersGeb.Text = "-";
|
||||
SeasonStatMembersCtrd.Text = "-";
|
||||
SeasonStatWeightTotal.Text = "-";
|
||||
SeasonStatWeightGeb.Text = "-";
|
||||
SeasonStatWeightUngeb.Text = "-";
|
||||
SeasonStatWeightCtrd.Text = "-";
|
||||
SeasonStatWeightUnCtrd.Text = "-";
|
||||
SeasonStatArea.Text = "-";
|
||||
if (valid) {
|
||||
await Task.Run(async () => {
|
||||
var membersTotal = await ctx.Deliveries.Where(d => d.Year == year).Select(d => d.Member).Distinct().CountAsync();
|
||||
var areaComs = Utils.ActiveAreaCommitments(ctx.AreaCommitments, year!.Value);
|
||||
var membersGeb = await areaComs.Select(c => c.Member).Distinct().CountAsync();
|
||||
var membersCtrd = await areaComs.Select(c => c.Member).Distinct().CountAsync();
|
||||
var weightTotal = await ctx.DeliveryParts.Where(p => p.Year == year).SumAsync(p => p.Weight);
|
||||
var gebWeight = await ctx.DeliveryPartBuckets.Where(b => b.Year == year && b.Discr != "_").SumAsync(b => b.Value);
|
||||
var ctrdWeight = await ctx.DeliveryPartBuckets.Where(b => b.Year == year && b.Discr != "_").SumAsync(b => b.Value);
|
||||
var area = await areaComs.SumAsync(c => c.Area);
|
||||
await App.MainDispatcher.BeginInvoke(() => {
|
||||
if (year != SeasonInput.Value) return;
|
||||
SeasonStatMembersTotal.Text = $"{membersTotal:N0}";
|
||||
SeasonStatMembersGeb.Text = $"{membersGeb:N0}";
|
||||
SeasonStatMembersCtrd.Text = $"{membersCtrd:N0}";
|
||||
SeasonStatWeightTotal.Text = $"{weightTotal:N0} kg";
|
||||
SeasonStatWeightGeb.Text = $"{gebWeight:N0} kg";
|
||||
SeasonStatWeightUngeb.Text = $"{weightTotal - gebWeight:N0} kg";
|
||||
SeasonStatWeightCtrd.Text = $"{ctrdWeight:N0} kg";
|
||||
SeasonStatWeightUnCtrd.Text = $"{weightTotal - ctrdWeight:N0} kg";
|
||||
SeasonStatArea.Text = $"{area:N0} m²";
|
||||
});
|
||||
});
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
<Bold>Aktiv</Bold>: aktiv, !Aktiv (nicht-aktiv)<LineBreak/>
|
||||
<Bold>Bio-Betrieb</Bold>: BIO, !bio (ausgenommen Bio)<LineBreak/>
|
||||
<Bold>Buchführend</Bold>: buchf[ührend], Pauschal[iert], !buchf[ührend]<LineBreak/>
|
||||
<Bold>Volllieferant</Bold>: voll[lieferant], !Voll[lieferant] (nicht-Volllieferant)<LineBreak/>
|
||||
<Bold>Vollablieferer</Bold>: voll[ablieferer], voll[lieferant], !Voll[lieferant] (nicht-Vollablieferer)<LineBreak/>
|
||||
<Bold>Funktionär</Bold>: Funkt[ionär], !funkt[ionär] (nicht-Funktionär)<LineBreak/>
|
||||
<Bold>Telefon-Nr.</Bold>: z.B. +436641234, ....<LineBreak/>
|
||||
<Bold>Kontaktdaten</Bold>: email (mind. 1 E-Mail-Adr.), telnr (mind. 1 Tel.-Nr.), !email (keine E-Mail-Adr.), !telnr (keine Tel.-Nr.)<LineBreak/>
|
||||
@@ -569,7 +569,7 @@
|
||||
Checked="OrganicInput_Changed" Unchecked="OrganicInput_Changed"
|
||||
Grid.Column="2" HorizontalAlignment="Left" Margin="5,15,0,0" VerticalAlignment="Top"/>
|
||||
|
||||
<CheckBox x:Name="BuchführendInput" Content="Buchführend" IsChecked="{Binding IsBuchführend, Mode=TwoWay}" IsEnabled="False"
|
||||
<CheckBox x:Name="AccountingInput" Content="Buchführend" IsChecked="{Binding IsAccounting, Mode=TwoWay}" IsEnabled="False"
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||
Grid.Column="2" HorizontalAlignment="Left" Margin="5,45,0,0" VerticalAlignment="Top"/>
|
||||
|
||||
@@ -660,11 +660,11 @@
|
||||
Checked="ActiveInput_Changed" Unchecked="ActiveInput_Changed"
|
||||
Grid.Column="2" HorizontalAlignment="Left" Margin="0,15,0,0" VerticalAlignment="Top"/>
|
||||
|
||||
<CheckBox x:Name="VollLieferantInput" Content="Volllieferant" IsChecked="{Binding IsVollLieferant, Mode=TwoWay}" IsEnabled="False"
|
||||
<CheckBox x:Name="FullDeliveryInput" Content="Vollablieferer" IsChecked="{Binding IsFullDelivery, Mode=TwoWay}" IsEnabled="False"
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||
Grid.Column="2" HorizontalAlignment="Left" Margin="0,45,0,0" VerticalAlignment="Top"/>
|
||||
|
||||
<CheckBox x:Name="FunkionärInput" Content="Funktionär" IsChecked="{Binding IsFunktionär, Mode=TwoWay}" IsEnabled="False"
|
||||
<CheckBox x:Name="OfficerInput" Content="Funktionär" IsChecked="{Binding IsOfficer, Mode=TwoWay}" IsEnabled="False"
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||
Grid.Column="2" HorizontalAlignment="Left" Margin="0,75,0,0" VerticalAlignment="Top"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user