Darstellung
MaterialAveragePriceHistory
Tabelle: material_average_price_history
Domain: MaterialAveragePriceHistory · com.reybex.domain.wws.material
Modul: BAS
Partner-Hinweise
- Daten liegen mandantengetrennt – bei SELECT fast immer
tenant_id = :mandantsetzen (Spalte ggf.TenantIdin älteren Tabellen). - Schreibende SQL (
INSERT/UPDATE/DELETE) nur in abgestimmten Export-/Report-Jobs (Transaktion BAS23) und nie ohne Freigabe durch reybex. - Für API-Integrationen bevorzugt die API statt direkter DB-Zugriffe.
Primärschlüssel
id
Spalten
| Spalte | SQL-Typ | NULL | Default | Beschreibung |
|---|---|---|---|---|
id | bigint auto_increment | Ja | — | Primärschlüssel (Domain: id) |
tenant_id | bigint | Nein | — | Mandanten-ID (Multi-Tenant – in Abfragen fast immer filtern) (Domain: tenantId) |
material_id | bigint | Nein | — | Fremdschlüssel → material |
verification_item_id | bigint | Nein | — | Fremdschlüssel → verification item |
calculation_date | datetime | Nein | — | Domain-Feld calculationDate |
calculation_quantity | double | Ja | — | Domain-Feld calculationQuantity |
calculation_price | double | Nein | — | Domain-Feld calculationPrice |
calculation_unit_id | bigint | Nein | — | Fremdschlüssel → calculation unit |
calculation_price_unit | double | Nein | — | Domain-Feld calculationPriceUnit |
calculation_currency_id | bigint | Nein | — | Fremdschlüssel → calculation currency |
calculation_exchange_rate | decimal(20, 8) | Nein | — | Domain-Feld calculationExchangeRate |
calculation_price_after_exchange_rate | double | Nein | — | Domain-Feld calculationPriceAfterExchangeRate |
old_average_price | double | Nein | — | Domain-Feld oldAveragePrice |
old_stock | double | Nein | — | Domain-Feld oldStock |
new_average_price | double | Nein | — | Domain-Feld newAveragePrice |
new_stock | double | Nein | — | Domain-Feld newStock |
is_manually | tinyint(1) | Nein | — | Domain-Feld isManually |
created_by_id | bigint | Nein | — | Angelegt von (Benutzer-ID) |
date_created | datetime | Nein | — | Anlagezeitpunkt |
updated_by_id | bigint | Ja | — | Geändert von (Benutzer-ID) |
last_updated | datetime | Ja | CURRENT_TIMESTAMP | Letzte Änderung |
unique_name | varchar(20) | Ja | — | unique name |
is_customer_specific | smallint | Ja | 0 | Boolean: Customer Specific |
old_freight_cost | double(20, 8) | Ja | — | Domain-Feld oldFreightCost |
new_freight_cost | double(20, 8) | Ja | — | Domain-Feld newFreightCost |
old_customs_cost | double(20, 8) | Ja | — | Domain-Feld oldCustomsCost |
new_customs_cost | double(20, 8) | Ja | — | Domain-Feld newCustomsCost |
Fremdschlüssel
| Spalte(n) | Referenz |
|---|---|
material_id | material (id) |
verification_item_id | verification_item (id) |
calculation_unit_id | ltt_unit (id) |
calculation_currency_id | ltt_currency (id) |