Merge branch 'main' of http://10.10.1.136:3000/ismail/haikal into frontend

This commit is contained in:
Faheed 2025-09-25 12:05:27 +03:00
commit 11f7da4410
46 changed files with 15705970 additions and 13 deletions

BIN
.DS_Store vendored

Binary file not shown.

2
.gitignore vendored
View File

@ -14,7 +14,7 @@ db.sqlite*
new.sqlite3
*.sqlite3
media
car*.json
#car*.json
car_inventory/settings.py
car_inventory/__pycache__
haikalbot/temp_files_not_included

194
car_7.json Normal file
View File

@ -0,0 +1,194 @@
[
{
"model": "inventory.car",
"pk": "261d0b8d-6fd2-41ef-944f-bca90c1f8801",
"fields": {
"slug": "1fm5k7b86eja77428",
"created_at": "2025-06-21T17:28:06.006Z",
"updated_at": "2025-06-21T17:28:47.638Z",
"item_model": "0695c313-f035-45a6-8081-d65fba642b4c",
"vin": "1FM5K7B86EJA77428",
"dealer": 1,
"vendor": 1,
"id_car_make": 63,
"id_car_model": 630,
"year": 2014,
"id_car_serie": 3326,
"id_car_trim": 17340,
"status": "available",
"stock_type": "new",
"remarks": "",
"mileage": 0,
"receiving_date": "2025-06-21T17:28:00Z",
"hash": "21f73f670593e8fc93944056302fcb6c5b2bdca7c740f519d1be70a702b60167"
}
},
{
"model": "inventory.car",
"pk": "3124cf1e-fbf4-435f-ad54-85a68b991695",
"fields": {
"slug": "vf3v1zkx7rz002134",
"created_at": "2025-06-20T22:31:24.955Z",
"updated_at": "2025-06-20T22:38:28.437Z",
"item_model": "5b97897e-dc33-4657-8172-2d92db934065",
"vin": "VF3V1ZKX7RZ002134",
"dealer": 1,
"vendor": 1,
"id_car_make": 135,
"id_car_model": 1477,
"year": 2024,
"id_car_serie": 66939,
"id_car_trim": 264792,
"status": "available",
"stock_type": "new",
"remarks": "",
"mileage": 0,
"receiving_date": "2025-06-20T22:31:00Z",
"hash": "6ccafaab995a3c44251a07e8f1b3c9394d48f8bd18152de62d992be6f03a824d"
}
},
{
"model": "inventory.car",
"pk": "508a7205-2050-4483-ad3f-ba4218a36989",
"fields": {
"slug": "2g1f93d33c9198388",
"created_at": "2025-06-15T11:35:32.347Z",
"updated_at": "2025-06-15T11:35:59.900Z",
"item_model": "78d96cd7-5119-45e0-965d-97e58bde0f7d",
"vin": "2G1F93D33C9198388",
"dealer": 1,
"vendor": 1,
"id_car_make": 35,
"id_car_model": 267,
"year": 2012,
"id_car_serie": 5700,
"id_car_trim": 29828,
"status": "available",
"stock_type": "new",
"remarks": "",
"mileage": 0,
"receiving_date": "2025-06-15T11:35:00Z",
"hash": "edde2364f3489268c0091452eebb0e2736e03cafe470bdb3bc5c3bc52e033694"
}
},
{
"model": "inventory.car",
"pk": "5ddea314-c2ec-43c5-b2d4-8eeb3df4dcee",
"fields": {
"slug": "jn8ay2ny9e9073687",
"created_at": "2025-06-15T09:42:44.349Z",
"updated_at": "2025-06-15T09:44:16.573Z",
"item_model": "b85dae90-182c-4ac4-918b-8a4cfe3f4cf9",
"vin": "JN8AY2NY9E9073687",
"dealer": 1,
"vendor": 1,
"id_car_make": 127,
"id_car_model": 1404,
"year": 2014,
"id_car_serie": 3861,
"id_car_trim": 20435,
"status": "available",
"stock_type": "new",
"remarks": "",
"mileage": 0,
"receiving_date": "2025-06-15T09:42:00Z",
"hash": "592eb15f3a09f54d2637aaa6588dee6d27ea0546c0944643f298aa60424f0f9c"
}
},
{
"model": "inventory.car",
"pk": "a12df65c-9c96-43b1-848a-af78ab25b595",
"fields": {
"slug": "3gcny9ef5lg275234",
"created_at": "2025-06-16T17:49:09.536Z",
"updated_at": "2025-06-16T17:49:51.314Z",
"item_model": "443d79ed-2c85-4b06-aed0-3f78825db5d8",
"vin": "3GCNY9EF5LG275234",
"dealer": 1,
"vendor": 1,
"id_car_make": 35,
"id_car_model": 2220,
"year": 2020,
"id_car_serie": 63917,
"id_car_trim": 256680,
"status": "available",
"stock_type": "new",
"remarks": "",
"mileage": 0,
"receiving_date": "2025-06-16T17:49:00Z",
"hash": "60c7ca351726d2ffe64f94dc62c2099a5c7bc71f6d0696b07845c605c2f920c6"
}
},
{
"model": "inventory.car",
"pk": "a7d8f628-d316-4fc8-99ed-20af923b89ed",
"fields": {
"slug": "5lmcj2d93nul03460",
"created_at": "2025-06-01T12:19:51.490Z",
"updated_at": "2025-06-20T14:08:41.789Z",
"item_model": "c2cab749-54f0-4c4f-b673-6d840dbdb23c",
"vin": "5LMCJ2D93NUL03460",
"dealer": 1,
"vendor": 1,
"id_car_make": 102,
"id_car_model": 23079,
"year": 2022,
"id_car_serie": 64989,
"id_car_trim": 259799,
"status": "sold",
"stock_type": "new",
"remarks": "",
"mileage": 0,
"receiving_date": "2025-06-01T12:19:00Z",
"hash": "7e3ca4299d2aeca671651e4265b19437ede01e834f8a491fdc8691531485380b"
}
},
{
"model": "inventory.car",
"pk": "e3d39b2b-4467-4400-8e06-5de8aa804f28",
"fields": {
"slug": "ljxcu3bb0rtf17235",
"created_at": "2025-06-20T22:31:55.147Z",
"updated_at": "2025-06-20T22:43:16.874Z",
"item_model": "c1080dcd-663d-4ea0-bb82-29f9a34aa829",
"vin": "LJXCU3BB0RTF17235",
"dealer": 1,
"vendor": 1,
"id_car_make": 63,
"id_car_model": 20078,
"year": 2024,
"id_car_serie": 67498,
"id_car_trim": 283711,
"status": "available",
"stock_type": "new",
"remarks": "",
"mileage": 0,
"receiving_date": "2025-06-20T22:31:00Z",
"hash": "64e34711ad1402e8bcd504e0d4d95c6b8693764626c267cdfbdea1ef8fb8edb4"
}
},
{
"model": "inventory.car",
"pk": "e59ceebc-d589-4d42-bfc2-ff4bdcd4a709",
"fields": {
"slug": "1g6a85sx8k0144230",
"created_at": "2025-06-19T22:51:57.865Z",
"updated_at": "2025-06-20T14:09:00.526Z",
"item_model": "c1925348-86f1-492a-8a26-eeaccc95f875",
"vin": "1g6a85sx8k0144230",
"dealer": 1,
"vendor": 1,
"id_car_make": 28,
"id_car_model": 220,
"year": 2019,
"id_car_serie": 3015,
"id_car_trim": 26065,
"status": "available",
"stock_type": "new",
"remarks": "",
"mileage": 0,
"receiving_date": "2025-06-19T22:50:00Z",
"hash": "eaaa2d3f271ece5bc7253bf62fab033cdd8a759cda849a1de1a04b5b5b51ea0a"
}
}
]

