diff --git a/ReportImp/Wabe/InvoiceCustomerReport.Designer.cs b/ReportImp/Wabe/InvoiceCustomerReport.Designer.cs index a081e4751..2ab44eae7 100644 --- a/ReportImp/Wabe/InvoiceCustomerReport.Designer.cs +++ b/ReportImp/Wabe/InvoiceCustomerReport.Designer.cs @@ -61,9 +61,9 @@ namespace BeWo.Report.DefaultReports this.xrTable5 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow13 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrTableCell27 = new DevExpress.XtraReports.UI.XRTableCell(); + this.lblBeginn = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell28 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell(); + this.lblEnde = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableRow15 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell30 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell31 = new DevExpress.XtraReports.UI.XRTableCell(); @@ -482,9 +482,9 @@ namespace BeWo.Report.DefaultReports // this.xrTableRow13.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { this.xrTableCell26, - this.xrTableCell27, + this.lblBeginn, this.xrTableCell28, - this.xrTableCell29}); + this.lblEnde}); this.xrTableRow13.Name = "xrTableRow13"; this.xrTableRow13.Weight = 0.8D; // @@ -497,17 +497,13 @@ namespace BeWo.Report.DefaultReports this.xrTableCell26.Text = "Betreuungsbeginn:"; this.xrTableCell26.Weight = 0.99764265628387494D; // - // xrTableCell27 + // lblBeginn // - this.xrTableCell27.Borders = DevExpress.XtraPrinting.BorderSide.Top; - this.xrTableCell27.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceBase.SupportConceptCostBearerRelDc.SupportConcept.Customer.AssistanceBegin" + - "")}); - this.xrTableCell27.Multiline = true; - this.xrTableCell27.Name = "xrTableCell27"; - this.xrTableCell27.StylePriority.UseBorders = false; - this.xrTableCell27.TextFormatString = "{0:dd.MM.yyyy}"; - this.xrTableCell27.Weight = 0.92674108091587715D; + this.lblBeginn.Borders = DevExpress.XtraPrinting.BorderSide.Top; + this.lblBeginn.Multiline = true; + this.lblBeginn.Name = "lblBeginn"; + this.lblBeginn.StylePriority.UseBorders = false; + this.lblBeginn.Weight = 0.92674108091587715D; // // xrTableCell28 // @@ -518,17 +514,13 @@ namespace BeWo.Report.DefaultReports this.xrTableCell28.Text = "Betreuungsende:"; this.xrTableCell28.Weight = 0.76716698845779019D; // - // xrTableCell29 + // lblEnde // - this.xrTableCell29.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right))); - this.xrTableCell29.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { - new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceBase.SupportConceptCostBearerRelDc.SupportConcept.Customer.TerminationDate" + - "")}); - this.xrTableCell29.Multiline = true; - this.xrTableCell29.Name = "xrTableCell29"; - this.xrTableCell29.StylePriority.UseBorders = false; - this.xrTableCell29.TextFormatString = "{0:dd.MM.yyyy}"; - this.xrTableCell29.Weight = 1.3104210410959809D; + this.lblEnde.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right))); + this.lblEnde.Multiline = true; + this.lblEnde.Name = "lblEnde"; + this.lblEnde.StylePriority.UseBorders = false; + this.lblEnde.Weight = 1.3104210410959809D; // // xrTableRow15 // @@ -849,9 +841,9 @@ namespace BeWo.Report.DefaultReports private DevExpress.XtraReports.UI.XRTable xrTable5; private DevExpress.XtraReports.UI.XRTableRow xrTableRow13; private DevExpress.XtraReports.UI.XRTableCell xrTableCell26; - private DevExpress.XtraReports.UI.XRTableCell xrTableCell27; + private DevExpress.XtraReports.UI.XRTableCell lblBeginn; private DevExpress.XtraReports.UI.XRTableCell xrTableCell28; - private DevExpress.XtraReports.UI.XRTableCell xrTableCell29; + private DevExpress.XtraReports.UI.XRTableCell lblEnde; private DevExpress.XtraReports.UI.XRTableRow xrTableRow15; private DevExpress.XtraReports.UI.XRTableCell xrTableCell30; private DevExpress.XtraReports.UI.XRTableCell xrTableCell31; diff --git a/ReportImp/Wabe/InvoiceCustomerReport.cs b/ReportImp/Wabe/InvoiceCustomerReport.cs index e203b1bb1..99682812a 100644 --- a/ReportImp/Wabe/InvoiceCustomerReport.cs +++ b/ReportImp/Wabe/InvoiceCustomerReport.cs @@ -1,5 +1,7 @@ using System; using System.Text; +using BeWo.Data.Access; +using BeWo.Data.Entities; using BeWo.Report.ReportObjects; namespace BeWo.Report.DefaultReports @@ -43,9 +45,19 @@ namespace BeWo.Report.DefaultReports } lblAddress.Text = sb.ToString(); - - - + Customer c = null; + if (pRO.InvoiceBase.RecipientCustomerOid.HasValue) + { + c = DAOFactory.GenericDAO.LoadByID(pRO.InvoiceBase.RecipientCustomerOid.Value); + if (c.AssistanceBegin.HasValue) + { + lblBeginn.Text = String.Format("{0:dd.MM.yyyy}", c.AssistanceBegin.Value); + } + if (c.TerminationDate.HasValue) + { + lblEnde.Text = String.Format("{0:dd.MM.yyyy}", c.TerminationDate.Value); + } + } this.bindingSource1.DataSource = pRO; } diff --git a/ReportImp/Wabe/Invoicing/CollectiveInvoiceCreation.cs b/ReportImp/Wabe/Invoicing/CollectiveInvoiceCreation.cs index 300e23b09..0f4aa9c43 100644 --- a/ReportImp/Wabe/Invoicing/CollectiveInvoiceCreation.cs +++ b/ReportImp/Wabe/Invoicing/CollectiveInvoiceCreation.cs @@ -189,10 +189,10 @@ namespace Wabe.Invoicing if (equity > 0) { var ii = new InvoiceItem(); - ii.UnitCount = 1; + ii.UnitCount = serviceInvoicePeriod.End.Value.Month - serviceInvoicePeriod.Start.Value.Month + 1; ii.AmountPerUnit = equity; - ii.AmountTotal = -equity; - ii.GrossAmountTotal = -equity; + ii.AmountTotal = -equity * ii.UnitCount; + ii.GrossAmountTotal = -equity * ii.UnitCount; ii.ItemPeriodStart = serviceInvoicePeriod.End.Value; ii.Notice = "Eigenanteil"; ii.SupportConceptApprovalPeriodOid = scap.SupportConceptApprovalPeriodOid; diff --git a/ReportImp/Wabe/Invoicing/CustomInvoiceFactory.cs b/ReportImp/Wabe/Invoicing/CustomInvoiceFactory.cs index 38ca19ada..d6b9163fd 100644 --- a/ReportImp/Wabe/Invoicing/CustomInvoiceFactory.cs +++ b/ReportImp/Wabe/Invoicing/CustomInvoiceFactory.cs @@ -18,7 +18,8 @@ namespace Wabe.Invoicing foreach (var sr in list) { - if (sr.CostBearer != null && sr.CostBearer.Name.Contains("Bezirk Mittelfranken")) + if (sr.CostBearer != null && sr.CostBearer.Name.Contains("Bezirk Mittelfranken") || sr.CostBearer.Name.Contains("Oberpfalz") || + sr.CostBearer.Name.Contains("Oberfranken")) { return new CollectiveInvoiceCreation(); } diff --git a/ReportImp/Wabe/RechnungBezirkDetail.Designer.cs b/ReportImp/Wabe/RechnungBezirkDetail.Designer.cs index e87d242a1..df1e8a709 100644 --- a/ReportImp/Wabe/RechnungBezirkDetail.Designer.cs +++ b/ReportImp/Wabe/RechnungBezirkDetail.Designer.cs @@ -85,7 +85,9 @@ namespace Wabe this.xrTableCell30 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell31 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell32 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell33 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell35 = new DevExpress.XtraReports.UI.XRTableCell(); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); this.Month = new DevExpress.XtraReports.UI.CalculatedField(); this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand(); this.lblMonate = new DevExpress.XtraReports.UI.XRLabel(); @@ -93,8 +95,6 @@ namespace Wabe this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); this.lblQuartal = new DevExpress.XtraReports.UI.XRLabel(); this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo(); - this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); - this.xrTableCell33 = new DevExpress.XtraReports.UI.XRTableCell(); ((System.ComponentModel.ISupportInitialize)(this.xrTable4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable6)).BeginInit(); @@ -422,6 +422,8 @@ namespace Wabe new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); this.Detail1.HeightF = 20F; this.Detail1.Name = "Detail1"; + this.Detail1.SortFields.AddRange(new DevExpress.XtraReports.UI.GroupField[] { + new DevExpress.XtraReports.UI.GroupField("Customer.LastNameFirstName", DevExpress.XtraReports.UI.XRColumnSortOrder.Ascending)}); this.Detail1.StylePriority.UseFont = false; // // xrTable6 @@ -822,6 +824,19 @@ namespace Wabe this.xrTableCell32.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell32.Weight = 0.12071458341863628D; // + // xrTableCell33 + // + this.xrTableCell33.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); + this.xrTableCell33.Font = new DevExpress.Drawing.DXFont("Calibri", 11.25F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { + new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); + this.xrTableCell33.Name = "xrTableCell33"; + this.xrTableCell33.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrTableCell33.StylePriority.UseBorders = false; + this.xrTableCell33.StylePriority.UseFont = false; + this.xrTableCell33.StylePriority.UseTextAlignment = false; + this.xrTableCell33.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; + this.xrTableCell33.Weight = 0.12071460700641684D; + // // xrTableCell35 // this.xrTableCell35.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) @@ -838,6 +853,10 @@ namespace Wabe this.xrTableCell35.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; this.xrTableCell35.Weight = 0.12071459124064184D; // + // bindingSource1 + // + this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO); + // // Month // this.Month.FieldType = DevExpress.XtraReports.UI.FieldType.DateTime; @@ -933,23 +952,6 @@ namespace Wabe this.xrPageInfo1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; this.xrPageInfo1.TextFormatString = "Seite {0}"; // - // bindingSource1 - // - this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO); - // - // xrTableCell33 - // - this.xrTableCell33.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); - this.xrTableCell33.Font = new DevExpress.Drawing.DXFont("Calibri", 11.25F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] { - new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))}); - this.xrTableCell33.Name = "xrTableCell33"; - this.xrTableCell33.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrTableCell33.StylePriority.UseBorders = false; - this.xrTableCell33.StylePriority.UseFont = false; - this.xrTableCell33.StylePriority.UseTextAlignment = false; - this.xrTableCell33.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight; - this.xrTableCell33.Weight = 0.12071460700641684D; - // // SammelrechnungBezirkDetail // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {