diff --git a/haikalbot/migrations/0001_initial.py b/haikalbot/migrations/0001_initial.py index cd7b2ba0..2fe92d6d 100644 --- a/haikalbot/migrations/0001_initial.py +++ b/haikalbot/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.2.4 on 2025-07-14 15:04 +# Generated by Django 5.2.4 on 2025-07-15 13:26 import django.db.models.deletion import django.utils.timezone diff --git a/haikalbot/migrations/0002_initial.py b/haikalbot/migrations/0002_initial.py index c99c48d9..b69b6b19 100644 --- a/haikalbot/migrations/0002_initial.py +++ b/haikalbot/migrations/0002_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.2.4 on 2025-07-14 15:04 +# Generated by Django 5.2.4 on 2025-07-15 13:26 import django.db.models.deletion from django.db import migrations, models diff --git a/inventory/migrations/0001_initial.py b/inventory/migrations/0001_initial.py index 117ccfc0..6333f86e 100644 --- a/inventory/migrations/0001_initial.py +++ b/inventory/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.2.4 on 2025-07-14 15:04 +# Generated by Django 5.2.4 on 2025-07-15 13:26 import datetime import django.core.serializers.json @@ -253,7 +253,7 @@ class Migration(migrations.Migration): ('name', models.CharField(max_length=255, verbose_name='English Name')), ('phone_number', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region='SA', verbose_name='Phone Number')), ('address', models.CharField(blank=True, max_length=200, null=True, verbose_name='Address')), - ('logo', models.ImageField(blank=True, null=True, upload_to='logos/users', verbose_name='Logo')), + ('logo', models.ImageField(blank=True, default='logo.png', null=True, upload_to='logos/users', verbose_name='Logo')), ('joined_at', models.DateTimeField(auto_now_add=True, verbose_name='Joined At')), ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated At')), ('slug', models.SlugField(blank=True, max_length=255, null=True, unique=True)), @@ -772,7 +772,7 @@ class Migration(migrations.Migration): ('phone_number', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region='SA', verbose_name='Phone Number')), ('staff_type', models.CharField(choices=[('inventory', 'Inventory'), ('accountant', 'Accountant'), ('sales', 'Sales')], max_length=255, verbose_name='Staff Type')), ('address', models.CharField(blank=True, max_length=200, null=True, verbose_name='Address')), - ('image', models.ImageField(blank=True, null=True, upload_to='staff/', verbose_name='Image')), + ('logo', models.ImageField(blank=True, null=True, upload_to='logos/staff', verbose_name='Image')), ('active', models.BooleanField(default=True, verbose_name='Active')), ('created', models.DateTimeField(auto_now_add=True, verbose_name='Created')), ('updated', models.DateTimeField(auto_now=True, verbose_name='Updated')), @@ -905,7 +905,7 @@ class Migration(migrations.Migration): options={ 'verbose_name': 'Car Financial Details', 'verbose_name_plural': 'Car Financial Details', - 'indexes': [models.Index(fields=['car'], name='car_finance_car_idx'), models.Index(fields=['cost_price'], name='car_finance_cost_price_idx'), models.Index(fields=['selling_price'], name='car_finance_selling_price_idx'), models.Index(fields=['discount_amount'], name='car_finance_discount_idx')], + 'indexes': [models.Index(fields=['car'], name='car_finance_car_idx'), models.Index(fields=['cost_price'], name='car_finance_cost_price_idx'), models.Index(fields=['selling_price'], name='car_finance_selling_price_idx'), models.Index(fields=['marked_price'], name='car_finance_marked_price_idx'), models.Index(fields=['discount_amount'], name='car_finance_discount_idx')], }, ), migrations.AddIndex( diff --git a/inventory/views.py b/inventory/views.py index ad7b2b0e..3f9cca3c 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -1468,8 +1468,9 @@ class CarFinanceCreateView(LoginRequiredMixin, PermissionRequiredMixin, CreateVi form_class = forms.CarFinanceForm template_name = "inventory/car_finance_form.html" permission_required = ["inventory.add_carfinance"] - + def dispatch(self, request, *args, **kwargs): + print(self.car) self.car = get_object_or_404(models.Car, slug=self.kwargs["slug"]) return super().dispatch(request, *args, **kwargs) @@ -1487,6 +1488,7 @@ class CarFinanceCreateView(LoginRequiredMixin, PermissionRequiredMixin, CreateVi def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["car"] = self.car + print(self.car) return context def get_form(self, form_class=None): @@ -1557,7 +1559,10 @@ class CarFinanceUpdateView( "additional_finances" ].queryset = models.AdditionalServices.objects.filter(dealer=dealer) return form - + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context["car"] = self.object.car + return context class CarUpdateView( LoginRequiredMixin, PermissionRequiredMixin, SuccessMessageMixin, UpdateView @@ -10405,7 +10410,7 @@ def upload_cars(request, dealer_slug, pk=None): form = forms.CSVUploadForm() form.fields["vendor"].queryset = dealer.vendors.all() - + print(request) return render( request, "csv_upload.html", diff --git a/staticfiles/images/CACHE/images/logos/staff/customer3/f0604875fc856cde73376cf5be2f8006.webp b/staticfiles/images/CACHE/images/logos/staff/customer3/f0604875fc856cde73376cf5be2f8006.webp new file mode 100644 index 00000000..409beed7 Binary files /dev/null and b/staticfiles/images/CACHE/images/logos/staff/customer3/f0604875fc856cde73376cf5be2f8006.webp differ diff --git a/staticfiles/images/CACHE/images/logos/staff/customer4_VhAPbzd/4733e9e221c3c7dd5ed4313c61199645.webp b/staticfiles/images/CACHE/images/logos/staff/customer4_VhAPbzd/4733e9e221c3c7dd5ed4313c61199645.webp new file mode 100644 index 00000000..dafce03f Binary files /dev/null and b/staticfiles/images/CACHE/images/logos/staff/customer4_VhAPbzd/4733e9e221c3c7dd5ed4313c61199645.webp differ diff --git a/staticfiles/images/CACHE/images/logos/staff/customer4_yoUBW1d/9826bd079dc1b79c2f0d6381a7417286.jpg b/staticfiles/images/CACHE/images/logos/staff/customer4_yoUBW1d/9826bd079dc1b79c2f0d6381a7417286.jpg new file mode 100644 index 00000000..ca8ad233 Binary files /dev/null and b/staticfiles/images/CACHE/images/logos/staff/customer4_yoUBW1d/9826bd079dc1b79c2f0d6381a7417286.jpg differ diff --git a/staticfiles/images/CACHE/images/logos/staff/customer4_yoUBW1d/bd59d813892f71a8b64024961f32cf41.webp b/staticfiles/images/CACHE/images/logos/staff/customer4_yoUBW1d/bd59d813892f71a8b64024961f32cf41.webp new file mode 100644 index 00000000..472540ca Binary files /dev/null and b/staticfiles/images/CACHE/images/logos/staff/customer4_yoUBW1d/bd59d813892f71a8b64024961f32cf41.webp differ diff --git a/staticfiles/images/logos/staff/customer3.jpg b/staticfiles/images/logos/staff/customer3.jpg new file mode 100644 index 00000000..772b91d9 Binary files /dev/null and b/staticfiles/images/logos/staff/customer3.jpg differ diff --git a/staticfiles/images/logos/staff/customer4.jpg b/staticfiles/images/logos/staff/customer4.jpg new file mode 100644 index 00000000..5a6f08c5 Binary files /dev/null and b/staticfiles/images/logos/staff/customer4.jpg differ diff --git a/staticfiles/images/logos/staff/customer4_VhAPbzd.jpg b/staticfiles/images/logos/staff/customer4_VhAPbzd.jpg new file mode 100644 index 00000000..5a6f08c5 Binary files /dev/null and b/staticfiles/images/logos/staff/customer4_VhAPbzd.jpg differ diff --git a/staticfiles/images/logos/staff/customer4_yoUBW1d.jpg b/staticfiles/images/logos/staff/customer4_yoUBW1d.jpg new file mode 100644 index 00000000..5a6f08c5 Binary files /dev/null and b/staticfiles/images/logos/staff/customer4_yoUBW1d.jpg differ diff --git a/staticfiles/sounds/tone.wav b/staticfiles/sounds/tone.wav new file mode 100644 index 00000000..88a18e15 Binary files /dev/null and b/staticfiles/sounds/tone.wav differ diff --git a/templates/bill/bill_create.html b/templates/bill/bill_create.html index 4e0a8ae7..1c790348 100644 --- a/templates/bill/bill_create.html +++ b/templates/bill/bill_create.html @@ -89,7 +89,7 @@ id="djl-bill-create-button" class="btn btn-phoenix-primary btn-lg">{% trans 'Create' %} - {% trans 'Cancel' %} diff --git a/templates/crm/leads/lead_form.html b/templates/crm/leads/lead_form.html index f68575ee..285265cc 100644 --- a/templates/crm/leads/lead_form.html +++ b/templates/crm/leads/lead_form.html @@ -58,7 +58,7 @@ {{ _("Save") }} - + {% trans "Cancel" %} diff --git a/templates/crm/leads/lead_send.html b/templates/crm/leads/lead_send.html index 0612ce12..8fefdfe2 100644 --- a/templates/crm/leads/lead_send.html +++ b/templates/crm/leads/lead_send.html @@ -26,9 +26,9 @@
- Discard + {% trans 'Discard' %} Save as Draft - +
diff --git a/templates/csv_upload.html b/templates/csv_upload.html index 6b3abc1e..1407f81e 100644 --- a/templates/csv_upload.html +++ b/templates/csv_upload.html @@ -72,6 +72,7 @@ {% endblock customCSS %} {% block content %} +

