我正在尝试在快速手册中添加账单,我可以将其添加到“按帐户分项”中,并且对我可见,但是对于“按产品/服务分项”,我可以添加项目,但这些项目在下拉列表中不可见默认。如果我选择任何项目,它会询问“你想将项目标记为‘销售’以进行购买吗?” 如果我按下是,则会打开一个弹出窗口,如果我启用复选框(“采购信息”),然后按下保存按钮,项目就会显示出来。我正在使用 c# 插入这些项目。如何使用 quickbook 库类启用该复选框,或如何使用 c# 在“按产品/服务逐项列出”下拉列表中显示这些项目。
代码:
{
string accessToken = "lvprdRM1HLr6o11Bnim1gRezlXWbFfADnS1Btvm2L4VPOTRI";
string appToken = "2sdfsdfsdf345DSF4dAS3afasd34192cd";
string accessTokenSecret = "JfQTrprW83JTWhSVHD3uf7th53gP0SOzBQcn4Nrt";
string consumerKey = "qyprdMSG42SDF4dtQZTiKVc28dywR";
string consumerSecret = "JPfXE17Ynasdasd56sSAwvuXkF2M71lbDb7blhcLB7HeF";
string companyID = "812947021";
OAuthRequestValidator oauthValidator = new OAuthRequestValidator(accessToken, accessTokenSecret, consumerKey, consumerSecret);
ServiceContext context = new ServiceContext(oauthValidator, appToken, companyID, IntuitServicesType.QBO);
DataServices service = new DataServices(context);
Item oItem = new Item();
oItem.Name = "Test Product One";
oItem.Type = ItemTypeEnum.Product;
oItem.TypeSpecified = true;
oItem.PrefVendorRef.VendorId = new IdType { idDomain = idDomainEnum.QBO, Value = "42" };
oItem.PrefVendorRef.VendorName = "CWR";
oItem.ExpenseAccountRef.AccountName = "Accounts Receivable (A/R)";
oItem.ExpenseAccountRef.AccountId = new IdType { idDomain = idDomainEnum.QBO, Value="8"};
oItem.IncomeAccountRef.AccountId = new IdType { idDomain = idDomainEnum.QBO, Value = "31" };
oItem.IncomeAccountRef.AccountName = "Cost of Goods Sold";
oItem.PurchaseCost = new Money() { Amount = 12.02M, AmountSpecified = true };
oItem.QtyOnPurchaseOrder = 10m;
oItem.QtyOnPurchaseOrderSpecified = true;
oItem.QtyOnSalesOrder = 10m;
oItem.QtyOnSalesOrderSpecified = true;
var itemRespVal = service.Add(oItem);
string id = itemRespVal.Id.Value;
string syncToken = itemRespVal.SyncToken;
}