Question about templates for PDF output

SimpleInvoices Group Forum Forums Fearless359 SimpleInvoices Discussion Group Question about templates for PDF output

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2187
    marcnyc
    Participant

    Hello, I have recently updated my SI installation to the latest version 2023.0.7 and I have a question about how templates are now handled and about the PDF output.

    In my previous 2020 install I had a file in:
    custom/default_template/invoices/manage.tpl
    but in the new 2023 version I don’t see a manage.tpl file any longer. What file does now do what the manage.tpl file used to do?

    Also if I wanted to make all the fonts smaller in the PDF output, which file would I have to act on to change the styling of the PDF?

    Thank you so much

    #2189
    RRowley
    Participant

    The files in the custom directory are not part of the library. They are ones you develop. Try copying the invoices/manager.tpl from your backed up, previous version to the custom/default_template directory. See if that doesn’t resolve your issue.

    For pdf characteristics such as font size, use the exportPdf… values in the config/custom.config.ini file.

    #2193
    marcnyc
    Participant

    Moving the manage.tpl file from the old install to custom/default_template didn’t work…
    Basically, what I am trying to do is change what values are shown inside the table that is shown in the main MONEY>INVOICES screen (at the URL: /index.php?module=invoices&view=manage)
    What part of the template file generates this table so I can change what is show in that table? Or is there another way to change what is shown?

    As for the PDF, thanks for telling me where the font settings are.

    I have one last PDF question: my name is misspelled in the PDF invoice at the top right corner and I can’t find where the settings are for that… I’ve looked in all the PEOPLE menus and SETTINGS menus but I can’t see where the misspelled name is, where would that be saved?

    Thanks

    #2197
    marcnyc
    Participant

    just bumping this up to make sure it is seen…

    #2198
    RRowley
    Participant

    Check out the Extensions menu option. What you want to do is set up an extension for the templates/invoices/manage.tpl file. If the data you want to display is not in the data.json file that feeds the DataTables, then you will need to add the module/invoices/manage.php file to the extension and include the field/fields that you want to display. Try and keep your changes to these files as it can get more complicated if you have to add other classes and such to the change. If you need data that is not provided by an existing class method, try making the PdoDb request withing the manage.php file and adding it to the $invoices array prior to submitting it to the json encode function.

    Hope this helps get you going. If you need more help, try explaining what it is you want to see versus what is there now.

    • This reply was modified 3 weeks, 5 days ago by RRowley.
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.