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

[IMP] account_commission: Settle based on payment date #581

Draft
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

SirAionTech
Copy link

Add a new "Invoice Status" to settle based on the payment date.
For instance: if the invoice is in January but its payment is in February, the invoice will be settled in February's settlement.

Account fields can be used only from modules depending on `account`, like `account_commission`.
Methods used in `commission` should be defined in `commission` and just overridden in depending modules.
Allow to override the date used to insert a line into a settlement.
@OCA-git-bot
Copy link
Contributor

Hi @pedrobaeza,
some modules you are maintaining are being modified, check this out!

@francesco-ooops
Copy link
Contributor

@SirAionTech could the same goal be achieved through #441 ?

@SirAionTech
Copy link
Author

@SirAionTech could the same goal be achieved through #441 ?

Hi!
Unfortunately I didn't see that, and yes it looks like it is very similar to what happens in this PR with a few differences:

I can't say which approach is best, I guess we'll let reviewers and maintainers decide, but thanks for letting me know of that implementation

@SirAionTech SirAionTech force-pushed the 16.0-imp-account_commission-paid_date branch from cad3084 to ed9174b Compare December 10, 2024 10:26
@francesco-ooops
Copy link
Contributor

@SirAionTech I'm missing some context about what you're trying to achieve here:

The only change from option "Payment Based" is that commission is moved to a different settlement?

Can you add a functional example highlighting differences between "Payment based" and "Payment date based"?

@SirAionTech
Copy link
Author

@SirAionTech I'm missing some context about what you're trying to achieve here:

The only change from option "Payment Based" is that commission is moved to a different settlement?

Can you add a functional example highlighting differences between "Payment based" and "Payment date based"?

Sure:

  1. Create and confirm an invoice in January
  2. Pay the invoice in February

If the commission is "Payment date based" (added in this PR): the invoice will be settled in February's settlement.
If the commission is "Payment based": the invoice will be settled in January's settlement.

@SirAionTech SirAionTech marked this pull request as draft December 19, 2024 13:57
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

Successfully merging this pull request may close these issues.

3 participants