Customization

June 2, 2026 · View on GitHub

SQL-Ledger Documentation ▶ Customization

Customization

Customization means modifying the program itself, either by adding new or by changing existing functionality. It is used when then the possibilities provided by the configuration are not sufficient.

To customize the program, add files to bin/mozilla/custom or to its subdirectories. Don't edit the original program files; this would make it difficult or even impossible to update to newer versions.

Structure

Custom files are either named menu.ini or after one of the *.pl files in bin/mozilla. They are processed after the original files in the following order:

#directoryactive for
1bin/mozilla/customthe whole server
2bin/mozilla/custom/companyall users of dataset company
3bin/mozilla/custom/user@companyonly user of company

If the files contain the same directives, the earlier ones are replaced by the later ones.

Menu files are called menu.ini. They add new entries inside the existing tree or additional entries below Logout. Horizontal lines can be used to separate the headers.

[<hr>]

[My reports]

[My reports--Outstanding Invoices]
module=ar.pl
action=search
outstanding=1
nextsub=transactions

Experienced users create menu entries that directly generate the output of reports.

Program code

Custom program files use the same names as the files in bin/mozilla. They are loaded whenever the original file with the same name is called. If the contain the a function name that exists in the original, it is replaced. If the function names are new, the are added to the program.

# bin/mozilla/custom/aa.pl

sub add {
  # replaces the add function
}


sub my_new_function {
  # creates a new function
}

Customized Reports

The sample files for customized reports, located in doc/custom, are good examples to learn how to to create custom program files. They override functions, for example _search_defaults and _transactions_defaults in bin/mozilla/am.pl. They are used to modify the default values on the frontends of the reports and for some of them to change the order of the columns and their sort order.

sampletargetfor reports
aa.txtbin/mozilla/custom/aa.plAR--Reports--Transactions
AR--Reports--Outstanding
AP--Reports--Transactions
AP--Reports--Outstanding
ct.txtbin/mozilla/custom/ct.plCustomers--Reports--Search
Vendors--Reports--Search
gl.txtbin/mozilla/custom/gl.plGeneral Ledger--Reports
oe.txtbin/mozilla/custom/oe.plOrder Entry--Reports--Sales Orders
Order Entry--Reports--Purchase Orders
Quotations--Reports--Quotations
Quotations--Reports--RFQs
rp.txtbin/mozilla/custom/rp.plAR--Reports--AR Aging
AR--Reports--Reminder
AR--Reports--Tax collected
AR--Reports--Non-taxable
AP--Reports--AP Aging
AP--Reports--Tax paid
AP--Reports--Non-taxable
Cash--Reports--Receipts
Cash--Reports--Payments
Projects & Jobs--Projects--Reports--Transactions
Reports--Trial Balance
Reports--Income Statement
Reports--Balance Sheet