🛒 Magento_Sales · engine innodb
sales_creditmemo
Sales Flat Creditmemo
Neighbourhood (1-hop foreign-key graph — showing 4 of 4)
flowchart LR c["sales_creditmemo"]:::center n0["sales_order"] click n0 "/schema/table/sales_order" n0 -- order_id --> c n1["store"] click n1 "/schema/table/store" n1 -- store_id --> c n2["sales_creditmemo_comment"] click n2 "/schema/table/sales_creditmemo_comment" c -- parent_id --> n2 n3["sales_creditmemo_item"] click n3 "/schema/table/sales_creditmemo_item" c -- parent_id --> n3 click c "/schema/table/sales_creditmemo" classDef center fill:#eef2ff,stroke:#6366f1,color:#3730a3,stroke-width:1.5px
Click a node to jump to that table.
Related tables (4)
Columns (51)
| Name | Type | Null | Default | Comment |
|---|---|---|---|---|
| entity_id PK | int unsigned | no | Entity ID | |
| store_id | smallint unsigned | yes | Store ID | |
| adjustment_positive | decimal | yes | Adjustment Positive | |
| base_shipping_tax_amount | decimal | yes | Base Shipping Tax Amount | |
| store_to_order_rate | decimal | yes | Store To Order Rate | |
| base_discount_amount | decimal | yes | Base Discount Amount | |
| base_to_order_rate | decimal | yes | Base To Order Rate | |
| grand_total | decimal | yes | Grand Total | |
| base_adjustment_negative | decimal | yes | Base Adjustment Negative | |
| base_subtotal_incl_tax | decimal | yes | Base Subtotal Incl Tax | |
| shipping_amount | decimal | yes | Shipping Amount | |
| subtotal_incl_tax | decimal | yes | Subtotal Incl Tax | |
| adjustment_negative | decimal | yes | Adjustment Negative | |
| base_shipping_amount | decimal | yes | Base Shipping Amount | |
| store_to_base_rate | decimal | yes | Store To Base Rate | |
| base_to_global_rate | decimal | yes | Base To Global Rate | |
| base_adjustment | decimal | yes | Base Adjustment | |
| base_subtotal | decimal | yes | Base Subtotal | |
| discount_amount | decimal | yes | Discount Amount | |
| subtotal | decimal | yes | Subtotal | |
| adjustment | decimal | yes | Adjustment | |
| base_grand_total | decimal | yes | Base Grand Total | |
| base_adjustment_positive | decimal | yes | Base Adjustment Positive | |
| base_tax_amount | decimal | yes | Base Tax Amount | |
| shipping_tax_amount | decimal | yes | Shipping Tax Amount | |
| tax_amount | decimal | yes | Tax Amount | |
| order_id | int unsigned | no | Order ID | |
| email_sent | smallint | yes | Email Sent | |
| send_email | smallint unsigned | yes | Send Email | |
| creditmemo_status | int | yes | Creditmemo Status | |
| state | int | yes | State | |
| shipping_address_id | int | yes | Shipping Address ID | |
| billing_address_id | int | yes | Billing Address ID | |
| invoice_id | int | yes | Invoice ID | |
| store_currency_code | varchar(3) | yes | Store Currency Code | |
| order_currency_code | varchar(3) | yes | Order Currency Code | |
| base_currency_code | varchar(3) | yes | Base Currency Code | |
| global_currency_code | varchar(3) | yes | Global Currency Code | |
| transaction_id | varchar(255) | yes | Transaction ID | |
| increment_id | varchar(50) | yes | Increment ID | |
| created_at | timestamp | no | CURRENT_TIMESTAMP | Created At |
| updated_at | timestamp | no | CURRENT_TIMESTAMP | Updated At |
| discount_tax_compensation_amount | decimal | yes | Discount Tax Compensation Amount | |
| base_discount_tax_compensation_amount | decimal | yes | Base Discount Tax Compensation Amount | |
| shipping_discount_tax_compensation_amount | decimal | yes | Shipping Discount Tax Compensation Amount | |
| base_shipping_discount_tax_compensation_amnt | decimal | yes | Base Shipping Discount Tax Compensation Amount | |
| shipping_incl_tax | decimal | yes | Shipping Incl Tax | |
| base_shipping_incl_tax | decimal | yes | Base Shipping Incl Tax | |
| discount_description | varchar(255) | yes | Discount Description | |
| customer_note | text | yes | Customer Note | |
| customer_note_notify | smallint unsigned | yes | Customer Note Notify |
Keys & indexes
Primary key: entity_id
Unique
- SALES_CREDITMEMO_INCREMENT_ID_STORE_ID (increment_id, store_id)
Indexes
- SALES_CREDITMEMO_STORE_ID (store_id) btree
- SALES_CREDITMEMO_ORDER_ID (order_id) btree
- SALES_CREDITMEMO_CREDITMEMO_STATUS (creditmemo_status) btree
- SALES_CREDITMEMO_STATE (state) btree
- SALES_CREDITMEMO_CREATED_AT (created_at) btree
- SALES_CREDITMEMO_UPDATED_AT (updated_at) btree
- SALES_CREDITMEMO_SEND_EMAIL (send_email) btree
- SALES_CREDITMEMO_EMAIL_SENT (email_sent) btree
References (2)
- order_id → sales_order .entity_id (on delete CASCADE)
- store_id → store .store_id (on delete SET NULL)
Referenced by (2)
- sales_creditmemo_comment .parent_id → .entity_id (on delete CASCADE)
- sales_creditmemo_item .parent_id → .entity_id (on delete CASCADE)