diff --git a/BeWo/View/Detail/Accounting/EquityInvoiceItemEditView.xaml b/BeWo/View/Detail/Accounting/EquityInvoiceItemEditView.xaml
index 9cd60d70b..8dc89b8af 100644
--- a/BeWo/View/Detail/Accounting/EquityInvoiceItemEditView.xaml
+++ b/BeWo/View/Detail/Accounting/EquityInvoiceItemEditView.xaml
@@ -121,7 +121,7 @@
-
+
diff --git a/BeWo/View/Detail/Accounting/GeneralInvoiceItemEditView.xaml b/BeWo/View/Detail/Accounting/GeneralInvoiceItemEditView.xaml
index 1412a0edb..76b2d742b 100644
--- a/BeWo/View/Detail/Accounting/GeneralInvoiceItemEditView.xaml
+++ b/BeWo/View/Detail/Accounting/GeneralInvoiceItemEditView.xaml
@@ -107,7 +107,7 @@
-
+
diff --git a/BeWo/View/Detail/Accounting/ServiceInvoiceItemEditView.xaml b/BeWo/View/Detail/Accounting/ServiceInvoiceItemEditView.xaml
index 3bf4561a9..b18b6a4a9 100644
--- a/BeWo/View/Detail/Accounting/ServiceInvoiceItemEditView.xaml
+++ b/BeWo/View/Detail/Accounting/ServiceInvoiceItemEditView.xaml
@@ -116,7 +116,7 @@
-
+
diff --git a/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView.xaml b/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView.xaml
index 5edfe3cb9..347dced24 100644
--- a/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView.xaml
+++ b/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView.xaml
@@ -56,7 +56,7 @@
-
+
diff --git a/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView2.xaml b/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView2.xaml
index 7ee08f495..30f0cc3ed 100644
--- a/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView2.xaml
+++ b/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView2.xaml
@@ -60,7 +60,7 @@
-
+
diff --git a/BeWo/View/Detail/CustomerView.xaml b/BeWo/View/Detail/CustomerView.xaml
index e18232d59..785c3832d 100644
--- a/BeWo/View/Detail/CustomerView.xaml
+++ b/BeWo/View/Detail/CustomerView.xaml
@@ -562,7 +562,7 @@
-
+
@@ -594,7 +594,7 @@
-
+
diff --git a/BeWo/View/Detail/CustomerView2.xaml b/BeWo/View/Detail/CustomerView2.xaml
index c3751c83e..2df8a9f31 100644
--- a/BeWo/View/Detail/CustomerView2.xaml
+++ b/BeWo/View/Detail/CustomerView2.xaml
@@ -253,7 +253,7 @@
-
+
diff --git a/BeWo/View/Detail/CustomerView2.xaml.cs b/BeWo/View/Detail/CustomerView2.xaml.cs
index e281c626d..68a97b130 100644
--- a/BeWo/View/Detail/CustomerView2.xaml.cs
+++ b/BeWo/View/Detail/CustomerView2.xaml.cs
@@ -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"; }
}
}
diff --git a/BeWo/View/Detail/EmployeeView.xaml b/BeWo/View/Detail/EmployeeView.xaml
index 6efa18f89..94bda2b16 100644
--- a/BeWo/View/Detail/EmployeeView.xaml
+++ b/BeWo/View/Detail/EmployeeView.xaml
@@ -223,7 +223,7 @@
-
+
diff --git a/BeWo/View/Detail/MandatorView.xaml b/BeWo/View/Detail/MandatorView.xaml
index 8d9579d5f..4a144330f 100644
--- a/BeWo/View/Detail/MandatorView.xaml
+++ b/BeWo/View/Detail/MandatorView.xaml
@@ -31,7 +31,7 @@
-
+
diff --git a/BeWo/View/Detail/OrganisationView.xaml b/BeWo/View/Detail/OrganisationView.xaml
index db04f2d31..0709ef7e7 100644
--- a/BeWo/View/Detail/OrganisationView.xaml
+++ b/BeWo/View/Detail/OrganisationView.xaml
@@ -125,7 +125,7 @@
-
+
@@ -153,7 +153,7 @@
-
+
diff --git a/BeWo/View/Detail/PersonView.xaml b/BeWo/View/Detail/PersonView.xaml
index 0cf8395a8..145c5eb79 100644
--- a/BeWo/View/Detail/PersonView.xaml
+++ b/BeWo/View/Detail/PersonView.xaml
@@ -165,7 +165,7 @@
-
+
@@ -189,7 +189,7 @@
-
+
diff --git a/BeWo/View/Detail/Report/QueryView.xaml.cs b/BeWo/View/Detail/Report/QueryView.xaml.cs
index f9759d109..ef1c84387 100644
--- a/BeWo/View/Detail/Report/QueryView.xaml.cs
+++ b/BeWo/View/Detail/Report/QueryView.xaml.cs
@@ -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();
+ 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;
}
}
diff --git a/BeWo/View/Detail/Report/SettlementView.xaml b/BeWo/View/Detail/Report/SettlementView.xaml
index a8584496d..c9532b280 100644
--- a/BeWo/View/Detail/Report/SettlementView.xaml
+++ b/BeWo/View/Detail/Report/SettlementView.xaml
@@ -63,7 +63,7 @@
-
+
diff --git a/BeWo/View/Detail/ServiceCategoryView.xaml b/BeWo/View/Detail/ServiceCategoryView.xaml
index e6dfe4f2c..f6d8dc4ff 100644
--- a/BeWo/View/Detail/ServiceCategoryView.xaml
+++ b/BeWo/View/Detail/ServiceCategoryView.xaml
@@ -23,7 +23,7 @@
-
+
@@ -43,7 +43,10 @@
Max. Anteil in % (100 für unbeschränkt)
-
+
+
+
+
@@ -74,8 +77,7 @@
ValueLabelText="Betrag (€)"
ButtonTooltipText="Neuen Betrag hinzufügen" />
-
-
+
Name
- Strasse
+ Straße
Postleitzahl
Ort
Bemerkung
diff --git a/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs b/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs
index 2ee48c848..997d08958 100644
--- a/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs
+++ b/BeWo/ViewModel/ListViewModel/ServiceRecordListVM.cs
@@ -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;
}
}
diff --git a/BeWo/ViewModel/ServiceRecordVM.cs b/BeWo/ViewModel/ServiceRecordVM.cs
index b2a63ea95..a23bf29e2 100644
--- a/BeWo/ViewModel/ServiceRecordVM.cs
+++ b/BeWo/ViewModel/ServiceRecordVM.cs
@@ -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();
+
+ }
+ }
}
}
diff --git a/Data/Entities/Wohnheim.cs b/Data/Entities/Wohnheim.cs
index e48d76443..b6f3241ec 100644
--- a/Data/Entities/Wohnheim.cs
+++ b/Data/Entities/Wohnheim.cs
@@ -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;
}
}
}
\ No newline at end of file
diff --git a/Report/DefaultReportCreator.cs b/Report/DefaultReportCreator.cs
index fcdd88ac4..adf62300d 100644
--- a/Report/DefaultReportCreator.cs
+++ b/Report/DefaultReportCreator.cs
@@ -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(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(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(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(reportId);
lServiceOverviewSingleCustomerReport.SetReportDataSource(ServicesOverviewRO.Create(customerOid, month, year, false, orgaOid, empOid, startDay, endDay, serviceCategoryOid));
return lServiceOverviewSingleCustomerReport as XtraReport;
diff --git a/Report/DefaultReports/CustomerDataReport.Designer.cs b/Report/DefaultReports/CustomerDataReport.Designer.cs
index b48dde9b4..bda34d7d1 100644
--- a/Report/DefaultReports/CustomerDataReport.Designer.cs
+++ b/Report/DefaultReports/CustomerDataReport.Designer.cs
@@ -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
//
diff --git a/Report/Properties/licenses.licx b/Report/Properties/licenses.licx
index 5f282702b..f45708b13 100644
--- a/Report/Properties/licenses.licx
+++ b/Report/Properties/licenses.licx
@@ -1 +1 @@
-
\ No newline at end of file
+DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v13.2, Version=13.2.13.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
diff --git a/Report/Report.csproj b/Report/Report.csproj
index 92c158eb6..fd1e5bfcf 100644
--- a/Report/Report.csproj
+++ b/Report/Report.csproj
@@ -171,6 +171,12 @@
JahresReport.cs
+
+ Component
+
+
+ LeistungsnachweisSbd.cs
+
Component
@@ -341,6 +347,9 @@
JahresReport.cs
+
+ LeistungsnachweisSbd.cs
+
MedikamentenverordnungslistenReport.cs
diff --git a/Report/ReportObjects/ServicesOverviewRO.cs b/Report/ReportObjects/ServicesOverviewRO.cs
index 4e5d132a2..317d6adfd 100644
--- a/Report/ReportObjects/ServicesOverviewRO.cs
+++ b/Report/ReportObjects/ServicesOverviewRO.cs
@@ -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
diff --git a/ReportImp/KontaktUndKrisenhilfeReports/CustomerDataReport.Designer.cs b/ReportImp/KontaktUndKrisenhilfeReports/CustomerDataReport.Designer.cs
index 9ac0ac9ab..c2e058508 100644
--- a/ReportImp/KontaktUndKrisenhilfeReports/CustomerDataReport.Designer.cs
+++ b/ReportImp/KontaktUndKrisenhilfeReports/CustomerDataReport.Designer.cs
@@ -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
//
diff --git a/Service/DCEntityMapper/ServiceCategoryDC_ServiceCategory.cs b/Service/DCEntityMapper/ServiceCategoryDC_ServiceCategory.cs
index 0d98559f9..865a8d1d1 100644
--- a/Service/DCEntityMapper/ServiceCategoryDC_ServiceCategory.cs
+++ b/Service/DCEntityMapper/ServiceCategoryDC_ServiceCategory.cs
@@ -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;
diff --git a/Service/DCEntityMapper/ServiceDescriptionDC_ServiceDescription.cs b/Service/DCEntityMapper/ServiceDescriptionDC_ServiceDescription.cs
index 60e9bda8e..370022908 100644
--- a/Service/DCEntityMapper/ServiceDescriptionDC_ServiceDescription.cs
+++ b/Service/DCEntityMapper/ServiceDescriptionDC_ServiceDescription.cs
@@ -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;
diff --git a/Service/Plugins/GroupDurationCalculator.cs b/Service/Plugins/GroupDurationCalculator.cs
index 6238b1f7a..33c5d11ca 100644
--- a/Service/Plugins/GroupDurationCalculator.cs
+++ b/Service/Plugins/GroupDurationCalculator.cs
@@ -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
{
- 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();
+
+ 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;
+ }
+ }
+ }
+ }
}
diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs
index 51cedd717..43eb7e29f 100644
--- a/Service/Plugins/PluginLoader.cs
+++ b/Service/Plugins/PluginLoader.cs
@@ -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)
diff --git a/Service/Plugins/ServiceRecordValidator.cs b/Service/Plugins/ServiceRecordValidator.cs
index 5526109ef..00c10baa4 100644
--- a/Service/Plugins/ServiceRecordValidator.cs
+++ b/Service/Plugins/ServiceRecordValidator.cs
@@ -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();
+ if (srdc != null)
+ {
+ srdc.CalculateRoundedDuration(newServiceRecord);
+ roundedDuration = newServiceRecord.RoundedDuration;
+ }
+
+
if (isGroupRecord)
{
var groupcalc = PluginLoader.FindClass();
diff --git a/Service/Service.csproj b/Service/Service.csproj
index 53ddf0a65..41fd39698 100644
--- a/Service/Service.csproj
+++ b/Service/Service.csproj
@@ -296,6 +296,7 @@
+
diff --git a/Service/ServiceImplementations/OperationsServiceImp.cs b/Service/ServiceImplementations/OperationsServiceImp.cs
index bfef5d66d..a96478753 100644
--- a/Service/ServiceImplementations/OperationsServiceImp.cs
+++ b/Service/ServiceImplementations/OperationsServiceImp.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();
+
+ if (gdc != null)
+ {
+ gdc.CalculateGroupDuration(group);
+ }
}
DAOFactory.GenericDAO.Insert(group);
@@ -1934,6 +1943,11 @@ namespace BeWo.Service.ServiceImplementations
}
else
{
+ var srdc = PluginLoader.FindClass();
+ if (srdc != null)
+ {
+ srdc.CalculateRoundedDuration(iServiceRecord);
+ }
var bsi = PluginLoader.FindClass();
if (bsi != null)
{
@@ -2171,12 +2185,21 @@ namespace BeWo.Service.ServiceImplementations
MapperFactory.ServiceRecordDC_ServiceRecord.MergeWithEntitys(pServiceRecords, lOriginals);
- var si = PluginLoader.FindClass();
+ var srdc = PluginLoader.FindClass();
+ if (srdc != null)
+ {
+ foreach (var serviceRecord in lOriginals)
+ {
+ srdc.CalculateRoundedDuration(serviceRecord);
+ }
+ }
+
+ var si = PluginLoader.FindClass();
if (si != null)
{
foreach (var serviceRecord in lOriginals)
{
- si.BeforeSaveServiceRecord(serviceRecord);
+ si.BeforeSaveServiceRecord(serviceRecord);
}
}
DAOFactory.GenericDAO.Update(lOriginals);
diff --git a/Shared/DataContracts/ServiceCategoryDC.cs b/Shared/DataContracts/ServiceCategoryDC.cs
index c140f3908..dae2f48be 100644
--- a/Shared/DataContracts/ServiceCategoryDC.cs
+++ b/Shared/DataContracts/ServiceCategoryDC.cs
@@ -60,5 +60,8 @@ namespace BS.Shared.DataContracts
_CostRatePeriods = value;
}
}
+
+ [DataMember]
+ public ActivationTypeId ActivationType { get; set; }
}
}
\ No newline at end of file
diff --git a/Shared/DataContracts/ServiceDescriptionDC.cs b/Shared/DataContracts/ServiceDescriptionDC.cs
index e1aac17fc..43b56c929 100644
--- a/Shared/DataContracts/ServiceDescriptionDC.cs
+++ b/Shared/DataContracts/ServiceDescriptionDC.cs
@@ -63,5 +63,8 @@ namespace BS.Shared.DataContracts
this._CostRatePeriods = value;
}
}
+
+ [DataMember]
+ public ActivationTypeId ActivationType { get; set; }
}
}
\ No newline at end of file
diff --git a/Shared/Services/Calculations.cs b/Shared/Services/Calculations.cs
index fe824094a..5d20efd22 100644
--- a/Shared/Services/Calculations.cs
+++ b/Shared/Services/Calculations.cs
@@ -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)
{