Billing module custom pdf

Discussion in 'Installation/Configuration' started by mccharlet, Jan 20, 2013.

  1. mccharlet

    mccharlet Member HowtoForge Supporter


    It's possible to custom the pdf invoice.

    Myclient is french and i want translate the invoice in french

    Best regards
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, the invoice templates can be completely customized. The templates are in the folder /usr/local/ispconfig/interface/web/billing/templates/pdf_invoice/. Ech template is a separate folder.

    Make a copy of the existing template that is the nearest match to your new invoice template by creating y copy of the folder. e.g.:

    cd /usr/local/ispconfig/interface/web/billing/templates/pdf_invoice/
    cp -prf default mytemplate

    The new template folder name shall only contain chars a-z, numbers 0-9 and underscores. Dont use whitepscaes or special chars or accents for the folder name.

    Then edit the template files in your new folder. The new invoice template is listed automatically in the company settings.
  3. diablo666

    diablo666 Active Member HowtoForge Supporter

    Hi there,
    i've tried to add a custom pdf invoice generator.

    I've copied the template default_no_vat in another direcotry, then i've selected the new template from the trop down menu in panel.

    When i'll try to create a new invoice, after adding objects and click on Save and Finalize nothing heappen.

    In the log i'll get the following error

    mod_fcgid: stderr: PHP Fatal error: Class 'PDFInvoice_custom' not found in /usr/local/ispconfig/interface/web/billing/invoice_edit.php on line 303, referer: https://www.domain.tld:8080/index.php

    Whats wrong?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look into the make_pdf_invoice file, the class name of the invoice class has to match with the name that you had choosen for your template.
  5. diablo666

    diablo666 Active Member HowtoForge Supporter

    Perfect, it works.

    Thank you.

Share This Page