diff --git a/ReportImp/VereinZurIntegrationChemnitz/Invoicing/ABW67InvoiceCreation.cs b/ReportImp/VereinZurIntegrationChemnitz/Invoicing/ABW67InvoiceCreation.cs new file mode 100644 index 000000000..d34a0bdc4 --- /dev/null +++ b/ReportImp/VereinZurIntegrationChemnitz/Invoicing/ABW67InvoiceCreation.cs @@ -0,0 +1,14 @@ +using BeWo.Data.Entities; +using BeWo.Service.Invoicing; + +namespace VereinZurIntegrationChemnitz.Invoicing +{ + public class ABW67InvoiceCreation : InvoiceCreation + { + public override void SetInvoiceId(ServiceInvoice invoice) + { + invoice.InvoiceBase.InvoiceId = "RechnungABW67"; + invoice.InvoiceBase.InvoiceTypeText = "Abrechnung BW67-69"; + } + } +} \ No newline at end of file diff --git a/ReportImp/VereinZurIntegrationChemnitz/Invoicing/CustomInvoiceFactory.cs b/ReportImp/VereinZurIntegrationChemnitz/Invoicing/CustomInvoiceFactory.cs index 96bc0fe2b..e463b16e7 100644 --- a/ReportImp/VereinZurIntegrationChemnitz/Invoicing/CustomInvoiceFactory.cs +++ b/ReportImp/VereinZurIntegrationChemnitz/Invoicing/CustomInvoiceFactory.cs @@ -25,7 +25,9 @@ namespace VereinZurIntegrationChemnitz.Invoicing } else if (cat.Name.ToLower().Contains("einfache pauschale") || cat.Name.ToLower().Contains("doppelte pauschale")) return new WBWInvoiceCreation(); - } + else if (cat.Name.ToLower().Contains("bw 67-69")) + return new ABW67InvoiceCreation(); + } } return base.CreateInvoiceCreator(specificId, tenant, supportConcepts2ServiceRecords); diff --git a/ReportImp/VereinZurIntegrationChemnitz/Invoicing/WBWInvoiceCreation.cs b/ReportImp/VereinZurIntegrationChemnitz/Invoicing/WBWInvoiceCreation.cs index a63a57f96..3ae600b18 100644 --- a/ReportImp/VereinZurIntegrationChemnitz/Invoicing/WBWInvoiceCreation.cs +++ b/ReportImp/VereinZurIntegrationChemnitz/Invoicing/WBWInvoiceCreation.cs @@ -1,4 +1,6 @@ +using BeWo.Data.Access; using BeWo.Data.Entities; +using BeWo.Service.DCEntityMapper; using BeWo.Service.Invoicing; using BS.Shared.Core; using BS.Shared.DataContracts; @@ -18,6 +20,58 @@ namespace VereinZurIntegrationChemnitz.Invoicing invoice.InvoiceBase.InvoiceId = "RechnungWBW"; invoice.InvoiceBase.InvoiceTypeText = "Abrechnung wbW"; } + + // Immer CreateCollectiveBilling + public override List GenerateServiceInvoices(long costBearerOid, + DateTimeSpan invoicePeriod, + Dictionary> supportConcepts2ServiceRecords, bool splitInvoices) + { + var costBearer = DAOFactory.GenericDAO.LoadByID(costBearerOid); + var invoiceList = new List(); + + var invoiceCounter = 0; + ServiceInvoice invoice; + + //if (costBearer.IsSingleInvoicePerCustomer) + //{ + invoice = CreateCollectiveBilling(costBearer, invoicePeriod, supportConcepts2ServiceRecords); + if (invoice != null) + { + invoiceList.Add(invoice); + } + //} + //else + //{ + // foreach (var iSupportConcept2ServiceRecords in supportConcepts2ServiceRecords) + // { + // invoice = CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, iSupportConcept2ServiceRecords.Key, iSupportConcept2ServiceRecords.Value); + // if (invoice != null) + // { + // if (splitInvoices && invoice.ServiceInvoicePeriodList.Count > 1 + // && !invoice.ServiceInvoicePeriodList.Any(s => s.Start == invoicePeriod.StartDate && s.End == invoicePeriod.EndDate)) + // { + // foreach (var sip in invoice.ServiceInvoicePeriodList) + // { + // DateTimeSpan invPeriod = invoicePeriod; + // invPeriod.StartDate = sip.Start.Value; + // invPeriod.EndDate = sip.End.Value; + // var partInvoice = CreateSingleInvoice(invoiceCounter, costBearer, invPeriod, iSupportConcept2ServiceRecords.Key, iSupportConcept2ServiceRecords.Value); + // partInvoice.ServiceInvoicePeriodList.Add(sip); + // invoiceList.Add(partInvoice); + // invoiceCounter++; + // } + // } + // else + // { + // invoiceList.Add(invoice); + // invoiceCounter++; + // } + // } + // } + //} + var result = invoiceList.Select(item => MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(item)).ToList(); + return result.Count > 1 ? result.OrderBy(i => i.InvoiceBase.CustomerLastName).ToList() : result; + } // Claude: Die Basis ruft SetAmountEquityContribution in der Sammelrechnung nie auf // (in CreateSingleInvoice nur bei der Spitzabrechnung). Hier muss der Eigenanteil immer gesetzt werden. public override ServiceInvoice CreateCollectiveBilling(CostBearer costBearer, DateTimeSpan invoicePeriod, Dictionary> supportConcepts2ServiceRecords) @@ -26,12 +80,128 @@ namespace VereinZurIntegrationChemnitz.Invoicing if (invoice != null) { + // Claude: Eigenanteil vor dem Zusammenfassen ermitteln, da dafür die monatlichen Perioden gebraucht werden. SetAmountEquityContribution(invoice); + MergeMonthlyItemsPerCustomer(invoice); } return invoice; } + // Claude: Die Basis erzeugt je Pauschalmonat eine eigene Periode bzw. Position. Auf der Rechnung + // soll pro Klient nur eine Position stehen: UnitCount = Anzahl der Pauschalmonate, + // AmountPerUnit = die monatliche Pauschale. + public virtual void MergeMonthlyItemsPerCustomer(ServiceInvoice invoice) + { + var customerOrder = new List(); + var customer2Periods = new Dictionary>(); + + foreach (ServiceInvoicePeriod period in invoice.ServiceInvoicePeriodList) + { + if (period.Customer == null || !period.Customer.Oid.HasValue) + continue; + + var customerOid = period.Customer.Oid.Value; + if (!customer2Periods.ContainsKey(customerOid)) + { + customer2Periods.Add(customerOid, new List()); + customerOrder.Add(customerOid); + } + + customer2Periods[customerOid].Add(period); + } + + foreach (var customerOid in customerOrder) + { + var periods = customer2Periods[customerOid]; + var items = periods.SelectMany(p => p.InvoiceItemList).ToList(); + if (items.Count == 0) + continue; + + // Claude: ItemDescription wird hier autoritativ gesetzt (statt nur vom ursprünglichen + // Item übernommen), da SetInvoiceItems im Sammelrechnungs-Pfad nicht zuverlässig vor + // dem Zusammenfassen greift. + var customer = periods.Select(p => p.Customer).FirstOrDefault(c => c != null); + var referenceNumber = customer != null ? customer.ReferenceNumber : null; + + // Ändert sich die Pauschale im Abrechnungszeitraum, entsteht je Pauschalhöhe eine Position. + var rateOrder = new List(); + var rate2Item = new Dictionary(); + + foreach (InvoiceItem item in items) + { + var rate = GetMonthlyRate(item); + var units = item.UnitCount.HasValue && item.UnitCount.Value != 0 ? item.UnitCount.Value : 1; + + InvoiceItem merged; + if (!rate2Item.TryGetValue(rate, out merged)) + { + merged = new InvoiceItem + { + ItemDescription = !String.IsNullOrEmpty(referenceNumber) ? referenceNumber : item.ItemDescription, + AccountingInterval = item.AccountingInterval, + AmountPerUnit = rate, + UnitCount = 0, + ItemPeriodStart = item.ItemPeriodStart, + ItemPeriodEnd = item.ItemPeriodEnd, + UnitDescription = item.UnitDescription, + }; + + rate2Item.Add(rate, merged); + rateOrder.Add(rate); + } + + merged.UnitCount += units; + + if (item.ItemPeriodStart.HasValue && (!merged.ItemPeriodStart.HasValue || item.ItemPeriodStart < merged.ItemPeriodStart)) + merged.ItemPeriodStart = item.ItemPeriodStart; + if (item.ItemPeriodEnd.HasValue && (!merged.ItemPeriodEnd.HasValue || item.ItemPeriodEnd > merged.ItemPeriodEnd)) + merged.ItemPeriodEnd = item.ItemPeriodEnd; + } + + // Alle Positionen des Klienten landen in seiner ersten Periode, die übrigen entfallen. + var target = periods[0]; + decimal claim = 0; + + target.InvoiceItemList.Clear(); + foreach (var rate in rateOrder) + { + var merged = rate2Item[rate]; + merged.AmountTotal = merged.AmountPerUnit * merged.UnitCount; + merged.GrossAmountTotal = merged.AmountTotal; + + target.InvoiceItemList.Add(merged); + claim += merged.GrossAmountTotal.Value; + } + + if (periods.Any(p => p.Start.HasValue)) + target.Start = periods.Where(p => p.Start.HasValue).Min(p => p.Start); + if (periods.Any(p => p.End.HasValue)) + target.End = periods.Where(p => p.End.HasValue).Max(p => p.End); + + // Claim direkt setzen, da SetServiceInvoicePeriodAmounts bereits gelaufen ist. + target.Claim = Math.Round(claim, 2, MidpointRounding.AwayFromZero); + + for (int i = periods.Count - 1; i >= 1; i--) + { + periods[i].InvoiceItemList.Clear(); + invoice.ServiceInvoicePeriodList.Remove(periods[i]); + } + } + } + + // Claude: Die monatlichen Positionen aus GetFixedBillingData haben nur AmountTotal gesetzt, + // die Pauschale steckt dort also im Gesamtbetrag der Position. + private decimal GetMonthlyRate(InvoiceItem item) + { + if (item.AmountPerUnit.HasValue && item.AmountPerUnit.Value != 0) + return item.AmountPerUnit.Value; + if (item.GrossAmountTotal.HasValue) + return item.GrossAmountTotal.Value; + + return item.AmountTotal ?? 0; + } + // Claude: In den Rechnungspositionen soll als Bezeichnung das Aktenzeichen // (ReferenceNumber) des jeweiligen Klienten stehen. public override void SetInvoiceItems(ServiceInvoice invoice, @@ -47,12 +217,21 @@ namespace VereinZurIntegrationChemnitz.Invoicing if (customer == null && cb2sc != null && cb2sc.SupportConcept != null) customer = cb2sc.SupportConcept.Customer; - if (customer == null || String.IsNullOrEmpty(customer.ReferenceNumber)) + if (serviceInvoicePeriod.Customer == null) return; + string referencenumber = ""; + foreach (var c2cb in serviceInvoicePeriod.Customer.Customer2CostBearerList) + { + if (c2cb.CostBearer.Organisation.Name == invoice.InvoiceBase.RecipientOrganisation) + { + referencenumber = c2cb.ReferenceNumber; + } + } + foreach (InvoiceItem item in serviceInvoicePeriod.InvoiceItemList) { - item.ItemDescription = customer.ReferenceNumber; + item.ItemDescription = referencenumber ?? ""; } } diff --git a/ReportImp/VereinZurIntegrationChemnitz/RechnungABW67.cs b/ReportImp/VereinZurIntegrationChemnitz/RechnungABW67.cs index 2cca04c55..2cc40e753 100644 --- a/ReportImp/VereinZurIntegrationChemnitz/RechnungABW67.cs +++ b/ReportImp/VereinZurIntegrationChemnitz/RechnungABW67.cs @@ -8,7 +8,7 @@ using System.Text; namespace VereinZurIntegrationChemnitz { - //[IDSpecificClass(Identifiers = new string[] { "RechnungABW67" })] + [IDSpecificClass(Identifiers = new string[] { "RechnungABW67" })] public partial class RechnungABW67 : XtraReport, IBeWoReport { public RechnungABW67() diff --git a/ReportImp/VereinZurIntegrationChemnitz/RechnungWBW.Designer.cs b/ReportImp/VereinZurIntegrationChemnitz/RechnungWBW.Designer.cs index 23e83312d..0cd18ec4c 100644 --- a/ReportImp/VereinZurIntegrationChemnitz/RechnungWBW.Designer.cs +++ b/ReportImp/VereinZurIntegrationChemnitz/RechnungWBW.Designer.cs @@ -36,7 +36,11 @@ namespace BeWo.Report.DefaultReports this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule(); this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); - this.GroupFooter = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.GroupFooterEigenanteil = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); + this.xrRichText1 = new DevExpress.XtraReports.UI.XRRichText(); this.ruleNoticeNull = new DevExpress.XtraReports.UI.FormattingRule(); this.Page1 = new DevExpress.XtraReports.UI.GroupHeaderBand(); this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); @@ -53,17 +57,19 @@ namespace BeWo.Report.DefaultReports this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); - this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell(); - this.GroupFooterEigenanteil = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); + this.xrTable2 = new DevExpress.XtraReports.UI.XRTable(); + this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow(); + this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell(); + this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell(); this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); - this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); - this.xrRichText1 = new DevExpress.XtraReports.UI.XRRichText(); - ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail @@ -96,14 +102,55 @@ namespace BeWo.Report.DefaultReports this.bottomMarginBand1.HeightF = 115.5835F; this.bottomMarginBand1.Name = "bottomMarginBand1"; // - // GroupFooter + // GroupFooterEigenanteil // - this.GroupFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { - this.xrLabel5, - this.xrLabel4, - this.xrRichText1}); - this.GroupFooter.HeightF = 250.8748F; - this.GroupFooter.Name = "GroupFooter"; + this.GroupFooterEigenanteil.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel1}); + this.GroupFooterEigenanteil.HeightF = 81.99978F; + this.GroupFooterEigenanteil.Name = "GroupFooterEigenanteil"; + // + // xrLabel1 + // + this.xrLabel1.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 21.66665F); + 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(625F, 50.33315F); + this.xrLabel1.StylePriority.UseFont = false; + this.xrLabel1.Text = "In Summe ergibt das einen Gesamtbetrag von [GrossClaim].\r\nAbzuziehen sind alle ge" + + "leisteten Eigenanteile in Höhe von ingesamt [AmountEquityContribution]."; + // + // xrLabel5 + // + this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 109.7083F); + this.xrLabel5.Name = "xrLabel5"; + this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrLabel5.SizeF = new System.Drawing.SizeF(175F, 17F); + this.xrLabel5.StylePriority.UseFont = false; + this.xrLabel5.Text = "Mit freundlichen Grüßen"; + // + // xrLabel4 + // + this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 172.6249F); + 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(225F, 46.16666F); + this.xrLabel4.StylePriority.UseFont = false; + this.xrLabel4.Text = "Vincenz\r\nGeschäftsführender Vorstand"; + // + // xrRichText1 + // + this.xrRichText1.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrRichText1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F); + this.xrRichText1.Name = "xrRichText1"; + this.xrRichText1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); + this.xrRichText1.SerializableRtfString = resources.GetString("xrRichText1.SerializableRtfString"); + this.xrRichText1.SizeF = new System.Drawing.SizeF(642F, 109.7083F); + this.xrRichText1.StylePriority.UseFont = false; // // ruleNoticeNull // @@ -114,13 +161,14 @@ namespace BeWo.Report.DefaultReports // Page1 // this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrTable2, this.xrLabel8, this.lblAnrede, this.xrLabel2, this.lblAdresse, this.xrLabel3}); this.Page1.Font = new DevExpress.Drawing.DXFont("Verdana", 10F); - this.Page1.HeightF = 386.25F; + this.Page1.HeightF = 424.4167F; this.Page1.Name = "Page1"; this.Page1.StylePriority.UseFont = false; // @@ -129,7 +177,7 @@ namespace BeWo.Report.DefaultReports this.xrLabel8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceDate")}); this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Arial", 8F); - this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(359F, 241.6251F); + this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(359F, 247.8751F); this.xrLabel8.Name = "xrLabel8"; this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel8.SizeF = new System.Drawing.SizeF(266F, 23F); @@ -141,7 +189,7 @@ namespace BeWo.Report.DefaultReports // lblAnrede // this.lblAnrede.Font = new DevExpress.Drawing.DXFont("Arial", 10F); - this.lblAnrede.LocationFloat = new DevExpress.Utils.PointFloat(0F, 299.4168F); + this.lblAnrede.LocationFloat = new DevExpress.Utils.PointFloat(0F, 312.9585F); this.lblAnrede.Name = "lblAnrede"; this.lblAnrede.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.lblAnrede.SizeF = new System.Drawing.SizeF(292F, 17F); @@ -153,13 +201,13 @@ namespace BeWo.Report.DefaultReports this.xrLabel2.BackColor = System.Drawing.Color.Transparent; this.xrLabel2.CanShrink = true; this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); - this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 264.6251F); + this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 282.3334F); this.xrLabel2.Name = "xrLabel2"; this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel2.SizeF = new System.Drawing.SizeF(625F, 20F); this.xrLabel2.StylePriority.UseBackColor = false; this.xrLabel2.StylePriority.UseFont = false; - this.xrLabel2.Text = "Rechnung Nr. [InvoiceNumber] ABW §§67-69 SGB XII"; + this.xrLabel2.Text = "Rechnung Nr. [InvoiceNumber] weitere besondere Wohnform"; this.xrLabel2.WordWrap = false; // // lblAdresse @@ -177,7 +225,7 @@ namespace BeWo.Report.DefaultReports // xrLabel3 // this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F); - this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 335.2083F); + this.xrLabel3.LocationFloat = new DevExpress.Utils.PointFloat(0F, 348.75F); this.xrLabel3.Multiline = true; this.xrLabel3.Name = "xrLabel3"; this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); @@ -206,8 +254,7 @@ namespace BeWo.Report.DefaultReports // DetailReport2 // this.DetailReport2.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { - this.Detail3, - this.GroupFooterEigenanteil}); + this.Detail3}); this.DetailReport2.DataMember = "ServiceInvoicePeriods.ServiceInvoiceItems"; this.DetailReport2.DataSource = this.bindingSource1; this.DetailReport2.Level = 0; @@ -227,7 +274,7 @@ namespace BeWo.Report.DefaultReports this.xrTable1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F); this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow1}); - this.xrTable1.SizeF = new System.Drawing.SizeF(627F, 25F); + this.xrTable1.SizeF = new System.Drawing.SizeF(605.9161F, 25F); // // xrTableRow1 // @@ -235,7 +282,6 @@ namespace BeWo.Report.DefaultReports this.xrTableCell5, this.xrTableCell6, this.xrTableCell1, - this.xrTableCell2, this.xrTableCell4}); this.xrTableRow1.Name = "xrTableRow1"; this.xrTableRow1.Weight = 1D; @@ -247,9 +293,9 @@ namespace BeWo.Report.DefaultReports this.xrTableCell5.Name = "xrTableCell5"; this.xrTableCell5.StylePriority.UseFont = false; this.xrTableCell5.StylePriority.UseTextAlignment = false; - this.xrTableCell5.Text = "[CustomerLastname], [CustomerFirstname]"; - this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell5.Weight = 0.78164370769484037D; + this.xrTableCell5.Text = "[ServiceInvoicePeriods.Customer.FullName]"; + this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell5.Weight = 0.6377066198113055D; // // xrTableCell6 // @@ -260,8 +306,9 @@ namespace BeWo.Report.DefaultReports this.xrTableCell6.Name = "xrTableCell6"; this.xrTableCell6.StylePriority.UseFont = false; this.xrTableCell6.StylePriority.UseTextAlignment = false; - this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; - this.xrTableCell6.Weight = 0.48384256795416708D; + this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell6.TextFormatString = "{0}"; + this.xrTableCell6.Weight = 0.56821943516009754D; // // xrTableCell1 // @@ -272,20 +319,9 @@ namespace BeWo.Report.DefaultReports this.xrTableCell1.Name = "xrTableCell1"; this.xrTableCell1.StylePriority.UseFont = false; this.xrTableCell1.StylePriority.UseTextAlignment = false; - this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; + this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell1.TextFormatString = "{0:0.##}"; - this.xrTableCell1.Weight = 0.70959156124086276D; - // - // xrTableCell2 - // - this.xrTableCell2.Font = new DevExpress.Drawing.DXFont("Arial", 10F); - this.xrTableCell2.Multiline = true; - this.xrTableCell2.Name = "xrTableCell2"; - this.xrTableCell2.StylePriority.UseFont = false; - this.xrTableCell2.StylePriority.UseTextAlignment = false; - this.xrTableCell2.Text = "x"; - this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; - this.xrTableCell2.Weight = 0.14513098773775243D; + this.xrTableCell1.Weight = 0.67981149542847186D; // // xrTableCell4 // @@ -297,63 +333,97 @@ namespace BeWo.Report.DefaultReports this.xrTableCell4.StylePriority.UseFont = false; this.xrTableCell4.StylePriority.UseTextAlignment = false; this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; - this.xrTableCell4.TextFormatString = "{0:0.00}"; - this.xrTableCell4.Weight = 0.86733002111200941D; + this.xrTableCell4.TextFormatString = "{0:c}"; + this.xrTableCell4.Weight = 1.0013404458457194D; // - // GroupFooterEigenanteil + // GroupFooter1 // - this.GroupFooterEigenanteil.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { - this.xrLabel1}); - this.GroupFooterEigenanteil.HeightF = 44.12505F; - this.GroupFooterEigenanteil.Name = "GroupFooterEigenanteil"; + this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { + this.xrLabel5, + this.xrLabel4, + this.xrRichText1}); + this.GroupFooter1.HeightF = 218.7915F; + this.GroupFooter1.Level = 1; + this.GroupFooter1.Name = "GroupFooter1"; + // + // xrTable2 + // + this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 399.4167F); + this.xrTable2.Name = "xrTable2"; + this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F); + this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { + this.xrTableRow2}); + this.xrTable2.SizeF = new System.Drawing.SizeF(591.3328F, 25F); + // + // xrTableRow2 + // + this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { + this.xrTableCell3, + this.xrTableCell7, + this.xrTableCell8, + this.xrTableCell10}); + this.xrTableRow2.Name = "xrTableRow2"; + this.xrTableRow2.Weight = 1D; + // + // xrTableCell3 + // + this.xrTableCell3.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; + this.xrTableCell3.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrTableCell3.Multiline = true; + this.xrTableCell3.Name = "xrTableCell3"; + this.xrTableCell3.StylePriority.UseBorders = false; + this.xrTableCell3.StylePriority.UseFont = false; + this.xrTableCell3.StylePriority.UseTextAlignment = false; + this.xrTableCell3.Text = "Name"; + this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell3.Weight = 0.6377066198113055D; + // + // xrTableCell7 + // + this.xrTableCell7.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; + this.xrTableCell7.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrTableCell7.Multiline = true; + this.xrTableCell7.Name = "xrTableCell7"; + this.xrTableCell7.StylePriority.UseBorders = false; + this.xrTableCell7.StylePriority.UseFont = false; + this.xrTableCell7.StylePriority.UseTextAlignment = false; + this.xrTableCell7.Text = "Aktenzeichen"; + this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell7.TextFormatString = ", {0}"; + this.xrTableCell7.Weight = 0.56821943516009754D; + // + // xrTableCell8 + // + this.xrTableCell8.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; + this.xrTableCell8.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrTableCell8.Multiline = true; + this.xrTableCell8.Name = "xrTableCell8"; + this.xrTableCell8.StylePriority.UseBorders = false; + this.xrTableCell8.StylePriority.UseFont = false; + this.xrTableCell8.StylePriority.UseTextAlignment = false; + this.xrTableCell8.Text = "Anz. Pauschalen"; + this.xrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; + this.xrTableCell8.TextFormatString = "{0:0.##}"; + this.xrTableCell8.Weight = 0.67981130425275083D; + // + // xrTableCell10 + // + this.xrTableCell10.Borders = DevExpress.XtraPrinting.BorderSide.Bottom; + this.xrTableCell10.Font = new DevExpress.Drawing.DXFont("Arial", 10F); + this.xrTableCell10.Multiline = true; + this.xrTableCell10.Name = "xrTableCell10"; + this.xrTableCell10.StylePriority.UseBorders = false; + this.xrTableCell10.StylePriority.UseFont = false; + this.xrTableCell10.StylePriority.UseTextAlignment = false; + this.xrTableCell10.Text = "Betrag Pauschale"; + this.xrTableCell10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; + this.xrTableCell10.TextFormatString = "{0:0.00}"; + this.xrTableCell10.Weight = 0.93185368866246754D; // // bindingSource1 // this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO); // - // xrLabel1 - // - this.xrLabel1.Font = new DevExpress.Drawing.DXFont("Arial", 10F); - this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 11.87477F); - 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(625F, 23F); - this.xrLabel1.StylePriority.UseFont = false; - this.xrLabel1.Text = "Abzuziehen sind alle geleisteten Eigenanteile in Höhe von ingesamt [AmountEquityC" + - "ontribution]."; - // - // xrLabel5 - // - this.xrLabel5.Font = new DevExpress.Drawing.DXFont("Arial", 10F); - this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(0F, 141.7916F); - this.xrLabel5.Name = "xrLabel5"; - this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrLabel5.SizeF = new System.Drawing.SizeF(175F, 17F); - this.xrLabel5.StylePriority.UseFont = false; - this.xrLabel5.Text = "Mit freundlichen Grüßen"; - // - // xrLabel4 - // - this.xrLabel4.Font = new DevExpress.Drawing.DXFont("Arial", 10F); - this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 204.7082F); - 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(225F, 46.16666F); - this.xrLabel4.StylePriority.UseFont = false; - this.xrLabel4.Text = "Vincenz\r\nGeschäftsführender Vorstand"; - // - // xrRichText1 - // - this.xrRichText1.Font = new DevExpress.Drawing.DXFont("Arial", 10F); - this.xrRichText1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 32.0833F); - this.xrRichText1.Name = "xrRichText1"; - this.xrRichText1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); - this.xrRichText1.SerializableRtfString = resources.GetString("xrRichText1.SerializableRtfString"); - this.xrRichText1.SizeF = new System.Drawing.SizeF(642F, 109.7083F); - this.xrRichText1.StylePriority.UseFont = false; - // // Sammelrechnung // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { @@ -361,9 +431,10 @@ namespace BeWo.Report.DefaultReports this.ReportHeader, this.topMarginBand1, this.bottomMarginBand1, - this.GroupFooter, + this.GroupFooterEigenanteil, this.Page1, - this.DetailReport}); + this.DetailReport, + this.GroupFooter1}); this.DataSource = this.bindingSource1; this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung"; this.Font = new DevExpress.Drawing.DXFont("Verdana", 10F); @@ -380,9 +451,10 @@ namespace BeWo.Report.DefaultReports xrWatermark1.ImageViewMode = DevExpress.XtraPrinting.Drawing.ImageViewMode.Zoom; xrWatermark1.PageRange = "1"; this.Watermarks.Add(xrWatermark1); - ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); } @@ -394,7 +466,6 @@ namespace BeWo.Report.DefaultReports private DevExpress.XtraReports.UI.FormattingRule ruleRateFactorNull; private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1; private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1; - private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter; private DevExpress.XtraReports.UI.GroupHeaderBand Page1; private DevExpress.XtraReports.UI.DetailReportBand DetailReport; private DevExpress.XtraReports.UI.DetailBand Detail1; @@ -412,11 +483,17 @@ namespace BeWo.Report.DefaultReports private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; private DevExpress.XtraReports.UI.XRTableCell xrTableCell6; private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; - private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; private DevExpress.XtraReports.UI.XRTableCell xrTableCell4; private DevExpress.XtraReports.UI.XRLabel xrLabel1; private DevExpress.XtraReports.UI.XRLabel xrLabel5; private DevExpress.XtraReports.UI.XRLabel xrLabel4; private DevExpress.XtraReports.UI.XRRichText xrRichText1; + private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter1; + private DevExpress.XtraReports.UI.XRTable xrTable2; + private DevExpress.XtraReports.UI.XRTableRow xrTableRow2; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell3; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell7; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell8; + private DevExpress.XtraReports.UI.XRTableCell xrTableCell10; } } diff --git a/ReportImp/VereinZurIntegrationChemnitz/VereinZurIntegrationChemnitz.csproj b/ReportImp/VereinZurIntegrationChemnitz/VereinZurIntegrationChemnitz.csproj index 19fbc6fe4..b737f045b 100644 --- a/ReportImp/VereinZurIntegrationChemnitz/VereinZurIntegrationChemnitz.csproj +++ b/ReportImp/VereinZurIntegrationChemnitz/VereinZurIntegrationChemnitz.csproj @@ -58,6 +58,7 @@ + Component