UPDATE GSTN NUMBER EXISTING ACCOUNT FROM EXCEL

Discussion in 'Tally Developer' started by narayane88, Sep 4, 2020.

    
  1. narayane88

    narayane88 Active Member


    USE EXCEL FIRST COLUMN FOR PARTY NAME & SECOND FOR GSTN
    DATA ROW FROM 2


    [Function:GSTN MODIFY]

    Variable:NIT_GSN:String
    Variable:NIT_PARTYnAME:String
    Variable : RowIndex : Number:2

    010 : Open File : ##VCHFilepathEnter : Excel : Read
    020 : While : NOT $$IsEmpty:$$FileReadCell:##RowIndex:1
    030: Set:NIT_GSN :IF $$IsEmpty:$$FileReadCell:##RowIndex:2 THEN "" ELSE $$FileReadCell:##RowIndex:2
    040: Set: NIT_PARTYnAME:$$FileReadCell:##RowIndex:1
    050: START PROGRESS : 1000000: "UPDATING GSTN" : @@CmpMailName : "UPDATING GSTN ..."+ $$NewLine + "GSTN NO.:"+ $$String:##NIT_PARTYnAME
    055: Modify Object: (ledger, ##NIT_PARTYnAME).GSTRegistrationType:mad:@DEFINERTYPE
    060: Modify Object: (ledger, ##NIT_PARTYnAME).PartyGSTIN:##NIT_GSN

    070 : INCREMENT : RowIndex
    080: Show Progress:##RowIndex
    090: End Progress
    100: End While

    [System:Formulas]
    DEFINERTYPE:IF $$IsEmpty:##NIT_GSN Then "Unregistered" else "Regular"
     
    anish likes this.


  2. anish

    anish Member


    Nice Sharing ! thank you ......
     



  3. will u share for changing voucher udf of batch allocation according to unique name of batchname
     


  4. Harikaran B J

    Harikaran B J New Member


    How to use this code please explain sir ....
     


  5. narayane88

    narayane88 Active Member


    This is for education purpose not complet code modifies with your own code
     


  6. Harikaran B J

    Harikaran B J New Member


    okey Sir Thank You for your reply....
     


  7. Hems

    Hems Member


    Dear sir


    How to update custom UDF in ledger ?

    In this code
    I made this change

    Delete line 055
    Change 060 line

    060: Modify Object: (ledger, ##NIT_PARTYnAME). myudfstorage:##NIT_GSN


    But not change in ledger.

    Please help
     


  8. narayane88

    narayane88 Active Member


    try following
    060: Modify Object: (ledger, ##NIT_PARTYnAME). myudfstorage.myudfstorage:##NIT_GSN
     


  9. Hems

    Hems Member



    I m use your suggestion

    But it not work

    Please any other solution
     


  10. narayane88

    narayane88 Active Member


    Send your code me on narayane88@gmail.com or give pc access
     


  11. Hems

    Hems Member


    This is my code
    And
    Excell file

    Attached
    Code:
    [#Part :LedOtherDetails]
    
    
    Add : Line : hkledtransport
    
    [Line : hkledtransport]
    Fields : Short Prompt, ledtransport
    Local : Field : Short Prompt : info : "Transport- :"
    
    [Field : ledtransport]
    Use : name Field
    Setas : " "
    Storage : ledtransportname
    
    [system : udf]
    ledtransportname : string : 10006
    
    /*
    ;;USE EXCEL FIRST COLUMN FOR PARTY NAME & SECOND FOR GSTN
    DATA ROW FROM 2
    */
    
    [Function:GSTN MODIFY]
    
    Variable:NIT_GSN:String
    Variable:NIT_PARTYnAME:String
    Variable : RowIndex : Number:2
    
    010 : Open File : "excel file hktransportlist.xlsx full path with file name" : Excel : Read
    020 : While : NOT $$IsEmpty:$$FileReadCell:##RowIndex:1
    030: Set:NIT_GSN :IF $$IsEmpty:$$FileReadCell:##RowIndex:2 THEN "" ELSE $$FileReadCell:##RowIndex:2
    040: Set: NIT_PARTYnAME:$$FileReadCell:##RowIndex:1
    050: START PROGRESS : 1000000: "UPDATING GSTN" : @@CmpMailName : "UPDATING GSTN ..."+ $$NewLine + "GSTN NO.:"+ $$String:##NIT_PARTYnAME
    060: Modify Object: (ledger, ##NIT_PARTYnAME).ledtransportname:##NIT_GSN
    
    070 : INCREMENT : RowIndex
    080: Show Progress:##RowIndex
    090: End Progress
    100: End While
    
    
    
    
    
     

    Attached Files:



  12. narayane88

    narayane88 Active Member


    update this line working fine my side
    060: Modify Object: (ledger, ##NIT_PARTYnAME).ledtransportname.ledtransportname:##NIT_GSN
     


  13. Hems

    Hems Member



    thank you very much sir

    its working.
    :):)
     


Share This Page