Billing: Calculate prices

This commit is contained in:
2023-11-30 01:44:48 +01:00
parent 17d00a8524
commit 8b9d62ea50
7 changed files with 61 additions and 23 deletions

View File

@ -13,11 +13,11 @@
<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: 10mm;"/>
<col style="width: 10mm;"/>
<col style="width: 15mm;"/>
</colgroup>
<thead>
@ -27,21 +27,21 @@
<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 colspan="2">Zu-/Abschläge</th>
<th rowspan="2">Betrag</th>
</tr>
<tr>
<th>Abs.</th>
<th>Rel.</th>
<th>Abs.</th>
</tr>
<tr>
<th>[°Oe]</th>
<th>[°KMW]</th>
<th colspan="2">[kg]</th>
<th>[@Model.CurrencySymbol/kg]</th>
<th>[%]</th>
<th colspan="2">[kg]</th>
<th>[@Model.CurrencySymbol/kg]</th>
<th>[@Model.CurrencySymbol]</th>
</tr>
@ -62,8 +62,6 @@
<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>
@ -79,7 +77,10 @@
<td colspan="3"></td>
}
@if (first) {
<td rowspan="@rows" class="amount">@($"{1000:N2}")</td>
<td rowspan="@rows" class="rel">@rel</td>
<td rowspan="@rows" class="abs">@abs</td>
<!-- FIXME rel/abs mods -->
<td rowspan="@rows" class="amount">@($"{p.Buckets.Sum(b => b.Amount):N2}")</td>
first = false;
}
</tr>