如何检索公司的GSTN:Tally XML集成 [英] How to retrieve GSTN of a company : Tally XML integration
问题描述
试图在Tally ERP中检索活跃公司的GSTIN.使用以下**<FETCH>Gstnotificationnumber</FETCH>**
命令
Trying to retrieve the GSTIN of the active company in Tally ERP. Making a POST call using the following **<FETCH>Gstnotificationnumber</FETCH>**
command
但是在下面给出的**<DATA>**
输出下,响应中没有返回任何数据
But no data is returned as part of the response under **<DATA>**
output given below
任何帮助都将非常棒!
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>OBJECT</TYPE>
<SUBTYPE>COMPANY</SUBTYPE>
<ID TYPE="Name">Example Company Name</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
<FETCHLIST>
<FETCH>Gstnotificationnumber</FETCH>
</FETCHLIST>
</DESC>
</BODY>
</ENVELOPE>
Tally ERP的输出缺少COMPANY对象的Gstnotificationnumber
Output From Tally ERP which is missing Gstnotificationnumber from the COMPANY object
Tally Object Schema - (For Reference)
<DATA>
<TALLYMESSAGE>
<COMPANY NAME="Example Company Name" RESERVEDNAME="" REQNAME="Example Company Name">
<NAME TYPE="String">Example Company Name</NAME>
<ISDEEMEDPOSITIVE TYPE="Logical"></ISDEEMEDPOSITIVE>
<CANDELETE TYPE="Logical">No</CANDELETE>
<MASTERID TYPE="Number"> 29</MASTERID>
</COMPANY>
</TALLYMESSAGE>
</DATA>
推荐答案
因此,Tally中的GSTIN编号不是属于Company Object的字段.属于公司对象"的某些字段包括地址",电话号码",电子邮件",状态"等.例如,修改<FETCH>
标记以在响应中包含地址"和<DATA>
标记,将为您提供所需的详细信息.>
So the GSTIN number in Tally is not a field belonging to the Company Object. Some of the fields belonging to the Company Object are Address, Phone Number, Email, State etc. For example, modify the <FETCH>
tag to have Address and the <DATA>
tag in the response will give you the required details.
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>OBJECT</TYPE>
<SUBTYPE>COMPANY</SUBTYPE>
<ID TYPE="Name">Example Company Name</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
<FETCHLIST>
<FETCH>Address</FETCH>
</FETCHLIST>
</DESC>
</BODY>
</ENVELOPE>
如果您深入了解Tally数据库结构,则GSTIN编号属于计税单位对象.假设未更改示例公司的默认配置,则税收单位"对象通常为默认税收单位".现在,您可以查询公司的税务部门对象并获取GSTIN.
If you look deep into the Tally database structure, the GSTIN Number belongs to the Tax Unit Object. Assuming that default configurations have not been changed for a sample company, the Tax Unit object is usually 'Default Tax Unit'. Now you can query the Tax Unit Object for the company and fetch the GSTIN.
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>OBJECT</TYPE>
<SUBTYPE>Tax Unit</SUBTYPE>
<ID TYPE="Name">Default Tax Unit</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVCURRENTCOMPANY>Example Company Name</SVCURRENTCOMPANY>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
<FETCHLIST>
<FETCH>GSTRegNumber</FETCH>
</FETCHLIST>
</DESC>
</BODY>
</ENVELOPE>
如果您在计税单位中遇到错误,则只需使用内置代码即可轻松获得所需的内容.可以通过两种方式获取GSTIN编号:
If you're getting errors in the Tax Unit, it's easier to just use the in-built code to get what you need. There's two ways you can get the GSTIN Number:
- 使用公式-
CMPGSTaxNumber
- 使用直接的Object-Method表示法:
$GSTRegNumber:TaxUnit:@@CMPExcisePrimaryGodown
- By using the formula -
CMPGSTaxNumber
- By using the direct Object-Method notation :
$GSTRegNumber:TaxUnit:@@CMPExcisePrimaryGodown
要在XML中获取这些代码,您需要在SOAP请求的<TDL></TDL>
标记内添加TDL代码.
To get these in your XML, you would need to add TDL code within <TDL></TDL>
tags in your SOAP request.
下面是一个示例,如果您有兴趣阅读TDL报告结构的工作原理,可以参考
A sample is below, if you're interested in reading how the TDL Report structure works, you can refer this document by Tally Solutions.
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>Data</TYPE>
<ID>GSTReport</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVCURRENTCOMPANY>Example Company Name</SVCURRENTCOMPANY>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<REPORT NAME="GSTReport">
<FORM>GSTReportForm</FORM>
</REPORT>
<FORM NAME="GSTReportForm">
<PART>GSTReportPart</PART>
</FORM>
<PART NAME="GSTReportPart">
<LINE>GSTReportLine</LINE>
<SCROLLED>Vertical</SCROLLED>
</PART>
<LINE NAME="GSTReportLine">
<FIELDS>GSTNumber</FIELDS>
</LINE>
<FIELD NAME="GSTNumber">
<SET>$GSTRegNumber:TaxUnit:@@CMPExcisePrimaryGodown</SET>
</FIELD>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>
这篇关于如何检索公司的GSTN:Tally XML集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!