Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo

This commit is contained in:
Christian
2025-01-13 10:15:02 +01:00
29 changed files with 2874 additions and 2193 deletions

View File

@@ -34,7 +34,7 @@ namespace BeWo.View.Controls
if (overtime != null)
{
TxtUeberstunden.Text = string.Format("{0:0.00}", overtime.Betrag);
TxtAuszahlungsart.Text = overtime.Auszahlungsart.Name;
TxtAuszahlungsart.Text = overtime.Auszahlungsart != null ? overtime.Auszahlungsart.Name : "-";
TxtUeberstunden.Visibility = Visibility.Visible;
TxtAuszahlungsart.Visibility = Visibility.Visible;

View File

@@ -349,8 +349,8 @@ namespace BeWo.Report.ReportObjects
if (scDc != null)
{
if (scDc.ApprovedHoursPerWeek > 0 ||
scDc.ApprovedHoursPerWeekWithRateFactor > 0 ||
if (scDc.ApprovedHoursPerWeek > 0.00001m ||
scDc.ApprovedHoursPerWeekWithRateFactor > 0.00001m ||
!CheckIfApprovedGreaterZero())
{
empDetail.SupportConceptDetailList.Add(scDc);
@@ -365,9 +365,6 @@ namespace BeWo.Report.ReportObjects
}
}
}
}
protected virtual bool CheckIfApprovedGreaterZero()

View File

@@ -258,6 +258,23 @@ namespace BeWo.BetreutesWohnenAmRheinReports
}
return pausenZeit;
}
public override decimal GetFeiertagsFaktor(DateTime start)
{
if (start.Year >= 2024 && start.Month == 12 && (start.Day == 24 || start.Day == 31))
{
return 0.5m;
}
return base.GetFeiertagsFaktor(start);
}
public override bool IstAnrechenbareAbsenceTime(AbsenceTime item)
{
if (item.AbsenceReason.Description == "Überstundenfrei")
return false;
else
return base.IstAnrechenbareAbsenceTime(item);
}
}
}

View File

@@ -19,14 +19,29 @@ namespace BetreutesWohnenAmRheinReports.Service
// return list;
//}
public override List<FeiertagDC> GetFeiertage(int year, string bundesland)
{
var list = base.GetFeiertage(year, bundesland);
var osterSonntag = GetOsterSonntag(year);
list.Add(new FeiertagDC() {Datum = osterSonntag.AddDays(-48), Name = "Rosenmontag" }); // "Rosenmontag"
list.Add(new FeiertagDC() { Datum = osterSonntag.AddDays(-48), Name = "Rosenmontag" }); // "Rosenmontag"
if (year >= 2024)
{
list.Add(new FeiertagDC() { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
}
return list;
}
public override decimal GetFeiertagsFaktor(DateTime start)
{
if (start.Year >= 2024 && start.Month == 12 && (start.Day == 24 || start.Day == 31))
{
return 0.5m;
}
return base.GetFeiertagsFaktor(start);
}
}
}

View File

@@ -109,6 +109,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="CustomReportCreator.cs" />
<Compile Include="Invoicing\SettlementInvoiceCreation.cs" />
<Compile Include="LeistungsnachweisJugendamt.cs">
<SubType>Component</SubType>
</Compile>
@@ -144,6 +145,10 @@
<Project>{40D8B312-EA64-49E3-A31A-5E57ED4D5654}</Project>
<Name>Report</Name>
</ProjectReference>
<ProjectReference Include="..\..\Service\Service.csproj">
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
<Name>Service</Name>
</ProjectReference>
<ProjectReference Include="..\..\Shared\Shared.csproj">
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>
<Name>Shared</Name>

View File

@@ -0,0 +1,15 @@
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BS.Shared.DataContracts;
namespace BetreutesWohnenStelzel.Invoicing
{
public class CustomSettlementInvoiceCreation : SettlementInvoiceCreation
{
public override bool CanCreateInvoiceTheOldWay(Settlement2DC si, CostBearer2SupportConcept c2s)
{
return false;
}
}
}

View File

@@ -0,0 +1 @@
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

File diff suppressed because it is too large Load Diff

View File

@@ -121,7 +121,4 @@
<value>anbei sende ich Ihnen die unterschriebenen Nachweise über die im Rahmen des Betreuten Wohnens für [Salutation2] [CustomerName] erbrachten Leistungen zu. Nach unserer Berechnung ergeben sich für den Betreuungszeitraum [AccountingPeriod] hieraus:
</value>
</data>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,9 @@
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using System.Text.RegularExpressions;
using BS.Shared.Extensions;
namespace BetreutesWohnenStelzel
{
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
@@ -31,19 +28,20 @@ namespace BetreutesWohnenStelzel
{
rateFactor = (100 + ii.RateFactor.Value) / 100;
}
if (pRO.FehlkontakteString != null && ii.RateFactor == 0)
{
Zwischensumme.Visible = true;
if (ii.ItemDescription != null && ii.ItemDescription.Length > 0)
{
ii.DetailDescription = Regex.Replace(ii.DetailDescription, ii.ItemDescription, "Fehlkontakte");
}
if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0)
{
Zwischensumme.Visible = true;
ii.AbrechnungsText = ii.AbrechnungsText.Replace("FLS", "Std.");
ii.ItemDescription = "Fehlkontakte";
}
else if (ii.ItemDescription.IsNullOrEmpty())
{
ii.ItemDescription = "Fachleistungsstunden";
}
}
pRO.RateFactor = (double)rateFactor;
this.bindingSource1.DataSource = pRO;
pRO.RateFactor = (double)rateFactor;
this.bindingSource1.DataSource = pRO;
}
}
}

View File

@@ -1,127 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="xrLabel6.Text" xml:space="preserve">
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="xrLabel6.Text" xml:space="preserve">
<value>anbei sende ich Ihnen die unterschriebenen Nachweise über die im Rahmen des Betreuten Wohnens für [Salutation2] [CustomerFirstName] [CustomerLastName] erbrachten Leistungen zu. Nach unserer Berechnung ergeben sich für den Betreuungszeitraum [AccountingPeriod] hieraus:
</value>
</data>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</value>
</data>
</root>

View File

@@ -1,15 +1,17 @@
using BeWo.Data.Entities;
using BeWo.Service.Invoicing;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Services;
using System;
using System.Collections.Generic;
using System.Linq;
namespace BetreutesWohnenWoellReports.Invoicing
{
public class JugendamtInvoiceCreation : InvoiceCreation
{
{
public override IList<InvoiceItem> CreateInvoiceItems(List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc)
{
var list = new List<InvoiceItem>();
@@ -20,6 +22,7 @@ namespace BetreutesWohnenWoellReports.Invoicing
if (!iServiceRecord.AlreadyAccounted)
{
InvoiceItem invoiceItem = CreateInvoiceItem(iServiceRecord, scap, calc);
invoiceItem.Notice = iServiceRecord.ServiceDescription.CategoryName;
if (invoiceItem != null)
{
list.Add(invoiceItem);
@@ -31,7 +34,12 @@ namespace BetreutesWohnenWoellReports.Invoicing
}
}
return CreateSummaryInvoiceItems(list, invoicePeriod, scap, calc);
if (scap.CostBearer2SupportConcept.CostBearer.Organisation.Function != null && scap.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value == "Jugendamt")
return CreateSummaryInvoiceItems(list, invoicePeriod, scap, calc, false, true);
else
return CreateSummaryInvoiceItems(list, invoicePeriod, scap, calc, false);
//return CreateSummaryInvoiceItems(list, invoicePeriod, scap, calc);
}
private InvoiceItem CreateFahrtkostenItem(InvoiceItem item)
@@ -63,5 +71,136 @@ namespace BetreutesWohnenWoellReports.Invoicing
return key;
}
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList,
DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc, bool summaryPerMonth, bool addRateFactorToUnitCount)
{
#region Standard
//Fasse InvoiceItems mit gleichem Stundensatz zusammen:
var newlist = new List<InvoiceItem>();
var rateToItem = new Dictionary<String, InvoiceItem>();
foreach (InvoiceItem iitem in itemList)
{
InvoiceItem item;
var key = GetSummaryItemKey(scap, iitem, summaryPerMonth);
if (rateToItem.ContainsKey(key))
{
item = rateToItem[key];
}
else
{
item = new InvoiceItem();
#endregion
item.Notice = iitem.Notice; // Brauche die Notice..
#region Standard
newlist.Add(item);
item.AmountPerUnit = iitem.AmountPerUnit;
if (invoicePeriod != null)
{
item.ItemPeriodStart = invoicePeriod.StartDate;
item.ItemPeriodEnd = invoicePeriod.EndDate;
}
else
{
item.ItemPeriodStart = scap.StartDate;
item.ItemPeriodEnd = scap.EndDate;
}
if (summaryPerMonth && iitem.ItemPeriodStart.HasValue)
{
DateTime start = new DateTime(iitem.ItemPeriodStart.Value.Year, iitem.ItemPeriodStart.Value.Month, 1);
DateTime end = start.AddMonths(1).AddDays(-1);
if (item.ItemPeriodStart < start)
{
item.ItemPeriodStart = start;
}
if (item.ItemPeriodEnd > end)
{
item.ItemPeriodEnd = end;
}
}
item.RateFactor = iitem.RateFactor;
item.AccountingInterval = iitem.AccountingInterval;
item.ItemDescription = iitem.ItemDescription;
item.UnitDescription = iitem.UnitDescription;
item.SupportConceptApprovalPeriodOid = scap.Oid;
rateToItem[key] = item;
}
if (!item.UnitCount.HasValue)
{
item.UnitCount = 0;
}
item.UnitCount += iitem.UnitCount ?? 0;
}
BerechneSummaryItemsSummen(newlist, addRateFactorToUnitCount);
return newlist;
#endregion
}
public override void CheckMaxApprovedAmount(ServiceInvoice invoice, ServiceInvoicePeriod sip, SupportConceptApprovalPeriodDC scap, CostBearer2SupportConcept costBearer2SupportConcept, DateTimeSpan invoicePeriod, List<ServiceRecordDC> serviceRecords)
{
if (sip.ApprovedHours.HasValue && !scap.IsApprovedBEShifting)
{
//Prüfen ob der abzurechnende Zeitraum kleiner als das Bewilligungsintervall ist
if (scap.ApprovedBEInterval.HasValue)
{
var days = invoicePeriod.GetTimeSpan().Days + 1;
switch (scap.ApprovedBEInterval.Value)
{
case SupportConceptApprovalInterval.Quarterly:
if (days < 89) //CB: Machen wir es mal nicht zu kompliziert, wenn man weniger als 89 Tage abrechnet, gehen wir davon aus, dass nicht das gesamte Quartal abgerechnet wird
{
return; // Mach nix. TODO: Gesamtstunden prüfen und dann nur das abrechnen, was noch offen ist. Wer das macht bekommt ein Fleißsternchen:-)
}
break;
case SupportConceptApprovalInterval.HalfYearly:
if (days < 178) //CB: Siehe oben
{
return; // Mach nix. TODO: Gesamtstunden prüfen und dann nur das abrechnen, was noch offen ist. Wer das macht bekommt ein Fleißsternchen:-)
}
break;
case SupportConceptApprovalInterval.Yearly:
if (days < 365) //CB: Siehe oben
{
return; // Mach nix. TODO: Gesamtstunden prüfen und dann nur das abrechnen, was noch offen ist. Wer das macht bekommt ein Fleißsternchen:-)
}
break;
default:
break;
}
}
decimal totalHours = 0;
foreach (var ii in sip.InvoiceItemList.Where(ii => ii.UnitCount.HasValue && ii.ItemDescription != "Fahrkosten pro km")) // KM werden immer abgerechnet, wie werden nicht vom Budget abgezogen
{
if (totalHours + ii.UnitCount.Value > sip.ApprovedHours)
{
ii.UnitCount = Math.Round(sip.ApprovedHours.Value - totalHours, 2, MidpointRounding.AwayFromZero);
if (ii.AmountPerUnit.HasValue)
{
ii.AmountTotal = ii.AmountPerUnit.Value * ii.UnitCount;
ii.GrossAmountTotal = ii.AmountTotal;
}
totalHours = sip.ApprovedHours.Value;
}
else
{
totalHours += ii.UnitCount.Value;
}
}
}
}
}
}

