XML 请求 Groupwise 凭证详细信息、分类账及其账单参考、GST 分拆、地址
XML request for Groupwise vouchers details ,ledgers and their bill references , GST breakups ,address
我正在尝试通过 xml 请求从理货中获取 Groupwise 代金券详细信息,我成功获取了组详细信息。
接下来,我需要在 for 循环中一个一个地传递组名,应该接收 Groupwise 凭证详细信息、分类帐及其账单参考、GST 分手、地址等,
我尝试了以下代码来获取组的详细信息并收到了正确的响应。
<?xml version="1.0" encoding="utf-8"?>
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Data</TYPE>
<ID>MyReportGroupTable</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<REPORT NAME="MyReportGroupTable">
<FORMS>MyForm</FORMS>
</REPORT>
<FORM NAME="MyForm">
<PARTS>MyPart</PARTS>
</FORM>
<PART NAME="MyPart">
<LINES>MyLine</LINES>
<REPEAT>MyLine : MyCollection</REPEAT>
<SCROLLED>Vertical</SCROLLED>
</PART>
<LINE NAME="MyLine">
<FIELDS>FldGuid,FldName,FldParent,FldPrimaryGroup,FldIsRevenue,FldIsDeemedPositive,FldSortPosition</FIELDS>
</LINE>
<FIELD NAME="FldGuid">
<SET>$Guid</SET>
</FIELD>
<FIELD NAME="FldName">
<SET>$$StringFindAndReplace:$Name:'"':'""'</SET>
</FIELD>
<FIELD NAME="FldParent">
<SET>$$StringFindAndReplace:$Parent:'"':'""'</SET>
</FIELD>
<FIELD NAME="FldPrimaryGroup">
<SET>$_PrimaryGroup</SET>
</FIELD>
<FIELD NAME="FldIsRevenue">
<SET>$IsRevenue</SET>
</FIELD>
<FIELD NAME="FldIsDeemedPositive">
<SET>$IsDeemedPositive</SET>
</FIELD>
<FIELD NAME="FldSortPosition">
<SET>$SortPosition</SET>
</FIELD>
<COLLECTION NAME="MyCollection">
<TYPE>Group</TYPE>
<FETCH>IsRevenue,IsDeemedPositive,SortPosition,_PrimaryGroup</FETCH>
</COLLECTION>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>
在此之后,我需要 XML 请求获取 Groupwise 凭证详细信息、分类帐详细信息、他们的账单参考、GST 分解和地址
我在过去的一个月里尝试了很多 xml 代码,但我没有成功。
我试过下面的代码。我成功得到回应。但我无法 link / 添加群组名称及其父群组名称
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Data</TYPE>
<ID>MyReportLedgerVouchers</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVFROMDATE>$fromDate$</SVFROMDATE>
<SVTODATE>$toDate$</SVTODATE>
<SVEXPORTFORMAT>$$SysName:ASCII</SVEXPORTFORMAT>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<REPORT NAME="MyReportLedgerVouchers">
<FORMS>MyForm</FORMS>
</REPORT>
<FORM NAME="MyForm">
<PARTS>MyPart</PARTS>
</FORM>
<PART NAME="MyPart">
<LINES>MyLine</LINES>
<REPEAT>MyLine : MyCollection</REPEAT>
<SCROLLED>Vertical</SCROLLED>
</PART>
<LINE NAME="MyLine">
<FIELDS>FldDate,FldVoucherType,FldVoucherNumber,FldLedger,FldAmount,FldNarration</FIELDS>
</LINE>
<FIELD NAME="FldDate">
<SET>$Date</SET>
</FIELD>
<FIELD NAME="FldVoucherType">
<SET>$VoucherTypeName</SET>
</FIELD>
<FIELD NAME="FldVoucherNumber">
<SET>$$StringFindAndReplace:$VoucherNumber:'"':'""'</SET>
</FIELD>
<FIELD NAME="FldLedger">
<SET>$$StringFindAndReplace:$FldLedger:'"':'""'</SET>
</FIELD>
<FIELD NAME="FldAmount">
<SET>$FldAmount</SET>
</FIELD>
<FIELD NAME="FldNarration">
<SET>$$StringFindAndReplace:$Narration:'"':'""'</SET>
</FIELD>
<COLLECTION NAME="MyCollection">
<TYPE>Voucher</TYPE>
<FETCH>Narration,AllLedgerEntries</FETCH>
<FILTER>FilterCancelledVouchers,FilterOptionalVouchers,FilterVch</FILTER>
</COLLECTION>
<SYSTEM TYPE="Formulae" NAME="FilterVch">NOT $$IsEmpty:($$FilterValue:$LedgerName:AllLedgerEntries:First:FilterVchLedger)</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FilterVchLedger">$$IsEqual:$LedgerName:"$ledgerName$"</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FilterVchLedgerNot">NOT $$IsEqual:$LedgerName:"$ledgerName$"</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FldAmount">if $$IsDr:$$FilterAmtTotal:AllLedgerEntries:FilterVchLedger:$Amount then (-$$FilterAmtTotal:AllLedgerEntries:FilterVchLedger:$Amount) else ($$FilterAmtTotal:AllLedgerEntries:FilterVchLedger:$Amount)</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FldLedger">if $$FilterCount:AllLedgerEntries:FilterVchLedgerNot > 1 then ($$FullList:AllLedgerEntries:$LedgerName) else ($$FilterValue:$LedgerName:AllLedgerEntries:First:FilterVchLedgerNot)</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FilterCancelledVouchers">NOT $IsCancelled</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FilterOptionalVouchers">NOT $IsOptional</SYSTEM>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>```
使用Below Xml根据组名
获取代金券
相应地更改<Childof>Sales Accounts</Childof>
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Collection</TYPE>
<ID>Vouchers</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT> <!-- * Supports only xml format -->
<SVViewName>Accounting Voucher View</SVViewName>
<SVFROMDATE TYPE="Date">20200801</SVFROMDATE>
<SVTODATE TYPE="Date">20210831</SVTODATE>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="Vouchers">
<TYPE> Vouchers : Group</TYPE>
<!--Replace Sales Accounts with GroupName you want to search -->
<Childof>Sales Accounts</Childof>
<NATIVEMETHOD>*</NATIVEMETHOD>
</COLLECTION>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>
我正在尝试通过 xml 请求从理货中获取 Groupwise 代金券详细信息,我成功获取了组详细信息。
接下来,我需要在 for 循环中一个一个地传递组名,应该接收 Groupwise 凭证详细信息、分类帐及其账单参考、GST 分手、地址等,
我尝试了以下代码来获取组的详细信息并收到了正确的响应。
<?xml version="1.0" encoding="utf-8"?>
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Data</TYPE>
<ID>MyReportGroupTable</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<REPORT NAME="MyReportGroupTable">
<FORMS>MyForm</FORMS>
</REPORT>
<FORM NAME="MyForm">
<PARTS>MyPart</PARTS>
</FORM>
<PART NAME="MyPart">
<LINES>MyLine</LINES>
<REPEAT>MyLine : MyCollection</REPEAT>
<SCROLLED>Vertical</SCROLLED>
</PART>
<LINE NAME="MyLine">
<FIELDS>FldGuid,FldName,FldParent,FldPrimaryGroup,FldIsRevenue,FldIsDeemedPositive,FldSortPosition</FIELDS>
</LINE>
<FIELD NAME="FldGuid">
<SET>$Guid</SET>
</FIELD>
<FIELD NAME="FldName">
<SET>$$StringFindAndReplace:$Name:'"':'""'</SET>
</FIELD>
<FIELD NAME="FldParent">
<SET>$$StringFindAndReplace:$Parent:'"':'""'</SET>
</FIELD>
<FIELD NAME="FldPrimaryGroup">
<SET>$_PrimaryGroup</SET>
</FIELD>
<FIELD NAME="FldIsRevenue">
<SET>$IsRevenue</SET>
</FIELD>
<FIELD NAME="FldIsDeemedPositive">
<SET>$IsDeemedPositive</SET>
</FIELD>
<FIELD NAME="FldSortPosition">
<SET>$SortPosition</SET>
</FIELD>
<COLLECTION NAME="MyCollection">
<TYPE>Group</TYPE>
<FETCH>IsRevenue,IsDeemedPositive,SortPosition,_PrimaryGroup</FETCH>
</COLLECTION>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>
在此之后,我需要 XML 请求获取 Groupwise 凭证详细信息、分类帐详细信息、他们的账单参考、GST 分解和地址
我在过去的一个月里尝试了很多 xml 代码,但我没有成功。
我试过下面的代码。我成功得到回应。但我无法 link / 添加群组名称及其父群组名称
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Data</TYPE>
<ID>MyReportLedgerVouchers</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVFROMDATE>$fromDate$</SVFROMDATE>
<SVTODATE>$toDate$</SVTODATE>
<SVEXPORTFORMAT>$$SysName:ASCII</SVEXPORTFORMAT>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<REPORT NAME="MyReportLedgerVouchers">
<FORMS>MyForm</FORMS>
</REPORT>
<FORM NAME="MyForm">
<PARTS>MyPart</PARTS>
</FORM>
<PART NAME="MyPart">
<LINES>MyLine</LINES>
<REPEAT>MyLine : MyCollection</REPEAT>
<SCROLLED>Vertical</SCROLLED>
</PART>
<LINE NAME="MyLine">
<FIELDS>FldDate,FldVoucherType,FldVoucherNumber,FldLedger,FldAmount,FldNarration</FIELDS>
</LINE>
<FIELD NAME="FldDate">
<SET>$Date</SET>
</FIELD>
<FIELD NAME="FldVoucherType">
<SET>$VoucherTypeName</SET>
</FIELD>
<FIELD NAME="FldVoucherNumber">
<SET>$$StringFindAndReplace:$VoucherNumber:'"':'""'</SET>
</FIELD>
<FIELD NAME="FldLedger">
<SET>$$StringFindAndReplace:$FldLedger:'"':'""'</SET>
</FIELD>
<FIELD NAME="FldAmount">
<SET>$FldAmount</SET>
</FIELD>
<FIELD NAME="FldNarration">
<SET>$$StringFindAndReplace:$Narration:'"':'""'</SET>
</FIELD>
<COLLECTION NAME="MyCollection">
<TYPE>Voucher</TYPE>
<FETCH>Narration,AllLedgerEntries</FETCH>
<FILTER>FilterCancelledVouchers,FilterOptionalVouchers,FilterVch</FILTER>
</COLLECTION>
<SYSTEM TYPE="Formulae" NAME="FilterVch">NOT $$IsEmpty:($$FilterValue:$LedgerName:AllLedgerEntries:First:FilterVchLedger)</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FilterVchLedger">$$IsEqual:$LedgerName:"$ledgerName$"</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FilterVchLedgerNot">NOT $$IsEqual:$LedgerName:"$ledgerName$"</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FldAmount">if $$IsDr:$$FilterAmtTotal:AllLedgerEntries:FilterVchLedger:$Amount then (-$$FilterAmtTotal:AllLedgerEntries:FilterVchLedger:$Amount) else ($$FilterAmtTotal:AllLedgerEntries:FilterVchLedger:$Amount)</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FldLedger">if $$FilterCount:AllLedgerEntries:FilterVchLedgerNot > 1 then ($$FullList:AllLedgerEntries:$LedgerName) else ($$FilterValue:$LedgerName:AllLedgerEntries:First:FilterVchLedgerNot)</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FilterCancelledVouchers">NOT $IsCancelled</SYSTEM>
<SYSTEM TYPE="Formulae" NAME="FilterOptionalVouchers">NOT $IsOptional</SYSTEM>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>```
使用Below Xml根据组名
获取代金券相应地更改<Childof>Sales Accounts</Childof>
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Collection</TYPE>
<ID>Vouchers</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT> <!-- * Supports only xml format -->
<SVViewName>Accounting Voucher View</SVViewName>
<SVFROMDATE TYPE="Date">20200801</SVFROMDATE>
<SVTODATE TYPE="Date">20210831</SVTODATE>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="Vouchers">
<TYPE> Vouchers : Group</TYPE>
<!--Replace Sales Accounts with GroupName you want to search -->
<Childof>Sales Accounts</Childof>
<NATIVEMETHOD>*</NATIVEMETHOD>
</COLLECTION>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>