Generate invoice before due date

In the subscription module, is there a way to generate invoices before the due date?

Say generate invoice 15 days before due date.

I don’t think so. However you can write a function and then use the scheduler to repeat say every day at 0001 hours. You can pass all the orders where current date is 15 days away from the due date. I’m not sure but the already available functions of creating sales invoice from sales order / purchase invoice from order could be re-used here. But then writing one from scratch won’t be too difficult. This is a rough idea i’m sure more conditions and edge cases will have to be taken care of.

1 Like