0
我正在嘗試使用QuickBooks PHP SDK添加庫存項目。我指定了TrackQtyOnHand(起始庫存和庫存開始日期),但是這些字段似乎被忽略了?QuickBooks API忽略TrackQtyOnHand字段?
任何幫助將不勝感激!
謝謝!
這裏是要求:
IPPItem Object
(
[Name] => Product Name
[Description] => ProductDesc
[Active] => 1
[SubItem] =>
[ParentRef] =>
[Level] =>
[FullyQualifiedName] =>
[Taxable] => 1
[SalesTaxIncluded] =>
[PercentBased] =>
[UnitPrice] => 17.54386
[RatePercent] =>
[Type] => Inventory
[PaymentMethodRef] =>
[UOMSetRef] =>
[IncomeAccountRef] => IPPReferenceType Object
(
[name] => Sales of Product Income
[type] => Account
[value] => 80
)
[PurchaseDesc] =>
[PurchaseTaxIncluded] =>
[PurchaseCost] => 4.24000
[ExpenseAccountRef] => IPPReferenceType Object
(
[name] => Cost of sales
[type] => Account
[value] => 81
)
[COGSAccountRef] =>
[AssetAccountRef] => IPPReferenceType Object
(
[name] => Inventory Asset
[type] => Account
[value] => 82
)
[PrefVendorRef] =>
[AvgCost] =>
[TrackQtyOnHand] => 1
[QtyOnHand] => 10
[QtyOnPurchaseOrder] =>
[QtyOnSalesOrder] =>
[ReorderPoint] =>
[ManPartNum] =>
[DepositToAccountRef] =>
[SalesTaxCodeRef] =>
[PurchaseTaxCodeRef] =>
[InvStartDate] => 2015-03-01
[BuildPoint] =>
[PrintGroupedItems] =>
[SpecialItem] =>
[SpecialItemType] =>
[ItemGroupDetail] =>
[ItemAssemblyDetail] =>
[ItemEx] =>
[Id] =>
[SyncToken] =>
[MetaData] =>
[CustomField] =>
[AttachableRef] =>
[domain] =>
[status] =>
[sparse] =>
)
和響應:
IPPItem Object
(
[Name] => Product Name
[Description] => ProductDesc
[Active] => true
[SubItem] =>
[ParentRef] =>
[Level] =>
[FullyQualifiedName] => Product Name
[Taxable] => false
[SalesTaxIncluded] => false
[PercentBased] =>
[UnitPrice] => 17.54386
[RatePercent] =>
[Type] => Service
[PaymentMethodRef] =>
[UOMSetRef] =>
[IncomeAccountRef] => 80
[PurchaseDesc] =>
[PurchaseTaxIncluded] => false
[PurchaseCost] => 4.24
[ExpenseAccountRef] => 81
[COGSAccountRef] =>
[AssetAccountRef] =>
[PrefVendorRef] =>
[AvgCost] =>
[TrackQtyOnHand] => false
[QtyOnHand] =>
[QtyOnPurchaseOrder] =>
[QtyOnSalesOrder] =>
[ReorderPoint] =>
[ManPartNum] =>
[DepositToAccountRef] =>
[SalesTaxCodeRef] =>
[PurchaseTaxCodeRef] =>
[InvStartDate] =>
[BuildPoint] =>
[PrintGroupedItems] =>
[SpecialItem] =>
[SpecialItemType] =>
[ItemGroupDetail] =>
[ItemAssemblyDetail] =>
[ItemEx] =>
[Id] => 15
[SyncToken] => 0
[MetaData] => IPPModificationMetaData Object
(
[CreatedByRef] =>
[CreateTime] => 2015-07-19T07:02:57-07:00
[LastModifiedByRef] =>
[LastUpdatedTime] => 2015-07-19T07:02:57-07:00
[LastChangedInQB] =>
[Synchronized] =>
)
[CustomField] =>
[AttachableRef] =>
[domain] =>
[status] =>
[sparse] =>
)
只是一個猜測,但也許你應該使用'true'而不是'1'? –
嘿拉斐爾:謝謝,我試過了,但它沒有什麼區別:( – Chregan
好的,這是值得一試的。我注意到應稅被設置爲false,即使請求是'1',但活動被設置爲如果你發現問題的答案是肯定的,請在這裏發表你的答案 –