134 lines
5.0 KiB
C#
134 lines
5.0 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.Collections;
|
|
using System.ComponentModel;
|
|
using BeWo.Data.Access;
|
|
using BeWo.Data.Entities;
|
|
using BeWo.Report.ReportObjects;
|
|
using BeWo.Report;
|
|
using BS.Shared;
|
|
using DevExpress.XtraPrinting.Native;
|
|
|
|
namespace BeWo.SchillingerReports
|
|
{
|
|
public partial class Spitzabrechnung : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<SettlementRO>
|
|
{
|
|
public Spitzabrechnung()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void SetReportDataSource(SettlementRO pRO)
|
|
{
|
|
if (pRO.ClaimWithEigenbeteiligung >= 0)
|
|
lblClaimText.Text = "Restforderung";
|
|
|
|
pRO.ApprovedFLSWeekly *= (decimal)pRO.RateFactor;
|
|
pRO.ApprovedFLSWeekly = Math.Round(pRO.ApprovedFLSWeekly, 2);
|
|
|
|
DateTime dt1;
|
|
DateTime dt2;
|
|
DateTime.TryParse(pRO.AccountingStartDateString, out dt1);
|
|
DateTime.TryParse(pRO.AccountingEndDateString, out dt2);
|
|
|
|
TimeSpan sp = dt2.Subtract(dt1);
|
|
//lblTage3.Text = String.Format("{0:0.#}", sp.TotalDays + 1);
|
|
//lblWeeks3.Text = String.Format("{0:0.##}", (sp.TotalDays + 1) * 0.1427);
|
|
//lblFLSTotal3.Text = String.Format("{0:0.##} FLS", Math.Round((sp.TotalDays + 1) * 0.1427, 2) * (double)pRO.ApprovedFLSWeekly);
|
|
|
|
lblFLSTotal3.Text = String.Format("{0}", pRO.ApprovedFLSWithFactor);
|
|
|
|
//lblTage1.Text = lblTage3.Text;
|
|
//lblWeeks1.Text = lblWeeks3.Text;
|
|
lblFLSTotal1.Text = lblFLSTotal3.Text;
|
|
|
|
//lblTage2.Text = lblTage3.Text;
|
|
//lblWeeks2.Text = lblWeeks3.Text;
|
|
lblFLSTotal2.Text = lblFLSTotal3.Text;
|
|
|
|
pRO.ApprovedFLSWeeklyString = String.Format("{0}", pRO.ApprovedFLS);
|
|
if (pRO.RateFactor > 1)
|
|
{
|
|
pRO.ApprovedFLSWeeklyString = String.Format("{0} x {1:0.##}", pRO.ApprovedFLS.Replace("FLS", "").Trim(), pRO.RateFactor);
|
|
}
|
|
//pRO.ApprovedFLS *= (decimal)pRO.RateFactor;
|
|
|
|
|
|
|
|
panel1.Location = panel3.Location;
|
|
panel2.Location = panel3.Location;
|
|
|
|
if (pRO.DifferentHourlyRateCount == 1)
|
|
{
|
|
pRO.TotalApprovedFLSWithNewHourlyRate = Math.Round(pRO.ApprovedFLSWeekly * pRO.WeeksWithNewHourlyRate, 2);
|
|
pRO.TotalApprovedFLSWithNewHourlyRateString = string.Format("{0:0.00}", pRO.TotalApprovedFLSWithNewHourlyRate);
|
|
|
|
panel3.Visible = false;
|
|
panel2.Visible = false;
|
|
panel1.Visible = true;
|
|
|
|
if (pRO.RateFactor != 1)
|
|
{
|
|
pRO.RecordedFLSWithNewHourlyRateString = String.Format("{0:0.00} x {1:0.##}", pRO.GeleisteteFLSMitStundensatzAktuell, pRO.RateFactor);
|
|
}
|
|
}
|
|
|
|
else if (pRO.DifferentHourlyRateCount == 2)
|
|
{
|
|
panel2.Visible = true;
|
|
panel1.Visible = false;
|
|
panel3.Visible = false;
|
|
if (pRO.RateFactor != 1)
|
|
{
|
|
pRO.RecordedFLSWithNewHourlyRateString = String.Format("{0:0.00} x {1:0.##}", pRO.GeleisteteFLSMitStundensatzAktuell, pRO.RateFactor);
|
|
pRO.RecordedFLSWithOldHourlyRateString = String.Format("{0:0.00} x {1:0.##}", pRO.GeleisteteFLSMitStundensatzAlt, pRO.RateFactor);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
panel2.Visible = false;
|
|
panel1.Visible = false;
|
|
panel3.Visible = true;
|
|
|
|
pRO.RecordedFLSWithNewHourlyRateString = String.Format("{0:0.00} x {1:0.##}", pRO.GeleisteteFLSMitStundensatzAktuell, pRO.RateFactor);
|
|
pRO.RecordedFLSWithOldHourlyRateString = String.Format("{0:0.00} x {1:0.##}", pRO.GeleisteteFLSMitStundensatzAlt, pRO.RateFactor);
|
|
pRO.RecordedFLSWithHourlyRate3String = String.Format("{0:0.00} x {1:0.##}", pRO.GeleisteteFLSMitStundensatz3, pRO.RateFactor);
|
|
}
|
|
|
|
//var ba = GetBetreuungsart(pRO);
|
|
//if (!String.IsNullOrEmpty(ba) && ba.ToLower().Contains("essen"))
|
|
//{
|
|
// lblAnbieter1.Text = "TaB Essen";
|
|
// lblAnbieter2.Text = "Meißener Str. 27";
|
|
// lblAnbieter3.Text = "45145 Essen";
|
|
//}
|
|
//else
|
|
//{
|
|
lblAnbieter1.Text = "Hilfe Daheim/Hand in Hand";
|
|
lblAnbieter2.Text = "Steinbrinkstraße 155";
|
|
lblAnbieter3.Text = "46145 Oberhausen";
|
|
//}
|
|
|
|
this.bindingSource1.DataSource = pRO;
|
|
}
|
|
|
|
public String GetBetreuungsart(SettlementRO pRO)
|
|
{
|
|
|
|
var c2s = DAOFactory.GenericDAO.LoadByID<CostBearer2SupportConcept>(pRO.CostBearer2SupportConceptOid);
|
|
lblMonatlEigenbeteiligung.Text = string.Format("{0:0.00}", c2s.SupportConcept.Customer.EquityContribution);
|
|
|
|
|
|
foreach (var v2o in c2s.SupportConcept.Customer.ValueList)
|
|
{
|
|
if (v2o.Entry.Type == ValueListEntryType.CustomerCareType)
|
|
{
|
|
return v2o.Entry.Value;
|
|
}
|
|
}
|
|
|
|
return "";
|
|
}
|
|
}
|
|
}
|