This turned out to be a bug involving an extra space character appearing on the end of nominal ledger codes stored in the database. Unfortunately, it affects several different files, so to fix it, it is necessary to replace the following files with the attached versions:
/administrator/components/com_netinvoice/admin.proc/expenditure.php
/administrator/components/com_netinvoice/admin.proc/ledger_report.php
/administrator/components/com_netinvoice/admin.html/income.html.php
/administrator/components/com_netinvoice/admin.html/expenditure.html.php
/components/com_netinvoice/transaction.processing.php
[attachment deleted by admin]