CB bugfixing
This commit is contained in:
@@ -43,12 +43,12 @@
|
||||
<TargetCulture>de-DE</TargetCulture>
|
||||
<ProductName>BeWoPlaner</ProductName>
|
||||
<PublisherName>beyondSoft GmbH</PublisherName>
|
||||
<MinimumRequiredVersion>2.0.1.194</MinimumRequiredVersion>
|
||||
<MinimumRequiredVersion>2.0.1.197</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.htm</WebPage>
|
||||
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
||||
<TrustUrlParameters>true</TrustUrlParameters>
|
||||
<ApplicationRevision>195</ApplicationRevision>
|
||||
<ApplicationRevision>198</ApplicationRevision>
|
||||
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace BeWo
|
||||
|
||||
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "SetStartTimeToEndTimeAfterSave");
|
||||
AppSettings.SetStartTimeToEndTimeAfterSave = val != null && val.Equals("1");
|
||||
|
||||
|
||||
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "IsServiceRecordNoticeMandatory");
|
||||
if (val != null && val.Equals("0"))
|
||||
{
|
||||
@@ -372,8 +372,8 @@ namespace BeWo
|
||||
{
|
||||
showDienstplanung = true;
|
||||
}
|
||||
|
||||
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowMarker");
|
||||
|
||||
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowMarker");
|
||||
if (val != null && val.Equals("1"))
|
||||
{
|
||||
showMarker = true;
|
||||
|
||||
@@ -1681,50 +1681,6 @@ namespace BeWo.Core
|
||||
dc.SupportConcept = scDc;
|
||||
dc.CostBearer = cbDc;
|
||||
|
||||
if(vm.ServiceRecordFormat != ServiceRecordFormate.ZeiterfassungMitMonatJahr && vm.Date.HasValue && vm.DateAndTime.HasValue && vm.StartDate.HasValue) {
|
||||
|
||||
dc.Start = new DateTime(vm.Date.Value.Year,
|
||||
vm.Date.Value.Month,
|
||||
vm.Date.Value.Day,
|
||||
vm.StartTime == null ? vm.DateAndTime.Value.Hour : vm.StartDate.Value.Hour,
|
||||
vm.StartTime == null ? vm.DateAndTime.Value.Minute : vm.StartDate.Value.Minute,
|
||||
vm.StartTime == null ? vm.DateAndTime.Value.Second : vm.StartDate.Value.Second);
|
||||
|
||||
|
||||
|
||||
if(vm.DurationInStunden == ZeiterfassungsDauer.Minuten)
|
||||
{
|
||||
if (vm.ServiceRecordFormat == ServiceRecordFormate.ZeiterfassungMitEndDatum)
|
||||
{
|
||||
dc.End = dc.Start.Value.AddMinutes(Convert.ToDouble(vm.DurationSTD));
|
||||
}
|
||||
else
|
||||
{
|
||||
dc.End = dc.Start.Value.AddMinutes(Convert.ToDouble(vm.Duration));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vm.ServiceRecordFormat == ServiceRecordFormate.ZeiterfassungMitEndDatum)
|
||||
{
|
||||
dc.End = dc.Start.Value.AddHours(Convert.ToDouble(vm.DurationSTD));
|
||||
}
|
||||
else
|
||||
{
|
||||
dc.End = dc.Start.Value.AddHours(Convert.ToDouble(vm.Duration));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var dates = DateTime.Parse("1." + vm.OnlyMonth + vm.OnlyYear);
|
||||
|
||||
var StartDatetime = new DateTime(dates.Year, dates.Month, 1, 0, 0, 0);
|
||||
|
||||
dc.Start = StartDatetime;
|
||||
dc.End = StartDatetime.AddHours((double)vm.DurationMonthYearGes);
|
||||
}
|
||||
|
||||
|
||||
if (relDc != null)
|
||||
@@ -1740,8 +1696,6 @@ namespace BeWo.Core
|
||||
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowEditAfterMaxDaysInNextMonth))
|
||||
maxdays = -1;
|
||||
|
||||
var test = dc.Start;
|
||||
var test2 = vm.DateAndTime;
|
||||
|
||||
ServiceFacade.DoOperationsServiceSync(o => r = o.ValidateServiceRecord(dc, statistics, maxdays, employeeOids, cb2ScOids));
|
||||
|
||||
@@ -1755,12 +1709,12 @@ namespace BeWo.Core
|
||||
switch (result.ResultType)
|
||||
{
|
||||
case ServiceRecordValidationResult.OutsideOfSupportConcept:
|
||||
MessageBox.Show("Das gewählte Datum '" + vm.DateAndTime.Value.ToShortDateString() + "' liegt außerhalb des Zeitraums des gewählten Hilfeplans (" + relDc.DateRangeString + ").\nDas Speichern ist nicht möglich.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
MessageBox.Show("Das gewählte Datum '" + vm.StartDate.ToShortDateString() + "' liegt außerhalb des Zeitraums des gewählten Hilfeplans (" + relDc.DateRangeString + ").\nDas Speichern ist nicht möglich.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
lValid = false;
|
||||
exitLoop = true;
|
||||
break;
|
||||
case ServiceRecordValidationResult.OutOfEditLimit:
|
||||
MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.DateAndTime.Value.ToShortDateString() + " dokumentieren, da bereits der " + BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed + ". des nachfolgenden Monats überschritten ist.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.StartDate.ToShortDateString() + " dokumentieren, da bereits der " + BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed + ". des nachfolgenden Monats überschritten ist.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
lValid = false;
|
||||
exitLoop = true;
|
||||
break;
|
||||
@@ -1769,11 +1723,11 @@ namespace BeWo.Core
|
||||
{
|
||||
if (BeWoApp.AppSettings.AnzTageZeiterfassErfolgt == 1)
|
||||
{
|
||||
MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.DateAndTime.Value.ToShortDateString() + " dokumentieren, da die Zeiterfassung innerhalb von einem Tag erfolgen muss.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.StartDate.ToShortDateString() + " dokumentieren, da die Zeiterfassung innerhalb von einem Tag erfolgen muss.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.DateAndTime.Value.ToShortDateString() + " dokumentieren, da die Zeiterfassung innerhalb von " + BeWoApp.AppSettings.AnzTageZeiterfassErfolgt + " Tagen erfolgen muss.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.StartDate.ToShortDateString() + " dokumentieren, da die Zeiterfassung innerhalb von " + BeWoApp.AppSettings.AnzTageZeiterfassErfolgt + " Tagen erfolgen muss.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
}
|
||||
|
||||
lValid = false;
|
||||
@@ -1789,10 +1743,10 @@ namespace BeWo.Core
|
||||
case ServiceRecordValidationResult.ServiceRecordOverlapping:
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowCreateOverlappingFLS))
|
||||
{
|
||||
MessageBox.Show("An dem gewählten Datum '" + vm.DateAndTime.Value.ToShortDateString() + " " + vm.DateAndTime.Value.ToShortTimeString() + "' existiert bereits ein Eintrag (" + result.Message + " bei Klient/in " + result.CustomerName + ") .\nSpeichern nicht möglich.", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
MessageBox.Show("An dem gewählten Datum '" + vm.StartDate.ToShortDateString() + " " + vm.StartDate.ToShortTimeString() + "' existiert bereits ein Eintrag (" + result.Message + " bei Klient/in " + result.CustomerName + ") .\nSpeichern nicht möglich.", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
lValid = false;
|
||||
}
|
||||
else if (MessageBox.Show("An dem gewählten Datum '" + vm.DateAndTime.Value.ToShortDateString() + " " + vm.DateAndTime.Value.ToShortTimeString() + "' existiert bereits ein Eintrag (" + result.Message + " bei Klient/in " + result.CustomerName + ").\nMöchten Sie trotzdem speichern?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No)
|
||||
else if (MessageBox.Show("An dem gewählten Datum '" + vm.StartDate.ToShortDateString() + " " + vm.StartDate.ToShortTimeString() + "' existiert bereits ein Eintrag (" + result.Message + " bei Klient/in " + result.CustomerName + ").\nMöchten Sie trotzdem speichern?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No)
|
||||
{
|
||||
lValid = false;
|
||||
exitLoop = true;
|
||||
@@ -1802,10 +1756,10 @@ namespace BeWo.Core
|
||||
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowCreateOverlappingFLSForEmployee))
|
||||
{
|
||||
MessageBox.Show("An dem gewählten Datum '" + vm.DateAndTime.Value.ToShortDateString() + " " + vm.DateAndTime.Value.ToShortTimeString() + "' existiert bereits ein Eintrag von " + result.EmployeeName + "\n(" + result.Message + ").\nSpeichern nicht möglich.", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
MessageBox.Show("An dem gewählten Datum '" + vm.StartDate.ToShortDateString() + " " + vm.StartDate.ToShortTimeString() + "' existiert bereits ein Eintrag von " + result.EmployeeName + "\n(" + result.Message + ").\nSpeichern nicht möglich.", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
lValid = false;
|
||||
}
|
||||
else if (MessageBox.Show("An dem gewählten Datum '" + vm.DateAndTime.Value.ToShortDateString() + " " + vm.DateAndTime.Value.ToShortTimeString() + "' existiert bereits ein Eintrag von " + result.EmployeeName + "\n(" + result.Message + ").\n\nMöchten Sie trotzdem speichern?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No)
|
||||
else if (MessageBox.Show("An dem gewählten Datum '" + vm.StartDate.ToShortDateString() + " " + vm.StartDate.ToShortTimeString() + "' existiert bereits ein Eintrag von " + result.EmployeeName + "\n(" + result.Message + ").\n\nMöchten Sie trotzdem speichern?", "Speichern", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.No)
|
||||
{
|
||||
lValid = false;
|
||||
exitLoop = true;
|
||||
|
||||
@@ -1395,13 +1395,17 @@ namespace BeWo
|
||||
|
||||
private void PinEinblenden()
|
||||
{
|
||||
PINTextBox.Visibility = Visibility.Visible;
|
||||
lblPin.Visibility = Visibility.Visible;
|
||||
if (PINTextBox.Visibility != Visibility.Visible)
|
||||
{
|
||||
PINTextBox.Visibility = Visibility.Visible;
|
||||
lblPin.Visibility = Visibility.Visible;
|
||||
|
||||
linkLine.Margin = new Thickness(linkLine.Margin.Left, linkLine.Margin.Top + 25, linkLine.Margin.Right, linkLine.Margin.Bottom);
|
||||
gridLogin.Height += 25;
|
||||
linkLine.Margin = new Thickness(linkLine.Margin.Left, linkLine.Margin.Top + 25, linkLine.Margin.Right,
|
||||
linkLine.Margin.Bottom);
|
||||
gridLogin.Height += 25;
|
||||
|
||||
PINTextBox.Focus();
|
||||
PINTextBox.Focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -594,7 +594,7 @@
|
||||
<CheckBox Grid.Column="1" Content="Abwesenheiten" Margin="10,0,0,0" x:Name="AbwesenheitenEinAusCheckBox" Checked="AbwesenheitenEinAusCheckBox_OnChecked"
|
||||
Unchecked="AbwesenheitenEinAusCheckBox_OnChecked"
|
||||
IsChecked="{Binding Path=IsAbsenceTimeVisible, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type view:NewSchedulerView}}, Mode=TwoWay}" />
|
||||
<CheckBox Grid.Column="2" VerticalAlignment="Center" Content="Aufgaben" x:Name="ShowTasksCheckBox" Click="ShowTasksCheckBox_OnClick" />
|
||||
<CheckBox Grid.Column="2" VerticalAlignment="Center" Margin="10,0,0,0" Content="Aufgaben" x:Name="ShowTasksCheckBox" Click="ShowTasksCheckBox_OnClick" />
|
||||
<TextBlock IsEnabled="{Binding Enabled, UpdateSourceTrigger=PropertyChanged}" Grid.Column="3" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10,0,0,0">
|
||||
<Hyperlink RequestNavigate="ShowAppointmentRequests" NavigateUri="#" IsEnabled="{Binding Enabled, UpdateSourceTrigger=PropertyChanged}">
|
||||
<TextBlock Text="{Binding Requests, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
@@ -449,6 +449,17 @@ namespace BeWo.View.Detail
|
||||
|
||||
if (lValid)
|
||||
{
|
||||
if (chkWithClient.IsChecked.HasValue && chkWithClient.IsChecked.Value)
|
||||
{
|
||||
if (ViewModel.SelectedCustomerNode == null || ViewModel.SelectedCustomerNode.SupportConceptTreeNodeDC == null)
|
||||
{
|
||||
MessageBox.Show(Translator.Translate("Bitte wählen Sie einen Hilfeplan aus."), "Speichern",
|
||||
MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var atvm = ViewModel.CreateFromPrototype();
|
||||
|
||||
ViewModel.AccountingTransactionVMList.Add(atvm);
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
Height="23" Grid.Column="1" Grid.Row="1"
|
||||
SelectionChanged="AngebotsComboboxChange" />
|
||||
<Label Content="Datum: " Grid.Column="0" Grid.Row="2" />
|
||||
<dxe:DateEdit EditValue="{val:ValidationBinding Mode=TwoWay, Path=AdditionalServiceBookings.NewVM.Date}"
|
||||
<dxe:DateEdit EditValue="{val:ValidationBinding Mode=TwoWay, Path=AdditionalServiceBookings.NewVM.EditStartDate}"
|
||||
Height="23" Margin="3,0,3,3"
|
||||
Grid.Column="1" Grid.Row="2" />
|
||||
<Label Grid.Column="0" Grid.Row="3" Content="Startzeit" />
|
||||
@@ -326,14 +326,14 @@
|
||||
</Grid.RowDefinitions>
|
||||
<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=AdditionalServiceBookings.NewVM.StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=AdditionalServiceBookings.NewVM.StartTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" />
|
||||
<Label Grid.Row="0" Grid.Column="1" Content="Endzeit" />
|
||||
<dxe:TextEdit MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
Grid.Row="0" Grid.Column="2"
|
||||
EditValue="{Binding Mode=TwoWay, Path=AdditionalServiceBookings.NewVM.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=AdditionalServiceBookings.NewVM.EndTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" />
|
||||
<Label Content="Dauer (min)" Grid.Column="1" Grid.Row="1" />
|
||||
@@ -502,7 +502,7 @@
|
||||
Height="23" />
|
||||
<Label Grid.Column="0" Grid.Row="4" Content="Datum" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="4" x:Name="DatepickerNewDate"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.Date}"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.EditStartDate}"
|
||||
Height="23" Margin="3,0,3,3" />
|
||||
<Label Grid.Column="0" Grid.Row="5" Content="Startzeit" />
|
||||
<Grid Grid.Column="1" Grid.Row="5">
|
||||
@@ -512,11 +512,11 @@
|
||||
<ColumnDefinition Width="60" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<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.StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.StartTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
Height="23" Margin="3,0,3,3" />
|
||||
<Label Grid.Column="1" Content="Endzeit" />
|
||||
<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.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="2" Height="23" Margin="3,0,3,3" />
|
||||
</Grid>
|
||||
<Grid Grid.Column="1" Grid.Row="6">
|
||||
|
||||
@@ -997,7 +997,7 @@ namespace BeWo.View.Detail
|
||||
|
||||
private void _ViewModel_ServiceRecordListChanged(object sender, EventArgs e)
|
||||
{
|
||||
var list = _ViewModel.ServiceRecordsForSelectedCustomer.OrderByDescending(srVM => srVM.DateAndTime).ToList();
|
||||
var list = _ViewModel.ServiceRecordsForSelectedCustomer.OrderByDescending(srVM => srVM.StartDate).ToList();
|
||||
|
||||
SrListBox.ItemsSource = list;
|
||||
|
||||
@@ -1254,7 +1254,7 @@ namespace BeWo.View.Detail
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
lContent.AddRange(list.Select(vm => new List<string> {String.Format("{0:d}", (vm.StartTime != null && vm.StartTime.Value.Second == 0 ? vm.DateAndTime : vm.Date)), vm.AssistanceDuration.ToString(), vm.RoundedDuration.ToString(), vm.Employee != null ? vm.Employee.ToString() : string.Empty, vm.Customer != null ? vm.Customer.ToString() : string.Empty, vm.SupportConcept != null ? vm.SupportConcept.ToString() : string.Empty, vm.CostBearer != null ? vm.CostBearer.ToString() : string.Empty, vm.Category != null ? vm.Category.ToString() : string.Empty, vm.ServiceDescription != null ? vm.ServiceDescription.ToString() : string.Empty, vm.Notice}));
|
||||
lContent.AddRange(list.Select(vm => new List<string> {String.Format("{0:d}", vm.StartDate), vm.AssistanceDuration.ToString(), vm.RoundedDuration.ToString(), vm.Employee != null ? vm.Employee.ToString() : string.Empty, vm.Customer != null ? vm.Customer.ToString() : string.Empty, vm.SupportConcept != null ? vm.SupportConcept.ToString() : string.Empty, vm.CostBearer != null ? vm.CostBearer.ToString() : string.Empty, vm.Category != null ? vm.Category.ToString() : string.Empty, vm.ServiceDescription != null ? vm.ServiceDescription.ToString() : string.Empty, vm.Notice}));
|
||||
}
|
||||
|
||||
var path = BeWoApp.GetAndCreateUserAppDataPath() + "\\Dokumentation.xls";
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace BeWo.View.Detail
|
||||
{
|
||||
int day = int.Parse(column.Name.Replace("colDay", string.Empty));
|
||||
|
||||
var list = this._ViewModel.ServiceRecords.Where(i => i.Date.Value.Day.Equals(day)).ToList();
|
||||
var list = this._ViewModel.ServiceRecords.Where(i => i.StartDate.Day.Equals(day)).ToList();
|
||||
|
||||
ServiceRecordPopUp popUp = new ServiceRecordPopUp(list);
|
||||
BeWoApp.MainControl.ShowControlAsModalPopup(popUp);
|
||||
|
||||
@@ -128,14 +128,14 @@
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Datum" x:Name="startDatum1" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
x:Name="datepicker_newDate1"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=Date}"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=EditStartDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Startzeit" x:Name="StartzeitLabel1" HorizontalAlignment="Left"/>
|
||||
<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=StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=StartTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="startTime1" Grid.Column="1" Grid.Row="1"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
@@ -144,15 +144,15 @@
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1"/>
|
||||
<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=EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=EndTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" x:Name="endTime1" Grid.Row="1"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
|
||||
|
||||
<Label Content="Dauer (min)" Grid.Column="2" x:Name="MinStdDauerLabel" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numerictb_duration" Mask="########" MaskUseAsDisplayFormat="True"
|
||||
<Label Content="Dauer (min)" Grid.Column="2" x:Name="DauerLabelOhneEndDatum" Grid.Row="2"/>
|
||||
<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"
|
||||
Height="23" Margin="3,0,3,3"/>
|
||||
@@ -160,8 +160,8 @@
|
||||
|
||||
|
||||
<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ZeiterfassungsDauerTranslations}" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2" Margin="3,0,3,3"
|
||||
EditValue="{Binding Path=DurationInStunden, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" x:Name="MinSTDOhneEnd" Visibility="Collapsed" SelectedIndexChanged="MinSTDOhneEnd_OnSelectedIndexChanged"/>
|
||||
EditValue="{Binding Path=DauerEinheit, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" x:Name="ComboBoxDauerEinheitOhneEndDatum" Visibility="Collapsed" SelectedIndexChanged="MinSTDOhneEnd_OnSelectedIndexChanged"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
@@ -184,13 +184,13 @@
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Startdatum" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="0"
|
||||
x:Name="datepicker_newDate2"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=Date}"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=EditStartDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" AllowNullInput="False"/>
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="0" Content="Uhrzeit" x:Name="StartzeitLabel2"/>
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="0" 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=StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=StartTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="startTime2"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
@@ -198,29 +198,29 @@
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Enddatum" x:Name="EndDateLabel2"/>
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="1"
|
||||
x:Name="datepicker_newEndDate2"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=EditableEndDate}"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=EditEndDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" AllowNullInput="False"/>
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="1" Content="Uhrzeit" />
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="1" 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=EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=EndTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="endTime2"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
|
||||
<Label Content="Dauer" Grid.Column="2" x:Name="MinStdDauerlbl" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numeric_duration" Mask="########" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=DurationSTD, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
<Label Content="Dauer" Grid.Column="2" x:Name="DauerLabelMitEndDatum" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="SpinEditDurationMitEndDatum" Mask="########0" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=Duration, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" Grid.Row="2"
|
||||
Height="23" Margin="3,0,3,3"/>
|
||||
|
||||
|
||||
|
||||
<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ZeiterfassungsDauerTranslations}" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2" Margin="3,0,3,3"
|
||||
EditValue="{Binding Path=DurationInStunden, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" x:Name="MinSTDMitEnd" Visibility="Collapsed" SelectedIndexChanged="MinSTDMitEnd_OnSelectedIndexChanged" />
|
||||
EditValue="{Binding Path=DauerEinheit, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" x:Name="ComboBoxDauerEinheitMitEndDatum" Visibility="Collapsed" SelectedIndexChanged="MinSTDMitEnd_OnSelectedIndexChanged" />
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace BeWo.View.Detail
|
||||
ConfigureDocTypes();
|
||||
}
|
||||
|
||||
IsEndDateVisible(pSCViewModel.ServiceRecordFormat, pSCViewModel.DurationInStunden.Value);
|
||||
IsEndDateVisible(pSCViewModel.ServiceRecordFormat, pSCViewModel.DauerEinheit);
|
||||
|
||||
if (!pSCViewModel.EditAllowed)
|
||||
{
|
||||
@@ -305,38 +305,64 @@ namespace BeWo.View.Detail
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
||||
|
||||
if (scv == ServiceRecordFormate.ZeiterfassungMitEndDatum) //Settings.IsEndDateVisible)
|
||||
{
|
||||
GridMitEnddatum.Visibility = Visibility.Visible;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
//GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
if (settings.IsZeiterfassungInStdMin || zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
MinSTDOhneEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerLabel.SetValue(Grid.ColumnProperty, 0);
|
||||
numerictb_duration.SetValue(Grid.ColumnProperty, 1);
|
||||
MinStdDauerLabel.Content = "Dauer";
|
||||
MinStdDauerlbl.Content = "Dauer";
|
||||
ComboBoxDauerEinheitMitEndDatum.Visibility = Visibility.Visible;
|
||||
|
||||
DauerLabelMitEndDatum.SetValue(Grid.ColumnProperty, 0);
|
||||
DauerLabelMitEndDatum.Content = "Dauer";
|
||||
|
||||
SpinEditDurationMitEndDatum.SetValue(Grid.ColumnProperty, 1);
|
||||
|
||||
if (zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
numerictb_duration.IsFloatValue = true;
|
||||
numerictb_duration.Mask = "########0.00";
|
||||
SpinEditDurationMitEndDatum.IsFloatValue = true;
|
||||
SpinEditDurationMitEndDatum.Mask = "########0.00";
|
||||
}
|
||||
else
|
||||
{
|
||||
numerictb_duration.IsFloatValue = false;
|
||||
numerictb_duration.Mask = "########";
|
||||
SpinEditDurationMitEndDatum.IsFloatValue = false;
|
||||
SpinEditDurationMitEndDatum.Mask = "########0";
|
||||
}
|
||||
}
|
||||
|
||||
if (scv == ServiceRecordFormate.ZeiterfassungMitEndDatum)//Settings.IsEndDateVisible)
|
||||
}
|
||||
else
|
||||
{
|
||||
GridOhneEnddatum.Visibility = Visibility.Visible;
|
||||
GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
//GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
if (settings.IsZeiterfassungInStdMin || zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
GridMitEnddatum.Visibility = Visibility.Visible;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
//GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
else
|
||||
{
|
||||
GridOhneEnddatum.Visibility = Visibility.Visible;
|
||||
GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
//GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
ComboBoxDauerEinheitOhneEndDatum.Visibility = Visibility.Visible;
|
||||
|
||||
DauerLabelOhneEndDatum.SetValue(Grid.ColumnProperty, 0);
|
||||
DauerLabelOhneEndDatum.Content = "Dauer";
|
||||
|
||||
SpinEditDurationOhneEndDatum.SetValue(Grid.ColumnProperty, 1);
|
||||
|
||||
if (zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
SpinEditDurationOhneEndDatum.IsFloatValue = true;
|
||||
SpinEditDurationOhneEndDatum.Mask = "########0.00";
|
||||
}
|
||||
else
|
||||
{
|
||||
SpinEditDurationOhneEndDatum.IsFloatValue = false;
|
||||
SpinEditDurationOhneEndDatum.Mask = "########0";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
@@ -483,7 +509,7 @@ namespace BeWo.View.Detail
|
||||
// SetRTFDaten();
|
||||
//}
|
||||
|
||||
_ServiceRecordVM.RoundedDuration = _ServiceRecordVM.Duration.Value;
|
||||
_ServiceRecordVM.RoundedDuration = _ServiceRecordVM.Duration;
|
||||
|
||||
if (_SelectedEmployee != null)
|
||||
{
|
||||
@@ -631,29 +657,29 @@ namespace BeWo.View.Detail
|
||||
|
||||
private void MinSTDOhneEnd_OnSelectedIndexChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (MinSTDOhneEnd.Text == ZeiterfassungsDauer.Minuten.ToString())
|
||||
if (ComboBoxDauerEinheitOhneEndDatum.Text == ZeiterfassungsDauer.Minuten.ToString())
|
||||
{
|
||||
numerictb_duration.IsFloatValue = false;
|
||||
numerictb_duration.Mask = "########";
|
||||
SpinEditDurationOhneEndDatum.IsFloatValue = false;
|
||||
SpinEditDurationOhneEndDatum.Mask = "########0";
|
||||
}
|
||||
else
|
||||
{
|
||||
numerictb_duration.IsFloatValue = true;
|
||||
numerictb_duration.Mask = "########0.00";
|
||||
SpinEditDurationOhneEndDatum.IsFloatValue = true;
|
||||
SpinEditDurationOhneEndDatum.Mask = "########0.00";
|
||||
}
|
||||
}
|
||||
|
||||
private void MinSTDMitEnd_OnSelectedIndexChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (MinSTDMitEnd.Text == ZeiterfassungsDauer.Minuten.ToString())
|
||||
if (ComboBoxDauerEinheitMitEndDatum.Text == ZeiterfassungsDauer.Minuten.ToString())
|
||||
{
|
||||
numeric_duration.IsFloatValue = false;
|
||||
numeric_duration.Mask = "########";
|
||||
SpinEditDurationMitEndDatum.IsFloatValue = false;
|
||||
SpinEditDurationMitEndDatum.Mask = "########0";
|
||||
}
|
||||
else
|
||||
{
|
||||
numeric_duration.IsFloatValue = true;
|
||||
numeric_duration.Mask = "########0.00";
|
||||
SpinEditDurationMitEndDatum.IsFloatValue = true;
|
||||
SpinEditDurationMitEndDatum.Mask = "########0.00";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
|
||||
<Grid Grid.Column="2" Grid.RowSpan="2" VerticalAlignment="Top" Margin="5,0,0,0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70" />
|
||||
<ColumnDefinition Width="195" />
|
||||
<ColumnDefinition Width="64" />
|
||||
<ColumnDefinition Width="201" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -107,9 +107,9 @@
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="4" ColumnSpan="2" x:Name="GridOhneEnddatum" Visibility="Visible">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70" />
|
||||
<ColumnDefinition Width="64" />
|
||||
<ColumnDefinition Width="62" />
|
||||
<ColumnDefinition Width="71" />
|
||||
<ColumnDefinition Width="77" />
|
||||
<ColumnDefinition Width="62" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -122,13 +122,13 @@
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Datum" x:Name="startDatum1" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
x:Name="datepicker_newDate1"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=Date}"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=EditStartDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" AllowNullInput="False"/>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Startzeit" x:Name="StartzeitLabel1" HorizontalAlignment="Left"/>
|
||||
<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=StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=StartTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="startTime1" Grid.Column="1" Grid.Row="1"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
@@ -136,19 +136,19 @@
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1"/>
|
||||
<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=EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=EndTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" x:Name="endTime1" Grid.Row="1"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
<Label Content="Dauer (min)" Grid.Column="2" x:Name="MinStdDauerLabel" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numerictb_duration" Mask="########" MaskUseAsDisplayFormat="True"
|
||||
<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"
|
||||
Height="23" Margin="3,0,3,3"/>
|
||||
|
||||
<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ZeiterfassungsDauerTranslations}" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2" Margin="3,0,3,3"
|
||||
EditValue="{Binding Path=DurationInStunden, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
EditValue="{Binding Path=DauerEinheit, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" x:Name="MinSTDOhneEnd" Visibility="Collapsed" SelectedIndexChanged="MinSTDOhneEnd_OnSelectedIndexChanged "/>
|
||||
|
||||
</Grid>
|
||||
@@ -169,13 +169,13 @@
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Startdatum" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="0"
|
||||
x:Name="datepicker_newDate2"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=Date}"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=EditStartDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" AllowNullInput="False"/>
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="0" Content="Uhrzeit" x:Name="StartzeitLabel2"/>
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="0" 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=StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=StartTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="startTime2" Width="62"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
@@ -183,25 +183,25 @@
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Enddatum" x:Name="EndDateLabel2"/>
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="1"
|
||||
x:Name="datepicker_newEndDate2"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=EditableEndDate}"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=EditEndDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" AllowNullInput="False"/>
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="1" Content="Uhrzeit" />
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="1" 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=EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=EndTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="endTime2" Width="62"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
<Label Content="Dauer" Grid.Column="2" x:Name="MinStdDauerlbl" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numeric_duration" Mask="########" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=DurationSTD, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numeric_duration" Mask="########0" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=Duration, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" Grid.Row="2"
|
||||
Height="23" Margin="3,0,3,3"/>
|
||||
|
||||
<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ZeiterfassungsDauerTranslations}" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2" Margin="3,0,3,3"
|
||||
EditValue="{Binding Path=DurationInStunden, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
EditValue="{Binding Path=DauerEinheit, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" x:Name="MinSTDMitEnd" Visibility="Collapsed" SelectedIndexChanged="MinSTDMitEnd_OnSelectedIndexChanged "/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace BeWo.View.Detail
|
||||
|
||||
|
||||
InitSelectionList();
|
||||
ConfigureServiceRecordFormats(pSelectedViewModel.ServiceRecordFormat,pSelectedViewModel.DurationInStunden.Value);
|
||||
ConfigureServiceRecordFormats(pSelectedViewModel.ServiceRecordFormat,pSelectedViewModel.DauerEinheit);
|
||||
|
||||
if (!pSelectedViewModel.EditAllowed)
|
||||
{
|
||||
@@ -367,17 +367,13 @@ namespace BeWo.View.Detail
|
||||
|
||||
decimal duration;
|
||||
|
||||
if(_ServiceRecordVM.ServiceRecordFormat == ServiceRecordFormate.ZeiterfassungMitEndDatum)
|
||||
{
|
||||
duration = _ServiceRecordVM.DurationSTD.Value;
|
||||
}
|
||||
else if(_ServiceRecordVM.ServiceRecordFormat == ServiceRecordFormate.ZeiterfassungMitMonatJahr)
|
||||
if(_ServiceRecordVM.ServiceRecordFormat == ServiceRecordFormate.ZeiterfassungMitMonatJahr)
|
||||
{
|
||||
duration = _ServiceRecordVM.DurationMonthYearGes.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
duration = _ServiceRecordVM.Duration.Value;
|
||||
duration = _ServiceRecordVM.Duration;
|
||||
}
|
||||
|
||||
var lRoundedDuration = duration;
|
||||
@@ -872,10 +868,6 @@ namespace BeWo.View.Detail
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
//GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
|
||||
numerictb_distance.SetValue(WidthProperty, (double)49);
|
||||
numerictb_distance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
|
||||
// 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)
|
||||
{
|
||||
@@ -891,7 +883,7 @@ namespace BeWo.View.Detail
|
||||
else
|
||||
{
|
||||
numeric_duration.IsFloatValue = false;
|
||||
numeric_duration.Mask = "########";
|
||||
numeric_duration.Mask = "########0";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -930,7 +922,7 @@ namespace BeWo.View.Detail
|
||||
else
|
||||
{
|
||||
numerictb_duration.IsFloatValue = false;
|
||||
numerictb_duration.Mask = "########";
|
||||
numerictb_duration.Mask = "########0";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -942,7 +934,7 @@ namespace BeWo.View.Detail
|
||||
if (MinSTDMitEnd.Text == ZeiterfassungsDauer.Minuten.ToString())
|
||||
{
|
||||
numeric_duration.IsFloatValue = false;
|
||||
numeric_duration.Mask = "########";
|
||||
numeric_duration.Mask = "########0";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -956,7 +948,7 @@ namespace BeWo.View.Detail
|
||||
if (MinSTDOhneEnd.Text == ZeiterfassungsDauer.Minuten.ToString())
|
||||
{
|
||||
numerictb_duration.IsFloatValue = false;
|
||||
numerictb_duration.Mask = "########";
|
||||
numerictb_duration.Mask = "########0";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -701,13 +701,13 @@
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Startdatum" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="0"
|
||||
x:Name="datepicker_newDate2" AllowNullInput="False"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.Date}"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.EditStartDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="0" Content="Uhrzeit" x:Name="StartzeitLabel2"/>
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="0" 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.StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.StartTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="startTime2"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
@@ -715,25 +715,25 @@
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Enddatum" x:Name="EndDateLabel2"/>
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="1" AllowNullInput="False"
|
||||
x:Name="datepicker_newEndDate2"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.EditableEndDate}"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.EditEndDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="1" Content="Uhrzeit" />
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="1" 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.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="endTime2"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
<Label Content="Dauer" Grid.Column="2" x:Name="MinStdDauerlbl" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numeric_duration" Mask="########" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=PrototypeVM.DurationSTD, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numeric_duration" Mask="########0" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=PrototypeVM.Duration, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" Grid.Row="2"
|
||||
Height="23" Margin="3,0,3,3"/>
|
||||
|
||||
<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ZeiterfassungsDauerTranslations}" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2" Margin="3,0,3,3"
|
||||
EditValue="{Binding Path=PrototypeVM.DurationInStunden, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
EditValue="{Binding Path=PrototypeVM.DauerEinheit, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" x:Name="MinSTDMitEnd" Visibility="Collapsed" SelectedIndexChanged="MinSTDMitEnd_OnSelectedIndexChanged"/>
|
||||
</Grid>
|
||||
|
||||
@@ -755,14 +755,14 @@
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Datum" x:Name="startDatum1" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
x:Name="datepicker_newDate1" AllowNullInput="False"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.Date}"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.EditStartDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Startzeit" x:Name="StartzeitLabel1" HorizontalAlignment="Left"/>
|
||||
<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.StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.StartTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="startTime1" Grid.Column="1" Grid.Row="1"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
@@ -771,7 +771,7 @@
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1" />
|
||||
<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.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeString, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" x:Name="endTime1" Grid.Row="1"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
@@ -779,14 +779,14 @@
|
||||
|
||||
|
||||
<Label Content="Dauer (min)" Grid.Column="2" x:Name="MinStdDauerLabel" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numerictb_duration" Mask="########" MaskUseAsDisplayFormat="True"
|
||||
<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"
|
||||
Height="23" Margin="3,0,3,3"/>
|
||||
|
||||
|
||||
<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ZeiterfassungsDauerTranslations}" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2" Margin="3,0,3,3"
|
||||
EditValue="{Binding Path=PrototypeVM.DurationInStunden, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
EditValue="{Binding Path=PrototypeVM.DauerEinheit, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" x:Name="MinSTDOhneEnd" Visibility="Collapsed" SelectedIndexChanged="MinSTDOhneEnd_OnSelectedIndexChanged" />
|
||||
|
||||
|
||||
@@ -1230,7 +1230,7 @@
|
||||
<dxe:DateSettings DisplayFormat="ddd, dd.MM.yyyy"></dxe:DateSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="EndTime" AllowEditing="False" Header="Enddatum" Width="90" x:Name="EndDatumHeader">
|
||||
<dxg:GridColumn FieldName="RoundedEndDate" AllowEditing="False" Header="Enddatum" Width="90" x:Name="EndDatumHeader">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateSettings DisplayFormat="ddd, dd.MM.yyyy"></dxe:DateSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
@@ -1240,7 +1240,7 @@
|
||||
<dxe:DateSettings DisplayFormat="HH:mm"></dxe:DateSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="EndMinutes" AllowEditing="False" Header="Bis" Width="45">
|
||||
<dxg:GridColumn FieldName="RoundedEndMinutes" AllowEditing="False" Header="Bis" Width="45">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:DateSettings DisplayFormat="HH:mm"></dxe:DateSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
@@ -1250,7 +1250,7 @@
|
||||
<dxe:TextEditSettings DisplayFormat="0.##"></dxe:TextEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="DurationInStunden" AllowEditing="False" Header="Art (Dauer)" Width="65" x:Name="DutationInSTDHeader">
|
||||
<dxg:GridColumn FieldName="DauerEinheit" AllowEditing="False" Header="Art (Dauer)" Width="65" x:Name="DutationInSTDHeader">
|
||||
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="DistanceGridColumn" FieldName="DistanceInMeter" AllowEditing="False" Header="Gefahrene km" Width="80">
|
||||
@@ -1282,7 +1282,7 @@
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
|
||||
<dxg:GridColumn Header="Unterschrift" FieldName="IsUnterschrift" AllowEditing="False" IsEnabled="False" Visible="False" x:Name="UnterschriftenHeader" Width = "70">
|
||||
<dxg:GridColumn Header="Unterschrift" FieldName="HatUnterschriftImage" AllowEditing="False" IsEnabled="False" Visible="False" x:Name="UnterschriftenHeader" Width = "70">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:ImageEditSettings RenderOptions.BitmapScalingMode="NearestNeighbor" Stretch="None" />
|
||||
</dxg:GridColumn.EditSettings>
|
||||
@@ -1336,7 +1336,7 @@
|
||||
<RowDefinition Height="14" />
|
||||
<RowDefinition Height="24" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{Binding Path=DurationInStunden, StringFormat={}{0} (gerundet): }" /> <!-- vorher stand Minuten (gerundet):-->
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{Binding Path=DauerEinheit, StringFormat={}{0} (gerundet): }" /> <!-- vorher stand Minuten (gerundet):-->
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="Leistungskategorie:" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="Leistung:" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="4" Text="Angelegt für:" />
|
||||
|
||||
@@ -383,7 +383,7 @@ namespace BeWo.View.Detail
|
||||
else
|
||||
{
|
||||
numeric_duration.IsFloatValue = false;
|
||||
numeric_duration.Mask = "########";
|
||||
numeric_duration.Mask = "########0";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -413,19 +413,19 @@ namespace BeWo.View.Detail
|
||||
|
||||
MinSTDOhneEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerLabel.SetValue(Grid.ColumnProperty, 0);
|
||||
numerictb_duration.SetValue(Grid.ColumnProperty, 1);
|
||||
SpinEditDurationOhneEnddatum.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";
|
||||
SpinEditDurationOhneEnddatum.IsFloatValue = true;
|
||||
SpinEditDurationOhneEnddatum.Mask = "########0.00";
|
||||
}
|
||||
else
|
||||
{
|
||||
numerictb_duration.IsFloatValue = false;
|
||||
numerictb_duration.Mask = "########";
|
||||
SpinEditDurationOhneEnddatum.IsFloatValue = false;
|
||||
SpinEditDurationOhneEnddatum.Mask = "########0";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1411,7 +1411,12 @@ namespace BeWo.View.Detail
|
||||
|
||||
if (BeWoApp.AppSettings.SetStartTimeToEndTimeAfterSave)
|
||||
{
|
||||
ViewModel.PrototypeVM.StartTimeEditString = ViewModel.PrototypeVM.EndTimeEditString;
|
||||
if (!String.IsNullOrEmpty(ViewModel.PrototypeVM.EndTimeString))
|
||||
{
|
||||
var oldDuration = ViewModel.PrototypeVM.Duration;
|
||||
ViewModel.PrototypeVM.StartTimeString = ViewModel.PrototypeVM.EndTimeString;
|
||||
ViewModel.PrototypeVM.Duration = oldDuration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1609,8 +1614,8 @@ namespace BeWo.View.Detail
|
||||
{
|
||||
CustomerCount = personCount,
|
||||
EmployeeCount = employeeCount,
|
||||
StartDate = prototypeVM.StartTime,
|
||||
EndDate = prototypeVM.EndTime,
|
||||
StartDate = prototypeVM.StartDate,
|
||||
EndDate = prototypeVM.EndDate,
|
||||
Notice = prototypeVM.Notice
|
||||
};
|
||||
|
||||
@@ -1950,8 +1955,7 @@ namespace BeWo.View.Detail
|
||||
|
||||
private void ViewModel_ServiceRecordListChanged(object sender, EventArgs e)
|
||||
{
|
||||
var list = _ViewModel.ServiceRecordsForSelectedCustomer.OrderByDescending(srVM => srVM.DateAndTime)
|
||||
.ToList();
|
||||
var list = _ViewModel.ServiceRecordsForSelectedCustomer.OrderByDescending(srVM => srVM.StartDate).ToList();
|
||||
|
||||
bool containsMinutenFormat = false;
|
||||
bool containsStundenFormat = false;
|
||||
@@ -1964,7 +1968,7 @@ namespace BeWo.View.Detail
|
||||
a.DeleteAllowed = false;
|
||||
a.Notice = string.Empty;
|
||||
}
|
||||
if (a.DurationInStunden.HasValue && a.DurationInStunden.Value == ZeiterfassungsDauer.Stunden)
|
||||
if (a.DauerEinheit == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
containsStundenFormat = true;
|
||||
}
|
||||
@@ -2496,18 +2500,17 @@ namespace BeWo.View.Detail
|
||||
|
||||
if (BeWoApp.AppSettings.IsEndDateVisible)
|
||||
{
|
||||
row.Add(String.Format("{0:dd.MM.yyyy}", vm.StartTime));
|
||||
row.Add(String.Format("{0:dd.MM.yyyy}", vm.StartDate));
|
||||
row.Add(String.Format("{0:dd.MM.yyyy}", vm.EndDate));
|
||||
}
|
||||
else
|
||||
{
|
||||
row.Add(String.Format("{0:dd.MM.yyyy}", vm.Date));
|
||||
row.Add(String.Format("{0:dd.MM.yyyy}", vm.StartDate));
|
||||
}
|
||||
|
||||
row.Add(String.Format("{0:HH:mm}",
|
||||
vm.StartTime != null && vm.StartTime.Value.Second == 0 ? vm.StartTime : null));
|
||||
row.Add(String.Format("{0:HH:mm}",
|
||||
vm.EndTime != null && vm.EndTime.Value.Second == 0 ? vm.EndTime : null));
|
||||
row.Add(vm.StartDate.Second == 0 ? String.Format("{0:HH:mm}", vm.StartDate) : "");
|
||||
row.Add(vm.EndDate.Second == 0 ? String.Format("{0:HH:mm}", vm.EndDate) : "");
|
||||
|
||||
row.Add(vm.AssistanceDuration.ToString());
|
||||
row.Add(vm.RoundedDuration.ToString());
|
||||
if (BeWoApp.AppSettings.ShowDistanceFields)
|
||||
@@ -3268,9 +3271,9 @@ namespace BeWo.View.Detail
|
||||
|
||||
var sr = ViewModel.ServiceRecordsForSelectedCustomer;
|
||||
|
||||
var earliestStartDate = sr.Any() ? sr.OrderBy(o => o.StartDate).First().StartDate.Value : DateTime.Now;
|
||||
var earliestStartDate = sr.Any() ? sr.OrderBy(o => o.StartDate).First().StartDate : DateTime.Now;
|
||||
var latestEndDate = sr.Any()
|
||||
? sr.OrderByDescending(o => o.EndDate).First().EndDate.Value
|
||||
? sr.OrderByDescending(o => o.EndDate).First().EndDate
|
||||
: DateTime.Now.AddSeconds(1);
|
||||
|
||||
if (latestEndDate.Hour == 0 && latestEndDate.Minute == 0 && latestEndDate.Second == 1)
|
||||
@@ -4432,16 +4435,16 @@ namespace BeWo.View.Detail
|
||||
//{
|
||||
if (MinSTDOhneEnd.Text == ZeiterfassungsDauer.Minuten.ToString())
|
||||
{
|
||||
numerictb_duration.IsFloatValue = false;
|
||||
numerictb_duration.Mask = "########";
|
||||
SpinEditDurationOhneEnddatum.IsFloatValue = false;
|
||||
SpinEditDurationOhneEnddatum.Mask = "########0";
|
||||
|
||||
BeWoApp.AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Minuten;
|
||||
BeWoApp.SaveAppSettings();
|
||||
}
|
||||
else
|
||||
{
|
||||
numerictb_duration.IsFloatValue = true;
|
||||
numerictb_duration.Mask = "########0.00";
|
||||
SpinEditDurationOhneEnddatum.IsFloatValue = true;
|
||||
SpinEditDurationOhneEnddatum.Mask = "########0.00";
|
||||
|
||||
BeWoApp.AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Stunden;
|
||||
BeWoApp.SaveAppSettings();
|
||||
@@ -4454,7 +4457,7 @@ namespace BeWo.View.Detail
|
||||
if (MinSTDMitEnd.Text == ZeiterfassungsDauer.Minuten.ToString())
|
||||
{
|
||||
numeric_duration.IsFloatValue = false;
|
||||
numeric_duration.Mask = "########";
|
||||
numeric_duration.Mask = "########0";
|
||||
|
||||
BeWoApp.AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Minuten;
|
||||
BeWoApp.SaveAppSettings();
|
||||
|
||||
@@ -73,7 +73,9 @@
|
||||
</TextBlock>
|
||||
|
||||
<Border x:Name="BorderRatingView" Grid.Row="4" Grid.ColumnSpan="5" Background="White" BorderBrush="LightGray" BorderThickness="1" Padding="3" Margin="0,5,0,0" Visibility="Collapsed">
|
||||
<detail:SupportConceptGoalRatingView x:Name="SupportConceptRatingView" Grid.Row="4" Grid.ColumnSpan="5"/>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
|
||||
<detail:SupportConceptGoalRatingView x:Name="SupportConceptRatingView"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
public List<ServiceRecordVM> GetServiceRecordsForDate(DateTime date)
|
||||
{
|
||||
if (ServiceRecords != null)
|
||||
return ServiceRecords.Where(i => i.Date.Value.Date.Equals(date)).ToList();
|
||||
return ServiceRecords.Where(i => i.StartDate.Date.Equals(date)).ToList();
|
||||
return new List<ServiceRecordVM>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
if (_PrototypeVM == null)
|
||||
{
|
||||
_PrototypeVM = NewVM;
|
||||
_PrototypeVM.DurationInStunden = BeWoApp.AppSettings.LetzteZeiterfassungsDauer;
|
||||
_PrototypeVM.DauerEinheit = BeWoApp.AppSettings.LetzteZeiterfassungsDauer;
|
||||
_PrototypeVM.PropertyChanged += (s, e) =>
|
||||
{
|
||||
if (e.PropertyName.Equals(ServiceRecordVM.PropertyName_Duration))
|
||||
@@ -498,7 +498,7 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
|
||||
protected override Comparison<ServiceRecordVM> Comparison
|
||||
{
|
||||
get { return (x, y) => y.Date.Value.CompareTo(x.Date.Value); }
|
||||
get { return (x, y) => y.StartDate.CompareTo(x.StartDate); }
|
||||
}
|
||||
|
||||
private DateTime? enddate;
|
||||
@@ -521,42 +521,24 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
ServiceRecordVM lNewRecord = CreateNewVM();
|
||||
|
||||
enddate = lNewRecord.EndTime;
|
||||
enddate = lNewRecord.EndDate;
|
||||
|
||||
lNewRecord.ChoosenNode = iCustomerNode;
|
||||
|
||||
if (_PrototypeVM.Duration == 0)
|
||||
{
|
||||
if (_PrototypeVM.StartDate.HasValue && enddate.HasValue)
|
||||
{
|
||||
var minutes = enddate.Value.Subtract(_PrototypeVM.StartDate.Value).TotalMinutes;
|
||||
//if (_PrototypeVM.Duration == 0)
|
||||
//{
|
||||
// var minutes = enddate.Value.Subtract(_PrototypeVM.StartDate).TotalMinutes;
|
||||
|
||||
_PrototypeVM.Duration = (decimal)minutes;
|
||||
|
||||
}
|
||||
}
|
||||
// _PrototypeVM.Duration = (decimal)minutes;
|
||||
//}
|
||||
|
||||
lNewRecord.Duration = _PrototypeVM.Duration / _CustomerNodes.Count;
|
||||
//lNewRecord.Duration = _PrototypeVM.Duration / _CustomerNodes.Count;
|
||||
|
||||
if(lNewRecord.Duration.HasValue)
|
||||
{
|
||||
lNewRecord.RoundedDuration = lNewRecord.Duration.Value;
|
||||
}
|
||||
|
||||
if(iCustomerNode.SupportConceptTreeNodeDC != null && lNewRecord.ServiceDescription != null && lNewRecord.ServiceDescription.Category != null && lNewRecord.ServiceDescription.Category.IsBillable && iCustomerNode.SupportConceptTreeNodeDC.CostBearer != null)
|
||||
{
|
||||
var minuteInterval = iCustomerNode.SupportConceptTreeNodeDC.CostBearer.ActualMinuteIntervall;
|
||||
//if(lNewRecord.Duration.HasValue)
|
||||
//{
|
||||
// lNewRecord.RoundedDuration = lNewRecord.Duration.Value;
|
||||
//}
|
||||
|
||||
if (minuteInterval > 0)
|
||||
{
|
||||
//Calculations calc = Calculations.GetInstance(iCustomerNode.SupportConceptTreeNodeDC.CostBearer.CostBearerID);
|
||||
//decimal lRoudedDuration = calc.GetRoundedDuration(minuteInterval, _PrototypeVM.Duration ?? 0);
|
||||
|
||||
//lNewRecord.RoundedDuration = lRoudedDuration/_CustomerNodes.Count;
|
||||
}
|
||||
}
|
||||
|
||||
lNewRecord.EndTime = enddate;
|
||||
|
||||
lResult.Add(lNewRecord);
|
||||
}
|
||||
@@ -1426,7 +1408,7 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
List<AbsenceTimeDC> atList =
|
||||
GetAbsencesTimeForDate(
|
||||
iCustomerNode.SupportConceptTreeNodeDC.SupportConceptCostBearerRelDC,
|
||||
PrototypeVM.StartDate.Value);
|
||||
PrototypeVM.StartDate);
|
||||
if (atList != null && atList.Count > 0)
|
||||
{
|
||||
IsCustomerWarningActive = true;
|
||||
@@ -1456,7 +1438,7 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
IEnumerable<DateTimeSpan> lAbsenceWeeks = atCurrent.AbsenceSpan.GetWholeWeeks();
|
||||
foreach (DateTimeSpan lAbsenceWeek in lAbsenceWeeks)
|
||||
{
|
||||
if (PrototypeVM.StartDate.Value.InBetween(lAbsenceWeek, true))
|
||||
if (PrototypeVM.StartDate.InBetween(lAbsenceWeek, true))
|
||||
{
|
||||
week = lAbsenceWeek;
|
||||
}
|
||||
@@ -1479,9 +1461,9 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
sr.Customer.Equals(iCustomerNode.SupportConceptTreeNodeDC.Customer) &&
|
||||
sr.ServiceDescription != null &&
|
||||
sr.ServiceDescription.Category.IsBillable &&
|
||||
sr.Date.Value.InBetween(week, true) &&
|
||||
sr.StartDate.Value.Date != start &&
|
||||
sr.StartDate.Value.Date != end)
|
||||
sr.StartDate.InBetween(week, true) &&
|
||||
sr.StartDate.Date != start &&
|
||||
sr.StartDate.Date != end)
|
||||
.Sum(sr => sr.RoundedDuration);
|
||||
|
||||
//decimal lNewFLMInAbsenceWeek = CalculateDurationSum(iCustomerNode);
|
||||
@@ -1524,17 +1506,11 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
ServiceRecordVM lNewRecord = _PrototypeVM.Clone();
|
||||
|
||||
//if (lNewRecord.EndTime == null || (lNewRecord.StartDate.Value.Date == lNewRecord.EndTime.Value.Date))
|
||||
//{
|
||||
//lNewRecord.Date = _PrototypeVM.Dat.Value.GetInSameCalendarWeek(pDay);
|
||||
//lNewRecord.Duration = _PrototypeVM.Duration;
|
||||
//}
|
||||
|
||||
lNewRecord.Date = _PrototypeVM.Date;
|
||||
lNewRecord.Duration = _PrototypeVM.Duration;
|
||||
//lNewRecord.Date = _PrototypeVM.Date;
|
||||
//lNewRecord.Duration = _PrototypeVM.Duration;
|
||||
|
||||
if (_PrototypeVM.Duration.HasValue)
|
||||
lNewRecord.RoundedDuration = _PrototypeVM.Duration.Value;
|
||||
//if (_PrototypeVM.Duration.HasValue)
|
||||
//lNewRecord.RoundedDuration = _PrototypeVM.Duration.Value;
|
||||
|
||||
lNewRecord.SetInsertedOn(DateTime.Now);
|
||||
lNewRecord.InsUser = BeWoApp.LoggedOnUser.Employee.FirstName + " " + BeWoApp.LoggedOnUser.Employee.LastName;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1072,18 +1072,21 @@ namespace BeWo.Data.Access
|
||||
{
|
||||
var criteria = CreateCriteriaIsActive<AbsenceTime>()
|
||||
.Add(
|
||||
Restrictions.Or(
|
||||
CreateBetweenDateTimesCriterion(startDate, endDate, nameof(AbsenceTime.Start), nameof(AbsenceTime.End)),
|
||||
Restrictions.And(
|
||||
Restrictions.And(
|
||||
Restrictions.Ge(AbsenceTime.PropertyName_Start, startDate),
|
||||
Restrictions.Le(AbsenceTime.PropertyName_Start, endDate)),
|
||||
Restrictions.IsNull(AbsenceTime.PropertyName_End)
|
||||
)
|
||||
Restrictions.Or(
|
||||
Restrictions.And(
|
||||
Restrictions.Ge(AbsenceTime.PropertyName_End, startDate),
|
||||
Restrictions.Lt(AbsenceTime.PropertyName_Start, endDate.Date.AddDays(1))
|
||||
),
|
||||
Restrictions.And(
|
||||
Restrictions.Lt(AbsenceTime.PropertyName_Start, endDate.Date.AddDays(1)),
|
||||
Restrictions.IsNull(AbsenceTime.PropertyName_End)
|
||||
)
|
||||
);
|
||||
)
|
||||
);
|
||||
|
||||
return criteria.List<AbsenceTime>().ToList();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public IEnumerable<Vertretung> FindVertretungen(DateTime startDate, DateTime endDate)
|
||||
|
||||
@@ -448,7 +448,7 @@ namespace BeWo.Report.ReportObjects
|
||||
{
|
||||
var employeeDetail = new EmployeeDetail
|
||||
{
|
||||
Teams = team == null ? DAOFactory.SearchDAO.FindTeamsOfEmployee(employee.Oid.Value) : new List<Team>(),
|
||||
Teams = team == null ? DAOFactory.SearchDAO.FindTeamsOfEmployee(employee.Oid.Value) : new List<Team> { team },
|
||||
Employee = employee,
|
||||
LastName = employee.Person.LastName,
|
||||
FirstName = employee.Person.FirstName,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BeWo.Data.Access;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
|
||||
using BS.Shared.DataContracts;
|
||||
@@ -7,6 +8,69 @@ namespace BeWo.Service.DCEntityMapper
|
||||
{
|
||||
public class TextModuleDC_TextModule : AbstractIDCEntityMapper<TextModule, TextModuleDC>
|
||||
{
|
||||
public IList<TextModuleDC> CreateDcList(IEnumerable<TextModule> textmodules)
|
||||
{
|
||||
var list = new List<TextModuleDC>();
|
||||
Dictionary<long, IList<long>> parentChildDict = new Dictionary<long, IList<long>>();
|
||||
foreach (var tm in textmodules)
|
||||
{
|
||||
var dc = CreateTextModuleDC(tm, parentChildDict);
|
||||
|
||||
list.Add(dc);
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
}
|
||||
|
||||
private TextModuleDC CreateTextModuleDC(TextModule tm, Dictionary<long, IList<long>> parentChildDict)
|
||||
{
|
||||
var dc = new TextModuleDC();
|
||||
dc.Position = tm.Position;
|
||||
dc.TextModuleVersion = tm.Version.Value;
|
||||
dc.TextModuleOid = tm.Oid.Value;
|
||||
dc.Text = tm.Text;
|
||||
dc.Name = tm.Name;
|
||||
dc.IsOnlyForEmployee = tm.IsOnlyForEmployee;
|
||||
dc.IsParent = tm.IsParent;
|
||||
dc.IsExpanded = tm.IsExpanded;
|
||||
dc.ActivationType = tm.IsActive;
|
||||
|
||||
dc.ServiceCategory = tm.ServiceCategory != null ? MapperFactory.ServiceCategoryDC_ServiceCategory.MapToNewDC(tm.ServiceCategory) : null;
|
||||
|
||||
dc.Employee = tm.Employee != null ? MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(tm.Employee) : null;
|
||||
|
||||
|
||||
|
||||
if (tm.Parent != null)
|
||||
{
|
||||
//Vermeide Endlosschleifen. Es gab mal den Fall, da hat es ein Kunde geschafft, dass der Parent eines Textbausteins gleichzeitig ein Kind desselben Bausteins war.
|
||||
if (!parentChildDict.ContainsKey(tm.Parent.Oid.Value))
|
||||
{
|
||||
parentChildDict.Add(tm.Parent.Oid.Value, new List<long>());
|
||||
}
|
||||
parentChildDict[tm.Parent.Oid.Value].Add(tm.Oid.Value);
|
||||
|
||||
bool addParent = true;
|
||||
if (parentChildDict.ContainsKey(tm.Oid.Value))
|
||||
{
|
||||
var childOids = parentChildDict[tm.Oid.Value];
|
||||
|
||||
if (childOids.Contains(tm.Parent.Oid.Value))
|
||||
{
|
||||
addParent = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (addParent)
|
||||
{
|
||||
dc.Parent = CreateTextModuleDC(tm.Parent, parentChildDict);
|
||||
}
|
||||
}
|
||||
|
||||
return dc;
|
||||
}
|
||||
|
||||
public override TextModuleDC MergeWithDC(TextModule pEntity, TextModuleDC pDataContract)
|
||||
{
|
||||
pDataContract.Position = pEntity.Position;
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace BeWo.Service.Plugins
|
||||
// Erstellt CustomerDic
|
||||
if (filter.AlleKlientenAnzeigen.HasValue && filter.AlleKlientenAnzeigen.Value)
|
||||
{
|
||||
var alleCos = DAOFactory.GenericDAO.GetAllActiveAndArchived<Customer>();
|
||||
var alleCos = DAOFactory.GenericDAO.GetAllActive<Customer>();
|
||||
|
||||
if (alleCos.Count > 0)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ namespace BeWo.Service.Plugins
|
||||
// Erstellt EmployeeDic
|
||||
if (filter.AlleMitarbeiterAnzeigen.HasValue && filter.AlleMitarbeiterAnzeigen.Value)
|
||||
{
|
||||
var alleEmps = DAOFactory.GenericDAO.GetAllActiveAndArchived<Employee>();
|
||||
var alleEmps = DAOFactory.GenericDAO.GetAllActive<Employee>();
|
||||
|
||||
if (alleEmps.Count > 0)
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "4867997795"; // ADiK Kleve
|
||||
//t = "3184859776"; // Sergej Becker
|
||||
//t = "7752610643"; // BWK Gbr
|
||||
t = "3785623125"; // Betreuwo
|
||||
//t = "3785623125"; // Betreuwo
|
||||
//t = "7130228334"; // LH Borken
|
||||
//t = "4209820830"; // VKM Hamm
|
||||
//t = "5700328131"; // Betreutes Wohnen St. Ludgerus Essen-Werden
|
||||
@@ -142,7 +142,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "8828216586"; // Caritas Aachen
|
||||
//t = "7062943632"; // ABW Elsebrock
|
||||
//t = "3956369664"; // LH Wetterau
|
||||
//t = "3984525482"; // API Berlin
|
||||
t = "3984525482"; // API Berlin
|
||||
//t = "9975231461"; // Selwo
|
||||
//t = "8181286349"; // BeWo am Rhein
|
||||
//t = "4595275645"; // Eigenständig
|
||||
@@ -215,7 +215,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "4069072369"; // BeWo Dreilich&Pastor (Pastor)
|
||||
//t = "4160851689"; // BeWo Dreilich&Pastor (Dreilich)
|
||||
//t = "9970072066"; // Bussmannshof
|
||||
//t = "2993745954"; // Kollegium für freie Jugendarbeit und Berufsbildung e.V.
|
||||
t = "2993745954"; // Kollegium für freie Jugendarbeit und Berufsbildung e.V.
|
||||
//t = "5495240031"; // Christian Luft
|
||||
//t = "6922762575"; // BHS Solingen
|
||||
//t = "3472573348"; // ASB Mönchengladbach
|
||||
|
||||
@@ -231,6 +231,8 @@ namespace BeWo.Service.Plugins
|
||||
{
|
||||
noTime = true;
|
||||
}
|
||||
|
||||
newServiceRecord.RoundedDuration = duration;
|
||||
decimal roundedDuration = duration;
|
||||
|
||||
var srdc = PluginLoader.FindClass<ServiceRecordDurationCalculator>();
|
||||
@@ -684,7 +686,10 @@ namespace BeWo.Service.Plugins
|
||||
}
|
||||
|
||||
decimal totalFLSNew = (flmTotalRounded + newServiceRecord.RoundedDuration) / 60;
|
||||
if (flmApprovedForPeriod > 0 && totalFLSNew > (flmApprovedForPeriod / 60))
|
||||
decimal approvedFlsForPeriod = (flmApprovedForPeriod / 60);
|
||||
approvedFlsForPeriod = Math.Round(approvedFlsForPeriod, 2, MidpointRounding.AwayFromZero);
|
||||
|
||||
if (approvedFlsForPeriod > 0 && totalFLSNew > approvedFlsForPeriod)
|
||||
|
||||
{
|
||||
if (newServiceRecord.ServiceDescription.Category.IsBillable ||
|
||||
|
||||
@@ -996,7 +996,13 @@ namespace BeWo.Service.ServiceImplementations
|
||||
IEnumerable<ServiceRecordHistory> historyList = DAOFactory.SearchDAO.FindServiceRecordHistory(serviceRecordOid);
|
||||
|
||||
List<ServiceRecordHistoryDC> result = MapperFactory.ServiceRecordHistoryDC_ServiceRecordHistory.MapToNewDCs(historyList);
|
||||
|
||||
foreach (var srh in result)
|
||||
{
|
||||
if (srh.DurationInStunden.HasValue && srh.DurationInStunden.Value == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
srh.RoundedDuration = srh.RoundedDuration / 60;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -1386,7 +1392,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
foreach (var at in pAccountingTransactions)
|
||||
{
|
||||
if (at.SupportConceptCostBearerRelDC.CostBearer2SupportConceptOid.HasValue && !at.SupportConceptCostBearerRelDC.CostBearer2SupportConceptVersion.HasValue)
|
||||
if (at.SupportConceptCostBearerRelDC != null && at.SupportConceptCostBearerRelDC.CostBearer2SupportConceptOid.HasValue && !at.SupportConceptCostBearerRelDC.CostBearer2SupportConceptVersion.HasValue)
|
||||
{
|
||||
var c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(at.SupportConceptCostBearerRelDC.CostBearer2SupportConceptOid.Value);
|
||||
var c2sDc = MapperFactory.SupportConceptCostBearerRelDC_CostBearer2SupportConcept.MapToNewDC(c2s);
|
||||
@@ -3131,7 +3137,11 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
try
|
||||
{
|
||||
var list = MapperFactory.TextModuleDC_TextModule.MapToNewDCs(DAOFactory.SearchDAO.GetActiveTextModules(pShouldShowAllTextModules, pHasRightToSeeAllTextModules, pIsInAdministrationView, pEmployeeOid));
|
||||
var textmodules = DAOFactory.SearchDAO.GetActiveTextModules(pShouldShowAllTextModules, pHasRightToSeeAllTextModules, pIsInAdministrationView, pEmployeeOid);
|
||||
|
||||
var list = MapperFactory.TextModuleDC_TextModule.CreateDcList(textmodules);
|
||||
//var list = MapperFactory.TextModuleDC_TextModule.MapToNewDCs(textmodules);
|
||||
|
||||
return list.OrderBy(t => t.Name).ToList();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -857,6 +857,23 @@ namespace BS.Shared.Services
|
||||
hourlyRate = crp;
|
||||
else if (ai.Value == AccountingIntervalType.FlatRate)
|
||||
flatRate = crp;
|
||||
else if (ai.Value == AccountingIntervalType.Daily)
|
||||
{
|
||||
double days = 0;
|
||||
|
||||
if (data.BillingPeriodStart.HasValue && data.BillingPeriodEnd.HasValue)
|
||||
{
|
||||
days = data.BillingPeriodEnd.Value.Subtract(data.BillingPeriodStart.Value).Days + 1;
|
||||
}
|
||||
data.UnitCount = (decimal)days;
|
||||
data.AmountPerUnit = crp.CostRateValue ?? 0;
|
||||
data.AmountTotal = data.UnitCount * data.AmountPerUnit;
|
||||
data.AccountingInterval = AccountingIntervalType.Daily;
|
||||
data.GrossAmountTotal = data.AmountTotal;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user