MH: VereinZurIntegrationChemnitz wbw Abrechnung

SupportOID=169880
This commit is contained in:
2026-08-05 12:57:23 +02:00
parent 64cb73806b
commit 7b6a90dd9f
6 changed files with 377 additions and 104 deletions

View File

@@ -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";
}
}
}

View File

@@ -25,7 +25,9 @@ namespace VereinZurIntegrationChemnitz.Invoicing
} }
else if (cat.Name.ToLower().Contains("einfache pauschale") || cat.Name.ToLower().Contains("doppelte pauschale")) else if (cat.Name.ToLower().Contains("einfache pauschale") || cat.Name.ToLower().Contains("doppelte pauschale"))
return new WBWInvoiceCreation(); return new WBWInvoiceCreation();
} else if (cat.Name.ToLower().Contains("bw 67-69"))
return new ABW67InvoiceCreation();
}
} }
return base.CreateInvoiceCreator(specificId, tenant, supportConcepts2ServiceRecords); return base.CreateInvoiceCreator(specificId, tenant, supportConcepts2ServiceRecords);

View File

@@ -1,4 +1,6 @@
using BeWo.Data.Access;
using BeWo.Data.Entities; using BeWo.Data.Entities;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Invoicing; using BeWo.Service.Invoicing;
using BS.Shared.Core; using BS.Shared.Core;
using BS.Shared.DataContracts; using BS.Shared.DataContracts;
@@ -18,6 +20,58 @@ namespace VereinZurIntegrationChemnitz.Invoicing
invoice.InvoiceBase.InvoiceId = "RechnungWBW"; invoice.InvoiceBase.InvoiceId = "RechnungWBW";
invoice.InvoiceBase.InvoiceTypeText = "Abrechnung wbW"; invoice.InvoiceBase.InvoiceTypeText = "Abrechnung wbW";
} }
// Immer CreateCollectiveBilling
public override List<ServiceInvoiceDC> GenerateServiceInvoices(long costBearerOid,
DateTimeSpan invoicePeriod,
Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords, bool splitInvoices)
{
var costBearer = DAOFactory.GenericDAO.LoadByID<CostBearer>(costBearerOid);
var invoiceList = new List<ServiceInvoice>();
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 // Claude: Die Basis ruft SetAmountEquityContribution in der Sammelrechnung nie auf
// (in CreateSingleInvoice nur bei der Spitzabrechnung). Hier muss der Eigenanteil immer gesetzt werden. // (in CreateSingleInvoice nur bei der Spitzabrechnung). Hier muss der Eigenanteil immer gesetzt werden.
public override ServiceInvoice CreateCollectiveBilling(CostBearer costBearer, DateTimeSpan invoicePeriod, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords) public override ServiceInvoice CreateCollectiveBilling(CostBearer costBearer, DateTimeSpan invoicePeriod, Dictionary<CompactSupportConceptDC, List<ServiceRecordDC>> supportConcepts2ServiceRecords)
@@ -26,12 +80,128 @@ namespace VereinZurIntegrationChemnitz.Invoicing
if (invoice != null) if (invoice != null)
{ {
// Claude: Eigenanteil vor dem Zusammenfassen ermitteln, da dafür die monatlichen Perioden gebraucht werden.
SetAmountEquityContribution(invoice); SetAmountEquityContribution(invoice);
MergeMonthlyItemsPerCustomer(invoice);
} }
return 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<long>();
var customer2Periods = new Dictionary<long, List<ServiceInvoicePeriod>>();
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<ServiceInvoicePeriod>());
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<decimal>();
var rate2Item = new Dictionary<decimal, InvoiceItem>();
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 // Claude: In den Rechnungspositionen soll als Bezeichnung das Aktenzeichen
// (ReferenceNumber) des jeweiligen Klienten stehen. // (ReferenceNumber) des jeweiligen Klienten stehen.
public override void SetInvoiceItems(ServiceInvoice invoice, public override void SetInvoiceItems(ServiceInvoice invoice,
@@ -47,12 +217,21 @@ namespace VereinZurIntegrationChemnitz.Invoicing
if (customer == null && cb2sc != null && cb2sc.SupportConcept != null) if (customer == null && cb2sc != null && cb2sc.SupportConcept != null)
customer = cb2sc.SupportConcept.Customer; customer = cb2sc.SupportConcept.Customer;
if (customer == null || String.IsNullOrEmpty(customer.ReferenceNumber)) if (serviceInvoicePeriod.Customer == null)
return; 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) foreach (InvoiceItem item in serviceInvoicePeriod.InvoiceItemList)
{ {
item.ItemDescription = customer.ReferenceNumber; item.ItemDescription = referencenumber ?? "";
} }
} }

