在下面的架构中,我想获取凭证、库存商品、客户的数据,但我们只能输入数据,但我需要将所有这些数据包含在一个响应中。
我想根据优惠券相关的alterid获取数据。
这是我使用的架构
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>COLLECTION</TYPE>
<ID>CUSTOMCOLLECTION</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="CUSTOMVOUCHERDATA">
<TYPE>VOUCHER</TYPE>
<FETCH>VOUCHERNUMBER,DATE,ISCANCELLED,PARTYNAME,PARTYLEDGERNAME,PARTYGSTIN,CONSIGNEEGSTIN,ALLLEDGERENTRIES.LIST.LEDGERNAME,AMOUNT,VCHSTATUSDATE,EFFECTIVEDATE,ALTERID,MASTERID,VOUCHERKEY,VOUCHERRETAINKEY,GUID,BASICSHIPDOCUMENTNO,BASICFINALDESTINATION,BASICSHIPVESSELNO,EICHECKPOST,BILLOFLADINGNO,BILLOFLADINGDATE,BILLOFLADINGDATE,BASICSHIPPEDBY,IRN,IRNACKDATE,GSTREGISTRATION,VOUCHERTYPENAME,CMPGSTREGISTRATIONTYPE,CMPGSTSTATE,NUMBERINGSTYLE,VCHSTATUSTAXUNIT,GSTNATUREOFRETURN</FETCH>
<FILTER>Masterfilter</FILTER>
</COLLECTION>
<SYSTEM TYPE="Formulae" NAME="Masterfilter">$MASTERID > 829 AND $ALTERID > 1343 </SYSTEM>
</TDLMESSAGE>
</TDL>
<TDL>
<TDLMESSAGE>
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="CUSTOMSTOCKITEMCOL">
<TYPE>STOCKITEM</TYPE>
<FETCH>NAME,GUID,GSTAPPLICABLE,GSTDETAILS.LIST,ALTERID,MRPDETAILS.LIST,BASEUNITS,ISDELETED,OPENINGBALANCE,OPENINGRATE</FETCH>
<FILTER>Masterfilter</FILTER>
</COLLECTION>
<SYSTEM TYPE="Formulae" NAME="Masterfilter">$ALTERID > 1094</SYSTEM>
</TDLMESSAGE>
</TDL>
<TDL>
<TDLMESSAGE>
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="CUSTOMLEDGERDATA">
<TYPE>LEDGER</TYPE>
<FETCH>NAME,PARENT,GUID,PARTYGSTIN,BILLCREDITPERIOD,LEDGERMOBILE,LEDGERCOUNTRYISCODE,ISDELETED,ALTERID,EMAIL,PRIORSTATENAME</FETCH>
<FILTER>Masterfilter</FILTER>
</COLLECTION>
<SYSTEM TYPE="Formulae" NAME="Masterfilter">$ALTERID > 32</SYSTEM>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>
Master 和 Voucher 的 AlterId 不同 无法根据凭证alterID查询主数据
我们可以同时获取所有数据,但它会占用更多内存,如果数据较多,可能会挂起
你应该提到里面的所有源集合
<TDLMESSAGE>
要获取所有类型的数据,只需在集合内的集合标签中提及它们
例如:
<Collection Name="CustCollection">
<Sourcecollections>Col1,Col2 </Sourcecollections>
</Collection