@using Elwig.Helpers @using RazorLight @inherits TemplatePage @model Elwig.Documents.CreditNote @{ Layout = "BusinessDocument"; }

@Model.Title

@foreach (var p in Model.Data.Rows) { var rows = Math.Max(p.Buckets.Length, p.Modifiers.Length + 1); var first = true; @for (int i = 0; i < rows; i++) { i + 1 ? "last" : "")"> @if (first) { } @if (i > 0 && i <= p.Modifiers.Length) { } else if (i > 0) { } @if (i < p.Buckets.Length) { var bucket = p.Buckets[i]; } else { } @if (i == p.Buckets.Length - 1) { var totalMod = p.TotalModifiers ?? 0; } else { } first = false; } } @if (Model.Payment == null) { } else { }
Lieferschein-Nr. Pos. Sorte Attribut Gradation Flächenbindung Preis Zu-/Abschläge Betrag
[°Oe] [°KMW] [kg] [@Model.CurrencySymbol/kg] [@Model.CurrencySymbol] [@Model.CurrencySymbol]
@p.LsNr @p.DPNr @p.Variant @p.Attribute @($"{p.Gradation.Oe:N0}") @($"{p.Gradation.Kmw:N1}")@p.Modifiers[i - 1]@bucket.Name: @($"{bucket.Value:N0}") @($"{bucket.Price:N4}")@(totalMod == 0 ? "-" : Utils.GetSign(totalMod) + $"{Math.Abs(totalMod):N2}") @($"{p.Amount:N2}")
Gesamt: @($"{Model.Data.Rows.Sum(p => p.Amount):N2}")
Gesamt: @($"{Model.Payment.NetAmount:N2}")