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

Positive commission for credit notes #555

Open
arielbarreiros96 opened this issue Aug 19, 2024 · 1 comment
Open

Positive commission for credit notes #555

arielbarreiros96 opened this issue Aug 19, 2024 · 1 comment
Labels

Comments

@arielbarreiros96
Copy link

Module

sale_commission_product_criteria

Describe the bug

When Product Criteria is used as commission type, the settlement of credit notes may create commissions with positive amount.

To Reproduce

Affected versions: at least 14.0 and 16.0

Steps to reproduce the behavior:

  1. Create a Commission Type, and under type select Product Criteria
  2. Under rules, create a Rule that applies for a Product Category or Product
  3. Create a invoice with an agent that use that particular commission type and a product that meets the previously created rule.
  4. Add a credit note to the very same invoice
  5. Create a settlement for the agent involved (you may have to register payment, check on Commission Type invoice status)
    image

Expected behavior
The settlement should contain a line of commission with a positive amount, related to the invoice. The settlement should contain another line with the same amount, but in this case, as a negative amount, related to the credit note. In reality, there are 2 positive lines with the same amount.

Additional context
Tested on v14 CE and v16 CE

@arielbarreiros96
Copy link
Author

arielbarreiros96 commented Aug 22, 2024

Hello @ilyasProgrammer I have created a PR to solve this issue with sale_commission_product_criteria in 16.0 I´ve seen that you are using basically the same _compute_amount method in your sale_commission_product_criteria_domain, maybe this fix can help to you as well. It basically takes into account the credit notes as well, since at the moment credit notes are creating positive commissions.

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

No branches or pull requests

1 participant