free Code :- All in on unuse (ledger,items, cost center, employee, unites) delete

Discussion in 'Free Source Codes' started by psjain_jal, Apr 27, 2013.

    
  1. psjain_jal

    psjain_jal Member


    Code:
    [#Menu: Gateway of Tally]
     
    Add :    Item : after : @@locInventoryInfo : Master Delete : Menu : MS Report
     
    Control : Master Delete : NOT ##SVEducationalMode
     
     
    [Menu : MS Report]
        Title : " Delete Master"
        Indent : "Account Master"
        Item : Blank
        Item : Ledger : Display : MD Ledger
        Item : Blank
        Item : Group : Display : MD Group
        Item : Blank
        Item : Employess : Display : MD Employess
        Item : Blank
        Item : Cost Centre : Display : MD Cost Centre
        Item : Blank
        Indent : "Inventory Master"
        Item : Blank
        Item : Stock Item : Display : MD Stock Item
        Item : Blank
        Item : Stock Group : Display : MD Stock Group
     
     
    [Report : MD Ledger]
        Title : "Ledger Master"
        Use : MS Report
       
     
    [Report : MD Group]
        Title : "Group Master"
        Use : MS Report
        Local      : Collection : My mastercoll : Delete  : Type
        Local      : Collection : My mastercoll : Add        :  Type: Group
       
    [Report : MD Employess]
        Title : "Employess Master"
        Use : MS Report
        Local      : Collection : My mastercoll : Delete  : Type
        Local      : Collection : My mastercoll : Add        :  Type: Cost Centre
        Local      : Collection : My mastercoll : Add        :  Filter : EmployeesFilter
     
    [Report : MD Cost Centre]
        Title : "Cost Centre Master"
        Use : MS Report
        Local      : Collection : My mastercoll : Delete  : Type
        Local      : Collection : My mastercoll : Add        :  Type: Cost Centre
        Local      : Collection : My mastercoll : Add        :  Filter :CostCentreFilter
     
     
     
    [Report : MD Stock Item]
        Title : "Stock Item"
        Use : MS Report
        Local      : Collection : My mastercoll : Delete  : Type
        Local      : Collection : My mastercoll : Add        :  Type: StockItem
     
    [Report : MD Stock Group]
        Title : "Stock Group"
        Use : MS Report
        Local      : Collection : My mastercoll : Delete  : Type
        Local      : Collection : My mastercoll : Add        :  Type: Stock Group
     
       
     
    ;;MD Employess
     
    [Collection: Payroll Employees11]
     
        Use          : Alias Collection
        Type      : Cost Centre
        Title    : $$LocaleString:"List of Employees"
        Filter    : EmployeesFilter
        Filter    : PayrollBelongsToCategory
        Filter    : PayrollEmployeesFilter
        Format    : $Parent
     
     
    [Report : MS Report]
        Form : MS Report
     
    [Form : MS Report]
        Height : 100% Page
        Width  : 100% Page
        Part    : MS Report
        Bottom Part : MD Note
       
        Button    : Gr DeleteSelected ;;, Gr DeleteUnselected
        Button    : Gr Btn Select All,Gr DeleteAll ;;, Gr Btn Select None
        Key        : Gr Shift Down Select    ;;,Demonstrates multi-action
     
       
    [Part : MS Report]
        line :MS Report Title ,  MS Report
        Repeat : MS Report : My mastercoll
       
        Scroll : vertical
        Common border : yes
     
    [Line : MS Report Title]
        Field : MS Report sl, MS Report
     
        Border : thin Top Bottom
       
        Local : Field : Default : Style : Normal bold
        Local : Field : MS Report sl : Set as : "Sl No"
        Local : Field : MS Report    : Set as : "Name"
     
     
     
    [Line : MS Report]
        Field : MS Report sl, MS Report
     
     
    [Field : MS Report Sl]
        set as  : $$line
        Width  : 5
        Border  : Thin Left Right
     
    [Field : MS Report]
        set as  : $Name
        Width  : 25
     
     
    [Part : MD Note]
        Line : MD Note
     
    [Line : MD Note]
        Field : MD Note
     
    [Field : MD Note]
        Set as : "This list is Unused Master with Out Opending balance"
        Color : Red
        Background : Yellow
        Style : Large bold
        Fullwidth : yes
     
     
    [Collection : My mastercoll]
        Type : Ledger
        Compute    : IsEmptyObject        : $$IsEmptyObject
        Filter : ONlyempty
     
     
     
     
     
    [Button: gr DeleteSelected]
        Title : "Delete Selected"
        Key        : Alt + D
        Action    : Delete Object
        Mode    : Display
     
        ;; Scope - Newly introduced which means that the Action Delete Object should be carried on for
        ;; Selected lines
        Scope    : Selected Lines
     
    [Button: Gr DeleteUnselected]
     
        Title : "Delete All"
        Key        : Ctrl + E
        Action    : Delete Object
        Mode    : Display
     
        ;; Scope - Newly introduced which means that the Action Delete Object should be carried on for
        ;; Unselected lines
        Scope    : Unselected Lines
     
    [Button: Gr DeleteAll]
        Title : "Delete All"
     
        Key        : Ctrl + D
        Action    : Delete Object
        Mode    : Display
     
        ;; Scope - Newly introduced which means that the Action Delete Object should be carried on for
        ;; all the lines
        Scope    : All Lines
     
    [Button: GR Btn Select All]
        Title : "Select All"
     
        Key        : Ctrl+A
     
        ;; Newly introduced action wherein all the lines (Selected/Unselected) will be selected
        Action    : Select All
        Mode    : Display
     
    [Button: Gr Btn Select None]
        Title : "Select None"
     
        Key        : Ctrl + 8
     
        ;; Newly introduced action wherein all the lines (Selected/Unselected) will be unselected
        Action    : Unselect All
        Mode    : Display
     
     
    [Key: Gr Shift Down Select]
        Title : "Select"
        Key    : Shift + Down
     
        ;; Newly introduced action to toggle the selection, i.e., Shift + Down pressed once will select
        ;; the current line and pressed again will deselect the line
        Action  : Toggle Select
        Mode    : Display
     
    [System : Formula]
        ONlyempty : $$IsEmptyObject
    
     


  2. psjain_jal

    psjain_jal Member


    screen shoot as
     

    Attached Files:

    G Vijay likes this.


  3. Bijoy Alex

    Bijoy Alex New Member


    Is there TDL to disable cost centre from all Ledger Masters than doing it manually for each individual ledger ?
     


  4. Kaushik

    Kaushik New Member


    Very Good & Very useful Code Both for learner as well as for users...
     


  5. Senthilkumar

    Senthilkumar New Member


     


  6. Kaushik

    Kaushik New Member


    Very Good Utility, I have tested this.
    There is one suggestion / modification needed.
    While we select Delete Group, the selection gives the Primary Group - provided by Tally while creating new co. which can not be deletable.
    one more filter to group needs too be added without primary group.
    As I don't have deep knowledge of TDL I can't do the same, if somebody suggest, necessary modification can be done.
    Thanks.
     




  7. brijesh

    brijesh New Member


    very usefull
     


  8. Kaushik

    Kaushik New Member


    This code is filtering for opening, closing as nil. Some ledgers can not be deleted.
    I have tried to modified the code. I have tested this. Only problem is while trying to delete Group, some primary group provided by Tally also listed which can not be deleted. Somebody should try to add filter on this.
     

    Attached Files:





  9. Umapathy

    Umapathy New Member


    Dear Kaushik,
    Very Useful.
    Thank you.
     


  10. llwhiteflowerll

    llwhiteflowerll New Member


    im not getting menu of master Delete.... what to do

    im using latest version 5.3

    please help
     



  11. Dear sir, its very useful
    i get one query and solution also , so am sharing hear.
    Query was - if item have all zero balances but it is selected as component of BOM in any item then even its shows in report and can not be deleted.
    solution - just add $$candelete in system formula so only those items will display which can be delete.
    ONlyempty1:$$IsEmptyObject AND $$CanDelete
    thanks again.
    mithari
    9764999865
     



  12. Dear sir, its very useful
    i get one query and solution also , so am sharing hear.
    Query was - if item have all zero balances but it is selected as component of BOM in any item then even its shows in report and can not be deleted.
    solution - just add $$candelete in system formula so only those items will display which can be delete.
    ONlyempty1:$$IsEmptyObject AND $$CanDelete
    thanks again.
    mithari
    9764999865
     


  13. ujwlgrg

    ujwlgrg Member


    This Master Delete TDL is show an error

    " No lines found in given scope!"

    How to solve this help
     

    Attached Files:



  14. neha shruti

    neha shruti New Member


    can anyone help me regarding delete unused stock unit? What filter to use for that collection?
    Filter : ONlyempty
    [system: formula]
    ONlyempty : $$IsEmptyObject
    not working for unused unit
     


Share This Page