mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-11-22 08:32:03 +01:00
Transfers are still two transactions, now linked to each other:
- shown as one item in lists, with each side's amount, account,
category and tags ("Combine transfers" user setting, on by default)
- date, reference date, paid and mute stay in sync between sides
- edit opens the transfer form; delete, restore, duplicate and bulk
actions act on both sides
- transfers made by the transfer form now trigger rules for each side
Recurring and quick transactions gain a Transfer type, with a "To
account" and optional "To amount", generating linked transfers. A
transfer can be converted into either.
Existing transfers are left as they are, since there is no reliable
way to pair them.
74 lines
3.3 KiB
HTML
74 lines
3.3 KiB
HTML
{% load i18n %}
|
|
<div class="card bg-base-100 shadow-xl">
|
|
<div class="card-body">
|
|
<div id="quick-transactions-table">
|
|
{% if quick_transactions %}
|
|
<c-config.search></c-config.search>
|
|
|
|
<div class="overflow-x-auto">
|
|
<table class="table table-zebra">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col" class="table-col-auto"></th>
|
|
<th scope="col">{% translate 'Name' %}</th>
|
|
<th scope="col">{% translate 'Account' %}</th>
|
|
<th scope="col">{% translate 'Amount' %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for qt in quick_transactions %}
|
|
<tr class="recurring_transaction">
|
|
<td class="table-col-auto text-center">
|
|
<div class="join" role="group" aria-label="{% translate 'Actions' %}">
|
|
<a class="btn btn-secondary btn-sm join-item"
|
|
role="button"
|
|
data-tippy-content="{% translate "Edit" %}"
|
|
hx-get="{% url 'quick_transaction_edit' quick_transaction_id=qt.id %}"
|
|
hx-swap="innerHTML"
|
|
hx-target="#generic-offcanvas">
|
|
<i class="fa-solid fa-pencil fa-fw"></i></a>
|
|
<a class="btn btn-error btn-sm join-item"
|
|
role="button"
|
|
data-tippy-content="{% translate "Delete" %}"
|
|
hx-delete="{% url 'quick_transaction_delete' quick_transaction_id=qt.id %}"
|
|
hx-trigger='confirmed'
|
|
hx-swap="innerHTML"
|
|
data-bypass-on-ctrl="true"
|
|
data-title="{% translate "Are you sure?" %}"
|
|
data-text="{% translate "This will delete this item" %}"
|
|
data-confirm-text="{% translate "Yes, delete it!" %}"
|
|
_="install prompt_swal"><i class="fa-solid fa-trash fa-fw"></i></a>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div
|
|
class="{% if qt.type == 'EX' %}text-error{% elif qt.type == 'TR' %}text-info{% else %}text-success{% endif %}">
|
|
{{ qt.name }}
|
|
</div>
|
|
</td>
|
|
<td>
|
|
{% if qt.account.group %}{{ qt.account.group }} • {% endif %}{{ qt.account }}
|
|
{% if qt.is_transfer %}
|
|
<div><i class="fa-solid fa-arrow-right fa-fw fa-xs text-base-content/40"></i> {% if qt.to_account.group %}{{ qt.to_account.group }} • {% endif %}{{ qt.to_account }}</div>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<c-amount.display
|
|
:amount="qt.amount"
|
|
:prefix="qt.account.currency.prefix"
|
|
:suffix="qt.account.currency.suffix"
|
|
:decimal_places="qt.account.currency.decimal_places"
|
|
color="{% if qt.type == "EX" %}red{% elif qt.type == "IN" %}green{% endif %}"></c-amount.display>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<c-msg.empty title="{% translate "Nothing to see here..." %}" remove-padding></c-msg.empty>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|