View File

@@ -37,6 +37,9 @@ namespace BeWo.Report.DefaultReports
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.Page1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
this.rowZeichen = new DevExpress.XtraReports.UI.XRTableRow();
@@ -49,16 +52,16 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
this.rowIKNummer = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
this.labelIKoderGP = new DevExpress.XtraReports.UI.XRTableCell();
this.WertIKoderGP = new DevExpress.XtraReports.UI.XRTableCell();
this.rowBewilligungsumfang = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
this.cellBewilligungsumfang = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.rowFamilienhilfe = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.lblFachbereich = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
this.lblBriefkopf = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel();
this.lblUeberschrift = new DevExpress.XtraReports.UI.XRLabel();
@@ -87,9 +90,6 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell47 = new DevExpress.XtraReports.UI.XRTableCell();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
@@ -143,6 +143,43 @@ namespace BeWo.Report.DefaultReports
this.bottomMarginBand1.HeightF = 111.5F;
this.bottomMarginBand1.Name = "bottomMarginBand1";
//
// xrLabel5
//
this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(493.4167F, 0F);
this.xrLabel5.Multiline = true;
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(240.5833F, 65.66664F);
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.StylePriority.UseTextAlignment = false;
this.xrLabel5.Text = "Geschäftsführung:\r\nFiona Wöll, B.A. Soziale Arbeit";
this.xrLabel5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
//
// xrLabel4
//
this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(255.5417F, 0F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel4.SizeF = new System.Drawing.SizeF(237.875F, 65.66664F);
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.StylePriority.UseTextAlignment = false;
this.xrLabel4.Text = "Amtsgericht Köln, HRB 91655\r\nFinanzamt Bergheim\r\nSteuernummer: 203/5764/1138";
this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
//
// xrLabel3
//
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel3.Multiline = true;
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(255.5417F, 65.66664F);
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.Text = "Kreissparkasse Köln\r\nIBAN: DE23 3705 0299 0120 2724 33\r\nBIC: COKSDE33XXX";
//
// Page1
//
this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
@@ -239,6 +276,8 @@ namespace BeWo.Report.DefaultReports
// xrTableCell8
//
this.xrTableCell8.CanShrink = true;
this.xrTableCell8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerInsuranceNumber")});
this.xrTableCell8.Multiline = true;
this.xrTableCell8.Name = "xrTableCell8";
this.xrTableCell8.Weight = 5.0079144287109374D;
@@ -246,28 +285,25 @@ namespace BeWo.Report.DefaultReports
// rowIKNummer
//
this.rowIKNummer.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell10,
this.xrTableCell11});
this.labelIKoderGP,
this.WertIKoderGP});
this.rowIKNummer.Name = "rowIKNummer";
this.rowIKNummer.Weight = 1D;
//
// xrTableCell10
// labelIKoderGP
//
this.xrTableCell10.CanShrink = true;
this.xrTableCell10.Multiline = true;
this.xrTableCell10.Name = "xrTableCell10";
this.xrTableCell10.Text = "IK-Nummer:";
this.xrTableCell10.Weight = 1.7604168701171876D;
this.labelIKoderGP.CanShrink = true;
this.labelIKoderGP.Multiline = true;
this.labelIKoderGP.Name = "labelIKoderGP";
this.labelIKoderGP.Text = "IK-Nummer:";
this.labelIKoderGP.Weight = 1.7604168701171876D;
//
// xrTableCell11
// WertIKoderGP
//
this.xrTableCell11.CanShrink = true;
this.xrTableCell11.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.CostBearer2SupportConcept.CostBearer.Organisation.IKKostent" +
"rager")});
this.xrTableCell11.Multiline = true;
this.xrTableCell11.Name = "xrTableCell11";
this.xrTableCell11.Weight = 5.0079144287109374D;
this.WertIKoderGP.CanShrink = true;
this.WertIKoderGP.Multiline = true;
this.WertIKoderGP.Name = "WertIKoderGP";
this.WertIKoderGP.Weight = 5.0079144287109374D;
//
// rowBewilligungsumfang
//
@@ -296,7 +332,7 @@ namespace BeWo.Report.DefaultReports
//
this.xrTable1.Font = new DevExpress.Drawing.DXFont("Verdana", 8.25F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(550.4167F, 10.00001F);
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(550.2499F, 22.50003F);
this.xrTable1.Name = "xrTable1";
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.rowFamilienhilfe,
@@ -307,52 +343,52 @@ namespace BeWo.Report.DefaultReports
// rowFamilienhilfe
//
this.rowFamilienhilfe.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell1});
this.lblFachbereich});
this.rowFamilienhilfe.Name = "rowFamilienhilfe";
this.rowFamilienhilfe.Weight = 1.9583326721191408D;
this.rowFamilienhilfe.Weight = 1.9583317565918557D;
//
// xrTableCell1
// lblFachbereich
//
this.xrTableCell1.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell1.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell1.CanShrink = true;
this.xrTableCell1.Font = new DevExpress.Drawing.DXFont("Verdana", 9F, DevExpress.Drawing.DXFontStyle.Bold);
this.xrTableCell1.Multiline = true;
this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell1.StylePriority.UseBorderColor = false;
this.xrTableCell1.StylePriority.UseBorders = false;
this.xrTableCell1.StylePriority.UseFont = false;
this.xrTableCell1.StylePriority.UsePadding = false;
this.xrTableCell1.StylePriority.UseTextAlignment = false;
this.xrTableCell1.Text = "Fachbereich Jugend- und\r\nFamilienhilfe";
this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell1.Weight = 0.62463084211025488D;
this.lblFachbereich.BorderColor = System.Drawing.Color.DarkGray;
this.lblFachbereich.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.lblFachbereich.CanShrink = true;
this.lblFachbereich.Font = new DevExpress.Drawing.DXFont("Verdana", 9F, DevExpress.Drawing.DXFontStyle.Bold);
this.lblFachbereich.Multiline = true;
this.lblFachbereich.Name = "lblFachbereich";
this.lblFachbereich.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.lblFachbereich.StylePriority.UseBorderColor = false;
this.lblFachbereich.StylePriority.UseBorders = false;
this.lblFachbereich.StylePriority.UseFont = false;
this.lblFachbereich.StylePriority.UsePadding = false;
this.lblFachbereich.StylePriority.UseTextAlignment = false;
this.lblFachbereich.Text = "Fachbereich Jugend- und\r\nFamilienhilfe";
this.lblFachbereich.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.lblFachbereich.Weight = 0.62463084211025488D;
//
// xrTableRow2
//
this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
this.xrTableCell2});
this.lblBriefkopf});
this.xrTableRow2.Name = "xrTableRow2";
this.xrTableRow2.Weight = 4.9216668866253608D;
//
// xrTableCell2
// lblBriefkopf
//
this.xrTableCell2.BorderColor = System.Drawing.Color.DarkGray;
this.xrTableCell2.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrTableCell2.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.xrTableCell2.Multiline = true;
this.xrTableCell2.Name = "xrTableCell2";
this.xrTableCell2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell2.StylePriority.UseBorderColor = false;
this.xrTableCell2.StylePriority.UseBorders = false;
this.xrTableCell2.StylePriority.UseFont = false;
this.xrTableCell2.StylePriority.UsePadding = false;
this.xrTableCell2.StylePriority.UseTextAlignment = false;
this.xrTableCell2.Text = "\r\nAm Wingertsberg 1a\r\n50169 Kerpen\r\nTelefon 02273 991332\r\nTelefax 02273 991535\r\ni" +
"nfo@lisa-woell.de\r\nwww.lisa-woell.de";
this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell2.Weight = 0.62463084211025488D;
this.lblBriefkopf.BorderColor = System.Drawing.Color.DarkGray;
this.lblBriefkopf.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.lblBriefkopf.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.lblBriefkopf.Multiline = true;
this.lblBriefkopf.Name = "lblBriefkopf";
this.lblBriefkopf.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.lblBriefkopf.StylePriority.UseBorderColor = false;
this.lblBriefkopf.StylePriority.UseBorders = false;
this.lblBriefkopf.StylePriority.UseFont = false;
this.lblBriefkopf.StylePriority.UsePadding = false;
this.lblBriefkopf.StylePriority.UseTextAlignment = false;
this.lblBriefkopf.Text = "Am Wingertsberg 1a\r\n50169 Kerpen\r\nTelefon 02273 991332\r\nTelefax 02273 991535\r\ninf" +
"o@lisa-woell.de\r\nwww.lisa-woell.de";
this.lblBriefkopf.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.lblBriefkopf.Weight = 0.62463084211025488D;
//
// xrLabel6
//
@@ -390,7 +426,7 @@ namespace BeWo.Report.DefaultReports
this.lblUeberschrift.SizeF = new System.Drawing.SizeF(733.6666F, 20F);
this.lblUeberschrift.StylePriority.UseBackColor = false;
this.lblUeberschrift.StylePriority.UseFont = false;
this.lblUeberschrift.Text = "Sozialpädagogishe Familienhilfe gem. §§27, 31 SGB VIII";
this.lblUeberschrift.Text = "Sozialpädagogische Familienhilfe gem. §§27, 31 SGB VIII";
this.lblUeberschrift.WordWrap = false;
//
// xrLabel2
@@ -411,13 +447,13 @@ namespace BeWo.Report.DefaultReports
//
this.xrLabel8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceDateTime")});
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(362.5F, 203.25F);
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(550.4167F, 203.25F);
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(371.3332F, 23F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(183.4165F, 23F);
this.xrLabel8.StylePriority.UseTextAlignment = false;
this.xrLabel8.Text = "xrLabel8";
this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
this.xrLabel8.TextFormatString = "Kerpen, {0:dd.MM.yyy}";
//
// lblAbrechnungszeitraum
@@ -741,44 +777,6 @@ namespace BeWo.Report.DefaultReports
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrLabel1.TextFormatString = "{0}";
//
// xrLabel3
//
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel3.Multiline = true;
this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel3.SizeF = new System.Drawing.SizeF(255.5417F, 65.66664F);
this.xrLabel3.StylePriority.UseFont = false;
this.xrLabel3.Text = "Kreissparkasse Köln\r\nIBAN: DE23 3705 0299 0120 2724 33\r\nBIC: COKSDE33XXX";
//
// xrLabel4
//
this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(255.5417F, 0F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel4.SizeF = new System.Drawing.SizeF(237.875F, 65.66664F);
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.StylePriority.UseTextAlignment = false;
this.xrLabel4.Text = "Amtsgericht Köln, HRB 91655\r\nFinanzamt Bergheim\r\nSteuernummer: 203/5764/1138";
this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
//
// xrLabel5
//
this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Verdana", 9F);
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(493.4167F, 0F);
this.xrLabel5.Multiline = true;
this.xrLabel5.Name = "xrLabel5";
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel5.SizeF = new System.Drawing.SizeF(240.5833F, 65.66664F);
this.xrLabel5.StylePriority.UseFont = false;
this.xrLabel5.StylePriority.UseTextAlignment = false;
this.xrLabel5.Text = "Geschäftsführung:\r\nFiona Wöll, B.A. Soziale Arbeit\r\nLisa Wöll, Dipl- Sozialarbeit" +
"erin";
this.xrLabel5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
@@ -852,9 +850,9 @@ namespace BeWo.Report.DefaultReports
private DevExpress.XtraReports.UI.XRLabel xrLabel6;
private DevExpress.XtraReports.UI.XRTable xrTable1;
private DevExpress.XtraReports.UI.XRTableRow rowFamilienhilfe;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableCell lblFachbereich;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.XRTableCell lblBriefkopf;
private DevExpress.XtraReports.UI.XRTable xrTable2;
private DevExpress.XtraReports.UI.XRTableRow rowZeichen;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
@@ -866,8 +864,8 @@ namespace BeWo.Report.DefaultReports
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
private DevExpress.XtraReports.UI.XRTableRow rowIKNummer;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell11;
private DevExpress.XtraReports.UI.XRTableCell labelIKoderGP;
private DevExpress.XtraReports.UI.XRTableCell WertIKoderGP;
private DevExpress.XtraReports.UI.XRTableRow rowBewilligungsumfang;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell13;
private DevExpress.XtraReports.UI.XRTableCell cellBewilligungsumfang;

View File

@@ -1,7 +1,7 @@
using System;
using System.Text;
using BeWo.Report.ReportObjects;
using BS.Shared.Extensions;
using DevExpress.XtraReports.UI;
namespace BeWo.Report.DefaultReports
@@ -18,38 +18,78 @@ namespace BeWo.Report.DefaultReports
DateTime start = pRO.AccountingPeriodStart;
DateTime end = pRO.AccountingPeriodEnd;
var istJugendamt = false;
// Überschrift je nach Leistung setzen und Briefkopf nach Kostenträgerfunktion
foreach (var ip in pRO.ServiceInvoicePeriods)
{
foreach (var ap in ip.CostBearer2SupportConcept.ApprovalPeriodList)
{
if (ap.CostBearer2SupportConcept.CostBearer.Organisation.Function != null && ap.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value == "Jugendamt")
istJugendamt = true;
if (ap.ServiceCategory != null && ap.ServiceCategory.Name.Contains("§"))
{
lblUeberschrift.Text = ap.ServiceCategory.Name;
}
else
{
foreach (var item in ip.ServiceInvoiceItems)
{
if (!item.Notice.IsNullOrEmpty() && item.Notice.Contains("§"))
lblUeberschrift.Text = item.Notice;
}
}
// Wenn es keine Rechnung an ein Jugendamt ist, Briefkopf ändern
if (ap.CostBearer2SupportConcept.CostBearer.Organisation.Function == null || ap.CostBearer2SupportConcept.CostBearer.Organisation.Function.Value != "Jugendamt")
{
lblFachbereich.Text = null;
lblBriefkopf.Text = "Am Wingertsberg 1a\n" + "50169 Kerpen\n" + "Telefon 02273 991333\n" + "Telefax 02273 991333\n" + "info@lisa-woell.de\n" + "www.lisa-woell.de";
}
}
}
// Hier abfangen, was NICHT Familienhilfe betrifft und entsprechend ausblenden
if (pRO.OrganisationCostCenter == "LVR")
if (pRO.RecipientOrganisation.ToLower().Contains("lvr") || pRO.RecipientOrganisation.ToLower().Contains("landschaftsverband rheinland"))
{
rowFamilienhilfe.Visible = false;
rowZeichen.Visible = false;
rowVersicherungsnummer.Visible = false;
rowBewilligungsumfang.Visible = false;
labelIKoderGP.Text = "GP-Nummer:";
WertIKoderGP.Text = pRO.BusinessPartnerId;
}
else
{
rowVersicherungsnummer.Visible = false;
rowIKNummer.Visible = false;
// Daten für Bewilligungsumfang setzen
foreach (var ip in pRO.ServiceInvoicePeriods)
{
WertIKoderGP.Text = ip.CostBearer2SupportConcept.CostBearer.Organisation.IKKostentrager;
string periode = "";
switch (ip.SupportConceptApprovalPeriod.ApprovedBEInterval)
{
case BS.Shared.SupportConceptApprovalInterval.Daily: periode = "Tag";break;
case BS.Shared.SupportConceptApprovalInterval.Weekly: periode = "Woche";break;
case BS.Shared.SupportConceptApprovalInterval.Monthly: periode = "Monat";break;
case BS.Shared.SupportConceptApprovalInterval.HalfYearly: periode = "Halbjahr";break;
case BS.Shared.SupportConceptApprovalInterval.Yearly: periode = "Jahr";break;
case BS.Shared.SupportConceptApprovalInterval.Fortnightly: periode = "Pauschal";break;
case BS.Shared.SupportConceptApprovalInterval.Daily: periode = "Tag"; break;
case BS.Shared.SupportConceptApprovalInterval.Weekly: periode = "Woche"; break;
case BS.Shared.SupportConceptApprovalInterval.Monthly: periode = "Monat"; break;
case BS.Shared.SupportConceptApprovalInterval.HalfYearly: periode = "Halbjahr"; break;
case BS.Shared.SupportConceptApprovalInterval.Yearly: periode = "Jahr"; break;
case BS.Shared.SupportConceptApprovalInterval.Fortnightly: periode = "Pauschal"; break;
}
cellBewilligungsumfang.Text += string.Format("{0:0.00}", ip.SupportConceptApprovalPeriod.ApprovedBEPerInterval) + " FLS / " + periode + " bis " + string.Format("{0:dd.MM.yyyy}", ip.SupportConceptApprovalPeriod.EndDate) + "\n";
}
}
// Für Jugendamt IK und Versicherungsnummer raus
if (istJugendamt)
{
rowIKNummer.Visible = false;
rowVersicherungsnummer.Visible = false;
}
if (start.Month == end.Month && start.Year == end.Year)
{

View File

@@ -39,7 +39,8 @@ namespace DomizielAnsbach.Invoicing
while (start <= ende)
{
DateTime monatStart = start; //new DateTime(start.Year, start.Month, 1);
DateTime monatEnde = new DateTime(start.Year, start.AddMonths(1).Month, 1); //ende.AddDays(1); // monatStart.AddMonths(1);
DateTime monatEnde = monatStart.AddMonths(1); //new DateTime(start.Year, start.AddMonths(1).Month, 1); //ende.AddDays(1);
monatEnde = new DateTime(monatEnde.Year, monatEnde.Month, 1);
if (ende.AddDays(2) < monatStart.AddMonths(1))
{
monatEnde = ende.AddDays(1);

View File

@@ -1,4 +1,5 @@
using System;
using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
@@ -12,28 +13,29 @@ using BS.Shared.Services;
namespace InternationalesFamilienzentrum.Statistics
{
public class CustomServiceRecordStatisticFactory : ServiceRecordStatisticFactory
{
public class CustomServiceRecordStatisticFactory : ServiceRecordStatisticFactory
{
public override ServiceRecordStatisticsInfoDC GetServiceRecordStatisticInfo(long costBearer2SupportConceptOid, DateTime statisticsDate)
{
var stats = CreateSupportConceptStatisticsImpl(costBearer2SupportConceptOid, statisticsDate);
var dc = new ServiceRecordStatisticsInfoDC();
dc.Header = new string[4];
dc.Header = new string[6];
dc.Header[0] = "Bewilligungszeitraum:";
dc.Header[1] = "Bewilligt diesen Monat/Gesamt:";
dc.Header[2] = "Geleistet diesen Monat/Gesamt:";
dc.Header[3] = "Frei diesen Monat/Gesamt:";
dc.Header[2] = "Minimum pro Woche/Gesamt:";
dc.Header[3] = "Maximum pro Woche/Gesamt:";
dc.Header[4] = "Geleistet diesen Monat/Gesamt:";
dc.Header[5] = "Frei diesen Monat/Gesamt:";
dc.ForegroundColor = new string[4];
dc.ForegroundColor = new string[6];
dc.ForegroundColor[0] = "#FF2B508B";
dc.ForegroundColor[1] = "#FF2B508B";
dc.ForegroundColor[2] = "#FF2B508B";
dc.ForegroundColor[3] = "#FF2B508B";
dc.ForegroundColor[4] = "#FF2B508B";
dc.ForegroundColor[5] = "#FF2B508B";
dc.PeriodStatisticInfos = new List<ServiceRecordPeriodStatisticsInfoDC>();
if (stats != null)
{
if (stats.PeriodStatistics.Count > 1 && !TimeSpanIsEqual(stats))
@@ -67,8 +69,7 @@ namespace InternationalesFamilienzentrum.Statistics
public ServiceRecordPeriodStatisticsInfoDC CreateServiceRecordPeriodStatisticsInfo(SupportConceptStatisticsDC stats, SupportConceptPeriodStatisticsDC periodStats, DateTime statisticsDate)
{
var dc = CreateDefaultServiceRecordPeriodStatisticsInfo(4);
var dc = CreateDefaultServiceRecordPeriodStatisticsInfo(6);
if (periodStats.SupportConceptApprovalPeriod != null)
{
if (periodStats.SupportConceptApprovalPeriod.ServiceCategory != null)
@@ -77,26 +78,130 @@ namespace InternationalesFamilienzentrum.Statistics
periodStats.SupportConceptApprovalPeriod.ServiceCategory.Name,
periodStats.SupportConceptApprovalPeriod.StartDate,
periodStats.SupportConceptApprovalPeriod.EndDate);
//Berechnung der Minimum/Maximumwerte für den Hilfeplan, eigentlich sollte immer die Leistungsgruppe gesetzt sein, das glaube ich aber nur bedingt
BerechneAuslastungNachLeistungsgruppen(periodStats);
}
else
{
dc.LeftValues[0] = String.Format("{0:dd.MM.yy} - {1:dd.MM.yy}",
periodStats.SupportConceptApprovalPeriod.StartDate,
periodStats.SupportConceptApprovalPeriod.EndDate);
//Berechnung der Minimum/Maximumwerte für den Hilfeplan, hilfsweise aus bewilligten Minuten
BerechneAuslastungNachBewilligtenMin(periodStats);
}
}
dc.LeftValues[1] = String.Format("{0:0.00}", periodStats.MinutesApprovedPerMonth / 60);
dc.RightValues[1] = String.Format("{0:0.00}", periodStats.MinutesApprovedTotal / 60);
dc.LeftValues[2] = String.Format("{0:0.00}", periodStats.MinutesProvidedThisMonth / 60);
dc.RightValues[2] = String.Format("{0:0.00}", periodStats.MinutesProvidedTotalRounded / 60);
var ratio = periodStats.MinutesApprovedTotal / periodStats.MinutesApprovedPerWeek;
dc.LeftValues[2] = String.Format("{0:0.00}", Math.Round(periodStats.Custom1.Value / 60, 2, MidpointRounding.AwayFromZero));
dc.RightValues[2] = String.Format("{0:0.00}", Math.Round(periodStats.Custom1.Value * ratio / 60, 2, MidpointRounding.AwayFromZero));
dc.LeftValues[3] = String.Format("{0:0.00}", (periodStats.MinutesApprovedPerMonth - periodStats.MinutesProvidedThisMonth) / 60);
dc.RightValues[3] = String.Format("{0:0.00}", (periodStats.MinutesApprovedTotal - periodStats.MinutesProvidedTotalRounded) / 60);
dc.LeftValues[3] = String.Format("{0:0.00}", Math.Round(periodStats.Custom2.Value / 60, 2, MidpointRounding.AwayFromZero));
dc.RightValues[3] = String.Format("{0:0.00}", Math.Round(periodStats.Custom2.Value * ratio / 60, 2, MidpointRounding.AwayFromZero));
dc.LeftValues[4] = String.Format("{0:0.00}", periodStats.MinutesProvidedThisMonth / 60);
dc.RightValues[4] = String.Format("{0:0.00}", periodStats.MinutesProvidedTotalRounded / 60);
dc.LeftValues[5] = String.Format("{0:0.00}", (periodStats.MinutesApprovedPerMonth - periodStats.MinutesProvidedThisMonth) / 60);
dc.RightValues[5] = String.Format("{0:0.00}", (periodStats.MinutesApprovedTotal - periodStats.MinutesProvidedTotalRounded) / 60);
return dc;
}
private void BerechneAuslastungNachLeistungsgruppen(SupportConceptPeriodStatisticsDC period)
{
period.Custom1 = 0; // Min-wert zu leisten in der LG
period.Custom2 = 0; // Max-wert zu leisten in der LG
if (period.SupportConceptApprovalPeriod.ServiceCategory.Name.Contains("LG 1"))
{
period.Custom1 += 8;
period.Custom2 = 90;
}
else if (period.SupportConceptApprovalPeriod.ServiceCategory.Name.Contains("LG 2"))
{
period.Custom1 += 91;
period.Custom2 = 150;
}
else if (period.SupportConceptApprovalPeriod.ServiceCategory.Name.Contains("LG 3"))
{
period.Custom1 += 151;
period.Custom2 = 210;
}
else if (period.SupportConceptApprovalPeriod.ServiceCategory.Name.Contains("LG 4"))
{
period.Custom1 += 211;
period.Custom2 = 270;
}
else if (period.SupportConceptApprovalPeriod.ServiceCategory.Name.Contains("LG 5"))
{
period.Custom1 += 271;
period.Custom2 = 390;
}
else if (period.SupportConceptApprovalPeriod.ServiceCategory.Name.Contains("LG 6"))
{
period.Custom1 += 391;
period.Custom2 = 510;
}
else if (period.SupportConceptApprovalPeriod.ServiceCategory.Name.Contains("LG 7"))
{
period.Custom1 += 511;
period.Custom2 = 750;
}
else if (period.SupportConceptApprovalPeriod.ServiceCategory.Name.Contains("LG 8"))
{
period.Custom1 += 751;
period.Custom2 = 1050;
}
}
private void BerechneAuslastungNachBewilligtenMin(SupportConceptPeriodStatisticsDC period)
{
period.Custom1 = 0; // Min-wert zu leisten in der LG
period.Custom2 = 0; // Max-wert zu leisten in der LG
if (period.MinutesApprovedPerWeek < 91)
{
period.Custom1 += 8;
period.Custom2 = 90;
}
else if (period.MinutesApprovedPerWeek * 60 < 151)
{
period.Custom1 += 91;
period.Custom2 = 150;
}
else if (period.MinutesApprovedPerWeek < 211)
{
period.Custom1 += 151;
period.Custom2 = 210;
}
else if (period.MinutesApprovedPerWeek < 271)
{
period.Custom1 += 211;
period.Custom2 = 270;
}
else if (period.MinutesApprovedPerWeek < 391)
{
period.Custom1 += 271;
period.Custom2 = 390;
}
else if (period.MinutesApprovedPerWeek < 511)
{
period.Custom1 += 391;
period.Custom2 = 510;
}
else if (period.MinutesApprovedPerWeek < 751)
{
period.Custom1 += 511;
period.Custom2 = 750;
}
else if (period.MinutesApprovedPerWeek < 1051)
{
period.Custom1 += 751;
period.Custom2 = 1050;
}
}
}
}

View File

@@ -65,6 +65,7 @@ namespace InternationalesFamilienzentrum
this.xrTableCell34 = new DevExpress.XtraReports.UI.XRTableCell();
this.ruleNotApprovedAndExpiringNext4Months = new DevExpress.XtraReports.UI.FormattingRule();
this.ruleNotApprovedAndExpiringNext8Months = new DevExpress.XtraReports.UI.FormattingRule();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand();
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
@@ -112,20 +113,19 @@ namespace InternationalesFamilienzentrum
this.xrTableCell52 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell53 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell54 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell55 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell56 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell57 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell58 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell59 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell60 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell61 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell62 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell63 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrTableCell64 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell65 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell66 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell67 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell68 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell69 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell70 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell71 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell72 = new DevExpress.XtraReports.UI.XRTableCell();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -189,7 +189,7 @@ namespace InternationalesFamilienzentrum
this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 0, 100F);
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2});
this.xrTable2.SizeF = new System.Drawing.SizeF(1315F, 20F);
this.xrTable2.SizeF = new System.Drawing.SizeF(1259F, 20F);
this.xrTable2.StylePriority.UseBackColor = false;
this.xrTable2.StylePriority.UseBorders = false;
this.xrTable2.StylePriority.UseFont = false;
@@ -203,19 +203,19 @@ namespace InternationalesFamilienzentrum
this.xrTableCell36,
this.xrTableCell20,
this.xrTableCell21,
this.xrTableCell65,
this.xrTableCell22,
this.xrTableCell23,
this.xrTableCell70,
this.xrTableCell69,
this.xrTableCell24,
this.xrTableCell25,
this.xrTableCell26,
this.xrTableCell27,
this.xrTableCell28,
this.xrTableCell29,
this.xrTableCell62,
this.xrTableCell30,
this.xrTableCell31,
this.xrTableCell58,
this.xrTableCell57,
this.xrTableCell32,
this.xrTableCell33,
this.xrTableCell34});
@@ -419,6 +419,10 @@ namespace InternationalesFamilienzentrum
this.ruleNotApprovedAndExpiringNext8Months.Formatting.BackColor = System.Drawing.Color.LightBlue;
this.ruleNotApprovedAndExpiringNext8Months.Name = "ruleNotApprovedAndExpiringNext8Months";
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.SupportConceptListRO);
//
// PageHeader
//
this.PageHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
@@ -438,7 +442,7 @@ namespace InternationalesFamilienzentrum
this.xrTable1.Name = "xrTable1";
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1});
this.xrTable1.SizeF = new System.Drawing.SizeF(1315F, 42F);
this.xrTable1.SizeF = new System.Drawing.SizeF(1259F, 42F);
this.xrTable1.StylePriority.UseBackColor = false;
this.xrTable1.StylePriority.UseBorders = false;
this.xrTable1.StylePriority.UseFont = false;
@@ -453,19 +457,19 @@ namespace InternationalesFamilienzentrum
this.xrTableCell35,
this.xrTableCell3,
this.xrTableCell4,
this.xrTableCell64,
this.xrTableCell5,
this.xrTableCell6,
this.xrTableCell68,
this.xrTableCell67,
this.xrTableCell7,
this.xrTableCell8,
this.xrTableCell9,
this.xrTableCell10,
this.xrTableCell11,
this.xrTableCell12,
this.xrTableCell61,
this.xrTableCell13,
this.xrTableCell14,
this.xrTableCell56,
this.xrTableCell55,
this.xrTableCell15,
this.xrTableCell16,
this.xrTableCell17});
@@ -637,7 +641,7 @@ namespace InternationalesFamilienzentrum
this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 0, 100F);
this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow3});
this.xrTable3.SizeF = new System.Drawing.SizeF(1315F, 20F);
this.xrTable3.SizeF = new System.Drawing.SizeF(1259F, 20F);
this.xrTable3.StylePriority.UseBackColor = false;
this.xrTable3.StylePriority.UseBorders = false;
this.xrTable3.StylePriority.UseFont = false;
@@ -651,19 +655,19 @@ namespace InternationalesFamilienzentrum
this.xrTableCell39,
this.xrTableCell40,
this.xrTableCell41,
this.xrTableCell66,
this.xrTableCell42,
this.xrTableCell43,
this.xrTableCell72,
this.xrTableCell71,
this.xrTableCell44,
this.xrTableCell45,
this.xrTableCell46,
this.xrTableCell47,
this.xrTableCell48,
this.xrTableCell49,
this.xrTableCell63,
this.xrTableCell50,
this.xrTableCell51,
this.xrTableCell60,
this.xrTableCell59,
this.xrTableCell52,
this.xrTableCell53,
this.xrTableCell54});
@@ -862,84 +866,81 @@ namespace InternationalesFamilienzentrum
this.xrTableCell54.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell54.Weight = 0.13525699097924734D;
//
// xrTableCell55
// xrTableCell64
//
this.xrTableCell55.Multiline = true;
this.xrTableCell55.Name = "xrTableCell55";
this.xrTableCell55.Text = "Differenz Korridor Max in %";
this.xrTableCell55.Weight = 0.18935977902718335D;
this.xrTableCell64.Multiline = true;
this.xrTableCell64.Name = "xrTableCell64";
this.xrTableCell64.Text = "Leistungs-gruppe";
this.xrTableCell64.Weight = 0.13525698632089916D;
//
// xrTableCell56
// xrTableCell65
//
this.xrTableCell56.Multiline = true;
this.xrTableCell56.Name = "xrTableCell56";
this.xrTableCell56.Text = "Differenz Korridor Min in %";
this.xrTableCell56.Weight = 0.18935977902718335D;
//
// xrTableCell57
//
this.xrTableCell57.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptDetailList.Custom3")});
this.xrTableCell57.Multiline = true;
this.xrTableCell57.Name = "xrTableCell57";
this.xrTableCell57.StylePriority.UseTextAlignment = false;
this.xrTableCell57.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell57.Weight = 0.1893597790271834D;
//
// xrTableCell58
//
this.xrTableCell58.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptDetailList.Custom2")});
this.xrTableCell58.Multiline = true;
this.xrTableCell58.Name = "xrTableCell58";
this.xrTableCell58.StylePriority.UseTextAlignment = false;
this.xrTableCell58.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell58.Weight = 0.1893597790271834D;
//
// xrTableCell59
//
this.xrTableCell59.Multiline = true;
this.xrTableCell59.Name = "xrTableCell59";
this.xrTableCell59.StylePriority.UseTextAlignment = false;
this.xrTableCell59.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell59.Weight = 0.1893597790271834D;
//
// xrTableCell60
//
this.xrTableCell60.Multiline = true;
this.xrTableCell60.Name = "xrTableCell60";
this.xrTableCell60.StylePriority.UseTextAlignment = false;
this.xrTableCell60.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell60.Weight = 0.1893597790271834D;
//
// xrTableCell61
//
this.xrTableCell61.Multiline = true;
this.xrTableCell61.Name = "xrTableCell61";
this.xrTableCell61.Text = "Leistungs-gruppe";
this.xrTableCell61.Weight = 0.17853922903987912D;
//
// xrTableCell62
//
this.xrTableCell62.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
this.xrTableCell65.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptDetailList.Custom1")});
this.xrTableCell62.Multiline = true;
this.xrTableCell62.Name = "xrTableCell62";
this.xrTableCell62.StylePriority.UseTextAlignment = false;
this.xrTableCell62.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell62.Weight = 0.17853922903987909D;
this.xrTableCell65.Multiline = true;
this.xrTableCell65.Name = "xrTableCell65";
this.xrTableCell65.StylePriority.UseTextAlignment = false;
this.xrTableCell65.Text = "xrTableCell65";
this.xrTableCell65.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell65.Weight = 0.13525698632089914D;
//
// xrTableCell63
// xrTableCell66
//
this.xrTableCell63.Multiline = true;
this.xrTableCell63.Name = "xrTableCell63";
this.xrTableCell63.StylePriority.UseTextAlignment = false;
this.xrTableCell63.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell63.Weight = 0.17853922903987909D;
this.xrTableCell66.Multiline = true;
this.xrTableCell66.Name = "xrTableCell66";
this.xrTableCell66.StylePriority.UseTextAlignment = false;
this.xrTableCell66.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell66.Weight = 0.13525698632089914D;
//
// bindingSource1
// xrTableCell67
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.SupportConceptListRO);
this.xrTableCell67.Multiline = true;
this.xrTableCell67.Name = "xrTableCell67";
this.xrTableCell67.Text = "Max Std / Laufzeit HP";
this.xrTableCell67.Weight = 0.135256986233857D;
//
// xrTableCell68
//
this.xrTableCell68.Multiline = true;
this.xrTableCell68.Name = "xrTableCell68";
this.xrTableCell68.Text = "Min Std / Laufzeit HP";
this.xrTableCell68.Weight = 0.135256986233857D;
//
// xrTableCell69
//
this.xrTableCell69.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptDetailList.Custom3")});
this.xrTableCell69.Multiline = true;
this.xrTableCell69.Name = "xrTableCell69";
this.xrTableCell69.StylePriority.UseTextAlignment = false;
this.xrTableCell69.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell69.Weight = 0.135256986233857D;
//
// xrTableCell70
//
this.xrTableCell70.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "SupportConceptDetailList.Custom2")});
this.xrTableCell70.Multiline = true;
this.xrTableCell70.Name = "xrTableCell70";
this.xrTableCell70.StylePriority.UseTextAlignment = false;
this.xrTableCell70.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell70.Weight = 0.135256986233857D;
//
// xrTableCell71
//
this.xrTableCell71.Multiline = true;
this.xrTableCell71.Name = "xrTableCell71";
this.xrTableCell71.StylePriority.UseTextAlignment = false;
this.xrTableCell71.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell71.Weight = 0.135256986233857D;
//
// xrTableCell72
//
this.xrTableCell72.Multiline = true;
this.xrTableCell72.Name = "xrTableCell72";
this.xrTableCell72.StylePriority.UseTextAlignment = false;
this.xrTableCell72.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
this.xrTableCell72.Weight = 0.135256986233857D;
//
// Hilfeplanuebersicht
//
@@ -967,9 +968,9 @@ namespace InternationalesFamilienzentrum
xrWatermark1.Id = "Watermark1";
this.Watermarks.Add(xrWatermark1);
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
@@ -1052,14 +1053,14 @@ namespace InternationalesFamilienzentrum
private DevExpress.XtraReports.UI.XRTableCell xrTableCell52;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell53;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell54;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell58;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell57;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell56;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell55;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell60;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell59;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell62;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell61;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell63;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell65;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell70;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell69;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell64;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell68;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell67;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell66;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell72;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell71;
}
}

