RatPlusTat/SettlementReport2 ergänzt

This commit is contained in:
2024-02-07 13:11:41 +01:00
parent c280c6a9e4
commit 78f0bd5cac
6 changed files with 6028 additions and 2 deletions

View File

@@ -111,6 +111,12 @@
</Compile>
<Compile Include="RatPlusTatReportCreator.cs" />
<Compile Include="Service\CustomVacationService.cs" />
<Compile Include="SettlementReport2.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="SettlementReport2.Designer.cs">
<DependentUpon>SettlementReport2.cs</DependentUpon>
</Compile>
<Compile Include="SettlementReport.cs">
<SubType>Component</SubType>
</Compile>
@@ -161,6 +167,10 @@
<DependentUpon>RechungAssistenz.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SettlementReport2.resx">
<DependentUpon>SettlementReport2.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SettlementReport.resx">
<DependentUpon>SettlementReport.cs</DependentUpon>
<SubType>Designer</SubType>

View File

@@ -1,4 +1,4 @@
namespace RatPlusTat
namespace RatPlusTat.Alt
{
partial class Spitzabrechnung
{

View File

@@ -6,7 +6,7 @@ using BeWo.Report;
using BeWo.Report.ReportObjects;
using BS.Shared.DataContracts;
namespace RatPlusTat
namespace RatPlusTat.Alt
{
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<SettlementRO>
{

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,72 @@
using System;
using System.Collections.Generic;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Report;
using BeWo.Report.ReportObjects;
using DevExpress.XtraReports.UI;
using BS.Shared.Extensions;
namespace RatPlusTat
{
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<Settlement2RO>
{
public Spitzabrechnung()
{
InitializeComponent();
}
public void SetReportDataSource(Settlement2RO pRO)
{
if (String.IsNullOrEmpty(pRO.Notice))
{
lblNotice.Visible = false;
}
decimal rateFactor = 1;
foreach (var ii in pRO.InvoiceItems)
{
if (ii.RateFactor.HasValue)
{
rateFactor = (100 + ii.RateFactor.Value) / 100;
}
if (!pRO.FehlkontakteString.IsNullOrEmpty() && ii.RateFactor == 0)
{
GroupFooter2.Visible = true;
ii.AbrechnungsText = ii.AbrechnungsText.Replace("FLS", "Std.");
ii.ItemDescription = "Fehlkontakte";
}
else if (ii.ItemDescription.IsNullOrEmpty())
{
ii.ItemDescription = "Fachleistungsstunden";
}
}
pRO.RateFactor = (double)rateFactor;
if (pRO.FinalSentence.IndexOf("Die geleistete Überzahlung") == 0)
pRO.FinalSentence = "Wir bitten Sie um eine Verrechnung der Überzahlung.";
SetzeWohnort(pRO);
this.bindingSource1.DataSource = pRO;
}
private void SetzeWohnort(Settlement2RO pRo)
{
if (pRo.InvoiceBaseOid.HasValue)
{
var ib = DAOFactory.GenericDAO.LoadByID<InvoiceBase>(pRo.InvoiceBaseOid.Value);
if (ib.CostBearer2SupportConcept != null)
{
var c = ib.CostBearer2SupportConcept.SupportConcept.Customer;
if (c != null && c.Person.Address != null)
{
lblCustomerDaten.Text = String.Format("{0}, {1} {2}, geb. {3:dd.MM.yyyy}", c.Person.Address.Street, c.Person.Address.PostalCode, c.Person.Address.Town, pRo.CustomerBirthday);
}
}
}
}
}
}

File diff suppressed because one or more lines are too long