Receipt, Payment, Journal Button Not Working with Option (Tally.ERP9)

Discussion in 'Free Source Codes' started by ROHIT JAISWAR, Jan 26, 2022.

    
  1. ROHIT JAISWAR

    ROHIT JAISWAR Active Member


    Code Explanation
    I have Created this for Optional & Regular of Voucher at Admin level
    if Admin Will Create any Voucher then it will save as Regular but when user Creating any voucher then by default it will save as optional
    Code is working fine for sales, purchase, sales order, contra button

    for On Load Menu
    Code:
    [#Report: Accounting Voucher]
       
        Add        :    Option    :    VCHREG_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
       
    [#Report: Order Voucher]
       
        Add        :    Option    :    VCHREG_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
       
    [#Report: Inventory Voucher]
       
        Add        :    Option    :    VCHREG_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
    for On Button Event
    Code:
    [#Button:VCH AcctButton]
       
        Add        :    Option    :    VCHAcctButton_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
       
    [!Button:VCHAcctButton_AUTO]
       
    Action List    :    VCHAcctButtonSetOptionalModeFlag
    
    [Button:VCHAcctButtonSetOptionalModeFlag]
       
        Key : F1
        Action : Call : AUTOVCHSETFUNC
       
    [#Button: VCH InvButton]
       
        Add        :    Option    :    VCHInvButton_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
       
    [!Button:VCHInvButton_AUTO]
       
    Action List    :    VCHInvButtonSetOptionalModeFlag
    
    [Button:VCHInvButtonSetOptionalModeFlag]
       
        Key : Alt + F1
        Action : Call : AUTOVCHSETFUNC
       
    [#Button: VCH OrdButton]
      
    Add        :    Option    :    VCHOrdButton_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
       
    [!Button:VCHOrdButton_AUTO]
       
    Action List    :    VCHOrdButtonSetOptionalModeFlag
    
    [Button:VCHOrdButtonSetOptionalModeFlag]
       
        Key : Ctrl + F2
        Action : Call : AUTOVCHSETFUNC
       
    
    [#Button:  Sales Button]
       
        Add        :    Option    :    Sales_Button_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
       
    [!Button:Sales_Button_AUTO]
       
    Action List    :    SetOptionalModeFlag
    
    [Button:SetOptionalModeFlag]
       
        Key : F8
        Action : Call : AUTOVCHSETFUNC
       
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; sales button auto end;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
    [#Button:  Purchase Button]
       
        Add        :    Option    :    Purch_Button_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
       
    [!Button:Purch_Button_AUTO]
       
    Action List    :    SetOptionalModeFlagPurch
    
    [Button:SetOptionalModeFlagPurch]
       
        Key : F9
        Action : Call : AUTOVCHSETFUNC
    function for optional/regular
    Code:
    [Function:AUTOVCHSETFUNC]
       
        20    :    Trigger Key    :    Ctrl + L
    not working for these buttons
    Code:
    [#Button:  Receipt Button]
       
        Add        :    Option    :    Receipt_Button_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
    ;    Key         : F6
    ;    Title       : $$LocaleString:"Receipt"
    ;    ActionList  : PRVVchType,VCHAccounts, SetChgReceipt, SetReceiptType, Set Default Class,Receipt_Button_AUTO
    ;    Inactive    : ((@@NumReceipt = 1) AND (@@IsReceipt)) OR NOT @@IsReceiptVchAllowed
        ;Background:red
       
    [#Button:  Normal Receipt Button]
        
        Add        :    Option    :    Receipt_Button_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
       
    [Button:Receipt_Button_AUTO]
       
    Action List    :    SetOptionalModeFlagReceipt
    
    [Button:SetOptionalModeFlagReceipt]
       
        Key : F6`
        Action : Call : AUTOVCHSETFUNC:($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
       
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; receipt button end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
    [#Button:  Payment Button]
       
        Add        :    Option    :    Payment_Button_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
       
    [!Button:Payment_Button_AUTO]
       
    Action List    :    SetOptionalModeFlagPayment
    
    [Button:SetOptionalModeFlagPayment]
       
        Key : F5`
        Action : Call : AUTOVCHSETFUNC
       
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; payment button end ;;;;;;;;;;;;;;;;;;;;;;;;;;
       
    [#Button:  Journal Button]
       
        Add        :    Option    :    JRNL_Button_AUTO    :     ($$IsOwner or $$IsCmpOwner) AND $$InCreateMode
       
    [!Button:JRNL_Button_AUTO]
       
    Action List    :    SetOptionalModeFlagJRNL
    
    [Button:SetOptionalModeFlagJRNL]
       
        Key : F7`
        Action : Call : AUTOVCHSETFUNC
     
    naren1234 likes this.



  2. Key : F6`

    Did You check these keys as they have inverted commas ( ' ) after the numbers. Remove them and check once. If not working them mail me at tech4vishal@gmail.com.
     
    naren1234 and ROHIT JAISWAR like this.


  3. ROHIT JAISWAR

    ROHIT JAISWAR Active Member


    Thank you So Much Vishal Sir , After Removing (') its working well
     


Share This Page