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

Update CartRuleLoader.php #3697

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

sebastianlenz
Copy link
Contributor

1. Why is this change necessary?

We need this because with our plugin LenzPlatformCreditManagement, the value of the position price can be lower than 0.
If this fix is not applied the tax state is wrongly set to "gross" instead of "tax-free" in some cases.

2. What does this change do, exactly?

3. Describe each step to reproduce the issue or behaviour.

4. Please link to the relevant issues (if any).

5. Checklist

  • I have rebased my changes to remove merge conflicts
  • I have written tests and verified that they fail without my change
  • I have created a changelog file with all necessary information about my changes
  • I have written or adjusted the documentation according to my changes
  • This change has comments for package types, values, functions, and non-obvious lines of code
  • I have read the contribution requirements and fulfil them.

Copy link

github-actions bot commented May 3, 2024

Warnings
⚠️ The Pull Request doesn't contain any changelog file

@AydinHassan
Copy link
Contributor

Thanks for your contribution @sebastianlenz but we cannot accept this because it is a valid scenario for the value to be less than 0. You will have to fix this somehow in your plugin.

@sebastianlenz
Copy link
Contributor Author

sebastianlenz commented May 7, 2024

Yes @AydinHassan it is a valid scenario to be less than zero, but you do not allow any change to this behavior here. If the cart value is smaller than zero, the tax status is always "gross". This is not correct!

@AydinHassan
Copy link
Contributor

Hi @sebastianlenz then should we rather fix the tax status detection incase of negative values? Can you please also provide a test case?

@mstegmeyer
Copy link
Contributor

Hey @sebastianlenz I don't really understand the issue. "tax-free" is applied, if some minimum amount is reached, be it based on the currency, the country or the customer. These values always have to be >0. Therefore, with value 0.0, you should never be able to achieve "tax-free", but rather "gross"/"net". The behavior should not be different for negative valued position prices.
Or am I understanding something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants