From fe66ce1ca196becbe3ae0526fff542359a0f7882 Mon Sep 17 00:00:00 2001 From: Faheedkhan Date: Wed, 21 May 2025 16:32:58 +0300 Subject: [PATCH 1/2] vendor ui --- templates/items/expenses/expenses_list.html | 78 +++--- templates/items/service/service_list.html | 61 +++-- .../bank_accounts/bank_account_list.html | 68 +++-- .../ledger/coa_accounts/account_list.html | 70 +++--- templates/ledger/ledger/ledger_list.html | 36 +-- templates/vendors/vendors_list.html | 236 ++++++++++-------- 6 files changed, 318 insertions(+), 231 deletions(-) diff --git a/templates/items/expenses/expenses_list.html b/templates/items/expenses/expenses_list.html index ef969958..60696c4b 100644 --- a/templates/items/expenses/expenses_list.html +++ b/templates/items/expenses/expenses_list.html @@ -4,48 +4,68 @@ {% block title %}{{ _("Expenses") }}{% endblock title %} {% block content %} -
-
- -

{% trans "Expenses" %}

+ +
+ +
+

{% trans "Expenses" %}

{% trans "Add Expense" %} -
-
-
- - - + {% if page_obj.object_list %} +
+
+ + - - {% for expense in expenses %} - - - - - + + + + - + + + + + + {% empty %} - - - - {% endfor %} - -
{% trans "Item Number" %} {% trans "Name" %} {% trans "Unit of Measure" %} {% trans "Action" %}
{{ expense.item_number }}{{ expense.name }}{{ expense.uom }} - + + {% for expense in expenses %} + +
+ {{ expense.item_number }} + + {{ expense.name }} + + {{ expense.uom }} + + {% trans "Update" %} -
+ + + +
{% trans "No Invoice Found" %}
-
-
-
+ + {% trans "No Accounts Found" %} + + {% endfor %} + +
+
+
+ + {% endif %} +
+ {% endblock %} \ No newline at end of file diff --git a/templates/items/service/service_list.html b/templates/items/service/service_list.html index ad0390b0..346febf8 100644 --- a/templates/items/service/service_list.html +++ b/templates/items/service/service_list.html @@ -4,19 +4,19 @@ {% block title %}{{ _("Expenses") }}{% endblock title %} {% block content %} -
-
- -

{% trans "Services" %}

- {% trans "Add Service" %} + +
+
+

{% trans "Services" %}

+ {% trans "Add Service" %}
- -
- + {% if page_obj.object_list %} +
+
- + @@ -25,30 +25,43 @@ + + {% for service in services %} + - - - - - + + + + - {% empty %} + + + {% empty %} - + {% endfor %} @@ -56,5 +69,9 @@
+ + {% endif %} + + {% endblock %} \ No newline at end of file diff --git a/templates/ledger/bank_accounts/bank_account_list.html b/templates/ledger/bank_accounts/bank_account_list.html index 7c5f17ac..3ff56911 100644 --- a/templates/ledger/bank_accounts/bank_account_list.html +++ b/templates/ledger/bank_accounts/bank_account_list.html @@ -5,52 +5,82 @@ {% block content %}
-
-

{% trans "Bank Accounts" %}

+
+

{% trans "Bank Accounts" %}

