Darstellung
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 = :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) |
sales_head_id | bigint | Ja | — | Fremdschlüssel → sales head |
discount_type_id | bigint | Ja | — | Fremdschlüssel → discount type |
discount_rate | decimal(20, 8) | Ja | 0.00000000 | discount rate |
discount_amount | decimal(20, 8) | Ja | 0.00000000 | discount amount |
total_head_discount_amount | decimal(20, 8) | Ja | 0.00000000 | total head discount amount |
is_cash_discount | smallint | Ja | 0 | Boolean: Cash Discount |
date_created | datetime | Ja | — | Anlagezeitpunkt |
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) |
order_pos | int | Ja | — | order pos |
is_rounding | smallint | Ja | — | Boolean: Rounding |
is_changeable | smallint | Ja | — | Boolean: Changeable |
is_copied | smallint | Ja | 0 | Boolean: Copied |
amount_or_percentage | smallint | Ja | — | Domain-Feld amountOrPercentage |
base_amount_type | smallint | Ja | — | base amount type |
is_shipping_cost | smallint | Ja | — | Boolean: Shipping Cost |
is_klarna_invoice_cost | smallint | Ja | — | Boolean: Klarna Invoice Cost |
voucher_code | varchar(150) | Ja | — | Domain-Feld voucherCode |
Fremdschlüssel
| Spalte(n) | Referenz |
|---|---|
discount_type_id | ltt_discount_type (id) |
sales_head_id | sales_head (id) |