Vermietungs-Tool
A local web app for a small room-rental business in Austria: guest register, room ledger, occupancy plan, invoices, the monthly tourist-tax report and the quarterly VAT list. Application code only; it ships no data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
45424e6fd6
47 files changed
+6701
No files matched your search
@@ -0,0 +1,114 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
{% set g = (stay.guest if stay else {}) or {} %}
|
||||
{% set sg = suggest|default({}) %}
|
||||
<h1>{{ t('form_room_change') if room_change else t('form_edit_stay') if stay else t('form_new_stay') }}</h1>
|
||||
|
||||
<datalist id="dl_nationality">{% for v in sg.nationality|default([]) %}<option value="{{ v }}">{% endfor %}</datalist>
|
||||
<datalist id="dl_doc_type">{% for v in sg.doc_type|default([]) %}<option value="{{ v }}">{% endfor %}</datalist>
|
||||
<datalist id="dl_profession">{% for v in sg.profession|default([]) %}<option value="{{ v }}">{% endfor %}</datalist>
|
||||
<datalist id="dl_city">{% for v in sg.city|default([]) %}<option value="{{ v }}">{% endfor %}</datalist>
|
||||
<datalist id="dl_country">{% for v in sg.country|default([]) %}<option value="{{ v }}">{% endfor %}</datalist>
|
||||
<datalist id="dl_client">{% for v in sg.client|default([]) %}<option value="{{ v }}">{% endfor %}</datalist>
|
||||
|
||||
<form class="card" method="post">
|
||||
<div class="grid2">
|
||||
<div class="field"><label>{{ t('col_name') }} *</label>
|
||||
<input type="text" name="last_name" value="{{ g.last_name or '' }}" autofocus required></div>
|
||||
<div class="field"><label>{{ t('col_firstname') }}</label>
|
||||
<input type="text" name="first_name" value="{{ g.first_name or '' }}"></div>
|
||||
</div>
|
||||
<div class="grid2">
|
||||
<div class="field"><label>{{ t('col_birth') }}</label>
|
||||
<input type="date" name="birth_date" value="{{ g.birth_date or '' }}"></div>
|
||||
<div class="field"><label>{{ t('col_nationality') }}</label>
|
||||
<input type="text" name="nationality" value="{{ g.nationality or '' }}" list="dl_nationality"></div>
|
||||
</div>
|
||||
<div class="grid2">
|
||||
<div class="field"><label>{{ t('col_document') }}</label>
|
||||
<input type="text" name="doc_type" value="{{ g.doc_type or '' }}" list="dl_doc_type"></div>
|
||||
<div class="field"><label>{{ t('col_docnr') }}</label>
|
||||
<input type="text" name="doc_number" value="{{ g.doc_number or '' }}"></div>
|
||||
</div>
|
||||
<div class="field"><label>{{ t('col_profession') }}</label>
|
||||
<input type="text" name="profession" value="{{ g.profession or '' }}" list="dl_profession"></div>
|
||||
|
||||
<div class="grid2">
|
||||
<div class="field"><label>{{ t('lbl_room') }}</label>
|
||||
<select name="room_id">
|
||||
<option value="">—</option>
|
||||
{% for r in rooms %}
|
||||
<option value="{{ r.id }}" {{ 'selected' if stay and stay.room_id == r.id }}>{{ r.number }} ({{ r.category }})</option>
|
||||
{% endfor %}
|
||||
</select></div>
|
||||
<div class="field"><label>{{ t('lbl_unit') }}</label>
|
||||
<select name="unit_id">
|
||||
<option value="">—</option>
|
||||
{% for u in units %}
|
||||
<option value="{{ u.id }}" {{ 'selected' if stay and stay.unit_id == u.id }}>{{ u.code }}</option>
|
||||
{% endfor %}
|
||||
</select></div>
|
||||
</div>
|
||||
<div class="field"><label>{{ t('col_employer') }}</label>
|
||||
<input type="text" name="employer" value="{{ stay.employer_name or '' if stay else '' }}" list="dl_client"></div>
|
||||
|
||||
<div class="grid2">
|
||||
<div class="field"><label>{{ t('col_arrival') }}</label>
|
||||
<input type="date" name="arrival" value="{{ stay.arrival or '' if stay else '' }}"></div>
|
||||
<div class="field"><label>{{ t('col_departure') }}</label>
|
||||
<input type="date" name="departure" value="{{ stay.departure or '' if stay else '' }}"></div>
|
||||
</div>
|
||||
<div class="field"><label>{{ t('col_sheetno') }}</label>
|
||||
<input type="text" name="sheet_number" value="{{ stay.sheet_number or '' if stay else '' }}" style="max-width:160px"></div>
|
||||
|
||||
<div class="grid2">
|
||||
<div class="field"><label>{{ t('col_address_private') }}</label>
|
||||
<input type="text" name="home_street" value="{{ g.home_street or '' }}"></div>
|
||||
<div class="field"><label>{{ t('col_country') }}</label>
|
||||
<input type="text" name="home_country" value="{{ g.home_country or '' }}" list="dl_country"></div>
|
||||
</div>
|
||||
<div class="grid2">
|
||||
<div class="field"><label>{{ t('col_postcode') }}</label>
|
||||
<input type="text" name="home_postcode" value="{{ g.home_postcode or '' }}"></div>
|
||||
<div class="field"><label>{{ t('col_city') }}</label>
|
||||
<input type="text" name="home_city" value="{{ g.home_city or '' }}" list="dl_city"></div>
|
||||
</div>
|
||||
<div class="field"><label>{{ t('col_phone') }}</label>
|
||||
<input type="text" name="phone" value="{{ g.phone or '' }}"></div>
|
||||
<div class="grid2">
|
||||
<div class="field"><label>{{ t('col_residence') }}</label>
|
||||
<select name="hauptwohnsitz">
|
||||
<option value="" {{ 'selected' if not stay or stay.hauptwohnsitz is none }}>—</option>
|
||||
<option value="1" {{ 'selected' if stay and stay.hauptwohnsitz == 1 }}>{{ t('hws_full') }}</option>
|
||||
<option value="0" {{ 'selected' if stay and stay.hauptwohnsitz == 0 }}>{{ t('hws_none') }}</option>
|
||||
</select></div>
|
||||
<div class="field"><label>{{ t('col_tourism_liable') }}</label>
|
||||
<select name="tourism_liable">
|
||||
<option value="" {{ 'selected' if not stay or stay.tourism_liable is none }}>—</option>
|
||||
<option value="1" {{ 'selected' if stay and stay.tourism_liable == 1 }}>{{ t('yes') }}</option>
|
||||
<option value="0" {{ 'selected' if stay and stay.tourism_liable == 0 }}>{{ t('no') }}</option>
|
||||
</select></div>
|
||||
</div>
|
||||
<div class="field"><label>{{ t('col_notes') }}</label>
|
||||
{# 'or ""' matters: '{{ x if stay }}' renders the STRING 'None' for an empty field, which then
|
||||
gets saved back as literal text on the next submit #}
|
||||
<textarea name="notes" rows="2">{{ stay.notes or '' if stay else '' }}</textarea></div>
|
||||
|
||||
<div class="formactions">
|
||||
<button class="btn" type="submit">{{ t('btn_save') }}</button>
|
||||
{% if stay and stay.id %}
|
||||
{# a room change: same person and number, a new sheet in another room from the departure day #}
|
||||
<button class="btn secondary" type="submit" name="action" value="room_change"
|
||||
title="{{ t('hint_room_change') }}">{{ t('btn_room_change') }}</button>
|
||||
{% endif %}
|
||||
<a class="btn secondary" href="{{ url_for('register') }}">{{ t('btn_cancel') }}</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% if stay and stay.id %}
|
||||
<form class="formactions" method="post" action="{{ url_for('stay_delete', stay_id=stay.id) }}"
|
||||
onsubmit="return confirm('{{ t('confirm_delete') }}')">
|
||||
<button class="btn danger" type="submit">{{ t('btn_delete') }}</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user