permissions issue in invoice_detail
This commit is contained in:
parent
73e5f24c83
commit
93a320716a
@ -11,7 +11,7 @@
|
||||
<div class="row mt-4">
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<h3 class=""><i class="fa-solid fa-book"></i> {% trans "Accounts" %}</h3>
|
||||
{% if perms.django_ledger.create_chartofaccountmodel %}
|
||||
{% if perms.django_ledger.add_chartofaccountmodel %}
|
||||
<a href="{% url 'account_create' request.dealer.slug %}" class="btn btn-md btn-phoenix-primary"><i class="fa fa-plus me-2"></i>{% trans 'New Account' %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@ -82,16 +82,23 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
{% if perms.django_ledger.change_invoicemodel%}
|
||||
{% if invoice.invoice_status == 'in_review' %}
|
||||
<button id="accept_invoice" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#confirmModal"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-check-double"></i> {% trans 'Accept' %}</span></button>
|
||||
{% endif %}
|
||||
{% if invoice.invoice_status == 'approved' %}
|
||||
{% if perms.inventory.add_payment%}
|
||||
<a href="{% url 'payment_create' request.dealer.slug invoice.pk %}" class="btn btn-phoenix-success"><span class="d-none d-sm-inline-block"><i class="fa-solid fa-money-bill"></i> {% trans 'Record Payment' %}</span></a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if not invoice.is_paid %}
|
||||
{% if perms.inventory.change_payment%}
|
||||
<button {% if invoice.is_review or invoice.amount_paid|to_int < invoice.amount_due|to_int %}disabled{% endif %} id="mark_invoice_as_paid" class="btn btn-phoenix-secondary" data-bs-toggle="modal" data-bs-target="#mark_as_paid_Modal"><span class="d-none d-sm-inline-block"><span class="icon-saudi_riyal"></span> {% trans 'Mark as Paid' %}</span></button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<a href="{% url 'invoice_preview' request.dealer.slug invoice.pk %}" class="btn btn-phoenix-primary"><span class="d-none d-sm-inline-block"><i class="fa-regular fa-eye"></i> {% trans 'Preview' %}</span></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{invoice.amount_owned}}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user