Well the short term solution would be to use psql to log into your database and issue
GRANT delete ON gl TO <the-role-you-want-to-be-able-to-delete>;
OK. I did that and now get the following:
Error!
DELETE FROM gl WHERE id = '1'
ERROR: permission denied for relation yearend
CONTEXT: SQL statement "delete from yearend where trans_id =
old.id"
PL/pgSQL function "del_yearend" line 3 at SQL statement
However, longer term, would it be an option for you to reverse the transaction instead of deleting, BUT: with a report which hides all reversed originals and their neutralizing reversal transactions? The effect would be a list of GL transactions equal to the one you're seeing today.
Yes, that might work if I could print out the individual accounts in the general ledger without the corrections as well as the Balance Sheet and P/L statements.
The difference would be that LedgerSMB would not support deletion anymore, which is very important to the good faith accountants of other users will have in LedgerSMB. I know, that's not your problem, but if the proposed solution above works for you, we can serve both camps with a single solution.
A suggestion might be to offer the administrator the option to create an audit trail (and not allow deletion) or not when he or she sets up the database.
Many commercial Japanese accounting software systems offer this option (I used to use PCA Kaikei, which had the option). I would assume the major corporations choose the audit trail option, while small places like mine where only one or two people do the accounting don't.
Thanks for all your help - I really appreciate it!
Billy