Export Payment Vouchers to Excel using ODBC

Discussion in 'Tally Integration' started by Adukit0496, Jun 7, 2020.

    
  1. Adukit0496

    Adukit0496 New Member


    Hello Everyone,

    Need a small help.

    I am trying to export payment details from tally to Excel using ODBC. Currently, I am using this SQL query

    Select $Date,$VoucherNumber,$PartyLedgerName,$$CollectionField:$Amount:1:LedgerEntries from RTSAllVouchers where $$IsPayment:$VoucherTypeName

    Where RTSAllVouchers is a TDL file which I have linked to tally.

    I am able to retrieve Date, Party Name, Amount and Voucher Name.However, I am unable to retrieve Agst Ref info which shows against which voucher the payment is made. I have checked that AgstRef voucher number is available in Tally.

    I am facing a similar issue with regards to receipt.

    I am attaching RTSAllVouchers file for your reference.

    Thanks for reading and would appreciate if I can get any help.
     

    Attached Files:



  2. Neeru

    Neeru Active Member




  3. where is billallocations.* ?
     


  4. Sanjeev S

    Sanjeev S Active Member


    Yes. You need to fetch Billallocations.* alternatively you can also compute it directly as....


    Code:
    [Collection: RTSAllVouchers] 
    Type: Voucher 
    IsODBCTable: Yes 
    Fetch : *, AllLedgerEntries.*, LedgerEntries.*,LedgerOutstandings.*
    
    Compute                :     VchNo                :    $VoucherNumber
    Compute                :    Party                :    $PartyLedgerName
    Compute                :    VchDate            :    $Date
    Compute                :    Amount            :    $Amount
    Compute                :    BillRef                :    $.AllInventoryEntries[1].AccountingAllocations[1].Ledgerentries[1].BILLALLOCATIONS[1].Name
    Compute                :    BillAmt                :    $.AllInventoryEntries[1].AccountingAllocations[1].Ledgerentries[1].BILLALLOCATIONS[1].Amount
    
     



  5. Dear Sanjeev S,

    The compute function although returns the required data but it come as negative values in excel.. How do we solve that problem?
     


Share This Page