Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Fineract Platform already supports the ability to set up pre-defined general ledger journal entries via the accounting rules and frequent postings features. Community feels the need for a feature to automatically post a journal entry that can be controlled using recurrence settings.

Ref:https://issues.apache.org/jira/browse/ 

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyFINERACT-128

Design Approach

Accounting Rule can be enhanced to hold the recurrence information which can then be used by a scheduler job to make the required journal entry.

Design

DB changes

Add following fields to existing acc_accounting_rule table:

acc_accounting_rule

is_scheduled

TINYINT

is_active

TINYINT

amount

DECIMAL

recurrence_start_date

DATE

recur_num_times

INT

recur_num_times_completed

INT

recurrence_frequency

VARCHAR(100)

last_trigger_date

DATE

next_trigger_date

DATE

 

API changes

Existing ‘/accountingrules’ shall take additional parameters representing above data base fields except is_active, recur_num_times_completed, last_trigger_date, next_trigger_date which are system internal fields.

...

Last_trigger_date, next_trigger_date and recur_num_times_completed are for internal use.

Scheduled Job

A new scheduled job would be created that would run once a day. It will pick up all scheduled and active accounting rule definitions. If next_trigger_date is in the past, then a journal entry will be passed for the given from GL, to GL and amount. The job would also update the last_trigger_date, next_trigger_date and recur_num_times_completed fields appropriately.