SBBMainzReports/Invoicing/CustomInvoiceCreation - Ausweis Bruttostunden (inkl. Faktor) in Rechnung
This commit is contained in:
@@ -64,5 +64,47 @@ namespace SbbMainzReports.Invoicing
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap,
|
||||
Calculations calc, bool summaryPerMonth, bool addRateFactorToUnitCount)
|
||||
{
|
||||
return base.CreateSummaryInvoiceItems(itemList, invoicePeriod, scap, calc, false, true);
|
||||
}
|
||||
|
||||
public override void BerechneSummaryItemsSummen(List<InvoiceItem> newlist, bool addRateFactorToUnitCount)
|
||||
{
|
||||
foreach (InvoiceItem invoiceItem in newlist)
|
||||
{
|
||||
if (!invoiceItem.AmountPerUnit.HasValue)
|
||||
{
|
||||
invoiceItem.AmountPerUnit = 0;
|
||||
}
|
||||
invoiceItem.AmountPerUnit = Math.Round(invoiceItem.AmountPerUnit.Value, 2, MidpointRounding.AwayFromZero);
|
||||
|
||||
if (!invoiceItem.UnitCount.HasValue)
|
||||
{
|
||||
invoiceItem.UnitCount = 0;
|
||||
}
|
||||
|
||||
if (addRateFactorToUnitCount && invoiceItem.RateFactor.HasValue)
|
||||
{
|
||||
invoiceItem.UnitCount = (invoiceItem.UnitCount ?? 0) * ((invoiceItem.RateFactor + 100) / 100);
|
||||
}
|
||||
|
||||
invoiceItem.UnitCount = Math.Round(invoiceItem.UnitCount.Value, 3, MidpointRounding.AwayFromZero);
|
||||
|
||||
|
||||
invoiceItem.AmountTotal = invoiceItem.AmountPerUnit * invoiceItem.UnitCount;
|
||||
invoiceItem.AmountTotal = Math.Round(invoiceItem.AmountTotal.Value, 2, MidpointRounding.AwayFromZero);
|
||||
|
||||
invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal;
|
||||
|
||||
|
||||
if (!addRateFactorToUnitCount && invoiceItem.RateFactor.HasValue)
|
||||
{
|
||||
invoiceItem.GrossAmountTotal *= ((invoiceItem.RateFactor + 100) / 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,6 @@ namespace SBBMainzReports
|
||||
this.xrTableCell44 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell47 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
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();
|
||||
@@ -97,6 +96,7 @@ namespace SBBMainzReports
|
||||
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);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable6)).BeginInit();
|
||||
@@ -749,7 +749,7 @@ namespace SBBMainzReports
|
||||
this.xrTableCell44.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell44.Text = "xrTableCell44";
|
||||
this.xrTableCell44.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
|
||||
this.xrTableCell44.TextFormatString = "{0:0.00}";
|
||||
this.xrTableCell44.TextFormatString = "{0:0.000}";
|
||||
this.xrTableCell44.Weight = 0.14933396933294971D;
|
||||
//
|
||||
// xrTableCell9
|
||||
@@ -787,10 +787,6 @@ namespace SBBMainzReports
|
||||
this.xrTableCell47.TextFormatString = "{0} Euro";
|
||||
this.xrTableCell47.Weight = 0.53064018869841689D;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
|
||||
//
|
||||
// ReportFooter
|
||||
//
|
||||
this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
@@ -875,6 +871,10 @@ namespace SBBMainzReports
|
||||
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(159.7919F, 111F);
|
||||
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServiceInvoiceRO);
|
||||
//
|
||||
// ServiceInvoiceReport
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
|
||||
Reference in New Issue
Block a user