How to alter voucher narration using masterID

Discussion in 'Tally Developer' started by software tech, May 20, 2021.

    
  1. software tech

    software tech New Member


    Hello all, I am trying to modify voucher narration using voucher master ID.
    Earlier it works fine, but it not working now, don't know why.
    Any suggestion on where it went wrong?

    Code:
    [#Menu:GateWayOfTally]
        Add:Item:AlterVch:Call:VchAlteration
       
    [Function:VchAlteration]
        Variable:pvchId:String:"ID:8"
        00:Set Object:Voucher:##pvchId
        01:Set Target:.
        02:Set Value:Narration:"modified narration"
        03:Save Target
        04:Accept Object
    
    
     


  2. software tech

    software tech New Member




  3. Try This,

    [#Menu:GateWayOfTally]
    Add:Item:AlterVch:Call:VchAlteration

    ;[Function:VchAlteration]
    ;
    ; Variable:pvchId:String:"ID:8"
    ;
    ; 00:Set Object:Voucher:##pvchId
    ; 01:Set Target:.
    ; 02:Set Value:Narration:"modified narration"
    ; 03:Save Target
    ; 04:Accept Object

    [Function:VchAlteration]

    Variable: VCHAID : String

    001 : Set : VCHAID : "ID:" + $$String:"8"
    010 : Call: VchAlterationNarration

    [Function: VchAlterationNarration]

    Object : Voucher : ##VCHAID

    100 : Set Target
    110 : Set Object
    120 : Set Value : Narration : "modified narration"
    130 : Accept Alter
     


  4. software tech

    software tech New Member


    Thanks, @Aldrin Prabhakaran, it worked for me.
     


Share This Page