Wabe/Invoicing/CollectiveInvoiceCreation.cs - letzter Betreuungstag ohne Abrechnung
This commit is contained in:
@@ -101,13 +101,30 @@ namespace Wabe.Invoicing
|
||||
DateTime start;
|
||||
DateTime ende;
|
||||
if (scap.StartDate <= serviceInvoicePeriod.Start)
|
||||
{
|
||||
start = serviceInvoicePeriod.Start.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
start = (DateTime)scap.StartDate; //Einzugstag wird mit abgerechnet
|
||||
if (scap.EndDate >= serviceInvoicePeriod.End)
|
||||
ende = serviceInvoicePeriod.End.Value;
|
||||
}
|
||||
if (cb2sc.SupportConcept.Customer.TerminationDate.HasValue &&
|
||||
cb2sc.SupportConcept.Customer.TerminationDate.Value <= scap.EndDate.Value
|
||||
&& cb2sc.SupportConcept.Customer.TerminationDate >= scap.StartDate.Value)
|
||||
{
|
||||
ende = cb2sc.SupportConcept.Customer.TerminationDate.Value.AddDays(-1); // finaler Auszugstag wird NICHT abgerechnet
|
||||
}
|
||||
else
|
||||
ende = (DateTime)scap.EndDate.Value.AddDays(-1); //Auszugstag wird NICHT abgerechnet
|
||||
{
|
||||
if (scap.EndDate >= serviceInvoicePeriod.End)
|
||||
{
|
||||
ende = serviceInvoicePeriod.End.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
ende = (DateTime)scap.EndDate.Value;
|
||||
}
|
||||
}
|
||||
|
||||
decimal tagessatz = 0;
|
||||
var crList = scap.ServiceCategory.CostRatePeriods;
|
||||
|
||||
Reference in New Issue
Block a user