quickbooks在线API,带有父母转售号码的账单没有价值

时间:2013-07-30 17:27:00

标签: quickbooks intuit-partner-platform quickbooks-online

参考以下帖子:http://ippdocs.intuit.com/0025_QuickBooksAPI/0050_Data_Services/v2/0400_QuickBooks_Online/Customer/Custom_Fields_for_Customer_and_Job

我专门在我的QBO中寻找有父母的帐户 - >孩子的关系。但是,在Bill With Parent为真的情况下,“转售号码”没有价值,我认为这是父母的QBO ID?

任何有关如何提取此信息的帮助都会有所帮助。

在C#中,我正在执行以下操作并循环使用可用帐户:

    var qboCustomer = new Intuit.Ipp.Data.Qbo.Customer();
    var qboCustomers = commonService.FindAll(qboCustomer, page, custKnt).ToList();
    custKnt = qboCustomers.Count;
    foreach (var c in qboCustomers)
    {
        Intuit.Ipp.Data.Qbo.BooleanTypeCustomField parentBilling = (Intuit.Ipp.Data.Qbo.BooleanTypeCustomField)c.CustomField.Where(a => a.DefinitionId == "Bill With Parent").FirstOrDefault();
        if (parentBilling != null)
        {
            if (parentBilling.Value == true)
            {
                Intuit.Ipp.Data.Qbo.StringTypeCustomField resaleNum = (Intuit.Ipp.Data.Qbo.StringTypeCustomField)c.CustomField.Where(a => a.DefinitionId == "Resale Number").FirstOrDefault();
                if (resaleNum != null)
                {
                    //do some stuff, however, resaleNum is ALWAYS null...
                }
            }
        }

1 个答案:

答案 0 :(得分:0)

Bill With Parent为真的案例就像为客户创建工作(子客户)。 “转售号码”应在自定义字段中设置,或在税收信息的UI下设置,如图所示。 然后只显示它,不会为空。它未设置为父级的QBO Id。 你的代码是正确的。我验证了它。只需设置resaleNum即可检索它。Job info page

Get root customer QBOID for a job/sub customer