From 1fb439fc0fff97949abbefef5d4965b38a30a87c Mon Sep 17 00:00:00 2001 From: Kojo Date: Thu, 2 Nov 2023 12:12:06 +0100 Subject: [PATCH] =?UTF-8?q?SKMAachen:=20LVR-Rechnung=20nach=20=C2=A767=20h?= =?UTF-8?q?inzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Invoicing/CustomBeWo67InvoiceCreation.cs | 109 +++++ .../Invoicing/CustomInvoiceFactory.cs | 51 ++ .../SKMAachen/RechnungBeWo67.Designer.cs | 445 ++++++++++++++++++ ReportImp/SKMAachen/RechnungBeWo67.cs | 64 +++ ReportImp/SKMAachen/RechnungBeWo67.resx | 134 ++++++ ReportImp/SKMAachen/SKMAachen.csproj | 13 + 6 files changed, 816 insertions(+) create mode 100644 ReportImp/SKMAachen/Invoicing/CustomBeWo67InvoiceCreation.cs create mode 100644 ReportImp/SKMAachen/Invoicing/CustomInvoiceFactory.cs create mode 100644 ReportImp/SKMAachen/RechnungBeWo67.Designer.cs create mode 100644 ReportImp/SKMAachen/RechnungBeWo67.cs create mode 100644 ReportImp/SKMAachen/RechnungBeWo67.resx diff --git a/ReportImp/SKMAachen/Invoicing/CustomBeWo67InvoiceCreation.cs b/ReportImp/SKMAachen/Invoicing/CustomBeWo67InvoiceCreation.cs new file mode 100644 index 000000000..671bea576 --- /dev/null +++ b/ReportImp/SKMAachen/Invoicing/CustomBeWo67InvoiceCreation.cs @@ -0,0 +1,109 @@ +using System; +using System.Collections.Generic; +using System.Linq; +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 SKMAachen.Invoicing +{ + public class CustomBeWo67InvoiceCreation : InvoiceCreation + { + public override void SetInvoiceId(ServiceInvoice invoice) + { + invoice.InvoiceBase.InvoiceId = "BeWo67"; + } + + public override IList CreateSummaryInvoiceItems(IList itemList, + DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc, bool summaryPerMonth) + { + var newlist = new List(); + + var rateToItem = new Dictionary(); + foreach (InvoiceItem iitem in itemList) + { + InvoiceItem item; + String key = String.Format("{0}_{1}", iitem.AmountPerUnit, iitem.RateFactor); + + + if (rateToItem.ContainsKey(key)) + { + item = rateToItem[key]; + } + else + { + item = new InvoiceItem(); + newlist.Add(item); + + item.AmountPerUnit = iitem.AmountPerUnit; + if (invoicePeriod != null) + { + item.ItemPeriodStart = invoicePeriod.StartDate; + item.ItemPeriodEnd = invoicePeriod.EndDate; + } + else + { + item.ItemPeriodStart = scap.StartDate; + item.ItemPeriodEnd = scap.EndDate; + } + + item.RateFactor = iitem.RateFactor; + + item.AccountingInterval = iitem.AccountingInterval; + item.ItemDescription = iitem.ItemDescription; + item.UnitDescription = iitem.UnitDescription; + item.SupportConceptApprovalPeriodOid = scap.Oid; + + + rateToItem[key] = item; + } + + + if (!item.UnitCount.HasValue) + { + item.UnitCount = 0; + } + item.UnitCount += iitem.UnitCount ?? 0; + } + + + BerechneSummaryItemsSummen2(newlist); + return newlist; + } + + private void BerechneSummaryItemsSummen2(List newlist) + { + + foreach (InvoiceItem invoiceItem in newlist) + { + if (invoiceItem.RateFactor.HasValue) + { + decimal minuten = Math.Round((invoiceItem.UnitCount ?? 0) * 60, 0, MidpointRounding.AwayFromZero); + + var abrunden = RundeMinutenAuf10MinutenAb(minuten); + + var uc = abrunden / 40; + + invoiceItem.UnitCount = Math.Round(uc, 2, MidpointRounding.AwayFromZero); + } + + invoiceItem.AmountTotal = Math.Round((invoiceItem.AmountPerUnit ?? 0) * (invoiceItem.UnitCount ?? 0), 2, MidpointRounding.AwayFromZero); + invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal; + } + } + + private decimal RundeMinutenAuf10MinutenAb(decimal minuten) + { + var min = minuten; + + decimal rest = min % 10; + + min = min - rest; + + return min; + } + } +} diff --git a/ReportImp/SKMAachen/Invoicing/CustomInvoiceFactory.cs b/ReportImp/SKMAachen/Invoicing/CustomInvoiceFactory.cs new file mode 100644 index 000000000..270c35aad --- /dev/null +++ b/ReportImp/SKMAachen/Invoicing/CustomInvoiceFactory.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Service.DCEntityMapper; +using BeWo.Service.Invoicing; +using BS.Shared.DataContracts; +using BS.Shared.DataContracts.Compact; + +namespace SKMAachen.Invoicing +{ + public class CustomInvoiceFactory : InvoiceFactory + { + + public override InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary> supportConcepts2ServiceRecords) + { + foreach (var item in supportConcepts2ServiceRecords) + { + var csc = item.Key; + var sc = DAOFactory.GenericDAO.LoadByID(csc.SupportConceptOid); + + foreach (var cb2sc in sc.CostBearer2SupportConceptList) + { + // Stand Oktober 23 (Neu-) Kunde hat ausschließlich §67 beim LVR + if (cb2sc.CostBearer.Organisation != null && cb2sc.CostBearer.Organisation.Name.Contains("LVR")) + { + return new CustomBeWo67InvoiceCreation(); + } + } + } + + /* + foreach (var list in supportConcepts2ServiceRecords.Values) + { + foreach (var sr in list) + { + var sd = sr.ServiceDescription.Category; + + if (!String.IsNullOrEmpty(sd.Name) && sd.Name.Contains("§67")) + { + return new CustomBeWo67InvoiceCreation(); + } + } + } + */ + + return new InvoiceCreation(); + } + + } +} diff --git a/ReportImp/SKMAachen/RechnungBeWo67.Designer.cs b/ReportImp/SKMAachen/RechnungBeWo67.Designer.cs new file mode 100644 index 000000000..4a9fff7b6 --- /dev/null +++ b/ReportImp/SKMAachen/RechnungBeWo67.Designer.cs @@ -0,0 +1,445 @@ +using BeWo.Report.ReportObjects; +namespace SKMAachen +{ + partial class RechnungBeWo67 + { + /// + /// 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); + } + + + /// + /// 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(RechnungBeWo67)); + this.Detail = new DevExpress.XtraReports.UI.DetailBand(); + this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); + this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule(); + this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); + this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); + this.Page1 = new DevExpress.XtraReports.UI.GroupHeaderBand(); + this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrTable2 = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableRow5 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableRow4 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableRow6 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableRow8 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); + this.lblForderung = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); + this.lblAbrechnungszeitraum = new DevExpress.XtraReports.UI.XRLabel(); + this.fieldMinuten = new DevExpress.XtraReports.UI.CalculatedField(); + this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel(); + this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); + // + // Detail + // + this.Detail.HeightF = 0F; + this.Detail.Name = "Detail"; + this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); + this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; + // + // ReportHeader + // + this.ReportHeader.Font = new System.Drawing.Font("Verdana", 10F); + this.ReportHeader.HeightF = 90.70666F; + this.ReportHeader.Name = "ReportHeader"; + this.ReportHeader.StylePriority.UseFont = false; + // + // ruleRateFactorNull + // + this.ruleRateFactorNull.Condition = "[RateFactorText2] == ?"; + this.ruleRateFactorNull.Formatting.Visible = DevExpress.Utils.DefaultBoolean.False; + this.ruleRateFactorNull.Name = "ruleRateFactorNull"; + // + // topMarginBand1 + // + this.topMarginBand1.HeightF = 222F; + this.topMarginBand1.Name = "topMarginBand1"; + // + // bottomMarginBand1 + // + this.bottomMarginBand1.HeightF = 71F; + this.bottomMarginBand1.Name = "bottomMarginBand1"; + // + // Page1 + // + this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel3, + this.xrLabel1, + this.xrLabel7, + this.xrLabel8, + this.xrTable2, + this.lblForderung, + this.xrLabel2, + this.lblAbrechnungszeitraum}); + this.Page1.HeightF = 464.9494F; + this.Page1.Name = "Page1"; + this.Page1.StylePriority.UseFont = false; + // + // xrLabel7 + // + this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(0F, 22.81758F); + 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(317F, 111.5F); + this.xrLabel7.StylePriority.UseFont = false; + this.xrLabel7.Text = "[RecipientOrganisation]\r\n[RecipientContactPerson]\r\n[RecipientDivision]\r\n[Recipien" + + "tStreet]\r\n[RecipientPostCodeAndTown]"; + // + // 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(367.0001F, 217.6081F); + this.xrLabel8.Name = "xrLabel8"; + this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel8.SizeF = new System.Drawing.SizeF(283F, 23F); + this.xrLabel8.StylePriority.UseTextAlignment = false; + this.xrLabel8.Text = "xrLabel8"; + this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + // + // xrTable2 + // + this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(367.0001F, 0F); + this.xrTable2.Name = "xrTable2"; + this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRow2, + this.xrTableRow5, + this.xrTableRow4, + this.xrTableRow3, + this.xrTableRow1, + this.xrTableRow6, + this.xrTableRow8}); + this.xrTable2.SizeF = new System.Drawing.SizeF(283F, 134F); + // + // xrTableRow2 + // + this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell4}); + this.xrTableRow2.Name = "xrTableRow2"; + this.xrTableRow2.Weight = 0.13245033112582783D; + // + // xrTableCell4 + // + this.xrTableCell4.CanShrink = true; + this.xrTableCell4.Name = "xrTableCell4"; + this.xrTableCell4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrTableCell4.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink; + this.xrTableCell4.StylePriority.UseFont = false; + this.xrTableCell4.StylePriority.UseTextAlignment = false; + this.xrTableCell4.Text = "Ihr(e) Ansprechpartner(in):"; + this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell4.Weight = 1D; + // + // xrTableRow5 + // + this.xrTableRow5.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell13}); + this.xrTableRow5.Name = "xrTableRow5"; + this.xrTableRow5.Weight = 0.13245033112582783D; + // + // xrTableCell13 + // + this.xrTableCell13.CanShrink = true; + this.xrTableCell13.Name = "xrTableCell13"; + this.xrTableCell13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrTableCell13.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink; + this.xrTableCell13.StylePriority.UseFont = false; + this.xrTableCell13.StylePriority.UseTextAlignment = false; + this.xrTableCell13.Text = "[SenderContactPerson]"; + this.xrTableCell13.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell13.Weight = 1D; + // + // xrTableRow4 + // + this.xrTableRow4.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell11}); + this.xrTableRow4.Name = "xrTableRow4"; + this.xrTableRow4.Weight = 0.13245033112582783D; + // + // xrTableCell11 + // + this.xrTableCell11.CanShrink = true; + this.xrTableCell11.Name = "xrTableCell11"; + this.xrTableCell11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrTableCell11.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink; + this.xrTableCell11.StylePriority.UseFont = false; + this.xrTableCell11.StylePriority.UseTextAlignment = false; + this.xrTableCell11.Text = "[SenderContactPersonDivision]"; + this.xrTableCell11.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell11.Weight = 1D; + // + // xrTableRow3 + // + this.xrTableRow3.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell8}); + this.xrTableRow3.Name = "xrTableRow3"; + this.xrTableRow3.Weight = 0.13245033112582783D; + // + // xrTableCell8 + // + this.xrTableCell8.CanShrink = true; + this.xrTableCell8.Name = "xrTableCell8"; + this.xrTableCell8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrTableCell8.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink; + this.xrTableCell8.StylePriority.UseFont = false; + this.xrTableCell8.StylePriority.UseTextAlignment = false; + this.xrTableCell8.Text = "[SenderContactPersonMail]"; + this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell8.Weight = 1D; + // + // xrTableRow1 + // + this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell1}); + this.xrTableRow1.Name = "xrTableRow1"; + this.xrTableRow1.Weight = 0.13245033112582783D; + // + // xrTableCell1 + // + this.xrTableCell1.CanShrink = true; + this.xrTableCell1.Name = "xrTableCell1"; + this.xrTableCell1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrTableCell1.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink; + this.xrTableCell1.StylePriority.UseFont = false; + this.xrTableCell1.StylePriority.UseTextAlignment = false; + this.xrTableCell1.Text = "[SenderContactPersonPhone]"; + this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell1.Weight = 1D; + // + // xrTableRow6 + // + this.xrTableRow6.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell2}); + this.xrTableRow6.Name = "xrTableRow6"; + this.xrTableRow6.Weight = 0.11258278145695365D; + // + // xrTableCell2 + // + this.xrTableCell2.CanShrink = true; + this.xrTableCell2.Name = "xrTableCell2"; + this.xrTableCell2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrTableCell2.ProcessNullValues = DevExpress.XtraReports.UI.ValueSuppressType.SuppressAndShrink; + this.xrTableCell2.StylePriority.UseFont = false; + this.xrTableCell2.StylePriority.UseTextAlignment = false; + this.xrTableCell2.Text = "[SenderContactPersonFax]"; + this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell2.Weight = 1D; + // + // xrTableRow8 + // + this.xrTableRow8.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell5}); + this.xrTableRow8.Name = "xrTableRow8"; + this.xrTableRow8.Weight = 0.11258278145695365D; + // + // xrTableCell5 + // + this.xrTableCell5.Name = "xrTableCell5"; + this.xrTableCell5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrTableCell5.Weight = 1D; + // + // lblForderung + // + this.lblForderung.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblForderung.LocationFloat = new DevExpress.Utils.PointFloat(0F, 423.6881F); + this.lblForderung.Multiline = true; + this.lblForderung.Name = "lblForderung"; + this.lblForderung.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblForderung.SizeF = new System.Drawing.SizeF(650F, 40.41666F); + this.lblForderung.StylePriority.UseFont = false; + this.lblForderung.Text = "Hieraus ergibt sich eine Forderung von ___ Std. x 61,40 EUR = ________ EUR."; + // + // xrLabel2 + // + this.xrLabel2.BackColor = System.Drawing.Color.Transparent; + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 257.2748F); + this.xrLabel2.Multiline = true; + this.xrLabel2.Name = "xrLabel2"; + this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel2.SizeF = new System.Drawing.SizeF(650F, 98.91333F); + this.xrLabel2.StylePriority.UseBackColor = false; + this.xrLabel2.StylePriority.UseFont = false; + this.xrLabel2.Text = resources.GetString("xrLabel2.Text"); + this.xrLabel2.WordWrap = false; + // + // lblAbrechnungszeitraum + // + this.lblAbrechnungszeitraum.LocationFloat = new DevExpress.Utils.PointFloat(0F, 356.1882F); + this.lblAbrechnungszeitraum.Multiline = true; + this.lblAbrechnungszeitraum.Name = "lblAbrechnungszeitraum"; + this.lblAbrechnungszeitraum.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.lblAbrechnungszeitraum.SizeF = new System.Drawing.SizeF(650.0001F, 67.49997F); + this.lblAbrechnungszeitraum.StylePriority.UseFont = false; + this.lblAbrechnungszeitraum.Text = "Im Zeitraum [AccountingPeriodStart!dd.MM.yyyy] bis [AccountingPeriodEnd!dd.MM.yyy" + + "y] wurden ____ Dienstleistungsstunden unmittelbare Betreuungsleistungen des Ambu" + + "lant Betreuten Wohnens erbracht.\r\n"; + // + // fieldMinuten + // + this.fieldMinuten.DataMember = "ServiceInvoicePeriods.ServiceInvoiceItems"; + this.fieldMinuten.Expression = "[UnitCount] * 60"; + this.fieldMinuten.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal; + this.fieldMinuten.Name = "fieldMinuten"; + // + // xrLabel15 + // + this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrLabel15.Multiline = true; + this.xrLabel15.Name = "xrLabel15"; + this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel15.SizeF = new System.Drawing.SizeF(650F, 136.7343F); + this.xrLabel15.StylePriority.UseFont = false; + this.xrLabel15.StylePriority.UseTextAlignment = false; + this.xrLabel15.Text = resources.GetString("xrLabel15.Text"); + this.xrLabel15.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopJustify; + // + // GroupFooter2 + // + this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel4, + this.xrLabel15}); + this.GroupFooter2.HeightF = 240.1258F; + this.GroupFooter2.Name = "GroupFooter2"; + // + // xrLabel4 + // + this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 199.7091F); + this.xrLabel4.Multiline = true; + this.xrLabel4.Name = "xrLabel4"; + this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel4.SizeF = new System.Drawing.SizeF(642F, 40.41669F); + this.xrLabel4.StylePriority.UseFont = false; + this.xrLabel4.Text = "Unterschrift und Stempel des Anbieters "; + // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO); + // + // xrLabel1 + // + this.xrLabel1.BackColor = System.Drawing.Color.Transparent; + this.xrLabel1.Font = new System.Drawing.Font("Verdana", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 217.6081F); + 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(262.4527F, 23F); + this.xrLabel1.StylePriority.UseBackColor = false; + this.xrLabel1.StylePriority.UseFont = false; + this.xrLabel1.Text = "Rechnungs-Nr. [InvoiceNumber]\n\n"; + this.xrLabel1.WordWrap = false; + // + // xrLabel3 + // + this.xrLabel3.Font = new System.Drawing.Font("Verdana", 7F); + this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrLabel3.Multiline = true; + this.xrLabel3.Name = "xrLabel3"; + this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel3.SizeF = new System.Drawing.SizeF(317F, 22.81758F); + this.xrLabel3.StylePriority.UseFont = false; + this.xrLabel3.StylePriority.UseTextAlignment = false; + this.xrLabel3.Text = "SKM Soziale Dienste e. V. - Heinrichsallee 56 - 52062 Aachen"; + this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + // + // RechnungBeWo67 + // + this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { + this.Detail, + this.ReportHeader, + this.topMarginBand1, + this.bottomMarginBand1, + this.Page1, + this.GroupFooter2}); + this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] { + this.fieldMinuten}); + this.DataSource = this.bindingSource1; + this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung"; + this.Font = new System.Drawing.Font("Verdana", 10F); + this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] { + this.ruleRateFactorNull}); + this.Margins = new System.Drawing.Printing.Margins(75, 75, 222, 71); + this.PageHeight = 1169; + this.PageWidth = 827; + this.PaperKind = System.Drawing.Printing.PaperKind.A4; + this.Version = "17.1"; + ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); + + } + + + private DevExpress.XtraReports.UI.DetailBand Detail; + private System.Windows.Forms.BindingSource bindingSource1; + private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader; + private DevExpress.XtraReports.UI.FormattingRule ruleRateFactorNull; + private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1; + private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1; + private DevExpress.XtraReports.UI.GroupHeaderBand Page1; + private DevExpress.XtraReports.UI.XRLabel xrLabel2; + private DevExpress.XtraReports.UI.XRLabel lblAbrechnungszeitraum; + private DevExpress.XtraReports.UI.CalculatedField fieldMinuten; + private DevExpress.XtraReports.UI.XRLabel lblForderung; + private DevExpress.XtraReports.UI.XRLabel xrLabel15; + private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter2; + private DevExpress.XtraReports.UI.XRLabel xrLabel4; + private DevExpress.XtraReports.UI.XRLabel xrLabel7; + private DevExpress.XtraReports.UI.XRLabel xrLabel8; + private DevExpress.XtraReports.UI.XRTable xrTable2; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell4; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow5; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell13; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow4; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell11; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow3; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell8; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow1; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow6; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow8; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; + private DevExpress.XtraReports.UI.XRLabel xrLabel3; + private DevExpress.XtraReports.UI.XRLabel xrLabel1; + } +} diff --git a/ReportImp/SKMAachen/RechnungBeWo67.cs b/ReportImp/SKMAachen/RechnungBeWo67.cs new file mode 100644 index 000000000..e26b2d941 --- /dev/null +++ b/ReportImp/SKMAachen/RechnungBeWo67.cs @@ -0,0 +1,64 @@ +using System; +using BeWo.Data.Access; +using BeWo.Data.Entities; +using BeWo.Report; +using BeWo.Report.ReportObjects; +using BS.Shared.Core; +using DevExpress.XtraReports.UI; + +namespace SKMAachen +{ + [IDSpecificClass(Identifier = "BeWo67")] + public partial class RechnungBeWo67 : XtraReport, IBeWoReport + { + public RechnungBeWo67() + { + this.InitializeComponent(); + } + + public void SetReportDataSource(ServiceInvoiceRO pRO) + { + decimal hourlyRate = 0; + decimal hours = 0; + if (pRO.ServiceInvoicePeriods != null && pRO.ServiceInvoicePeriods.Count > 0) + { + foreach (var p in pRO.ServiceInvoicePeriods) + { + + if (p.ServiceInvoiceItems != null && p.ServiceInvoiceItems.Count > 0) + { + + foreach (var i in p.ServiceInvoiceItems) + { + if (i.HourlyRate.HasValue) + { + hourlyRate = i.HourlyRate.Value; + + if (!String.IsNullOrEmpty(i.RateFactor)) + { + var rfStr = i.RateFactor.Replace("%", "").Replace(",00", "").Trim(); + int rfInt = 0; + Int32.TryParse(rfStr, out rfInt); + } + } + + if (i.Hours.HasValue) + { + hours += i.Hours.Value; + } + } + } + } + } + + lblForderung.Text = + String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00} EUR.", hours, hourlyRate, pRO.NetClaim); + + lblAbrechnungszeitraum.Text = + String.Format( + "Im Zeitraum vom {0:dd.MM.yyyy} bis {1:dd.MM.yyyy} wurden {2:0.00} Dienstleistungsstunden unmittelbare Betreuungsleistungen des Ambulant Betreuten Wohnens erbracht.", + pRO.AccountingPeriodStart, pRO.AccountingPeriodEnd, hours); + this.bindingSource1.DataSource = pRO; + } + } +} \ No newline at end of file diff --git a/ReportImp/SKMAachen/RechnungBeWo67.resx b/ReportImp/SKMAachen/RechnungBeWo67.resx new file mode 100644 index 000000000..3c8de1962 --- /dev/null +++ b/ReportImp/SKMAachen/RechnungBeWo67.resx @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Abrechnung über Dienstleistungsstunden im Ambulant Betreuten Wohnen nach § 67 SGB XII + + +Für: [CustomerName], geb. am [CustomerBirthdate!dd.MM.yyyy] + [CustomerStreet], [CustomerPostalCode] [CustomerTown] + AZ: [CustomerReferenceNumber] + + + Es wird ausdrücklich bestätigt, dass in den angegebenen Dienstleistungsstunden 40 Minuten unmittelbare Betreuungsleistungen sowie 20 Minuten komplementärer Leistungen im Sinne der Leistungs- und Prüfungs- sowie der Vergütungsvereinbarung enthalten sind. Alle gemachten Angaben können anhand der vorgehaltenen Quittierungsbelege sowie der Betreuungsdokumentation nachgewiesen werden. Es wird weiterhin bestätigt, dass die Verpflichtungen aus der Leistungs- und Prüfungs- sowie der Vergütungsvereinbarung eingehalten wurden. + + + 17, 17 + + \ No newline at end of file diff --git a/ReportImp/SKMAachen/SKMAachen.csproj b/ReportImp/SKMAachen/SKMAachen.csproj index 779cd0f2e..16bcb0b3e 100644 --- a/ReportImp/SKMAachen/SKMAachen.csproj +++ b/ReportImp/SKMAachen/SKMAachen.csproj @@ -50,6 +50,8 @@ + + Component @@ -69,6 +71,12 @@ MitarbeiterstundenkontoJahr.cs + + Component + + + RechnungBeWo67.cs + Component @@ -108,6 +116,11 @@ MitarbeiterstundenkontoJahr.cs Designer + + + RechnungBeWo67.cs + Designer + Teamstundenkonto.cs