我正在尝试仅检索特定'凭证号码'的销售记录。 = 5使用下面的XML post请求来计算。
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>data</TYPE>
<ID>voucher register</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVCURRENTCOMPANY>Headers Software Solutions Pvt Ltd</SVCURRENTCOMPANY>
<VoucherTypeName>Sales</VoucherTypeName>
<VoucherNumber>5</VoucherNumber>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
</DESC>
</BODY>
</ENVELOPE>
在XML响应中我收到从1号到600号凭证的整个销售记录。
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<STATUS>1</STATUS>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVCURRENTCOMPANY>Headers Software Solutions Pvt Ltd</SVCURRENTCOMPANY>
</STATICVARIABLES>
</DESC>
<DATA>
<TALLYMESSAGE xmlns:UDF="TallyUDF">
<VOUCHER REMOTEID="eedb4478-88d5-4d8f-8444-9f852c2e8eca-00000001" VCHKEY="eedb4478-88d5-4d8f-8444-9f852c2e8eca-0000a7d0:00000008" VCHTYPE="Sales" ACTION="Create" OBJVIEW="Invoice Voucher View">
<ADDRESS.LIST TYPE="String">
<ADDRESS>No. P-35, Kaligambal Nagar, Thirumullaivoyal</ADDRESS>
<ADDRESS>Chennai-600062</ADDRESS>
</ADDRESS.LIST>
<BASICBUYERADDRESS.LIST TYPE="String">
<BASICBUYERADDRESS>No. P-35, Kaligambal Nagar, Thirumullaivoyal</BASICBUYERADDRESS>
<BASICBUYERADDRESS>Chennai-600062</BASICBUYERADDRESS>
</BASICBUYERADDRESS.LIST>
<OLDAUDITENTRYIDS.LIST TYPE="Number">
<OLDAUDITENTRYIDS>-1</OLDAUDITENTRYIDS>
</OLDAUDITENTRYIDS.LIST>
<DATE>20170814</DATE>
<GUID>eedb4478-88d5-4d8f-8444-9f852c2e8eca-00000001</GUID>
<STATENAME>Tamil Nadu</STATENAME>
<PARTYGSTIN>33AASCS5559D1Z1</PARTYGSTIN>
<PARTYNAME>Shri Pavithra Auto Products Private Limited</PARTYNAME>
<VOUCHERTYPENAME>Sales</VOUCHERTYPENAME>
<REFERENCE>145355345</REFERENCE>
<VOUCHERNUMBER>1</VOUCHERNUMBER>
<PARTYLEDGERNAME>Shri Pavithra Auto Products Private Limited</PARTYLEDGERNAME>
<BASICBASEPARTYNAME>Shri Pavithra Auto Products Private Limited</BASICBASEPARTYNAME>
.
.
.
.
.
</VOUCHER>
</TALLYMESSAGE>
.
.
.
.
.
.
.
.
<TALLYMESSAGE xmlns:UDF="TallyUDF">
<VOUCHER REMOTEID="eedb4478-88d5-4d8f-8444-9f852c2e8eca-0000006d" VCHKEY="eedb4478-88d5-4d8f-8444-9f852c2e8eca-0000a851:00000008" VCHTYPE="Sales" ACTION="Create" OBJVIEW="Invoice Voucher View">
<ADDRESS.LIST TYPE="String">
<ADDRESS>Plot No.3(SP), III Main Road, Ambattur Industrial Estate,Chennai-600058</ADDRESS>
</ADDRESS.LIST>
<BASICBUYERADDRESS.LIST TYPE="String">
<BASICBUYERADDRESS>Plot No.3(SP), III Main Road, Ambattur Industrial Estate,Chennai-600058</BASICBUYERADDRESS>
</BASICBUYERADDRESS.LIST>
<OLDAUDITENTRYIDS.LIST TYPE="Number">
<OLDAUDITENTRYIDS>-1</OLDAUDITENTRYIDS>
</OLDAUDITENTRYIDS.LIST>
<DATE>20171221</DATE>
<GUID>eedb4478-88d5-4d8f-8444-9f852c2e8eca-0000006d</GUID>
<STATENAME>Tamil Nadu</STATENAME>
<PARTYNAME>WABCO INDIA LIMITED-Ambattur</PARTYNAME>
<VOUCHERTYPENAME>Sales</VOUCHERTYPENAME>
<REFERENCE>4900017337</REFERENCE>
<VOUCHERNUMBER>600</VOUCHERNUMBER>
<PARTYLEDGERNAME>WABCO INDIA LIMITED-Ambattur</PARTYLEDGERNAME>
<BASICBASEPARTYNAME>WABCO INDIA LIMITED-Ambattur</BASICBASEPARTYNAME>
.
.
.
.
.
.
</VOUCHER>
</TALLYMESSAGE>
<TALLYMESSAGE xmlns:UDF="TallyUDF">
<COMPANY>
<REMOTECMPINFO.LIST MERGE="Yes">
<NAME>eedb4478-88d5-4d8f-8444-9f852c2e8eca</NAME>
<REMOTECMPNAME>Headers Software Solutions Pvt Ltd</REMOTECMPNAME>
<REMOTECMPSTATE>TamilNadu</REMOTECMPSTATE>
</REMOTECMPINFO.LIST>
</COMPANY>
</TALLYMESSAGE>
</DATA>
</BODY>
如何在XML请求中应用过滤条件以仅检索特定的凭证编号详细信息?
这些链接对我没有帮助。
Needs to retrieve sales order details using xml request to Tally erp 9
Tally Ledger Voucher XML Export
请帮帮我。在此先感谢。
答案 0 :(得分:1)
XML请求从Tally ERP 9导出凭证以获取指定的 VoucherNumber和VoucherType 。
TODO:您必须在XML中指定VoucherNumber和VoucherType,标记为TODO。
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST> EXPORT</TALLYREQUEST>
<TYPE>COLLECTION</TYPE>
<ID> RTSAllVouchers_FilterForVchNoAndVchType</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
<!-- TODO : Specify the VoucherNo -->
<RTS_KEY>VCH-INV-1</RTS_KEY>
<!-- TODO : Specify the VoucherType here -->
<RTS_VOUCHERTYPENAME>Sales</RTS_VOUCHERTYPENAME>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<!-- Retrieve all Vouchers for specified VoucherNo and VoucherType -->
<COLLECTION NAME="RTSAllVouchers_FilterForVchNoAndVchType" ISINITIALIZE="Yes">
<TYPE>Voucher</TYPE>
<FETCH>ALLLEDGERENTRIES.*</FETCH>
<FETCH>ALLINVENTORYENTRIES.*</FETCH>
<FILTER>RTS_FilterForVchNoAndVchType</FILTER>
</COLLECTION>
<VARIABLE NAME="RTS_KEY">
<TYPE> String</TYPE>
</VARIABLE>
<VARIABLE NAME="RTS_VOUCHERTYPENAME">
<TYPE>String</TYPE>
</VARIABLE>
<SYSTEM TYPE="FORMULAE" NAME="RTS_FilterForVchNoAndVchType">
$VoucherNumber = $$String:##RTS_KEY and $VoucherTypeName = $$String:##RTS_VOUCHERTYPENAME
</SYSTEM>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>
说明:
使用TDLMESSAGE标记附带的TDL变量应用过滤条件。变量是RTS_KEY和RTS_VOUCHERTYPENAME。
用于从Tally ERP获取/导出数据的XML标记9 https://www.rtslink.com/articles/tally-xml-tags-export/
答案 1 :(得分:1)
CREATE FUNCTION [dbo].[TODATETIMEOFFSETINTIMEZONE]
(
@Date AS DateTime,
@Timezone as NVARCHAR(100)
)
RETURNS DateTimeoffset
AS
BEGIN
DECLARE @NewDate As DateTimeoffset
SELECT @NewDate = @Date AT TIME ZONE @Timezone
RETURN @NewDate
END
GO
您需要使用凭证号码5创建的凭证的主ID。
答案 2 :(得分:0)
使用凭证的日期和任何其他方法(例如,凭证号,参考号或旁白),您还可以通过XML检索凭证。
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>Object</TYPE>
<SUBTYPE>VOUCHER</SUBTYPE>
<ID TYPE="Name">Date:"1-Aug-2019":VoucherNumber:"IN-12345"</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVCURRENTCOMPANY>Company ABC</SVCURRENTCOMPANY>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
<FETCHLIST>
<FETCH>Date</FETCH>
<FETCH>VoucherNumber</FETCH>
<FETCH>VoucherTypeName</FETCH>
</FETCHLIST>
</DESC>
</BODY>
</ENVELOPE>
来源:https://help.tallysolutions.com/article/DeveloperReference/faq/6191.html