2016-06-27 01:45:38 +02:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
using BeWo.Report;
|
|
|
|
|
using BeWo.Report.ReportObjects;
|
|
|
|
|
|
|
|
|
|
using DevExpress.XtraReports.UI;
|
|
|
|
|
|
|
|
|
|
namespace IndroABW
|
|
|
|
|
{
|
|
|
|
|
public partial class Stundenzettel : XtraReport, IBeWoReport<ServicesOverviewRO>
|
|
|
|
|
{
|
|
|
|
|
public Stundenzettel()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetReportDataSource(ServicesOverviewRO pRO)
|
|
|
|
|
{
|
|
|
|
|
if (pRO.Services != null)
|
|
|
|
|
{
|
|
|
|
|
var servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
|
|
|
|
|
|
|
|
|
|
foreach (ServicesOverviewRO.ServiceDetail s in pRO.Services)
|
|
|
|
|
{
|
2026-02-10 17:03:59 +01:00
|
|
|
if (s.IsBillable || s.ServiceDescription.ToLower().Contains("fehlkontakt") || s.ServiceCategory.ToLower().Contains("fehlkontakt"))
|
|
|
|
|
{
|
|
|
|
|
s.Notice5 = "E";
|
|
|
|
|
}
|
|
|
|
|
if (s.IsGroup)
|
|
|
|
|
{
|
|
|
|
|
s.Notice5 = "GR";
|
|
|
|
|
}
|
|
|
|
|
if (s.ServiceDescription.ToLower().Contains("fehlkontakt") || s.ServiceCategory.ToLower().Contains("fehlkontakt") || (s.ProzentAbrechenbar < 100))
|
|
|
|
|
{
|
|
|
|
|
s.Notice5 = "F";
|
|
|
|
|
}
|
|
|
|
|
if (s.StartDate.Second == 0)
|
2016-06-27 01:45:38 +02:00
|
|
|
{
|
|
|
|
|
s.TimeRangeString = String.Format("{0} - {1}", s.StartDate.ToShortTimeString(), s.EndDate.ToShortTimeString());
|
|
|
|
|
}
|
|
|
|
|
if (s.IsBillable)
|
|
|
|
|
servicesBillable.Add(s);
|
|
|
|
|
}
|
2026-02-10 17:03:59 +01:00
|
|
|
pRO.Services = servicesBillable;
|
2016-06-27 01:45:38 +02:00
|
|
|
}
|
|
|
|
|
bindingSource1.DataSource = pRO;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|