diff --git a/Elwig/Documents/CreditNote.cshtml b/Elwig/Documents/CreditNote.cshtml index 8e098fd..6d43827 100644 --- a/Elwig/Documents/CreditNote.cshtml +++ b/Elwig/Documents/CreditNote.cshtml @@ -136,7 +136,10 @@ } - @{ decimal penalty = 0; } + @{ + decimal penalty = 0; + string? comment = null; + } @if (Model.MemberUnderDeliveries != null && Model.MemberUnderDeliveries.Count() > 0) { @@ -158,7 +161,13 @@ penalty += Model.MemberAutoBusinessSharesAmount; } @if (Model.CustomPayment?.Amount != null) { - @Raw(FormatRow(Model.CustomPayment.Comment ?? ((Model.CustomPayment.Amount.Value) < 0 ? "Weitere Abzüge" : "Weitere Zuschläge"), Model.CustomPayment.Amount.Value, add: true)); + comment = Model.CustomPayment.Comment; + string text = (Model.CustomPayment.Amount.Value < 0 ? "Weitere Abzüge" : "Weitere Zuschläge") + (comment != null ? "*" : ""); + if (comment != null && comment!.Length <= 30) { + text = comment; + comment = null; + } + @Raw(FormatRow(text, Model.CustomPayment.Amount.Value, add: true)); penalty += Model.CustomPayment.Amount.Value; } @@ -176,6 +185,9 @@ } + @if (comment != null) { +

* @comment

+ }

Überweisung erfolgt auf Konto @(Elwig.Helpers.Utils.FormatIban(Model.Member.Iban ?? "-")).

@if (Model.Text != null) {