From 29816818069e1b07fb44693e0e54b6f518bc4ebc Mon Sep 17 00:00:00 2001 From: Garrett Edel Date: Wed, 7 Aug 2024 13:38:48 -0400 Subject: [PATCH] Dont show amortization tables if dont have prepaids or amortizations --- ledger/templates/api/tables/amortization-table.html | 5 ++++- ledger/templates/api/tables/unattached-prepaids.html | 5 ++++- ledger/templates/api/views/amortizations.html | 2 -- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ledger/templates/api/tables/amortization-table.html b/ledger/templates/api/tables/amortization-table.html index 1018573..52ea90c 100644 --- a/ledger/templates/api/tables/amortization-table.html +++ b/ledger/templates/api/tables/amortization-table.html @@ -1,4 +1,6 @@ {% load humanize %} +{% if amortizations %} +

Open Amortizations

@@ -34,4 +36,5 @@ {% block extra_js %} {% include "api/components/clickable-row-script.html" %} -{% endblock %} \ No newline at end of file +{% endblock %} +{% endif %} \ No newline at end of file diff --git a/ledger/templates/api/tables/unattached-prepaids.html b/ledger/templates/api/tables/unattached-prepaids.html index dfa9c64..ba99184 100644 --- a/ledger/templates/api/tables/unattached-prepaids.html +++ b/ledger/templates/api/tables/unattached-prepaids.html @@ -1,4 +1,6 @@ {% load humanize %} +{% if transactions %} +

Unattached Prepaid Expenses

@@ -28,4 +30,5 @@ {% block extra_js %} {% include "api/components/clickable-row-script.html" %} -{% endblock %} \ No newline at end of file +{% endblock %} +{% endif %} \ No newline at end of file diff --git a/ledger/templates/api/views/amortizations.html b/ledger/templates/api/views/amortizations.html index 4f0fa06..4e042dd 100644 --- a/ledger/templates/api/views/amortizations.html +++ b/ledger/templates/api/views/amortizations.html @@ -1,11 +1,9 @@

Amortizations

-

Unattached Prepaid Expenses

{{ unattached_transactions }}
-

Open Amortizations

{{ amortize }}
\ No newline at end of file