From 34d76454424207a7eb2d70457a55a77be60d1eff Mon Sep 17 00:00:00 2001 From: ismail Date: Tue, 17 Jun 2025 16:05:36 +0300 Subject: [PATCH 1/2] this the edit link in the footer --- templates/bill/bill_detail.html | 46 ++-------------------- templates/bill/includes/card_markdown.html | 38 +++++++++--------- templates/bill/includes/card_vendor.html | 2 - 3 files changed, 21 insertions(+), 65 deletions(-) diff --git a/templates/bill/bill_detail.html b/templates/bill/bill_detail.html index 66055386..9fa08961 100644 --- a/templates/bill/bill_detail.html +++ b/templates/bill/bill_detail.html @@ -29,7 +29,7 @@ height:30rem; } - + {% endblock %} @@ -43,9 +43,9 @@
{% include 'bill/includes/card_bill.html' with bill=bill entity_slug=view.kwargs.entity_slug style='bill-detail' %}
- {% include 'django_ledger/vendor/includes/card_vendor.html' with vendor=bill.vendor %} + {% include 'bill/includes/card_vendor.html' with vendor=bill.vendor %}
- {% trans 'Bill List' %} @@ -209,46 +209,6 @@
- {% if bill.is_active %} - -
- -
-
- -
- {% endif %} -
diff --git a/templates/bill/includes/card_markdown.html b/templates/bill/includes/card_markdown.html index 1b3d8ae8..05c355b8 100644 --- a/templates/bill/includes/card_markdown.html +++ b/templates/bill/includes/card_markdown.html @@ -2,24 +2,22 @@ {% load django_ledger %} {% if style == 'card_1' %} -
-
-
-

{% if title %}{{ title }}{% else %} - {% trans 'Notes' %} - {% endif %}

-
-
-
-
- {% if notes_html %} - {% autoescape off %} - {{ notes_html | safe }} - {% endautoescape %} - {% else %} -

{% trans 'No available notes to display...' %}

- {% endif %} -
-
-
+
+
+
+ {% if title %} + {{ title }} + {% else %} + {% trans 'Notes' %} + {% endif %} +
+
+
+ {% if notes_html %} + {{ notes_html|safe }} + {% else %} +

{% trans 'No available notes to display...' %}

+ {% endif %} +
+
{% endif %} diff --git a/templates/bill/includes/card_vendor.html b/templates/bill/includes/card_vendor.html index 713ba74d..81ece8bf 100644 --- a/templates/bill/includes/card_vendor.html +++ b/templates/bill/includes/card_vendor.html @@ -23,6 +23,4 @@ {% if vendor.website %}{{ vendor.website }}{% endif %}

- -
\ No newline at end of file From de38df6a7c56301abfbd8995e2b06f39c61e177a Mon Sep 17 00:00:00 2001 From: ismail Date: Tue, 17 Jun 2025 16:17:57 +0300 Subject: [PATCH 2/2] update the item model additional info --- inventory/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory/views.py b/inventory/views.py index 7b5a06db..8aac9f89 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -9200,7 +9200,7 @@ def upload_cars(request,pk=None): if pk: item = get_object_or_404(ItemTransactionModel, pk=pk) response = redirect('upload_cars', pk=pk) - if item.item_model.additional_info["uploaded"]: + if item.item_model.additional_info.get("uploaded"): messages.add_message(request, messages.ERROR, 'Item already uploaded.') return redirect('view_items_inventory', entity_slug=dealer.slug, po_pk=item.po_model.pk)