Darstellung
MaterialUnits
Tabelle: material_units
Domain: MaterialUnits · 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 | Ja | — | Mandanten-ID (Multi-Tenant – in Abfragen fast immer filtern) (Domain: tenantId) |
material_id | bigint | Ja | — | Fremdschlüssel → material |
main_unit_id | bigint | Ja | — | Fremdschlüssel → main unit |
unit_id | bigint | Ja | — | Fremdschlüssel → unit |
exchange_ratio | decimal(40, 8) | Ja | 0.00000000 | Domain-Feld exchangeRatio |
exchange_ratio_warehouse_unit | decimal(40, 8) | Ja | 0.00000000 | Domain-Feld warehouseExchangeRatio |
net_weight | double(20, 8) | Ja | 0.00000000 | Domain-Feld netWeight |
gross_weight | double(20, 8) | Ja | 0.00000000 | Domain-Feld grossWeight |
net_weight_unit_id | bigint | Ja | — | Fremdschlüssel → net weight unit |
gross_weight_unit_id | bigint | Ja | — | Fremdschlüssel → gross weight unit |
length | double(20, 8) | Ja | 0.00000000 | Domain-Feld length |
width | double(20, 8) | Ja | 0.00000000 | Domain-Feld width |
height | double(20, 8) | Ja | 0.00000000 | Domain-Feld height |
volume | double(20, 8) | Ja | 0.00000000 | Domain-Feld volume |
ean_code | varchar(30) | Ja | — | Domain-Feld eanCode |
attachment_id | bigint | Ja | — | Fremdschlüssel → attachment |
to_print | smallint | Ja | 0 | to print |
is_delete | tinyint(1) | Nein | 0 | Soft-Delete (0 = aktiv, 1 = gelöscht) |
is_smallest | smallint | Ja | 0 | Boolean: Smallest |
use_for_intrastat | smallint | Ja | 0 | use for intrastat |
last_updated | datetime | Ja | CURRENT_TIMESTAMP | Letzte Änderung |
created_by_id | bigint | Ja | — | Angelegt von (Benutzer-ID) |
updated_by_id | bigint | Ja | — | Geändert von (Benutzer-ID) |
date_created | datetime | Ja | — | Anlagezeitpunkt |
unique_name | varchar(20) | Ja | — | unique name |
is_customer_specific | smallint | Ja | 0 | Boolean: Customer Specific |
use_for_inv_base_ratio_calculation | smallint | Ja | 0 | use for inv base ratio calculation |
Fremdschlüssel
| Spalte(n) | Referenz |
|---|---|
material_id | material (id) |
unit_id | ltt_unit (id) |
tenant_id | company (tenant_id) |
main_unit_id | ltt_unit (id) |
net_weight_unit_id | ltt_unit (id) |
gross_weight_unit_id | ltt_unit (id) |
attachment_id | attachment (id) |