Force existing Recurring Invoice Template Change

Hello, We have ran a test migration and one of the issues we are facing is that all imported recurring invoices have the default pdf template applied.

Any way to force it to change to the current template?
“Apply to all” from the settings does not work.


@david any thoughts?


We would need to expose this in the UI, i can handle this in the api in the design/set route.

1 Like


Ok, sounds good, Should we add recurring invoices as their own setting on Settings > Invoice Design?

@hillel yes please, i think that is the solution :slight_smile:

I think if they match the default invoice template, it should be fine. Who would want to have their recurring invoices look different from standard?
i.e. selecting “update all records” under invoice design in settings can update existing Invoices along with Recuring.

Works for me, @david thoughts?

1 Like

For those still looking to change it manually before it is implemented in UI, you should be able to do it directly via MYSQL.

Keep in mind this may kill your install!!! Make a Full backup, and then another!

  • Open up mysql sudo mysql
    then run the following:
  • USE ninjadb; #this should be the name of your invoice ninja database
  • SELECT number, design_id FROM recurring_invoices; #this will print out a table with the recurring invoice numbers and the design id’s assigned to them, note the design id in the invoices you want to change, and the design id in the invoices that already have the new template.
  • UPDATE recurring_invoices SET design_id = 12 WHERE design_id = 2; #the ‘12’ here is the new design id we want applied and 2 is the old id we want replaced, Your id’s will be different, you can get them in the previous step

You will then need to edit>save each Recurring Invoice you have the old template on.