Skip to content
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

Admin order creation fails when "Include Tax In Order Total" set to yes #2675

Closed
erikhansen opened this issue Dec 10, 2015 · 1 comment
Closed
Assignees

Comments

@erikhansen
Copy link
Contributor

Steps to reproduce issue:

  1. Install Magento CE 2.0.0 with sample data.
  2. Ensure that developer mode is turned on.
  3. Go to Stores > Configuration > SALES > Tax > Shopping Cart Display Settings and change the "Include Tax In Order Total" value to "Yes".
  4. Go to Sales > Orders > Create New Order
  5. You will see this error: Notice: Undefined index: tax in vendor/magento/module-sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php on line 77 Full backtrace available here

This problem occurs because the \Magento\Tax\Model\Sales\Total\Quote\Tax::collect collector only returns a value if there are items in a quote. And since the quote won't contain any items, the "tax" collector isn't present in the totals array. I'll be submitting a PR to fix this shortly.

erikhansen pushed a commit to erikhansen/magento2 that referenced this issue Dec 10, 2015
…ation page

- When admin order page is loaded with "Shopping Cart Display Settings >
  Include Tax In Order Total" is set to yes, page will error due to
  missing "tax" key
@okorshenko okorshenko added the CS label Dec 15, 2015
@tang-yu
Copy link
Contributor

tang-yu commented Jan 13, 2016

This issue has been fixed in internal ticket MAGETWO-46808. Thanks for submitting the defect.

@tang-yu tang-yu closed this as completed Jan 13, 2016
magento-team pushed a commit that referenced this issue Jan 13, 2016
…In Order Total" set to yes #2675

 -- fixed undefined tax index when on backend order page when tax_amount is 0
magento-team pushed a commit that referenced this issue Jan 13, 2016
…In Order Total" set to yes #2675

    - Fixed the case when applied_taxes is in serialized form
magento-team pushed a commit that referenced this issue Jan 13, 2016
…In Order Total" set to yes #2675

    - Fix another case where serialized form is expected
magento-team pushed a commit that referenced this issue Jan 13, 2016
…In Order Total" set to yes #2675

    - Fix unit test failure
okorshenko pushed a commit that referenced this issue Jan 20, 2016
…In Order Total" set to yes #2675

 -- fixed undefined tax index when on backend order page when tax_amount is 0
okorshenko pushed a commit that referenced this issue Jan 20, 2016
…In Order Total" set to yes #2675

    - Fixed the case when applied_taxes is in serialized form
okorshenko pushed a commit that referenced this issue Jan 20, 2016
…In Order Total" set to yes #2675

    - Fix another case where serialized form is expected
okorshenko pushed a commit that referenced this issue Jan 20, 2016
…In Order Total" set to yes #2675

    - Fix unit test failure
okorshenko pushed a commit that referenced this issue Jan 20, 2016
magento-team pushed a commit that referenced this issue Jun 27, 2018
…amespace-agnostic-2.2.5

[borg] MAGETWO-92468: Make PR testsuite namespace-agnostic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants