MH: SKM Aachen Diff Rechnung §67

This commit is contained in:
2025-01-10 12:11:15 +01:00
parent fe9859b742
commit 834f9d0443
2 changed files with 62 additions and 23 deletions

View File

@@ -69,6 +69,8 @@ namespace SKMAachen
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.lblDifferenzrechnung1 = new DevExpress.XtraReports.UI.XRLabel();
this.lblDifferenzrechnung2 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -93,7 +95,7 @@ namespace SKMAachen
// xrPictureBox1
//
this.xrPictureBox1.ImageSource = new DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("xrPictureBox1.ImageSource"));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(421.7502F, 0F);
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(440.5837F, 0F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(255.2498F, 80.70667F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
@@ -123,7 +125,7 @@ namespace SKMAachen
//
this.xrLabel10.Font = new DevExpress.Drawing.DXFont("Verdana", 7F);
this.xrLabel10.ForeColor = System.Drawing.Color.Gray;
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(578.1249F, 0F);
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(596.9584F, 0F);
this.xrLabel10.Multiline = true;
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -138,11 +140,11 @@ namespace SKMAachen
//
this.xrLabel9.Font = new DevExpress.Drawing.DXFont("Verdana", 7F);
this.xrLabel9.ForeColor = System.Drawing.Color.Gray;
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(385.4167F, 0F);
this.xrLabel9.LocationFloat = new DevExpress.Utils.PointFloat(396.875F, 0F);
this.xrLabel9.Multiline = true;
this.xrLabel9.Name = "xrLabel9";
this.xrLabel9.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel9.SizeF = new System.Drawing.SizeF(192.7083F, 71.10926F);
this.xrLabel9.SizeF = new System.Drawing.SizeF(200.0835F, 71.10926F);
this.xrLabel9.StylePriority.UseFont = false;
this.xrLabel9.StylePriority.UseForeColor = false;
this.xrLabel9.StylePriority.UseTextAlignment = false;
@@ -158,7 +160,7 @@ namespace SKMAachen
this.xrLabel6.Multiline = true;
this.xrLabel6.Name = "xrLabel6";
this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(192.7083F, 71.10926F);
this.xrLabel6.SizeF = new System.Drawing.SizeF(204.1667F, 71.10926F);
this.xrLabel6.StylePriority.UseFont = false;
this.xrLabel6.StylePriority.UseForeColor = false;
this.xrLabel6.StylePriority.UseTextAlignment = false;
@@ -184,6 +186,8 @@ namespace SKMAachen
// Page1
//
this.Page1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.lblDifferenzrechnung2,
this.lblDifferenzrechnung1,
this.xrLabel11,
this.xrLabel3,
this.xrLabel1,
@@ -193,7 +197,7 @@ namespace SKMAachen
this.lblForderung,
this.xrLabel2,
this.lblAbrechnungszeitraum});
this.Page1.HeightF = 473.1048F;
this.Page1.HeightF = 488.313F;
this.Page1.Name = "Page1";
this.Page1.StylePriority.UseFont = false;
//
@@ -258,14 +262,14 @@ namespace SKMAachen
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(501.3751F, 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(148.6251F, 23F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(194.4584F, 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, 10F);
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(367.0001F, 10.00001F);
this.xrTable2.Name = "xrTable2";
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
this.xrTableRow2,
@@ -275,7 +279,7 @@ namespace SKMAachen
this.xrTableRow1,
this.xrTableRow6,
this.xrTableRow8});
this.xrTable2.SizeF = new System.Drawing.SizeF(283F, 134F);
this.xrTable2.SizeF = new System.Drawing.SizeF(328.8332F, 134F);
//
// xrTableRow2
//
@@ -406,13 +410,12 @@ namespace SKMAachen
//
// lblForderung
//
this.lblForderung.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Bold, DevExpress.Drawing.DXGraphicsUnit.Point, new DevExpress.Drawing.DXFontAdditionalProperty[] {
new DevExpress.Drawing.DXFontAdditionalProperty("GdiCharSet", ((byte)(0)))});
this.lblForderung.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F);
this.lblForderung.LocationFloat = new DevExpress.Utils.PointFloat(0F, 432.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.SizeF = new System.Drawing.SizeF(695.8333F, 18.54166F);
this.lblForderung.StylePriority.UseFont = false;
this.lblForderung.Text = "Hieraus ergibt sich eine Forderung von ___ Std. x 61,40 EUR = ________ EUR.";
//
@@ -423,7 +426,7 @@ namespace SKMAachen
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, 112.9134F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(695.8333F, 112.9134F);
this.xrLabel2.StylePriority.UseBackColor = false;
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.Text = resources.GetString("xrLabel2.Text");
@@ -435,7 +438,7 @@ namespace SKMAachen
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(650F, 62F);
this.lblAbrechnungszeitraum.SizeF = new System.Drawing.SizeF(695.8333F, 62F);
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" +
@@ -450,11 +453,11 @@ namespace SKMAachen
//
// xrLabel15
//
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(0.0002066294F, 21.875F);
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, 124.7343F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(695.8333F, 124.7343F);
this.xrLabel15.StylePriority.UseFont = false;
this.xrLabel15.StylePriority.UseTextAlignment = false;
this.xrLabel15.Text = resources.GetString("xrLabel15.Text");
@@ -465,12 +468,12 @@ namespace SKMAachen
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel4,
this.xrLabel15});
this.GroupFooter2.HeightF = 229.1258F;
this.GroupFooter2.HeightF = 247.6877F;
this.GroupFooter2.Name = "GroupFooter2";
//
// xrLabel4
//
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 188.7091F);
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 207.271F);
this.xrLabel4.Multiline = true;
this.xrLabel4.Name = "xrLabel4";
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -478,6 +481,28 @@ namespace SKMAachen
this.xrLabel4.StylePriority.UseFont = false;
this.xrLabel4.Text = "Unterschrift und Stempel des Anbieters ";
//
// lblDifferenzrechnung1
//
this.lblDifferenzrechnung1.CanShrink = true;
this.lblDifferenzrechnung1.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F);
this.lblDifferenzrechnung1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 451.2297F);
this.lblDifferenzrechnung1.Multiline = true;
this.lblDifferenzrechnung1.Name = "lblDifferenzrechnung1";
this.lblDifferenzrechnung1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblDifferenzrechnung1.SizeF = new System.Drawing.SizeF(695.8333F, 18.54166F);
this.lblDifferenzrechnung1.StylePriority.UseFont = false;
//
// lblDifferenzrechnung2
//
this.lblDifferenzrechnung2.CanShrink = true;
this.lblDifferenzrechnung2.Font = new DevExpress.Drawing.DXFont("Verdana", 9.75F, DevExpress.Drawing.DXFontStyle.Bold);
this.lblDifferenzrechnung2.LocationFloat = new DevExpress.Utils.PointFloat(0.0002066294F, 469.7714F);
this.lblDifferenzrechnung2.Multiline = true;
this.lblDifferenzrechnung2.Name = "lblDifferenzrechnung2";
this.lblDifferenzrechnung2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblDifferenzrechnung2.SizeF = new System.Drawing.SizeF(695.8333F, 18.54166F);
this.lblDifferenzrechnung2.StylePriority.UseFont = false;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
@@ -500,7 +525,7 @@ namespace SKMAachen
this.Font = new DevExpress.Drawing.DXFont("Verdana", 10F);
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.ruleRateFactorNull});
this.Margins = new DevExpress.Drawing.DXMargins(75F, 75F, 135.5417F, 125.5471F);
this.Margins = new DevExpress.Drawing.DXMargins(75F, 24F, 135.5417F, 125.5471F);
this.PageHeight = 1169;
this.PageWidth = 827;
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
@@ -553,5 +578,7 @@ namespace SKMAachen
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
private DevExpress.XtraReports.UI.XRLabel xrLabel11;
private DevExpress.XtraReports.UI.XRLabel lblDifferenzrechnung1;
private DevExpress.XtraReports.UI.XRLabel lblDifferenzrechnung2;
}
}

