diff --git a/ReportImp/LebenshilfeFrankfurtOder/AnwesenheitslisteFruehUndSpaetbetreuung.Designer.cs b/ReportImp/LebenshilfeFrankfurtOder/AnwesenheitslisteFruehUndSpaetbetreuung.Designer.cs index 2950a9707..757df504c 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/AnwesenheitslisteFruehUndSpaetbetreuung.Designer.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/AnwesenheitslisteFruehUndSpaetbetreuung.Designer.cs @@ -3124,10 +3124,6 @@ this.fieldIstSgb9.Expression = "Iif([IstSgb9], \'x\', \'\')\n"; this.fieldIstSgb9.Name = "fieldIstSgb9"; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(LebenshilfeFrankfurtOder.AusserschulischesBetreuungsangebot.AnwesenheitFruehUndSpaetbetreuung); - // // AnwesenheitslisteFruehUndSpaetbetreuung // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -3145,7 +3141,7 @@ this.fieldIstSgb8, this.fieldIstSgb9}); this.DataSource = this.bindingSource1; - this.DisplayName = "AnwesenheitslisteTS"; + this.DisplayName = "Anwesenheitsliste"; this.Font = new DevExpress.Drawing.DXFont("Arial", 10F); this.Landscape = true; this.Margins = new DevExpress.Drawing.DXMargins(50F, 50F, 100F, 20F); diff --git a/ReportImp/LebenshilfeFrankfurtOder/AnwesenheitslisteFruehUndSpaetbetreuung.cs b/ReportImp/LebenshilfeFrankfurtOder/AnwesenheitslisteFruehUndSpaetbetreuung.cs index 723dce6a6..bb90826c0 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/AnwesenheitslisteFruehUndSpaetbetreuung.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/AnwesenheitslisteFruehUndSpaetbetreuung.cs @@ -73,7 +73,7 @@ namespace LebenshilfeFrankfurtOder var anz = staffel.GetAnzahlForDay(i - 1); if (anz > 0) { - row.Cells[i].Text = "x"; // String.Format("{0}", anz); + row.Cells[i].Text = String.Format("{0}", anz); } else { diff --git a/ReportImp/LebenshilfeFrankfurtOder/AusserschulischesBetreuungsangebot/AnwesenheitFruehUndSpaetbetreuung.cs b/ReportImp/LebenshilfeFrankfurtOder/AusserschulischesBetreuungsangebot/AnwesenheitFruehUndSpaetbetreuung.cs index 9b3f4b619..e8412cf7b 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/AusserschulischesBetreuungsangebot/AnwesenheitFruehUndSpaetbetreuung.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/AusserschulischesBetreuungsangebot/AnwesenheitFruehUndSpaetbetreuung.cs @@ -207,7 +207,7 @@ namespace LebenshilfeFrankfurtOder.AusserschulischesBetreuungsangebot { if (FrankfurtOderHelper.IstAnwesend(dt, ca)) { - IncrementAnzahl(dt, GesamtAnzahl); + IncrementAnzahl(dt, GesamtAnzahl, 1); } dt = dt.AddDays(1); @@ -222,10 +222,15 @@ namespace LebenshilfeFrankfurtOder.AusserschulischesBetreuungsangebot DateTime dt = new DateTime(Monat.Year, Monat.Month, 1); DateTime end = dt.AddMonths(1); + Staffel1.Staffel = 1; Staffel1.Preis = FrankfurtOderHelper.GetStaffelPreis(1, dt) ?? 0; + Staffel2.Staffel = 2; Staffel2.Preis = FrankfurtOderHelper.GetStaffelPreis(2, dt) ?? 0; + Staffel3.Staffel = 3; Staffel3.Preis = FrankfurtOderHelper.GetStaffelPreis(3, dt) ?? 0; + Staffel4.Staffel = 4; Staffel4.Preis = FrankfurtOderHelper.GetStaffelPreis(4, dt) ?? 0; + Staffel5.Staffel = 5; Staffel5.Preis = FrankfurtOderHelper.GetStaffelPreis(5, dt) ?? 0; while (dt < end) @@ -236,7 +241,7 @@ namespace LebenshilfeFrankfurtOder.AusserschulischesBetreuungsangebot if (staffel != null) { - IncrementAnzahl(dt, staffel); + IncrementAnzahl(dt, staffel, anzahl); } dt = dt.AddDays(1); } @@ -406,131 +411,131 @@ namespace LebenshilfeFrankfurtOder.AusserschulischesBetreuungsangebot return 0; } - private void IncrementAnzahl(DateTime dt, StaffelpreisProTag preis) + private void IncrementAnzahl(DateTime dt, StaffelpreisProTag preis, int anzahl) { if (dt.Day == 1) { - preis.AnzahlTag1++; + preis.AnzahlTag1 += anzahl; } else if (dt.Day == 2) { - preis.AnzahlTag2++; + preis.AnzahlTag2 += anzahl; } else if (dt.Day == 3) { - preis.AnzahlTag3++; + preis.AnzahlTag3 += anzahl; } else if (dt.Day == 4) { - preis.AnzahlTag4++; + preis.AnzahlTag4 += anzahl; } else if (dt.Day == 5) { - preis.AnzahlTag5++; + preis.AnzahlTag5 += anzahl; } else if (dt.Day == 6) { - preis.AnzahlTag6++; + preis.AnzahlTag6 += anzahl; } else if (dt.Day == 7) { - preis.AnzahlTag7++; + preis.AnzahlTag7 += anzahl; } else if (dt.Day == 8) { - preis.AnzahlTag8++; + preis.AnzahlTag8 += anzahl; } else if (dt.Day == 9) { - preis.AnzahlTag9++; + preis.AnzahlTag9 += anzahl; } else if (dt.Day == 10) { - preis.AnzahlTag10++; + preis.AnzahlTag10 += anzahl; } else if (dt.Day == 11) { - preis.AnzahlTag11++; + preis.AnzahlTag11 += anzahl; } else if (dt.Day == 12) { - preis.AnzahlTag12++; + preis.AnzahlTag12 += anzahl; } else if (dt.Day == 13) { - preis.AnzahlTag13++; + preis.AnzahlTag13 += anzahl; } else if (dt.Day == 14) { - preis.AnzahlTag14++; + preis.AnzahlTag14 += anzahl; } else if (dt.Day == 15) { - preis.AnzahlTag15++; + preis.AnzahlTag15 += anzahl; } else if (dt.Day == 16) { - preis.AnzahlTag16++; + preis.AnzahlTag16 += anzahl; } else if (dt.Day == 17) { - preis.AnzahlTag17++; + preis.AnzahlTag17 += anzahl; } else if (dt.Day == 18) { - preis.AnzahlTag18++; + preis.AnzahlTag18 += anzahl; } else if (dt.Day == 19) { - preis.AnzahlTag19++; + preis.AnzahlTag19 += anzahl; } else if (dt.Day == 20) { - preis.AnzahlTag20++; + preis.AnzahlTag20 += anzahl; } else if (dt.Day == 21) { - preis.AnzahlTag21++; + preis.AnzahlTag21 += anzahl; } else if (dt.Day == 22) { - preis.AnzahlTag22++; + preis.AnzahlTag22 += anzahl; } else if (dt.Day == 23) { - preis.AnzahlTag23++; + preis.AnzahlTag23 += anzahl; } else if (dt.Day == 24) { - preis.AnzahlTag24++; + preis.AnzahlTag24 += anzahl; } else if (dt.Day == 25) { - preis.AnzahlTag25++; + preis.AnzahlTag25 += anzahl; } else if (dt.Day == 26) { - preis.AnzahlTag26++; + preis.AnzahlTag26 += anzahl; } else if (dt.Day == 27) { - preis.AnzahlTag27++; + preis.AnzahlTag27 += anzahl; } else if (dt.Day == 28) { - preis.AnzahlTag28++; + preis.AnzahlTag28 += anzahl; } else if (dt.Day == 29) { - preis.AnzahlTag29++; + preis.AnzahlTag29 += anzahl; } else if (dt.Day == 30) { - preis.AnzahlTag30++; + preis.AnzahlTag30 += anzahl; } else if (dt.Day == 31) { - preis.AnzahlTag31++; + preis.AnzahlTag31 += anzahl; } } @@ -543,12 +548,12 @@ namespace LebenshilfeFrankfurtOder.AusserschulischesBetreuungsangebot ca.IstSgb9 = FrankfurtOderHelper.IstSgbIX(ca.CustomerDC.DateOfBirth, monat); ca.IstSgb8 = !ca.IstSgb9; - var c2s = GetCostbearer2SupportConcept(ca.CustomerDC); - ca.Costbearer2SupportConcept = c2s; + SetCostbearer2SupportConcept(ca); + - if (c2s?.CostBearer.Organisation != null) + if (ca.CostBearer2SupportConcept?.CostBearer.Organisation != null) { - if (c2s.CostBearer.Organisation.Name.Contains("Stadt Frankfurt (Oder)")) + if (ca.CostBearer2SupportConcept.CostBearer.Organisation.Name.Contains("Stadt Frankfurt (Oder)")) { ca.IstFFO = true; } @@ -563,6 +568,8 @@ namespace LebenshilfeFrankfurtOder.AusserschulischesBetreuungsangebot return ca; } + + private void SetzeAnwesenheiten(CustomerAnwesenheit ca, AdditionalServiceBookingRow row) { ca.AttendanceOnDay1 = row.AttendanceOnDay1; @@ -599,9 +606,9 @@ namespace LebenshilfeFrankfurtOder.AusserschulischesBetreuungsangebot } - private CostBearer2SupportConcept GetCostbearer2SupportConcept(CompactCustomerDC customerDC) + private void SetCostbearer2SupportConcept(CustomerAnwesenheit ca) { - var c = DAOFactory.GenericDAO.LoadByID(customerDC.CustomerOid); + var c = DAOFactory.GenericDAO.LoadByID(ca.CustomerDC.CustomerOid); foreach (var sc in c.SupportConcepts) { @@ -611,12 +618,12 @@ namespace LebenshilfeFrankfurtOder.AusserschulischesBetreuungsangebot { if (ap.ServiceCategory != null && ap.ServiceCategory.Name.ToLower().Contains("außerschulisches betreuungsangebot")) { - return c2s; + ca.CostBearer2SupportConcept = c2s; + ca.SupportConceptApprovalPeriod = ap; } } } } - return null; } } diff --git a/ReportImp/LebenshilfeFrankfurtOder/AusserschulischesBetreuungsangebot/CustomerAnwesenheit.cs b/ReportImp/LebenshilfeFrankfurtOder/AusserschulischesBetreuungsangebot/CustomerAnwesenheit.cs index 80b785b96..ea1ac86a6 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/AusserschulischesBetreuungsangebot/CustomerAnwesenheit.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/AusserschulischesBetreuungsangebot/CustomerAnwesenheit.cs @@ -90,6 +90,7 @@ namespace LebenshilfeFrankfurtOder.AusserschulischesBetreuungsangebot public int AttendanceMonthCount { get; set; } public int AbsenceTimeMonthCount { get; set; } - public CostBearer2SupportConcept Costbearer2SupportConcept { get; internal set; } + public CostBearer2SupportConcept CostBearer2SupportConcept { get; internal set; } + public SupportConceptApprovalPeriod SupportConceptApprovalPeriod { get; internal set; } } } diff --git a/ReportImp/LebenshilfeFrankfurtOder/CustomReportCreator.cs b/ReportImp/LebenshilfeFrankfurtOder/CustomReportCreator.cs index c557d8c39..7f758a765 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/CustomReportCreator.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/CustomReportCreator.cs @@ -1144,6 +1144,33 @@ namespace LebenshilfeFrankfurtOder invoiceReport = seite1; } + else if (iDC.InvoiceBase.InvoiceId == "RechnungABA") + { + IBeWoReport seite1 = new RechnungAusserschulischesBetreuungsangebot(); + + var ro = ServiceInvoiceRO.Create(iDC); + seite1.SetReportDataSource(ro); + ((XtraReport)seite1).CreateDocument(); + + + var fruehRegion = DAOFactory.GenericDAO.LoadByID(30); + var spaetRegion = DAOFactory.GenericDAO.LoadByID(31); + + DateTime monat = iDC.InvoiceBase.AccountingPeriodStart.Value; + + var roFrueh = AdditionalServiceBookingRO.Create(fruehRegion, monat); + var roSpaet = AdditionalServiceBookingRO.Create(spaetRegion, monat); + + var anhang = CreateAnwesenheitslisteFruehUndSpaetbetreuung(roFrueh, roSpaet, true); + if (anhang.Pages.Count == 0) + { + anhang.CreateDocument(); + } + + ((XtraReport)seite1).Pages.AddRange(anhang.Pages); + + invoiceReport = seite1 as XtraReport; + } else { IBeWoReport singleReport = FindReportImp(iDC.InvoiceBase.InvoiceId); @@ -1249,7 +1276,7 @@ namespace LebenshilfeFrankfurtOder private List CreateAbrechnungAusserschulischesBetreuungsangebot(DateTime monat, long? customerOid) { var fruehRegion = DAOFactory.GenericDAO.LoadByID(30); - var spaetRegion = DAOFactory.GenericDAO.LoadByID(30); + var spaetRegion = DAOFactory.GenericDAO.LoadByID(31); var roFrueh = AdditionalServiceBookingRO.Create(fruehRegion, monat); diff --git a/ReportImp/LebenshilfeFrankfurtOder/Invoicing/AusserschulischesBetreuungsangebotInvoiceCreation.cs b/ReportImp/LebenshilfeFrankfurtOder/Invoicing/AusserschulischesBetreuungsangebotInvoiceCreation.cs index 594159067..fa3aeb0d9 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/Invoicing/AusserschulischesBetreuungsangebotInvoiceCreation.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/Invoicing/AusserschulischesBetreuungsangebotInvoiceCreation.cs @@ -56,7 +56,7 @@ namespace LebenshilfeFrankfurtOder.Invoicing foreach (var ca in afs.CustomerAnwesenheiten) { - if (!ca.IstFFO && ca.Costbearer2SupportConcept != null) + if (!ca.IstFFO && ca.CostBearer2SupportConcept != null) { var i = CreateInvoice(invoiceCounter, invoicePeriod, afs, new List { ca }); @@ -78,7 +78,7 @@ namespace LebenshilfeFrankfurtOder.Invoicing var invoice = new ServiceInvoice(); SetInvoiceId(invoice); - var c2s = anwesenheiten[0].Costbearer2SupportConcept; + var c2s = anwesenheiten[0].CostBearer2SupportConcept; SetRecipientInformation(invoice, c2s.CostBearer); if (c2s.CostBearerContactPerson != null) @@ -152,223 +152,97 @@ namespace LebenshilfeFrankfurtOder.Invoicing }; + var c2s = anwesenheiten[0].CostBearer2SupportConcept; + var scap = anwesenheiten[0].SupportConceptApprovalPeriod; - //if (tsc.SupportConceptApprovalPeriod != null) - //{ - // SupportConceptApprovalPeriodDC approvalPeriodDC = MapperFactory.SupportConceptApprovalPeriodDC_SupportConceptApprovalPeriod.MapToNewDC(tsc.SupportConceptApprovalPeriod); - - + if (scap != null) + { + SupportConceptApprovalPeriodDC approvalPeriodDC = MapperFactory.SupportConceptApprovalPeriodDC_SupportConceptApprovalPeriod.MapToNewDC(scap); - // ServiceInvoicePeriod serviceInvoicePeriod = CreateServiceInvoicePeriod(approvalPeriodDC, invoiceAccountingPeriodSpan); - // serviceInvoicePeriod.SupportConceptApprovalPeriod = tsc.SupportConceptApprovalPeriod; - // serviceInvoicePeriod.Customer = tsc.CostBearer2SupportConcept.SupportConcept.Customer; - // CostBearer costBearer = tsc.CostBearer2SupportConcept.CostBearer; - // List costRates = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(costBearer.CostRatePeriods); - // CostRatePeriodDC serviceUnit = costRates.GetCostRatePeriodForDate(CostRatePeriodType.MinutesPerServiceUnit, DateTime.Now); - // serviceInvoicePeriod.ServiceUnitName = serviceUnit.UnitName; - - - // var itemList = CreateInvoiceItems(invoice, serviceInvoicePeriod, invoicePeriod, serviceInvoicePeriod.SupportConceptApprovalPeriod); - // serviceInvoicePeriod.InvoiceItemList.AddRange(itemList); + ServiceInvoicePeriod serviceInvoicePeriod = CreateServiceInvoicePeriod(approvalPeriodDC, invoiceAccountingPeriodSpan); + serviceInvoicePeriod.SupportConceptApprovalPeriod = scap; + serviceInvoicePeriod.Customer = c2s.SupportConcept.Customer; - - // if (serviceInvoicePeriod.InvoiceItemList.Count > 0) - // invoice.ServiceInvoicePeriodList.Add(serviceInvoicePeriod); - //} + CostBearer costBearer = c2s.CostBearer; + List costRates = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(costBearer.CostRatePeriods); + + CostRatePeriodDC serviceUnit = costRates.GetCostRatePeriodForDate(CostRatePeriodType.MinutesPerServiceUnit, DateTime.Now); + serviceInvoicePeriod.ServiceUnitName = serviceUnit.UnitName; + + + var itemList = CreateInvoiceItems(invoice, serviceInvoicePeriod, invoicePeriod, afs, anwesenheiten); + serviceInvoicePeriod.InvoiceItemList.AddRange(itemList); + + + if (serviceInvoicePeriod.InvoiceItemList.Count > 0) + invoice.ServiceInvoicePeriodList.Add(serviceInvoicePeriod); + } } - private List CreateInvoiceItems(ServiceInvoice invoice, ServiceInvoicePeriod sip, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap) + private List CreateInvoiceItems(ServiceInvoice invoice, ServiceInvoicePeriod sip, DateTimeSpan invoicePeriod, AnwesenheitFruehUndSpaetbetreuung afs, IList anwesenheiten) { - sip.ApprovedFixedAmount = 0; List list = new List(); - DateTime dt = invoicePeriod.StartDate; - var bookings = DAOFactory.SearchDAO.GetAdditionalServiceBookingsForCustomer(sip.Customer.Oid.Value, invoicePeriod.StartDate, invoicePeriod.EndDate); - - var ccdc = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(sip.Customer); - while (dt <= invoicePeriod.EndDate) + foreach (var ca in anwesenheiten) { - list.Add(CreateInvoiceItem(dt, scap, bookings, sip.Customer, ccdc)); - dt = dt.AddDays(1); - } + list.AddRange(CreateInvoiceItemsForStaffelpreis(afs, ca)); + } - - return list; } - private InvoiceItem CreateInvoiceItem(DateTime dt, SupportConceptApprovalPeriod scap, IEnumerable bookings, Customer c, CompactCustomerDC ccdc) + private List CreateInvoiceItemsForStaffelpreis(AnwesenheitFruehUndSpaetbetreuung afs, CustomerAnwesenheit ca) { - var invoiceItem = new InvoiceItem(); + var liste = new List(); - bool hatTagesstruktur = false; - bool hatVerpflegung = false; - HasBookings(dt, bookings, c, out hatTagesstruktur, out hatVerpflegung); + var datum = ca.Monat; - decimal ts = 0; - - if (dt.DayOfWeek != DayOfWeek.Saturday && dt.DayOfWeek != DayOfWeek.Sunday) + while (datum < ca.Monat.AddMonths(1)) { - var at = GetAbsenceTimes(dt, c.AbsenceTimes); - if (at != null) + if (FrankfurtOderHelper.IstAnwesend(datum, ca)) { - var name = at.AbsenceReason.Description.ToLower(); - if (name.Contains("urlaub")) - { - invoiceItem.UnitDescription = "U"; - } - else if (name.Contains("krank")) - { - invoiceItem.UnitDescription = "K"; - } - else if (name.Contains("unentschuldigt")) - { - invoiceItem.UnitDescription = "UE"; - } - else if (name.Contains("entschuldigt")) - { - invoiceItem.UnitDescription = "E"; - } - else if (name.Contains("corona")) - { - invoiceItem.UnitDescription = "C"; - } - else - { - invoiceItem.UnitDescription = "U"; - } + var ii = CreateInvoiceItemForStaffelpreis(datum, afs, ca); + liste.Add(ii); - if (DarfAbwesenheitAbrechnen(ccdc, dt)) - { - ts = GetTagessatz(dt, scap) ?? 0; - } } + datum = datum.AddDays(1); } - if (hatTagesstruktur && String.IsNullOrEmpty(invoiceItem.UnitDescription)) - { - ts = GetTagessatz(dt, scap) ?? 0; - invoiceItem.UnitDescription = "I"; - } - if (hatVerpflegung) - { - invoiceItem.Notice = "Mittag gegessen"; - } - - invoiceItem.AmountPerUnit = ts; - invoiceItem.UnitCount = 1; - invoiceItem.AmountTotal = ts; - invoiceItem.ItemPeriodStart = dt; - invoiceItem.ItemPeriodEnd = dt; - invoiceItem.GrossAmountTotal = ts; - invoiceItem.AccountingInterval = AccountingIntervalType.Daily; - if (scap != null) - { - invoiceItem.SupportConceptApprovalPeriodOid = scap.Oid; - - if (scap.ServiceCategory != null) - { - invoiceItem.ItemDescription = scap.ServiceCategory.Name; - } - } - - return invoiceItem; + return liste; } - private bool DarfAbwesenheitAbrechnen(CompactCustomerDC customer, DateTime dt) + + private InvoiceItem CreateInvoiceItemForStaffelpreis(DateTime datum, AnwesenheitFruehUndSpaetbetreuung afs, CustomerAnwesenheit ca) { - var tage = FrankfurtOderHelper.CalculateAbsenceTimes(customer, dt, true); - if (tage.TageAbwesendImJahrBisZumAngegebenenDatum > 42) + var ii = new InvoiceItem(); + + var gesamtAnz = afs.GesamtAnzahl.GetAnzahlForDay(datum.Day); + var staffel = afs.GetStaffelForAnzahl(gesamtAnz); + + ii.UnitDescription = String.Format("Staffelpreis {0}", staffel.Staffel); + + ii.AmountPerUnit = staffel.Preis; + if (gesamtAnz > 0) { - return false; + ii.AmountPerUnit = staffel.Preis / gesamtAnz; } - return true; + ii.UnitCount = 1; + ii.AmountTotal = ii.AmountPerUnit; + ii.ItemPeriodStart = datum; + ii.ItemPeriodEnd = datum; + ii.GrossAmountTotal = ii.AmountTotal; + ii.AccountingInterval = AccountingIntervalType.Daily; + ii.SupportConceptApprovalPeriodOid = ca.SupportConceptApprovalPeriod?.Oid; + + ii.ItemDescription = ca.CustomerDC.LastNameFirstName; + ii.Notice = String.Format("{0} {1}", ca.CustomerDC.FirstName, ca.CustomerDC.LastName); + + return ii; } - - private void HasBookings(DateTime dt, IEnumerable bookings, Customer c, out bool hatTagesstruktur, out bool hatVerpflegung) - { - hatTagesstruktur = false; - hatVerpflegung = false; - foreach (var b in bookings) - { - if (b.AdditionalServiceRegion.IsActive != ActivationTypeId.Deleted && - b.AdditionalServiceRegion.AdditionalService.IsActive != ActivationTypeId.Deleted) - { - var angebot = b.AdditionalServiceRegion.AdditionalService; - if (angebot.Name == "Tagesstruktur" || angebot.Name == "Tagesstruktur Mittagsverpflegung") - { - if (b.Datum.Value.Date == dt.Date) - { - foreach (var c2a in b.Customer2AddServiceBookings) - { - if (c2a.CustomerOid == c.Oid.Value && c2a.Participated) - { - if (angebot.Name == "Tagesstruktur") - { - hatTagesstruktur = true; - } - else if (angebot.Name == "Tagesstruktur Mittagsverpflegung") - { - hatVerpflegung = true; - } - - } - } - } - } - } - } - } - - private AbsenceTime GetAbsenceTimes(DateTime dt, IList absenceTimes) - { - foreach (var at in absenceTimes) - { - if (IstTsAbsenceTime(at)) - { - if ((!at.Start.HasValue || at.Start.Value <= dt) && (!at.End.HasValue || at.End.Value >= dt)) - { - return at; - } - } - } - - return null; - } - - private bool IstTsAbsenceTime(AbsenceTime at) - { - var name = at.AbsenceReason.Description; - if (!name.Contains("WST")) - { - return true; - } - - return false; - } - - private decimal? GetTagessatz(DateTime dt, SupportConceptApprovalPeriod scap) - { - if (scap.ServiceCategory != null) - { - var crps = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(scap.ServiceCategory - .CostRatePeriods); - - var cr = crps.GetCostRatePeriodForDate(CostRatePeriodType.AmountOfMoney, dt); - if (cr != null && cr.CostRateValue.HasValue) - { - return cr.CostRateValue.Value; - } - - } - - return 0; - } - } } diff --git a/ReportImp/LebenshilfeFrankfurtOder/LeistungsnachweisAbw.Designer.cs b/ReportImp/LebenshilfeFrankfurtOder/LeistungsnachweisAbw.Designer.cs index 2e505db8a..c449c31ce 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/LeistungsnachweisAbw.Designer.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/LeistungsnachweisAbw.Designer.cs @@ -31,6 +31,7 @@ namespace LebenshilfeFrankfurtOder { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LeistungsnachweisAbw)); + DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark(); this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.xrTableServiceRecords1 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow(); @@ -77,7 +78,6 @@ namespace LebenshilfeFrankfurtOder this.xrTableCell23 = new DevExpress.XtraReports.UI.XRTableCell(); this.cellStundenInklFac = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell25 = new DevExpress.XtraReports.UI.XRTableCell(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.lblZiele = new DevExpress.XtraReports.UI.XRLabel(); @@ -91,6 +91,7 @@ namespace LebenshilfeFrankfurtOder this.formattingRuleCostBearer = new DevExpress.XtraReports.UI.FormattingRule(); this.formattingRuleEmployeeName = new DevExpress.XtraReports.UI.FormattingRule(); this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); + this.lblLeistungskategorie = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); @@ -100,7 +101,7 @@ namespace LebenshilfeFrankfurtOder this.fieldStunden = new DevExpress.XtraReports.UI.CalculatedField(); this.GroupHeader3 = new DevExpress.XtraReports.UI.GroupHeaderBand(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); - this.lblLeistungskategorie = new DevExpress.XtraReports.UI.XRLabel(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit(); @@ -601,10 +602,6 @@ namespace LebenshilfeFrankfurtOder this.xrTableCell25.StylePriority.UseBorders = false; this.xrTableCell25.Weight = 0.042209951723681624D; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); - // // formattingRuleStartDate // this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]"; @@ -746,6 +743,19 @@ namespace LebenshilfeFrankfurtOder this.topMarginBand1.HeightF = 107.4305F; this.topMarginBand1.Name = "topMarginBand1"; // + // lblLeistungskategorie + // + this.lblLeistungskategorie.CanGrow = false; + this.lblLeistungskategorie.LocationFloat = new DevExpress.Utils.PointFloat(795.0002F, 81.18052F); + this.lblLeistungskategorie.Multiline = true; + this.lblLeistungskategorie.Name = "lblLeistungskategorie"; + this.lblLeistungskategorie.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblLeistungskategorie.SizeF = new System.Drawing.SizeF(244.9998F, 16.66666F); + this.lblLeistungskategorie.StylePriority.UseFont = false; + this.lblLeistungskategorie.StylePriority.UseTextAlignment = false; + this.lblLeistungskategorie.Text = "[Leistungskategorie]"; + this.lblLeistungskategorie.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + // // xrLabel3 // this.xrLabel3.CanGrow = false; @@ -843,18 +853,9 @@ namespace LebenshilfeFrankfurtOder this.xrLabel4.Text = "Leistungszeitraum: [Month] [Year]"; this.xrLabel4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // - // lblLeistungskategorie + // bindingSource1 // - this.lblLeistungskategorie.CanGrow = false; - this.lblLeistungskategorie.LocationFloat = new DevExpress.Utils.PointFloat(899.7567F, 81.18052F); - this.lblLeistungskategorie.Multiline = true; - this.lblLeistungskategorie.Name = "lblLeistungskategorie"; - this.lblLeistungskategorie.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.lblLeistungskategorie.SizeF = new System.Drawing.SizeF(160.2433F, 16.66666F); - this.lblLeistungskategorie.StylePriority.UseFont = false; - this.lblLeistungskategorie.StylePriority.UseTextAlignment = false; - this.lblLeistungskategorie.Text = "[Leistungskategorie]"; - this.lblLeistungskategorie.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO); // // LeistungsnachweisAbw // @@ -882,6 +883,8 @@ namespace LebenshilfeFrankfurtOder this.PageWidth = 1169; this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4; this.Version = "23.2"; + xrWatermark1.Id = "Watermark1"; + this.Watermarks.Add(xrWatermark1); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable4)).EndInit(); diff --git a/ReportImp/LebenshilfeFrankfurtOder/LeistungsnachweisAbw.cs b/ReportImp/LebenshilfeFrankfurtOder/LeistungsnachweisAbw.cs index 62e6e0797..20a99ee44 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/LeistungsnachweisAbw.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/LeistungsnachweisAbw.cs @@ -36,6 +36,7 @@ namespace LebenshilfeFrankfurtOder foreach (var sd in pRO.Services) { + lblLeistungskategorie.Text = sd.ServiceCategory; minutes += sd.Minutes; sd.Notice5 = ""; diff --git a/ReportImp/LebenshilfeFrankfurtOder/RechnungAbw.cs b/ReportImp/LebenshilfeFrankfurtOder/RechnungAbw.cs index 6196317f3..fd839fe9e 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/RechnungAbw.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/RechnungAbw.cs @@ -92,9 +92,19 @@ namespace LebenshilfeFrankfurtOder { foreach (var ii in sip.ServiceInvoiceItems) { - //ii.ServiceDescription = "Fachleistungsstunden abW"; + //ii.ServiceDescription = "Fachleistungsstunden abW"; + if (!String.IsNullOrEmpty(ii.Notice)) + { + if (Int64.TryParse(ii.Notice, out var catoid)) + { + var cat = DAOFactory.GenericDAO.LoadByID(catoid); + ii.Notice = cat.Name; + } + lblLeistungskategorie.Text = "Assistenz beim Wohnen für " + ii.Notice; + } + - } + } } } diff --git a/ReportImp/LebenshilfeFrankfurtOder/RechnungAusserschulischesBetreuungsangebot.Designer.cs b/ReportImp/LebenshilfeFrankfurtOder/RechnungAusserschulischesBetreuungsangebot.Designer.cs index 09e466923..eff190dc2 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/RechnungAusserschulischesBetreuungsangebot.Designer.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/RechnungAusserschulischesBetreuungsangebot.Designer.cs @@ -47,7 +47,6 @@ namespace LebenshilfeFrankfurtOder this.xrLabel27 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel26 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel25 = new DevExpress.XtraReports.UI.XRLabel(); - this.lblKlienten = new DevExpress.XtraReports.UI.XRLabel(); this.xrTable3 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); @@ -80,7 +79,6 @@ namespace LebenshilfeFrankfurtOder this.cellBetrag5 = new DevExpress.XtraReports.UI.XRTableCell(); this.cellGesamt5 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrLabel38 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel32 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel33 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel34 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); @@ -102,7 +100,6 @@ namespace LebenshilfeFrankfurtOder this.rtFooterAlt = new DevExpress.XtraReports.UI.XRRichText(); this.rtFooterNeu = new DevExpress.XtraReports.UI.XRRichText(); this.xrLine1 = new DevExpress.XtraReports.UI.XRLine(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); this.xrTable1 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow(); @@ -115,11 +112,6 @@ namespace LebenshilfeFrankfurtOder this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrTableRow5 = new DevExpress.XtraReports.UI.XRTableRow(); - this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrTableCell21 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrTableCell22 = new DevExpress.XtraReports.UI.XRTableCell(); - this.cellEigenanteil = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableRow11 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell32 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell34 = new DevExpress.XtraReports.UI.XRTableCell(); @@ -133,13 +125,14 @@ namespace LebenshilfeFrankfurtOder this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand(); this.xrLabel39 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rtFooterAlt)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.rtFooterNeu)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail @@ -166,17 +159,15 @@ namespace LebenshilfeFrankfurtOder this.xrLabel27, this.xrLabel26, this.xrLabel25, - this.lblKlienten, this.xrTable3, this.xrLabel38, - this.xrLabel32, this.xrLabel33, this.xrLabel34, this.xrLabel4, this.xrTable2, this.lblRechnung, this.lblAdresse}); - this.ReportHeader.HeightF = 592.9166F; + this.ReportHeader.HeightF = 531.25F; this.ReportHeader.Name = "ReportHeader"; this.ReportHeader.StylePriority.UseFont = false; // @@ -382,23 +373,11 @@ namespace LebenshilfeFrankfurtOder this.xrLabel25.Text = "501205613"; this.xrLabel25.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; // - // lblKlienten - // - this.lblKlienten.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { - new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.lblKlienten.LocationFloat = new DevExpress.Utils.PointFloat(175.5436F, 367.3611F); - this.lblKlienten.Multiline = true; - this.lblKlienten.Name = "lblKlienten"; - this.lblKlienten.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.lblKlienten.SizeF = new System.Drawing.SizeF(520.9559F, 19.99994F); - this.lblKlienten.StylePriority.UseFont = false; - this.lblKlienten.Text = "Klienten:"; - // // xrTable3 // this.xrTable3.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrTable3.LocationFloat = new DevExpress.Utils.PointFloat(0.000406901F, 492.9167F); + this.xrTable3.LocationFloat = new DevExpress.Utils.PointFloat(0.000406901F, 431.25F); this.xrTable3.Name = "xrTable3"; this.xrTable3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { @@ -722,24 +701,12 @@ namespace LebenshilfeFrankfurtOder this.xrLabel38.StylePriority.UseFont = false; this.xrLabel38.Text = "LEBENSHILFE Frankfurt (Oder), Hansastraße 3, 15234 Frankfurt (Oder)"; // - // xrLabel32 - // - this.xrLabel32.CanGrow = false; - this.xrLabel32.Font = new DevExpress.Drawing.DXFont("Arial", 12F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { - new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrLabel32.LocationFloat = new DevExpress.Utils.PointFloat(70.0004F, 367.3611F); - this.xrLabel32.Name = "xrLabel32"; - this.xrLabel32.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel32.SizeF = new System.Drawing.SizeF(105.5432F, 19.99994F); - this.xrLabel32.StylePriority.UseFont = false; - this.xrLabel32.Text = "Klienten:"; - // // xrLabel33 // this.xrLabel33.CanGrow = false; this.xrLabel33.Font = new DevExpress.Drawing.DXFont("Arial", 12F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrLabel33.LocationFloat = new DevExpress.Utils.PointFloat(70.00021F, 412.9167F); + this.xrLabel33.LocationFloat = new DevExpress.Utils.PointFloat(70.00021F, 347.0834F); this.xrLabel33.Name = "xrLabel33"; this.xrLabel33.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel33.SizeF = new System.Drawing.SizeF(105.5435F, 20F); @@ -751,7 +718,7 @@ namespace LebenshilfeFrankfurtOder this.xrLabel34.CanGrow = false; this.xrLabel34.Font = new DevExpress.Drawing.DXFont("Arial", 12F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrLabel34.LocationFloat = new DevExpress.Utils.PointFloat(175.5436F, 412.9167F); + this.xrLabel34.LocationFloat = new DevExpress.Utils.PointFloat(175.5436F, 347.0834F); this.xrLabel34.Name = "xrLabel34"; this.xrLabel34.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel34.SizeF = new System.Drawing.SizeF(520.9559F, 20F); @@ -774,7 +741,7 @@ namespace LebenshilfeFrankfurtOder // this.xrTable2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(0.000406901F, 452.9167F); + this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(0.000406901F, 391.25F); this.xrTable2.Name = "xrTable2"; this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { @@ -964,16 +931,13 @@ namespace LebenshilfeFrankfurtOder this.xrLine1.SizeF = new System.Drawing.SizeF(696.4991F, 6.25F); this.xrLine1.StylePriority.UseForeColor = false; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO); - // // GroupFooter1 // this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTable1}); this.GroupFooter1.Font = new DevExpress.Drawing.DXFont("Arial", 11F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); + this.GroupFooter1.HeightF = 80F; this.GroupFooter1.Name = "GroupFooter1"; this.GroupFooter1.StylePriority.UseFont = false; // @@ -985,10 +949,9 @@ namespace LebenshilfeFrankfurtOder this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow3, this.xrTableRow4, - this.xrTableRow5, this.xrTableRow11, this.xrTableRow6}); - this.xrTable1.SizeF = new System.Drawing.SizeF(696.5F, 100F); + this.xrTable1.SizeF = new System.Drawing.SizeF(696.5F, 80F); this.xrTable1.StylePriority.UseBackColor = false; this.xrTable1.StylePriority.UseBorderColor = false; this.xrTable1.StylePriority.UseBorders = false; @@ -1099,50 +1062,6 @@ namespace LebenshilfeFrankfurtOder this.xrTableCell19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell19.Weight = 0.20999999999999996D; // - // xrTableRow5 - // - this.xrTableRow5.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { - this.xrTableCell20, - this.xrTableCell21, - this.xrTableCell22, - this.cellEigenanteil}); - this.xrTableRow5.Name = "xrTableRow5"; - this.xrTableRow5.Weight = 0.10000000000000003D; - // - // xrTableCell20 - // - this.xrTableCell20.Borders = DevExpress.XtraPrinting.BorderSide.Left; - this.xrTableCell20.Name = "xrTableCell20"; - this.xrTableCell20.StylePriority.UseBorders = false; - this.xrTableCell20.StylePriority.UseTextAlignment = false; - this.xrTableCell20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell20.Weight = 0.10769230769230767D; - // - // xrTableCell21 - // - this.xrTableCell21.Name = "xrTableCell21"; - this.xrTableCell21.StylePriority.UseTextAlignment = false; - this.xrTableCell21.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell21.Weight = 0.35384615384615381D; - // - // xrTableCell22 - // - this.xrTableCell22.Name = "xrTableCell22"; - this.xrTableCell22.StylePriority.UseTextAlignment = false; - this.xrTableCell22.Text = "abzüglich Eigenanteil (siehe Anlage)"; - this.xrTableCell22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell22.Weight = 0.39999999999999991D; - // - // cellEigenanteil - // - this.cellEigenanteil.Borders = DevExpress.XtraPrinting.BorderSide.Right; - this.cellEigenanteil.Name = "cellEigenanteil"; - this.cellEigenanteil.StylePriority.UseBorders = false; - this.cellEigenanteil.StylePriority.UseTextAlignment = false; - this.cellEigenanteil.Text = "0,00 €"; - this.cellEigenanteil.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.cellEigenanteil.Weight = 0.20999999999999996D; - // // xrTableRow11 // this.xrTableRow11.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { @@ -1283,6 +1202,8 @@ namespace LebenshilfeFrankfurtOder this.bottomMarginBand1, this.GroupFooter1, this.ReportFooter}); + this.ComponentStorage.AddRange(new System.ComponentModel.IComponent[] { + this.bindingSource1}); this.DataSource = this.bindingSource1; this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung"; this.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Regular, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { @@ -1304,8 +1225,8 @@ namespace LebenshilfeFrankfurtOder ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rtFooterAlt)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.rtFooterNeu)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); } @@ -1326,7 +1247,6 @@ namespace LebenshilfeFrankfurtOder private DevExpress.XtraReports.UI.XRTableCell xrTableCell4; private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; private DevExpress.XtraReports.UI.XRTableCell xrTableCell6; - private DevExpress.XtraReports.UI.XRLabel xrLabel32; private DevExpress.XtraReports.UI.XRLabel xrLabel33; private DevExpress.XtraReports.UI.XRLabel xrLabel34; private DevExpress.XtraReports.UI.XRLabel xrLabel4; @@ -1341,11 +1261,6 @@ namespace LebenshilfeFrankfurtOder private DevExpress.XtraReports.UI.XRTableCell xrTableCell14; private DevExpress.XtraReports.UI.XRTableCell xrTableCell18; private DevExpress.XtraReports.UI.XRTableCell xrTableCell19; - private DevExpress.XtraReports.UI.XRTableRow xrTableRow5; - private DevExpress.XtraReports.UI.XRTableCell xrTableCell20; - private DevExpress.XtraReports.UI.XRTableCell xrTableCell21; - private DevExpress.XtraReports.UI.XRTableCell xrTableCell22; - private DevExpress.XtraReports.UI.XRTableCell cellEigenanteil; private DevExpress.XtraReports.UI.XRTableRow xrTableRow6; private DevExpress.XtraReports.UI.XRTableCell xrTableCell24; private DevExpress.XtraReports.UI.XRTableCell xrTableCell25; @@ -1381,7 +1296,6 @@ namespace LebenshilfeFrankfurtOder private DevExpress.XtraReports.UI.XRTableCell cellEinheit5; private DevExpress.XtraReports.UI.XRTableCell cellBetrag5; private DevExpress.XtraReports.UI.XRTableCell cellGesamt5; - private DevExpress.XtraReports.UI.XRLabel lblKlienten; private DevExpress.XtraReports.UI.XRTableCell cellAnzahl1; private DevExpress.XtraReports.UI.XRTableCell cellAnzahl2; private DevExpress.XtraReports.UI.XRTableCell cellAnzahl3; diff --git a/ReportImp/LebenshilfeFrankfurtOder/RechnungAusserschulischesBetreuungsangebot.cs b/ReportImp/LebenshilfeFrankfurtOder/RechnungAusserschulischesBetreuungsangebot.cs index b7a513110..b98c516a7 100644 --- a/ReportImp/LebenshilfeFrankfurtOder/RechnungAusserschulischesBetreuungsangebot.cs +++ b/ReportImp/LebenshilfeFrankfurtOder/RechnungAusserschulischesBetreuungsangebot.cs @@ -11,7 +11,7 @@ using LebenshilfeFrankfurtOder.Utils; namespace LebenshilfeFrankfurtOder { - [IDSpecificClass(Identifier = "RechnungHort")] + [IDSpecificClass(Identifier = "RechnungABA")] public partial class RechnungAusserschulischesBetreuungsangebot : XtraReport, IBeWoReport { public RechnungAusserschulischesBetreuungsangebot() @@ -78,18 +78,21 @@ namespace LebenshilfeFrankfurtOder decimal anzahl1 = 0; decimal anzahl2 = 0; decimal anzahl3 = 0; + decimal anzahl4 = 0; decimal anzahl5 = 0; - decimal betrag1 = FrankfurtOderHelper.PREIS_HORT_BIS_3_KINDER; - decimal betrag2 = FrankfurtOderHelper.PREIS_HORT_AB_4_KINDER; - decimal betrag3 = FrankfurtOderHelper.PREIS_HORT_AB_6_KINDER; - decimal betrag5 = FrankfurtOderHelper.GetPreisFerienbetreuung(pRO.AccountingPeriodStart); + decimal betrag1 = FrankfurtOderHelper.GetStaffelPreis(1, pRO.AccountingPeriodStart) ?? 0; + decimal betrag2 = FrankfurtOderHelper.GetStaffelPreis(2, pRO.AccountingPeriodStart) ?? 0; + decimal betrag3 = FrankfurtOderHelper.GetStaffelPreis(3, pRO.AccountingPeriodStart) ?? 0; + decimal betrag4 = FrankfurtOderHelper.GetStaffelPreis(4, pRO.AccountingPeriodStart) ?? 0; + decimal betrag5 = FrankfurtOderHelper.GetStaffelPreis(5, pRO.AccountingPeriodStart) ?? 0; decimal gesamt1 = 0; decimal gesamt2 = 0; decimal gesamt3 = 0; + decimal gesamt4 = 0; decimal gesamt5 = 0; - decimal eigenanteil = 0; + if (pRO.ServiceInvoicePeriods != null) { @@ -102,38 +105,40 @@ namespace LebenshilfeFrankfurtOder foreach (var ii in sip.ServiceInvoiceItems) { - if (ii.ServiceDescription.Contains("3")) + if (ii.UnitDescription == "Staffelpreis 1") { - anzahl1 = ii.UnitCount ?? 0; - betrag1 = ii.AmountPerUnit ?? betrag1; - gesamt1 = ii.NetAmount ?? 0; + anzahl1 += ii.UnitCount ?? 0; + betrag1 += ii.AmountPerUnit ?? betrag1; + gesamt1 += ii.NetAmount ?? 0; } - else if (ii.ServiceDescription.Contains("4")) - { - anzahl2 = ii.UnitCount ?? 0; - betrag2 = ii.AmountPerUnit ?? betrag2; - gesamt2 = ii.NetAmount ?? 0; + else if (ii.UnitDescription == "Staffelpreis 2") + { + anzahl2 += ii.UnitCount ?? 0; + betrag2 += ii.AmountPerUnit ?? betrag2; + gesamt2 += ii.NetAmount ?? 0; } - else if (ii.ServiceDescription.Contains("6")) - { - anzahl3 = ii.UnitCount ?? 0; - betrag3 = ii.AmountPerUnit ?? betrag3; - gesamt3 = ii.NetAmount ?? 0; + else if (ii.UnitDescription == "Staffelpreis 3") + { + anzahl3 += ii.UnitCount ?? 0; + betrag3 += ii.AmountPerUnit ?? betrag3; + gesamt3 += ii.NetAmount ?? 0; } - else if (ii.ServiceDescription.Contains("Ferien")) - { - anzahl5 = ii.UnitCount ?? 0; - betrag5 = ii.AmountPerUnit ?? betrag5; - gesamt5 = ii.NetAmount ?? 0; + else if (ii.UnitDescription == "Staffelpreis 4") + { + anzahl4 += ii.UnitCount ?? 0; + betrag4 += ii.AmountPerUnit ?? betrag4; + gesamt4 += ii.NetAmount ?? 0; - } - else if (ii.ServiceDescription.Contains("Eigenanteil")) - { - eigenanteil += ii.NetAmount ?? 0; - } + } + else if (ii.UnitDescription == "Staffelpreis 5") + { + anzahl5 += ii.UnitCount ?? 0; + betrag5 += ii.AmountPerUnit ?? betrag5; + gesamt5 += ii.NetAmount ?? 0; + } } @@ -141,38 +146,38 @@ namespace LebenshilfeFrankfurtOder } - lblKlienten.Text = String.Format("Hort: {0}", klientenNamen); + //lblKlienten.Text = String.Format("Hort: {0}", klientenNamen); pRO.OrganisationDebitorNumber = GetKundennummer(pRO); cellAnzahl1.Text = String.Format("{0:0}", anzahl1); cellAnzahl2.Text = String.Format("{0:0}", anzahl2); cellAnzahl3.Text = String.Format("{0:0}", anzahl3); - cellAnzahl4.Text = ""; + cellAnzahl4.Text = String.Format("{0:0}", anzahl4); cellAnzahl5.Text = String.Format("{0:0}", anzahl5); cellEinheit1.Text = String.Format("{0}", defaultEinheit); cellEinheit2.Text = String.Format("{0}", defaultEinheit); cellEinheit3.Text = String.Format("{0}", defaultEinheit); - cellEinheit4.Text = ""; + cellEinheit4.Text = String.Format("{0}", defaultEinheit); cellEinheit5.Text = String.Format("{0}", defaultEinheit); cellBetrag1.Text = String.Format("{0:#,##0.00}", betrag1); cellBetrag2.Text = String.Format("{0:#,##0.00}", betrag2); cellBetrag3.Text = String.Format("{0:#,##0.00}", betrag3); - cellBetrag4.Text = ""; + cellBetrag4.Text = String.Format("{0:#,##0.00}", betrag4); cellBetrag5.Text = String.Format("{0:#,##0.00}", betrag5); cellGesamt1.Text = String.Format("{0:c}", gesamt1); cellGesamt2.Text = String.Format("{0:c}", gesamt2); cellGesamt3.Text = String.Format("{0:c}", gesamt3); - cellGesamt4.Text = ""; + cellGesamt4.Text = String.Format("{0:c}", gesamt4); cellGesamt5.Text = String.Format("{0:c}", gesamt5); - cellEigenanteil.Text = String.Format("{0:c}", eigenanteil); - lblGesamt.Text = String.Format("{0:c}", gesamt1 + gesamt2 + gesamt3 + gesamt5); + //cellEigenanteil.Text = String.Format("{0:c}", eigenanteil); + lblGesamt.Text = String.Format("{0:c}", gesamt1 + gesamt2 + gesamt3 + gesamt4 + gesamt5); SetRechnungsText(pRO); SetFooter(pRO);