Harden pricelist formation and document architecture decisions
This commit is contained in:
@@ -11,7 +11,7 @@ Categories are **always** taken from `lot.lot_category` (table `lot`).
|
||||
|
||||
### When creating pricelists
|
||||
|
||||
1. **Estimate**: load `lot.lot_category` for all components.
|
||||
1. **Estimate**: include only components with `current_price > 0` and `is_hidden = 0`, then load `lot.lot_category`.
|
||||
2. **Warehouse**: load `lot.lot_category` for all positions.
|
||||
3. Persist into `lot_category` column of `qt_pricelist_items`.
|
||||
|
||||
@@ -28,7 +28,7 @@ type PricelistItem struct {
|
||||
|
||||
- Category is **not** a virtual field — it is persisted to DB when the pricelist is created.
|
||||
- JOIN with `lot` is only needed for `lot_description`; category is already in `qt_pricelist_items`.
|
||||
- Default value when category is absent in source: `PART_`.
|
||||
- Default value when category is absent in source or LOT row is missing: `PART_`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user