Search code examples
phpquickbooksquickbooks-onlineintuit-partner-platform

Passing IPPReferenceType for parentref but the still sub customer data is not adding up in Quickbook API online


I almost went through all the sources to find the fix for this.

I need to add a sub customer to a customer in quickbooks thru php.

I have already marked true to job in the object and also passing the IPPReferenceType object for ParentRef yet the data is not reflecting.

This is the object which I am passing :

IPPCustomer Object (
[Taxable] => 
[BillAddr] => 
[ShipAddr] => 
[OtherAddr] => 
[ContactName] => 
[AltContactName] => 
[Notes] => 
[Job] => 1
[BillWithParent] => 
[RootCustomerRef] => 
[ParentRef] => IPPReferenceType Object
    (
        [name] => 
        [type] => 
        [value] => 95
    )

[Level] => 
[CustomerTypeRef] => 
[SalesTermRef] => 
[SalesRepRef] => 
[TaxGroupCodeRef] => 
[TaxRateRef] => 
[PaymentMethodRef] => 
[CCDetail] => 
[PriceLevelRef] => 
[Balance] => 
[OpenBalanceDate] => 
[BalanceWithJobs] => 
[CreditLimit] => 
[AcctNum] => 
[CurrencyRef] => 
[OverDueBalance] => 
[TotalRevenue] => 
[TotalExpense] => 
[PreferredDeliveryMethod] => 
[ResaleNum] => 
[JobInfo] => 
[CustomerEx] => 
[IntuitId] => 
[Organization] => 
[Title] => 
[GivenName] => Pratibha
[MiddleName] => 
[FamilyName] => Mishra
[Suffix] => 
[FullyQualifiedName] => 
[CompanyName] => 
[DisplayName] => Pratibha Mishra
[PrintOnCheckName] => 
[UserId] => 
[Active] => 1
[PrimaryPhone] => IPPTelephoneNumber Object
    (
        [Id] => 
        [DeviceType] => 
        [CountryCode] => 
        [AreaCode] => 
        [ExchangeCode] => 
        [Extension] => 
        [FreeFormNumber] => (418) 124-6538
        [Default] => 
        [Tag] => 
    )

[AlternatePhone] => IPPTelephoneNumber Object
    (
        [Id] => 
        [DeviceType] => 
        [CountryCode] => 
        [AreaCode] => 
        [ExchangeCode] => 
        [Extension] => 
        [FreeFormNumber] => (418) 478-6538
        [Default] => 
        [Tag] => 
    )

[Mobile] => 
[Fax] => 
[PrimaryEmailAddr] => IPPEmailAddress Object
    (
        [Id] => 
        [Address] => [email protected]
        [Default] => 
        [Tag] => 
    )

[WebAddr] => 
[OtherContactInfo] => 
[DefaultTaxCodeRef] => 
[Id] => 
[SyncToken] => 
[MetaData] => 
[CustomField] => 
[AttachableRef] => 
[domain] => 
[status] => 
[sparse] => 
)

As you can see I have a customer with the value 95 and I am passing the same to ParentRef for this object which is a sub customer.

I am using php to integrate the data into quickbooks and I am using V3QBO package.

Please let me know you suggestions and advice. Thanks in advance !!


Solution

  • You can fix the above issue by setting the true value as string instead of a boolean, like this:

    [Job] => 'true';

    same thing will happen with BillWithParent and the workarround as well.

    Reference link

    https://intuitdeveloper.lc.intuit.com/questions/1039309-can-t-set-a-customer-as-job-or-sub-customer-using-php-and-sdk-v3