Getting ledger details from voucher

Discussion in 'Tally Developer' started by Ram@123, Oct 18, 2020.

    
  1. Ram@123

    Ram@123 New Member


    Sir

    I want to get list of all the ledgers entered in a voucher (journal). I have created a collection such as

    [Collection:mycoll]
    Type:ledger entry:voucher
    Fetch: ledger name

    But when i repeat the collection over a line and give $ledgername, only the first ledger is shown while others are not displayed
     


  2. Himanshu-2002

    Himanshu-2002 Active Member


    Example:
    [Collection: Example]
    Type: Vouchers: VoucherType
    Child of: $$VchTypeSales
    Belong to : Yes

    Now, Walk into the collection and Compute values

    [Collection: Example Summary]
    Source Collection: Example
    Walk: LedgerEntries
    Computer: Name: $Ledger Name
    .....

    And after computing all values repeat this summary collection
     


  3. Ram@123

    Ram@123 New Member



    Thanks .......

    Can you guide me on how to get bill details of voucher.....
     


  4. Himanshu-2002

    Himanshu-2002 Active Member


    Type This in You calculator

    Select * From VoucherType and Find What you want
     


  5. Ram@123

    Ram@123 New Member


    Thank you very much, your previous reply really helped me.

    Also can you please show me the way to use (select * from ledger) , i am unable to grasp it.

    Also i want to ask wether i can get all fields as shown in(select *.....) from any collection shown in tdl schema of tally developer, as i tried it with (select * from voucher) but it didn't work.

    Regards.
     


  6. Himanshu-2002

    Himanshu-2002 Active Member




    Watch This Video To understand about This
    ( Select * From Ledger ) also known as SQL Query

    In short -- Select * From Ledger means Select all from ledger collection

    Type This in your calculator
    Select * From Vouchers

    To find Collection Names
    Press Ctrl + J in tally Developer and Select collection you will find all collection names available in tally

    Important Collection Names :-
    StockItem
    Ledgers
    Vouchers

    To fetch details of Vouchers you have to create a collection yourself
    Example:

    [Collection: Example]
    Type: Vouchers: VoucherType
    Child of: $$VchTypeSales
    Belong to : Yes

    [Collection: Example Summary]
    Source Collection: Example
    Walk: LedgerEntries
    Computer: Name: $PartyLedger Name
    Compute: Amount: $Amount

    Now, Suppose you want to fetch parent of this Party Ledger Name

    Then Syntax Will Be
    $Parent:Ledger:$PartyLedgerName

    Here, $Parent is a method name which you want to find and Ledger is object ( Don't confuse about object...Just asume that this is Collection ) and $PartyLedgerName is the key

    Compute: Parent:$Parent:Ledger:$PartyLedgerName

    Now, To find inventory details walk in inventory collection
    Example:-

    Walk: Inventory Entries
    Compute:StockItemName:$StockItemName
    Compute:Rate:$Rate
    Compute: StkAmount:$Amount

    To find Ledger Entries Details

    Example:
    Walk: Ledger Entries
    Compute: LedgerName: $LedgerName
    Compute: LedAmt:$Amount

    Now, To see details available in this summary collection type this in your calculator

    Select $Name,$Amount,$Parent,$StockItemName,$Rate,$StkAmount, $LedgerName, $LedAmt From ExampleSummary
     
    PHOENIX HELIOS likes this.


  7. Himanshu-2002

    Himanshu-2002 Active Member


    I can write more things about collection But then It will be difficult for you to grasp everything and I can't write that much big post...Lol
     


  8. Ram@123

    Ram@123 New Member



    Thanks for the info.....
    Will definitely look into it
     


  9. Ram@123

    Ram@123 New Member



    I have created a collection of bill allocations using your previous reply, but when i want to get ledger name and voucher number using

    $().ledgername
    $()..vouchernumber

    it turn out to be empty.

    Can you please guide me on this.....

    Thanks/ Regards
     


  10. Himanshu-2002

    Himanshu-2002 Active Member


    Post Your Code
     


  11. Ram@123

    Ram@123 New Member



    [Report:vchreport]
    Form:vchreport
    [Form:vchreport]
    Part:vchreport
    [Part:vchreport]
    Line:vchreport
    Repeat:vchreport:billalloc
    Scroll:vertical
    [Line:vchreport]
    Field:bno, lnm, vchno
    [Field:bno]
    Info:$name
    [Field:lnm]
    Info:$()..ledgername
    [Field:vchno]
    Info:$()...vouchernumber


    [Collection:vchcoll]
    Type: Voucher
    Fetch: *.*

    [Collection:ledentcoll]
    Source collection: vchcoll
    Walk: ledger entries
    Fetch: *.*

    [Collection:billalloc]
    Source collection: ledentcoll
    Walk: bill allocations
    Fetch: *.*



    This is just a display report, i need the values for further calcluation using function. If i am able to get the values then i can proceed further.

    Thanks/ Regards.
     


  12. Himanshu-2002

    Himanshu-2002 Active Member


    Why are fetching all things...It will make your Code Slow...Use Compute to fetch Required Values.....Use Schema Available in Tally Developer to Get the method names and sub collection names and If you want to set a value then you have to Set as instead of Info
     


  13. Ram@123

    Ram@123 New Member


    I am trying to get list of bils(pending/paid) of clients. And i also want to gets voucher details of individual bill(sales/purchase, payment, credit details) on exploded line.

    Thanks/Regards.
     


  14. Himanshu-2002

    Himanshu-2002 Active Member


    Buddy I already gave you the solution First Try to create a report after that Think about Explode and I think you are beginner So, You have to practice more
     
    kapil22 likes this.


  15. PHOENIX HELIOS

    PHOENIX HELIOS New Member



    Thank you very much. Nicely explained.
     


  16. Ram@123

    Ram@123 New Member


    Thanks, I will try out.....
     



  17. i want output like below image , from different ledger, how can i get using tdl, please help me someone
     

    Attached Files:



  18. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Very Very simple....

    Enlist help of experts like Mr. Jay Tailor, Mr.Garima, Mr. Himanshu and many other stalwarts / experts ............

    And most likely will be paid service also.
     



  19. how can i write collection for getting this, taxable value should according to nature of transaction
     


  20. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Already existing....similar collection ..... as per nature of transaction........

    please search and implement as per your needs.
     



  21. i have search but not found, can you give some link

    output should like
    [​IMG]
     
    Last edited: Jun 24, 2021


  22. Amit Kamdar

    Amit Kamdar Administrator Staff Member




  23. i refer but not understand, can you just send me collection which fetch all taxable value(according to tax rate) for both purchase and sale & for month, if collection succeded i will handle left of things. not for specific ledger, it should show for whole month taxable value by rate
     
    Last edited: Jun 25, 2021


  24. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    sorry....you will have to wait ..... do not have time in busy audit season.

    what you have referred is enough for your solution...........you can carry forward from there.
     



  25. i refer this post but this is according to specific ledger , i want taxable value(second column in image) for 0%,5%,12%,18%, 28% for month it may any purchase/sales ledger (not specific ledger).


    refer this image , left column i will handle by formula
     

    Attached Files:



Share This Page