Optional Line based on company

Discussion in 'Tally Developer' started by Rupal Agarwal, Sep 29, 2021.

    
  1. Rupal Agarwal

    Rupal Agarwal Member


    Hello everyone,

    I have created an optional line in my tally below narration
    Now I want to make that line optional only in one company
    and if other company is opened, this will show other line ( [Line:RAL] )

    My code is given below :

    Code:
    [#Part: VoucherNarr]
    Add:Line:At End:CUser
    
    [Line:CUser]
        Option:RAIDPASS : @@logic
      
    [!Line:RAIDPASS]
        Field:IDPASS
        [Field:IDPASS]
            Set as:"Your ar using Correct Company (JKM Productions)"
            Full Width:Yes
            Align:Center
            Skip: Yes
    
    [System:Formulae]
        logic : if @@newcom = "M/S JKM Productions"  then @@newcom = "M/S JKM Productions" else #RAF
        newcom: $Name:Company:##SVCurrentCompany
    
    [Line:RAL]
        Field:RAF
        [Field:RAF]
            Set as:"Please swith to default company"
    Currently, this is showing me an error (in other companies) :

    Screenshot (12).png
     


  2. PANKAJ BHONDLE

    PANKAJ BHONDLE Active Member


    Add option in part level
     
    Rupal Agarwal likes this.


  3. Rupal Agarwal

    Rupal Agarwal Member


    Thanks its working now :D
     


Share This Page