fix: Улучшения системы ценообразования комплектов

Исправлены 4 проблемы:
1. Расчёт цены первого товара - улучшена валидация в getProductPrice и calculateFinalPrice
2. Отображение actual_price в Select2 вместо обычной цены
3. Количество по умолчанию = 1 для новых форм компонентов
4. Auto-select текста при клике на поле количества для удобства редактирования

Изменённые файлы:
- products/forms.py: добавлен __init__ в KitItemForm для quantity.initial = 1
- products/templates/includes/select2-product-init.html: обновлена formatSelectResult
- products/templates/productkit_create.html: добавлен focus handler для auto-select
- products/templates/productkit_edit.html: добавлен focus handler для auto-select

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-02 19:04:03 +03:00
parent c84a372f98
commit 6c8af5ab2c
120 changed files with 9035 additions and 3036 deletions

View File

@@ -1,10 +1,12 @@
asgiref==3.10.0
Django==5.1.4
asgiref==3.9.0
Django==5.0.10
django-environ==0.12.0
django-nested-admin==4.1.5
django-phonenumber-field==8.3.0
django-tenants==3.7.0
pillow==12.0.0
psycopg[binary]>=3.1
phonenumbers==9.0.17
pillow==11.0.0
psycopg2-binary>=2.9.6
python-monkey-business==1.1.0
sqlparse==0.5.3
tzdata==2025.2