magento / devdocs

Magento Developer Documentation
https://devdocs.magento.com
Open Software License 3.0
673 stars 1.77k forks source link

Clear out confusions about prices in Magento 2 sales order items #9541

Open ioweb-gr opened 1 year ago

ioweb-gr commented 1 year ago

Is there an existing issue for this?

What's missing?

There seems to be some confusion about sales order items and what each price stored in the database means. You can check stackoverflow and you'll see literally dozens of questions regarding this.

Would it be possible to add a clarification about them?

base_discount_amount
base_discount_tax_compensation_amount
base_original_price
base_price
base_price_incl_tax
base_row_total
base_row_total_incl_tax
base_tax_amount
base_tax_before_discount
discount_amount
discount_percent
discount_tax_compensation_amount
original_price
row_total
row_total_incl_tax
tax_amount
tax_before_discount
tax_percent

E.g.

However there's no explanation for example what the original price is, what the discount_tax_compensation_amount is or whether the price includes discount amounts or not.

There is no hint of documentation in the classes either to go by.

\Magento\Sales\Api\Data\OrderItemInterface

m2-assistant[bot] commented 1 year ago

Hi @ioweb-gr. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this