From 08dbd1046592780c4fba0e7ac6d75af588667f3c Mon Sep 17 00:00:00 2001 From: ismail Date: Wed, 6 Aug 2025 15:28:23 +0300 Subject: [PATCH] update on the report table --- inventory/models.py | 4 +- inventory/urls.py | 4 +- templates/header.html | 4 +- templates/ledger/reports/car_sale_report.html | 76 +++++++++---------- templates/recalls/recall_list.html | 10 ++- templates/recalls/recall_success.html | 2 +- templates/sales/estimates/estimate_form.html | 3 +- 7 files changed, 53 insertions(+), 50 deletions(-) diff --git a/inventory/models.py b/inventory/models.py index 2c190588..e3700eb9 100644 --- a/inventory/models.py +++ b/inventory/models.py @@ -742,7 +742,9 @@ class Car(Base): ) except Exception: return False - + @property + def invoice(self): + return self.item_model.invoicemodel_set.first if self.item_model.invoicemodel_set.first() else None def get_transfer(self): return self.transfer_logs.filter(active=True).first() diff --git a/inventory/urls.py b/inventory/urls.py index c2060772..2a8db5cd 100644 --- a/inventory/urls.py +++ b/inventory/urls.py @@ -1276,8 +1276,8 @@ urlpatterns = [ ), path('car-sale-report//csv/', views.car_sale_report_csv_export, name='car-sale-report-csv-export'), - path('feature/recalls/', views.RecallListView.as_view(), name='recall_list'), - path('feature/recall/', views.RecallFilterView, name='recall_filter'), + path('feature/recall/', views.RecallListView.as_view(), name='recall_list'), + path('feature/recall/filter/', views.RecallFilterView, name='recall_filter'), path('feature/recall//view/', views.RecallDetailView.as_view(), name='recall_detail'), path('feature/recall/create/', views.RecallCreateView.as_view(), name='recall_create'), path('feature/recall/success/', views.RecallSuccessView.as_view(), name='recall_success'), diff --git a/templates/header.html b/templates/header.html index d1342424..c35bb803 100644 --- a/templates/header.html +++ b/templates/header.html @@ -47,13 +47,13 @@ {% endif %} {% if perms.inventory.add_car %} - + {% endcomment %} {% endif %} {% if perms.django_ledger.view_purchaseordermodel %}