diff --git a/inventory/signals.py b/inventory/signals.py index 4276d69e..30ee0c29 100644 --- a/inventory/signals.py +++ b/inventory/signals.py @@ -1032,7 +1032,7 @@ def po_fullfilled_notification(sender, instance, created, **kwargs): ).format( url=reverse( "purchase_order_detail", - kwargs={"dealer_slug": dealer.slug, "pk": instance.pk}, + kwargs={"dealer_slug": dealer.slug,"entity_slug":instance.entity.slug, "pk": instance.pk}, ), ), ) diff --git a/inventory/views.py b/inventory/views.py index a1622737..8b6318ed 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -4798,6 +4798,7 @@ class EstimateDetailView(LoginRequiredMixin, PermissionRequiredMixin, DetailView finance_data = calculator.get_finance_data() invoice_obj = InvoiceModel.objects.all().filter(ce_model=estimate).first() kwargs["data"] = finance_data + print(kwargs["data"]) kwargs["invoice"] = invoice_obj try: car_finances = estimate.get_itemtxs_data()[0].first().item_model.car.finances @@ -10410,7 +10411,9 @@ def upload_cars(request, dealer_slug, pk=None): f"User {user_username} retrieved ItemTransactionModel PK: {pk} for car upload." ) item = get_object_or_404(ItemTransactionModel, pk=pk) + po_item = models.PoItemsUploaded.objects.get(dealer=dealer, item=item) + response = redirect("upload_cars", dealer_slug=dealer_slug, pk=pk) if po_item.status == "uploaded": messages.add_message(request, messages.ERROR, "Item already uploaded.") @@ -10648,7 +10651,7 @@ def purchase_report_view(request,dealer_slug): po_quantity=0 for item in items: po_amount+=item["total"] - po_quantity+=item["q"] + po_quantity+=item["q"] total_po_amount+=po_amount total_po_cars+=po_quantity diff --git a/static/images/no_content/no_search_results.png b/static/images/no_content/no_search_results.png new file mode 100644 index 00000000..a360db49 Binary files /dev/null and b/static/images/no_content/no_search_results.png differ diff --git a/templates/account/signup-wizard.html b/templates/account/signup-wizard.html index 52dac1a7..e96b99c5 100644 --- a/templates/account/signup-wizard.html +++ b/templates/account/signup-wizard.html @@ -282,9 +282,9 @@ -
+ {% include 'footer.html' %} -
+ {% endblock content %} {% block customJS %} diff --git a/templates/crm/leads/lead_list.html b/templates/crm/leads/lead_list.html index fafcb832..926654d4 100644 --- a/templates/crm/leads/lead_list.html +++ b/templates/crm/leads/lead_list.html @@ -5,7 +5,8 @@ {{ _("Leads") |capfirst }} {% endblock title %} {% block content %} -{% if page_obj.object_list %} + +{% if page_obj.object_list or request.GET.q%}

{{ _("Leads") |capfirst }} diff --git a/templates/crm/opportunities/opportunity_detail.html b/templates/crm/opportunities/opportunity_detail.html index 229bf23f..c09af69e 100644 --- a/templates/crm/opportunities/opportunity_detail.html +++ b/templates/crm/opportunities/opportunity_detail.html @@ -178,9 +178,9 @@
{{ _("Invoice") }}
- {% if opportunity.estimate.invoice %} + {% if opportunity.estimate.invoicemodel_set.all %} {{ _("View Invoice") }} + href="{% url 'invoice_detail' request.dealer.slug request.entity.slug opportunity.estimate.invoicemodel_set.first.pk %}">{{ _("View Invoice") }} {% else %}

{{ _("No Invoice") }}

{% endif %} @@ -1020,7 +1020,7 @@

diff --git a/templates/customers/customer_list.html b/templates/customers/customer_list.html index be208c67..e532fd84 100644 --- a/templates/customers/customer_list.html +++ b/templates/customers/customer_list.html @@ -6,7 +6,7 @@ {% endblock title %} {% block vendors %}{{ _("Customers") |capfirst }}{% endblock %} {% block content %} -{% if customers %} +{% if customers or request.GET.q%}

{{ _("Customers") |capfirst }} diff --git a/templates/customers/view_customer.html b/templates/customers/view_customer.html index cbd38052..4dbb73ed 100644 --- a/templates/customers/view_customer.html +++ b/templates/customers/view_customer.html @@ -11,7 +11,7 @@
-

{% trans 'Customer details' %}

+

