Nous: NPE vermeiden, wenn Preis einer Rechnungsposition nicht gesetzt ist
This commit is contained in:
@@ -204,7 +204,13 @@ namespace Nous.Invoicing
|
||||
|
||||
public override string GetSummaryItemKey(SupportConceptApprovalPeriod scap, InvoiceItem iitem, bool summaryPerMonth)
|
||||
{
|
||||
String key = String.Format("{0}_{1}_{2}", Convert.ToDecimal(Math.Round(iitem.AmountPerUnit.Value, 2)), iitem.RateFactor, iitem.ItemDescription);
|
||||
decimal? preis = null;
|
||||
if (iitem.AmountPerUnit != null)
|
||||
{
|
||||
preis = Convert.ToDecimal(Math.Round(iitem.AmountPerUnit.Value, 2));
|
||||
}
|
||||
|
||||
String key = String.Format("{0}_{1}_{2}", preis, iitem.RateFactor, iitem.ItemDescription);
|
||||
if (summaryPerMonth)
|
||||
{
|
||||
key = String.Format("{0}_{1}_{2:yyyyMM}", iitem.AmountPerUnit, iitem.RateFactor, iitem.ItemPeriodStart);
|
||||
@@ -212,7 +218,5 @@ namespace Nous.Invoicing
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user