{% trans "Add Bank Account" %}
+
+
+
+ + + {% if request.GET.q %} + + + + {% endif %} +
+ +
+ + + + {% if page_obj.object_list %}
{% trans "Item Number" %} {% trans "Name" %} {% trans "Unit of Measure" %}{% trans "Action" %}
{{ service.pk }}{{ service.get_local_name }}{{ service.uom }} - {% if service.taxable %} - Yes - {% else %} - No - {% endif %} + {{ service.pk }} {{ service.item.co }} - + {{ service.get_local_name }} + + {{ service.uom }} + + {% if service.taxable %} + Yes + {% else %} + No + {% endif %} + + {{ service.item.co }} + + {% trans "Update" %}
{% trans "No Invoice Found" %}{% trans "No Accounts Found" %}
- - - - + + + + + - {% for bank in bank_accounts %} + {% for bank in bank_accounts %} - - - - + + + + + {% empty %} - + {% endfor %} +
{% trans "Name" %}{% trans "Account Number" %}{% trans "Type" %}{% trans "Action" %}{% trans "Name" %}{% trans "Account Number" %}{% trans "Type" %}{% trans "Action" %}
{{ bank.name }}{{ bank.account_number }}{{ bank.account_type|capfirst }} - + {{ bank.name }} + + {{ bank.account_number }} + + {{ bank.account_type|capfirst }} + + {% trans "Update" %} -
{% trans "No Bank Accounts Found" %}{% trans "No Accounts Found" %}
-
+
+ {% endif %}
- - - - {% endblock %} \ No newline at end of file diff --git a/templates/ledger/coa_accounts/account_list.html b/templates/ledger/coa_accounts/account_list.html index 59f4ab28..380bba3e 100644 --- a/templates/ledger/coa_accounts/account_list.html +++ b/templates/ledger/coa_accounts/account_list.html @@ -8,16 +8,12 @@ {% endblock %} {% block content %} - - +
-
- - - {% trans 'New Account' %} +
+

{% trans "Accounts" %}

+ {% trans 'New Account' %}
-

- {% trans "Accounts" %}

@@ -38,25 +34,24 @@
-
- {% if page_obj.object_list %} + + + + {% if page_obj.object_list %}
- - - - - - - + + + + + + - {% for account in accounts %} - - + {% for account in accounts %} - - - - - + + + + - - - {% empty %} - + {% endfor %}
{% trans "Type" %}{% trans "Account Name" %}{% trans "Code" %}{% trans "Balance Type" %}{% trans "Active" %}{% trans "Type" %}{% trans "Account Name" %}{% trans "Code" %}{% trans "Balance Type" %}{% trans "Active" %}
{{ account.role_bs|upper }}{{ account.name }}{{ account.code }} +
+ {{ account.role_bs|upper }} + + {{ account.name }} + + {{ account.code }} + + {% if account.balance_type == 'debit' %}
{{ _("Debit") }}
{% else %}
{{ _("Credit") }}
{% endif %}
- {% if account.active %} + + {% if account.active %} {% else %} {% endif %} +
-
+
- {% trans "No account found." %} - {% trans "No Accounts Found" %}
-
{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }} {{ _("Items of")}} {{ page_obj.paginator.count }}
@@ -142,7 +140,9 @@
- {% endif %} +
+ + {% endblock %} \ No newline at end of file diff --git a/templates/ledger/ledger/ledger_list.html b/templates/ledger/ledger/ledger_list.html index eb6ccecf..3eaea9ff 100644 --- a/templates/ledger/ledger/ledger_list.html +++ b/templates/ledger/ledger/ledger_list.html @@ -4,18 +4,19 @@ {% block title %}{{ _("Ledger") }}{% endblock title %} {% block content %} + +
+
-

{% trans "Ledger" %}

-
- +
- +
+ @@ -25,11 +26,13 @@ + {% for ledger in ledgers %} + {% empty %} - + {% endfor %} @@ -121,6 +124,9 @@
+ + + {% endblock %} \ No newline at end of file diff --git a/templates/vendors/vendors_list.html b/templates/vendors/vendors_list.html index fb72c66e..4775dd9d 100644 --- a/templates/vendors/vendors_list.html +++ b/templates/vendors/vendors_list.html @@ -5,125 +5,139 @@ {% block vendors %}{{ _("Vendors")|capfirst }}{% endblock %} {% block content %} -
- -
- -

{{ _("Vendors")|capfirst }}

- -
-
- + + +
+
+

{{ _("Vendors")|capfirst }}

