Calculator Panel -Auto Copy Amount Field in edit mode

Discussion in 'Free Source Codes' started by Devendra_Rawat, Jan 8, 2024.

    
  1. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    Auto Copy Amount Field to Calculator Panel -in edit mode

    Make Tally Faster


    Code:
    [System    : Variable]
        svLogCalcAmt : ""
       
    [Variable: svLogCalcAmt]
        Type    : Amount
        Default    : 0.00
        Set Always    : Yes
    
       
    [#Field: VchDrAmt]
        ;Modifies    : svLogCalcAmt
        On: Focus    : $$InEditMode    : Set :  svLogCalcAmt : $$Value
       
    [#Field: VchCrAmt]
        ;Modifies    :svLogCalcAmt
        On: Focus    : $$InEditMode    : Set :  svLogCalcAmt : $$Value
    
    [#Field: Vch Value]
        ;Modifies    : svLogCalcAmt
        On: Focus    : $$InEditMode    : Set :  svLogCalcAmt : $$Value
    
    [#Field: Ei Value]
        ;Modifies    :svLogCalcAmt
        On: Focus    : $$InEditMode    : Set :  svLogCalcAmt : $$Value
    
    [#Field: VCHBATCH Value]
        ;Modifies    :svLogCalcAmt
        On: Focus    : $$InEditMode    : Set :  svLogCalcAmt : $$Value
    
    
    [#Key: Calculator]
        Delete    : Action
        Action List    : TxoLogValue, TxoCalC
        Mode    : Edit
         
    [Key:TxoLogValue]
           
        Key     : Alt+C
        Action  : Call: TxoLogCalc
        Mode    : Edit
       
    [Key: TxoCalC]
           
        Key     : Alt+C
        Action  : Calculator
        Mode    : Edit
       
    [Function    : TxoLogCalc]
        100        : Log :##svLogCalcAmt
        200        : Trigger Key: Up
        300        : Trigger Key: End
       
        
     
    Last edited: Jan 8, 2024
    sattam, Vashisth and Rohit Khedar like this.


  2. Rohit Khedar

    Rohit Khedar Member


    Very nice sir ji
     
    Last edited: Jan 9, 2024


  3. Rohit Khedar

    Rohit Khedar Member


    Code:
    "
    help Please me
    Ledger Report "This is my TDL, I want to enable and disable through control panel and along with enabling TDL, Gateway of Tally should also be shown. How to do this, please prepare a simple code and post it.
    ;; code
    
    [System: Event]
    
    TEMP1 : NatLangQuery : @@FRML1 : Load TDL   : "Ledger Report"
    TEMP2 : NatLangQuery : @@FRML2 : Unload TDL  : "Ledger Report"
    
    [System: Formula]
    
    FRML1 : ##SVNatLangFullRequest CONTAINS "Show Ledger Report"   ;; Type in Calculator  then show TDL
    FRML2 : ##SVNatLangFullRequest CONTAINS "Hide Ledger Report"    ;; Type in Calculator  then Hiide TDL
    
    
    [#Menu: Gateway of Tally]
    Add: Item: Ledger Report: Display: Ledger_Rpt:@@FRML1:Company:##SVCurrentCompany
    
    
    
    [Report: Ledger_Rpt]
    
    Form  : Ledger_Frm
    [Form: Ledger_Frm]
    
    Part: Ledger_Prt
    
    Height: 40% page
    Width : 60% page
    Background: Lily Yellow
    
    
    [Part: Ledger_Prt]
    
    Line: Ledger_LnTitle
    CommonBorder: Yes
    Scroll : Vertical
    Float: Yes
    
    [Line: Ledger_LnTitle]
    Field: Empty
     


  4. Rohit Khedar

    Rohit Khedar Member


    My code Work fine but some issue.
    1st Issue TDL low highlite on "Gateway of Tally".
    2nd Issue when Type for show on Calculatore panle Then show "Error! no value specified in the query".
    3rd Issue when Type for Hide on Calculatore panle Then show "Could not understand word Hide Ledger Report
    Please help me on Issue

    Code:
    [System: Event]
    TEMP1 : NatLangQuery : @@FRML1 : Load TDL : ("Ledger Report TEMP2 ")
    TEMP1 : NatLangQuery : @@FRML2 : Unload TDL : "Ledger Report"
    
    [System: Formula]
    FRML1 : ##SVNatLangFullRequest CONTAINS "Show Ledger Report" ;; Type in Calculator then show TDL
    FRML2 : ##SVNatLangFullRequest CONTAINS "Hide Ledger Report" ;; Type in Calculator then Hiide TDL
    
    [#Menu: Gateway of Tally]
    Add: Item: Ledger Report: Display: Ledger_Rpt:@@FRML1 ;:Company:##SVCurrentCompany)
    [Report: Ledger_Rpt]
    Form : Ledger_Frm
    [Form: Ledger_Frm]
    Part: Ledger_Prt
    Height: 40% page
    Width : 60% page
    Background: Lily Yellow
    
    [Part: Ledger_Prt]
    Line: Ledger_LnTitle
    CommonBorder: Yes
    Scroll : Vertical
    Float: Yes
    
    [Line: Ledger_LnTitle]
    Field: Empty
     


  5. Rohit Khedar

    Rohit Khedar Member


    What no any expert so can this type problem solved
     


  6. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    Please put your query very clearly

    Use "ShowLed" or "HideLed" in Calculator Panel


    Press Control + M at the end

    use of "Refresh TDL" in code Function will hang your Tally


    This works in Tally ERP 9 but not working in Prime 3

    Code:
    [System: Event]
        TEMP1 : NatLangQuery : @@FRML1 : Call    :    RohitShowReport
        TEMP2 : NatLangQuery : @@FRML2 : Call    :    RohitHideReport
    
    [System: Formula]
        FRML1 : ##SVNatLangFullRequest CONTAINS "ShowLed"
        FRML2 : ##SVNatLangFullRequest CONTAINS "HideLed"
    
    [Function    : RohitShowReport]
     
    
        Variable    :     vAppPath    : String
    
    ;   005            : Log: "Dev"
        010            :    Set    : vAppPath    :  $$ApplicationPath + "\RohitTDL.tdl"        
      ; 020         :    Log    : ##vAppPath            
    
        030            :   do if    : ( $$isfileexists:##vAppPath) : delete file:##vAppPath            
        040           :   open file : ##vAppPath: Text : Write : ASCII                
        050            :   truncate file    
        055            :    Write File Line     : "[#Menu: Gateway of Tally]"
        060           :   Write File Line     : "Add: Item: Rohit Ledger Report: Display: Ledger_Rpt: Yes "
     
        065        :    Write File Line     : "[Report: Ledger_Rpt]"
    
        070        :    Write File Line     : "Form : Ledger_Frm"
        120        :    Write File Line     : $$StrByCharCode:0013
        130        :    Write File Line     : "[Form: Ledger_Frm]"
        140        :    Write File Line     : "Part: Ledger_Prt"
        150        :    Write File Line     : "Height: 40% page"
        160        :    Write File Line     : "Width : 60% page"
        170        :    Write File Line     : "Background: Lily -Yellow"
        180        :    Write File Line     : $$StrByCharCode:0013
     
     
        190        :    Write File Line     : "[Part: Ledger_Prt]"
        210        :    Write File Line     : "Line: Ledger_LnTitle"
        220        :    Write File Line     : "CommonBorder: Yes"
        230        :    Write File Line     : "Scroll : Vertical"
        240        :    Write File Line     : "Float: Yes"
        250        :    Write File Line     : $$StrByCharCode:0013
     
        260        :    Write File Line     : "[Line: Ledger_LnTitle]"
        270        :    Write File Line     : "Field: Empty"
    
        280        :    close target file                
    
        285        :    Load TDL    : ##vAppPath
        290        :    Action    : Trigger Key    : "Ctrl + M"
        310           :     If            : $$LastResult
        320           :         Set        : SVNatLangResponse                : "TDL Loaded"
        330           :     Else        :
        340           :         Set        : SVNatLangResponse                : $$LastError
        350           :     End If
        365           :       Set       : SVNatLangRequestProcessed     : Yes
     
    ;    375            : Refresh TDL
        380        :    return : true   
    
    [Function    : RohitHideReport]
     
    
        Variable    :     vAppPath    : String
    
     
        010       :    Set    : vAppPath    :  $$ApplicationPath + "\RohitTDL.tdl"        
    ;   020       :    Log    : ##vAppPath            
        025       :    Do if    : ( $$isfileexists:##vAppPath) : Unload TDL    : ##vAppPath
        030       :    Do if    : ( $$isfileexists:##vAppPath) : delete file:##vAppPath            
    
    ;  040       :    open file : ##vAppPath: Text : Write : ASCII                
    ;  050       :    truncate file                
    
        110           :     If            : $$LastResult
        120           :         Set        : SVNatLangResponse                : "TDL Unloaded"
        130           :     Else        :
        140           :         Set        : SVNatLangResponse                : $$LastError
        150           :     End If
        160           :           Set       : SVNatLangRequestProcessed     : Yes
    ;    165        :    Load TDL    : ##vAppPath
    ;    170        :    Refresh TDL
        180        :    Trigger Key    : "Ctrl + M"
        190       :    return : true   
        
     
    Rohit Khedar likes this.


  7. Rohit Khedar

    Rohit Khedar Member


    अपने मेहनत करके यह कोड़े मेरे लिए तैयार किया मैं बहुत खुश हूं लेकिन इस कोड को मैं मेरी सभी TDLके अंदर कैसे सेट कर सकता हूं अगर करुंगा तो सभी TDL के अंदर की Title,Field etc. मुझे चेन्ज करने पड़ेंगे इसलिए मैं चाहता हूं कि छोटा सा कोड हो जो मेरी सभी TDL के अंदर सेट कर सकूं

     


  8. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    Its even more simple

    Put your tdl code inside RohitTdl.tdl file and save it to the a folder ( in my code Tally.exe Folder)

    then make changes to following two functions as shown


    Code:
    [Function    : RohitShowReport]
       
    
        Variable    :     vAppPath    : String
    
    ;   005            : Log: "Dev"
        010            :    Set    : vAppPath    :  $$ApplicationPath + "\RohitTDL.tdl"          
      ; 020         :    Log    : ##vAppPath              
        285        :    Load TDL    : ##vAppPath
        290        :    Action    : Trigger Key    : "Ctrl + M"
        310           :     If            : $$LastResult
        320           :         Set        : SVNatLangResponse                : "TDL Loaded"
        330           :     Else        :
        340           :         Set        : SVNatLangResponse                : $$LastError
        350           :     End If
        365           :       Set       : SVNatLangRequestProcessed     : Yes
       
    ;    375            : Refresh TDL
        380        :    return : true  
       
    [Function    : RohitHideReport]
       
    
        Variable    :     vAppPath    : String
    
       
        010       :    Set    : vAppPath    :  $$ApplicationPath + "\RohitTDL.tdl"          
    ;   020       :    Log    : ##vAppPath              
        025       :    Do if    : ( $$isfileexists:##vAppPath) : Unload TDL    : ##vAppPath
     
        110           :     If            : $$LastResult
        120           :         Set        : SVNatLangResponse                : "TDL Unloaded"
        130           :     Else        :
        140           :         Set        : SVNatLangResponse                : $$LastError
        150           :     End If
        160           :           Set       : SVNatLangRequestProcessed     : Yes
    ;    165        :    Load TDL    : ##vAppPath
    ;    170        :    Refresh TDL
        180        :    Trigger Key    : "Ctrl + M"
        190       :    return : true     
        
     
    Rohit Khedar and Hems like this.


  9. Rohit Khedar

    Rohit Khedar Member


    Thank and very nice .
     


Share This Page