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