61 lines
1.9 KiB
C#
61 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using BeWo.Service.Reporting;
|
|
using BS.Shared;
|
|
using BS.Shared.Core;
|
|
using BS.Shared.DataContracts;
|
|
using BS.Shared.Services;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Service.DCEntityMapper;
|
|
using BeWo.Service.Plugins;
|
|
|
|
namespace RosegGmbH.Reporting
|
|
{
|
|
public class CustomAnnualReportFactory : AnnualReportFactory
|
|
{
|
|
protected override bool StichtagsbezogenAuswerten
|
|
{
|
|
get { return false; }
|
|
}
|
|
|
|
public override bool ShouldProcessSupportConcept(CostBearer2SupportConcept iCb2Sc, SupportConcept sc, Customer customer)
|
|
{
|
|
if (sc.IsActive != ActivationTypeId.Deleted && customer.IsActive != ActivationTypeId.Deleted)
|
|
{
|
|
if ((iCb2Sc.StartDate.HasValue && iCb2Sc.EndDate.HasValue))
|
|
{
|
|
if (CustomerBelongsToTeam(customer, TeamOid) &&
|
|
IsCustomerOfCustomerCareType(customer, CustomerCareTypeValueListEntryOid))
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public override List<AnnualReportDC> CreateAnnualReport(CostBearer cb, long? teamOid, long? customerCareTypeValueListEntryOid, DateTime reportStartDate,
|
|
DateTime reportEndDate)
|
|
{
|
|
var list = base.CreateAnnualReport(cb, teamOid, customerCareTypeValueListEntryOid, reportStartDate, reportEndDate);
|
|
|
|
foreach (var report in list)
|
|
{
|
|
report.Name = report.Name.Replace("FLS", "Std.");
|
|
|
|
if (report.Data != null)
|
|
{
|
|
foreach (var data in report.Data)
|
|
{
|
|
data.Name = data.Name.Replace("FLS", "Std.");
|
|
}
|
|
}
|
|
}
|
|
|
|
return list;
|
|
}
|
|
}
|
|
} |