Needs to retrieve sales order details using xml re

2019-09-09 03:03发布

I am going to develop a desktop application for Integration with Tally ERP 9. My application uses ('localhost:9000') for XML Post request.

I can get all Sales Records by using below XML post request to tally.

<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Data</TYPE>
<ID>Sales Orders Book</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<EXPLODEFLAG>Yes</EXPLODEFLAG>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
<SVFROMDATE>01/04/2006</SVFROMDATE>
<SVTODATE>31/03/2013</SVTODATE>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<REPORT NAME="Sales Orders Book">
</REPORT>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>

Now, I need to retrieve single sales order details by passing orderid/referencenumber.

I tried below syntaxes one by one in <STATICVARIABLES> but it fails,

<SVGUID>91209900-f40c-4222-b605-79462be5b1cf-00000043</SVGUID>
<SVREMOTEID>91209900-f40c-4222-b605-79462be5b1cf-00000043</SVREMOTEID>
<SVVCHKEY>91209900-f40c-4222-b605-79462be5b1cf-0000a46d:00000078</SVVCHKEY>
<SVMASTERID>67</SVMASTERID>

Please let me know if anyone knows the proper XML request or any documentation related to various export operation using xml request.

3条回答
虎瘦雄心在
2楼-- · 2019-09-09 03:45
<ENVELOPE>
        <HEADER>
        <TALLYREQUEST>Export Data</TALLYREQUEST>
        </HEADER>
        <BODY>
        <EXPORTDATA>
        <REQUESTDESC>
        <STATICVARIABLES>

        <SVCURRENTCOMPANY>$etca_name</SVCURRENTCOMPANY>

        <SVFROMDATE>20130401</SVFROMDATE>
                <SVTODATE>20143031</SVTODATE>

        <!--Theis will show the User name who created Voucher-->
        <SHOWCREATEDBY>YES</SHOWCREATEDBY>
        <SHOWPARTYNAME>Yes</SHOWPARTYNAME>

        <!--Specify the Voucher Type here-->
        <!-- Ex . Sales/Sale Export -->

        <VOUCHERTYPENAME>Sales Order</VOUCHERTYPENAME>
        </STATICVARIABLES>

        <!--Specify the Report Name here-->
        <REPORTNAME>Voucher Register</REPORTNAME>
        <STATICVARIABLES>
            <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
        </STATICVARIABLES>

        </REQUESTDESC>
        </EXPORTDATA>
        </BODY>
        </ENVELOPE>
查看更多
别忘想泡老子
3楼-- · 2019-09-09 03:56
    <ENVELOPE>
    <HEADER>
    <VERSION>1</VERSION>
    <TALLYREQUEST>EXPORT</TALLYREQUEST>
    <TYPE>DATA</TYPE>
    <ID>Voucher Register</ID>
    </HEADER>
    <BODY>
    <DESC>
    <STATICVARIABLES>
    <VoucherTypeName>Sales</VoucherTypeName>
    <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
    <SVFROMDATE TYPE="Date">20170331</SVFROMDATE>
    <SVTODATE TYPE="Date">20170331</SVTODATE>
    </STATICVARIABLES>
    </DESC>
    </BODY>
    </ENVELOPE>

Try this, i use

查看更多
\"骚年 ilove
4楼-- · 2019-09-09 04:01
<?xml version="1.0" encoding="UTF-8"?>
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>Object</TYPE>
<SUBTYPE>VOUCHER</SUBTYPE>
<ID TYPE="Name">ID:{{voucherId}}</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
<SVCURRENTCOMPANY>{{companyName}}</SVCURRENTCOMPANY>
</STATICVARIABLES>
<FETCHLIST>
    <FETCH>Date</FETCH>
    <FETCH>VoucherTypeName</FETCH>
    <FETCH>VoucherNumber</FETCH>
</FETCHLIST>
</DESC>
</BODY>
</ENVELOPE>

Try this, i used this xml to get particular voucher data from tally by keying the master id of the voucher i need to fetch from tally as voucher id.

查看更多
登录 后发表回答