Recycle the deleted entries

Discussion in 'Free Source Codes' started by vinayprasad.Dubai, Nov 1, 2018.

    

  1. hai,

    Can any one help me to write the program of Recycling of deleted transactions in Tally.

    Regards
    Vinay
    Dubai-UAE
     


  2. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Already available on forum. Please Search forum .
     


  3. mpal2311

    mpal2311 Active Member


    ;;=========== Recycle Bin


    [System: Variable]
    RecycleBinFlag: "No"
    IsRestoreMode: "No"
    lConfirmation: "No"

    [System: Formula]
    locRecyclebin : $$LocaleString:"Recycle Bin"

    [System: UDF]
    fldDeleted: Logical : 1

    [Variable: RecycleBinFlag]
    Type: Logical
    Volatile: Yes
    Persistent: No

    [Variable: IsRestoreMode]
    Type: Logical
    Volatile: No
    Persistent: no

    [Variable: lConfirmation]
    Type: Logical
    Persistent: No
    Volatile : Yes
    Default: No

    [#Menu: GatewayofTally]
    Add: Item: Before:Reports: @@locRecyclebin :Display :Rpt Deleted Vouchers :NOT $$IsEmpty:$$SelectedCmps
    Add: Item: After: @@locRecyclebin: Blank
    Control :mad:@locRecyclebin: $$Allow:Create:Vouchers

    [Report: Rpt Deleted Vouchers]
    Use: Voucher Register
    Title : "Recycle Bin"
    Local: Line: DSP Vchdetail: Empty: NOT $fldDeleted
    Set: FamilyVoucherFlag: Yes
    Set: IsRestoreMode: Yes
    Set: SV To Date : $$YearEnd:##SVCurrentDate
    Set: lConfirmation: Yes

    [#Form: Voucher]
    Local: Line : VCH NarrPrompt: Add: Fields: Recycle Bin
    Set Always: RecycleBinFlag: If ##IsRestoreMode then ##RecyclebinFlag else No

    [Field: Recycle Bin]
    Use: Logical field
    Storage: fldDeleted
    Set as: If ##IsRestoreMode then No else ##RecyclebinFlag
    ;; If this is removed it does not work
    Set Always: Yes
    Type: Logical
    Invisible: Yes

    [#Collection: DayBook Vouchers of Company]
    Fetch : fldDeleted


    ;;======================
    ;;ALT+D provisions
    ;;======================
    ;;Account Info >> Ledger >> Alter >> Alt+D
    ;;Display >> Daybook >> SelectAnyVoucher >> Enter >> Alt+D
    ;;Display >> Account Books >> Ledger >> SelectLedger >> SelectAnyVoucher >> Enter >> Alt+D
    ;;----------------------------------------------------------------------------------------

    [#Key: BottomToolBarBtn3_Delete]
    Title : $$LocaleString:"Delete"
    Option: RbinFormDelete: if ($$IsVoucher AND @@IsRBinOn AND NOT ##IsRestoreMode) then Yes else No

    ;;Change the functionality of Alt+D in Daybook. Instead of deleting, alter / open the voucher
    [#Key: BottomToolBarBtn3]
    Title : $$LocaleString:"Delete"
    Option: RbinDeleteLineObject: @@IsRBinOn ;;Yes

    ;;Unknown
    [#Key: BottomToolBarBtn3_Voucher]
    Title : $$LocaleString:"Delete_Voucher"
    Option: RbinFormDelete: @@IsRBinOn ;;Yes
    ;;Required for Display >> Account Books >> Ledger
    ;;Required for Display >> Account Books >> Group Vouchers
    [#Key: Delete Line Object]
    Key : Alt+D
    Option: RbinDeleteLineObject: @@IsRBinOn ;;Yes

    ;;Required for Display >> Account Books >> Ledger
    ;;Required for Display >> Account Books >> Group Vouchers
    [#Key: Delete Line ObjectEx]
    Key : Alt+D
    Option: RbinDeleteLineObject: @@IsRBinOn ; Yes
    ;;Optional definition
    [!Key: RbinFormDelete]
    Key: Alt+D
    Action: Alter: Rpt Confirmation

    ;;Optional definition
    [!Key: RbinDeleteLineObject]
    Key: Alt+D
    Action: Alter Object : @@IsRBinOn

    ;;========================
    ;;CTRL+R - Restore Voucher
    ;;========================
    [Key: Restore from Bin]
    Key: CTRL+R
    Action: Alter Object : @@IsRBinOn

    ;;====================================================
    ;;Display dialog box and prompt user to Delete Voucher
    ;;====================================================
    [Report: Rpt Confirmation]
    Add: Form: frm Confirmation
    Variable: lConfirmation
    Set: lConfirmation: Yes
    Title: "Confirm"

    [Form: frm Confirmation]
    Add: Part: Prt Heading,Prt Title, Prt YesNo
    Add: Bottom Part: Prt Caption
    Full Width : No
    No Confirm : Yes
    Space Left : 5
    Space Right : 5
    Space Top : 2
    Space Bottom: 1
    Width: 50% screen
    Height: 50% screen

    [Part: Prt Heading]
    Horizontal Align: Centre
    Lines : ln Heading

    [Part: Prt Title]
    Horizontal Align: Centre
    Lines : Form SubTitle
    Local : Field : Form SubTitle : Info : $$LocaleString:"Delete Voucher [Yes/No]"

    [Part: Prt YesNo]
    Horizontal Align: Centre
    Lines : ln Confirmation

    [Part: Prt Caption]
    Horizontal Align: Centre
    Lines : ln Caption1

    [Line: ln Heading]
    Add: Field : fldHeading

    [Line: ln Confirmation]
    Add: Field: fldConfirmation,fldRecyclebinFlag,fldOptionalFlag

    [Line: ln Caption1]
    Add: Field: fldCaption1

    [Field: fldConfirmation]
    Use: Logical Field
    Set as: ##lConfirmation
    Modifies: lConfirmation

    [Field: fldRecycleBinFlag]
    Use: Logical Field
    Set as: #fldConfirmation
    Set Always: Yes
    Modifies: RecycleBinFlag
    Skip: Yes
    Invisible: Yes

    [Field: fldOptionalFlag]
    Use: Logical Field
    Set as: #fldConfirmation
    Set Always: Yes
    Modifies: OptionalFlag
    Skip: Yes
    Invisible: Yes

    [Field: fldHeading]
    Info: "Recycle-bin for Tally"

    [Field: fldCaption1]
    Info: "Email to xxxxxxxx@gmail.com"

    ;;==========================================================
    ;;Report Daybook must display vouchers which are not deleted
    ;;==========================================================
    [#Report: Daybook]
    Local: Line: DSP VchDetail: Empty : $fldDeleted
    Set: IsRestoreMode: No

    [#Report: Ledger Vouchers]
    Local: Line: DSP VchDetail: Empty : $fldDeleted
    Set: IsRestoreMode: No

    [#Line: DSP VchDetail]
    Add: Option: DSP VchDetail Restore: $fldDeleted

    [!Line: DSP VchDetail Restore]
    Add: Keys: Restore from Bin


    ;;====================================================================================
    ;; Field VCH Optional
    ;; ------------------
    ;; 1) Mark Voucher as Deleted
    ;; 2) Restore Deleted Voucher
    ;;=====================================================================================
    ;; Show message "Voucher is Marked for Deletion. Press any key." - Voucher entry screen
    ;;=====================================================================================
    [#Field: VCH Optional]
    Option: Rbin VCH Delete: ##OptionalFlag and NOT ##IsRestoreMode
    Option: Rbin VCH Restore: ##OptionalFlag and ##IsRestoreMode

    [!Field: Rbin VCH Delete]
    ;;Mark voucher as deleted
    ;;=======================
    Style: My Style
    Set as: if #Recyclebin then "Press ENTER-KEY to send this voucher to the RECYCLE-BIN." else @UseOptStr
    Skip: if #Recyclebin then No else Yes
    Color : Red

    [Style: My Style]
    Font: Verdana
    Height: 18
    Bold: Yes

    [!Field: Rbin VCH Restore]
    ;;Restore the Voucher
    ;;===================

    Add: Fields: Long Prompt,fldConfirmation,SetRecyclebinFlag,SetRecyclebinField,SetOptionalFlag,SetOptionalField
    Local: Field: Long Prompt: Info: "About to RESTORE Voucher. Press ENTER-key to confirm."
    Local: Field: Long Prompt: Full Width: Yes
    Local: Field: Long Prompt: Align: Right
    Local: Field: Long Prompt: Style: My Style
    Color : Blue

    [Field: SetRecyclebinFlag]
    Use: Logical field
    Type: Logical : Forced
    Modifies: RecyclebinFlag
    Set as: NOT #fldConfirmation
    Set Always: Yes ;; If this is removed it does not work
    Invisible: Yes
    Skip: Yes

    [Field: SetRecyclebinField]
    Use: Logical field
    Type: Logical
    Storage: fldDeleted
    Set as: #SetRecyclebinFlag
    Set Always: Yes ;; If this is removed it does not work
    Invisible: Yes
    Skip: Yes

    [Field: SetOptionalFlag]
    Use: Logical field
    Type: Logical
    Modifies: OptionalFlag
    Set as: #SetRecyclebinFlag
    Set Always: Yes ;; If this is removed it does not work
    Invisible: Yes
    Skip: Yes

    [Field: SetOptionalField]
    Use : Logical Field
    Storage : Is Optional
    Set as : #SetOptionalFlag
    Set always : Yes
    Invisible : Yes
    Skip : Yes

    ;;================================================
    ;; Modify Voucher entry screen
    ;;================================================
    [#Form: Voucher]
    Option: RbinVoucher: ##OptionalFlag

    [!Form: RbinVoucher]
    Key: SaveVoucher

    [Key: SaveVoucher]
    Key: Enter
    Action: Form Accept

    [#Field: Plain VCH Date]
    Option: Rbin Plain VCH Date: ##OptionalFlag

    [!Field: RBin Plain VCH Date]
    Skip: if #RecycleBin then Yes else No
     



  4. could not find original description for [#Key: BottomToolBarBtn3_Voucher]

    Please check and clarify

    thank you
     



  5. Not Working .../
     


  6. subash pal

    subash pal Member


    It works with Erp perfectly and Prime after minor modification
     


  7. Arun Prasath

    Arun Prasath Member


    What sort of modification required in tally prime?
     


  8. Access

    Access Member


    Which modification required ???
     


Share This Page