CreditNote: Fix styling
This commit is contained in:
@ -88,7 +88,7 @@
|
||||
<table class="credit-sum">
|
||||
@{
|
||||
string FormatRow(string name, decimal? value, bool add = false, bool bold = false, bool subCat = false, bool noTopBorder = false) {
|
||||
return $"<tr class=\"{(!add && !noTopBorder ? "sum" : "")} {(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=\"number {(subCat ? "small" : "large")}\">{(value < 0 ? "–" : (add ? "+" : ""))}</td>"
|
||||
+ $"<td class=\"number {(subCat ? "small" : "large")}\">"
|
||||
@ -101,12 +101,14 @@
|
||||
@if (Model.Payment == null) {
|
||||
@Raw(FormatRow("Gesamt", sum, bold: true, noTopBorder: true))
|
||||
} else {
|
||||
var noBorder = true;
|
||||
if (Model.Payment.NetAmount != Model.Payment.Amount) {
|
||||
@Raw(FormatRow("Zwischensumme", Model.Payment.NetAmount, noTopBorder: true))
|
||||
@Raw(FormatRow("Zwischensumme", Model.Payment.NetAmount, noTopBorder: noBorder))
|
||||
noBorder = false;
|
||||
@Raw(FormatRow(Model.MemberModifier, Model.Payment.Amount - Model.Payment.NetAmount, add: true))
|
||||
}
|
||||
if (Model.Credit == null) {
|
||||
@Raw(FormatRow("Gesamtbetrag", Model.Payment.Amount, bold: true))
|
||||
@Raw(FormatRow("Gesamtbetrag", Model.Payment.Amount, bold: true, noTopBorder: noBorder))
|
||||
// TODO Mock VAT
|
||||
} else {
|
||||
var hasPrev = Model.Credit.PrevNetAmount != null;
|
||||
|
@ -42,6 +42,7 @@ table.credit-sum td.sum {
|
||||
font-style: italic;
|
||||
font-size: 8pt;
|
||||
width: 74mm;
|
||||
float: left;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
margin: 2mm 4mm;
|
||||
}
|
||||
|
Reference in New Issue
Block a user