diff --git a/bible-local/02-architecture.md b/bible-local/02-architecture.md index 5af8428..a71e29e 100644 --- a/bible-local/02-architecture.md +++ b/bible-local/02-architecture.md @@ -48,6 +48,32 @@ Rules: - latest pricelist selection ignores snapshots without items; - auto pricelist mode stays auto and must not be persisted as an explicit resolved ID. +## Pricing tab layout + +The Pricing tab (Ценообразование) has two tables: Buy (Цена покупки) and Sale (Цена продажи). + +Column order (both tables): + +``` +PN вендора | Описание | LOT | Кол-во | Estimate | Склад | Конкуренты | Ручная цена +``` + +Per-LOT row expansion rules: +- each `lot_mappings` entry in a BOM row becomes its own table row with its own quantity and prices; +- `baseLot` (resolved LOT without an explicit mapping) is treated as the first sub-row with `quantity_per_pn` from `_getRowLotQtyPerPN`; +- when one vendor PN expands into N LOT sub-rows, PN вендора and Описание cells use `rowspan="N"` and appear only on the first sub-row; +- a visual top border (`border-t border-gray-200`) separates each vendor PN group. + +Vendor price attachment: +- `vendorOrig` and `vendorOrigUnit` (BOM unit/total price) are attached to the first LOT sub-row only; +- subsequent sub-rows carry empty `data-vendor-orig` so `setPricingCustomPriceFromVendor` counts each vendor PN exactly once. + +Controls terminology: +- custom price input is labeled **Ручная цена** (not "Своя цена"); +- the button that fills custom price from BOM totals is labeled **BOM Цена** (not "Проставить цены BOM"). + +CSV export reads PN вендора, Описание, and LOT from `data-vendor-pn`, `data-desc`, `data-lot` row attributes to bypass the rowspan cell offset problem. + ## Configuration versioning Configuration revisions are append-only snapshots stored in `local_configuration_versions`. diff --git a/web/templates/index.html b/web/templates/index.html index 70f2484..fc58cb1 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -211,9 +211,9 @@ - + @@ -236,12 +236,12 @@
LOT PN вендора ОписаниеLOT Кол-во Estimate Склад
- +