CreditNote: Make credit sum table bigger and other small fixes
This commit is contained in:
@ -81,15 +81,20 @@
|
|||||||
</table>
|
</table>
|
||||||
<div class="hint">
|
<div class="hint">
|
||||||
Hinweis:<br/>
|
Hinweis:<br/>
|
||||||
Die Summe der Lieferungen und die Summe der anfallenden Pönalen werden mit
|
Die Summe der Lieferungen und die Summe der anfal­lenden Pönalen werden mit
|
||||||
@Model.Payment?.Variant.Season.Precision Nachkommastellen berechnent,
|
@Model.Payment?.Variant.Season.Precision Nach­komma­stellen berechnent,
|
||||||
erst das Ergebnis wird kaufmännisch auf 2 Nachkommastellen gerundet.
|
erst das Ergebnis wird kauf­männisch auf 2 Nach­komma­stellen gerundet.
|
||||||
</div>
|
</div>
|
||||||
<table class="credit-sum">
|
<table class="credit-sum">
|
||||||
|
<colgroup>
|
||||||
|
<col style="width: auto;"/>
|
||||||
|
<col style="width: 5mm;"/>
|
||||||
|
<col style="width: 30mm;"/>
|
||||||
|
</colgroup>
|
||||||
@{
|
@{
|
||||||
string FormatRow(string name, decimal? value, bool add = false, bool bold = false, bool subCat = false, bool noTopBorder = false) {
|
string FormatRow(string name, decimal? value, bool add = false, bool bold = false, bool subCat = false, bool noTopBorder = false) {
|
||||||
return $"<tr class=\"{(!add && !noTopBorder ? "sum" : !add ? "large" : "")} {(bold ? "large bold" : "")}\">"
|
return $"<tr class=\"{(!add && !noTopBorder ? "sum" : !add ? "large" : "")} {(bold ? "large bold" : "")}\">"
|
||||||
+ $"<td class=\"{(subCat ? "small" : "")}\" style=\"overflow: visible;\">{name}:</td>"
|
+ $"<td class=\"{(subCat ? "small" : "")}\">{name}:</td>"
|
||||||
+ $"<td class=\"number {(subCat ? "small" : "large")}\">{(value < 0 ? "–" : (add ? "+" : ""))}</td>"
|
+ $"<td class=\"number {(subCat ? "small" : "large")}\">{(value < 0 ? "–" : (add ? "+" : ""))}</td>"
|
||||||
+ $"<td class=\"number {(subCat ? "small" : "large")}\">"
|
+ $"<td class=\"number {(subCat ? "small" : "large")}\">"
|
||||||
+ $"<span class=\"fleft\">{Model.CurrencySymbol}</span>{Math.Abs(value ?? 0):N2}</td>"
|
+ $"<span class=\"fleft\">{Model.CurrencySymbol}</span>{Math.Abs(value ?? 0):N2}</td>"
|
||||||
@ -148,8 +153,9 @@
|
|||||||
@if (Model.Credit == null) {
|
@if (Model.Credit == null) {
|
||||||
@Raw(FormatRow("Auszahlungsbetrag", (Model.Payment?.Amount + penalty) ?? (sum + penalty), bold: true))
|
@Raw(FormatRow("Auszahlungsbetrag", (Model.Payment?.Amount + penalty) ?? (sum + penalty), bold: true))
|
||||||
} else {
|
} else {
|
||||||
if (Model.Credit.Modifiers - penalty != 0) {
|
var diff = Model.Credit.Modifiers - penalty;
|
||||||
@Raw(FormatRow("Weitere Abzüge", Model.Credit.Modifiers - penalty, add: true))
|
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) {
|
if (Model.Credit.PrevModifiers != null && Model.Credit.PrevModifiers != 0) {
|
||||||
@Raw(FormatRow("Bereits berücksichtigte Abzüge", -Model.Credit.PrevModifiers, add: true))
|
@Raw(FormatRow("Bereits berücksichtigte Abzüge", -Model.Credit.PrevModifiers, add: true))
|
||||||
|
@ -24,8 +24,8 @@ table.credit tr.last td {
|
|||||||
}
|
}
|
||||||
|
|
||||||
table.credit-sum {
|
table.credit-sum {
|
||||||
width: 50%;
|
width: 60%;
|
||||||
margin-left: 50%;
|
margin-left: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.credit-sum tr.sum,
|
table.credit-sum tr.sum,
|
||||||
@ -41,7 +41,7 @@ table.credit-sum td.sum {
|
|||||||
.hint {
|
.hint {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-size: 8pt;
|
font-size: 8pt;
|
||||||
width: 74mm;
|
width: 56mm;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
margin: 2mm 4mm;
|
margin: 2mm 4mm;
|
||||||
|
Reference in New Issue
Block a user