How are you?
I want to apologize in advance for the following.
I’m not a programmer, and so, what I’m about to say is only based on common sense (my common sense ), so please feel free to correct me if I’m wrong.
My use case is that due to regulatory aspects that are mandatory (issued by my country’s IRS), I need to use a pre-printed invoice that complies with a series of regulations and controls.
I have analyzed the way invoices are generated, and from what I’ve understood, from invoices_manage_print_print.php you call a function named invoiceContent, which is 300+ lines of code, in which you issue SQL statements to the database, build a sort of array of values for the invoice you want to print, and you concatenate these contents with HTML tags in a variable.
After this, you just echo the variable content, which is in fact an HTML page, to the browser, and delegate the printing to the browser’s capabilities.
Trying to customize this printout is a nightmare for a non-programmer.
So, I strongly suggest that you separate logic from the presentation.
From my perspective, which again can be wrong, you should have the logic for retrieving the information in a php file, and on the other hand, an HTML template (like the ones used for emails, or reports) with placeholders, to be replaced by the contents retrieved by the function.
You could even give the user the possibility of choosing which content to print and where, just selecting from a list box built from the array of contents retrieved from the database. (or just writing the $something in the right place in the template)
This would really be the icing on the cake for the Financial Module functionality and would empower the users to customize the invoice according to their needs, which I understand may vary a lot. (depending on the School’s definitions, the Country’s regulations, or other special needs.)
And the best of all is that I believe that the hardest part, which is retrieving the data, is already done.
I hope this suggestion helps improve the Financial Module’s capabilities and usability.
(in my case, the fact that I cannot customize the invoice printout prevents me from using the rest of the functionality which is indeed pretty good, because if I use Gibbon for this, I will have to duplicate invoice information into another system just for printing)
Thank you very much!
P.S. If there currently is a way in which you think I can achieve a customization in the printout without modifying the code, I will be really happy to hear your suggestions. (It will be like an early Christmas present to me )