+ {{ _("Add Vendor") }}
-
-
- -
+
+
+
+ + + {% if request.GET.q %} + + + + {% endif %} +
+
-
-
+ -
{% trans "Ledger Name" %} {% trans "Journal Entries" %}{% trans "Action" %}
- {% if ledger.invoicemodel %} + {% if ledger.invoicemodel %} {{ ledger.get_wrapped_model_instance }} {% elif ledger.billmodel %} {{ ledger.get_wrapped_model_instance }} @@ -38,7 +41,7 @@ {% endif %} - @@ -48,21 +51,21 @@ - {{ ledger.created |date }} + {{ ledger.created |date }} - {% if ledger.is_posted %} + {% if ledger.is_posted %} {% else %} {% endif %} - {% if ledger.is_locked %} + {% if ledger.is_locked %} {% else %} - {% endif %} + {% endif %}
@@ -108,12 +111,12 @@ class="dropdown-item has-text-danger has-text-weight-bold">{% trans 'Delete' %} {% endif %}
- +
{% trans "No Bank Accounts Found" %}{% trans "No Entries found" %}
- - - - - - - - - - - - - {% for vendor in vendors %} - - - + + + {% endfor %} + +
{{ _("Name")|capfirst }} -
-
{{ _("email")|capfirst }} -
-
-
-
{{ _("Phone") }} -
-
-
-
{{ _("Contact name")|capfirst }} -
-
-
-
{{ _("Address")|capfirst }} -
-
- {{ _("Create date") }}
-
- {% if vendor.logo %} -
- {% else %} -
- {% endif %} + {% if page_obj.object_list %} +
+ + + + + + + - - - - - + + + + + - {% endfor %} - + + + {% for vendor in vendors %} + + + + + + + + + + -
{{ _("Name")|capfirst }} +
+
{{ _("email")|capfirst }} +
+
+
+
{{ _("Phone") }}
-
{{ vendor.arabic_name }} -
-

{{ vendor.name}}

-
-
- - -
{{ vendor.phone_number }}{{ vendor.contact_person }} - {{ vendor.address }}{{ vendor.created_at|date }} -
- - -
-
+
+
{{ _("Contact name")|capfirst }} +
+
+
+
{{ _("Address")|capfirst }} +
+
{{ _("Create date") }}
+
+ {% if vendor.logo %} +
+ {% else %} +
+ {% endif %} +
+
{{ vendor.arabic_name }} +
+

{{ vendor.name}}

