SQL-Ledger can be customized in three ways:
You can create your own functions or override any existing function by creating custom scripts in custom_xx.pl files and putting them in bin/mozilla folder.
For example, to add new functions to gl.pl file, add these functions to custom_gl.pl file and put this file into bin/mozilla/ folder. This file will be automatically loaded by sql-ledger before running any functions in gl.pl files.
Once your new functions are there, you can call them using your own custom menu. Custom menu entries are put in custom_menu.ini and follow the same syntax as that of menu.ini.
This method of extending the sql-ledger is upgrade-safe and is the recommended way.
You can build your own modules. To write a module, you need to create at least three files:
This method is also upgrade safe.
Sometimes there is a need to directly alter the sql-ledger source code for particular needs. We have, for example, modified few reports (GL Transactions, All Items) in this way. Your changes, however, will be overwritten when you upgrade to new version and you will need to port these changes again to the new version.
A bit discipline and an SCM software like GIT can help manage such changes or patches with easy. We, at ledger123.com, use GIT to track and manage such changes across newer versions of sql-ledger.