EvangelischeKirchengemeindeBottrop: Spitzabrechungserzeugung für LWL EGH + sonst wie gehabt
to be tested
This commit is contained in:
@@ -29,49 +29,75 @@ namespace EvangelischeKirchengemeindeBottrop
|
||||
ibOid = si.InvoiceBase.Oid;
|
||||
}
|
||||
|
||||
XtraReport report = null;
|
||||
Settlement2DC settlementDC;
|
||||
long result;
|
||||
|
||||
if (string.IsNullOrEmpty(dcId) && invoiceBaseOid.HasValue)
|
||||
{
|
||||
settlementDC = MapperFactory.SettlementDC_SettlementInvoice.MapToNewDC(DAOFactory.SearchDAO.GetSettlementInvoiceByInvoiceBaseOid(invoiceBaseOid.Value));
|
||||
}
|
||||
else if (Int64.TryParse(dcId, out result))
|
||||
{
|
||||
settlementDC = MapperFactory.SettlementDC_SettlementInvoice.MapToNewDC(DAOFactory.GenericDAO.LoadByID<SettlementInvoice>(result));
|
||||
}
|
||||
else
|
||||
{
|
||||
string lPath = BS.Shared.Core.Utils.CreateSavePath(TempPath, dcId);
|
||||
settlementDC = Utils.XMLDeserialize<Settlement2DC>(lPath);
|
||||
}
|
||||
|
||||
bool lwlEgh = false;
|
||||
if (ibOid.HasValue && ibOid.Value > 0)
|
||||
{
|
||||
var ib = DAOFactory.GenericDAO.LoadByID<InvoiceBase>(ibOid.Value);
|
||||
string cbName = ib.CostBearer2SupportConcept.CostBearer.Organisation.Name;
|
||||
if (cbName.ToLower().Contains("lwl egh"))
|
||||
{
|
||||
return base.CreateSettlementReport(dcId, ibOid, true);
|
||||
lwlEgh = true;
|
||||
}
|
||||
}
|
||||
return base.CreateSettlementReport(dcId, invoiceBaseOid, false);
|
||||
}
|
||||
|
||||
private XtraReport CreateLwlEGHSettlementReport(String dcId, long? invoiceBaseOid)
|
||||
{
|
||||
XtraReport report = null;
|
||||
|
||||
Settlement2DC lSettlementDC;
|
||||
|
||||
long result;
|
||||
|
||||
if (string.IsNullOrEmpty(dcId) && invoiceBaseOid.HasValue)
|
||||
{
|
||||
lSettlementDC = MapperFactory.SettlementDC_SettlementInvoice.MapToNewDC(DAOFactory.SearchDAO.GetSettlementInvoiceByInvoiceBaseOid(invoiceBaseOid.Value));
|
||||
}
|
||||
else if (Int64.TryParse(dcId, out result))
|
||||
|
||||
if (lwlEgh)
|
||||
{
|
||||
lSettlementDC = MapperFactory.SettlementDC_SettlementInvoice.MapToNewDC(DAOFactory.GenericDAO.LoadByID<SettlementInvoice>(result)); // = Utils.XMLDeserialize<SettlementDC>(lPath);
|
||||
IBeWoReport<SettlementRO> budgetNachweis = new Budgetnachweis();
|
||||
var ro = SettlementRO.Create(settlementDC);
|
||||
budgetNachweis.SetReportDataSource(ro);
|
||||
report = budgetNachweis as XtraReport;
|
||||
|
||||
if (report != null)
|
||||
{
|
||||
report.CreateDocument();
|
||||
|
||||
var anhang = CreateBudgetnachweisAnhang(settlementDC);
|
||||
if (anhang != null)
|
||||
{
|
||||
anhang.CreateDocument();
|
||||
report.Pages.AddRange(anhang.Pages);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string lPath = BS.Shared.Core.Utils.CreateSavePath(TempPath, dcId);
|
||||
lSettlementDC = Utils.XMLDeserialize<Settlement2DC>(lPath);
|
||||
}
|
||||
{
|
||||
if (settlementDC.DifferentHourlyRateCount > 0)
|
||||
{
|
||||
IBeWoReport<SettlementRO> spitzabrechnungBeWo67 = new SpitzabrechnungBeWo67();
|
||||
var ro = SettlementRO.Create(settlementDC);
|
||||
spitzabrechnungBeWo67.SetReportDataSource(ro);
|
||||
|
||||
IBeWoReport<SettlementRO> lSettlementReport = new Budgetnachweis();
|
||||
var ro = SettlementRO.Create(lSettlementDC);
|
||||
lSettlementReport.SetReportDataSource(ro);
|
||||
report = lSettlementReport as XtraReport;
|
||||
report = spitzabrechnungBeWo67 as XtraReport;
|
||||
}
|
||||
else
|
||||
{
|
||||
IBeWoReport<Settlement2RO> spitzabrechnung2BeWo67 = new Spitzabrechnung2BeWo67();
|
||||
spitzabrechnung2BeWo67.SetReportDataSource(Settlement2RO.Create(settlementDC));
|
||||
report = spitzabrechnung2BeWo67 as XtraReport;
|
||||
}
|
||||
}
|
||||
|
||||
return report;
|
||||
}
|
||||
|
||||
|
||||
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
|
||||
{
|
||||
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
|
||||
|
||||
@@ -10,12 +10,12 @@ using DevExpress.XtraReports.UI;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWo.Report;
|
||||
|
||||
namespace EvangelischeKirchengemeindeBottrop.Neu
|
||||
namespace EvangelischeKirchengemeindeBottrop
|
||||
{
|
||||
|
||||
public partial class SpitzabrechnungBeWo67 : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
|
||||
public partial class Spitzabrechnung2BeWo67 : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
|
||||
{
|
||||
public SpitzabrechnungBeWo67()
|
||||
public Spitzabrechnung2BeWo67()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using BeWo.Report.ReportObjects;
|
||||
namespace EvangelischeKirchengemeindeBottrop.Neu
|
||||
namespace EvangelischeKirchengemeindeBottrop
|
||||
{
|
||||
partial class SpitzabrechnungBeWo67
|
||||
partial class Spitzabrechnung2BeWo67
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
|
||||
Reference in New Issue
Block a user