{% extends "base.html" %} {% block title %}The duplicate transactions — Your Finance{% endblock %} {% block content %}

The duplicate transactions

The bank writes one SEPA payment in two description forms. The two forms give two different transaction ids. The system joins them by the end-to-end reference. A transfer between two of your own accounts carries no reference, so the system joins those by the counterparty and the amount instead.

{% if merged %}
The merge folded {{ merged }} transaction{{ 's' if merged != '1' else '' }}.
{% endif %} {% if restored %}
The undo restored {{ restored }} transaction{{ 's' if restored != '1' else '' }}.
{% endif %} {% if error %} {% endif %}

The groups that the system merges

{% if groups %}

The system keeps the row with the lowest id, and it flags each other row. The choice is the same on each machine, so a snapshot merges without a heuristic.

{% for group in groups %} {% endfor %}
Account Matched by Key The row that stays The rows that the merge flags The carried category
{{ group.account }} {% if group.matched_by == 'reference' %} the reference {% else %} the counterparty {% endif %} {{ group.reference }} {% set keeper = rows.get(group.survivor_id) %} {% if keeper %} {{ keeper.transactiondate }} · {{ keeper.amount }}
{{ keeper.description | truncate(60) }} {% else %}{{ group.survivor_id }}{% endif %}
{% for row_id in group.merged_ids %} {% set other = rows.get(row_id) %} {% if other %}
{{ other.transactiondate }} · {{ other.amount }} {{ other.description | truncate(50) }}
{% else %}
{{ row_id }}
{% endif %} {% endfor %}
{{ group.carried_category or '' }}
{% else %}

The database holds no duplicate payment.

{% endif %}
{% if refused %}

The groups that the system refuses

The system does not fold a group below. Each one holds two different manual categories, or one statement file gives more than one of its rows. A group of the second kind holds a repeated payment, and not two forms of one payment.

{% for group in refused %} {% endfor %}
Account Matched by Key The rows Why the system refuses it
{{ group.account }} {% if group.matched_by == 'reference' %} the reference {% else %} the counterparty {% endif %} {{ group.reference }} {% for row_id in group.row_ids %} {% set row = rows.get(row_id) %}
{% if row %}{{ row.transactiondate }} · {{ row.amount }} · {{ row.manual_category or '' }}{% else %}{{ row_id }}{% endif %}
{% endfor %}
{{ group.reason }} {% if group.manual_categories %}
{{ group.manual_categories | join(', ') }}
{% endif %}
{% endif %} {% if last_report %}

The last merge

{{ last_report.created_at.strftime('%Y-%m-%d %H:%M') }} · {{ last_report.summary.groups }} group{{ 's' if last_report.summary.groups != 1 else '' }} · {{ last_report.summary.rows }} row{{ 's' if last_report.summary.rows != 1 else '' }} · {{ last_report.summary.refused }} refused

{% if last_report.groups %} {% for group in last_report.groups %} {% endfor %}
The row that stayed The rows that the merge flagged The carried category
{{ group.survivor_id }} {% for row_id in group.merged_ids %}
{{ row_id }}
{% endfor %}
{{ group.carried_category or '' }}
{% endif %}
{% endif %} {% endblock %}