[IMP] account_commission: Settle based on payment date
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.
Hi @pedrobaeza, some modules you are maintaining are being modified, check this out!
@SirAionTech could the same goal be achieved through https://github.com/OCA/commission/pull/441 ?
@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 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 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:
- Create and confirm an invoice in January
- 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.
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.