View File

@@ -8,7 +8,7 @@ using System.Text;
namespace VereinZurIntegrationChemnitz namespace VereinZurIntegrationChemnitz
{ {
//[IDSpecificClass(Identifiers = new string[] { "RechnungABW67" })] [IDSpecificClass(Identifiers = new string[] { "RechnungABW67" })]
public partial class RechnungABW67 : XtraReport, IBeWoReport<ServiceInvoiceRO> public partial class RechnungABW67 : XtraReport, IBeWoReport<ServiceInvoiceRO>
{ {
public RechnungABW67() public RechnungABW67()

View File

@@ -36,7 +36,11 @@ namespace BeWo.Report.DefaultReports
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule(); this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); 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.ruleNoticeNull = new DevExpress.XtraReports.UI.FormattingRule();
this.Page1 = new DevExpress.XtraReports.UI.GroupHeaderBand(); this.Page1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
@@ -53,17 +57,19 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell1 = 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.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.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.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(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
// //
// Detail // Detail
@@ -96,14 +102,55 @@ namespace BeWo.Report.DefaultReports
this.bottomMarginBand1.HeightF = 115.5835F; this.bottomMarginBand1.HeightF = 115.5835F;
this.bottomMarginBand1.Name = "bottomMarginBand1"; this.bottomMarginBand1.Name = "bottomMarginBand1";
// //
// GroupFooter // GroupFooterEigenanteil
// //
this.GroupFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.GroupFooterEigenanteil.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel5, this.xrLabel1});
this.xrLabel4, this.GroupFooterEigenanteil.HeightF = 81.99978F;
this.xrRichText1}); this.GroupFooterEigenanteil.Name = "GroupFooterEigenanteil";
this.GroupFooter.HeightF = 250.8748F; //
this.GroupFooter.Name = "GroupFooter"; // 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 // ruleNoticeNull
// //
@@ -114,13 +161,14 @@ namespace BeWo.Report.DefaultReports
// Page1 // Page1
// //
this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrTable2,
this.xrLabel8, this.xrLabel8,
this.lblAnrede, this.lblAnrede,
this.xrLabel2, this.xrLabel2,
this.lblAdresse, this.lblAdresse,
this.xrLabel3}); this.xrLabel3});
this.Page1.Font = new DevExpress.Drawing.DXFont("Verdana", 10F); 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.Name = "Page1";
this.Page1.StylePriority.UseFont = false; this.Page1.StylePriority.UseFont = false;
// //
@@ -129,7 +177,7 @@ namespace BeWo.Report.DefaultReports
this.xrLabel8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { this.xrLabel8.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceDate")}); new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceDate")});
this.xrLabel8.Font = new DevExpress.Drawing.DXFont("Arial", 8F); 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.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(266F, 23F); this.xrLabel8.SizeF = new System.Drawing.SizeF(266F, 23F);
@@ -141,7 +189,7 @@ namespace BeWo.Report.DefaultReports
// lblAnrede // lblAnrede
// //
this.lblAnrede.Font = new DevExpress.Drawing.DXFont("Arial", 10F); 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.Name = "lblAnrede";
this.lblAnrede.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.lblAnrede.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblAnrede.SizeF = new System.Drawing.SizeF(292F, 17F); 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.BackColor = System.Drawing.Color.Transparent;
this.xrLabel2.CanShrink = true; this.xrLabel2.CanShrink = true;
this.xrLabel2.Font = new DevExpress.Drawing.DXFont("Arial", 10F, DevExpress.Drawing.DXFontStyle.Bold); 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.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(625F, 20F); this.xrLabel2.SizeF = new System.Drawing.SizeF(625F, 20F);
this.xrLabel2.StylePriority.UseBackColor = false; this.xrLabel2.StylePriority.UseBackColor = false;
this.xrLabel2.StylePriority.UseFont = 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; this.xrLabel2.WordWrap = false;
// //
// lblAdresse // lblAdresse
@@ -177,7 +225,7 @@ namespace BeWo.Report.DefaultReports
// xrLabel3 // xrLabel3
// //
this.xrLabel3.Font = new DevExpress.Drawing.DXFont("Arial", 10F); 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.Multiline = true;
this.xrLabel3.Name = "xrLabel3"; this.xrLabel3.Name = "xrLabel3";
this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -206,8 +254,7 @@ namespace BeWo.Report.DefaultReports
// DetailReport2 // DetailReport2
// //
this.DetailReport2.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.DetailReport2.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
this.Detail3, this.Detail3});
this.GroupFooterEigenanteil});
this.DetailReport2.DataMember = "ServiceInvoicePeriods.ServiceInvoiceItems"; this.DetailReport2.DataMember = "ServiceInvoicePeriods.ServiceInvoiceItems";
this.DetailReport2.DataSource = this.bindingSource1; this.DetailReport2.DataSource = this.bindingSource1;
this.DetailReport2.Level = 0; 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.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 96F);
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow1}); this.xrTableRow1});
this.xrTable1.SizeF = new System.Drawing.SizeF(627F, 25F); this.xrTable1.SizeF = new System.Drawing.SizeF(605.9161F, 25F);
// //
// xrTableRow1 // xrTableRow1
// //
@@ -235,7 +282,6 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell5, this.xrTableCell5,
this.xrTableCell6, this.xrTableCell6,
this.xrTableCell1, this.xrTableCell1,
this.xrTableCell2,
this.xrTableCell4}); this.xrTableCell4});
this.xrTableRow1.Name = "xrTableRow1"; this.xrTableRow1.Name = "xrTableRow1";
this.xrTableRow1.Weight = 1D; this.xrTableRow1.Weight = 1D;
@@ -247,9 +293,9 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell5.Name = "xrTableCell5"; this.xrTableCell5.Name = "xrTableCell5";
this.xrTableCell5.StylePriority.UseFont = false; this.xrTableCell5.StylePriority.UseFont = false;
this.xrTableCell5.StylePriority.UseTextAlignment = false; this.xrTableCell5.StylePriority.UseTextAlignment = false;
this.xrTableCell5.Text = "[CustomerLastname], [CustomerFirstname]"; this.xrTableCell5.Text = "[ServiceInvoicePeriods.Customer.FullName]";
this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell5.Weight = 0.78164370769484037D; this.xrTableCell5.Weight = 0.6377066198113055D;
// //
// xrTableCell6 // xrTableCell6
// //
@@ -260,8 +306,9 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell6.Name = "xrTableCell6"; this.xrTableCell6.Name = "xrTableCell6";
this.xrTableCell6.StylePriority.UseFont = false; this.xrTableCell6.StylePriority.UseFont = false;
this.xrTableCell6.StylePriority.UseTextAlignment = false; this.xrTableCell6.StylePriority.UseTextAlignment = false;
this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell6.Weight = 0.48384256795416708D; this.xrTableCell6.TextFormatString = "{0}";
this.xrTableCell6.Weight = 0.56821943516009754D;
// //
// xrTableCell1 // xrTableCell1
// //
@@ -272,20 +319,9 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell1.Name = "xrTableCell1"; this.xrTableCell1.Name = "xrTableCell1";
this.xrTableCell1.StylePriority.UseFont = false; this.xrTableCell1.StylePriority.UseFont = false;
this.xrTableCell1.StylePriority.UseTextAlignment = 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.TextFormatString = "{0:0.##}";
this.xrTableCell1.Weight = 0.70959156124086276D; this.xrTableCell1.Weight = 0.67981149542847186D;
//
// 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;
// //
// xrTableCell4 // xrTableCell4
// //
@@ -297,63 +333,97 @@ namespace BeWo.Report.DefaultReports
this.xrTableCell4.StylePriority.UseFont = false; this.xrTableCell4.StylePriority.UseFont = false;
this.xrTableCell4.StylePriority.UseTextAlignment = false; this.xrTableCell4.StylePriority.UseTextAlignment = false;
this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell4.TextFormatString = "{0:0.00}"; this.xrTableCell4.TextFormatString = "{0:c}";
this.xrTableCell4.Weight = 0.86733002111200941D; this.xrTableCell4.Weight = 1.0013404458457194D;
// //
// GroupFooterEigenanteil // GroupFooter1
// //
this.GroupFooterEigenanteil.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel1}); this.xrLabel5,
this.GroupFooterEigenanteil.HeightF = 44.12505F; this.xrLabel4,
this.GroupFooterEigenanteil.Name = "GroupFooterEigenanteil"; 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 // bindingSource1
// //
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO); 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 // Sammelrechnung
// //
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -361,9 +431,10 @@ namespace BeWo.Report.DefaultReports
this.ReportHeader, this.ReportHeader,
this.topMarginBand1, this.topMarginBand1,
this.bottomMarginBand1, this.bottomMarginBand1,
this.GroupFooter, this.GroupFooterEigenanteil,
this.Page1, this.Page1,
this.DetailReport}); this.DetailReport,
this.GroupFooter1});
this.DataSource = this.bindingSource1; this.DataSource = this.bindingSource1;
this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung"; this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung";
this.Font = new DevExpress.Drawing.DXFont("Verdana", 10F); this.Font = new DevExpress.Drawing.DXFont("Verdana", 10F);
@@ -380,9 +451,10 @@ namespace BeWo.Report.DefaultReports
xrWatermark1.ImageViewMode = DevExpress.XtraPrinting.Drawing.ImageViewMode.Zoom; xrWatermark1.ImageViewMode = DevExpress.XtraPrinting.Drawing.ImageViewMode.Zoom;
xrWatermark1.PageRange = "1"; xrWatermark1.PageRange = "1";
this.Watermarks.Add(xrWatermark1); 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.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(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
} }
@@ -394,7 +466,6 @@ namespace BeWo.Report.DefaultReports
private DevExpress.XtraReports.UI.FormattingRule ruleRateFactorNull; private DevExpress.XtraReports.UI.FormattingRule ruleRateFactorNull;
private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1; private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1;
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1; private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter;
private DevExpress.XtraReports.UI.GroupHeaderBand Page1; private DevExpress.XtraReports.UI.GroupHeaderBand Page1;
private DevExpress.XtraReports.UI.DetailReportBand DetailReport; private DevExpress.XtraReports.UI.DetailReportBand DetailReport;
private DevExpress.XtraReports.UI.DetailBand Detail1; 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 xrTableCell5;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell6; private DevExpress.XtraReports.UI.XRTableCell xrTableCell6;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4; private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
private DevExpress.XtraReports.UI.XRLabel xrLabel1; private DevExpress.XtraReports.UI.XRLabel xrLabel1;
private DevExpress.XtraReports.UI.XRLabel xrLabel5; private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRLabel xrLabel4; private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.XRRichText xrRichText1; 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;
} }
} }

View File

@@ -58,6 +58,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Calculations\CustomGroupDurationCalculator.cs" /> <Compile Include="Calculations\CustomGroupDurationCalculator.cs" />
<Compile Include="Invoicing\ABW67InvoiceCreation.cs" />
<Compile Include="RechnungEigenanteil.cs"> <Compile Include="RechnungEigenanteil.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>