Todo Stunden/Minuten Auswahl erledigt + diverse Berichte (Akgg, IBP)
This commit is contained in:
@@ -190,7 +190,6 @@ namespace BeWo
|
||||
bool isEndDateVisible = false;
|
||||
bool isOnlyYearMonthVisible = false;
|
||||
bool isZeiterfassDateNormal = true;
|
||||
bool isZeiterfassungInStdMin = false;
|
||||
int lastSelectedStundenkontoIntervall = 3;
|
||||
bool showSignatures = false;
|
||||
bool showBetrag = false;
|
||||
@@ -251,13 +250,17 @@ namespace BeWo
|
||||
isOnlyYearMonthVisible = true;
|
||||
}
|
||||
|
||||
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.IsZeiterfassungInStdMin);
|
||||
if(val != null && val.Equals("1"))
|
||||
{
|
||||
isZeiterfassungInStdMin = true;
|
||||
AppSettings.EinheitZeiterfassung = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.EinheitZeiterfassung);
|
||||
if (String.IsNullOrEmpty(AppSettings.EinheitZeiterfassung))
|
||||
{
|
||||
AppSettings.EinheitZeiterfassung = "0";
|
||||
}
|
||||
if(!isZeiterfassungInStdMin)
|
||||
if (AppSettings.EinheitZeiterfassung == "1")
|
||||
{
|
||||
AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Stunden;
|
||||
}
|
||||
else
|
||||
{
|
||||
AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Minuten;
|
||||
}
|
||||
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.IsZeiterfassDateNormal);
|
||||
@@ -538,7 +541,6 @@ namespace BeWo
|
||||
AppSettings.IsEndDateVisible = isEndDateVisible;
|
||||
AppSettings.IsOnlyYearMonthVisible = isOnlyYearMonthVisible;
|
||||
AppSettings.IsZeiterfassDateNormal = isZeiterfassDateNormal;
|
||||
AppSettings.IsZeiterfassungInStdMin = isZeiterfassungInStdMin;
|
||||
AppSettings.MaxDaysEditServiceRecordsAllowed = maxDaysEditServiceRecordsAllowed;
|
||||
AppSettings.HilfeplanAuslaufAuswahl = hilfeplanAuslaufAuswahl;
|
||||
AppSettings.LastSelectedStundenkontoIntervall = lastSelectedStundenkontoIntervall;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace BeWo.Core.Config
|
||||
|
||||
private bool misZeiterfassDateNormal = true;
|
||||
|
||||
private bool misZeiterfassungInStdMin = true;
|
||||
private String einheitZeiterfassung = "0";
|
||||
|
||||
private CustomerFilterEnum _CustomerFilterInZeiterfassung = CustomerFilterEnum.All;
|
||||
private CustomerFilterEnum _CustomerFilterSupportConcepts = CustomerFilterEnum.All;
|
||||
@@ -86,10 +86,10 @@ namespace BeWo.Core.Config
|
||||
set { misZeiterfassDateNormal = value; }
|
||||
}
|
||||
|
||||
public bool IsZeiterfassungInStdMin
|
||||
public String EinheitZeiterfassung
|
||||
{
|
||||
get { return misZeiterfassungInStdMin; }
|
||||
set { misZeiterfassungInStdMin = value; }
|
||||
get { return einheitZeiterfassung; }
|
||||
set { einheitZeiterfassung = value; }
|
||||
}
|
||||
|
||||
public ZeiterfassungsDauer LetzteZeiterfassungsDauer
|
||||
|
||||
@@ -115,9 +115,10 @@
|
||||
<dxe:SpinEdit x:Name="ZeiterfassungsSchwellwert" IsFloatValue="False" MinValue="0" MaxValue="100" Value="80"
|
||||
Grid.Column="1" Grid.Row="3" Margin="3,5,3,5" Height="23" EditValue="{Binding Path=ZeiterfassungsSchwellwert, Converter={StaticResource Int2DecimalConverter}}" />
|
||||
|
||||
<CheckBox Margin="3,5,3,5" Content="{markup:Translate Einheit in Minuten}" IsChecked="{Binding Path=IsZeiterfassungInStdMin}" Grid.ColumnSpan="2" Grid.Row="4" />
|
||||
|
||||
<CheckBox Margin="200,5,3,5" Content="{markup:Translate Einheit in Stunden}" IsChecked="{Binding Path=IsZeiterfassungInStdMin}" Grid.ColumnSpan="2" Grid.Row="4" />
|
||||
|
||||
<TextBlock Foreground="Black" Grid.Column="0" Grid.Row="4" Margin="3,5,3,5" TextWrapping="Wrap" VerticalAlignment="Center" Text="{markup:Translate Zeiteinheit der Dauer}"/>
|
||||
<ComboBox x:Name="ComboZeiteinheit" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Margin="160,5,3,5" Height="23" SelectionChanged="ComboZeiteinheit_SelectionChanged"/>
|
||||
|
||||
|
||||
|
||||
<CheckBox Margin="3,5,3,5" Content="{markup:Translate Enddatum anzeigen}" IsChecked="{Binding Path=IsEndDateVisible}" Grid.ColumnSpan="2" Grid.Row="6" />
|
||||
|
||||
@@ -30,6 +30,22 @@ namespace BeWo.View.Detail
|
||||
GroupOwnChatSettings.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
ComboZeiteinheit.ItemsSource = new List<String> { "Minuten", "Stunden", "Stunden und Minuten" };
|
||||
|
||||
if (viewModel.EinheitZeiterfassung.Equals("1"))
|
||||
{
|
||||
ComboZeiteinheit.SelectedIndex = 1;
|
||||
}
|
||||
else if (viewModel.EinheitZeiterfassung.Equals("2"))
|
||||
{
|
||||
ComboZeiteinheit.SelectedIndex = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
ComboZeiteinheit.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
|
||||
#if DEBUG
|
||||
var url2 = ServiceFacade.DoOperationsServiceSync(s => s.GetOwnChatSettingsUrl());
|
||||
HyperlinkOwnChatSettings.NavigateUri = new Uri(url2);
|
||||
@@ -98,5 +114,22 @@ namespace BeWo.View.Detail
|
||||
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo((sender as Hyperlink).NavigateUri.ToString()));
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void ComboZeiteinheit_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (ComboZeiteinheit.SelectedIndex == 1)
|
||||
{
|
||||
ViewModel.EinheitZeiterfassung = "1";
|
||||
}
|
||||
else if (ComboZeiteinheit.SelectedIndex == 2)
|
||||
{
|
||||
ViewModel.EinheitZeiterfassung = "2";
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewModel.EinheitZeiterfassung = "0";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,7 @@
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1"/>
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1" HorizontalAlignment="Right" Margin="0,0,3,0"/>
|
||||
<dxe:TextEdit MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{Binding Mode=TwoWay, Path=EndTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
|
||||
|
||||
<Label Content="Dauer (min)" Grid.Column="2" x:Name="DauerLabelOhneEndDatum" Grid.Row="2"/>
|
||||
<Label Content="Dauer (min)" Grid.Column="2" x:Name="DauerLabelOhneEndDatum" Grid.Row="2" HorizontalAlignment="Right" Margin="0,0,3,0"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="SpinEditDurationOhneEndDatum" Mask="########0" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=Duration, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" Grid.Row="2"
|
||||
|
||||
@@ -291,41 +291,40 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
{
|
||||
var settings = BeWoApp.AppSettings;
|
||||
|
||||
//if (scv == ServiceRecordFormate.ZeiterfassungMitMonatJahr)
|
||||
//{
|
||||
// //GridMitJahrMonat.Visibility = Visibility.Visible;
|
||||
// GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
// GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
|
||||
// numerictb_distance.SetValue(WidthProperty, (double) 93);
|
||||
// numerictb_distance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
// lblDistance.SetValue(Grid.ColumnProperty, 0);
|
||||
// lblDistance.SetValue(Grid.ColumnSpanProperty, 2);
|
||||
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
||||
|
||||
if(scv == ServiceRecordFormate.ZeiterfassungMitEndDatum) //Settings.IsEndDateVisible)
|
||||
if (scv == ServiceRecordFormate.ZeiterfassungMitEndDatum) //Settings.IsEndDateVisible)
|
||||
{
|
||||
if (settings.EinheitZeiterfassung.Equals("1"))
|
||||
{
|
||||
ComboBoxDauerEinheitMitEndDatum.Visibility = Visibility.Collapsed;
|
||||
DauerLabelMitEndDatum.Content = "Dauer (h)";
|
||||
|
||||
|
||||
DauerLabelMitEndDatum.SetValue(Grid.ColumnProperty, 2);
|
||||
DauerLabelMitEndDatum.HorizontalAlignment = HorizontalAlignment.Right;
|
||||
SpinEditDurationMitEndDatum.SetValue(Grid.ColumnProperty, 3);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ComboBoxDauerEinheitMitEndDatum.Visibility = Visibility.Visible;
|
||||
DauerLabelMitEndDatum.Content = "Dauer";
|
||||
DauerLabelMitEndDatum.SetValue(Grid.ColumnProperty, 0);
|
||||
SpinEditDurationMitEndDatum.SetValue(Grid.ColumnProperty, 1);
|
||||
}
|
||||
|
||||
GridMitEnddatum.Visibility = Visibility.Visible;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
//GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
if(!settings.IsZeiterfassungInStdMin && zsd != ZeiterfassungsDauer.Stunden)
|
||||
if (!settings.EinheitZeiterfassung.Equals("2") && zsd != ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ComboBoxDauerEinheitMitEndDatum.Visibility = Visibility.Visible;
|
||||
|
||||
DauerLabelMitEndDatum.SetValue(Grid.ColumnProperty, 0);
|
||||
DauerLabelMitEndDatum.Content = "Dauer";
|
||||
|
||||
SpinEditDurationMitEndDatum.SetValue(Grid.ColumnProperty, 1);
|
||||
|
||||
if(zsd == ZeiterfassungsDauer.Stunden)
|
||||
if (zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
SpinEditDurationMitEndDatum.IsFloatValue = true;
|
||||
SpinEditDurationMitEndDatum.Mask = "########0.00";
|
||||
@@ -342,17 +341,29 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
//GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
if(!settings.IsZeiterfassungInStdMin && zsd != ZeiterfassungsDauer.Stunden)
|
||||
if(!settings.EinheitZeiterfassung.Equals("2") && zsd != ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ComboBoxDauerEinheitOhneEndDatum.Visibility = Visibility.Visible;
|
||||
if (settings.EinheitZeiterfassung.Equals("1"))
|
||||
{
|
||||
ComboBoxDauerEinheitOhneEndDatum.Visibility = Visibility.Collapsed;
|
||||
DauerLabelOhneEndDatum.Content = "Dauer (h)";
|
||||
DauerLabelOhneEndDatum.SetValue(Grid.ColumnProperty, 2);
|
||||
SpinEditDurationOhneEndDatum.SetValue(Grid.ColumnProperty, 3);
|
||||
|
||||
DauerLabelOhneEndDatum.SetValue(Grid.ColumnProperty, 0);
|
||||
DauerLabelOhneEndDatum.Content = "Dauer";
|
||||
|
||||
SpinEditDurationOhneEndDatum.SetValue(Grid.ColumnProperty, 1);
|
||||
//MinStdDauerlbl.SetValue(Grid.ColumnSpanProperty, 2);
|
||||
//MinStdDauerlbl.HorizontalAlignment = HorizontalAlignment.Right;
|
||||
}
|
||||
else
|
||||
{
|
||||
ComboBoxDauerEinheitOhneEndDatum.Visibility = Visibility.Visible;
|
||||
DauerLabelOhneEndDatum.Content = "Dauer";
|
||||
DauerLabelOhneEndDatum.SetValue(Grid.ColumnProperty, 0);
|
||||
SpinEditDurationOhneEndDatum.SetValue(Grid.ColumnProperty, 1);
|
||||
}
|
||||
|
||||
|
||||
if(zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1"/>
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1" HorizontalAlignment="Right" Margin="0,0,3,0"/>
|
||||
<dxe:TextEdit MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{Binding Mode=TwoWay, Path=EndTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
@@ -141,7 +141,7 @@
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
<Label Content="Dauer (min)" Grid.Column="2" x:Name="MinStdDauerLabel" Grid.Row="2"/>
|
||||
<Label Content="Dauer (min)" Grid.Column="2" x:Name="MinStdDauerLabel" Grid.Row="2" HorizontalAlignment="Right" Margin="0,0,3,0"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numerictb_duration" Mask="########0" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=Duration, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" Grid.Row="2"
|
||||
|
||||
@@ -713,63 +713,68 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
//GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
// ein Bereich für istSTDMin gestzt abfrage | auch wenn setting nicht gesetzt sobald anzeigen falls Duration in Stunden gesetzt.
|
||||
if (settings.IsZeiterfassungInStdMin || zsd == ZeiterfassungsDauer.Stunden)
|
||||
if (settings.EinheitZeiterfassung.Equals("1"))
|
||||
{
|
||||
MinSTDMitEnd.Visibility = Visibility.Collapsed;
|
||||
MinStdDauerlbl.Content = "Dauer (h)";
|
||||
|
||||
|
||||
MinStdDauerlbl.SetValue(Grid.ColumnProperty, 2);
|
||||
|
||||
numeric_duration.SetValue(Grid.ColumnProperty, 3);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MinSTDMitEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerlbl.Content = "Dauer";
|
||||
MinStdDauerlbl.SetValue(Grid.ColumnProperty, 0);
|
||||
numeric_duration.SetValue(Grid.ColumnProperty, 1);
|
||||
|
||||
if (MinSTDMitEnd.Text == ZeiterfassungsDauer.Stunden.ToString())
|
||||
{
|
||||
numeric_duration.IsFloatValue = true;
|
||||
numeric_duration.Mask = "########0.00";
|
||||
}
|
||||
else
|
||||
{
|
||||
numeric_duration.IsFloatValue = false;
|
||||
numeric_duration.Mask = "########0";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//else if (scv == ServiceRecordFormate.ZeiterfassungMitMonatJahr /*Settings.IsOnlyYearMonthVisible*/)
|
||||
//{
|
||||
// GridMitJahrMonat.Visibility = Visibility.Visible;
|
||||
// GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
// GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
|
||||
// numerictb_distance.SetValue(WidthProperty, (double) 64);
|
||||
// numerictb_distance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
// lblDistance.SetValue(Grid.ColumnProperty, 0);
|
||||
// lblDistance.SetValue(Grid.ColumnSpanProperty, 2);
|
||||
|
||||
|
||||
//}
|
||||
|
||||
else
|
||||
{
|
||||
if (!settings.EinheitZeiterfassung.Equals("2") && zsd != ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
return;
|
||||
}
|
||||
GridOhneEnddatum.Visibility = Visibility.Visible;
|
||||
GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
//GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
// ist STDMin gestzt abfrage
|
||||
if (settings.IsZeiterfassungInStdMin || zsd == ZeiterfassungsDauer.Stunden)
|
||||
|
||||
if (settings.EinheitZeiterfassung.Equals("1"))
|
||||
{
|
||||
MinSTDOhneEnd.Visibility = Visibility.Collapsed;
|
||||
MinStdDauerLabel.Content = "Dauer (h)";
|
||||
MinStdDauerLabel.SetValue(Grid.ColumnProperty, 2);
|
||||
numerictb_duration.SetValue(Grid.ColumnProperty, 3);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MinSTDOhneEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerLabel.Content = "Dauer";
|
||||
MinStdDauerLabel.SetValue(Grid.ColumnProperty, 0);
|
||||
numerictb_duration.SetValue(Grid.ColumnProperty, 1);
|
||||
MinStdDauerLabel.Content = "Dauer";
|
||||
MinStdDauerlbl.Content = "Dauer";
|
||||
if (MinSTDOhneEnd.Text == ZeiterfassungsDauer.Stunden.ToString())
|
||||
{
|
||||
numerictb_duration.IsFloatValue = true;
|
||||
numerictb_duration.Mask = "########0.00";
|
||||
}
|
||||
else
|
||||
{
|
||||
numerictb_duration.IsFloatValue = false;
|
||||
numerictb_duration.Mask = "########0";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
numeric_duration.IsFloatValue = true;
|
||||
numeric_duration.Mask = "########0.00";
|
||||
}
|
||||
else
|
||||
{
|
||||
numeric_duration.IsFloatValue = false;
|
||||
numeric_duration.Mask = "########0";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -804,7 +804,7 @@
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1" />
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1" HorizontalAlignment="Right" />
|
||||
<dxe:TextEdit MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
@@ -812,9 +812,9 @@
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
|
||||
|
||||
<Label Content="Dauer (min)" Grid.Column="2" x:Name="MinStdDauerLabel" Grid.Row="2"/>
|
||||
|
||||
|
||||
<Label Content="Dauer (min)" Grid.Column="2" x:Name="MinStdDauerLabel" Grid.Row="2" HorizontalAlignment="Right"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="SpinEditDurationOhneEnddatum" Mask="########0" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=PrototypeVM.Duration, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" Grid.Row="2"
|
||||
|
||||
@@ -371,34 +371,36 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
|
||||
private void ConfigureEndDate()
|
||||
{
|
||||
|
||||
var settings = BeWoApp.AppSettings;
|
||||
|
||||
//if (settings.IsOnlyYearMonthVisible)
|
||||
//{
|
||||
// GridMitJahrMonat.Visibility = Visibility.Visible;
|
||||
// GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
// GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
|
||||
// EndDatumHeader.Visible = false;
|
||||
|
||||
// numerictb_distance.SetValue(WidthProperty, (double) 105);
|
||||
// numerictb_distance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
// lblDistance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Left);
|
||||
//}
|
||||
//else if (Settings.IsEndDateVisible)
|
||||
if (settings.IsEndDateVisible)
|
||||
{
|
||||
GridMitEnddatum.Visibility = Visibility.Visible;
|
||||
//GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
|
||||
|
||||
if (settings.IsZeiterfassungInStdMin)
|
||||
if (!settings.EinheitZeiterfassung.Equals("0"))
|
||||
{
|
||||
MinSTDMitEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerlbl.SetValue(Grid.ColumnProperty, 0);
|
||||
numeric_duration.SetValue(Grid.ColumnProperty, 1);
|
||||
if (settings.EinheitZeiterfassung.Equals("1"))
|
||||
{
|
||||
MinSTDMitEnd.Visibility = Visibility.Collapsed;
|
||||
MinStdDauerLabel.Content = "Dauer (h)";
|
||||
MinStdDauerlbl.Content = "Dauer (h)";
|
||||
MinStdDauerlbl.SetValue(Grid.ColumnProperty, 1);
|
||||
MinStdDauerlbl.SetValue(Grid.ColumnSpanProperty, 2);
|
||||
MinStdDauerlbl.HorizontalAlignment = HorizontalAlignment.Right;
|
||||
numeric_duration.SetValue(Grid.ColumnProperty, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
MinSTDMitEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerLabel.Content = "Dauer";
|
||||
MinStdDauerlbl.Content = "Dauer";
|
||||
MinStdDauerlbl.SetValue(Grid.ColumnProperty, 0);
|
||||
numeric_duration.SetValue(Grid.ColumnProperty, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (MinSTDMitEnd.Text == ZeiterfassungsDauer.Stunden.ToString())
|
||||
{
|
||||
@@ -432,16 +434,30 @@ namespace BeWo.View.Detail.Zeiterfassung
|
||||
{
|
||||
RoundedDHeader.Header = "Stunden";
|
||||
}
|
||||
if (settings.IsZeiterfassungInStdMin)
|
||||
if (!settings.EinheitZeiterfassung.Equals("0"))
|
||||
{
|
||||
|
||||
|
||||
MinSTDOhneEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerLabel.SetValue(Grid.ColumnProperty, 0);
|
||||
SpinEditDurationOhneEnddatum.SetValue(Grid.ColumnProperty, 1);
|
||||
MinStdDauerLabel.Content = "Dauer";
|
||||
MinStdDauerlbl.Content = "Dauer";
|
||||
|
||||
if (settings.EinheitZeiterfassung.Equals("1"))
|
||||
{
|
||||
MinSTDOhneEnd.Visibility = Visibility.Collapsed;
|
||||
MinStdDauerLabel.Content = "Dauer (h)";
|
||||
MinStdDauerlbl.Content = "Dauer (h)";
|
||||
MinStdDauerLabel.SetValue(Grid.ColumnProperty, 2);
|
||||
SpinEditDurationOhneEnddatum.SetValue(Grid.ColumnProperty, 3);
|
||||
MinStdDauerLabel.HorizontalAlignment = HorizontalAlignment.Right;
|
||||
}
|
||||
else
|
||||
{
|
||||
MinSTDOhneEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerLabel.Content = "Dauer";
|
||||
MinStdDauerlbl.Content = "Dauer";
|
||||
MinStdDauerLabel.SetValue(Grid.ColumnProperty, 0);
|
||||
SpinEditDurationOhneEnddatum.SetValue(Grid.ColumnProperty, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (MinSTDOhneEnd.Text == ZeiterfassungsDauer.Stunden.ToString())
|
||||
{
|
||||
SpinEditDurationOhneEnddatum.IsFloatValue = true;
|
||||
|
||||
@@ -479,6 +479,8 @@ namespace BeWo.View
|
||||
|
||||
_login = new Login("4368658436", "B7x0b-FhhJA", "jettenl", "n8-yR+3Q=6nX#", "0000");
|
||||
|
||||
//_login = new Login("3629696651", "2qsJH-qXBh3", "m59", "test123!", "C4UtAx8itmba2OZ2HKzYuK3F9jV3bEQbkRL6hNxvZGGFtFs1CgWWGRLFKYvEBmo6");
|
||||
|
||||
var x1 = _login.AnmeldevorgangDurchFuehren();
|
||||
|
||||
ServiceChatView = new ChatView(x1);
|
||||
|
||||
@@ -227,17 +227,17 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public bool ZeiterfassungInMin
|
||||
public String EinheitZeiterfassung
|
||||
{
|
||||
get { return BeWoApp.AppSettings.IsZeiterfassungInStdMin; }
|
||||
get { return BeWoApp.AppSettings.EinheitZeiterfassung; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(BeWoApp.AppSettings.IsZeiterfassungInStdMin, value))
|
||||
if (this.AreDifferent(BeWoApp.AppSettings.EinheitZeiterfassung, value))
|
||||
{
|
||||
BeWoApp.AppSettings.IsZeiterfassungInStdMin = value;
|
||||
BeWoApp.AppSettings.EinheitZeiterfassung = value;
|
||||
|
||||
this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "IsZeiterfassungInStdMin", value ? "1" : "0");
|
||||
this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "EinheitZeiterfassung", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
|
||||
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
|
||||
@@ -24,28 +24,28 @@
|
||||
|
||||
<script src="~/Scripts/umd/popper.min.js"></script>
|
||||
<script src="~/node_modules/bootstrap/dist/js/bootstrap.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="~/Content/style.css">
|
||||
<script src="~/Scripts/mobileUtils.js?v=1.17"></script>
|
||||
<link rel="stylesheet" href="~/Content/style.css?v=1.18">
|
||||
<script src="~/Scripts/mobileUtils.js?v=1.18"></script>
|
||||
<script src="~/Scripts/moment.min.js"></script>
|
||||
<script src="~/Scripts/locale/de.js?v=1.17"></script>
|
||||
<script src="~/Scripts/group-booking.js?v=1.17"></script>
|
||||
<script src="~/Scripts/view-scripts/main.js?v=1.17"></script>
|
||||
<script src="~/Scripts/signature.js?v=1.17"></script>
|
||||
<script src="~/Scripts/locale/de.js?v=1.18"></script>
|
||||
<script src="~/Scripts/group-booking.js?v=1.18"></script>
|
||||
<script src="~/Scripts/view-scripts/main.js?v=1.18"></script>
|
||||
<script src="~/Scripts/signature.js?v=1.18"></script>
|
||||
<script src="~/Scripts/tempusdominus-boostrap-4.min.js"></script>
|
||||
<link rel="stylesheet" href="~/Content/tempusdominus-bootstrap-4.min.css" />
|
||||
<script src="~/Scripts/Chart.min.js?v=1.17"></script>
|
||||
<script src="~/Scripts/support-concept-statistics.js?v=1.17"></script>
|
||||
<script src="~/Scripts/view-scripts/customer.js?v=1.17"></script>
|
||||
<script src="~/Scripts/view-scripts/scheduler.js?v=1.17"></script>
|
||||
<script src="~/Scripts/utils/dateUtils.js?v=1.17"></script>
|
||||
<script src="~/Scripts/view-scripts/report.js?v=1.17"></script>
|
||||
<script src="~/Scripts/signature_pad-3.2.min.js?v=1.17"></script>
|
||||
<script src="~/Scripts/utils/trimCanvas.js?v=1.17"></script>
|
||||
<script src="~/Scripts/utils/resources-list-utils.js?v=1.17"></script>
|
||||
<script src="~/Scripts/utils/list-utils.js?v=1.17"></script>
|
||||
<script src="~/Scripts/utils/service-record-time-calc.js?v=1.5"></script>
|
||||
<script src="~/Scripts/utils/js-helper.js?v=1.17"></script>
|
||||
<script src="~/Scripts/utils/logging.js?v=1.17"></script>
|
||||
<script src="~/Scripts/Chart.min.js?v=1.18"></script>
|
||||
<script src="~/Scripts/support-concept-statistics.js?v=1.18"></script>
|
||||
<script src="~/Scripts/view-scripts/customer.js?v=1.18"></script>
|
||||
<script src="~/Scripts/view-scripts/scheduler.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/dateUtils.js?v=1.18"></script>
|
||||
<script src="~/Scripts/view-scripts/report.js?v=1.18"></script>
|
||||
<script src="~/Scripts/signature_pad-3.2.min.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/trimCanvas.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/resources-list-utils.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/list-utils.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/service-record-time-calc.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/js-helper.js?v=1.18"></script>
|
||||
<script src="~/Scripts/utils/logging.js?v=1.18"></script>
|
||||
|
||||
|
||||
@*@Html.DevExpress().GetStyleSheets(
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress>false</Use64BitIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
|
||||
@@ -189,22 +189,31 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
foreach (var e in this.Entgeltzeitraeume)
|
||||
{
|
||||
e.SummeFLStunden = Math.Round(e.SummeFLMinuten / 60, 2, MidpointRounding.AwayFromZero);
|
||||
e.SummeGesamtStunden = Math.Round(((this.RateFactor + 100) / 100) * e.SummeFLStunden, 2, MidpointRounding.AwayFromZero);
|
||||
e.SummeFaktorStunden = e.SummeGesamtStunden - e.SummeFLStunden;
|
||||
|
||||
e.SummeFaktorMinuten = (this.RateFactor / 100) * e.SummeFLMinuten;
|
||||
|
||||
|
||||
//e.SummeFaktorMinuten = (this.RateFactor / 100) * e.SummeFLMinuten;
|
||||
e.SummeFaktorMinuten = e.SummeFaktorStunden * 60;
|
||||
e.SummeGesamtMinuten = e.SummeFaktorMinuten + e.SummeFLMinuten;
|
||||
|
||||
e.SummeFLStunden = e.SummeFLMinuten / 60;
|
||||
e.SummeFaktorStunden = e.SummeFaktorMinuten / 60;
|
||||
e.SummeGesamtStunden = e.SummeGesamtMinuten / 60;
|
||||
|
||||
//e.SummeFaktorStunden = e.SummeFaktorMinuten / 60;
|
||||
|
||||
//e.SummeGesamtStunden = e.SummeGesamtMinuten / 60;
|
||||
|
||||
this.SummeFLMinuten += e.SummeFLMinuten;
|
||||
this.SummeFaktorMinuten += e.SummeFaktorMinuten;
|
||||
this.SummeGesamtMinuten += e.SummeGesamtMinuten;
|
||||
|
||||
|
||||
this.SummeFLStunden += e.SummeFLStunden;
|
||||
this.SummeFaktorStunden += e.SummeFaktorStunden;
|
||||
this.SummeGesamtStunden += e.SummeGesamtStunden;
|
||||
}
|
||||
|
||||
this.SummeFLStunden = this.SummeFLMinuten / 60;
|
||||
this.SummeFaktorStunden = this.SummeFaktorMinuten / 60;
|
||||
this.SummeGesamtStunden = this.SummeGesamtMinuten / 60;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1132,7 +1132,7 @@ namespace BeWo.Report.ReportObjects
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
foreach (AbsenceTime atDb in customer.AbsenceTimes)
|
||||
foreach (AbsenceTime atDb in customer.AbsenceTimes.OrderBy(a => a.Start))
|
||||
{
|
||||
|
||||
if (atDb.AbsenceSpan != null)
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<Compile Include="CustomReportCreator.cs" />
|
||||
<Compile Include="Export\CustomDataExporter.cs" />
|
||||
<Compile Include="Export\DatevExporter.cs" />
|
||||
<Compile Include="LeistungsnachweisHelper.cs" />
|
||||
<Compile Include="LeistungsnachweisJugendamt.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
||||
350
ReportImp/AkggMid/LeistungsnachweisHelper.cs
Normal file
350
ReportImp/AkggMid/LeistungsnachweisHelper.cs
Normal file
@@ -0,0 +1,350 @@
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BS.Shared.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AkggMid
|
||||
{
|
||||
public class LeistungsnachweisHelper
|
||||
{
|
||||
public static List<ServicesOverviewRO.ServiceDetail> ErstelleDummyRecords(ServicesOverviewRO pRO)
|
||||
{
|
||||
Dictionary<int, ServicesOverviewRO.ServiceDetail> day2Detail = new Dictionary<int, ServicesOverviewRO.ServiceDetail>();
|
||||
|
||||
var result = new List<ServicesOverviewRO.ServiceDetail>();
|
||||
foreach (var sr in pRO.Services)
|
||||
{
|
||||
//result.Add(sr);
|
||||
|
||||
if (!day2Detail.ContainsKey(sr.StartDate.Day))
|
||||
{
|
||||
sr.StartDateString = String.Format("{0:dd}.", sr.StartDate);
|
||||
day2Detail.Add(sr.StartDate.Day, sr);
|
||||
result.Add(sr);
|
||||
}
|
||||
else
|
||||
{
|
||||
var dsr = day2Detail[sr.StartDate.Day];
|
||||
dsr.Minutes += sr.Minutes;
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(sr.Notice))
|
||||
{
|
||||
if (!String.IsNullOrWhiteSpace(dsr.Notice))
|
||||
{
|
||||
dsr.Notice += ", " + sr.Notice;
|
||||
}
|
||||
else
|
||||
{
|
||||
dsr.Notice = sr.Notice;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(sr.Notice3))
|
||||
{
|
||||
if (!String.IsNullOrWhiteSpace(dsr.Notice3))
|
||||
{
|
||||
dsr.Notice3 += ", " + sr.Notice3;
|
||||
}
|
||||
else
|
||||
{
|
||||
dsr.Notice3 = sr.Notice3;
|
||||
}
|
||||
|
||||
}
|
||||
if (!String.IsNullOrWhiteSpace(sr.Notice4))
|
||||
{
|
||||
if (!String.IsNullOrWhiteSpace(dsr.Notice4))
|
||||
{
|
||||
dsr.Notice4 += ", " + sr.Notice4;
|
||||
}
|
||||
else
|
||||
{
|
||||
dsr.Notice4 = sr.Notice4;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var abrAbwTagDict = GetAbrechenbareAbwesenheiten(pRO);
|
||||
|
||||
for (int i = 1; i <= 31; i++)
|
||||
{
|
||||
if (!day2Detail.ContainsKey(i))
|
||||
{
|
||||
var newSr = new ServicesOverviewRO.ServiceDetail();
|
||||
if (i <= pRO.EndDate.Day)
|
||||
{
|
||||
newSr.StartDate = new DateTime(pRO.StartDate.Year, pRO.StartDate.Month, i);
|
||||
newSr.StartDateString = String.Format("{0:dd}.", newSr.StartDate);
|
||||
|
||||
if (abrAbwTagDict.ContainsKey(newSr.StartDate))
|
||||
{
|
||||
newSr.Minutes = BerechneMinutenProTag(BerechneStundenProWoche(pRO));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
newSr.StartDateString = String.Format("{0}.", i);
|
||||
}
|
||||
|
||||
result.Add(newSr);
|
||||
day2Detail.Add(i, newSr);
|
||||
}
|
||||
else
|
||||
{
|
||||
day2Detail[i].Minutes = Rundeauf15Minuten(day2Detail[i].Minutes);
|
||||
}
|
||||
}
|
||||
|
||||
double minutenGesamt = 0;
|
||||
foreach (var record in result)
|
||||
{
|
||||
if (IstAbwesend(pRO, record.StartDate))
|
||||
{
|
||||
record.Notice5 = "x";
|
||||
}
|
||||
else
|
||||
{
|
||||
record.Notice5 = "";
|
||||
}
|
||||
minutenGesamt += record.Minutes;
|
||||
}
|
||||
pRO.TotalFLM = minutenGesamt;
|
||||
return result.OrderBy(r => r.StartDateString).ToList();
|
||||
}
|
||||
|
||||
public static void PruefeWochenBudget(ServicesOverviewRO ro)
|
||||
{
|
||||
Calendar cal = CultureInfo.CurrentCulture.Calendar;
|
||||
|
||||
var ersterTag = new DateTime(ro.StartDate.Year, ro.StartDate.Month, 1);
|
||||
//Laut Herr Kloss darf die Wochenbewilligung nicht überschritten werden und die letzten Einträge einer Kalenderwoche sollen entsprechend gekürzt werden.
|
||||
|
||||
var tempListe = new List<ServicesOverviewRO.ServiceDetail>();
|
||||
tempListe.AddRange(HoleFehlendeWochentageVormonat(ro));
|
||||
|
||||
|
||||
tempListe.AddRange(ro.Services);
|
||||
|
||||
|
||||
double wochenBudget = BerechneStundenProWoche(ro);
|
||||
|
||||
int kwAktuelleWoche = cal.GetWeekOfYear(ersterTag, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
|
||||
double wochenSumme = 0;
|
||||
|
||||
foreach (var item in tempListe)
|
||||
{
|
||||
// Übertrags Dummy rausfiltern
|
||||
if (item.ServiceDescription == "Übertrag:")
|
||||
continue;
|
||||
|
||||
var kwAktuellerTag = cal.GetWeekOfYear(item.StartDate, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);
|
||||
if (kwAktuelleWoche != kwAktuellerTag)
|
||||
{
|
||||
kwAktuelleWoche = kwAktuellerTag;
|
||||
wochenSumme = 0;
|
||||
}
|
||||
|
||||
|
||||
wochenSumme += item.Minutes / 60;
|
||||
|
||||
if (wochenSumme > wochenBudget)
|
||||
{
|
||||
item.Minutes -= (double)(wochenSumme - wochenBudget) * 60;
|
||||
if (item.Minutes < 0)
|
||||
{
|
||||
item.Minutes = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
double minutenGesamt = 0;
|
||||
foreach (var record in ro.Services)
|
||||
{
|
||||
minutenGesamt += record.Minutes;
|
||||
}
|
||||
ro.TotalFLM = minutenGesamt;
|
||||
}
|
||||
|
||||
private static double BerechneStundenProWoche(ServicesOverviewRO ro)
|
||||
{
|
||||
if (ro.SupportConceptCostBearer != null)
|
||||
{
|
||||
foreach (var ap in ro.SupportConceptCostBearer.ApprovalPeriodList)
|
||||
{
|
||||
if (ap.ServiceCategory != null && ap.ServiceCategory.Name.Contains("Schulassistenz") && ap.ApprovedBEInterval.Value == BS.Shared.SupportConceptApprovalInterval.Weekly)
|
||||
{
|
||||
|
||||
var wochenBudget = ap.ApprovedBEPerInterval ?? 0;
|
||||
|
||||
decimal prozentualeBetreuung = 0;
|
||||
foreach (var item in ap.SupportConceptApprovalPeriodEmployeeRelations)
|
||||
{
|
||||
if (!item.IsAbsolut)
|
||||
{
|
||||
prozentualeBetreuung += item.Betreuungsschluessel;
|
||||
}
|
||||
}
|
||||
|
||||
if (prozentualeBetreuung > 0)
|
||||
{
|
||||
return (double)(wochenBudget * prozentualeBetreuung / 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (double)ro.ApprovedFLSPerWeek;
|
||||
}
|
||||
|
||||
private static IEnumerable<ServicesOverviewRO.ServiceDetail> HoleFehlendeWochentageVormonat(ServicesOverviewRO ro)
|
||||
{
|
||||
var fehlendeRecords = new List<ServicesOverviewRO.ServiceDetail>();
|
||||
|
||||
var ersterDesMonats = new DateTime(ro.StartDate.Year, ro.StartDate.Month, 1);
|
||||
|
||||
if (ersterDesMonats.DayOfWeek != DayOfWeek.Monday)
|
||||
{
|
||||
if (ro.SupportConceptCostBearer != null && ro.SupportConceptCostBearer.CostBearer2SupportConceptOid != null)
|
||||
{
|
||||
|
||||
var startDate = ersterDesMonats;
|
||||
|
||||
while (startDate.DayOfWeek != DayOfWeek.Monday)
|
||||
{
|
||||
startDate = startDate.AddDays(-1);
|
||||
}
|
||||
|
||||
var span = new DateTimeSpan(startDate, ersterDesMonats);
|
||||
|
||||
var liste = DAOFactory.SearchDAO.FindServiceRecordsInSpan(ro.SupportConceptCostBearer.CostBearer2SupportConceptOid.Value, span);
|
||||
|
||||
foreach (var item in liste)
|
||||
{
|
||||
var newRecord = new ServicesOverviewRO.ServiceDetail();
|
||||
newRecord.StartDate = item.Start.Value;
|
||||
newRecord.Minutes = (double)item.RoundedDuration;
|
||||
|
||||
fehlendeRecords.Add(newRecord);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return fehlendeRecords.OrderBy(r => r.StartDate);
|
||||
|
||||
}
|
||||
|
||||
public static bool IstAbwesend(ServicesOverviewRO pRO, DateTime startDate)
|
||||
{
|
||||
foreach (var at in pRO.Abwesenheiten)
|
||||
{
|
||||
if (startDate >= at.Start && (!at.End.HasValue || startDate <= at.End))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static Dictionary<DateTime, bool> GetAbrechenbareAbwesenheiten(ServicesOverviewRO ro)
|
||||
{
|
||||
//Herr Kloss meint, der erste Tag einer Abwesenheit darf ein fünftel der Wochenstundenzahl abgerechnet werden, aber nur bis 5 mal im Zeitraum 01.01.2022 bis 30.06.2022 und bis 10 mal im Schuljahr ab 2023/2024
|
||||
|
||||
DateTime startSchuljahr = DateTime.MinValue;
|
||||
DateTime endeSchuljahr = DateTime.MinValue;
|
||||
|
||||
DateTime dt;
|
||||
|
||||
if (DateTime.TryParse(ro.ApprovedStartDate, out dt))
|
||||
{
|
||||
startSchuljahr = dt;
|
||||
}
|
||||
if (DateTime.TryParse(ro.ApprovedEndDate, out dt))
|
||||
{
|
||||
endeSchuljahr = dt;
|
||||
}
|
||||
|
||||
|
||||
int maxAnzahl = 10;
|
||||
|
||||
if (startSchuljahr < new DateTime(2022, 6, 30))
|
||||
{
|
||||
startSchuljahr = new DateTime(2022, 1, 1);
|
||||
endeSchuljahr = new DateTime(2022, 6, 30);
|
||||
|
||||
maxAnzahl = 5;
|
||||
}
|
||||
|
||||
int gesamtAnzahl = 0;
|
||||
|
||||
Dictionary<DateTime, bool> abrechenbareTage = new Dictionary<DateTime, bool>();
|
||||
|
||||
DateTime lastend = DateTime.MinValue;
|
||||
foreach (var at in ro.Abwesenheiten) //sortieren?
|
||||
{
|
||||
if (at.Start >= startSchuljahr && at.Start <= endeSchuljahr && (at.End == null || at.End >= startSchuljahr))
|
||||
{
|
||||
//Prüfe ob mindestens ein Tag zwischen zwei Abwesenheiten liegt.
|
||||
var days = at.Start.Value.Subtract(lastend).TotalDays;
|
||||
if (days > 1)
|
||||
{
|
||||
|
||||
if (gesamtAnzahl <= maxAnzahl)
|
||||
{
|
||||
abrechenbareTage.Add(at.Start.Value, true);
|
||||
|
||||
gesamtAnzahl++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (at.End.HasValue)
|
||||
{
|
||||
lastend = at.End.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastend = DateTime.MaxValue;
|
||||
}
|
||||
}
|
||||
|
||||
return abrechenbareTage;
|
||||
}
|
||||
|
||||
public static double BerechneMinutenProTag(double flsPerWeek)
|
||||
{
|
||||
var minutenProTag = flsPerWeek * 60 / 5;
|
||||
|
||||
//die Minuten müssen auf volle Viertelstunden auf oder abgerundet werden
|
||||
return Rundeauf15Minuten(minutenProTag);
|
||||
|
||||
}
|
||||
|
||||
public static double Rundeauf15Minuten(double minuten)
|
||||
{
|
||||
var minutenGerundet = minuten;
|
||||
|
||||
//die Minuten müssen auf volle Viertelstunden auf oder abgerundet werden
|
||||
var modulo = minutenGerundet % 15;
|
||||
if (modulo <= 7)
|
||||
{
|
||||
minutenGerundet -= modulo;
|
||||
}
|
||||
else
|
||||
{
|
||||
minutenGerundet += 15 - modulo;
|
||||
}
|
||||
return minutenGerundet;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,9 @@ using System.Data;
|
||||
using BS.Shared.Core;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Globalization;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
|
||||
namespace AkggMid
|
||||
{
|
||||
@@ -22,29 +25,70 @@ namespace AkggMid
|
||||
{
|
||||
//SetzeAdresse(pRO); wird nur für den einen Kostenträger verwendet und muss genau so aussehen
|
||||
|
||||
|
||||
//Ein paar Tests:
|
||||
//var test = BerechneMinutenProTag(19.5m);
|
||||
|
||||
//var test2 = BerechneMinutenProTag(5.0833333333m);
|
||||
//var test3 = BerechneMinutenProTag(5.6666666666m);
|
||||
|
||||
pRO.Services = ErstelleDummyRecords(pRO);
|
||||
|
||||
LeistungsnachweisHelper.PruefeWochenBudget(pRO);
|
||||
|
||||
var abrAbwTagDict = LeistungsnachweisHelper.GetAbrechenbareAbwesenheiten(pRO);
|
||||
|
||||
double summe1bis16 = 0;
|
||||
double summeGesamt = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (var record in pRO.Services)
|
||||
{
|
||||
if (IstAbwesend(pRO, record.StartDate))
|
||||
if (record.ServiceDescription != "Übertrag:")
|
||||
{
|
||||
record.Notice5 = "x";
|
||||
if (abrAbwTagDict.ContainsKey(record.StartDate.Date))
|
||||
{
|
||||
if (record.Minutes == 0)
|
||||
{
|
||||
record.Minutes = LeistungsnachweisHelper.BerechneMinutenProTag((double)pRO.ApprovedFLSPerWeek);
|
||||
}
|
||||
}
|
||||
record.Minutes = LeistungsnachweisHelper.Rundeauf15Minuten(record.Minutes);
|
||||
|
||||
if (record.StartDate.Day <= 16)
|
||||
{
|
||||
summe1bis16 += record.Minutes;
|
||||
}
|
||||
summeGesamt += record.Minutes;
|
||||
}
|
||||
else
|
||||
{
|
||||
record.Notice5 = "";
|
||||
record.Minutes = summe1bis16;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var servicesDouble = new List<ServicesOverviewRO.ServiceDoubleDetail>();
|
||||
int i = 0;
|
||||
|
||||
foreach (var record in pRO.Services)
|
||||
{
|
||||
ServicesOverviewRO.ServiceDoubleDetail sdd = new ServicesOverviewRO.ServiceDoubleDetail();
|
||||
var sdd = new ServicesOverviewRO.ServiceDoubleDetail();
|
||||
sdd.Minutes = record.Minutes;
|
||||
sdd.FLS = sdd.Minutes / 60;
|
||||
sdd.FLSString = String.Format("{0:0.00}", sdd.FLS);
|
||||
|
||||
var istAbwesend = LeistungsnachweisHelper.IstAbwesend(pRO, record.StartDate);
|
||||
if (istAbwesend)
|
||||
{
|
||||
sdd.FLSString = String.Format("Schüler*in abwesend {0:0.00}", sdd.FLS);
|
||||
}
|
||||
else
|
||||
{
|
||||
sdd.FLSString = String.Format("{0:0.00}", sdd.FLS);
|
||||
}
|
||||
|
||||
sdd.ServiceDescription = record.ServiceDescription;
|
||||
sdd.StartDate = record.StartDate;
|
||||
|
||||
@@ -58,15 +102,29 @@ namespace AkggMid
|
||||
sdd = servicesDouble[i - servicesDouble.Count];
|
||||
sdd.Minutes2 = record.Minutes;
|
||||
sdd.FLS2 = sdd.Minutes2 / 60;
|
||||
sdd.FLSString2 = String.Format("{0:0.##}", sdd.FLS2);
|
||||
|
||||
if (istAbwesend)
|
||||
{
|
||||
sdd.FLSString2 = String.Format("Schüler*in abwesend {0:0.00}", sdd.FLS2);
|
||||
}
|
||||
else
|
||||
{
|
||||
sdd.FLSString2 = String.Format("{0:0.00}", sdd.FLS2);
|
||||
}
|
||||
|
||||
sdd.ServiceDescription2 = record.ServiceDescription;
|
||||
}
|
||||
|
||||
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
pRO.ServicesDouble = servicesDouble;
|
||||
|
||||
cellSumme1.Text = String.Format("{0:0.00}", summe1bis16 / 60);
|
||||
pRO.TotalFLM = summeGesamt;
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
@@ -112,10 +170,21 @@ namespace AkggMid
|
||||
{
|
||||
var dsr = day2Detail[sr.StartDate.Day];
|
||||
dsr.Minutes += sr.Minutes;
|
||||
if (dsr.Notice.Length > 0 && sr.Notice.Length > 0)
|
||||
dsr.Notice += ", " + sr.Notice;
|
||||
else if (sr.Notice.Length > 0)
|
||||
dsr.Notice = sr.Notice;
|
||||
if (!String.IsNullOrWhiteSpace(sr.Notice))
|
||||
{
|
||||
if (!String.IsNullOrWhiteSpace(dsr.Notice))
|
||||
{
|
||||
dsr.Notice += ", " + sr.Notice;
|
||||
}
|
||||
else
|
||||
{
|
||||
dsr.Notice = sr.Notice;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,18 +238,7 @@ namespace AkggMid
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool IstAbwesend(ServicesOverviewRO pRO, DateTime startDate)
|
||||
{
|
||||
foreach (var at in pRO.Abwesenheiten)
|
||||
{
|
||||
if (startDate >= at.Start && (!at.End.HasValue || startDate <= at.End))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -81,14 +81,14 @@ namespace AkggMid
|
||||
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
|
||||
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
|
||||
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.cellSumme1 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.fieldStd = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.fieldTotalStd = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
|
||||
@@ -137,13 +137,13 @@ namespace AkggMid
|
||||
// xrTableCell7
|
||||
//
|
||||
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServicesDouble.ServiceDescription", "{0:dd}.")});
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServicesDouble.ServiceDescription")});
|
||||
this.xrTableCell7.Name = "xrTableCell7";
|
||||
this.xrTableCell7.StylePriority.UseFont = false;
|
||||
this.xrTableCell7.StylePriority.UsePadding = false;
|
||||
this.xrTableCell7.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell7.Weight = 0.22758625493133233D;
|
||||
this.xrTableCell7.Weight = 0.17931038221254292D;
|
||||
//
|
||||
// xrTableCell10
|
||||
//
|
||||
@@ -152,7 +152,7 @@ namespace AkggMid
|
||||
this.xrTableCell10.Name = "xrTableCell10";
|
||||
this.xrTableCell10.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
|
||||
this.xrTableCell10.Weight = 0.22758625782670833D;
|
||||
this.xrTableCell10.Weight = 0.27586213054549774D;
|
||||
//
|
||||
// xrTableCell1
|
||||
//
|
||||
@@ -162,17 +162,16 @@ namespace AkggMid
|
||||
this.xrTableCell1.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell1.Text = "xrTableCell1";
|
||||
this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell1.Weight = 0.22758625782670833D;
|
||||
this.xrTableCell1.Weight = 0.17931038510791891D;
|
||||
//
|
||||
// xrTableCell3
|
||||
//
|
||||
this.xrTableCell3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServicesDouble.FLSString2", "{0:0.00}")});
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServicesDouble.FLSString2")});
|
||||
this.xrTableCell3.Name = "xrTableCell3";
|
||||
this.xrTableCell3.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell3.Text = "xrTableCell3";
|
||||
this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
|
||||
this.xrTableCell3.Weight = 0.22758625782670833D;
|
||||
this.xrTableCell3.Weight = 0.27586213054549774D;
|
||||
//
|
||||
// ruleIstFerien
|
||||
//
|
||||
@@ -259,7 +258,7 @@ namespace AkggMid
|
||||
this.lblAdresse,
|
||||
this.xrLabel2,
|
||||
this.xrRichText1});
|
||||
this.ReportHeader.HeightF = 451.8749F;
|
||||
this.ReportHeader.HeightF = 451.875F;
|
||||
this.ReportHeader.Name = "ReportHeader";
|
||||
this.ReportHeader.StylePriority.UseTextAlignment = false;
|
||||
this.ReportHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
|
||||
@@ -267,7 +266,7 @@ namespace AkggMid
|
||||
// xrLabel14
|
||||
//
|
||||
this.xrLabel14.Borders = DevExpress.XtraPrinting.BorderSide.None;
|
||||
this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(573.875F, 359.3749F);
|
||||
this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(575.5416F, 348.9582F);
|
||||
this.xrLabel14.Multiline = true;
|
||||
this.xrLabel14.Name = "xrLabel14";
|
||||
this.xrLabel14.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
@@ -281,7 +280,7 @@ namespace AkggMid
|
||||
// xrLabel13
|
||||
//
|
||||
this.xrLabel13.Borders = DevExpress.XtraPrinting.BorderSide.None;
|
||||
this.xrLabel13.LocationFloat = new DevExpress.Utils.PointFloat(548.3333F, 359.3749F);
|
||||
this.xrLabel13.LocationFloat = new DevExpress.Utils.PointFloat(550F, 348.9582F);
|
||||
this.xrLabel13.Multiline = true;
|
||||
this.xrLabel13.Name = "xrLabel13";
|
||||
this.xrLabel13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
@@ -295,7 +294,7 @@ namespace AkggMid
|
||||
// xrLabel12
|
||||
//
|
||||
this.xrLabel12.Borders = DevExpress.XtraPrinting.BorderSide.None;
|
||||
this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(308.5F, 359.3749F);
|
||||
this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(310.1666F, 348.9582F);
|
||||
this.xrLabel12.Multiline = true;
|
||||
this.xrLabel12.Name = "xrLabel12";
|
||||
this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
@@ -324,7 +323,7 @@ namespace AkggMid
|
||||
// xrLabel10
|
||||
//
|
||||
this.xrLabel10.Borders = DevExpress.XtraPrinting.BorderSide.None;
|
||||
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(240F, 359.3749F);
|
||||
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(241.6667F, 348.9582F);
|
||||
this.xrLabel10.Multiline = true;
|
||||
this.xrLabel10.Name = "xrLabel10";
|
||||
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
@@ -338,7 +337,7 @@ namespace AkggMid
|
||||
// xrLabel9
|
||||
//
|
||||
this.xrLabel9.Borders = DevExpress.XtraPrinting.BorderSide.Top;
|
||||
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(573.8749F, 379.9999F);
|
||||
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(575.5416F, 369.5832F);
|
||||
this.xrLabel9.Multiline = true;
|
||||
this.xrLabel9.Name = "xrLabel9";
|
||||
this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
@@ -351,7 +350,7 @@ namespace AkggMid
|
||||
// xrLabel8
|
||||
//
|
||||
this.xrLabel8.Borders = DevExpress.XtraPrinting.BorderSide.Top;
|
||||
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(308.5F, 379.9999F);
|
||||
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(310.1666F, 369.5832F);
|
||||
this.xrLabel8.Multiline = true;
|
||||
this.xrLabel8.Name = "xrLabel8";
|
||||
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
@@ -537,25 +536,25 @@ namespace AkggMid
|
||||
this.xrTableCell2.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell2.Text = "Datum";
|
||||
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell2.Weight = 0.22758629166994071D;
|
||||
this.xrTableCell2.Weight = 0.17931041215187443D;
|
||||
//
|
||||
// xrTableCell22
|
||||
//
|
||||
this.xrTableCell22.Name = "xrTableCell22";
|
||||
this.xrTableCell22.Text = "Stundenzahl";
|
||||
this.xrTableCell22.Weight = 0.2275862878999268D;
|
||||
this.xrTableCell22.Weight = 0.27586216741799308D;
|
||||
//
|
||||
// xrTableCell5
|
||||
//
|
||||
this.xrTableCell5.Name = "xrTableCell5";
|
||||
this.xrTableCell5.Text = "Datum";
|
||||
this.xrTableCell5.Weight = 0.22758628852826243D;
|
||||
this.xrTableCell5.Weight = 0.17931040901019618D;
|
||||
//
|
||||
// xrTableCell4
|
||||
//
|
||||
this.xrTableCell4.Name = "xrTableCell4";
|
||||
this.xrTableCell4.Text = "Stundenzahl";
|
||||
this.xrTableCell4.Weight = 0.22758628852826243D;
|
||||
this.xrTableCell4.Weight = 0.27586216804632868D;
|
||||
//
|
||||
// xrTableRow4
|
||||
//
|
||||
@@ -574,22 +573,22 @@ namespace AkggMid
|
||||
this.xrTableCell6.StylePriority.UsePadding = false;
|
||||
this.xrTableCell6.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell6.Weight = 0.22758629166994071D;
|
||||
this.xrTableCell6.Weight = 0.17931041215187443D;
|
||||
//
|
||||
// xrTableCell8
|
||||
//
|
||||
this.xrTableCell8.Name = "xrTableCell8";
|
||||
this.xrTableCell8.Weight = 0.2275862878999268D;
|
||||
this.xrTableCell8.Weight = 0.27586216741799308D;
|
||||
//
|
||||
// xrTableCell9
|
||||
//
|
||||
this.xrTableCell9.Name = "xrTableCell9";
|
||||
this.xrTableCell9.Weight = 0.22758628852826243D;
|
||||
this.xrTableCell9.Weight = 0.17931040901019618D;
|
||||
//
|
||||
// xrTableCell11
|
||||
//
|
||||
this.xrTableCell11.Name = "xrTableCell11";
|
||||
this.xrTableCell11.Weight = 0.22758628852826243D;
|
||||
this.xrTableCell11.Weight = 0.27586216804632868D;
|
||||
//
|
||||
// GroupFooter1
|
||||
//
|
||||
@@ -622,7 +621,7 @@ namespace AkggMid
|
||||
//
|
||||
this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
|
||||
this.xrTableCell12,
|
||||
this.xrTableCell13,
|
||||
this.cellSumme1,
|
||||
this.xrTableCell14,
|
||||
this.xrTableCell15});
|
||||
this.xrTableRow2.FormattingRules.Add(this.ruleIstFerien);
|
||||
@@ -637,14 +636,15 @@ namespace AkggMid
|
||||
this.xrTableCell12.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell12.Text = "Summe:";
|
||||
this.xrTableCell12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell12.Weight = 0.22758625493133233D;
|
||||
this.xrTableCell12.Weight = 0.17931038221254295D;
|
||||
//
|
||||
// xrTableCell13
|
||||
// cellSumme1
|
||||
//
|
||||
this.xrTableCell13.Name = "xrTableCell13";
|
||||
this.xrTableCell13.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
|
||||
this.xrTableCell13.Weight = 0.22758625782670833D;
|
||||
this.cellSumme1.Name = "cellSumme1";
|
||||
this.cellSumme1.StylePriority.UseTextAlignment = false;
|
||||
this.cellSumme1.Text = "Schüler*in abwesend 0.00";
|
||||
this.cellSumme1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
|
||||
this.cellSumme1.Weight = 0.27586213054549774D;
|
||||
//
|
||||
// xrTableCell14
|
||||
//
|
||||
@@ -654,7 +654,7 @@ namespace AkggMid
|
||||
this.xrTableCell14.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell14.Text = "Gesamt:";
|
||||
this.xrTableCell14.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell14.Weight = 0.22758625782670833D;
|
||||
this.xrTableCell14.Weight = 0.17931038510791891D;
|
||||
//
|
||||
// xrTableCell15
|
||||
//
|
||||
@@ -664,7 +664,7 @@ namespace AkggMid
|
||||
this.xrTableCell15.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell15.Text = "xrTableCell3";
|
||||
this.xrTableCell15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
|
||||
this.xrTableCell15.Weight = 0.22758625782670833D;
|
||||
this.xrTableCell15.Weight = 0.27586213054549774D;
|
||||
//
|
||||
// xrLabel6
|
||||
//
|
||||
@@ -696,10 +696,6 @@ namespace AkggMid
|
||||
this.xrLabel5.Text = "(Unterschrift Mitarbeiter Schulassistenz)";
|
||||
this.xrLabel5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// fieldStd
|
||||
//
|
||||
this.fieldStd.DataMember = "Services";
|
||||
@@ -713,6 +709,10 @@ namespace AkggMid
|
||||
this.fieldTotalStd.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
|
||||
this.fieldTotalStd.Name = "fieldTotalStd";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// LeistungsnachweisJugendamt
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
@@ -796,7 +796,7 @@ namespace AkggMid
|
||||
private DevExpress.XtraReports.UI.XRTable xrTable2;
|
||||
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell12;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell13;
|
||||
private DevExpress.XtraReports.UI.XRTableCell cellSumme1;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell14;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell15;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel14;
|
||||
|
||||
@@ -37,20 +37,10 @@ namespace AkggMid
|
||||
|
||||
|
||||
|
||||
pRO.Services = ErstelleDummyRecords(pRO);
|
||||
pRO.Services = LeistungsnachweisHelper.ErstelleDummyRecords(pRO);
|
||||
|
||||
LeistungsnachweisHelper.PruefeWochenBudget(pRO);
|
||||
|
||||
foreach (var record in pRO.Services)
|
||||
{
|
||||
if (IstAbwesend(pRO, record.StartDate))
|
||||
{
|
||||
record.Notice5 = "x";
|
||||
}
|
||||
else
|
||||
{
|
||||
record.Notice5 = "";
|
||||
}
|
||||
|
||||
}
|
||||
lblWegbegleitung.Text = String.Format("Kostenzusicherung: bis zu {0:0.00} Stunden pro Woche", pRO.ApprovedFLSPerWeek);
|
||||
if (pRO.CustomerOid > 0)
|
||||
{
|
||||
@@ -75,64 +65,6 @@ namespace AkggMid
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
private List<ServicesOverviewRO.ServiceDetail> ErstelleDummyRecords(ServicesOverviewRO pRO)
|
||||
{
|
||||
Dictionary<int, ServicesOverviewRO.ServiceDetail> day2Detail = new Dictionary<int, ServicesOverviewRO.ServiceDetail>();
|
||||
|
||||
var result = new List<ServicesOverviewRO.ServiceDetail>();
|
||||
foreach (var sr in pRO.Services)
|
||||
{
|
||||
//result.Add(sr);
|
||||
|
||||
if (!day2Detail.ContainsKey(sr.StartDate.Day))
|
||||
{
|
||||
sr.StartDateString = String.Format("{0:dd}", sr.StartDate);
|
||||
day2Detail.Add(sr.StartDate.Day, sr);
|
||||
result.Add(sr);
|
||||
}
|
||||
else
|
||||
{
|
||||
var dsr = day2Detail[sr.StartDate.Day];
|
||||
dsr.Minutes += sr.Minutes;
|
||||
if (dsr.Notice.Length > 0 && sr.Notice.Length > 0)
|
||||
dsr.Notice += ", " + sr.Notice;
|
||||
else if (sr.Notice.Length > 0)
|
||||
dsr.Notice = sr.Notice;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 1; i <= 31; i++)
|
||||
{
|
||||
if (!day2Detail.ContainsKey(i))
|
||||
{
|
||||
var newSr = new ServicesOverviewRO.ServiceDetail();
|
||||
if (i <= pRO.EndDate.Day)
|
||||
{
|
||||
newSr.StartDate = new DateTime(pRO.StartDate.Year, pRO.StartDate.Month, i);
|
||||
newSr.StartDateString = String.Format("{0:dd}", newSr.StartDate);
|
||||
}
|
||||
else
|
||||
newSr.StartDateString = String.Format("{0}.", i);
|
||||
|
||||
result.Add(newSr);
|
||||
day2Detail.Add(i, newSr);
|
||||
}
|
||||
}
|
||||
return result.OrderBy(r => r.StartDate).ToList();
|
||||
}
|
||||
|
||||
private bool IstAbwesend(ServicesOverviewRO pRO, DateTime startDate)
|
||||
{
|
||||
foreach (var at in pRO.Abwesenheiten)
|
||||
{
|
||||
if (startDate >= at.Start && (!at.End.HasValue || startDate <= at.End))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -70,9 +70,9 @@ namespace AkggMid
|
||||
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.fieldStd = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.fieldTotalStd = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
|
||||
@@ -118,7 +118,7 @@ namespace AkggMid
|
||||
// xrTableCell7
|
||||
//
|
||||
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDateString", "{0}")});
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDateString")});
|
||||
this.xrTableCell7.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.xrTableCell7.Name = "xrTableCell7";
|
||||
this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
|
||||
@@ -518,10 +518,6 @@ namespace AkggMid
|
||||
this.xrLabel1.Text = "Summe der gel. Stunden: [fieldTotalStd!0.00]";
|
||||
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// fieldStd
|
||||
//
|
||||
this.fieldStd.DataMember = "Services";
|
||||
@@ -535,6 +531,10 @@ namespace AkggMid
|
||||
this.fieldTotalStd.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
|
||||
this.fieldTotalStd.Name = "fieldTotalStd";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// LeistungsnachweisSozialamt
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
|
||||
@@ -37,20 +37,10 @@ namespace AkggMid
|
||||
|
||||
|
||||
|
||||
pRO.Services = ErstelleDummyRecords(pRO);
|
||||
pRO.Services = LeistungsnachweisHelper.ErstelleDummyRecords(pRO);
|
||||
|
||||
LeistungsnachweisHelper.PruefeWochenBudget(pRO);
|
||||
|
||||
foreach (var record in pRO.Services)
|
||||
{
|
||||
if (IstAbwesend(pRO, record.StartDate))
|
||||
{
|
||||
record.Notice5 = "x";
|
||||
}
|
||||
else
|
||||
{
|
||||
record.Notice5 = "";
|
||||
}
|
||||
|
||||
}
|
||||
lblWegbegleitung.Text = String.Format("Kostenzusicherung: bis zu {0:0.00} Stunden pro Woche", pRO.ApprovedFLSPerWeek);
|
||||
if (pRO.CustomerOid > 0)
|
||||
{
|
||||
@@ -75,68 +65,6 @@ namespace AkggMid
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
private List<ServicesOverviewRO.ServiceDetail> ErstelleDummyRecords(ServicesOverviewRO pRO)
|
||||
{
|
||||
Dictionary<int, ServicesOverviewRO.ServiceDetail> day2Detail = new Dictionary<int, ServicesOverviewRO.ServiceDetail>();
|
||||
|
||||
var result = new List<ServicesOverviewRO.ServiceDetail>();
|
||||
foreach (var sr in pRO.Services)
|
||||
{
|
||||
//result.Add(sr);
|
||||
|
||||
if (!day2Detail.ContainsKey(sr.StartDate.Day))
|
||||
{
|
||||
sr.StartDateString = String.Format("{0:dd}", sr.StartDate);
|
||||
day2Detail.Add(sr.StartDate.Day, sr);
|
||||
result.Add(sr);
|
||||
}
|
||||
else
|
||||
{
|
||||
var dsr = day2Detail[sr.StartDate.Day];
|
||||
dsr.Minutes += sr.Minutes;
|
||||
if (dsr.Notice.Length > 0 && sr.Notice.Length > 0)
|
||||
dsr.Notice += ", " + sr.Notice;
|
||||
else if (sr.Notice.Length > 0)
|
||||
dsr.Notice = sr.Notice;
|
||||
if (dsr.Notice3 != null && dsr.Notice3.Length > 0 && sr.Notice3 != null && sr.Notice3.Length > 0)
|
||||
dsr.Notice3 += ", " + sr.Notice3;
|
||||
else if (sr.Notice3 != null && sr.Notice3.Length > 0)
|
||||
dsr.Notice3 = sr.Notice3;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 1; i <= 31; i++)
|
||||
{
|
||||
if (!day2Detail.ContainsKey(i))
|
||||
{
|
||||
var newSr = new ServicesOverviewRO.ServiceDetail();
|
||||
if (i <= pRO.EndDate.Day)
|
||||
{
|
||||
newSr.StartDate = new DateTime(pRO.StartDate.Year, pRO.StartDate.Month, i);
|
||||
newSr.StartDateString = String.Format("{0:dd}", newSr.StartDate);
|
||||
}
|
||||
else
|
||||
newSr.StartDateString = String.Format("{0}.", i);
|
||||
|
||||
result.Add(newSr);
|
||||
day2Detail.Add(i, newSr);
|
||||
}
|
||||
}
|
||||
return result.OrderBy(r => r.StartDate).ToList();
|
||||
}
|
||||
|
||||
private bool IstAbwesend(ServicesOverviewRO pRO, DateTime startDate)
|
||||
{
|
||||
foreach (var at in pRO.Abwesenheiten)
|
||||
{
|
||||
if (startDate >= at.Start && (!at.End.HasValue || startDate <= at.End))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -72,9 +72,9 @@ namespace AkggMid
|
||||
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.fieldStd = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.fieldTotalStd = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
|
||||
@@ -123,7 +123,7 @@ namespace AkggMid
|
||||
// xrTableCell7
|
||||
//
|
||||
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDate", "{0:dd}.")});
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDateString")});
|
||||
this.xrTableCell7.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.xrTableCell7.Name = "xrTableCell7";
|
||||
this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
|
||||
@@ -544,10 +544,6 @@ namespace AkggMid
|
||||
this.xrLabel1.Text = "Summe der gel. Stunden: [fieldTotalStd!0.00]";
|
||||
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// fieldStd
|
||||
//
|
||||
this.fieldStd.DataMember = "Services";
|
||||
@@ -561,6 +557,10 @@ namespace AkggMid
|
||||
this.fieldTotalStd.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
|
||||
this.fieldTotalStd.Name = "fieldTotalStd";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// LeistungsnachweisSozialamtMitBlutzucker
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
|
||||
@@ -37,20 +37,10 @@ namespace AkggMid
|
||||
|
||||
|
||||
|
||||
pRO.Services = ErstelleDummyRecords(pRO);
|
||||
pRO.Services = LeistungsnachweisHelper.ErstelleDummyRecords(pRO);
|
||||
|
||||
LeistungsnachweisHelper.PruefeWochenBudget(pRO);
|
||||
|
||||
foreach (var record in pRO.Services)
|
||||
{
|
||||
if (IstAbwesend(pRO, record.StartDate))
|
||||
{
|
||||
record.Notice5 = "x";
|
||||
}
|
||||
else
|
||||
{
|
||||
record.Notice5 = "";
|
||||
}
|
||||
|
||||
}
|
||||
lblWegbegleitung.Text = String.Format("Kostenzusicherung: bis zu {0:0.00} Stunden pro Woche", pRO.ApprovedFLSPerWeek);
|
||||
|
||||
if (pRO.CustomerOid > 0)
|
||||
@@ -75,72 +65,8 @@ namespace AkggMid
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
private List<ServicesOverviewRO.ServiceDetail> ErstelleDummyRecords(ServicesOverviewRO pRO)
|
||||
{
|
||||
Dictionary<int, ServicesOverviewRO.ServiceDetail> day2Detail = new Dictionary<int, ServicesOverviewRO.ServiceDetail>();
|
||||
|
||||
|
||||
var result = new List<ServicesOverviewRO.ServiceDetail>();
|
||||
foreach (var sr in pRO.Services)
|
||||
{
|
||||
//result.Add(sr);
|
||||
|
||||
if (!day2Detail.ContainsKey(sr.StartDate.Day))
|
||||
{
|
||||
sr.StartDateString = String.Format("{0:dd}", sr.StartDate);
|
||||
day2Detail.Add(sr.StartDate.Day, sr);
|
||||
result.Add(sr);
|
||||
}
|
||||
else
|
||||
{
|
||||
var dsr = day2Detail[sr.StartDate.Day];
|
||||
dsr.Minutes += sr.Minutes;
|
||||
if (dsr.Notice.Length > 0 && sr.Notice.Length > 0)
|
||||
dsr.Notice += ", " + sr.Notice;
|
||||
else if (sr.Notice.Length > 0)
|
||||
dsr.Notice = sr.Notice;
|
||||
if (dsr.Notice3.Length > 0 && sr.Notice3.Length > 0)
|
||||
dsr.Notice3 += ", " + sr.Notice3;
|
||||
else if (sr.Notice3.Length > 0)
|
||||
dsr.Notice3 = sr.Notice3;
|
||||
if (dsr.Notice4.Length > 0 && sr.Notice4.Length > 0)
|
||||
dsr.Notice4 += ", " + sr.Notice4;
|
||||
else if (sr.Notice4.Length > 0)
|
||||
dsr.Notice4 = sr.Notice4;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 1; i <= 31; i++)
|
||||
{
|
||||
if (!day2Detail.ContainsKey(i))
|
||||
{
|
||||
var newSr = new ServicesOverviewRO.ServiceDetail();
|
||||
if (i <= pRO.EndDate.Day)
|
||||
{
|
||||
newSr.StartDate = new DateTime(pRO.StartDate.Year, pRO.StartDate.Month, i);
|
||||
newSr.StartDateString = String.Format("{0:dd}", newSr.StartDate);
|
||||
}
|
||||
else
|
||||
newSr.StartDateString = String.Format("{0}.", i);
|
||||
|
||||
result.Add(newSr);
|
||||
day2Detail.Add(i, newSr);
|
||||
}
|
||||
}
|
||||
return result.OrderBy(r => r.StartDate).ToList();
|
||||
}
|
||||
|
||||
private bool IstAbwesend(ServicesOverviewRO pRO, DateTime startDate)
|
||||
{
|
||||
foreach (var at in pRO.Abwesenheiten)
|
||||
{
|
||||
if (startDate >= at.Start && (!at.End.HasValue || startDate <= at.End))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,9 +74,9 @@ namespace AkggMid
|
||||
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.fieldStd = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.fieldTotalStd = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
|
||||
@@ -124,7 +124,7 @@ namespace AkggMid
|
||||
// xrTableCell7
|
||||
//
|
||||
this.xrTableCell7.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDate", "{0:dd}.")});
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.StartDateString")});
|
||||
this.xrTableCell7.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.xrTableCell7.Name = "xrTableCell7";
|
||||
this.xrTableCell7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 0, 0, 0, 100F);
|
||||
@@ -564,10 +564,6 @@ namespace AkggMid
|
||||
this.xrLabel1.Text = "Summe der gel. Stunden: [fieldTotalStd!0.00]";
|
||||
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.BottomLeft;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// fieldStd
|
||||
//
|
||||
this.fieldStd.DataMember = "Services";
|
||||
@@ -581,6 +577,10 @@ namespace AkggMid
|
||||
this.fieldTotalStd.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
|
||||
this.fieldTotalStd.Name = "fieldTotalStd";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// LeistungsnachweisSozialamtMitBlutzuckerPumpe
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
|
||||
@@ -8,24 +8,26 @@ namespace AkggMid.Service
|
||||
{
|
||||
public class CustomServiceRecordDurationCalculator : ServiceRecordDurationCalculator
|
||||
{
|
||||
public override void CalculateRoundedDuration(ServiceRecord sr)
|
||||
{
|
||||
if (sr.ServiceDescription.ServiceCategory.IsBillable)
|
||||
{
|
||||
var duration = (decimal)sr.End.Value.Subtract(sr.Start.Value).TotalMinutes;
|
||||
//CB, 23.02.2023: Es soll nun doch nicht mehr gerundet werden
|
||||
|
||||
sr.RoundedDuration = Math.Round(duration / 15, MidpointRounding.ToEven) * 15;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.CalculateRoundedDuration(sr);
|
||||
}
|
||||
}
|
||||
//public override void CalculateRoundedDuration(ServiceRecord sr)
|
||||
//{
|
||||
// if (sr.ServiceDescription.ServiceCategory.IsBillable)
|
||||
// {
|
||||
// var duration = (decimal)sr.End.Value.Subtract(sr.Start.Value).TotalMinutes;
|
||||
|
||||
public override void CalculateRoundedDuration(ServiceRecordDC sr)
|
||||
{
|
||||
var duration = (decimal)sr.End.Value.Subtract(sr.Start.Value).TotalMinutes;
|
||||
sr.RoundedDuration = Math.Round(duration / 15, MidpointRounding.ToEven) * 15;
|
||||
}
|
||||
// sr.RoundedDuration = Math.Round(duration / 15, MidpointRounding.ToEven) * 15;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// base.CalculateRoundedDuration(sr);
|
||||
// }
|
||||
//}
|
||||
|
||||
//public override void CalculateRoundedDuration(ServiceRecordDC sr)
|
||||
//{
|
||||
// var duration = (decimal)sr.End.Value.Subtract(sr.Start.Value).TotalMinutes;
|
||||
// sr.RoundedDuration = Math.Round(duration / 15, MidpointRounding.ToEven) * 15;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,11 +59,11 @@ namespace BeWo.Service.Reporting
|
||||
|
||||
|
||||
//Dictionary<long, bool> customer2TerminationProcessed = new Dictionary<long, bool>();
|
||||
Dictionary<ValueListEntry, int> countPerTerminationReasonAll = new Dictionary<ValueListEntry, int>();
|
||||
Dictionary<ValueListEntry, List<String>> countPerTerminationReasonNames = new Dictionary<ValueListEntry, List<String>>();
|
||||
Dictionary<ValueListEntry, int> countPerTerminationReasonMale = new Dictionary<ValueListEntry, int>();
|
||||
Dictionary<ValueListEntry, int> countPerTerminationReasonFemale = new Dictionary<ValueListEntry, int>();
|
||||
Dictionary<ValueListEntry, int> countPerTerminationReasonDivers = new Dictionary<ValueListEntry, int>();
|
||||
Dictionary<String, int> countPerTerminationReasonAll = new Dictionary<String, int>();
|
||||
Dictionary<String, List<String>> countPerTerminationReasonNames = new Dictionary<String, List<String>>();
|
||||
Dictionary<String, int> countPerTerminationReasonMale = new Dictionary<String, int>();
|
||||
Dictionary<String, int> countPerTerminationReasonFemale = new Dictionary<String, int>();
|
||||
Dictionary<String, int> countPerTerminationReasonDivers = new Dictionary<String, int>();
|
||||
|
||||
Dictionary<long, VarFieldDef> oid2VarfieldDef = new Dictionary<long, VarFieldDef>();
|
||||
|
||||
@@ -266,43 +266,49 @@ namespace BeWo.Service.Reporting
|
||||
}
|
||||
|
||||
|
||||
if (customer.TerminationReason != null && customer.TerminationDate.HasValue &&
|
||||
customer.TerminationDate >= reportStartDate && customer.TerminationDate < reportEndDate)
|
||||
if (customer.TerminationDate.HasValue && customer.TerminationDate >= reportStartDate && customer.TerminationDate < reportEndDate)
|
||||
{
|
||||
if (!countPerTerminationReasonAll.ContainsKey(customer.TerminationReason))
|
||||
countPerTerminationReasonAll[customer.TerminationReason] = 0;
|
||||
countPerTerminationReasonAll[customer.TerminationReason] += 1;
|
||||
String grund = "Unbekannter Grund";
|
||||
|
||||
if (!countPerTerminationReasonMale.ContainsKey(customer.TerminationReason))
|
||||
countPerTerminationReasonMale[customer.TerminationReason] = 0;
|
||||
if (customer.TerminationReason != null)
|
||||
{
|
||||
grund = customer.TerminationReason.Value;
|
||||
|
||||
}
|
||||
if (!countPerTerminationReasonAll.ContainsKey(grund))
|
||||
countPerTerminationReasonAll[grund] = 0;
|
||||
countPerTerminationReasonAll[grund] += 1;
|
||||
|
||||
if (!countPerTerminationReasonMale.ContainsKey(grund))
|
||||
countPerTerminationReasonMale[grund] = 0;
|
||||
|
||||
if (customer.Person.Sex.HasValue && customer.Person.Sex.Value == Sex.Male)
|
||||
{
|
||||
countPerTerminationReasonMale[customer.TerminationReason] += 1;
|
||||
countPerTerminationReasonMale[grund] += 1;
|
||||
}
|
||||
|
||||
if (!countPerTerminationReasonFemale.ContainsKey(customer.TerminationReason))
|
||||
countPerTerminationReasonFemale[customer.TerminationReason] = 0;
|
||||
if (!countPerTerminationReasonFemale.ContainsKey(grund))
|
||||
countPerTerminationReasonFemale[grund] = 0;
|
||||
|
||||
if (customer.Person.Sex.HasValue && customer.Person.Sex.Value == Sex.Female)
|
||||
{
|
||||
countPerTerminationReasonFemale[customer.TerminationReason] += 1;
|
||||
countPerTerminationReasonFemale[grund] += 1;
|
||||
}
|
||||
|
||||
if (!countPerTerminationReasonDivers.ContainsKey(customer.TerminationReason))
|
||||
countPerTerminationReasonDivers[customer.TerminationReason] = 0;
|
||||
if (!countPerTerminationReasonDivers.ContainsKey(grund))
|
||||
countPerTerminationReasonDivers[grund] = 0;
|
||||
|
||||
if (customer.Person.Sex.HasValue && customer.Person.Sex.Value == Sex.Divers)
|
||||
{
|
||||
countPerTerminationReasonDivers[customer.TerminationReason] += 1;
|
||||
countPerTerminationReasonDivers[grund] += 1;
|
||||
}
|
||||
|
||||
|
||||
if (!countPerTerminationReasonNames.ContainsKey(customer.TerminationReason))
|
||||
if (!countPerTerminationReasonNames.ContainsKey(grund))
|
||||
{
|
||||
countPerTerminationReasonNames[customer.TerminationReason] = new List<string>();
|
||||
countPerTerminationReasonNames[grund] = new List<string>();
|
||||
}
|
||||
countPerTerminationReasonNames[customer.TerminationReason].Add(String.Format("{0}, {1}", customer.Person.LastName, customer.Person.FirstName));
|
||||
countPerTerminationReasonNames[grund].Add(String.Format("{0}, {1}", customer.Person.LastName, customer.Person.FirstName));
|
||||
|
||||
}
|
||||
|
||||
@@ -525,7 +531,7 @@ namespace BeWo.Service.Reporting
|
||||
AnnualReportDataDC data = new AnnualReportDataDC();
|
||||
report.Data.Add(data);
|
||||
data.Index = index++;
|
||||
data.Name = reason.Value;
|
||||
data.Name = reason;
|
||||
data.Value = countPerTerminationReasonAll[reason];
|
||||
|
||||
if (countPerTerminationReasonMale.ContainsKey(reason))
|
||||
|
||||
@@ -936,7 +936,13 @@ namespace BeWo.Service.ServiceImplementations
|
||||
settingValueDict.Add("ShowDistanceFields", "1");
|
||||
}
|
||||
}
|
||||
|
||||
if (!settingValueDict.ContainsKey("EinheitZeiterfassung") && settingValueDict.ContainsKey("IsZeiterfassungInStdMin"))
|
||||
{
|
||||
if (settingValueDict["IsZeiterfassungInStdMin"] == "1")
|
||||
{
|
||||
settingValueDict.Add("EinheitZeiterfassung", "2");
|
||||
}
|
||||
}
|
||||
|
||||
manDc.Settings = "";
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
public static string IsServiceRecordNoticeMandatory => "IsServiceRecordNoticeMandatory";
|
||||
public static string IsEndDateVisible => "IsEndDateVisible";
|
||||
public static string IsZeiterfassungInStdMin => "IsZeiterfassungInStdMin";
|
||||
|
||||
public static string EinheitZeiterfassung => "EinheitZeiterfassung";
|
||||
public static string HilfeplanAuslaufAuswahl => "HilfeplanAuslaufAuswahl";
|
||||
public static string AnzTageZeiterfassErfolgt => "AnzTageZeiterfassErfolgt";
|
||||
public static string MaxDaysEditServiceRecordsAllowed => "MaxDaysEditServiceRecordsAllowed";
|
||||
|
||||
Reference in New Issue
Block a user