diff --git a/Elwig/Documents/MemberDataSheet.cshtml b/Elwig/Documents/MemberDataSheet.cshtml index f172419..bf8d9a4 100644 --- a/Elwig/Documents/MemberDataSheet.cshtml +++ b/Elwig/Documents/MemberDataSheet.cshtml @@ -10,61 +10,73 @@ <h1>@Model.Title</h1> <table class="member border"> <colgroup> - <col style="width: 30mm;"/> + <col style="width: 30.0mm;"/> <col style="width: 51.5mm;"/> - <col style="width: 30mm;"/> - <col style="width: 20mm"/> + <col style="width: 20.0mm;"/> + <col style="width: 10.0mm;"/> + <col style="width: 20.0mm;"/> <col style="width: 31.5mm;"/> </colgroup> <tbody> - <tr class="sectionheading"><th colspan="5">Persönliche Daten</th></tr> + <tr class="sectionheading"><th colspan="6">Persönliche Daten</th></tr> <tr> <th class="small">Titel (vorangestellt)</th> <th class="small">Vorname</th> - <th colspan="2" class="small">Nachname</th> + <th colspan="3" class="small">Nachname</th> <th class="small">Titel (nachgestellt)</th> </tr> <tr> <td class="large">@Model.Member.Prefix</td> <td class="large">@Model.Member.GivenName @Model.Member.MiddleName</td> - <td colspan="2" class="large">@Model.Member.FamilyName</td> + <td colspan="3" class="large">@Model.Member.FamilyName</td> <td class="large">@Model.Member.Suffix</td> </tr> <tr> <th>Mitglieds-Nr.:</th> <td class="large">@Model.Member.MgNr</td> - <th>Geburtsjahr/-tag:</th> + <th colspan="2">Geburtsjahr/-tag:</th> <td colspan="2" class="large">@(string.Join('.', Model.Member.Birthday?.Split('-')?.Reverse() ?? Array.Empty<string>()))</td> </tr> <tr> <th>Adresse:</th> - <td colspan="4">@Model.Member.Address</td> + <td colspan="5">@Model.Member.Address</td> </tr> <tr> <th>PLZ/Ort:</th> - <td colspan="4">@Model.Member.PostalDest.AtPlz?.Plz @Model.Member.PostalDest.AtPlz?.Dest (@Model.Member.PostalDest.AtPlz?.Ort.Name)</td> + <td colspan="5"> + @Model.Member.PostalDest.AtPlz?.Plz + @Model.Member.PostalDest.AtPlz?.Dest + (@Model.Member.PostalDest.AtPlz?.Ort.Name) + </td> </tr> - <tr class="sectionheading"><th colspan="5">Rechnungsadresse (optional)</th></tr> + <tr class="sectionheading"><th colspan="6">Rechnungsadresse (optional)</th></tr> <tr> <th>Name:</th> - <td colspan="4">@Model.Member.BillingAddress?.Name</td> + <td colspan="5">@Model.Member.BillingAddress?.Name</td> </tr> <tr> <th>Adresse:</th> - <td colspan="4">@Model.Member.BillingAddress?.Address</td> + <td colspan="5">@Model.Member.BillingAddress?.Address</td> </tr> <tr> <th>PLZ/Ort:</th> - <td colspan="4">@Model.Member.BillingAddress?.PostalDest.AtPlz?.Plz @Model.Member.BillingAddress?.PostalDest.AtPlz?.Dest @((Model.Member.BillingAddress != null && Model.Member.BillingAddress.PostalDest.AtPlz != null) ? "(" + Model.Member.BillingAddress?.PostalDest.AtPlz?.Ort.Name + ")" : "")</td> + <td colspan="5"> + @if (Model.Member.BillingAddress != null) { + @Model.Member.BillingAddress.PostalDest.AtPlz?.Plz + @Model.Member.BillingAddress.PostalDest.AtPlz?.Dest + @("(")@Model.Member.BillingAddress.PostalDest.AtPlz?.Ort.Name@(")") + } + </td> </tr> <tr class="sectionheading"> - <th colspan="2">Kontaktdaten</th> + <th colspan="3">Kontaktdaten</th> <th colspan="3" class="lborder">Bankverbindung</th> </tr> @{ List<string?[]> subTbl1 = new(); subTbl1.AddRange(Model.Member.EmailAddresses.Select(a => new[] { "E-Mail-Adresse", a.Address })); - subTbl1.AddRange(Model.Member.TelephoneNumbers.Select(n => new[] { Utils.PhoneNrTypeToString(n.Type), n.Number })); + subTbl1.AddRange(Model.Member.TelephoneNumbers.Select(n => new[] { Utils.PhoneNrTypeToString(n.Type), n.Number, n.Comment })); + subTbl1.Add(new[] { "Tel.-Nr./E-Mail-Adr.", null }); List<string?[]> subTbl2 = new(); subTbl2.Add(new[] { "IBAN", Model.Member.Iban != null ? Elwig.Helpers.Utils.FormatIban(Model.Member.Iban) : null }); @@ -73,30 +85,36 @@ @for (int i = 0; i < Math.Max(subTbl1.Count, subTbl2.Count); i++) { <tr> <th>@(i < subTbl1.Count ? subTbl1[i][0] + ":" : "")</th> - <td>@(i < subTbl1.Count ? subTbl1[i][1] : "")</td> + @if (i < subTbl1.Count && subTbl1[i].Length >= 3 && subTbl1[i][2] != null) { + <td>@subTbl1[i][1]</td> + <td>(@subTbl1[i][2])</td> + } else { + <td colspan="2">@(i < subTbl1.Count ? subTbl1[i][1] : "")</td> + } + <th class="lborder">@(i < subTbl2.Count ? subTbl2[i][0] + ":" : "")</th> <td colspan="2">@(i < subTbl2.Count ? subTbl2[i][1] : "")</td> </tr> } - <tr class="sectionheading"><th colspan="5">Betrieb</th></tr> + <tr class="sectionheading"><th colspan="6">Betrieb</th></tr> <tr> <th>Betriebs-Nr.:</th> <td>@Model.Member.LfbisNr</td> - <th>UID:</th> + <th colspan="2">UID:</th> <td colspan="2">@Model.Member.UstIdNr</td> </tr> <tr> <th>Stammgemeinde:</th> <td>@Model.Member.DefaultKg?.Name</td> - <th>Buchführend:</th> + <th colspan="2">Buchführend:</th> <td colspan="2">@(Model.Member.IsBuchführend ? "Ja" : "Nein")</td> </tr> <tr> <th colspan="2" class="small">(Katastralgemeinde mit dem größten Anteil an Weinbauflächen)</th> - <th>Bio:</th> + <th colspan="2">Bio:</th> <td colspan="2">@(Model.Member.IsOrganic ? "Ja" : "Nein")</t> </tr> - <tr class="sectionheading"><th colspan="5">Genossenschaft</th></tr> + <tr class="sectionheading"><th colspan="6">Genossenschaft</th></tr> <tr> <th>Status:</th> <td> @@ -107,13 +125,13 @@ $"seit {Model.Member.EntryDate:dd.MM.yyyy}")) </span> </td> - <th>Geschäftsanteile:</th> + <th colspan="2">Geschäftsanteile:</th> <td colspan="2">@Model.Member.BusinessShares</td> </tr> <tr> <th>Stamm-Zweigstelle:</th> <td>@Model.Member.Branch?.Name</td> - <th>Volllierferant:</th> + <th colspan="2">Volllierferant:</th> <td colspan="2">@(Model.Member.IsVollLieferant ? "Ja" : "Nein")</td> </tr> <tr> @@ -122,7 +140,7 @@ <i>Post:</i> @(Model.Member.ContactViaPost ? "Ja" : "Nein") – <i>E-Mail:</i> @(Model.Member.ContactViaEmail ? "Ja" : "Nein") </td> - <th>Funktionär:</th> + <th colspan="2">Funktionär:</th> <td colspan="2">@(Model.Member.IsFunktionär ? "Ja" : "Nein")</td> </tr> </tbody>