MageSmith

🛒 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.

Columns (51)

NameTypeNullDefaultComment
entity_id PKint unsignednoEntity ID
store_id smallint unsignedyesStore ID
adjustment_positive decimal yesAdjustment Positive
base_shipping_tax_amount decimal yesBase Shipping Tax Amount
store_to_order_rate decimal yesStore To Order Rate
base_discount_amount decimal yesBase Discount Amount
base_to_order_rate decimal yesBase To Order Rate
grand_total decimal yesGrand Total
base_adjustment_negative decimal yesBase Adjustment Negative
base_subtotal_incl_tax decimal yesBase Subtotal Incl Tax
shipping_amount decimal yesShipping Amount
subtotal_incl_tax decimal yesSubtotal Incl Tax
adjustment_negative decimal yesAdjustment Negative
base_shipping_amount decimal yesBase Shipping Amount
store_to_base_rate decimal yesStore To Base Rate
base_to_global_rate decimal yesBase To Global Rate
base_adjustment decimal yesBase Adjustment
base_subtotal decimal yesBase Subtotal
discount_amount decimal yesDiscount Amount
subtotal decimal yesSubtotal
adjustment decimal yesAdjustment
base_grand_total decimal yesBase Grand Total
base_adjustment_positive decimal yesBase Adjustment Positive
base_tax_amount decimal yesBase Tax Amount
shipping_tax_amount decimal yesShipping Tax Amount
tax_amount decimal yesTax Amount
order_id int unsignednoOrder ID
email_sent smallint yesEmail Sent
send_email smallint unsignedyesSend Email
creditmemo_status int yesCreditmemo Status
state int yesState
shipping_address_id int yesShipping Address ID
billing_address_id int yesBilling Address ID
invoice_id int yesInvoice ID
store_currency_code varchar(3) yesStore Currency Code
order_currency_code varchar(3) yesOrder Currency Code
base_currency_code varchar(3) yesBase Currency Code
global_currency_code varchar(3) yesGlobal Currency Code
transaction_id varchar(255) yesTransaction ID
increment_id varchar(50) yesIncrement ID
created_at timestamp noCURRENT_TIMESTAMPCreated At
updated_at timestamp noCURRENT_TIMESTAMPUpdated At
discount_tax_compensation_amount decimal yesDiscount Tax Compensation Amount
base_discount_tax_compensation_amount decimal yesBase Discount Tax Compensation Amount
shipping_discount_tax_compensation_amount decimal yesShipping Discount Tax Compensation Amount
base_shipping_discount_tax_compensation_amnt decimal yesBase Shipping Discount Tax Compensation Amount
shipping_incl_tax decimal yesShipping Incl Tax
base_shipping_incl_tax decimal yesBase Shipping Incl Tax
discount_description varchar(255) yesDiscount Description
customer_note text yesCustomer Note
customer_note_notify smallint unsignedyesCustomer 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)