Applying Outstanding Credits

Our customers only get 1 monthly invoice. Every so often we give them a credit. The amount of the credit may vary. In some cases the customer may receive a credit for less than their monthly invoice. Sometimes for multiple months of invoices.

Does Invoice Ninja automatically apply outstanding credits to new invoices generated by a recurring profile?

If the answer is “no” then how do I go about “rigging” a solution?

I was thinking of inserting some spaghetti code here:

The problem is this line seems to create the invoice AND bill the card:
$invoice = $this->invoiceRepo->createRecurringInvoice($recurInvoice);

Is that correct?

Thank you to anyone who can assist me. I am also happy to pay for support if this is not the correct forum.

This isn’t supported automatically.

Inside createRecurringInvoice we only bill the card if auto-bill is enabled.

I did confirm my own answer.

It looks like function createRecurringInvoice is called in:

I would still like to confirm Invoice Ninja does not automatically apply credits before I have to start contaminating this beautiful source code.

Thank you Hillen. I guess this is where I have to start ruining this beautiful piece of art. :frowning: