Hello I am facing issue when adding SalesOrderAddRq in Quickbooks using https://packagist.org/packages/consolibyte/quickbooks
following is my XML for adding salesorder in Quickbooks and also here is tag <ListID >
what will be the value of this is field!
further more i am getting this error when adding
Version: PHP QuickBooks SOAP Server v3.0 at /quickbooks/qbwc
Message:
3140: There is an invalid reference to QuickBooks Customer "john Doe" in the SalesOrder. QuickBooks error message: Invalid argument. The specified record does not exist in the list.
Description:
Error message received from application via getLastError(): 3140: There is an invalid reference to QuickBooks Customer "john Doe" in the SalesOrder. QuickBooks error message: Invalid argument. The specified record does not exist in the list.
public function _addSaleorderRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale)
{
// Do something here to load data using your model
//$data = $this->yourmodel->getCustomerData($ID);
// Build the qbXML request from $data
$xml = '<?xml version="1.0"?>
<?qbxml version="4.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<SalesOrderAddRq requestID="' . $requestID . '">
<SalesOrderAdd>
<CustomerRef> <!-- required -->
<ListID >' . $requestID . '</ListID> <!-- optional -->
<FullName >john Doe</FullName> <!-- optional -->
</CustomerRef>
<TxnDate>2013-05-23</TxnDate>
<RefNumber>$requestID</RefNumber>
<BillAddress>
<Addr1>China Town One</Addr1>
<Addr2>China Town Two</Addr2>
<City>Pta Nai</City>
<State>Dont Know</State>
<PostalCode>420420</PostalCode>
<Country>PK</Country>
</BillAddress>
<ShipAddress>
<Addr1>China Town One</Addr1>
<Addr2>China Town Two</Addr2>
<City>Houston</City>
<State>TX</State>
<PostalCode>77074</PostalCode>
<Country>US</Country>
</ShipAddress>
<SalesOrderLineAdd>
<ItemRef>
<FullName>Booklets:CB1-101</FullName>
</ItemRef>
<Desc>CHF</Desc>
<Quantity>15</Quantity>
<Amount>59.25</Amount>
</SalesOrderLineAdd>
<SalesOrderLineAdd>
<ItemRef>
<FullName>Booklets:CB3-101</FullName>
</ItemRef>
<Desc>High Blood Pressure</Desc>
<Quantity>15</Quantity>
<Amount>59.25</Amount>
</SalesOrderLineAdd>
<SalesOrderLineAdd>
<ItemRef>
<FullName>Booklets:DB1-101</FullName>
</ItemRef>
<Desc>Diabetes Type 1 or 2 with Insulin</Desc>
<Quantity>15</Quantity>
<Amount>59.25</Amount>
</SalesOrderLineAdd>
<SalesOrderLineAdd>
<ItemRef>
<FullName>Booklets:DB2-101</FullName>
</ItemRef>
<Desc>Diabetes Type 1 or 2 w/o Insulin</Desc>
<Quantity>15</Quantity>
<Amount>59.25</Amount>
</SalesOrderLineAdd>
</SalesOrderAdd>
</SalesOrderAddRq>
</QBXMLMsgsRq>
</QBXML>';
return $xml;
}