docker-invoiceplane icon indicating copy to clipboard operation
docker-invoiceplane copied to clipboard

Customizing templates

Open j3k0 opened this issue 9 years ago • 3 comments

Is it possible to customize templates using this docker image? I'm new to Invoiceplane, but it seems like the templates are not in the persisted volume, so it might not be possible?

j3k0 avatar Aug 29 '16 09:08 j3k0

@j3k0 I have not tried customising templates. If you have relavant information/examples please share. I would like to support it.

sameersbn avatar Oct 23 '17 15:10 sameersbn

Sure. Taken from https://wiki.invoiceplane.com/en/1.0/templates/using-templates

All PDF templates can be found in the following folders of the application:

/application/views/invoice_templates/pdf for invoices /application/views/quote_templates/pdf for quotes

You can select which templates should be used in the system settings for either Invoices or Quotes. You can find the select boxes below the headline "Templates". Simply select the template, save and the template will be used for the next quote or invoice.

It's not mentioned in the doc, but web templates (for "guest web preview") are in application/views/invoice_templates/public/ (resp. quote)

Those directories can't be "simple" volumes, as they initially contain the default templates:

/var/www/invoiceplane# ls application/views/invoice_templates/pdf/
InvoicePlane - overdue.php  InvoicePlane - paid.php  InvoicePlane.php

So maybe the approach is to make a volume at a different location, like /templates and link files from the volume /templates/invoice/pdf to /var/www/invoiceplane/application/views/invoice_templates/pdf (and family) in the entrypoint.sh script.

The drawback being that adding a new template will require to restart the container...

j3k0 avatar Oct 23 '17 19:10 j3k0

I've got the same problem. This issues makes the dockerfile more or less unusable, there is little point in using invoiceplane if its not possible to customize templates.

I tried to --volume /var/www/invoiceplane/application/views/ to a folder on my host but I get php errors saying "file not found" when using invoiceplane. Not sure why it is not working - would be glad for any ideas on how to approach this

MilanDeruelle avatar Apr 28 '18 14:04 MilanDeruelle