Buchungsliste als Tabelle: Unterschied zwischen den Versionen
(Die Seite wurde neu angelegt: „Die Vorlage "Nächste Anreisen" nutzt diese Tabelle schon, aber sie können die Einstellungen noch weiter verfeinern. Wenn Sie die Tabelle ohne Preise haben m…“) |
|||
Zeile 7: | Zeile 7: | ||
<code>{{all_bookings_as_table(include_prices=True, include_extras=False, language='de', filters=[]) }}</code> | <code>{{all_bookings_as_table(include_prices=True, include_extras=False, language='de', filters=[]) }}</code> | ||
+ | |||
+ | Falls Sie die Tabelle verändern möchten und Werte davon weglassen möchten, können Sie statt des obigen Macros auch diesen kompletten HTML-Code in Ihre Vorlage einfügen und nach Belieben verändern und damit einzelne Werte weglassen oder anders formatieren: | ||
+ | |||
+ | <pre><table border="1" cellpadding="1" cellspacing="1" style="width:100%;"> | ||
+ | <tbody> | ||
+ | <tr> | ||
+ | <th colspan="10">More-Bookings GmbH | ||
+ | <h3>Jahresübersicht für Objekt {{fewo.internal_name}}</h3> | ||
+ | <span>Abreise-Zeitraum von {{dates.bfrom.strftime('%d.%m.%Y')}} bis {{dates.bto.strftime('%d.%m.%Y')}}</span></th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <th style="width: 5%; white-space: nowrap;">#</th> | ||
+ | <th style="width: 12%;">Gast</th> | ||
+ | <th style="width: 12%;">Bemerkung</th> | ||
+ | <th style="width: 12%; white-space: nowrap;">Telefon</th> | ||
+ | <th style="width: 9%; white-space: nowrap;">Erw.</th> | ||
+ | <th style="width: 9%; white-space: nowrap;">Kinder</th> | ||
+ | <th style="width: 14%; white-space: nowrap;">von</th> | ||
+ | <th style="width: 14%; white-space: nowrap;">bis</th> | ||
+ | <th style="width: 7%; white-space: nowrap;">Tage</th> | ||
+ | <th style="width: 14%; white-space: nowrap;">Miete</th> | ||
+ | <th style="width: 14%;">Extras</th> | ||
+ | </tr> | ||
+ | {% for booking in bookings %} | ||
+ | <tr style="text-align: right;"> | ||
+ | <td class="number">{{loop.index}}</td> | ||
+ | <td style="text-align: left;">{{booking.guest.nachname}}</td> | ||
+ | <td style="text-align: left;">{{booking.bbemerkung}}</td> | ||
+ | <td style="text-align: left;">{{booking.guest.festnetz}} {{booking.guest.mobil}}</td> | ||
+ | <td>{{(booking.number_of_guests or 0)-(booking.number_of_kids or 0)}}</td> | ||
+ | <td>{{booking.number_of_kids | default(0)}}</td> | ||
+ | <td>{{booking.bfrom.strftime('%d.%m.%Y')}}</td> | ||
+ | <td>{{booking.bto.strftime('%d.%m.%Y')}}</td> | ||
+ | <td>{{(booking.bto-booking.bfrom).days}}</td> | ||
+ | <td>{{"{:.2f} ".format(booking.final_price).replace('.', ',')}}{{ currencystring }}</td> | ||
+ | <td>{% for entry in booking.new_invoice_dicts%}{% if entry.number and entry.name_ml[language] not in filters %}{{entry.name_ml[language]}}:{{entry.number}}<br /> | ||
+ | {%endif%} {%endfor%}</td> | ||
+ | </tr> | ||
+ | {% endfor %} | ||
+ | <tr style="text-align: right; font-weight:bold; border: 2px solid;"> | ||
+ | <td> </td> | ||
+ | <td>{{totals.arrivals}}</td> | ||
+ | <td> </td> | ||
+ | <td> </td> | ||
+ | <td>{{totals.number_of_adults}}</td> | ||
+ | <td>{{totals.number_of_kids}}</td> | ||
+ | <td> </td> | ||
+ | <td> </td> | ||
+ | <td>{{totals.nights}}</td> | ||
+ | <td>{{"{:.2f} ".format(totals.turnover).replace('.', ',')}}{{ currencystring }}</td> | ||
+ | </tr> | ||
+ | </tbody> | ||
+ | </table></pre> |
Version vom 13. Mai 2025, 08:31 Uhr
Die Vorlage "Nächste Anreisen" nutzt diese Tabelle schon, aber sie können die Einstellungen noch weiter verfeinern. Wenn Sie die Tabelle ohne Preise haben möchten, dann setzen Sie include_prices=False
Hätten Sie gerne die gebuchten Extras in der Tabelle, beispielsweise damit Ihr Reinigungsteam die Anzahl der gebuchten Bettwäsche kennt, dann setzen Sie include_extras=True Und falls Sie einige der gebuchten Extras dann doch lieber nicht in Ihrer Tabelle hätten, dann können Sie diese bei "filters" in einfachen Anführungsstrichen eingeben.
{{all_bookings_as_table(include_prices=True, include_extras=False, language='de', filters=[]) }}
Falls Sie die Tabelle verändern möchten und Werte davon weglassen möchten, können Sie statt des obigen Macros auch diesen kompletten HTML-Code in Ihre Vorlage einfügen und nach Belieben verändern und damit einzelne Werte weglassen oder anders formatieren:
<table border="1" cellpadding="1" cellspacing="1" style="width:100%;"> <tbody> <tr> <th colspan="10">More-Bookings GmbH <h3>Jahresübersicht für Objekt {{fewo.internal_name}}</h3> <span>Abreise-Zeitraum von {{dates.bfrom.strftime('%d.%m.%Y')}} bis {{dates.bto.strftime('%d.%m.%Y')}}</span></th> </tr> <tr> <th style="width: 5%; white-space: nowrap;">#</th> <th style="width: 12%;">Gast</th> <th style="width: 12%;">Bemerkung</th> <th style="width: 12%; white-space: nowrap;">Telefon</th> <th style="width: 9%; white-space: nowrap;">Erw.</th> <th style="width: 9%; white-space: nowrap;">Kinder</th> <th style="width: 14%; white-space: nowrap;">von</th> <th style="width: 14%; white-space: nowrap;">bis</th> <th style="width: 7%; white-space: nowrap;">Tage</th> <th style="width: 14%; white-space: nowrap;">Miete</th> <th style="width: 14%;">Extras</th> </tr> {% for booking in bookings %} <tr style="text-align: right;"> <td class="number">{{loop.index}}</td> <td style="text-align: left;">{{booking.guest.nachname}}</td> <td style="text-align: left;">{{booking.bbemerkung}}</td> <td style="text-align: left;">{{booking.guest.festnetz}} {{booking.guest.mobil}}</td> <td>{{(booking.number_of_guests or 0)-(booking.number_of_kids or 0)}}</td> <td>{{booking.number_of_kids | default(0)}}</td> <td>{{booking.bfrom.strftime('%d.%m.%Y')}}</td> <td>{{booking.bto.strftime('%d.%m.%Y')}}</td> <td>{{(booking.bto-booking.bfrom).days}}</td> <td>{{"{:.2f} ".format(booking.final_price).replace('.', ',')}}{{ currencystring }}</td> <td>{% for entry in booking.new_invoice_dicts%}{% if entry.number and entry.name_ml[language] not in filters %}{{entry.name_ml[language]}}:{{entry.number}}<br /> {%endif%} {%endfor%}</td> </tr> {% endfor %} <tr style="text-align: right; font-weight:bold; border: 2px solid;"> <td> </td> <td>{{totals.arrivals}}</td> <td> </td> <td> </td> <td>{{totals.number_of_adults}}</td> <td>{{totals.number_of_kids}}</td> <td> </td> <td> </td> <td>{{totals.nights}}</td> <td>{{"{:.2f} ".format(totals.turnover).replace('.', ',')}}{{ currencystring }}</td> </tr> </tbody> </table>