{% extends "base.html" %} {% block title %}{{ _("Map the columns") }} · {{ account.name }}{% endblock %} {% block heading %}{{ _("Map the columns") }}{% endblock %} {% block lede %}

{{ _("No importer here knows this file, and it does not need to: say which column is which, once. The mapping is kept under the file's header, so the next export from the same bank is recognised by itself — like a Degiro file is.") }}

{% endblock %} {% block content %} {% set labels = { 'txn_date': _("Date"), 'amount': _("Amount, signed"), 'debit': _("Debit (money out)"), 'credit': _("Credit (money in)"), 'description': _("Description"), 'counterparty': _("Counterparty"), 'currency': _("Currency"), 'isin': _("ISIN"), 'security_name': _("Security name"), 'quantity': _("Quantity"), 'price': _("Price"), 'fee': _("Fee"), 'tax': _("Tax"), 'kind': _("Kind") } %} {% set hints = { 'txn_date': _("Written year-month-day, day.month.year or day/month/year. A US month-first date is not guessed."), 'amount': _("Money in positive, money out negative. If the file has one column for each, leave this blank and map the two below."), 'debit': _("Only when there is no signed amount column."), 'credit': _("Only when there is no signed amount column."), 'description': _("What the row says; the counterparty stands in when this is blank."), 'counterparty': _("Who paid or was paid."), 'currency': _("Blank means the account's currency, or the one typed in below."), 'isin': _("Blank means the ISIN is looked for in the description."), 'security_name': "", 'quantity': _("The kind gives the sign: a buy's units come in, a sale's go out."), 'price': "", 'fee': "", 'tax': "", 'kind': _("Buy, sell, dividend, interest, fee, tax, deposit, withdrawal or transfer — in English, German, French or Spanish. Left blank, the kind is worked out from the row: an ISIN and units is a trade, an ISIN and money in a dividend, plain money a deposit or a withdrawal.") } %}

{{ _("The file") }}

{{ header | length }} {{ _("columns") }} · {{ _f("separated by {delimiter}", delimiter=("tab" if delimiter == "\t" else delimiter)) }}
{% for h in header %}{% endfor %} {% for row in sample %}{% for h in header %}{% endfor %}{% endfor %}
{{ h }}
{{ row[loop.index0] if loop.index0 < row | length else '' }}

{{ _("Which column is which") }}

{% if saved %}{{ _f("saved as {name} — this changes it", name=saved.name) }}{% endif %}
{% for f in fields %}
{% if hints[f] %}{{ hints[f] }}{% endif %}
{% endfor %}
{{ _("Signs.") }} {{ _("A named kind decides the sign: a Kauf is money out whichever way the bank wrote the figure, a Dividende money in. Without a kind column the sign is the file's — so if your bank writes a purchase as a positive amount and has no kind column, tick the box below, or the buys come in as money received.") }} {% if suspicious %}
{{ _n(suspicious, "{n} of the first rows looks like a purchase with money coming in.", "{n} of the first rows look like purchases with money coming in.") }} {{ _("That is usually the signs the wrong way round.") }}{% endif %}
{{ _("Cancel") }}

{{ _("Read through this mapping") }}

{{ _("the first rows, as they would be imported") }}
{% if preview %}
{% for r in preview %} {% endfor %}
{{ _("Date") }}{{ _("Kind") }}{{ _("Description") }}{{ _("ISIN") }} {{ _("Quantity") }}{{ _("Price") }}{{ _("Amount") }}
{{ d(r.txn_date) }} {{ kind_label(r.kind) }} {{ r.description[:60] }}{% if r.counterparty %}{{ r.counterparty }}{% endif %} {{ r.isin or '—' }} {{ qty(r.quantity) if r.quantity is not none else '—' }} {{ qty(r.price) if r.price else '—' }} {{ money(r.amount, r.currency) }}
{% else %}

{{ _("Nothing readable yet — the date or the amount column is not the right one.") }}

{% endif %} {% if problems %}
{% endif %}

{{ _("If a kind, a sign or a date looks wrong here it will be wrong in the account: change the mapping and look again before importing. Every row is imported; a row without a readable date is listed and left out.") }}

{% endblock %}