@using RazorLight @inherits TemplatePage<Elwig.Documents.DeliveryJournal> @model Elwig.Documents.DeliveryJournal @{ Layout = "Document"; } <link rel="stylesheet" href="file:///@Raw(Model.DataPath)\resources\style-deliveryjournal.css"/> <main> <h1>Lieferjournal</h1> <h2>@Model.Filter</h2> <table class="journal"> <colgroup> <col style="width: 25mm;"/> <col style="width: 5mm;"/> <col style="width: 17mm;"/> <col style="width: 10mm;"/> <col style="width: 8mm;"/> <col style="width: 38mm;"/> <col style="width: 28mm;"/> <col style="width: 10mm;"/> <col style="width: 10mm;"/> <col style="width: 14mm;"/> </colgroup> <thead> <tr> <th rowspan="2" style="text-align: left;">Lieferschein-Nr.</th> <th rowspan="2">Pos.</th> <th rowspan="2">Datum</th> <th rowspan="2">Zeit</th> <th colspan="2" rowspan="2" style="text-align: left;">Mitglied</th> <th rowspan="2" style="text-align: left;">Sorte</th> <th colspan="2">Gradation</th> <th>Gewicht</th> </tr> <tr> <th>[°Oe]</th> <th>[°KMW]</th> <th>[kg]</th> </tr> </thead> <tbody> @foreach (var p in Model.Deliveries) { <tr> <td>@p.Delivery.LsNr</td> <td>@p.DPNr</td> <td>@($"{p.Delivery.Date:dd.MM.yyyy}")</td> <td>@($"{p.Delivery.Time:HH:mm}")</td> <td class="mgnr">@p.Delivery.Member.MgNr</td> <td>@p.Delivery.Member.AdministrativeName</td> <td>@p.Variant.Name</td> <td class="grad">@($"{p.Oe:N0}")</td> <td class="grad">@($"{p.Kmw:N1}")</td> <td class="weight">@($"{p.Weight:N0}")</td> </tr> } <tr class="sum"> @{ var kmw = Elwig.Helpers.Utils.AggregateDeliveryPartsKmw(Model.Deliveries); var oe = Elwig.Helpers.Utils.KmwToOe(kmw); } <td colspan="2">Gesamt:</td> <td colspan="5">(Teil-)Lieferungen: @($"{Model.Deliveries.DistinctBy(p => p.Delivery).Count():N0}") (@($"{Model.Deliveries.Count():N0}"))</td> <td class="grad">@($"{oe:N0}")</td> <td class="grad">@($"{kmw:N1}")</td> <td class="weight">@($"{Model.Deliveries.Sum(p => p.Weight):N0}")</td> </tr> </tbody> </table> </main>