diff --git a/Elwig/Documents/CreditNote.cshtml b/Elwig/Documents/CreditNote.cshtml index 9cc9f60..1a89c02 100644 --- a/Elwig/Documents/CreditNote.cshtml +++ b/Elwig/Documents/CreditNote.cshtml @@ -79,14 +79,19 @@ } +
+ 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. +
@{ - string FormatRow(string name, decimal? value, bool add = false, bool bold = false, bool subCat = false) { - return $"" - + $"" - + $"" - + $"" - + $"" + + $"" + + $"" + + $"" + $"\n"; } @@ -94,10 +99,10 @@ @{ var sum = Model.Data.Rows.Sum(p => p.Amount); } @if (Model.Payment == null) { - @Raw(FormatRow("Gesamt", sum, bold: true)) + @Raw(FormatRow("Gesamt", sum, bold: true, noTopBorder: true)) } else { if (Model.Payment.NetAmount != Model.Payment.Amount) { - @Raw(FormatRow("Zwischensumme", Model.Payment.NetAmount)) + @Raw(FormatRow("Zwischensumme", Model.Payment.NetAmount, noTopBorder: true)) @Raw(FormatRow(Model.MemberModifier, Model.Payment.Amount - Model.Payment.NetAmount, add: true)) } if (Model.Credit == null) { @@ -120,9 +125,8 @@ @if (Model.MemberUnderDeliveries != null && Model.MemberUnderDeliveries.Count() > 0) { - - - + + foreach (var u in Model.MemberUnderDeliveries) { @Raw(FormatRow($"{u.Name} ({u.Kg:N0} kg)", u.Amount, add: true, subCat: true)) diff --git a/Elwig/Documents/CreditNote.css b/Elwig/Documents/CreditNote.css index 5729ecf..6ab6fff 100644 --- a/Elwig/Documents/CreditNote.css +++ b/Elwig/Documents/CreditNote.css @@ -23,6 +23,11 @@ table.credit tr.last td { padding-bottom: 0; } +table.credit-sum { + width: 50%; + margin-left: 50%; +} + table.credit-sum tr.sum, table.credit-sum tr .sum { font-size: 12pt; @@ -32,3 +37,11 @@ table.credit-sum tr.sum td, table.credit-sum td.sum { padding-top: 1mm !important; } + +.hint { + font-style: italic; + font-size: 8pt; + width: 74mm; + float: left; + margin: 2mm 4mm; +}
{name}:{(value < 0 ? "–" : (add ? "+" : ""))}" + string FormatRow(string name, decimal? value, bool add = false, bool bold = false, bool subCat = false, bool noTopBorder = false) { + return $"
{name}:{(value < 0 ? "–" : (add ? "+" : ""))}" + $"{Model.CurrencySymbol}{Math.Abs(value ?? 0):N2}
Anfallende Pönalen durch Unterlieferungen:Anfallende Pönalen durch Unterlieferungen: