how to deactivate Alt+D key

Discussion in 'Tally Developer' started by anagha, Dec 3, 2013.

    
  1. anagha

    anagha New Member


    sir i have wrote code which locks a particular period. it works fine, except for daybook. In daybook when i press Alt+D it deletes the voucher. My code is as follows please help
    [#Key: BottomToolBarBtn3]
    Option: mytestBottomToolBarBtn3 : @@mytestlockperiod
    [!Key:mytestBottomToolBarBtn3]
    Title : $$LocaleString:"Delete"
    Inactive: @@mytestlockperiod
     


  2. Nirav Merchant

    Nirav Merchant Active Member


    Try Following

    [#Key : Form Delete]
    Inactive:Yes

    [#Key: Delete Line Object]
    Inactive:Yes

    [#Key: Delete Line ObjectEx]
    Inactive:Yes

    [#Key: BottomToolBarBtn3]
    Inactive:Yes

    [#Key: BottomToolBarBtn3_Voucher]
    Inactive:Yes

    [#Key: BottomToolBarBtn3_Delete]
    Inactive:Yes

    [#Line: DSP VchDetail]
    Delete: Key : Delete Line Object
     
    Basha likes this.


  3. Basha

    Basha Member


    hi Nirav after long time i need your email id Please !


    Try This
    [#Key: Delete Line Object]

    Key : Alt+D
    Action : Cancel Object
    ;; Inactive: yes

    [#Key: Delete Line ObjectEx]

    Key : Alt+D
    Action : Cancel Object
    ;; Inactive: yes
     


  4. Basha

    Basha Member


    Dear anagha

    Period Lock



    ;; Small Utility : Period and Opening Balance Locking system
    ;; Version : 1.00
    ;; Compatibility : Tally 7.2 and Tally 9.00

    ;;============================================================================

    [System: UDF]
    TUtil16_UDFStartDt : Date : 40
    TUtil16_UDFEndDt : Date : 41
    TUtil16_BalLock : String : 42


    ;[Collection : MyYesNo]
    ; Title : "Yes/No"
    ; List : "Yes", "No"


    ;;===========================================================================
    ;;For Defining The date locks
    ;;===========================================================================
    [#Menu: Gateway of Tally]
    Add : Bottom Button : BtnDtLock

    [Button: BtnDtLock]
    Title : "Date Lock"
    Key : F8
    Action : Alter : TNRptDateLockDfn

    [Report : TNRptDateLockDfn]
    Family : "Sankalp"
    Title : "Date Lock Configuration"
    Form : TNDateLockDfn
    Object : Company

    [Form : TNDateLockDfn]
    Part : TNPrtDateLockDfnTitle, TNPrtDateLockDfn
    Width : 60% Screen

    [Part : TNPrtDateLockDfnTitle]
    Line : TNLnDateLockDfnTitle
    Border : Thin Bottom

    [Line : TNLnDateLockDfnTitle]
    Fields : Name Field
    Local : Field : Name Field : Full Width : Yes
    Local : Field : Name Field : Align : Centre
    Local : Field : Name Field : Skip : Yes
    Local : Field : Name Field : Set As : "Date Lock Configuration"
    Space top : 1
    Space Bottom : 1

    [Part : TNPrtDateLockDfn]
    Line : TNLnDateLockDfn1, TNLnDateLockDfn2
    Border : Thin Bottom

    [Line : TNLnDateLockDfn1]
    Fields : Medium Prompt, TNFldOpBalLock
    Local : Field : Medium Prompt : Info : "Lock Ledgers Opening Balances?"
    Space top : 1
    Space Bottom : 1

    [Field : TNFldOpBalLock]
    ;; Use : Logical Field
    ;; Set as : $TUtil16_BalLock

    Use : Short Name Field
    Width : @@LogicalWidth
    Max : @@MaxLogicalWidth
    Style : Normal Bold
    Table : YesNoTable
    Show Table : On Error

    Storage : TUtil16_BalLock


    [Line : TNLnDateLockDfn2]
    Fields : Long Prompt, TNFldOpStartDt, Short Prompt, TNFldOpEdnDt
    Local : Field : Long Prompt : Info : "Allow Entry/Modifications only for the Period From:"
    Local : Field : Short Prompt : Info : "To:"
    Local : Field : Long Prompt : Width : 50
    Local : Field : Short Prompt : Width : 4
    Space Bottom : 1

    [Field : TNFldOpStartDt]
    Use : Short date field
    Set as : $TUtil16_UDFStartDt
    Storage : TUtil16_UDFStartDt

    [Field : TNFldOpEdnDt]
    Use : Short date field
    Set as : $TUtil16_UDFEndDt
    Storage : TUtil16_UDFEndDt


    ;;======================================================================================================

    [System : Formula]
    TUtil16_StartDt : $TUtil16_UDFStartDt:Company:##SVCurrentCompany
    TUtil16_EndDt : $TUtil16_UDFEndDt:Company:##SVCurrentCompany
    TUtil16_Control1 : "Period is closed !"+$$NewLine+"Creation is not allowed."
    TUtil16_Control2 : "Period is closed !"+$$NewLine+"Alteration is not allowed."

    TUtil16_Control3 : "Period is closed !"+$$NewLine+"Deletion is not allowed."
    TUtil16_Control4 : "Date not allowed !"+$$NewLine+"Open period is between" + $$Newline + $$String:mad:@TUtil16_StartDt + " and " + $$String:mad:@TUtil16_EndDt

    TUtil16_DtIsOpen : $Date >= $TUtil16_UDFStartDt:Company:##SVCurrentCompany AND $Date <= $TUtil16_UDFEndDt:Company:##SVCurrentCompany
    TUtil16_EffDtIsOpen : $EffectiveDate >= $TUtil16_UDFStartDt:Company:##SVCurrentCompany AND $EffectiveDate <= $TUtil16_UDFEndDt:Company:##SVCurrentCompany


    TUtil16_VchrCreation : $$InCreateMode AND NOT @@TUtil16_DtIsOpen
    TUtil16_VchrAlter : $$InAlterMode AND (NOT @@TUtil16_DtIsOpen OR NOT @@TUtil16_EffDtIsOpen)
    OpBalLock : $TUtil16_BalLock:Company:##SVCurrentCompany = "Yes"


    [#Key : Delete Line Object]
    Inactive : Not @@TUtil16_DtIsOpen

    [#Key: Cancel Line Object]
    Inactive : Not @@TUtil16_DtIsOpen



    [#Key : Form Delete]
    Inactive : (NOT $$CanDelete) OR (NOT @@TUtil16_DtIsOpen)

    [#Key : Form Cancel]
    Inactive : (NOT $$CanCancel) OR (NOT @@TUtil16_DtIsOpen)


    [#Form: Voucher]
    Local : Key : Form Delete : Inactive : NOT @@TUtil16_DtIsOpen
    Local : Key : Delete Line Object : Inactive : NOT @@TUtil16_DtIsOpen
    Local : Key : Form Cancel : Inactive : NOT @@TUtil16_DtIsOpen
    Add : Control : TUtil16_Control1 : NOT ($$Value >= $TUtil16_UDFStartDt:Company:##SVCurrentCompany AND $$Value <= $TUtil16_UDFEndDt:Company:##SVCurrentCompany )
    Add : Control : TUtil16_Control2 : @@TUtil16_VchrAlter


    [#Field: Chg SVDate]
    Add : Control : TUtil16_Control4 : NOT ($$Value >= $TUtil16_UDFStartDt:Company:##SVCurrentCompany AND $$Value <= $TUtil16_UDFEndDt:Company:##SVCurrentCompany )

    ;[#Field: Chg VchDate]
    ; Add : Control : TUtil16_Control1 : NOT ($$Value >= $TUtil16_UDFStartDt:Company:##SVCurrentCompany AND $$Value <= $TUtil16_UDFEndDt:Company:##SVCurrentCompany )


    [#Field: Plain VCH Date]
    Add : Control : TUtil16_Control4 : NOT ($$Value >= $TUtil16_UDFStartDt:Company:##SVCurrentCompany AND $$Value <= $TUtil16_UDFEndDt:Company:##SVCurrentCompany )

    ;;[#Key: PrintButton]
    ;; Inactive : If $$IsVoucher AND $$InCreateMode Then Yes else No

    [#Line: DSP VchDetail]
    Local : Key : Delete Line Object : Inactive : NOT @@TUtil16_DtIsOpen
    Local : Key : Cancel Line Object : Inactive : NOT @@TUtil16_DtIsOpen


    [#Line: STKVCH NormalDetail]
    Local : Key : Delete Line Object : Inactive : NOT @@TUtil16_DtIsOpen
    Local : Key : Cancel Line Object : Inactive : NOT @@TUtil16_DtIsOpen

    [#Line: STKVCH InTRACKLead]
    Local : Key : Delete Line Object : Inactive : NOT @@TUtil16_DtIsOpen
    Local : Key : Cancel Line Object : Inactive : NOT @@TUtil16_DtIsOpen


    [#Line: STKVCH OutTRACKLead]
    Local : Key : Delete Line Object : Inactive : NOT @@TUtil16_DtIsOpen
    Local : Key : Delete Line Object : Inactive : NOT @@TUtil16_DtIsOpen
    Local : Key : Cancel Line Object : Inactive : NOT @@TUtil16_DtIsOpen


    ;;=================================================
    ;; Lock Opening Balance
    ;;=================================================

    [#Field: LED Opening]
    Skip : @@OpBalLock

    [#Field: MultiLEDOpening]
    Skip : @@OpBalLock


    [#Field: LED OpeningDr]
    Skip : @@OpBalLock

    [#Field: MultiLEDOpDrCr]
    Skip : @@OpBalLock


    [#Field: LEDALLOC Amt]
    Skip : @@OpBalLock

    [#Field: LEDALLOC DrCr]
    Skip : @@OpBalLock


    ;;LED Opening, LED OpeningDr
     
    Pritam Krishna likes this.


  5. Anagha Walanju

    Anagha Walanju New Member


    thanks Nirav and basha
    code works. actually i missed this line
    [#Key: Delete Line ObjectEx]
    Inactive:Yes

    my code works perfer till version 9.3.7 and it stop after that version. anyway thanks for your prompt help
     


  6. Hemant ARora

    Hemant ARora New Member


    Please guide how to lock specific voucher like sales, purchase, receipt, payment, contra etc.

    It is most important for VAT purpose sales purchase can not change after file monthly or quarterly return filed.

    and

    also most important for Bank entry / modification not allowed after bank reco.

    guide me how to lock specific voucher
     


  7. ramesh

    ramesh New Member





    How to activate delete and cancel buttons on tally all voucher entry screens
     


Share This Page