Display-Group-And-Ledgers-With-Closing-Balance TDL
Display-Group-And-Ledgers-With-Closing-Balance TDL
Objective(s) -
- This code will help to explain how to repeat all the accounting groups of a
company and explode the ledger
details under each and every accounting group
- Explosion of ledger level happens when Shift enter is press on the group line
*/
[Report: My TB Report]
Form : My TB
[Form: My TB]
;;Report formatting
[Part: My TB Part]
[Line: My TB Title]
Use : My TB Details
Local : Field : Default : Type : String
Local : Field : Default : Align : Centre
Local : Field : My TB Name Field : Set as: "Name"
Local : Field : My TB ParNameField: Set as: "Parent"
Local : Field : My TB Dr Amt Field: Set as: "Debit"
Local : Field : My TB Cr Amt Field: Set as: "Credit"
Border : Flush Totals
[Line: My TB Details]
[Line: My TB Total]
Use : My TB Details
Local : Field : My TB Name Field : Align : Centre
Local : Field : My TB Name Field : Set as: "TOTAL"
Local : Field : My TB Dr Amt Field: Set as: $$Total:MyTBDrAmtField ;;;
$$Total is used to take the total of the field value
Local : Field : My TB Cr Amt Field: Set as: $$Total:MyTBCrAmtField
Border : Thin Top Bottom
;; Explode Part
;;Repeat the line on ledger collection to display the details in the fields
[Collection: My TB GroupsLedgers]
[Collection: My TB Groups]
Type : Group
Child Of : #MyGroupName1
Filter : Zero Filter
Fetch : Name, ClosingBalance
[Collection: My TB Ledgers]
Type : Ledger
Child Of : #MyGroupName1 ;; child of attribute is used to get all
the ledgers made under particular group
Filter : Zero Filter ;; system formulla "Zero filter" is used
to get only relevant ledgers
Fetch : Name, ClosingBalance
;;System formula to check whether the closing value is greater than zero and is a
profit ledger
[System: Formula]
;; End-of-File