
/*
Objective(s) -
-	This code will help to repeat all the ledgers of the company and display the ledger name and closing balances
*/

[#Menu: Gateway of Tally]

	Add	: Item	: Before : @@locQuit	: Simple Trial balance		: Display	: Simple Trial balance
    
[Report: Simple Trial balance]

	Form        : Simple Trial balance
	Title       : "Trial Balance"

[Form: Simple Trial Balance]

    Parts       : Simple TB Part
    Height      : 100% Page
    Width       : 100% Page
		
[Part: Simple TB Part]

    Lines       : Simple TB Title, Simple TB Details
    
    ;;Repeat attribute is used to repeat a line on user defined collection of ledger 
    ;;all the ledgers will be repeated on line and the desired values will be shown in the line

    Repeat      : Simple TB Details	: Simple TB Ledgers
    Scroll      : Vertical
    CommonBorder: Yes
		
    [Line: Simple TB Title]
        
        Use     : Simple TB Details
        Local   : Field : Default           : Type  : String
        Local   : Field : Default           : Align : Centre		
        Local   : Field : Simple TB Name Field  : Set as: "Particulars"
        Local   : Field : Simple TB Amount Field: Set as: "Amount"
        Border  : Flush Totals

    [Line: Simple TB Details]

        Fields      : Simple TB Name Field
        Right Fields: Simple TB Amount Field
		
        [Field: Simple TB Name Field]

			Use         : Name Field
			Set as      : $Name                            ;;;Ledger name will be displayed on the field

        [Field: Simple TB Amount Field]

            Use         : Amount Field
	    Set as      : $ClosingBalance                   ;;;Closing value will be displayed on the field
	    Border      : Thin Left
					
;;User defined collection of all the ledgers created in a company
;;Filter is applied to filter only the ledger which affect the profit of the company

[Collection: Simple TB Ledgers]

	Type        : Ledger
	Filter      : NoProfitsimple
	Fetch	    : Name, ClosingBalance
    
;;System formula is defined once and can be used globally

[System: Formula]

    NoProfitSimple    : NOT $$IsLedgerProfit

;; End-of-File
