Darstellung
SalesItem
Tabelle: sales_item
Domain: SalesItem · 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 |
ref_sales_item_id | bigint | Ja | — | for example is referenced from Anfrage |
ref_prod_media_item_id | bigint | Ja | — | Fremdschlüssel → ref prod media item |
ref_set_item_id | bigint | Ja | — | Fremdschlüssel → ref set item |
merged_sales_item_id | bigint | Ja | — | Fremdschlüssel → merged sales item |
set_item_number | int | Ja | — | set item number |
is_set_head | smallint | Ja | 0 | Boolean: Set Head |
item_number | int | Ja | 0 | Domain-Feld itemNumber |
material_id | bigint | Ja | — | Fremdschlüssel → material |
short_description | varchar(300) | Ja | — | Domain-Feld shortDescription |
long_description | text collate utf8mb4_unicode_ci | Ja | — | Domain-Feld longDescription |
quantity | decimal(20, 8) | Ja | 0.00000000 | Menge |
delivery_date | datetime | Ja | — | delivery date |
requisition_date | datetime | Ja | — | Domain-Feld requisitionDate |
price | decimal(20, 8) | Ja | 0.00000000 | price |
gross_price | decimal(20, 8) | Ja | 0.00000000 | gross price |
price_unit | decimal(20, 2) | Ja | 0.00 | price unit |
unit_id | bigint | Ja | — | Fremdschlüssel → unit |
warehouse_id | bigint | Ja | — | Fremdschlüssel → warehouse |
stockplace_id | bigint | Ja | — | Fremdschlüssel → stockplace |
specialstock_id | bigint | Ja | — | Fremdschlüssel → specialstock |
batchnum | varchar(100) | Ja | — | Domain-Feld batchnum |
attribute_code | varchar(5000) collate utf8mb4_general_ci | Ja | — | Domain-Feld attributeCode |
variant_code | varchar(1000) | Ja | — | Domain-Feld variantCode |
customer_mat_code | varchar(100) | Ja | — | Domain-Feld customerMatCode |
customer_mat_name | varchar(200) | Ja | — | Domain-Feld customerMatName |
customer_mat_description | varchar(100) | Ja | — | remove this |
delivery_status | int | Ja | 0 | delivery status |
delivered_quantity | decimal(20, 8) | Ja | 0.00000000 | Domain-Feld deliveredQuantity |
invoice_status | int | Ja | 0 | invoice status |
invoiced_quantity | decimal(20, 8) | Ja | 0.00000000 | invoiced quantity |
drop_shipping_pur_item_id | bigint | Ja | — | if drop Shipping from sales module, here is the sales document item id |
vat_key_id | bigint | Ja | — | Fremdschlüssel → vat key |
total_amount | decimal(20, 8) | Ja | 0.00000000 | total amount |
total_discount_amount | decimal(20, 8) | Ja | 0.00000000 | total discount amount |
nett_amount | decimal(20, 8) | Ja | 0.00000000 | nett amount |
vat_amount | decimal(20, 8) | Ja | 0.00000000 | vat amount |
gross_amount | decimal(20, 8) | Ja | 0.00000000 | gross amount |
margin | decimal(20, 8) | Ja | 0.00000000 | margin |
cost_center_id | bigint | Ja | — | Fremdschlüssel → cost center |
internal_order_number | varchar(20) | Ja | — | Domain-Feld internalOrderNumber |
internal_order_item | varchar(20) | Ja | — | Domain-Feld internalOrderItem |
variant_config_id | bigint | Ja | — | Fremdschlüssel → variant config |
deposit_price | decimal(20, 8) | Ja | 0.00000000 | Domain-Feld depositPrice |
deposit_amount | decimal(20, 8) | Ja | 0.00000000 | Domain-Feld depositAmount |
is_deposit_return | smallint | Ja | 0 | Boolean: Deposit Return |
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) |
is_delete | smallint | Ja | 0 | Soft-Delete (0 = aktiv, 1 = gelöscht) |
sales_head_deleted | smallint | Nein | 0 | corresponding salesHead has been deleted |
item_code | varchar(100) | Ja | — | Domain-Feld itemCode |
item_unity | varchar(50) | Ja | — | Domain-Feld itemUnity |
position | int | Ja | 0 | Domain-Feld position |
open_quantity | decimal(20, 8) | Ja | 0.00000000 | open quantity |
volume | decimal(30, 8) | Ja | 0.00000000 | volume |
width | decimal(30, 8) | Ja | 0.00000000 | Domain-Feld width |
depth | decimal(30, 8) | Ja | 0.00000000 | Domain-Feld depth |
height | decimal(30, 8) | Ja | 0.00000000 | Domain-Feld height |
is_print_packlist | smallint | Ja | 0 | Kommissionierschein gedruckt |
print_packlist_date | datetime | Ja | — | Domain-Feld printPacklistDate |
print_packlist_by_id | bigint | Ja | — | Fremdschlüssel → print packlist by |
print_pickinglist_date | datetime | Ja | — | Domain-Feld printPickinglistDate |
close_ref_sales_item | smallint | Ja | 0 | close ref sales item |
is_third_party | smallint | Ja | 0 | Boolean: Third Party |
warehouse_unit_id | bigint | Ja | — | Fremdschlüssel → warehouse unit |
warehouse_unit_quantity | decimal(30, 8) | Ja | 0.00000000 | warehouse unit quantity |
warehouse_unit_exchange_ratio | double(40, 8) | Ja | 1.00000000 | warehouse unit exchange ratio |
material_price_unit | decimal(20, 8) | Ja | — | Domain-Feld materialPriceUnit |
pur_price | decimal(20, 8) | Ja | 0.00000000 | pur price |
average_price | decimal(20, 8) | Ja | 0.00000000 | average price |
last_pur_price | decimal(20, 8) | Ja | 0.00000000 | last pur price |
aquisition_price | decimal(20, 8) | Ja | 0.00000000 | aquisition price |
cost_price | decimal(20, 8) | Ja | 0.00000000 | cost price |
pur_value_for_pur_price | decimal(20, 8) | Ja | 0.00000000 | pur value for pur price |
pur_value_for_average_price | decimal(20, 8) | Ja | 0.00000000 | pur value for average price |
pur_value_for_last_pur_price | decimal(20, 8) | Ja | 0.00000000 | pur value for last pur price |
pur_value_for_aquisition_price | decimal(20, 8) | Ja | 0.00000000 | pur value for aquisition price |
pur_value_for_cost_price | decimal(20, 8) | Ja | 0.00000000 | pur value for cost price |
evaluation_type | smallint | Ja | — | Domain-Feld evaluationType |
availability_date | date | Ja | — | Domain-Feld availabilityDate |
head_proportion | decimal(20, 8) | Ja | 0.00000000 | head proportion |
head_proportion_discount_amount | decimal(20, 8) | Ja | 0.00000000 | head proportion discount amount |
net_weight | decimal(30, 8) | Ja | 0.00000000 | net weight |
net_weight_unit_id | bigint | Ja | — | Fremdschlüssel → net weight unit |
gross_weight | decimal(30, 8) | Ja | 0.00000000 | gross weight |
gross_weight_unit_id | bigint | Ja | — | Fremdschlüssel → gross weight unit |
set_item_quantity | double | Ja | 1 | set item quantity |
is_gross_price | smallint | Ja | 0 | Boolean: Gross Price |
material_variant_id | bigint | Ja | — | Fremdschlüssel → material variant |
discount_input | varchar(20) | Ja | — | Domain-Feld discountInput |
material_variant_gtin | varchar(20) | Ja | — | Domain-Feld materialVariantGtin |
is_virtual_material | smallint | Ja | 0 | Boolean: Virtual Material |
bom_item_number | int | Ja | — | Domain-Feld bomItemNumber |
commission_text | varchar(200) | Ja | — | Domain-Feld commissionText |
other_commission_text | varchar(100) | Ja | — | Domain-Feld otherCommissionText |
calculate_price | smallint | Ja | 1 | calculate price |
manufacturer_number | varchar(80) | Ja | — | Domain-Feld manufacturerNumber |
danger_id | bigint | Ja | — | Fremdschlüssel → danger |
hg_key | varchar(75) | Ja | — | hg key |
hg_ggl | int | Ja | — | hg ggl |
hg_points | int | Ja | — | hg points |
hg_weight | decimal(17) | Ja | — | hg weight |
hg_vp_quan | int | Ja | — | hg vp quan |
stat_mat_num | varchar(45) | Ja | — | stat mat num |
is_weight_controled | smallint | Ja | — | Boolean: Weight Controled |
is_in_pack_list | smallint | Ja | — | Boolean: In Pack List |
do_weight_check | smallint | Ja | — | do weight check |
input_weight | decimal(17) | Ja | — | input weight |
packet_no | varchar(48) | Ja | — | packet no |
variant_number | varchar(255) | Ja | — | variant number |
is_manually_closed | smallint | Ja | 0 | Boolean: Manually Closed |
is_order_ordered | smallint | Ja | 0 | Boolean: Order Ordered |
is_prod_ordered | smallint | Ja | 0 | Boolean: Prod Ordered |
is_pre_invoice_created | smallint | Ja | 0 | Boolean: Pre Invoice Created |
is_final_invoice_created | smallint | Ja | 0 | Boolean: Final Invoice Created |
is_oversold | smallint | Ja | 0 | Boolean: Oversold |
license_key | varchar(100) | Ja | — | Domain-Feld licenseKey |
is_set_item | smallint | Ja | 0 | Boolean: Set Item |
open_pick_quantity | decimal(20, 8) | Ja | 0.00000000 | open pick quantity |
edi_qty_code | varchar(3) | Ja | — | Domain-Feld ediQtyCode |
cod_value | decimal(20, 8) | Ja | — | Domain-Feld codValue |
determined_weight | decimal(20, 8) | Ja | — | determined weight |
hazmat_points | int | Ja | — | hazmat points |
hazmat_weight | decimal(20, 8) | Ja | — | hazmat weight |
hazmat_quantity | int | Ja | — | hazmat quantity |
is_weight_checked | smallint | Ja | 0 | Boolean: Weight Checked |
specified_weight | decimal(20, 8) | Ja | — | specified weight |
trans_number | int | Ja | — | Domain-Feld transNumber |
vendor_order_number | varchar(200) | Ja | — | Domain-Feld vendorOrderNumber |
currency_id | bigint | Ja | — | Fremdschlüssel → currency |
currency_price | decimal(20, 8) | Ja | — | currency price |
currency_exchange_rate | decimal(30, 20) | Ja | 0.00000000000000000000 | currency exchange rate |
discounted_amount | decimal(20, 8) | Ja | 0.00000000 | discounted amount |
profit | decimal(20, 8) | Ja | — | Domain-Feld profit |
is_price_set_manually | smallint | Ja | 0 | Boolean: Price Set Manually |
order_item_status_id | bigint | Ja | 1 | Fremdschlüssel → order item status |
pick_unit_id | bigint | Ja | — | Fremdschlüssel → pick unit |
pick_start_quantity | decimal(20, 8) | Ja | — | Domain-Feld pickStartQuantity |
pick_open_quantity | decimal(20, 8) | Ja | — | Domain-Feld pickOpenQuantity |
pick_start_date | datetime | Ja | — | Domain-Feld pickStartDate |
picked_by_id | bigint | Ja | — | Fremdschlüssel → picked by |
is_pick_skipped | smallint | Ja | 0 | Boolean: Pick Skipped |
service_user_id | bigint | Ja | — | Fremdschlüssel → service user |
fulfillment_center | varchar(50) | Ja | — | Domain-Feld fulfillmentCenter |
specialstock | varchar(20) | Ja | — | Domain-Feld specialstock |
stock_status | smallint | Ja | — | stock status |
distributor_id | bigint | Ja | — | Fremdschlüssel → distributor |
sub_customer_bundle | varchar(50) | Ja | — | Domain-Feld subCustomerBundle |
sub_customer_id | bigint | Ja | — | Fremdschlüssel → sub customer |
commission_number | varchar(50) | Ja | — | Domain-Feld commissionNumber |
import_unique_key | varchar(50) | Ja | — | Domain-Feld importUniqueKey |
reference_order_number | varchar(50) | Ja | — | reference order number |
order_sales_item_id | bigint | Ja | — | Fremdschlüssel → order sales item |
ref_commission_sales_item_id | bigint | Ja | — | Fremdschlüssel → ref commission sales item |
indirect_reference_id | bigint | Ja | — | Fremdschlüssel → indirect reference |
return_item_id | bigint | Ja | — | Domain-Feld returnItemId |
profit_center_id | bigint | Ja | — | Fremdschlüssel → profit center |
purchase_comment | text | Ja | — | Domain-Feld purchaseComment |
doc_item_number | varchar(50) | Ja | — | Domain-Feld docItemNumber |
is_split_order | smallint | Ja | 0 | Boolean: Split Order |
split_order_type | int | Ja | — | split order type |
target_warehouse_id | bigint | Ja | — | Fremdschlüssel → target warehouse |
is_set_amount_constant | smallint | Ja | 0 | Boolean: Set Amount Constant |
effort_based | smallint | Ja | 0 | effort based |
sales_bundle_head_id | bigint | Ja | — | Fremdschlüssel → sales bundle head |
sales_relation_id | bigint | Ja | — | Fremdschlüssel → sales relation |
vendor_portal_scale_grouping | varchar(100) | Ja | — | Domain-Feld vendorPortalScaleGrouping |
is_positive_rolled_up_balance | smallint | Ja | 0 | Domain-Feld isPositiveRolledUpBalance |
is_negative_rolled_up_balance | smallint | Ja | 0 | Domain-Feld isNegativeRolledUpBalance |
is_canceled | smallint | Ja | 0 | Boolean: Canceled |
is_sent_to_fulfillment | smallint | Ja | 0 | Boolean: Sent To Fulfillment |
sent_date_to_fulfillment | datetime | Ja | — | Domain-Feld sentDateToFulfillment |
picking_list_number | smallint | Ja | — | Domain-Feld pickingListNumber |
item_assignment_status_id | bigint | Ja | — | Fremdschlüssel → item assignment status |
custom_fields | longtext | Ja | — | Domain-Feld customFields |
crm_opportunity_item_id | bigint | Ja | — | Fremdschlüssel → crm opportunity item |
second_warehouse_unit_id | bigint | Ja | — | Fremdschlüssel → second warehouse unit |
second_warehouse_unit_quantity | decimal(20, 8) | Ja | 0.00000000 | second warehouse unit quantity |
sales_positions_type_id | bigint | Ja | — | Fremdschlüssel → sales positions type |
ref_open_quantity | decimal(20, 8) | Ja | — | ref open quantity |
project_id | bigint | Ja | — | Fremdschlüssel → project |
Fremdschlüssel
| Spalte(n) | Referenz |
|---|---|
crm_opportunity_item_id | crm_opportunity_item (id) |
danger_id | lt_danger (id) |
service_user_id | user (id) |
ref_commission_sales_item_id | sales_item (id) |
profit_center_id | ltt_profit_center (id) |
item_assignment_status_id | ltt_item_assignment (id) |
ref_prod_media_item_id | sales_item (id) |
target_warehouse_id | ltt_warehouse (id) |
distributor_id | customer (id) |
sales_head_id | sales_head (id) |
drop_shipping_pur_item_id | sales_item (id) |
vat_key_id | ltt_vat_key (id) |
cost_center_id | cost_center (id) |
variant_config_id | variant_config (id) |
unit_id | ltt_unit (id) |
warehouse_unit_id | ltt_unit (id) |
material_variant_id | material_variant (id) |
currency_id | ltt_currency (id) |
order_item_status_id | lt_order_status (id) |
indirect_reference_id | sales_item (id) |
return_item_id | return_item (id) |
sales_relation_id | sales_item (id) |
sales_bundle_head_id | ltt_sales_bundle_head (id) |
sales_positions_type_id | ltt_sales_positions_type (id) |
material_id | material (id) |
ref_sales_item_id | sales_item (id) |
ref_set_item_id | sales_item (id) |
variant_config_id | variant_config (id) |
warehouse_id | ltt_warehouse (id) |
stockplace_id | ltt_stockplace (id) |
specialstock_id | ltt_stockplace (id) |
order_sales_item_id | sales_item (id) |
picked_by_id | user (id) |
second_warehouse_unit_id | ltt_unit (id) |
sub_customer_id | customer (id) |
pick_unit_id | ltt_unit (id) |