This commit is contained in:
Faheedkhan 2025-07-07 13:58:55 +03:00
parent 23a67d22a0
commit b33d928bcc
8 changed files with 27 additions and 8 deletions

View File

@ -2662,11 +2662,12 @@ class CustomGroup(models.Model):
"staff",
"schedule",
"activity",
"lead",
"opportunity",
"customer",
"organization",
"notes",
"taska",
"tasks",
"activity",
],
other_perms=[
@ -2692,7 +2693,8 @@ class CustomGroup(models.Model):
"carfinance",
"notes",
"tasks",
"activity",],
"activity",
"vendor"],
other_perms=[
"view_car",
"view_carlocation",
@ -2713,11 +2715,11 @@ class CustomGroup(models.Model):
"itemmodel",
"invoicemodel",
"vendormodel",
"journalentrymodel",
"purchaseordermodel",
"estimatemodel",
"customermodel",
"vendormodel",
"ledgermodel",
"transactionmodel"
],

View File

@ -10234,7 +10234,6 @@ class BillModelActionForceMigrateView(BaseBillActionView):
@login_required
@permission_required("inventory.view_poitemsuploaded", raise_exception=True)
def view_items_inventory(request, dealer_slug, entity_slug, po_pk):
get_object_or_404(models.Dealer, slug=dealer_slug)
po = PurchaseOrderModel.objects.get(pk=po_pk)

View File

@ -184,10 +184,12 @@
</td>
<td class="align-items-start white-space-nowrap pe-2">
{% if bill_item.po_model_id %}
{% if perms.django_ledger.view_purchaseordermodel%}
<a class="btn btn-sm btn-phoenix-primary"
href="{% url 'purchase_order_detail' request.dealer.slug request.dealer.entity.slug bill_item.po_model_id %}">
{% trans 'View PO' %}
</a>
{% endif %}
{% endif %}
</td>
</tr>
@ -231,9 +233,11 @@
<h5 class="mb-0">{% trans 'Bill Notes' %}</h5>
</div>
</div>
{% if perms.django_ledger.change_billmodel%}
<div class="card-body">
{% include 'bill/includes/card_markdown.html' with style='card_1' title='' notes_html=bill.notes_html %}
</div>
{% endif %}
</div>
</div>
</div>

View File

@ -207,7 +207,7 @@
{% if perms.django_ledger.change_billmodel%}
<a href="{% url 'bill-update' dealer_slug=dealer_slug entity_slug=entity_slug bill_pk=bill.uuid %}" class="btn btn-phoenix-primary">
<i class="fas fa-edit me-2"></i>{% trans 'Update' %}
</a>
<!-- Mark as Draft -->
{% if bill.can_draft %}
<button class="btn btn-phoenix-success"
@ -223,7 +223,7 @@
</button>
{% endif %}
<!-- Mark as Approved -->
{% if bill.can_approve and perms.django_ledger.can_approve_bill %}
{% if bill.can_approve and perms.django_ledger.can_approve_billmodel %}
<button class="btn btn-phoenix-success"
onclick="showPOModal('Mark as Approved', '{% url 'bill-action-mark-as-approved' dealer_slug=request.dealer.slug entity_slug=entity_slug bill_pk=bill.pk %}', 'Mark as Approved')">
<i class="fas fa-check-circle me-2"></i>{% trans 'Mark as Approved' %}

View File

@ -290,7 +290,7 @@
<div class="tab-pane fade" id="tab-notes" role="tabpanel" aria-labelledby="notes-tab">
<div class="mb-1 d-flex align-items-center justify-content-between">
<h3 class="mb-4" id="scrollspyNotes">{{ _("Notes") }}</h3>
{% if perms.inventory.change_lead%}
{% if perms.inventory.change_lead %}
<button class="btn btn-phoenix-primary btn-sm" type="button" onclick="reset_form()" data-bs-toggle="modal" data-bs-target="#noteModal"><span class="fas fa-plus me-1"></span>{{ _("Add Note") }}</button>
{% endif %}
</div>

View File

@ -52,16 +52,20 @@
</div>
</div>
<div class="card-footer d-flex ">
{% if perms.django_ledger.change_bankaccountmodel%}
<a class="btn btn-sm btn-phoenix-primary me-1" href="{% url 'bank_account_update' request.dealer.slug bank_account.pk %}">
<!--<i class="bi bi-pencil-square"></i> -->
{{ _("Edit") }}
</a>
{% endif %}
{% if perms.django_ledger.delete_bankaccountmodel%}
<a class="btn btn-sm btn-phoenix-danger me-1"
data-bs-toggle="modal"
data-bs-target="#deleteModal">
<!--<i class="bi bi-trash-fill"></i>-->
{{ _("Delete") }}
</a>
{% endif %}
<a class="btn btn-sm btn-phoenix-secondary"
href="{% url 'bank_account_list' request.dealer.slug %}">
<!--<i class="bi bi-arrow-left-square-fill"></i>-->

View File

@ -96,12 +96,14 @@
{% endif %}
</td>
<td class="align-middle white-space-nowrap text-start">
{% if perms.django_ledger.view_transactionmodel%}
<div class="btn-reveal-trigger position-static">
<button class="btn btn-sm dropdown-toggle dropdown-caret-none transition-none btn-reveal fs-10" type="button" data-bs-toggle="dropdown" data-boundary="window" aria-haspopup="true" aria-expanded="false" data-bs-reference="parent"><span class="fas fa-ellipsis-h fs-10"></span></button>
<div class="dropdown-menu dropdown-menu-end py-2">
<a class="dropdown-item text-success-dark" href="{% url 'payment_details' request.dealer.slug tx.journal_entry.pk %}">{% trans 'view Transactions'|capfirst %}</a>
</div>
</div>
{% endif %}
</td>
</tr>
{% endfor %}
@ -135,17 +137,21 @@
</div>
<div class="mt-3 d-flex">
{% if perms.django_ledger.change_chartofaccountmodel%}
<a class="btn btn-sm btn-phoenix-primary me-1" href="{% url 'account_update' request.dealer.slug account.pk %}">
<!-- <i class="bi bi-pencil-square"></i> -->
<i class="fa-solid fa-pen-to-square"></i> {{ _('Edit') }}
</a>
{% endif %}
{% if perms.django_ledger.delete_chartofaccountmodel%}
<a class="btn btn-sm btn-phoenix-danger me-1" data-bs-toggle="modal" data-bs-target="#deleteModal">
<!-- <i class="bi bi-trash-fill"></i> -->
<i class="fa-solid fa-trash"></i> {{ _('Delete') }}
</a>
{% endif%}
<a class="btn btn-sm btn-phoenix-secondary" href="{% url 'account_list' request.dealer.slug %}">
<!-- <i class="bi bi-arrow-left-square-fill"></i> -->
<i class="fa-regular fa-circle-left"></i> {% trans 'Back to List' %}
<i class="fa-regular fa-circle-left"></i> {% trans 'Back to COA List' %}
</a>
</div>

View File

@ -11,7 +11,9 @@
<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 %}
<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>
<!-- Account Type Tabs -->
@ -105,10 +107,12 @@
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
{% if perms.django_ledger.delete_chartofaccountmodel %}
<h5 class="modal-title" id="deleteModalLabel">
{% trans "Delete Account" %}
<span data-feather="alert-circle"></span>
</h5>
{% endif %}
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body text-center">