Skip to content

SalesHeadDiscount ​

Tabelle: sales_head_discount
Domain: SalesHeadDiscount · com.reybex.domain.wws.sales
Modul: SAL

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_idbigintJa—Mandanten-ID (Multi-Tenant – in Abfragen fast immer filtern) (Domain: tenantId)
sales_head_idbigintJa—Fremdschlüssel → sales head
discount_type_idbigintJa—Fremdschlüssel → discount type
discount_ratedecimal(20, 8)Ja0.00000000discount rate
discount_amountdecimal(20, 8)Ja0.00000000discount amount
total_head_discount_amountdecimal(20, 8)Ja0.00000000total head discount amount
is_cash_discountsmallintJa0Boolean: Cash Discount
date_createddatetimeJa—Anlagezeitpunkt
last_updateddatetimeJaCURRENT_TIMESTAMPLetzte Änderung
created_by_idbigintJa—Angelegt von (Benutzer-ID)
updated_by_idbigintJa—Geändert von (Benutzer-ID)
order_posintJa—order pos
is_roundingsmallintJa—Boolean: Rounding
is_changeablesmallintJa—Boolean: Changeable
is_copiedsmallintJa0Boolean: Copied
amount_or_percentagesmallintJa—Domain-Feld amountOrPercentage
base_amount_typesmallintJa—base amount type
is_shipping_costsmallintJa—Boolean: Shipping Cost
is_klarna_invoice_costsmallintJa—Boolean: Klarna Invoice Cost
voucher_codevarchar(150)Ja—Domain-Feld voucherCode

Fremdschlüssel ​

Spalte(n)Referenz
discount_type_idltt_discount_type (id)
sales_head_idsales_head (id)

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