diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index 970ae7d9b..9573f6989 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -43,12 +43,12 @@
de-DE
BeWoPlaner
ownSoft GmbH
- 2.0.1.260
+ 2.0.1.263
true
publish.htm
false
true
- 261
+ 264
2.0.1.%2a
false
true
diff --git a/BeWo/View/Detail/MandatorView.xaml b/BeWo/View/Detail/MandatorView.xaml
index c8f018b76..941e0911e 100644
--- a/BeWo/View/Detail/MandatorView.xaml
+++ b/BeWo/View/Detail/MandatorView.xaml
@@ -258,7 +258,7 @@
-
+
+
+
+
+
@@ -537,12 +534,7 @@ namespace BeWo.View
loginWindow.Content = grid;
loginWindow.Show();
-#else
- var x1 = _login.AnmeldevorgangDurchFuehren();
- ServiceChatView = new ChatView(x1);
- ServiceChatView.Show();
-#endif
return;
#endif
@@ -578,12 +570,7 @@ namespace BeWo.View
string _passwort = BeWoApp.UserPassword;
string _apikey;
#endif
- //string _ChatCode = "";
- //if (xxx.EmployeeCode != null && !xxx.EmployeeCode.Equals(""))
- //{
- // _ChatCode = xxx.EmployeeCode;
- //}
-
+
_apikey = BeWoApp.Mandator.Apikey ?? "0000";
if(!_Code.Equals(""))
@@ -609,24 +596,6 @@ namespace BeWo.View
MessageBox.Show("Sie benötigen einen gültigen Zugang zum Chat. Bitte wenden Sie sich an den Support.", "Info");
}
}
- //else if (ServiceChatView.Visibility == Visibility.Visible)
- //{
- // ServiceChatView.Visibility = Visibility.Hidden;
- //}
- //else if (ServiceChatView.Visibility == Visibility.Hidden)
- //{
- // ServiceChatView.Visibility = Visibility.Visible;
-
- // if (ServiceChatView.WindowState == WindowState.Minimized)
- // {
- // ServiceChatView.WindowState = WindowState.Normal;
- // ServiceChatView.Height = 700;
- // ServiceChatView.Width = 900;
- // }
-
- // ServiceChatView.Activate();
- //}
- //#endif
}
private void ServiceChatViewClosed(object sender, EventArgs e)
diff --git a/BeWo/ViewModel/MandatorVM.cs b/BeWo/ViewModel/MandatorVM.cs
index 55937b7bd..6ab55824b 100644
--- a/BeWo/ViewModel/MandatorVM.cs
+++ b/BeWo/ViewModel/MandatorVM.cs
@@ -168,6 +168,20 @@ namespace BeWo.ViewModel
}
}
}
+ public bool ShowServicesOverviewHalfOrWholeMonth
+ {
+ get { return BeWoApp.AppSettings.ShowServicesOverviewHalfOrWholeMonth; }
+
+ set
+ {
+ if (this.AreDifferent(BeWoApp.AppSettings.ShowServicesOverviewHalfOrWholeMonth, value))
+ {
+ BeWoApp.AppSettings.ShowServicesOverviewHalfOrWholeMonth = value;
+
+ this.Settings = UserSettingsUtils.CreateNewSettingValue(this._Settings, "ShowServicesOverviewHalfOrWholeMonth", value ? "1" : "0");
+ }
+ }
+ }
public bool FilterGroupServiceCategories
{
get { return BeWoApp.AppSettings.FilterGroupServiceCategories; }
diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user
index 5ef28c91b..f361f78af 100644
--- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user
+++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user
@@ -8,7 +8,7 @@
- Release|Any CPU
+ Debug|Any CPU
ShowAllFiles
600
MvcControllerEmptyScaffolder
diff --git a/Host/Host.csproj.user b/Host/Host.csproj.user
index 5ee002517..f8b116048 100644
--- a/Host/Host.csproj.user
+++ b/Host/Host.csproj.user
@@ -3,7 +3,7 @@
BeWo2.0
true
- Release|Any CPU
+ Debug|Any CPU
false
diff --git a/ReportImp/ChristopherusHausMID/Invoicing/CustomInvoiceCreation.cs b/ReportImp/ChristopherusHausMID/Invoicing/CustomInvoiceCreation.cs
index 70f5450d2..42b5c9d7d 100644
--- a/ReportImp/ChristopherusHausMID/Invoicing/CustomInvoiceCreation.cs
+++ b/ReportImp/ChristopherusHausMID/Invoicing/CustomInvoiceCreation.cs
@@ -82,6 +82,7 @@ namespace ChristopherusHausMID.Invoicing
//var items = base.CreateInvoiceItems(serviceRecordsInPeriod, invoicePeriod, scap, calc);
var fehltage = PoolHelper.GetAbwesenheitsTage(scap.CostBearer2SupportConcept.SupportConcept.Customer, invoicePeriod);
var items = new List();
+ decimal maxBetreuteTage = 0;
if (qbelegRos.Count > 0)
{
foreach (var s in qbelegRos[0].Services)
@@ -89,19 +90,53 @@ namespace ChristopherusHausMID.Invoicing
InvoiceItem ii = CreateInvoiceItem(s, scap, calc);
if (ii != null && ii.UnitCount.HasValue && ii.UnitCount > 0)
{
-
+ maxBetreuteTage++;
items.Add(ii);
}
}
}
+ decimal betreuteTage = maxBetreuteTage - fehltage;
+ decimal betreuteTagePoolKinder = 0;
//IList poolRechnungen = null;
- //if (BerechnePoolKinder)
- //{
- // poolRechnungen = ErstellePoolRechnungen(invoicePeriod, scap);
+ if (BerechnePoolKinder)
+ {
+ var poolKinder = PoolHelper.GetWeiterePoolKinder(scap.CostBearer2SupportConcept.SupportConcept.Customer, invoicePeriod.StartDate);
+ if (poolKinder.Count > 0)
+ {
+
- // //BerechnePoolFaktorenUndAbwesenheiten(scap.CostBearer2SupportConcept.SupportConcept.Customer, invoicePeriod, items, poolRechnungen);
- //}
+ foreach (var poolKind in poolKinder)
+ {
+ var invoice = PoolHelper.ErstelleRechnung(poolKind, invoicePeriod.StartDate, invoicePeriod.EndDate);
+
+ if (invoice != null)
+ {
+ //Berechne Rechnungsanteil anhand der Abwesenheitstage
+ var fehltagePoolKind = PoolHelper.GetAbwesenheitsTage(poolKind, invoicePeriod);
+ betreuteTagePoolKinder += maxBetreuteTage - fehltagePoolKind;
+ //var ro = new RechnungsPositionRO();
+ //positionen.Add(ro);
+
+ //var newInvoiceRo = ServiceInvoiceRO.Create(MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(invoice));
+
+ //BerechneRechnungsPositionSummen(poolKind, ro, newInvoiceRo);
+ //ro.Position = position++;
+ }
+ }
+ }
+
+ //BerechnePoolFaktorenUndAbwesenheiten(scap.CostBearer2SupportConcept.SupportConcept.Customer, invoicePeriod, items, poolRechnungen);
+ }
+
+ var betreutetageGesamt = betreuteTagePoolKinder + betreuteTage; // Anzahl Tage insegesamt, die irgendein Pool Kind betreut wurde
+
+ decimal rechnungsanteil = 1;
+ if (betreutetageGesamt > 0 && betreuteTagePoolKinder > 0)
+ {
+ rechnungsanteil = Math.Round(betreuteTage / betreutetageGesamt, 4, MidpointRounding.AwayFromZero);
+ }
+
//if (poolRechnungen == null || poolRechnungen.Count == 0)
//{
@@ -116,6 +151,12 @@ namespace ChristopherusHausMID.Invoicing
foreach (var item in summaryItems)
{
item.CustomNumber1 = fehltage;
+ item.CustomNumber2 = rechnungsanteil;
+
+ if (rechnungsanteil < 1)
+ {
+ item.GrossAmountTotal = Math.Round((item.GrossAmountTotal ?? 0) * rechnungsanteil, 2, MidpointRounding.AwayFromZero);
+ }
}
return summaryItems;
diff --git a/ReportImp/ChristopherusHausMID/Rechnung.Designer.cs b/ReportImp/ChristopherusHausMID/Rechnung.Designer.cs
index cc5ee9643..d5ce2a2fb 100644
--- a/ReportImp/ChristopherusHausMID/Rechnung.Designer.cs
+++ b/ReportImp/ChristopherusHausMID/Rechnung.Designer.cs
@@ -343,7 +343,7 @@ namespace ChristopherusHausMID
this.xrTableCell32.StylePriority.UsePadding = false;
this.xrTableCell32.StylePriority.UseTextAlignment = false;
this.xrTableCell32.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
- this.xrTableCell32.TextFormatString = "{0:0}%";
+ this.xrTableCell32.TextFormatString = "{0:0.##}%";
this.xrTableCell32.Weight = 1.9334990413834123D;
//
// xrTableCell33
@@ -1095,7 +1095,7 @@ namespace ChristopherusHausMID
this.xrTableCell18.StylePriority.UsePadding = false;
this.xrTableCell18.StylePriority.UseTextAlignment = false;
this.xrTableCell18.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
- this.xrTableCell18.TextFormatString = "{0:0}%";
+ this.xrTableCell18.TextFormatString = "{0:0.##}%";
this.xrTableCell18.Weight = 1.9334990413834123D;
//
// xrTableCell19
diff --git a/ReportImp/ChristopherusHausMID/Rechnung.cs b/ReportImp/ChristopherusHausMID/Rechnung.cs
index bc12ae847..92941ff73 100644
--- a/ReportImp/ChristopherusHausMID/Rechnung.cs
+++ b/ReportImp/ChristopherusHausMID/Rechnung.cs
@@ -48,6 +48,18 @@ namespace ChristopherusHausMID
List poolPositionen = BerechnePoolKinderRechnungen(kind, pRO);
+ foreach (var item in poolPositionen)
+ {
+ item.Betrag5Prozent10 -= ro.MainRechnungsposition.Betrag5Prozent10;
+ item.BetragStunden10 -= ro.MainRechnungsposition.BetragStunden10;
+ item.BetragStunden11 -= ro.MainRechnungsposition.BetragStunden11;
+ item.BetragStunden12 -= ro.MainRechnungsposition.BetragStunden12;
+ item.BetragStunden13 -= ro.MainRechnungsposition.BetragStunden13;
+ item.BetragStunden14 -= ro.MainRechnungsposition.BetragStunden14;
+ item.BetragStunden15 -= ro.MainRechnungsposition.BetragStunden15;
+ item.GesamtBetrag -= ro.MainRechnungsposition.GesamtBetrag;
+
+ }
ro.WeitereRechnungspositionen.AddRange(poolPositionen);
@@ -82,15 +94,8 @@ namespace ChristopherusHausMID
foreach (var item in ip.ServiceInvoiceItems)
{
- decimal betrag = 0;
- if (!String.IsNullOrEmpty(item.GrossAmount))
- {
- if (Decimal.TryParse(item.GrossAmount.Replace("€", "").Trim(), out var b))
- {
- betrag = b;
- }
- }
-
+ decimal betrag = GetBetragFromString(item.GrossAmount);
+
if (!String.IsNullOrEmpty(item.UnitDescription))
{
if (item.UnitDescription == "Faktor 1.0")
@@ -146,12 +151,25 @@ namespace ChristopherusHausMID
span.StartDate = pRO.AccountingPeriodStart;
span.EndDate = pRO.AccountingPeriodEnd;
var fehltage = PoolHelper.GetAbwesenheitsTage(customer, span);
- ro.Fehltage = fehltage;
+ ro.Fehltage = fehltage * -1;
}
}
}
+ private decimal GetBetragFromString(string amount)
+ {
+ decimal betrag = 0;
+ if (!String.IsNullOrEmpty(amount))
+ {
+ if (Decimal.TryParse(amount.Replace("€", "").Trim(), out var b))
+ {
+ betrag = b;
+ }
+ }
+ return betrag;
+ }
+
private List BerechnePoolKinderRechnungen(Customer customer, ServiceInvoiceRO pRO)
{
var positionen = new List();
@@ -174,6 +192,8 @@ namespace ChristopherusHausMID
var newInvoiceRo = ServiceInvoiceRO.Create(MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(invoice));
BerechneRechnungsPositionSummen(poolKind, ro, newInvoiceRo);
+
+ //ro.GesamtBetrag = pRO.cla
ro.Position = position++;
}
}
@@ -194,15 +214,15 @@ namespace ChristopherusHausMID
summenPosition.BetragStunden14 += item.BetragStunden14;
summenPosition.BetragStunden15 += item.BetragStunden15;
- summenPosition.BetreuteStunden10 += item.BetreuteStunden10;
- summenPosition.BetreuteStunden11 += item.BetreuteStunden11;
- summenPosition.BetreuteStunden12 += item.BetreuteStunden12;
- summenPosition.BetreuteStunden13 += item.BetreuteStunden13;
- summenPosition.BetreuteStunden14 += item.BetreuteStunden14;
- summenPosition.BetreuteStunden15 += item.BetreuteStunden15;
+ summenPosition.BetreuteStunden10 = item.BetreuteStunden10;
+ summenPosition.BetreuteStunden11 = item.BetreuteStunden11;
+ summenPosition.BetreuteStunden12 = item.BetreuteStunden12;
+ summenPosition.BetreuteStunden13 = item.BetreuteStunden13;
+ summenPosition.BetreuteStunden14 = item.BetreuteStunden14;
+ summenPosition.BetreuteStunden15 = item.BetreuteStunden15;
summenPosition.GesamtBetrag += item.GesamtBetrag;
- summenPosition.GesamtStunden += item.GesamtStunden;
+ summenPosition.GesamtStunden = item.GesamtStunden;
}
diff --git a/ReportImp/ChristopherusHausMID/Service/CustomOperationService.cs b/ReportImp/ChristopherusHausMID/Service/CustomOperationService.cs
index 176f63db3..396fa0b2a 100644
--- a/ReportImp/ChristopherusHausMID/Service/CustomOperationService.cs
+++ b/ReportImp/ChristopherusHausMID/Service/CustomOperationService.cs
@@ -60,6 +60,11 @@ namespace ChristopherusHausMID.Service
return schule;
}
+ //public override bool HatAbwesenheit(DateTime start, Customer customer)
+ //{
+ // return base.HatAbwesenheit(start, customer);
+ //}
+
protected override IList CreateServiceRecords(Arbeitszeit arbeitszeit, DateTime datum, CostBearer2SupportConcept c2s, ServiceDescription defaultSd, List existingList)
{
var ferien = GetVacationService().GetFerien(datum, "nrw");
diff --git a/Service/Plugins/OperationService.cs b/Service/Plugins/OperationService.cs
index 2f55c4908..0143390f0 100644
--- a/Service/Plugins/OperationService.cs
+++ b/Service/Plugins/OperationService.cs
@@ -101,7 +101,7 @@ namespace BeWo.Service.Plugins
return serviceRecords;
}
- private bool HatAbwesenheit(DateTime start, Customer customer)
+ public virtual bool HatAbwesenheit(DateTime start, Customer customer)
{
foreach (var at in customer.AbsenceTimes)
{
diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs
index fc87ea0ac..c3d0c22fa 100644
--- a/Service/Plugins/PluginLoader.cs
+++ b/Service/Plugins/PluginLoader.cs
@@ -349,7 +349,7 @@ namespace BeWo.Service.Plugins
//t = "6971328056"; // SKM Krefeld
//t = "4199238586"; // MeZ Menden;
//t = "3226307161"; // Roman Roger Puth
- //t = "3522103738"; // AWO Münsterland-Recklinghausen
+ t = "3522103738"; // AWO Münsterland-Recklinghausen
//t = "5592509446"; // Kontakt Verein für psychosoziale Hilfen e.V
//t = "5344902949"; // SHK Service GmbH SBD
//t = "1422963536"; // Malteser-Johanniter-Johanneshaus gGmbH
@@ -408,7 +408,7 @@ namespace BeWo.Service.Plugins
//t = "1159580198"; // Wendepunkt Velbert gGmbH
//t = "5094575560"; // Christopherus Haus MID
//t = "5261046426"; // SelbstWerk EN / Bettina Heckrodt
- t = "6652893693"; // Claudia Heizmann
+ //t = "6652893693"; // Claudia Heizmann
return t;
#else
diff --git a/Service/ServiceImplementations/CustomerServiceImp.cs b/Service/ServiceImplementations/CustomerServiceImp.cs
index 52e3d3e80..e6f1272e9 100644
--- a/Service/ServiceImplementations/CustomerServiceImp.cs
+++ b/Service/ServiceImplementations/CustomerServiceImp.cs
@@ -4139,7 +4139,7 @@ namespace BeWo.Service.ServiceImplementations
var employeeOid = false == user.CheckForRights(new List { UserRightType.ViewAll, UserRightType.CustomerView_View }) ? user.Employee.Oid : null;
- return GetAllActiveCustomersCompact(fetchReferenceNumbers, employeeOid).OrderBy(d => d.LastNameFirstName).ToList();
+ return GetAllActiveCustomersCompact(fetchReferenceNumbers, employeeOid).OrderBy(d => d.LastNameFirstName).Where(c => c.IsRelatedToEmployee || !employeeOid.HasValue).ToList();
}
private static ApplicationUser GetLoggedInUser()