Upload Cars CSV

@@ -171,7 +172,7 @@
- Cancel + Cancel {% endblock %} \ No newline at end of file diff --git a/templates/customers/customer_form.html b/templates/customers/customer_form.html index fb30d470..a0a0e365 100644 --- a/templates/customers/customer_form.html +++ b/templates/customers/customer_form.html @@ -34,7 +34,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/templates/dealers/dealer_form.html b/templates/dealers/dealer_form.html index d82a4ab0..45578886 100644 --- a/templates/dealers/dealer_form.html +++ b/templates/dealers/dealer_form.html @@ -43,7 +43,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/templates/groups/group_form.html b/templates/groups/group_form.html index 3acc1bc7..9805f7ec 100644 --- a/templates/groups/group_form.html +++ b/templates/groups/group_form.html @@ -77,7 +77,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/templates/inventory/add_colors.html b/templates/inventory/add_colors.html index 00a8c9ee..596aa492 100644 --- a/templates/inventory/add_colors.html +++ b/templates/inventory/add_colors.html @@ -2,7 +2,7 @@ {% load i18n %} {%block title%} {%trans 'Add Colors'%} {% endblock%} {% block content %} -
+
{% trans "Add Colors" %}

{% trans "Select exterior and interior colors for" %} {{ car.id_car_make.get_local_name }} {{ car.id_car_model.get_local_name }} @@ -52,26 +52,12 @@

