Skip to content

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 = :mandant setzen (Spalte ggf. TenantId in ä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.

→ Beispiel-SQLs (BAS23)

Primärschlüssel ​

  • id

Spalten ​

SpalteSQL-TypNULLDefaultBeschreibung
idbigint auto_incrementJa—Primärschlüssel (Domain: id)
tenant_idbigintNein—Mandanten-ID (Multi-Tenant – in Abfragen fast immer filtern) (Domain: tenantId)
material_idbigintNein—Fremdschlüssel → material
verification_item_idbigintNein—Fremdschlüssel → verification item
calculation_datedatetimeNein—Domain-Feld calculationDate
calculation_quantitydoubleJa—Domain-Feld calculationQuantity
calculation_pricedoubleNein—Domain-Feld calculationPrice
calculation_unit_idbigintNein—Fremdschlüssel → calculation unit
calculation_price_unitdoubleNein—Domain-Feld calculationPriceUnit
calculation_currency_idbigintNein—Fremdschlüssel → calculation currency
calculation_exchange_ratedecimal(20, 8)Nein—Domain-Feld calculationExchangeRate
calculation_price_after_exchange_ratedoubleNein—Domain-Feld calculationPriceAfterExchangeRate
old_average_pricedoubleNein—Domain-Feld oldAveragePrice
old_stockdoubleNein—Domain-Feld oldStock
new_average_pricedoubleNein—Domain-Feld newAveragePrice
new_stockdoubleNein—Domain-Feld newStock
is_manuallytinyint(1)Nein—Domain-Feld isManually
created_by_idbigintNein—Angelegt von (Benutzer-ID)
date_createddatetimeNein—Anlagezeitpunkt
updated_by_idbigintJa—Geändert von (Benutzer-ID)
last_updateddatetimeJaCURRENT_TIMESTAMPLetzte Änderung
unique_namevarchar(20)Ja—unique name
is_customer_specificsmallintJa0Boolean: Customer Specific
old_freight_costdouble(20, 8)Ja—Domain-Feld oldFreightCost
new_freight_costdouble(20, 8)Ja—Domain-Feld newFreightCost
old_customs_costdouble(20, 8)Ja—Domain-Feld oldCustomsCost
new_customs_costdouble(20, 8)Ja—Domain-Feld newCustomsCost

Fremdschlüssel ​

Spalte(n)Referenz
material_idmaterial (id)
verification_item_idverification_item (id)
calculation_unit_idltt_unit (id)
calculation_currency_idltt_currency (id)

Nur für reybex-Partner. Nicht für Endkunden bestimmt.