使用“浏览”选项

时间:2017-12-22 08:04:55

标签: twinfield

我正在为Twinfield撰写应用程序。我登录了一个有4个主管部门的帐户。我想检索属于未付款发票的所有信息。

通过搜索选项,我可以获得特定办公室的公开发票。

string[][] finderOptions = new string[2][];

switch (office)
{
    case 0:
       finderOptions[0] = new string[] { "office", "xxxx01-01" };
       break;
    case 1:
       finderOptions[0] = new string[] { "office", "xxxx03-01" };
       break;
}
finderOptions[1] = new string[] { "dim1", "1300" };
TwinfieldFinder.MessageOfErrorCodes[] errorCodes = xmlFinder.Search(hdrXml, "IVT", "*", 0, 1, 0, finderOptions, out findResult);

这很有效。但它重新调整了invoicenumber,我还需要交易号码。因此,我执行浏览以查找交易号码。

也许有另一种方法可以使用invoicenumber iso事务编号找到完整的事务?

Browse调用如下所示:

 TwinfieldProcessXml.ProcessXmlSoapClient xmlClient = new 
 TwinfieldProcessXml.ProcessXmlSoapClient("ProcessXmlSoap", cluster + "/webservices/processxml.asmx?wsdl");                                            
 TwinfieldProcessXml.Header hdrXml2 = new TwinfieldProcessXml.Header();
                hdrXml2.CompanyCode = finderOptions[0][1];
                hdrXml2.AnyAttr = hdr.AnyAttr;
                hdrXml2.SessionID = hdr.SessionID;

如果我在标题中使用CompanyCode,那么这很重要它alwasy返回属于第一个办公室的信息:xxxx01-01。

1 个答案:

答案 0 :(得分:0)

在Twinfield使用浏览代码时,请确保选择合适的公司,如下所示:

https://c3.twinfield.com/webservices/documentation/#/FAQ

否则,您将获得默认公司的数据:

Q. When using the Browse Data functionality, in the response I get data from a different company. What is wrong?
A. In the browse data request there is no option to set the current company. Before sending the request, make sure the correct company is set by using the SelectCompany function. See also Web Services Authentication.

要获得未结发票,最好的方法是使用浏览代码。选择代码100并在列matchstatus上添加一个过滤器,这是一个示例:

https://gist.github.com/alexjeen/d4ef3295820dc98c7f0171e47294dbfe

相关问题