BeWoWalzPaiva/SettlementReport2.cs
This commit is contained in:
@@ -1,43 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BS.Shared.DataContracts;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace BeWoWalzPaiva
|
||||
{
|
||||
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
|
||||
{
|
||||
public Spitzabrechnung()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(Settlement2RO pRO)
|
||||
{
|
||||
bool hasRatefactor = false;
|
||||
|
||||
if (String.IsNullOrEmpty(pRO.Notice))
|
||||
{
|
||||
lblNotice.Visible = false;
|
||||
}
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(pRO.RateFactorText2))
|
||||
{
|
||||
hasRatefactor = true;
|
||||
if (pRO.RateFactorText2 == "1,2")
|
||||
{
|
||||
pRO.RateFactorText2 = "1,20";
|
||||
}
|
||||
}
|
||||
|
||||
if (pRO.InvoiceItems != null)
|
||||
{
|
||||
foreach (var ii in pRO.InvoiceItems)
|
||||
namespace BeWoWalzPaiva
|
||||
{
|
||||
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
|
||||
{
|
||||
public Spitzabrechnung()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(Settlement2RO pRO)
|
||||
{
|
||||
bool hasRatefactor = false;
|
||||
|
||||
if (String.IsNullOrEmpty(pRO.Notice))
|
||||
{
|
||||
lblNotice.Visible = false;
|
||||
}
|
||||
|
||||
if (!String.IsNullOrWhiteSpace(pRO.RateFactorText2))
|
||||
{
|
||||
hasRatefactor = true;
|
||||
if (pRO.RateFactorText2 == "1,2")
|
||||
{
|
||||
pRO.RateFactorText2 = "1,20";
|
||||
}
|
||||
}
|
||||
|
||||
if (pRO.InvoiceItems != null)
|
||||
{
|
||||
foreach (var ii in pRO.InvoiceItems)
|
||||
{
|
||||
if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0)
|
||||
{
|
||||
@@ -47,19 +47,19 @@ namespace BeWoWalzPaiva
|
||||
ii.DetailDescription = Regex.Replace(ii.DetailDescription, ii.ItemDescription, "Fehlkontakte");
|
||||
}
|
||||
ii.ItemDescription = "Fehlkontakte";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ii.DetailDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}: {2:0.##} FLS {3}x {4:c}",
|
||||
ii.PeriodStartDate, ii.PeriodEndDate,
|
||||
ii.UnitCount, !hasRatefactor ? "" : "x " + pRO.RateFactorText2 + " ",
|
||||
ii.DetailDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}: {2:0.##} FLS {3}x {4:c}",
|
||||
ii.PeriodStartDate, ii.PeriodEndDate,
|
||||
ii.UnitCount, !hasRatefactor ? "" : "x " + pRO.RateFactorText2 + " ",
|
||||
ii.AmountPerUnit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user