How GL Distribution Line Works in iDempiere

A GL distribution line defines how much of an accounting amount is allocated and where it is posted when a GL Distribution rule is triggered.

Each line represents a target accounting combination and a proportional share of the original posting amount. GL distribution lines do not operate independently. They are evaluated only when the parent GL distribution header criteria are met during accounting posting.

Percentage and Remainder Handling Logic

GL distribution uses percentage-based allocation with strict validation rules.

The system follows these principles:

  • Percent values must be positive or left as null (0)
  • Only one distribution line may have a 0 (null) percent
  • A 0 percent line represents the “remainder to 100%”

If the total of explicitly defined percentages is less than 100% and a 0 percent line exists, that line automatically receives the remaining amount. If no 0 percent line exists, any rounding difference caused by decimal precision is adjusted on the line with the largest calculated amount.

How the Distribution Is Applied During Posting

Once a posting matches a GL distribution rule, iDempiere performs the following steps:

First, the system suppresses the original posting to the matched account combination.

Next, it calculates the distribution amounts by prorating the original amount across the distribution lines based on their percentage values.

Each calculated amount is then posted to the corresponding target account combination defined in the distribution lines.

This entire process happens automatically during posting and requires no manual intervention.

Validation and Control of GL Distributions

A GL distribution must be marked as valid before it can be applied.

The typical setup process is:

  • Define the distribution header
  • Enter distribution lines with percentage values
  • Save the record
  • Verify the distribution

Distributions that are not validated are ignored during posting, ensuring incomplete or incorrect rules do not affect accounting results.