ChristopherusHaus/Export/SimbaExporter - Fehlerfix für Pooling nicht volle Monate
This commit is contained in:
@@ -87,26 +87,26 @@ namespace BeWo.ChristopherusHaus.Export
|
||||
{
|
||||
double betrag = 0.00;
|
||||
Double.TryParse(row[1].ToString(), out betrag);
|
||||
var scap = DAOFactory.GenericDAO.LoadByID<SupportConceptApprovalPeriod>(scapOid);
|
||||
TimeSpan spanOrg = new TimeSpan((long)(lastDate - start).TotalDays);
|
||||
TimeSpan span = spanOrg;
|
||||
if (scap.StartDate.HasValue && scap.StartDate.Value.Date > start.Date)
|
||||
{
|
||||
span = new TimeSpan((long)(lastDate - scap.StartDate.Value).TotalDays);
|
||||
}
|
||||
if (scap.EndDate.HasValue && scap.EndDate.Value.Date < lastDate.Date)
|
||||
{
|
||||
span = new TimeSpan((long)(scap.EndDate.Value.Date - start).TotalDays);
|
||||
}
|
||||
if (span < spanOrg)
|
||||
{
|
||||
var betragTag = betrag / 7;
|
||||
betrag = betragTag * span.TotalDays;
|
||||
}
|
||||
else
|
||||
{
|
||||
betrag = betrag * 4.34;
|
||||
}
|
||||
// Anpassung zur tagesgenauen Abgrenzung bei Pooling, wenn nicht voller Monat
|
||||
// ab 22.01.2026 auskommentiert
|
||||
//var scap = DAOFactory.GenericDAO.LoadByID<SupportConceptApprovalPeriod>(scapOid);
|
||||
//TimeSpan spanOrg = new TimeSpan((long)(lastDate - start).TotalDays);
|
||||
//TimeSpan span = spanOrg;
|
||||
//if (scap.StartDate.HasValue && scap.StartDate.Value.Date > start.Date)
|
||||
//{
|
||||
// span = new TimeSpan((long)(lastDate - scap.StartDate.Value).TotalDays);
|
||||
//}
|
||||
//if (scap.EndDate.HasValue && scap.EndDate.Value.Date < lastDate.Date)
|
||||
//{
|
||||
// span = new TimeSpan((long)(scap.EndDate.Value.Date - start).TotalDays);
|
||||
//}
|
||||
//if (span < spanOrg)
|
||||
//{
|
||||
// var betragTag = betrag / 7;
|
||||
// betrag = betragTag * span.Ticks;
|
||||
//}
|
||||
|
||||
betrag = betrag * 4.34;
|
||||
sb.Append(String.Format("{0:0.00}", Math.Round(betrag, 2, MidpointRounding.AwayFromZero)));
|
||||
row[1] = String.Format("{0:0.00}", Math.Round(betrag, 2, MidpointRounding.AwayFromZero)); // Übergabe neuer Betrag ins PDF
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user