Getting all Vouchers of particular Ledger between period

Discussion in 'Tally Developer' started by Sanket Patel, Sep 23, 2019.

    
Tags:
  1. Sanket Patel

    Sanket Patel New Member


    Hello
    Please help me with TLD or procee in which i can get all transactions (vouchers) of perticular ledger from Tally into xml or datatable (via query like select * from where ledger = 'ABC Person' and date between '2019-04-01' and '2019-08-31'

    please help.

    Thanks
     


  2. teja varma

    teja varma Active Member


    send an xml request to tally on port 9000
    like this:
    Code:
    <ENVELOPE> 
    <HEADER> 
      <TALLYREQUEST>Export Data</TALLYREQUEST> 
    </HEADER> 
    <BODY> 
      <EXPORTDATA> 
        <REQUESTDESC>
       <REPORTNAME>LedgerVouchers</REPORTNAME>
          <STATICVARIABLES>
                 <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
               <SVCURRENTCOMPANY>Company Name</SVCURRENTCOMPANY>
                 <SVFROMDATE Type='Date'>1-4-19</SVFROMDATE>
                 <SVTODATE Type='Date'>31-3-20</SVTODATE>
                 <LEDGERNAME>LedgerName</LEDGERNAME>
          </STATICVARIABLES>
        </REQUESTDESC> 
      </EXPORTDATA> 
    </BODY> 
    </ENVELOPE>

    Replace Company name and Ledger Name with your's
     


  3. Sanket Patel

    Sanket Patel New Member


    There is some issue with date.
    It is not considering dates passed in above mentioned XML.

    It returns transaction of the current month only (if found any) no matter what i pass in

    <SVFROMDATE Type='Date'>1-4-19</SVFROMDATE>
    <SVTODATE Type='Date'>31-3-20</SVTODATE>

    if i pass From: 01-04-2019 and To: 31-05-2019, still it will return data only from current month.

    If selected ledger has any transaction in current month (which is september) then it returns only vouchers from September month only, no vouchers are being returned from previous months. In this case, it automtically applies From date as this month's first date and To = today's date.
    If selected Ledger does not have any voucher from current month then it automatically selected From date as Ledger's first voucher date and To: as today' date.

    Over all in both case, it is not considering

    <SVFROMDATE Type='Date'>1-4-19</SVFROMDATE>
    <SVTODATE Type='Date'>31-3-20</SVTODATE>

    Please let me know further.

    Thanks for your help
     


  4. Sanket Patel

    Sanket Patel New Member


    Hi Teja
    Pls help with above.
    I appreciate your support.

    Thanks
     


  5. teja varma

    teja varma Active Member


    use this set dates in the report then it will return correctly
    Code:
    <ENVELOPE>
        <HEADER>
            <VERSION>1</VERSION>
            <TALLYREQUEST>Export</TALLYREQUEST>
            <TYPE>Data</TYPE>
            <ID>LedgerVouchers</ID>
        </HEADER>
        <BODY>
            <DESC>
                <STATICVARIABLES>
              <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
              <SVFROMDATE TYPE='Date'>1-4-18</SVFROMDATE>
              <SVTODATE TYPE='Date'>1-4-18</SVTODATE>
              <LEDGERNAME>Cash</LEDGERNAME>
                </STATICVARIABLES>
                <TDL>
               <TDLMESSAGE>
               <REPORT Name ='LedgerVouchers' ISMODIFY='YES'>
               <SET>SVFROMDATE:$$Date:'1-4-18'</SET>
               <SET>SVTODATE:$$Date:'1-5-18'</SET>
               </REPORT>
               </TDLMESSAGE>
                </TDL>
            </DESC>
        </BODY>
    </ENVELOPE>
    
     


  6. Sanket Patel

    Sanket Patel New Member


    How can I get RemoteGUID field in return? Above code returns date, name, voucher type and number.

    Please help to get RemoteGUID also.

    Thanks
     


  7. Sanket Patel

    Sanket Patel New Member


    Please help to get RemoteGUID and Narration.

    This forum is really helpful.
     


  8. Sanket Patel

    Sanket Patel New Member


    Hello Sirs,
    Please help, I really need to solve.

    Please help to get RemoteGUID and Narration in above xml export tag for Ledger Vouchers export of particular ledger.


    Thanks
     


Share This Page