diff --git a/.gitignore b/.gitignore index 1cf01105..36388ff7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ __pycache__ db.sqlite3 media - +./car_inventorysettings.py # Backup files # *.bak diff --git a/car_inventory/__pycache__/settings.cpython-311.pyc b/car_inventory/__pycache__/settings.cpython-311.pyc index 17f5e185..88dcf16b 100644 Binary files a/car_inventory/__pycache__/settings.cpython-311.pyc and b/car_inventory/__pycache__/settings.cpython-311.pyc differ diff --git a/car_inventory/settings.py b/car_inventory/settings.py index 06a4d1df..2208e95c 100644 --- a/car_inventory/settings.py +++ b/car_inventory/settings.py @@ -9,7 +9,7 @@ https://docs.djangoproject.com/en/5.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/5.0/ref/settings/ """ - +from decimal import Decimal from pathlib import Path import os from django.utils.translation import gettext_lazy as _ @@ -26,7 +26,7 @@ SECRET_KEY = 'django-insecure-gc9bh4*3=b6hihdnaom0edjsbxh$5t)aap@e8p&340r7)*)qb8 # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ['10.10.1.109',"10.10.1.120", 'localhost', '127.0.0.1', '192.168.1.135', '172.20.10.4'] +ALLOWED_HOSTS = ['10.10.1.109', 'localhost', '127.0.0.1', '192.168.1.135', '172.20.10.4'] # Application definition @@ -110,9 +110,9 @@ WSGI_APPLICATION = 'car_inventory.wsgi.application' DATABASES = { "default": { "ENGINE": "django_prometheus.db.backends.postgresql", - "NAME": "haikal", - "USER": "haikal", - "PASSWORD": "haikal", + "NAME": "haikal_app", + "USER": "f95166", + "PASSWORD": "Kfsh&rc9788", "HOST": "localhost", "PORT": 5432, } @@ -255,3 +255,7 @@ LOGGING = { }, }, } + +# Global Settings +CURRENCY = _('SAR') +VAT_RATE = Decimal('0.15') \ No newline at end of file diff --git a/inventory/__pycache__/admin.cpython-311.pyc b/inventory/__pycache__/admin.cpython-311.pyc index 63a65d3b..ec214091 100644 Binary files a/inventory/__pycache__/admin.cpython-311.pyc and b/inventory/__pycache__/admin.cpython-311.pyc differ diff --git a/inventory/__pycache__/apps.cpython-311.pyc b/inventory/__pycache__/apps.cpython-311.pyc index b8f88053..188c57c8 100644 Binary files a/inventory/__pycache__/apps.cpython-311.pyc and b/inventory/__pycache__/apps.cpython-311.pyc differ diff --git a/inventory/__pycache__/forms.cpython-311.pyc b/inventory/__pycache__/forms.cpython-311.pyc index 76217d41..38100be1 100644 Binary files a/inventory/__pycache__/forms.cpython-311.pyc and b/inventory/__pycache__/forms.cpython-311.pyc differ diff --git a/inventory/__pycache__/models.cpython-311.pyc b/inventory/__pycache__/models.cpython-311.pyc index 08cd8d07..8b2e5241 100644 Binary files a/inventory/__pycache__/models.cpython-311.pyc and b/inventory/__pycache__/models.cpython-311.pyc differ diff --git a/inventory/__pycache__/services.cpython-311.pyc b/inventory/__pycache__/services.cpython-311.pyc index 2fd2882e..96ef9d45 100644 Binary files a/inventory/__pycache__/services.cpython-311.pyc and b/inventory/__pycache__/services.cpython-311.pyc differ diff --git a/inventory/__pycache__/urls.cpython-311.pyc b/inventory/__pycache__/urls.cpython-311.pyc index 973612a0..078b0821 100644 Binary files a/inventory/__pycache__/urls.cpython-311.pyc and b/inventory/__pycache__/urls.cpython-311.pyc differ diff --git a/inventory/__pycache__/views.cpython-311.pyc b/inventory/__pycache__/views.cpython-311.pyc index 4bfb1bf5..736e0f77 100644 Binary files a/inventory/__pycache__/views.cpython-311.pyc and b/inventory/__pycache__/views.cpython-311.pyc differ diff --git a/inventory/admin.py b/inventory/admin.py index 4738f2dd..ae51de84 100644 --- a/inventory/admin.py +++ b/inventory/admin.py @@ -15,6 +15,7 @@ admin.site.register(models.CustomCard) admin.site.register(models.CarSpecificationValue) admin.site.register(models.ExteriorColors) admin.site.register(models.InteriorColors) +admin.site.register(models.CarLocation) @admin.register(models.CarMake) class CarMakeAdmin(admin.ModelAdmin): diff --git a/inventory/apps.py b/inventory/apps.py index 905749f1..2524833c 100644 --- a/inventory/apps.py +++ b/inventory/apps.py @@ -4,3 +4,6 @@ from django.apps import AppConfig class InventoryConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'inventory' + + def ready(self): + import inventory.signals \ No newline at end of file diff --git a/inventory/forms.py b/inventory/forms.py index c47d6b68..597dac6d 100644 --- a/inventory/forms.py +++ b/inventory/forms.py @@ -13,7 +13,8 @@ from .models import ( CarColors, ExteriorColors, InteriorColors, - SaleQuotation + SaleQuotation, + CarLocation ) from django.forms import ModelMultipleChoiceField from django.utils.translation import gettext_lazy as _ @@ -97,6 +98,15 @@ class CarFinanceForm(AddClassMixin, forms.ModelForm): exclude = ['car', 'profit_margin', 'vat_amount', 'total', 'vat_rate'] +class CarLocationForm(forms.ModelForm): + class Meta: + model = CarLocation + fields = ['showroom', 'description'] + widgets = { + 'description': forms.Textarea(attrs={'rows': 2, 'class': 'form-control'}), + } + + # Custom Card Form class CustomCardForm(forms.ModelForm): custom_date = forms.DateTimeField( diff --git a/inventory/models.py b/inventory/models.py index e3de20bf..52590e10 100644 --- a/inventory/models.py +++ b/inventory/models.py @@ -1,4 +1,5 @@ from uuid import uuid4 +from django.conf import settings from django.db import models, transaction from django.contrib.auth.models import User from django.db.models.signals import pre_save, post_save @@ -21,6 +22,7 @@ from django.core.exceptions import ValidationError from phonenumber_field.modelfields import PhoneNumberField from django.contrib.contenttypes.models import ContentType from django.utils.timezone import now + from .mixins import LocalizedNameMixin @@ -222,10 +224,10 @@ class Car(models.Model): class CarReservation(models.Model): - car = models.ForeignKey('Car', on_delete=models.CASCADE, related_name='reservations') - reserved_by = models.ForeignKey(User, on_delete=models.CASCADE) - reserved_at = models.DateTimeField(auto_now_add=True) - reserved_until = models.DateTimeField() + car = models.ForeignKey('Car', on_delete=models.CASCADE, related_name='reservations', verbose_name=_("Car")) + reserved_by = models.ForeignKey(User, on_delete=models.CASCADE, related_name='reservations', verbose_name=_("Reserved By")) + reserved_at = models.DateTimeField(auto_now_add=True, verbose_name=_("Reserved At")) + reserved_until = models.DateTimeField(verbose_name=_("Reserved Until")) def is_active(self): return self.reserved_until > now() @@ -233,11 +235,13 @@ class CarReservation(models.Model): class Meta: unique_together = ('car', 'reserved_until') ordering = ['-reserved_at'] + verbose_name = _("Car Reservation") + verbose_name_plural = _("Car Reservations") # Car Finance Model class CarFinance(models.Model): - car = models.ForeignKey(Car, on_delete=models.CASCADE, related_name='finances') + car = models.OneToOneField(Car, on_delete=models.CASCADE, related_name='finances') cost_price = models.DecimalField(max_digits=14, decimal_places=2, verbose_name=_("Cost Price")) selling_price = models.DecimalField(max_digits=14, decimal_places=2, verbose_name=_("Selling Price")) profit_margin = models.DecimalField(max_digits=14, @@ -258,35 +262,35 @@ class CarFinance(models.Model): default=Decimal('0.00')) custom_card_fee = models.DecimalField(max_digits=14, decimal_places=2, verbose_name=_("Custom Card Fee"), default=Decimal('0.00')) - vat_rate = models.DecimalField(max_digits=14, decimal_places=2, default=Decimal('0.15'), verbose_name=_("VAT Rate"),) total = models.DecimalField(max_digits=14, decimal_places=2, default=Decimal('0.00'), null=True, blank=True) def __str__(self): - return f"{self.selling_price}" + return f"Car: {self.car}, Selling Price: {self.selling_price}" def save(self, *args, **kwargs): + vat_rate = settings.VAT_RATE self.full_clean() try: services = self.administration_fee + self.transportation_fee + self.custom_card_fee price_after_discount = self.selling_price - self.discount_amount - total_vat_amount = (price_after_discount + services) * self.vat_rate - self.vat_amount = self.selling_price * self.vat_rate + total_vat_amount = (price_after_discount + services) * vat_rate + self.vat_amount = price_after_discount * vat_rate self.profit_margin = self.selling_price - self.cost_price - self.discount_amount - self.registration_fee self.total = price_after_discount + services + total_vat_amount + self.registration_fee - except InvalidOperation as e: raise ValidationError(_("Invalid decimal operation: %s") % str(e)) - super().save(*args, **kwargs) - class Meta: - verbose_name = _("Car Financial Details") - @property def total_vat_amount(self): + vat_rate = settings.VAT_RATE services = self.administration_fee + self.transportation_fee + self.custom_card_fee price_after_discount = self.selling_price - self.discount_amount - return (price_after_discount + services) * self.vat_rate + return (price_after_discount + services) * vat_rate + + class Meta: + verbose_name = _("Car Financial Details") + verbose_name_plural = _("Car Financial Details") class ExteriorColors(models.Model, LocalizedNameMixin): @@ -332,7 +336,7 @@ class CarColors(models.Model): # Custom Card Model class CustomCard(models.Model): - car = models.ForeignKey(Car, on_delete=models.CASCADE, related_name='custom_cards', verbose_name=_("Car")) + car = models.OneToOneField(Car, on_delete=models.CASCADE, related_name='custom_cards', verbose_name=_("Car")) custom_number = models.CharField(max_length=255, verbose_name=_("Custom Number")) custom_date = models.DateField(verbose_name=_("Custom Date")) @@ -344,6 +348,55 @@ class CustomCard(models.Model): return f"{self.car} - {self.custom_number}" +class CarLocation(models.Model): + car = models.OneToOneField( + Car, + on_delete=models.CASCADE, + related_name='location', + verbose_name=_("Car") + ) + owner = models.ForeignKey( + 'Dealer', + on_delete=models.CASCADE, + related_name='owned_cars', + verbose_name=_("Owner"), + help_text=_("Dealer who owns the car.") + ) + showroom = models.ForeignKey( + 'Dealer', + on_delete=models.CASCADE, + related_name='showroom_cars', + verbose_name=_("Showroom"), + help_text=_("Dealer where the car is displayed (can be the owner).") + ) + description = models.TextField( + blank=True, + null=True, + verbose_name=_("Description"), + help_text=_("Optional description about the showroom placement.") + ) + created_at = models.DateTimeField( + auto_now_add=True, + verbose_name=_("Created At") + ) + updated_at = models.DateTimeField( + auto_now=True, + verbose_name=_("Last Updated") + ) + + class Meta: + verbose_name = _("Car Location") + verbose_name_plural = _("Car Locations") + + def __str__(self): + return f"Car: {self.car}, Showroom: {self.showroom}, Owner: {self.owner}" + + def is_owner_showroom(self): + """ + Returns True if the showroom is the same as the owner. + """ + return self.owner == self.showroom + # Car Registration Model class CarRegistration(models.Model): car = models.ForeignKey(Car, on_delete=models.CASCADE, related_name='registrations', verbose_name=_("Car")) diff --git a/inventory/signals.py b/inventory/signals.py index a2dd8833..f6973c97 100644 --- a/inventory/signals.py +++ b/inventory/signals.py @@ -2,11 +2,27 @@ from random import randint from django.db.models.signals import post_save, post_delete from django.dispatch import receiver -from django_ledger.models import EntityModel, VendorModel, CustomerModel, UnitOfMeasureModel +from django_ledger.models import EntityModel, VendorModel, CustomerModel, UnitOfMeasureModel, AccountModel, \ + ItemModelAbstract from django.utils.translation import gettext_lazy as _ from . import models +@receiver(post_save, sender=models.Car) +def create_car_location(sender, instance, created, **kwargs): + """ + Signal to create or update the car's location when a car instance is saved. + """ + if created: + models.CarLocation.objects.create( + car=instance, + owner=instance.dealer, + showroom=instance.dealer, + description=f"Initial location set for car {instance.vin}." + ) + print("Car Location created") + + @receiver(post_save, sender=models.CarReservation) def update_car_status_on_reservation(sender, instance, created, **kwargs): if created: @@ -24,21 +40,21 @@ def update_car_status_on_reservation_delete(sender, instance, **kwargs): # Create Entity -@receiver(post_save, sender=models.Dealer) -def create_ledger_entity(sender, instance, created, **kwargs): - if created: - entity = EntityModel.objects.create( - name=instance.name, - admin=instance.user, - address_1=instance.address, - fy_start_month=1, - accrual_method=True, - depth=0, - ) - - default_coa = entity.create_chart_of_accounts(assign_as_default=True, - commit=True, - coa_name=_("Chart of Accounts")) +# @receiver(post_save, sender=models.Dealer) +# def create_ledger_entity(sender, instance, created, **kwargs): +# if created: +# entity = EntityModel.objects.create( +# name=instance.name, +# admin=instance.user, +# address_1=instance.address, +# fy_start_month=1, +# accrual_method=True, +# depth=0, +# ) +# +# default_coa = entity.create_chart_of_accounts(assign_as_default=True, +# commit=True, +# coa_name=_("Chart of Accounts")) # entity.create_account( # coa_model=coa, # code=1010, @@ -48,25 +64,56 @@ def create_ledger_entity(sender, instance, created, **kwargs): # ) # entity.create_account( # coa_model=coa, + # code=1100, + # role='asset_ca_recv', + # name=_('Accounts Receivable'), + # balance_type="debit", + # ) + # entity.create_account( + # coa_model=coa, # code=1200, # role='asset_ca_inv', # name=_('Inventory'), # balance_type="debit", # active=True) + # + # entity.create_account( + # coa_model=coa, + # code=2010, + # role='lia_cl_acc_payable', + # name=_('Accounts Payable'), + # balance_type="credit", + # active=True) + # + # entity.create_account( + # coa_model=coa, + # code=4010, + # role='in_operational', + # name=_('Sales Income'), + # balance_type="credit", + # active=True) + # + # entity.create_account( + # coa_model=coa, + # code=5010, + # role='cogs_regular', + # name=_('Cost of Goods Sold'), + # balance_type="debit", + # active=True) - if default_coa: - entity.populate_default_coa(activate_accounts=True, coa_model=default_coa) - - uom_name = _("Unit") - unit_abbr = _("U") - - entity.create_uom(uom_name, unit_abbr) - - print(f"Ledger entity created for Dealer: {instance.name}") + # if default_coa: + # entity.populate_default_coa(activate_accounts=True, coa_model=default_coa) + # + # uom_name = _("Unit") + # unit_abbr = _("U") + # + # entity.create_uom(uom_name, unit_abbr) + # + # print(f"Ledger entity created for Dealer: {instance.name}") -# # Create Vendor +# Create Vendor @receiver(post_save, sender=models.Vendor) def create_ledger_vendor(sender, instance, created, **kwargs): @@ -113,55 +160,64 @@ def create_customer(sender, instance, created, **kwargs): # Create Item -@receiver(post_save, sender=models.Car) -def create_item_model(sender, instance, created, **kwargs): - item_name = f"{instance.year} - {instance.id_car_make} - {instance.id_car_model} - {instance.id_car_trim}" - uom_name = _("Car") - unit_abbr = _("C") - - uom, uom_created = UnitOfMeasureModel.objects.get_or_create( - name=uom_name, - unit_abbr=unit_abbr - ) - - if uom_created: - print(f"UOM created: {uom_name}") - else: - print(f"Using existing UOM: {uom_name}") - - entity = EntityModel.objects.filter(name=instance.dealer.name).first() - - inventory_account = AccountModel.objects.first() - cogs_account = AccountModel.objects.first() - earnings_account = AccountModel.objects.first() - - entity.create_i - - item = ItemModel.objects.create( - entity=entity, - uom=uom, - name=item_name, - item_role=ItemModelAbstract.ITEM_ROLE_INVENTORY, - item_type=ItemModelAbstract.ITEM_TYPE_MATERIAL, - item_id=instance.vin, - sold_as_unit=True, - inventory_received=1.00, - inventory_received_value=0.00, - inventory_account=inventory_account, - for_inventory=True, - is_product_or_service=True, - cogs_account=cogs_account, - earnings_account=earnings_account, - is_active=True, - additional_info={ - "remarks": instance.remarks, - "status": instance.status, - "stock_type": instance.stock_type, - "mileage": instance.mileage, - }, - ) - - print(f"ItemModel {'created' if created else 'updated'} for Car: {item.name}") +# @receiver(post_save, sender=models.Car) +# def create_item_model(sender, instance, created, **kwargs): +# item_name = f"{instance.year} - {instance.id_car_make} - {instance.id_car_model} - {instance.id_car_trim}" +# uom_name = _("Car") +# unit_abbr = _("C") +# +# uom, uom_created = UnitOfMeasureModel.objects.get_or_create( +# name=uom_name, +# unit_abbr=unit_abbr +# ) +# +# if uom_created: +# print(f"UOM created: {uom_name}") +# else: +# print(f"Using existing UOM: {uom_name}") +# +# entity = EntityModel.objects.filter(name=instance.dealer.name).first() +# +# inventory_account = AccountModel.objects.first() +# cogs_account = AccountModel.objects.first() +# earnings_account = AccountModel.objects.first() +# +# entity.create_item_product( +# item_name=item_name, +# item_role=ItemModelAbstract.ITEM_ROLE_PRODUCT, +# item_type=ItemModelAbstract.ITEM_TYPE_MATERIAL, +# item_id=instance.vin, +# sold_as_unit=True, +# inventory_received=1.00, +# inventory_received_value=0.00, +# inventory_account=inventory_account, +# for_inventory=True,) +# +# item = ItemModel.objects.create( +# entity=entity, +# uom=uom, +# name=item_name, +# item_role=ItemModelAbstract.ITEM_ROLE_INVENTORY, +# item_type=ItemModelAbstract.ITEM_TYPE_MATERIAL, +# item_id=instance.vin, +# sold_as_unit=True, +# inventory_received=1.00, +# inventory_received_value=0.00, +# inventory_account=inventory_account, +# for_inventory=True, +# is_product_or_service=True, +# cogs_account=cogs_account, +# earnings_account=earnings_account, +# is_active=True, +# additional_info={ +# "remarks": instance.remarks, +# "status": instance.status, +# "stock_type": instance.stock_type, +# "mileage": instance.mileage, +# }, +# ) +# +# print(f"ItemModel {'created' if created else 'updated'} for Car: {item.name}") # # # # update price - CarFinance diff --git a/inventory/urls.py b/inventory/urls.py index c6bf3ac0..03bb9a9a 100644 --- a/inventory/urls.py +++ b/inventory/urls.py @@ -56,6 +56,8 @@ urlpatterns = [ path('cars/add/', views.CarCreateView.as_view(), name='car_add'), path('ajax/', views.AjaxHandlerView.as_view(), name='ajax_handler'), path('cars//add-color/', views.CarColorCreate.as_view(), name='add_color'), + path('car//location/add/', views.CarLocationCreateView.as_view(), name='add_car_location'), + path('car//location/update/', views.CarLocationUpdateView.as_view(), name='transfer'), # path('cars//colors//update/',views.CarColorUpdateView.as_view(),name='color_update'), path('cars/reserve//', views.reserve_car_view, name='reserve_car'), diff --git a/inventory/views.py b/inventory/views.py index 23cc9c4b..b3df66e1 100644 --- a/inventory/views.py +++ b/inventory/views.py @@ -167,7 +167,9 @@ class AjaxHandlerView(LoginRequiredMixin, View): def get_models(self, request): make_id = request.GET.get('make_id') - car_models = models.CarModel.objects.filter(id_car_make=make_id).values('id_car_model', 'name', 'arabic_name') + car_models = (models.CarModel.objects.filter(id_car_make=make_id) + .values('id_car_model', 'name', 'arabic_name') + .order_by('name')) return JsonResponse(list(car_models), safe=False) def get_series(self, request): @@ -405,6 +407,31 @@ class CarDeleteView(LoginRequiredMixin, DeleteView): return super().delete(request, *args, **kwargs) +class CarLocationCreateView(CreateView): + model = models.CarLocation + form_class = forms.CarLocationForm + template_name = 'inventory/car_location_form.html' + + def get_success_url(self): + return reverse_lazy('car_detail', kwargs={'pk': self.object.car.pk}) + + def form_valid(self, form): + form.instance.car = get_object_or_404(models.Car, pk=self.kwargs['car_pk']) + form.instance.owner = self.request.user.dealer + form.save() + messages.success(self.request, 'Car saved successfully.') + return super().form_valid(form) + + +class CarLocationUpdateView(UpdateView): + model = models.CarLocation + form_class = forms.CarLocationForm + template_name = 'inventory/car_location_form.html' + + def get_success_url(self): + return reverse_lazy('car_detail', kwargs={'pk': self.object.car.pk}) + + class CustomCardCreateView(LoginRequiredMixin, CreateView): model = models.CustomCard form_class = forms.CustomCardForm diff --git a/locale/ar/LC_MESSAGES/django.mo b/locale/ar/LC_MESSAGES/django.mo index bebe4a22..5d412712 100644 Binary files a/locale/ar/LC_MESSAGES/django.mo and b/locale/ar/LC_MESSAGES/django.mo differ diff --git a/locale/ar/LC_MESSAGES/django.po b/locale/ar/LC_MESSAGES/django.po index cdce0689..a482433e 100644 --- a/locale/ar/LC_MESSAGES/django.po +++ b/locale/ar/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-09 09:40+0300\n" +"POT-Creation-Date: 2024-12-11 21:41+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" -#: api/models.py:6 inventory/models.py:123 +#: api/models.py:6 inventory/models.py:126 #: templates/inventory/car_detail.html:61 templates/inventory/car_form.html:83 #: templates/inventory/car_inventory.html:53 #: templates/inventory/car_list.html:67 templates/inventory/car_list.html:69 @@ -34,49 +34,62 @@ msgstr "الإنجليزية" msgid "Arabic" msgstr "العربية" -#: inventory/forms.py:102 inventory/models.py:357 +#: car_inventory/settings.py:260 templates/index.html:59 +#: templates/index.html:62 templates/index.html:80 templates/index.html:87 +#: templates/index.html:116 templates/index.html:122 templates/index.html:128 +#: templates/index.html:163 templates/index.html:171 templates/index.html:179 +msgid "SAR" +msgstr "ريال سعودي" + +#: inventory/forms.py:114 inventory/models.py:341 #: templates/inventory/car_detail.html:135 msgid "Custom Date" msgstr "تاريخ البطاقة الجمركية" -#: inventory/forms.py:151 +#: inventory/forms.py:163 msgid "Both exterior and interior colors must be selected." msgstr "يجب اختيار اللونين الخارجي والداخلي." -#: inventory/models.py:31 templates/vendors/vendors_list.html:44 +#: inventory/models.py:33 msgid "logo" msgstr "الشعار" -#: inventory/models.py:111 +#: inventory/models.py:113 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/invoice/tags/invoice_item_formset.html:21 msgid "Available" msgstr "متاح" -#: inventory/models.py:112 +#: inventory/models.py:114 msgid "Sold" msgstr "تم البيع" -#: inventory/models.py:113 +#: inventory/models.py:115 msgid "Hold" msgstr "في الانتظار" -#: inventory/models.py:114 +#: inventory/models.py:116 msgid "Damaged" msgstr "تالف" -#: inventory/models.py:118 +#: inventory/models.py:117 +#, fuzzy +#| msgid "Reserve" +msgid "Reserved" +msgstr "حجز" + +#: inventory/models.py:121 msgid "New" msgstr "جديد" -#: inventory/models.py:119 +#: inventory/models.py:122 msgid "Used" msgstr "مستعمل" -#: inventory/models.py:128 inventory/models.py:405 +#: inventory/models.py:131 inventory/models.py:438 msgid "Dealer" msgstr "المعرض" -#: inventory/models.py:137 inventory/models.py:424 +#: inventory/models.py:140 inventory/models.py:458 #: templates/inventory/car_detail.html:108 #: templates/inventory/car_form.html:230 #: venv/lib/python3.11/site-packages/django_ledger/models/bill.py:359 @@ -86,29 +99,29 @@ msgstr "المعرض" msgid "Vendor" msgstr "المورد" -#: inventory/models.py:145 templates/inventory/car_inventory.html:55 +#: inventory/models.py:148 templates/inventory/car_inventory.html:55 msgid "Make" msgstr "الصانع" -#: inventory/models.py:153 templates/inventory/car_inventory.html:56 +#: inventory/models.py:156 templates/inventory/car_inventory.html:56 msgid "Model" msgstr "الموديل" -#: inventory/models.py:155 templates/inventory/car_form.html:118 +#: inventory/models.py:158 templates/inventory/car_form.html:118 #: templates/inventory/car_inventory.html:54 msgid "Year" msgstr "السنة" -#: inventory/models.py:162 templates/inventory/car_form.html:182 +#: inventory/models.py:165 templates/inventory/car_form.html:182 msgid "Series" msgstr "السلسلة" -#: inventory/models.py:170 +#: inventory/models.py:173 msgid "Trim" msgstr "الفئة" -#: inventory/models.py:176 templates/inventory/car_detail.html:86 -#: templates/inventory/car_list.html:163 +#: inventory/models.py:179 inventory/models.py:500 +#: templates/inventory/car_detail.html:86 templates/inventory/car_list.html:163 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/tags/bill_table.html:10 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/estimate/includes/card_estimate.html:12 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/estimate/includes/estimate_table.html:12 @@ -118,258 +131,338 @@ msgstr "الفئة" msgid "Status" msgstr "الحالة" -#: inventory/models.py:182 templates/inventory/car_detail.html:90 +#: inventory/models.py:185 templates/inventory/car_detail.html:90 #: templates/inventory/car_form.html:248 templates/inventory/car_list.html:177 msgid "Stock Type" msgstr "نوع المخزون" -#: inventory/models.py:184 templates/inventory/car_detail.html:113 +#: inventory/models.py:187 inventory/models.py:499 +#: templates/inventory/car_detail.html:113 #: templates/inventory/car_form.html:301 templates/inventory/car_list.html:200 +#: templates/sales/quotation_detail.html:23 msgid "Remarks" msgstr "ملاحظات" -#: inventory/models.py:185 templates/inventory/car_detail.html:94 +#: inventory/models.py:188 templates/inventory/car_detail.html:94 #: templates/inventory/car_form.html:265 templates/inventory/car_list.html:191 #: templates/inventory/car_list.html:192 msgid "Mileage" msgstr "عدد الكيلومترات" -#: inventory/models.py:186 templates/inventory/car_detail.html:98 +#: inventory/models.py:189 templates/inventory/car_detail.html:98 #: templates/inventory/car_form.html:283 msgid "Receiving Date" msgstr "تاريخ الاستلام" -#: inventory/models.py:189 inventory/models.py:355 inventory/models.py:369 +#: inventory/models.py:192 inventory/models.py:227 inventory/models.py:339 +#: inventory/models.py:356 inventory/models.py:402 inventory/models.py:532 +#: templates/sales/sales_order_detail.html:24 msgid "Car" msgstr "السيارة" -#: inventory/models.py:190 +#: inventory/models.py:193 msgid "Cars" msgstr "السيارات" -#: inventory/models.py:237 templates/inventory/car_detail.html:160 +#: inventory/models.py:228 templates/inventory/car_detail.html:277 +msgid "Reserved By" +msgstr "محجوز بواسطة" + +#: inventory/models.py:229 +#, fuzzy +#| msgid "Reserved By" +msgid "Reserved At" +msgstr "محجوز بواسطة" + +#: inventory/models.py:230 +#, fuzzy +#| msgid "Reserved By" +msgid "Reserved Until" +msgstr "محجوز بواسطة" + +#: inventory/models.py:238 +#, fuzzy +#| msgid "Registration" +msgid "Car Reservation" +msgstr "التسجيل" + +#: inventory/models.py:239 +#, fuzzy +#| msgid "Registrations" +msgid "Car Reservations" +msgstr "تسجيل السيارات" + +#: inventory/models.py:245 templates/inventory/car_detail.html:179 msgid "Cost Price" msgstr "سعر التكلفة" -#: inventory/models.py:240 -msgid "Profit Margin" -msgstr "هامش الربح" - -#: inventory/models.py:244 templates/inventory/car_detail.html:165 +#: inventory/models.py:246 templates/inventory/car_detail.html:183 +#: templates/sales/sales_order_detail.html:25 msgid "Selling Price" msgstr "سعر البيع" -#: inventory/models.py:247 templates/inventory/car_detail.html:189 -msgid "VAT Amount" +#: inventory/models.py:249 +msgid "Profit Margin" +msgstr "هامش الربح" + +#: inventory/models.py:253 +#, fuzzy +#| msgid "VAT Amount" +msgid "Vat Amount" msgstr "مبلغ ضريبة القيمة المضافة" -#: inventory/models.py:251 templates/inventory/car_detail.html:173 -msgid "Registration Fee" -msgstr "رسوم التسجيل" - -#: inventory/models.py:255 templates/inventory/car_detail.html:169 -msgid "Administration Fee" -msgstr "الرسوم الادارية" - -#: inventory/models.py:259 templates/inventory/car_detail.html:177 -msgid "Transportation Fee" -msgstr "رسوم النقل" - -#: inventory/models.py:263 templates/inventory/car_detail.html:181 -msgid "Custom Card Fee" -msgstr "رسوم البطاقة الجمركية" - -#: inventory/models.py:267 templates/inventory/car_detail.html:185 +#: inventory/models.py:255 templates/inventory/car_detail.html:203 msgid "Discount Amount" msgstr "مبلغ الخصم" -#: inventory/models.py:271 -msgid "Total Amount" -msgstr "المبلغ الإجمالي" +#: inventory/models.py:257 templates/inventory/car_detail.html:191 +msgid "Registration Fee" +msgstr "رسوم التسجيل" -#: inventory/models.py:275 -msgid "Car Financial Details" -msgstr "تفاصيل المالية للسيارة" +#: inventory/models.py:259 templates/inventory/car_detail.html:187 +msgid "Administration Fee" +msgstr "الرسوم الادارية" -#: inventory/models.py:280 -msgid "Selling price cannot be negative." -msgstr "لا يمكن أن يكون سعر البيع سالبًا." +#: inventory/models.py:261 templates/inventory/car_detail.html:195 +msgid "Transportation Fee" +msgstr "رسوم النقل" -#: inventory/models.py:282 -msgid "Discount amount cannot be negative." -msgstr "لا يمكن أن يكون مبلغ الخصم سالبًا." +#: inventory/models.py:263 templates/inventory/car_detail.html:199 +msgid "Custom Card Fee" +msgstr "رسوم البطاقة الجمركية" -#: inventory/models.py:284 -msgid "Discount amount cannot exceed selling price." -msgstr "لا يمكن أن يتجاوز مبلغ الخصم سعر البيع." - -#: inventory/models.py:289 -msgid "Fees cannot be negative." -msgstr "لا يمكن أن تكون الرسوم سلبية." - -#: inventory/models.py:304 +#: inventory/models.py:281 #, python-format msgid "Invalid decimal operation: %s" msgstr "عملية عشرية غير صالحة: %s" -#: inventory/models.py:313 inventory/models.py:326 +#: inventory/models.py:292 inventory/models.py:293 +msgid "Car Financial Details" +msgstr "تفاصيل المالية للسيارة" + +#: inventory/models.py:297 inventory/models.py:310 #: templates/dealers/dealer_detail.html:26 -#: templates/vendors/view_vendor.html:39 +#: templates/sales/quotation_detail.html:14 +#: templates/vendors/vendors_list.html:34 templates/vendors/view_vendor.html:48 #: venv/lib/python3.11/site-packages/django_ledger/forms/coa.py:16 #: venv/lib/python3.11/site-packages/django_ledger/forms/coa.py:37 msgid "Name" msgstr "الاسم" -#: inventory/models.py:314 inventory/models.py:327 inventory/models.py:398 -#: inventory/models.py:417 +#: inventory/models.py:298 inventory/models.py:311 inventory/models.py:431 +#: inventory/models.py:450 msgid "Arabic Name" msgstr "الاسم بالعربية" -#: inventory/models.py:315 inventory/models.py:328 +#: inventory/models.py:299 inventory/models.py:312 msgid "RGB" msgstr "آر جي بي" -#: inventory/models.py:318 inventory/models.py:319 +#: inventory/models.py:302 inventory/models.py:303 +#: templates/inventory/add_colors.html:13 msgid "Exterior Colors" msgstr "الألوان الخارجية" -#: inventory/models.py:331 inventory/models.py:332 +#: inventory/models.py:315 inventory/models.py:316 +#: templates/inventory/add_colors.html:32 msgid "Interior Colors" msgstr "الألوان الداخلية" -#: inventory/models.py:345 +#: inventory/models.py:329 msgid "Color" msgstr "اللون" -#: inventory/models.py:346 +#: inventory/models.py:330 msgid "Colors" msgstr "الألوان" -#: inventory/models.py:356 templates/inventory/car_detail.html:131 +#: inventory/models.py:340 templates/inventory/car_detail.html:131 msgid "Custom Number" msgstr "رقم البطاقة الجمركية" -#: inventory/models.py:360 templates/inventory/car_detail.html:16 +#: inventory/models.py:344 templates/inventory/car_detail.html:16 #: templates/inventory/car_detail.html:141 msgid "Custom Card" msgstr "البطاقة الجمركية" -#: inventory/models.py:361 +#: inventory/models.py:345 msgid "Custom Cards" msgstr "البطاقات الجمركية" +#: inventory/models.py:362 +msgid "Owner" +msgstr "المالك" + +#: inventory/models.py:363 +msgid "Dealer who owns the car." +msgstr "التاجر الذي يمتلك السيارة." + +#: inventory/models.py:369 +msgid "Showroom" +msgstr "صالة العرض" + #: inventory/models.py:370 +msgid "Dealer where the car is displayed (can be the owner)." +msgstr "التاجر الذي تُعرض السيارة في صالته (يمكن أن يكون المالك)." + +#: inventory/models.py:375 +#: venv/lib/python3.11/site-packages/django_ledger/forms/coa.py:17 +#: venv/lib/python3.11/site-packages/django_ledger/forms/coa.py:38 +#: venv/lib/python3.11/site-packages/django_ledger/models/data_import.py:61 +#: venv/lib/python3.11/site-packages/django_ledger/models/items.py:1144 +#: venv/lib/python3.11/site-packages/django_ledger/models/journal_entry.py:314 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/financial_statements/tags/income_statement.html:9 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/tags/je_table.html:11 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/tags/je_txs_table.html:14 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/tags/je_txs_table.html:46 +msgid "Description" +msgstr "الوصف" + +#: inventory/models.py:376 +msgid "Optional description about the showroom placement." +msgstr "وصف اختياري حول وضع السيارة في صالة العرض." + +#: inventory/models.py:380 inventory/models.py:501 inventory/models.py:563 +#: templates/sales/quotation_list.html:17 +#, fuzzy +#| msgid "Created" +msgid "Created At" +msgstr "تاريخ الإنشاء" + +#: inventory/models.py:384 +#, fuzzy +#| msgid "Updated" +msgid "Last Updated" +msgstr "تم التحديث" + +#: inventory/models.py:388 +#, fuzzy +#| msgid "actions" +msgid "Car Location" +msgstr "الإجراءات" + +#: inventory/models.py:389 +#, fuzzy +#| msgid "actions" +msgid "Car Locations" +msgstr "الإجراءات" + +#: inventory/models.py:403 msgid "Plate Number" msgstr "رقم اللوحة" -#: inventory/models.py:371 +#: inventory/models.py:404 msgid "Text 1" msgstr "النص 1" -#: inventory/models.py:372 +#: inventory/models.py:405 msgid "Text 2" msgstr "النص 2" -#: inventory/models.py:373 +#: inventory/models.py:406 msgid "Text 3" msgstr "النص 3" -#: inventory/models.py:374 +#: inventory/models.py:407 msgid "Registration Date" msgstr "تاريخ التسجيل" -#: inventory/models.py:377 +#: inventory/models.py:410 msgid "Registration" msgstr "التسجيل" -#: inventory/models.py:378 +#: inventory/models.py:411 msgid "Registrations" msgstr "تسجيل السيارات" -#: inventory/models.py:386 inventory/models.py:441 +#: inventory/models.py:419 inventory/models.py:475 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/chart_of_accounts/includes/coa_card.html:38 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/closing_entry/tags/closing_entry_table.html:12 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/ledger/tags/ledgers_table.html:17 msgid "Created" msgstr "تاريخ الإنشاء" -#: inventory/models.py:387 +#: inventory/models.py:420 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/chart_of_accounts/includes/coa_card.html:41 msgid "Updated" msgstr "تم التحديث" -#: inventory/models.py:396 inventory/models.py:415 +#: inventory/models.py:429 inventory/models.py:448 #: templates/dealers/dealer_detail.html:30 msgid "Commercial Registration Number" msgstr "رقم السجل التجاري" -#: inventory/models.py:397 inventory/models.py:416 +#: inventory/models.py:430 inventory/models.py:449 #: templates/dealers/dealer_detail.html:34 msgid "VAT Registration Number" msgstr "رقم التسجيل في ضريبة القيمة المضافة" -#: inventory/models.py:399 inventory/models.py:418 +#: inventory/models.py:432 inventory/models.py:451 msgid "English Name" msgstr "الاسم بالإنجليزية" -#: inventory/models.py:400 inventory/models.py:420 inventory/models.py:439 +#: inventory/models.py:433 inventory/models.py:453 inventory/models.py:473 #: templates/customers/view_customer.html:53 #: templates/dealers/dealer_detail.html:38 -#: templates/vendors/view_vendor.html:44 +#: templates/vendors/view_vendor.html:54 #: venv/lib/python3.11/site-packages/django_ledger/models/mixins.py:113 msgid "Phone Number" msgstr "رقم الهاتف" -#: inventory/models.py:401 inventory/models.py:421 inventory/models.py:440 +#: inventory/models.py:434 inventory/models.py:454 inventory/models.py:474 #: templates/customers/view_customer.html:54 #: templates/dealers/dealer_detail.html:42 -#: templates/vendors/view_vendor.html:46 +#: templates/sales/quotation_detail.html:16 +#: templates/vendors/vendors_list.html:36 templates/vendors/view_vendor.html:60 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/customer/tags/customer_table.html:10 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/vendor/tags/vendor_table.html:11 msgid "Address" msgstr "العنوان" -#: inventory/models.py:402 +#: inventory/models.py:435 inventory/models.py:455 +#: templates/vendors/vendors_list.html:35 msgid "Logo" msgstr "الشعار" -#: inventory/models.py:406 +#: inventory/models.py:439 msgid "Dealers" msgstr "المعارض" -#: inventory/models.py:419 templates/vendors/view_vendor.html:43 +#: inventory/models.py:452 templates/vendors/view_vendor.html:51 msgid "Contact Person" msgstr "الشخص المسؤول" -#: inventory/models.py:425 templates/header.html:85 templates/header.html:100 +#: inventory/models.py:459 templates/header.html:85 templates/header.html:100 #: templates/vendors/vendor_form.html:4 templates/vendors/vendors_list.html:4 -#: templates/vendors/vendors_list.html:5 +#: templates/vendors/vendors_list.html:5 templates/vendors/vendors_list.html:11 msgid "Vendors" msgstr "الموردين" -#: inventory/models.py:434 templates/customers/view_customer.html:46 +#: inventory/models.py:468 templates/customers/view_customer.html:46 msgid "First Name" msgstr "الاسم الأول" -#: inventory/models.py:435 templates/customers/view_customer.html:47 +#: inventory/models.py:469 templates/customers/view_customer.html:47 msgid "Middle Name" msgstr "اسم الأب" -#: inventory/models.py:436 templates/customers/view_customer.html:48 +#: inventory/models.py:470 templates/customers/view_customer.html:48 msgid "Last Name" msgstr "اسم العائلة" -#: inventory/models.py:437 templates/customers/view_customer.html:51 -#: templates/vendors/view_vendor.html:45 +#: inventory/models.py:471 templates/customers/view_customer.html:51 +#: templates/vendors/view_vendor.html:57 #: venv/lib/python3.11/site-packages/django_ledger/models/mixins.py:111 msgid "Email" msgstr "البريد الإلكتروني" -#: inventory/models.py:438 templates/customers/view_customer.html:52 +#: inventory/models.py:472 templates/customers/view_customer.html:52 msgid "National ID" msgstr "رقم الهوية الوطنية" -#: inventory/models.py:444 +#: inventory/models.py:478 inventory/models.py:497 +#: templates/sales/quotation_list.html:14 +#: templates/sales/sales_order_detail.html:12 #: venv/lib/python3.11/site-packages/django_ledger/models/customer.py:199 #: venv/lib/python3.11/site-packages/django_ledger/models/estimate.py:252 #: venv/lib/python3.11/site-packages/django_ledger/models/invoice.py:318 @@ -378,15 +471,78 @@ msgstr "رقم الهوية الوطنية" msgid "Customer" msgstr "العميل" -#: inventory/models.py:445 +#: inventory/models.py:479 msgid "Customers" msgstr "العملاء" -#: inventory/models.py:467 -#: venv/lib/python3.11/site-packages/django_ledger/models/accounts.py:436 -#: venv/lib/python3.11/site-packages/django_ledger/models/coa.py:152 -msgid "Chart of Accounts" -msgstr "قائمة الحسابات" +#: inventory/models.py:492 +#: venv/lib/python3.11/site-packages/django_ledger/models/bill.py:338 +#: venv/lib/python3.11/site-packages/django_ledger/models/estimate.py:223 +#: venv/lib/python3.11/site-packages/django_ledger/models/invoice.py:299 +#: venv/lib/python3.11/site-packages/django_ledger/models/purchase_order.py:192 +msgid "Draft" +msgstr "مسودة" + +#: inventory/models.py:493 +#, fuzzy +#| msgid "Confirm" +msgid "Confirmed" +msgstr "تأكيد" + +#: inventory/models.py:494 +#: venv/lib/python3.11/site-packages/django_ledger/models/bill.py:342 +#: venv/lib/python3.11/site-packages/django_ledger/models/estimate.py:228 +#: venv/lib/python3.11/site-packages/django_ledger/models/invoice.py:304 +#: venv/lib/python3.11/site-packages/django_ledger/models/items.py:1042 +#: venv/lib/python3.11/site-packages/django_ledger/models/purchase_order.py:196 +msgid "Canceled" +msgstr "ملغى" + +#: inventory/models.py:498 +#: venv/lib/python3.11/site-packages/django_ledger/models/transactions.py:491 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/purchase_order/includes/po_item_formset.html:22 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/purchase_order/tags/po_item_table.html:11 +msgid "Amount" +msgstr "المبلغ" + +#: inventory/models.py:502 +#, fuzzy +#| msgid "Updated" +msgid "Updated At" +msgstr "تم التحديث" + +#: inventory/models.py:507 +msgid "Only draft quotations can be confirmed." +msgstr "لا يمكن تأكيد سوى العروض التقديرية المسودة." + +#: inventory/models.py:514 +msgid "Cannot cancel a confirmed quotation." +msgstr "لا يمكن إلغاء عرض تقديري تم تأكيده." + +#: inventory/models.py:527 inventory/models.py:562 +#, fuzzy +#| msgid "Duration" +msgid "Quotation" +msgstr "المدة" + +#: inventory/models.py:535 +#: venv/lib/python3.11/site-packages/django_ledger/models/items.py:1068 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/bill_detail.html:97 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/tags/bill_item_formset.html:21 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/estimate/includes/estimate_item_table.html:10 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/estimate/tags/ce_item_formset.html:19 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/invoice/invoice_detail.html:96 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/invoice/tags/invoice_item_formset.html:19 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/purchase_order/includes/po_item_formset.html:20 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/purchase_order/po_update.html:51 +msgid "Quantity" +msgstr "الكمية" + +#: inventory/models.py:564 templates/sales/quotation_list.html:16 +#: templates/sales/sales_order_detail.html:16 +#: templates/sales/sales_order_detail.html:27 +msgid "Total Amount" +msgstr "المبلغ الإجمالي" #: inventory/utils.py:25 msgid "success" @@ -404,99 +560,109 @@ msgstr "نسيت كلمة المرور؟" msgid "You are not associated with any dealer." msgstr "أنت غير مرتبط بأي معرض." -#: inventory/views.py:260 templates/header.html:33 templates/index.html:20 +#: inventory/views.py:221 templates/header.html:33 templates/index.html:20 #: templates/inventory/car_inventory.html:5 #: templates/inventory/car_inventory.html:7 msgid "inventory" msgstr "المخزون" -#: inventory/views.py:401 +#: inventory/views.py:362 msgid "Car finance details saved successfully." msgstr "تم حفظ تفاصيل المالية للسيارة بنجاح." -#: inventory/views.py:419 +#: inventory/views.py:380 msgid "Car finance updated successfully." msgstr "تم تحديث التفاصيل المالية للسيارة بنجاح." -#: inventory/views.py:432 +#: inventory/views.py:393 msgid "Car updated successfully." msgstr "تم تحديث السيارة بنجاح" -#: inventory/views.py:445 +#: inventory/views.py:406 msgid "Car deleted successfully." msgstr "تم حذف السيارة بنجاح." -#: inventory/views.py:465 +#: inventory/views.py:451 msgid "Custom Card added successfully." msgstr "تم إضافة البطاقة الجمركية بنجاح." -#: inventory/views.py:474 +#: inventory/views.py:460 msgid "This car is already reserved." msgstr "هذه السيارة محجوزة بالفعل." -#: inventory/views.py:484 +#: inventory/views.py:470 msgid "Car reserved successfully." msgstr "تم حجز السيارة بنجاح." -#: inventory/views.py:501 +#: inventory/views.py:487 msgid "Reservation renewed successfully." msgstr "تم تجديد الحجز بنجاح" -#: inventory/views.py:506 +#: inventory/views.py:492 msgid "Reservation canceled successfully." msgstr "تم إلغاء الحجز بنجاح." -#: inventory/views.py:510 +#: inventory/views.py:496 msgid "Invalid action." msgstr "إجراء غير صالح." -#: inventory/views.py:512 +#: inventory/views.py:498 msgid "Invalid request method." msgstr "طريقة الطلب غير صالحة" -#: inventory/views.py:534 +#: inventory/views.py:520 msgid "Dealer created successfully." msgstr "تم إنشاء المعرض بنجاح." -#: inventory/views.py:545 +#: inventory/views.py:531 msgid "Dealer updated successfully." msgstr "تم تحديث المعرض بنجاح." -#: inventory/views.py:555 +#: inventory/views.py:541 msgid "Dealer deleted successfully." msgstr "تم حذف المعرض بنجاح." -#: inventory/views.py:561 templates/customers/customer_form.html:4 +#: inventory/views.py:547 templates/customers/customer_form.html:4 #: templates/customers/customer_list.html:5 #: templates/customers/customer_list.html:6 templates/header.html:59 #: templates/header.html:74 msgid "customers" msgstr "العملاء" -#: inventory/views.py:600 +#: inventory/views.py:586 msgid "Customer created successfully." msgstr "تم إنشاء العميل بنجاح." -#: inventory/views.py:616 +#: inventory/views.py:602 msgid "Customer updated successfully." msgstr "تم تحديث العميل بنجاح." -#: inventory/views.py:626 +#: inventory/views.py:612 msgid "Customer deleted successfully." msgstr "تم حذف العميل بنجاح." -#: inventory/views.py:652 +#: inventory/views.py:638 msgid "Vendor created successfully." msgstr "تم إنشاء المورد بنجاح." -#: inventory/views.py:668 +#: inventory/views.py:654 msgid "Vendor updated successfully." msgstr "تم تحديث المورد بنجاح" -#: inventory/views.py:678 +#: inventory/views.py:664 msgid "Vendor deleted successfully." msgstr "تم حذف المورد بنجاح." +#: inventory/views.py:684 +#, fuzzy +#| msgid "Customer created successfully." +msgid "Quotation created successfully." +msgstr "تم إنشاء العميل بنجاح." + +#: inventory/views.py:717 +msgid "Quotation confirmed and sales order created." +msgstr "تم تأكيد عرض السعر وإنشاء أمر البيع." + #: templates/accounts/login.html:6 templates/accounts/login.html:14 #: templates/accounts/login.html:31 templates/header.html:131 msgid "Sign In" @@ -597,12 +763,13 @@ msgid "Add Customer" msgstr "إضافة عميل" #: templates/customers/customer_form.html:31 -#: templates/inventory/add_colors.html:54 +#: templates/inventory/add_colors.html:55 #: templates/inventory/add_custom_card.html:7 #: templates/inventory/car_edit.html:41 #: templates/inventory/car_finance_form.html:40 +#: templates/inventory/car_location_form.html:17 #: templates/inventory/color_palette.html:106 -#: templates/vendors/vendor_form.html:31 +#: templates/sales/quotation_form.html:18 templates/vendors/vendor_form.html:31 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/tags/bill_item_formset.html:81 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/closing_entry/closing_entry_update.html:19 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/data_import/tags/data_import_job_txs_table.html:78 @@ -614,14 +781,14 @@ msgid "Save" msgstr "حفظ" #: templates/customers/customer_form.html:33 -#: templates/inventory/add_colors.html:55 +#: templates/inventory/add_colors.html:56 #: templates/inventory/add_custom_card.html:8 #: templates/inventory/car_confirm_delete.html:14 -#: templates/inventory/car_detail.html:282 +#: templates/inventory/car_detail.html:301 #: templates/inventory/car_finance_form.html:41 #: templates/inventory/color_palette.html:107 #: templates/inventory/reserve_car.html:30 -#: templates/vendors/vendor_form.html:33 +#: templates/sales/quotation_form.html:19 templates/vendors/vendor_form.html:33 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/bill_create.html:37 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/includes/card_bill.html:205 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/components/modals.html:11 @@ -634,7 +801,7 @@ msgstr "إلغاء" #: templates/customers/customer_list.html:20 #: templates/inventory/car_inventory.html:31 -#: templates/inventory/car_list.html:70 templates/vendors/vendors_list.html:21 +#: templates/inventory/car_list.html:70 msgid "search" msgstr "بحث" @@ -655,14 +822,12 @@ msgid "national ID" msgstr "رقم الهوية الوطنية" #: templates/customers/customer_list.html:46 -#: templates/vendors/vendors_list.html:46 msgid "actions" msgstr "الإجراءات" #: templates/customers/customer_list.html:59 #: templates/inventory/car_detail.html:124 #: templates/inventory/car_inventory.html:75 -#: templates/vendors/vendors_list.html:65 msgid "view" msgstr "عرض" @@ -675,24 +840,25 @@ msgid "Are you sure you want to delete this customer?" msgstr "هل أنت متأكد أنك تريد حذف هذا العميل؟" #: templates/customers/view_customer.html:26 -#: templates/vendors/view_vendor.html:25 +#: templates/vendors/view_vendor.html:29 #: venv/lib/python3.11/site-packages/django/forms/widgets.py:802 msgid "No" msgstr "لا" #: templates/customers/view_customer.html:31 -#: templates/vendors/view_vendor.html:30 +#: templates/vendors/view_vendor.html:32 #: venv/lib/python3.11/site-packages/django/forms/widgets.py:801 msgid "Yes" msgstr "نعم" #: templates/customers/view_customer.html:41 +#: templates/sales/quotation_detail.html:12 msgid "Customer Details" msgstr "تفاصيل العميل" #: templates/customers/view_customer.html:61 -#: templates/inventory/car_detail.html:307 -#: templates/vendors/view_vendor.html:48 +#: templates/inventory/car_detail.html:329 +#: templates/vendors/view_vendor.html:66 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/customer/includes/card_customer.html:28 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/tags/je_table.html:83 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/ledger/tags/ledgers_table.html:101 @@ -701,7 +867,7 @@ msgid "Edit" msgstr "تحديث" #: templates/customers/view_customer.html:67 -#: templates/vendors/view_vendor.html:53 +#: templates/vendors/view_vendor.html:69 #: venv/lib/python3.11/site-packages/django/forms/formsets.py:499 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/bill_delete.html:28 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/tags/bill_item_formset.html:25 @@ -733,7 +899,7 @@ msgid "Delete" msgstr "حذف" #: templates/customers/view_customer.html:72 -#: templates/inventory/car_detail.html:309 +#: templates/inventory/car_detail.html:331 msgid "Back to List" msgstr "العودة إلى القائمة" @@ -816,14 +982,6 @@ msgstr "حفظ تغيير" msgid "Back" msgstr "عودة" -#: templates/footer.html:5 -msgid "All right reserved" -msgstr "جميع الحقوق محفوظة" - -#: templates/footer.html:5 -msgid "Tenhal" -msgstr "تنحل" - #: templates/header.html:25 templates/header.html:108 templates/index.html:5 msgid "home" msgstr "الرئيسية" @@ -888,13 +1046,6 @@ msgstr "قيمة المخزون" msgid "View the current value of your car inventory." msgstr "عرض القيمة الحالية لمخزون السيارات الخاص بك." -#: templates/index.html:59 templates/index.html:62 templates/index.html:80 -#: templates/index.html:87 templates/index.html:116 templates/index.html:122 -#: templates/index.html:128 templates/index.html:163 templates/index.html:171 -#: templates/index.html:179 -msgid "SAR" -msgstr "ريال سعودي" - #: templates/index.html:61 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/includes/widget_ratios.html:31 msgid "Profitability" @@ -1024,17 +1175,8 @@ msgstr "إضافة لون" msgid "Select exterior and interior colors for" msgstr "اختر الألوان الخارجية والداخلية لـ" -#: templates/inventory/add_colors.html:13 -#: templates/inventory/car_detail.html:219 -msgid "Exterior" -msgstr "الخارجي" - -#: templates/inventory/add_colors.html:32 -#: templates/inventory/car_detail.html:228 -msgid "Interior" -msgstr "الداخلي" - #: templates/inventory/car_detail.html:6 templates/inventory/car_detail.html:58 +#: templates/sales/quotation_detail.html:27 msgid "Car Details" msgstr "تفاصيل السيارة" @@ -1068,14 +1210,35 @@ msgid "Branch" msgstr "الفرع" #: templates/inventory/car_detail.html:147 +#: templates/inventory/car_detail.html:166 msgid "Add" msgstr "إضافة" -#: templates/inventory/car_detail.html:156 +#: templates/inventory/car_detail.html:153 +msgid "Showroom Location" +msgstr "موقع صالة العرض" + +#: templates/inventory/car_detail.html:157 +msgid "Our Showroom" +msgstr "معرضنا" + +#: templates/inventory/car_detail.html:163 +#, fuzzy +#| msgid "No options available." +msgid "No location available." +msgstr "لا توجد سيارات متاحة." + +#: templates/inventory/car_detail.html:175 msgid "Financial Details" msgstr "التفاصيل المالية" -#: templates/inventory/car_detail.html:193 +#: templates/inventory/car_detail.html:207 +#: templates/sales/quotation_detail.html:66 +#: templates/sales/sales_order_detail.html:26 +msgid "VAT Amount" +msgstr "مبلغ ضريبة القيمة المضافة" + +#: templates/inventory/car_detail.html:211 #: templates/inventory/inventory_stats.html:61 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/bill_detail.html:98 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/bill_detail.html:127 @@ -1094,44 +1257,50 @@ msgstr "التفاصيل المالية" msgid "Total" msgstr "الإجمالي" -#: templates/inventory/car_detail.html:200 +#: templates/inventory/car_detail.html:218 msgid "Edit Finance Details" msgstr "تعديل التفاصيل المالية" -#: templates/inventory/car_detail.html:204 +#: templates/inventory/car_detail.html:222 msgid "No finance details available." msgstr "لا توجد تفاصيل مالية متاحة." -#: templates/inventory/car_detail.html:207 +#: templates/inventory/car_detail.html:225 msgid "Add Finance Details" msgstr "إضافة التفاصيل المالية" -#: templates/inventory/car_detail.html:213 +#: templates/inventory/car_detail.html:231 msgid "Colors Details" msgstr "تفاصيل الألوان" -#: templates/inventory/car_detail.html:240 +#: templates/inventory/car_detail.html:237 +msgid "Exterior" +msgstr "الخارجي" + +#: templates/inventory/car_detail.html:246 +msgid "Interior" +msgstr "الداخلي" + +#: templates/inventory/car_detail.html:258 msgid "No colors available for this car." msgstr "لا تتوفر ألوان لهذه السيارة." -#: templates/inventory/car_detail.html:247 +#: templates/inventory/car_detail.html:265 msgid "Get Colors" msgstr "الحصول على الألوان" -#: templates/inventory/car_detail.html:254 +#: templates/inventory/car_detail.html:272 msgid "Reservations Details" msgstr "تفاصيل الحجز" -#: templates/inventory/car_detail.html:259 -msgid "Reserved By" -msgstr "محجوز بواسطة" - -#: templates/inventory/car_detail.html:260 +#: templates/inventory/car_detail.html:278 msgid "Expires At" msgstr "ينتهي في" -#: templates/inventory/car_detail.html:261 +#: templates/inventory/car_detail.html:279 #: templates/inventory/car_inventory.html:57 +#: templates/sales/quotation_list.html:18 +#: templates/vendors/vendors_list.html:37 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/account/tags/account_txs_table.html:29 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/account/tags/accounts_table.html:29 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/account/tags/accounts_table.html:92 @@ -1158,27 +1327,31 @@ msgstr "ينتهي في" msgid "Actions" msgstr "الإجراءات" -#: templates/inventory/car_detail.html:276 -msgid "renew" +#: templates/inventory/car_detail.html:295 +msgid "Renew" msgstr "تجديد" -#: templates/inventory/car_detail.html:293 +#: templates/inventory/car_detail.html:305 +msgid "Expired" +msgstr "ينتهي في" + +#: templates/inventory/car_detail.html:315 #: templates/inventory/reserve_car.html:29 msgid "Reserve" msgstr "حجز" -#: templates/inventory/car_detail.html:305 +#: templates/inventory/car_detail.html:327 #: templates/inventory/transfer_car.html:23 msgid "transfer" msgstr "نقل" -#: templates/inventory/car_detail.html:394 +#: templates/inventory/car_detail.html:416 #: templates/inventory/car_list.html:542 #: templates/partials/specifications_modal.html:11 msgid "No specifications available." msgstr "لا توجد مواصفات متاحة." -#: templates/inventory/car_detail.html:398 +#: templates/inventory/car_detail.html:420 #: templates/inventory/car_list.html:546 msgid "Error loading specifications." msgstr "حدث خطأ أثناء تحميل المواصفات." @@ -1215,14 +1388,14 @@ msgstr "رقم الهيكل سيظهر هنا." msgid "Use OCR Fallback" msgstr "التعرف الآلي على الحروف" -#: templates/inventory/car_form.html:100 +#: templates/inventory/car_form.html:100 templates/vendors/vendors_list.html:15 msgid "Search" msgstr "بحث" #: templates/inventory/car_form.html:165 templates/inventory/car_form.html:187 -#: templates/inventory/car_form.html:209 templates/inventory/car_form.html:519 -#: templates/inventory/car_form.html:536 templates/inventory/car_form.html:537 -#: templates/inventory/car_form.html:555 +#: templates/inventory/car_form.html:209 templates/inventory/car_form.html:525 +#: templates/inventory/car_form.html:544 templates/inventory/car_form.html:545 +#: templates/inventory/car_form.html:563 msgid "Select" msgstr "اختيار" @@ -1242,15 +1415,15 @@ msgstr "الرجاء الإنتظار" msgid "Loading" msgstr "تحميل" -#: templates/inventory/car_form.html:431 +#: templates/inventory/car_form.html:431 templates/inventory/car_form.html:432 msgid "Please enter a valid VIN." msgstr "الرجاء إدخال رقم هيكل صالح مكون من 17 حرفًا." -#: templates/inventory/car_form.html:447 +#: templates/inventory/car_form.html:450 msgid "Failed to decode VIN." msgstr "فشل في فك تشفير رقم الهيكل" -#: templates/inventory/car_form.html:452 +#: templates/inventory/car_form.html:455 templates/inventory/car_form.html:456 msgid "An error occurred while decoding the VIN." msgstr "حدث خطأ أثناء فك تشفير الهيكل" @@ -1312,6 +1485,13 @@ msgstr "لا توجد سيارات متاحة." msgid "Error loading options." msgstr "خطأ في تحميل الخيارات." +#: templates/inventory/car_location_form.html:4 +#: templates/inventory/car_location_form.html:12 +#, fuzzy +#| msgid "actions" +msgid "Manage Car Location" +msgstr "الإجراءات" + #: templates/inventory/color_palette.html:74 msgid "Update Color" msgstr "تحديث اللون" @@ -1386,47 +1566,108 @@ msgstr "الماسح الضوئي" msgid "Specifications" msgstr "المواصفات" +#: templates/sales/quotation_detail.html:7 +msgid "Quotation Details" +msgstr "تفاصيل عرض السعر" + +#: templates/sales/quotation_detail.html:17 +msgid "VAT No" +msgstr "الرقم الضريبي" + +#: templates/sales/quotation_detail.html:20 +msgid "Quotation Information" +msgstr "معلومات عرض السعر" + +#: templates/sales/quotation_detail.html:21 +msgid "Quotation No" +msgstr "رقم عرض السعر" + +#: templates/sales/quotation_detail.html:22 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/includes/card_journal_entry.html:15 +msgid "Date" +msgstr "التاريخ" + +#: templates/sales/quotation_detail.html:59 +msgid "Summary" +msgstr "الملخص" + +#: templates/sales/quotation_detail.html:62 +msgid "Total Sales Before VAT" +msgstr "إجمالي المبيعات قبل ضريبة القيمة المضافة" + +#: templates/sales/quotation_detail.html:70 +msgid "Total Sales After VAT" +msgstr "إجمالي المبيعات بعد ضريبة القيمة المضافة" + +#: templates/sales/quotation_detail.html:76 +msgid "Back to Quotations" +msgstr "العودة إلى قائمة عروض الأسعار" + +#: templates/sales/quotation_form.html:5 templates/sales/quotation_form.html:9 +msgid "Create Quotation" +msgstr "إنشاء عرض سعر" + +#: templates/sales/quotation_list.html:4 templates/sales/quotation_list.html:8 +msgid "Quotations" +msgstr "عروض الأسعار" + +#: templates/sales/quotation_list.html:15 +msgid "Total Cars" +msgstr "إجمالي عدد السيارات" + +#: templates/sales/quotation_list.html:31 +#: templates/vendors/vendors_list.html:55 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/includes/card_bill.html:44 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/entity/entitiy_list.html:20 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/invoice/includes/card_invoice.html:38 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/tags/je_table.html:85 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/purchase_order/includes/card_po.html:22 +#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/unit/unit_list.html:32 +msgid "View" +msgstr "عرض" + +#: templates/sales/quotation_list.html:38 +msgid "No Quotations Found" +msgstr "لم يتم العثور على عروض أسعار" + +#: templates/sales/sales_order_detail.html:2 +#: templates/sales/sales_order_detail.html:5 +msgid "Sales Order Details" +msgstr "تفاصيل أمر البيع" + +#: templates/sales/sales_order_detail.html:8 +msgid "Quotation ID" +msgstr "رقم عرض السعر" + +#: templates/sales/sales_order_detail.html:21 +msgid "Cars in Sales Order" +msgstr "السيارات في أمر البيع" + #: templates/vendors/vendor_form.html:14 msgid "Edit Vendor" -msgstr "تحديث المورد" +msgstr "تعديل المورد" -#: templates/vendors/vendors_list.html:42 -msgid "name" -msgstr "الاسم" +#: templates/vendors/vendors_list.html:20 +msgid "Enter vendor name" +msgstr "أدخل اسم المورد" -#: templates/vendors/vendors_list.html:45 -msgid "address" -msgstr "العنوان" - -#: templates/vendors/vendors_list.html:72 -msgid "no vendors found" +#: templates/vendors/vendors_list.html:62 +msgid "No vendors found" msgstr "لم يتم العثور على موردين" -#: templates/vendors/vendors_list.html:82 -msgid "first" -msgstr "الأول" - -#: templates/vendors/vendors_list.html:87 -msgid "previous" -msgstr "السابق" - -#: templates/vendors/vendors_list.html:112 -msgid "next" -msgstr "التالي" - -#: templates/vendors/vendors_list.html:117 -msgid "last" -msgstr "الأخير" - #: templates/vendors/view_vendor.html:3 msgid "View Vendor" msgstr "عرض المورد" #: templates/vendors/view_vendor.html:18 +msgid "Delete Vendor" +msgstr "حذف مورد" + +#: templates/vendors/view_vendor.html:24 msgid "Are you sure you want to delete this vendor?" msgstr "هل أنت متأكد أنك تريد حذف هذا المورد؟" -#: templates/vendors/view_vendor.html:37 +#: templates/vendors/view_vendor.html:43 msgid "Vendor Details" msgstr "تفاصيل المورد" @@ -2948,18 +3189,6 @@ msgstr "اختر تاريخ الإغلاق" msgid "Closing Entry Notes" msgstr "ملاحظات إدخال الإغلاق" -#: venv/lib/python3.11/site-packages/django_ledger/forms/coa.py:17 -#: venv/lib/python3.11/site-packages/django_ledger/forms/coa.py:38 -#: venv/lib/python3.11/site-packages/django_ledger/models/data_import.py:61 -#: venv/lib/python3.11/site-packages/django_ledger/models/items.py:1144 -#: venv/lib/python3.11/site-packages/django_ledger/models/journal_entry.py:314 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/financial_statements/tags/income_statement.html:9 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/tags/je_table.html:11 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/tags/je_txs_table.html:14 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/tags/je_txs_table.html:46 -msgid "Description" -msgstr "الوصف" - #: venv/lib/python3.11/site-packages/django_ledger/forms/customer.py:40 #, python-format msgid "Example: 3.50% should be entered as 0.035" @@ -3594,6 +3823,11 @@ msgstr "مقفل" msgid "Active" msgstr "نشط" +#: venv/lib/python3.11/site-packages/django_ledger/models/accounts.py:436 +#: venv/lib/python3.11/site-packages/django_ledger/models/coa.py:152 +msgid "Chart of Accounts" +msgstr "قائمة الحسابات" + #: venv/lib/python3.11/site-packages/django_ledger/models/accounts.py:443 #: venv/lib/python3.11/site-packages/django_ledger/models/transactions.py:485 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bank_account/bank_account_update.html:13 @@ -3658,13 +3892,6 @@ msgstr "يجب تمرير user_model عند استخدام entity_slug." msgid "Bank Account" msgstr "الحساب المصرفي" -#: venv/lib/python3.11/site-packages/django_ledger/models/bill.py:338 -#: venv/lib/python3.11/site-packages/django_ledger/models/estimate.py:223 -#: venv/lib/python3.11/site-packages/django_ledger/models/invoice.py:299 -#: venv/lib/python3.11/site-packages/django_ledger/models/purchase_order.py:192 -msgid "Draft" -msgstr "مسودة" - #: venv/lib/python3.11/site-packages/django_ledger/models/bill.py:339 #: venv/lib/python3.11/site-packages/django_ledger/models/estimate.py:224 #: venv/lib/python3.11/site-packages/django_ledger/models/invoice.py:300 @@ -3685,14 +3912,6 @@ msgstr "تمت الموافقة" msgid "Paid" msgstr "مدفوع" -#: venv/lib/python3.11/site-packages/django_ledger/models/bill.py:342 -#: venv/lib/python3.11/site-packages/django_ledger/models/estimate.py:228 -#: venv/lib/python3.11/site-packages/django_ledger/models/invoice.py:304 -#: venv/lib/python3.11/site-packages/django_ledger/models/items.py:1042 -#: venv/lib/python3.11/site-packages/django_ledger/models/purchase_order.py:196 -msgid "Canceled" -msgstr "ملغى" - #: venv/lib/python3.11/site-packages/django_ledger/models/bill.py:343 #: venv/lib/python3.11/site-packages/django_ledger/models/estimate.py:227 #: venv/lib/python3.11/site-packages/django_ledger/models/invoice.py:303 @@ -4567,18 +4786,6 @@ msgstr "نموذج الفاتورة" msgid "Invoice Model" msgstr "نموذج الفاتورة" -#: venv/lib/python3.11/site-packages/django_ledger/models/items.py:1068 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/bill_detail.html:97 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/tags/bill_item_formset.html:21 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/estimate/includes/estimate_item_table.html:10 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/estimate/tags/ce_item_formset.html:19 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/invoice/invoice_detail.html:96 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/invoice/tags/invoice_item_formset.html:19 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/purchase_order/includes/po_item_formset.html:20 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/purchase_order/po_update.html:51 -msgid "Quantity" -msgstr "الكمية" - #: venv/lib/python3.11/site-packages/django_ledger/models/items.py:1072 msgid "Cost Per Unit" msgstr "التكلفة لكل وحدة" @@ -5018,12 +5225,6 @@ msgstr "إدخال دفتر اليومية المرتبط بهذه المعام msgid "Account from Chart of Accounts to be associated with this transaction." msgstr "الحساب من مخطط الحسابات المرتبط بهذه المعاملة." -#: venv/lib/python3.11/site-packages/django_ledger/models/transactions.py:491 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/purchase_order/includes/po_item_formset.html:22 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/purchase_order/tags/po_item_table.html:11 -msgid "Amount" -msgstr "المبلغ" - #: venv/lib/python3.11/site-packages/django_ledger/models/transactions.py:492 msgid "Account of the transaction." msgstr "حساب المعاملة." @@ -5403,15 +5604,6 @@ msgstr "تكوين الفاتورة" msgid "Due in" msgstr "مستحق في" -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/includes/card_bill.html:44 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/entity/entitiy_list.html:20 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/invoice/includes/card_invoice.html:38 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/tags/je_table.html:85 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/purchase_order/includes/card_po.html:22 -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/unit/unit_list.html:32 -msgid "View" -msgstr "عرض" - #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/includes/card_bill.html:49 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/bills/includes/card_bill.html:187 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/invoice/includes/card_invoice.html:43 @@ -6234,10 +6426,6 @@ msgstr "تكوين الفاتورة" msgid "Journal Entry Detail" msgstr "تفاصيل إدخال اليومية" -#: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/includes/card_journal_entry.html:15 -msgid "Date" -msgstr "التاريخ" - #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/journal_entry/includes/card_journal_entry.html:47 #: venv/lib/python3.11/site-packages/django_ledger/templates/django_ledger/ledger/tags/ledgers_table.html:108 msgid "UnLock" @@ -6800,3 +6988,11 @@ msgid "" "SILKY_AUTHENTICATION can not be enabled without Session, Authentication or " "Message Django's middlewares" msgstr "" + +#~ msgid "Location" +#~ msgstr "الموقع" + +#, fuzzy +#~| msgid "Net Income" +#~ msgid "Sales Income" +#~ msgstr "صافي الدخل" diff --git a/static/images/logos/.DS_Store b/static/images/logos/.DS_Store index 4ba9080d..08b72d29 100644 Binary files a/static/images/logos/.DS_Store and b/static/images/logos/.DS_Store differ diff --git a/templates/inventory/car_detail.html b/templates/inventory/car_detail.html index cf8ae4a2..a03ac8cf 100644 --- a/templates/inventory/car_detail.html +++ b/templates/inventory/car_detail.html @@ -149,6 +149,27 @@ {% endif %} + + {% trans 'Showroom Location' %} + + {% if car.location %} +{% if car.location.is_owner_showroom %} + {% trans 'Our Showroom' %} + {% else %} + {{ car.location.showroom.get_local_name }} + {% endif %} + {% trans "transfer" %} +{% else %} + + {% trans "No location available." %} + + {% trans "Add" %} + + + + {% endif %} +
@@ -304,7 +325,7 @@
- {% trans "transfer" %} + {% trans "Edit" %} diff --git a/templates/inventory/car_inventory.html b/templates/inventory/car_inventory.html index ead58f1d..3aba0a17 100644 --- a/templates/inventory/car_inventory.html +++ b/templates/inventory/car_inventory.html @@ -1,12 +1,13 @@ {% extends 'base.html' %} {% load i18n %} -{% load static %} {% block title %} {% trans 'inventory'|capfirst %} {% endblock %} -{% block inventory %}{% trans "inventory" %}(current){% endblock %} +{% block inventory %} +{% trans "inventory" %}(current) +{% endblock %} {% block content %} - +
-
-
-
- - -
-
-
- - - - {% if request.GET.q %} - - - - {% endif %} -
-
-
+
+
+
+
+
+
+ + + + {% if request.GET.q %} + + + + {% endif %} +
+
+
- - - - - - - - - - - - - {% for car in cars %} - - {% if car.colors.all %} - {% for color in car.colors.all %} - - {% endfor %} - {% else %} - - {% endif %} - - - - - - - {% empty %} - - - - {% endfor %} - -
{% trans "VIN" %}{% trans "Year" %}{% trans "Make" %}{% trans "Model" %}{% trans "Actions" %}
{{ car.vin }}{{ car.year }}{{ car.id_car_make.get_local_name }}{{ car.id_car_model.get_local_name }} - {% trans "view" %} -
{% trans "No cars available." %}
- - {% if is_paginated %} - - {% endif %} -
-
-
+ + + + + + + + + + + + + {% for car in cars %} + + + + {% if car.colors.exists %} + + + {% else %} + + + {% endif %} + {% if car.location.is_owner_showroom %} + + {% else %} + + {% endif %} + + + {% empty %} + + + + {% endfor %} + +
{% trans "VIN" %}{% trans "Year" %}{% trans 'Exterior Color' %}{% trans 'Interior Color' %}{% trans "Showroom Location" %}{% trans "Actions" %}
{{ car.vin }}{{ car.year }}{{ car.colors.first.exterior.get_local_name }}
{{ car.colors.first.interior.get_local_name }}
{% trans 'Our Showroom' %}{{ car.location.showroom.get_local_name }} + + {% trans "view" %} + +
{% trans "No cars available." %}
+ + + {% if is_paginated %} + + {% endif %} +
+
+
{% endblock %} \ No newline at end of file diff --git a/templates/inventory/car_location_form.html b/templates/inventory/car_location_form.html index 4bdcfcb8..6b6f6011 100644 --- a/templates/inventory/car_location_form.html +++ b/templates/inventory/car_location_form.html @@ -1,10 +1,22 @@ - - - - - $Title$ - - -$END$ - - \ No newline at end of file +{% extends 'base.html' %} +{% load i18n %} +{% load crispy_forms_filters %} +{% block title %}{% trans "Manage Car Location" %}{% endblock %} +{% block content %} + {% if carlocation.exists %} +

Transfer

+ {% else %} +

Add

+ {% endif %} +
+

{% trans "Manage Car Location" %}

+
+ {% csrf_token %} + {{ form|crispy }} +
+ + +
+
+
+{% endblock %} \ No newline at end of file