TDL: ADDITIONAL COLUMN IN INVOICE WITH PRINT

Discussion in 'General Discussions' started by Nishant Agrawal, Feb 11, 2024.

    
  1. Nishant Agrawal

    Nishant Agrawal New Member


    Respected Experts,

    I am using this below code for having an additional column with value in my sales and purchase invoice, but ought to what reason that value is not being reflected in printing, please guide:

    [#Line: EI ColumnOne]
    Add : Right Fields : Before : VCH QtyTitle : sms col1
    Local : Field : sms col1 : Info : "Make"
    [#Line : EI InvInfo]
    Add : Right Fields : Before : VCH ActualQty : sms col1

    [Field : sms col1]

    Use : Name Field
    Type : Forced
    Storage : smscol1
    Set Always : Yes
    Width : 10
    Align : Center
    Invisible : not@@ISSales @@ISPurchase

    [System : UDF]
    sms col1 : String : 6500

    [#Line: EXPINV Column1]

    Add : Left Fields : After : EXPINV DescTitle : sms col1

    Local : Field : sms col1 : Info : "Make"
    Local : Field : sms col1 : Delete: Storage
    Local : Field : sms col1 : Type : String
    Local : Field : sms col1 : Align : Center
    Local : Field : sms col1 : Width : 10
    Local : Field : sms col1 : Border: thinleft

    [#Line: EXPINV InvDetails]

    Add : Left Fields : After : EXPINV Desc : sms col1 Print

    [Field : sms col1 Print]

    Use : Name Field
    Type : Forced
    Set as : $smscol1
    Set Always : Yes
    Width : 10
    Align : Center
    Border : thinleft
     

    Attached Files:



  2. Nishant Agrawal

    Nishant Agrawal New Member


    guys i am using this code for Tally Prime 4.0
     


  3. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    Field name and udf name conflict, should not be same
     


  4. Mahesh Sethi

    Mahesh Sethi Member



    [#Line: EI ColumnOne]

    Add : Right Fields : Before : VCH QtyTitle : sms col1
    Local : Field : sms col1 : Info : "Make"

    [#Line : EI InvInfo]

    Add : Right Fields : Before : VCH ActualQty : sms col1

    [Field : sms col1]

    Use : Name Field
    ; Type : Forced
    Storage : smscol1
    Set Always : Yes
    Width : 10
    Align : Center
    Inactive : not @@ISSales OR @@ISPurchase

    [System : UDF]
    sms col1 : String : 6500


    [#Line: EXPINV Column1]

    Add : Left Fields : After : EXPINV DescTitle : sms col1

    Local : Field : sms col1 : Info : "Make"
    Local : Field : sms col1 : Delete: Storage
    Local : Field : sms col1 : Type : String
    Local : Field : sms col1 : Align : Center
    ;; Local : Field : sms col1 : Width : 10
    Local : Field : sms col1 : Border: thinleft

    [#Line: EXPINV InvDetails]

    Add : Left Fields : After : EXPINV Desc : sms col1Print

    [Field : sms col1Print]

    Use : Name Field
    ;; Type : Forced
    Set as : $smscol1
    Set Always : Yes
    Width : 10
    Align : Center
    Border : thinleft
     


  5. Nishant Agrawal

    Nishant Agrawal New Member


    Thanks for your valuable time, I have amended the names for UDF and field, but the issue still remains the same, pls suggest.

    [#Line: EI ColumnOne]
    Add : Right Fields : Before : VCH QtyTitle : sms col1
    Local : Field : sms col1 : Info : "Make"
    [#Line : EI InvInfo]
    Add : Right Fields : Before : VCH ActualQty : sms col1

    [Field : sms col1]

    Use : Name Field
    Type : Forced
    Storage : MakeStorage
    Set Always : Yes
    Width : 10
    Align : Center
    Invisible : not @@ISSales OR @@ISPurchase

    [System : UDF]
    MakeStorage : String : 6500

    [#Line: EXPINV Column1]

    Add : Left Fields : After : EXPINV DescTitle : sms col1

    Local : Field : sms col1 : Info : "Make"
    Local : Field : sms col1 : Delete: Storage
    Local : Field : sms col1 : Type : String
    Local : Field : sms col1 : Align : Center
    Local : Field : sms col1 : Width : 10
    Local : Field : sms col1 : Border: thinleft

    [#Line: EXPINV InvDetails]

    Add : Left Fields : After : EXPINV Desc : MakeStorage

    [Field : MakeStorage]

    Use : Name Field
    Type : Forced
    Set as : $MakeStorage
    Set Always : Yes
    Width : 10
    Align : Center
    Border : thinleft
     
    Last edited: Feb 13, 2024


  6. Nishant Agrawal

    Nishant Agrawal New Member



    Hello , I have tried running it with your code, but the situation is still the same.
     


  7. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    Yes , you have changed the both but kept them "same" again

    UDF name is MakeStorage and Field name is MakeStorage ..

    Suggestion :

    [System : UDF]
    udfMakeStorage : String : 6500


    [Field : fldMakeStorage]

    Use : Name Field
    Type : Forced
    Set as : $udfMakeStorage
    Set Always : Yes
    Width : 10
    Align : Center
    Border : thinleft[/QUOTE]

    [Field : sms col1]

    Use : Name Field
    Type : Forced
    Storage : udfMakeStorage
    Set Always : Yes
    Width : 10
    Align : Center
    Invisible : not @@ISSales OR @@ISPurchase
     


  8. Nishant Agrawal

    Nishant Agrawal New Member


    Tried with the same, but non printing issue is there

    [Field : sms col1]

    Use : Name Field
    Type : Forced
    Storage : udfMakeStorage
    Set Always : Yes
    Width : 10
    Align : Center
    Invisible : not @@ISSales OR @@ISPurchase[/QUOTE]
     


  9. Devendra_Rawat

    Devendra_Rawat Well-Known Member


    ok if issue is in print only then, width of columns could be causing this problem,

    you have too many columns

    try

    [#Line : EXPINV InvDetails]

    Local : Field : Default : Delete : Full Width
    Local : Field : EXPINV Desc : Width : 30.. (try reducing width
     


  10. Nishant Agrawal

    Nishant Agrawal New Member



    I suppose it is some other issue popping, reduction of default line width didn't helped, is it might be due to Version 4.0 of Tally Prime, either some syntax or nuances must have been changed. Screenshot 1.png Screenshot 2.png
     


  11. Nishant Agrawal

    Nishant Agrawal New Member


    Thanks Devendra ji - TDL worked - it was clashing with one of my other TDL, now worked after deactivating other TDL
     
    Devendra_Rawat likes this.



  12. here when voucher class selected it does not perform / in alter mode its ok --- any solutions for that


    below same modified code :--- but class issue


    ;-----------colorcode11 ---End List---------------;


    [#Line: EI ColumnOne]
    Add : Right Fields : Before:VCH QtyTitle : colorcode11Title,

    [Field:colorcode11Title]
    Use: Name Field
    Info: "Color"
    Width: 12
    Align:Center
    Border : Thin Left
    Style:Small Bold
    ;space right : 7




    [#Line : EI InvInfo]
    Add : Right Fields : Before : VCH ActualQty : colorcode11

    [Field : colorcode11]
    Use : Name Field
    Type : Forced
    Storage : udfMakeStorage
    ;Border : Thin Left
    Set Always : Yes
    Width : 12
    Align : Center
    background: surf green
    color: Stone Wash Red
    Invisible : not @@ISSales ;OR @@ISPurchase


    [System : UDF]
    udfMakeStorage : String : 6500



    ;[#Line: EXPINV Column1]

    ;Add : Left Fields : After : EXPINV DescTitle : colorcode11

    ;Local : Field : colorcode11 : Info : "Color"
    ;Local : Field : colorcode11 : Delete: Storage
    ;Local : Field : colorcode11 : Type : String
    ;Local : Field : colorcode11 : Align : Center
    ;Local : Field : colorcode11 : Width : 12
    ;Local : Field : colorcode11 : Border: thinleft ; $$String:"Cash "

    [#Line: EXPINV InvDetails]

    Add : Left Fields : After : EXPINV Desc : fldMakeStorage

    [Field : fldMakeStorage]

    Use : Name Field
    Type : Forced
    Set as : $$String:"" +"- "+ $udfMakeStorage
    Set Always : Yes
    Width : 15
    Style : Small
    Align : left
    ;Border : thin left
     


Share This Page