dies und das
This commit is contained in:
@@ -121,7 +121,7 @@
|
||||
<Label Content="Aktenzeichen" Grid.Row="1" Grid.Column="0" />
|
||||
<TextBox Margin="3" Height="23" Grid.Row="1" Grid.Column="1" Text="{Binding CustomerReferenceNumber}" />
|
||||
|
||||
<Label Content="Strasse" Grid.Row="1" Grid.Column="2" />
|
||||
<Label Content="Straße" Grid.Row="1" Grid.Column="2" />
|
||||
<TextBox Margin="3" Grid.Row="1" Grid.Column="3" Text="{val:ValidationBinding Path=RecipientStreet}" Height="23" />
|
||||
|
||||
<Label Content="Postleitzahl" Grid.Row="2" Grid.Column="0" />
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<Label Content="Aktenzeichen" Grid.Row="2" Grid.Column="0" />
|
||||
<TextBox Margin="3" Height="23" Grid.Row="2" Grid.Column="1" Text="{Binding CustomerReferenceNumber}" />
|
||||
|
||||
<Label Content="Strasse" Grid.Row="2" Grid.Column="2" />
|
||||
<Label Content="Straße" Grid.Row="2" Grid.Column="2" />
|
||||
<TextBox Margin="3" Grid.Row="2" Grid.Column="3" Text="{val:ValidationBinding Path=RecipientStreet}" Height="23" />
|
||||
|
||||
<Label Content="Postleitzahl" Grid.Row="3" Grid.Column="0" />
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<Label Content="Aktenzeichen" Grid.Row="2" Grid.Column="0" />
|
||||
<TextBox Margin="3" Height="23" Grid.Row="2" Grid.Column="1"
|
||||
Text="{Binding InvoiceBase.CustomerReferenceNumber}" />
|
||||
<Label Content="Strasse" Grid.Row="2" Grid.Column="2" />
|
||||
<Label Content="Straße" Grid.Row="2" Grid.Column="2" />
|
||||
<TextBox Margin="3" Grid.Row="2" Grid.Column="3"
|
||||
Text="{val:ValidationBinding Path=InvoiceBase.RecipientStreet}" Height="23" />
|
||||
<Label Content="Postleitzahl" Grid.Row="3" Grid.Column="0" />
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<TextBox Margin="3" Grid.Row="2" Grid.Column="1"
|
||||
Text="{Binding RecipientDivision}"
|
||||
Height="23" />
|
||||
<Label Content="Strasse" Grid.Row="0" Grid.Column="2" />
|
||||
<Label Content="Straße" Grid.Row="0" Grid.Column="2" />
|
||||
<TextBox Margin="3" Grid.Row="0" Grid.Column="3"
|
||||
Text="{val:ValidationBinding Path=RecipientStreet}" Height="23" />
|
||||
<Label Content="Postleitzahl" Grid.Row="1" Grid.Column="2" />
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<TextBox Margin="3" Grid.Row="2" Grid.Column="1"
|
||||
Text="{Binding RecipientDivision}"
|
||||
Height="23" />
|
||||
<Label Content="Strasse" Grid.Row="0" Grid.Column="2" />
|
||||
<Label Content="Straße" Grid.Row="0" Grid.Column="2" />
|
||||
<TextBox Margin="3" Grid.Row="0" Grid.Column="3"
|
||||
Text="{val:ValidationBinding Path=RecipientStreet}" Height="23" />
|
||||
<Label Content="Postleitzahl" Grid.Row="1" Grid.Column="2" />
|
||||
|
||||
@@ -562,7 +562,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" Content="Adresszusatz" />
|
||||
<Label Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" Content="Strasse" />
|
||||
<Label Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" Content="Straße" />
|
||||
<Label Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" Content="Postleitzahl" />
|
||||
<Label Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" Content="Ort" />
|
||||
<Label x:Name="lblDistance" Grid.Column="0" Grid.Row="4" VerticalAlignment="Center" Content="Entfernung in km" />
|
||||
@@ -594,7 +594,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" Content="Name" />
|
||||
<Label Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" Content="Strasse" />
|
||||
<Label Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" Content="Straße" />
|
||||
<Label Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" Content="Postleitzahl" />
|
||||
<Label Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" Content="Ort" />
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" Content="Strasse" />
|
||||
<Label Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" Content="Straße" />
|
||||
<Label Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" Content="Postleitzahl" />
|
||||
<Label Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" Content="Ort" />
|
||||
|
||||
|
||||
@@ -421,7 +421,8 @@ namespace BeWo.View.Detail
|
||||
|
||||
public bool ShouldLog
|
||||
{
|
||||
get { return BeWoApp.Tenant == "1549622397" && BeWoApp.UserName.ToLower() == "h.krause"; }
|
||||
get { return false; }
|
||||
//BeWoApp.Tenant == "1549622397" && BeWoApp.UserName.ToLower() == "h.krause"; }
|
||||
//get { return BeWoApp.Tenant == "demo" && BeWoApp.UserName == "demo"; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Strasse</Label>
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Straße</Label>
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center">Postleitzahl</Label>
|
||||
<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Ort</Label>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<ColumnDefinition Width="150" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Strasse</Label>
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Straße</Label>
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center">Postleitzahl</Label>
|
||||
<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Ort</Label>
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="label" />
|
||||
<ColumnDefinition Width="*" MaxWidth="200" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Strasse</Label>
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Straße</Label>
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center">Postleitzahl</Label>
|
||||
<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Ort</Label>
|
||||
<Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center">Postfach</Label>
|
||||
@@ -153,7 +153,7 @@
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="label" />
|
||||
<ColumnDefinition Width="*" MaxWidth="200" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Strasse</Label>
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Straße</Label>
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center">Postleitzahl</Label>
|
||||
<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Ort</Label>
|
||||
<Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center">Postfach</Label>
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center" Content="Adresszusatz" />
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center" Content="Strasse" />
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center" Content="Straße" />
|
||||
<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center" Content="Postleitzahl" />
|
||||
<Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center" Content="Ort" />
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center" Content="Strasse" />
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center" Content="Straße" />
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center" Content="Postleitzahl" />
|
||||
<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center" Content="Ort" />
|
||||
|
||||
|
||||
@@ -130,6 +130,33 @@ namespace BeWo.View.Detail.Report
|
||||
}));
|
||||
|
||||
combobox.Width = 250;
|
||||
combobox.Height = 23;
|
||||
return combobox;
|
||||
}
|
||||
|
||||
private ComboBox CreateServiceCategoryCombo()
|
||||
{
|
||||
var combobox = new ComboBox();
|
||||
|
||||
Cache.GetInstance().GetServiceCategoryDescriptionDict(
|
||||
cb => this.Dispatch(
|
||||
delegate
|
||||
{
|
||||
var items = new List<ServiceCategoryDC>();
|
||||
var dummy = new ServiceCategoryDC
|
||||
{
|
||||
ServiceCategoryOid = 0,
|
||||
Name = ""
|
||||
};
|
||||
items.Add(dummy);
|
||||
items.AddRange(cb.Keys);
|
||||
|
||||
combobox.ItemsSource = items;
|
||||
combobox.SelectedItem = items[0];
|
||||
}));
|
||||
|
||||
combobox.Width = 250;
|
||||
combobox.Height = 23;
|
||||
return combobox;
|
||||
}
|
||||
|
||||
@@ -377,6 +404,14 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
parameterUIElements.Add(item.Name + "_" + item.ParamType + "_1", vleCombo);
|
||||
}
|
||||
break;
|
||||
case QueryParameterType.ServiceCategory:
|
||||
ComboBox catCombo = CreateServiceCategoryCombo();
|
||||
catCombo.Margin = new Thickness(3);
|
||||
sp.Children.Add(catCombo);
|
||||
|
||||
parameterUIElements.Add(item.Name + "_" + item.ParamType + "_1", catCombo);
|
||||
|
||||
break;
|
||||
}
|
||||
if (addPanel)
|
||||
@@ -522,6 +557,15 @@ namespace BeWo.View.Detail.Report
|
||||
param.Value = vle.ValueListEntryOid.Value;
|
||||
}
|
||||
|
||||
break;
|
||||
case QueryParameterType.ServiceCategory:
|
||||
if (parameterUIElements.ContainsKey(item.Name + "_" + item.ParamType + "_1"))
|
||||
{
|
||||
var combo = parameterUIElements[item.Name + "_" + item.ParamType + "_1"] as ComboBox;
|
||||
var cat = combo.SelectedItem as ServiceCategoryDC;
|
||||
if (cat != null)
|
||||
param.Value = cat.ServiceCategoryOid.Value;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<Label Content="Abteilung" Grid.Row="2" />
|
||||
<TextBox Margin="3" Grid.Row="2" Grid.Column="1" Text="{Binding UpdateSourceTrigger=PropertyChanged , Path=RecipientDivision, Mode=Default}" Height="23" />
|
||||
|
||||
<Label Content="Strasse" Grid.Row="0" Grid.Column="2" />
|
||||
<Label Content="Straße" Grid.Row="0" Grid.Column="2" />
|
||||
<TextBox Margin="3" Grid.Row="0" Grid.Column="3" Text="{val:ValidationBinding UpdateSourceTrigger=PropertyChanged , Path=RecipientStreet, Mode=Default}" Height="23" />
|
||||
|
||||
<Label Content="Postleitzahl" Grid.Row="1" Grid.Column="2" />
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="30" />
|
||||
<ColumnDefinition Width="150" />
|
||||
<ColumnDefinition Width="80" />
|
||||
@@ -43,7 +43,10 @@
|
||||
Max. Anteil in % (100 für unbeschränkt)
|
||||
</Label>
|
||||
<dxe:SpinEdit IsFloatValue="True" MinValue="0" MaxValue="100" Increment="10" Grid.Column="4" Grid.Row="1" Margin="3" Height="23" EditValue="{Binding Path=NewVM.Percentage, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
|
||||
<Label Content="Position" Grid.Column="3" Grid.Row="2" HorizontalAlignment="Left" Margin="-2,0,0,0"/>
|
||||
<dxe:SpinEdit MinValue="0" Margin="3" IsFloatValue="False" Grid.Column="4" Grid.Row="2" Height="23" EditValue="{Binding Path=NewVM.Position, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1">Abrechenbar</Label>
|
||||
<CheckBox Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" Margin="3,1,3,3" IsChecked="{Binding Path=NewVM.IsBillable, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
@@ -74,8 +77,7 @@
|
||||
ValueLabelText="Betrag (€)"
|
||||
ButtonTooltipText="Neuen Betrag hinzufügen" />
|
||||
|
||||
<Label Content="Position" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="-2,0,0,0"/>
|
||||
<dxe:SpinEdit MinValue="0" Margin="3" IsFloatValue="False" Grid.Column="1" Grid.Row="1" Height="23" EditValue="{Binding Path=NewVM.Position, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
|
||||
|
||||
<Label Grid.Column="0"
|
||||
@@ -95,7 +97,7 @@
|
||||
</Border>
|
||||
<Button Name="button_addCategory" Click="button_addCategory_Click" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Height="25" Margin="3,3,3,3" IsDefault="True" Padding="5,0,5,1" HorizontalAlignment="Right">Hinzufügen</Button>
|
||||
|
||||
<dxg:GridControl x:Name="datagrid_categories" Margin="0,10,0,0" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" DataSource="{Binding VMList}">
|
||||
<dxg:GridControl x:Name="datagrid_categories" Margin="0,10,0,0" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3" DataSource="{Binding VMList}">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="IsDeleteable" Header="" FixedWidth="True" Width="24" ReadOnly="True">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
|
||||
@@ -131,30 +131,32 @@ namespace BeWo.View.Detail
|
||||
|
||||
List<ServiceDescriptionVM> liste = new List<ServiceDescriptionVM>();
|
||||
|
||||
|
||||
string auswahl = combobox_categories.SelectedItem.ToString();
|
||||
|
||||
if (ViewModel.VMList.Count > 0)
|
||||
if (combobox_categories.SelectedItem != null)
|
||||
{
|
||||
foreach (var x in ViewModel.VMList)
|
||||
string auswahl = combobox_categories.SelectedItem.ToString();
|
||||
|
||||
if (ViewModel.VMList.Count > 0)
|
||||
{
|
||||
if (auswahl.Equals(x.CategoryName))
|
||||
foreach (var x in ViewModel.VMList)
|
||||
{
|
||||
liste.Add(x);
|
||||
if (auswahl.Equals(x.CategoryName))
|
||||
{
|
||||
liste.Add(x);
|
||||
}
|
||||
}
|
||||
|
||||
if (liste.Count > 0)
|
||||
{
|
||||
var abx = liste.Max(s => s.Position) + 1;
|
||||
|
||||
ViewModel.NewVM.Position = abx;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewModel.NewVM.Position = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if(liste.Count > 0){
|
||||
var abx = liste.Max(s => s.Position)+1;
|
||||
|
||||
ViewModel.NewVM.Position = abx;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewModel.NewVM.Position = ViewModel.NewVM.Position + 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="0" Margin="3,0,3,3" x:Name="OnlyJahrData"
|
||||
EditValue="{Binding Path=OnlyYear, UpdateSourceTrigger=PropertyChanged}"
|
||||
ItemsSource="{Binding Path=JahreBinden}"
|
||||
ItemsSource="{Binding Path=JahreBinden}" Height="23"
|
||||
IsTextEditable="False" />
|
||||
|
||||
|
||||
@@ -251,11 +251,11 @@
|
||||
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="1" Margin="3,0,3,3" x:Name="OnlyMonatData"
|
||||
EditValue="{Binding Path=OnlyMonth, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsTextEditable="False"
|
||||
IsTextEditable="False" Height="23"
|
||||
ItemsSource="{Binding Path=MonateBinden}"
|
||||
/>
|
||||
|
||||
<Label Content="Stunden ges." Grid.Column="0" Grid.Row="2"/>
|
||||
<Label Content="Stunden" Grid.Column="0" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="True" AllowNullInput="False" x:Name="numeric_duration3" Mask="########0.##" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=DurationMonthYearGes, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" Grid.Row="2"
|
||||
|
||||
@@ -343,35 +343,35 @@ namespace BeWo.View.Detail
|
||||
{
|
||||
//var valid = ServiceFacade.DoOperationsServiceSync(s => s.CheckExistingSettlementInvoices(_OriginalVM.CommitToDataContract()));
|
||||
|
||||
//if (valid.Contains(ServiceRecordValidationResult.SettlementInvoiceAlreadyExisting))
|
||||
//{
|
||||
// MessageBox.Show("Es existiert bereits eine Spitzabrechnung. Um die Änderungen zu berücksichtigen muss gegebenenfalls eine neue Spitzabrechnung erstellt werden.",
|
||||
// "Speichern", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
// //return;
|
||||
//}
|
||||
//if (valid.Contains(ServiceRecordValidationResult.SettlementInvoiceAlreadyExisting))
|
||||
//{
|
||||
// MessageBox.Show("Es existiert bereits eine Spitzabrechnung. Um die Änderungen zu berücksichtigen muss gegebenenfalls eine neue Spitzabrechnung erstellt werden.",
|
||||
// "Speichern", MessageBoxButton.OK, MessageBoxImage.Warning);
|
||||
// //return;
|
||||
//}
|
||||
|
||||
//ViewModel.SelectedVMForEditing.CopyTo(_OriginalVM);
|
||||
|
||||
|
||||
|
||||
//if (!_HideCustomers)
|
||||
// _ServiceRecordVM.ChoosenNode = _SelectedNode;
|
||||
// _ServiceRecordVM.ChoosenNode = _SelectedNode;
|
||||
|
||||
if (!_HideCustomers && _ServiceRecordVM.ServiceDescription.Category != null && _ServiceRecordVM.ServiceDescription.Category.IsBillable && _ServiceRecordVM.ChoosenNode.SupportConceptTreeNodeDC.CostBearer != null)
|
||||
{
|
||||
//if (!_HideCustomers && _ServiceRecordVM.ServiceDescription.Category != null && _ServiceRecordVM.ServiceDescription.Category.IsBillable && _ServiceRecordVM.ChoosenNode.SupportConceptTreeNodeDC.CostBearer != null)
|
||||
// {
|
||||
|
||||
Calculations calc = Calculations.GetInstance(_ServiceRecordVM.ChoosenNode.SupportConceptTreeNodeDC.CostBearer.CostBearerID);
|
||||
var roundedDuration = calc.GetRoundedDuration(
|
||||
_ServiceRecordVM.ChoosenNode.SupportConceptTreeNodeDC.CostBearer.ActualMinuteIntervall,
|
||||
_ServiceRecordVM.Duration.Value);
|
||||
// Calculations calc = Calculations.GetInstance(_ServiceRecordVM.ChoosenNode.SupportConceptTreeNodeDC.CostBearer.CostBearerID);
|
||||
// var roundedDuration = calc.GetRoundedDuration(
|
||||
// _ServiceRecordVM.ChoosenNode.SupportConceptTreeNodeDC.CostBearer.ActualMinuteIntervall,
|
||||
// _ServiceRecordVM.Duration.Value);
|
||||
|
||||
_ServiceRecordVM.RoundedDuration = roundedDuration;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
_ServiceRecordVM.RoundedDuration = _ServiceRecordVM.Duration.Value;
|
||||
}
|
||||
// _ServiceRecordVM.RoundedDuration = roundedDuration;
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// _ServiceRecordVM.RoundedDuration = _ServiceRecordVM.Duration.Value;
|
||||
// }
|
||||
_ServiceRecordVM.RoundedDuration = _ServiceRecordVM.Duration.Value;
|
||||
if (_SelectedEmployee != null)
|
||||
_ServiceRecordVM.Employee = _SelectedEmployee;
|
||||
|
||||
@@ -404,9 +404,17 @@ namespace BeWo.View.Detail
|
||||
|
||||
private void ServiceRecordEditView_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_ServiceRecordVM.Category = _OldCategory;
|
||||
_ServiceRecordVM.ServiceDescription = _OldServiceDescription;
|
||||
_ServiceRecordVM.SetDirty(false);
|
||||
if (_OldCategory != null && _OldCategory.ActivationType == ActivationTypeId.Deleted)
|
||||
{
|
||||
_ServiceRecordVM.SetDirty(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_ServiceRecordVM.Category = _OldCategory;
|
||||
_ServiceRecordVM.ServiceDescription = _OldServiceDescription;
|
||||
_ServiceRecordVM.SetDirty(false);
|
||||
}
|
||||
|
||||
if (ActualHeight > 0)
|
||||
{
|
||||
ComboBoxTreeViewControl.ParentWindowHeight = ActualHeight;
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="0" Margin="3,0,3,3" x:Name="OnlyJahrData"
|
||||
EditValue="{Binding Path=OnlyYear, UpdateSourceTrigger=PropertyChanged}"
|
||||
ItemsSource="{Binding Path=JahreBinden}"
|
||||
ItemsSource="{Binding Path=JahreBinden}" Height="23"
|
||||
IsTextEditable="False" />
|
||||
|
||||
|
||||
@@ -248,11 +248,11 @@
|
||||
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="1" Margin="3,0,3,3" x:Name="OnlyMonatData"
|
||||
EditValue="{Binding Path=OnlyMonth, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsTextEditable="False"
|
||||
IsTextEditable="False" Height="23"
|
||||
ItemsSource="{Binding Path=MonateBinden}" />
|
||||
|
||||
|
||||
<Label Content="Stunden ges." Grid.Column="0" Grid.Row="2"/>
|
||||
<Label Content="Stunden" Grid.Column="0" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="True" AllowNullInput="False" x:Name="numeric_duration3" Mask="########0.##" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=DurationMonthYearGes, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" Grid.Row="2"
|
||||
|
||||
@@ -326,23 +326,23 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
else
|
||||
{
|
||||
if (personCount > 2 && (BeWoApp.Tenant == "9893557471") || (BeWoApp.Tenant == "2918696314"))
|
||||
//Caritas Frankfurt
|
||||
{
|
||||
decimal groupRoundedDuration = lRoundedDuration;
|
||||
//if (personCount > 2 && (BeWoApp.Tenant == "9893557471") || (BeWoApp.Tenant == "2918696314"))
|
||||
// //Caritas Frankfurt
|
||||
//{
|
||||
// decimal groupRoundedDuration = lRoundedDuration;
|
||||
|
||||
roundedDuration = ((groupRoundedDuration*employeeCount)/personCount) + 10;
|
||||
groupDuration = groupRoundedDuration;
|
||||
}
|
||||
else if (personCount > 1 && BeWoApp.Tenant == "5653806613") //Feid&Kollegen
|
||||
{
|
||||
decimal groupRoundedDuration = lRoundedDuration;
|
||||
// roundedDuration = ((groupRoundedDuration*employeeCount)/personCount) + 10;
|
||||
// groupDuration = groupRoundedDuration;
|
||||
//}
|
||||
//else if (personCount > 1 && BeWoApp.Tenant == "5653806613") //Feid&Kollegen
|
||||
//{
|
||||
// decimal groupRoundedDuration = lRoundedDuration;
|
||||
|
||||
roundedDuration = ((groupRoundedDuration*employeeCount)/personCount);
|
||||
groupDuration = groupRoundedDuration;
|
||||
}
|
||||
else
|
||||
{
|
||||
// roundedDuration = ((groupRoundedDuration*employeeCount)/personCount);
|
||||
// groupDuration = groupRoundedDuration;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
if (minuteInterval > 0 && roundDuration)
|
||||
lRoundedDuration = duration%minuteInterval != 0
|
||||
? duration + (minuteInterval - (duration%minuteInterval))
|
||||
@@ -352,11 +352,11 @@ namespace BeWo.View.Detail
|
||||
roundedDuration = Math.Round(groupDuration/multiSupportConceptControl.SelectedSupportConcepts.Count, 0,
|
||||
MidpointRounding.AwayFromZero);
|
||||
|
||||
if (BeWoApp.Tenant == "0216265667") //Lebenshilfe Hannover
|
||||
{
|
||||
roundedDuration += 10;
|
||||
}
|
||||
}
|
||||
// if (BeWoApp.Tenant == "0216265667") //Lebenshilfe Hannover
|
||||
// {
|
||||
// roundedDuration += 10;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
_ServiceRecordVM.RoundedDuration = roundedDuration;
|
||||
|
||||
@@ -791,16 +791,16 @@
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="0" Margin="3,0,3,3" x:Name="OnlyJahrData"
|
||||
EditValue="{Binding Path=PrototypeVM.OnlyYear, UpdateSourceTrigger=PropertyChanged}"
|
||||
ItemsSource="{Binding Path=PrototypeVM.JahreBinden}"
|
||||
IsTextEditable="False" />
|
||||
IsTextEditable="False" Height="23"/>
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Monat" x:Name="EndDateLabel3"/>
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="1" Margin="3,0,3,3" x:Name="OnlyMonatData"
|
||||
EditValue="{Binding Path=PrototypeVM.OnlyMonth, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsTextEditable="False"
|
||||
IsTextEditable="False" Height="23"
|
||||
ItemsSource="{Binding Path=PrototypeVM.MonateBinden}" />
|
||||
|
||||
<Label Content="Stunden ges." Grid.Column="0" Grid.Row="2"/>
|
||||
<Label Content="Stunden" Grid.Column="0" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="True" AllowNullInput="False" x:Name="numeric_duration3" Mask="########0.##" MaskUseAsDisplayFormat="True"
|
||||
EditValue="{Binding Path=PrototypeVM.DurationMonthYearGes, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" Grid.Row="2"
|
||||
|
||||
@@ -285,7 +285,7 @@ namespace BeWo.View.Detail
|
||||
|
||||
EndDatumHeader.Visible = false;
|
||||
|
||||
numerictb_distance.SetValue(WidthProperty, (double)81);
|
||||
numerictb_distance.SetValue(WidthProperty, (double)105);
|
||||
numerictb_distance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
lblDistance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Left);
|
||||
}
|
||||
@@ -900,11 +900,8 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
|
||||
ClosePopupView();
|
||||
|
||||
// ViewModel.RefreshServiceRecordsForSelectedTreeNode();
|
||||
ViewModel.RefreshServiceRecordsForSelectedTreeNode();
|
||||
SetSelectedServiceRecordVM(vm,false);
|
||||
|
||||
|
||||
}));
|
||||
serviceRecordEditView.CommandBindings.Add(
|
||||
new CommandBinding(
|
||||
@@ -1262,19 +1259,19 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
else
|
||||
{
|
||||
if (personCount > 2 && (BeWoApp.Tenant == "9893557471") || (BeWoApp.Tenant == "2918696314")) //Caritas Frankfurt
|
||||
{
|
||||
prototypeVM.GroupRoundedDuration = totalDuration;
|
||||
prototypeVM.RoundedDuration = ((totalDuration * employeeCount) / personCount) + 10;
|
||||
}
|
||||
else if (personCount > 1 && BeWoApp.Tenant == "5653806613") //Feid&Kollegen
|
||||
{
|
||||
prototypeVM.GroupRoundedDuration = totalDuration;
|
||||
prototypeVM.RoundedDuration = ((totalDuration * employeeCount) / personCount);
|
||||
//if (personCount > 2 && (BeWoApp.Tenant == "9893557471") || (BeWoApp.Tenant == "2918696314")) //Caritas Frankfurt
|
||||
//{
|
||||
// prototypeVM.GroupRoundedDuration = totalDuration;
|
||||
// prototypeVM.RoundedDuration = ((totalDuration * employeeCount) / personCount) + 10;
|
||||
//}
|
||||
//else if (personCount > 1 && BeWoApp.Tenant == "5653806613") //Feid&Kollegen
|
||||
//{
|
||||
// prototypeVM.GroupRoundedDuration = totalDuration;
|
||||
// prototypeVM.RoundedDuration = ((totalDuration * employeeCount) / personCount);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
if (minuteInterval > 0 && roundDuration)
|
||||
{
|
||||
Calculations calc = Calculations.GetInstance(calcId);
|
||||
@@ -1284,12 +1281,12 @@ namespace BeWo.View.Detail
|
||||
prototypeVM.RoundedDuration = Math.Round(totalDuration / personCount, 0, MidpointRounding.AwayFromZero);
|
||||
prototypeVM.GroupRoundedDuration = totalDuration;
|
||||
|
||||
if (BeWoApp.Tenant == "0216265667") //Lebenshilfe Hannover
|
||||
{
|
||||
prototypeVM.RoundedDuration += 10;
|
||||
}
|
||||
//if (BeWoApp.Tenant == "0216265667") //Lebenshilfe Hannover
|
||||
//{
|
||||
// prototypeVM.RoundedDuration += 10;
|
||||
//}
|
||||
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
ServiceRecordVM newVM;
|
||||
@@ -4040,20 +4037,25 @@ namespace BeWo.View.Detail
|
||||
|
||||
private void MinSTDOhneEnd_OnSelectedIndexChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if(MinSTDOhneEnd.Text == ZeiterfassungsDauer.Minuten.ToString()) {
|
||||
numerictb_duration.IsFloatValue = false;
|
||||
numerictb_duration.Mask = "########";
|
||||
//if (MinSTDMitEnd.Visibility == Visibility.Visible)
|
||||
//{
|
||||
if (MinSTDOhneEnd.Text == ZeiterfassungsDauer.Minuten.ToString())
|
||||
{
|
||||
numerictb_duration.IsFloatValue = false;
|
||||
numerictb_duration.Mask = "########";
|
||||
|
||||
BeWoApp.AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Minuten;
|
||||
BeWoApp.SaveAppSettings();
|
||||
}
|
||||
else {
|
||||
numerictb_duration.IsFloatValue = true;
|
||||
numerictb_duration.Mask = "########0.00";
|
||||
BeWoApp.AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Minuten;
|
||||
BeWoApp.SaveAppSettings();
|
||||
}
|
||||
else
|
||||
{
|
||||
numerictb_duration.IsFloatValue = true;
|
||||
numerictb_duration.Mask = "########0.00";
|
||||
|
||||
BeWoApp.AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Stunden;
|
||||
BeWoApp.SaveAppSettings();
|
||||
}
|
||||
BeWoApp.AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Stunden;
|
||||
BeWoApp.SaveAppSettings();
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
private void MinSTDMitEnd_OnSelectedIndexChanged(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center">Name</Label>
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center">Strasse</Label>
|
||||
<Label Grid.Column="0" Grid.Row="1" Margin="3" VerticalAlignment="Center">Straße</Label>
|
||||
<Label Grid.Column="0" Grid.Row="2" Margin="3" VerticalAlignment="Center">Postleitzahl</Label>
|
||||
<Label Grid.Column="0" Grid.Row="3" Margin="3" VerticalAlignment="Center">Ort</Label>
|
||||
<Label Grid.Column="0" Grid.Row="4" Margin="3" VerticalAlignment="Top">Bemerkung</Label>
|
||||
|
||||
@@ -562,10 +562,10 @@ namespace BeWo.ViewModel.ListViewModel
|
||||
|
||||
if (minuteInterval > 0)
|
||||
{
|
||||
Calculations calc = Calculations.GetInstance(iCustomerNode.SupportConceptTreeNodeDC.CostBearer.CostBearerID);
|
||||
decimal lRoudedDuration = calc.GetRoundedDuration(minuteInterval, _PrototypeVM.Duration ?? 0);
|
||||
//Calculations calc = Calculations.GetInstance(iCustomerNode.SupportConceptTreeNodeDC.CostBearer.CostBearerID);
|
||||
//decimal lRoudedDuration = calc.GetRoundedDuration(minuteInterval, _PrototypeVM.Duration ?? 0);
|
||||
|
||||
lNewRecord.RoundedDuration = lRoudedDuration/_CustomerNodes.Count;
|
||||
//lNewRecord.RoundedDuration = lRoudedDuration/_CustomerNodes.Count;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1815,18 +1815,22 @@ namespace BeWo.ViewModel
|
||||
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_DurationSTD, value))
|
||||
if (BeWoApp.AppSettings.IsZeiterfassungInStdMin)
|
||||
{
|
||||
_DurationSTD = value;
|
||||
if (AreDifferent(_DurationSTD, value))
|
||||
{
|
||||
_DurationSTD = value;
|
||||
|
||||
|
||||
StoreDirtyInformation(AreDifferent(DataContract.RoundedDuration, value), PropertyName_DurationSTD);
|
||||
|
||||
FirePropertyChanged(PropertyName_DurationSTD);
|
||||
FirePropertyChanged(PropertyName_RoundedDuration);
|
||||
TimeCheckForDurationSTD();
|
||||
StoreDirtyInformation(AreDifferent(DataContract.RoundedDuration, value),
|
||||
PropertyName_DurationSTD);
|
||||
|
||||
}
|
||||
FirePropertyChanged(PropertyName_DurationSTD);
|
||||
FirePropertyChanged(PropertyName_RoundedDuration);
|
||||
TimeCheckForDurationSTD();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace BeWo.Data.Entities
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "Wohnheim Name: " + WohnheimName + "\n" + "Strasse: " + Strasse + "\n" + "PLZ: " + PLZ + "\n" + "Ort: "+ Ort +"\n" + "Bemerkung: " + Bemerkung;
|
||||
return "Wohnheim Name: " + WohnheimName + "\n" + "Straße: " + Strasse + "\n" + "PLZ: " + PLZ + "\n" + "Ort: "+ Ort +"\n" + "Bemerkung: " + Bemerkung;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ using BeWo.Data.Entities;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
|
||||
using BeWo.Service.ServiceImplementations;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using DevExpress.XtraReports.UI;
|
||||
@@ -321,7 +321,21 @@ namespace BeWo.Report
|
||||
if (organisation != null)
|
||||
reportId = organisation.Name;
|
||||
}
|
||||
var lServiceOverviewAllCustomersReport = this.FindReportImp<ServicesOverviewRO>(reportId);
|
||||
|
||||
if (String.IsNullOrEmpty(reportId))
|
||||
{
|
||||
var os = new OperationsServiceImp();
|
||||
var m = os.GetMandator();
|
||||
if (!String.IsNullOrEmpty(m.ClientId) && m.ClientId == "SBD")
|
||||
{
|
||||
reportId = "LeistungsnachweisSbd";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var lServiceOverviewAllCustomersReport = this.FindReportImp<ServicesOverviewRO>(reportId);
|
||||
lServiceOverviewAllCustomersReport.SetReportDataSource(lROs[0]);
|
||||
(lServiceOverviewAllCustomersReport as XtraReport).CreateDocument();
|
||||
var Report = lServiceOverviewAllCustomersReport as XtraReport;
|
||||
@@ -348,8 +362,16 @@ namespace BeWo.Report
|
||||
if (organisation != null)
|
||||
reportId = organisation.Name;
|
||||
}
|
||||
|
||||
var lServiceOverviewSingleCustomerReport = this.FindReportImp<ServicesOverviewRO>(reportId);
|
||||
if (String.IsNullOrEmpty(reportId))
|
||||
{
|
||||
var os = new OperationsServiceImp();
|
||||
var m = os.GetMandator();
|
||||
if (!String.IsNullOrEmpty(m.ClientId) && m.ClientId == "SBD")
|
||||
{
|
||||
reportId = "LeistungsnachweisSbd";
|
||||
}
|
||||
}
|
||||
var lServiceOverviewSingleCustomerReport = this.FindReportImp<ServicesOverviewRO>(reportId);
|
||||
lServiceOverviewSingleCustomerReport.SetReportDataSource(ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid));
|
||||
|
||||
return lServiceOverviewSingleCustomerReport as XtraReport;
|
||||
|
||||
@@ -334,7 +334,7 @@ namespace BeWo.Report.DefaultReports
|
||||
this.xrLabel19.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel19.SizeF = new System.Drawing.SizeF(139.58F, 24F);
|
||||
this.xrLabel19.StylePriority.UseFont = false;
|
||||
this.xrLabel19.Text = "Strasse:";
|
||||
this.xrLabel19.Text = "Straße:";
|
||||
//
|
||||
// xrLabel22
|
||||
//
|
||||
|
||||
@@ -1 +1 @@
|
||||
|
||||
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v13.2, Version=13.2.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
|
||||
@@ -171,6 +171,12 @@
|
||||
<Compile Include="DefaultReports\JahresReport.designer.cs">
|
||||
<DependentUpon>JahresReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DefaultReports\LeistungsnachweisSbd.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DefaultReports\LeistungsnachweisSbd.designer.cs">
|
||||
<DependentUpon>LeistungsnachweisSbd.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DefaultReports\MedikamentenverordnungslistenReport.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -341,6 +347,9 @@
|
||||
<EmbeddedResource Include="DefaultReports\JahresReport.resx">
|
||||
<DependentUpon>JahresReport.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DefaultReports\LeistungsnachweisSbd.resx">
|
||||
<DependentUpon>LeistungsnachweisSbd.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DefaultReports\MedikamentenverordnungslistenReport.resx">
|
||||
<DependentUpon>MedikamentenverordnungslistenReport.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -1159,6 +1159,11 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
//Wird aus Performancegründen nicht automatisch gesetzt. Kann bei Bedarf in den Kundenreports erstellt werden
|
||||
public string GoalList { get; set; }
|
||||
|
||||
public bool IstFeiertag { get; set; }
|
||||
public bool IstFerien { get; set; }
|
||||
public bool IstSamstag { get; set; }
|
||||
public bool IstSonntag { get; set; }
|
||||
}
|
||||
|
||||
public class ServiceDoubleDetail
|
||||
|
||||
@@ -311,7 +311,7 @@ namespace BeWo.KontaktUndKrisenhilfeReports
|
||||
this.xrLabel19.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel19.SizeF = new System.Drawing.SizeF(139.58F, 24F);
|
||||
this.xrLabel19.StylePriority.UseFont = false;
|
||||
this.xrLabel19.Text = "Strasse:";
|
||||
this.xrLabel19.Text = "Straße:";
|
||||
//
|
||||
// xrLabel22
|
||||
//
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace BeWo.Service.DCEntityMapper
|
||||
pDataContract.IsDefault = pEntity.IsDefault;
|
||||
pDataContract.BillableAmount = pEntity.BillableAmount;
|
||||
pDataContract.AccountingInterval = pEntity.AccountingInterval;
|
||||
pDataContract.ActivationType = pEntity.IsActive;
|
||||
pDataContract.ScopeType = pEntity.ScopeType.HasValue ? pEntity.ScopeType.Value : ScopeTypeId.Global;
|
||||
pDataContract.IsSystemEntry = pEntity.SystemEntryID != null;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace BeWo.Service.DCEntityMapper
|
||||
pDataContract.ScopeType = pEntity.ScopeType.HasValue ? pEntity.ScopeType.Value : ScopeTypeId.Global;
|
||||
pDataContract.IsSystemEntry = pEntity.SystemEntryID != null;
|
||||
pDataContract.DoNotCheckOverlapping = pEntity.DoNotCheckOverlapping.HasValue && pEntity.DoNotCheckOverlapping.Value;
|
||||
pDataContract.ActivationType = pEntity.IsActive;
|
||||
pDataContract.CostRatePeriods = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(pEntity.CostRatePeriods);
|
||||
|
||||
return pDataContract;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Data.Entities;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
@@ -7,7 +8,8 @@ namespace BeWo.Service.Plugins
|
||||
{
|
||||
public class GroupDurationCalculator : AbstractIDSpecificDefaultClass<GroupDurationCalculator>
|
||||
{
|
||||
public virtual GroupDurationDC CalculateGroupDuration(int personCount, int employeeCount, decimal totalDuration)
|
||||
|
||||
public virtual GroupDurationDC CalculateGroupDuration(int personCount, int employeeCount, decimal totalDuration)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -18,5 +20,51 @@ namespace BeWo.Service.Plugins
|
||||
return CalculateGroupDuration(personCount, employeeCount, totalDuration);
|
||||
}
|
||||
|
||||
}
|
||||
public virtual void CalculateGroupDuration(ServiceRecordGroup group)
|
||||
{
|
||||
if (group.ServiceRecordList.Count > 0)
|
||||
{
|
||||
var dcalc = PluginLoader.FindClass<ServiceRecordDurationCalculator>();
|
||||
|
||||
decimal maxRoundedDuration = 0;
|
||||
long[] costBearer2SupportConceptArray = new long[group.ServiceRecordList.Count];
|
||||
|
||||
int idx = 0;
|
||||
foreach (var sr in group.ServiceRecordList)
|
||||
{
|
||||
if (dcalc != null)
|
||||
{
|
||||
dcalc.CalculateRoundedDuration(sr);
|
||||
}
|
||||
if (sr.RoundedDuration > maxRoundedDuration)
|
||||
{
|
||||
maxRoundedDuration = sr.RoundedDuration;
|
||||
}
|
||||
costBearer2SupportConceptArray[idx++] = sr.CostBearer2SupportConcept.Oid.Value;
|
||||
}
|
||||
|
||||
var dc = CalculateGroupDuration(group.CustomerCount, group.EmployeeCount, maxRoundedDuration,
|
||||
costBearer2SupportConceptArray);
|
||||
|
||||
|
||||
decimal durationForSingleRecord = 0;
|
||||
decimal durationForGroup = maxRoundedDuration;
|
||||
|
||||
if (dc != null)
|
||||
{
|
||||
durationForSingleRecord = dc.SingleDuration;
|
||||
durationForGroup = dc.TotalDuration;
|
||||
}
|
||||
else
|
||||
{
|
||||
durationForSingleRecord = durationForGroup/group.CustomerCount;
|
||||
}
|
||||
|
||||
foreach (var sr in group.ServiceRecordList)
|
||||
{
|
||||
sr.RoundedDuration = durationForSingleRecord;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace BeWo.Service.Plugins
|
||||
{
|
||||
#if DEBUG
|
||||
var t = "demo";
|
||||
t = "xxxx";
|
||||
//t = "2356097460"; // Lebenshilfe Würzburg
|
||||
//t = "1234567890"; // Präsentationsdatenbank
|
||||
//t = "5687373602"; // LH Duisburg
|
||||
@@ -149,7 +150,8 @@ namespace BeWo.Service.Plugins
|
||||
//t = "1106039294"; //HphBersenbrueckAtz
|
||||
//t = "3607551608"; // BetreuungsBuero Scholz
|
||||
//t = "3104936392"; //B.A.P. Bielefelder Ambulante Pflege
|
||||
t = "3852198843"; // Lebenshilfe Mannheim e.V.
|
||||
//t = "3852198843"; // Lebenshilfe Mannheim e.V.
|
||||
|
||||
return t;
|
||||
#else
|
||||
if (MultitenancyOperationContextExt.Current != null)
|
||||
|
||||
@@ -226,15 +226,16 @@ namespace BeWo.Service.Plugins
|
||||
noTime = true;
|
||||
}
|
||||
decimal roundedDuration = duration;
|
||||
if (newServiceRecord.ServiceDescription.Category != null &&
|
||||
newServiceRecord.ServiceDescription.Category.IsBillable && newServiceRecord.CostBearer != null)
|
||||
{
|
||||
Calculations calc = Calculations.GetInstance(newServiceRecord.CostBearer.CostBearerID);
|
||||
roundedDuration =
|
||||
calc.GetRoundedDuration(newServiceRecord.CostBearer, roundedDuration);
|
||||
}
|
||||
|
||||
var srdc = PluginLoader.FindClass<ServiceRecordDurationCalculator>();
|
||||
if (srdc != null)
|
||||
{
|
||||
srdc.CalculateRoundedDuration(newServiceRecord);
|
||||
|
||||
roundedDuration = newServiceRecord.RoundedDuration;
|
||||
}
|
||||
|
||||
|
||||
if (isGroupRecord)
|
||||
{
|
||||
var groupcalc = PluginLoader.FindClass<GroupDurationCalculator>();
|
||||
|
||||
@@ -296,6 +296,7 @@
|
||||
<Compile Include="Multitenancy\MultitenancyContextInitializer.cs" />
|
||||
<Compile Include="Multitenancy\MultitenancyEndpointBehavior.cs" />
|
||||
<Compile Include="Plugins\CustomerService.cs" />
|
||||
<Compile Include="Plugins\ServiceRecordDurationCalculator.cs" />
|
||||
<Compile Include="Plugins\IpAddressChecker.cs" />
|
||||
<Compile Include="Plugins\DataImporter.cs" />
|
||||
<Compile Include="Plugins\DataExporter.cs" />
|
||||
|
||||
@@ -1654,12 +1654,21 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
foreach (ServiceRecord iServiceRecord in lServiceRecords)
|
||||
{
|
||||
|
||||
iServiceRecord.IP = Utils.GetClientIP();
|
||||
|
||||
// iServiceRecord.Group = group;
|
||||
}
|
||||
|
||||
group.ServiceRecordList = lServiceRecords;
|
||||
|
||||
|
||||
var gdc = PluginLoader.FindClass<GroupDurationCalculator>();
|
||||
|
||||
if (gdc != null)
|
||||
{
|
||||
gdc.CalculateGroupDuration(group);
|
||||
}
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Insert(group);
|
||||
@@ -1934,6 +1943,11 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
else
|
||||
{
|
||||
var srdc = PluginLoader.FindClass<ServiceRecordDurationCalculator>();
|
||||
if (srdc != null)
|
||||
{
|
||||
srdc.CalculateRoundedDuration(iServiceRecord);
|
||||
}
|
||||
var bsi = PluginLoader.FindClass<SaveInterceptor>();
|
||||
if (bsi != null)
|
||||
{
|
||||
@@ -2171,12 +2185,21 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
MapperFactory.ServiceRecordDC_ServiceRecord.MergeWithEntitys(pServiceRecords, lOriginals);
|
||||
|
||||
var si = PluginLoader.FindClass<SaveInterceptor>();
|
||||
var srdc = PluginLoader.FindClass<ServiceRecordDurationCalculator>();
|
||||
if (srdc != null)
|
||||
{
|
||||
foreach (var serviceRecord in lOriginals)
|
||||
{
|
||||
srdc.CalculateRoundedDuration(serviceRecord);
|
||||
}
|
||||
}
|
||||
|
||||
var si = PluginLoader.FindClass<SaveInterceptor>();
|
||||
if (si != null)
|
||||
{
|
||||
foreach (var serviceRecord in lOriginals)
|
||||
{
|
||||
si.BeforeSaveServiceRecord(serviceRecord);
|
||||
si.BeforeSaveServiceRecord(serviceRecord);
|
||||
}
|
||||
}
|
||||
DAOFactory.GenericDAO.Update(lOriginals);
|
||||
|
||||
@@ -60,5 +60,8 @@ namespace BS.Shared.DataContracts
|
||||
_CostRatePeriods = value;
|
||||
}
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public ActivationTypeId ActivationType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -63,5 +63,8 @@ namespace BS.Shared.DataContracts
|
||||
this._CostRatePeriods = value;
|
||||
}
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public ActivationTypeId ActivationType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1580,29 +1580,27 @@ namespace BS.Shared.Services
|
||||
.GetHoursInBE(this.GetApprovedHoursForPeriod(scap, costRatePeriods, start, end));
|
||||
}
|
||||
|
||||
public virtual int GetRoundedDuration(DataContracts.Compact.CompactOrganisationDC org, decimal durationInMinutes)
|
||||
{
|
||||
int minuteInterval = org.ActualMinuteIntervall;
|
||||
return GetRoundedDuration(minuteInterval, durationInMinutes);
|
||||
}
|
||||
|
||||
public virtual int GetRoundedDuration(int minuteInterval, decimal durationInMinutes)
|
||||
{
|
||||
decimal lRoundedDuration = durationInMinutes;
|
||||
|
||||
public virtual int GetRoundedDuration(DataContracts.Compact.CompactOrganisationDC org, decimal durationInMinutes)
|
||||
{
|
||||
int minuteInterval = org.ActualMinuteIntervall;
|
||||
return GetRoundedDuration(minuteInterval, durationInMinutes);
|
||||
}
|
||||
if (minuteInterval > 0)
|
||||
{
|
||||
lRoundedDuration = durationInMinutes % minuteInterval != 0
|
||||
? durationInMinutes + (minuteInterval - (durationInMinutes % minuteInterval))
|
||||
: durationInMinutes;
|
||||
}
|
||||
|
||||
public virtual int GetRoundedDuration(int minuteInterval, decimal durationInMinutes)
|
||||
{
|
||||
decimal lRoundedDuration = durationInMinutes;
|
||||
return (int)Math.Round(lRoundedDuration, 0, MidpointRounding.AwayFromZero);
|
||||
}
|
||||
|
||||
if (minuteInterval > 0)
|
||||
{
|
||||
lRoundedDuration = durationInMinutes % minuteInterval != 0
|
||||
? durationInMinutes + (minuteInterval - (durationInMinutes % minuteInterval))
|
||||
: durationInMinutes;
|
||||
}
|
||||
|
||||
return (int)Math.Round(lRoundedDuration, 0, MidpointRounding.AwayFromZero);
|
||||
}
|
||||
|
||||
public static AccountingIntervalType ConvertApprovalToAccountingIntervalType(SupportConceptApprovalInterval supportConceptApprovalInterval)
|
||||
public static AccountingIntervalType ConvertApprovalToAccountingIntervalType(SupportConceptApprovalInterval supportConceptApprovalInterval)
|
||||
{
|
||||
switch (supportConceptApprovalInterval)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user