diff --git a/Elwig/Documents/CreditNote.cshtml b/Elwig/Documents/CreditNote.cshtml index d73d23e..d257fb1 100644 --- a/Elwig/Documents/CreditNote.cshtml +++ b/Elwig/Documents/CreditNote.cshtml @@ -81,15 +81,20 @@
Hinweis:
- Die Summe der Lieferungen und die Summe der anfallenden Pönalen werden mit - @Model.Payment?.Variant.Season.Precision Nachkommastellen berechnent, - erst das Ergebnis wird kaufmännisch auf 2 Nachkommastellen gerundet. + Die Summe der Lieferungen und die Summe der anfal­lenden Pönalen werden mit + @Model.Payment?.Variant.Season.Precision Nach­komma­stellen berechnent, + erst das Ergebnis wird kauf­männisch auf 2 Nach­komma­stellen gerundet.
+ + + + + @{ string FormatRow(string name, decimal? value, bool add = false, bool bold = false, bool subCat = false, bool noTopBorder = false) { return $"" - + $"" + + $"" + $"" + $"" @@ -148,8 +153,9 @@ @if (Model.Credit == null) { @Raw(FormatRow("Auszahlungsbetrag", (Model.Payment?.Amount + penalty) ?? (sum + penalty), bold: true)) } else { - if (Model.Credit.Modifiers - penalty != 0) { - @Raw(FormatRow("Weitere Abzüge", Model.Credit.Modifiers - penalty, add: true)) + var diff = Model.Credit.Modifiers - penalty; + if (diff != 0) { + @Raw(FormatRow(diff < 0 ? "Weitere Abzüge" : "Weitere Zuschläge", diff, add: true)) } if (Model.Credit.PrevModifiers != null && Model.Credit.PrevModifiers != 0) { @Raw(FormatRow("Bereits berücksichtigte Abzüge", -Model.Credit.PrevModifiers, add: true)) diff --git a/Elwig/Documents/CreditNote.css b/Elwig/Documents/CreditNote.css index 3a2ddbf..fd9e79c 100644 --- a/Elwig/Documents/CreditNote.css +++ b/Elwig/Documents/CreditNote.css @@ -24,8 +24,8 @@ table.credit tr.last td { } table.credit-sum { - width: 50%; - margin-left: 50%; + width: 60%; + margin-left: 40%; } table.credit-sum tr.sum, @@ -41,7 +41,7 @@ table.credit-sum td.sum { .hint { font-style: italic; font-size: 8pt; - width: 74mm; + width: 56mm; position: absolute; left: 0; margin: 2mm 4mm;
{name}:{name}:{(value < 0 ? "–" : (add ? "+" : ""))}" + $"{Model.CurrencySymbol}{Math.Abs(value ?? 0):N2}