diff --git a/ReportImp/GpzBiberachReports/Invoicing/SoziotherapieInvoiceCreation.cs b/ReportImp/GpzBiberachReports/Invoicing/SoziotherapieInvoiceCreation.cs index d4f8bedfb..79f54a775 100644 --- a/ReportImp/GpzBiberachReports/Invoicing/SoziotherapieInvoiceCreation.cs +++ b/ReportImp/GpzBiberachReports/Invoicing/SoziotherapieInvoiceCreation.cs @@ -21,10 +21,7 @@ namespace BeWo.GpzBiberachReports.Invoicing private const decimal AMOUNTPERUNIT_HAUSBESUCH_BG = 8.49m; - private const decimal AMOUNTPERUNIT_HAUSBESUCH_VOR_APRIL_14 = 4.16m; - private const decimal AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_14 = 4.28m; - private const decimal AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_15 = 4.39m; - private const decimal AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_16 = 4.52m; + private const decimal AMOUNTPERUNIT_HAUSBESUCH_VOR_APRIL_17 = 4.52m; private const decimal AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_17 = 4.63m; private const decimal AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_18 = 4.77m; private const decimal AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_19 = 4.9m; @@ -32,6 +29,7 @@ namespace BeWo.GpzBiberachReports.Invoicing private const decimal AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_22 = 5.33m; private const decimal AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_23 = 5.51m; private const decimal AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_24 = 5.74m; + private const decimal AMOUNTPERUNIT_HAUSBESUCH_AB_JULI_26 = 6.20m; //private const decimal AMOUNTPERUNIT_AB_60_STUNDEN_VOR_APRIL_14 = 46.82m; //private const decimal AMOUNTPERUNIT_AB_60_STUNDEN_AB_APRIL_14 = 48.14m; @@ -101,7 +99,6 @@ namespace BeWo.GpzBiberachReports.Invoicing public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc) { - DateTime april14 = new DateTime(2014, 4, 1); var invoiceItem = new InvoiceItem(); var bd = calc.GetBillingData(iServiceRecord); @@ -158,9 +155,6 @@ namespace BeWo.GpzBiberachReports.Invoicing //Dictionary differentDays = new Dictionary(); IList items = new List(); - DateTime april14 = new DateTime(2014, 4, 1); - DateTime april15 = new DateTime(2015, 4, 1); - DateTime april16 = new DateTime(2016, 4, 1); DateTime april17 = new DateTime(2017, 4, 1); DateTime april18 = new DateTime(2018, 4, 1); DateTime april19 = new DateTime(2019, 4, 1); @@ -168,11 +162,9 @@ namespace BeWo.GpzBiberachReports.Invoicing DateTime april22 = new DateTime(2022, 4, 1); DateTime april23 = new DateTime(2023, 4, 1); DateTime april24 = new DateTime(2024, 4, 1); + DateTime juli26 = new DateTime(2026, 7, 1); - int countHausbesuchVorApril14 = 0; - int countHausbesuchAbApril14 = 0; - int countHausbesuchAbApril15 = 0; - int countHausbesuchAbApril16 = 0; + int countHausbesuchVorApril17 = 0; int countHausbesuchAbApril17 = 0; int countHausbesuchAbApril18 = 0; int countHausbesuchAbApril19 = 0; @@ -180,6 +172,7 @@ namespace BeWo.GpzBiberachReports.Invoicing int countHausbesuchAbApril22 = 0; int countHausbesuchAbApril23 = 0; int countHausbesuchAbApril24 = 0; + int countHausbesuchAbJuli26 = 0; int countHausbesuchBg = 0; foreach (var sr in serviceRecordsInPeriod) @@ -189,14 +182,8 @@ namespace BeWo.GpzBiberachReports.Invoicing //String key = String.Format("{0:dd.MM.yyyy}", sr.Start); //if (!differentDays.ContainsKey(key)) // differentDays.Add(key, 1); - if (sr.Start < april14) - countHausbesuchVorApril14++; - else if (sr.Start < april15) - countHausbesuchAbApril14++; - else if (sr.Start < april16) - countHausbesuchAbApril15++; - else if (sr.Start < april17) - countHausbesuchAbApril16++; + if (sr.Start < april17) + countHausbesuchVorApril17++; else if (sr.Start < april18) countHausbesuchAbApril17++; else if (sr.Start < april19) @@ -209,8 +196,10 @@ namespace BeWo.GpzBiberachReports.Invoicing countHausbesuchAbApril22++; else if (sr.Start < april24) countHausbesuchAbApril23++; - else + else if (sr.Start < juli26) countHausbesuchAbApril24++; + else + countHausbesuchAbJuli26++; } else if (sr.ServiceDescription.Name.ToLower().Contains("st bg hb")) { @@ -218,80 +207,14 @@ namespace BeWo.GpzBiberachReports.Invoicing } } - if (countHausbesuchVorApril14 > 0) - { - var invoiceItem = new InvoiceItem(); - - //decimal anzahlHausbesuche = differentDays.Count; - decimal anzahlHausbesuche = countHausbesuchVorApril14; - - - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_VOR_APRIL_14; - invoiceItem.UnitCount = anzahlHausbesuche; - invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_VOR_APRIL_14; - invoiceItem.ItemPeriodStart = scap.StartDate; - invoiceItem.ItemPeriodEnd = scap.EndDate; - invoiceItem.RateFactor = null; - invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal; - invoiceItem.ItemDescription = "Hausbesuchspauschale"; - if (scap != null) - invoiceItem.SupportConceptApprovalPeriodOid = scap.Oid; - - items.Add(invoiceItem); - } - if (countHausbesuchAbApril14 > 0) - { - var invoiceItem = new InvoiceItem(); - - //decimal anzahlHausbesuche = differentDays.Count; - decimal anzahlHausbesuche = countHausbesuchAbApril14; - - - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_14; - invoiceItem.UnitCount = anzahlHausbesuche; - invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_14; - invoiceItem.ItemPeriodStart = scap.StartDate; - invoiceItem.ItemPeriodEnd = scap.EndDate; - invoiceItem.RateFactor = null; - invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal; - invoiceItem.ItemDescription = "Hausbesuchspauschale"; - if (scap != null) - invoiceItem.SupportConceptApprovalPeriodOid = scap.Oid; - - items.Add(invoiceItem); - } - if (countHausbesuchAbApril15 > 0) - { - var invoiceItem = new InvoiceItem(); - - //decimal anzahlHausbesuche = differentDays.Count; - decimal anzahlHausbesuche = countHausbesuchAbApril15; - - - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_15; - invoiceItem.UnitCount = anzahlHausbesuche; - invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_15; - invoiceItem.ItemPeriodStart = scap.StartDate; - invoiceItem.ItemPeriodEnd = scap.EndDate; - invoiceItem.RateFactor = null; - invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal; - invoiceItem.ItemDescription = "Hausbesuchspauschale"; - if (scap != null) - invoiceItem.SupportConceptApprovalPeriodOid = scap.Oid; - - items.Add(invoiceItem); - } - if (countHausbesuchAbApril16 > 0) + if (countHausbesuchVorApril17 > 0) { var invoiceItem = new InvoiceItem(); + decimal anzahlHausbesuche = countHausbesuchVorApril17; - //decimal anzahlHausbesuche = differentDays.Count; - decimal anzahlHausbesuche = countHausbesuchAbApril16; - - - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_16; + invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_VOR_APRIL_17; invoiceItem.UnitCount = anzahlHausbesuche; - invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_16; + invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_VOR_APRIL_17; invoiceItem.ItemPeriodStart = scap.StartDate; invoiceItem.ItemPeriodEnd = scap.EndDate; invoiceItem.RateFactor = null; @@ -305,11 +228,8 @@ namespace BeWo.GpzBiberachReports.Invoicing if (countHausbesuchAbApril17 > 0) { var invoiceItem = new InvoiceItem(); - - //decimal anzahlHausbesuche = differentDays.Count; decimal anzahlHausbesuche = countHausbesuchAbApril17; - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_17; invoiceItem.UnitCount = anzahlHausbesuche; invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_17; @@ -326,11 +246,8 @@ namespace BeWo.GpzBiberachReports.Invoicing if (countHausbesuchAbApril18 > 0) { var invoiceItem = new InvoiceItem(); - - //decimal anzahlHausbesuche = differentDays.Count; decimal anzahlHausbesuche = countHausbesuchAbApril18; - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_18; invoiceItem.UnitCount = anzahlHausbesuche; invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_18; @@ -347,11 +264,8 @@ namespace BeWo.GpzBiberachReports.Invoicing if (countHausbesuchAbApril19 > 0) { var invoiceItem = new InvoiceItem(); - - //decimal anzahlHausbesuche = differentDays.Count; decimal anzahlHausbesuche = countHausbesuchAbApril19; - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_19; invoiceItem.UnitCount = anzahlHausbesuche; invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_19; @@ -368,11 +282,8 @@ namespace BeWo.GpzBiberachReports.Invoicing if (countHausbesuchAbApril21 > 0) { var invoiceItem = new InvoiceItem(); - - //decimal anzahlHausbesuche = differentDays.Count; decimal anzahlHausbesuche = countHausbesuchAbApril21; - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_21; invoiceItem.UnitCount = anzahlHausbesuche; invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_21; @@ -389,11 +300,8 @@ namespace BeWo.GpzBiberachReports.Invoicing if (countHausbesuchAbApril22 > 0) { var invoiceItem = new InvoiceItem(); - - //decimal anzahlHausbesuche = differentDays.Count; decimal anzahlHausbesuche = countHausbesuchAbApril22; - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_22; invoiceItem.UnitCount = anzahlHausbesuche; invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_22; @@ -410,11 +318,8 @@ namespace BeWo.GpzBiberachReports.Invoicing if (countHausbesuchAbApril23 > 0) { var invoiceItem = new InvoiceItem(); - - //decimal anzahlHausbesuche = differentDays.Count; decimal anzahlHausbesuche = countHausbesuchAbApril23; - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_23; invoiceItem.UnitCount = anzahlHausbesuche; invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_23; @@ -431,11 +336,8 @@ namespace BeWo.GpzBiberachReports.Invoicing if (countHausbesuchAbApril24 > 0) { var invoiceItem = new InvoiceItem(); - - //decimal anzahlHausbesuche = differentDays.Count; decimal anzahlHausbesuche = countHausbesuchAbApril23; - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_24; invoiceItem.UnitCount = anzahlHausbesuche; invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_AB_APRIL_24; @@ -449,14 +351,29 @@ namespace BeWo.GpzBiberachReports.Invoicing items.Add(invoiceItem); } + if (countHausbesuchAbJuli26 > 0) + { + var invoiceItem = new InvoiceItem(); + decimal anzahlHausbesuche = countHausbesuchAbJuli26; + + invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_AB_JULI_26; + invoiceItem.UnitCount = anzahlHausbesuche; + invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_AB_JULI_26; + invoiceItem.ItemPeriodStart = scap.StartDate; + invoiceItem.ItemPeriodEnd = scap.EndDate; + invoiceItem.RateFactor = null; + invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal; + invoiceItem.ItemDescription = "Hausbesuchspauschale"; + if (scap != null) + invoiceItem.SupportConceptApprovalPeriodOid = scap.Oid; + + items.Add(invoiceItem); + } if (countHausbesuchBg > 0) { var invoiceItem = new InvoiceItem(); - - //decimal anzahlHausbesuche = differentDays.Count; decimal anzahlHausbesuche = countHausbesuchBg; - invoiceItem.AmountPerUnit = AMOUNTPERUNIT_HAUSBESUCH_BG; invoiceItem.UnitCount = anzahlHausbesuche; invoiceItem.AmountTotal = anzahlHausbesuche * AMOUNTPERUNIT_HAUSBESUCH_BG;