首页 > 解决方案 > 使用 Consolibyte Quickbooks Web 连接器,我如何将两套书籍分开?

问题描述

我有一个客户端,它在同一个 Quickbooks 安装上有两个单独的 Quickbooks 公司文件(书籍)。一种用于一种类型的客户(A 型),另一种用于另一种(B 型)。

我为这两本书创建了两个单独的网络连接器应用程序(除了肥皂服务的 url 相同),并在打开相应的书的情况下安装它们。

但是,当我进行导入时,导入的记录(客户、项目)适用于当时打开的任何账套。因此,尽管每套账簿都有单独的 Web 连接器用户名和密码,但它会将“B 类”客户导入为“A 类”,反之亦然。也就是说,与“A 类”记录关联的用户名有时是“B 类”客户的用户名。

我从 Quickbooks 导入项目时遇到同样的问题。

我怎样才能将这两套书分开?

标签: quickbooks

解决方案


Web 连接器调用authenticateSOAP 方法,该方法的响应可以包含要连接到的正确 QuickBooks 文件的文件路径。

SOAP 方法如下所示:

array authenticate(string strUserName, string strPassword)

您返回的数组应如下所示:

array(
  'a valid ticket string goes here',   // send the session ID/ticket here
  'C:/path/to/your/company/file.QBW'  // you can send *either* an empty string to use the currently open QuickBooks company file, or specify a specific company file to use by sending the full path to that company file
)

第二个数组值是可选的,您可以使用它将每个用户锁定到.QBW您要求的特定文件/书籍集。

这是一个原始的 HTTP 响应供您参考:

HTTP/1.1 200 OK
Date: Sat, 02 May 2009 17:43:09 GMT
Server: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7l DAV/2 PHP/5.2.9
X-Powered-By: PHP/5.2.9
Content-Length: 387
Connection: close
Content-Type: text/xml

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://developer.intuit.com/">
    <SOAP-ENV:Body>
        <ns1:authenticateResponse>
            <ns1:authenticateResult>
                <ns1:string></ns1:string>
                <ns1:string>C:\path\to\your\books.QBW</ns1:string>
            </ns1:authenticateResult>
        </ns1:authenticateResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

参考:http ://wiki.consolibyte.com/wiki/doku.php/quickbooks_web_connector#array_authenticate_string_strusername_string_strpassword


推荐阅读