diff --git a/Elwig/Documents/DeliveryNote.cshtml b/Elwig/Documents/DeliveryNote.cshtml index 9f16223..bcd9976 100644 --- a/Elwig/Documents/DeliveryNote.cshtml +++ b/Elwig/Documents/DeliveryNote.cshtml @@ -5,6 +5,13 @@
@Model.Location, am @($"{Model.Date:dd.MM.yyyy}")

@Model.Title

+@if (Model.Delivery.Parts.Count > 2) { +

Siehe nächste Seite.

+ if (Model.Delivery.Year == Model.CurrentNextSeason) { +

Gesamtlieferung usw.

+ } +
+} @@ -57,6 +64,9 @@ @if (Model.Delivery.Comment != null) {

Amerkung zur Lieferung: @Model.Delivery.Comment

} +@if (Model.Delivery.Parts.Count <= 2 && Model.Delivery.Year == Model.CurrentNextSeason) { +

Gesamtlieferung usw.

+} @for (int i = 0; i < 2; i++) {
@if (Model.Text != null) { diff --git a/Elwig/Documents/Document.cshtml.cs b/Elwig/Documents/Document.cshtml.cs index 177553f..853f78c 100644 --- a/Elwig/Documents/Document.cshtml.cs +++ b/Elwig/Documents/Document.cshtml.cs @@ -11,6 +11,7 @@ namespace Elwig.Documents { public Document(string title) { var c = App.Client; DataPath = App.DataPath; + CurrentNextSeason = Utils.CurrentNextSeason; Title = title; Header = $"

{c.Name}

"; Footer = $"{c.NameFull}
" + @@ -32,6 +33,7 @@ namespace Elwig.Documents { } public string DataPath { get; set; } + public int CurrentNextSeason { get; set; } public string Title { get; set; } public string Header { get; set; } public string Footer { get; set; } diff --git a/Elwig/Documents/style.css b/Elwig/Documents/style.css index 49d3554..fc1a25b 100644 --- a/Elwig/Documents/style.css +++ b/Elwig/Documents/style.css @@ -10,7 +10,6 @@ body { margin: 0; - break-inside: avoid; } .m1, .m2, .m3 { @@ -44,11 +43,13 @@ header h1{ margin-top: 1cm; } -.spacing {height: 20mm;} +.spacing { + height: 20mm; +} .info-wrapper { width: 100%; - height:45mm; + height: 45mm; margin: 0 0 8.46mm 0; position: relative; } @@ -118,11 +119,6 @@ aside table tbody th { font-weight: normal; } -.main-wrapper, -.main-wrapper * { - break-inside: auto; -} - main { margin: 8.46mm 20mm 4.23mm 25mm; } @@ -135,8 +131,12 @@ main h1, main p { font-size: 12pt; margin: 1em 0; text-align: justify; +} + +main p { widows: 3; orphans: 3; + hyphens: auto; } main .date { @@ -150,7 +150,6 @@ main h1 { main p.comment { font-size: 10pt; - hyphens: auto; } .footer-wrapper { @@ -167,13 +166,24 @@ main p.comment { display: flex; } -.pre-footer .date, .pre-footer .page { - flex: 100px 1 1; +.pre-footer > * { + flex: 5cm 1 1; } -.pre-footer .date {text-align: left;} -.pre-footer .page {text-align: right;} -.page::after { +.pre-footer .date { + text-align: left; +} + +.pre-footer .doc-id { + text-align: center; + font-style: italic; +} + +.pre-footer .page { + text-align: right; +} + +.pre-fotter .page::after { content: "Seite 1 von 1"; } @@ -210,6 +220,9 @@ table.delivery tr.main td { padding-top: 2mm; } +.hidden { + visibility: hidden; +} main .bottom { bottom: 0; @@ -232,6 +245,17 @@ main .signatures > * { font-size: 10pt; } +hr { + border: none; + border-top: 1pt solid black; + margin: 5mm 0; +} + +hr.page-break { + display: none; + break-after: page; +} + @page { size: A4; margin: 25mm 0 35mm 0;