Free Code : "Quick Search" Amt, Vtyp, Date, Led, Vno, Narration etc. Use "HelpButton"

Discussion in 'Free Source Codes' started by drive, Dec 14, 2018.

         
Tags:
  1. drive

    drive Active Member


    ;; Use Helpbutton For Any Search While Any Report Or Ledger
    ;; After Add This Code Restart Tally For Helpbutton Effect

    [#Button: HelpButton]
    Delete: Key
    Delete: Title
    Delete :Type : HelpButton
    Delete :Action : Call : Display Web Help
    Add :Title: Quick Search
    Add :Key: Ctrl + P
    Add :ActionEx: 001 : Alter: R057QuickSearch
    ; Add :ActionEx: 002 : Do If: Not ($$IsEmpty:##v057QSStr) And
    Add :ActionEx: 002 : Do If: Not ($$IsEmpty:##v057QSStr) : Display: R057QSDaybook
    Inactive: $$IsEmpty:$$SelectedCmps
    [Report: R057QuickSearch]
    Form: A057QuickSearch
    Set: v057QSTYPE : ""
    Set: v057QSStr : ""
    Set: v057QSRangeOFF : ""

    [Form: A057QuickSearch]
    Background : GREY
    Part : P057QuickSearch
    ;No Confirm : YES
    Width: 40% Page
    Height: 15% Page
    ;Horizontal Align: Center
    Vertical Align: Top
    [Part: P057QuickSearch]
    Line: L057QuickSearchT,L057QuickSearchF
    [Line: L057QuickSearchT]
    Space Top : 1
    Space Bottom : 1
    Field: Plain SetSubTitle
    ;Local: Field : Plain SetSub Title : Border: Thin Bottom
    Local: Field : Plain SetSub Title : Set as: "Quick Search Key"
    [Line: L057QuickSearchF]
    Field: F057QuickSearchType,F057QSRangeOff, F057QuickSearchStr
    Border: Thin Top Bottom
    [Field: F057QuickSearchType]
    Use : name Field
    Set as : "All"
    Table : C057QSType
    Width : 13
    Modifies: v057QSTYPE
    Show Table : Always
    ;Border : Thin Top Bottom Right
    [Field: F057QSRangeOff]
    Use : name Field
    Table : C057TableVTYPE : ( #F057QuickSearchType = "Voucher Type" )Or ( #F057QuickSearchType = "Ledger Name" )
    Table : C057TableNarr : ( #F057QuickSearchType = "Narration" )
    Table : C057TableVNo : ( #F057QuickSearchType = "Vocher No" )
    Table : C057TableDate : ( #F057QuickSearchType = "Date" )
    Table : C057TableAmt : ( #F057QuickSearchType = "Amount" )
    ;Table : C057TableCAmt : ( #F057QuickSearchType = "Ledger Closing Balance" )
    Width : 13
    Modifies: v057QSRangeOFF
    Show Table : Always
    Skip: #F057QuickSearchType = "All"
    [Field: F057QuickSearchStr]
    Use : name Field
    Modifies: v057QSStr
    Full Width: YES
    Set as: @SetVal
    SetVal : if #F057QSRangeOff = "As a Credit Amount" Then "-" Else +
    if #F057QSRangeOff = "As a Debit Amount" Then "-" Else +
    if #F057QSRangeOff = "As Empty" Then "-" Else +
    if #F057QSRangeOff = "As Non-Empty" Then "-" Else +
    if #F057QSRangeOff = "As Non-Zero" Then "-" Else +
    if #F057QSRangeOff = "As Zero" Then "-" Else ""
    Set Always: YES
    Skip : #F057QSRangeOff = "As a Credit Amount" Or #F057QSRangeOff = "As a Debit Amount" Or #F057QSRangeOff = "As Empty" Or #F057QSRangeOff = "As Non-Empty" Or #F057QSRangeOff = "As Non-Zero" Or #F057QSRangeOff = "As Zero"
    [Collection: C057QSType]
    Title : Quick Search
    List Name: "All","Amount","Date","Ledger Name","Vocher No", "Voucher Type", "Narration";, "Ledger Closing Balance"
    Alignment: Centre
    ;"Stock Item",, "Billed Qty"


    [Variable: v057QSTYPE]
    Type: String
    [Variable: v057QSStr]
    Type: String
    [Variable: v057QSRangeOFF]
    Type: String
    [System: Variables]
    v057QSTYPE : ""
    v057QSStr : ""
    v057QSRangeOFF : ""


    [Report: R057QSDaybook]
    Use : Daybook
    Title : $$LocaleString:"Quick Search"
    Local: Part: DB Title : Local : Line : DB Title : Local :Field : Name Field : Set as: @@U057Quicksearch; $$LocaleString:"Quick Search"
    Local: Part: DB Title : Local : Line : DB Title : Local :Field : Name Field : Color: Deep Cobalt Blue
    Local: Part: DB Title : Local : Line : DB Title : Local :Field : Name Field : Border: Thin Bottom
    Set: SVFromDate : $$FinYearBeg:##SVCurrentDate:$StartingFrom:Company:##SVCurrentCompany
    Set: SVToDate : $$FinYearEnd:##SVCurrentDate:$StartingFrom:Company:##SVCurrentCompany

    Local : Collection : DBVoucher Src : Add : Filter : Filt_057Main1
    ;Local : Collection : Daybook Vouchers of Company : Add : Filter : Filt_057Main1

    [#Collection: DBVoucher Src]
    Fetch : Date, IsCancelled,IsOptional, Reference

    [Collection: C057TableVTYPE] ; Also Use In Ledger,
    Title: "Range of Information"
    List Name: "Containing"
    List Name: "Ending With"
    List Name: "Equal To"
    List Name: "Not Containing"
    List Name: "Not Ending With"
    List Name: "Not Equal To"
    List Name: "Not Starting With"
    List Name: "Starting With"
    Alignment: Centre
    [Collection: C057TableNarr]
    Use: C057TableVTYPE
    List Name: "As Empty"
    List Name: "As Non-Empty"


    [Collection: C057TableVNo]
    Use: C057TableNarr
    List Name: "Greater Then"
    List Name: "Lesser Then"

    [Collection: C057TableDate]
    Title: "Range of Information"
    List Name: "Greater Then"
    List Name: "Lesser Then"
    List Name: "Equal To"
    List Name: "Not Equal To"
    Alignment: Centre
    [Collection: C057TableAmt]
    Use: C057TableDate
    List Name: "As a Credit Amount"
    List Name: "As a Debit Amount"
    List Name: "As Non-Zero"
    List Name: "As Zero"

    [System: Formulas]
    U057Quicksearch : If $$InPrintMode Then "Quick Search" Else "Voucher : Having : "+ $$String:##v057QSTYPE + " : " + $$String:##v057QSRangeOFF + " : " + $$String:##v057QSStr
    Filt_057Main1 : If ##v057QSTYPE = "Voucher Type" Then @@Filt_057VTYP_0 Else +
    IF ##v057QSTYPE = "Amount" Then @@Filt_057Amt_0 Else +
    IF ##v057QSTYPE = "Date" Then @@Filt_057Date_0 Else +
    IF ##v057QSTYPE = "Ledger Name" Then @@Filt_057LED_0 Else +
    IF ##v057QSTYPE = "Vocher No" Then @@Filt_057VNO_0 Else +
    IF ##v057QSTYPE = "Narration" Then @@Filt_057Narr_0 Else @@Filt_057All


    ;Voucher Type
    Filt_057VTYP_0: IF ##v057QSRangeOFF = "Containing" Then @@Filt_057VTYP_1 Else +
    If ##v057QSRangeOFF = "Ending With" Then @@Filt_057VTYP_2 Else +
    If ##v057QSRangeOFF = "Equal To" Then @@Filt_057VTYP_3 Else +
    If ##v057QSRangeOFF = "Not Containing" Then @@Filt_057VTYP_4 Else +
    If ##v057QSRangeOFF = "Not Ending With" Then @@Filt_057VTYP_5 Else +
    If ##v057QSRangeOFF = "Not Equal To" Then @@Filt_057VTYP_6 Else +
    If ##v057QSRangeOFF = "Not Starting With" Then @@Filt_057VTYP_7 Else @@Filt_057VTYP_8
    Filt_057VTYP_1 : $VoucherTypeName Containing ##v057QSStr
    Filt_057VTYP_2 : $VoucherTypeName Ending With ##v057QSStr
    Filt_057VTYP_3 : $VoucherTypeName Equal To ##v057QSStr
    Filt_057VTYP_4 : $VoucherTypeName Not Containing ##v057QSStr
    Filt_057VTYP_5 : $VoucherTypeName Not Ending With ##v057QSStr
    Filt_057VTYP_6 : $VoucherTypeName Not Equal To ##v057QSStr
    Filt_057VTYP_7 : $VoucherTypeName Not Starting With ##v057QSStr
    Filt_057VTYP_8 : $VoucherTypeName Starting With ##v057QSStr

    ;Ledger Name
    Filt_057LED_0: IF ##v057QSRangeOFF = "Containing" Then @@Filt_057LED_1 Else +
    If ##v057QSRangeOFF = "Ending With" Then @@Filt_057LED_2 Else +
    If ##v057QSRangeOFF = "Equal To" Then @@Filt_057LED_3 Else +
    If ##v057QSRangeOFF = "Not Containing" Then @@Filt_057LED_4 Else +
    If ##v057QSRangeOFF = "Not Ending With" Then @@Filt_057LED_5 Else +
    If ##v057QSRangeOFF = "Not Equal To" Then @@Filt_057LED_6 Else +
    If ##v057QSRangeOFF = "Not Starting With" Then @@Filt_057LED_7 Else @@Filt_057LED_8
    Filt_057LED_1 : $LedgerName Containing ##v057QSStr
    Filt_057LED_2 : $LedgerName Ending With ##v057QSStr
    Filt_057LED_3 : $LedgerName Equal To ##v057QSStr
    Filt_057LED_4 : $LedgerName Not Containing ##v057QSStr
    Filt_057LED_5 : $LedgerName Not Ending With ##v057QSStr
    Filt_057LED_6 : $LedgerName Not Equal To ##v057QSStr
    Filt_057LED_7 : $LedgerName Not Starting With ##v057QSStr
    Filt_057LED_8 : $LedgerName Starting With ##v057QSStr

    ;C057TableVNo
    Filt_057VNO_0: IF ##v057QSRangeOFF = "Containing" Then @@Filt_057VNO_1 Else +
    If ##v057QSRangeOFF = "Ending With" Then @@Filt_057VNO_2 Else +
    If ##v057QSRangeOFF = "Equal To" Then @@Filt_057VNO_3 Else +
    If ##v057QSRangeOFF = "Not Containing" Then @@Filt_057VNO_4 Else +
    If ##v057QSRangeOFF = "Not Ending With" Then @@Filt_057VNO_5 Else +
    If ##v057QSRangeOFF = "Not Equal To" Then @@Filt_057VNO_6 Else +
    If ##v057QSRangeOFF = "Not Starting With" Then @@Filt_057VNO_7 Else +
    If ##v057QSRangeOFF = "Starting With" Then @@Filt_057VNO_8 Else +
    If ##v057QSRangeOFF = "Greater Then" Then @@Filt_057VNO_9 Else +
    If ##v057QSRangeOFF = "Lesser Then" Then @@Filt_057VNO_10 Else +
    If ##v057QSRangeOFF = "As Empty" Then @@Filt_057VNO_11 Else + @@Filt_057VNO_12

    Filt_057VNO_1 : $VoucherNumber Containing ##v057QSStr
    Filt_057VNO_2 : $VoucherNumber Ending With ##v057QSStr
    Filt_057VNO_3 : $VoucherNumber Equal To ##v057QSStr
    Filt_057VNO_4 : $VoucherNumber Not Containing ##v057QSStr
    Filt_057VNO_5 : $VoucherNumber Not Ending With ##v057QSStr
    Filt_057VNO_6 : $VoucherNumber Not Equal To ##v057QSStr
    Filt_057VNO_7 : $VoucherNumber Not Starting With ##v057QSStr
    Filt_057VNO_8 : $VoucherNumber Starting With ##v057QSStr
    Filt_057VNO_9 : $$Number:$VoucherNumber > $$Number:##v057QSStr
    Filt_057VNO_10: $$Number:$VoucherNumber < $$Number:##v057QSStr
    Filt_057VNO_11: $$IsEmpty:$VoucherNumber
    Filt_057VNO_12: Not $$IsEmpty:$VoucherNumber


    ;C057TableNarr
    Filt_057Narr_0: IF ##v057QSRangeOFF = "Containing" Then @@Filt_057Narr_1 Else +
    If ##v057QSRangeOFF = "Ending With" Then @@Filt_057Narr_2 Else +
    If ##v057QSRangeOFF = "Equal To" Then @@Filt_057Narr_3 Else +
    If ##v057QSRangeOFF = "Not Containing" Then @@Filt_057Narr_4 Else +
    If ##v057QSRangeOFF = "Not Ending With" Then @@Filt_057Narr_5 Else +
    If ##v057QSRangeOFF = "Not Equal To" Then @@Filt_057Narr_6 Else +
    If ##v057QSRangeOFF = "Not Starting With" Then @@Filt_057Narr_7 Else +
    If ##v057QSRangeOFF = "Starting With" Then @@Filt_057Narr_8 Else +
    If ##v057QSRangeOFF = "Greater Then" Then @@Filt_057Narr_9 Else + @@Filt_057Narr_10


    Filt_057Narr_1 : $Narration Containing ##v057QSStr
    Filt_057Narr_2 : $Narration Ending With ##v057QSStr
    Filt_057Narr_3 : $Narration Equal To ##v057QSStr
    Filt_057Narr_4 : $Narration Not Containing ##v057QSStr
    Filt_057Narr_5 : $Narration Not Ending With ##v057QSStr
    Filt_057Narr_6 : $Narration Not Equal To ##v057QSStr
    Filt_057Narr_7 : $Narration Not Starting With ##v057QSStr
    Filt_057Narr_8 : $Narration Starting With ##v057QSStr
    Filt_057Narr_9 : $$Number:$Narration > $$Number:##v057QSStr
    Filt_057Narr_10: $$Number:$Narration < $$Number:##v057QSStr





    ;C057TableDate
    Filt_057Date_0: If ##v057QSRangeOFF = "Equal To" Then @@Filt_057Date_1 Else +
    If ##v057QSRangeOFF = "Not Equal To" Then @@Filt_057Date_2 Else +
    If ##v057QSRangeOFF = "Greater Then" Then @@Filt_057Date_3 Else + @@Filt_057Date_4

    Filt_057Date_1 : $Date Equal To $$Date:##v057QSStr
    Filt_057Date_2 : $Date Not Equal To $$Date:##v057QSStr
    Filt_057Date_3 : $Date > $$Date:##v057QSStr
    Filt_057Date_4 : $Date < $$Date:##v057QSStr


    ;C057TableAmount
    Filt_057Amt_0: If ##v057QSRangeOFF = "Equal To" Then @@Filt_057Amt_1 Else +
    If ##v057QSRangeOFF = "Not Equal To" Then @@Filt_057Amt_2 Else +
    If ##v057QSRangeOFF = "Greater Then" Then @@Filt_057Amt_3 Else +
    If ##v057QSRangeOFF = "Lesser Then" Then @@Filt_057Amt_4 Else +
    If ##v057QSRangeOFF = "As a Credit Amount" Then @@Filt_057Amt_5 Else +
    If ##v057QSRangeOFF = "As a Debit Amount" Then @@Filt_057Amt_6 Else +
    If ##v057QSRangeOFF = "As Non-Zero" Then @@Filt_057Amt_7 Else + @@Filt_057Amt_8

    Filt_057Amt_1 : $Amount Equal To $$AsAmount:##v057QSStr
    Filt_057Amt_2 : $Amount Not Equal To $$AsAmount:##v057QSStr
    Filt_057Amt_3 : $Amount > $$AsAmount:##v057QSStr
    Filt_057Amt_4 : $Amount < $$AsAmount:##v057QSStr
    Filt_057Amt_5 : Not $$IsEmpty:$$IfCr:$Amount
    Filt_057Amt_6 : Not $$IsEmpty:$$IfDr:$Amount
    Filt_057Amt_7 : $Amount != 0
    Filt_057Amt_8 : $Amount = 0


    ; Filt_057Main1 : If ##v057QSTYPE = "Voucher Type" Then @@Filt_057VTYP Else +
    ; IF ##v057QSTYPE = "Amount" Then @@Filt_057Amt Else +
    ; IF ##v057QSTYPE = "Date" Then @@Filt_057Date Else +
    ; IF ##v057QSTYPE = "Ledger Name" Then @@Filt_057LED Else +
    ; IF ##v057QSTYPE = "Vocher No" Then @@Filt_057VNo Else +
    ; IF ##v057QSTYPE = "Narration" Then @@Filt_057Narr Else @@Filt_057All

    Filt_057VTYP : $VoucherTypeName CONTAINS ##v057QSStr
    Filt_057Amt : $Amount = $$AsAmount:##v057QSStr
    Filt_057Date : $Date = $$Date:##v057QSStr
    Filt_057LED : $LedgerName CONTAINS ##v057QSStr
    Filt_057VNo : $VoucherNumber CONTAINS ##v057QSStr
    Filt_057Narr : $Narration CONTAINS ##v057QSStr
    Filt_057All : @@Filt_057VTYP OR @@Filt_057Amt Or @@Filt_057Date OR @@Filt_057LED OR @@Filt_057VNo Or @@Filt_057Narr
     


  2. mpal2311

    mpal2311 Active Member


    Thanks for sharing. :)
     


  3. RamRaju

    RamRaju New Member


    Thanks for sharing sir. you are a fabulous programmer, not because you shared this one but i found you have really good skills, like Santhosh Kurian sir and Amit Kamdar sir
     
    Last edited: Dec 20, 2018


  4. haresh1123

    haresh1123 New Member



    Dear sir pls

    can you add in this Hsn code search
     


  5. nasir

    nasir Member


    Quick button Not Working
     


  6. Bipin Damania

    Bipin Damania Active Member


    Thanks for sharing...
    I have added GST No in search
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    It seems...that not a single code is working for you................ have you wondered why???
     


  8. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    I Also Added Gstin

    And

    dealer type
    :)
     
    Last edited: Dec 21, 2018


  9. tejeet

    tejeet Member



  10. tejeet

    tejeet Member



  11. tejeet

    tejeet Member


    sir your code is excellent , but sir can you modify this code for me, i require help button in tool bar in top & required this quick search button in gateway of tally , so we can use both function, in your present code help function is deleted & modify with quick search - so only 1 function is used , we wish to use both function.
     


  12. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    what about

    $Transactionchequeno

    or

    $Allledgerentries.Bankallocations.InstrumentNumber

    Not Searching in both Conditions
     


  13. tulip

    tulip New Member


    Dear All,
    Please add item description search option also in same tdl if possible and update here.
    Thanks and Regards
    Tulip
     


  14. KRISBALA

    KRISBALA New Member


    sir please upload GSTIN updated code

    thanks
     


  15. DANIELGORI

    DANIELGORI New Member


    thank you sir
     


  16. Rajsrisrimal

    Rajsrisrimal Member


    sir
    can I get same?
    rajsrisrimal@gmail.com
     


  17. PHOENIX HELIOS

    PHOENIX HELIOS New Member


    Nice. But there is one problem. It searches for the whole year. Where there are huge number of entries, it takes a lot of time to load.
     


  18. drive

    drive Active Member


    Then you will change in Date Variable like

    [Report: R057QSDaybook]
    Set : SVFromDate : $$MonthStart:##SVCurrentDate
    Set : SVToDate : $$MonthEnd:##SVCurrentDate
     
    PHOENIX HELIOS likes this.


  19. Vikram Bhat

    Vikram Bhat Member


    Thanks @@drive sir
    i just Modify GSTIN,Buyer name ,Buyer Address And Mobile No
    Thanks For Your Code
     


  20. Rajsrisrimal

    Rajsrisrimal Member


    sir,
    Can you mail me the same ?
     


  21. HAROON2015

    HAROON2015 Member


    thanks for the reply
    i want to modify this code if i want to search only previous month
     


  22. drive

    drive Active Member


    ;;Try This
    Set : SVFromDate : $$MonthStart:$$PrevMonth:##SVCurrentDate
    Set : SVToDate : $$MonthEnd:$$PrevMonth:##SVCurrentDate
     


  23. HAROON2015

    HAROON2015 Member


    thank you very much sir
     


  24. anish

    anish Member


    Thank You so much Sir ! It help me to reach a new level of learning in TDL I can use it to Filter my Personal Reports !
     


  25. maheshb

    maheshb New Member



Share This Page