2016-11-19 23 views
0

我正在使用QBFC在QuickBooks中進行庫存調整。我可以在沒有問題的情況下進行數量調整。然而,嘗試進行價值調整會導致錯誤。 (請求失敗)我已嘗試在進行數量調整之前更改商品的採購成本,但沒有達到預期效果,因爲QB使用平均成本計算總價值。我也嘗試過和InventoryAjustmentMod,但沒有成功。請注意,我正在使用QuickBooks Premier Retail 2013,以單用戶模式打開。即使是QuickBooks示例項目失敗,這也會帶來以下問題:無法使用QuickBooks SDK調整庫存值

  1. 是否可以使用SDK調整庫存值? (我可以在UI中這樣做,而不會出現問題。)
  2. 設置是否可以防止我成功調整庫存值?

回答

0

Whe找到答案!

我試圖做的調整是這樣的:

adj.InventoryAdjustmentLineAddList.GetAt(counter).ORTypeAdjustment.ValueAdjustment.ORValueAdjustment.NewValue.SetValue(NewValue) 

相反,我需要建立一個像這樣的IValueAdjustment對象:

DIM AdjValue AS QBFC13Lib.IValueAdjustment = adj.InventoryAdjustmentLineAddList.GetAt(counter).ORTypeAdjustment.ValueAdjustment 
AdjValue.ORQuantityAdjustment.NewQuantity.SetValue(NewQuantity) 
AdjValue.ORValueAdjustment.NewValue.SetValue(NewValue) 

注意ValueDifference沒有工作,我需要使用的NewValue。

相關問題