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:
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)

View File

@ -29,6 +29,8 @@
max-height:30rem;
}
</style>
{% endblock %}
@ -41,11 +43,9 @@
<div class="card-body">
{% include 'bill/includes/card_bill.html' with bill=bill entity_slug=view.kwargs.entity_slug style='bill-detail' %}
<hr class="my-4">
{% include 'django_ledger/vendor/includes/card_vendor.html' with vendor=bill.vendor %}
<div class="d-grid mt-8">
<a href="{% url 'django_ledger:bill-list' entity_slug=view.kwargs.entity_slug %}"
{% include 'bill/includes/card_vendor.html' with vendor=bill.vendor %}
<div class="d-grid mt-4">
<a href="{% url 'bill_list' %}"
class="btn btn-phoenix-primary">
<i class="fas fa-arrow-left me-1"></i> {% trans 'Bill List' %}
</a>
@ -209,46 +209,6 @@
</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 -->
<div class="card mb-4 shadow-sm">
<div class="card-header pb-0">

View File

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

View File

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