CreditNote: Add hint regarding calculations
This commit is contained in:
@ -79,14 +79,19 @@
|
|||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<div class="hint">
|
||||||
|
Hinweis:<br/>
|
||||||
|
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.
|
||||||
|
</div>
|
||||||
<table class="credit-sum">
|
<table class="credit-sum">
|
||||||
@{
|
@{
|
||||||
string FormatRow(string name, decimal? value, bool add = false, bool bold = false, bool subCat = false) {
|
string FormatRow(string name, decimal? value, bool add = false, bool bold = false, bool subCat = false, bool noTopBorder = false) {
|
||||||
return $"<tr class=\"{(bold ? "large bold" : "")}\">"
|
return $"<tr class=\"{(!add && !noTopBorder ? "sum" : "")} {(bold ? "large bold" : "")}\">"
|
||||||
+ $"<td colspan=\"4\"></td>"
|
+ $"<td class=\"{(subCat ? "small" : "")}\" style=\"overflow: visible;\">{name}:</td>"
|
||||||
+ $"<td class=\"{(!add ? "sum" : "")} {(subCat ? "small" : "")}\" colspan=\"4\" style=\"overflow: visible;\">{name}:</td>"
|
+ $"<td class=\"number {(subCat ? "small" : "large")}\">{(value < 0 ? "–" : (add ? "+" : ""))}</td>"
|
||||||
+ $"<td class=\"number {(subCat ? "small" : "large")} {(!add ? "sum" : "")}\">{(value < 0 ? "–" : (add ? "+" : ""))}</td>"
|
+ $"<td class=\"number {(subCat ? "small" : "large")}\">"
|
||||||
+ $"<td colspan=\"2\" class=\"number {(subCat ? "small" : "large")} {(!add ? "sum" : "")}\">"
|
|
||||||
+ $"<span class=\"fleft\">{Model.CurrencySymbol}</span>{Math.Abs(value ?? 0):N2}</td>"
|
+ $"<span class=\"fleft\">{Model.CurrencySymbol}</span>{Math.Abs(value ?? 0):N2}</td>"
|
||||||
+ $"</tr>\n";
|
+ $"</tr>\n";
|
||||||
}
|
}
|
||||||
@ -94,10 +99,10 @@
|
|||||||
<tbody style="break-inside: avoid;">
|
<tbody style="break-inside: avoid;">
|
||||||
@{ var sum = Model.Data.Rows.Sum(p => p.Amount); }
|
@{ var sum = Model.Data.Rows.Sum(p => p.Amount); }
|
||||||
@if (Model.Payment == null) {
|
@if (Model.Payment == null) {
|
||||||
@Raw(FormatRow("Gesamt", sum, bold: true))
|
@Raw(FormatRow("Gesamt", sum, bold: true, noTopBorder: true))
|
||||||
} else {
|
} else {
|
||||||
if (Model.Payment.NetAmount != Model.Payment.Amount) {
|
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))
|
@Raw(FormatRow(Model.MemberModifier, Model.Payment.Amount - Model.Payment.NetAmount, add: true))
|
||||||
}
|
}
|
||||||
if (Model.Credit == null) {
|
if (Model.Credit == null) {
|
||||||
@ -120,9 +125,8 @@
|
|||||||
|
|
||||||
@if (Model.MemberUnderDeliveries != null && Model.MemberUnderDeliveries.Count() > 0) {
|
@if (Model.MemberUnderDeliveries != null && Model.MemberUnderDeliveries.Count() > 0) {
|
||||||
<tr class="small">
|
<tr class="small">
|
||||||
<td colspan="4"></td>
|
<td colspan="2" style="padding-top: 5mm;">Anfallende Pönalen durch Unterlieferungen:</td>
|
||||||
<td colspan="5" style="padding-top: 5mm;">Anfallende Pönalen durch Unterlieferungen:</td>
|
<td></td>
|
||||||
<td colspan="2"></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
foreach (var u in Model.MemberUnderDeliveries) {
|
foreach (var u in Model.MemberUnderDeliveries) {
|
||||||
@Raw(FormatRow($"{u.Name} ({u.Kg:N0} kg)", u.Amount, add: true, subCat: true))
|
@Raw(FormatRow($"{u.Name} ({u.Kg:N0} kg)", u.Amount, add: true, subCat: true))
|
||||||
|
@ -23,6 +23,11 @@ table.credit tr.last td {
|
|||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.credit-sum {
|
||||||
|
width: 50%;
|
||||||
|
margin-left: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
table.credit-sum tr.sum,
|
table.credit-sum tr.sum,
|
||||||
table.credit-sum tr .sum {
|
table.credit-sum tr .sum {
|
||||||
font-size: 12pt;
|
font-size: 12pt;
|
||||||
@ -32,3 +37,11 @@ table.credit-sum tr.sum td,
|
|||||||
table.credit-sum td.sum {
|
table.credit-sum td.sum {
|
||||||
padding-top: 1mm !important;
|
padding-top: 1mm !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hint {
|
||||||
|
font-style: italic;
|
||||||
|
font-size: 8pt;
|
||||||
|
width: 74mm;
|
||||||
|
float: left;
|
||||||
|
margin: 2mm 4mm;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user