SimpleInvoices Group Forum › Forums › Fearless359 SimpleInvoices Discussion Group › Question about templates for PDF output
Tagged: extensions, pdf, style, templates
- This topic has 6 replies, 2 voices, and was last updated 1 week, 2 days ago by
RRowley.
-
AuthorPosts
-
July 24, 2025 at 12:31 pm #2187
marcnyc
ParticipantHello, 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
July 25, 2025 at 11:42 am #2189RRowley
ParticipantThe 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.
July 26, 2025 at 1:06 pm #2193marcnyc
ParticipantMoving 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
August 1, 2025 at 5:22 am #2197marcnyc
Participantjust bumping this up to make sure it is seen…
August 1, 2025 at 2:38 pm #2198RRowley
ParticipantCheck 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 2 months ago by
RRowley.
September 24, 2025 at 12:20 pm #2227marcnyc
ParticipantSorry to be dumb, but I am a bit confused.
I found the Settings > Customize > Extensions menu and I see the “Core part and the “eway payment gateway” and nothing else. I don’t see a way to add an extension here.
How would I add an extension? And what would the extension be/entail?What I am trying to achieve are two separete things:
1. add some of the CUSTOM FIELDS that I have set in Settings>Custom Fields to the main view that I see when I load the main page in Money>Invoices.
Right now that page shows a table with: Actions / Invoice / Biller / Customer / Preference etc etc
What I want to do is add two custom fields to that table.2. somehow I misspelled my name 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?
September 24, 2025 at 3:20 pm #2229RRowley
ParticipantThe first step is to create an extension. Go to the SETTINGS, Customize option and add your extension. The extension is not enabled when created. You can enable it via this same screen when you are ready to test it. Next, you would would create the extensions/<extensionname>/modules/invoices/manage.php and the extensions/<extensionname>/templates/default/invoices/manage.tpl files. This might be all you need. The manage.php file gathers the data and puts it in the data.json file and the manage.tpl builds the display screen that shows the data. It is likely that the custom fields you want to display are in the $invoices record returned by the getAllWithHavings function. This will take a bit of coding on your part. Hope it works out. BTW, when new versions of SI are loaded, you manually copy your extentions directory from old to new version and it should keep working.
-
This reply was modified 1 week, 2 days ago by
RRowley.
-
This reply was modified 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
Recent Comments