Function to Open specific Voucher entry screen after company Loaded.

Discussion in 'Requests' started by zakirhossain_diu, Oct 31, 2019.

    

  1. Dear Admin & expert,
    I want to open the sales entry form Just after the loading company.
    Trying with below codes but getting error. Any suggesion highly expected.

    Thank you

    Code:
    [System: Events]
    
    ;; System Start Event
    
        TSPL Smp AppStartEvent    : System Start     : NOT $$IsRemoteCompany             : Call         : OnFocus Sales Voucherx
    
    [Function: OnFocus Sales Voucherx]
        Variable    : IsOnFocusDemo    : Logical    : Yes
            00    : Create: OnFocus Sales Voucherx
    
    [Report: OnFocus Sales Voucherx]
        Use        : Voucher
        Form    : Voucher
        Set     : SVVoucherType        : Sales
        Set     : InvoicingModeFlag : Yes
    
     


  2. teja varma

    teja varma Active Member


    Code:
    [System:Events]
        VoucherHandler:Load Company:Yes:Call:setsales
       
    [Function:setsales]
        Variable:SvVoucherType
        01:Set:SvVoucherType:$$VchTypeSales
        02:Create:AccountingVoucher
        03:Return
     



  3. Thank you so much.
     



  4. Dear robit,
    As per rules you should create new threads instead of replying another thread. Query can be placed under TD request section. Hopping that way you can get a reply. By the way you have to modify existing part of your desired report to add new part.
    Thank you
     



  5. Use event
     
    zakirhossain_diu likes this.



  6. its nice but i m using voucher class in sales how can i
     


  7. teja varma

    teja varma Active Member


    use this to set class:
    Code:
    [System:Events]
        VoucherHandler:Load Company:Yes:Call:setsales
    
    [Function:setsales]
        Variable:SvVoucherType
        Variable:defaultvchclass:String
        01:Create:AccountingVoucher
        02:Set:SvVoucherType:$$VchTypeSales
        03:Set:defaultvchclass:"GST";;replace with your class
        04:Set Value:ClassName:#defaultvchclass
     
        05:Return
     
    zakirhossain_diu likes this.



  8. not work
     


  9. teja varma

    teja varma Active Member


    its working on my system
    what error you are getting?
     



  10. Dear teja varma,
    i am using on Release 6.4.6 & getting the following error.

    [Function:Inventory Transfer vch]
    Variable:SvVoucherType
    Variable:defaultvchclass:String
    01:Create:InventoryVoucher
    02:Set:SvVoucherType:"Trannsfer to Floor" ;$$VchTypeStockJrnl $$VchTypeSales
    03:Set:defaultvchclass:"Transfer";;replace with your class
    04:Set Value:ClassName:#defaultvchclass
    05:Return
    upload_2020-3-11_2-44-27.png
     


  11. teja varma

    teja varma Active Member


    This is because voucher type not found so while setting classname it throws an error
    attach the screenshots of voucher type that your are using to evaluate
     



  12. Dear Teja Varma,
    Thank you for reply. Below are the voucher type i have created.
    upload_2020-3-12_0-9-28.png
     


  13. teja varma

    teja varma Active Member


    Code:
    [Function:Inventory Transfer vch]
    Variable:SvVoucherType
    Variable:defaultvchclass:String
    01:Set:SvVoucherType:"Trannsfer to Floor" 
    02:Create:InventoryVoucher
    03:Set:defaultvchclass:"Transfer"
    04:Set Value:ClassName:##defaultvchclass
    05:Return
    
    set voucher type name before creating voucher..
     
    zakirhossain_diu likes this.



  14. Hi Sir,
    Thank you for your response.
    It's working now as I was demanded. Thanks a lot.
     


  15. Neeru

    Neeru Active Member


    Dear Sir,

    I want to open form when i alter Sales Entry from customize report.. any suggestion and code.

    Thank you.
     
    Last edited: May 3, 2020


  16. pravin bhau

    pravin bhau New Member


    Hello Sir,

    Can I Call The Function Automatically Except Loading the Company for Importing the Excel to Tally ?
     


  17. sivam

    sivam Active Member


    Then When you want to call the function..?
     


Share This Page