{% trans 'Customer details' %}
  • @@ -127,20 +127,16 @@
    + -
    +
    - + - - - - - - + + + @@ -148,44 +144,69 @@ {% for lead in leads %} - + + {% for estimate in lead.customer.customer_model.estimatemodel_set.all %} +

    #{{forloop.counter }}{{estimate}}

    + + + +
    {% trans 'Leads'|upper %}{% trans 'Opportunities'|upper %}{% trans 'Estimates'|upper %}{% trans 'Sale orders'|upper %}{% trans 'Invoices'|upper %}{% trans 'Car'|upper %}{% trans 'Leads'|upper %}{% trans 'Opportunities'|upper %}{% trans 'Estimates'|upper %}
    {{lead}} ({{ forloop.counter }}){{lead.opportunity}} ({{ forloop.counter }}){{lead.opportunity}} ({{ forloop.counter }}) - - {% for estimate in lead.customer.customer_model.estimatemodel_set.all %} - -
    - {% endfor %} -
    + + + + + + + + + + + + - - + + + + +
    {% trans 'Sale orders'|upper %}{% trans 'Invoices'|upper %}{% trans 'Car VIN'|upper %}
    + {% for sale_order in estimate.sale_orders.all %} + + + {% endfor %} + - {% for estimate in lead.customer.customer_model.estimatemodel_set.all %} - -
    - {% endfor %} -
    - {% for invoice in lead.customer.customer_model.invoicemodel_set.all %} + + {% for invoice in estimate.invoicemodel_set.all %} - {% if invoice.is_paid %} - - - - {%else%} - - - - {% endif %} + {% if invoice.is_paid %} + + + + {%else%} + + + + {% endif %} -
    - {% endfor %} + + {% endfor %} +
    + + + + + + + +
    +
    + {% endfor %} - - {% for estimate in lead.customer.customer_model.invoicemodel_set.all %} - -
    - {% endfor %} - + + + + diff --git a/templates/dealers/dealer_detail.html b/templates/dealers/dealer_detail.html index 7a1730d7..45a078b9 100644 --- a/templates/dealers/dealer_detail.html +++ b/templates/dealers/dealer_detail.html @@ -7,12 +7,12 @@

    {% trans 'Profile' %}

    - {{dealer.invoices}} +
    {{ _("Billing Information") }} diff --git a/templates/empty-illustration-page.html b/templates/empty-illustration-page.html index f6e687be..31d704ac 100644 --- a/templates/empty-illustration-page.html +++ b/templates/empty-illustration-page.html @@ -37,31 +37,33 @@ /* No specific styles for .btn-add-new or .message-box are needed here as per previous updates */ -
    + +
    - {% if image %} + {% if image %} {% static image as final_image_path %} - {% else %} - {% static 'images/no_content/no_item.jpg' as final_image_path %} - {% endif %} + {% else %} + {% static 'images/no_content/no_item.jpg' as final_image_path %} + {% endif %} No-empty-state-image -

    +

    {% blocktrans %}No {{ value}} Yet{% endblocktrans %} -

    +

    -

    +

    {% blocktrans %}It looks like you haven't added any {{ value }} to your account. Click the button below to get started and add your first {{ value }}!{% endblocktrans %} -

    +

    - + {% blocktrans %}Create New {{value}}{% endblocktrans %} - -
    + + +

    diff --git a/templates/groups/group_list.html b/templates/groups/group_list.html index 6d16d103..85110d8a 100644 --- a/templates/groups/group_list.html +++ b/templates/groups/group_list.html @@ -7,7 +7,7 @@ {% endblock title %} {% block content %} -{% if groups %} +{% if groups or request.GET.q%}
    diff --git a/templates/inventory/car_list_view.html b/templates/inventory/car_list_view.html index 18dca3c1..ffa5d3e2 100644 --- a/templates/inventory/car_list_view.html +++ b/templates/inventory/car_list_view.html @@ -25,7 +25,7 @@ {% endblock customCSS %} {% block content %} - {% if cars%} + {% if cars or request.GET.q%}
    diff --git a/templates/items/expenses/expenses_list.html b/templates/items/expenses/expenses_list.html index 7e015a4f..0f34ce85 100644 --- a/templates/items/expenses/expenses_list.html +++ b/templates/items/expenses/expenses_list.html @@ -6,7 +6,7 @@ {% block content %} -{% if expenses %} +{% if expenses or request.GET.q %}

    {% trans "Expenses" %}

    diff --git a/templates/items/service/service_list.html b/templates/items/service/service_list.html index 8b637f47..0de3164a 100644 --- a/templates/items/service/service_list.html +++ b/templates/items/service/service_list.html @@ -5,7 +5,7 @@ {% endblock title %} {% block content %} -{% if services %} +{% if services or request.GET.q %}

    {% trans "Services" %}

    diff --git a/templates/ledger/bills/bill_list.html b/templates/ledger/bills/bill_list.html index c3041657..383167c2 100644 --- a/templates/ledger/bills/bill_list.html +++ b/templates/ledger/bills/bill_list.html @@ -11,7 +11,7 @@ {% endblock %} {% block content %} -{% if bills %} +{% if bills or request.GET.q%}

    {% trans "Bills" %}

    diff --git a/templates/ledger/coa_accounts/account_list.html b/templates/ledger/coa_accounts/account_list.html index b3f5730a..6c49cae8 100644 --- a/templates/ledger/coa_accounts/account_list.html +++ b/templates/ledger/coa_accounts/account_list.html @@ -12,7 +12,7 @@ {% block content %} -{% if accounts%} +{% if accounts or request.GET.q%}

    {% trans "Accounts" %}

    diff --git a/templates/ledger/journal_entry/journal_entry_list.html b/templates/ledger/journal_entry/journal_entry_list.html index ccc34484..0f43d8ef 100644 --- a/templates/ledger/journal_entry/journal_entry_list.html +++ b/templates/ledger/journal_entry/journal_entry_list.html @@ -5,7 +5,7 @@ {% endblock title %} {% block content %} -{% if journal_entries %} +{% if journal_entries or request.GET.q%}