Rules
Description
The path to the .txt file that contains rules by which to aggregate accounts. It generates LLG code on the basis of given condition. If no condition was matched, then the default LLG is used.
# | Field | Description |
---|---|---|
1 | rule_id | Unique number given to each rule |
2 | rule_sequence | Ordering for the rules |
3 | rule_step | Sub rule id |
4 | field_name | Mapped field from the metadata file |
5 | comparator | Logical comparator: EQ(=),NE(!=),LT(<),LTEQ(<=),GT(>),GTEQ(>=), BTWN(between), IN(in), NTIN(not in) |
6 | value | The actual value to compare field name with |
7 | connector or llg code | Connector:And,Or to connect more than one subrules in a rule. LLgCode: code to be generated if the rule gets satisfied. |
Example
1|1|0|gl_cd|EQ|42010|AND
1|1|1|branch_cd|EQ|42010008|9000
2|1|0|gl_cd|EQ|42010|AND
2|1|1|branch_cd|EQ|42010004|11502
3|1|0|gl_cd|EQ|42010|AND
3|1|1|branch_cd|EQ|42010005|11504
In the above example, for Rule number 1, there are two sub rules: sub-rule0: gl_cd=42010 and sub-rule1: branch_cd=42010008, then the llg code will be 9000.
LLG
Using the above LLG code, LLGkey is generated, which mostly consists of llg.currency, llg.category and llg.cf_type. Note: LLGkey can contain additional field like item_id for performing aggregation.
LLG.category and LLG.cf_type :
If the llg code is of 5 digits, then it is of inflow type (we append extra 1 at beginning). Else if it is of 4 digits, then it is of outflow type.
Note: If its of 5 digits but starting with 0, for Eg: 08888, then ignore the 0. Consider it as 8888. Therefore, outflow is its cf_type.
Eg1: llg code=11502 represents its of Inflow type. Since extra 1 is appended at the beginning, we remove that and store only 1502 as category inside the LLG key and cf_type becomes 'I'.
Eg2: llg code=9000 represents its of Outflow type. We store 9000 as category inside the LLG key and cf_type becomes 'O'.