Activating a transaction reports an error - '...unable to insert into GL_Ledger ...'

Problem

Activating a transaction that will create a general journal e.g. creditor purchases, cash book receipts etc errors with the following message.

Solution

The issue is one or more ledger codes being posted to having missing budget or movement records.  This is most likely a legacy issue from version 6 upgraded databases.  Run the script 'Create Missing Budgets And Movements.sql' that can be found in C:\Program Files (x86)\Jiwa Financials\Jiwa 7\Miscellaneous SQL Scripts\General Ledger to create the missing records. 

SQL skills are required

If running this script doesn't correct the issue and allow the transaction to post, please log a Service Request for further assistance via helpdesk.jiwa.com.au