368095
carequipment_7.json Normal file

File diff suppressed because it is too large Load Diff

249082
carequipment_backup.json Normal file

File diff suppressed because it is too large Load Diff

273990
carequipment_backup_output.json Normal file

File diff suppressed because it is too large Load Diff

4934
carmake_7.json Normal file

File diff suppressed because it is too large Load Diff

4523
carmake_backup.json Normal file

File diff suppressed because it is too large Load Diff

4934
carmake_backup_output.json Normal file

File diff suppressed because it is too large Load Diff

53332
carmodel_7.json Normal file

File diff suppressed because it is too large Load Diff

47720
carmodel_backup.json Normal file

File diff suppressed because it is too large Load Diff

53022
carmodel_backup_output.json Normal file

File diff suppressed because it is too large Load Diff

375882
caroption_7.json Normal file

File diff suppressed because it is too large Load Diff

338249
caroption_backup.json Normal file

File diff suppressed because it is too large Load Diff

375832
caroption_backup_output.json Normal file

File diff suppressed because it is too large Load Diff

5851096
caroptionvalue_backup.json Normal file

File diff suppressed because it is too large Load Diff

207729
carserie_7.json Normal file

File diff suppressed because it is too large Load Diff

191066
carserie_backup.json Normal file

File diff suppressed because it is too large Load Diff

206988
carserie_backup_output.json Normal file

File diff suppressed because it is too large Load Diff

922
carspecification_7.json Normal file
View File

