【问题标题】:Quickbooks InventoryItemAdd COGSAccountRef Not accepting it's requested datatypeQuickbooks InventoryItemAdd COGSAccountRef 不接受它的请求数据类型
【发布时间】:2015-08-04 04:53:49
【问题描述】:

我正在尝试在 Quickbooks 桌面版 15.0 中以编程方式创建项目。我正在使用 Quickbooks SDK 13.0。

这是我的 xml

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError"> 
<ItemInventoryAddRq> 
<ItemInventoryAdd> <!-- required --> 
<Name >Cash Sales</Name> <!-- required -->
<IncomeAccountRef> <!-- optional --> 
<FullName >Food Sales</FullName> <!-- optional -->
</IncomeAccountRef>
<AssetAccountRef> <!-- optional --> 
<FullName >Food Sales</FullName> <!-- optional -->
<COGSAccountRef>
<FullName>Cost of Goods Sold</FullName>
</COGSAccountRef>
</AssetAccountRef>
</ItemInventoryAdd>
</ItemInventoryAddRq>
</QBXMLMsgsRq> 
</QBXML>

我从 xml 验证器收到此错误:

Src Text: <COGSAccountRef>
Reason: Element content is invalid according to the DTD/Schema.

COGSAccountRef 正在请求一个 STRTYPE 变量,它正在被给定,但它不想接受它。如果我删除了这个标签,验证器会说它是一个有效的 xml 代码,但我得到了来自 quickbooks 的回复:

<ItemInventoryAddRs statusMessage="There was an error when saving a Item Inventory list, element "Cash Sales". QuickBooks error message: A COGS account must be specified." statusSeverity="Error" statusCode="3180"/>

我也尝试过使用 ListID,以及在 quickbooks 中手动创建项目,然后在 quickbooks 中查询为该项目存储的 xml 以使用它的 COGSAccountRef xml。

我还在快速手册中启用了库存。

【问题讨论】:

    标签: xml quickbooks intuit


    【解决方案1】:

    原来我的标签有问题,以防将来有人需要知道。我刚刚将 COGSAccountRef 移到 AssetAccount 上方,它就起作用了。

    【讨论】:

      猜你喜欢
      • 2016-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-12
      • 2020-08-10
      • 2020-04-14
      相关资源
      最近更新 更多