From 4779708bd3c721ebc1f0f4468c5692bebe0cc015 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 30 Mar 2023 23:14:48 +0200 Subject: [PATCH] Bugfix Prozent Abrechenbar und Prozent Stundenkonto + FibuNet Export --- BeWoPlanerMobil/BeWoPlanerMobil.csproj | 2 +- BeWoPlanerMobil/BeWoPlanerMobil.csproj.user | 4 +- Report/ReportObjects/FinanceRO.cs | 4 +- .../MitarbeiterstundenkontoBerechnung.cs | 46 +- ReportImp/AsbRuhr/Export/FibuNetExporter.cs | 44 +- .../Invoicing/AssistenzInvoiceCreation.cs | 2 +- .../CustomSettlementInvoiceCreation.cs | 4 +- .../QuittierungsbelegAssistenz.Designer.cs | 34 +- .../QuittierungsbelegMitDatum.Designer.cs | 34 +- .../DiePerspektive/DiePerspektive.csproj | 2 + .../DiePerspektive/Export/FibuNetExporter.cs | 43 +- .../Invoicing/AssistenzInvoiceCreation.cs | 105 +++ .../Invoicing/CustomInvoiceFactory.cs | 40 +- .../CustomSettlementInvoiceCreation.cs | 70 ++ .../Invoicing/DefaultInvoiceCreation.cs | 2 +- .../Wichernhaus/Budgetnachweis.Designer.cs | 598 ++++++++++++++++++ ReportImp/Wichernhaus/Budgetnachweis.cs | 253 ++++++++ ReportImp/Wichernhaus/Budgetnachweis.resx | 131 ++++ .../Wichernhaus/Budgetnachweis2.Designer.cs | 341 ++++++++++ ReportImp/Wichernhaus/Budgetnachweis2.cs | 69 ++ ReportImp/Wichernhaus/Budgetnachweis2.resx | 131 ++++ ReportImp/Wichernhaus/CustomReportCreator.cs | 22 + .../Invoicing/CustomInvoiceCreation.cs | 6 +- .../Invoicing/CustomInvoiceFactory.cs | 7 +- .../CustomSettlementInvoiceCreation.cs | 25 + ReportImp/Wichernhaus/Wichernhaus.csproj | 22 + .../Plugins/ServiceRecordStatisticFactory.cs | 2 +- .../EmployeeServiceImp.cs | 4 +- Shared/Services/Calculations.cs | 55 +- 29 files changed, 2037 insertions(+), 65 deletions(-) create mode 100644 ReportImp/DiePerspektive/Invoicing/AssistenzInvoiceCreation.cs create mode 100644 ReportImp/DiePerspektive/Invoicing/CustomSettlementInvoiceCreation.cs create mode 100644 ReportImp/Wichernhaus/Budgetnachweis.Designer.cs create mode 100644 ReportImp/Wichernhaus/Budgetnachweis.cs create mode 100644 ReportImp/Wichernhaus/Budgetnachweis.resx create mode 100644 ReportImp/Wichernhaus/Budgetnachweis2.Designer.cs create mode 100644 ReportImp/Wichernhaus/Budgetnachweis2.cs create mode 100644 ReportImp/Wichernhaus/Budgetnachweis2.resx create mode 100644 ReportImp/Wichernhaus/CustomReportCreator.cs create mode 100644 ReportImp/Wichernhaus/Invoicing/CustomSettlementInvoiceCreation.cs diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj b/BeWoPlanerMobil/BeWoPlanerMobil.csproj index 98b1aae69..1434649d7 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj @@ -25828,7 +25828,7 @@ - True + False False 8808 / diff --git a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user index bcc1a01ff..29ada5c86 100644 --- a/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user +++ b/BeWoPlanerMobil/BeWoPlanerMobil.csproj.user @@ -8,7 +8,7 @@ - Debug|Any CPU + Release|Any CPU ShowAllFiles 600 MvcControllerEmptyScaffolder @@ -29,7 +29,7 @@ http://localhost/BeWoPlanerMobil - CurrentPage + URL True False False diff --git a/Report/ReportObjects/FinanceRO.cs b/Report/ReportObjects/FinanceRO.cs index 2e1859bdf..07dbac41a 100644 --- a/Report/ReportObjects/FinanceRO.cs +++ b/Report/ReportObjects/FinanceRO.cs @@ -210,7 +210,7 @@ namespace BeWo.Report.ReportObjects if (srDc.Start >= start && srDc.Start.Value.Date <= end.Value.Date) { - var billable = calc.GetBillableDurationInMinutes(srDc) / 60; + var billable = calc.GetBillableDurationInMinutes(srDc, true) / 60; ro.BillableHoursInReportTimeSpan += billable; var rfcr = costRateDcs.GetCostRatePeriodForDate(CostRatePeriodType.RateFactor, srDc.Start.Value); @@ -317,7 +317,7 @@ namespace BeWo.Report.ReportObjects { var dc = MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDC(serviceRecordtemp); - var billable = calc.GetBillableDurationInMinutes(dc) / 60; + var billable = calc.GetBillableDurationInMinutes(dc, true) / 60; ro.BillableHoursInReportTimeSpan += billable; var rfcr = costRateDcs.GetCostRatePeriodForDate(CostRatePeriodType.RateFactor, serviceRecordtemp.Start.Value); diff --git a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs index 50048190a..e5b257e46 100644 --- a/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs +++ b/Report/ReportObjects/MitarbeiterstundenkontoBerechnung.cs @@ -987,6 +987,21 @@ namespace BeWo.Report.ReportObjects duration *= (prozent / 100); } + else + { + decimal prozent = 100; + if (item.ServiceDescription.ProzentStundenkonto.HasValue) + { + prozent = item.ServiceDescription.ProzentStundenkonto.Value; + } + else if (item.ServiceDescription.ServiceCategory.ProzentStundenkonto.HasValue) + { + prozent = item.ServiceDescription.ServiceCategory.ProzentStundenkonto.Value; + } + + + duration *= (prozent / 100); + } if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null && @@ -1522,7 +1537,20 @@ namespace BeWo.Report.ReportObjects } } - return duration; + decimal prozent = 100; + if (sr.ServiceDescription.ProzentStundenkonto.HasValue) + { + prozent = sr.ServiceDescription.ProzentStundenkonto.Value; + } + else if (sr.ServiceDescription.ServiceCategory.ProzentStundenkonto.HasValue) + { + prozent = sr.ServiceDescription.ServiceCategory.ProzentStundenkonto.Value; + } + + + duration *= (prozent / 100); + + return duration; } public virtual void CalculateSpecialHours(MitarbeiterstundenkontoRO.DayDetail dd, ServiceRecord sr, decimal duration) @@ -1899,8 +1927,22 @@ namespace BeWo.Report.ReportObjects } duration = (duration * prozent) / 100; } + else + { + decimal prozent = 100; + if (item.ServiceDescription.ProzentStundenkonto.HasValue) + { + prozent = item.ServiceDescription.ProzentStundenkonto.Value; + } + else if (item.ServiceDescription.ServiceCategory.ProzentStundenkonto.HasValue) + { + prozent = item.ServiceDescription.ServiceCategory.ProzentStundenkonto.Value; + } - minutenMonat += duration; + + duration *= (prozent / 100); + } + minutenMonat += duration; if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null && diff --git a/ReportImp/AsbRuhr/Export/FibuNetExporter.cs b/ReportImp/AsbRuhr/Export/FibuNetExporter.cs index c95c98466..614e811c3 100644 --- a/ReportImp/AsbRuhr/Export/FibuNetExporter.cs +++ b/ReportImp/AsbRuhr/Export/FibuNetExporter.cs @@ -9,6 +9,7 @@ using BeWo.Data.Access; using BeWo.Data.Entities; using BeWo.Report.ReportObjects; using BeWo.Service.DCEntityMapper; +using BeWo.Service.Plugins; using BS.Shared.Core; using BS.Shared.DataContracts; using BS.Shared.DataContracts.Compact; @@ -221,11 +222,17 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) sb.AppendLine(String.Format("( ):1000;;{0:ddMMyyyy}", date)); int rowIndex = 1; + var invoiceNumber = DAOFactory.GenericDAO.LoadByID(2); + long number = invoiceNumber.CurrentNumber; + + foreach (DataRow row in dt.Rows) { if (!String.IsNullOrEmpty(row[3].ToString())) { var ds = ErstelleFibuNetDatensatz(row); + String nextInvoiceNumber = ApplyPattern(invoiceNumber.Pattern, number++); + ds.Belegnr = nextInvoiceNumber; Erstelle1100Satz(sb, ds); sb.AppendLine(); Erstelle1110Satz(sb, ds); @@ -235,11 +242,47 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) rowIndex++; } + DAOFactory.GenericDAO.Update(invoiceNumber); + sb.AppendLine(String.Format("( ):5;")); return sb.ToString(); } + private static String ApplyPattern(String pattern, long number) + { + string next = pattern; + + if (!String.IsNullOrEmpty(next)) + { + int pos = next.IndexOf("{n"); + if (pos >= 0) + { + int stop = next.IndexOf("}", pos); + if (stop > pos) + { + int nCount = stop - pos - 1; + + String nextNumberStr = number.ToString(); + + while (nextNumberStr.Length < nCount) + nextNumberStr = "0" + nextNumberStr; + + next = next.Replace(next.Substring(pos, stop - pos + 1), nextNumberStr); + } + } + + next = next.Replace("{jj}", String.Format("{0:yy}", DateTime.Now.Date)); + next = next.Replace("{jjjj}", String.Format("{0:yyyy}", DateTime.Now.Date)); + + next = next.Replace("{MM}", String.Format("{0:MM}", DateTime.Now.Date)); + next = next.Replace("{mm}", String.Format("{0:MM}", DateTime.Now.Date)); + + } + + return next; + } + private static FibuNetDatensatz ErstelleFibuNetDatensatz(DataRow row) { var ds = new FibuNetDatensatz(); @@ -413,7 +456,6 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) //Berechne Differenz, weil die mit ausgegeben werden soll if (satzAlt.Debitor == satzNeu.Debitor && satzAlt.Kostenstelle == satzNeu.Kostenstelle && - satzAlt.Belegnr == satzNeu.Belegnr && satzAlt.Erloeskonto == satzNeu.Erloeskonto && satzAlt.Buchungstext == satzNeu.Buchungstext && satzAlt.Belegdatum == satzNeu.Belegdatum) diff --git a/ReportImp/AsbRuhr/Invoicing/AssistenzInvoiceCreation.cs b/ReportImp/AsbRuhr/Invoicing/AssistenzInvoiceCreation.cs index b7fc37791..14be7cc1f 100644 --- a/ReportImp/AsbRuhr/Invoicing/AssistenzInvoiceCreation.cs +++ b/ReportImp/AsbRuhr/Invoicing/AssistenzInvoiceCreation.cs @@ -40,7 +40,7 @@ namespace AsbRuhr.Invoicing public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc) { - if (!iServiceRecord.ServiceDescription.CategoryName.StartsWith("Assistenz")) + if (iServiceRecord.ServiceDescription.CategoryName.ToLower().Contains("fachleistung")) { return null; } diff --git a/ReportImp/AsbRuhr/Invoicing/CustomSettlementInvoiceCreation.cs b/ReportImp/AsbRuhr/Invoicing/CustomSettlementInvoiceCreation.cs index 5c53e5770..67879ecd2 100644 --- a/ReportImp/AsbRuhr/Invoicing/CustomSettlementInvoiceCreation.cs +++ b/ReportImp/AsbRuhr/Invoicing/CustomSettlementInvoiceCreation.cs @@ -23,7 +23,7 @@ namespace AsbRuhr.Invoicing public override bool IsServiceRecordBillable(ServiceRecord iRecord) { - if (iRecord.ServiceDescription.ServiceCategory.Name.StartsWith("Assistenz")) + if (!iRecord.ServiceDescription.ServiceCategory.Name.ToLower().Contains("fachleistung")) { return false; } @@ -54,7 +54,7 @@ namespace AsbRuhr.Invoicing si.ApprovedFLS = 0; foreach (var sp in relDC.ApprovalPeriodList) { - if (sp.ServiceCategory == null || !sp.ServiceCategory.Name.StartsWith("Assistenz")) + if (sp.ServiceCategory == null || sp.ServiceCategory.Name.ToLower().Contains("fachleistung")) { si.ApprovedFLSWeekly += calc.GetApprovedHoursPerWeek(sp, relDC.CostBearer.CostRatePeriods) ?? 0m; diff --git a/ReportImp/AsbRuhr/QuittierungsbelegAssistenz.Designer.cs b/ReportImp/AsbRuhr/QuittierungsbelegAssistenz.Designer.cs index 46c5eeb92..0b866bbfb 100644 --- a/ReportImp/AsbRuhr/QuittierungsbelegAssistenz.Designer.cs +++ b/ReportImp/AsbRuhr/QuittierungsbelegAssistenz.Designer.cs @@ -84,6 +84,7 @@ namespace AsbRuhr this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.xrLabel20 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox(); this.lblUnterschriftMitarbeiter = new DevExpress.XtraReports.UI.XRLabel(); @@ -126,7 +127,6 @@ namespace AsbRuhr this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField(); this.fieldFls = new DevExpress.XtraReports.UI.CalculatedField(); - this.xrLabel20 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -277,6 +277,8 @@ namespace AsbRuhr // // xrTableCell44 // + this.xrTableCell44.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.SignatureDate", "{0:dd.MM.yyyy}")}); this.xrTableCell44.Name = "xrTableCell44"; this.xrTableCell44.StylePriority.UseBorders = false; this.xrTableCell44.StylePriority.UseFont = false; @@ -834,6 +836,21 @@ namespace AsbRuhr this.GroupFooter1.KeepTogether = true; this.GroupFooter1.Name = "GroupFooter1"; // + // xrLabel20 + // + this.xrLabel20.Font = new System.Drawing.Font("Arial", 10F); + this.xrLabel20.LocationFloat = new DevExpress.Utils.PointFloat(0F, 59.99997F); + this.xrLabel20.Name = "xrLabel20"; + this.xrLabel20.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); + this.xrLabel20.SizeF = new System.Drawing.SizeF(320F, 20F); + this.xrLabel20.StylePriority.UseBackColor = false; + this.xrLabel20.StylePriority.UseBorders = false; + this.xrLabel20.StylePriority.UseFont = false; + this.xrLabel20.StylePriority.UsePadding = false; + this.xrLabel20.StylePriority.UseTextAlignment = false; + this.xrLabel20.Text = "F = Fehlkontakt"; + this.xrLabel20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + // // xrLabel2 // this.xrLabel2.BackColor = System.Drawing.Color.Transparent; @@ -1332,21 +1349,6 @@ namespace AsbRuhr // this.fieldFls.Name = "fieldFls"; // - // xrLabel20 - // - this.xrLabel20.Font = new System.Drawing.Font("Arial", 10F); - this.xrLabel20.LocationFloat = new DevExpress.Utils.PointFloat(0F, 59.99997F); - this.xrLabel20.Name = "xrLabel20"; - this.xrLabel20.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); - this.xrLabel20.SizeF = new System.Drawing.SizeF(320F, 20F); - this.xrLabel20.StylePriority.UseBackColor = false; - this.xrLabel20.StylePriority.UseBorders = false; - this.xrLabel20.StylePriority.UseFont = false; - this.xrLabel20.StylePriority.UsePadding = false; - this.xrLabel20.StylePriority.UseTextAlignment = false; - this.xrLabel20.Text = "F = Fehlkontakt"; - this.xrLabel20.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - // // QuittierungsbelegAssistenz // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { diff --git a/ReportImp/AsbRuhr/QuittierungsbelegMitDatum.Designer.cs b/ReportImp/AsbRuhr/QuittierungsbelegMitDatum.Designer.cs index 34e830ba7..879122d48 100644 --- a/ReportImp/AsbRuhr/QuittierungsbelegMitDatum.Designer.cs +++ b/ReportImp/AsbRuhr/QuittierungsbelegMitDatum.Designer.cs @@ -84,6 +84,7 @@ namespace AsbRuhr this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.xrLabel22 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox(); this.lblUnterschriftKlient = new DevExpress.XtraReports.UI.XRLabel(); @@ -125,7 +126,6 @@ namespace AsbRuhr this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField(); - this.xrLabel22 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); @@ -276,6 +276,8 @@ namespace AsbRuhr // // xrTableCell44 // + this.xrTableCell44.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "Services.SignatureDate", "{0:dd.MM.yyyy}")}); this.xrTableCell44.Name = "xrTableCell44"; this.xrTableCell44.StylePriority.UseBorders = false; this.xrTableCell44.StylePriority.UseFont = false; @@ -833,6 +835,21 @@ namespace AsbRuhr this.GroupFooter1.KeepTogether = true; this.GroupFooter1.Name = "GroupFooter1"; // + // xrLabel22 + // + this.xrLabel22.Font = new System.Drawing.Font("Arial", 10F); + this.xrLabel22.LocationFloat = new DevExpress.Utils.PointFloat(0F, 59.99997F); + this.xrLabel22.Name = "xrLabel22"; + this.xrLabel22.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); + this.xrLabel22.SizeF = new System.Drawing.SizeF(320F, 20F); + this.xrLabel22.StylePriority.UseBackColor = false; + this.xrLabel22.StylePriority.UseBorders = false; + this.xrLabel22.StylePriority.UseFont = false; + this.xrLabel22.StylePriority.UsePadding = false; + this.xrLabel22.StylePriority.UseTextAlignment = false; + this.xrLabel22.Text = "F = Fehlkontakt"; + this.xrLabel22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + // // xrLabel2 // this.xrLabel2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { @@ -1327,21 +1344,6 @@ namespace AsbRuhr this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String; this.fieldKontaktArt.Name = "fieldKontaktArt"; // - // xrLabel22 - // - this.xrLabel22.Font = new System.Drawing.Font("Arial", 10F); - this.xrLabel22.LocationFloat = new DevExpress.Utils.PointFloat(0F, 59.99997F); - this.xrLabel22.Name = "xrLabel22"; - this.xrLabel22.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F); - this.xrLabel22.SizeF = new System.Drawing.SizeF(320F, 20F); - this.xrLabel22.StylePriority.UseBackColor = false; - this.xrLabel22.StylePriority.UseBorders = false; - this.xrLabel22.StylePriority.UseFont = false; - this.xrLabel22.StylePriority.UsePadding = false; - this.xrLabel22.StylePriority.UseTextAlignment = false; - this.xrLabel22.Text = "F = Fehlkontakt"; - this.xrLabel22.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - // // Quittierungsbeleg2 // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { diff --git a/ReportImp/DiePerspektive/DiePerspektive.csproj b/ReportImp/DiePerspektive/DiePerspektive.csproj index 4bf1965b6..78a088ac7 100644 --- a/ReportImp/DiePerspektive/DiePerspektive.csproj +++ b/ReportImp/DiePerspektive/DiePerspektive.csproj @@ -76,7 +76,9 @@ InvoiceCustomerReport.cs + + diff --git a/ReportImp/DiePerspektive/Export/FibuNetExporter.cs b/ReportImp/DiePerspektive/Export/FibuNetExporter.cs index 24f6baded..ce68e94d4 100644 --- a/ReportImp/DiePerspektive/Export/FibuNetExporter.cs +++ b/ReportImp/DiePerspektive/Export/FibuNetExporter.cs @@ -222,11 +222,16 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) sb.AppendLine(String.Format("( ):1000;;{0:ddMMyyyy}", date)); int rowIndex = 1; + var invoiceNumber = DAOFactory.GenericDAO.LoadByID(2); + long number = invoiceNumber.CurrentNumber; + foreach (DataRow row in dt.Rows) { if (!String.IsNullOrEmpty(row[3].ToString())) { var ds = ErstelleFibuNetDatensatz(row); + String nextInvoiceNumber = ApplyPattern(invoiceNumber.Pattern, number++); + ds.Belegnr = nextInvoiceNumber; Erstelle1100Satz(sb, ds); sb.AppendLine(); Erstelle1110Satz(sb, ds); @@ -235,12 +240,49 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) rowIndex++; } + invoiceNumber.CurrentNumber = number; + + DAOFactory.GenericDAO.Update(invoiceNumber); sb.AppendLine(String.Format("( ):5;")); return sb.ToString(); } + private static String ApplyPattern(String pattern, long number) + { + string next = pattern; + + if (!String.IsNullOrEmpty(next)) + { + int pos = next.IndexOf("{n"); + if (pos >= 0) + { + int stop = next.IndexOf("}", pos); + if (stop > pos) + { + int nCount = stop - pos - 1; + + String nextNumberStr = number.ToString(); + + while (nextNumberStr.Length < nCount) + nextNumberStr = "0" + nextNumberStr; + + next = next.Replace(next.Substring(pos, stop - pos + 1), nextNumberStr); + } + } + + next = next.Replace("{jj}", String.Format("{0:yy}", DateTime.Now.Date)); + next = next.Replace("{jjjj}", String.Format("{0:yyyy}", DateTime.Now.Date)); + + next = next.Replace("{MM}", String.Format("{0:MM}", DateTime.Now.Date)); + next = next.Replace("{mm}", String.Format("{0:MM}", DateTime.Now.Date)); + + } + + return next; + } + private static FibuNetDatensatz ErstelleFibuNetDatensatz(DataRow row) { var ds = new FibuNetDatensatz(); @@ -414,7 +456,6 @@ Alternativ wäre der 1120er Satz mit einzubauen (ab Seite 61) //Berechne Differenz, weil die mit ausgegeben werden soll if (satzAlt.Debitor == satzNeu.Debitor && satzAlt.Kostenstelle == satzNeu.Kostenstelle && - satzAlt.Belegnr == satzNeu.Belegnr && satzAlt.Erloeskonto == satzNeu.Erloeskonto && satzAlt.Buchungstext == satzNeu.Buchungstext && satzAlt.Belegdatum == satzNeu.Belegdatum) diff --git a/ReportImp/DiePerspektive/Invoicing/AssistenzInvoiceCreation.cs b/ReportImp/DiePerspektive/Invoicing/AssistenzInvoiceCreation.cs new file mode 100644 index 000000000..38345911c --- /dev/null +++ b/ReportImp/DiePerspektive/Invoicing/AssistenzInvoiceCreation.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Service.Invoicing; +using BS.Shared.Core; +using BS.Shared.DataContracts; +using BS.Shared.DataContracts.Compact; +using BS.Shared.Services; + +namespace DiePerspektive.Invoicing +{ + + public class CustomAssistenzInvoiceCreation : InvoiceCreation + { + private const decimal AMOUNT_PER_EINSATZ_DEFAULT = 2m; + + + private DateTime? accountingPeriodStart = null; + private DateTime? accountingPeriodEnd = null; + + public override void SetInvoiceId(ServiceInvoice invoice) + { + invoice.InvoiceBase.InvoiceId = "Assistenz"; + invoice.InvoiceBase.InvoiceTypeText = "Rechnung"; + } + + public override void SetInvoiceBaseData(int invoiceCounter, ServiceInvoice invoice, CostBearer costBearer, DateTimeSpan invoicePeriod, + IList supportConceptList) + { + if (invoicePeriod != null) + { + accountingPeriodStart = invoicePeriod.StartDate; + accountingPeriodEnd = invoicePeriod.EndDate; + } + base.SetInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConceptList); + } + + public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc) + { + if (iServiceRecord.ServiceDescription.CategoryName.ToLower().Contains("fachleistung")) + { + return null; + } + return base.CreateInvoiceItem(iServiceRecord, scap, calc); + } + + public override IList CreateInvoiceItems(List serviceRecordsInPeriod, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, + Calculations calc) + { + var list = base.CreateInvoiceItems(serviceRecordsInPeriod, invoicePeriod, scap, calc); + var fitem = CreateFahrtkostenItem(serviceRecordsInPeriod, scap); + + if (fitem != null) + { + list.Add(fitem); + } + return list; + } + + private InvoiceItem CreateFahrtkostenItem(List serviceRecords, SupportConceptApprovalPeriod scap) + { + + decimal amountPerKm = AMOUNT_PER_EINSATZ_DEFAULT; + + int count = 0; + foreach (var sr in serviceRecords) + { + if (sr.ServiceDescription.CategoryName.StartsWith("Assistenz")) + { + count++; + } + } + + + InvoiceItem ii = null; + if (count > 0) + { + + ii = new InvoiceItem(); + ii.AmountPerUnit = AMOUNT_PER_EINSATZ_DEFAULT; + ii.UnitCount = count; + ii.AmountTotal = count * AMOUNT_PER_EINSATZ_DEFAULT; + ii.ItemPeriodStart = accountingPeriodStart; + ii.ItemPeriodEnd = accountingPeriodEnd; + ii.RateFactor = null; + ii.GrossAmountTotal = ii.AmountTotal; + ii.ItemDescription = "Anfahrtspauschale"; + ii.UnitDescription = "Anfahrtspauschale"; + ii.SupportConceptApprovalPeriodOid = scap.Oid; + + } + + return ii; + } + + //public override IList CreateSummaryInvoiceItems(IList itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, + // Calculations calc) + //{ + // return itemList; + //} + } +} diff --git a/ReportImp/DiePerspektive/Invoicing/CustomInvoiceFactory.cs b/ReportImp/DiePerspektive/Invoicing/CustomInvoiceFactory.cs index e6ab979fe..ed40543fa 100644 --- a/ReportImp/DiePerspektive/Invoicing/CustomInvoiceFactory.cs +++ b/ReportImp/DiePerspektive/Invoicing/CustomInvoiceFactory.cs @@ -12,11 +12,41 @@ namespace DiePerspektive.Invoicing public class CustomInvoiceFactory : InvoiceFactory { - public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary> supportConcepts2ServiceRecords) - { + public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary> supportConcepts2ServiceRecords) + { + foreach (var list in supportConcepts2ServiceRecords.Values) + { - return new DefaultInvoiceCreation(); - } + foreach (var sr in list) + { + var sd = sr.ServiceDescription.Category; + var ic = GetInvoiceCreatorForCategory(sd); + if (ic != null) + return ic; + } + } + return new DefaultInvoiceCreation(); + } - } + private InvoiceCreation GetInvoiceCreatorForCategory(ServiceCategoryDC sd) + { + if (sd != null && !String.IsNullOrEmpty(sd.Name)) + { + String cat = sd.Name.ToLower().Trim(); + if (!cat.Contains("fachleistung")) + { + return new CustomAssistenzInvoiceCreation(); + } + + } + return null; + } + + public override SettlementInvoiceCreation CreateSettlementInvoiceCreator(string costbearerId, string tenant, CostBearer2SupportConcept lCb2Sc) + { + return new CustomSettlementInvoiceCreation(); + + } + + } } diff --git a/ReportImp/DiePerspektive/Invoicing/CustomSettlementInvoiceCreation.cs b/ReportImp/DiePerspektive/Invoicing/CustomSettlementInvoiceCreation.cs new file mode 100644 index 000000000..640c67ac0 --- /dev/null +++ b/ReportImp/DiePerspektive/Invoicing/CustomSettlementInvoiceCreation.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Service.DCEntityMapper; +using BeWo.Service.Invoicing; +using BS.Shared; +using BS.Shared.Core; +using BS.Shared.DataContracts; +using BS.Shared.Extensions; +using BS.Shared.Services; + +namespace DiePerspektive.Invoicing +{ + internal class CustomSettlementInvoiceCreation : SettlementInvoiceCreation + { + public override IList GetBillableServiceRecords(CostBearer2SupportConcept c2s) + { + return c2s.ServiceRecords.Where(IsServiceRecordBillable).ToList(); + } + + public override bool IsServiceRecordBillable(ServiceRecord iRecord) + { + if (!iRecord.ServiceDescription.ServiceCategory.Name.ToLower().Contains("fachleistung")) + { + return false; + } + return true; + } + + public override bool CanCreateInvoiceTheOldWay(Settlement2DC si, CostBearer2SupportConcept c2s) + { + var relDC = c2s.MapToNewDC(); + var hourlyRatesInSpanList = relDC.CostBearer.CostRatePeriods.GetSpans(CostRatePeriodType.HourlyRate, + si.AccountingPeriodStart.Value.Date, si.AccountingPeriodEnd.Value.Date).ToList(); + if (hourlyRatesInSpanList.Count > 3) + return false; + + var factorInSpanList = relDC.CostBearer.CostRatePeriods.GetSpans(CostRatePeriodType.RateFactor, + si.AccountingPeriodStart.Value.Date, si.AccountingPeriodEnd.Value.Date).ToList(); + if (factorInSpanList.Count > 1) + return false; + + + return true; + } + + public override void CalculateSettlementInvoiceApprovedAmounts(Settlement2DC si, SupportConceptCostBearerRelDC relDC, + Calculations calc) + { + si.ApprovedFLSWeekly = 0; + si.ApprovedFLS = 0; + foreach (var sp in relDC.ApprovalPeriodList) + { + if (sp.ServiceCategory == null || sp.ServiceCategory.Name.ToLower().Contains("fachleistung")) + { + si.ApprovedFLSWeekly += calc.GetApprovedHoursPerWeek(sp, relDC.CostBearer.CostRatePeriods) ?? 0m; + + decimal flsTotal = calc.GetApprovedHoursTotal(sp, relDC.CostBearer.CostRatePeriods) ?? 0m; + flsTotal = Math.Round(flsTotal, 2, MidpointRounding.AwayFromZero); + + si.ApprovedFLS += flsTotal; + } + } + + } + } +} diff --git a/ReportImp/DiePerspektive/Invoicing/DefaultInvoiceCreation.cs b/ReportImp/DiePerspektive/Invoicing/DefaultInvoiceCreation.cs index 9991acc08..3c30da384 100644 --- a/ReportImp/DiePerspektive/Invoicing/DefaultInvoiceCreation.cs +++ b/ReportImp/DiePerspektive/Invoicing/DefaultInvoiceCreation.cs @@ -13,7 +13,7 @@ using BS.Shared.Services; namespace DiePerspektive.Invoicing { - + public class DefaultInvoiceCreation : InvoiceCreation { diff --git a/ReportImp/Wichernhaus/Budgetnachweis.Designer.cs b/ReportImp/Wichernhaus/Budgetnachweis.Designer.cs new file mode 100644 index 000000000..50d49a70f --- /dev/null +++ b/ReportImp/Wichernhaus/Budgetnachweis.Designer.cs @@ -0,0 +1,598 @@ +namespace Wichernhaus +{ + partial class Budgetnachweis + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Budgetnachweis)); + this.Detail = new DevExpress.XtraReports.UI.DetailBand(); + this.xrLabel16 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLine2 = new DevExpress.XtraReports.UI.XRLine(); + this.xrLine1 = new DevExpress.XtraReports.UI.XRLine(); + this.xrLabel35 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrCheckBox2 = new DevExpress.XtraReports.UI.XRCheckBox(); + this.xrCheckBox1 = new DevExpress.XtraReports.UI.XRCheckBox(); + this.tableRechnungspositionen = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableRow5 = new DevExpress.XtraReports.UI.XRTableRow(); + this.cellStart1 = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellEnd1 = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellHourlyRate1 = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellFLS1 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableRow6 = new DevExpress.XtraReports.UI.XRTableRow(); + this.cellStart2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellEnd2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellHourlyRate2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellFLS2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell21 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableRow8 = new DevExpress.XtraReports.UI.XRTableRow(); + this.cellStart3 = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellEnd3 = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellHourlyRate3 = new DevExpress.XtraReports.UI.XRTableCell(); + this.cellFLS3 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel(); + this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule(); + this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); + this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); + this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand(); + this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); + this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel(); + this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.xrRichText2 = new DevExpress.XtraReports.UI.XRRichText(); + this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); + ((System.ComponentModel.ISupportInitialize)(this.tableRechnungspositionen)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + // + // Detail + // + this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel1, + this.xrLabel16, + this.xrLabel10, + this.xrLabel7, + this.xrLabel14, + this.xrLabel15}); + this.Detail.HeightF = 278.3333F; + this.Detail.Name = "Detail"; + this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.Detail.StylePriority.UseFont = false; + this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // + // xrLabel16 + // + this.xrLabel16.BackColor = System.Drawing.Color.Transparent; + this.xrLabel16.CanShrink = true; + this.xrLabel16.Font = new System.Drawing.Font("Times New Roman", 14F, System.Drawing.FontStyle.Bold); + this.xrLabel16.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 10.00001F); + this.xrLabel16.Name = "xrLabel16"; + this.xrLabel16.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel16.SizeF = new System.Drawing.SizeF(435.4167F, 23.24998F); + this.xrLabel16.StylePriority.UseBackColor = false; + this.xrLabel16.StylePriority.UseFont = false; + this.xrLabel16.Text = "Ambulant Betreutes Wohnen - Budgetnachweis"; + this.xrLabel16.WordWrap = false; + // + // xrLabel10 + // + this.xrLabel10.BackColor = System.Drawing.Color.Transparent; + this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(60F, 224.0828F); + this.xrLabel10.Multiline = true; + this.xrLabel10.Name = "xrLabel10"; + this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel10.SizeF = new System.Drawing.SizeF(642F, 27.08333F); + this.xrLabel10.StylePriority.UseBackColor = false; + this.xrLabel10.StylePriority.UseFont = false; + this.xrLabel10.Text = "Im Bewilligungszeitraum tatsächlich geleistete Fachleistungsstunden (FLS)"; + // + // xrLabel7 + // + this.xrLabel7.BackColor = System.Drawing.Color.Transparent; + this.xrLabel7.CanShrink = true; + this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(60F, 179.8749F); + this.xrLabel7.Multiline = true; + this.xrLabel7.Name = "xrLabel7"; + this.xrLabel7.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel7.SizeF = new System.Drawing.SizeF(650F, 20F); + this.xrLabel7.StylePriority.UseBackColor = false; + this.xrLabel7.StylePriority.UseFont = false; + this.xrLabel7.Text = "Bewilligungszeitraum vom [AccountingPeriod]"; + this.xrLabel7.WordWrap = false; + // + // xrLabel14 + // + this.xrLabel14.BackColor = System.Drawing.Color.Transparent; + this.xrLabel14.CanShrink = true; + this.xrLabel14.LocationFloat = new DevExpress.Utils.PointFloat(60F, 159.8749F); + this.xrLabel14.Multiline = true; + this.xrLabel14.Name = "xrLabel14"; + this.xrLabel14.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel14.SizeF = new System.Drawing.SizeF(650F, 20F); + this.xrLabel14.StylePriority.UseBackColor = false; + this.xrLabel14.StylePriority.UseFont = false; + this.xrLabel14.Text = "Aktenzeichen LWL: [CustomerReferenceNumber]"; + this.xrLabel14.WordWrap = false; + // + // xrLabel15 + // + this.xrLabel15.BackColor = System.Drawing.Color.Transparent; + this.xrLabel15.CanShrink = true; + this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(60F, 139.8749F); + this.xrLabel15.Name = "xrLabel15"; + this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel15.SizeF = new System.Drawing.SizeF(650F, 20F); + this.xrLabel15.StylePriority.UseBackColor = false; + this.xrLabel15.StylePriority.UseFont = false; + this.xrLabel15.Text = "für [Salutation2] [CustomerName], geb. [CustomerBirthdayString]"; + this.xrLabel15.WordWrap = false; + // + // xrLine2 + // + this.xrLine2.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 274.3801F); + this.xrLine2.Name = "xrLine2"; + this.xrLine2.SizeF = new System.Drawing.SizeF(270F, 9.75F); + // + // xrLine1 + // + this.xrLine1.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 204.38F); + this.xrLine1.Name = "xrLine1"; + this.xrLine1.SizeF = new System.Drawing.SizeF(309.5687F, 9.749969F); + // + // xrLabel35 + // + this.xrLabel35.BackColor = System.Drawing.Color.Transparent; + this.xrLabel35.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.xrLabel35.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Bold); + this.xrLabel35.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 214.13F); + this.xrLabel35.Multiline = true; + this.xrLabel35.Name = "xrLabel35"; + this.xrLabel35.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel35.SizeF = new System.Drawing.SizeF(236.697F, 17F); + this.xrLabel35.StylePriority.UseBackColor = false; + this.xrLabel35.StylePriority.UseBorders = false; + this.xrLabel35.StylePriority.UseFont = false; + this.xrLabel35.Text = "Stempel, Unterschrift"; + this.xrLabel35.WordWrap = false; + // + // xrLabel12 + // + this.xrLabel12.BackColor = System.Drawing.Color.Transparent; + this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(65.00021F, 67.71322F); + this.xrLabel12.Multiline = true; + this.xrLabel12.Name = "xrLabel12"; + this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel12.SizeF = new System.Drawing.SizeF(646.9999F, 120.3334F); + this.xrLabel12.StylePriority.UseBackColor = false; + this.xrLabel12.StylePriority.UseFont = false; + this.xrLabel12.Text = resources.GetString("xrLabel12.Text"); + // + // xrCheckBox2 + // + this.xrCheckBox2.LocationFloat = new DevExpress.Utils.PointFloat(424.5832F, 9.999974F); + this.xrCheckBox2.Name = "xrCheckBox2"; + this.xrCheckBox2.SizeF = new System.Drawing.SizeF(211.0832F, 21.875F); + this.xrCheckBox2.StylePriority.UseFont = false; + this.xrCheckBox2.Text = " Die Betreuung dauert an."; + // + // xrCheckBox1 + // + this.xrCheckBox1.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 9.999974F); + this.xrCheckBox1.Name = "xrCheckBox1"; + this.xrCheckBox1.SizeF = new System.Drawing.SizeF(359.5833F, 21.875F); + this.xrCheckBox1.StylePriority.UseFont = false; + this.xrCheckBox1.Text = " Die Betreuung wurde am beendet."; + // + // tableRechnungspositionen + // + this.tableRechnungspositionen.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.tableRechnungspositionen.LocationFloat = new DevExpress.Utils.PointFloat(60.0001F, 0F); + this.tableRechnungspositionen.Name = "tableRechnungspositionen"; + this.tableRechnungspositionen.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 3, 0, 0, 100F); + this.tableRechnungspositionen.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRow2, + this.xrTableRow5, + this.xrTableRow6, + this.xrTableRow8}); + this.tableRechnungspositionen.SizeF = new System.Drawing.SizeF(641.9999F, 102F); + this.tableRechnungspositionen.StylePriority.UseBorders = false; + this.tableRechnungspositionen.StylePriority.UseFont = false; + this.tableRechnungspositionen.StylePriority.UsePadding = false; + // + // xrTableRow2 + // + this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell2, + this.xrTableCell4, + this.xrTableCell13, + this.xrTableCell5, + this.xrTableCell14}); + this.xrTableRow2.Name = "xrTableRow2"; + this.xrTableRow2.Weight = 1.0338469304739562D; + // + // xrTableCell2 + // + this.xrTableCell2.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell2.Multiline = true; + this.xrTableCell2.Name = "xrTableCell2"; + this.xrTableCell2.StylePriority.UseBorders = false; + this.xrTableCell2.StylePriority.UseTextAlignment = false; + this.xrTableCell2.Text = "Zeitraum von"; + this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + this.xrTableCell2.Weight = 0.56074779116335471D; + // + // xrTableCell4 + // + this.xrTableCell4.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell4.Name = "xrTableCell4"; + this.xrTableCell4.StylePriority.UseBorders = false; + this.xrTableCell4.StylePriority.UseTextAlignment = false; + this.xrTableCell4.Text = "bis"; + this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; + this.xrTableCell4.Weight = 0.56074776739576848D; + // + // xrTableCell13 + // + this.xrTableCell13.Name = "xrTableCell13"; + this.xrTableCell13.StylePriority.UseTextAlignment = false; + this.xrTableCell13.Text = "Vergütung pro Std."; + this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + this.xrTableCell13.Weight = 0.700934509358181D; + // + // xrTableCell5 + // + this.xrTableCell5.Name = "xrTableCell5"; + this.xrTableCell5.StylePriority.UseTextAlignment = false; + this.xrTableCell5.Text = "Anzahl FLS"; + this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + this.xrTableCell5.Weight = 0.51401872857292652D; + // + // xrTableCell14 + // + this.xrTableCell14.Multiline = true; + this.xrTableCell14.Name = "xrTableCell14"; + this.xrTableCell14.Text = "davon gesondert\r\nbewilligt"; + this.xrTableCell14.Weight = 0.663551203509769D; + // + // xrTableRow5 + // + this.xrTableRow5.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.cellStart1, + this.cellEnd1, + this.cellHourlyRate1, + this.cellFLS1, + this.xrTableCell20}); + this.xrTableRow5.Name = "xrTableRow5"; + this.xrTableRow5.Weight = 0.49230806213045519D; + // + // cellStart1 + // + this.cellStart1.Name = "cellStart1"; + this.cellStart1.Weight = 0.56074779116335471D; + // + // cellEnd1 + // + this.cellEnd1.Name = "cellEnd1"; + this.cellEnd1.Weight = 0.56074776739576848D; + // + // cellHourlyRate1 + // + this.cellHourlyRate1.Name = "cellHourlyRate1"; + this.cellHourlyRate1.Weight = 0.700934509358181D; + // + // cellFLS1 + // + this.cellFLS1.Name = "cellFLS1"; + this.cellFLS1.Weight = 0.51401872857292652D; + // + // xrTableCell20 + // + this.xrTableCell20.Name = "xrTableCell20"; + this.xrTableCell20.Weight = 0.663551203509769D; + // + // xrTableRow6 + // + this.xrTableRow6.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.cellStart2, + this.cellEnd2, + this.cellHourlyRate2, + this.cellFLS2, + this.xrTableCell21}); + this.xrTableRow6.Name = "xrTableRow6"; + this.xrTableRow6.Weight = 0.4923080621304553D; + // + // cellStart2 + // + this.cellStart2.Name = "cellStart2"; + this.cellStart2.Weight = 0.56074779116335471D; + // + // cellEnd2 + // + this.cellEnd2.Name = "cellEnd2"; + this.cellEnd2.Weight = 0.56074776739576848D; + // + // cellHourlyRate2 + // + this.cellHourlyRate2.Name = "cellHourlyRate2"; + this.cellHourlyRate2.Weight = 0.700934509358181D; + // + // cellFLS2 + // + this.cellFLS2.Name = "cellFLS2"; + this.cellFLS2.Weight = 0.51401872857292652D; + // + // xrTableCell21 + // + this.xrTableCell21.Name = "xrTableCell21"; + this.xrTableCell21.Weight = 0.663551203509769D; + // + // xrTableRow8 + // + this.xrTableRow8.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.cellStart3, + this.cellEnd3, + this.cellHourlyRate3, + this.cellFLS3, + this.xrTableCell29}); + this.xrTableRow8.Name = "xrTableRow8"; + this.xrTableRow8.Weight = 0.49230806213045525D; + // + // cellStart3 + // + this.cellStart3.Name = "cellStart3"; + this.cellStart3.Weight = 0.56074779116335471D; + // + // cellEnd3 + // + this.cellEnd3.Name = "cellEnd3"; + this.cellEnd3.Weight = 0.56074776739576848D; + // + // cellHourlyRate3 + // + this.cellHourlyRate3.Name = "cellHourlyRate3"; + this.cellHourlyRate3.Weight = 0.700934509358181D; + // + // cellFLS3 + // + this.cellFLS3.Name = "cellFLS3"; + this.cellFLS3.Weight = 0.51401872857292652D; + // + // xrTableCell29 + // + this.xrTableCell29.Name = "xrTableCell29"; + this.xrTableCell29.Weight = 0.663551203509769D; + // + // xrLabel17 + // + this.xrLabel17.BackColor = System.Drawing.Color.Transparent; + this.xrLabel17.Font = new System.Drawing.Font("Arial", 10F); + this.xrLabel17.LocationFloat = new DevExpress.Utils.PointFloat(65.00015F, 284.1301F); + this.xrLabel17.Multiline = true; + this.xrLabel17.Name = "xrLabel17"; + this.xrLabel17.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel17.SizeF = new System.Drawing.SizeF(598.0811F, 27.08325F); + this.xrLabel17.StylePriority.UseBackColor = false; + this.xrLabel17.StylePriority.UseFont = false; + this.xrLabel17.Text = "¹vom LWL gesondert bewilligte Leistungen zur Deckung eines einmaligen Bedarfs"; + // + // ruleRateFactorNull + // + this.ruleRateFactorNull.Condition = "[RateFactorText2] == ?"; + this.ruleRateFactorNull.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False; + this.ruleRateFactorNull.Name = "ruleRateFactorNull"; + // + // topMarginBand1 + // + this.topMarginBand1.HeightF = 100F; + this.topMarginBand1.Name = "topMarginBand1"; + // + // bottomMarginBand1 + // + this.bottomMarginBand1.HeightF = 90.33334F; + this.bottomMarginBand1.Name = "bottomMarginBand1"; + // + // GroupHeader1 + // + this.GroupHeader1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrRichText2, + this.xrLabel8, + this.lblAdresse}); + this.GroupHeader1.HeightF = 297.2498F; + this.GroupHeader1.Name = "GroupHeader1"; + this.GroupHeader1.StylePriority.UseFont = false; + // + // xrLabel8 + // + this.xrLabel8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceDate")}); + this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(531.1946F, 258.4164F); + this.xrLabel8.Name = "xrLabel8"; + this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel8.SizeF = new System.Drawing.SizeF(204.9722F, 23F); + this.xrLabel8.StylePriority.UseTextAlignment = false; + this.xrLabel8.Text = "xrLabel8"; + this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // + // lblAdresse + // + this.lblAdresse.LocationFloat = new DevExpress.Utils.PointFloat(60F, 143.3333F); + this.lblAdresse.Multiline = true; + this.lblAdresse.Name = "lblAdresse"; + this.lblAdresse.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblAdresse.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink; + this.lblAdresse.SizeF = new System.Drawing.SizeF(376.3542F, 107.6665F); + this.lblAdresse.StylePriority.UseFont = false; + this.lblAdresse.Text = "Landschaftsverband Westfalen-Lippe\r\nBehindertenhilfe Westfalen\r\n\r\n48133 Münster\r\n" + + ""; + // + // GroupFooter1 + // + this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.tableRechnungspositionen}); + this.GroupFooter1.HeightF = 102F; + this.GroupFooter1.Name = "GroupFooter1"; + this.GroupFooter1.StylePriority.UseFont = false; + // + // GroupFooter2 + // + this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLine2, + this.xrLine1, + this.xrLabel35, + this.xrLabel12, + this.xrCheckBox2, + this.xrLabel17, + this.xrCheckBox1}); + this.GroupFooter2.HeightF = 311.2133F; + this.GroupFooter2.Level = 1; + this.GroupFooter2.Name = "GroupFooter2"; + this.GroupFooter2.StylePriority.UseFont = false; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.SettlementRO); + // + // xrRichText2 + // + this.xrRichText2.Font = new System.Drawing.Font("Arial", 8F); + this.xrRichText2.LocationFloat = new DevExpress.Utils.PointFloat(531.1946F, 0F); + this.xrRichText2.Name = "xrRichText2"; + this.xrRichText2.SerializableRtfString = resources.GetString("xrRichText2.SerializableRtfString"); + this.xrRichText2.SizeF = new System.Drawing.SizeF(235.8053F, 165.5556F); + this.xrRichText2.StylePriority.UseFont = false; + // + // xrLabel1 + // + this.xrLabel1.BackColor = System.Drawing.Color.Transparent; + this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(60F, 53.95833F); + this.xrLabel1.Multiline = true; + this.xrLabel1.Name = "xrLabel1"; + this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel1.SizeF = new System.Drawing.SizeF(642F, 66.25F); + this.xrLabel1.StylePriority.UseBackColor = false; + this.xrLabel1.StylePriority.UseFont = false; + this.xrLabel1.Text = "Sehr geehrte Damen und Herren,\r\n\r\nanbei der Budgetnachweis des Ambulant Betreuten" + + " Wohnens der Wichernhaus gGmbH"; + // + // Budgetnachweis + // + this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail, + this.topMarginBand1, + this.bottomMarginBand1, + this.GroupHeader1, + this.GroupFooter1, + this.GroupFooter2}); + this.DataSource = this.bindingSource1; + this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung"; + this.Font = new System.Drawing.Font("Times New Roman", 12F); + this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] { + this.ruleRateFactorNull}); + this.Margins = new System.Drawing.Printing.Margins(30, 30, 100, 90); + this.PageHeight = 1169; + this.PageWidth = 827; + this.PaperKind = System.Drawing.Printing.PaperKind.A4; + this.Version = "17.1"; + ((System.ComponentModel.ISupportInitialize)(this.tableRechnungspositionen)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + + } + + #endregion + + private DevExpress.XtraReports.UI.DetailBand Detail; + private System.Windows.Forms.BindingSource bindingSource1; + private DevExpress.XtraReports.UI.FormattingRule ruleRateFactorNull; + private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1; + private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1; + private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader1; + private DevExpress.XtraReports.UI.XRLabel lblAdresse; + private DevExpress.XtraReports.UI.XRLabel xrLabel7; + private DevExpress.XtraReports.UI.XRLabel xrLabel14; + private DevExpress.XtraReports.UI.XRLabel xrLabel10; + private DevExpress.XtraReports.UI.XRLabel xrLabel16; + private DevExpress.XtraReports.UI.XRLabel xrLabel15; + private DevExpress.XtraReports.UI.XRLabel xrLabel12; + private DevExpress.XtraReports.UI.XRLabel xrLabel17; + private DevExpress.XtraReports.UI.XRTable tableRechnungspositionen; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell4; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell13; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell14; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow5; + private DevExpress.XtraReports.UI.XRTableCell cellStart1; + private DevExpress.XtraReports.UI.XRTableCell cellEnd1; + private DevExpress.XtraReports.UI.XRTableCell cellHourlyRate1; + private DevExpress.XtraReports.UI.XRTableCell cellFLS1; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell20; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow6; + private DevExpress.XtraReports.UI.XRTableCell cellStart2; + private DevExpress.XtraReports.UI.XRTableCell cellEnd2; + private DevExpress.XtraReports.UI.XRTableCell cellHourlyRate2; + private DevExpress.XtraReports.UI.XRTableCell cellFLS2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell21; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow8; + private DevExpress.XtraReports.UI.XRTableCell cellStart3; + private DevExpress.XtraReports.UI.XRTableCell cellEnd3; + private DevExpress.XtraReports.UI.XRTableCell cellHourlyRate3; + private DevExpress.XtraReports.UI.XRTableCell cellFLS3; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell29; + private DevExpress.XtraReports.UI.XRCheckBox xrCheckBox2; + private DevExpress.XtraReports.UI.XRCheckBox xrCheckBox1; + private DevExpress.XtraReports.UI.XRLabel xrLabel35; + private DevExpress.XtraReports.UI.XRLine xrLine2; + private DevExpress.XtraReports.UI.XRLine xrLine1; + private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter1; + private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter2; + private DevExpress.XtraReports.UI.XRLabel xrLabel8; + private DevExpress.XtraReports.UI.XRRichText xrRichText2; + private DevExpress.XtraReports.UI.XRLabel xrLabel1; + } +} diff --git a/ReportImp/Wichernhaus/Budgetnachweis.cs b/ReportImp/Wichernhaus/Budgetnachweis.cs new file mode 100644 index 000000000..3d5ef278b --- /dev/null +++ b/ReportImp/Wichernhaus/Budgetnachweis.cs @@ -0,0 +1,253 @@ +using System; +using System.Text; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Report.ReportObjects; +using BeWo.Report; +using BS.Shared.Core; +using BS.Shared.DataContracts; +using DevExpress.XtraReports.UI; + +namespace Wichernhaus +{ + public partial class Budgetnachweis : DevExpress.XtraReports.UI.XtraReport, IBeWoReport + { + public Budgetnachweis() + { + InitializeComponent(); + } + + public void SetReportDataSource(SettlementRO pRO) + { + if (pRO.RecipientOrganisation != "LWL" && !pRO.RecipientOrganisation.ToLower().Contains("westfalen-lippe")) + { + 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(); + } + + + xrCheckBox2.Checked = true; + DateTime? terminationDate = null; + + if (pRO.CostBearer2SupportConceptOid > 0) + { + var c2s = DAOFactory.GenericDAO.LoadByID(pRO.CostBearer2SupportConceptOid); + + if (c2s.SupportConcept.Customer.TerminationDate.HasValue) + { + terminationDate = c2s.SupportConcept.Customer.TerminationDate; + xrCheckBox1.Text = String.Format(" Die Betreuung wurde am {0:dd.MM.yyyy} beendet.", + c2s.SupportConcept.Customer.TerminationDate); + xrCheckBox2.Checked = false; + xrCheckBox1.Checked = true; + } + } + + + + ErstelleRechnungspositionen(pRO, terminationDate); + + + + + + bindingSource1.DataSource = pRO; + } + + private void ErstelleRechnungspositionen(SettlementRO pRO, DateTime? terminationDate) + { + + if (pRO.InvoiceItems != null && pRO.InvoiceItems.Count > 0 && pRO.InvoiceItems[0].ItemDescription != "Spitzabrechnung") + { + int rowIndex = 0; + foreach (var ii in pRO.InvoiceItems) + { + if (ii.UnitCount.HasValue && ii.UnitCount.Value > 0) + { + AddRechnungsposition(ii, rowIndex++); + } + } + //if (pRO.InvoiceItems.Count == 3) + //{ + // SetzeRechnungsTexte(pRO.InvoiceItems[0], cellStart1, cellEnd1, cellHourlyRate1, cellFLS1); + // SetzeRechnungsTexte(pRO.InvoiceItems[1], cellStart2, cellEnd2, cellHourlyRate2, cellFLS2); + // SetzeRechnungsTexte(pRO.InvoiceItems[2], cellStart3, cellEnd3, cellHourlyRate3, cellFLS3); + //} + //else if (pRO.InvoiceItems.Count == 2) + //{ + // SetzeRechnungsTexte(pRO.InvoiceItems[0], cellStart1, cellEnd1, cellHourlyRate1, cellFLS1); + // SetzeRechnungsTexte(pRO.InvoiceItems[1], cellStart2, cellEnd2, cellHourlyRate2, cellFLS2); + //} + //else + //{ + // SetzeRechnungsTexte(pRO.InvoiceItems[0], cellStart1, cellEnd1, cellHourlyRate1, cellFLS1); + //} + } + else + { + ErstelleStandardRechnungspositionen(pRO, terminationDate); + } + } + + private void AddRechnungsposition(InvoiceItemDC ii, int rowIndex) + { + XRTableRow newRow = null; + if (rowIndex > 2) + { + newRow = tableRechnungspositionen.InsertRowBelow(tableRechnungspositionen.Rows[tableRechnungspositionen.Rows.Count - 1]); + } + else + { + newRow = tableRechnungspositionen.Rows[rowIndex + 1]; + } + newRow.Cells[0].Text = String.Format("{0:dd.MM.yyyy}", ii.ItemPeriodStart); + newRow.Cells[1].Text = String.Format("{0:dd.MM.yyyy}", ii.ItemPeriodEnd); + newRow.Cells[2].Text = String.Format("{0:0.00}", ii.AmountPerUnit); + newRow.Cells[3].Text = String.Format("{0:0.00}", ii.UnitCount); + } + + private void SetzeRechnungsTexte(InvoiceItemDC ii, XRTableCell cellStart, XRTableCell cellEnd, XRTableCell cellHourlyRate, XRTableCell cellFLS) + { + cellStart.Text = String.Format("{0:dd.MM.yyyy}", ii.ItemPeriodStart); + cellEnd.Text = String.Format("{0:dd.MM.yyyy}", ii.ItemPeriodEnd); + cellHourlyRate.Text = String.Format("{0:c}", ii.AmountPerUnit); + cellFLS.Text = String.Format("{0:0.00}", ii.UnitCount); + } + + private void ErstelleStandardRechnungspositionen(SettlementRO pRO, DateTime? terminationDate) + { + + pRO.AccountingEndDateString = CorrectPossibleTerminationEndDate(pRO.AccountingEndDateString, terminationDate); + + if (pRO.DifferentHourlyRateCount == 3) + { + //Erbrachte Leistungen (FLS) - bis [HourlyRateOldEndDateString] à [HourlyRateOldString] € + + pRO.Abrechnungstext1 = String.Format("{0} bis {1}", + pRO.AccountingStartDateString, pRO.HourlyRate3EndDateString); + + pRO.Abrechnungstext1 += String.Format(": {0:0.##} FLS {1}x {2:c}", + pRO.GeleisteteFLSMitStundensatz3, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRate3); + + //[AccountingStartDateString] - [HourlyRate3EndDateString] sind [RecordedFLSWithHourlyRate3String] Std. x [HourlyRate3String] € ="; + + pRO.Betrag1 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatz3 * (decimal)pRO.RateFactor * pRO.HourlyRate3); + + + pRO.Abrechnungstext2 = String.Format("{0} bis {1}", + pRO.HourlyRateOldStartDateString, pRO.HourlyRateOldEndDateString); + pRO.Abrechnungstext2 += String.Format(": {0:0.##} FLS {1}x {2:c}", + pRO.GeleisteteFLSMitStundensatzAlt, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRateOld); + + pRO.Betrag2 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatzAlt * (decimal)pRO.RateFactor * pRO.HourlyRateOld); + + + pRO.Abrechnungstext3 = String.Format("{0} bis {1}", + pRO.HourlyRateNewStartDateString, pRO.AccountingEndDateString); + pRO.Abrechnungstext3 += String.Format(": {0:0.##} FLS {1}x {2:c}", + pRO.GeleisteteFLSMitStundensatzAktuell, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRateNew); + + pRO.Betrag3 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatzAktuell * (decimal)pRO.RateFactor * pRO.HourlyRateNew); + + + + cellStart1.Text = pRO.AccountingStartDateString; + cellEnd1.Text = pRO.HourlyRate3EndDateString; + cellHourlyRate1.Text = pRO.HourlyRate3String; + cellFLS1.Text = pRO.RecordedFLSWithHourlyRate3String; + + cellStart2.Text = pRO.HourlyRateOldStartDateString; + cellEnd2.Text = pRO.HourlyRateOldEndDateString; + cellHourlyRate2.Text = pRO.HourlyRateOldString; + cellFLS2.Text = pRO.RecordedFLSWithOldHourlyRateString; + + cellStart3.Text = pRO.HourlyRateNewStartDateString; + cellEnd3.Text = pRO.AccountingEndDateString; + cellHourlyRate3.Text = pRO.HourlyRateNewString; + cellFLS3.Text = pRO.RecordedFLSWithNewHourlyRateString; + } + else if (pRO.DifferentHourlyRateCount == 2) + { + + pRO.Abrechnungstext2 = String.Format("{0} bis {1}", + pRO.AccountingStartDateString, pRO.HourlyRateOldEndDateString); + pRO.Abrechnungstext2 += String.Format(": {0:0.##} FLS {1}x {2:c}", + pRO.GeleisteteFLSMitStundensatzAlt, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRateOld); + + pRO.Betrag2 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatzAlt * (decimal)pRO.RateFactor * pRO.HourlyRateOld); + + + pRO.Abrechnungstext3 = String.Format("{0} bis {1}", + pRO.HourlyRateNewStartDateString, pRO.AccountingEndDateString); + pRO.Abrechnungstext3 += String.Format(": {0:0.##} FLS {1}x {2:c}", + pRO.GeleisteteFLSMitStundensatzAktuell, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRateNew); + + pRO.Betrag3 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatzAktuell * (decimal)pRO.RateFactor * pRO.HourlyRateNew); + + + cellStart1.Text = pRO.AccountingStartDateString; + cellEnd1.Text = pRO.HourlyRateOldEndDateString; + cellHourlyRate1.Text = pRO.HourlyRateOldString; + cellFLS1.Text = pRO.RecordedFLSWithOldHourlyRateString; + + cellStart2.Text = pRO.HourlyRateNewStartDateString; + cellEnd2.Text = pRO.AccountingEndDateString; + cellHourlyRate2.Text = pRO.HourlyRateNewString; + cellFLS2.Text = pRO.RecordedFLSWithNewHourlyRateString; + } + else + { + cellStart1.Text = pRO.AccountingStartDateString; + cellEnd1.Text = pRO.AccountingEndDateString; + cellHourlyRate1.Text = pRO.HourlyRateNewString; + cellFLS1.Text = pRO.RecordedFLSWithNewHourlyRateString; + + pRO.Abrechnungstext3 = String.Format("{0} bis {1}", + pRO.AccountingStartDateString, pRO.AccountingEndDateString); + pRO.Abrechnungstext3 += String.Format(": {0:0.##} FLS {1}x {2:c}", + pRO.GeleisteteFLSMitStundensatzAktuell, pRO.RateFactor == 1 ? "" : "x " + pRO.RateFactorText2 + " ", pRO.HourlyRateNew); + + pRO.Betrag3 = String.Format("{0:c}", pRO.GeleisteteFLSMitStundensatzAktuell * (decimal)pRO.RateFactor * pRO.HourlyRateNew); + } + } + + private string CorrectPossibleTerminationEndDate(string dateString, DateTime? terminationDate) + { + if (terminationDate.HasValue) + { + DateTime dt = DateTime.MinValue; + if (DateTime.TryParse(dateString, out dt)) + { + if (terminationDate < dt) + { + return String.Format("{0:dd.MM.yyyy}", terminationDate); + } + } + + } + + return dateString; + } + } +} diff --git a/ReportImp/Wichernhaus/Budgetnachweis.resx b/ReportImp/Wichernhaus/Budgetnachweis.resx new file mode 100644 index 000000000..7ac8db9cb --- /dev/null +++ b/ReportImp/Wichernhaus/Budgetnachweis.resx @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Hiermit wird erklärt, dass die Verpflichtungen aus der Leistungs-, Prüfungs- und Vergütungsvereinbarung nach §§ 75 ff. SGB X II eingehalten wurden und alle hier gemachten Angaben anhand der vorgehaltenen Quittierungsbelege sowie der Betreuungsdokumentation jederzeit nachgewiesen werden können. + +Mit freundlichen Grüßen + + + ewBcAHIAdABmADEAXABkAGUAZgBmADAAewBcAGYAbwBuAHQAdABiAGwAewBcAGYAMAAgAEMAYQBsAGkAYgByAGkAOwB9AHsAXABmADEAIABUAGkAbQBlAHMAIABOAGUAdwAgAFIAbwBtAGEAbgA7AH0AfQB7AFwAYwBvAGwAbwByAHQAYgBsACAAOwBcAHIAZQBkADAAXABnAHIAZQBlAG4AMABcAGIAbAB1AGUAMAAgADsAXAByAGUAZAAwAFwAZwByAGUAZQBuADAAXABiAGwAdQBlADIANQA1ACAAOwB9AHsAXAAqAFwAZABlAGYAYwBoAHAAIABcAGYAMQBcAGYAcwAyADQAfQB7AFwAcwB0AHkAbABlAHMAaABlA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HAAYQByAGQAXABwAGwAYQBpAG4AXABxAGwAXABzAGwAMgA3ADUAXABzAGwAbQB1AGwAdAAxAFwAcwBhADIAMAAwAHsAXABmADEAXABmAHMAMQA4AFwAYwBmADAAIABBAG4AcwBwAHIAZQBjAGgAcABhAHIAdABuAGUAcgA6ACAARgAuACAAQwBvAGwAbABlAHQAfQBcAGwAYQBuAGcANwBcAGwAYQBuAGcAZgBlADcAXABmAHMAMgAyAFwAcABhAHIAXABwAGEAcgBkAFwAcABsAGEAaQBuAFwAcQBsAFwAbABhAG4AZwAxADAAMwAxAFwAbABhAG4AZwBmAGUAMQAwADMAMQBcAGYAMQBcAGYAcwAyADQAXABjAGYAMQBcAHAAYQByAH0A + + + 17, 17 + + \ No newline at end of file diff --git a/ReportImp/Wichernhaus/Budgetnachweis2.Designer.cs b/ReportImp/Wichernhaus/Budgetnachweis2.Designer.cs new file mode 100644 index 000000000..fe9aebd63 --- /dev/null +++ b/ReportImp/Wichernhaus/Budgetnachweis2.Designer.cs @@ -0,0 +1,341 @@ +namespace Wichernhaus +{ + partial class Budgetnachweis2 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Budgetnachweis2)); + this.Detail = new DevExpress.XtraReports.UI.DetailBand(); + this.xrPanel1 = new DevExpress.XtraReports.UI.XRPanel(); + this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel(); + this.lblAktenzeichen = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrCheckBox2 = new DevExpress.XtraReports.UI.XRCheckBox(); + this.xrCheckBox1 = new DevExpress.XtraReports.UI.XRCheckBox(); + this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule(); + this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); + this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); + this.lblAdresse = new DevExpress.XtraReports.UI.XRLabel(); + this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand(); + this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.xrRichText2 = new DevExpress.XtraReports.UI.XRRichText(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + // + // Detail + // + this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrPanel1, + this.xrLabel12, + this.xrCheckBox2, + this.xrCheckBox1}); + this.Detail.HeightF = 444.7082F; + this.Detail.Name = "Detail"; + this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.Detail.StylePriority.UseFont = false; + this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // + // xrPanel1 + // + this.xrPanel1.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrPanel1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel15, + this.lblAktenzeichen, + this.xrLabel7, + this.xrLabel10, + this.xrLabel3, + this.xrLabel9}); + this.xrPanel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrPanel1.Name = "xrPanel1"; + this.xrPanel1.SizeF = new System.Drawing.SizeF(673.3192F, 179.1617F); + this.xrPanel1.StylePriority.UseBorders = false; + // + // xrLabel15 + // + this.xrLabel15.BackColor = System.Drawing.Color.Transparent; + this.xrLabel15.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.xrLabel15.CanShrink = true; + this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(10.0001F, 29.99999F); + this.xrLabel15.Name = "xrLabel15"; + this.xrLabel15.SizeF = new System.Drawing.SizeF(650F, 20F); + this.xrLabel15.StylePriority.UseBackColor = false; + this.xrLabel15.StylePriority.UseBorders = false; + this.xrLabel15.StylePriority.UseFont = false; + this.xrLabel15.StylePriority.UsePadding = false; + this.xrLabel15.Text = "[CustomerName], [CustomerStreet], [CustomerPostalCode] [CustomerTown]"; + this.xrLabel15.WordWrap = false; + // + // lblAktenzeichen + // + this.lblAktenzeichen.BackColor = System.Drawing.Color.Transparent; + this.lblAktenzeichen.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.lblAktenzeichen.CanShrink = true; + this.lblAktenzeichen.LocationFloat = new DevExpress.Utils.PointFloat(10F, 65F); + this.lblAktenzeichen.Multiline = true; + this.lblAktenzeichen.Name = "lblAktenzeichen"; + this.lblAktenzeichen.SizeF = new System.Drawing.SizeF(650F, 20F); + this.lblAktenzeichen.StylePriority.UseBackColor = false; + this.lblAktenzeichen.StylePriority.UseBorders = false; + this.lblAktenzeichen.StylePriority.UseFont = false; + this.lblAktenzeichen.StylePriority.UsePadding = false; + this.lblAktenzeichen.Text = "Aktenzeichen: [CustomerReferenceNumber] Geburtsdatum: [CustomerBirthdayStr" + + "ing]"; + this.lblAktenzeichen.WordWrap = false; + // + // xrLabel7 + // + this.xrLabel7.BackColor = System.Drawing.Color.Transparent; + this.xrLabel7.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.xrLabel7.CanShrink = true; + this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(10F, 100F); + this.xrLabel7.Multiline = true; + this.xrLabel7.Name = "xrLabel7"; + this.xrLabel7.SizeF = new System.Drawing.SizeF(650F, 20F); + this.xrLabel7.StylePriority.UseBackColor = false; + this.xrLabel7.StylePriority.UseBorders = false; + this.xrLabel7.StylePriority.UseFont = false; + this.xrLabel7.StylePriority.UsePadding = false; + this.xrLabel7.Text = "Bewilligungszeitraum von [AccountingPeriod]"; + this.xrLabel7.WordWrap = false; + // + // xrLabel10 + // + this.xrLabel10.BackColor = System.Drawing.Color.Transparent; + this.xrLabel10.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(10F, 135F); + this.xrLabel10.Multiline = true; + this.xrLabel10.Name = "xrLabel10"; + this.xrLabel10.SizeF = new System.Drawing.SizeF(551.3751F, 27.08333F); + this.xrLabel10.StylePriority.UseBackColor = false; + this.xrLabel10.StylePriority.UseBorders = false; + this.xrLabel10.StylePriority.UseFont = false; + this.xrLabel10.StylePriority.UsePadding = false; + this.xrLabel10.Text = "Tatsächlich geleistete Fachleistungsstunden im Bewilligungszeitraum lt. Anlage:"; + // + // xrLabel3 + // + this.xrLabel3.BackColor = System.Drawing.Color.Transparent; + this.xrLabel3.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) + | DevExpress.XtraPrinting.BorderSide.Right) + | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrLabel3.BorderWidth = 2F; + this.xrLabel3.CanShrink = true; + this.xrLabel3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "RecordedFLSTotal", "{0:0.00}")}); + this.xrLabel3.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Bold); + this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(561.38F, 132F); + this.xrLabel3.Multiline = true; + this.xrLabel3.Name = "xrLabel3"; + this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel3.SizeF = new System.Drawing.SizeF(98.62469F, 27.08333F); + this.xrLabel3.StylePriority.UseBackColor = false; + this.xrLabel3.StylePriority.UseBorders = false; + this.xrLabel3.StylePriority.UseBorderWidth = false; + this.xrLabel3.StylePriority.UseFont = false; + this.xrLabel3.StylePriority.UseTextAlignment = false; + this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrLabel3.WordWrap = false; + // + // xrLabel9 + // + this.xrLabel9.BackColor = System.Drawing.Color.Transparent; + this.xrLabel9.Borders = DevExpress.XtraPrinting.BorderSide.None; + this.xrLabel9.CanShrink = true; + this.xrLabel9.Font = new System.Drawing.Font("Times New Roman", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline)))); + this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(10.0001F, 9.999974F); + this.xrLabel9.Name = "xrLabel9"; + this.xrLabel9.SizeF = new System.Drawing.SizeF(650F, 20F); + this.xrLabel9.StylePriority.UseBackColor = false; + this.xrLabel9.StylePriority.UseBorders = false; + this.xrLabel9.StylePriority.UseFont = false; + this.xrLabel9.StylePriority.UsePadding = false; + this.xrLabel9.Text = "Leistungsberechtigte/r:"; + this.xrLabel9.WordWrap = false; + // + // xrLabel12 + // + this.xrLabel12.BackColor = System.Drawing.Color.Transparent; + this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(0F, 267.0832F); + this.xrLabel12.Multiline = true; + this.xrLabel12.Name = "xrLabel12"; + this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel12.SizeF = new System.Drawing.SizeF(695.3123F, 177.625F); + this.xrLabel12.StylePriority.UseBackColor = false; + this.xrLabel12.StylePriority.UseFont = false; + this.xrLabel12.StylePriority.UseTextAlignment = false; + this.xrLabel12.Text = resources.GetString("xrLabel12.Text"); + this.xrLabel12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopJustify; + // + // xrCheckBox2 + // + this.xrCheckBox2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 226.0367F); + this.xrCheckBox2.Name = "xrCheckBox2"; + this.xrCheckBox2.SizeF = new System.Drawing.SizeF(211.0832F, 21.875F); + this.xrCheckBox2.StylePriority.UseFont = false; + this.xrCheckBox2.Text = " Die Betreuung dauert an."; + // + // xrCheckBox1 + // + this.xrCheckBox1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 192.7034F); + this.xrCheckBox1.Name = "xrCheckBox1"; + this.xrCheckBox1.SizeF = new System.Drawing.SizeF(493.5575F, 21.875F); + this.xrCheckBox1.StylePriority.UseFont = false; + this.xrCheckBox1.Text = " Die Betreuung wurde beendet am"; + // + // ruleRateFactorNull + // + this.ruleRateFactorNull.Condition = "[RateFactorText2] == ?"; + this.ruleRateFactorNull.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False; + this.ruleRateFactorNull.Name = "ruleRateFactorNull"; + // + // topMarginBand1 + // + this.topMarginBand1.HeightF = 50F; + this.topMarginBand1.Name = "topMarginBand1"; + // + // bottomMarginBand1 + // + this.bottomMarginBand1.HeightF = 50F; + this.bottomMarginBand1.Name = "bottomMarginBand1"; + // + // lblAdresse + // + this.lblAdresse.LocationFloat = new DevExpress.Utils.PointFloat(0F, 161.8959F); + this.lblAdresse.Multiline = true; + this.lblAdresse.Name = "lblAdresse"; + this.lblAdresse.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblAdresse.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink; + this.lblAdresse.SizeF = new System.Drawing.SizeF(329.9999F, 81.58333F); + this.lblAdresse.StylePriority.UseFont = false; + this.lblAdresse.Text = "Landschaftsverband Westfalen- Lippe\r\nLWL- Inklusionsamt Soziale Teilhabe\r\n48133 M" + + "ünster\r\n"; + // + // GroupHeader1 + // + this.GroupHeader1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrRichText2, + this.xrLabel8, + this.xrLabel6, + this.lblAdresse}); + this.GroupHeader1.HeightF = 316.2917F; + this.GroupHeader1.Name = "GroupHeader1"; + this.GroupHeader1.StylePriority.UseFont = false; + // + // xrLabel8 + // + this.xrLabel8.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Bold); + this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0F, 276.2917F); + this.xrLabel8.Multiline = true; + this.xrLabel8.Name = "xrLabel8"; + this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel8.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink; + this.xrLabel8.SizeF = new System.Drawing.SizeF(673.319F, 40.00003F); + this.xrLabel8.StylePriority.UseFont = false; + this.xrLabel8.StylePriority.UseTextAlignment = false; + this.xrLabel8.Text = "Budgetnachweis\r\nüber die Abrechnung von Fachleistungsstunden im Rahmen der Eingli" + + "ederungshilfe"; + this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; + // + // xrLabel6 + // + this.xrLabel6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { + new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceDate", "Bochum, {0}")}); + this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(458.6595F, 223.4792F); + this.xrLabel6.Name = "xrLabel6"; + this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel6.SizeF = new System.Drawing.SizeF(186.6738F, 20.00001F); + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.SettlementRO); + // + // xrRichText2 + // + this.xrRichText2.Font = new System.Drawing.Font("Arial", 8F); + this.xrRichText2.LocationFloat = new DevExpress.Utils.PointFloat(413.3468F, 0F); + this.xrRichText2.Name = "xrRichText2"; + this.xrRichText2.SerializableRtfString = resources.GetString("xrRichText2.SerializableRtfString"); + this.xrRichText2.SizeF = new System.Drawing.SizeF(264.972F, 165.5556F); + this.xrRichText2.StylePriority.UseFont = false; + // + // Budgetnachweis + // + this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail, + this.topMarginBand1, + this.bottomMarginBand1, + this.GroupHeader1}); + this.DataSource = this.bindingSource1; + this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung"; + this.Font = new System.Drawing.Font("Times New Roman", 12F); + this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] { + this.ruleRateFactorNull}); + this.Margins = new System.Drawing.Printing.Margins(80, 30, 50, 50); + this.PageHeight = 1169; + this.PageWidth = 827; + this.PaperKind = System.Drawing.Printing.PaperKind.A4; + this.Version = "17.1"; + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + + } + + #endregion + + private DevExpress.XtraReports.UI.DetailBand Detail; + private System.Windows.Forms.BindingSource bindingSource1; + private DevExpress.XtraReports.UI.FormattingRule ruleRateFactorNull; + private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1; + private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1; + private DevExpress.XtraReports.UI.XRLabel xrLabel12; + private DevExpress.XtraReports.UI.XRCheckBox xrCheckBox2; + private DevExpress.XtraReports.UI.XRCheckBox xrCheckBox1; + private DevExpress.XtraReports.UI.XRLabel lblAdresse; + private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader1; + private DevExpress.XtraReports.UI.XRLabel xrLabel6; + private DevExpress.XtraReports.UI.XRPanel xrPanel1; + private DevExpress.XtraReports.UI.XRLabel xrLabel15; + private DevExpress.XtraReports.UI.XRLabel lblAktenzeichen; + private DevExpress.XtraReports.UI.XRLabel xrLabel7; + private DevExpress.XtraReports.UI.XRLabel xrLabel10; + private DevExpress.XtraReports.UI.XRLabel xrLabel3; + private DevExpress.XtraReports.UI.XRLabel xrLabel9; + private DevExpress.XtraReports.UI.XRLabel xrLabel8; + private DevExpress.XtraReports.UI.XRRichText xrRichText2; + } +} diff --git a/ReportImp/Wichernhaus/Budgetnachweis2.cs b/ReportImp/Wichernhaus/Budgetnachweis2.cs new file mode 100644 index 000000000..41e5fd4ae --- /dev/null +++ b/ReportImp/Wichernhaus/Budgetnachweis2.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Report.ReportObjects; +using BeWo.Report; +using BS.Shared.DataContracts; +using DevExpress.XtraReports.UI; + +namespace Wichernhaus +{ + public partial class Budgetnachweis2 : DevExpress.XtraReports.UI.XtraReport//, IBeWoReport + { + public Budgetnachweis2() + { + InitializeComponent(); + } + + public void SetReportDataSource(SettlementRO pRO) + { + if (pRO.RecipientOrganisation != "LWL" && !pRO.RecipientOrganisation.ToLower().Contains("westfalen-lippe")) + { + 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(); + } + + xrCheckBox2.Checked = true; + + if (pRO.CostBearer2SupportConceptOid > 0) + { + var c2s = DAOFactory.GenericDAO.LoadByID(pRO.CostBearer2SupportConceptOid); + + if (c2s.SupportConcept.Customer.TerminationDate.HasValue) + { + xrCheckBox1.Text = String.Format(" Die Betreuung wurde beendet am {0:dd.MM.yyyy}", + c2s.SupportConcept.Customer.TerminationDate); + xrCheckBox2.Checked = false; + xrCheckBox1.Checked = true; + } + } + + bindingSource1.DataSource = pRO; + } + + } +} diff --git a/ReportImp/Wichernhaus/Budgetnachweis2.resx b/ReportImp/Wichernhaus/Budgetnachweis2.resx new file mode 100644 index 000000000..8ac1c26c0 --- /dev/null +++ b/ReportImp/Wichernhaus/Budgetnachweis2.resx @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Hiermit wird erklärt, dass die Verpflichtungen aus den Vereinbarungen nach §§ 75 ff. SGB XII bzw. §§ 125 ff. SGB IX eingehalten wurden und alle hier gemachten Angaben je Betreuungskontakt anhand der Quittierungsbelege sowie der Betreuungsdokumentation jederzeit nachgewiesen werden können. Diese Unterlagen sind 5 Jahre aufzubewahren und auf Verlangen des Sozialhilfeträgers bzw. des Trägers der Eingliederungshilfe vorzulegen (§ 2 Abs.1 der Vergütungsvereinbarung). + +Mit freundlichen Grüßen + + + ewBcAHIAdABmADEAXABkAGUAZgBmADAAewBcAGYAbwBuAHQAdABiAGwAewBcAGYAMAAgAEMAYQBsAGkAYgByAGkAOwB9AHsAXABmADEAIABUAGkAbQBlAHMAIABOAGUAdwAgAF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AaABlAHIAbgBoAGEAdQBzAC4AYwBvAG0AIgAgAH0AfQB7AFwAZgBsAGQAcgBzAGwAdAB7AFwAdQBsAFwAZgAxAFwAZgBzADEAOABcAGMAZgAyACAAYgBlAHQAcgBlAHUAdABlAHMAdwBvAGgAbgBlAG4AQAB3AGkAYwBoAGUAcgBuAGgAYQB1AHMALgBjAG8AbQB9AH0AfQBcAGYAMQBcAGYAcwAyADQAXABwAGEAcgBcAHAAYQByAGQAXABwAGwAYQBpAG4AXABxAGwAXABzAGwAMgA3ADUAXABzAGwAbQB1AGwAdAAxAFwAcwBhADIAMAAwAHsAXABmADEAXABmAHMAMQA4AFwAYwBmADAAIABBAG4AcwBwAHIAZQBjAGgAcABhAHIAdABuAGUAcgA6ACAARgAuACAAQwBvAGwAbABlAHQAfQBcAGwAYQBuAGcANwBcAGwAYQBuAGcAZgBlADcAXABmAHMAMgAyAFwAcABhAHIAXABwAGEAcgBkAFwAcABsAGEAaQBuAFwAcQBsAFwAbABhAG4AZwAxADAAMwAxAFwAbABhAG4AZwBmAGUAMQAwADMAMQBcAGYAMQBcAGYAcwAyADQAXABjAGYAMQBcAHAAYQByAH0A + + + 17, 17 + + \ No newline at end of file diff --git a/ReportImp/Wichernhaus/CustomReportCreator.cs b/ReportImp/Wichernhaus/CustomReportCreator.cs new file mode 100644 index 000000000..07472e6de --- /dev/null +++ b/ReportImp/Wichernhaus/CustomReportCreator.cs @@ -0,0 +1,22 @@ +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.ReportObjects; +using DevExpress.XtraReports.Design; +using DevExpress.XtraReports.UI; + +namespace Wichernhaus +{ + public class CustomReportCreator : DefaultReportCreator + { + public override XtraReport CreateSettlementReport(string dcId, long? invoiceBaseOid) + { + return base.CreateSettlementReport(dcId, invoiceBaseOid, true); + } + + } +} diff --git a/ReportImp/Wichernhaus/Invoicing/CustomInvoiceCreation.cs b/ReportImp/Wichernhaus/Invoicing/CustomInvoiceCreation.cs index 94835a1ca..15423d8fa 100644 --- a/ReportImp/Wichernhaus/Invoicing/CustomInvoiceCreation.cs +++ b/ReportImp/Wichernhaus/Invoicing/CustomInvoiceCreation.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace BetreuungsserviceFuerAlltagUndWohnen.Invoicing +namespace Wichernhaus.Invoicing { public class CustomInvoiceCreation : InvoiceCreation { @@ -16,8 +16,8 @@ namespace BetreuungsserviceFuerAlltagUndWohnen.Invoicing { var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc); - if (ii.ServiceRecord.ServiceDescription.Name.ToLower().Contains("fehlkontakt")) - ii.UnitCount *= 0.8m; + //if (ii.ServiceRecord.ServiceDescription.Name.ToLower().Contains("fehlkontakt")) + // ii.UnitCount *= 0.8m; return ii; } diff --git a/ReportImp/Wichernhaus/Invoicing/CustomInvoiceFactory.cs b/ReportImp/Wichernhaus/Invoicing/CustomInvoiceFactory.cs index e62038c19..fd1178828 100644 --- a/ReportImp/Wichernhaus/Invoicing/CustomInvoiceFactory.cs +++ b/ReportImp/Wichernhaus/Invoicing/CustomInvoiceFactory.cs @@ -6,7 +6,7 @@ using BeWo.Service.Invoicing; using BS.Shared.DataContracts; using BS.Shared.DataContracts.Compact; -namespace BetreuungsserviceFuerAlltagUndWohnen.Invoicing +namespace Wichernhaus.Invoicing { public class CustomInvoiceFactory : InvoiceFactory { @@ -16,6 +16,11 @@ namespace BetreuungsserviceFuerAlltagUndWohnen.Invoicing return new CustomInvoiceCreation(); } + public override SettlementInvoiceCreation CreateSettlementInvoiceCreator(string costbearerId, string tenant, CostBearer2SupportConcept lCb2Sc) + { + return base.CreateSettlementInvoiceCreator(costbearerId, tenant, lCb2Sc); + } + } } diff --git a/ReportImp/Wichernhaus/Invoicing/CustomSettlementInvoiceCreation.cs b/ReportImp/Wichernhaus/Invoicing/CustomSettlementInvoiceCreation.cs new file mode 100644 index 000000000..9189e4988 --- /dev/null +++ b/ReportImp/Wichernhaus/Invoicing/CustomSettlementInvoiceCreation.cs @@ -0,0 +1,25 @@ +using BeWo.Data.Entities; +using BeWo.Service.DCEntityMapper; +using BeWo.Service.Invoicing; +using BeWo.Service.Plugins; +using BS.Shared; +using BS.Shared.Core; +using BS.Shared.DataContracts; +using BS.Shared.Extensions; +using BS.Shared.Services; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Wichernhaus.Invoicing +{ + public class CustomSettlementInvoiceCreation : SettlementInvoiceCreation + { + public override bool CheckMaxApprovedHours() + { + return false; + } + } +} diff --git a/ReportImp/Wichernhaus/Wichernhaus.csproj b/ReportImp/Wichernhaus/Wichernhaus.csproj index fa4b08237..97660ee22 100644 --- a/ReportImp/Wichernhaus/Wichernhaus.csproj +++ b/ReportImp/Wichernhaus/Wichernhaus.csproj @@ -62,8 +62,16 @@ + + Component + + + Budgetnachweis.cs + + + Component @@ -77,8 +85,18 @@ Quittierungsbeleg.cs + + Component + + + Budgetnachweis2.cs + + + Budgetnachweis.cs + Designer + KassenbuchReport.cs Designer @@ -88,6 +106,10 @@ Quittierungsbeleg.cs Designer + + Budgetnachweis2.cs + Designer + diff --git a/Service/Plugins/ServiceRecordStatisticFactory.cs b/Service/Plugins/ServiceRecordStatisticFactory.cs index bf55d6385..7737c3c71 100644 --- a/Service/Plugins/ServiceRecordStatisticFactory.cs +++ b/Service/Plugins/ServiceRecordStatisticFactory.cs @@ -319,7 +319,7 @@ namespace BeWo.Service.Plugins else { var srDc = MapToServiceRecordDCForStatistic(sr); - minutesProvidedRounded = calc.GetBillableDurationInMinutes(srDc); + minutesProvidedRounded = calc.GetBillableDurationInMinutes(srDc, false); } diff --git a/Service/ServiceImplementations/EmployeeServiceImp.cs b/Service/ServiceImplementations/EmployeeServiceImp.cs index 8ad0a257a..b4fb1ce43 100644 --- a/Service/ServiceImplementations/EmployeeServiceImp.cs +++ b/Service/ServiceImplementations/EmployeeServiceImp.cs @@ -1513,8 +1513,8 @@ namespace BeWo.Service.ServiceImplementations } } - if (customerOid.HasValue) - GetDistanceForVertreterEmployees(customerOid.Value, ref list, allEmps); + //if (customerOid.HasValue) + // GetDistanceForVertreterEmployees(customerOid.Value, ref list, allEmps); return list; } diff --git a/Shared/Services/Calculations.cs b/Shared/Services/Calculations.cs index a8e7ea449..e7aea8fd9 100644 --- a/Shared/Services/Calculations.cs +++ b/Shared/Services/Calculations.cs @@ -932,7 +932,7 @@ namespace BS.Shared.Services if (hourlyRate == null) hourlyRate = this.GetHourlyRatePeriodForServiceRecord(record); - decimal rdMinutes = this.GetBillableDurationInMinutes(record); + decimal rdMinutes = this.GetBillableDurationInMinutes(record, true); data.UnitCount = rdMinutes / 60m; @@ -965,7 +965,7 @@ namespace BS.Shared.Services public virtual decimal? GetBillableAmount(ServiceRecordDC record) { - var rdMinutes = this.GetBillableDurationInMinutes(record); + var rdMinutes = this.GetBillableDurationInMinutes(record, false); var hourlyRate = this.GetHourlyRatePeriodForServiceRecord(record); decimal amount = 0; if (hourlyRate != null && hourlyRate.CostRateValue.HasValue) @@ -981,6 +981,11 @@ namespace BS.Shared.Services } public virtual decimal GetBillableDurationInMinutes(ServiceRecordDC record) + { + return GetBillableDurationInMinutes(record, false); + } + + public virtual decimal GetBillableDurationInMinutes(ServiceRecordDC record, bool useProzentAbrechenbar) { if (!record.ServiceDescription.Category.IsBillable) { @@ -993,8 +998,21 @@ namespace BS.Shared.Services { prozent = record.ServiceDescription.ProzentBudget.Value; } - rdMinutes *= (prozent / 100); + + if (useProzentAbrechenbar) + { + if (record.ServiceDescription.ProzentAbrechnung.HasValue) + { + prozent = record.ServiceDescription.ProzentAbrechnung.Value; + } + else + { + prozent = record.ServiceDescription.Category.Percentage; + } + } + rdMinutes *= (prozent / 100); + if (record.GroupEmployeeCount.HasValue) rdMinutes /= record.GroupEmployeeCount.Value; @@ -1009,6 +1027,27 @@ namespace BS.Shared.Services // } // decimal rdMinutes = record.RoundedDuration; + // var prozent = record.ServiceDescription.Category.ProzentBudget ?? record.ServiceDescription.Category.Percentage; + // if (record.ServiceDescription.ProzentBudget.HasValue) + // { + // prozent = record.ServiceDescription.ProzentBudget.Value; + // } + // rdMinutes *= (prozent / 100); + + // if (record.GroupEmployeeCount.HasValue) + // rdMinutes /= record.GroupEmployeeCount.Value; + + // return rdMinutes; + //} + + //public virtual decimal GetBillableDurationInMinutes(ServiceRecordDC record) + //{ + // if (!record.ServiceDescription.Category.IsBillable) + // { + // return 0; + // } + // decimal rdMinutes = record.RoundedDuration; + // decimal prozent = record.ServiceDescription.Category.ProzentBudget ?? record.ServiceDescription.Category.Percentage; // if (record.ServiceDescription.ProzentBudget.HasValue) // { @@ -1024,7 +1063,7 @@ namespace BS.Shared.Services public virtual decimal GetBillableDurationInMinutes(List records) { - return records.Sum(i => GetBillableDurationInMinutes(i)); + return records.Sum(i => GetBillableDurationInMinutes(i, true)); } public virtual decimal GetDurationInMinutesForBillableAmount(ServiceRecordDC record, decimal amount) @@ -1112,7 +1151,7 @@ namespace BS.Shared.Services if (absenceSpan != null) { - var rd = this.GetBillableDurationInMinutes(iRecord); + var rd = this.GetBillableDurationInMinutes(iRecord, false); if (absenceTimes[absenceSpan] == 0) { @@ -1214,11 +1253,11 @@ namespace BS.Shared.Services records.Remove(iRecord); } - hoursNotBillableNotApproved += this.GetBillableDurationInMinutes(iRecord) / 60m; + hoursNotBillableNotApproved += this.GetBillableDurationInMinutes(iRecord, false) / 60m; continue; } - var oldDuration = this.GetBillableDurationInMinutes(iRecord); + var oldDuration = this.GetBillableDurationInMinutes(iRecord, false); iRecord.RoundedDuration = this.GetDurationInMinutesForBillableAmount(iRecord, approvedAmountCounter); iRecord.End = iRecord.Start.Value.AddMinutes(Convert.ToInt32(iRecord.RoundedDuration)); @@ -1243,7 +1282,7 @@ namespace BS.Shared.Services if (!iRecord.Start.Value.InBetween(span, true)) { - hoursOutOfSpan += this.GetBillableDurationInMinutes(iRecord) / 60m; + hoursOutOfSpan += this.GetBillableDurationInMinutes(iRecord, true) / 60m; } }