Custom Felder in InvoiceItem
HPH Bersenbrück CSV Rechnungsexport ChristopherusHaus Schulbegleitung
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -646,3 +646,4 @@ obj
|
||||
/ReportImp/demo_Sozio/SoziotherapieRechnung.resx
|
||||
/ReportImp/demo_Sozio/demo_Sozio.csproj
|
||||
/BeWo/DebugConfig.txt
|
||||
/logs/mobilelog.txt
|
||||
|
||||
@@ -672,6 +672,8 @@ namespace BeWo
|
||||
if (condition_base && (condition1 || condition2))
|
||||
{
|
||||
url = DebugConfig.ServerUrl;
|
||||
|
||||
return new Uri(url);
|
||||
}
|
||||
|
||||
//return new Uri("https://app5.bewoplaner.de/service");
|
||||
|
||||
@@ -898,6 +898,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BeWoAuxilioRitter", "Report
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PeterVomBrocke", "ReportImp\PeterVomBrocke\PeterVomBrocke.csproj", "{886B622D-2C89-494B-BD3A-48F1E3A95197}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChristopherusHausMID", "ReportImp\ChristopherusHausMID\ChristopherusHausMID.csproj", "{12876363-2375-49AE-84E5-52CAB4359F4E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|.NET = Debug|.NET
|
||||
@@ -11061,6 +11063,30 @@ Global
|
||||
{886B622D-2C89-494B-BD3A-48F1E3A95197}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{886B622D-2C89-494B-BD3A-48F1E3A95197}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{886B622D-2C89-494B-BD3A-48F1E3A95197}.Release|x86.Build.0 = Release|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Debug|.NET.ActiveCfg = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Debug|.NET.Build.0 = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.DebugRemote|.NET.ActiveCfg = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.DebugRemote|.NET.Build.0 = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.DebugRemote|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.DebugRemote|Any CPU.Build.0 = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.DebugRemote|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.DebugRemote|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.DebugRemote|x86.ActiveCfg = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.DebugRemote|x86.Build.0 = Debug|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Release|.NET.ActiveCfg = Release|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Release|.NET.Build.0 = Release|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -11508,6 +11534,7 @@ Global
|
||||
{0AB07D34-D1B6-441F-8F1F-E5B310DA666E} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{D08B6F46-EB00-4A05-B1AB-A00E189C2C66} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{886B622D-2C89-494B-BD3A-48F1E3A95197} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
{12876363-2375-49AE-84E5-52CAB4359F4E} = {D8A691C5-146D-4613-86CC-438F02FE9106}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FBE985BB-9F0F-4DBB-8F94-ABC37A803FF9}
|
||||
|
||||
@@ -265,5 +265,21 @@ namespace BeWo.Data.Entities
|
||||
|
||||
public virtual AccountingIntervalType? ApprovalUnit { get; set; }
|
||||
|
||||
public virtual String CustomString1 { get; set; }
|
||||
public virtual String CustomString2 { get; set; }
|
||||
public virtual String CustomString3 { get; set; }
|
||||
public virtual String CustomString4 { get; set; }
|
||||
public virtual String CustomString5 { get; set; }
|
||||
public virtual decimal? CustomNumber1 { get; set; }
|
||||
public virtual decimal? CustomNumber2 { get; set; }
|
||||
public virtual decimal? CustomNumber3 { get; set; }
|
||||
public virtual decimal? CustomNumber4 { get; set; }
|
||||
public virtual decimal? CustomNumber5 { get; set; }
|
||||
public virtual DateTime? CustomDate1 { get; set; }
|
||||
public virtual DateTime? CustomDate2 { get; set; }
|
||||
public virtual DateTime? CustomDate3 { get; set; }
|
||||
public virtual DateTime? CustomDate4 { get; set; }
|
||||
public virtual DateTime? CustomDate5 { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,21 @@
|
||||
<property column="MaxApprovedUnitCount" type="Decimal" name="MaxApprovedUnitCount" />
|
||||
<property column="ApprovedPerUnit" type="Decimal" name="ApprovedPerUnit" />
|
||||
<property column="ApprovalUnit" type="BS.Shared.AccountingIntervalType, BS.Shared" name="ApprovalUnit" />
|
||||
<property name="CustomString1" type="String" />
|
||||
<property name="CustomString2" type="String" />
|
||||
<property name="CustomString3" type="String" />
|
||||
<property name="CustomString4" type="String" />
|
||||
<property name="CustomString5" type="String" />
|
||||
<property name="CustomNumber1" type="Decimal" />
|
||||
<property name="CustomNumber2" type="Decimal" />
|
||||
<property name="CustomNumber3" type="Decimal" />
|
||||
<property name="CustomNumber4" type="Decimal" />
|
||||
<property name="CustomNumber5" type="Decimal" />
|
||||
<property name="CustomDate1" type="DateTime" />
|
||||
<property name="CustomDate2" type="DateTime" />
|
||||
<property name="CustomDate3" type="DateTime" />
|
||||
<property name="CustomDate4" type="DateTime" />
|
||||
<property name="CustomDate5" type="DateTime" />
|
||||
<property name="SupportConceptApprovalPeriodOid" column="SupportConceptApprovalPeriodOid" type="Int64" />
|
||||
<property name="AccountingInterval" type="BS.Shared.AccountingIntervalType, BS.Shared"/>
|
||||
<many-to-one name="ServiceRecord" column="ServiceRecordOid" class="BeWo.Data.Entities.ServiceRecord, BeWo.Data" cascade="none" fetch="join" not-found="ignore" />
|
||||
|
||||
17
Model/Changes_2025_01_28 InvoiceItem Custom Fields.txt
Normal file
17
Model/Changes_2025_01_28 InvoiceItem Custom Fields.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
ALTER TABLE `InvoiceItem`
|
||||
ADD COLUMN `CustomString1` VARCHAR(1024) NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomString2` VARCHAR(1024) NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomString3` VARCHAR(1024) NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomString4` VARCHAR(1024) NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomString5` VARCHAR(1024) NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomNumber1` DECIMAL(18,10) NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomNumber2` DECIMAL(18,10) NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomNumber3` DECIMAL(18,10) NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomNumber4` DECIMAL(18,10) NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomNumber5` DECIMAL(18,10) NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomDate1` datetime NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomDate2` datetime NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomDate3` datetime NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomDate4` datetime NULL DEFAULT NULL,
|
||||
ADD COLUMN `CustomDate5` datetime NULL DEFAULT NULL;
|
||||
|
||||
@@ -58,6 +58,8 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
public long EmployeeOid { get; set; }
|
||||
|
||||
public string EmployeeName { get; set; }
|
||||
|
||||
public string EmployeePersonalNumber { get; set; }
|
||||
@@ -677,6 +679,13 @@ namespace BeWo.Report.ReportObjects
|
||||
if (schule != null)
|
||||
{
|
||||
lResult.Schule = MapperFactory.CompactOrganisationDC_Organisation.MapToNewDC(schule);
|
||||
if (schule.Address != null)
|
||||
{
|
||||
lResult.Schule.Street = schule.Address.Street;
|
||||
lResult.Schule.PostalCode = schule.Address.PostalCode;
|
||||
lResult.Schule.Town = schule.Address.Town;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach (var at in customer.AbsenceTimes)
|
||||
@@ -693,6 +702,7 @@ namespace BeWo.Report.ReportObjects
|
||||
}
|
||||
if (employee != null)
|
||||
{
|
||||
lResult.EmployeeOid = employee.Oid.Value;
|
||||
lResult.EmployeePersonalNumber = employee.PersonnelNumber;
|
||||
lResult.EmployeeName = employee.Person.FirstName + " " + employee.Person.LastName;
|
||||
}
|
||||
@@ -831,6 +841,11 @@ namespace BeWo.Report.ReportObjects
|
||||
{
|
||||
detail.StundenplanUhrzeiten2 += CreateTimeRangeString(ae.UhrzeitVon, ae.UhrzeitBis);
|
||||
}
|
||||
if (detail.ArbeitszeitEintraege == null)
|
||||
{
|
||||
detail.ArbeitszeitEintraege = new List<ArbeitszeitEintragDC>();
|
||||
}
|
||||
detail.ArbeitszeitEintraege.Add(MapperFactory.ArbeitszeitEintragDC_ArbeitszeitEintrag.MapToNewDC(ae));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -960,6 +975,7 @@ namespace BeWo.Report.ReportObjects
|
||||
public string StundenplanUhrzeiten2 { get; set; }
|
||||
public string IstUhrzeiten1 { get; set; }
|
||||
public string IstUhrzeiten2 { get; set; }
|
||||
public IList<ArbeitszeitEintragDC> ArbeitszeitEintraege { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace AkggMid
|
||||
if (abrAbwTagDict.ContainsKey(newSr.StartDate))
|
||||
{
|
||||
var info = abrAbwTagDict[newSr.StartDate];
|
||||
newSr.Minutes = (double)info.MinutenLautStundenplan;
|
||||
newSr.Minutes = (double)info.MinutenAbrechenbar;
|
||||
//newSr.Minutes = BerechneMinutenProTag(BerechneStundenProWoche(pRO, newSr.StartDate));
|
||||
newSr.Notice = info.AbwesenheitsNotiz;
|
||||
newSr.Notice5 = "x";
|
||||
@@ -265,17 +265,51 @@ namespace AkggMid
|
||||
{
|
||||
if (info.PruefenObDurch2Teilen)
|
||||
{
|
||||
|
||||
if (info.Datum.Month == 11 && info.Datum.Day == 26)
|
||||
{
|
||||
int test = 0;
|
||||
}
|
||||
if (info.Datum.Month == 11 && info.Datum.Day == 6)
|
||||
{
|
||||
int test = 0;
|
||||
}
|
||||
if (tandemInfos.ContainsKey(info.Datum))
|
||||
{
|
||||
var tandemInfo = tandemInfos[info.Datum];
|
||||
if (tandemInfo.IstAbrechenbar)
|
||||
{
|
||||
info.MinutenLautStundenplan /= 2;
|
||||
info.MinutenAbrechenbar /= 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
info.MinutenAbrechenbar /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (info.PruefenObTandemBetreutWurde)
|
||||
{
|
||||
//bool wurdeBetreut = false;
|
||||
//foreach (var sr in _tandemRO.Services)
|
||||
//{
|
||||
// if (sr.StartDate.Date == info.Datum.Date)
|
||||
// {
|
||||
|
||||
// wurdeBetreut = true;
|
||||
// }
|
||||
//}
|
||||
|
||||
////Der andere Klient wurde betreut, daher darf hier nichts abgerechnet werden
|
||||
//if (wurdeBetreut)
|
||||
//{
|
||||
// info.MinutenAbrechenbar = 0;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// info.MinutenAbrechenbar = info.MaxMinutenLautStundenplan / 2;
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -500,17 +534,17 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa
|
||||
return fehlendeRecords.OrderBy(r => r.StartDate);
|
||||
}
|
||||
|
||||
public bool IstAbwesend(List<AbsenceTime> absenceTimes, DateTime date)
|
||||
public AbsenceTime GetAbwesenheit(List<AbsenceTime> absenceTimes, DateTime date)
|
||||
{
|
||||
foreach (var at in absenceTimes)
|
||||
{
|
||||
if (date >= at.Start && (!at.End.HasValue || date <= at.End))
|
||||
{
|
||||
return true;
|
||||
return at;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return null;
|
||||
}
|
||||
|
||||
//public Dictionary<DateTime, AbwesenheitsInfo> GetAllAbwesenheitsInfos()
|
||||
@@ -618,29 +652,110 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa
|
||||
// || (end > new DateTime(2023, 06, 30) && end <= new DateTime(2023, 07, 21) && gesamtAnzahl < maxAnzahlIntern + 1)))
|
||||
while (dtIterator <= end)
|
||||
{
|
||||
if (dtIterator.Day == 20 && dtIterator.Month == 12)
|
||||
{
|
||||
int test = 0;
|
||||
}
|
||||
if (dtIterator.Month == 11 && dtIterator.Day == 26)
|
||||
{
|
||||
int test = 0;
|
||||
}
|
||||
if (dtIterator.Month == 11 && dtIterator.Day == 6)
|
||||
{
|
||||
int test = 0;
|
||||
}
|
||||
//if (dtIterator.DayOfWeek != DayOfWeek.Saturday && dtIterator.DayOfWeek != DayOfWeek.Sunday && !serviceRecordDates.ContainsKey(String.Format("{0:dd.MM.yyyy}", dtIterator)))
|
||||
if (dtIterator.DayOfWeek != DayOfWeek.Saturday && dtIterator.DayOfWeek != DayOfWeek.Sunday && !vs.IstFeiertag(dtIterator))
|
||||
{
|
||||
bool istTandem = false;
|
||||
bool istAbrechenbar = true;
|
||||
bool mussDurch2Teilen = false;
|
||||
|
||||
bool pruefenObTandemBetreutWurde = false;
|
||||
if (tandemRo != null)
|
||||
{
|
||||
//Bei Doppelbetreuung darf die Abwesenheit bei einem Kind nicht abgerechnet werden, außer beide Kinder sind krank
|
||||
// Details zu den Abwesenheitskategorien bei Doppelbetreuung:
|
||||
|
||||
//Wenn beide Schüler anwesend sind, werden die Betreuungszeiten geteilt.
|
||||
//Wenn nur ein Schüler anwesend ist, erhält dieser die vollen Betreuungszeiten.
|
||||
//Wenn beide Schüler abwesend sind, hängt die Abrechnung von den gewählten Abwesenheitskategorien und deren Bedingungen ab.
|
||||
|
||||
|
||||
//"JugA krank (Tag 1-6 abrechenbar)" und / oder "JugA sonst. Grund (Tag 1-6 abrechenbar)":
|
||||
// Wenn beide Schüler diese Kategorie haben und noch Tage verfügbar sind, werden die hinterlegten Betreuungszeiten geteilt.
|
||||
// Wenn einer der Schüler keine Tage mehr verfügbar hat, übernimmt der andere Schüler die vollen hinterlegten Betreuungszeiten.
|
||||
|
||||
//"SozA krank (Tag 1-6 abrechenbar)" und / oder "SozA sonst. Grund (Tag 1-6 abrechenbar)":
|
||||
// Die Regeln sind identisch wie bei der Kategorie "JugA".
|
||||
|
||||
//Mischungen von Jugendamt und Sozialamt(z.B.ein Schüler mit "JugA krank" und der andere mit "SozA krank"):
|
||||
// Es gelten dieselben Regeln wie oben beschrieben.
|
||||
|
||||
//"SozA unter 24h krank (abrechenbar)" und / oder "SozA unter 24h sonst. Grund (abrechenbar)":
|
||||
// Wenn beide Schüler diese Kategorien haben, werden die hinterlegten Betreuungszeiten geteilt.
|
||||
// Wenn ein Schüler "SozA unter 24h krank" oder "SozA unter 24h sonst. Grund" und der andere Schüler eine andere Kategorie hat, übernimmt der Schüler mit "SozA unter 24h krank" oder "SozA unter 24h sonst. Grund" die vollen Betreuungszeiten.
|
||||
|
||||
//"Abwesenheit nicht abrechenbar (SozA+JugA)":
|
||||
// In diesem Fall stellt sich die Frage, ob es für den anderen Schüler möglich ist, die vollen hinterlegten Betreuungszeiten abzurechnen.
|
||||
|
||||
|
||||
istTandem = true;
|
||||
mussDurch2Teilen = true;
|
||||
istAbrechenbar = false;
|
||||
|
||||
var aw = IstAbwesend(tandemAbsenceTimes, dtIterator);
|
||||
if (aw) //info != null)
|
||||
|
||||
var at2 = GetAbwesenheit(tandemAbsenceTimes, dtIterator);
|
||||
if (at2 != null) //info != null)
|
||||
{
|
||||
if (at.AbsenceReason.Description.Contains("abrechenbar") && !at.AbsenceReason.Description.Contains("nicht abrechenbar") && at2.AbsenceReason.Description.Contains("nicht abrechenbar"))
|
||||
{
|
||||
//Klient hat eine abrechenbare Abwesenheit und zweiter Klient eine nicht abrechenbare Abwesenheit
|
||||
istAbrechenbar = true;
|
||||
mussDurch2Teilen = false;
|
||||
}
|
||||
else if (at.AbsenceReason.Description.Contains("nicht abrechenbar") && at2.AbsenceReason.Description.Contains("abrechenbar") && !at2.AbsenceReason.Description.Contains("nicht abrechenbar"))
|
||||
{ //Klient hat eine nicht brechenbare Abwesenheit aber zweiter Klient hat eine abrechenbare Abwesenheit
|
||||
istAbrechenbar = false;
|
||||
mussDurch2Teilen = false;
|
||||
}
|
||||
else if (at.AbsenceReason.Description.Contains("abrechenbar") && at2.AbsenceReason.Description.Contains("abrechenbar") && !at.AbsenceReason.Description.Contains("nicht abrechenbar") && !at2.AbsenceReason.Description.Contains("nicht abrechenbar"))
|
||||
{
|
||||
//Beide Klienten haben eine abrechenbare Abwesenheit
|
||||
//Beide abwesend, also Betreuungszeit teilen
|
||||
mussDurch2Teilen = true;
|
||||
istAbrechenbar = true;
|
||||
}
|
||||
//if (!info.IstAbrechenbar)
|
||||
//{
|
||||
//mussDurch2Teilen = false;
|
||||
//}
|
||||
mussDurch2Teilen = true;
|
||||
|
||||
istAbrechenbar = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (at.AbsenceReason.Description.Contains("abrechenbar") && !at.AbsenceReason.Description.Contains("nicht abrechenbar"))
|
||||
{
|
||||
pruefenObTandemBetreutWurde = true;
|
||||
bool wurdeBetreut = false;
|
||||
foreach (var sr in tandemRo.Services)
|
||||
{
|
||||
if (sr.StartDate.Date == dtIterator.Date)
|
||||
{
|
||||
|
||||
wurdeBetreut = true;
|
||||
}
|
||||
}
|
||||
|
||||
//Der andere Klient wurde betreut, daher darf hier nichts abgerechnet werden
|
||||
if (wurdeBetreut)
|
||||
{
|
||||
istAbrechenbar = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
istAbrechenbar = true;
|
||||
mussDurch2Teilen = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -656,14 +771,15 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa
|
||||
info.MaxAbrechenbareTage = maxAnzahl;
|
||||
info.IstAbrechenbar = false;
|
||||
|
||||
info.PruefenObTandemBetreutWurde = pruefenObTandemBetreutWurde;
|
||||
info.MaxMinutenLautStundenplan = stunden * 60;
|
||||
if (istAbrechenbar && gesamtAnzahl < maxAnzahlIntern)
|
||||
{
|
||||
info.IstAbrechenbar = true;
|
||||
info.MinutenLautStundenplan = stunden * 60;
|
||||
info.MinutenAbrechenbar = info.MaxMinutenLautStundenplan;
|
||||
if (mussDurch2Teilen)
|
||||
{
|
||||
info.PruefenObDurch2Teilen = true;
|
||||
//info.MinutenLautStundenplan /= 2;
|
||||
}
|
||||
if (maxAnzahlIntern < Int32.MaxValue)
|
||||
{
|
||||
@@ -841,7 +957,8 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa
|
||||
{
|
||||
public AbsenceTimeDC AbsenceTime { get; set; }
|
||||
|
||||
public decimal MinutenLautStundenplan { get; set; }
|
||||
public decimal MinutenAbrechenbar { get; set; }
|
||||
public decimal MaxMinutenLautStundenplan { get; set; }
|
||||
|
||||
public String AbwesenheitsNotiz { get; set; }
|
||||
public int NummerAbrechenbarerTag { get; set; }
|
||||
@@ -849,5 +966,7 @@ where scap2e.EmployeeOid = {0} and scap.Start <= '{1:yyyy-MM-dd}' and scap.EndDa
|
||||
public bool IstAbrechenbar { get; set; }
|
||||
public DateTime Datum { get; set; }
|
||||
public bool PruefenObDurch2Teilen { get; internal set; }
|
||||
public bool PruefenObTandemBetreutWurde { get; internal set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +321,8 @@ Bezeichnung Saldenliste
|
||||
newEntry.Saldo = item.AmountPaid - item.BillableAmountInReportTimeSpan;
|
||||
|
||||
|
||||
if (newEntry.Saldo != 0 && item.Costbearer2Supportconcept.StartDate >= ro.ReportStartDate)
|
||||
//if (newEntry.Saldo != 0 && item.Costbearer2Supportconcept.StartDate >= ro.ReportStartDate)
|
||||
if (item.Costbearer2Supportconcept.StartDate >= ro.ReportStartDate)
|
||||
{
|
||||
liste.Add(newEntry);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Text;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.DefaultReports;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BS.Shared.Core;
|
||||
@@ -16,6 +17,77 @@ namespace Biotop
|
||||
{
|
||||
public class CustomReportCreator : DefaultReportCreator
|
||||
{
|
||||
public override XtraReport CreateQueryReport(long queryOid, string queryReportId)
|
||||
{
|
||||
if (queryOid == 500)
|
||||
{
|
||||
return CreateLwlPruefliste(CreateQueryRO(queryOid, queryReportId));
|
||||
|
||||
}
|
||||
return base.CreateQueryReport(queryOid, queryReportId);
|
||||
}
|
||||
|
||||
private LwlPruefliste CreateLwlPruefliste(QueryRO queryRo)
|
||||
{
|
||||
var liste = new LwlPruefliste();
|
||||
|
||||
if (queryRo.Rows.Count > 0)
|
||||
{
|
||||
DateTime start = DateTime.MaxValue;
|
||||
DateTime end = DateTime.MinValue;
|
||||
|
||||
if (queryRo.Rows[0].Field1 != null)
|
||||
{
|
||||
DateTime.TryParse(queryRo.Rows[0].Field1.ToString(), out start);
|
||||
}
|
||||
if (queryRo.Rows[0].Field2 != null)
|
||||
{
|
||||
DateTime.TryParse(queryRo.Rows[0].Field2.ToString(), out end);
|
||||
}
|
||||
long? customerOid = null;
|
||||
if (queryRo.Rows[0].Field3.ToString() == "0")
|
||||
{
|
||||
var masterReport = new LwlPruefliste();
|
||||
//masterReport.CreateDocument();
|
||||
|
||||
var customerList = DAOFactory.GenericDAO.GetAllActive<Customer>();
|
||||
var customerListOrd = customerList.OrderBy(c => c.Person.LastNameFirstName).ToList();
|
||||
foreach (var c in customerListOrd)
|
||||
{
|
||||
var ro = LwlPrueflisteRO.Create(start, end, "9009969", c.Oid, "Landschaftsverband Westfalen-Lippe");
|
||||
if (ro.ServiceRecords != null && ro.ServiceRecords.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
liste = new LwlPruefliste();
|
||||
liste.SetReportDataSource(ro);
|
||||
liste.CreateDocument();
|
||||
masterReport.Pages.AddRange(liste.Pages);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignore - z.B. kein Hilfeplan
|
||||
}
|
||||
}
|
||||
}
|
||||
return (LwlPruefliste)masterReport;
|
||||
}
|
||||
|
||||
if (queryRo.Rows[0].Field3 != null)
|
||||
{
|
||||
if (Int64.TryParse(queryRo.Rows[0].Field3.ToString(), out var oidOut))
|
||||
{
|
||||
customerOid = oidOut;
|
||||
}
|
||||
var ro = LwlPrueflisteRO.Create(start, end, "9009969", customerOid, "Landschaftsverband Westfalen-Lippe");
|
||||
liste.SetReportDataSource(ro);
|
||||
return liste;
|
||||
}
|
||||
}
|
||||
|
||||
return liste;
|
||||
}
|
||||
|
||||
public override XtraReport CreateSettlementReport(string dcId, long? invoiceBaseOid)
|
||||
{
|
||||
long result;
|
||||
@@ -40,5 +112,6 @@ namespace Biotop
|
||||
|
||||
return base.CreateSettlementReport(dcId, invoiceBaseOid, false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Report.ReportObjects;
|
||||
|
||||
|
||||
namespace ChristopherusHausMID
|
||||
{
|
||||
public class CHMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
|
||||
{
|
||||
public override bool ShouldCreateDayDetails()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override MitarbeiterstundenkontoRO.DayDetail CreateDayDetail(DateTime date, MitarbeiterstundenkontoRO.EmployeeDetail ed)
|
||||
{
|
||||
var dd = base.CreateDayDetail(date, ed);
|
||||
|
||||
dd.MaxHoursUntilBreak = null;
|
||||
dd.MaxHoursUntilBreak2 = null;
|
||||
dd.BreakMinutes = null;
|
||||
dd.BreakMinutes2 = null;
|
||||
|
||||
dd.NightStart = 22;
|
||||
dd.NightEnd = 6;
|
||||
|
||||
return dd;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{C1FED668-ADB9-47E0-B589-1389618E1B6E}</ProjectGuid>
|
||||
<ProjectGuid>{12876363-2375-49AE-84E5-52CAB4359F4E}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ChristopherusHausMID</RootNamespace>
|
||||
@@ -57,18 +57,32 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CHMitarbeiterstundenkontoBerechnung.cs" />
|
||||
<Compile Include="CustomReportCreator.cs" />
|
||||
<Compile Include="Invoicing\PoolHelper.cs" />
|
||||
<Compile Include="Invoicing\CustomInvoiceCreation.cs" />
|
||||
<Compile Include="Invoicing\CustomInvoiceFactory.cs" />
|
||||
<Compile Include="Leistungsnachweis.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Leistungsnachweis.designer.cs">
|
||||
<DependentUpon>Leistungsnachweis.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RechnungSchuleBochum.cs">
|
||||
<Compile Include="Rechnung.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RechnungSchuleBochum.Designer.cs">
|
||||
<DependentUpon>RechnungSchuleBochum.cs</DependentUpon>
|
||||
<Compile Include="Rechnung.Designer.cs">
|
||||
<DependentUpon>Rechnung.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Service\CustomOperationService.cs" />
|
||||
<Compile Include="Service\CustomVacationService.cs" />
|
||||
<Compile Include="Translation\TranslationDictionary.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Data\Data.csproj">
|
||||
@@ -89,15 +103,19 @@
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Leistungsnachweis.resx">
|
||||
<DependentUpon>Leistungsnachweis.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="RechnungSchuleBochum.resx">
|
||||
<DependentUpon>RechnungSchuleBochum.cs</DependentUpon>
|
||||
<EmbeddedResource Include="Rechnung.resx">
|
||||
<DependentUpon>Rechnung.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
23
ReportImp/ChristopherusHausMID/CustomReportCreator.cs
Normal file
23
ReportImp/ChristopherusHausMID/CustomReportCreator.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.DefaultReports;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace ChristopherusHausMID.Reporting
|
||||
{
|
||||
public class CustomReportCreator : DefaultReportCreator
|
||||
{
|
||||
public override XtraReport CreateSbdLeistungsnachweisForSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long serviceCategoryOid, int startDay, int endDay, bool checkServiceRecords, string bundesland)
|
||||
{
|
||||
return CreateReportForStundenaufstellungROs(SbdStundenaufstellungRO.Create(customerOid, month, year, orgaOid, empOid, serviceCategoryOid, startDay, endDay, true, "nrw", false));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Invoicing;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Services;
|
||||
using Service.Invoicing;
|
||||
|
||||
namespace ChristopherusHausMID.Invoicing
|
||||
{
|
||||
public class CustomInvoiceCreation : InvoiceCreation
|
||||
{
|
||||
//public override void SetInvoiceId(ServiceInvoice invoice)
|
||||
//{
|
||||
// //invoice.InvoiceBase.InvoiceId = "SBD";
|
||||
// //invoice.InvoiceBase.InvoiceTypeText = "";
|
||||
//}
|
||||
|
||||
public override List<ServiceInvoiceDC> GenerateServiceInvoices(long costBearerOid,
|
||||
DateTimeSpan invoicePeriod,
|
||||
Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords, bool splitInvoices)
|
||||
{
|
||||
var costBearer = DAOFactory.GenericDAO.LoadByID<CostBearer>(costBearerOid);
|
||||
var invoiceList = new List<ServiceInvoice>();
|
||||
|
||||
var invoiceCounter = 0;
|
||||
ServiceInvoice invoice;
|
||||
|
||||
|
||||
foreach (var iSupportConcept2ServiceRecords in supportConcepts2ServiceRecords)
|
||||
{
|
||||
invoice = CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, iSupportConcept2ServiceRecords.Key, iSupportConcept2ServiceRecords.Value);
|
||||
if (invoice != null)
|
||||
{
|
||||
|
||||
invoiceList.Add(invoice);
|
||||
invoiceCounter++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var result = invoiceList.Select(item => MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(item)).ToList();
|
||||
return result.Count > 1 ? result.OrderBy(i => i.InvoiceBase.CustomerLastName).ToList() : result;
|
||||
}
|
||||
|
||||
public override IList<InvoiceItem> CreateInvoiceItems(List<ServiceRecordDC> serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
var items = base.CreateInvoiceItems(serviceRecordsInPeriod, invoicePeriod, scap, calc);
|
||||
|
||||
var anzahlAbwesenheitsTage = GetAbwesenheitsTage(scap.CostBearer2SupportConcept.SupportConcept.Customer, invoicePeriod);
|
||||
|
||||
var berechnePoolItems = BerechnePoolItems(invoicePeriod, scap);
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
item.CustomNumber1 = anzahlAbwesenheitsTage;
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
private IList<InvoiceItem> BerechnePoolItems(DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap)
|
||||
{
|
||||
var items = new List<InvoiceItem>();
|
||||
|
||||
var mainCustomer = scap.CostBearer2SupportConcept.SupportConcept.Customer;
|
||||
//Suche Hauptbetreuung
|
||||
Employee hauptbetreuung = mainCustomer.Employee2CustomerList.FirstOrDefault(e2c => e2c.IsActive == ActivationTypeId.Active &&
|
||||
(!e2c.StartDate.HasValue || e2c.StartDate.Value.Date <= invoicePeriod.EndDate) && (!e2c.EndDate.HasValue || e2c.EndDate.Value.Date >= invoicePeriod.StartDate) &&
|
||||
e2c.ValueList.Any(b => b.Entry.Type.Equals(ValueListEntryType.StaffRoleType) && b.Entry.Value.ToLower().Contains("hauptbetreu")))?.Employee;
|
||||
|
||||
if (hauptbetreuung != null)
|
||||
{
|
||||
var allCustomer = hauptbetreuung.Employee2CustomerList.Select(e2c => e2c.Customer).ToList();
|
||||
//Wenn mehrere Kinder betreut werden, dann ändert sich der pool Faktor
|
||||
if (allCustomer.Count > 1)
|
||||
{
|
||||
var ii = new InvoiceItem();
|
||||
|
||||
|
||||
foreach (var c in allCustomer)
|
||||
{
|
||||
if (c.Oid != mainCustomer.Oid)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
return base.CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
}
|
||||
|
||||
private decimal GetAbwesenheitsTage(Customer customer, DateTimeSpan invoicePeriod)
|
||||
{
|
||||
int tage = 0;
|
||||
|
||||
foreach (var at in customer.AbsenceTimes)
|
||||
{
|
||||
if ((!at.Start.HasValue || at.Start.Value.Date <= invoicePeriod.EndDate) && (!at.End.HasValue || at.End.Value.Date >= invoicePeriod.StartDate))
|
||||
{
|
||||
tage++;
|
||||
}
|
||||
}
|
||||
|
||||
return tage;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.Invoicing;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace ChristopherusHausMID.Invoicing
|
||||
{
|
||||
public class CustomInvoiceFactory : InvoiceFactory
|
||||
{
|
||||
public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
|
||||
{
|
||||
return new CustomInvoiceCreation();
|
||||
|
||||
|
||||
}
|
||||
|
||||
// private InvoiceCreation GetInvoiceCreatorForCategory(String catName)
|
||||
// {
|
||||
// if (!String.IsNullOrEmpty(catName))
|
||||
// {
|
||||
// String cat = catName.ToLower().Trim();
|
||||
// if (cat.IndexOf("assistenz") >= 0)
|
||||
// return new CustomInvoiceCreation();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
}
|
||||
}
|
||||
12
ReportImp/ChristopherusHausMID/Invoicing/PoolHelper.cs
Normal file
12
ReportImp/ChristopherusHausMID/Invoicing/PoolHelper.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ChristopherusHausMID.Invoicing
|
||||
{
|
||||
public class PoolHelper
|
||||
{
|
||||
}
|
||||
}
|
||||
118
ReportImp/ChristopherusHausMID/Leistungsnachweis.cs
Normal file
118
ReportImp/ChristopherusHausMID/Leistungsnachweis.cs
Normal file
@@ -0,0 +1,118 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Report;
|
||||
using DevExpress.XtraReports.UI;
|
||||
using System.Data;
|
||||
using BS.Shared.Core;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using System.Linq;
|
||||
|
||||
namespace ChristopherusHausMID
|
||||
{
|
||||
public partial class Leistungsnachweis : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<SbdStundenaufstellungRO>
|
||||
{
|
||||
public Leistungsnachweis()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
public void SetReportDataSource(SbdStundenaufstellungRO pRO)
|
||||
{
|
||||
cellDatum.Text = String.Format("{0:dd.MM.yyyy}", DateTime.Now);
|
||||
decimal poolFaktor = 1; // Faktor bei 1:1 Betreuung
|
||||
|
||||
String klienten = "";
|
||||
String klassen = "";
|
||||
String bewilligungen = "";
|
||||
|
||||
if (pRO.EmployeeOid > 0 && pRO.CustomerOid > 0)
|
||||
{
|
||||
|
||||
|
||||
var mainCustomer = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.CustomerOid);
|
||||
var emp = DAOFactory.GenericDAO.LoadByID<Employee>(pRO.EmployeeOid);
|
||||
|
||||
klienten = mainCustomer.Person.FirstNameLastName;
|
||||
klassen = mainCustomer.Childs; //CB: Ich habe das Feld "Kinder" bei denen in "Klasse" umbenannt
|
||||
if (pRO.ApprovedPerWeek == 0)
|
||||
{
|
||||
pRO.ApprovedPerWeek = GetAktuelleBewilligung(mainCustomer, pRO.StartDate);
|
||||
}
|
||||
bewilligungen = String.Format("{0:0.00}", pRO.ApprovedPerWeek);
|
||||
|
||||
var allCustomer = emp.Employee2CustomerList.Select(e2c => e2c.Customer).ToList();
|
||||
//Wenn mehrere Kinder betreut werden, dann ändert sich der pool Faktor und die Kinder müssen mit aufgelistet werden
|
||||
if (allCustomer.Count > 1)
|
||||
{
|
||||
poolFaktor = (10 + allCustomer.Count) / 10m; //bei zwei Kindern Faktor 1,2, bei drei Kindern 1,3 etc.
|
||||
|
||||
foreach (var c in allCustomer)
|
||||
{
|
||||
//Alle betreuten Kinder, für den der Beleg nicht gedruckt wurde, müssen mit Namen aufgeführt werden.
|
||||
if (c.Oid != pRO.CustomerOid)
|
||||
{
|
||||
klienten += "\n";
|
||||
klienten += c.Person.FirstNameLastName;
|
||||
|
||||
klassen += "\n";
|
||||
klassen += c.Childs;
|
||||
|
||||
decimal bewilligt = GetAktuelleBewilligung(c, pRO.StartDate);
|
||||
bewilligungen += "\n";
|
||||
bewilligungen += String.Format("{0:0.00}", bewilligt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cellKinder.Text = klienten;
|
||||
cellKlasse.Text = klassen;
|
||||
cellBewilligung.Text = bewilligungen;
|
||||
|
||||
foreach (var item in pRO.Services)
|
||||
{
|
||||
if (item.ArbeitszeitEintraege != null && item.ArbeitszeitEintraege.Count > 0)
|
||||
{
|
||||
item.StundenplanUhrzeiten1 = String.Format(item.ArbeitszeitEintraege[0].UhrzeitVon);
|
||||
item.StundenplanUhrzeiten2 = String.Format(item.ArbeitszeitEintraege[item.ArbeitszeitEintraege.Count - 1].UhrzeitBis);
|
||||
}
|
||||
if (item.ServiceRecordOid > 0)
|
||||
{
|
||||
item.IstUhrzeiten1 = String.Format("{0:HH:mm}", item.StartDate);
|
||||
item.IstUhrzeiten2 = String.Format("{0:HH:mm}", item.EndDate);
|
||||
}
|
||||
if (item.Minutes > 0)
|
||||
{
|
||||
item.Notice5 = String.Format("{0:0.0}", poolFaktor);
|
||||
}
|
||||
|
||||
}
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
private decimal GetAktuelleBewilligung(Customer c, DateTime datum)
|
||||
{
|
||||
var scList = c.SupportConcepts;
|
||||
|
||||
foreach (var sc in scList)
|
||||
{
|
||||
foreach (var c2s in sc.CostBearer2SupportConceptList)
|
||||
{
|
||||
foreach (var scap in c2s.ApprovalPeriodList)
|
||||
{
|
||||
if (scap.StartDate <= datum && datum <= scap.EndDate && scap.ApprovedBEPerInterval.HasValue)
|
||||
{
|
||||
return scap.ApprovedBEPerInterval.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
1125
ReportImp/ChristopherusHausMID/Leistungsnachweis.designer.cs
generated
Normal file
1125
ReportImp/ChristopherusHausMID/Leistungsnachweis.designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
120
ReportImp/ChristopherusHausMID/Leistungsnachweis.resx
Normal file
120
ReportImp/ChristopherusHausMID/Leistungsnachweis.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
</root>
|
||||
File diff suppressed because it is too large
Load Diff
249
ReportImp/ChristopherusHausMID/Rechnung.cs
Normal file
249
ReportImp/ChristopherusHausMID/Rechnung.cs
Normal file
@@ -0,0 +1,249 @@
|
||||
using BeWo.Report.ReportObjects;
|
||||
|
||||
using DevExpress.XtraReports.UI;
|
||||
using BS.Shared.Core;
|
||||
using BeWo.Report;
|
||||
using System;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ChristopherusHausMID
|
||||
{
|
||||
public partial class Rechnung : XtraReport, IBeWoReport<ServiceInvoiceRO>
|
||||
{
|
||||
public Rechnung()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
||||
{
|
||||
SetzeAdresse(pRO);
|
||||
SetzeSchule(pRO);
|
||||
SetzeSollIst(pRO);
|
||||
SetzeKategorie(pRO);
|
||||
|
||||
this.bindingSource1.DataSource = CreateRechnungsRO(pRO);
|
||||
}
|
||||
|
||||
private RechnungRO CreateRechnungsRO(ServiceInvoiceRO pRO)
|
||||
{
|
||||
var ro = new RechnungRO();
|
||||
ro.ServiceInvoice = pRO;
|
||||
ro.WeitereRechnungspositionen = new List<RechnungsPositionRO>();
|
||||
ro.SummenPosition = new RechnungsPositionRO();
|
||||
|
||||
foreach (var ip in pRO.ServiceInvoicePeriods)
|
||||
{
|
||||
|
||||
foreach (var item in ip.ServiceInvoiceItems)
|
||||
{
|
||||
var pos = new RechnungsPositionRO();
|
||||
if (!String.IsNullOrEmpty(item.UnitDescription))
|
||||
{
|
||||
if (item.UnitDescription == "Faktor 1.0")
|
||||
{
|
||||
pos.BetreuteStunden10 = item.UnitCount ?? 0;
|
||||
}
|
||||
else if (item.UnitDescription == "Faktor 1.1")
|
||||
{
|
||||
pos.BetreuteStunden11 = item.UnitCount ?? 0;
|
||||
}
|
||||
else if (item.UnitDescription == "Faktor 1.2")
|
||||
{
|
||||
pos.BetreuteStunden12 = item.UnitCount ?? 0;
|
||||
}
|
||||
else if (item.UnitDescription == "Faktor 1.3")
|
||||
{
|
||||
pos.BetreuteStunden13 = item.UnitCount ?? 0;
|
||||
}
|
||||
else if (item.UnitDescription == "Faktor 1.4")
|
||||
{
|
||||
pos.BetreuteStunden14 = item.UnitCount ?? 0;
|
||||
}
|
||||
else if (item.UnitDescription == "Faktor 1.5")
|
||||
{
|
||||
pos.BetreuteStunden15 = item.UnitCount ?? 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pos.BetreuteStunden10 = item.UnitCount ?? 0;
|
||||
}
|
||||
pos.GesamtStunden = item.UnitCount ?? 0;
|
||||
pos.GesamtBetrag = item.NetAmount ?? 0;
|
||||
pos.Stundensatz = item.AmountPerUnit ?? 0;
|
||||
pos.Rechungsanteil = 100;
|
||||
if (ip.SupportConceptApprovalPeriod != null)
|
||||
{
|
||||
pos.BewilligtProWoche = ip.SupportConceptApprovalPeriod.ApprovedBEPerInterval ?? 0;
|
||||
}
|
||||
if (ip.Customer != null)
|
||||
{
|
||||
pos.CustomerName = String.Format("{0} {1}", ip.Customer.FirstName, ip.Customer.LastName);
|
||||
}
|
||||
|
||||
if (ro.MainRechnungsposition == null)
|
||||
{
|
||||
ro.MainRechnungsposition = pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
ro.WeitereRechnungspositionen.Add(pos);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (ro.MainRechnungsposition == null)
|
||||
{
|
||||
ro.MainRechnungsposition = new RechnungsPositionRO();
|
||||
}
|
||||
|
||||
ro.SummenPosition.Rechungsanteil = 100;
|
||||
ro.SummenPosition.Stundensatz = ro.MainRechnungsposition.Stundensatz;
|
||||
|
||||
AddPositionZuGesamt(ro.MainRechnungsposition, ro.SummenPosition);
|
||||
|
||||
foreach (var item in ro.WeitereRechnungspositionen)
|
||||
{
|
||||
AddPositionZuGesamt(item, ro.SummenPosition);
|
||||
}
|
||||
return ro;
|
||||
}
|
||||
|
||||
private void AddPositionZuGesamt(RechnungsPositionRO item, RechnungsPositionRO summenPosition)
|
||||
{
|
||||
summenPosition.Stunden5Prozent10 += item.Stunden5Prozent10;
|
||||
summenPosition.BetragStunden10 += item.BetragStunden10;
|
||||
summenPosition.BetragStunden11 += item.BetragStunden11;
|
||||
summenPosition.BetragStunden12 += item.BetragStunden12;
|
||||
summenPosition.BetragStunden13 += item.BetragStunden13;
|
||||
summenPosition.BetragStunden14 += item.BetragStunden14;
|
||||
summenPosition.BetragStunden15 += item.BetragStunden15;
|
||||
|
||||
summenPosition.BetreuteStunden10 += item.BetreuteStunden10;
|
||||
summenPosition.BetreuteStunden11 += item.BetreuteStunden11;
|
||||
summenPosition.BetreuteStunden12 += item.BetreuteStunden12;
|
||||
summenPosition.BetreuteStunden13 += item.BetreuteStunden13;
|
||||
summenPosition.BetreuteStunden14 += item.BetreuteStunden14;
|
||||
summenPosition.BetreuteStunden15 += item.BetreuteStunden15;
|
||||
|
||||
summenPosition.GesamtBetrag += item.GesamtBetrag;
|
||||
summenPosition.GesamtStunden += item.GesamtStunden;
|
||||
|
||||
}
|
||||
|
||||
private void SetzeSollIst(ServiceInvoiceRO pRO)
|
||||
{
|
||||
foreach (var ip in pRO.ServiceInvoicePeriods)
|
||||
{
|
||||
|
||||
if (ip.SupportConceptApprovalPeriod.ApprovedBEInterval == BS.Shared.SupportConceptApprovalInterval.Weekly)
|
||||
continue;
|
||||
if (ip.SupportConceptApprovalPeriod.ApprovedBEInterval == BS.Shared.SupportConceptApprovalInterval.Monthly)
|
||||
ip.SupportConceptApprovalPeriod.ApprovedBEPerInterval /= 4.34m;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetzeKategorie(ServiceInvoiceRO pRO)
|
||||
{
|
||||
lblKategorie.Text = "";
|
||||
foreach (var ip in pRO.ServiceInvoicePeriods)
|
||||
{
|
||||
if (ip.SupportConceptApprovalPeriod.ServiceCategory != null)
|
||||
{
|
||||
lblKategorie.Text = ip.SupportConceptApprovalPeriod.ServiceCategory.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetzeSchule(ServiceInvoiceRO pRO)
|
||||
{
|
||||
lblSchule.Text = "";
|
||||
if (pRO.InvoiceBase.CustomerOid > 0)
|
||||
{
|
||||
var customer = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.InvoiceBase.CustomerOid);
|
||||
foreach (var c2o in customer.Customer2OrganisationList)
|
||||
{
|
||||
foreach (var v2o in c2o.ValueList)
|
||||
{
|
||||
if (v2o.Entry.Value != null && v2o.Entry.Value.Contains("Schule"))
|
||||
{
|
||||
var schule = c2o.Organisation;
|
||||
lblSchule.Text = String.Format("{0}\n{1}\n{2} {3}", schule.Name, schule.Address?.Street, schule.Address?.PostalCode, schule.Address?.Town);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetzeAdresse(ServiceInvoiceRO pRO)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientOrganisation))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientOrganisation);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientContactPerson))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientContactPerson);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientDivision))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientDivision);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientStreet))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientStreet);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(pRO.RecipientPostCodeAndTown))
|
||||
{
|
||||
sb.AppendLine(pRO.RecipientPostCodeAndTown);
|
||||
}
|
||||
lblAdresse.Text = sb.ToString();
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
}
|
||||
|
||||
public class RechnungRO
|
||||
{
|
||||
public ServiceInvoiceRO ServiceInvoice { get; set; }
|
||||
public RechnungsPositionRO MainRechnungsposition { get; set; }
|
||||
public List<RechnungsPositionRO> WeitereRechnungspositionen { get; set; }
|
||||
public RechnungsPositionRO SummenPosition { get; set; }
|
||||
}
|
||||
|
||||
public class RechnungsPositionRO
|
||||
{
|
||||
public int Position { get; set; }
|
||||
public String CustomerName { get; set; }
|
||||
public decimal BewilligtProWoche { get; set; }
|
||||
public decimal Fehltage { get; set; }
|
||||
public decimal Rechungsanteil { get; set; }
|
||||
public decimal Stundensatz { get; set; }
|
||||
public decimal Stunden5Prozent10 { get; set; }
|
||||
public decimal Betrag5Prozent10 { get; set; }
|
||||
public decimal BetreuteStunden10 { get; set; }
|
||||
public decimal BetragStunden10 { get; set; }
|
||||
public decimal BetreuteStunden11 { get; set; }
|
||||
public decimal BetragStunden11 { get; set; }
|
||||
public decimal BetreuteStunden12 { get; set; }
|
||||
public decimal BetragStunden12 { get; set; }
|
||||
public decimal BetreuteStunden13 { get; set; }
|
||||
public decimal BetragStunden13 { get; set; }
|
||||
public decimal BetreuteStunden14 { get; set; }
|
||||
public decimal BetragStunden14 { get; set; }
|
||||
public decimal BetreuteStunden15 { get; set; }
|
||||
public decimal BetragStunden15 { get; set; }
|
||||
public decimal GesamtStunden { get; set; }
|
||||
public decimal GesamtBetrag { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
using BeWo.Report.ReportObjects;
|
||||
|
||||
using DevExpress.XtraReports.UI;
|
||||
using BS.Shared.Core;
|
||||
using BeWo.Report;
|
||||
using System;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using System.Linq;
|
||||
|
||||
namespace ChristopherusHausMID
|
||||
{
|
||||
[IDSpecificClass(Identifier = "Sammelrechnung")]
|
||||
public partial class Sammelrechnung : XtraReport, IBeWoReport<ServiceInvoiceRO>
|
||||
{
|
||||
public Sammelrechnung()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(ServiceInvoiceRO pRO)
|
||||
{
|
||||
foreach (var ip in pRO.ServiceInvoicePeriods)
|
||||
{
|
||||
var c = MapperFactory.CustomerDC_Customer.MapToNewDC(DAOFactory.GenericDAO.GetByID<Customer>(ip.Customer.CustomerOid));
|
||||
if (c.AbsenceTimes != null && c.AbsenceTimes.Count > 0)
|
||||
{
|
||||
foreach (var abs in c.AbsenceTimes)
|
||||
{
|
||||
if (abs.Start == null)
|
||||
abs.Start = pRO.AccountingPeriodStart;
|
||||
if (abs.End == null)
|
||||
abs.End = pRO.AccountingPeriodEnd;
|
||||
}
|
||||
|
||||
var absences = c.AbsenceTimes.Where(a => a.Start >= pRO.AccountingPeriodStart && a.End <= pRO.AccountingPeriodEnd).ToList();
|
||||
if (absences.Count > 0)
|
||||
{
|
||||
var anzahlTageAbwesend = absences.Sum(a => (a.End.Value - a.Start.Value).Days + 1);
|
||||
ip.Notice = string.Format("{0:0}", anzahlTageAbwesend);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in ip.ServiceInvoiceItems)
|
||||
{
|
||||
var rfProzent = item.RateFactor.Split(' ')[0];
|
||||
decimal rateFactor = Math.Round((Convert.ToDecimal(rfProzent) + 100) / 100, 2);
|
||||
item.NetAmount = item.UnitCount * item.AmountPerUnit * rateFactor;
|
||||
}
|
||||
|
||||
if (ip.SupportConceptApprovalPeriod.ApprovedBEInterval == BS.Shared.SupportConceptApprovalInterval.Weekly)
|
||||
continue;
|
||||
if (ip.SupportConceptApprovalPeriod.ApprovedBEInterval == BS.Shared.SupportConceptApprovalInterval.Monthly)
|
||||
ip.SupportConceptApprovalPeriod.ApprovedBEPerInterval /= 4.34m;
|
||||
}
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BeWo.Data;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace ChristopherusHausMID.Service
|
||||
{
|
||||
public class CustomOperationService : OperationService
|
||||
{
|
||||
private ServiceDescription leistungSchulbegleitung;
|
||||
|
||||
protected override bool CreateServiceRecordsIfAnyExistInDateRange { get { return true; } }
|
||||
|
||||
//public override ServiceRecord CreateServiceRecord(ArbeitszeitEintrag ae, DateTime datum, CostBearer2SupportConcept c2s, ServiceDescription defaultSd)
|
||||
//{
|
||||
|
||||
// var sr = base.CreateServiceRecord(ae, datum, c2s, defaultSd);
|
||||
|
||||
|
||||
// return sr;
|
||||
//}
|
||||
|
||||
//public override Employee GetHauptbetreuung(Customer customer, DateTime date)
|
||||
//{
|
||||
// return customer.Employee2CustomerList.FirstOrDefault(e2c => e2c.IsActive == ActivationTypeId.Active &&
|
||||
// (!e2c.StartDate.HasValue || e2c.StartDate.Value.Date <= date) && (!e2c.EndDate.HasValue || e2c.EndDate.Value.Date >= date) &&
|
||||
// e2c.ValueList.Any(b => b.Entry.Type.Equals(ValueListEntryType.StaffRoleType) &&
|
||||
// b.Entry.Value.Contains("Hauptbetreuung")))?.Employee;
|
||||
//}
|
||||
|
||||
public override ServiceDescription GetDefaultServiceDescription(CostBearer2SupportConcept c2s)
|
||||
{
|
||||
if (leistungSchulbegleitung == null)
|
||||
{
|
||||
var sc = c2s.SupportConcept;
|
||||
if (sc.ServiceAccountings.Count > 0)
|
||||
{
|
||||
leistungSchulbegleitung = sc.ServiceAccountings[0].ServiceDescription;
|
||||
}
|
||||
if (leistungSchulbegleitung == null)
|
||||
{
|
||||
leistungSchulbegleitung = base.GetDefaultServiceDescription(c2s);
|
||||
}
|
||||
}
|
||||
|
||||
return leistungSchulbegleitung;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ChristopherusHausMID.Service
|
||||
{
|
||||
public class CustomVacationService : VacationService
|
||||
{
|
||||
public override List<FeiertagDC> GetFeiertage(int year, String bundesland)
|
||||
{
|
||||
List<FeiertagDC> list = base.GetFeiertage(year, bundesland);
|
||||
list.Add(new FeiertagDC { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace ChristopherusHausMID.Translation
|
||||
{
|
||||
public class ChristopherusHausMID : TranslationDictionary
|
||||
{
|
||||
public override Dictionary<String, String> GetTranslationDictionary()
|
||||
{
|
||||
var dict = base.GetTranslationDictionary();
|
||||
AddOrReplaceTranslation(dict, "Kinder", "Klasse");
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,11 @@ namespace HphBersenbrueck.Export
|
||||
QueryDC q = null;
|
||||
if (query.Oid == 3000)
|
||||
{
|
||||
q = MicosExporter.CreateQuery(query);
|
||||
q = MicosExporter.CreateQuery(query, false);
|
||||
}
|
||||
else if (query.Oid == 6000)
|
||||
{
|
||||
q = MicosExporter.CreateQuery(query, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace HphBersenbrueck.Export
|
||||
public class MicosExporter
|
||||
{
|
||||
|
||||
public static QueryDC CreateQuery(QueryDC query)
|
||||
public static QueryDC CreateQuery(QueryDC query, bool exportCsv)
|
||||
{
|
||||
DateTime dt = DateTime.Now;
|
||||
DateTime.TryParse(query.Parameter[0].Value.ToString(), out dt);
|
||||
@@ -43,7 +43,25 @@ namespace HphBersenbrueck.Export
|
||||
{
|
||||
dtStart = new DateTime(1900, 1, 1);
|
||||
}
|
||||
query.QueryResult = GetAbrechnungenString(dt, buchungsdatum, dtStart, dtEnd, false);
|
||||
|
||||
DateTime abrechnungsStart = dt;
|
||||
DateTime abrechnungsEnde = dt.AddMonths(1).AddDays(-1);
|
||||
|
||||
if (query.Oid == 6000)
|
||||
{
|
||||
//CSV Export
|
||||
abrechnungsStart = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
|
||||
abrechnungsEnde = abrechnungsStart.AddMonths(1).AddDays(-1);
|
||||
DateTimeSpan span = query.Parameter[0].Value as DateTimeSpan;
|
||||
if (span != null && span.StartDate > DateTime.MinValue && span.EndDate < DateTime.MaxValue.Date)
|
||||
{
|
||||
abrechnungsStart = span.StartDate;
|
||||
abrechnungsEnde = span.EndDate;
|
||||
}
|
||||
query.FileName = String.Format("Rechnungen {0:yyyyMM}-{1:yyyyMM}.csv", abrechnungsStart, abrechnungsEnde);
|
||||
}
|
||||
|
||||
query.QueryResult = GetAbrechnungenString(abrechnungsStart, abrechnungsEnde, buchungsdatum, dtStart, dtEnd, false, exportCsv);
|
||||
|
||||
return query;
|
||||
}
|
||||
@@ -57,7 +75,7 @@ namespace HphBersenbrueck.Export
|
||||
DateTime dtStart = new DateTime(1900, 1, 1);
|
||||
DateTime dtEnd = DateTime.MaxValue;
|
||||
|
||||
var gesamtExport = GetAbrechnungenString(dt, null, dtStart, dtEnd, true);
|
||||
var gesamtExport = GetAbrechnungenString(dt, dt.AddMonths(1).AddDays(-1), null, dtStart, dtEnd, true, false);
|
||||
var letzterExport = GetAlteExporte();
|
||||
if (String.IsNullOrEmpty(letzterExport))
|
||||
{
|
||||
@@ -73,7 +91,7 @@ namespace HphBersenbrueck.Export
|
||||
{
|
||||
DateTime dt = DateTime.Now;
|
||||
DateTime.TryParse(pHeaderCaption[1], out dt);
|
||||
var gesamtExport = GetAbrechnungenString(dt, null, dt, dt, false);
|
||||
var gesamtExport = GetAbrechnungenString(dt, dt.AddMonths(1).AddDays(-1), null, dt, dt, false, false);
|
||||
|
||||
var letzterExport = GetAlteExporte();
|
||||
if (String.IsNullOrEmpty(letzterExport))
|
||||
@@ -104,10 +122,10 @@ namespace HphBersenbrueck.Export
|
||||
}
|
||||
|
||||
//Buchungsdatum soll in manchen Fällen vom User ausgewählt werden können
|
||||
public static String GetAbrechnungenString(DateTime monat, DateTime? buchungsdatum, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis, bool differenz)
|
||||
public static String GetAbrechnungenString(DateTime abrechnungStart, DateTime abrechnungEnde, DateTime? buchungsdatum, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis, bool differenz, bool exportCsv)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
var s = GetMonatlicheAbrechnungString(monat, buchungsdatum, rechnungsDatumVon, rechnungsDatumBis, differenz);
|
||||
var s = GetMonatlicheAbrechnungString(abrechnungStart, abrechnungEnde, buchungsdatum, rechnungsDatumVon, rechnungsDatumBis, differenz, exportCsv);
|
||||
if (!String.IsNullOrWhiteSpace(s))
|
||||
{
|
||||
sb.Append(s);
|
||||
@@ -118,9 +136,9 @@ namespace HphBersenbrueck.Export
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static String GetMonatlicheAbrechnungString(DateTime monat, DateTime? buchungsdatum, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis, bool differenz)
|
||||
public static String GetMonatlicheAbrechnungString(DateTime abrechnungStart, DateTime abrechnungEnde, DateTime? buchungsdatum, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis, bool differenz, bool exportCsv)
|
||||
{
|
||||
var sql = GetRechnungenSql(monat, rechnungsDatumVon, rechnungsDatumBis, differenz);
|
||||
var sql = GetRechnungenSql(abrechnungStart, abrechnungEnde, rechnungsDatumVon, rechnungsDatumBis, differenz);
|
||||
|
||||
/*
|
||||
* SELECT
|
||||
@@ -132,9 +150,11 @@ ib.InvoiceDate,
|
||||
CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber is null, '', cb2sc.CustomerRefenrenceNumber), ' Abrechnung :PeriodePunkt ', org.Name) as 'Verwendung',
|
||||
*/
|
||||
|
||||
var dt = ExecuteQuery(sql, monat);
|
||||
var datensaetze = CreateMicosDatensaetze(dt, monat);
|
||||
var dt = ExecuteQuery(sql, abrechnungStart);
|
||||
var datensaetze = CreateMicosDatensaetze(dt, abrechnungStart);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder csvSb = new StringBuilder();
|
||||
csvSb.Append("Buchungsdatum;Debitor;Betrag;Sachkonto;Rechnungsdatum;Belegnummer;Kostenstelle;Buchungstext");
|
||||
|
||||
foreach (var data in datensaetze)
|
||||
{
|
||||
@@ -143,15 +163,18 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
|
||||
{
|
||||
sb.AppendLine();
|
||||
}
|
||||
csvSb.AppendLine();
|
||||
//03002022021500070EURO990037107S000001767690004050 15022200037810037200 RE R03-781 DAK-Gesundhei 00000000
|
||||
sb.Append("0300");
|
||||
if (buchungsdatum.HasValue)
|
||||
{
|
||||
sb.Append(String.Format("{0:yyyyMMdd}", buchungsdatum)); //
|
||||
csvSb.Append(String.Format("{0:dd.MM.yyyy};", buchungsdatum)); //
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(String.Format("{0:yyyyMMdd}", data.Datum)); //
|
||||
csvSb.Append(String.Format("{0:dd.MM.yyyy};", data.Datum)); //
|
||||
}
|
||||
|
||||
sb.Append("00070");
|
||||
@@ -164,8 +187,12 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
|
||||
}
|
||||
sb.Append(debitornr);
|
||||
sb.Append("S");
|
||||
csvSb.Append(debitornr);
|
||||
csvSb.Append(";");
|
||||
|
||||
String betrag = String.Format("{0:0.00}", data.Betrag); // Betrag
|
||||
csvSb.Append(betrag);
|
||||
csvSb.Append(";");
|
||||
if (betrag.Contains("-")) // Storno
|
||||
{
|
||||
betrag = betrag.Replace("-", "");
|
||||
@@ -182,8 +209,11 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
|
||||
sb.Append(betrag);
|
||||
sb.Append("000");
|
||||
sb.Append(data.Sachkonto);
|
||||
csvSb.Append(data.Sachkonto);
|
||||
csvSb.Append(";");
|
||||
sb.Append(" ");
|
||||
sb.Append(String.Format("{0:ddMMyy}", data.RechnungsDatum)); // Belegdatum
|
||||
csvSb.Append(String.Format("{0:dd.MM.yyyy};", data.RechnungsDatum));
|
||||
String belegnummer = data.Belegnummer; // Belegnummer
|
||||
if (belegnummer.Contains("Storno"))
|
||||
{
|
||||
@@ -196,13 +226,16 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
|
||||
belegnummer = "0" + belegnummer;
|
||||
}
|
||||
sb.Append(belegnummer);
|
||||
|
||||
csvSb.Append(belegnummer);
|
||||
csvSb.Append(";");
|
||||
String kostenstelle = data.Kostenstelle;
|
||||
while (kostenstelle.Length < 7)
|
||||
{
|
||||
kostenstelle = "0" + kostenstelle;
|
||||
}
|
||||
sb.Append(kostenstelle);
|
||||
csvSb.Append(kostenstelle);
|
||||
csvSb.Append(";");
|
||||
sb.Append(" "); // Skonto 9 Leerzeichen
|
||||
sb.Append(" "); // Textschlüssel 2 Leerzeichen
|
||||
if (storno)
|
||||
@@ -227,6 +260,7 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
|
||||
{
|
||||
buchungstext = buchungstext + " ";
|
||||
}
|
||||
csvSb.Append(buchungstext);
|
||||
sb.Append(buchungstext);
|
||||
sb.Append(" "); // Steuerbetrag 9 Leerzeichen
|
||||
sb.Append(" "); // Wechselfälligkeitsdatum 8 Leerzeichen
|
||||
@@ -245,6 +279,10 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
|
||||
//sb.Append(data.Artikelbezeichnung);
|
||||
}
|
||||
|
||||
if (exportCsv)
|
||||
{
|
||||
return csvSb.ToString();
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@@ -443,7 +481,7 @@ CONCAT(p.`LastName`, ', ', p.`FirstName`, ' ', IF(cb2sc.CustomerRefenrenceNumber
|
||||
|
||||
}
|
||||
|
||||
private static String GetRechnungenSql(DateTime date, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis, bool differenz)
|
||||
private static String GetRechnungenSql(DateTime abrechnungStart, DateTime abrechnungEnde, DateTime rechnungsDatumVon, DateTime rechnungsDatumBis, bool differenz)
|
||||
{
|
||||
|
||||
String sql = @"
|
||||
@@ -484,9 +522,8 @@ ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate`
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = sql.Replace(":MonatAbrechnung_Start", String.Format("{0:yyyy-MM}-01", date));
|
||||
date = date.AddMonths(1);
|
||||
sql = sql.Replace(":MonatAbrechnung_End", String.Format("{0:yyyy-MM}-01", date));
|
||||
sql = sql.Replace(":MonatAbrechnung_Start", String.Format("{0:yyyy-MM}-01", abrechnungStart));
|
||||
sql = sql.Replace(":MonatAbrechnung_End", String.Format("{0:yyyy-MM}-01", abrechnungEnde.AddDays(1)));
|
||||
}
|
||||
return sql;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,23 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung
|
||||
|
||||
public static decimal GetPreisForFreizeitangebot(Pflegegrad? pflegegrad, DateTime d)
|
||||
{
|
||||
if (d >= new DateTime(2025, 1, 1))
|
||||
{
|
||||
if (pflegegrad.HasValue)
|
||||
{
|
||||
switch (pflegegrad.Value)
|
||||
{
|
||||
case Pflegegrad.KeinGrad:
|
||||
return 30;
|
||||
case Pflegegrad.PflegegradBeantragt:
|
||||
return 30;
|
||||
default:
|
||||
return 60;
|
||||
}
|
||||
}
|
||||
|
||||
return 30;
|
||||
}
|
||||
if (d >= new DateTime(2022, 1, 1))
|
||||
{
|
||||
if (pflegegrad.HasValue)
|
||||
@@ -98,6 +115,23 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung
|
||||
|
||||
public static decimal GetPreisForAusflugFreizeittreff(Pflegegrad? pflegegrad, DateTime d)
|
||||
{
|
||||
if (d >= new DateTime(2025, 1, 1))
|
||||
{
|
||||
if (pflegegrad.HasValue)
|
||||
{
|
||||
switch (pflegegrad.Value)
|
||||
{
|
||||
case Pflegegrad.KeinGrad:
|
||||
return 53;
|
||||
case Pflegegrad.PflegegradBeantragt:
|
||||
return 53;
|
||||
default:
|
||||
return 105;
|
||||
}
|
||||
}
|
||||
|
||||
return 49;
|
||||
}
|
||||
if (d >= new DateTime(2022, 1, 1))
|
||||
{
|
||||
if (pflegegrad.HasValue)
|
||||
@@ -178,6 +212,23 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung
|
||||
|
||||
public static decimal GetPreisForReisen(Pflegegrad? pflegegrad, DateTime d)
|
||||
{
|
||||
if (d >= new DateTime(2025, 1, 1))
|
||||
{
|
||||
if (pflegegrad.HasValue)
|
||||
{
|
||||
switch (pflegegrad.Value)
|
||||
{
|
||||
case Pflegegrad.KeinGrad:
|
||||
return 90;
|
||||
case Pflegegrad.PflegegradBeantragt:
|
||||
return 90;
|
||||
default:
|
||||
return 180;
|
||||
}
|
||||
}
|
||||
|
||||
return 90;
|
||||
}
|
||||
if (d >= new DateTime(2022, 1, 1))
|
||||
{
|
||||
if (pflegegrad.HasValue)
|
||||
@@ -269,10 +320,10 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung
|
||||
|
||||
public static decimal GetPreisForEinzelbetreuungHauptamtlich(DateTime dt)
|
||||
{
|
||||
//if (dt >= new DateTime(2017, 1, 1))
|
||||
//{
|
||||
// return 26;
|
||||
//}
|
||||
if (dt >= new DateTime(2025, 1, 1))
|
||||
{
|
||||
return 30;
|
||||
}
|
||||
return 26;
|
||||
}
|
||||
|
||||
@@ -381,6 +432,20 @@ namespace HphBersenbrueckFreizeitUndReisen.Abrechnung
|
||||
}
|
||||
}
|
||||
|
||||
if (datum >= new DateTime(2025, 1, 1))
|
||||
{
|
||||
if (hatPflegegrad)
|
||||
{
|
||||
preis = 135;
|
||||
}
|
||||
else
|
||||
{
|
||||
preis = 68;
|
||||
}
|
||||
|
||||
|
||||
return preis;
|
||||
}
|
||||
|
||||
if (hatPflegegrad)
|
||||
{
|
||||
|
||||
@@ -170,6 +170,91 @@ namespace HphBersenbrueckFreizeitUndReisen
|
||||
|
||||
bool add = false;
|
||||
|
||||
|
||||
//CB: Bis 10.01.2025
|
||||
//foreach (var sr in serviceRecords)
|
||||
//{
|
||||
// bool cont = false;
|
||||
|
||||
// if (sr.InsTs.HasValue && instsStart <= sr.InsTs && sr.InsTs < instsStop.Date)
|
||||
// {
|
||||
// cont = true;
|
||||
// }
|
||||
// if (cont)
|
||||
// {
|
||||
// if (sr.ServiceDescription.Name.Contains("Einzelbetreuung") || sr.ServiceDescription.Name.Contains("Freizeithelfer"))
|
||||
// {
|
||||
// add = true;
|
||||
// if (isMinijobber)
|
||||
// {
|
||||
// ro.StundenLoa51_35800 = (ro.StundenLoa51_35800 ?? 0) + sr.RoundedDuration/60;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ro.StundenLoA53_35700 = (ro.StundenLoA53_35700 ?? 0) + sr.RoundedDuration/60;
|
||||
|
||||
// }
|
||||
|
||||
// if (sr.DistanceInMeter.HasValue)
|
||||
// {
|
||||
// ro.KilometerLoa497 = (ro.KilometerLoa497 ?? 0) + sr.DistanceInMeter.Value;
|
||||
// }
|
||||
// }
|
||||
// else if (sr.ServiceDescription.Name.Contains("Führungszeugnis"))
|
||||
// {
|
||||
// add = true;
|
||||
|
||||
// var preis = GetPreisVonServiceDescription(sr.ServiceDescription, reportMonat);
|
||||
// if (preis.HasValue)
|
||||
// {
|
||||
// ro.FührungszeugnisseLoa494 = (ro.FührungszeugnisseLoa494 ?? 0) + preis;
|
||||
// }
|
||||
// }
|
||||
// else if (sr.ServiceDescription.ServiceCategory.Name.Contains("Helferentgelt"))
|
||||
// {
|
||||
// add = true;
|
||||
|
||||
// if (sr.ServiceDescription.Name.Contains("Kurzreise"))
|
||||
// {
|
||||
// ro.StundenLoA44_35900 = (ro.StundenLoa51_35900 ?? 0) + sr.RoundedDuration / 60;
|
||||
// }
|
||||
// else if (sr.ServiceDescription.Name.Contains("Reise"))
|
||||
// {
|
||||
// ro.StundenLoA44_35900 = (ro.StundenLoA44_35900 ?? 0) + sr.RoundedDuration / 60;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var preis = GetPreisVonServiceDescription(sr.ServiceDescription, reportMonat);
|
||||
// if (preis.HasValue)
|
||||
// {
|
||||
// //ro.FührungszeugnisseMinijobLoa494 = (ro.FührungszeugnisseMinijobLoa494 ?? 0) + preis;
|
||||
// }
|
||||
// }
|
||||
// //var preis = GetPreisVonServiceDescription(sr.ServiceDescription, reportMonat);
|
||||
// //if (preis.HasValue)
|
||||
// //{
|
||||
// // int tage = 0;
|
||||
|
||||
// // var start = sr.Start.Value;
|
||||
// // while (start.Date <= sr.End.Value.Date)
|
||||
// // {
|
||||
// // tage++;
|
||||
// // start = start.AddDays(1);
|
||||
// // }
|
||||
// // preis *= tage;
|
||||
// // ro.ReisenLoa44 = (ro.ReisenLoa44 ?? 0) + preis;
|
||||
// //}
|
||||
|
||||
// if (sr.DistanceInMeter.HasValue)
|
||||
// {
|
||||
// ro.KilometerLoa497 = (ro.KilometerLoa497 ?? 0) + sr.DistanceInMeter.Value;
|
||||
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//CB: Ab 11.01.2025
|
||||
foreach (var sr in serviceRecords)
|
||||
{
|
||||
bool cont = false;
|
||||
@@ -180,16 +265,66 @@ namespace HphBersenbrueckFreizeitUndReisen
|
||||
}
|
||||
if (cont)
|
||||
{
|
||||
if (sr.ServiceDescription.Name.Contains("Einzelbetreuung") || sr.ServiceDescription.Name.Contains("Freizeithelfer"))
|
||||
// Leistung:
|
||||
|
||||
// LoA 53(Kostenstelle 35700 & 35800)
|
||||
|
||||
//Einzelbetreuung + Einzelbetreuung hauptamtlich
|
||||
|
||||
// = Kategorie Entlastungsbetrag, Verhinderungspflege, Eingliederungshilfe, Selbstzahler
|
||||
|
||||
|
||||
|
||||
// LoA 44(Kostenstelle 35950)
|
||||
|
||||
//Freizeitangebote, Freizeittreff + Ausflüge, Tagesfahrten
|
||||
|
||||
//= Kategorie Entlastungsbetrag, Verhinderungspflege, Selbstzahler
|
||||
|
||||
|
||||
|
||||
//LoA 44(Kostenstelle 35900)
|
||||
|
||||
//Reisen
|
||||
|
||||
//= Kategorie Entlastungsbetrag, Verhinderungspflege, Selbstzahler
|
||||
|
||||
|
||||
|
||||
//Zudem kann bei den Kategorien raus:
|
||||
|
||||
// Kurzzeitpflege
|
||||
|
||||
// Wirtschaftl.Jugendhilfe
|
||||
|
||||
// Stadt Salzgitter
|
||||
|
||||
|
||||
|
||||
//Zudem kann die Leistung raus:
|
||||
|
||||
// Kurzurlaub
|
||||
|
||||
|
||||
|
||||
//Zudem nochmal die erste Mail: Können Sie die Helferentgeltliste aus dem BeWo so überarbeiten, dass die Stunden der Helfer für Einzelbetreuungen und Freizeitangebote(LoA 53) nicht mehr zusammengefasst, sondern jeweils in separaten Spalten aufgeführt werden?
|
||||
|
||||
//Zudem kann LoA 51 ? nur Kostenstelle 35700 raus und LoA 54 soll durch LoA 497 ersetzt werden.
|
||||
|
||||
var cat = sr.ServiceDescription.ServiceCategory.Name;
|
||||
var desc = sr.ServiceDescription.Name;
|
||||
|
||||
//Kostenstelle 35700+35800
|
||||
if (desc.Contains("Einzelbetreuung") && (cat.Contains("Entlastungsbetrag") || cat.Contains("Verhinderungspflege") || cat.Contains("Eingliederungshilfe") || cat.Contains("Selbstzahler")))
|
||||
{
|
||||
add = true;
|
||||
if (isMinijobber)
|
||||
{
|
||||
ro.StundenLoa51_35800 = (ro.StundenLoa51_35800 ?? 0) + sr.RoundedDuration/60;
|
||||
ro.StundenLoa51_35800 = (ro.StundenLoa51_35800 ?? 0) + sr.RoundedDuration / 60;
|
||||
}
|
||||
else
|
||||
{
|
||||
ro.StundenLoA53_35700 = (ro.StundenLoA53_35700 ?? 0) + sr.RoundedDuration/60;
|
||||
ro.StundenLoA53_35700 = (ro.StundenLoA53_35700 ?? 0) + sr.RoundedDuration / 60;
|
||||
|
||||
}
|
||||
|
||||
@@ -198,7 +333,8 @@ namespace HphBersenbrueckFreizeitUndReisen
|
||||
ro.KilometerLoa497 = (ro.KilometerLoa497 ?? 0) + sr.DistanceInMeter.Value;
|
||||
}
|
||||
}
|
||||
else if (sr.ServiceDescription.Name.Contains("Führungszeugnis"))
|
||||
//Kostenstelle 35950
|
||||
else if ((desc.Contains("Freizeitangebote") || desc.Contains("Freizeittreff") || desc.Contains("Tagesfahrt")) && (cat.Contains("Entlastungsbetrag") || cat.Contains("Verhinderungspflege") || cat.Contains("Selbstzahler")))
|
||||
{
|
||||
add = true;
|
||||
|
||||
@@ -208,7 +344,8 @@ namespace HphBersenbrueckFreizeitUndReisen
|
||||
ro.FührungszeugnisseLoa494 = (ro.FührungszeugnisseLoa494 ?? 0) + preis;
|
||||
}
|
||||
}
|
||||
else if (sr.ServiceDescription.ServiceCategory.Name.Contains("Helferentgelt"))
|
||||
//Kostenstelle 35900
|
||||
else if (desc.Contains("Reise") && (cat.Contains("Entlastungsbetrag") || cat.Contains("Verhinderungspflege") || cat.Contains("Selbstzahler")))
|
||||
{
|
||||
add = true;
|
||||
|
||||
|
||||
@@ -9,19 +9,32 @@ namespace InputFamilienhilfe
|
||||
{
|
||||
public class CustomMitarbeiterstundenkontoBerechnung : MitarbeiterstundenkontoBerechnung
|
||||
{
|
||||
public override List<DateTime> GetFeiertage(int year)
|
||||
{
|
||||
var list = base.GetFeiertage(year);
|
||||
//public override List<DateTime> GetFeiertage(int year)
|
||||
//{
|
||||
// var list = base.GetFeiertage(year);
|
||||
|
||||
list.Add(new DateTime(year, 1, 6)); // , "Heilige Drei Könige"));
|
||||
// list.Add(new DateTime(year, 1, 6)); // , "Heilige Drei Könige"));
|
||||
|
||||
list.Remove(new DateTime(year, 12, 24));
|
||||
//list.Add(new DateTime(year, 12, 31));
|
||||
// list.Remove(new DateTime(year, 12, 24));
|
||||
// //list.Add(new DateTime(year, 12, 31));
|
||||
|
||||
return list;
|
||||
// return list;
|
||||
// }
|
||||
|
||||
public override decimal GetFeiertagsFaktor(DateTime start)
|
||||
{
|
||||
if (start.Month == 12)
|
||||
{
|
||||
if (start.Day == 24 || start.Day == 31)
|
||||
{
|
||||
return 0.5m;
|
||||
}
|
||||
}
|
||||
|
||||
return base.GetFeiertagsFaktor(start);
|
||||
}
|
||||
|
||||
public override bool AddServiceRecordToDuration(ServiceRecord item)
|
||||
public override bool AddServiceRecordToDuration(ServiceRecord item)
|
||||
{
|
||||
if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null)
|
||||
{
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
<Compile Include="Invoicing\VerfahrensbeistandInvoiceCreation.cs" />
|
||||
<Compile Include="Invoicing\DefaultInvoiceCreation.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Service\CustomVacationService.cs" />
|
||||
<Compile Include="SettlementReport.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
using BeWo.Service.Plugins;
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace InputFamilienhilfe.Service
|
||||
{
|
||||
public class CustomVacationService : VacationService
|
||||
{
|
||||
public override List<FeiertagDC> GetFeiertage(int year, String bundesland)
|
||||
{
|
||||
List<FeiertagDC> list = base.GetFeiertage(year, bundesland);
|
||||
|
||||
list.Add(new FeiertagDC { Datum = new DateTime(year, 1, 6), Name = "Heilige Drei Könige" });
|
||||
list.Add(new FeiertagDC { Datum = new DateTime(year, 12, 31), Name = "Silvester" });
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public override decimal GetFeiertagsFaktor(DateTime start)
|
||||
{
|
||||
if (start.Month == 12)
|
||||
{
|
||||
if (start.Day == 24 || start.Day == 31)
|
||||
{
|
||||
return 0.5m;
|
||||
}
|
||||
}
|
||||
|
||||
return base.GetFeiertagsFaktor(start);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ namespace SHKService
|
||||
protected override void StarteBerechnung(DateTime berichtsAnfang, DateTime berichtsEnde, MitarbeiterstundenkontoRO.EmployeeDetail empDetail)
|
||||
{
|
||||
this.vacationService.Bundesland = "Hessen";
|
||||
AktuellBearbeitetesEmployeeDetail = empDetail;
|
||||
}
|
||||
|
||||
public override bool AddServiceRecordToDuration(ServiceRecord item)
|
||||
@@ -36,10 +37,55 @@ namespace SHKService
|
||||
|
||||
protected override bool HatArbeitszeitImZeitraum(IList<Arbeitszeit> arbeitszeiten, DateTime start, DateTime ende)
|
||||
{
|
||||
return false;
|
||||
//return false;
|
||||
return base.HatArbeitszeitImZeitraum(arbeitszeiten, start, ende);
|
||||
}
|
||||
|
||||
|
||||
protected override decimal GetSollNachArbeitszeitenFuerTag(Employee emp, DateTime tag)
|
||||
{
|
||||
//CB 14.01.2025: Wenn jemand Arbeitszeiten eingetragen hat, darf trotzdem nur das durschnittliche Soll für diesen Tag
|
||||
//in das Gesamt Soll einfließen, egal wie die Uhrzeiten für diesen Arbeitstag definiert sind
|
||||
|
||||
decimal soll = 0;
|
||||
var fak = GetFeiertagsFaktor(tag);
|
||||
|
||||
if (BerechneFeiertageAlsArbeitszeit())
|
||||
{
|
||||
if (fak == 1)
|
||||
{
|
||||
fak = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (fak < 1)
|
||||
{
|
||||
if (emp.Arbeitszeiten != null)
|
||||
{
|
||||
foreach (var az in emp.Arbeitszeiten)
|
||||
{
|
||||
if ((!az.GueltigVon.HasValue || az.GueltigVon.Value <= tag) &&
|
||||
(!az.GueltigBis.HasValue || az.GueltigBis.Value >= tag))
|
||||
{
|
||||
var std = GetArbeitszeitStundenFuerTag(az, tag);
|
||||
if (std > 0)
|
||||
{
|
||||
var c = emp.GetValidContractForDate(tag);
|
||||
if (c != null && c.WeeklyTotalHours.HasValue && c.WeeklyDays.HasValue && c.WeeklyDays.Value > 0)
|
||||
{
|
||||
std = c.WeeklyTotalHours.Value / c.WeeklyDays.Value;
|
||||
return std * (1 - fak);
|
||||
}
|
||||
}
|
||||
soll += (std * (1 - fak));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return soll;
|
||||
}
|
||||
|
||||
protected override ServiceRecordSummary BerechneStunden(MitarbeiterstundenkontoRO.EmployeeDetail empDetail, IList<ServiceRecord> groupFilteredRecords, DateTime berichtsAnfang,
|
||||
DateTime berichtsEnde)
|
||||
{
|
||||
@@ -91,6 +137,7 @@ namespace SHKService
|
||||
out decimal alteExtraUeberstunden)
|
||||
{
|
||||
return base.BerechneUeberstundenBis(edOrig, records, monat, out ueberstunden, out alteExtraUeberstunden);
|
||||
|
||||
}
|
||||
|
||||
public override IList<MitarbeiterstundenkontoRO.DayDetail> CreateDayDetails(DateTime berichtStart, DateTime berichtEnde, MitarbeiterstundenkontoRO.EmployeeDetail ed, IList<ServiceRecord> recordsAll)
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace BeWo.Service.Core
|
||||
else
|
||||
{
|
||||
body2 = "Kunde: " + MultitenancyOperationContextExt.Current.Tenant;
|
||||
body2 += "\nE-Mail: " + senderEMail;
|
||||
body2 += "\nRPL2-Mail: " + senderEMail;
|
||||
//body2 += "\r\nIP: " + GetClientIP();
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace BeWo.Service.Core
|
||||
if (senderEMail != from)
|
||||
{
|
||||
//Das hier rausnehmen wenn Mike OK gibt
|
||||
message.ReplyToList.Add(new MailAddress(senderEMail, senderName));
|
||||
//message.ReplyToList.Add(new MailAddress(senderEMail, senderName));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,22 @@ namespace BeWo.Service.DCEntityMapper
|
||||
pDataContract.MaxApprovedUnitCount = pEntity.MaxApprovedUnitCount;
|
||||
pDataContract.MaxApprovedAmount = pEntity.MaxApprovedAmount;
|
||||
pDataContract.Notice = pEntity.Notice;
|
||||
pDataContract.CustomString1 = pEntity.CustomString1;
|
||||
pDataContract.CustomString2 = pEntity.CustomString2;
|
||||
pDataContract.CustomString3 = pEntity.CustomString3;
|
||||
pDataContract.CustomString4 = pEntity.CustomString4;
|
||||
pDataContract.CustomString5 = pEntity.CustomString5;
|
||||
pDataContract.CustomNumber1 = pEntity.CustomNumber1;
|
||||
pDataContract.CustomNumber2 = pEntity.CustomNumber2;
|
||||
pDataContract.CustomNumber3 = pEntity.CustomNumber3;
|
||||
pDataContract.CustomNumber4 = pEntity.CustomNumber4;
|
||||
pDataContract.CustomNumber5 = pEntity.CustomNumber5;
|
||||
pDataContract.CustomDate1 = pEntity.CustomDate1;
|
||||
pDataContract.CustomDate2 = pEntity.CustomDate2;
|
||||
pDataContract.CustomDate3 = pEntity.CustomDate3;
|
||||
pDataContract.CustomDate4 = pEntity.CustomDate4;
|
||||
pDataContract.CustomDate5 = pEntity.CustomDate5;
|
||||
|
||||
//pDataContract.CostRatePeriodOids2Versions = pEntity.CostRatePeriodList.ToDictionary(i => i.Oid.Value, i => i.Version.Value);
|
||||
|
||||
if (pEntity.ServiceRecord != null)
|
||||
|
||||
@@ -1503,7 +1503,7 @@ namespace BeWo.Service.Reporting
|
||||
|
||||
if (sc.IsActive != ActivationTypeId.Deleted && customer.IsActive != ActivationTypeId.Deleted)
|
||||
{
|
||||
if ((iCb2Sc.ApprovedStartDate.HasValue && iCb2Sc.ApprovedEndDate.HasValue))
|
||||
if (iCb2Sc.ApprovedStartDate.HasValue && iCb2Sc.ApprovedEndDate.HasValue)
|
||||
{
|
||||
if (CustomerBelongsToTeam(customer, TeamOid) &&
|
||||
IsCustomerOfCustomerCareType(customer, CustomerCareTypeValueListEntryOid))
|
||||
|
||||
@@ -330,7 +330,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
RemoveServiceRecordsFromConfirmationReceiptSignatureForDeletion(item.Group.ServiceRecordList);
|
||||
|
||||
DeleteServiceRecordsFromAppointments(item.Group.ServiceRecordList.ToList());
|
||||
DeleteServiceRecordsFromAppointments(item.Group.ServiceRecordList.ToList(), true);
|
||||
|
||||
DAOFactory.GenericDAO.Delete(item.Group);
|
||||
}
|
||||
@@ -347,7 +347,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
RemoveServiceRecordsFromConfirmationReceiptSignatureForDeletion(srListToDelete);
|
||||
|
||||
DeleteServiceRecordsFromAppointments(srListToDelete);
|
||||
DeleteServiceRecordsFromAppointments(srListToDelete, true);
|
||||
|
||||
DAOFactory.GenericDAO.Delete(srListToDelete);
|
||||
}
|
||||
@@ -357,12 +357,14 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
private static void DeleteServiceRecordsFromAppointments(List<ServiceRecord> serviceRecords)
|
||||
private static void DeleteServiceRecordsFromAppointments(List<ServiceRecord> serviceRecords, bool deleteSignatures)
|
||||
{
|
||||
MakeServiceRecordHistoryEntry(serviceRecords, null, StatementType.Delete);
|
||||
|
||||
RemoveServiceRecordsFromConfirmationReceiptSignatures(MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(serviceRecords), DAOFactory.GenericDAO.LoadByIDs<ServiceRecord>(serviceRecords.Select(s => s.Oid.Value)), true);
|
||||
|
||||
if (deleteSignatures)
|
||||
{
|
||||
RemoveServiceRecordsFromConfirmationReceiptSignatures(MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(serviceRecords), DAOFactory.GenericDAO.LoadByIDs<ServiceRecord>(serviceRecords.Select(s => s.Oid.Value)), true);
|
||||
}
|
||||
var appointmentsToUpdate = DAOFactory.SearchDAO.LoadAppointmentsWithServiceRecords(serviceRecords.Select(s => s.Oid.Value).ToList());
|
||||
|
||||
appointmentsToUpdate.DoForEach(appointment => appointment.ServiceRecordList = appointment.ServiceRecordList.Where(sr => !serviceRecords.Select(s => s.Oid.Value).Contains(sr.Oid.Value)).ToList());
|
||||
@@ -2319,6 +2321,9 @@ namespace BeWo.Service.ServiceImplementations
|
||||
// (Veraltet. Es ist keine Änderung an der Zeit bei vorhandener Einzelunterschrift) Bei geänderten Daten oder Uhrzeiten werden die Klientenunterschriften gelöscht
|
||||
var serviceRecords = pServiceRecordGroup.ServiceRecordList;
|
||||
var originalServiceRecords = lOriginal.ServiceRecordList.ToList();
|
||||
var records2Delete = originalServiceRecords.Where(x => x.Oid.HasValue && !serviceRecords.Where(s1 => s1.ServiceRecordOid.HasValue).Select(s => s.ServiceRecordOid.Value).Contains(x.Oid.Value)).ToList();
|
||||
DeleteServiceRecordsFromAppointments(records2Delete, false);
|
||||
|
||||
var serviceRecordOidsWithDeletedSingleSignatures = DeleteSignaturesFromServiceRecords(serviceRecords, originalServiceRecords);
|
||||
var serviceRecordsdWithRemovedConfirmationReceiptSignatures = RemoveServiceRecordsFromConfirmationReceiptSignatures(serviceRecords, originalServiceRecords, false);
|
||||
|
||||
|
||||
@@ -76,5 +76,21 @@ namespace BS.Shared.DataContracts
|
||||
[DataMember]
|
||||
public String Notice { get; set; }
|
||||
|
||||
public String CustomString1 { get; set; }
|
||||
public String CustomString2 { get; set; }
|
||||
public String CustomString3 { get; set; }
|
||||
public String CustomString4 { get; set; }
|
||||
public String CustomString5 { get; set; }
|
||||
public decimal? CustomNumber1 { get; set; }
|
||||
public decimal? CustomNumber2 { get; set; }
|
||||
public decimal? CustomNumber3 { get; set; }
|
||||
public decimal? CustomNumber4 { get; set; }
|
||||
public decimal? CustomNumber5 { get; set; }
|
||||
public DateTime? CustomDate1 { get; set; }
|
||||
public DateTime? CustomDate2 { get; set; }
|
||||
public DateTime? CustomDate3 { get; set; }
|
||||
public DateTime? CustomDate4 { get; set; }
|
||||
public DateTime? CustomDate5 { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user