任何人都可以建议从计数中导出员工详细信息的 xml 结构是什么。
问问题
1889 次
1 回答
3
<?php
/*
PHP Code to Export Employee Master data from Tally ERP 9
Task : Export Exmployee masters from Tally
*/
ini_set('display_errors', 1);
$data =
"<ENVELOPE>" .
"<HEADER>" .
"<TALLYREQUEST>Export Data</TALLYREQUEST>" .
"</HEADER>" .
"<BODY>" .
"<EXPORTDATA>" .
"<REQUESTDESC>" .
"<REPORTNAME>List of Accounts</REPORTNAME>" .
"<STATICVARIABLES>" .
"<SVEXPORTFORMAT>\$\$SysName:XML</SVEXPORTFORMAT>" .
"<ACCOUNTTYPE>Employees</ACCOUNTTYPE>" .
"<!--Other possible values for ACCOUNTTYPE tag are given below-->" .
"<!--All Acctg. Masters, All Inventory Masters,All Statutory Masters-->" .
"<!--Ledgers,Groups,Cost Categories,Cost Centres-->" .
"<!--Units,Godowns,Stock Items,Stock Groups,Stock Categories-->" .
"<!--Voucher types,Currencies,Employees,Budgets & Scenarios-->" .
"</STATICVARIABLES>" .
"</REQUESTDESC>" .
"</EXPORTDATA>" .
"</BODY>" .
"</ENVELOPE>";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1:9000/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data ); //$data = "XML data"
$response = curl_exec ($ch);
if(curl_errno($ch)){
echo curl_error($ch);
}
else{
print "<pre lang='xml'>" . htmlspecialchars($response) . "</pre>";
curl_close($ch);
}
return "";
?>
注意:
您可以从此处获取有关 Tally XML 标签的更多信息:
从 Tally 导出数据
https://www.rtslink.com/articles/tally-xml-tags-export/
将数据导入 Tally
https://www.rtslink.com/articles/tally-xml-tags-import/
于 2018-02-23T11:35:44.397 回答