Help to make Fileter Option for GST2B

Discussion in 'Tally Developer' started by Kamal Kishore Jhawar, Mar 15, 2022.


  1. Dear Expert @Amit Kamdar @Many Expert of Forum

    I have made one TDL for #GSTR-2B Reconciliation (attached Image) with option available at the time of Purchase, JV, Debit, Credit Note status can be update from entry or separate update for Purchase Entries (only).

    I Want to Add Filter in Day Book, Purchase Register, Journal, Debit Note, Credit Note to filter as per 2B Status like Matched, Mismatch or Pending, so easily report can be generated with C/F ITC due to pending 2B, and once it reflect, it can be updated with latest status can can be claimed, so i want to filter as per status or 2B month wise.

    Data what i have used as UDF are -

    [System : UDF]

    GST2AK7 : String:22009
    This two are saved as UDF with use selected Option.

    Kindly help me to make filter button in the required reports and filter the information as per user requirement.

    Button and Option i have made with Filter Button coding, But not able to write proper Formulae to fetch the data, attached image is from day book with status and month, and same presently i am exporting to excel and filtering the same, but i want to filter the same from Tally. plz help me experts.

    Not Posted TDL File as i have seen that many Expert wrote, Posting TDL will be risky many are post this in their own name and publish, so not shared the TDL.

    Attached Files:

    Last edited: Mar 15, 2022

  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member

    Very good... not posting the TDL......... many will contact you to send the TDL under guise of solving problems, but they themselves have no knowledge of TDL or problem solving. Mny just collect TDLs and sell them.

    I will direct your search to a TDL by Jay Kumar Tailor regarding adding new search parameters...... Kindly search for it and try to implement the same in your TDL.

  3. sattam

    sattam Active Member

    just post here part of code that is filtering button and Formulae to fetch the data

  4. ;Code for Filter

    ; I have doubt that some error in definition and formula, as it not filtering the information.

    [#Form: DayBook]
    Add: Button: StatusB

    [#Report: DayBook]
    Add: Set: 2BStatus: monthname:NotApplicable
    ;monthname is the UDF defined in the TDL

    [Button: StatusB]
    Title: "GST 2B Status Report"
    Action: Alter: GBForm

    [Report: GBForm]
    Form: GBForm

    [Form: GBForm]
    Part: GBForm
    NoConfirm: Yes

    [Part: GBForm]
    Line: GBForm

    [Line: GBForm]
    Field: Medium Prompt, 2BSF
    Local: Field: Medium Prompt: Set as: "Select Status :"

    [Field: 2BSF]
    Use: Name Field
    Modifies: 2BStatus
    Table: monthname, NotApplicable
    ShowTable: Always

    [Variable: 2BStatus]
    Type: String

    [System: Variable]
    2BStatus: ""

    [System: Formula]

    2BStatusFilter: If ##2BStatus = monthname:NotApplicable then True else monthname = ##2BStatus

    [#Collection: Daybook Vouchers of Company]

    Add:Fetch: $GST2AK7
    ;GST2AK7 is also UDF mentioned in TDL (Same)
    Add: Filter: 2BStatusFilter

    *attached image for updating Purchase invoice status update....

    Attached Files:

    Last edited: Mar 16, 2022

  5. sattam

    sattam Active Member

    [#Form: Day Book]
    Add: Button: StatusB
    [Button: StatusB]
    Key : Alt+6
    Title : "GST 2B Status"
    Action  :Execute    : Sat GBForm
    [Report:Sat GBForm]
        Form    : Sat GBForm
        Title    : $$LocaleString:"2B Status Filter"
    [Form: Sat GBForm]
    Part    : Sat GBForm
        Full Width  : No
        Space Right : 2
        Space Left  : 2
        Option      : Small Size Form
        NoConfirm: Yes
        Background  : @@SV_CMPCONFIG
          On: Form Accept    : Yes    : Form Accept
        On: Form Accept    : Yes    : Display    : My 2BStatus Entries in Daybook
    [Part: Sat GBForm]
        Line    :Sat GBForm
    [Line: Sat GBForm]
            Fields        : Medium Prompt, Name Field
            Local: Field: Medium Prompt    : Set As    : "Select Status :"
            Local: Field: Name Field    : Modifies    : Sat2BStatus    : Yes
            Local: Field: Name Field    :Table:EndOfList,monthname
            Local: Field: Name Field    :Show Table          : Always
    [Report: My 2BStatus Entries in Daybook]
        Use            : Daybook
        Set            : SVFromDate    :##SVFromDate
        Set            : SVToDate    : ##SVToDate
        Local            : Collection    : Default    : Add    : Filter    : 2BStatusFilter
    [System: Formula]
    2BStatusFilter    :if $$IsEndOfList:##Sat2BStatus  then $monthname=$monthname Else $monthname CONTAINS ##Sat2BStatus
    [#Collection: Daybook Vouchers of Company]
    [System: Variable]
        Sat2BStatus: ""
        Type : String   
        Default : ""

  6. @sattam sir, Thank you, with some alteration, I got filter result, Thank You very much, now it is working super, One more Option I am thinking to add to this TDL, from Purchase Register, Day Book, or any other report, multiple or selected entries status to be updated for GSTR2B, Can you help me to achive this by selecting entries from day book or purchase register - Status can be updated by clicking button and option to be implemented and both the tables - Status, Month will be available for user to update the same.

    If you required i can share this tdl to your email id for study and update, so this utility will be powerful and easy to all the tally / accountant who are working hard to get book Vs 2B Match and more importantly, the status save will be available to user and at any time we can get report and match, and submit the report and dept.

    @Amit Kamdar Thank you for providing such great platform for tally definition language learner. to learn and share the ideas with each other.

    Attached Files:

    Last edited: Mar 16, 2022

  7. sattam

    sattam Active Member

    I have already made full reconciliation tool for gstr-1,gstr-2a,gstr-2b and gstr-3b
    If you stuck in any point I will help you
    feel free to mail me any time
    anubhav likes this.

  8. Great, you have all the tool for GST, plz share me if you not think otherwise to my email id and as i said i want to add features to this TDL like selected entries (Multiple or Single) to update the status of GSTR-2B from Purchase Register. plz help me in this how can i write the selection / selected entries updating the status.. share me you email id, so i can share details and how can make more useful this....

    I am also wrote in the thread
    GSTR 2B VS GSTR 3B COMPARISON REPORT for tdl file, plz share the same, if it not paid version and you are comfortable....
    Last edited: Mar 17, 2022

  9. share me your email id

  10. sattam

    sattam Active Member

  11. accounts associates

    accounts associates New Member

    Sir do you yave gstr 2b reco. tool if yes pls share .

  12. anubhav

    anubhav New Member

    dear sir please share your mail

  13. sattam

    sattam Active Member

    Already shared

  14. anubhav

    anubhav New Member

    sir please send this tdl on my email address

  15. sandeepbhawsar

    sandeepbhawsar New Member

  16. Rameshpr

    Rameshpr New Member

  17. bashar shaikh

    bashar shaikh New Member

    sir can you please share it with me. my Email id is

  18. Ankur2904

    Ankur2904 Member

    Kindly share 2B reconciliation TDL to

  19. @Mr. Amit K sir & @sattam sir

    @Amit Kamdar plz help

    below is the code I have made to get Columnar Report with 2B Status, it is working fine in Purchase Register, But i am not able to get the same for Ledger -Columnar report (Screen Shot showing Status update in Purchase Register), in Ledger statement column is apprering, but data is not visible. plz help me to get the details in ledger, so, vendor wise i can generate the report of 2B pending and matched information and same can be shared to vendor.

    and how to write code for Button Report (Filter option work on Columnar Report, as present filter code is opening in day book only without columnar option)

    code is used is:
    ;;Columnar Report with 2B Status and 2B Month option

    [#Part: CMP COLBasics]
    Add: Lines: After: COLREGWithGSTIN:COLREGWith2BStat,COLREGWith2BM

    [Line: COLREGWith2BStat]

    Fields : Medium Prompt, COLREGWith2BStat
    Local : Field : Medium Prompt : Info : $$LocaleString:"2B Status ?" ;;; To Display 2B Status
    Invisible : NOT @@IsGSTOn

    [Field: COLREGWith2BStat]
    Use : Logical Field
    Modifies : COLREGWith2BStat

    [Variable: COLREGWith2BStat]

    Type : Logical
    Persistent : Yes

    [#Line: DSP ColVchDetail]

    Add: Field : After: DBC GSTIN:DBC 2BS
    Add: Field : After: DBC GSTIN:DBC G2BM

    [Field : DBC 2BS]
    Use : Simple Name Field
    Set As : $GST1169 ; $GST1165;masterid $masterid ;"|||" ;
    Width : 7
    Border: Thin Left Right
    Invisible : ##Colregwith2BM="No"

    [#Collection: Columnar Vouchers of Company]
    Add:Fetch:GST1165, GST1169, DBC G2BM

    **above Code is shown for 1 variable, same is used for both in the program.

    Attached Files:

    Last edited: Sep 5, 2022

Share This Page