feat: вкладка Аренда — колонки Estimate/Цена продажи; lot_description для прайслистов
Вкладка «Аренда»: добавлены колонки Estimate и Цена продажи (+ итоги), чекбокс «БУ» перенесён первым слева, таблица переведена на тот же разметку/классы, что и таблицы вкладки «Ценообразование». Прайслисты: local_pricelist_items получает lot_description (синхронизируется из qt_pricelist_items.lot_description) вместо устаревших available_qty/ partnumbers, которые нигде не заполнялись. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
7edb80e498
commit
39e6fd5642
@@ -26,6 +26,7 @@ Rules:
|
||||
- user-authored tables must not be dropped as a recovery shortcut;
|
||||
- `local_pricelist_items` is the only valid runtime source of prices and component catalog; do not add a separate component cache table;
|
||||
- `local_pricelist_items.lot_category` is the single source of a LOT's category at runtime (populated by sync from `qt_pricelist_items.lot_category`); do not derive category from a lot_name prefix or from `qt_categories`/`qt_lot_metadata`;
|
||||
- `local_pricelist_items.lot_description` is the single source of a LOT's description at runtime (populated by sync from `qt_pricelist_items.lot_description`); do not join the legacy `lot` table for it;
|
||||
- configuration `items` and `vendor_spec` are stored as JSON payloads inside configuration rows;
|
||||
- `local_components` table has been removed; any reference to it is dead code.
|
||||
|
||||
@@ -80,7 +81,7 @@ These tables are retained for historical data. QuoteForge does not read or write
|
||||
|
||||
Rules:
|
||||
- QuoteForge runtime must not depend on any legacy RFQ tables;
|
||||
- QuoteForge sync reads prices and categories from `qt_pricelists` / `qt_pricelist_items` only;
|
||||
- QuoteForge sync reads prices, categories and descriptions from `qt_pricelists` / `qt_pricelist_items` only;
|
||||
- QuoteForge does not enrich local pricelist rows from `parts_log` or any other raw supplier log table;
|
||||
- normal UI requests must not query MariaDB tables directly;
|
||||
- `qt_client_local_migrations` exists in the 2026-04-15 schema dump, but runtime sync does not depend on it.
|
||||
@@ -256,12 +257,16 @@ PK: lot_name
|
||||
| pricelist_id | bigint UNSIGNED NOT NULL | FK → qt_pricelists.id |
|
||||
| lot_name | varchar(255) NOT NULL | INDEX with pricelist_id |
|
||||
| lot_category | varchar(50) | |
|
||||
| lot_description | varchar(10000) | added by migration 032; backfilled once from `lot.lot_description`. QF syncs this column directly — do not join `lot` per-row to get a description |
|
||||
| price | decimal(12,2) NOT NULL | |
|
||||
| price_method | varchar(20) | |
|
||||
| price_period_days | bigint DEFAULT 90 | |
|
||||
| price_coefficient | decimal(5,2) DEFAULT 0 | |
|
||||
| manual_price | decimal(12,2) | |
|
||||
| meta_prices | varchar(1000) | |
|
||||
| price_method | varchar(20) | synced to local and shown in the pricelist detail "Настройки" column |
|
||||
| price_period_days | bigint DEFAULT 90 | synced to local, same as above |
|
||||
| price_coefficient | decimal(5,2) DEFAULT 0 | synced to local, same as above |
|
||||
| manual_price | decimal(12,2) | synced to local, same as above |
|
||||
| meta_prices | varchar(1000) | synced to local, same as above |
|
||||
| lead_time_weeks | int | exists in the real table; not read by QF — no corresponding field in `models.PricelistItem` |
|
||||
|
||||
Fields QF never populates and does not model: `AvailableQty`/`Partnumbers` (removed from `models.PricelistItem` and `LocalPricelistItem` — no writer ever set them; always empty).
|
||||
|
||||
### qt_pricelist_sync_status
|
||||
PK: username
|
||||
|
||||
Reference in New Issue
Block a user