mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-02-25 08:54:52 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
851b34f07a | ||
|
|
546ed5c6af | ||
|
|
04ae7337f5 | ||
|
|
63069f0ec9 | ||
|
|
32b522dad2 |
@@ -7,6 +7,7 @@ from django.utils.translation import gettext_lazy as _, ngettext_lazy
|
||||
|
||||
from apps.common.decorators.htmx import only_htmx
|
||||
from apps.transactions.models import Transaction
|
||||
from apps.rules.signals import transaction_updated
|
||||
|
||||
|
||||
@only_htmx
|
||||
@@ -17,6 +18,9 @@ def bulk_pay_transactions(request):
|
||||
count = transactions.count()
|
||||
transactions.update(is_paid=True)
|
||||
|
||||
for transaction in transactions:
|
||||
transaction_updated.send(sender=transaction)
|
||||
|
||||
messages.success(
|
||||
request,
|
||||
ngettext_lazy(
|
||||
@@ -41,6 +45,9 @@ def bulk_unpay_transactions(request):
|
||||
count = transactions.count()
|
||||
transactions.update(is_paid=False)
|
||||
|
||||
for transaction in transactions:
|
||||
transaction_updated.send(sender=transaction)
|
||||
|
||||
messages.success(
|
||||
request,
|
||||
ngettext_lazy(
|
||||
|
||||
@@ -316,6 +316,7 @@ def transaction_pay(request, transaction_id):
|
||||
new_is_paid = False if transaction.is_paid else True
|
||||
transaction.is_paid = new_is_paid
|
||||
transaction.save()
|
||||
transaction_updated.send(sender=transaction)
|
||||
|
||||
response = render(
|
||||
request,
|
||||
|
||||
@@ -57,9 +57,8 @@
|
||||
</td>
|
||||
<td class="col">{{ account.name }}</td>
|
||||
<td class="col">{{ account.group.name }}</td>
|
||||
<td class="col">{{ account.currency }} ({{ account.currency.code }})</td>
|
||||
<td class="col">{% if account.exchange_currency %}{{ account.exchange_currency }} (
|
||||
{{ account.exchange_currency.code }}){% else %}-{% endif %}</td>
|
||||
<td class="col">{{ account.currency }}</td>
|
||||
<td class="col">{% if account.exchange_currency %}{{ account.exchange_currency }}{% else %}-{% endif %}</td>
|
||||
<td class="col">{% if account.is_asset %}<i class="fa-solid fa-solid fa-check text-success"></i>{% endif %}</td>
|
||||
<td class="col">{% if account.is_archived %}<i class="fa-solid fa-solid fa-check text-success"></i>{% endif %}</td>
|
||||
</tr>
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
<div class="col">
|
||||
<c-ui.info-card color="yellow" icon="fa-solid fa-percent" title="{% trans 'Distribution' %}">
|
||||
{% for p in percentages.values %}
|
||||
<p class="tw-text-gray-400 mb-2 {% if not forloop.first %}mt-3{% endif %}">{{ p.currency.name }} ({{ p.currency.code }})</p>
|
||||
<p class="tw-text-gray-400 mb-2 {% if not forloop.first %}mt-3{% endif %}">{{ p.currency.name }}</p>
|
||||
<c-ui.percentage-distribution :percentage="p"></c-ui.percentage-distribution>
|
||||
{% endfor %}
|
||||
</c-ui.info-card>
|
||||
|
||||
Reference in New Issue
Block a user