Files
finance-dashboard/app/templates/trading_form.html
T

16 lines
2.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends 'base.html' %}{% block title %}Transaktion {{ 'bearbeiten' if transaction_id else 'eintragen' }}{% endblock %}
{% block content %}{% include '_trading_nav.html' %}<section class="form-panel panel"><h1>Transaktion {{ 'bearbeiten' if transaction_id else 'eintragen' }}</h1>{% if error %}<p class="notice negative" role="alert">{{ error }}</p>{% endif %}
<form class="entry-form" method="post">
<label>Datum<input type="date" name="date" required value="{{ data.get('date','') }}"></label>
<label>Position<select name="asset_id" required><option value="">Bitte auswählen</option>{% for asset in assets %}<option value="{{ asset.id }}" {{ 'selected' if asset.id|string == data.get('asset_id')|string else '' }}>{{ asset.name }}{{ ' (inaktiv nur Verkauf/Bestandskorrektur)' if not asset.active else '' }}</option>{% endfor %}</select></label><a href="/trading/assets/new">+ Neue Position</a>
<label>Typ<select name="transaction_type">{% for key,label in trade_types.items() %}<option value="{{ key }}" {{ 'selected' if data.get('transaction_type') == key else '' }}>{{ label }}</option>{% endfor %}</select></label>
<label>Stückzahl<input name="quantity" required inputmode="decimal" maxlength="25" value="{{ data.get('quantity','') }}" placeholder="0,092262"></label>
<label>Kurs je Stück<input name="price_per_unit" required inputmode="decimal" maxlength="25" value="{{ data.get('price_per_unit','') }}" placeholder="Bekannten Kauf-/Verkaufskurs eingeben"></label>
<label>Währung<input name="currency" required minlength="3" maxlength="3" value="{{ data.get('currency','EUR') }}" placeholder="EUR"><small>Einheitliche Währung je Position. Keine automatische Umrechnung.</small></label>
<label>Gebühren<input name="fees" required inputmode="decimal" maxlength="15" value="{{ data.get('fees','0') }}"></label>
<label>Source<select name="source">{% for key,label in sources.items() %}<option value="{{ key }}" {{ 'selected' if data.get('source') == key else '' }}>{{ label }}</option>{% endfor %}</select></label>
<label>Strategie-Tag<select name="strategy_tag"><option value="">Ohne Tag</option>{% for key,label in strategies.items() %}<option value="{{ key }}" {{ 'selected' if data.get('strategy_tag') == key else '' }}>{{ label }}</option>{% endfor %}</select></label>
<label>Notiz<textarea name="note" maxlength="2000" rows="3">{{ data.get('note') or '' }}</textarea></label>
<p class="muted">Stückzahl und Kurs: bis zu 12 Nachkommastellen; Gebühren: maximal 2. Komma und Punkt werden akzeptiert. Käufe/Verkäufe am gleichen Tag werden nach Erfassungsreihenfolge verrechnet.</p>
<div class="actions"><button>Transaktion speichern</button><a href="/trading">Abbrechen</a></div></form></section>{% endblock %}