please help me how to notify duplicate stock item

Discussion in 'Tally Developer' started by abhinand vk, Aug 3, 2021.

    
  1. abhinand vk

    abhinand vk Active Member


    upload_2021-8-3_20-11-49.png

    [#Field:VCh Stockitem]
    Notify:dUPICATE:($stockitemname = #VChStockitem)


    [System : Formula]
    dUPICATE :" Duplicate Stockitem entry "
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    What is the issue ? code seems to be working.
     


  3. abhinand vk

    abhinand vk Active Member


    sir, I want to notify if the stock item name was duplicate entered in the same voucher how to do this in the above code always notify when we select the stock item selecting
    I need when we select a stock item in a voucher more than one time I wand notify it, sir, any solution for it
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    As per images above, it seems to be working....or not??
     


  5. abhinand vk

    abhinand vk Active Member


    sir, it is not working always showing that notification when I select stockitem

    i wand-like the attribute unique for notify
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    That is because your condition is wrong.........

    U need 3 formulas........
    1 - stockitemcheck to find if $Stockitem name = reqObj......
    2 - Isitemexists--- use filtercount by using above condition and if it is greater than 1 --- i.e. duplicate exists.
    3 - error message string ---- "Item already selected before" or whatever you need.

    then use notify----- Notify : "error message string" : @@isitemexists
     
    naren1234 and HVPatel like this.


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Also .... this is a wrong referral........[#Field:VCh Stockitem]

    please study the above field and find the OPTION and the correct field name.
     


  8. abhinand vk

    abhinand vk Active Member


    thank you, sir
    problem solved
     
    Last edited: Aug 3, 2021


  9. S k singh

    S k singh New Member


    Can anyone rectify the code ? please !
     

    Attached Files:



  10. PANKAJ BHONDLE

    PANKAJ BHONDLE Active Member


    [#Field:VchStockItem]
    Notify:DuplicateItem:mad:@IsItemExist

    [System:Formula]
    ;StockItemCheck:$StockItemName=#VchStockItem
    StockItemCheck:$StockItemName = $$ReqObject:$StockItemName
    IsItemExist:$$FilterCount:InventoryEntries:StockItemCheck>1
    DuplicateItem:"Item Already Exist"
     
    naren1234 and Adeshwar Mehta like this.


  11. S k singh

    S k singh New Member


    Thank you sir
    But Not getting notified when selecting an item twice :(
     


  12. Access

    Access Member


    its working
     


  13. S k singh

    S k singh New Member


    Oh... Sorry sorry sorry.. there was typing mistake :)
    Thanks for helping me :D
     


  14. Rajsrisrimal

    Rajsrisrimal Member


    can you post correct code if possible
     


  15. S k singh

    S k singh New Member


    Correct code is already posted by Mr Pankaj Bhondle
     



  16. @Pankajji.. What do we need to add and where to ensure that this works only when the voucher type is Sales...For the rest it should be allowed..



     


  17. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Add your condition of SALES voucher in addition to the existing condition of "StockItemCheck"
     
    naren1234 likes this.



  18. [#Field : Vch StockItem]
    Unique : Yes
    Width : 60% Page


    I am currently using this.. would there be a simpler way .. Since I am editing a field, i am guessing I cant add a filter here.. But Probably I am guessing that I should make the changes in the Accounting Voucher Report for Sales??

    Is that right ?


     



  19. Tried But hit all Dead Ends.. Can anyone guide how to use the Unique Item only in the Sales Vouchers ??
     


Share This Page