SKFMMonheim/RechnungBeWo67 - für DifferenzRg erweitert
This commit is contained in:
37
ReportImp/SKFMMonheim/RechnungBeWo67.Designer.cs
generated
37
ReportImp/SKFMMonheim/RechnungBeWo67.Designer.cs
generated
@@ -30,12 +30,14 @@ namespace SKFMMonheim
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RechnungBeWo67));
|
||||
DevExpress.XtraReports.UI.XRWatermark xrWatermark1 = new DevExpress.XtraReports.UI.XRWatermark();
|
||||
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
|
||||
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
|
||||
this.ruleRateFactorNull = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
|
||||
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
|
||||
this.Page1 = new DevExpress.XtraReports.UI.GroupHeaderBand();
|
||||
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
|
||||
@@ -61,7 +63,6 @@ namespace SKFMMonheim
|
||||
this.GroupFooter2 = new DevExpress.XtraReports.UI.GroupFooterBand();
|
||||
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
||||
@@ -106,10 +107,20 @@ namespace SKFMMonheim
|
||||
this.lblForderung,
|
||||
this.xrLabel2,
|
||||
this.lblAbrechnungszeitraum});
|
||||
this.Page1.HeightF = 463.9584F;
|
||||
this.Page1.HeightF = 443.7517F;
|
||||
this.Page1.Name = "Page1";
|
||||
this.Page1.StylePriority.UseFont = false;
|
||||
//
|
||||
// xrLabel1
|
||||
//
|
||||
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(362.5F, 134F);
|
||||
this.xrLabel1.Name = "xrLabel1";
|
||||
this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel1.SizeF = new System.Drawing.SizeF(283F, 23F);
|
||||
this.xrLabel1.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel1.Text = "GP-Nummer: [BusinessPartnerId]";
|
||||
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
|
||||
//
|
||||
// xrLabel7
|
||||
//
|
||||
this.xrLabel7.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
@@ -280,7 +291,7 @@ namespace SKFMMonheim
|
||||
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(642F, 40.41669F);
|
||||
this.lblForderung.SizeF = new System.Drawing.SizeF(642F, 20.21F);
|
||||
this.lblForderung.StylePriority.UseFont = false;
|
||||
this.lblForderung.Text = "Hieraus ergibt sich eine Forderung von ___ Std. x 49,82 EUR = ________ EUR.";
|
||||
//
|
||||
@@ -331,12 +342,12 @@ namespace SKFMMonheim
|
||||
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrLabel4,
|
||||
this.xrLabel15});
|
||||
this.GroupFooter2.HeightF = 267.1528F;
|
||||
this.GroupFooter2.HeightF = 280.4861F;
|
||||
this.GroupFooter2.Name = "GroupFooter2";
|
||||
//
|
||||
// xrLabel4
|
||||
//
|
||||
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 226.7361F);
|
||||
this.xrLabel4.LocationFloat = new DevExpress.Utils.PointFloat(0F, 240.0694F);
|
||||
this.xrLabel4.Multiline = true;
|
||||
this.xrLabel4.Name = "xrLabel4";
|
||||
this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
@@ -348,16 +359,6 @@ namespace SKFMMonheim
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
|
||||
//
|
||||
// xrLabel1
|
||||
//
|
||||
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(362.5F, 134F);
|
||||
this.xrLabel1.Name = "xrLabel1";
|
||||
this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel1.SizeF = new System.Drawing.SizeF(283F, 23F);
|
||||
this.xrLabel1.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel1.Text = "GP-Nummer: [BusinessPartnerId]";
|
||||
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
|
||||
//
|
||||
// RechnungBeWo67
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
@@ -369,16 +370,20 @@ namespace SKFMMonheim
|
||||
this.GroupFooter2});
|
||||
this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] {
|
||||
this.fieldMinuten});
|
||||
this.ComponentStorage.AddRange(new System.ComponentModel.IComponent[] {
|
||||
this.bindingSource1});
|
||||
this.DataSource = this.bindingSource1;
|
||||
this.ExportOptions.PrintPreview.DefaultFileName = "Spitzabrechnung";
|
||||
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, 222F, 71F);
|
||||
this.Margins = new DevExpress.Drawing.DXMargins(75F, 74F, 222F, 71F);
|
||||
this.PageHeight = 1169;
|
||||
this.PageWidth = 827;
|
||||
this.PaperKind = DevExpress.Drawing.Printing.DXPaperKind.A4;
|
||||
this.Version = "23.2";
|
||||
xrWatermark1.Id = "Watermark1";
|
||||
this.Watermarks.Add(xrWatermark1);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Report;
|
||||
@@ -24,45 +25,72 @@ namespace SKFMMonheim
|
||||
decimal hourlyRate = 0;
|
||||
decimal rateFactor = 1;
|
||||
decimal hours = 0;
|
||||
bool differenz = false;
|
||||
decimal hourlyRateOld = 0;
|
||||
decimal hoursOld = 0;
|
||||
if (pRO.ServiceInvoicePeriods != null && pRO.ServiceInvoicePeriods.Count > 0)
|
||||
{
|
||||
foreach (var p in pRO.ServiceInvoicePeriods)
|
||||
{
|
||||
|
||||
if (p.ServiceInvoiceItems != null && p.ServiceInvoiceItems.Count > 0)
|
||||
{
|
||||
|
||||
if (p.ServiceInvoiceItems.Any(i => i.NetAmount < 0))
|
||||
{
|
||||
differenz = true;
|
||||
}
|
||||
foreach (var i in p.ServiceInvoiceItems)
|
||||
{
|
||||
if (i.HourlyRate.HasValue)
|
||||
if (differenz && i.NetAmount < 0)
|
||||
{
|
||||
hourlyRate = i.HourlyRate.Value;
|
||||
|
||||
if (!String.IsNullOrEmpty(i.RateFactor))
|
||||
if (i.HourlyRate.HasValue)
|
||||
{
|
||||
var rfStr = i.RateFactor.Replace("%", "").Replace(",00", "").Trim();
|
||||
int rfInt = 0;
|
||||
Int32.TryParse(rfStr, out rfInt);
|
||||
|
||||
rateFactor = (100m + rfInt) / 100m;
|
||||
hourlyRateOld = i.HourlyRate.Value;
|
||||
}
|
||||
if (i.Hours.HasValue)
|
||||
{
|
||||
hoursOld += i.Hours.Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i.HourlyRate.HasValue)
|
||||
{
|
||||
hourlyRate = i.HourlyRate.Value;
|
||||
if (!String.IsNullOrEmpty(i.RateFactor))
|
||||
{
|
||||
var rfStr = i.RateFactor.Replace("%", "").Replace(",00", "").Trim();
|
||||
int rfInt = 0;
|
||||
Int32.TryParse(rfStr, out rfInt);
|
||||
rateFactor = (100m + rfInt) / 100m;
|
||||
}
|
||||
}
|
||||
if (i.Hours.HasValue)
|
||||
{
|
||||
hours += i.Hours.Value;
|
||||
}
|
||||
}
|
||||
|
||||
if (i.Hours.HasValue)
|
||||
hours += i.Hours.Value;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lblForderung.Text =
|
||||
String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00} EUR.", hours, hourlyRate, pRO.NetClaim);
|
||||
if (differenz)
|
||||
{
|
||||
lblForderung.Text =
|
||||
String.Format("Aktuell ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00} EUR.", hours, hourlyRate, hours * hourlyRate);
|
||||
lblForderung.Text += String.Format("\nAbzüglich der bereits abgerechneten {0:0.00} Std. x {1:0.00} EUR = {2:0.00} EUR.", hoursOld, hourlyRateOld, hoursOld * hourlyRateOld);
|
||||
lblForderung.Text += String.Format("\nHieraus ergibt sich eine Forderung von {0:0.00} EUR.", pRO.NetClaim);
|
||||
}
|
||||
else
|
||||
{
|
||||
lblForderung.Text =
|
||||
String.Format("Hieraus ergibt sich eine Forderung von {0:0.00} Std. x {1:0.00} EUR = {2:0.00} EUR.", hours, hourlyRate, pRO.NetClaim);
|
||||
}
|
||||
|
||||
lblAbrechnungszeitraum.Text =
|
||||
String.Format(
|
||||
"Im Zeitraum vom {0:dd.MM.yyyy} bis {1:dd.MM.yyyy} wurden {2:0.00} Dienstleistungsstunden unmittelbare Betreuungsleistungen des Betreuten Wohnens erbracht.",
|
||||
pRO.AccountingPeriodStart, pRO.AccountingPeriodEnd, hours);
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,8 @@ Für: [CustomerName], geb. am [CustomerBirthdate!dd.MM.yyyy]
|
||||
AZ: [CustomerReferenceNumber]</value>
|
||||
</data>
|
||||
<data name="xrLabel15.Text" xml:space="preserve">
|
||||
<value>Zahlungsziel 14 Tage nach Rechnungsdatum
|
||||
<value>
|
||||
Zahlungsziel 14 Tage nach Rechnungsdatum
|
||||
|
||||
Es wird ausdrücklich bestätigt, dass in den angegebenen Dienstleistungsstunden nur un-
|
||||
mittelbare Betreuungsleistungen im Sinne der Leistungs- und Prüfungs- sowie der Vergü-
|
||||
|
||||
Reference in New Issue
Block a user