Free Code : Selected Duplicate

Discussion in 'Free Source Codes' started by Jay kumar tailor, Jul 3, 2019.

    
  1. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Hi All
    Jay Here

    Hope You Will Enjoy This Code.

    With This Code You Can "Duplicate Selected Vouchers".

    Need To Accept First Voucher Only.
    (Will Improve Later)

    Code:
    [#Form: Day Book]
    Add: Button : Dupvch
    
    [#Form: Ledger Vouchers]
    Add: Button : Dupvch
    
    [Button: Dupvch]
    Title: "Duplicate Selected"
    Key: Ctrl+X
    Action: Call : jaydup
    
    
    [Function:jaydup]
        Variable : MSTID : String
        Object  : Voucher : #VchMasterID
    
        01 : WALK COLLECTION : DupJktVouchers
        02 : SET : MSTID : "ID:"+ $$String:$MasterID
        03 : Duplicate : Voucher
        04: Trigger Key : Ctrl+A
        05 : END WALK
       
    
    
    [Collection: DupJktVouchers]
    
    Data Source : Report :Selected
    Fetch : *.*,All Ledger Entries.*,Allinventoryentries.*
    
    
    
     
    Last edited: Jul 4, 2019


  2. sandeep76out

    sandeep76out New Member


    Hi Sir
    how to stop Duplicate Voucher number in purchase Voucher
    like Duplicate Purchase Stopper type any thing plz help
    thank you :)
     


  3. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    set in Voucher type.... "prevent duplicate"
     


  4. sandeep76out

    sandeep76out New Member


    Sir Ji
    i`m using voucher numbering is manual
    this the probl :(
     


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Exactly...when you have selected manual, then there would be an option activated just below it asking...."prevent duplicates"... which is to be set to yes.

    If not appearing, then you must be using a OLD version of Tally.
     


  6. sandeep76out

    sandeep76out New Member


    Sir
    TallyERP ver: 6.5.2
     

    Attached Files:



  7. sandeep76out

    sandeep76out New Member


    tally not allowing to set the prevent duplicates to yes
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    because data is already existing..........

    so you need to make a new voucher type and use it........
     
    panam likes this.


  9. balajimg

    balajimg Active Member


    temporarily use this code and prevent in voucher type masters

    then disable this code

    [#Field: VTYP PreventDups]
    Delete: Skip on
     
    naren1234 likes this.


  10. sohel

    sohel New Member


    @balajimg your short two line helped me a lot. Thanks
     



  11. I have an Customize file for this I will give you
     


  12. Jay kumar tailor

    Jay kumar tailor Well-Known Member


    Code Now Corrected..
    (No Need To Accept First Voucher Manually)

    Code:
    [#Form: Day Book]
    Add: Button : Dupjkvch
    
    [#Form: Ledger Vouchers]
    Add: Button : Dupjkvch
    
    [Button: Dupjkvch]
    Title: "Duplicate Selected"
    Key: Ctrl+X
    Action: Call : jaydup
    
       
    [Collection: DupJktVouchers]
    
    Data Source : Report :Selected
    Fetch: Date, VoucherTypeName, Narration, LedgerEntries.*
    
    [Function: jaydup]
    
        10     : WALK COLLECTION    : DupJktVouchers
        20      :   SET             : SVViewName         : $$SysName:AcctgVchView
        30    :     NEW OBJECT         : Voucher
        40     :     SET VALUE         : Date                : $Date
        50     :     SET VALUE         : VoucherTypeName     : $VoucherTypeName
        60     :     SET VALUE         : Narration         : $Narration
        70     :   SET VALUE       : PersistedView     : ##SVViewName
    
        80    :     WALK COLLECTION : LedgerEntries
        90    :         INSERT COLLECTION OBJECT     : Ledger Entries
        100    :         SET VALUE                     : Ledger Name         : $LedgerName
        110    :         SET VALUE                     : IsDeemedPositive     : $IsDeemedPositive
        120    :         SET VALUE                     : Amount             : $Amount
        130    :         SET TARGET                     : ..
        140    :     END WALK
        150    :     CREATE TARGET
        160    : END WALK
    
        170    : RETURN
    
    ;;End Of Code
     


  13. RajbhandariGopal

    RajbhandariGopal New Member


    This code results no thing in my Tally 6.0.2
     


  14. Murari Bajaj

    Murari Bajaj Member


    Dear Jay this code is not working. If have wormimg code pls send on bajajmola@gmail.com or Whatsaap : 9829014051
    Thanks
     


  15. Ozair Ahmad

    Ozair Ahmad New Member


    I want selected just duplicate for next month with same date.
     


  16. nasir

    nasir Member


    not working in 9.1.1
     


Share This Page