Adding Column in Ledger Voucher

Discussion in 'Tally Developer' started by Himanshu-2002, Oct 17, 2020.

    
  1. Himanshu-2002

    Himanshu-2002 Active Member


    I added 1 Column in Ledger Voucher Report
    Code:
    [#Line: DSP VchAccTitles]
    Add : Fields : AFter : DSP VchAcctTitle : Example

    [Field: Example]
    Use: Short Name Field
    Set as: "Example"
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20

    [#Line: DSP VchDetail]
    Add : Right Fields : Before : DSP VchType : ExampleBody

    [Field: ExampleBody]
    Use: Short Name Field
    Set as: "Example"
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20

    It is working Perfectly But the Same Thing is added in Stock Vouchers too So, I want to remove that and I know I have to use the option to achieve it But I don't about that system formula

    Example:

    [#Line: DSP VchAccTitles]
    Option:Example:@@IsLedgerReport

    I just want to know that System Formula which I write in Red Colour
     
    Last edited: Oct 17, 2020


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Use Invisible in your Field.
     


  3. Himanshu-2002

    Himanshu-2002 Active Member


    Already Tried But I don't know the logic which I have to write So, I failed doing that
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Invisible : NOT ##IsLedgerReport
     


  5. Himanshu-2002

    Himanshu-2002 Active Member


    Worked... Thank You Sir :):)
     


  6. Himanshu-2002

    Himanshu-2002 Active Member


    Updated Sample Code

    [#Line: DSP VchAccTitles]
    Add : Fields : AFter : DSP VchAcctTitle : Example

    [Field: Example]
    Use: Short Name Field
    Set as: "Example"
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20
    Invisible : NOT ##IsLedgerReport

    [#Line: DSP VchDetail]
    Add : Right Fields : Before : DSP VchType : ExampleBody

    [Field: ExampleBody]
    Use: Short Name Field
    Set as: "Example"
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20
    Invisible : NOT ##IsLedgerReport
     


  7. NSA

    NSA Member


    Sir, if want to add details of "Driver" in the Ledger Report. I have set my codes as below:

    [#Line: DSP VchAccTitles]
    Add : Fields : AFter : DSP VchAcctTitle : Deliveredby

    [Field: Deliveredby]
    Use: name field
    Set as: "Delivered By"
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20
    Invisible : NOT ##IsLedgerReport

    #Line: DSP VchDetail

    repeat :DSP VchDetail : salesVchBrokarCollct
    [#Line: DSP VchDetail]

    Add : Right Fields : Before : DSP VchType : DeliveredbyBody

    [Field: DeliveredbyBody]
    Use: name field
    Set as: $DriverName
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20
    Invisible : NOT ##IsLedgerReport


    But it doesn't work. Can anyone please guide me?
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Where are you entering your UDF -- DriverName ????

    What is this ........
    #Line: DSP VchDetail
    repeat :DSP VchDetail : salesVchBrokarCollct

    and where is your Collection??
     


  9. NSA

    NSA Member


    Driver Name is entered as an additional Details to the vocuher. its custom made
    And the collection is:

    [Collection:salesVchBrokarCollct]
    Type : Voucher ;;s:Ledger
    child of : $EntryBrokarage
    Fetch : EntryBrokarage,Amount,Brokerunit,brokerRate,ServicetaxPaidby,brokerAmt,brokerto,brokerfrom,brokerQUANTIEY,EibrokerTruckNo,Despatchmode1,Billtyno
     


  10. NSA

    NSA Member


    Sir Actually, I want to add a custom field in the Customer Ledger (Sundry Debtors) which shows the drivers name who delivered. For the Transportation Records, I have added additional details in the voucher with driver details. Now I was trying to add the driver details to the Custer Ledger Report.
     


  11. Himanshu-2002

    Himanshu-2002 Active Member


    Probably Your Collection doesn't have the value which you trying to fetch.
    To check Type this in your calculator

    Select $DriverName From salesVchBrokarCollct
     


  12. NSA

    NSA Member


    It shows the values
     

    Attached Files:

    • Doc1.pdf
      File size:
      250.7 KB
      Views:
      28


  13. NSA

    NSA Member


    Is there any way I can filter the collection by the selected ledger?
     


  14. Himanshu-2002

    Himanshu-2002 Active Member


    Hmm...If value is there and voucher is associated with that then Just Modify the Ledger Voucher Collections

    Modified Code ( Not Tested )

    [#Line: DSP VchAccTitles]
    Add : Fields : AFter : DSP VchAcctTitle : Example

    [Field: Example]
    Use: Short Name Field
    Set as: "Example"
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20

    [#Line: DSP VchDetail]
    Add : Right Fields : Before : DSP VchType : ExampleBody

    [Field: ExampleBody]
    Use: Short Name Field
    Set as: $Narration
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20

    [#Collection: Vouchers of Ledger]
    Fetch: Narration

    I don't remember the Collection name So, Please check the same and After that replace the method name with your UDF Name
     


  15. Himanshu-2002

    Himanshu-2002 Active Member


    Value of Ledger which is selected is stored in variable LedgerName

    Example:
    [Collection: Example]
    Type: Vouchers
    Fetch:*.*
    Filter: LedFil

    [System: Formulas]
    LedFil: $PartyLedgerName = ##LedgerName
     


  16. NSA

    NSA Member


    [#Line: DSP VchAccTitles]
    Add : Fields : AFter : DSP VchAcctTitle : Deliveredby

    [Field: Deliveredby]
    Use: name field
    Set as: "Delivered By"
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20
    Invisible : NOT ##IsLedgerReport

    [#Line: DSP VchDetail]

    Add : Right Fields : Before : DSP VchType : DeliveredbyBody

    [Field: DeliveredbyBody]
    Use: name field
    Set as: $DriverName
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20
    Invisible : NOT ##IsLedgerReport

    [Collection:LedDriverCollect]
    Type : Vouchers
    Fetch:*.*
    Filter: LedFil

    [System: Formulas]
    LedFil: $PartyLedgerName = ##LedgerName



    I think I am missing something which links the value of Filed "DeliveredbyBody" with the Collection
     


  17. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    [#Object : Voucher]
    LedDriverName : $DriverName

    [Field: DeliveredbyBody]
    Use: name field
    Set as: $LedDriverName
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20
     


  18. Himanshu-2002

    Himanshu-2002 Active Member


    Add Code Which is Told By Amit Sir and Sir You are using filter in a wrong way... Please refer the Same in TDL Refrence Manual Or Search the Forum
     


  19. NSA

    NSA Member


    Actually I didnt understand it fully. I am not a Developer, I am an auditor, however I was planning to develop few things for our internal controls. My number is +968 96224499. If you don't mind, can I get your number please? I would like to get in touch with you.
     


  20. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If you are a learner, this is the right forum to learn and develop skills. So start following instructions given by others and learn to implement it. Will be a slow process, but you will learn it.

    And sorry, I do not share my personal details. We can interchange on this forum only.
     


  21. NSA

    NSA Member


    Thank You,

    [#Object : Voucher]
    LedDriverName : $DriverName -----------------------------What is this line? What does it mean?

    [Field: DeliveredbyBody]
    Use: name field
    Set as: $LedDriverName
    Skip: Yes
    Align: Right
    Style: Normal Bold
    Width:20
     


  22. NSA

    NSA Member


    The field heading is is coming correctly but the details are not coming
     

    Attached Files:

    • Doc1.pdf
      File size:
      272.4 KB
      Views:
      19


  23. NSA

    NSA Member


    Whether I should define this "LedDriverNamed"? IF so, can I define it as string?
     


  24. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    You r defining a UDF Value from one collection to another Report........

    for this you need to objectify this.

    U have been give a CODE..... and since you are a beginner........ why do you think define this as a STRING will help you?? If you are a beginner, then why are you representing a opposite logical code?? Or maybe you know better than the experts?

    The code has been give as a solution, there is no need to question it or doubt it?
     


  25. Himanshu-2002

    Himanshu-2002 Active Member


    NSA Sir....Did You ever Converted English To English ?? You are asking the same thing......Your UDF is Already a string then Does it make sense to convert it in String Again ? and Post a screenshot of Voucher Screen where you are adding your Field So, Everyone Can help you better
     


Share This Page