Ledger Color

Discussion in 'Tally Developer' started by psr, Feb 26, 2019.

    
  1. psr

    psr Member


    Dear Seniors,

    I am trying to color the ledger name.

    [#Field: LV Title]

    Fields : Simple Prompt, Name Field
    Width : 40% Screen
    Local : Field : Simple Prompt : Info : $$LocaleString:$$SysName:Ledger
    Local : Field : Name Field : Set as : #LedgerName
    Local : Field : Name Field : Style : Normal Bold
    Local : Field : Name Field : Width : 0
    Local : Field : Default : Color : Set as :Blue

    Not getting the ledger color as blue.
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Local : Field : Default : Color : Blue
     


  3. psr

    psr Member


    Thank you sir,

    It is working now.

    How to assign colors to ledgers at ledger creation time?
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    It does not work that way........

    You can't create ledger XYZ...and say...go out...and be born as black/blue/pink/red/yellow etc........

    So rephrase your question...................
     
    Sumit8158 likes this.


  5. psr

    psr Member




    Just for info sir.
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    very good....you can make it......
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Now you make it..............

    This TDL can be made available for Ledgers, Groups, StockItems etc. Also the colors are available in all reports and Vouchers.

    I just made this in a great hurry as a sample project, so not yet coded for other Masters.

    Colors have been incorporated with contrasting Background for highlight view.

    Now you can do it..... let me know your progress.

    MasterNameColor 01.PNG


    MasterNameColor 02.PNG
     
    Last edited: Mar 19, 2019
    psr and Rohit Khedar like this.


  8. Rohit Khedar

    Rohit Khedar Member


    Sir very good..
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    thank you.........:)
     



  10. Very good idea
     



  11. Code:
    [Collection:   vTallyColoursv]
        List    : "Red", "Green", "Blue"
        Title   : "Which Colour"
       
    [System: UDF]
        vTallyColoursv : String : 21159
       
    
    [#Part: MST LED Details]
        Add: Line:vTallyColoursv
       
    
    [Line: vTallyColoursv]
        Field: Short Prompt, vTallyColoursv
        Local: Field: Short Prompt: Set as: "Set Colour"
       
    [Field: vTallyColoursv]
         Use: Name Field
        Storage: vTallyColoursv
    Table       : vTallyColoursv;, Not Applicable
                Show Table     : Always
    
    [#Field: EI Consignee]
       
    Color: @@mydisountdays
    [System: Formula]
       
    mydisountdays : if $vTallyColoursv:Ledger:$PartyLedgerName  CONTAINS "Red"  then "red" else "Blue" 
    i try its but not got succeed
     


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    [System: Formula]
    mydisountdays : if $vTallyColoursv:Ledger:$PartyLedgerName = "Red" then "Red" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "Blue" then "Blue" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "Green" then "Green" else "Black"

    COLOR will come after u save the voucher...............
     



  13. ye wala code to muje pata tha
     



  14. can here is any another code if i want to pass a Voucher then i want to change colour
     


  15. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    why do you need code?? during Voucher entry....when on LedgerName prompt......go to alteration and change the color.
     



  16. i want to know party nature , with colours
     


  17. Jenny

    Jenny Active Member


    Code:
    [Collection:   vTallyColoursv]
        List    : "Red", "Green", "Yellow","Orange"
        Title   : "Colour selection"
     
    [System: UDF]
        vTallyColoursv     : String : 21159
       
    
    [#Part: MST LED Details]
        Add: Line:vTallyColoursv
     
    
    [Line: vTallyColoursv]
    Field: Short Prompt,SampleColor, vTallyColoursv
    Local: Field: Short Prompt: Set as: "Ledger's Font Colour"
    Local: Field: SampleColor: Set as: "SAMPLE  TEXT"
    Local: Field: Short Prompt: Width:20
    Local: Field: Short Prompt: Style:Tiny Bold
    
    [Field: SampleColor]
    Use: Name Field
    Skip : Yes
    Width : 18
    Border : Thin Box
    Widespaced: Yes
    Color: @@myOwnColor ;;;; Not Working (Do not showing color)
    
    [Field: vTallyColoursv]
    Use: Name Field
    Storage: vTallyColoursv
    Table       : vTallyColoursv,Not Applicable
    Show Table     : Always
    Width : 10
    
    
    [#Field: EI Consignee] 
    Color: @@myOwnColor
    
    [#Field: DSP VchAccount]
    Color: @@myOwnColor
    
    
    [System: Formula]
    myOwnColor : if $vTallyColoursv:Ledger:$PartyLedgerName = "Red" then "Red" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "yellow" then "yellow" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "orange" then "orange" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "Green" then "Green" else "Black"
    
    [Color:orange]
    RGB:255,127,0
    
     
    Last edited: Mar 23, 2019


  18. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    please employ basis care in understanding and implementing code............

    Errors as under:
    1. Remove... SampleColor UDF and Storage name ...as it is redundant and no use in this code.

    2. You have specified the Color in FIELD:Sample Color..... and what does COLOR does??? changes the color of the text.......... and where is your text??So input your text in this field.... Set as : "Sample Color" or whatever.
     
    Jenny likes this.


  19. Jenny

    Jenny Active Member


    [Field: SampleColor]
    Use: Name Field
    Set as: "SAMPLE TEXT"
    Skip : Yes
    Width : 18
    Border : Thin Box
    Widespaced: Yes
    Color: #vTallyColoursv
     
    Last edited: Mar 23, 2019


  20. Jenny

    Jenny Active Member


    Now working sir....thanx a lot..
     


  21. Jenny

    Jenny Active Member


    [#Field: AccTypeName];;;;List Of Account;;;;Why not showing in color.....
    Use : Name Field
    Color:mad:@myOwnColo
     


  22. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Field: AccTypeName is wrong field........... u need to target field specific to the report to make it work..........
     


  23. Jenny

    Jenny Active Member


    Why its showing bad formula
    [System: Formula]
    myOwnColor : if $vTallyColoursv:Ledger:$PartyLedgerName = "Red" then "Red" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "MARON" then "MARON" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "orange" then "orange" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "Blue" then "Blue" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "AmericanRose" then "AmericanRose" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "BrilliantRose" then "BrilliantRose" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "ColumbianBlue" then "ColumbianBlue" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "PowderedBlue" then "PowderedBlue" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "Coral" then "Coral" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "CandyAppleRed" then "CandyAppleRed" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "RosyBrown" then "RosyBrown" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "MediumPurple" then "MediumPurple" else +
    if $vTallyColoursv:Ledger:$PartyLedgerName = "Green" then "Green" else "Black"

    [Color:eek:range]
    RGB:255,127,0

    [Color:MARON]
    RGB:123,17,19

    [Color: AmericanRose]
    RGB: 255,3,62

    [Color:brilliantrose]
    RGB:255,85,163

    [Color: ColumbianBlue]
    RGB: 155,221,255

    [Color:powderedBlue]
    RGB:31,159,205

    [Color: Coral]
    RGB: 255,127,80

    [Color: CandyAppleRed]
    RGB: 255,8,0

    [Color:RosyBrown]
    RGB:188,143,143

    [Color:MediumPurple]
    RGB:147,112,219
     


  24. Jenny

    Jenny Active Member


    [#Report: List of Accounts]
     


  25. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Try #vTallyColoursv instead of $vTallyColoursv
     


Share This Page