commission icon indicating copy to clipboard operation
commission copied to clipboard

[IMP] account_commission: Settle based on payment date

Open SirAionTech opened this issue 1 year ago • 5 comments

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.

SirAionTech avatar Dec 05 '24 14:12 SirAionTech

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

OCA-git-bot avatar Dec 05 '24 14:12 OCA-git-bot

@SirAionTech could the same goal be achieved through https://github.com/OCA/commission/pull/441 ?

francesco-ooops avatar Dec 09 '24 14:12 francesco-ooops

@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:

  • Here the new logic is decided in the commission type, while in #441 it's set during each settlement.
  • Here you don't have to input the new date "Payment date up to" that is used #441, (I think I'd be confused about the interaction of the two date fields) because the existing date field is used to find the payments for the commissions that require it.

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 avatar Dec 09 '24 14:12 SirAionTech

@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"?

francesco-ooops avatar Dec 16 '24 11:12 francesco-ooops

@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 avatar Dec 18 '24 08:12 SirAionTech

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Apr 20 '25 12:04 github-actions[bot]