PraxisPusteblume: Behandlungsnachweis robuster gemacht (wg. NPE beim Kunden)
This commit is contained in:
@@ -142,16 +142,14 @@ namespace PraxisPusteblume
|
||||
|
||||
foreach (var i in p.ServiceInvoiceItems)
|
||||
{
|
||||
if (i.UnitCount.HasValue)
|
||||
if (i.UnitCount != null && i.UnitCount.HasValue)
|
||||
{
|
||||
i.UnitCountString = InvoiceHelper.GetUnitString(i.UnitCount);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (i.ServiceDescription.Contains("Gruppe"))
|
||||
if (i.ServiceDescription != null && i.ServiceDescription.Contains("Gruppe"))
|
||||
{
|
||||
if (i.HourlyRate.HasValue && i.Hours.HasValue)
|
||||
if (i.HourlyRate != null && i.HourlyRate.HasValue && i.HourlyRate != null && i.Hours.HasValue)
|
||||
{
|
||||
if (!gruppenHours.ContainsKey(i.ServiceDescription))
|
||||
{
|
||||
@@ -164,13 +162,12 @@ namespace PraxisPusteblume
|
||||
gruppenClaim[i.ServiceDescription] += (i.Hours.Value * (i.HourlyRate ?? 0));
|
||||
}
|
||||
|
||||
|
||||
i.UnitDescription = i.ServiceDescription;
|
||||
i.UnitDescription = i.UnitDescription.Replace("Gruppe mit", "").Replace("Kindern", "").Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i.HourlyRate.HasValue)
|
||||
if (i.HourlyRate != null && i.HourlyRate.HasValue)
|
||||
{
|
||||
hourlyRate = i.HourlyRate.Value;
|
||||
|
||||
@@ -184,7 +181,7 @@ namespace PraxisPusteblume
|
||||
//}
|
||||
}
|
||||
|
||||
if (i.Hours.HasValue)
|
||||
if (i.Hours != null && i.Hours.HasValue)
|
||||
{
|
||||
hours += i.Hours.Value;
|
||||
|
||||
|
||||
@@ -97,9 +97,9 @@ namespace PraxisPusteblume
|
||||
{
|
||||
i.Notice = String.Format("{0:dd.MM.yyyy} / KW {1}", i.AccountingPeriodStart, InvoiceHelper.GetKW(i.AccountingPeriodStart.Value));
|
||||
|
||||
if (i.UnitCount.HasValue)
|
||||
if (i.UnitCount != null && i.UnitCount.HasValue)
|
||||
{
|
||||
i.UnitCountString = String.Format("{0:0.##} Behandlungseinheit á {1:c}", i.UnitCount,
|
||||
i.UnitCountString = String.Format("{0:0.##} Behandlungseinheit à {1:c}", i.UnitCount,
|
||||
i.AmountPerUnit);
|
||||
}
|
||||
//i.ServiceDescription =
|
||||
|
||||
Reference in New Issue
Block a user