33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Report;
|
|
using BeWo.Report.ReportObjects;
|
|
using DevExpress.XtraReports.Design;
|
|
using DevExpress.XtraReports.UI;
|
|
|
|
namespace Biotop
|
|
{
|
|
public class CustomReportCreator : DefaultReportCreator
|
|
{
|
|
public override XtraReport CreateSettlementReport(string dcId, long? invoiceBaseOid)
|
|
{
|
|
long invoiceOid;
|
|
if (invoiceBaseOid.HasValue && invoiceBaseOid.Value > 0)
|
|
invoiceOid = invoiceBaseOid.Value;
|
|
else
|
|
invoiceOid = long.Parse(dcId);
|
|
|
|
var ib = DAOFactory.GenericDAO.LoadByID<InvoiceBase>(invoiceOid);
|
|
if (ib.CostBearer2SupportConcept.CostBearer.Organisation.Name.Contains("Landschaftsverband Westfalen-Lippe")
|
|
|| ib.CostBearer2SupportConcept.CostBearer.Organisation.Name == "LWL")
|
|
return base.CreateSettlementReport(dcId, invoiceBaseOid, true);
|
|
|
|
return base.CreateSettlementReport(dcId, invoiceBaseOid, false);
|
|
}
|
|
}
|
|
}
|