create tdl as per instruction correctly
- User
create tdl as per instruction correctly
Assistant
Here's a correctly structured TDL for your "Delete Empty Ledgers" utility in Tally ERP 9:
TDL Code: Delete Empty Ledgers Report
[Menu : Gateway of Tally] Item : Delete Empty Ledgers : Display : EmptyLedgerReport [Report : EmptyLedgerReport] Form : EmptyLedgerReport [Form : EmptyLedgerReport] Part : EmptyLedgerReport Button : Select All Button, Delete Ledger Width : 100% Page [Part : EmptyLedgerReport] Line : EmptyLedgerReport Repeat : EmptyLedgerReport : EmptyLedgerReportColl Scroll : Vertical [Line : EmptyLedgerReport] Field : Name Field Right Field : Amount Field Local : Field : Name Field : Set As : $Name Local : Field : Amount Field : Set As : $ClosingBalance [Collection : EmptyLedgerReportColl] Type : Ledger Filter : IsaEmptyLedger [System : Formula] IsaEmptyLedger : $$IsEmpty:$ClosingBalance And $$IsEmpty:$DebitTotals [Button : Select All Button] Key : Alt +1 Action : Select All [Button : Delete Ledger] Key : Alt +2 Action : Delete Object
Explanation of Key Components
-
Menu Structure:
Gateway of Tally→Delete Empty Ledgers→EmptyLedgerReport(the custom report).
-
Report Layout:
- A scrollable list (
Scroll : Vertical) displaying:- Ledger Name (
$Name) - Closing Balance (
$ClosingBalance).
- Ledger Name (
- A scrollable list (
-
Data Filtering:
- The
IsaEmptyLedgerformula checks for ledgers with:- No closing balance (
$$IsEmpty:$ClosingBalance) - No debit totals (
$$IsEmpty:$DebitTotals).
- No closing balance (
- The
-
Buttons:
- Select All (Alt + 1): Selects all items in the list.
- Delete Ledger (Alt + 2): Deletes the selected ledger(s).
Optional: Add Stock Item Support
To include empty stock items, uncomment the following lines:
[Collection : EmptyLedgerReportColl] Type : StockItem Filter : IsaEmptyItem [System : Formula] IsaEmptyItem : $$IsEmpty:$ClosingBalance And $$IsEmpty:$InwardQuantity
How to Use
- Open Tally ERP 9.
- Go to Gateway of Tally → Delete Empty Ledgers.
- The report will display all empty ledgers (or stock items, if enabled).
- Use Alt + 1 to select all, then Alt + 2 to delete them.
This TDL ensures clean-up of unused ledgers, improving your chart of accounts. Let me know if you need enhancements! 🚀
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.