+
+
+
+
+ {{ vendor.email }} + + {{ vendor.phone_number }} + + {{ vendor.contact_person }} + + {{ vendor.address }} + + {{ vendor.created_at|date }} + +
+ + +
+
-
-
- - {% if is_paginated %} - {% include 'partials/pagination.html' %} + {% empty %} +
{% trans "No Accounts Found" %}
+
+
+ + {% if is_paginated %} + {% include 'partials/pagination.html' %} + {% endif %} +
+ {% endif %} -
-
- + +
+ {% include 'modal/delete_modal.html' %} {% endblock %} From e9d6a5da27883199add97fa08c2752832f96f927 Mon Sep 17 00:00:00 2001 From: Faheedkhan Date: Wed, 21 May 2025 19:24:14 +0300 Subject: [PATCH 2/2] add ui changes to the tables in the financials --- templates/items/expenses/expenses_list.html | 35 ++- templates/items/service/service_list.html | 34 ++- .../bank_accounts/bank_account_list.html | 9 +- templates/ledger/bills/bill_list.html | 215 ++++++++---------- .../ledger/coa_accounts/account_detail.html | 126 ++++++---- .../ledger/coa_accounts/account_list.html | 4 +- .../journal_entry/journal_entry_list.html | 41 ++-- .../journal_entry_transactions.html | 4 +- templates/ledger/ledger/ledger_list.html | 32 ++- templates/vendors/vendors_list.html | 16 +- 10 files changed, 305 insertions(+), 211 deletions(-) diff --git a/templates/items/expenses/expenses_list.html b/templates/items/expenses/expenses_list.html index 60696c4b..00a5f724 100644 --- a/templates/items/expenses/expenses_list.html +++ b/templates/items/expenses/expenses_list.html @@ -12,6 +12,28 @@ {% trans "Add Expense" %}
+
+
+
+ + + {% if request.GET.q %} + + + + {% endif %} +
+
+
+ + {% if page_obj.object_list %}
@@ -61,8 +83,19 @@
-
+ +
{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }} {{ _("Items of")}} {{ page_obj.paginator.count }} +
+ + {% if is_paginated %} + {% include 'partials/pagination.html' %} + {% endif %} + +
+ + + {% endif %} diff --git a/templates/items/service/service_list.html b/templates/items/service/service_list.html index 346febf8..5c2b0f30 100644 --- a/templates/items/service/service_list.html +++ b/templates/items/service/service_list.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load i18n static %} -{% block title %}{{ _("Expenses") }}{% endblock title %} +{% block title %}{{ _("Services") }}{% endblock title %} {% block content %} @@ -12,6 +12,28 @@ {% trans "Add Service" %}
+
+
+
+ + + {% if request.GET.q %} + + + + {% endif %} +
+
+
+ + {% if page_obj.object_list %}
@@ -67,7 +89,15 @@
-
+ +
{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }} {{ _("Items of")}} {{ page_obj.paginator.count }} +
+ + {% if is_paginated %} + {% include 'partials/pagination.html' %} + {% endif %} + +
{% endif %} diff --git a/templates/ledger/bank_accounts/bank_account_list.html b/templates/ledger/bank_accounts/bank_account_list.html index 3ff56911..7b32195a 100644 --- a/templates/ledger/bank_accounts/bank_account_list.html +++ b/templates/ledger/bank_accounts/bank_account_list.html @@ -76,7 +76,14 @@
-
+
{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }} {{ _("Items of")}} {{ page_obj.paginator.count }} +
+ + {% if is_paginated %} + {% include 'partials/pagination.html' %} + {% endif %} + +
{% endif %} diff --git a/templates/ledger/bills/bill_list.html b/templates/ledger/bills/bill_list.html index 6299e12f..72da3311 100644 --- a/templates/ledger/bills/bill_list.html +++ b/templates/ledger/bills/bill_list.html @@ -10,129 +10,102 @@ {% endblock %} {% block content %} -
- -
-
- -
-
-
-
+ +
+
+

{% trans "Bills" %}

+ {% trans 'New Bill' %} +
+ + + +
+
- - - {% if request.GET.q %} - - {% endif %} -
- -
-
-
- - -
-
- - - - - - - - - - - {% for bill in bills %} - - - - - - - {% empty %} - - - - {% endfor %} - -
- {% trans 'Bill Number' %} - - {% trans 'Bill Status' %} - - {% trans 'Vendor' %} - Action
{{ bill.bill_number }} - {% if bill.is_draft %} - - {% elif bill.is_review %} - - {% elif bill.is_approved %} - - {% elif bill.is_paid %} - - {% endif %} - {{ bill.bill_status }} - - - {{bill.vendor.vendor_name}} - -
- - -
-
- {% trans 'No bill found.' %} -
-
- -
- {{ page_obj.start_index }} {{ _('to') }} {{ page_obj.end_index }}{{ _('Items of') }}{{ page_obj.paginator.count }} -
- -
-
+
+
-
+ + + + +
+ + + + + + + + + + + + {% for bill in bills %} + + + + + + + {% empty %} + + + + {% endfor %} + +
{% trans 'Bill Number' %}{% trans 'Bill Status' %}{% trans 'Vendor' %}{% trans 'Action'%}
+ {{ bill.bill_number }} + + {% if bill.is_draft %} + + {% elif bill.is_review %} + + {% elif bill.is_approved %} + + {% elif bill.is_paid %} + + {% endif %} + {{ bill.bill_status }} + + + {{bill.vendor.vendor_name}} + +
+ + +
+ +
+ {% trans 'No bill found.' %} +
+
+
{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }} {{ _("Items of")}} {{ page_obj.paginator.count }} +
+ + {% if is_paginated %} + {% include 'partials/pagination.html' %} + {% endif %} + +
+
+
-
+ {% endblock %} diff --git a/templates/ledger/coa_accounts/account_detail.html b/templates/ledger/coa_accounts/account_detail.html index fc051955..f92aebf3 100644 --- a/templates/ledger/coa_accounts/account_detail.html +++ b/templates/ledger/coa_accounts/account_detail.html @@ -6,7 +6,7 @@ {% endblock %} {% block content %} - + + + +
+ +
+ {% endblock %} diff --git a/templates/ledger/coa_accounts/account_list.html b/templates/ledger/coa_accounts/account_list.html index 380bba3e..2dd35aab 100644 --- a/templates/ledger/coa_accounts/account_list.html +++ b/templates/ledger/coa_accounts/account_list.html @@ -145,4 +145,6 @@ -{% endblock %} \ No newline at end of file +{% endblock %} + + diff --git a/templates/ledger/journal_entry/journal_entry_list.html b/templates/ledger/journal_entry/journal_entry_list.html index 2ac4b75c..12159875 100644 --- a/templates/ledger/journal_entry/journal_entry_list.html +++ b/templates/ledger/journal_entry/journal_entry_list.html @@ -31,33 +31,20 @@ +
-
-