@ -0,0 +1,922 @@
[
{
"model": "inventory.carspecification",
"pk": 1,
"fields": {
"name": "Bodywork",
"arabic_name": "هيكل السيارة",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 2,
"fields": {
"name": "Body type",
"arabic_name": "نوع الهيكل",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 3,
"fields": {
"name": "Number of doors",
"arabic_name": "عدد الأبواب",
"id_parent": 1549,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 4,
"fields": {
"name": "Number of seater",
"arabic_name": "عدد المقاعد",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 5,
"fields": {
"name": "Length",
"arabic_name": "الطول",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 6,
"fields": {
"name": "Width",
"arabic_name": "العرض",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 7,
"fields": {
"name": "Height",
"arabic_name": "الارتفاع",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 8,
"fields": {
"name": "Wheelbase",
"arabic_name": "قاعدة العجلات",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 9,
"fields": {
"name": "Front track",
"arabic_name": "المسار الأمامي",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 10,
"fields": {
"name": "Rear track",
"arabic_name": "المسافة الخلفية بين العجلات",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 11,
"fields": {
"name": "Engine",
"arabic_name": "محرك",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 12,
"fields": {
"name": "Engine type",
"arabic_name": "نوع المحرك",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 13,
"fields": {
"name": "Capacity",
"arabic_name": "السعة",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 14,
"fields": {
"name": "Engine power",
"arabic_name": "قوة المحرك",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 15,
"fields": {
"name": "Max power at RPM",
"arabic_name": "الحد الأقصى للقوة عند عدد الدورات في الدقيقة",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 16,
"fields": {
"name": "Maximum torque",
"arabic_name": "أقصى عزم دوران",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 17,
"fields": {
"name": "Injection type",
"arabic_name": "نوع الحقن",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 19,
"fields": {
"name": "Cylinder layout",
"arabic_name": "تخطيط الأسطوانات",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 20,
"fields": {
"name": "Number of cylinders",
"arabic_name": "عدد الأسطوانات",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 21,
"fields": {
"name": "Compression ratio",
"arabic_name": "نسبة الانضغاط",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 22,
"fields": {
"name": "Fuel",
"arabic_name": "وقود",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 23,
"fields": {
"name": "Gearbox and handling",
"arabic_name": "علبة التروس والتحكم",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 24,
"fields": {
"name": "Gearbox type",
"arabic_name": "نوع علبة التروس",
"id_parent": 23,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 26,
"fields": {
"name": "Number of gear",
"arabic_name": "عدد التروس",
"id_parent": 23,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 27,
"fields": {
"name": "Drive wheels",
"arabic_name": "عجلات القيادة",
"id_parent": 23,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 29,
"fields": {
"name": "Front brakes",
"arabic_name": "الفرامل الأمامية",
"id_parent": 40,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 30,
"fields": {
"name": "Rear brakes",
"arabic_name": "الفرامل الخلفية",
"id_parent": 40,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 31,
"fields": {
"name": "Operating characteristics",
"arabic_name": "خصائص التشغيل",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 32,
"fields": {
"name": "Max speed",
"arabic_name": "السرعة القصوى",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 33,
"fields": {
"name": "Acceleration (0-100 km/h)",
"arabic_name": "التسارع (0-100 كم/ساعة)",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 34,
"fields": {
"name": "Curb weight",
"arabic_name": "وزن السيارة الفارغة",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 35,
"fields": {
"name": "Fuel tank capacity",
"arabic_name": "سعة خزان الوقود",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 36,
"fields": {
"name": "Wheel size",
"arabic_name": "حجم العجلة",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 37,
"fields": {
"name": "Emission standards",
"arabic_name": "معايير الانبعاثات",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 38,
"fields": {
"name": "Ground clearance",
"arabic_name": "الخلوص الأرضي",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 39,
"fields": {
"name": "Valves per cylinder",
"arabic_name": "صمامات لكل أسطوانة",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 40,
"fields": {
"name": "Suspension and brakes",
"arabic_name": "نظام التعليق والفرامل",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 41,
"fields": {
"name": "Front suspension",
"arabic_name": "التعليق الأمامي",
"id_parent": 40,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 42,
"fields": {
"name": "Back suspension",
"arabic_name": "التعليق الخلفي",
"id_parent": 40,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 44,
"fields": {
"name": "Max trunk capacity",
"arabic_name": "أقصى سعة لصندوق الأمتعة",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 45,
"fields": {
"name": "Min trunk capacity",
"arabic_name": "سعة صندوق الأمتعة الدنيا",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 46,
"fields": {
"name": "Boost type",
"arabic_name": "نوع التعزيز",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 47,
"fields": {
"name": "Cylinder bore",
"arabic_name": "تجويف الأسطوانة",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 48,
"fields": {
"name": "Stroke cycle",
"arabic_name": "دورة الأشواط",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 50,
"fields": {
"name": "City driving fuel consumption per 100 km",
"arabic_name": "استهلاك الوقود في القيادة داخل المدينة لكل 100 كيلومتر",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 51,
"fields": {
"name": "Highway driving fuel consumption per 100 km",
"arabic_name": "استهلاك الوقود على الطرق السريعة لكل 100 كم",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 52,
"fields": {
"name": "Mixed driving fuel consumption per 100 km",
"arabic_name": "استهلاك الوقود في القيادة المختلطة لكل 100 كيلومتر",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 55,
"fields": {
"name": "Engine model",
"arabic_name": "نموذج المحرك",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 57,
"fields": {
"name": "Turning circle",
"arabic_name": "دائرة الدوران",
"id_parent": 23,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 58,
"fields": {
"name": "Full weight",
"arabic_name": "الوزن الكامل",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 59,
"fields": {
"name": "Disc size",
"arabic_name": "حجم القرص",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 61,
"fields": {
"name": "Engine placement",
"arabic_name": "موضع المحرك",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 62,
"fields": {
"name": "Cruising range",
"arabic_name": "مدى القيادة",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 66,
"fields": {
"name": "Car width with mirrors",
"arabic_name": "عرض السيارة مع المرايا",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1549,
"fields": {
"name": "General information",
"arabic_name": "معلومات عامة",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1551,
"fields": {
"name": "Safety",
"arabic_name": "السلامة",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1552,
"fields": {
"name": "Country",
"arabic_name": "بلد",
"id_parent": 1549,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1553,
"fields": {
"name": "Car class",
"arabic_name": "فئة السيارة",
"id_parent": 1549,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1554,
"fields": {
"name": "Clearance",
"arabic_name": "الخلوص",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1555,
"fields": {
"name": "Front track width",
"arabic_name": "عرض المسار الأمامي",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1556,
"fields": {
"name": "Back track width",
"arabic_name": "عرض المسار الخلفي",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1559,
"fields": {
"name": "Max power (kW)",
"arabic_name": "القدرة القصوى (كيلوواط)",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1561,
"fields": {
"name": "CO2 emissions",
"arabic_name": "انبعاثات ثاني أكسيد الكربون",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1562,
"fields": {
"name": "Safety assessment",
"arabic_name": "تقييم السلامة",
"id_parent": 1551,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1563,
"fields": {
"name": "Rating name",
"arabic_name": "اسم التقييم",
"id_parent": 1551,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1564,
"fields": {
"name": "Turnover of maximum torque",
"arabic_name": "دوران أقصى عزم",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1565,
"fields": {
"name": "Payload",
"arabic_name": "الحمولة",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1566,
"fields": {
"name": "Presence of intercooler",
"arabic_name": "وجود مبرد داخلي",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1567,
"fields": {
"name": "Trailer load (with brakes)",
"arabic_name": "حمولة المقطورة (مع الفرامل)",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1568,
"fields": {
"name": "Front/rear axle load",
"arabic_name": "حمولة المحور الأمامي/الخلفي",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1569,
"fields": {
"name": "Loading height",
"arabic_name": "ارتفاع التحميل",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1570,
"fields": {
"name": "Cargo compartment (Length x Width x Height)",
"arabic_name": "مقصورة الشحن (الطول × العرض × الارتفاع)",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1571,
"fields": {
"name": "Cargo compartment volume",
"arabic_name": "حجم حيز الأمتعة",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1631,
"fields": {
"name": "Accumulator battery",
"arabic_name": "بطارية تراكمية",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1632,
"fields": {
"name": "Battery capacity",
"arabic_name": "سعة البطارية",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1634,
"fields": {
"name": "Electric power reserve",
"arabic_name": "احتياطي الطاقة الكهربائية",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1635,
"fields": {
"name": "Charging time",
"arabic_name": "وقت الشحن",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1641,
"fields": {
"name": "Steering wheel position",
"arabic_name": "موضع عجلة القيادة",
"id_parent": 1549,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1642,
"fields": {
"name": "Dimensions",
"arabic_name": "الأبعاد",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1644,
"fields": {
"name": "Pitch Circle Diameter",
"arabic_name": "قطر دائرة التثبيت",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1645,
"fields": {
"name": "Engine code",
"arabic_name": "رمز المحرك",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1647,
"fields": {
"name": "Battery type",
"arabic_name": "نوع البطارية",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1648,
"fields": {
"name": "Timing belt",
"arabic_name": "حزام التوقيت",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1649,
"fields": {
"name": "Flow calculation method",
"arabic_name": "طريقة حساب التدفق",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1650,
"fields": {
"name": "Battery temperature",
"arabic_name": "درجة حرارة البطارية",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1651,
"fields": {
"name": "Fast charge time",
"arabic_name": "وقت الشحن السريع",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1652,
"fields": {
"name": "Description of fast charging",
"arabic_name": "وصف الشحن السريع",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1653,
"fields": {
"name": "Charging connector type",
"arabic_name": "نوع موصل الشحن",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1654,
"fields": {
"name": "Consumption",
"arabic_name": "استهلاك",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1655,
"fields": {
"name": "Maximum charging power",
"arabic_name": "أقصى قدرة شحن",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1656,
"fields": {
"name": "Battery capacity (available)",
"arabic_name": "سعة البطارية (المتاحة)",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1657,
"fields": {
"name": "Number of charging cycles",
"arabic_name": "عدد دورات الشحن",
"id_parent": 1631,
"slug": null
}
}
]

1179830
cartrim_7.json Normal file

File diff suppressed because it is too large Load Diff

955880
cartrim_backup.json Normal file

File diff suppressed because it is too large Load Diff

1042778
cartrim_backup_output.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4934
inventory/data/carmake.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

53112
inventory/data/carmodel.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

375832
inventory/data/caroption.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

207209
inventory/data/carserie.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,922 @@
[
{
"model": "inventory.carspecification",
"pk": 1,
"fields": {
"name": "Bodywork",
"arabic_name": "هيكل السيارة",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 2,
"fields": {
"name": "Body type",
"arabic_name": "نوع الهيكل",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 3,
"fields": {
"name": "Number of doors",
"arabic_name": "عدد الأبواب",
"id_parent": 1549,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 4,
"fields": {
"name": "Number of seater",
"arabic_name": "عدد المقاعد",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 5,
"fields": {
"name": "Length",
"arabic_name": "الطول",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 6,
"fields": {
"name": "Width",
"arabic_name": "العرض",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 7,
"fields": {
"name": "Height",
"arabic_name": "الارتفاع",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 8,
"fields": {
"name": "Wheelbase",
"arabic_name": "قاعدة العجلات",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 9,
"fields": {
"name": "Front track",
"arabic_name": "المسار الأمامي",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 10,
"fields": {
"name": "Rear track",
"arabic_name": "المسافة الخلفية بين العجلات",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 11,
"fields": {
"name": "Engine",
"arabic_name": "محرك",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 12,
"fields": {
"name": "Engine type",
"arabic_name": "نوع المحرك",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 13,
"fields": {
"name": "Capacity",
"arabic_name": "السعة",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 14,
"fields": {
"name": "Engine power",
"arabic_name": "قوة المحرك",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 15,
"fields": {
"name": "Max power at RPM",
"arabic_name": "الحد الأقصى للقوة عند عدد الدورات في الدقيقة",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 16,
"fields": {
"name": "Maximum torque",
"arabic_name": "أقصى عزم دوران",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 17,
"fields": {
"name": "Injection type",
"arabic_name": "نوع الحقن",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 19,
"fields": {
"name": "Cylinder layout",
"arabic_name": "تخطيط الأسطوانات",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 20,
"fields": {
"name": "Number of cylinders",
"arabic_name": "عدد الأسطوانات",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 21,
"fields": {
"name": "Compression ratio",
"arabic_name": "نسبة الانضغاط",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 22,
"fields": {
"name": "Fuel",
"arabic_name": "وقود",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 23,
"fields": {
"name": "Gearbox and handling",
"arabic_name": "علبة التروس والتحكم",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 24,
"fields": {
"name": "Gearbox type",
"arabic_name": "نوع علبة التروس",
"id_parent": 23,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 26,
"fields": {
"name": "Number of gear",
"arabic_name": "عدد التروس",
"id_parent": 23,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 27,
"fields": {
"name": "Drive wheels",
"arabic_name": "عجلات القيادة",
"id_parent": 23,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 29,
"fields": {
"name": "Front brakes",
"arabic_name": "الفرامل الأمامية",
"id_parent": 40,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 30,
"fields": {
"name": "Rear brakes",
"arabic_name": "الفرامل الخلفية",
"id_parent": 40,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 31,
"fields": {
"name": "Operating characteristics",
"arabic_name": "خصائص التشغيل",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 32,
"fields": {
"name": "Max speed",
"arabic_name": "السرعة القصوى",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 33,
"fields": {
"name": "Acceleration (0-100 km/h)",
"arabic_name": "التسارع (0-100 كم/ساعة)",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 34,
"fields": {
"name": "Curb weight",
"arabic_name": "وزن السيارة الفارغة",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 35,
"fields": {
"name": "Fuel tank capacity",
"arabic_name": "سعة خزان الوقود",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 36,
"fields": {
"name": "Wheel size",
"arabic_name": "حجم العجلة",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 37,
"fields": {
"name": "Emission standards",
"arabic_name": "معايير الانبعاثات",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 38,
"fields": {
"name": "Ground clearance",
"arabic_name": "الخلوص الأرضي",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 39,
"fields": {
"name": "Valves per cylinder",
"arabic_name": "صمامات لكل أسطوانة",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 40,
"fields": {
"name": "Suspension and brakes",
"arabic_name": "نظام التعليق والفرامل",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 41,
"fields": {
"name": "Front suspension",
"arabic_name": "التعليق الأمامي",
"id_parent": 40,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 42,
"fields": {
"name": "Back suspension",
"arabic_name": "التعليق الخلفي",
"id_parent": 40,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 44,
"fields": {
"name": "Max trunk capacity",
"arabic_name": "أقصى سعة لصندوق الأمتعة",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 45,
"fields": {
"name": "Min trunk capacity",
"arabic_name": "سعة صندوق الأمتعة الدنيا",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 46,
"fields": {
"name": "Boost type",
"arabic_name": "نوع التعزيز",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 47,
"fields": {
"name": "Cylinder bore",
"arabic_name": "تجويف الأسطوانة",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 48,
"fields": {
"name": "Stroke cycle",
"arabic_name": "دورة الأشواط",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 50,
"fields": {
"name": "City driving fuel consumption per 100 km",
"arabic_name": "استهلاك الوقود في القيادة داخل المدينة لكل 100 كيلومتر",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 51,
"fields": {
"name": "Highway driving fuel consumption per 100 km",
"arabic_name": "استهلاك الوقود على الطرق السريعة لكل 100 كم",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 52,
"fields": {
"name": "Mixed driving fuel consumption per 100 km",
"arabic_name": "استهلاك الوقود في القيادة المختلطة لكل 100 كيلومتر",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 55,
"fields": {
"name": "Engine model",
"arabic_name": "نموذج المحرك",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 57,
"fields": {
"name": "Turning circle",
"arabic_name": "دائرة الدوران",
"id_parent": 23,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 58,
"fields": {
"name": "Full weight",
"arabic_name": "الوزن الكامل",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 59,
"fields": {
"name": "Disc size",
"arabic_name": "حجم القرص",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 61,
"fields": {
"name": "Engine placement",
"arabic_name": "موضع المحرك",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 62,
"fields": {
"name": "Cruising range",
"arabic_name": "مدى القيادة",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 66,
"fields": {
"name": "Car width with mirrors",
"arabic_name": "عرض السيارة مع المرايا",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1549,
"fields": {
"name": "General information",
"arabic_name": "معلومات عامة",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1551,
"fields": {
"name": "Safety",
"arabic_name": "السلامة",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1552,
"fields": {
"name": "Country",
"arabic_name": "بلد",
"id_parent": 1549,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1553,
"fields": {
"name": "Car class",
"arabic_name": "فئة السيارة",
"id_parent": 1549,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1554,
"fields": {
"name": "Clearance",
"arabic_name": "الخلوص",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1555,
"fields": {
"name": "Front track width",
"arabic_name": "عرض المسار الأمامي",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1556,
"fields": {
"name": "Back track width",
"arabic_name": "عرض المسار الخلفي",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1559,
"fields": {
"name": "Max power (kW)",
"arabic_name": "القدرة القصوى (كيلوواط)",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1561,
"fields": {
"name": "CO2 emissions",
"arabic_name": "انبعاثات ثاني أكسيد الكربون",
"id_parent": 31,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1562,
"fields": {
"name": "Safety assessment",
"arabic_name": "تقييم السلامة",
"id_parent": 1551,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1563,
"fields": {
"name": "Rating name",
"arabic_name": "اسم التقييم",
"id_parent": 1551,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1564,
"fields": {
"name": "Turnover of maximum torque",
"arabic_name": "دوران أقصى عزم",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1565,
"fields": {
"name": "Payload",
"arabic_name": "الحمولة",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1566,
"fields": {
"name": "Presence of intercooler",
"arabic_name": "وجود مبرد داخلي",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1567,
"fields": {
"name": "Trailer load (with brakes)",
"arabic_name": "حمولة المقطورة (مع الفرامل)",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1568,
"fields": {
"name": "Front/rear axle load",
"arabic_name": "حمولة المحور الأمامي/الخلفي",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1569,
"fields": {
"name": "Loading height",
"arabic_name": "ارتفاع التحميل",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1570,
"fields": {
"name": "Cargo compartment (Length x Width x Height)",
"arabic_name": "مقصورة الشحن (الطول × العرض × الارتفاع)",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1571,
"fields": {
"name": "Cargo compartment volume",
"arabic_name": "حجم حيز الأمتعة",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1631,
"fields": {
"name": "Accumulator battery",
"arabic_name": "بطارية تراكمية",
"id_parent": null,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1632,
"fields": {
"name": "Battery capacity",
"arabic_name": "سعة البطارية",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1634,
"fields": {
"name": "Electric power reserve",
"arabic_name": "احتياطي الطاقة الكهربائية",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1635,
"fields": {
"name": "Charging time",
"arabic_name": "وقت الشحن",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1641,
"fields": {
"name": "Steering wheel position",
"arabic_name": "موضع عجلة القيادة",
"id_parent": 1549,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1642,
"fields": {
"name": "Dimensions",
"arabic_name": "الأبعاد",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1644,
"fields": {
"name": "Pitch Circle Diameter",
"arabic_name": "قطر دائرة التثبيت",
"id_parent": 1,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1645,
"fields": {
"name": "Engine code",
"arabic_name": "رمز المحرك",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1647,
"fields": {
"name": "Battery type",
"arabic_name": "نوع البطارية",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1648,
"fields": {
"name": "Timing belt",
"arabic_name": "حزام التوقيت",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1649,
"fields": {
"name": "Flow calculation method",
"arabic_name": "طريقة حساب التدفق",
"id_parent": 11,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1650,
"fields": {
"name": "Battery temperature",
"arabic_name": "درجة حرارة البطارية",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1651,
"fields": {
"name": "Fast charge time",
"arabic_name": "وقت الشحن السريع",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1652,
"fields": {
"name": "Description of fast charging",
"arabic_name": "وصف الشحن السريع",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1653,
"fields": {
"name": "Charging connector type",
"arabic_name": "نوع موصل الشحن",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1654,
"fields": {
"name": "Consumption",
"arabic_name": "استهلاك",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1655,
"fields": {
"name": "Maximum charging power",
"arabic_name": "أقصى قدرة شحن",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1656,
"fields": {
"name": "Battery capacity (available)",
"arabic_name": "سعة البطارية (المتاحة)",
"id_parent": 1631,
"slug": null
}
},
{
"model": "inventory.carspecification",
"pk": 1657,
"fields": {
"name": "Number of charging cycles",
"arabic_name": "عدد دورات الشحن",
"id_parent": 1631,
"slug": null
}
}
]

1044374
inventory/data/cartrim.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2731,7 +2731,7 @@ class Vendor(models.Model, LocalizedNameMixin):
)
arabic_name = models.CharField(max_length=255, verbose_name=_("Arabic Name"))
name = models.CharField(max_length=255, verbose_name=_("English Name"))
contact_person = models.CharField(max_length=100, verbose_name=_("Contact Person"))
contact_person = models.CharField(max_length=100, verbose_name=_("Contact Person"),null=True, blank=True)
phone_number = models.CharField(
max_length=255,
verbose_name=_("Phone Number"),

View File

@ -1325,8 +1325,8 @@ def get_finance_data(estimate, dealer):
)
discount = extra_info.data.get("discount", 0)
discount = Decimal(discount)
additional_services = car.get_additional_services()
discounted_price = Decimal(car.marked_price) - discount
vat_amount = discounted_price * vat.rate
total_services_amount = additional_services.get("total")

View File

@ -5268,13 +5268,31 @@ class EstimateDetailView(LoginRequiredMixin, PermissionRequiredMixin, DetailView
kwargs["invoice"] = invoice_obj
try:
car = estimate.get_itemtxs_data()[0].first().item_model.car
selected_items = car.additional_services.filter(dealer=dealer)
extra_info = models.ExtraInfo.objects.get(
dealer=dealer,
content_type=ContentType.objects.get_for_model(EstimateModel),
object_id=estimate.pk
)
try:
additionals = extra_info.data.get("additionals")
if additionals:
selected_items = models.AdditionalServices.objects.filter(dealer=dealer,pk__in=additionals)
else:
selected_items = []
except Exception as e:
selected_items = []
if estimate.is_draft() or estimate.is_review():
kwargs["grand_total"] = finance_data.get("final_price") + sum([x.price_ for x in selected_items])
else:
kwargs["grand_total"] = finance_data.get("grand_total")
form = forms.AdditionalFinancesForm()
form.fields["additional_finances"].queryset = form.fields[
"additional_finances"
].queryset.filter(dealer=dealer) #
form.initial["additional_finances"] = selected_items
kwargs["additionals_form"] = form
kwargs["additional_finances"] = selected_items
except Exception as e:
logger.error(e)
return super().get_context_data(**kwargs)
@ -5438,7 +5456,17 @@ def update_estimate_additionals(request, dealer_slug, pk):
if form.is_valid():
estimate = get_object_or_404(EstimateModel, pk=pk)
car = estimate.get_itemtxs_data()[0].first().item_model.car
car.additional_services.set(form.cleaned_data["additional_finances"])
additionals = form.cleaned_data["additional_finances"]
# car.additional_services.set(additionals)
additionals = [additional.pk for additional in additionals]
extra_info = models.ExtraInfo.objects.get(
dealer=dealer,
content_type=ContentType.objects.get_for_model(EstimateModel),
object_id=estimate.pk,
)
extra_info.data.update({"additionals": additionals})
extra_info.save()
car.save()
messages.success(request, "Additional Finances updated successfully")
return redirect("estimate_detail", dealer_slug=dealer_slug, pk=pk)
@ -5595,7 +5623,7 @@ def estimate_mark_as(request, dealer_slug, pk):
dealer = get_object_or_404(models.Dealer, slug=dealer_slug)
estimate = get_object_or_404(EstimateModel, pk=pk)
mark = request.GET.get("mark")
print(mark)
if mark:
if mark == "review":
if not estimate.can_review():
@ -5615,6 +5643,24 @@ def estimate_mark_as(request, dealer_slug, pk):
# Reserve The Car
car = estimate.get_itemtxs_data()[0].first().item_model.car
reserve_car(car, request)
extra_info = models.ExtraInfo.objects.get(
dealer=dealer,
content_type=ContentType.objects.get_for_model(EstimateModel),
object_id=estimate.pk
)
try:
additionals = extra_info.data.get("additionals")
if additionals:
selected_items = models.AdditionalServices.objects.filter(dealer=dealer,pk__in=additionals)
else:
selected_items = []
except Exception as e:
logger.error(e)
selected_items = []
if selected_items:
car.additional_services.clear()
car.additional_services.set(selected_items)
messages.success(request, _("Quotation approved successfully"))
return redirect("estimate_list", dealer_slug=dealer.slug)
elif mark == "rejected":
@ -12540,10 +12586,18 @@ def create_estimate_for_car(request, dealer_slug, slug):
@require_POST
def estimate_create_from_opportunity(request, dealer_slug, slug):
opportunity = get_object_or_404(models.Opportunity, slug=slug)
if opportunity.estimate:
messages.error(
request,
"An estimate has already been created for this opportunity.",
)
return redirect(
"opportunity_detail", dealer_slug=dealer_slug, slug=opportunity.slug
)
dealer = get_object_or_404(models.Dealer, slug=dealer_slug)
car = opportunity.car
customer = opportunity.customer
# TODO: set safe guard, so it doesnt recreate it
if not all([dealer, car, customer]):
messages.error(request, "Please correct the errors below.")
return redirect(

BIN
static/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -28,7 +28,7 @@
href="{% url 'estimate_detail' request.dealer.slug opportunity.estimate.pk %}">{{ _("View Quotation") }}</a>
{% endif %}
{% else %}
{% if perms.django_ledger.add_estimatemodel %}
{% if perms.django_ledger.add_estimatemodel and not opportunity.estimate %}
<a class="dropdown-item"
type="button"
data-bs-toggle="modal"
@ -764,6 +764,7 @@
</div>
{% if perms.inventory.change_opportunity %}<div class="col-auto"></div>{% endif %}
</div>
<div id="timeline">
{% for activity in opportunity.get_activities %}
<div class="border-bottom border-translucent py-4">
<div class="d-flex">
@ -813,6 +814,7 @@
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>

View File

@ -445,10 +445,8 @@
<a class="nav-link ps-2" href="{% if request.is_dealer%}{% url 'ticket_list' request.dealer.slug %} {% else %}#{%endif%}">
<div class="d-flex align-items-center">
{% if user.is_authenticated%}
<span class="nav-link-icon"><span class="fa-solid fa-gear me-1 fs-7"></span></span>
<span class="nav-link-text">{{ request.dealer.user.username }}</span>
{% endif %}
</div>
</a>

View File

@ -293,8 +293,9 @@
<tr class="bg-body-secondary total-sum">
<td class="align-middle ps-4 fw-semibold text-body-highlight" colspan="7">{% trans "Additional Services" %}</td>
<td class="align-middle text-start fw-semibold">
{% for service in data.additional_services.services %}
<small><span class="fw-semibold">+ {{ service.0.name }} - {{ service.0.price_|floatformat }}<span class="icon-saudi_riyal"></span></span></small>
{% for service in additional_finances %}
<small><span class="fw-semibold">+ {{ service.name }} - {{ service.price_|floatformat }}<span class="icon-saudi_riyal"></span></span></small>
<br>
{% endfor %}
{% if estimate.is_draft %}
@ -310,7 +311,7 @@
<tr class="bg-body-secondary total-sum">
<td class="align-middle ps-4 fw-bolder text-body-highlight" colspan="7">{% trans "Grand Total" %}</td>
<td class="align-middle text-start fw-bolder">
<span id="grand-total">{{ data.grand_total|floatformat }}<span class="icon-saudi_riyal"></span></span>
<span id="grand-total">{{ grand_total|floatformat }}<span class="icon-saudi_riyal"></span></span>
</td>
</tr>
</tbody>