MageSmith

🛒 Magento_Sales · engine innodb

sales_invoice

Sales Flat Invoice

Neighbourhood (1-hop foreign-key graph — showing 4 of 4)

flowchart LR
  c["sales_invoice"]:::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_invoice_comment"]
  click n2 "/schema/table/sales_invoice_comment"
  c -- parent_id --> n2
  n3["sales_invoice_item"]
  click n3 "/schema/table/sales_invoice_item"
  c -- parent_id --> n3
  click c "/schema/table/sales_invoice"
  classDef center fill:#eef2ff,stroke:#6366f1,color:#3730a3,stroke-width:1.5px

Click a node to jump to that table.

Columns (47)

NameTypeNullDefaultComment
entity_id PKint unsignednoEntity ID
store_id smallint unsignedyesStore ID
base_grand_total decimal yesBase Grand Total
shipping_tax_amount decimal yesShipping Tax Amount
tax_amount decimal yesTax Amount
base_tax_amount decimal yesBase Tax Amount
store_to_order_rate decimal yesStore To Order Rate
base_shipping_tax_amount decimal yesBase Shipping Tax Amount
base_discount_amount decimal yesBase Discount Amount
base_to_order_rate decimal yesBase To Order Rate
grand_total decimal yesGrand Total
shipping_amount decimal yesShipping Amount
subtotal_incl_tax decimal yesSubtotal Incl Tax
base_subtotal_incl_tax decimal yesBase Subtotal Incl Tax
store_to_base_rate decimal yesStore To Base Rate
base_shipping_amount decimal yesBase Shipping Amount
total_qty decimal yesTotal Qty
base_to_global_rate decimal yesBase To Global Rate
subtotal decimal yesSubtotal
base_subtotal decimal yesBase Subtotal
discount_amount decimal yesDiscount Amount
billing_address_id int yesBilling Address ID
is_used_for_refund smallint unsignedyesIs Used For Refund
order_id int unsignednoOrder ID
email_sent smallint yesEmail Sent
send_email smallint unsignedyesSend Email
can_void_flag smallint unsignedyesCan Void Flag
state int yesState
shipping_address_id int yesShipping Address ID
store_currency_code varchar(3) yesStore Currency Code
transaction_id varchar(255) yesTransaction ID
order_currency_code varchar(3) yesOrder Currency Code
base_currency_code varchar(3) yesBase Currency Code
global_currency_code varchar(3) yesGlobal Currency Code
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
base_total_refunded decimal yesBase Total Refunded
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_INVOICE_INCREMENT_ID_STORE_ID (increment_id, store_id)

Indexes

  • SALES_INVOICE_STORE_ID (store_id) btree
  • SALES_INVOICE_GRAND_TOTAL (grand_total) btree
  • SALES_INVOICE_ORDER_ID (order_id) btree
  • SALES_INVOICE_STATE (state) btree
  • SALES_INVOICE_CREATED_AT (created_at) btree
  • SALES_INVOICE_UPDATED_AT (updated_at) btree
  • SALES_INVOICE_SEND_EMAIL (send_email) btree
  • SALES_INVOICE_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)