Files
BeWoPlaner/ReportImp/ChristopherusHausMID/CustomReportCreator.cs
Christian 1fef984037 - Ersteinrichtung LH Bad Kreuznach FUD
- Projekt Kopie LH Remscheid -> LH Remscheid Frühförderung nach DB Spiegelung
- Bugfixing Pool Abrechnung Christopherus Haus
- Änderung Ansprechpartner LH Frankfurt Oder
- Leistungsnachweis für KK Praxis Pusteblume
- Bugfixing Kloss Vertretungssuche und Frau Hildmann diverse Stundenkonten
2025-05-15 20:41:41 +02:00

67 lines
2.7 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.DefaultReports;
using BeWo.Report.ReportObjects;
using BeWo.Service.DCEntityMapper;
using DevExpress.XtraReports.UI;
namespace ChristopherusHausMID.Reporting
{
public class CustomReportCreator : DefaultReportCreator
{
public override XtraReport CreateSbdLeistungsnachweisForAllCustomers(int month, int year, long orgaOid, long empOid, long serviceCategoryOid, int startDay, int endDay, bool checkServiceRecords, string bundesland)
{
return CreateReportForStundenaufstellungROs(SbdStundenaufstellungRO.Create(month, year, orgaOid, empOid, serviceCategoryOid, startDay, endDay, true, "nrw", false));
}
public override XtraReport CreateSbdLeistungsnachweisForSingleCustomerReport(long customerOid, int month, int year, long orgaOid, long empOid, long serviceCategoryOid, int startDay, int endDay, bool checkServiceRecords, string bundesland)
{
return CreateReportForStundenaufstellungROs(SbdStundenaufstellungRO.Create(customerOid, month, year, orgaOid, empOid, serviceCategoryOid, startDay, endDay, true, "nrw", false, false));
}
public override XtraReport CreateServiceInvoiceReport(string dcIds, long? invoiceBaseOid)
{
var master = base.CreateServiceInvoiceReport(dcIds, invoiceBaseOid);
var oid = invoiceBaseOid;
if (oid == null && !String.IsNullOrEmpty(dcIds))
{
if (Int64.TryParse(dcIds, out var temp))
{
oid = temp;
}
}
//Füge Leistungsnachweis als Anhang hinzu
if (oid.HasValue)
{
var i = DAOFactory.GenericDAO.LoadByID<ServiceInvoice>(oid.Value);
if (i.InvoiceBase.CostBearer2SupportConcept != null)
{
int month = i.InvoiceBase.AccountingPeriodStart.Value.Month;
int year = i.InvoiceBase.AccountingPeriodStart.Value.Year;
long cOid = i.InvoiceBase.CostBearer2SupportConcept.SupportConcept.Customer.Oid.Value;
var qb = CreateServiceOverviewSingleCustomerReport(cOid, month, year, 0, 0, null, 1, DateTime.DaysInMonth(year, month));
qb.CreateDocument();
if (master.Pages.Count == 0)
{
master.CreateDocument();
}
master.Pages.AddRange(qb.Pages);
}
}
return master;
}
}
}