72 lines
4.1 KiB
Markdown
72 lines
4.1 KiB
Markdown
# Glossary / Fogalomtár
|
||
|
||
> For core framework glossary see: `GLOSSARY.md` (in AyCode.Core repo)
|
||
> For UI framework glossary see: `GLOSSARY.md` (in AyCode.Blazor repo)
|
||
|
||
Domain terminology for the FruitBank system. **Read this before making changes.**
|
||
|
||
## Business Domain
|
||
|
||
| English | Magyar | Definition |
|
||
|---|---|---|
|
||
| **Shipping** | Beszállítás | **INBOUND** delivery: supplier → warehouse. A truck arrival event. |
|
||
| **Order** | Megrendelés | **OUTBOUND** delivery: warehouse → customer. |
|
||
| **Pallet** (XxxItemPallet) | Mérési rekord | A **measurement record**, NOT a physical pallet. Always created, even for non-measurable products. |
|
||
| **Partner** | Partner / Beszállító | External supplier providing goods. |
|
||
| **ShippingDocument** | Szállítólevél | Supplier's delivery note or invoice, linked to a Shipping. |
|
||
| **ShippingItem** | Szállítólevél tétel | Product line on a shipping document. Tracks declared vs measured discrepancies. |
|
||
| **StockTaking** | Leltározás | Inventory session that freezes logical stock and reconciles with physical count. |
|
||
| **GenericAttribute** | Generikus attribútum | nopCommerce polymorphic key-value store. KeyGroup = owner type, EntityId = owner ID. |
|
||
|
||
## Measurement System
|
||
|
||
| Term | Definition |
|
||
|---|---|
|
||
| **IsMeasurable** | Product-level flag. If `false`: weights = 0.0, only TrayQuantity matters. A Pallet record is still created. |
|
||
| **NetWeight** | `GrossWeight − PalletWeight − (TrayQuantity × TareWeight)` — universal formula across all three hierarchies. |
|
||
| **TrayQuantity** | Always recorded, regardless of measurability. Count of trays/crates. |
|
||
| **GrossWeight** | Total weight including pallet and packaging. 0.0 if not measurable. |
|
||
| **PalletWeight** | Weight of the physical pallet. 0.0 if goods arrive without one. |
|
||
| **TareWeight** | Weight of a single tray/crate. Used in NetWeight calculation. |
|
||
| **AverageWeight** | Per-pallet average: `NetWeight / TrayQuantity`. Validated against threshold. |
|
||
| **MeasuringStatus** | NotStarted(0) → Started(10) → **Finnished**(20) → Audited(30). Note: "Finnished" is intentional. |
|
||
| **RevisorId** | Quality auditor's Customer ID. OrderItemPallet becomes "Audited" when RevisorId > 0. |
|
||
|
||
## Three Measurement Hierarchies
|
||
|
||
All share `MeasuringItemPalletBase` with the same NetWeight formula:
|
||
|
||
| Flow | Parent | Pallet Record | Extra |
|
||
|---|---|---|---|
|
||
| **Inbound (Shipping)** | ShippingItem | ShippingItemPallet | Declared vs measured discrepancy |
|
||
| **Outbound (Order)** | OrderItemDto | OrderItemPallet | RevisorId for audit |
|
||
| **Inventory (StockTaking)** | StockTakingItem | StockTakingItemPallet | QuantityDiff for stock adjustment |
|
||
|
||
## nopCommerce Entities
|
||
|
||
These are **NOT custom FruitBank entities** — they come from nopCommerce:
|
||
- Customer, Order, OrderItem, OrderNote, Product, GenericAttribute
|
||
|
||
FruitBank extends them via:
|
||
- **DTOs** (OrderDto, OrderItemDto, ProductDto) that wrap nopCommerce entities with measurement properties
|
||
- **GenericAttributes** for storing custom values (IsMeasurable, Tare, AverageWeight, etc.)
|
||
|
||
## Common Traps
|
||
|
||
| Trap | Correct Behavior |
|
||
|---|---|
|
||
| "Pallet" = physical pallet | ❌ It's a measurement record. Always created. |
|
||
| Shipping = outgoing | ❌ Shipping = INBOUND. Order = OUTBOUND. |
|
||
| Fix "Finnished" spelling | ❌ Intentional legacy typo. Do NOT fix. |
|
||
| IsMeasurable=false means no Pallet | ❌ Pallet is always created, weights just = 0.0 |
|
||
| NetWeight is stored | ❌ It's calculated: GrossWeight − PalletWeight − (TrayQuantity × TareWeight) |
|
||
| GenericAttribute is simple | ❌ It's polymorphic: KeyGroup determines which entity type owns the record |
|
||
|
||
## UI / Grid Components
|
||
|
||
For MgGrid framework terms (MgGridBase, MgGridWithInfoPanel, MgGridToolbarBase, MgGridDataColumn, MgGridInfoPanel, IMgGridBase, etc.) see `GLOSSARY.md` (in AyCode.Blazor repo) and `AyCode.Blazor.Components/docs/MGGRID.md` (in AyCode.Blazor repo).
|
||
|
||
| Term | Definition |
|
||
|---|---|
|
||
| **FruitBankGridBase** | Project-level adapter: fixes `TSignalRDataSource=SignalRDataSourceObservable`, `TId=int`, `TLoggerClient=LoggerClient`. Adds per-user layout, master/detail defaults. See `FruitBankHybrid.Shared/Components/Grids/README.md`. |
|