View File

@@ -20,6 +20,9 @@ namespace SKMAachen
{
decimal hourlyRate = 0;
decimal hours = 0;
ServiceInvoiceItemRO bereitsBerechnetesItem = null;
if (pRO.ServiceInvoicePeriods != null && pRO.ServiceInvoicePeriods.Count > 0)
{
foreach (var p in pRO.ServiceInvoicePeriods)
@@ -32,7 +35,8 @@ namespace SKMAachen
{
if (i.HourlyRate.HasValue)
{
hourlyRate = i.HourlyRate.Value;
if (i.HourlyRate.Value >= 0)
hourlyRate = i.HourlyRate.Value;
if (!String.IsNullOrEmpty(i.RateFactor))
{
@@ -44,7 +48,10 @@ namespace SKMAachen
if (i.Hours.HasValue)
{
hours += i.Hours.Value;
if (!i.ServiceDescription.Contains("Rechnungsnummer"))
hours += i.Hours.Value;
else
bereitsBerechnetesItem = i;
}
}
}
@@ -52,8 +59,13 @@ namespace SKMAachen
}
lblForderung.Text =
String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00}.", hours, hourlyRate, pRO.NetClaim.Replace("€", "EUR"));
String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00}.", hours, hourlyRate, string.Format("{0:0.00} EUR", hours * hourlyRate));
//String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00}.", hours, hourlyRate, pRO.NetClaim.Replace("€", "EUR"));
if (pRO.InvoiceBase.InvoiceTypeText == "Differenzrechnung" && bereitsBerechnetesItem != null)
{
lblDifferenzrechnung1.Text = string.Format("{0}: {1:0.00} Std. x {2:0.00} EUR = {3:0.00} EUR", bereitsBerechnetesItem.ServiceDescription, bereitsBerechnetesItem.Hours, bereitsBerechnetesItem.HourlyRate * -1, Convert.ToDecimal(bereitsBerechnetesItem.GrossAmount.Split(' ')[0]) * -1);
lblDifferenzrechnung2.Text = string.Format("Daraus ergibt sich eine zu zahlende Summe von {0} EUR.", pRO.NetClaim.Replace("€", ""));
}
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.",