60 lines
1.7 KiB
C#
60 lines
1.7 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using DevExpress.XtraReports.UI;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
using System.Text.RegularExpressions;
|
|
using BS.Shared.Extensions;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
|
|
namespace Intego
|
|
{
|
|
public partial class SettlementReportLVR : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
|
|
{
|
|
public SettlementReportLVR()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(Settlement2RO pRO)
|
|
{
|
|
decimal rateFactor = 1;
|
|
|
|
foreach (var ii in pRO.InvoiceItems)
|
|
{
|
|
ii.ItemDescription = string.Format("{0:MM/yyyy} - {1:MM/yyyy}", ii.PeriodStartDate, ii.PeriodEndDate);
|
|
|
|
if (ii.RateFactor.HasValue)
|
|
{
|
|
rateFactor = (100 + ii.RateFactor.Value) / 100;
|
|
}
|
|
|
|
if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0)
|
|
{
|
|
//Zwischensumme.Visible = true;
|
|
ii.ItemDescription = "Fehlkontakte " + ii.ItemDescription;
|
|
}
|
|
|
|
ii.RateFactor = rateFactor;
|
|
}
|
|
pRO.RateFactor = (double)rateFactor;
|
|
|
|
var sc = DAOFactory.GenericDAO.GetByID<SupportConcept>(Convert.ToInt64(pRO.Notice));
|
|
lblBewilligungsbescheid.Text = sc.ApprovalDate.HasValue ? string.Format("{0:dd.MM.yyyy}", sc.ApprovalDate.Value) : "";
|
|
foreach (var c2s in sc.CostBearer2SupportConceptList)
|
|
{
|
|
if (c2s.CostBearer.Organisation.Name == pRO.RecipientOrganisation)
|
|
{
|
|
lblBewilligtVon.Text = string.Format("{0:dd.MM.yyyy}", c2s.ApprovedStartDate);
|
|
lblBewilligtBis.Text = string.Format("{0:dd.MM.yyyy}", c2s.ApprovedEndDate);
|
|
}
|
|
}
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
}
|
|
}
|