Custom javascript in template

I’m looking for a way to make certain things appear only on quotes (not on invoices) and to have other custom things appear/not appear.
I noticed there is javascript in the invoice_designs, but it doesn’t seem to be triggered in any way.
Does anyone know how exactly this part works. I can’t find any documentation about it.

Sorry, we don’t support using Javascript in a custom design.

I was actually trying to modify one of the existing templates, because they are close to what our customer needs. But I need to modify it through Javascript.
I updated the javascript in the invoice_designs table and purged the cache, but it doesn’t change anything.

Is there documentation on how this part of the system works ?

  • The designs are stored as JSON, not JavaScript.
  • You’d need to change the files in storage/templates/ and then run php artisan db:seed --class=UpdateSeeder to update the designs.
  • Here’s the JavaScript which creates the PDF, you’d need to run gulp after making any changes.

So there’s no way to make modifications beyond what’s in the JSON ? In that case the javascript column in the invoice_designs table is no longer being used ?

The pdfmake column in the invoice_designs table is used, the javascript column is not (we used to support two PDF rendering engines).