{% trans "Journal Entries" %}

-
- {% comment %} {% if ledger.is_posted %} - {% if ledger.is_locked %} - {% trans 'UnLock All' %} - {% else %} - {% trans 'Lock All' %} - {% endif %} - {% endif %} - {% if not ledger.is_locked %} - {% if ledger.is_posted %} - {% trans 'UnPost All' %} - {% else %} - {% trans 'Post All' %} - {% endif %} - {% endif %} {% endcomment %} - {% trans "Add Journal Entry" %} -
-
-
-
- +
+

{% trans "Journal Entries" %}

+ {% trans "Add Journal Entry" %} +
+ + + +
+
- + @@ -126,8 +113,10 @@
{% trans "Document Number" %} {% trans "Timestamp" %} {% trans "Activity" %}
-
-
+ + + + {% endblock %} \ No newline at end of file diff --git a/templates/ledger/journal_entry/journal_entry_transactions.html b/templates/ledger/journal_entry/journal_entry_transactions.html index 37c19d69..24810adb 100644 --- a/templates/ledger/journal_entry/journal_entry_transactions.html +++ b/templates/ledger/journal_entry/journal_entry_transactions.html @@ -11,9 +11,9 @@

{% trans "Transactions" %}

- +
- + diff --git a/templates/ledger/ledger/ledger_list.html b/templates/ledger/ledger/ledger_list.html index 3eaea9ff..db9b6138 100644 --- a/templates/ledger/ledger/ledger_list.html +++ b/templates/ledger/ledger/ledger_list.html @@ -12,6 +12,28 @@

{% trans "Ledger" %}

{% trans 'Create Ledger' %} + +
+
+
+ + + {% if request.GET.q %} + + + + {% endif %} +
+ +
+
{% trans "#" %} {% trans "Timestamp" %} {% trans "Account Name" %}
@@ -122,7 +144,15 @@
-
+ +
{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }} {{ _("Items of")}} {{ page_obj.paginator.count }} +
+ + {% if is_paginated %} + {% include 'partials/pagination.html' %} + {% endif %} + +
diff --git a/templates/vendors/vendors_list.html b/templates/vendors/vendors_list.html index 4775dd9d..21c891d7 100644 --- a/templates/vendors/vendors_list.html +++ b/templates/vendors/vendors_list.html @@ -5,7 +5,7 @@ {% block vendors %}{{ _("Vendors")|capfirst }}{% endblock %} {% block content %} - +
@@ -128,11 +128,15 @@
-
- - {% if is_paginated %} - {% include 'partials/pagination.html' %} - {% endif %} + +
{{ page_obj.start_index }} {{ _("to") }} {{ page_obj.end_index }} {{ _("Items of")}} {{ page_obj.paginator.count }} +
+ + {% if is_paginated %} + {% include 'partials/pagination.html' %} + {% endif %} + +
{% endif %}