View File

@@ -6,6 +6,8 @@ using DevExpress.XtraReports.UI;
using BS.Shared.Extensions;
using BeWo.Report.ReportObjects;
using BeWo.Report;
using BeWo.Data.Access;
using BeWo.Data.Entities;
namespace InternationalesFamilienzentrum
{
@@ -28,6 +30,73 @@ namespace InternationalesFamilienzentrum
}
private void BerechneAuslastungNachLeistungsgruppen(SupportConceptListRO pRO)
{
foreach (var sc in pRO.SupportConceptDetailList)
{
sc.Custom1 = "KEINE";
sc.Custom2 = ""; // Auslastung LG in % Min-wert
sc.Custom3 = ""; // Auslastung LG in % Max-wert
if (sc.CostBearer2SupportConceptOid > 0)
{
var c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(sc.CostBearer2SupportConceptOid);
foreach (var scap in c2s.ApprovalPeriodList)
{
if (scap.ServiceCategory != null)
{
sc.Custom1 = scap.ServiceCategory.Name; // Leistungsgruppe
}
}
}
decimal ratio = 1;
if (sc.FLSPerWeekSoll != 0)
{
ratio = sc.FLSTotal / sc.FLSPerWeekSoll;
}
if (sc.Custom1.Contains("LG 1"))
{
sc.Custom2 = Math.Round(8 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
sc.Custom3 = Math.Round(90 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
}
else if (sc.Custom1.Contains("LG 2"))
{
sc.Custom2 = Math.Round(91 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
sc.Custom3 = Math.Round(150 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
}
else if (sc.Custom1.Contains("LG 3"))
{
sc.Custom2 = Math.Round(151 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
sc.Custom3 = Math.Round(210 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
}
else if (sc.Custom1.Contains("LG 4"))
{
sc.Custom2 = Math.Round(211 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
sc.Custom3 = Math.Round(270 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
}
else if (sc.Custom1.Contains("LG 5"))
{
sc.Custom2 = Math.Round(271 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
sc.Custom3 = Math.Round(390 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
}
else if (sc.Custom1.Contains("LG 6"))
{
sc.Custom2 = Math.Round(391 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
sc.Custom3 = Math.Round(510 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
}
else if (sc.Custom1.Contains("LG 7"))
{
sc.Custom2 = Math.Round(511 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
sc.Custom3 = Math.Round(750 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
}
else if (sc.Custom1.Contains("LG 8"))
{
sc.Custom2 = Math.Round(751 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
sc.Custom3 = Math.Round(1050 * ratio / 60, 2, MidpointRounding.AwayFromZero).ToString();
}
}
}
private void BerechneAuslastungNachLeistungsgruppenOld(SupportConceptListRO pRO)
{
foreach (var sc in pRO.SupportConceptDetailList)
{

View File

@@ -26,6 +26,19 @@ namespace KommMit.Service
}
return list;
}
}
public override decimal GetFeiertagsFaktor(DateTime start)
{
if (start.Year >= 2024 && start.Month == 12 && (start.Day == 24 || start.Day == 31))
{
return 0.5m;
}
else if (IstFeiertag(start))
{
return 1;
}
return 0;
}
}
}

View File

@@ -39,7 +39,7 @@ namespace PflegedienstWessel.Invoicing
// Prüfen, ob es Hintergrunddienste (HD) für Hilfepläne gibt. Diese benötigen nämlich eine eigene Rechnung mit Pauschalbetrag pro Tag
foreach (var rel in scdc.CostBearerRelations)
{
if (rel.ApprovalPeriodList.Any(ap => ap.ServiceCategory != null && ap.ServiceCategory.Name.Contains("HD")))
if (rel.ApprovalPeriodList.Any(ap => ap.ServiceCategory != null && ap.ServiceCategory.Name.Contains("HD")) || rel.CostBearer.Function != null && rel.CostBearer.Function == "HD WG für Rechnung")
{
// Wenn es eine HD-Kategorie in der Bewilligung gibt, zu scsMitHD hinzufügen und dann am Ende eine Rechung für alle HP in der Liste erstellen
scsMitHD.Add(rel.SupportConcept);
@@ -98,6 +98,13 @@ namespace PflegedienstWessel.Invoicing
var result = invoiceList.Select(item => MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(item)).ToList();
foreach (var inv in result)
{
if (inv.InvoiceBase.RecipientOrganisation.ToLower().Contains("lvr") && inv.InvoiceBase.RecipientOrganisation.ToLower().Contains("-"))
{
inv.InvoiceBase.RecipientOrganisation = inv.InvoiceBase.RecipientOrganisation.Remove(inv.InvoiceBase.RecipientOrganisation.IndexOf("-"), inv.InvoiceBase.RecipientOrganisation.Length - inv.InvoiceBase.RecipientOrganisation.IndexOf("-"));
}
}
return result;
}

View File

@@ -69,6 +69,8 @@ namespace SKMAachen
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.lblDifferenzrechnung1 = new DevExpress.XtraReports.UI.XRLabel();
this.lblDifferenzrechnung2 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -93,7 +95,7 @@ namespace SKMAachen
// xrPictureBox1
//
this.xrPictureBox1.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("xrPictureBox1.ImageSource"));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(421.7502F, 0F);
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(440.5837F, 0F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(255.2498F, 80.70667F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
@@ -123,7 +125,7 @@ namespace SKMAachen
//
this.xrLabel10.Font = new DevExpress.Drawing.DXFont("Verdana", 7F);
this.xrLabel10.ForeColor = System.Drawing.Color.Gray;
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(578.1249F, 0F);
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(596.9584F, 0F);
this.xrLabel10.Multiline = true;
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -138,11 +140,11 @@ namespace SKMAachen
//
this.xrLabel9.Font = new DevExpress.Drawing.DXFont("Verdana", 7F);
this.xrLabel9.ForeColor = System.Drawing.Color.Gray;
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(385.4167F, 0F);
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(396.875F, 0F);
this.xrLabel9.Multiline = true;
this.xrLabel9.Name = "xrLabel9";
this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel9.SizeF = new System.Drawing.SizeF(192.7083F, 71.10926F);
this.xrLabel9.SizeF = new System.Drawing.SizeF(200.0835F, 71.10926F);
this.xrLabel9.StylePriority.UseFont = false;
this.xrLabel9.StylePriority.UseForeColor = false;
this.xrLabel9.StylePriority.UseTextAlignment = false;
@@ -158,7 +160,7 @@ namespace SKMAachen
this.xrLabel6.Multiline = true;
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(192.7083F, 71.10926F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(204.1667F, 71.10926F);
this.xrLabel6.StylePriority.UseFont = false;
this.xrLabel6.StylePriority.UseForeColor = false;
this.xrLabel6.StylePriority.UseTextAlignment = false;
@@ -184,6 +186,8 @@ namespace SKMAachen
// Page1
//
this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.lblDifferenzrechnung2,
this.lblDifferenzrechnung1,
this.xrLabel11,
this.xrLabel3,
this.xrLabel1,
@@ -193,7 +197,7 @@ namespace SKMAachen
this.lblForderung,
this.xrLabel2,
this.lblAbrechnungszeitraum});
this.Page1.HeightF = 473.1048F;
this.Page1.HeightF = 488.313F;
this.Page1.Name = "Page1";
this.Page1.StylePriority.UseFont = false;
//
@@ -258,14 +262,14 @@ namespace SKMAachen
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(501.3751F, 217.6081F);
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(148.6251F, 23F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(194.4584F, 23F);
this.xrLabel8.StylePriority.UseTextAlignment = false;
this.xrLabel8.Text = "xrLabel8";
this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
//
// xrTable2
//
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(367.0001F, 10F);
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(367.0001F, 10.00001F);
this.xrTable2.Name = "xrTable2";
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2,
@@ -275,7 +279,7 @@ namespace SKMAachen
this.xrTableRow1,
this.xrTableRow6,
this.xrTableRow8});
this.xrTable2.SizeF = new System.Drawing.SizeF(283F, 134F);
this.xrTable2.SizeF = new System.Drawing.SizeF(328.8332F, 134F);
//
// xrTableRow2
//
@@ -406,13 +410,12 @@ namespace SKMAachen
//
// lblForderung
//
this.lblForderung.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.lblForderung.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F);
this.lblForderung.LocationFloat = new DevExpress.Utils.PointFloat(0F, 432.6881F);
this.lblForderung.Multiline = true;
this.lblForderung.Name = "lblForderung";
this.lblForderung.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblForderung.SizeF = new System.Drawing.SizeF(650F, 40.41666F);
this.lblForderung.SizeF = new System.Drawing.SizeF(695.8333F, 18.54166F);
this.lblForderung.StylePriority.UseFont = false;
this.lblForderung.Text = "Hieraus ergibt sich eine Forderung von ___ Std. x 61,40 EUR = ________ EUR.";
//
@@ -423,7 +426,7 @@ namespace SKMAachen
this.xrLabel2.Multiline = true;
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(650F, 112.9134F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(695.8333F, 112.9134F);
this.xrLabel2.StylePriority.UseBackColor = false;
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.Text = resources.GetString("xrLabel2.Text");
@@ -435,7 +438,7 @@ namespace SKMAachen
this.lblAbrechnungszeitraum.Multiline = true;
this.lblAbrechnungszeitraum.Name = "lblAbrechnungszeitraum";
this.lblAbrechnungszeitraum.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAbrechnungszeitraum.SizeF = new System.Drawing.SizeF(650F, 62F);
this.lblAbrechnungszeitraum.SizeF = new System.Drawing.SizeF(695.8333F, 62F);
this.lblAbrechnungszeitraum.StylePriority.UseFont = false;
this.lblAbrechnungszeitraum.Text = "Im Zeitraum [AccountingPeriodStart!dd.MM.yyyy] bis [AccountingPeriodEnd!dd.MM.yyy" +
"y] wurden ____ Dienstleistungsstunden unmittelbare Betreuungsleistungen des Ambu" +
@@ -450,11 +453,11 @@ namespace SKMAachen
//
// xrLabel15
//
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0.0002066294F, 21.875F);
this.xrLabel15.Multiline = true;
this.xrLabel15.Name = "xrLabel15";
this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(650F, 124.7343F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(695.8333F, 124.7343F);
this.xrLabel15.StylePriority.UseFont = false;
this.xrLabel15.StylePriority.UseTextAlignment = false;
this.xrLabel15.Text = resources.GetString("xrLabel15.Text");
@@ -465,12 +468,12 @@ namespace SKMAachen
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel4,
this.xrLabel15});
this.GroupFooter2.HeightF = 229.1258F;
this.GroupFooter2.HeightF = 247.6877F;
this.GroupFooter2.Name = "GroupFooter2";
//
// xrLabel4
//
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 188.7091F);
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 207.271F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -478,6 +481,28 @@ namespace SKMAachen
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.Text = "Unterschrift und Stempel des Anbieters ";
//
// lblDifferenzrechnung1
//
this.lblDifferenzrechnung1.CanShrink = true;
this.lblDifferenzrechnung1.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F);
this.lblDifferenzrechnung1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 451.2297F);
this.lblDifferenzrechnung1.Multiline = true;
this.lblDifferenzrechnung1.Name = "lblDifferenzrechnung1";
this.lblDifferenzrechnung1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblDifferenzrechnung1.SizeF = new System.Drawing.SizeF(695.8333F, 18.54166F);
this.lblDifferenzrechnung1.StylePriority.UseFont = false;
//
// lblDifferenzrechnung2
//
this.lblDifferenzrechnung2.CanShrink = true;
this.lblDifferenzrechnung2.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Bold);
this.lblDifferenzrechnung2.LocationFloat = new DevExpress.Utils.PointFloat(0.0002066294F, 469.7714F);
this.lblDifferenzrechnung2.Multiline = true;
this.lblDifferenzrechnung2.Name = "lblDifferenzrechnung2";
this.lblDifferenzrechnung2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblDifferenzrechnung2.SizeF = new System.Drawing.SizeF(695.8333F, 18.54166F);
this.lblDifferenzrechnung2.StylePriority.UseFont = false;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
@@ -500,7 +525,7 @@ namespace SKMAachen
this.Font = new DevExpress.Drawing.DXFont("Verdana", 10F);
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.ruleRateFactorNull});
this.Margins = new DevExpress.Drawing.DXMargins(75F, 75F, 135.5417F, 125.5471F);
this.Margins = new DevExpress.Drawing.DXMargins(75F, 24F, 135.5417F, 125.5471F);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
@@ -553,5 +578,7 @@ namespace SKMAachen
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
private DevExpress.XtraReports.UI.XRLabel xrLabel11;
private DevExpress.XtraReports.UI.XRLabel lblDifferenzrechnung1;
private DevExpress.XtraReports.UI.XRLabel lblDifferenzrechnung2;
}
}

View File

@@ -20,6 +20,9 @@ namespace SKMAachen
{
decimal hourlyRate = 0;
decimal hours = 0;
ServiceInvoiceItemRO bereitsBerechnetesItem = null;
if (pRO.ServiceInvoicePeriods != null && pRO.ServiceInvoicePeriods.Count > 0)
{
foreach (var p in pRO.ServiceInvoicePeriods)
@@ -32,7 +35,8 @@ namespace SKMAachen
{
if (i.HourlyRate.HasValue)
{
hourlyRate = i.HourlyRate.Value;
if (i.HourlyRate.Value >= 0)
hourlyRate = i.HourlyRate.Value;
if (!String.IsNullOrEmpty(i.RateFactor))
{
@@ -44,7 +48,10 @@ namespace SKMAachen
if (i.Hours.HasValue)
{
hours += i.Hours.Value;
if (!i.ServiceDescription.Contains("Rechnungsnummer"))
hours += i.Hours.Value;
else
bereitsBerechnetesItem = i;
}
}
}
@@ -52,8 +59,13 @@ namespace SKMAachen
}
lblForderung.Text =
String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00}.", hours, hourlyRate, pRO.NetClaim.Replace("€", "EUR"));
String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00}.", hours, hourlyRate, string.Format("{0:0.00} EUR", hours * hourlyRate));
//String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00}.", hours, hourlyRate, pRO.NetClaim.Replace("€", "EUR"));
if (pRO.InvoiceBase.InvoiceTypeText == "Differenzrechnung" && bereitsBerechnetesItem != null)
{
lblDifferenzrechnung1.Text = string.Format("{0}: {1:0.00} Std. x {2:0.00} EUR = {3:0.00} EUR", bereitsBerechnetesItem.ServiceDescription, bereitsBerechnetesItem.Hours, bereitsBerechnetesItem.HourlyRate * -1, Convert.ToDecimal(bereitsBerechnetesItem.GrossAmount.Split(' ')[0]) * -1);
lblDifferenzrechnung2.Text = string.Format("Daraus ergibt sich eine zu zahlende Summe von {0} EUR.", pRO.NetClaim.Replace("€", ""));
}
lblAbrechnungszeitraum.Text =
String.Format(
"Im Zeitraum vom {0:dd.MM.yyyy} bis {1:dd.MM.yyyy} wurden {2:0.00} Dienstleistungsstunden unmittelbare Betreuungsleistungen des Ambulant Betreuten Wohnens erbracht.",

View File

@@ -93,6 +93,7 @@
<Compile Include="RechnungBeWo67.Designer.cs">
<DependentUpon>RechnungBeWo67.cs</DependentUpon>
</Compile>
<Compile Include="Service\CustomAccountingService.cs" />
<Compile Include="Service\CustomCustomerService.cs" />
<Compile Include="Teamstundenkonto.cs">
<SubType>Component</SubType>

View File

@@ -0,0 +1,110 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using SKMAachen.Invoicing;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
namespace SKMAachen.Service
{
public class CustomAccountingService : AccountingService
{
protected override ServiceInvoiceDC ErstelleDifferenzRechnung(DifferenzRechnungCheck item)
{
ServiceInvoiceDC diffRechnung = null;
var alterBetrag = item.VorhandeneRechungen.Sum(i => i.ClaimSum ?? 0);
if (item.NeueRechnung.ClaimSum == alterBetrag)
{
diffRechnung = item.NeueRechnung;
diffRechnung.InvoiceBase.NeuErstellen = false;
diffRechnung.InvoiceBase.Hinweise = String.Format("Rechnung wurde bereits erstellt");
}
else
{
diffRechnung = new ServiceInvoiceDC();
diffRechnung.OriginalZurDifferenz = item.NeueRechnung;
diffRechnung.InvoiceBase = new InvoiceBaseDC();
CopyInvoiceBaseDC(item.NeueRechnung.InvoiceBase, diffRechnung);
var items = new List<InvoiceItemDC>();
// Alte Items negativ setzen und hinzufügen
string rechnungsnummern = string.Join(", ", item.VorhandeneRechungen.Select(r => r.InvoiceBase.InvoiceNumber));
foreach (var inv in item.VorhandeneRechungen)
{
foreach (var sip in inv.ServiceInvoicePeriods)
{
foreach (var iitem in sip.InvoiceItems)
{
InvoiceItemDC newDiffItem = new InvoiceItemDC();
newDiffItem.AmountTotal = iitem.AmountTotal * -1;
newDiffItem.GrossAmountTotal = iitem.GrossAmountTotal * -1;
newDiffItem.AmountPerUnit = iitem.AmountPerUnit * -1;
newDiffItem.ItemDescription = !rechnungsnummern.IsNullOrEmpty() ? "In Rechnungsnummer(n) " + rechnungsnummern + " bereits berechnet wurde" : "Bereits berechnet wurde";
newDiffItem.ItemPeriodStart = iitem.ItemPeriodStart;
newDiffItem.ItemPeriodEnd = iitem.ItemPeriodEnd;
newDiffItem.UnitCount = iitem.UnitCount;
newDiffItem.UnitDescription = iitem.UnitDescription;
newDiffItem.RateFactor = iitem.RateFactor;
items.Add(newDiffItem);
}
}
}
// Neue Items hinzufügen zur Gegenüberstellung
foreach (var sip in item.NeueRechnung.ServiceInvoicePeriods)
{
foreach (var iitem in sip.InvoiceItems)
{
InvoiceItemDC newDiffItem = new InvoiceItemDC();
newDiffItem.AmountTotal = iitem.AmountTotal;
newDiffItem.GrossAmountTotal = iitem.GrossAmountTotal;
newDiffItem.AmountPerUnit = iitem.AmountPerUnit;
newDiffItem.ItemDescription = iitem.ItemDescription;
newDiffItem.ItemPeriodStart = iitem.ItemPeriodStart;
newDiffItem.ItemPeriodEnd = iitem.ItemPeriodEnd;
newDiffItem.RateFactor = iitem.RateFactor;
newDiffItem.UnitCount = iitem.UnitCount;
newDiffItem.UnitDescription = iitem.UnitDescription;
items.Add(newDiffItem);
}
}
items = items.OrderBy(i => i.ItemPeriodStart).ThenBy(i => i.GrossAmountTotal).ToList();
var newItem = new InvoiceItemDC();
newItem.ItemPeriodStart = item.NeueRechnung.InvoiceBase.AccountingPeriodStart;
newItem.ItemPeriodEnd = item.NeueRechnung.InvoiceBase.AccountingPeriodEnd;
newItem.UnitCount = 1;
newItem.AmountPerUnit = item.NeueRechnung.ClaimSum - alterBetrag;
newItem.AmountTotal = newItem.AmountPerUnit;
newItem.GrossAmountTotal = newItem.AmountTotal;
newItem.ItemDescription = String.Format("Rechnungsdifferenz zu Rechnung {0} in Höhe von {1:c}", item.VorhandeneRechungen[0].InvoiceBase.InvoiceNumber, alterBetrag);
diffRechnung.InvoiceBase.Hinweise = String.Format("Rechnungsdifferenz zu Rechnung {0} in Höhe von {1:c}", item.VorhandeneRechungen[0].InvoiceBase.InvoiceNumber, alterBetrag);
diffRechnung.InvoiceBase.InvoiceTypeText = "Differenzrechnung";
// ServiceInvoicePeriod bekommt den Betrag für die Anzeige zugewiesen, ein neues
var newSip = new ServiceInvoicePeriodDC();
newSip.Claim = newItem.AmountTotal;
newSip.Start = item.NeueRechnung.InvoiceBase.AccountingPeriodStart;
newSip.End = item.NeueRechnung.InvoiceBase.AccountingPeriodEnd;
diffRechnung.ServiceInvoicePeriods = new List<ServiceInvoicePeriodDC>();
diffRechnung.ServiceInvoicePeriods.Add(newSip);
newSip.InvoiceItems = new List<InvoiceItemDC>();
newSip.InvoiceItems.AddRange(items);
//newSip.InvoiceItems.Add(newItem);
}
return diffRechnung;
}
}
}

View File

@@ -156,7 +156,7 @@ namespace SKFM.Export
StringBuilder sb = new StringBuilder();
String sql;
DataTable dt;
sql = GetMonatlicheEigenanteileSql();
sql = GetMonatlicheAbrechnungLvrSql();
dt = ExecuteQuery(sql, date);
string s = GetAbrechnungString(date, customerOid, dt);
if (!String.IsNullOrWhiteSpace(s))
@@ -434,8 +434,6 @@ ORDER BY ib.invoicenumber
private static String GetMonatlicheAbrechnungLvrSql()
{
String sql = @"
SELECT
qry.Oid AS OID,
'F',
@@ -463,7 +461,6 @@ FROM
(
(SELECT
':Abrechnungsmonat' AS Abrechnungsmonat,
':Belegnr' AS Belegnr,
c.DebitorNumber as 'DebitorNumber',
IF(crpRateFactor.`CostRateValue` is null, ROUND((sr.`GeleisteteFLM` / 60) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 )),
ROUND(ROUND((sr.`GeleisteteFLM` / 60), 2) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ) * ((100 + crpRateFactor.`CostRateValue`)/100), 2)) AS 'Betrag',
@@ -483,7 +480,7 @@ LEFT JOIN
(SELECT sr2.`CostBearer2SupportConceptOid`, SUM(sr2.`roundedduration` / IF(sr2.`GroupEmployeeCount` is null, 1, sr2.`GroupEmployeeCount`)) AS GeleisteteFLM FROM `servicerecord` sr2
INNER JOIN `servicedescription` sd ON sr2.`ServiceDescriptionOid` = sd.`Oid`
INNER JOIN `servicecategory` sc ON sd.`ServiceCategoryOid` = sc.`Oid`
WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 AND sd.Name <> 'Fehlkontakte' GROUP BY sr2.`CostBearer2SupportConceptOid`)
WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 AND sd.Name <> 'Fehlkontakt' GROUP BY sr2.`CostBearer2SupportConceptOid`)
AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid`
WHERE c.`IsActive` <> 0 AND sc.`IsActive` <> 0
and (sr.`GeleisteteFLM` is not null)
@@ -491,11 +488,7 @@ HAVING Betrag > 0)
UNION
(SELECT
':Abrechnungsmonat' AS Abrechnungsmonat,
':Belegnr' AS Belegnr,
c.DebitorNumber as 'KontoSoll',
'' as 'KostenstelleSoll',
'S86400' as 'KontoHaben',
c.CostCenter as 'KostenstelleHaben',
ROUND(0.8 * (sr.`GeleisteteFLM` / 60) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ),2) AS 'Betrag',
CONCAT('Leistungsabrechnung, ', p.`FirstName`, ' ', p.`LastName`) as 'Buchungstext',
sc.OID AS OID
@@ -513,13 +506,13 @@ LEFT JOIN
(SELECT sr2.`CostBearer2SupportConceptOid`, SUM(sr2.`roundedduration` / IF(sr2.`GroupEmployeeCount` is null, 1, sr2.`GroupEmployeeCount`)) AS GeleisteteFLM FROM `servicerecord` sr2
INNER JOIN `servicedescription` sd ON sr2.`ServiceDescriptionOid` = sd.`Oid`
INNER JOIN `servicecategory` sc ON sd.`ServiceCategoryOid` = sc.`Oid`
WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 AND sd.Name = 'Fehlkontakte' GROUP BY sr2.`CostBearer2SupportConceptOid`)
WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 AND sd.Name = 'Fehlkontakt' GROUP BY sr2.`CostBearer2SupportConceptOid`)
AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid`
WHERE c.`IsActive` <> 0 AND sc.`IsActive` <> 0
and (sr.`GeleisteteFLM` is not null)
HAVING Betrag > 0)) qry
GROUP BY qry.OID
ORDER BY qry.Kontosoll
ORDER BY qry.Buchungstext
";
return sql;

View File

@@ -47,6 +47,7 @@ namespace ZukunftLeben
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell21 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell22 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell23 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell24 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell25 = new DevExpress.XtraReports.UI.XRTableCell();
@@ -111,7 +112,6 @@ namespace ZukunftLeben
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldArt = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldGroup = new DevExpress.XtraReports.UI.CalculatedField();
this.xrTableCell22 = new DevExpress.XtraReports.UI.XRTableCell();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -267,6 +267,12 @@ namespace ZukunftLeben
this.xrTableCell21.Name = "xrTableCell21";
this.xrTableCell21.Weight = 0.24385913106832008D;
//
// xrTableCell22
//
this.xrTableCell22.Multiline = true;
this.xrTableCell22.Name = "xrTableCell22";
this.xrTableCell22.Weight = 0.24385913106832008D;
//
// xrTableCell23
//
this.xrTableCell23.Multiline = true;
@@ -390,7 +396,7 @@ namespace ZukunftLeben
// xrTableCell17
//
this.xrTableCell17.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Notice2")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.Notice3")});
this.xrTableCell17.Name = "xrTableCell17";
this.xrTableCell17.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 0, 0, 100F);
this.xrTableCell17.StylePriority.UsePadding = false;
@@ -467,6 +473,8 @@ namespace ZukunftLeben
//
// xrTableCell18
//
this.xrTableCell18.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.EmployeeAbbr")});
this.xrTableCell18.Name = "xrTableCell18";
this.xrTableCell18.StylePriority.UsePadding = false;
this.xrTableCell18.StylePriority.UseTextAlignment = false;
@@ -902,12 +910,6 @@ namespace ZukunftLeben
this.fieldGroup.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldGroup.Name = "fieldGroup";
//
// xrTableCell22
//
this.xrTableCell22.Multiline = true;
this.xrTableCell22.Name = "xrTableCell22";
this.xrTableCell22.Weight = 0.24385913106832008D;
//
// LeistungsnachweisSoziotherapie
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {

View File

@@ -51,6 +51,7 @@ namespace ZukunftLeben
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel();
this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrTable4 = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow10 = new DevExpress.XtraReports.UI.XRTableRow();
@@ -83,8 +84,9 @@ namespace ZukunftLeben
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable6)).BeginInit();
@@ -336,7 +338,7 @@ namespace ZukunftLeben
//
// lblAdresse
//
this.lblAdresse.Font = new DevExpress.Drawing.DXFont("Calibri", 10F);
this.lblAdresse.Font = new DevExpress.Drawing.DXFont("Calibri", 11F);
this.lblAdresse.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.lblAdresse.Multiline = true;
this.lblAdresse.Name = "lblAdresse";
@@ -347,6 +349,8 @@ namespace ZukunftLeben
// ReportFooter
//
this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel15,
this.xrLabel14,
this.xrLabel11,
this.xrLabel5,
this.xrTable4});
@@ -355,6 +359,16 @@ namespace ZukunftLeben
this.ReportFooter.Name = "ReportFooter";
this.ReportFooter.StylePriority.UseFont = false;
//
// xrLabel11
//
this.xrLabel11.Font = new DevExpress.Drawing.DXFont("Calibri", 9F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(442.0537F, 0F);
this.xrLabel11.Multiline = true;
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(208.6615F, 218.2751F);
this.xrLabel11.StylePriority.UseFont = false;
//
// xrLabel5
//
this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Calibri", 10F, DevExpress.Drawing.DXFontStyle.Italic);
@@ -788,20 +802,32 @@ namespace ZukunftLeben
this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell5.Weight = 0.40327538447920763D;
//
// xrLabel11
//
this.xrLabel11.Font = new DevExpress.Drawing.DXFont("Calibri", 9F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(442.0537F, 0F);
this.xrLabel11.Multiline = true;
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(208.6615F, 218.2751F);
this.xrLabel11.StylePriority.UseFont = false;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
//
// xrLabel15
//
this.xrLabel15.Font = new DevExpress.Drawing.DXFont("Calibri", 10F);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0F, 122.5833F);
this.xrLabel15.Name = "xrLabel15";
this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(175F, 17F);
this.xrLabel15.StylePriority.UseFont = false;
this.xrLabel15.Text = "Mit freundlichen Grüßen";
//
// xrLabel14
//
this.xrLabel14.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CreatorName")});
this.xrLabel14.Font = new DevExpress.Drawing.DXFont("Calibri", 10F);
this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(0F, 197.5833F);
this.xrLabel14.Name = "xrLabel14";
this.xrLabel14.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel14.SizeF = new System.Drawing.SizeF(225F, 17F);
this.xrLabel14.StylePriority.UseFont = false;
this.xrLabel14.Text = "[CreatorName]";
//
// SoziotherapieRechnung
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -890,5 +916,7 @@ namespace ZukunftLeben
private DevExpress.XtraReports.UI.XRTableCell xrTableCell20;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell14;
private DevExpress.XtraReports.UI.XRLabel xrLabel11;
private DevExpress.XtraReports.UI.XRLabel xrLabel15;
private DevExpress.XtraReports.UI.XRLabel xrLabel14;
}
}

