-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customer Sales Order Item GraphQL Resolver does not honor tax configuration #36946
Comments
Hi @pmzandbergen. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @engcom-Lima. Thank you for working on this issue.
|
@magento give me 2.4-develop instance |
Hi @engcom-Lima. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Lima, here is your Magento Instance: https://e0d2798a296a9d90a8906901b07a1b3f.instances.magento-community.engineering |
✔️ Issue confirmed Issue got reproduced in 2.4-develop branch. Description: Customer sales order item in GraphQl is not displaying tax properly. Pre-requisite: Steps to reproduce: Expected result: The price ( Actual result: The price (product_sale_price) is excluding tax with tax/sales_display/price set. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-8104 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Lima. Thank you for verifying the issue. |
@magento I am working on this |
Fix for issue magento#36946 (Jira ticket AC-8104): Include Tax for Product Price if `\Magento\Tax\Helper\Data::displaySalesPriceInclTax(...)` returns `true`
PR #36966 is ready for review |
Internal team is working on it. |
@glo23503 should I still add a unit test for the PR or is it already created by the internal team? |
Our internal team is working on the test coverage. |
Preconditions and environment
2.4-develop
branch)Steps to reproduce
Current result:
The field
product_sale_price
should include tax, since all display settings (especiallytax/sales_display/price
) include tax.Expected result
The price (
product_sale_price
) should include tax withtax/sales_display/price
set.Actual result
The price (
product_sale_price
) is excluding tax withtax/sales_display/price
set.Additional information
The cause can be found in the DataProvider:
https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/SalesGraphQl/Model/OrderItem/DataProvider.php#L142
It does not honor the configuration, it simply uses
$orderItem->getPrice()
. Depending on the setting it should be either using$orderItem->getPriceInclTax()
or$orderItem->getPrice()
.If required separate fields should be used, e.g.:
product_sale_price
(the display price as configured; existing)product_sale_price_excl_tax
(the price excluding tax; new)product_sale_price_incl_tax
(the price including tax; new)However these additional fields should not be necessary in the current (known) use cases.
Note: If I have time I'll submit a PR.
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: