This commit is contained in:
Faheedkhan 2025-06-17 16:21:58 +03:00
commit 45c13c815a
4 changed files with 24 additions and 68 deletions

View File

@ -9200,7 +9200,7 @@ def upload_cars(request,pk=None):
if pk: if pk:
item = get_object_or_404(ItemTransactionModel, pk=pk) item = get_object_or_404(ItemTransactionModel, pk=pk)
response = redirect('upload_cars', 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.') messages.add_message(request, messages.ERROR, 'Item already uploaded.')
return redirect('view_items_inventory', entity_slug=dealer.slug, po_pk=item.po_model.pk) return redirect('view_items_inventory', entity_slug=dealer.slug, po_pk=item.po_model.pk)

View File

@ -29,6 +29,8 @@
max-height:30rem; max-height:30rem;
} }
</style> </style>
{% endblock %} {% endblock %}
@ -41,11 +43,9 @@
<div class="card-body"> <div class="card-body">
{% include 'bill/includes/card_bill.html' with bill=bill entity_slug=view.kwargs.entity_slug style='bill-detail' %} {% include 'bill/includes/card_bill.html' with bill=bill entity_slug=view.kwargs.entity_slug style='bill-detail' %}
<hr class="my-4"> <hr class="my-4">
{% include 'bill/includes/card_vendor.html' with vendor=bill.vendor %}
{% include 'django_ledger/vendor/includes/card_vendor.html' with vendor=bill.vendor %} <div class="d-grid mt-4">
<a href="{% url 'bill_list' %}"
<div class="d-grid mt-8">
<a href="{% url 'django_ledger:bill-list' entity_slug=view.kwargs.entity_slug %}"
class="btn btn-phoenix-primary"> class="btn btn-phoenix-primary">
<i class="fas fa-arrow-left me-1"></i> {% trans 'Bill List' %} <i class="fas fa-arrow-left me-1"></i> {% trans 'Bill List' %}
</a> </a>
@ -209,46 +209,6 @@
</div> </div>
</div> </div>
{% if bill.is_active %}
<!-- Financial Statements Buttons -->
<div class="row mb-4">
<div class="col-12">
<div class="d-flex justify-content-center gap-2 flex-wrap">
<a href="{% url 'django_ledger:ledger-bs' entity_slug=view.kwargs.entity_slug ledger_pk=bill.ledger_id %}"
class="btn btn-phoenix-info">
{% trans 'Balance Sheet' %}
</a>
<a href="{% url 'django_ledger:ledger-ic' entity_slug=view.kwargs.entity_slug ledger_pk=bill.ledger_id %}"
class="btn btn-phoenix-info">
{% trans 'Income Statement' %}
</a>
<a href="{% url 'django_ledger:ledger-cf' entity_slug=view.kwargs.entity_slug ledger_pk=bill.ledger_id %}"
class="btn btn-phoenix-info">
{% trans 'Cash Flow Statement' %}
</a>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-12">
<div class="d-flex justify-content-center gap-2 flex-wrap">
<a href="{% url 'django_ledger:ledger-bs-year' entity_slug=view.kwargs.entity_slug ledger_pk=bill.ledger_id year=bill.get_status_action_date.year %}?format=pdf&report_subtitle={{ bill.generate_descriptive_title | safe }}"
class="btn btn-phoenix-success">
{% trans 'Balance Sheet PDF' %} <i class="fas fa-download ms-1"></i>
</a>
<a href="{% url 'django_ledger:ledger-ic-year' entity_slug=view.kwargs.entity_slug ledger_pk=bill.ledger_id year=bill.get_status_action_date.year %}?format=pdf&report_subtitle={{ bill.generate_descriptive_title | safe }}"
class="btn btn-phoenix-success">
{% trans 'Income Statement PDF' %} <i class="fas fa-download ms-1"></i>
</a>
<a href="{% url 'django_ledger:ledger-cf-year' entity_slug=view.kwargs.entity_slug ledger_pk=bill.ledger_id year=bill.get_status_action_date.year %}?format=pdf&report_subtitle={{ bill.generate_descriptive_title | safe }}"
class="btn btn-phoenix-success">
{% trans 'Cash Flow Statement PDF' %} <i class="fas fa-download ms-1"></i>
</a>
</div>
</div>
</div>
{% endif %}
<!-- Bill Transactions Card --> <!-- Bill Transactions Card -->
<div class="card mb-4 shadow-sm"> <div class="card mb-4 shadow-sm">
<div class="card-header pb-0"> <div class="card-header pb-0">

View File

@ -2,24 +2,22 @@
{% load django_ledger %} {% load django_ledger %}
{% if style == 'card_1' %} {% if style == 'card_1' %}
<div class="card" style="height:25rem;"> <div class="card h-100" style="height: 25rem;">
<div class="card-header"> <div class="card-header">
<div class="card-header-title"> <h5 class="card-title fs-3 fw-light mb-0">
<h1 class="is-size-3 has-text-weight-light">{% if title %}{{ title }}{% else %} {% if title %}
{% trans 'Notes' %} {{ title }}
{% endif %}</h1> {% else %}
</div> {% trans 'Notes' %}
</div> {% endif %}
<div class="card-content"> </h5>
<div class="content"> </div>
{% if notes_html %} <div class="card-body overflow-auto">
{% autoescape off %} {% if notes_html %}
{{ notes_html | safe }} {{ notes_html|safe }}
{% endautoescape %} {% else %}
{% else %} <p class="card-text">{% trans 'No available notes to display...' %}</p>
<p>{% trans 'No available notes to display...' %}</p> {% endif %}
{% endif %} </div>
</div> </div>
</div>
</div>
{% endif %} {% endif %}

View File

@ -23,6 +23,4 @@
{% if vendor.website %}<span class="d-block">{{ vendor.website }}</span>{% endif %} {% if vendor.website %}<span class="d-block">{{ vendor.website }}</span>{% endif %}
</p> </p>
</div> </div>
</div> </div>