View File

@@ -514,7 +514,15 @@ namespace BeWo.Service.Plugins
result.Add(resultdc);
}
// 10. Prüfe Fehlkontakte > 2 Std.
// 10. Prüfe Abwesenheit Mitarbeiter
var resultMa = CheckAbwesenheitMitarbeiter(newServiceRecord, reldc, rd, isGroupRecord, result);
if (resultMa != null)
{
result.Add(resultMa);
}
// 11. Prüfe Fehlkontakte > 2 Std.
if (duration > 120 && (newServiceRecord.ServiceDescription.Name.ToLower().Contains("fehlkontakt") || newServiceRecord.ServiceDescription.Category.Name.ToLower().Contains("fehlkontakt")))
{
@@ -549,6 +557,51 @@ namespace BeWo.Service.Plugins
return result;
}
public virtual ServiceRecordValidationResultDC CheckAbwesenheitMitarbeiter(ServiceRecordDC newServiceRecord, SupportConceptCostBearerRelDC reldc, decimal rd, bool isGroupRecord, List<ServiceRecordValidationResultDC> result)
{
var e = DAOFactory.GenericDAO.LoadByID<Employee>(newServiceRecord.Employee.EmployeeOid);
long? userOid = SecurityUtils.GetLoggedInUser().Oid;
if (e.AbsenceTimes != null && e.AbsenceTimes.Count > 0)
{
if (e.AbsenceTimes.Any(a => a.AbsenceSpan.StartDate <= newServiceRecord.End.Value && (!a.End.HasValue || a.End >= newServiceRecord.End.Value)
|| a.End.Value.Date == newServiceRecord.End.Value.Date))
{
foreach (var at in e.AbsenceTimes)
{
if (at.Start <= newServiceRecord.Start.Value && (!at.End.HasValue || at.End.Value >= newServiceRecord.Start.Value) // normalerweise
|| (at.Start.Value.Date == newServiceRecord.Start.Value.Date // bei weniger als ganztägigen Abwesenheiten, kann es Überschneidung geben
&& at.End.Value >= newServiceRecord.Start.Value && newServiceRecord.Start >= at.Start)
|| (at.End.Value.Date == newServiceRecord.End.Value.Date // bei weniger als ganztägigen Abwesenheiten, kann es Überschneidung geben
&& at.End.Value >= newServiceRecord.End.Value && newServiceRecord.Start <= at.Start))
{
if (SecurityUtils.GetLoggedInUser().Oid.HasValue && newServiceRecord.Employee.EmployeeOid == SecurityUtils.GetLoggedInUser().Oid.Value)
{
String message = String.Format("Achtung bei Ihnen ist zu diesem Termin eine Abwesenheit eingetragen.\nMöchten Sie trotzdem speichern?");
return new ServiceRecordValidationResultDC
{
ResultType = ServiceRecordValidationResult.Custom,
Message = message,
Allow = true
};
}
else
{
String message = String.Format("{0} ist zu diesem Termin abwesend.\nMöchten Sie trotzdem speichern?", e.Person.FirstNameLastName);
return new ServiceRecordValidationResultDC
{
ResultType = ServiceRecordValidationResult.Custom,
Message = message,
Allow = true
};
}
}
}
}
}
return null;
}
private void CheckArbeitszeitBedingungen(ServiceRecordDC newServiceRecord, DateTime start, decimal duration, List<ServiceRecordValidationResultDC> result)
{
if (!IstArbeitszeit(newServiceRecord.ServiceDescription.Category.Name, newServiceRecord.ServiceDescription.Name))
@@ -655,14 +708,9 @@ namespace BeWo.Service.Plugins
}
}
//var c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(newServiceRecord.CostBearer2SupportConceptOid.Value);
//var customer = c2s.SupportConcept.Customer;
//var absenceTimes = MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDCs(customer.AbsenceTimes);
Dictionary<DateTimeSpan, decimal> span2Geleistet = new Dictionary<DateTimeSpan, decimal>();
foreach (var span in span2MaxHours.Keys)
{
@@ -673,29 +721,29 @@ namespace BeWo.Service.Plugins
}
foreach (var sr in allRecords)
{
if (sr.Start.HasValue && sr.End.HasValue)
{
if (sr.Start.HasValue && sr.End.HasValue)
foreach (var span in span2MaxHours.Keys)
{
foreach (var span in span2MaxHours.Keys)
if (sr.End.Value.Date >= span.StartDateTime &&
sr.Start.Value.Date <= span.EndDateTime)
{
if (sr.End.Value.Date >= span.StartDateTime &&
sr.Start.Value.Date <= span.EndDateTime)
if (sr.ServiceDescription.ServiceCategory.IsBillable)
{
if (sr.ServiceDescription.ServiceCategory.IsBillable)
if (!span2Geleistet.ContainsKey(span))
{
if (!span2Geleistet.ContainsKey(span))
{
span2Geleistet.Add(span, 0);
}
var duration = sr.RoundedDuration;
span2Geleistet[span] += duration;
span2Geleistet.Add(span, 0);
}
var duration = sr.RoundedDuration;
span2Geleistet[span] += duration;
}
}
}
}
}
foreach (var span in span2MaxHours.Keys)
{
@@ -724,16 +772,9 @@ namespace BeWo.Service.Plugins
Message = message,
Allow = true
};
};
}
}
}
}
}