91 lines
4.0 KiB
Plaintext
91 lines
4.0 KiB
Plaintext
@using RazorLight
|
|
@inherits TemplatePage<Elwig.Documents.CreditNote>
|
|
@model Elwig.Documents.CreditNote
|
|
@{ Layout = "BusinessDocument"; }
|
|
<link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\CreditNote.css"/>
|
|
<main>
|
|
<h1>@Model.Title</h1>
|
|
<table class="credit">
|
|
<colgroup>
|
|
<col style="width: 25mm;"/>
|
|
<col style="width: 5mm;"/>
|
|
<col style="width: 20mm;"/>
|
|
<col style="width: 18mm;"/>
|
|
<col style="width: 10mm;"/>
|
|
<col style="width: 10mm;"/>
|
|
<col style="width: 10mm;"/>
|
|
<col style="width: 10mm;"/>
|
|
<col style="width: 15mm;"/>
|
|
<col style="width: 12mm;"/>
|
|
<col style="width: 15mm;"/>
|
|
<col style="width: 15mm;"/>
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th rowspan="3" style="text-align: left;">Lieferschein-Nr.</th>
|
|
<th rowspan="3">Pos.</th>
|
|
<th rowspan="3" style="text-align: left;">Sorte</th>
|
|
<th rowspan="3" style="text-align: left;">Attribut</th>
|
|
<th rowspan="2" colspan="2">Gradation</th>
|
|
<th colspan="2">Zu-/Abschläge</th>
|
|
<th rowspan="2" colspan="2">Flächenbindung</th>
|
|
<th rowspan="2">Preis</th>
|
|
<th rowspan="2">Betrag</th>
|
|
</tr>
|
|
<tr>
|
|
<th>Abs.</th>
|
|
<th>Rel.</th>
|
|
</tr>
|
|
<tr>
|
|
<th>[°Oe]</th>
|
|
<th>[°KMW]</th>
|
|
<th>[@Model.CurrencySymbol/kg]</th>
|
|
<th>[%]</th>
|
|
<th colspan="2">[kg]</th>
|
|
<th>[@Model.CurrencySymbol/kg]</th>
|
|
<th>[@Model.CurrencySymbol]</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var p in Model.Data.Rows) {
|
|
var rows = Math.Max(p.Buckets.Length, p.Modifiers.Length + 1);
|
|
var first = true;
|
|
//var pmt = p.Payment;
|
|
var abs = 0; // pmt?.ModAbs == null || pmt?.ModAbs == 0 ? "-" : pmt?.ModAbs.ToString("0." + string.Concat(Enumerable.Repeat('0', Model.Precision)));
|
|
var rel = 0; // pmt?.ModRel == null || pmt?.ModRel == 0 ? "-" : $"{pmt?.ModRel * 100:0.00##}";
|
|
@for (int i = 0; i < rows; i++) {
|
|
<tr class="@(first ? "first" : "") @(rows > i + 1 ? "trailing" : "")">
|
|
@if (first) {
|
|
<td rowspan="@rows" class="lsnr">@p.LsNr</td>
|
|
<td rowspan="@rows" class="dpnr">@p.DPNr</td>
|
|
<td class="variant small">@p.Variant</td>
|
|
<td class="attribute small">@p.Attribute</td>
|
|
<td rowspan="@rows" class="oe">@($"{p.Gradation.Oe:N0}")</td>
|
|
<td rowspan="@rows" class="kmw">@($"{p.Gradation.Kmw:N1}")</td>
|
|
<td rowspan="@rows" class="abs">@abs</td>
|
|
<td rowspan="@rows" class="rel">@rel</td>
|
|
}
|
|
@if (i > 0 && i <= p.Modifiers.Length) {
|
|
<td colspan="2" class="mod">@(p.Modifiers[i - 1])</td>
|
|
} else if (i > 0) {
|
|
<td colspan="2"></td>
|
|
}
|
|
@if (i < p.Buckets.Length) {
|
|
var bucket = p.Buckets[i];
|
|
<td class="geb small">@bucket.Name:</td>
|
|
<td class="weight">@($"{bucket.Value:N0}")</td>
|
|
<td class="price">@($"{bucket.Price:N4}")</td>
|
|
} else {
|
|
<td colspan="3"></td>
|
|
}
|
|
@if (first) {
|
|
<td rowspan="@rows" class="amount">@($"{1000:N2}")</td>
|
|
first = false;
|
|
}
|
|
</tr>
|
|
}
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</main>
|