[#Menu : Gateway of Tally]
Item : Delete Empty Ledgers : Display : EmptyLedgerReport
[Report : EmptyLedgerReport]
Form : EmptyLedgerReport
[Form : EmptyLedgerReport]
Part : EmptyLedgerReport
Button : SelectAllButton, DeleteLedgerButton
Width : 100% Page
[Part : EmptyLedgerReport]
Line : EmptyLedgerReport
Repeat : EmptyLedgerReport : EmptyLedgerReportColl
Scroll : Vertical
[Line : EmptyLedgerReport]
Field : NameField
Right Field : AmountField
Local : Field : NameField : Set As : $Name
Local : Field : AmountField : Set As : $ClosingBalance
[Collection : EmptyLedgerReportColl]
Type : Ledger
Filter : IsEmptyLedger
;; ----- For Stock Items
; Type : StockItem
; Filter : IsEmptyItem
;--------
[System : Formula]
IsEmptyLedger : $$IsEmpty:$ClosingBalance AND $$IsEmpty:$DebitTotals
;; ----- For Stock Items
;IsEmptyItem : $$IsEmpty:$ClosingBalance AND $$IsEmpty:$InwardQuantity
;--------
[Button : SelectAllButton]
Key : Alt+1
Action : Select All
[Button : DeleteLedgerButton]
Key : Alt+2
Action : Delete Object
Key Corrections Made:
Consistent Naming: Used consistent naming convention without spaces (e.g., SelectAllButton instead of Select All Button)
Proper Syntax:
Removed extra spaces in field definitions
Used proper TDL syntax for field names (NameField, AmountField)
Corrected Width : 100% Page format
Formula Syntax: Used AND instead of And for proper TDL syntax
Button Actions:
Simplified Select All action
Removed the extra text "and empty stock items" from Delete action
Field References: Used consistent field naming throughout the code
This TDL code will create a report that displays all empty ledgers (those with zero closing balance and no debit transactions) and provides functionality to select all and delete the selected ledgers.