{% endfor %}
- - {% comment %}
-
- - {% trans "Cancel" %} -
-
{% endcomment %} - {% comment %}
-
-
- - {% trans "Cancel" %} -
-
-
{% endcomment %} +
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/templates/inventory/car_edit.html b/templates/inventory/car_edit.html index e4e7d728..f2fdce81 100644 --- a/templates/inventory/car_edit.html +++ b/templates/inventory/car_edit.html @@ -41,7 +41,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/templates/inventory/car_finance_form.html b/templates/inventory/car_finance_form.html index 8b727dc2..526f3eb9 100644 --- a/templates/inventory/car_finance_form.html +++ b/templates/inventory/car_finance_form.html @@ -38,8 +38,8 @@ {% trans "Cancel" %} - {% endcomment %} - + + {% endcomment %} @@ -49,7 +49,7 @@

- {% trans "Finance Details for" %}{{ car.id_car_make.get_local_name }} - {{ car.id_car_model.get_local_name }} + {% trans "Finance Details for" %} {{ car.id_car_make.get_local_name }} - {{ car.id_car_model.get_local_name }}

{% if form.errors %}
@@ -75,7 +75,7 @@
diff --git a/templates/items/expenses/expense_create.html b/templates/items/expenses/expense_create.html index 40c99486..d1b872a0 100644 --- a/templates/items/expenses/expense_create.html +++ b/templates/items/expenses/expense_create.html @@ -47,7 +47,7 @@
diff --git a/templates/items/expenses/expense_update.html b/templates/items/expenses/expense_update.html index 1ec8534a..eb0c64c5 100644 --- a/templates/items/expenses/expense_update.html +++ b/templates/items/expenses/expense_update.html @@ -40,7 +40,7 @@
diff --git a/templates/items/service/service_create.html b/templates/items/service/service_create.html index 2864acdf..8fc25550 100644 --- a/templates/items/service/service_create.html +++ b/templates/items/service/service_create.html @@ -64,7 +64,7 @@
diff --git a/templates/ledger/bank_accounts/bank_account_form.html b/templates/ledger/bank_accounts/bank_account_form.html index 4f76e75a..37acd620 100644 --- a/templates/ledger/bank_accounts/bank_account_form.html +++ b/templates/ledger/bank_accounts/bank_account_form.html @@ -76,11 +76,10 @@
-
diff --git a/templates/ledger/coa_accounts/account_form.html b/templates/ledger/coa_accounts/account_form.html index 040443ed..c7657cc9 100644 --- a/templates/ledger/coa_accounts/account_form.html +++ b/templates/ledger/coa_accounts/account_form.html @@ -82,7 +82,7 @@ {{ _("Save") }} - {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/templates/ledger/ledger/ledger_form.html b/templates/ledger/ledger/ledger_form.html index b8d6df45..9052bb71 100644 --- a/templates/ledger/ledger/ledger_form.html +++ b/templates/ledger/ledger/ledger_form.html @@ -45,7 +45,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/templates/organizations/organization_form.html b/templates/organizations/organization_form.html index af41b7b1..8568784c 100644 --- a/templates/organizations/organization_form.html +++ b/templates/organizations/organization_form.html @@ -34,9 +34,8 @@
- {% trans "Cancel" %} -
- + {% trans "Cancel" %} +
diff --git a/templates/purchase_orders/po_form.html b/templates/purchase_orders/po_form.html index fbc2ec5e..021d0cd5 100644 --- a/templates/purchase_orders/po_form.html +++ b/templates/purchase_orders/po_form.html @@ -22,7 +22,7 @@
-
+ {% csrf_token %} {{ redirect_field }} {{ form|crispy }} @@ -33,7 +33,7 @@
diff --git a/templates/sales/estimates/estimate_form.html b/templates/sales/estimates/estimate_form.html index 0ac22bb0..1b9d7733 100644 --- a/templates/sales/estimates/estimate_form.html +++ b/templates/sales/estimates/estimate_form.html @@ -187,11 +187,10 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
-
diff --git a/templates/sales/invoices/invoice_create.html b/templates/sales/invoices/invoice_create.html index 31effcc7..190b1465 100644 --- a/templates/sales/invoices/invoice_create.html +++ b/templates/sales/invoices/invoice_create.html @@ -41,7 +41,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/templates/users/user_form.html b/templates/users/user_form.html index 18c66d6e..8d3ce093 100644 --- a/templates/users/user_form.html +++ b/templates/users/user_form.html @@ -82,7 +82,7 @@ {{ form.email|as_crispy_field }} {{ form.phone_number|as_crispy_field }} {{ form.address|as_crispy_field }} - {{ form.image|as_crispy_field }} + {{ form.logo|as_crispy_field }} {{ form.group|as_crispy_field }} {% for error in form.errors %}
{{ error }}
@@ -91,7 +91,7 @@
- {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/templates/users/user_group_form.html b/templates/users/user_group_form.html index 7fed75c5..1c0f2d38 100644 --- a/templates/users/user_group_form.html +++ b/templates/users/user_group_form.html @@ -21,7 +21,7 @@
{{ error }}
{% endfor %}
- {% trans "Cancel" %} + {% trans "Cancel" %} - {% trans "Cancel" %} + {% trans "Cancel" %}
diff --git a/templates/welcome_base.html b/templates/welcome_base.html index fc9f67d1..634e4ce3 100644 --- a/templates/welcome_base.html +++ b/templates/welcome_base.html @@ -32,7 +32,7 @@ {% comment %} {% endcomment %} {% comment %} {% endcomment %} - {% if LANGUAGE_CODE == 'ar' %} + {% if LANGUAGE_CODE == 'ar' %} {% else %}