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

Bug: In customer order when changing VAT for all items the change is not executed if VAT = 0% #16486

Closed
dvdwalker opened this issue Feb 28, 2021 · 2 comments
Labels
Bug This is a bug (something does not work as expected) Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open

Comments

@dvdwalker
Copy link
Contributor

Bug

In customer order when changing VAT for all items the change is not executed if VAT = 0%

Environment

  • Version: 13.0.1
  • OS: Windows
  • Web server: localhost
  • PHP: 7.3.25
  • Database: MySQL or MariaDB 5.5.5-10.4.17-MariaDB
  • URL(s): /commande/card.php?id=2

Expected and actual behavior

In customer order when changing VAT for all items it runs OK for any VAT except VAT= 0%. In that case the change is not executed.

@dvdwalker dvdwalker added the Bug This is a bug (something does not work as expected) label Feb 28, 2021
@dvdwalker
Copy link
Contributor Author

The reason the updated is not executed is realted to an IF clause that evaluates the value of input "vatforalllines" that contains the numerical value for new VAT. When VAT is 0% this is interpreted as FALSE so the update is not fired.

There are 3 conditions on the mentioned IF clause:
$action == 'addline' && GETPOST('submitforalllines', 'alpha') && GETPOST('vatforalllines', 'alpha')

If fix #16485 (related to same portion of the code) is applied then "submitforalllines" would only exist when chaging VAT for all items and will allow to remove GETPOST('vatforalllines', 'alpha') from the IF clause.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).

@github-actions github-actions bot added the Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open label Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected) Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open
Projects
None yet
Development

No branches or pull requests

1 participant