SBBMainzReports/ServiceInvoiceReport - Abrechnung Finetuning

This commit is contained in:
2025-07-23 10:34:17 +02:00
parent f5c5ee5775
commit 9ae8135d88
3 changed files with 59 additions and 35 deletions

View File

@@ -15,6 +15,30 @@ namespace SbbMainzReports.Invoicing
{
public class CustomInvoiceCreation : InvoiceCreation
{
public override ServiceInvoice CreateSingleInvoice(int invoiceCounter, CostBearer costBearer, DateTimeSpan invoicePeriod, CompactSupportConceptDC supportConcept, List<ServiceRecordDC> serviceRecords)
{
// auch nicht bewilligte abrechnen
if (!supportConcept.IsDeleted && !supportConcept.IsArchived)
{
var invoice = new ServiceInvoice();
var supportConceptList = new List<CompactSupportConceptDC> { supportConcept };
SetSenderInformation(invoice);
SetInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConceptList);
SetSingleInvoiceBaseData(invoiceCounter, invoice, costBearer, invoicePeriod, supportConcept);
SetRecipientInformation(invoice, costBearer);
SetServiceInvoicePeriods(invoice, invoice.InvoiceBase.CostBearer2SupportConcept, invoicePeriod, serviceRecords);
SetServiceInvoicePeriodAmounts(invoice);
SetAmountAdvancePayments(invoice);
SetAmountEquityContribution(invoice);
return invoice;
}
return null;
}
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, BS.Shared.Services.Calculations calc)
{
var ii = base.CreateInvoiceItem(iServiceRecord, scap, calc);

View File

@@ -89,14 +89,14 @@ namespace SBBMainzReports
this.xrTableCell44 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell47 = new DevExpress.XtraReports.UI.XRTableCell();
this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand();
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand();
this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel18 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel19 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand();
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable6)).BeginInit();
@@ -408,7 +408,7 @@ namespace SBBMainzReports
// xrTableCell4
//
this.xrTableCell4.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "DebitorNumber")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerReferenceNumber")});
this.xrTableCell4.Multiline = true;
this.xrTableCell4.Name = "xrTableCell4";
this.xrTableCell4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -787,34 +787,9 @@ namespace SBBMainzReports
this.xrTableCell47.TextFormatString = "{0} Euro";
this.xrTableCell47.Weight = 0.53064018869841689D;
//
// PageFooter
// bindingSource1
//
this.PageFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel15,
this.xrPictureBox2});
this.PageFooter.HeightF = 121.0002F;
this.PageFooter.Name = "PageFooter";
//
// xrLabel15
//
this.xrLabel15.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(91.24998F, 75.00006F);
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(544.6247F, 36F);
this.xrLabel15.StylePriority.UseFont = false;
this.xrLabel15.Text = "Sozialtherapeutische Beratungsstelle/Betreuungsverein e. V., VR-Nr.: 2648, AG Mai" +
"nz\r\nBank: Mainzer Volksbank - BIC: MVBMDE55 IBAN: DE02 5519 0000 0327 4870 13\r" +
"\n";
//
// xrPictureBox2
//
this.xrPictureBox2.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("xrPictureBox2.ImageSource"));
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(510.0831F, 10.00016F);
this.xrPictureBox2.Name = "xrPictureBox2";
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(159.7919F, 111F);
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
//
// ReportFooter
//
@@ -871,9 +846,34 @@ namespace SBBMainzReports
this.xrLabel19.Text = "Rechnungsbetrag Gesamt:";
this.xrLabel19.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
//
// bindingSource1
// PageFooter
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
this.PageFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel15,
this.xrPictureBox2});
this.PageFooter.HeightF = 121.0002F;
this.PageFooter.Name = "PageFooter";
//
// xrLabel15
//
this.xrLabel15.Font = new DevExpress.Drawing.DXFont("Arial", 10F);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(91.24998F, 75.00006F);
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(544.6247F, 36F);
this.xrLabel15.StylePriority.UseFont = false;
this.xrLabel15.Text = "Sozialtherapeutische Beratungsstelle/Betreuungsverein e. V., VR-Nr.: 2648, AG Mai" +
"nz\r\nBank: Mainzer Volksbank - BIC: MVBMDE55 IBAN: DE02 5519 0000 0327 4870 13\r" +
"\n";
//
// xrPictureBox2
//
this.xrPictureBox2.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("xrPictureBox2.ImageSource"));
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(510.0831F, 10.00016F);
this.xrPictureBox2.Name = "xrPictureBox2";
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(159.7919F, 111F);
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// ServiceInvoiceReport
//

View File

@@ -54,7 +54,7 @@ namespace SBBMainzReports
}
foreach (var ii in sip.ServiceInvoiceItems)
{
if (!ii.ServiceDescription.ToLower().Contains("handgeld"))
if (!ii.ServiceDescription.ToLower().Contains("handgeld") && !ii.ServiceDescription.ToLower().Contains("hangeld"))
{
ii.ServiceDescription = "Fachleistungstunden / Monat";
ii.HourlyRateString = String.Format("zu {0:0.00} €", ii.HourlyRate);