diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index c1e694229..4a61fae4f 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -43,12 +43,12 @@
de-DE
BeWoPlaner
beyondSoft GmbH
- 2.0.1.216
+ 2.0.1.217
true
publish.htm
false
true
- 217
+ 218
2.0.1.%2a
false
true
@@ -776,6 +776,7 @@
+
diff --git a/BeWo/BeWoApp.xaml b/BeWo/BeWoApp.xaml
index 73bca6770..558daf349 100644
--- a/BeWo/BeWoApp.xaml
+++ b/BeWo/BeWoApp.xaml
@@ -60,6 +60,7 @@
+
@@ -108,7 +109,7 @@
-
+
Aus Archiv holen
diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs
index 349833f0a..0bf223ba6 100644
--- a/BeWo/BeWoApp.xaml.cs
+++ b/BeWo/BeWoApp.xaml.cs
@@ -48,8 +48,8 @@ namespace BeWo
public static LoginControl LoginControl;
public static MainControl MainControl;
- public static string ShortVersion = "3.9";
- public static string Version = "Version 3.9";
+ public static string ShortVersion = "3.10";
+ public static string Version = "Version 3.10";
public static int RenderTier = 0;
diff --git a/BeWo/Converter/ArchiveRight2VisibilityConverter.cs b/BeWo/Converter/ArchiveRight2VisibilityConverter.cs
new file mode 100644
index 000000000..d812a90ef
--- /dev/null
+++ b/BeWo/Converter/ArchiveRight2VisibilityConverter.cs
@@ -0,0 +1,47 @@
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+using BS.Shared;
+
+namespace BeWo.Converter
+{
+ public class ArchiveRight2VisibilityConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (parameter == null)
+ {
+ return Visibility.Collapsed;
+ }
+
+ var hasRight = false;
+
+ switch (parameter.ToString())
+ {
+ case "Person":
+ hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.Person_AllowArchiving);
+ break;
+ case "Organisation":
+ hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.Organisation_AllowArchiving);
+ break;
+ case "SupportConcept":
+ hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_AllowArchiving);
+ break;
+ case "Customer":
+ hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_AllowArchiving);
+ break;
+ case "Employee":
+ hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowArchiving);
+ break;
+ }
+
+ return (bool)value && hasRight ? Visibility.Visible : Visibility.Collapsed;
+ }
+
+ public object ConvertBack(object value, Type targetTypes, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs
index c6db1c2ba..f6b831ca1 100644
--- a/BeWo/ServiceProxy/Generated.cs
+++ b/BeWo/ServiceProxy/Generated.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// Dieser Code wurde von einem Tool generiert.
+// Laufzeitversion:4.0.30319.42000
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+// der Code erneut generiert wird.
//
//------------------------------------------------------------------------------
@@ -3859,24 +3859,24 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UpdateBeWoFoldersBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void UpdateBeWoFolders(System.Collections.Generic.List dcs);
- // CODEGEN: Generating message contract since the wrapper name (UploadPackage) of message UploadPackage does not match the default value (UploadDocument)
+ // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadPackage) von Nachricht "UploadPackage" nicht mit dem Standardwert (UploadDocument) übereinstimmt.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UploadDocument", ReplyAction="http://tempuri.org/IStreamingService/UploadDocumentResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UploadDocumentBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BeWo.ServiceProxy.UploadResult UploadDocument(BeWo.ServiceProxy.UploadPackage request);
- // CODEGEN: Generating message contract since the wrapper name (UpdatePackage) of message UpdatePackage does not match the default value (UpdateDocument)
+ // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UpdatePackage) von Nachricht "UpdatePackage" nicht mit dem Standardwert (UpdateDocument) übereinstimmt.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UpdateDocument", ReplyAction="http://tempuri.org/IStreamingService/UpdateDocumentResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UpdateDocumentBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BeWo.ServiceProxy.UploadResult UpdateDocument(BeWo.ServiceProxy.UpdatePackage request);
- // CODEGEN: Generating message contract since the wrapper name (UploadChatPackage) of message UploadChatPackage does not match the default value (CreateNewSpeziallStreamChatMessagesDC)
+ // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadChatPackage) von Nachricht "UploadChatPackage" nicht mit dem Standardwert (CreateNewSpeziallStreamChatMessagesDC) übereinstimmt.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDC", ReplyAction="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDCRespons" +
"e")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDCBeWoFau" +
"ltFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BeWo.ServiceProxy.UploadChatResult CreateNewSpeziallStreamChatMessagesDC(BeWo.ServiceProxy.UploadChatPackage request);
- // CODEGEN: Generating message contract since the wrapper name (UploadPackage) of message UploadPackage does not match the default value (UploadImportFile)
+ // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadPackage) von Nachricht "UploadPackage" nicht mit dem Standardwert (UploadImportFile) übereinstimmt.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UploadImportFile", ReplyAction="http://tempuri.org/IStreamingService/UploadImportFileResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UploadImportFileBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BeWo.ServiceProxy.UploadImportFileResult UploadImportFile(BeWo.ServiceProxy.UploadPackage request);
@@ -8156,6 +8156,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAnalysisService/GetSupportConceptAnalysis3BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List GetSupportConceptAnalysis3(System.Nullable employeeOid, System.Nullable teamOid, System.Nullable catOid, System.Nullable appointedDate, System.Nullable expiredMonths, bool showArchivedScs);
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAnalysisService/GetSupportConceptAnalysis4", ReplyAction="http://tempuri.org/IAnalysisService/GetSupportConceptAnalysis4Response")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAnalysisService/GetSupportConceptAnalysis4BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ System.Collections.Generic.List GetSupportConceptAnalysis4(System.Nullable employeeOid, System.Nullable teamOid, System.Nullable catOid, System.Nullable startDate, System.Nullable endDate, System.Nullable expiredMonths, bool showArchivedScs);
+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAnalysisService/GetSupportConceptsWithConferenceDate", ReplyAction="http://tempuri.org/IAnalysisService/GetSupportConceptsWithConferenceDateResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAnalysisService/GetSupportConceptsWithConferenceDateBeWoFault" +
"Fault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
@@ -8292,6 +8296,11 @@ namespace BeWo.ServiceProxy
return base.Channel.GetSupportConceptAnalysis3(employeeOid, teamOid, catOid, appointedDate, expiredMonths, showArchivedScs);
}
+ public System.Collections.Generic.List GetSupportConceptAnalysis4(System.Nullable employeeOid, System.Nullable teamOid, System.Nullable catOid, System.Nullable startDate, System.Nullable endDate, System.Nullable expiredMonths, bool showArchivedScs)
+ {
+ return base.Channel.GetSupportConceptAnalysis4(employeeOid, teamOid, catOid, startDate, endDate, expiredMonths, showArchivedScs);
+ }
+
public System.Collections.Generic.List GetSupportConceptsWithConferenceDate(System.Nullable employeeOid, System.DateTime conferenceDateUntil)
{
return base.Channel.GetSupportConceptsWithConferenceDate(employeeOid, conferenceDateUntil);
diff --git a/BeWo/View/Detail/AbsenceTimesView.xaml b/BeWo/View/Detail/AbsenceTimesView.xaml
index 28e53daf5..269873f83 100644
--- a/BeWo/View/Detail/AbsenceTimesView.xaml
+++ b/BeWo/View/Detail/AbsenceTimesView.xaml
@@ -88,7 +88,7 @@
-
+
diff --git a/BeWo/View/Detail/AdditionalServiceView.xaml.cs b/BeWo/View/Detail/AdditionalServiceView.xaml.cs
index e240cebc6..48148171e 100644
--- a/BeWo/View/Detail/AdditionalServiceView.xaml.cs
+++ b/BeWo/View/Detail/AdditionalServiceView.xaml.cs
@@ -263,6 +263,7 @@ namespace BeWo.View.Detail
anwesenheiten[booking.Date.Day - 1] = teilnehmer.Value;
+
foreach (var item in TeilnehmerListe.Where(item => item.Customer.CustomerOid.Equals(teilnehmer.Key)))
{
index = TeilnehmerListe.IndexOf(item);
@@ -286,7 +287,12 @@ namespace BeWo.View.Detail
{
customer = new CompactCustomerDC {CustomerOid = 0, FirstName = "Gelöscht", AbsenceTimes = new List()};
}
- TeilnehmerListe.Add(new Teilnehmer(customer, anwesenheiten, bookingRel));
+ //else if (customer.LastName == "Shakaev")
+ //{
+ // int test = 0;
+ //}
+
+ TeilnehmerListe.Add(new Teilnehmer(customer, anwesenheiten, bookingRel));
var klienten = new Dictionary();
foreach (var test2 in TeilnehmerListe)
diff --git a/BeWo/View/Detail/NationalityView.xaml b/BeWo/View/Detail/NationalityView.xaml
index ec141d91e..37f3e6913 100644
--- a/BeWo/View/Detail/NationalityView.xaml
+++ b/BeWo/View/Detail/NationalityView.xaml
@@ -1,13 +1,12 @@
-
-
+
-
+
\ No newline at end of file
diff --git a/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml b/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml
index ec7e4dba2..58b9934c5 100644
--- a/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml
+++ b/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml
@@ -19,9 +19,9 @@
-
-
-
+
+
+
@@ -47,8 +47,9 @@
x:Name="popupedit_team" DeleteButtonVisibility="Collapsed" PopUpClick="popupedit_team_PopUpClick" HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left" Height="22"
Cursor="Arrow" />
-
-
+
+
+
diff --git a/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml.cs b/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml.cs
index d38307863..ebe812013 100644
--- a/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml.cs
+++ b/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml.cs
@@ -28,6 +28,8 @@ namespace BeWo.View.Detail.Report
{
this.InitializeComponent();
+ this.datepicker_startdate.AllowNullInput = true;
+ this.datepicker_startdate.EditValue = null;
this.datepicker_appointeddate.AllowNullInput = true;
this.datepicker_appointeddate.EditValue = null;
@@ -189,6 +191,8 @@ namespace BeWo.View.Detail.Report
}
if (datepicker_appointeddate.EditValue != null)
url += "&date=" + String.Format("{0:d}", datepicker_appointeddate.DateTime);
+ if (datepicker_startdate.EditValue != null)
+ url += "&start=" + String.Format("{0:d}", datepicker_startdate.DateTime);
url = BeWoWpfUtils.GetHTMLEncodedURL(url);
this.linkPdfExport.NavigateUri = new Uri(url);
@@ -199,10 +203,12 @@ namespace BeWo.View.Detail.Report
private void buttonRefresh_Click(object sender, RoutedEventArgs e)
{
//this.UpdateReportUrl();
-
- DateTime? dt = null;
+ DateTime? startdate = null;
+ DateTime? enddate = null;
if (this.datepicker_appointeddate.EditValue != null)
- dt = this.datepicker_appointeddate.DateTime;
+ enddate = this.datepicker_appointeddate.DateTime;
+ if (this.datepicker_startdate.EditValue != null)
+ startdate = this.datepicker_startdate.DateTime;
int? months = null;
@@ -230,8 +236,7 @@ namespace BeWo.View.Detail.Report
catOid = cat.ServiceCategoryOid.Value;
}
- ServiceFacade.DoAnalysisServiceAsync(
- s => s.GetSupportConceptAnalysis3(eOid, tOid, catOid, dt, months, showArchived),
+ ServiceFacade.DoAnalysisServiceAsync(s => s.GetSupportConceptAnalysis4(eOid, tOid, catOid, startdate, enddate, months, showArchived),
r =>
{
this.Dispatch(
diff --git a/BeWo/View/Master/AdministrationView.xaml.cs b/BeWo/View/Master/AdministrationView.xaml.cs
index 57a71a4a5..cb2978b6e 100644
--- a/BeWo/View/Master/AdministrationView.xaml.cs
+++ b/BeWo/View/Master/AdministrationView.xaml.cs
@@ -304,7 +304,7 @@ namespace BeWo.View.Master
case nameof(TabitemNationality):
VMFactory.CreateValueListVMAsync(ValueListEntryType.Nationality,
natList =>
- this.Dispatch(() => AddView(TabitemNationality, new NationalityView(natList))));
+ this.Dispatch(() => AddView(TabitemNationality, new ValueListView(natList))));
return;
case nameof(TabitemAufenthaltsstatus):
VMFactory.CreateValueListVMAsync(ValueListEntryType.Aufenthaltsstatus,
diff --git a/BeWo/View/Navigation/CustomerNavigationView.xaml b/BeWo/View/Navigation/CustomerNavigationView.xaml
index 251f60c23..e147197ec 100644
--- a/BeWo/View/Navigation/CustomerNavigationView.xaml
+++ b/BeWo/View/Navigation/CustomerNavigationView.xaml
@@ -60,8 +60,8 @@
Reaktivieren
-
-
+
+
Aus Archiv holen
diff --git a/BeWoPlanerMobil/Controllers/ChatController.cs b/BeWoPlanerMobil/Controllers/ChatController.cs
index 1119595ef..f88c5b6f0 100644
--- a/BeWoPlanerMobil/Controllers/ChatController.cs
+++ b/BeWoPlanerMobil/Controllers/ChatController.cs
@@ -44,9 +44,10 @@ namespace BeWoPlanerMobil.Controllers
return serverUrl;
}
- public ActionResult GetRssFeed(string k)
+ public ActionResult GetRssFeed()
{
- try {
+ try
+ {
string url = "https://apps.ownsoft.de/news/rss?evplaner[base_cat]=55";
WebRequest request = WebRequest.Create(url);
diff --git a/Report/ReportObjects/FinanceRO.cs b/Report/ReportObjects/FinanceRO.cs
index e35a7c8db..2e1859bdf 100644
--- a/Report/ReportObjects/FinanceRO.cs
+++ b/Report/ReportObjects/FinanceRO.cs
@@ -86,7 +86,13 @@ namespace BeWo.Report.ReportObjects
}
- public static FinanceRO Create(DateTime? start, DateTime? end, bool onlyNotApproved)
+ public static FinanceRO Create(DateTime? start, DateTime? end)
+ {
+
+ return Create(start, end, false);
+ }
+
+ public static FinanceRO Create(DateTime? start, DateTime? end, bool onlyNotApproved)
{
return Create(start, end, false, onlyNotApproved);
diff --git a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs
index e85fe4ad4..188bfa7d2 100644
--- a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs
+++ b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs
@@ -1652,7 +1652,7 @@ namespace BeWo.Report.ReportObjects
if (faktor < 1 && day.DayOfWeek != DayOfWeek.Saturday && day.DayOfWeek != DayOfWeek.Sunday)
{
var sollDiesenTag = ed.SollProTag;
-
+
var c = ed.Employee.GetValidContractForDate(dd.Date);
if (c != null)
{
@@ -1675,17 +1675,14 @@ namespace BeWo.Report.ReportObjects
sollDiesenTag = BerechneAlleAbwesenheitsStundenFuerArbeitszeiten(ed.Employee, dd.Date);
}
- if (span.StartDate.Hour > 0 && span.EndDate.Hour > 0)
- {
- var ts = span.EndDate.Subtract(span.StartDate);
- sollDiesenTag -= ts.Hours;
- if (sollDiesenTag < 0)
- {
- sollDiesenTag = 0;
- }
- faktor = 1; // Keine halben Feiertag berücksichtigen, wenn die Abwesenheit in Stunden angegeben wurde
+
+
+ if (!IstAnrechenbareAbsenceTime(absenceTime))
+ {
+ sollDiesenTag = 0;
}
+
if (ed.AbsenceTimeDays != null && ed.AbsenceTimeDays.TageProWocheDict != null)
{
if (ed.AbsenceTimeDays.RestStundenProWocheDict == null)
@@ -1716,6 +1713,24 @@ namespace BeWo.Report.ReportObjects
}
}
}
+
+ var abwesenheitsDauer = sollDiesenTag;
+ if (span.StartDate.Hour > 0 && span.EndDate.Hour > 0)
+ {
+ var ts = span.EndDate.Subtract(span.StartDate);
+ sollDiesenTag -= ts.Hours;
+ if (sollDiesenTag < 0)
+ {
+ sollDiesenTag = 0;
+ }
+ abwesenheitsDauer = ts.Hours;
+ if (abwesenheitsDauer > sollDiesenTag)
+ {
+ abwesenheitsDauer = sollDiesenTag;
+ }
+ faktor = 1; // Keine halben Feiertag berücksichtigen, wenn die Abwesenheit in Stunden angegeben wurde
+
+ }
decimal maxSoll = sollDiesenTag;
if (faktor != 0)
{
@@ -1725,11 +1740,11 @@ namespace BeWo.Report.ReportObjects
{ // Vermutlich diese Methode in CustomMitarbeiterStundenKontoBerechnung überschreiben und hier Prüfung machen, ob absenceReason ohne Fortzahlung ist
//und wenn ja, HoursSick oder Soll oder so für den Tag auf 0 setzen
- dd.HoursInVacation = sollDiesenTag;
+ dd.HoursInVacation = abwesenheitsDauer;
}
else if (IsKrankheitAbsenceTime(absenceTime))
{
- dd.HoursSick = sollDiesenTag;
+ dd.HoursSick = abwesenheitsDauer;
}
else
{
diff --git a/ReportImp/Bewolonia/Bewolonia.csproj b/ReportImp/Bewolonia/Bewolonia.csproj
index 3bd2a905c..0560c8efd 100644
--- a/ReportImp/Bewolonia/Bewolonia.csproj
+++ b/ReportImp/Bewolonia/Bewolonia.csproj
@@ -101,8 +101,5 @@
Designer
-
-
-
\ No newline at end of file
diff --git a/ReportImp/BrueckeABW/BrueckeABWMitarbeiterstundenkontoBerechnung.cs b/ReportImp/BrueckeABW/BrueckeABWMitarbeiterstundenkontoBerechnung.cs
index a2a6caae6..5414ad011 100644
--- a/ReportImp/BrueckeABW/BrueckeABWMitarbeiterstundenkontoBerechnung.cs
+++ b/ReportImp/BrueckeABW/BrueckeABWMitarbeiterstundenkontoBerechnung.cs
@@ -8,6 +8,21 @@ namespace BeWo.BrueckeABW
{
public class BrueckeABWMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
{
+ public override bool ShouldCreateDayDetails()
+ {
+ return true;
+ }
+
+ public override MitarbeiterstundenkontoRO.DayDetail CreateDayDetail(DateTime date, MitarbeiterstundenkontoRO.EmployeeDetail ed)
+ {
+ var dd = base.CreateDayDetail(date, ed);
+ dd.MaxHoursUntilBreak = null;
+ dd.MaxHoursUntilBreak2 = null;
+ dd.BreakMinutes = null;
+ dd.BreakMinutes2 = null;
+ return dd;
+ }
+
public override bool AddServiceRecordToDuration(ServiceRecord item)
{
if (item.ServiceDescription != null && !String.IsNullOrEmpty(item.ServiceDescription.Name) && item.ServiceDescription.Name.ToLower().IndexOf("overhead") >= 0)
diff --git a/ReportImp/BrueckeABW/Mitarbeiterarbeitszeitkonto.cs b/ReportImp/BrueckeABW/Mitarbeiterarbeitszeitkonto.cs
index 845b3506e..50df5393a 100644
--- a/ReportImp/BrueckeABW/Mitarbeiterarbeitszeitkonto.cs
+++ b/ReportImp/BrueckeABW/Mitarbeiterarbeitszeitkonto.cs
@@ -13,6 +13,7 @@ namespace BeWo.BrueckeABW
[IDSpecificClass(Identifier = "Mitarbeiterarbeitszeitkonto")]
public partial class Mitarbeiterarbeitszeitkonto : DevExpress.XtraReports.UI.XtraReport, IBeWoReport
{
+
public Mitarbeiterarbeitszeitkonto()
{
InitializeComponent();
diff --git a/ReportImp/BrueckeABW/Mitarbeiterarbeitszeitkonto.designer.cs b/ReportImp/BrueckeABW/Mitarbeiterarbeitszeitkonto.designer.cs
index 77aa70058..1a0b37f81 100644
--- a/ReportImp/BrueckeABW/Mitarbeiterarbeitszeitkonto.designer.cs
+++ b/ReportImp/BrueckeABW/Mitarbeiterarbeitszeitkonto.designer.cs
@@ -115,6 +115,7 @@ namespace BeWo.BrueckeABW
this.fieldSumHoliday2 = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldIstArbeitszeit = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldUeberstundenGesamt = new DevExpress.XtraReports.UI.CalculatedField();
+ this.ruleIstFeiertagOderWE = new DevExpress.XtraReports.UI.FormattingRule();
((System.ComponentModel.ISupportInitialize)(this.xrTableDetail)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableHeader)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
@@ -162,6 +163,7 @@ namespace BeWo.BrueckeABW
this.xrTableCell31,
this.xrTableCell67,
this.xrTableCell27});
+ this.xrTableRowDetail.FormattingRules.Add(this.ruleIstFeiertagOderWE);
this.xrTableRowDetail.Name = "xrTableRowDetail";
this.xrTableRowDetail.Weight = 0.88D;
//
@@ -972,6 +974,13 @@ namespace BeWo.BrueckeABW
this.fieldUeberstundenGesamt.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldUeberstundenGesamt.Name = "fieldUeberstundenGesamt";
//
+ // ruleIstFeiertagOderWE
+ //
+ this.ruleIstFeiertagOderWE.Condition = "[IstFeiertag] Or [IstSamstag] Or [IstSonntag]";
+ this.ruleIstFeiertagOderWE.DataMember = "EmployeeDetailList.Days";
+ this.ruleIstFeiertagOderWE.Formatting.BackColor = System.Drawing.Color.LightSteelBlue;
+ this.ruleIstFeiertagOderWE.Name = "ruleIstFeiertagOderWE";
+ //
// Mitarbeiterarbeitszeitkonto
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -994,6 +1003,8 @@ namespace BeWo.BrueckeABW
this.DataSource = this.bindingSource1;
this.DisplayName = "Mitarbeiterstundenkonto";
this.Font = new System.Drawing.Font("Arial", 8F);
+ this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
+ this.ruleIstFeiertagOderWE});
this.Margins = new System.Drawing.Printing.Margins(75, 50, 50, 50);
this.PageHeight = 1169;
this.PageWidth = 827;
@@ -1097,5 +1108,6 @@ namespace BeWo.BrueckeABW
private DevExpress.XtraReports.UI.XRTableCell xrTableCell28;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell23;
private DevExpress.XtraReports.UI.CalculatedField fieldUeberstundenGesamt;
+ private DevExpress.XtraReports.UI.FormattingRule ruleIstFeiertagOderWE;
}
}
diff --git a/ReportImp/ChristinaFrommen/CustomMitarbeiterstundenkontoBerechnung.cs b/ReportImp/ChristinaFrommen/CustomMitarbeiterstundenkontoBerechnung.cs
index 17bed3af6..128119141 100644
--- a/ReportImp/ChristinaFrommen/CustomMitarbeiterstundenkontoBerechnung.cs
+++ b/ReportImp/ChristinaFrommen/CustomMitarbeiterstundenkontoBerechnung.cs
@@ -25,17 +25,17 @@ namespace ChristinaFrommen
return dd;
}
- //public override bool AddServiceRecordToDuration(ServiceRecord item)
- //{
- // if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
- // {
- // if (item.ServiceDescription.ServiceCategory.Name == "Dienstzeiten")
- // {
- // return true;
- // }
- // }
- // return false;
- //}
+ public override bool AddServiceRecordToDuration(ServiceRecord item)
+ {
+ if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
+ {
+ if (item.ServiceDescription.ServiceCategory.Name == "Arbeitszeit")
+ {
+ return true;
+ }
+ }
+ return false;
+ }
protected override ServiceRecordSummary BerechneStunden(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, IList groupFilteredRecords, DateTime berichtsAnfang,
DateTime berichtsEnde)
diff --git a/ReportImp/FAMRheinSiegGbr/FAMRheinSiegGbr.csproj b/ReportImp/FAMRheinSiegGbr/FAMRheinSiegGbr.csproj
index 6d753b468..88ce9adb4 100644
--- a/ReportImp/FAMRheinSiegGbr/FAMRheinSiegGbr.csproj
+++ b/ReportImp/FAMRheinSiegGbr/FAMRheinSiegGbr.csproj
@@ -80,8 +80,5 @@
-
-
-
\ No newline at end of file
diff --git a/ReportImp/HilfeDaheimHandInHand/HilfeDaheimHandInHand.csproj b/ReportImp/HilfeDaheimHandInHand/HilfeDaheimHandInHand.csproj
index 6b26fc4bc..837e57906 100644
--- a/ReportImp/HilfeDaheimHandInHand/HilfeDaheimHandInHand.csproj
+++ b/ReportImp/HilfeDaheimHandInHand/HilfeDaheimHandInHand.csproj
@@ -55,12 +55,6 @@
Quittierungsbeleg.cs
-
- Component
-
-
- ServicesOverviewReport.cs
-
Component
@@ -92,9 +86,6 @@
Quittierungsbeleg.cs
Designer
-
- ServicesOverviewReport.cs
-
SettlementReport.cs
diff --git a/ReportImp/HphBersenbrueckFreizeitUndReisen/Export/MicosExporter.cs b/ReportImp/HphBersenbrueckFreizeitUndReisen/Export/MicosExporter.cs
index 3b30e52a4..0eccd87c0 100644
--- a/ReportImp/HphBersenbrueckFreizeitUndReisen/Export/MicosExporter.cs
+++ b/ReportImp/HphBersenbrueckFreizeitUndReisen/Export/MicosExporter.cs
@@ -4,6 +4,7 @@ using System.Data;
using System.IO;
using System.Text;
using BeWo.Data.Access;
+using BS.Shared.Core;
using BS.Shared.DataContracts;
namespace HphBersenbrueckFreizeitUndReisen.Export
@@ -17,7 +18,23 @@ namespace HphBersenbrueckFreizeitUndReisen.Export
DateTime.TryParse(query.Parameter[0].Value.ToString(), out dt);
query.FileName = String.Format("Micos Export {0:yyyyMM}.txt", dt);
- query.QueryResult = GetAbrechnungenString(dt);
+
+ DateTime dtStart = DateTime.MinValue;
+ DateTime dtEnd = DateTime.MaxValue;
+
+ if (query.Parameter.Count > 1)
+ {
+ DateTimeSpan span = query.Parameter[1].Value as DateTimeSpan;
+
+ dtStart = span.StartDate;
+ dtEnd = span.EndDate;
+ }
+
+ if (dtStart == DateTime.MinValue)
+ {
+ dtStart = new DateTime(1900, 1, 1);
+ }
+ query.QueryResult = GetAbrechnungenString(dt, dtStart, dtEnd);
return query;
@@ -31,7 +48,7 @@ namespace HphBersenbrueckFreizeitUndReisen.Export
DateTime.TryParse(pHeaderCaption[1], out dt);
- return GetAbrechnungenString(dt);
+ return GetAbrechnungenString(dt, dt, dt);
}
@@ -39,10 +56,10 @@ namespace HphBersenbrueckFreizeitUndReisen.Export
return null;
}
- public static String GetAbrechnungenString(DateTime date)
+ public static String GetAbrechnungenString(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis)
{
StringBuilder sb = new StringBuilder();
- var s = GetMonatlicheAbrechnungLvrString(date);
+ var s = GetMonatlicheAbrechnungLvrString(date, rechnungsDatumVon, rechnungsDatumBis);
if (!String.IsNullOrWhiteSpace(s))
{
sb.Append(s);
@@ -67,11 +84,11 @@ namespace HphBersenbrueckFreizeitUndReisen.Export
return sb.ToString();
}
- public static String GetMonatlicheAbrechnungLvrString(DateTime date)
+ public static String GetMonatlicheAbrechnungLvrString(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis)
{
- var sql = GetRechnungenSql(date);
+ var sql = GetRechnungenSql(date, rechnungsDatumVon, rechnungsDatumBis);
/*
* SELECT
@@ -85,12 +102,12 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
var dt = ExecuteQuery(sql, date);
- var data = CreateMicosDatensaetze(dt, date);
+ var datensaetze = CreateMicosDatensaetze(dt, date);
StringBuilder sb = new StringBuilder();
- foreach (DataRow row in dt.Rows)
+ foreach (var data in datensaetze)
{
if (sb.Length > 0)
@@ -100,15 +117,11 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
//03002022021500070EURO990037107S000001767690004050 15022200037810037200 RE R03-781 DAK-Gesundhei 00000000
sb.Append("0300");
- sb.Append(String.Format("{0:yyyyMMdd}", date));
+ sb.Append(String.Format("{0:yyyyMMdd}", data.Datum));
sb.Append("00070");
sb.Append("EURO99");
- if (row[2] == null)
- {
- int test = 0;
- }
- String debitornr = String.Format("{0}", row[2]); // Debitor
+ String debitornr = data.Debitor;
while (debitornr.Length < 7)
{
@@ -117,7 +130,7 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
sb.Append(debitornr);
sb.Append("H");
- String betrag = String.Format("{0:0.00}", row[3]).Replace(",", ""); // Betrag
+ String betrag = String.Format("{0:0.00}", data.Betrag).Replace(",", ""); // Betrag
while (betrag.Length < 11)
{
betrag = "0" + betrag;
@@ -125,9 +138,9 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
sb.Append(betrag);
sb.Append("0004050");
sb.Append(" ");
- sb.Append(String.Format("{0:ddMMyy}", row[4])); // Belegdatum
+ sb.Append(String.Format("{0:ddMMyy}", data.RechnungsDatum)); // Belegdatum
- String belegnummer = String.Format("{0}", row[1]); // Belegnummer
+ String belegnummer = data.Belegnummer; // Belegnummer
while (belegnummer.Length < 7)
{
@@ -135,7 +148,7 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
}
sb.Append(belegnummer);
- String kostenstelle = GetKostenstelle(row);
+ String kostenstelle = data.Kostenstelle;
while (kostenstelle.Length < 7)
{
kostenstelle = "0" + kostenstelle;
@@ -146,7 +159,7 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
sb.Append(" "); // Textschlüssel 2 Leerzeichen
sb.Append(" "); // Zusatz-Schlüssel 1 Leerzeichen
- String buchungstext = String.Format("{0}", row[5]); // Verwendungszweck
+ String buchungstext = data.Buchungstext; // Verwendungszweck
if (buchungstext.Length > 25)
{
buchungstext = buchungstext.Substring(0, 25);
@@ -169,6 +182,8 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
sb.Append(" "); // Kennzeichen Bankeinzug 1 Leerzeichen
sb.Append("000000");
sb.Append("00");
+
+ sb.Append(data.Artikelbezeichnung);
}
return sb.ToString();
@@ -178,23 +193,74 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
private static IList CreateMicosDatensaetze(DataTable dt, DateTime date)
{
var list = new List();
- var artikel2Datensatz = new Dictionary();
+ var key2Datensatz = new Dictionary();
foreach (DataRow row in dt.Rows)
{
-
+
//date = letzter Tag des Monats ()
-
+ long oid = 0;
+ if (row[7] != null)
+ {
+ Int64.TryParse(row[7].ToString(), out oid);
+ }
+
String debitornr = String.Format("{0}", row[2]); // Debitor
- String betrag = String.Format("{0:0.00}", row[3]).Replace(",", ""); // Betrag
- //sb.Append(String.Format("{0:ddMMyy}", row[4])); // Belegdatum
+ decimal betrag = 0;
+
+ if (row[3] != null)
+ {
+ Decimal.TryParse(row[3].ToString(), out betrag);
+ }
+
+ DateTime rd = date;
+
+ if (row[4] != null)
+ {
+ DateTime.TryParse(row[4].ToString(), out rd);
+ }
+
+ DateTime abrechnungsEnddatum = date;
+
+ if (row[8] != null)
+ {
+ DateTime.TryParse(row[8].ToString(), out abrechnungsEnddatum);
+ }
String belegnummer = String.Format("{0}", row[1]); // Belegnummer
String kostenstelle = GetKostenstelle(row);
String buchungstext = String.Format("{0}", row[5]); // Verwendungszweck
-
+
+ String artikel = String.Format("{0}", row[6]); // Verwendungszweck
+
+ MicosDatensatz md = null;
+ String key = String.Format("{0}_{1}", oid, artikel);
+
+ if (key2Datensatz.ContainsKey(key))
+ {
+ md = key2Datensatz[key];
+ }
+ else
+ {
+ md = new MicosDatensatz();
+ md.InvoiceBaseOid = oid;
+ md.Artikelbezeichnung = artikel;
+ md.Belegnummer = belegnummer;
+ md.Buchungstext = buchungstext;
+ md.Kostenstelle = kostenstelle;
+ md.Debitor = debitornr;
+ md.Datum = abrechnungsEnddatum;
+ md.RechnungsDatum = rd;
+
+ key2Datensatz.Add(key, md);
+ list.Add(md);
+
+ }
+ md.Betrag += betrag;
+
+
}
return list;
@@ -533,8 +599,21 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
// return sql;
// }
- private static String GetRechnungenSql(DateTime date)
+ private static String GetRechnungenSql(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis)
{
+ if (rechnungsDatumVon <= new DateTime(1900, 1, 1))
+ {
+ rechnungsDatumVon = new DateTime(date.Year, date.Month, 1);
+ }
+ if (rechnungsDatumBis.Year > 9000)
+ {
+ rechnungsDatumBis = new DateTime(date.Year, date.Month, 1).AddMonths(1);
+ }
+ else
+ {
+ rechnungsDatumBis = rechnungsDatumBis.AddDays(1);
+ }
+
String sql = @"
SELECT
@@ -544,7 +623,9 @@ c.DebitorNumber,
Round(ii.AmountTotal, 2) AS 'Betrag',
ib.InvoiceDate,
CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', ii.ItemDescription) as 'Verwendung',
-ii.ItemDescription
+ii.ItemDescription,
+ib.Oid,
+ib.AccountingPeriodEnd
FROM `supportconcept` sc
INNER JOIN `costbearer2supportconcept` cb2sc ON sc.`Oid` = cb2sc.`SupportConceptOid`
INNER JOIN `costbearer` cb ON cb2sc.`CostBearerOid` = cb.`Oid`
@@ -560,6 +641,8 @@ and ib.`InvoiceDate` >= ':Monat_Start' AND ib.`InvoiceDate` < ':Monat_End'
ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate`
";
+ sql = sql.Replace(":Monat_Start", String.Format("{0:yyyy-MM-dd}", rechnungsDatumVon));
+ sql = sql.Replace(":Monat_End", String.Format("{0:yyyy-MM-dd}", rechnungsDatumBis));
return sql;
}
@@ -833,7 +916,12 @@ ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate`
}
class MicosDatensatz
{
+ public long InvoiceBaseOid { get; set; }
+
public DateTime Datum { get; set; }
+
+ public DateTime RechnungsDatum { get; set; }
+
public String Debitor { get; set; }
public decimal Betrag { get; set; }
diff --git a/ReportImp/IBPReports/Budgetnachweis.Designer.cs b/ReportImp/IBPReports/Budgetnachweis.Designer.cs
index 0f5ab65c7..47fb71820 100644
--- a/ReportImp/IBPReports/Budgetnachweis.Designer.cs
+++ b/ReportImp/IBPReports/Budgetnachweis.Designer.cs
@@ -409,9 +409,9 @@ namespace IBPReports
this.lblAbsender.Name = "lblAbsender";
this.lblAbsender.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAbsender.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink;
- this.lblAbsender.SizeF = new System.Drawing.SizeF(309.1667F, 61.37498F);
+ this.lblAbsender.SizeF = new System.Drawing.SizeF(309.1667F, 74.56943F);
this.lblAbsender.StylePriority.UseFont = false;
- this.lblAbsender.Text = "Alexianer IBP GmbH";
+ this.lblAbsender.Text = "Alexianer IBP GmbH\r\nNeutorstr. 5\r\n48653 Coesfeld";
//
// xrLabel11
//
diff --git a/ReportImp/IBPReports/IBPReportCreator.cs b/ReportImp/IBPReports/IBPReportCreator.cs
index 3d1e90507..e14b53151 100644
--- a/ReportImp/IBPReports/IBPReportCreator.cs
+++ b/ReportImp/IBPReports/IBPReportCreator.cs
@@ -96,7 +96,7 @@ namespace BeWo.IBPReports
{
var ib = DAOFactory.GenericDAO.LoadByID(ibOid.Value);
string cbName = ib.CostBearer2SupportConcept.CostBearer.Organisation.Name;
- if (cbName.Contains("Landschaftsverband Westfalen-Lippe") || cbName == "LWL")
+ if (cbName.Contains("Landschaftsverband Westfalen-Lippe") || cbName.StartsWith("LWL "))
return base.CreateSettlementReport(null, ibOid, true);
}
diff --git a/ReportImp/InFamiliaGbr/InFamiliaGbr.csproj b/ReportImp/InFamiliaGbr/InFamiliaGbr.csproj
index 46b59150e..ee2456a8a 100644
--- a/ReportImp/InFamiliaGbr/InFamiliaGbr.csproj
+++ b/ReportImp/InFamiliaGbr/InFamiliaGbr.csproj
@@ -80,8 +80,5 @@
StundennachweisJA.cs
-
-
-
\ No newline at end of file
diff --git a/ReportImp/Kette2/Kette2.csproj b/ReportImp/Kette2/Kette2.csproj
index 0d8f381cf..967c989c1 100644
--- a/ReportImp/Kette2/Kette2.csproj
+++ b/ReportImp/Kette2/Kette2.csproj
@@ -70,6 +70,9 @@
false
+
+ False
+
diff --git a/ReportImp/KoelnerBeWoSelbstbestimmtLeben/KoelnerBeWoSelbstbestimmtLeben.csproj b/ReportImp/KoelnerBeWoSelbstbestimmtLeben/KoelnerBeWoSelbstbestimmtLeben.csproj
index 881d23c5b..0c901b4cb 100644
--- a/ReportImp/KoelnerBeWoSelbstbestimmtLeben/KoelnerBeWoSelbstbestimmtLeben.csproj
+++ b/ReportImp/KoelnerBeWoSelbstbestimmtLeben/KoelnerBeWoSelbstbestimmtLeben.csproj
@@ -81,8 +81,5 @@
Designer
-
-
-
\ No newline at end of file
diff --git a/ReportImp/LebenshilfeDuisburgBeWo/Stundenkonto/CustomMitarbeiterstundenkontoBerechnung.cs b/ReportImp/LebenshilfeDuisburgBeWo/Stundenkonto/CustomMitarbeiterstundenkontoBerechnung.cs
index 225da78c7..aab8ce223 100644
--- a/ReportImp/LebenshilfeDuisburgBeWo/Stundenkonto/CustomMitarbeiterstundenkontoBerechnung.cs
+++ b/ReportImp/LebenshilfeDuisburgBeWo/Stundenkonto/CustomMitarbeiterstundenkontoBerechnung.cs
@@ -10,7 +10,10 @@ namespace LebenshilfeDuisburg.Stundenkonto
{
public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
{
-
+ public override bool IstAnrechenbareAbsenceTime(AbsenceTime item)
+ {
+ return item.AbsenceReason.Description != "XÜ";
+ }
public override List GetFeiertage(int year)
{
var list = base.GetFeiertage(year);
diff --git a/ReportImp/LebenshilfeFrankfurtOder/RechnungFud.cs b/ReportImp/LebenshilfeFrankfurtOder/RechnungFud.cs
index 8d9fe00bb..e58fcd861 100644
--- a/ReportImp/LebenshilfeFrankfurtOder/RechnungFud.cs
+++ b/ReportImp/LebenshilfeFrankfurtOder/RechnungFud.cs
@@ -216,70 +216,74 @@ namespace LebenshilfeFrankfurtOder
private void CheckLastschriftAndAnschrift(ServiceInvoiceRO pRO)
{
- Customer c = null;
- if (pRO.CustomerOid.HasValue)
+ if (pRO.InvoiceId == "RechnungFudPrivat")
{
- c = DAOFactory.GenericDAO.LoadByID(pRO.CustomerOid.Value);
- }
- if (c == null)
- {
- if (pRO.ServiceInvoicePeriods.Count > 0)
+
+
+ Customer c = null;
+ if (pRO.CustomerOid.HasValue)
{
- var c2s = pRO.ServiceInvoicePeriods[0].CostBearer2SupportConcept;
- c = c2s.SupportConcept.Customer;
+ c = DAOFactory.GenericDAO.LoadByID(pRO.CustomerOid.Value);
}
- }
-
- bool lastschrift = false;
- String mandatsnr = pRO.DebitorNumber;
-
- if (c != null)
- {
- foreach (var vv in c.VarFieldValueList)
+ if (c == null)
{
- if (vv.VarFieldDefOid.Value == 1)
+ if (pRO.ServiceInvoicePeriods.Count > 0)
{
- var varFieldValue = BS.Shared.Core.Utils.XMLDeserializeFromString(vv.SerializedValue, Type.GetType(vv.TypeName));
- if (varFieldValue != null)
- {
- var isLastschrift = varFieldValue.ToString();
+ var c2s = pRO.ServiceInvoicePeriods[0].CostBearer2SupportConcept;
+ c = c2s.SupportConcept.Customer;
+ }
+ }
- if (!String.IsNullOrEmpty(isLastschrift) && isLastschrift == "True")
+ bool lastschrift = false;
+ String mandatsnr = pRO.DebitorNumber;
+
+ if (c != null)
+ {
+ foreach (var vv in c.VarFieldValueList)
+ {
+ if (vv.VarFieldDefOid.Value == 1)
+ {
+ var varFieldValue = BS.Shared.Core.Utils.XMLDeserializeFromString(vv.SerializedValue, Type.GetType(vv.TypeName));
+ if (varFieldValue != null)
{
- lastschrift = true;
+ var isLastschrift = varFieldValue.ToString();
+
+ if (!String.IsNullOrEmpty(isLastschrift) && isLastschrift == "True")
+ {
+ lastschrift = true;
+ }
+
}
-
}
- }
- if (vv.VarFieldDefOid.Value == 2)
- {
- var varFieldValue = BS.Shared.Core.Utils.XMLDeserializeFromString(vv.SerializedValue, Type.GetType(vv.TypeName));
- if (varFieldValue != null)
+ if (vv.VarFieldDefOid.Value == 2)
{
- mandatsnr = varFieldValue.ToString();
+ var varFieldValue = BS.Shared.Core.Utils.XMLDeserializeFromString(vv.SerializedValue, Type.GetType(vv.TypeName));
+ if (varFieldValue != null)
+ {
+ mandatsnr = varFieldValue.ToString();
+ }
}
}
+
+ //if (c.Person.InvoiceAddress != null && !String.IsNullOrEmpty(c.Person.InvoiceAddress.AddressLine1))
+ //{
+ // pRO.RecipientAddressLine1 = c.Person.InvoiceAddress.AddressLine1;
+ //}
}
- //if (c.Person.InvoiceAddress != null && !String.IsNullOrEmpty(c.Person.InvoiceAddress.AddressLine1))
- //{
- // pRO.RecipientAddressLine1 = c.Person.InvoiceAddress.AddressLine1;
- //}
- }
+ if (lastschrift)
+ {
+ lblBezahlungText.Text =
+ String.Format("Der Rechnungsbetrag wird von dem uns bekannten Konto abgezogen. Mandatsnummer: {0}",
+ mandatsnr);
+ }
- if (lastschrift)
- {
- lblBezahlungText.Text =
- String.Format("Der Rechnungsbetrag wird von dem uns bekannten Konto abgezogen. Mandatsnummer: {0}",
- mandatsnr);
+ if (!String.IsNullOrEmpty(pRO.Notice))
+ {
+ lblBezahlungText.Text = String.Format("{0}\n\n{1}", pRO.Notice, lblBezahlungText.Text);
+ }
}
-
- if (!String.IsNullOrEmpty(pRO.Notice))
- {
- lblBezahlungText.Text = String.Format("{0}\n\n{1}", pRO.Notice, lblBezahlungText.Text);
- }
-
}
}
}
\ No newline at end of file
diff --git a/ReportImp/PerspektivenEV/PerspektivenEV.csproj b/ReportImp/PerspektivenEV/PerspektivenEV.csproj
index 2518ca06c..618fcbf07 100644
--- a/ReportImp/PerspektivenEV/PerspektivenEV.csproj
+++ b/ReportImp/PerspektivenEV/PerspektivenEV.csproj
@@ -131,7 +131,6 @@
InvoiceCustomerReport.cs
Designer
-
Quittierungsbeleg.cs
Designer
diff --git a/ReportImp/SynpraxReports/CustomSupportConceptAnalysisCreator.cs b/ReportImp/SynpraxReports/CustomSupportConceptAnalysisCreator.cs
index d56c69c76..c0f095723 100644
--- a/ReportImp/SynpraxReports/CustomSupportConceptAnalysisCreator.cs
+++ b/ReportImp/SynpraxReports/CustomSupportConceptAnalysisCreator.cs
@@ -19,17 +19,16 @@ namespace SynpraxReports
{
public class CustomSupportConceptAnalysisCreator : SupportConceptAnalysisCreator
{
- public override List GetSupportConceptAnalysis2(IList c2sOids, long? employeeOid, long? teamOid, long? catOid, DateTime? appointedDate,
+ public override List GetSupportConceptAnalysis2(IList c2sOids, long? employeeOid, long? teamOid, long? catOid, DateTime? startDate, DateTime? endDate,
int? expiredMonths, bool showArchivedScs)
{
- var liste = base.GetSupportConceptAnalysis2(c2sOids, employeeOid, teamOid, catOid, appointedDate, expiredMonths,
- showArchivedScs);
+ var liste = base.GetSupportConceptAnalysis2(c2sOids, employeeOid, teamOid, catOid, startDate, endDate, expiredMonths, showArchivedScs);
; DateTime dt = DateTime.Now;
- if (appointedDate.HasValue)
+ if (endDate.HasValue)
{
- dt = appointedDate.Value;
+ dt = endDate.Value;
}
List result = new List();
diff --git a/Service/Plugins/SupportConceptAnalysisCreator.cs b/Service/Plugins/SupportConceptAnalysisCreator.cs
index a642e65d5..68813d9fe 100644
--- a/Service/Plugins/SupportConceptAnalysisCreator.cs
+++ b/Service/Plugins/SupportConceptAnalysisCreator.cs
@@ -21,20 +21,22 @@ namespace BeWo.Service.Plugins
public virtual List GetSupportConceptAnalysis(IList c2sOids, long? employeeOid, long? teamOid, DateTime? appointedDate,
int? expiredMonths, bool showArchivedScs)
{
- return GetSupportConceptAnalysis2(c2sOids, employeeOid, teamOid, null, appointedDate, expiredMonths, showArchivedScs);
+ return GetSupportConceptAnalysis2(c2sOids, employeeOid, teamOid, null, null, appointedDate, expiredMonths, showArchivedScs);
}
- public virtual List GetSupportConceptAnalysis2(IList c2sOids, long? employeeOid, long? teamOid, long? catOid, DateTime? appointedDate,
+ public virtual List GetSupportConceptAnalysis2(IList c2sOids, long? employeeOid, long? teamOid, long? catOid, DateTime? startDate, DateTime? endDate,
int? expiredMonths, bool showArchivedScs)
{
-
+
if (catOid.HasValue && catOid.Value > 0)
{
- return GetSupportConceptAnalysisWithCategory(c2sOids, employeeOid, teamOid, catOid.Value, appointedDate, expiredMonths, showArchivedScs);
+ return GetSupportConceptAnalysisWithCategory(c2sOids, employeeOid, teamOid, catOid.Value, startDate, endDate, expiredMonths, showArchivedScs);
}
- DateTime maxDate = appointedDate.HasValue
- ? appointedDate.Value.AddDays(1)
+
+
+ DateTime maxDt = endDate.HasValue
+ ? endDate.Value.AddDays(1)
: DateTime.MaxValue;
var lResult = new List();
@@ -145,7 +147,14 @@ namespace BeWo.Service.Plugins
}
+ DateTime minDt = startDate.HasValue
+ ? startDate.Value
+ : DateTime.MinValue;
+ if (cont)
+ {
+ cont = !iCb2Sc.EndDate.HasValue || iCb2Sc.EndDate.Value >= minDt;
+ }
if (cont)
{
iDC.CalculationDate = DateTime.Now.Date;
@@ -160,7 +169,10 @@ namespace BeWo.Service.Plugins
iDC.CustomerOid = iCb2Sc.SupportConcept.Customer.Oid.Value;
iDC.CustomerFirstName = iCb2Sc.SupportConcept.Customer.Person.FirstName;
iDC.CustomerLastName = iCb2Sc.SupportConcept.Customer.Person.LastName;
-
+ if (iDC.CustomerLastName == "Böhm")
+ {
+ int test = 0;
+ }
var costRates = iCb2Sc.CostBearer.CostRatePeriods.MapToNewDCs();
iDC.ServiceUnit = costRates.GetCurrentlyValidRate(CostRatePeriodType.MinutesPerServiceUnit);
@@ -176,17 +188,18 @@ namespace BeWo.Service.Plugins
var relDC = iCb2Sc.MapToNewDC();
- DateTime minDate = DateTime.MinValue;
- if (iCb2Sc.ApprovedStartDate.HasValue)
+
+
+ if (iCb2Sc.ApprovedStartDate.HasValue && iCb2Sc.ApprovedStartDate.Value > minDt)
{
- minDate = iCb2Sc.ApprovedStartDate.Value.Date;
+ minDt = iCb2Sc.ApprovedStartDate.Value.Date;
}
- else if (iCb2Sc.RequestedStartDate.HasValue)
+ else if (iCb2Sc.RequestedStartDate.HasValue && iCb2Sc.RequestedStartDate.Value > minDt)
{
- minDate = iCb2Sc.RequestedStartDate.Value.Date;
+ minDt = iCb2Sc.RequestedStartDate.Value.Date;
}
- iDC.FLSRecordedTillNow = BerechneGeleisteteStunden(iCb2Sc, minDate, maxDate, calc);
+ iDC.FLSRecordedTillNow = BerechneGeleisteteStunden(iCb2Sc, minDt, maxDt, calc);
@@ -202,7 +215,7 @@ namespace BeWo.Service.Plugins
- decimal lDurationInWeeksTillNow = calc.GetDurationInWeeksTillNow(relDC, appointedDate) ?? 0;
+ decimal lDurationInWeeksTillNow = calc.GetDurationInWeeksTillNow(relDC, endDate) ?? 0;
decimal lDurationInWeeks = calc.GetDurationInWeeks(relDC) ?? 0;
if (iCb2Sc.Status == CostBearer2SupportConceptStatus.Approved)
@@ -237,7 +250,7 @@ namespace BeWo.Service.Plugins
}
- BerechneBewilligteStunden(calc, iDC, relDC, appointedDate);
+ BerechneBewilligteStunden(calc, iDC, relDC, endDate);
//if (flsTotal.HasValue && lDurationInWeeks != 0)
//{
@@ -317,9 +330,10 @@ namespace BeWo.Service.Plugins
}
- private List GetSupportConceptAnalysisWithCategory(IList c2sOids, long? employeeOid, long? teamOid, long catOid, DateTime? appointedDate, int? expiredMonths, bool showArchivedScs)
+ private List GetSupportConceptAnalysisWithCategory(IList c2sOids, long? employeeOid, long? teamOid, long catOid, DateTime? startDate, DateTime? endDate, int? expiredMonths, bool showArchivedScs)
{
- DateTime maxDate = appointedDate.HasValue? appointedDate.Value.AddDays(1) : DateTime.MaxValue;
+ DateTime minDt = startDate.HasValue ? startDate.Value : DateTime.MinValue;
+ DateTime maxDt = endDate.HasValue ? endDate.Value.AddDays(1) : DateTime.MaxValue;
var lResult = new List();
@@ -463,17 +477,17 @@ namespace BeWo.Service.Plugins
var c2sDc = iCb2Sc.MapToNewDC();
var scapDc = scap.MapToNewDC();
- DateTime minDate = DateTime.MinValue;
- if (scap.StartDate.HasValue)
+
+ if (scap.StartDate.HasValue && scap.StartDate.Value > minDt)
{
- minDate = scap.StartDate.Value.Date;
+ minDt = scap.StartDate.Value.Date;
}
- else if (scap.EndDate.HasValue)
+ else if (scap.EndDate.HasValue && scap.EndDate.Value > minDt)
{
- minDate = scap.EndDate.Value.Date;
+ minDt = scap.EndDate.Value.Date;
}
- iDC.FLSRecordedTillNow = BerechneGeleisteteStunden(iCb2Sc, catOid, minDate, maxDate, calc);
+ iDC.FLSRecordedTillNow = BerechneGeleisteteStunden(iCb2Sc, catOid, minDt, maxDt, calc);
@@ -489,7 +503,7 @@ namespace BeWo.Service.Plugins
- decimal lDurationInWeeksTillNow = GetDurationInWeeksTillNow(scap.StartDate, scap.EndDate, appointedDate) ?? 0;
+ decimal lDurationInWeeksTillNow = GetDurationInWeeksTillNow(scap.StartDate, scap.EndDate, endDate) ?? 0;
decimal lDurationInWeeks = GetDurationInWeeks(scap.StartDate, scap.EndDate) ?? 0;
if (iCb2Sc.Status == CostBearer2SupportConceptStatus.Approved)
@@ -524,7 +538,7 @@ namespace BeWo.Service.Plugins
}
- BerechneBewilligteStunden(calc, iDC, c2sDc, scapDc, appointedDate);
+ BerechneBewilligteStunden(calc, iDC, c2sDc, scapDc, endDate);
//if (flsTotal.HasValue && lDurationInWeeks != 0)
//{
@@ -599,7 +613,7 @@ namespace BeWo.Service.Plugins
}
}
}
-
+
}
return lResult;
@@ -685,7 +699,7 @@ namespace BeWo.Service.Plugins
iDc.KorridorStatus = "Außerhalb des Korridors";
iDc.KorridorStatusFarbe = "Red";
}
-
+
}
}
@@ -710,7 +724,7 @@ namespace BeWo.Service.Plugins
}
return 0;
-
+
}
public virtual void BerechneBewilligteStunden(Calculations calc, SupportConceptOverviewDC iDc, SupportConceptCostBearerRelDC relDc, DateTime? appointedDate)
@@ -741,23 +755,23 @@ namespace BeWo.Service.Plugins
{
if (scap.StartDate.HasValue && scap.EndDate.HasValue)
{
-
+
decimal? hoursPerWeek = calc.GetApprovedHoursPerWeek(scap, relDC.CostBearer.CostRatePeriods);
if (useIsCalculationWithFactor)
hoursPerWeek = calc.ApplyIsCalculationWithFactor(relDC, hoursPerWeek);
return hoursPerWeek;
-
+
}
return null;
-
+
}
public virtual decimal BerechneGeleisteteStunden(CostBearer2SupportConcept iCb2Sc, DateTime minDate, DateTime maxDate, Calculations calc)
{
var recordDCs = (from sr in iCb2Sc.ServiceRecords
- where (sr.Start >= minDate && sr.Start < maxDate)
- select MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDC(sr)).ToList();
+ where (sr.Start >= minDate && sr.Start < maxDate)
+ select MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDC(sr)).ToList();
return calc.GetBillableDurationInMinutes(recordDCs) / 60m;
@@ -765,10 +779,10 @@ namespace BeWo.Service.Plugins
public virtual decimal BerechneGeleisteteStunden(CostBearer2SupportConcept iCb2Sc, long catOid, DateTime minDate, DateTime maxDate, Calculations calc)
{
-
+
var recordDCs = (from sr in iCb2Sc.ServiceRecords
- where (sr.Start >= minDate && sr.Start < maxDate)
- select MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDC(sr)).ToList();
+ where (sr.Start >= minDate && sr.Start < maxDate)
+ select MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDC(sr)).ToList();
return calc.GetBillableDurationInMinutes(recordDCs.Where(r => r.ServiceDescription.Category.ServiceCategoryOid == catOid).ToList()) / 60m;
diff --git a/Service/ServiceContracts/IAnalysisService.cs b/Service/ServiceContracts/IAnalysisService.cs
index d78f6cd67..4e447d13f 100644
--- a/Service/ServiceContracts/IAnalysisService.cs
+++ b/Service/ServiceContracts/IAnalysisService.cs
@@ -76,6 +76,10 @@ namespace BeWo.Service.ServiceContracts
[OperationContract]
List GetSupportConceptAnalysis3(long? employeeOid, long? teamOid, long? catOid, DateTime? appointedDate, int? expiredMonths, bool showArchivedScs);
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+ List GetSupportConceptAnalysis4(long? employeeOid, long? teamOid, long? catOid, DateTime? startDate, DateTime? endDate, int? expiredMonths, bool showArchivedScs);
+
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List GetSupportConceptsWithConferenceDate(long? employeeOid, DateTime conferenceDateUntil);
diff --git a/Service/ServiceImplementations/AnalysisServiceImp.cs b/Service/ServiceImplementations/AnalysisServiceImp.cs
index f678c5fb1..395781038 100644
--- a/Service/ServiceImplementations/AnalysisServiceImp.cs
+++ b/Service/ServiceImplementations/AnalysisServiceImp.cs
@@ -475,7 +475,21 @@ namespace BeWo.Service.ServiceImplementations
{
var ac = PluginLoader.FindClass();
- return ac.GetSupportConceptAnalysis2(null, employeeOid, teamOid, catOid, appointedDate, expiredMonths, showArchivedScs);
+ return ac.GetSupportConceptAnalysis2(null, employeeOid, teamOid, catOid, null, appointedDate, expiredMonths, showArchivedScs);
+ }
+ catch (Exception e)
+ {
+ throw Utils.CreateBeWoFaultException(e);
+ }
+ }
+
+ public List GetSupportConceptAnalysis4(long? employeeOid, long? teamOid, long? catOid, DateTime? startDate, DateTime? endDate, int? expiredMonths, bool showArchivedScs)
+ {
+ try
+ {
+ var ac = PluginLoader.FindClass();
+
+ return ac.GetSupportConceptAnalysis2(null, employeeOid, teamOid, catOid, startDate, endDate, expiredMonths, showArchivedScs);
}
catch (Exception e)
{
diff --git a/Shared/Extensions/DateTimeExtensions.cs b/Shared/Extensions/DateTimeExtensions.cs
index 7df102923..9f8a1bfe9 100644
--- a/Shared/Extensions/DateTimeExtensions.cs
+++ b/Shared/Extensions/DateTimeExtensions.cs
@@ -255,7 +255,10 @@ namespace BS.Shared.Extensions
public static string ToMyDateTimeString(this DateTime pDate)
{
var lInfo = DateTimeFormatInfo.CurrentInfo;
-
+ if (pDate.Year < 2000)
+ {
+ return lInfo.GetAbbreviatedDayName(pDate.DayOfWeek) + ", " + $"{pDate.Day:00}" + "." + $"{pDate.Month:00}" + String.Format(".{0:yyyy}", pDate);
+ }
return lInfo.GetAbbreviatedDayName(pDate.DayOfWeek) + ", " + $"{pDate.Day:00}" + "." + $"{pDate.Month:00}" + "." + pDate.Year.ToString().Substring(2);
}