From 39b0ecf63cbdb24eb7f1ca0454e79a3a1057c3fb Mon Sep 17 00:00:00 2001 From: mc2contributor Date: Thu, 2 Feb 2023 11:56:24 -0700 Subject: [PATCH 01/49] Update README.md with fork info --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ad468cdc..e84d1dc2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +Forked from [consolibyte/quickbooks-php](https://github.com/consolibyte/quickbooks-php) to fix issues in PHP 8 and improve the code. + QuickBooks PHP DevKit ===================== From 72d71234fdbfe6f456bbdaec7897b810519d5ada Mon Sep 17 00:00:00 2001 From: Greg Payne Date: Thu, 2 Oct 2014 14:00:58 -0500 Subject: [PATCH 02/49] Added DepositAdd and DepositMod. --- QuickBooks/Callbacks/SQL/Callbacks.php | 5943 ++++++++++++------------ 1 file changed, 3007 insertions(+), 2936 deletions(-) diff --git a/QuickBooks/Callbacks/SQL/Callbacks.php b/QuickBooks/Callbacks/SQL/Callbacks.php index 14a5c944..d64c289b 100644 --- a/QuickBooks/Callbacks/SQL/Callbacks.php +++ b/QuickBooks/Callbacks/SQL/Callbacks.php @@ -8,9 +8,9 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * We dont' register the following callback handlers because the response is - * already included in other responses from other queries: + * already included in other responses from other queries: * No registered handler for: ItemDiscountQuery * No registered handler for: ItemFixedAssetQuery * No registered handler for: ItemGroupQuery @@ -20,7 +20,7 @@ * No registered handler for: ItemOtherChargeQuery * No registered handler for: ItemPaymentQuery * No registered handler for: ItemSalesTaxQuery - * No registered handler for: ItemServiceQuery + * No registered handler for: ItemServiceQuery * No registered handler for: ItemDiscountQuery * No registered handler for: ItemFixedAssetQuery * No registered handler for: ItemGroupQuery @@ -31,16 +31,16 @@ * No registered handler for: ItemPaymentQuery * No registered handler for: ItemSalesTaxQuery * No registered handler for: ItemServiceQuery - * + * * @author Keith Palmer * @author Garrett Griffin - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ -// For debugging... +// For debugging... //require_once '/Users/kpalmer/Projects/QuickBooks/QuickBooks.php'; //require_once '/Users/kpalmer/Sites/saas/library/quickbooks/QuickBooks.php'; //require_once '/home/playscape/www/html/QuickBooks/QuickBooks.php'; @@ -67,7 +67,7 @@ class QuickBooks_Callbacks_SQL_Callbacks { /** * Hook which gets called when the Web Connector authenticates to the server - * + * * @param string $requestID Not applicable to this hook * @param string $user The username of the user who connected * @param string $hook The name of the hook which connected @@ -79,22 +79,22 @@ class QuickBooks_Callbacks_SQL_Callbacks static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_data, $callback_config) { // $requestID, $user, $hook, &$err, $hook_data, $callback_config - + // Driver instance $Driver = QuickBooks_Driver_Singleton::getInstance(); - - // Map instance + + // Map instance $Map = new QuickBooks_Map_Qbxml($Driver); - + // Mode (read-onlyl, write-only, read/write) $mode = $callback_config['mode']; - + // How often recurring events happen $run_every = $callback_config['recur']; - + // $map parameter $sql_map = $callback_config['map']; - + // Which things do you want to query? (QuickBooks => SQL database) /* $sql_query = array(); @@ -102,7 +102,7 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat { $sql_query[$action] = QuickBooks_Utilities::priorityForAction($action); } - + $sql_query = QuickBooks_Callbacks_SQL_Callbacks::_filterActions($sql_query, $callback_config['_only_query'], $callback_config['_dont_query'], QUICKBOOKS_QUERY); */ @@ -111,114 +111,114 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat $sql_import = array(); $tmp = QuickBooks_Utilities::listActions('*IMPORT*'); - //print('0.01 [' . (microtime(true) - $start) . ']' . "\n\n"); + //print('0.01 [' . (microtime(true) - $start) . ']' . "\n\n"); foreach ($tmp as $action) { $sql_import[$action] = QuickBooks_Utilities::priorityForAction($action); } - //print('0.02 [' . (microtime(true) - $start) . ']' . "\n\n"); - + //print('0.02 [' . (microtime(true) - $start) . ']' . "\n\n"); + $sql_import = QuickBooks_Callbacks_SQL_Callbacks::_filterActions($sql_import, $callback_config['_only_import'], $callback_config['_dont_import'], QUICKBOOKS_IMPORT); - //print('0.03 [' . (microtime(true) - $start) . ']' . "\n\n"); - - //print('0.1 [' . (microtime(true) - $start) . ']' . "\n\n"); - + //print('0.03 [' . (microtime(true) - $start) . ']' . "\n\n"); + + //print('0.1 [' . (microtime(true) - $start) . ']' . "\n\n"); + // Which things you want to *add* to QuickBooks (SQL => QuickBooks (adds only!)) // @todo These should be changed to use QuickBooks_Utilities::listActions('*ADD*') $sql_add = array(); foreach (QuickBooks_Utilities::listActions('*ADD*') as $action) { - $sql_add[$action] = QuickBooks_Utilities::priorityForAction($action); + $sql_add[$action] = QuickBooks_Utilities::priorityForAction($action); } - + $sql_add = QuickBooks_Callbacks_SQL_Callbacks::_filterActions($sql_add, $callback_config['_only_add'], $callback_config['_dont_add'], QUICKBOOKS_ADD); - - //print('0.2 [' . (microtime(true) - $start) . ']' . "\n\n"); - + + //print('0.2 [' . (microtime(true) - $start) . ']' . "\n\n"); + // Which things you want to *modify* in QuickBooks (SQL => QuickBooks (modifys only!)) // @todo These should be changed to use QuickBooks_Utilities::listActions('*MOD*') $sql_mod = array(); foreach (QuickBooks_Utilities::listActions('*MOD*') as $action) { - $sql_mod[$action] = QuickBooks_Utilities::priorityForAction($action); + $sql_mod[$action] = QuickBooks_Utilities::priorityForAction($action); } - + $sql_mod = QuickBooks_Callbacks_SQL_Callbacks::_filterActions($sql_mod, $callback_config['_only_modify'], $callback_config['_dont_modify'], QUICKBOOKS_MOD); - - //print('0.3 [' . (microtime(true) - $start) . ']' . "\n\n"); - + + //print('0.3 [' . (microtime(true) - $start) . ']' . "\n\n"); + // Which things you want to *audit* in QuickBooks (QuickBooks => SQL) $sql_audit = array(); foreach (QuickBooks_Utilities::listActions('*AUDIT*') as $action) { $sql_audit[$action] = QuickBooks_Utilities::priorityForAction($action); } - + //print('1 [' . (microtime(true) - $start) . ']' . "\n\n"); $start = microtime(true); - + // Queueing class //$Queue = new QuickBooks_Queue($dsn_or_conn); - + // List of all actions we're performing $actions = array(); - - if ($mode == QuickBooks_WebConnector_Server_SQL::MODE_READONLY or + + if ($mode == QuickBooks_WebConnector_Server_SQL::MODE_READONLY or $mode == QuickBooks_WebConnector_Server_SQL::MODE_READWRITE) { //print_r($sql_query); //print_r($sql_map); - + // Register recurring events for things you want to query //foreach ($sql_query as $action => $priority) foreach ($sql_import as $action => $priority) { //$Driver->log('Registering recurring event for: ' . $action, null, QUICKBOOKS_LOG_DEBUG); - + // Make sure that there are handlers registered for this recurring action if (!isset($sql_map[$action])) { //trigger_error('No registered handler for: ' . $action); continue; } - + //$Queue->recurring($run_every, $action, md5(__FILE__), $priority, null, $user); $Driver->recurEnqueue($user, $run_every, $action, md5(__FILE__), true, $priority); - + $actions[] = $action; } - + if (in_array(QUICKBOOKS_QUERY_DELETEDLISTS, $callback_config['_only_misc'])) { // Also grab any deleted records $Driver->queueEnqueue($user, QUICKBOOKS_QUERY_DELETEDLISTS, 1, true, 0); } - + if (in_array(QUICKBOOKS_QUERY_DELETEDTXNS, $callback_config['_only_misc'])) { $Driver->queueEnqueue($user, QUICKBOOKS_QUERY_DELETEDTXNS, 1, true, 0); } - + if (in_array(QUICKBOOKS_DERIVE_INVENTORYLEVELS, $callback_config['_only_misc'])) { // Update inventory levels $Driver->queueEnqueue($user, QUICKBOOKS_DERIVE_INVENTORYLEVELS, 1, true, 0); } - + if (in_array(QUICKBOOKS_DERIVE_INVENTORYASSEMBLYLEVELS, $callback_config['_only_misc'])) { // Update inventory assembly levels $Driver->queueEnqueue($user, QUICKBOOKS_DERIVE_INVENTORYASSEMBLYLEVELS, 1, true, 0); } } - + //print('2 [' . (microtime(true) - $start) . ']' . "\n\n"); $start = microtime(true); - + /* // Queue up the audit requests - // Audit requests pull in just the calculated TotalAmount and the - // TimeModified timestamp from transactions, and store these in - // the qbsql_audit_* fields so we can tell if there are transactions - // in QuickBooks that don't match up correctly to what's in the SQL + // Audit requests pull in just the calculated TotalAmount and the + // TimeModified timestamp from transactions, and store these in + // the qbsql_audit_* fields so we can tell if there are transactions + // in QuickBooks that don't match up correctly to what's in the SQL // database. foreach ($sql_audit as $action => $priority) { @@ -226,49 +226,49 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat { continue; } - + $Driver->queueEnqueue($user, $action, 1, true, $priority); } */ - - // Searching the tables can take a long time, you could potentially - // have 10 or 15 seconds between when we search for new customers, and - // when we search for new invoices. What we don't want to have happen - // is that we search for new customers to be queued up, then a new - // customer and invoice gets added, then we search for invoices to be - // queued up, queue up the invoice, but the customer it depends on - // didn't get queued up yet... results in an error! - // - // We avoid this by keeping track of when NOW is, and only queueing up + + // Searching the tables can take a long time, you could potentially + // have 10 or 15 seconds between when we search for new customers, and + // when we search for new invoices. What we don't want to have happen + // is that we search for new customers to be queued up, then a new + // customer and invoice gets added, then we search for invoices to be + // queued up, queue up the invoice, but the customer it depends on + // didn't get queued up yet... results in an error! + // + // We avoid this by keeping track of when NOW is, and only queueing up // things that are older than NOW() $NOW = date('Y-m-d H:i:s'); - + // Limit to max adds by time per auth $time_limit = 15; // 60 *second* limit $time_start = time(); // When we started - + // Objects that need to be *ADDED* to QuickBooks - if ($mode == QuickBooks_WebConnector_Server_SQL::MODE_WRITEONLY or + if ($mode == QuickBooks_WebConnector_Server_SQL::MODE_WRITEONLY or $mode == QuickBooks_WebConnector_Server_SQL::MODE_READWRITE) { $mark_as_queued = false; $map = $Map->adds($sql_add, $mark_as_queued); - + //$Driver->log('ADDS: ' . print_r($map, true)); - + // Go through each action in the returned map foreach ($map as $action => $list) { //$Driver->log('Now doing: ' . $action . ', ' . print_r($list, true)); - + //$__start = microtime(true); - + // Go through each ID for each action $counter = 0; foreach ($list as $ID => $priority) { $counter++; - + if (time() - $time_start > $time_limit) { //print('HIT LIMIT SO WE\'RE BREAKING OUT OF HERE [' . $action . '] [ ' . $counter . ' of ' . count($list) . ']!' . "\n"); @@ -277,29 +277,29 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat // Queue it up to be added to QuickBooks $Driver->queueEnqueue($user, $action, $ID, true, $priority); } - + //print('now ' . $action . ' [' . (microtime(true) - $__start) . ']' . "\n"); } } - + //print('3 [' . (microtime(true) - $start) . ']' . "\n\n"); $start = microtime(true); - + // Objects that need to be *MODIFIED* within QuickBooks - if ($mode == QuickBooks_WebConnector_Server_SQL::MODE_WRITEONLY or + if ($mode == QuickBooks_WebConnector_Server_SQL::MODE_WRITEONLY or $mode == QuickBooks_WebConnector_Server_SQL::MODE_READWRITE) { - // Check if any objects need to be pushed back to QuickBooks + // Check if any objects need to be pushed back to QuickBooks foreach ($sql_mod as $action => $priority) { $object = QuickBooks_Utilities::actionToObject($action); - + $table_and_field = array(); - + // Convert to table and primary key, select qbsql id - QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); - + QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); + //$Driver->log('Searching table: ' . print_r($table_and_field, true) . ' for MODIFIED records.', null, QUICKBOOKS_LOG_DEBUG); - + // If we managed to map a table, we need to search that table for changed records if (!empty($table_and_field[0]) and !empty($table_and_field[1])) { @@ -307,23 +307,23 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat // - Do not sync if to_delete = 1 // - Do not sync if to_skip = 1 // - Do not sync if an error occurred on this record - + $sql = " - SELECT - " . QUICKBOOKS_DRIVER_SQL_FIELD_ID . ", + SELECT + " . QUICKBOOKS_DRIVER_SQL_FIELD_ID . ", " . QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_NUMBER . " - FROM - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " - WHERE - " . QUICKBOOKS_DRIVER_SQL_FIELD_DISCOVER . " IS NOT NULL AND + FROM + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " + WHERE + " . QUICKBOOKS_DRIVER_SQL_FIELD_DISCOVER . " IS NOT NULL AND " . QUICKBOOKS_DRIVER_SQL_FIELD_RESYNC . " IS NOT NULL AND " . QUICKBOOKS_DRIVER_SQL_FIELD_MODIFY . " > " . QUICKBOOKS_DRIVER_SQL_FIELD_RESYNC . " AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_DELETE . " != 1 AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED . " != 1 AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_VOID . " != 1 AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_SKIP . " != 1 AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_DELETE . " != 1 AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED . " != 1 AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_VOID . " != 1 AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_SKIP . " != 1 AND " . QUICKBOOKS_DRIVER_SQL_FIELD_MODIFY . " <= '" . $NOW . "' "; - + $errnum = 0; $errmsg = ''; $res = $Driver->query($sql, $errnum, $errmsg); @@ -332,71 +332,71 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat if (strlen($arr[QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_NUMBER])) { // Do not sync this record until the error is resolved - + continue; } - + // Queue up this MOD request $Driver->queueEnqueue($user, $action, $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID], true, $priority); - + $actions[] = $action; - + // Mark the record as enqueued - let's wait until the hashing is in for this //$Driver->query(..., $errnum, $errmsg); } } } - } - + } + //print('4 [' . (microtime(true) - $start) . ']' . "\n\n"); $start = microtime(true); - - if ($mode == QuickBooks_WebConnector_Server_SQL::MODE_WRITEONLY or + + if ($mode == QuickBooks_WebConnector_Server_SQL::MODE_WRITEONLY or $mode == QuickBooks_WebConnector_Server_SQL::MODE_READWRITE) { // Check if any *voided* objects need to be voided in QuickBooks foreach ($sql_add as $action => $priority) { $object = QuickBooks_Utilities::actionToObject($action); - + $dependency = null; if ($object == QUICKBOOKS_OBJECT_BILL) { // Bill VOID dependency is PurchaseOrderMod because we want to be able to manually close POs (but need to VOID the bills first) $dependency = QUICKBOOKS_MOD_PURCHASEORDER; } - + $priority = QuickBooks_Utilities::priorityForAction(QUICKBOOKS_VOID_TRANSACTION, $dependency); - + $table_and_field = array(); // Convert to table and primary key, select qbsql id - QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); - + QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); + //$Driver->log('Searching table: ' . print_r($table_and_field, true) . ' for VOIDED records.', null, QUICKBOOKS_LOG_DEBUG); - + if (!empty($table_and_field[0])) { $sql = " - SELECT + SELECT " . QUICKBOOKS_DRIVER_SQL_FIELD_ID . " - FROM - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " - WHERE - " . QUICKBOOKS_DRIVER_SQL_FIELD_DISCOVER . " IS NOT NULL AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_DELETE . " != 1 AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED . " != 1 AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_VOID . " = 1 AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_VOIDED . " != 1 AND + FROM + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " + WHERE + " . QUICKBOOKS_DRIVER_SQL_FIELD_DISCOVER . " IS NOT NULL AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_DELETE . " != 1 AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED . " != 1 AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_VOID . " = 1 AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_VOIDED . " != 1 AND " . QUICKBOOKS_DRIVER_SQL_FIELD_MODIFY . " <= '" . $NOW . "' "; - + $errnum = 0; $errmsg = ''; $res = $Driver->query($sql, $errnum, $errmsg); - + $extra = array( - 'object' => $object, + 'object' => $object, ); - + while ($arr = $Driver->fetch($res)) { $Driver->queueEnqueue($user, QUICKBOOKS_VOID_TRANSACTION, $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID], true, $priority, $extra); @@ -404,43 +404,43 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat } } } - + //print('5 [' . (microtime(true) - $start) . ']' . "\n\n"); $start = microtime(true); - - if ($mode == QuickBooks_WebConnector_Server_SQL::MODE_WRITEONLY or + + if ($mode == QuickBooks_WebConnector_Server_SQL::MODE_WRITEONLY or $mode == QuickBooks_WebConnector_Server_SQL::MODE_READWRITE) { - // Check if any *deleted* objects need to be deleted from QuickBooks + // Check if any *deleted* objects need to be deleted from QuickBooks foreach ($sql_add as $action => $priority) { break; - + $priority = 1000 - $priority; $object = QuickBooks_Utilities::actionToObject($action); - + $table_and_field = array(); - + // Convert to table and primary key, select qbsql id - QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); - + QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); + // Delete if it's marked for deletion and it hasn't been deleted already if (!empty($table_and_field[0])) { $sql = " - SELECT + SELECT " . QUICKBOOKS_DRIVER_SQL_FIELD_ID . " - FROM - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " - WHERE - " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_DELETE . " = 1 AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED . " != 1 AND + FROM + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " + WHERE + " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_DELETE . " = 1 AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED . " != 1 AND " . QUICKBOOKS_DRIVER_SQL_FIELD_MODIFY . " <= '" . $NOW . "' "; - + $errnum = 0; $errmsg = ''; $res = $Driver->query($sql, $errnum, $errmsg); $key = QuickBooks_Utilities::keyForAction($action); - + if ($key == 'ListID') { $useAction = 'ListDel'; @@ -449,7 +449,7 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat { $useAction = 'TxnDel'; } - + $extra['objectType'] = $object; while ($arr = $Driver->fetch($res)) { @@ -458,45 +458,45 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat } } } - + //print('6 [' . (microtime(true) - $start) . ']' . "\n\n"); $start = microtime(true); - + /* // This makes sure that timestamps are set up for every action we're doing (fixes a bug where timestamps never get recorded on initial sync without iterator) foreach ($actions as $action) { $module = __CLASS__; - + $key_curr = QuickBooks_Callbacks_SQL_Callbacks::_keySyncCurr($action); $key_prev = QuickBooks_Callbacks_SQL_Callbacks::_keySyncPrev($action); - + $type = null; $opts = null; - $curr_sync_datetime = $Driver->configRead($user, $module, $key_curr, $type, $opts); // last sync started... - $prev_sync_datetime = $Driver->configRead($user, $module, $key_prev, $type, $opts); // last sync started... - + $curr_sync_datetime = $Driver->configRead($user, $module, $key_curr, $type, $opts); // last sync started... + $prev_sync_datetime = $Driver->configRead($user, $module, $key_prev, $type, $opts); // last sync started... + $datetime = QuickBooks_Utilities::datetime('1983-01-02'); - + if (!$curr_sync_datetime) { $Driver->configWrite($user, $module, $key_curr, $datetime, null); } - + if (!$prev_sync_datetime) { $Driver->configWrite($user, $module, $key_prev, $datetime, null); } } */ - + //print("\n\n" . 'here [ ' . (microtime(true) - $_start) . ']' . "\n\n\n"); - + return true; } - + /** * Restrict the queueing maps to "only do these actions" and "dont do these actions" maps - * + * * @param array $action_to_priority * @param array $only_do * @param array $dont_do @@ -510,14 +510,14 @@ static protected function _filterActions($action_to_priority, $only_do, $dont_do //print('stepping 1... [' . (microtime(true) - $start) . ']' . "\n"); $converted = QuickBooks_Utilities::actionToObject($action); //print('stepping 2... [' . (microtime(true) - $start) . ']' . "\n"); - + if (count($only_do) and - (false === array_search($action, $only_do) and + (false === array_search($action, $only_do) and false === array_search($converted, $only_do))) { unset($action_to_priority[$action]); } - + if (count($dont_do) and (false !== array_search($action, $dont_do) or false !== array_search($converted, $dont_do))) @@ -526,17 +526,17 @@ static protected function _filterActions($action_to_priority, $only_do, $dont_do } } //print("\n" . 'ending... [' . (microtime(true) - $start) . ']' . "\n\n"); - + arsort($action_to_priority); - + //print_r($action_to_priority); - + return $action_to_priority; } - + /** - * - * + * + * * @todo Implement error handling routines * * @param array $hooks @@ -551,15 +551,15 @@ static protected function _filterActions($action_to_priority, $only_do, $dont_do protected static function _callHooks(&$hooks, $hook, $requestID, $user, &$err, $hook_data, $callback_config = array()) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - - return QuickBooks_Callbacks::callHook($Driver, $hooks, $hook, $requestID, $user, null, $err, $hook_data, $callback_config, __FILE__, __LINE__); + + return QuickBooks_Callbacks::callHook($Driver, $hooks, $hook, $requestID, $user, null, $err, $hook_data, $callback_config, __FILE__, __LINE__); } - + /** * Returns TRUE if the current version if it's greater than or equal to the required version * - * * NOTE: * - * + * * NOTE: * + * * @param float $required * @param float $current * @return float @@ -570,17 +570,17 @@ protected static function _requiredVersion($required, $current, $locale = QUICKB { return $current >= $required; } - + return true; } - + /** * Returns the supported qbxml version="..." string for this qbXML version and locale - * - * Notes: + * + * Notes: * - If it's a US version of QuickBooks, "6.0" will yield "6.0" * - If it's a non-US version, "3.0" will yield "CA3.0" where "CA" is the locale code (in this case, for Canada) - * + * * @param float $version * @param string $locale * @return string @@ -591,10 +591,10 @@ protected static function _version($version, $locale) { return $version; } - + return $locale . $version; } - + /** * Returns the string $element if the current version is greater than or equal to the required version * @@ -612,29 +612,29 @@ protected static function _requiredVersionForElement($required, $current, $eleme return $element; } } - + return ''; } /** * Used to build the iterator part of the XML string for every qbXML *QueryRq method - * + * * Note: Funtion is intentionally returning a string without a closing '>', reason being so that people writing * new functions for this class won't be confused, since they have to call the function in the middle of an * XML tag, makes sense for them to have a closing bracket there - * + * * @param mixed $extra The $extra value that is passed to the method you're calling this from * @return string */ protected static function _buildIterator($extra, $version = null, $locale = null) { $xml = ""; - + if ($locale == QUICKBOOKS_LOCALE_CA or $locale == QUICKBOOKS_LOCALE_UK or $locale == QUICKBOOKS_LOCALE_AU) { return ''; } - + if (is_array($extra) and !empty($extra['iteratorID'])) { @@ -644,10 +644,10 @@ protected static function _buildIterator($extra, $version = null, $locale = null { $xml .= ' iterator="Start" '; } - + $xml .= '>' . "\n"; $xml .= "\t" . ''; - + if (is_array($extra) and !empty($extra['maxReturned'])) { @@ -657,12 +657,12 @@ protected static function _buildIterator($extra, $version = null, $locale = null { $xml .= QUICKBOOKS_SERVER_SQL_ITERATOR_MAXRETURNED; } - + $xml .= ' - + InventoryStockStatusByItem false - + - + '; - + return $xml; } - + /** * Handle an inventory stock status report from QuickBooks */ public static function InventoryLevelsResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $callback_config = array()) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + $col_defs = array(); - + //mysql_query("INSERT INTO quickbooks_log ( msg, log_datetime ) VALUES ( 'TESTING', NOW() ) ") or die(mysql_error()); - + // First, find the column definitions $tmp = $xml; $find = 'ColDesc'; @@ -705,72 +705,72 @@ public static function InventoryLevelsResponse($requestID, $user, $action, $ID, { $colID = QuickBooks_Callbacks_SQL_Callbacks::_reportExtractColID($inner); $type = QuickBooks_Callbacks_SQL_Callbacks::_reportExtractColType($inner); - + $col_defs[$colID] = $type; } - + //print_r($col_defs); //exit; - + $items = array(); - + // Now, find the actual data $tmp = $xml; $find = 'DataRow'; while ($inner = QuickBooks_Callbacks_SQL_Callbacks::_reportNextXML($tmp, $find)) { $item = array( - 'FullName' => null, - 'Blank' => null, // - 'ItemDesc' => null, // + 'FullName' => null, + 'Blank' => null, // + 'ItemDesc' => null, // 'ItemVendor' => null, // Pref Vendor 'ReorderPoint' => null, // Reorder Pt 'QuantityOnHand' => null, // On Hand 'SuggestedReorder' => null, // Order 'QuantityOnOrder' => null, // On PO - 'QuantityOnSalesOrder' => null, // On Sales Order + 'QuantityOnSalesOrder' => null, // On Sales Order 'EarliestReceiptDate' => null, // Next Deliv 'SalesPerWeek' => null, // Sales/Week ); - + $find2 = 'RowData'; if ($tag = QuickBooks_Callbacks_SQL_Callbacks::_reportNextTag($inner, $find2)) { $value = QuickBooks_Callbacks_SQL_Callbacks::_reportExtractColValue($tag); - + $item['FullName'] = $value; } - + $find3 = 'ColData'; while ($tag = QuickBooks_Callbacks_SQL_Callbacks::_reportNextTag($inner, $find3)) { $colID = QuickBooks_Callbacks_SQL_Callbacks::_reportExtractColID($tag); $value = QuickBooks_Callbacks_SQL_Callbacks::_reportExtractColValue($tag); - + if (array_key_exists($colID, $col_defs)) { $item[$col_defs[$colID]] = $value; } } - + //$items[] = $item; - + /* Inventory for "another inventory": Array ( [FullName] => another inventory [Blank] => another inventory - [ItemDesc] => - [ItemVendor] => + [ItemDesc] => + [ItemVendor] => [ReorderPoint] => 5 [QuantityOnHand] => 35 [SuggestedReorder] => false [QuantityOnOrder] => 0 - [EarliestReceiptDate] => + [EarliestReceiptDate] => [SalesPerWeek] => 0 ) */ - + $Driver->log('Inventory for "' . $item['FullName'] . '": ' . print_r($item, true), null, QUICKBOOKS_LOG_DEBUG); //$errnum = null; //$errmsg = null; @@ -778,73 +778,73 @@ public static function InventoryLevelsResponse($requestID, $user, $action, $ID, // UPDATE item SET QuantityOnHand = x WHERE FullName = y, resync = NOW() AND qbsql_resync_datetime = qbsql_modify_timestamp // if (!affected_rows) // UPDATE item SET QuantityOnHand = x WHERE FullName = y // this was a modified item, so it needs to stay modified - + $sql1 = " - UPDATE - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . "iteminventory - SET - QuantityOnHand = " . (float) $item['QuantityOnHand'] . ", - QuantityOnOrder = " . (float) $item['QuantityOnOrder'] . ", - QuantityOnSalesOrder = " . (float) $item['QuantityOnSalesOrder'] . ", - qbsql_resync_datetime = '%s', + UPDATE + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . "iteminventory + SET + QuantityOnHand = " . (float) $item['QuantityOnHand'] . ", + QuantityOnOrder = " . (float) $item['QuantityOnOrder'] . ", + QuantityOnSalesOrder = " . (float) $item['QuantityOnSalesOrder'] . ", + qbsql_resync_datetime = '%s', qbsql_modify_timestamp = '%s' WHERE - FullName = '%s' AND + FullName = '%s' AND qbsql_resync_datetime = qbsql_modify_timestamp "; - + $datetime = date('Y-m-d H:i:s'); - + $vars1 = array( $datetime, $datetime, $item['FullName'] ); - + $errnum = null; $errmsg = null; - $Driver->query($sql1, $errnum, $errmsg, 0, 1, $vars1); - + $Driver->query($sql1, $errnum, $errmsg, 0, 1, $vars1); + //$Driver->log($sql1, null, QUICKBOOKS_LOG_DEBUG); - + if (!$Driver->affected()) { $sql2 = " - UPDATE - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . "iteminventory - SET - QuantityOnHand = " . (float) $item['QuantityOnHand'] . ", - QuantityOnOrder = " . (float) $item['QuantityOnOrder'] . ", + UPDATE + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . "iteminventory + SET + QuantityOnHand = " . (float) $item['QuantityOnHand'] . ", + QuantityOnOrder = " . (float) $item['QuantityOnOrder'] . ", QuantityOnSalesOrder = " . (float) $item['QuantityOnSalesOrder'] . " WHERE FullName = '%s' "; - + $vars2 = array( $item['FullName'] ); - + $errnum = null; $errmsg = null; - $Driver->query($sql2, $errnum, $errmsg, 0, 1, $vars2); - + $Driver->query($sql2, $errnum, $errmsg, 0, 1, $vars2); + //$Driver->log($sql2, null, QUICKBOOKS_LOG_DEBUG); } - + $hooks = array(); if (isset($callback_config['hooks'])) { $hooks = $callback_config['hooks']; } - + $Driver->log('CALLING THE HOOKS! ' . print_r($hooks, true), null, QUICKBOOKS_LOG_VERBOSE); - - // Call any hooks that occur when a record is updated + + // Call any hooks that occur when a record is updated $hook_data = array( 'hook' => QuickBooks_SQL::HOOK_SQL_INVENTORY, 'user' => $user, 'table' => QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'iteminventory', - 'data' => $item, + 'data' => $item, ); - + $err = null; QuickBooks_Callbacks_SQL_Callbacks::_callHooks($hooks, QuickBooks_SQL::HOOK_SQL_INVENTORY, $requestID, $user, $err, $hook_data, $callback_config); } - + //print_r($items); - + //$Driver->log('Inventory: ' . print_r($items, true), null, QUICKBOOKS_LOG_VERBOSE); } @@ -869,18 +869,18 @@ public static function InventoryAssemblyLevelsRequest($requestID, $user, $action return $xml; } - + /** * Handle an inventory stock status report from QuickBooks */ public static function InventoryAssemblyLevelsResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $callback_config = array()) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + $col_defs = array(); - + //mysql_query("INSERT INTO quickbooks_log ( msg, log_datetime ) VALUES ( 'TESTING', NOW() ) ") or die(mysql_error()); - + // First, find the column definitions $tmp = $xml; $find = 'ColDesc'; @@ -888,72 +888,72 @@ public static function InventoryAssemblyLevelsResponse($requestID, $user, $actio { $colID = QuickBooks_Callbacks_SQL_Callbacks::_reportExtractColID($inner); $type = QuickBooks_Callbacks_SQL_Callbacks::_reportExtractColType($inner); - + $col_defs[$colID] = $type; } - + //print_r($col_defs); //exit; - + $items = array(); - + // Now, find the actual data $tmp = $xml; $find = 'DataRow'; while ($inner = QuickBooks_Callbacks_SQL_Callbacks::_reportNextXML($tmp, $find)) { $item = array( - 'FullName' => null, - 'Blank' => null, // - 'ItemDesc' => null, // + 'FullName' => null, + 'Blank' => null, // + 'ItemDesc' => null, // 'ItemVendor' => null, // Pref Vendor 'ReorderPoint' => null, // Reorder Pt 'QuantityOnHand' => null, // On Hand 'SuggestedReorder' => null, // Order 'QuantityOnOrder' => null, // On PO - 'QuantityOnSalesOrder' => null, // On Sales Order + 'QuantityOnSalesOrder' => null, // On Sales Order 'EarliestReceiptDate' => null, // Next Deliv 'SalesPerWeek' => null, // Sales/Week ); - + $find2 = 'RowData'; if ($tag = QuickBooks_Callbacks_SQL_Callbacks::_reportNextTag($inner, $find2)) { $value = QuickBooks_Callbacks_SQL_Callbacks::_reportExtractColValue($tag); - + $item['FullName'] = $value; } - + $find3 = 'ColData'; while ($tag = QuickBooks_Callbacks_SQL_Callbacks::_reportNextTag($inner, $find3)) { $colID = QuickBooks_Callbacks_SQL_Callbacks::_reportExtractColID($tag); $value = QuickBooks_Callbacks_SQL_Callbacks::_reportExtractColValue($tag); - + if (array_key_exists($colID, $col_defs)) { $item[$col_defs[$colID]] = $value; } } - + //$items[] = $item; - + /* Inventory for "another inventory": Array ( [FullName] => another inventory [Blank] => another inventory - [ItemDesc] => - [ItemVendor] => + [ItemDesc] => + [ItemVendor] => [ReorderPoint] => 5 [QuantityOnHand] => 35 [SuggestedReorder] => false [QuantityOnOrder] => 0 - [EarliestReceiptDate] => + [EarliestReceiptDate] => [SalesPerWeek] => 0 ) */ - + $Driver->log('Inventory Assembly for "' . $item['FullName'] . '": ' . print_r($item, true), null, QUICKBOOKS_LOG_DEBUG); //$errnum = null; //$errmsg = null; @@ -972,7 +972,7 @@ public static function InventoryAssemblyLevelsResponse($requestID, $user, $actio qbsql_resync_datetime = '%s', qbsql_modify_timestamp = '%s' WHERE - FullName = '%s' AND + FullName = '%s' AND qbsql_resync_datetime = qbsql_modify_timestamp "; $datetime = date('Y-m-d H:i:s'); @@ -1030,46 +1030,46 @@ public static function InventoryAssemblyLevelsResponse($requestID, $user, $actio //$Driver->log('Inventory: ' . print_r($items, true), null, QUICKBOOKS_LOG_VERBOSE); } - + static protected function _reportExtractColID($xml) { $find = 'colID="'; if (false !== ($sta = strpos($xml, $find))) { $end = strpos($xml, '"', $sta + strlen($find)); - + return substr($xml, $sta + strlen($find), $end - $sta - strlen($find)); } - + return null; } - + static protected function _reportExtractColType($xml) { $find = ''; if (false !== ($sta = strpos($xml, $find))) { $end = strpos($xml, '', $sta + strlen($find)); - + return substr($xml, $sta + strlen($find), $end - $sta - strlen($find)); } - + return null; } - + static protected function _reportExtractColValue($xml) { $find = 'value="'; if (false !== ($sta = strpos($xml, $find))) { $end = strpos($xml, '"', $sta + strlen($find)); - + return substr($xml, $sta + strlen($find), $end - $sta - strlen($find)); } - + return null; } - + static protected function _reportNextTag(&$xml, $find) { if (false !== ($sta = strpos($xml, $find))) @@ -1079,48 +1079,48 @@ static protected function _reportNextTag(&$xml, $find) { $end = strpos($xml, ' @@ -1165,63 +1165,63 @@ public static function ListDeletedQueryRequest($requestID, $user, $action, $ID, '; - + return $xml; } - + /** * Handle a list of deleted items from QuickBooks */ public static function ListDeletedQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); $Root = $Doc->getRoot(); - + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ListDeletedQueryRs'); - + foreach ($List->children() as $Node) { $map = array(); $others = array(); - + QuickBooks_SQL_Schema::mapToSchema(trim(QuickBooks_Utilities::objectToXMLElement($Node->getChildDataAt('ListDeletedRet ListDelType'))), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $map, $others); - + if (isset($map[0])) { $table = $map[0]; - + $data = array( - 'qbsql_flag_deleted' => 1, + 'qbsql_flag_deleted' => 1, ); - + $multipart = array( 'ListID' => $Node->getChildDataAt('ListDeletedRet ListID') ); - + $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $data, array( $multipart )); } } - + return true; } - + /** * Fetch a list of deleted transactions from QuickBooks */ public static function TxnDeletedQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - - + + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(2.0, $version, $locale, QUICKBOOKS_DELETE_TRANSACTION)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -1258,51 +1258,51 @@ public static function TxnDeletedQueryRequest($requestID, $user, $action, $ID, $ '; - + return $xml; } - + /** * Handle a list of deleted transactions from QuickBooks - * + * * @todo Actually delete the elements. */ public static function TxnDeletedQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); $Root = $Doc->getRoot(); - + $List = $Root->getChildAt('QBXML QBXMLMsgsRs TxnDeletedQueryRs'); - + foreach($List->children() as $Node) { $map = array(); $others = array(); - + QuickBooks_SQL_Schema::mapToSchema(trim(QuickBooks_Utilities::objectToXMLElement($Node->getChildDataAt("TxnDeletedRet TxnDelType"))), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $map, $others); - + /* $sqlObject = new QuickBooks_SQL_Object($map[0], trim(QuickBooks_Utilities::objectToXMLElement($Node->getChildDataAt("TxnDeletedRet TxnDelType")))); $table = $sqlObject->table(); */ - + if (!empty($map[0])) { $table = $map[0]; $data = array( - 'qbsql_flag_deleted' => 1, + 'qbsql_flag_deleted' => 1, ); $multipart = array( 'TxnID' => $Node->getChildDataAt('TxnDeletedRet TxnID') ); - + $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $data, array( $multipart )); } - + } return true; } @@ -1314,11 +1314,11 @@ public static function ListDelRequest($requestID, $user, $action, $ID, $extra, & { $Driver = QuickBooks_Driver_Singleton::getInstance(); $ID = str_replace($extra['objectType'], '', $ID); - + if ($arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . strtolower($extra['objectType']), array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { $Object = new QuickBooks_SQL_Object(null, null, $arr); - + $xml .= ' @@ -1329,31 +1329,31 @@ public static function ListDelRequest($requestID, $user, $action, $ID, $extra, & '; - + return $xml; } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ListDelResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Driver = QuickBooks_Driver_Singleton::getInstance(); $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = QUICKBOOKS_XML_OK; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ListDelRs'); $Node = $List; - + if ($errnum == QUICKBOOKS_XML_OK) { /* @@ -1362,34 +1362,34 @@ public static function ListDelResponse($requestID, $user, $action, $ID, $extra, $others = array(); QuickBooks_SQL_Schema::mapToSchema(trim(QuickBooks_Utilities::objectToXMLElement($extra['objectType'])), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $map, $others); $object = new QuickBooks_SQL_Object($map[0], trim(QuickBooks_Utilities::objectToXMLElement($extra['objectType']))); - + $table = $sqlObject->table(); $multipart = array( - 'ListID' => $Node->getChildDataAt('ListDelRs ListID') + 'ListID' => $Node->getChildDataAt('ListDelRs ListID') ); - + $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED, 1); $object->set('ListID', $Node->getChildDataAt('ListDelRs ListID')); $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $object, array( $multipart )); - + // Now Delete/Flag all the children //$deleted = array(); //QuickBooks_Callbacks_SQL_Callbacks::_deleteChildren($table, $user, $action, $ID, $object, $extra, $deleted, $config, true, true); */ } - + return true; } - + /** * Void a transaction - * + * * @return string */ public static function TxnVoidRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + if ($arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . strtolower($extra['object']), array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { $xml = ''; @@ -1403,56 +1403,56 @@ public static function TxnVoidRequest($requestID, $user, $action, $ID, $extra, & '; - + return $xml; } - - return ''; + + return ''; } - + /** * Receive a response from QuickBooks about a voided transaction - * + * * @return boolean */ public static function TxnVoidResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array()) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + // Figure out what SQL table this object came from $map = array(); $others = array(); QuickBooks_SQL_Schema::mapToSchema(trim(QuickBooks_Utilities::objectToXMLElement($extra['object'])), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $map, $others); - + $table = QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $map[0]; - + // We just need to set the voided flag on the transaction $update = array( - QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_VOIDED => 1, - 'AmountDue' => 0.0, - 'Amount' => 0.0, - 'OpenAmount' => 0.0, - 'Amount' => 0.0, - 'Subtotal' => 0.0, - 'TotalAmount' => 0.0, - 'BalanceRemaining' => 0.0, + QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_VOIDED => 1, + 'AmountDue' => 0.0, + 'Amount' => 0.0, + 'OpenAmount' => 0.0, + 'Amount' => 0.0, + 'Subtotal' => 0.0, + 'TotalAmount' => 0.0, + 'BalanceRemaining' => 0.0, 'SalesTaxTotal' => 0.0, ); - + $where = array( - array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ), - ); - + array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ), + ); + // Update the SQL table to indicate it was voided - $Driver->update($table, $update, $where); - + $Driver->update($table, $update, $where); + return true; } - + /** - * - * - * + * + * + * */ public static function TxnDelRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -1461,7 +1461,7 @@ public static function TxnDelRequest($requestID, $user, $action, $ID, $extra, &$ if ($arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . strtolower($extra['objectType']), array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { $Object = new QuickBooks_SQL_Object(null, null, $arr); - + $xml = ''; $xml .= ' @@ -1473,31 +1473,31 @@ public static function TxnDelRequest($requestID, $user, $action, $ID, $extra, &$ '; - + return $xml; } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function TxnDelResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Driver = QuickBooks_Driver_Singleton::getInstance(); $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs TxnDelRs'); $Node = $List; - + if ($errnum == 0) { $map = array(); @@ -1506,14 +1506,14 @@ public static function TxnDelResponse($requestID, $user, $action, $ID, $extra, & $sqlObject = new QuickBooks_SQL_Object($map[0], trim(QuickBooks_Utilities::objectToXMLElement($extra['objectType']))); $table = $sqlObject->table(); $multipart = array( "TxnID" => $Node->getChildDataAt("TxnDelRs TxnID") ); - - //$config['delete'] = - + + //$config['delete'] = + //Check the delete mode and if desired, just flag them rather than remove the rows. // @todo Fix this wrong delete flag field - + //mysql_query("UPDATE qb_bill SET qbsql_to_delete = 0, qbsql_flag_deleted = 1 WHERE TxnID = '" . $Node->getChildDataAt('TxnDelRs TxnID') . "' LIMIT 1"); - + /* if (isset($config['delete']) and $config['delete'] == QUICKBOOKS_SERVER_SQL_DELETE_FLAG) @@ -1536,10 +1536,10 @@ public static function TxnDelResponse($requestID, $user, $action, $ID, $extra, & } */ } - + return true; } - + /** * Fetch derived fields for a customer (Balance, TotalBalance, etc.) */ @@ -1557,7 +1557,7 @@ public static function CustomerDeriveRequest($requestID, $user, $action, $ID, $e '; - + return $xml; } else if (!empty($extra['FullName'])) @@ -1572,14 +1572,14 @@ public static function CustomerDeriveRequest($requestID, $user, $action, $ID, $e '; - + return $xml; } - + $err = '' . __METHOD__ . ' called without a proper $extra array: ' . print_r($extra, true); return ''; // Error occured } - + /** * Handle a derived field (Balance, TotalBalance, etc.) response for a customer, and update the record */ @@ -1591,7 +1591,7 @@ public static function CustomerDeriveResponse($requestID, $user, $action, $ID, $ public static function ItemDeriveRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -1601,15 +1601,15 @@ public static function ItemDeriveRequest($requestID, $user, $action, $ID, $extra '; - + return $xml; } - + public static function ItemDeriveResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { return QuickBooks_Callbacks_SQL_Callbacks::_deriveResponse('QBXML QBXMLMsgsRs ItemQueryRs', QUICKBOOKS_OBJECT_ITEM, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** * Fetch derived fields for a customer (Balance, TotalBalance, etc.) */ @@ -1617,7 +1617,7 @@ public static function InvoiceDeriveRequest($requestID, $user, $action, $ID, $ex { // Try to fetch it from the database $Driver = QuickBooks_Driver_Singleton::getInstance(); - + if (!empty($extra['TxnID'])) { $xml = ''; @@ -1630,7 +1630,7 @@ public static function InvoiceDeriveRequest($requestID, $user, $action, $ID, $ex '; - + return $xml; } else if ($arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'invoice', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) @@ -1645,10 +1645,10 @@ public static function InvoiceDeriveRequest($requestID, $user, $action, $ID, $ex '; - + return $xml; } - + $err = '' . __METHOD__ . ' called without a proper $extra array: ' . print_r($extra, true); return ''; // Error occured } @@ -1659,10 +1659,10 @@ public static function InvoiceDeriveRequest($requestID, $user, $action, $ID, $ex public static function InvoiceDeriveResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { return QuickBooks_Callbacks_SQL_Callbacks::_deriveResponse('QBXML QBXMLMsgsRs InvoiceQueryRs', QUICKBOOKS_OBJECT_INVOICE, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); - } - + } + /** - * + * */ protected static function _deriveResponse($path, $type, $requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array()) { @@ -1670,22 +1670,22 @@ protected static function _deriveResponse($path, $type, $requestID, $user, $acti // Bill. IsPaid, OpenAmount, AmountDue // Charge. BalanceRemaining // CreditMemo. IsPending, CreditRemaining - + $Driver = QuickBooks_Driver_Singleton::getInstance(); $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - - $List = $Root->getChildAt($path); + $Root = $Doc->getRoot(); + + $List = $Root->getChildAt($path); foreach ($List->children() as $Node) { switch ($type) { case QUICKBOOKS_OBJECT_ITEM: - + $xpath = ''; $table = ''; switch ($Node->name()) @@ -1703,99 +1703,99 @@ protected static function _deriveResponse($path, $type, $requestID, $user, $acti $table = 'itemnoninventory'; break; } - + if ($xpath and $table) { $arr = array( - 'ListID' => $Node->getChildDataAt($xpath . ' ListID'), - 'FullName' => $Node->getChildDataAt($xpath . ' FullName'), - 'Parent_ListID' => $Node->getChildDataAt($xpath . ' ParentRef ListID'), - 'Parent_FullName' => $Node->getChildDataAt($xpath . ' ParentRef FullName'), - 'IsActive' => (int) ($Node->getChildDataAt($xpath . ' IsActive') == 'true'), - 'EditSequence' => $Node->getChildDataAt($xpath . ' EditSequence'), + 'ListID' => $Node->getChildDataAt($xpath . ' ListID'), + 'FullName' => $Node->getChildDataAt($xpath . ' FullName'), + 'Parent_ListID' => $Node->getChildDataAt($xpath . ' ParentRef ListID'), + 'Parent_FullName' => $Node->getChildDataAt($xpath . ' ParentRef FullName'), + 'IsActive' => (int) ($Node->getChildDataAt($xpath . ' IsActive') == 'true'), + 'EditSequence' => $Node->getChildDataAt($xpath . ' EditSequence'), ); - + $Driver->log('Updating DERIVED ' . $xpath . ' fields: ' . print_r($arr, true) . ' where qbsql_id = ' . $ID, null, QUICKBOOKS_LOG_VERBOSE); //mysql_query("INSERT INTO quickbooks_log ( msg ) VALUES ( '" . mysql_real_escape_string('Updating DERIVED ' . $xpath . ' fields: ' . print_r($arr, true) . ' where qbsql_id = ' . $ID) . "' ) "); - - $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, - $arr, - array( array( 'qbsql_id' => $ID ) ), + + $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, + $arr, + array( array( 'qbsql_id' => $ID ) ), true, // Don't mark as re-synced false, // Don't update the discov time true); // Do mark it as re-derived } - + break; case QUICKBOOKS_OBJECT_VENDOR: - - // Vendor. - - + + // Vendor. + + break; case QUICKBOOKS_OBJECT_CUSTOMER: - - // Customer. Balance, TotalBalance, - + + // Customer. Balance, TotalBalance, + $arr = array( - 'ListID' => $Node->getChildDataAt('CustomerRet ListID'), - 'FullName' => $Node->getChildDataAt('CustomerRet FullName'), - 'Parent_ListID' => $Node->getChildDataAt('CustomerRet ParentRef ListID'), - 'Parent_FullName' => $Node->getChildDataAt('CustomerRet ParentRef FullName'), - 'IsActive' => (int) ($Node->getChildDataAt('CustomerRet IsActive') == 'true'), - 'EditSequence' => $Node->getChildDataAt('CustomerRet EditSequence'), + 'ListID' => $Node->getChildDataAt('CustomerRet ListID'), + 'FullName' => $Node->getChildDataAt('CustomerRet FullName'), + 'Parent_ListID' => $Node->getChildDataAt('CustomerRet ParentRef ListID'), + 'Parent_FullName' => $Node->getChildDataAt('CustomerRet ParentRef FullName'), + 'IsActive' => (int) ($Node->getChildDataAt('CustomerRet IsActive') == 'true'), + 'EditSequence' => $Node->getChildDataAt('CustomerRet EditSequence'), 'Balance' => $Node->getChildDataAt('CustomerRet Balance'), 'TotalBalance' => $Node->getChildDataAt('CustomerRet TotalBalance'), ); - + //$Driver->log('Updating DERIVED CUSTOMER fields: ' . print_r($arr, true) . ' where: ' . print_r($extra, true), null, QUICKBOOKS_LOG_VERBOSE); - + $Driver->log('Updating DERIVED CUSTOMER fields: ' . print_r($arr, true) . ' where qbsql_id = ' . $ID, null, QUICKBOOKS_LOG_VERBOSE); - - $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'customer', - $arr, - array( array( 'qbsql_id' => $ID ) ), + + $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'customer', + $arr, + array( array( 'qbsql_id' => $ID ) ), true, // Don't mark as re-synced false, // Don't update the discov time true); // Do mark it as re-derived - + /* - // @todo Only do this if the customer actually needs to be modified - // Now, make a request to *modify* the customer + // @todo Only do this if the customer actually needs to be modified + // Now, make a request to *modify* the customer $priority = 9998; // @todo this probably isn't a good choice of priorities $Driver->queueEnqueue( - $user, - QUICKBOOKS_MOD_CUSTOMER, - $ID, - true, + $user, + QUICKBOOKS_MOD_CUSTOMER, + $ID, + true, $priority); */ - + /* if (!empty($extra['ListID'])) { // Update the database - $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'customer', $arr, array( $extra ), + $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'customer', $arr, array( $extra ), false, // Don't mark as re-synced false, // Don't update the discov time true); // Do mark it as re-derived } */ - + break; case QUICKBOOKS_OBJECT_INVOICE: - + // Invoice. IsPending, AppliedAmount, BalanceRemaining, IsPaid - + $existing = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'invoice', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID )); - + $arr = array( - 'TxnID' => $Node->getChildDataAt('InvoiceRet TxnID'), - 'EditSequence' => $Node->getChildDataAt('InvoiceRet EditSequence'), + 'TxnID' => $Node->getChildDataAt('InvoiceRet TxnID'), + 'EditSequence' => $Node->getChildDataAt('InvoiceRet EditSequence'), 'AppliedAmount' => $Node->getChildDataAt('InvoiceRet AppliedAmount'), - 'BalanceRemaining' => $Node->getChildDataAt('InvoiceRet BalanceRemaining'), + 'BalanceRemaining' => $Node->getChildDataAt('InvoiceRet BalanceRemaining'), ); - + if ($Node->getChildDataAt('InvoiceRet IsPending') == 'true') { $arr['IsPending'] = 1; @@ -1804,7 +1804,7 @@ protected static function _deriveResponse($path, $type, $requestID, $user, $acti { $arr['IsPending'] = 0; } - + if ($Node->getChildDataAt('InvoiceRet IsPaid') == 'true') { $arr['IsPaid'] = 1; @@ -1813,100 +1813,100 @@ protected static function _deriveResponse($path, $type, $requestID, $user, $acti { $arr['IsPaid'] = 0; } - + $Driver->log('Updating DERIVED INVOICE fields: ' . print_r($arr, true) . ' where: ' . print_r($extra, true), null, QUICKBOOKS_LOG_VERBOSE); - - $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'invoice', - $arr, - array( array( 'qbsql_id' => $ID ) ), + + $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'invoice', + $arr, + array( array( 'qbsql_id' => $ID ) ), true, // Don't mark as re-synced false, // Don't update the discov time true); // Do mark it as re-derived - + /* - // @todo Only do this if the invoice actually needs to be modified - // Now, make a request to *modify* the customer + // @todo Only do this if the invoice actually needs to be modified + // Now, make a request to *modify* the customer $priority = 9998; // @todo this probably isn't a good choice of priorities $Driver->queueEnqueue( - $user, - QUICKBOOKS_MOD_INVOICE, - $ID, - true, + $user, + QUICKBOOKS_MOD_INVOICE, + $ID, + true, $priority); - + // Blow away all of the old line items... (eeek!) $errnum = null; $errmsg = null; $Driver->query(" - UPDATE + UPDATE " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . "invoice_invoiceline SET - qbsql_to_skip = 1 + qbsql_to_skip = 1 WHERE Invoice_TxnID = '%s' ", $errnum, $errmsg, null, null, array( $arr['TxnID'] )); - - // This should probably be done through the "QuickBooks_Map_Qbxml::mark()" method... + + // This should probably be done through the "QuickBooks_Map_Qbxml::mark()" method... $errnum = null; $errmsg = null; $Driver->query(" - UPDATE + UPDATE " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . "invoice_invoiceline SET Invoice_TxnID = '%s' WHERE Invoice_TxnID = '%s' ", $errnum, $errmsg, null, null, array( $arr['TxnID'], $existing['TxnID'] )); */ - + break; default: return false; } } - + return true; } - + /** - * - * - * + * + * + * */ public static function CustomerAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + if ($arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'customer', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { $Customer = new QuickBooks_SQL_Object('customer', null, $arr); - - if (!(is_numeric($Customer->get('CreditCardInfo_ExpirationMonth')) and - is_numeric($Customer->get('CreditCardInfo_ExpirationYear')) and + + if (!(is_numeric($Customer->get('CreditCardInfo_ExpirationMonth')) and + is_numeric($Customer->get('CreditCardInfo_ExpirationYear')) and checkdate($Customer->get('CreditCardInfo_ExpirationMonth'), 1, $Customer->get('CreditCardInfo_ExpirationYear')) )) { $Customer->remove('CreditCardInfo_ExpirationMonth'); $Customer->remove('CreditCardInfo_ExpirationYear'); } - + return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_CUSTOMER, $Customer, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function CustomerAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CustomerAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_addResponse(QUICKBOOKS_OBJECT_CUSTOMER, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); @@ -1915,41 +1915,41 @@ public static function CustomerAddResponse($requestID, $user, $action, $ID, $ext public static function InventoryAdjustmentAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + if ($arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'inventoryadjustment', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { $InventoryAdjustment = new QuickBooks_SQL_Object('inventoryadjustment', null, $arr); - + return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_INVENTORYADJUSTMENT, $InventoryAdjustment, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function InventoryAdjustmentAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs InventoryAdjustmentAddRs'); - + $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_addResponse(QUICKBOOKS_OBJECT_INVENTORYADJUSTMENT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function CustomerMsgAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -1958,72 +1958,72 @@ public static function CustomerMsgAddRequest($requestID, $user, $action, $ID, $e { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_CUSTOMERMSG, $CustomerMsg, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function CustomerMsgAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CustomerMsgAddRs'); - + $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_CUSTOMERMSG, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function JournalEntryAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + if ($arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'journalentry', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { $JournalEntry = new QuickBooks_SQL_Object('journalentry', null, $arr); - - // Some (all?) versions of QuickBooks don't support this tag...? + + // Some (all?) versions of QuickBooks don't support this tag...? $JournalEntry->remove('IsAdjustment'); - + return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_JOURNALENTRY, $JournalEntry, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function JournalEntryAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs JournalEntryAddRs'); - + $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_JOURNALENTRY, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function JournalEntryModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(6.0, $version)) @@ -2031,43 +2031,43 @@ public static function JournalEntryModRequest($requestID, $user, $action, $ID, $ // JournalEntryMod requests are not supported until 6.0 return QUICKBOOKS_SKIP; } - + $Driver = QuickBooks_Driver_Singleton::getInstance(); if ($arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'journalentry', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { $JournalEntry = new QuickBooks_SQL_Object('journalentry', null, $arr); - + return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_JOURNALENTRY, $JournalEntry, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function JournalEntryModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs JournalEntryModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_JOURNALENTRY, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function CustomerModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2075,28 +2075,28 @@ public static function CustomerModRequest($requestID, $user, $action, $ID, $extr if ($arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'customer', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { $Customer = new QuickBooks_SQL_Object('customer', null, $arr); - - if ( !(is_numeric($Customer->get('CreditCardInfo_ExpirationMonth')) and - is_numeric($Customer->get('CreditCardInfo_ExpirationYear')) and + + if ( !(is_numeric($Customer->get('CreditCardInfo_ExpirationMonth')) and + is_numeric($Customer->get('CreditCardInfo_ExpirationYear')) and checkdate($Customer->get('CreditCardInfo_ExpirationMonth'), 1, $Customer->get('CreditCardInfo_ExpirationYear')) )) { $Customer->remove('CreditCardInfo_ExpirationMonth'); $Customer->remove('CreditCardInfo_ExpirationYear'); } - + //print('THIS IS RUNNING' . "\n"); - + // Set these fields to "blank" if they aren't being set in the qbXML request $clear = array( - 'Phone', - 'AltPhone', - 'Fax', - 'AltFax', - 'Email', - 'Contact', - 'AltContact', + 'Phone', + 'AltPhone', + 'Fax', + 'AltFax', + 'Email', + 'Contact', + 'AltContact', ); - + foreach ($clear as $field) { //if (!$Customer->exists($field)) @@ -2106,36 +2106,36 @@ public static function CustomerModRequest($requestID, $user, $action, $ID, $extr $Customer->set($field, QUICKBOOKS_SERVER_SQL_VALUE_CLEAR); } } - + return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_CUSTOMER, $Customer, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function CustomerModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CustomerModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_CUSTOMER, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - /** - * + /** + * */ public static function ClassAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2144,34 +2144,34 @@ public static function ClassAddRequest($requestID, $user, $action, $ID, $extra, { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_CLASS, $Class, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ClassAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ClassAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_CLASS, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - /** - * + + + /** + * */ public static function DataExtAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2180,7 +2180,7 @@ public static function DataExtAddRequest($requestID, $user, $action, $ID, $extra if ($arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'dataext', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { $DataExt = new QuickBooks_SQL_Object('dataext', null, $arr); - + $xml .= ' @@ -2227,34 +2227,34 @@ public static function DataExtAddRequest($requestID, $user, $action, $ID, $extra '; } - - return $xml; + + return $xml; } - + /** - * - * - * + * + * + * */ public static function DataExtAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs DataExtAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_DATAEXT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - /** - * + + + /** + * */ public static function DataExtModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2263,7 +2263,7 @@ public static function DataExtModRequest($requestID, $user, $action, $ID, $extra if ($arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'dataext', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { $DataExt = new QuickBooks_SQL_Object('dataext', null, $arr); - + $xml .= ' @@ -2310,33 +2310,33 @@ public static function DataExtModRequest($requestID, $user, $action, $ID, $extra '; } - - return $xml; + + return $xml; } - + /** - * - * - * + * + * + * */ public static function DataExtModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs DataExtModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_DATAEXT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - /** - * + /** + * */ public static function ShipMethodAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2345,33 +2345,33 @@ public static function ShipMethodAddRequest($requestID, $user, $action, $ID, $ex { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SHIPMETHOD, $ShipMethod, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - + return ''; } - + /** - * - * - * + * + * + * */ public static function ShipMethodAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ShipMethodAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SHIPMETHOD, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - /** - * + /** + * */ public static function PaymentMethodAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2380,35 +2380,35 @@ public static function PaymentMethodAddRequest($requestID, $user, $action, $ID, { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_PAYMENTMETHOD, $PaymentMethod, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - + return ''; } - + /** - * - * - * + * + * + * */ public static function PaymentMethodAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs PaymentMethodAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_PAYMENTMETHOD, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function AccountAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2417,35 +2417,35 @@ public static function AccountAddRequest($requestID, $user, $action, $ID, $extra { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_ACCOUNT, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function AccountAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs AccountAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_ACCOUNT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function AccountModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2454,35 +2454,35 @@ public static function AccountModRequest($requestID, $user, $action, $ID, $extra { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_ACCOUNT, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; - } - + + return ''; + } + /** - * - * - * + * + * + * */ public static function AccountModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs AccountModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_ACCOUNT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemDiscountAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2491,35 +2491,35 @@ public static function ItemDiscountAddRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_DISCOUNTITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemDiscountAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemDiscountAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_DISCOUNTITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemDiscountModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2528,35 +2528,35 @@ public static function ItemDiscountModRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_DISCOUNTITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemDiscountModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemDiscountModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_DISCOUNTITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemFixedAssetAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2565,35 +2565,35 @@ public static function ItemFixedAssetAddRequest($requestID, $user, $action, $ID, { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_FIXEDASSETITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemFixedAssetAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemFixedAssetAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_FIXEDASSETITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemFixedAssetModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2602,26 +2602,26 @@ public static function ItemFixedAssetModRequest($requestID, $user, $action, $ID, { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_FIXEDASSETITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemFixedAssetModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemFixedAssetModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_FIXEDASSETITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); @@ -2703,11 +2703,11 @@ public static function ItemInventoryAssemblyModResponse($requestID, $user, $acti $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_INVENTORYASSEMBLYITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function ItemInventoryAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2716,38 +2716,38 @@ public static function ItemInventoryAddRequest($requestID, $user, $action, $ID, { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_INVENTORYITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemInventoryAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Driver = QuickBooks_Driver_Singleton::getInstance(); $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemInventoryAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_INVENTORYITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); - + //$Driver->queueEnqueue($user, QUICKBOOKS_QUERY_INVENTORYADJUSTMENT, md5(__FILE__), true, QuickBooks_Utilities::priorityForAction(QUICKBOOKS_QUERY_INVENTORYADJUSTMENT)); } - + /** - * - * - * + * + * + * */ public static function ItemInventoryModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2756,36 +2756,36 @@ public static function ItemInventoryModRequest($requestID, $user, $action, $ID, { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_INVENTORYITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemInventoryModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemInventoryModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_INVENTORYITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function ItemNonInventoryAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2794,35 +2794,35 @@ public static function ItemNonInventoryAddRequest($requestID, $user, $action, $I { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_NONINVENTORYITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemNonInventoryAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemNonInventoryAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_NONINVENTORYITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemNonInventoryModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2831,35 +2831,35 @@ public static function ItemNonInventoryModRequest($requestID, $user, $action, $I { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_NONINVENTORYITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemNonInventoryModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemNonInventoryModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_NONINVENTORYITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemOtherChargeAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2868,35 +2868,35 @@ public static function ItemOtherChargeAddRequest($requestID, $user, $action, $ID { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_OTHERCHARGEITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemOtherChargeAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemOtherChargeAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_OTHERCHARGEITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemOtherChargeModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2905,35 +2905,35 @@ public static function ItemOtherChargeModRequest($requestID, $user, $action, $ID { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_OTHERCHARGEITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemOtherChargeModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemOtherChargeModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_OTHERCHARGEITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemPaymentAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2942,35 +2942,35 @@ public static function ItemPaymentAddRequest($requestID, $user, $action, $ID, $e { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_PAYMENTITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemPaymentAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemPaymentAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_PAYMENTITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemPaymentModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -2979,35 +2979,35 @@ public static function ItemPaymentModRequest($requestID, $user, $action, $ID, $e { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_PAYMENTITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemPaymentModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemPaymentModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_PAYMENTITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemSalesTaxAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3016,35 +3016,35 @@ public static function ItemSalesTaxAddRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SALESTAXITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemSalesTaxAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemSalesTaxAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESTAXITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemSalesTaxModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3053,35 +3053,35 @@ public static function ItemSalesTaxModRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SALESTAXITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemSalesTaxModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemSalesTaxModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESTAXITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemServiceAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3090,35 +3090,35 @@ public static function ItemServiceAddRequest($requestID, $user, $action, $ID, $e { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SERVICEITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemServiceAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemServiceAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SERVICEITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemServiceModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3127,35 +3127,35 @@ public static function ItemServiceModRequest($requestID, $user, $action, $ID, $e { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SERVICEITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemServiceModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemServiceModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SERVICEITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemSubtotalAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3164,35 +3164,35 @@ public static function ItemSubtotalAddRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SUBTOTALITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ItemSubtotalAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemSubtotalAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SUBTOTALITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ItemSubtotalModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3201,14 +3201,14 @@ public static function ItemSubtotalModRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SUBTOTALITEM, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } /** - * - * - * + * + * + * */ public static function EmployeeAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3217,35 +3217,35 @@ public static function EmployeeAddRequest($requestID, $user, $action, $ID, $extr { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_EMPLOYEE, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function EmployeeAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs EmployeeAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_EMPLOYEE, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function EmployeeModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3254,56 +3254,56 @@ public static function EmployeeModRequest($requestID, $user, $action, $ID, $extr { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_EMPLOYEE, $arr, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function EmployeeModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs EmployeeModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_EMPLOYEE, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function ItemSubtotalModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemSubtotalModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SUBTOTALITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function EstimateAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3312,35 +3312,35 @@ public static function EstimateAddRequest($requestID, $user, $action, $ID, $extr { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_ESTIMATE, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function EstimateAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs EstimateAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_ESTIMATE, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function EstimateModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3349,35 +3349,35 @@ public static function EstimateModRequest($requestID, $user, $action, $ID, $extr { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_ESTIMATE, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function EstimateModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs EstimateModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_ESTIMATE, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function PurchaseOrderAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3386,35 +3386,35 @@ public static function PurchaseOrderAddRequest($requestID, $user, $action, $ID, { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_PURCHASEORDER, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function PurchaseOrderAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs PurchaseOrderAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_PURCHASEORDER, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function PurchaseOrderModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3423,35 +3423,35 @@ public static function PurchaseOrderModRequest($requestID, $user, $action, $ID, { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_PURCHASEORDER, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function PurchaseOrderModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs PurchaseOrderModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_PURCHASEORDER, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function ReceivePaymentAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3460,76 +3460,76 @@ public static function ReceivePaymentAddRequest($requestID, $user, $action, $ID, { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_RECEIVEPAYMENT, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ReceivePaymentAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ReceivePaymentAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_addResponse(QUICKBOOKS_OBJECT_RECEIVEPAYMENT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function ReceivePaymentModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { //$args = func_get_args(); //$Driver = QuickBooks_Driver_Singleton::getInstance(); //$Driver->log('got in: ' . print_r($args, true)); - + $Driver = QuickBooks_Driver_Singleton::getInstance(); if ($ReceivePayment = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'receivepayment', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_RECEIVEPAYMENT, $ReceivePayment, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function ReceivePaymentModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ReceivePaymentModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_RECEIVEPAYMENT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function InvoiceAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3538,26 +3538,26 @@ public static function InvoiceAddRequest($requestID, $user, $action, $ID, $extra { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_INVOICE, $Invoice, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function InvoiceAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs InvoiceAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_addResponse(QUICKBOOKS_OBJECT_INVOICE, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); @@ -3571,39 +3571,39 @@ public static function InvoiceModRequest($requestID, $user, $action, $ID, $extra //$Driver = QuickBooks_Driver_Singleton::getInstance(); //$args = func_get_args(); //$Driver->log('got in: ' . print_r($args, true)); - + $Driver = QuickBooks_Driver_Singleton::getInstance(); if ($Invoice = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'invoice', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_INVOICE, $Invoice, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** * Handle an InvoiceMod response from QuickBooks */ public static function InvoiceModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs InvoiceModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_INVOICE, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function SalesReceiptAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3612,26 +3612,26 @@ public static function SalesReceiptAddRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SALESRECEIPT, $SalesReceipt, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function SalesReceiptAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesReceiptAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESRECEIPT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); @@ -3647,24 +3647,24 @@ public static function SalesReceiptModRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SALESRECEIPT, $SalesReceipt, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** * Handle an InvoiceMod response from QuickBooks */ public static function SalesReceiptModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesReceiptModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESRECEIPT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); @@ -3672,9 +3672,9 @@ public static function SalesReceiptModResponse($requestID, $user, $action, $ID, /** - * - * - * + * + * + * */ public static function CreditMemoAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3683,26 +3683,26 @@ public static function CreditMemoAddRequest($requestID, $user, $action, $ID, $ex { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_CREDITMEMO, $Invoice, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function CreditMemoAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CreditMemoAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_CREDITMEMO, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); @@ -3716,35 +3716,35 @@ public static function CreditMemoModRequest($requestID, $user, $action, $ID, $ex //$Driver = QuickBooks_Driver_Singleton::getInstance(); //$args = func_get_args(); //$Driver->log('got in: ' . print_r($args, true)); - + $Driver = QuickBooks_Driver_Singleton::getInstance(); if ($Invoice = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'creditmemo', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_CREDITMEMO, $Invoice, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** * Handle an InvoiceMod response from QuickBooks */ public static function CreditMemoModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CreditMemoModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_CREDITMEMO, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** * Generate a JobTypeAdd qbXML request to send to QuickBooks */ @@ -3755,31 +3755,31 @@ public static function JobTypeAddRequest($requestID, $user, $action, $ID, $extra { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_JOBTYPE, $JobType, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** * Handle a JobTypeAdd response from QuickBooks */ public static function JobTypeAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs JobTypeAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_JOBTYPE, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * Generate a qbXML SalesOrderAdd request to send to QuickBooks + * Generate a qbXML SalesOrderAdd request to send to QuickBooks */ public static function SalesOrderAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3788,33 +3788,33 @@ public static function SalesOrderAddRequest($requestID, $user, $action, $ID, $ex { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SALESORDER, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** * Handle a SalesOrderAdd response from QuickBooks */ public static function SalesOrderAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesOrderAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESORDER, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function SalesOrderModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3823,35 +3823,35 @@ public static function SalesOrderModRequest($requestID, $user, $action, $ID, $ex { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SALESORDER, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function SalesOrderModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesOrderModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESORDER, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function SalesRepAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3860,35 +3860,35 @@ public static function SalesRepAddRequest($requestID, $user, $action, $ID, $extr { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SALESREP, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function SalesRepAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesRepAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESREP, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function SalesRepModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3897,35 +3897,35 @@ public static function SalesRepModRequest($requestID, $user, $action, $ID, $extr { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SALESREP, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function SalesRepModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesRepModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESREP, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function SalesTaxCodeAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3934,35 +3934,35 @@ public static function SalesTaxCodeAddRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SALESTAXCODE, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function SalesTaxCodeAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesTaxCodeAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESTAXCODE, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function SalesTaxCodeModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -3971,35 +3971,35 @@ public static function SalesTaxCodeModRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_SALESTAXCODE, $Account, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function SalesTaxCodeModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesTaxCodeModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESTAXCODE, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function BillAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -4008,24 +4008,24 @@ public static function BillAddRequest($requestID, $user, $action, $ID, $extra, & { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_BILL, $Customer, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function BillAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs BillAddRs'); $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; @@ -4039,35 +4039,35 @@ public static function BillModRequest($requestID, $user, $action, $ID, $extra, & { return QuickBooks_Callbacks_SQL_Callbacks::_ModRequest(QUICKBOOKS_OBJECT_BILL, $Bill, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function BillModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs BillModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; return QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_BILL, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function BillPaymentCheckAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -4075,7 +4075,7 @@ public static function BillPaymentCheckAddRequest($requestID, $user, $action, $I if ($BillPaymentCheck = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'billpaymentcheck', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { // Special handling for bill payment check add requests - + // If a RefNumber is printed, then it can't be set as IsToBePrinted if (!empty($BillPaymentCheck['RefNumber'])) { @@ -4085,38 +4085,38 @@ public static function BillPaymentCheckAddRequest($requestID, $user, $action, $I { unset($BillPaymentCheck['RefNumber']); } - + return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_BILLPAYMENTCHECK, $BillPaymentCheck, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - + return ''; } - + /** - * - * - * + * + * + * */ public static function BillPaymentCheckAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs BillPaymentCheckAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_BILLPAYMENTCHECK, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function BillPaymentCheckModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -4125,35 +4125,35 @@ public static function BillPaymentCheckModRequest($requestID, $user, $action, $I { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_BILLPAYMENTCHECK, $BillPaymentCheck, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - + return ''; } - + /** - * - * - * + * + * + * */ public static function BillPaymentCheckModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs BillPaymentCheckModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_BILLPAYMENTCHECK, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** - * - * - * + * + * + * */ public static function BillPaymentCreditCardAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -4162,35 +4162,35 @@ public static function BillPaymentCreditCardAddRequest($requestID, $user, $actio { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_BILLPAYMENTCREDITCARD, $BillPaymentCreditCard, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - + return ''; } - + /** - * - * - * + * + * + * */ public static function BillPaymentCreditCardAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs BillPaymentCreditCardAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_BILLPAYMENTCREDITCARD, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function VendorAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -4199,35 +4199,35 @@ public static function VendorAddRequest($requestID, $user, $action, $ID, $extra, { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_VENDOR, $Vendor, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function VendorAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs VendorAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_VENDOR, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function VendorModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -4236,36 +4236,36 @@ public static function VendorModRequest($requestID, $user, $action, $ID, $extra, { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_VENDOR, $Vendor, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function VendorModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs VendorModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_VENDOR, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function VendorCreditAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -4274,35 +4274,35 @@ public static function VendorCreditAddRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_VENDORCREDIT, $Vendor, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function VendorCreditAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs VendorCreditAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_VENDORCREDIT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function VendorCreditModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -4311,107 +4311,107 @@ public static function VendorCreditModRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_VENDORCREDIT, $Vendor, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - - return ''; + + return ''; } - + /** - * - * - * + * + * + * */ public static function VendorCreditModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs VendorCreditModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_VENDORCREDIT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - /** + + /** * Send an *Add request to QuickBooks to add an object to the QuickBooks database - * + * * @param string $type The QuickBooks object type * @param object $Object The object to add to QuickBooks * @param string $requestID The requestID to use in the qbXML request * @param string $user The username of the Web Connector user * @param string $action The action type (example: "CustomerAdd", QUICKBOOKS_ADD_CUSTOMER) * @param string $ID The qbsql_id value of the object to add - * @param mixed $extra Any extra data + * @param mixed $extra Any extra data * @param string $err Set this to an error message if an error occurs * @param integer $last_action_time The UNIX timestamp indicating the last time this type of action occured * @param integer $last_actionident_time The UNIX timestamp indicating the (last time this type of action and $ID value) occured * @param float $version The maximum qbXML version supports * @param string $locale The QuickBooks locale (example: "US") * @param array $config Callback configuration information - * @return string The qbXML string + * @return string The qbXML string */ protected static function _AddRequest($type, $Object, $requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { - // Driver instance... + // Driver instance... $Driver = QuickBooks_Driver_Singleton::getInstance(); - + $type = strtolower($type); - + // This should actually always happen now that we fixed the Driver->get method to return an array - if (!is_object($Object) and + if (!is_object($Object) and is_array($Object)) { $Object = new QuickBooks_SQL_Object(null, null, $Object); } - + $xml = ''; - + $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; $xml .= "\t" . '' . QUICKBOOKS_CRLF; $xml .= "\t" . "\t" . '' . QUICKBOOKS_CRLF; $xml .= "\t" . "\t" . "\t" . '<' . QuickBooks_Utilities::actionToRequest($action) . ' requestID="' . $requestID . '">' . QUICKBOOKS_CRLF; - + $file = '/QuickBooks/QBXML/Schema/Object/' . QuickBooks_Utilities::actionToRequest($action) . '.php'; $class = 'QuickBooks_QBXML_Schema_Object_' . QuickBooks_Utilities::actionToRequest($action); - + QuickBooks_Loader::load($file); $schema_object = new $class(); - + //print_r($Object->asArray()); //exit; - + $Node = new QuickBooks_XML_Node($action); foreach ($Object->asArray() as $field => $value) // map the SQL fields back to XML { $map = ''; $others = array(); QuickBooks_SQL_Schema::mapToSchema($type . '.' . $field, QUICKBOOKS_SQL_SCHEMA_MAP_TO_XML, $map, $others); - - // Some drivers case fold all of the field names, which means that - // we can't depend on the field names to use in our XML requests - // - // If that happens, we need to go over to the schema object and - // try to fetch the correct, unfolded XML node name and set that + + // Some drivers case fold all of the field names, which means that + // we can't depend on the field names to use in our XML requests + // + // If that happens, we need to go over to the schema object and + // try to fetch the correct, unfolded XML node name and set that // instead. $unmapped = null; if ($Driver->foldsToLower()) { $unmapped = $map; - + $retpos = strpos($map, 'Ret '); $retval = substr($map, 0, $retpos + 4); - + $map = substr($map, $retpos + 4); $map = $retval . $schema_object->unfold($map); } - + //print('dealing with: [' . $map . '] unmapped from (' . $unmapped . ')' . "\n"); - + if (!$map) { // This schema field doesn't map to anything in QuickBooks... @@ -4420,17 +4420,17 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action else if (!strlen($value)) { // There's no value there, don't send it - - // There are some special cases here... addresses commonly get - // changes to set blank lines for some of the address lines, - // and we need to send these blank values to overwrite the + + // There are some special cases here... addresses commonly get + // changes to set blank lines for some of the address lines, + // and we need to send these blank values to overwrite the // existing values in QuickBooks. // - // Here, we send these blank address lines only if at least one + // Here, we send these blank address lines only if at least one // address line is being sent. $begi = substr($field, 0, -5); $last = substr($field, -5, 5); - if (($last == 'Addr2' or $last == 'Addr3' or $last == 'Addr4' or $last == 'Addr5') and + if (($last == 'Addr2' or $last == 'Addr3' or $last == 'Addr4' or $last == 'Addr5') and strlen($Object->get($begi . 'Addr1'))) { // ... but don't allow 4 or 5 if they set the city, state, zip, or country? @@ -4440,15 +4440,15 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action { continue; } - - /* and + + /* and ( strlen($Object->get($begi . 'City')) or strlen($Object->get($begi . 'State')) or strlen($Object->get($begi . 'Country')) or strlen($Object->get($begi . 'PostalCode')) )) { continue; } */ - ; // ... I'll allow it! + ; // ... I'll allow it! } else { @@ -4461,28 +4461,28 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action { $value = ''; } - + $use_abbrevs = false; $htmlspecialchars = true; - + //print('THIS RAN [' . $value . ']'); - + $value = QuickBooks_Cast::cast( - null, - null, - $value, - $use_abbrevs, + null, + null, + $value, + $use_abbrevs, $htmlspecialchars); - + //print(' => [' . $value . ']' . "\n"); } - + // Special handling for non-US versions of QuickBooks - + $begi = substr($field, 0, -5); $last = substr($field, -5, 5); - if ($locale == QUICKBOOKS_LOCALE_UK and - $last == 'State' and + if ($locale == QUICKBOOKS_LOCALE_UK and + $last == 'State' and !strlen($Object->get($begi . 'County'))) // UK *County* support instead of states { $Object->set($begi . 'County', $value); @@ -4490,15 +4490,15 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action $map = substr($map, 0, -5) . 'County'; //die(); } - - // OK, the paths look like this: + + // OK, the paths look like this: // CustomerRet FirstName - // + // // We don't need the 'CustomerRet' part of it, that's actually incorrect, so we'll strip it off $explode = explode(' ', $map); $first = trim(current($explode)); $map = trim(implode(' ', array_slice($explode, 1))); - + if (stripos($action, 'add') !== false) { $map = str_replace('Ret', 'Add', $map); @@ -4507,31 +4507,31 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action { $map = str_replace('Ret', 'Mod', $map); } - + //print(' OK, handling [' . $map . ']' . "\n"); - + if (false === strpos($map, ' ')) { if ($schema_object->exists($map)) { $use_in_request = true; - + // If this version doesn't support this field, skip it - if ($schema_object->sinceVersion($map) > $version and + if ($schema_object->sinceVersion($map) > $version and $schema_object->sinceVersion($map) < 100.0) // For some reason I set the ->sinceVersion to return 999.99 if we don't know the support version...? { $use_in_request = false; } - + switch ($schema_object->dataType($map)) { case 'AMTTYPE': - + $value = str_replace(',', '', number_format($value, 2)); - + break; case 'DATETYPE': - + if (!$value or $value == '0000-00-00') { $use_in_request = false; @@ -4540,10 +4540,10 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action { $value = QuickBooks_Utilities::date($value); } - + break; case 'DATETIMETYPE': - + if (!$value or $value == '0000-00-00 00:00:00') { $use_in_request = false; @@ -4552,10 +4552,10 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action { $value = QuickBooks_Utilities::datetime($value); } - + break; case 'BOOLTYPE': - + if ($value == 1) { $value = 'true'; @@ -4568,12 +4568,12 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action { $use_in_request = false; } - + break; default: break; } - + if ($use_in_request) { $Child = new QuickBooks_XML_Node($map); @@ -4583,7 +4583,7 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action } else { - ; // ignore it + ; // ignore it } } else @@ -4593,7 +4593,7 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action { if (stripos($action, 'Mod') !== false) { - if ($part == 'SalesAndPurchase' or + if ($part == 'SalesAndPurchase' or $part == 'SalesOrPurchase') { $parts[$key] = $part . 'Mod'; @@ -4601,31 +4601,31 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action } else if (stripos($action, 'Add') !== false) { - + } } - + $map = implode(' ', $parts); if ($schema_object->exists($map)) { $use_in_request = true; - + // If this version doesn't support this field, skip it - if ($schema_object->sinceVersion($map) > $version and + if ($schema_object->sinceVersion($map) > $version and $schema_object->sinceVersion($map) < 100.0) // For some reason I set the ->sinceVersion to return 999.99 if we don't know the support version...? { $use_in_request = false; } - + switch ($schema_object->dataType($map)) { case 'AMTTYPE': - + $value = str_replace(',', '', number_format($value, 2)); - + break; case 'DATETYPE': - + if (!$value or $value == '0000-00-00') { $use_in_request = false; @@ -4634,10 +4634,10 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action { $value = QuickBooks_Utilities::date($value); } - + break; case 'DATETIMETYPE': - + if (!$value or $value == '0000-00-00 00:00:00') { $use_in_request = false; @@ -4646,10 +4646,10 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action { $value = QuickBooks_Utilities::datetime($value); } - - break; + + break; case 'BOOLTYPE': - + if ($value == 1) { $value = 'true'; @@ -4662,12 +4662,12 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action { $use_in_request = false; } - + break; default: break; } - + if ($use_in_request) { $Node->setChildDataAt($action . ' ' . $map, $value, true); @@ -4675,30 +4675,30 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action } } } - + // Get the child tables here - make sure they're in the proper order for the xml schema $children = QuickBooks_Callbacks_SQL_Callbacks::_getChildTables(strtolower($type)); - + //print('for type: [' . $type . ']'); //print_r($children); //exit; - + if (!empty($children)) // Get the rows { $data = QuickBooks_Callbacks_SQL_Callbacks::_queryChildren($children, $Object->get($children[0]['parent'])); } else { - // @todo Why not just assign an empty array here...? + // @todo Why not just assign an empty array here...? $data = $children; } - + $nodes = QuickBooks_Callbacks_SQL_Callbacks::_childObjectsToXML(strtolower($type), $action, $data); - + //print('NODES:'); //print_r($nodes); //exit; - + if (count($nodes)) { foreach ($nodes as $nd) @@ -4715,55 +4715,55 @@ protected static function _AddRequest($type, $Object, $requestID, $user, $action } else if ($action == QUICKBOOKS_MOD_RECEIVEPAYMENT) { - + } } - + //print('ACTION IS: [' . $action . ']'); - + //print_r($Node); - + $xml .= $Node->asXML(QuickBooks_XML::XML_PRESERVE); - - // Bad hack... + + // Bad hack... $xml = str_replace('&#', '&#', $xml); $xml = str_replace('&amp;', '&', $xml); - $xml = str_replace('&quot;', '"', $xml); - + $xml = str_replace('&quot;', '"', $xml); + $xml .= ' '; - + return $xml; } - + /** - * - * + * + * */ protected static function _ModRequest($type, $Object, $requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest($type, $Object, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - + protected static function _ChildObjectsToXML($type, $action, $children, $parentPath = '') { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + $nodes = array(); - + $file = '/QuickBooks/QBXML/Schema/Object/' . QuickBooks_Utilities::actionToRequest($action) . '.php'; $class = 'QuickBooks_QBXML_Schema_Object_' . QuickBooks_Utilities::actionToRequest($action); - + QuickBooks_Loader::load($file); $schema_object = new $class(); - + $usePath = ''; if ($parentPath != '') { $usePath .= $parentPath . ' '; } - + foreach ($children as $child) { // Figure out which LinkedTxn method should be used... @@ -4779,7 +4779,7 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP $part = preg_replace("/mod/i", "", $action); $part .= "LineMod"; } - + if ($schema_object->exists($usePath . 'LinkToTxnID')) { $Node = new QuickBooks_XML_Node("LinkToTxnID", $child['data']->get("ToTxnID")); @@ -4829,17 +4829,17 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP { continue; } - + $map = ''; $others = array(); QuickBooks_SQL_Schema::mapToSchema($child['table'] . '.*', QUICKBOOKS_SQL_SCHEMA_MAP_TO_XML, $map, $others); - + $map = str_replace(' *', '', $map); - + $explode = explode(' ', $map); $first = trim(current($explode)); $map = trim(implode(' ', array_slice($explode, 1))); - + if (stripos($action, 'add') !== false) { $map = str_replace('Ret', 'Add', $map); @@ -4848,10 +4848,10 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP { $map = str_replace('Ret', 'Mod', $map); } - - // Journal entries have an unusual JournalEntryMod syntax. Instead of - // the typical CreditLineMod and DebitLineMod entries, they instead - // have just a single combined entry, JournalLineMod. + + // Journal entries have an unusual JournalEntryMod syntax. Instead of + // the typical CreditLineMod and DebitLineMod entries, they instead + // have just a single combined entry, JournalLineMod. if ($action == QUICKBOOKS_MOD_JOURNALENTRY) { if ($child['table'] == 'journalentry_journaldebitline' or $child['table'] == 'journalentry_journalcreditline') @@ -4859,14 +4859,14 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP $map = 'JournalLineMod'; } } - + $Node = new QuickBooks_XML_Node($map); /* $retArr[$index]["table"] = $table; $retArr[$index]["data"] = QuickBooks_SQL_Object($table, null, $arr); $retArr[$index]["children"] */ - + foreach ($child['data']->asArray() as $field => $value) // map the SQL fields back to XML { $map = ''; @@ -4877,9 +4877,9 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP { $retpos = strpos($map, 'Ret '); $retval = substr($map, 0, $retpos + 4); - + $map = substr($map, $retpos + 4); - + if (stripos($action, 'add') !== false) { $map = str_replace('Ret ', 'Add ', $map); @@ -4888,31 +4888,31 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP { $map = str_replace('Ret ', 'Mod ', $map); } - + //print('unfolding: {' . $map . '}' . "\n"); - + $map = $schema_object->unfold($map); - + //print(' unfolded to: [' . $map . ']' . "\n"); } - + //print($field . ' => ' . $value . "\n"); //print_r($map); //print("\n\n"); - + if (!$map or !strlen($value)) { continue; } - - // OK, the paths look like this: + + // OK, the paths look like this: // CustomerRet FirstName - // + // // We don't need the 'CustomerRet' part of it, that's actually incorrect, so we'll strip it off $explode = explode(' ', $map); $first = trim(current($explode)); $map = trim(implode(' ', array_slice($explode, 1))); - + if (stripos($action, "add") !== false) { $map = str_replace("Ret", "Add", $map); @@ -4921,29 +4921,29 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP { $map = str_replace("Ret", "Mod", $map); } - + $map = preg_replace("/.*".$Node->name()." /", "", $map); - + /* - if (strtolower($Node->name()) == "estimatelinemod" and + if (strtolower($Node->name()) == "estimatelinemod" and strpos($map, 'TxnLineID') !== false ) { $value = -1; } */ - + if (false === strpos($map, ' ')) { if ($schema_object->exists($usePath . $Node->name() . ' ' . $map)) { $use_in_request = true; - + switch ($schema_object->dataType($usePath . $Node->name() . ' ' . $map)) { case 'AMTTYPE': - + $value = str_replace(',', '', number_format($value, 2)); - + break; case 'BOOLTYPE': @@ -4959,12 +4959,12 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP { $use_in_request = false; } - + break; default: break; } - + if ($use_in_request) { $Child = new QuickBooks_XML_Node($map); @@ -4974,7 +4974,7 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP } else { - ; // ignore it + ; // ignore it } } else @@ -4984,20 +4984,20 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP { $map = str_replace(array( 'JournalCreditLine ', 'JournalDebitLine ' ), '', $map); } - + if ($schema_object->exists($usePath . $Node->name() . ' ' . $map)) { $use_in_request = true; - + switch ($schema_object->dataType($usePath . $Node->name() . ' ' . $map)) { case 'AMTTYPE': - + $value = str_replace(',', '', number_format($value, 2)); - + break; case 'BOOLTYPE': - + if ($value == 1) { $value = 'true'; @@ -5010,12 +5010,12 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP { $use_in_request = false; } - + break; default: break; } - + if ($use_in_request) { $Node->setChildDataAt($Node->name() . ' ' . $map, $value, true); @@ -5023,25 +5023,25 @@ protected static function _ChildObjectsToXML($type, $action, $children, $parentP } } } - + $tNodes = QuickBooks_Callbacks_SQL_Callbacks::_ChildObjectsToXML(strtolower($child['table']), $action, $child['children'], $usePath . $Node->name()); - + foreach ($tNodes as $tn) { $Node->addChild($tn); } - + $nodes[count($nodes)] = $Node; } - + return $nodes; - + } - + public static function AccountImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -5051,30 +5051,30 @@ public static function AccountImportRequest($requestID, $user, $action, $ID, $ex '; - - return $xml; + + return $xml; } - + public static function AccountImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - - $Root = $Doc->getRoot(); - + + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs AccountQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; } - - QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('account', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); + + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('account', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** * * @@ -5091,7 +5091,7 @@ public static function AccountQueryRequest($requestID, $user, $action, $ID, $ext { $tag = '' . QuickBooks_Cast::cast(QUICKBOOKS_OBJECT_ACCOUNT, 'FullName', $extra['FullName']) . ''; } - else if (!empty($extra['FromModifiedDate']) and + else if (!empty($extra['FromModifiedDate']) and !empty($extra['ToModifiedDate'])) { $tag = ''; @@ -5102,7 +5102,7 @@ public static function AccountQueryRequest($requestID, $user, $action, $ID, $ext { return QUICKBOOKS_NOOP; } - + $xml .= ' @@ -5112,29 +5112,29 @@ public static function AccountQueryRequest($requestID, $user, $action, $ID, $ext '; - - return $xml; + + return $xml; } - + public static function AccountQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $extra['is_query_response'] = true; return QuickBooks_Callbacks_SQL_Callbacks::AccountImportResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * + * + * */ public static function BillPaymentCheckImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(2.0, $version, $locale, QUICKBOOKS_QUERY_BILLPAYMENTCHECK)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -5146,43 +5146,43 @@ public static function BillPaymentCheckImportRequest($requestID, $user, $action, '; - + return $xml; } - + /** - * + * * @todo The $type parameter to _QueryResponse should be from a mapping, not a constant, to support custom mapping later on - * + * */ public static function BillPaymentCheckImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs BillPaymentCheckQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; } - + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('billpaymentcheck', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } public static function BillPaymentCreditCardImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(2.0, $version, $locale, QUICKBOOKS_QUERY_BILLPAYMENTCREDITCARD)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -5194,31 +5194,31 @@ public static function BillPaymentCreditCardImportRequest($requestID, $user, $ac '; - + return $xml; } - + /** - * + * * @todo The $type parameter to _QueryResponse should be from a mapping, not a constant, to support custom mapping later on - * + * */ public static function BillPaymentCreditCardImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs BillPaymentCreditCardQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; } - + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('billpaymentcreditcard', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } @@ -5232,7 +5232,7 @@ public static function BillQueryRequest($requestID, $user, $action, $ID, $extra, { $tag = '' . $extra['RefNumber'] . ''; } - else if (!empty($extra['FromModifiedDate']) and + else if (!empty($extra['FromModifiedDate']) and !empty($extra['ToModifiedDate'])) { $tag = ''; @@ -5245,7 +5245,7 @@ public static function BillQueryRequest($requestID, $user, $action, $ID, $extra, { return QUICKBOOKS_NOOP; } - + $xml = ' @@ -5255,27 +5255,27 @@ public static function BillQueryRequest($requestID, $user, $action, $ID, $extra, '; - + return $xml; } - + public static function BillQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array()) { $extra['is_query_response'] = true; return QuickBooks_Callbacks_SQL_Callbacks::BillImportResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function BillImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $iterator = QuickBooks_Callbacks_SQL_Callbacks::_buildIterator($extra, $version, $locale); if (!$iterator) { - + return QUICKBOOKS_NOOP; } - + $xml .= ' @@ -5288,41 +5288,41 @@ public static function BillImportRequest($requestID, $user, $action, $ID, $extra '; - + return $xml; } - + /** - * - * + * + * */ public static function BillImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs BillQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; } - + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('bill', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - + + public static function BillToPayQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(2.0, $version, $locale, QUICKBOOKS_QUERY_BILLTOPAY)) { return QUICKBOOKS_SKIP; } - + // We pass a blank ListID, because it was discovered that this will get ALL the BillToPay entries rather than only a few. $xml = ' @@ -5337,35 +5337,35 @@ public static function BillToPayQueryRequest($requestID, $user, $action, $ID, $e '; return $xml; } - + public static function BillToPayQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs BillToPayQueryRs'); if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; } - + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('billtopay', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function BillingRateQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(6.0, $version, $locale, QUICKBOOKS_QUERY_BILLINGRATE)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -5375,42 +5375,42 @@ public static function BillingRateQueryRequest($requestID, $user, $action, $ID, '; - + return $xml; } - + /** - * - * + * + * */ public static function BillingRateQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs BillingRateQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('billingrate', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function BuildAssemblyQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(5.0, $version, $locale, QUICKBOOKS_QUERY_BUILDASSEMBLY)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -5422,37 +5422,37 @@ public static function BuildAssemblyQueryRequest($requestID, $user, $action, $ID '; - + return $xml; } - + /** - * - * + * + * */ public static function BuildAssemblyQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs BuildAssemblyQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_CHECK, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function CheckAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -5460,7 +5460,7 @@ public static function CheckAddRequest($requestID, $user, $action, $ID, $extra, if ($Check = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'check', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { // Special handling for check add requests - + // If a RefNumber is printed, then it can't be set as IsToBePrinted if (!empty($Check['RefNumber'])) { @@ -5470,33 +5470,33 @@ public static function CheckAddRequest($requestID, $user, $action, $ID, $extra, { unset($Check['RefNumber']); } - + return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_CHECK, $Check, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - + return ''; } - + /** - * - * - * + * + * + * */ public static function CheckAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CheckAddRs'); - + $extra['IsAddResponse'] = true; $extra['is_add_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_CHECK, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); - } + } public static function CheckModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { @@ -5504,7 +5504,7 @@ public static function CheckModRequest($requestID, $user, $action, $ID, $extra, if ($Check = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'check', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) { // Special handling for check add requests - + // If a RefNumber is printed, then it can't be set as IsToBePrinted if (!empty($Check['RefNumber'])) { @@ -5514,38 +5514,38 @@ public static function CheckModRequest($requestID, $user, $action, $ID, $extra, { unset($Check['RefNumber']); } - + return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_CHECK, $Check, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); } - + return ''; } - + /** - * - * - * + * + * + * */ public static function CheckModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CheckModRs'); - + $extra['IsModResponse'] = true; $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_CHECK, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); - } - + } + public static function CheckImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -5558,41 +5558,41 @@ public static function CheckImportRequest($requestID, $user, $action, $ID, $extr '; - + return $xml; } - + /** - * - * + * + * */ public static function CheckImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CheckQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_CHECK, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * + * + * */ public static function JournalEntryImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -5604,42 +5604,42 @@ public static function JournalEntryImportRequest($requestID, $user, $action, $ID '; - + return $xml; } - + /** - * - * + * + * */ public static function JournalEntryImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs JournalEntryQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_JOURNALENTRY, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } public static function ChargeImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(2.0, $version)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -5651,37 +5651,37 @@ public static function ChargeImportRequest($requestID, $user, $action, $ID, $ext '; - + return $xml; } - + /** - * - * + * + * */ public static function ChargeImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ChargeQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('charge', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function ClassImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -5691,37 +5691,37 @@ public static function ClassImportRequest($requestID, $user, $action, $ID, $extr '; - + return $xml; } - + /** - * - * + * + * */ public static function ClassImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ClassQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('class', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } public static function HostImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -5733,36 +5733,36 @@ public static function HostImportRequest($requestID, $user, $action, $ID, $extra '; - + return $xml; } - + /** - * + * * @todo The $type parameter to _QueryResponse should be from a mapping, not a constant, to support custom mapping later on - * - * + * + * */ public static function HostImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); $Root = $Doc->getRoot(); - + $List = $Root->getChildAt('QBXML QBXMLMsgsRs HostQueryRs'); - + $extra['is_import_response'] = true; - + return QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('host', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function PreferencesImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -5770,38 +5770,38 @@ public static function PreferencesImportRequest($requestID, $user, $action, $ID, '; - + return $xml; } - + /** - * + * * @todo The $type parameter to _QueryResponse should be from a mapping, not a constant, to support custom mapping later on - * - * + * + * */ public static function PreferencesImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); $Root = $Doc->getRoot(); - + $List = $Root->getChildAt('QBXML QBXMLMsgsRs PreferencesQueryRs'); - + //print_r($List); - + $extra['is_import_response'] = true; - + return QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('preferences', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function CompanyImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -5811,39 +5811,39 @@ public static function CompanyImportRequest($requestID, $user, $action, $ID, $ex '; - + return $xml; } - + /** - * + * * @todo The $type parameter to _QueryResponse should be from a mapping, not a constant, to support custom mapping later on - * - * + * + * */ public static function CompanyImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); $Root = $Doc->getRoot(); - + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CompanyQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + return QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('company', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } public static function CreditCardChargeImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -5855,37 +5855,37 @@ public static function CreditCardChargeImportRequest($requestID, $user, $action, '; - + return $xml; } - + /** - * - * + * + * */ public static function CreditCardChargeImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CreditCardChargeQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('creditcardcharge', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function CreditCardCreditImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -5897,38 +5897,38 @@ public static function CreditCardCreditImportRequest($requestID, $user, $action, '; - + return $xml; } - + /** - * - * + * + * */ public static function CreditCardCreditImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CreditCardCreditQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('creditcardcredit', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - + + public static function CreditMemoImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -5941,37 +5941,37 @@ public static function CreditMemoImportRequest($requestID, $user, $action, $ID, '; - + return $xml; } - + /** - * - * + * + * */ public static function CreditMemoImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CreditMemoQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + return QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('creditmemo', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function CustomerMsgImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -5981,81 +5981,81 @@ public static function CustomerMsgImportRequest($requestID, $user, $action, $ID, '; - + return $xml; } - + /** - * + * * @todo The $type parameter to _QueryResponse should be from a mapping, not a constant, to support custom mapping later on - * - * + * + * */ public static function CustomerMsgImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); $Root = $Doc->getRoot(); - + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CustomerMsgQueryRs'); - + $extra['is_import_response'] = true; - + return QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('customermsg', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function CustomerImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $iterator = QuickBooks_Callbacks_SQL_Callbacks::_buildIterator($extra, $version, $locale); - + $Driver = QuickBooks_Driver_Singleton::getInstance(); - + if (!$iterator) { // This version of QuickBooks *does not support iterators*, so instead of using // these IMPORT requests, we'll just queue up a bunch of Query requests instead // @todo This may actually change the behavior of things a bit, because _query_response may be handled slightly differently than _import_response... but will it matter? - + $key_prev = QuickBooks_Callbacks_SQL_Callbacks::_keySyncPrev($action); - + $module = __CLASS__; - + //$action = null; $type = null; $opts = null; // configRead($user, $module, $key, &$type, &$opts) - $prev_sync_datetime = $Driver->configRead($user, $module, $key_prev, $type, $opts); // last sync started... - - // Calculate the # of days ago the last sync was... + $prev_sync_datetime = $Driver->configRead($user, $module, $key_prev, $type, $opts); // last sync started... + + // Calculate the # of days ago the last sync was... $prev_sync_timestamp = strtotime($prev_sync_datetime); - + $hours_ago = (time() - $prev_sync_timestamp) / 60.0 / 60.0; - + $every_six_hours = 60 * 60 * 6; - + for ($i = $prev_sync_timestamp; $i <= time(); $i = $i + $every_six_hours) { $extra = array( - 'FromModifiedDate' => QuickBooks_Utilities::datetime($i), - 'ToModifiedDate' => QuickBooks_Utilities::datetime($i + $every_six_hours), + 'FromModifiedDate' => QuickBooks_Utilities::datetime($i), + 'ToModifiedDate' => QuickBooks_Utilities::datetime($i + $every_six_hours), ); - + // Queue up some requests $Driver->queueEnqueue( - $user, - QUICKBOOKS_QUERY_CUSTOMER, - null, - true, - QuickBooks_Utilities::priorityForAction($action), + $user, + QUICKBOOKS_QUERY_CUSTOMER, + null, + true, + QuickBooks_Utilities::priorityForAction($action), $extra); } - + return QUICKBOOKS_NOOP; } - + $xml = ''; $xml .= ' @@ -6068,35 +6068,35 @@ public static function CustomerImportRequest($requestID, $user, $action, $ID, $e '; - + return $xml; } - + /** - * + * * @todo The $type parameter to _QueryResponse should be from a mapping, not a constant, to support custom mapping later on - * - * + * + * */ public static function CustomerImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); $Root = $Doc->getRoot(); - + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CustomerQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; } - + return QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('customer', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function CustomerQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { if (!empty($extra['ListID'])) @@ -6107,7 +6107,7 @@ public static function CustomerQueryRequest($requestID, $user, $action, $ID, $ex { $tag = '' . QuickBooks_Cast::cast(QUICKBOOKS_OBJECT_CUSTOMER, 'FullName', $extra['FullName']) . ''; } - else if (!empty($extra['FromModifiedDate']) and + else if (!empty($extra['FromModifiedDate']) and !empty($extra['ToModifiedDate'])) { $tag = ''; @@ -6118,7 +6118,7 @@ public static function CustomerQueryRequest($requestID, $user, $action, $ID, $ex { return QUICKBOOKS_NOOP; } - + $xml = ' @@ -6128,7 +6128,7 @@ public static function CustomerQueryRequest($requestID, $user, $action, $ID, $ex '; - + return $xml; } @@ -6137,11 +6137,11 @@ public static function CustomerQueryResponse($requestID, $user, $action, $ID, $e $extra['is_query_response'] = true; return QuickBooks_Callbacks_SQL_Callbacks::CustomerImportResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function CustomerTypeImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -6151,31 +6151,31 @@ public static function CustomerTypeImportRequest($requestID, $user, $action, $ID '; - + return $xml; } - + /** - * + * * @todo The $type parameter to _QueryResponse should be from a mapping, not a constant, to support custom mapping later on - * + * */ public static function CustomerTypeImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs CustomerTypeQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('customertype', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } @@ -6188,12 +6188,12 @@ public static function CustomerTypeImportResponse($requestID, $user, $action, $I public static function DataExtDefQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(2.0, $version, $locale, QUICKBOOKS_QUERY_DATAEXTDEF)) { return QUICKBOOKS_SKIP; - } - + } + $xml .= ' @@ -6210,82 +6210,153 @@ public static function DataExtDefQueryRequest($requestID, $user, $action, $ID, $ Item */ - + return $xml; } - + public static function DataExtDefQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs DataExtDefQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('DataExtDef', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - + + public static function DateDrivenTermsQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { - $xml = ''; - - $xml .= ' - - - - - ' . QuickBooks_Callbacks_SQL_Callbacks::_buildFilter($user, $action, $extra) . ' - - - '; - - return $xml; + $xml = ''; + + $xml .= ' + + + + + ' . QuickBooks_Callbacks_SQL_Callbacks::_buildFilter($user, $action, $extra) . ' + + + '; + + return $xml; + } + + /** + * + * @todo The $type parameter to _QueryResponse should be from a mapping, not a constant, to support custom mapping later on + * + */ + public static function DateDrivenTermsQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) + { + $Parser = new QuickBooks_XML_Parser($xml); + + $errnum = 0; + $errmsg = ''; + $Doc = $Parser->parse($errnum, $errmsg); + $Root = $Doc->getRoot(); + + $List = $Root->getChildAt('QBXML QBXMLMsgsRs DateDrivenTermsQueryRs'); + + if (!isset($extra['is_query_response'])) + { + $extra['is_import_response'] = true; + } + + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('datedriventerms', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); + } + + + /** + * Generate a qbXML DepositAdd request to add a deposit + */ + public static function DepositAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) + { + $Driver = QuickBooks_Driver_Singleton::getInstance(); + if ($Invoice = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'deposit', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) + { + return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_DEPOSIT, $Invoice, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); + } + + return ''; + } + + /** + * Handle an DepositAdd response from QuickBooks + */ + public static function DepositAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) + { + $Parser = new QuickBooks_XML_Parser($xml); + + $errnum = 0; + $errmsg = ''; + $Doc = $Parser->parse($errnum, $errmsg); + $Root = $Doc->getRoot(); + + $List = $Root->getChildAt('QBXML QBXMLMsgsRs DepositAddRs'); + + $extra['IsAddResponse'] = true; + $extra['is_add_response'] = true; + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_DEPOSIT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); + } + + /** + * Generate a qbXML DepositMod request to update a deposit + */ + public static function DepositModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) + { + //$Driver = QuickBooks_Driver_Singleton::getInstance(); + //$args = func_get_args(); + //$Driver->log('got in: ' . print_r($args, true)); + + $Driver = QuickBooks_Driver_Singleton::getInstance(); + if ($Invoice = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'deposit', array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ))) + { + return QuickBooks_Callbacks_SQL_Callbacks::_AddRequest(QUICKBOOKS_OBJECT_DEPOSIT, $Invoice, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config); + } + + return ''; } - + /** - * - * @todo The $type parameter to _QueryResponse should be from a mapping, not a constant, to support custom mapping later on - * + * Handle an DepositMod response from QuickBooks */ - public static function DateDrivenTermsQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) + public static function DepositModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { - $Parser = new QuickBooks_XML_Parser($xml); - - $errnum = 0; - $errmsg = ''; - $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - - $List = $Root->getChildAt('QBXML QBXMLMsgsRs DateDrivenTermsQueryRs'); - - if (!isset($extra['is_query_response'])) - { - $extra['is_import_response'] = true; - } - - QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('datedriventerms', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); + $Parser = new QuickBooks_XML_Parser($xml); + + $errnum = 0; + $errmsg = ''; + $Doc = $Parser->parse($errnum, $errmsg); + $Root = $Doc->getRoot(); + + $List = $Root->getChildAt('QBXML QBXMLMsgsRs DepositModRs'); + + $extra['IsModResponse'] = true; + $extra['is_mod_response'] = true; + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_DEPOSIT, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - + + public static function DepositImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(2.0, $version)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -6297,42 +6368,42 @@ public static function DepositImportRequest($requestID, $user, $action, $ID, $ex '; - + return $xml; } - + /** - * - * + * + * */ public static function DepositImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs DepositQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('deposit', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function EmployeeImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -6343,50 +6414,50 @@ public static function EmployeeImportRequest($requestID, $user, $action, $ID, $e '; - + return $xml; } - + /** - * - * + * + * */ public static function EmployeeImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs EmployeeQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('employee', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * - * + * + * + * */ public static function EstimateImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $iterator = QuickBooks_Callbacks_SQL_Callbacks::_buildIterator($extra, $version, $locale); if (!$iterator) { - - + + return QUICKBOOKS_NOOP; } - + $xml .= ' @@ -6399,44 +6470,44 @@ public static function EstimateImportRequest($requestID, $user, $action, $ID, $e '; - + return $xml; } - + /** - * - * + * + * */ public static function EstimateImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs EstimateQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('estimate', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - + + + public static function InventoryAdjustmentImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(2.0, $version)) { return QUICKBOOKS_SKIP; } - + // min version 2.0 $xml .= ' @@ -6449,45 +6520,45 @@ public static function InventoryAdjustmentImportRequest($requestID, $user, $acti '; - + return $xml; } - + public static function InventoryAdjustmentImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs InventoryAdjustmentQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('inventoryadjustment', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - + + public static function InvoiceImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $iterator = QuickBooks_Callbacks_SQL_Callbacks::_buildIterator($extra, $version, $locale); if (!$iterator) { // Doesn't support iterators - + // Queue up by month - + return QUICKBOOKS_NOOP; } - + $xml .= ' @@ -6500,36 +6571,36 @@ public static function InvoiceImportRequest($requestID, $user, $action, $ID, $ex '; - + return $xml; } - + public static function InvoiceImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs InvoiceQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('invoice', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } public static function InvoiceQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $tag1 = ''; $tag2 = ''; - + if (!empty($extra['TxnID'])) { $tag1 = ''; @@ -6539,7 +6610,7 @@ public static function InvoiceQueryRequest($requestID, $user, $action, $ID, $ext { $tag1 = ''; $tag1 .= '' . $extra['RefNumber'] . ''; - } + } else if (!empty($extra['Entity_FullName'])) { $tag2 = ''; @@ -6554,9 +6625,9 @@ public static function InvoiceQueryRequest($requestID, $user, $action, $ID, $ext $tag2 .= '' . QUICKBOOKS_SERVER_SQL_ITERATOR_MAXRETURNED . ''; $tag2 .= '' . QUICKBOOKS_CRLF; $tag2 .= "\t" . '' . $extra['Entity_ListID'] . '' . QUICKBOOKS_CRLF; - $tag2 .= '' . QUICKBOOKS_CRLF; + $tag2 .= '' . QUICKBOOKS_CRLF; } - else if (!empty($extra['FromModifiedDate']) and + else if (!empty($extra['FromModifiedDate']) and !empty($extra['ToModifiedDate'])) { $tag2 = ''; @@ -6564,7 +6635,7 @@ public static function InvoiceQueryRequest($requestID, $user, $action, $ID, $ext $tag2 .= '' . QUICKBOOKS_CRLF; $tag2 .= "\t" . '' . QuickBooks_Utilities::datetime($extra['FromModifiedDate']) . '' . QUICKBOOKS_CRLF; $tag2 .= "\t" . '' . QuickBooks_Utilities::datetime($extra['ToModifiedDate']) . '' . QUICKBOOKS_CRLF; - $tag2 .= '' . QUICKBOOKS_CRLF; + $tag2 .= '' . QUICKBOOKS_CRLF; } else { @@ -6572,9 +6643,9 @@ public static function InvoiceQueryRequest($requestID, $user, $action, $ID, $ext } // ' . QUICKBOOKS_SERVER_SQL_ITERATOR_MAXRETURNED . ' - + // ' . QuickBooks_Callbacks_SQL_Callbacks::_buildIterator($extra) . ' - + $xml .= ' @@ -6588,23 +6659,23 @@ public static function InvoiceQueryRequest($requestID, $user, $action, $ID, $ext '; - + return $xml; } - + public static function InvoiceQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { // Let the import response function know that the update should be applied as if this is a query response $extra['is_query_response'] = true; - + // Pass off processing to the invoice import response functino QuickBooks_Callbacks_SQL_Callbacks::InvoiceImportResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function ItemServiceImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -6616,33 +6687,33 @@ public static function ItemServiceImportRequest($requestID, $user, $action, $ID, '; - + return $xml; } - + public static function ItemServiceImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - + $Root = $Doc->getRoot(); $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemServiceQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SERVICEITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } public static function ItemNonInventoryImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -6654,33 +6725,33 @@ public static function ItemNonInventoryImportRequest($requestID, $user, $action, '; - + return $xml; } - + public static function ItemNonInventoryImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - + $Root = $Doc->getRoot(); $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemNonInventoryQueryRs'); if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_NONINVENTORYITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } public static function ItemInventoryImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -6692,26 +6763,26 @@ public static function ItemInventoryImportRequest($requestID, $user, $action, $I '; - + return $xml; } - + public static function ItemInventoryImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - + $Root = $Doc->getRoot(); $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemInventoryQueryRs'); if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_INVENTORYITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } @@ -6751,12 +6822,12 @@ public static function ItemInventoryAssemblyImportResponse($requestID, $user, $a } QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_QUERY_INVENTORYASSEMBLYITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); - } - + } + public static function ItemSalesTaxImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -6768,33 +6839,33 @@ public static function ItemSalesTaxImportRequest($requestID, $user, $action, $ID '; - + return $xml; } - + public static function ItemSalesTaxImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - + $Root = $Doc->getRoot(); $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemSalesTaxQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESTAXITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function ItemSalesTaxGroupImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -6806,38 +6877,38 @@ public static function ItemSalesTaxGroupImportRequest($requestID, $user, $action '; - + return $xml; } - + public static function ItemSalesTaxGroupImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - + $Root = $Doc->getRoot(); $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemSalesTaxGroupQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_SALESTAXGROUPITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); - } - - /** - * - * - * - */ + } + + /** + * + * + * + */ public static function ItemImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -6849,34 +6920,34 @@ public static function ItemImportRequest($requestID, $user, $action, $ID, $extra '; - + return $xml; } - + public static function ItemImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_ITEM, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - + + public static function ItemReceiptImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -6888,34 +6959,34 @@ public static function ItemReceiptImportRequest($requestID, $user, $action, $ID, '; - + return $xml; } - + public static function ItemReceiptImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ItemReceiptQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('itemreceipt', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - + + public static function JobTypeQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -6925,33 +6996,33 @@ public static function JobTypeQueryRequest($requestID, $user, $action, $ID, $ext '; - + return $xml; } - + /** - * - * + * + * */ public static function JobTypeQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs JobTypeQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('jobtype', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** * * @@ -6960,7 +7031,7 @@ public static function JobTypeQueryResponse($requestID, $user, $action, $ID, $ex public static function PaymentMethodImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -6971,37 +7042,37 @@ public static function PaymentMethodImportRequest($requestID, $user, $action, $I '; - + return $xml; } - + /** - * - * + * + * */ public static function PaymentMethodImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs PaymentMethodQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('paymentmethod', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function PayrollItemWageImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -7011,34 +7082,34 @@ public static function PayrollItemWageImportRequest($requestID, $user, $action, '; - + return $xml; } - + /** - * - * + * + * */ public static function PayrollItemWageImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs PayrollItemWageQueryRs'); $extra['is_import_response'] = true; - + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('payrollitemwage', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } public static function PayrollItemNonWageImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -7048,43 +7119,43 @@ public static function PayrollItemNonWageImportRequest($requestID, $user, $actio '; - + return $xml; } - + /** - * - * + * + * */ public static function PayrollItemNonWageImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs PayrollItemNonWageQueryRs'); $extra['is_import_response'] = true; - + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('payrollitemnonwage', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * + * + * */ public static function PriceLevelImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(4.0, $version)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -7094,49 +7165,49 @@ public static function PriceLevelImportRequest($requestID, $user, $action, $ID, '; - + return $xml; } - + /** - * - * + * + * */ public static function PriceLevelImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs PriceLevelQueryRs'); if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; } - + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('pricelevel', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** * * - */ + */ public static function PurchaseOrderImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $iterator = QuickBooks_Callbacks_SQL_Callbacks::_buildIterator($extra, $version, $locale); if (!$iterator) { // Doesn't support iterators? - + return QUICKBOOKS_NOOP; } - + $xml .= ' @@ -7149,33 +7220,33 @@ public static function PurchaseOrderImportRequest($requestID, $user, $action, $I '; - + return $xml; } - + /** - * - * + * + * */ public static function PurchaseOrderImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs PurchaseOrderQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; } - + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('purchaseorder', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function PurchaseOrderQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { if (!empty($extra['TxnID'])) @@ -7186,7 +7257,7 @@ public static function PurchaseOrderQueryRequest($requestID, $user, $action, $ID { $tag = '' . $extra['RefNumber'] . ''; } - else if (!empty($extra['FromModifiedDate']) and + else if (!empty($extra['FromModifiedDate']) and !empty($extra['ToModifiedDate'])) { $tag = ''; @@ -7199,7 +7270,7 @@ public static function PurchaseOrderQueryRequest($requestID, $user, $action, $ID { return QUICKBOOKS_NOOP; } - + $xml = ' @@ -7209,38 +7280,38 @@ public static function PurchaseOrderQueryRequest($requestID, $user, $action, $ID '; - + return $xml; } - + public static function PurchaseOrderQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array()) { $extra['is_query_response'] = true; return QuickBooks_Callbacks_SQL_Callbacks::PurchaseOrderImportResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * + * * */ public static function ReceivePaymentImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $iterator = QuickBooks_Callbacks_SQL_Callbacks::_buildIterator($extra); - + if (!$iterator) { - // Iterators are not supported... - + // Iterators are not supported... + return QUICKBOOKS_NOOP; } - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(1.1, $version)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -7252,47 +7323,47 @@ public static function ReceivePaymentImportRequest($requestID, $user, $action, $ '; - + return $xml; } - + /** - * - * + * + * */ public static function ReceivePaymentImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ReceivePaymentQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('receivepayment', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function ReceivePaymentQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + //$iterator = QuickBooks_Callbacks_SQL_Callbacks::_buildIterator($extra); - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(1.1, $version)) { return QUICKBOOKS_SKIP; } - + $tag1 = ''; $tag2 = ''; - + if (!empty($extra['TxnID'])) { $tag1 = ''; @@ -7302,7 +7373,7 @@ public static function ReceivePaymentQueryRequest($requestID, $user, $action, $I { $tag1 = ''; $tag1 .= '' . $extra['RefNumber'] . ''; - } + } else if (!empty($extra['Entity_FullName'])) { $tag2 = ''; @@ -7317,9 +7388,9 @@ public static function ReceivePaymentQueryRequest($requestID, $user, $action, $I $tag2 .= '' . QUICKBOOKS_SERVER_SQL_ITERATOR_MAXRETURNED . ''; $tag2 .= '' . QUICKBOOKS_CRLF; $tag2 .= "\t" . '' . $extra['Entity_ListID'] . '' . QUICKBOOKS_CRLF; - $tag2 .= '' . QUICKBOOKS_CRLF; + $tag2 .= '' . QUICKBOOKS_CRLF; } - else if (!empty($extra['FromModifiedDate']) and + else if (!empty($extra['FromModifiedDate']) and !empty($extra['ToModifiedDate'])) { $tag2 = ''; @@ -7327,13 +7398,13 @@ public static function ReceivePaymentQueryRequest($requestID, $user, $action, $I $tag2 .= '' . QUICKBOOKS_CRLF; $tag2 .= "\t" . '' . QuickBooks_Utilities::datetime($extra['FromModifiedDate']) . '' . QUICKBOOKS_CRLF; $tag2 .= "\t" . '' . QuickBooks_Utilities::datetime($extra['ToModifiedDate']) . '' . QUICKBOOKS_CRLF; - $tag2 .= '' . QUICKBOOKS_CRLF; + $tag2 .= '' . QUICKBOOKS_CRLF; } else { return QUICKBOOKS_NOOP; } - + $xml .= ' @@ -7346,33 +7417,33 @@ public static function ReceivePaymentQueryRequest($requestID, $user, $action, $I '; - + return $xml; } - + /** - * - * + * + * */ public static function ReceivePaymentQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $extra['is_query_response'] = true; return QuickBooks_Callbacks_SQL_Callbacks::ReceivePaymentImportResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); - } - + } + public static function SalesOrderImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(2.1, $version)) { return QUICKBOOKS_SKIP; } - + // IncludeLinkedTxns is actually qbXML versions 2.0 or greater... but // since this entire action is qbXML versions 2.1 or greater, we can - // just assume it'll be present. - + // just assume it'll be present. + $xml .= ' @@ -7385,33 +7456,33 @@ public static function SalesOrderImportRequest($requestID, $user, $action, $ID, '; - + return $xml; } - + public static function SalesOrderImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesOrderQueryRs'); - + $extra['is_import_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('salesorder', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + /** - * - * + * + * */ public static function SalesReceiptImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -7423,33 +7494,33 @@ public static function SalesReceiptImportRequest($requestID, $user, $action, $ID '; - + return $xml; } - + /** - * - * + * + * */ public static function SalesReceiptImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesReceiptQueryRs'); - + $extra['is_import_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('salesreceipt', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - + public static function SalesRepImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -7459,39 +7530,39 @@ public static function SalesRepImportRequest($requestID, $user, $action, $ID, $e '; - + return $xml; } - + /** - * - * + * + * */ public static function SalesRepImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesRepQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('salesrep', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - + + + public static function SalesTaxCodeImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -7501,87 +7572,87 @@ public static function SalesTaxCodeImportRequest($requestID, $user, $action, $ID '; - + return $xml; } - + /** - * - * + * + * */ public static function SalesTaxCodeImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs SalesTaxCodeQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('salestaxcode', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - + + + public static function ShipMethodImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' All - ' . QuickBooks_Callbacks_SQL_Callbacks::_buildFilter($user, $action, $extra) . ' + ' . QuickBooks_Callbacks_SQL_Callbacks::_buildFilter($user, $action, $extra) . ' '; - + return $xml; } - + /** - * - * + * + * */ public static function ShipMethodImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs ShipMethodQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; } - + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('shipmethod', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - + + + /** - * - * - * + * + * + * */ public static function TermsImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -7592,40 +7663,40 @@ public static function TermsImportRequest($requestID, $user, $action, $ID, $extr '; - + return $xml; } - + /** - * - * + * + * */ public static function TermsImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); $Root = $Doc->getRoot(); - + $List = $Root->getChildAt('QBXML QBXMLMsgsRs TermsQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('terms', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - - + + + + public static function TimeTrackingImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -7635,42 +7706,42 @@ public static function TimeTrackingImportRequest($requestID, $user, $action, $ID '; - + return $xml; } - + /** - * - * + * + * */ public static function TimeTrackingImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs TimeTrackingQueryRs'); - + $extra['is_import_response'] = true; - + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('timetracking', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - - + + + + public static function UnitOfMeasureSetQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(7.0, $version)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -7680,44 +7751,44 @@ public static function UnitOfMeasureSetQueryRequest($requestID, $user, $action, '; - + return $xml; } - + /** - * - * + * + * */ public static function UnitOfMeasureSetQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs UnitOfMeasureSetQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('unitofmeasureset', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - + + + public static function VehicleMileageQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(6.0, $version)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -7727,45 +7798,45 @@ public static function VehicleMileageQueryRequest($requestID, $user, $action, $I '; - + return $xml; } - + /** - * - * + * + * */ public static function VehicleMileageQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs VehicleMileageQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; } - + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('vehiclemileage', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - - + + + + public static function VehicleImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(6.0, $version)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -7775,40 +7846,40 @@ public static function VehicleImportRequest($requestID, $user, $action, $ID, $ex '; - + return $xml; } - + /** - * - * + * + * */ public static function VehicleImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs VehicleQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('vehicle', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - - + + + + public static function VendorCreditImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -7821,35 +7892,35 @@ public static function VendorCreditImportRequest($requestID, $user, $action, $ID '; - + return $xml; } - + public static function VendorCreditImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs VendorCreditQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('vendorcredit', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - + + + public static function VendorTypeImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -7859,39 +7930,39 @@ public static function VendorTypeImportRequest($requestID, $user, $action, $ID, '; - + return $xml; } - + /** - * - * + * + * */ public static function VendorTypeImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs VendorTypeQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('vendortype', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - + + + public static function VendorImportRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + $xml .= ' @@ -7903,46 +7974,46 @@ public static function VendorImportRequest($requestID, $user, $action, $ID, $ext '; - + return $xml; } - + /** - * - * + * + * */ public static function VendorImportResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs VendorQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('vendor', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - - - + + + + + public static function WorkersCompCodeQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) { $xml = ''; - + if (!QuickBooks_Callbacks_SQL_Callbacks::_requiredVersion(7.0, $version)) { return QUICKBOOKS_SKIP; } - + $xml .= ' @@ -7952,63 +8023,63 @@ public static function WorkersCompCodeQueryRequest($requestID, $user, $action, $ '; - + return $xml; } - + /** - * - * + * + * */ public static function WorkersCompCodeQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $Doc = $Parser->parse($errnum, $errmsg); - $Root = $Doc->getRoot(); - + $Root = $Doc->getRoot(); + $List = $Root->getChildAt('QBXML QBXMLMsgsRs WorkersCompCodeQueryRs'); - + if (!isset($extra['is_query_response'])) { $extra['is_import_response'] = true; - } - + } + QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('workerscompcode', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } - - - + + + /* No registered handler for: CreditCardMemoQuery No registered handler for: DataExtDefQuery - + No registered handler for: StandardTermsQuery No registered handler for: TemplateQuery No registered handler for: TransactionQuery No registered handler for: quickbooks-query-null */ - - + + /** - * + * * @todo Make the Boolean TRUE value used in the QUICKBOOKS_DRIVER_SQL_FIELD_DELETED_FLAG field a constant, in case the sql driver used uses something other than 1 and 0. * @todo Change all ListID and TxnID instances to use the QuickBooks_Utilities::actionToKey function. */ protected static function _getChildTables($table) { $map_children = array( - 'account' => array( + 'account' => array( 'id_field' => 'ListID', 'children' => array( 'account_taxlineinfo' => 'Account_ListID', 'dataext' => 'Entity_ListID' ) ), - 'bill' => array( + 'bill' => array( 'id_field' => 'TxnID', 'children' => array( 'bill_linkedtxn' => 'Bill_TxnID', @@ -8018,39 +8089,39 @@ protected static function _getChildTables($table) 'dataext' => 'Txn_TxnID' ) ), - 'bill_itemgroupline' => array( + 'bill_itemgroupline' => array( 'id_field' => 'TxnLineID', 'children' => array( 'bill_itemgroupline_itemline' => 'Bill_ItemGroupLine_TxnLineID', ) ), - 'billingrate' => array( + 'billingrate' => array( 'id_field' => 'ListID', 'children' => array( 'billingrate_billingrateperitem' => 'BillingRate_ListID' ) ), - 'billpaymentcheck' => array( + 'billpaymentcheck' => array( 'id_field' => 'TxnID', 'children' => array( 'billpaymentcheck_appliedtotxn' => 'BillPaymentCheck_TxnID', 'dataext' => 'Txn_TxnID' ) - ), + ), 'billpaymentcreditcard' => array( 'id_field' => 'TxnID', 'children' => array( 'billpaymentcreditcard_appliedtotxn' => 'BillPaymentCreditCard_TxnID', 'dataext' => 'Txn_TxnID' ) - ), + ), 'charge' => array( 'id_field' => 'TxnID', 'children' => array( 'dataext' => 'Txn_TxnID' ) ), - 'check' => array( + 'check' => array( 'id_field' => 'TxnID', 'children' => array( 'check_expenseline' => 'Check_TxnID', @@ -8060,19 +8131,19 @@ protected static function _getChildTables($table) 'dataext' => 'Txn_TxnID' ) ), - + "check_itemgroupline" => array( "id_field" => "TxnLineID", "children" => array( "check_itemgroupline_itemline" => "Check_ItemGroupLine_TxnLineID" ) ), - + "company" => array( "id_field" => "CompanyName", "children" => array( "company_subscribedservices_service" => "Company_CompanyName" ) ), - + "creditcardcharge" => array( "id_field" => "TxnID", "children" => array( "creditcardcharge_expenseline" => "CreditCardCharge_TxnID", @@ -8081,13 +8152,13 @@ protected static function _getChildTables($table) "dataext" => "Txn_TxnID" ) ), - + "creditcardcharge_itemgroupline" => array( "id_field" => "TxnLineID", "children" => array( "creditcardcharge_itemgroupline_itemline" => "CreditCardCharge_ItemGroupLine_TxnLineID" ) ), - + "creditcardcredit" => array( "id_field" => "TxnID", "children" => array( "creditcardcredit_expenseline" => "CreditCardCredit_TxnID", @@ -8096,13 +8167,13 @@ protected static function _getChildTables($table) "dataext" => "Txn_TxnID" ) ), - + "creditcardcredit_itemgroupline" => array( "id_field" => "TxnLineID", "children" => array( "creditcardcredit_itemgroupline_itemline" => "CreditCardCredit_ItemGroupLine_TxnLineID" ) ), - + "creditmemo" => array( "id_field" => "TxnID", "children" => array( "creditmemo_creditmemoline" => "CreditMemo_TxnID", @@ -8111,154 +8182,154 @@ protected static function _getChildTables($table) "dataext" => "Txn_TxnID" ) ), - + "creditmemolinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID", "creditmemo_creditmemolinegroup_creditmemoline" => "CreditMemo_CreditMemoLineGroup_TxnLineID" ) ), - + "creditmemolinegroup_creditmemoline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "customer" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "deposit" => array( "id_field" => "TxnID", "children" => array( "deposit_depositline" => "Deposit_TxnID", "dataext" => "Txn_TxnID" ) ), - + "employee" => array( "id_field" => "ListID", "children" => array( "employee_earnings" => "Employee_ListID", "dataext" => "Entity_ListID" ) ), - + "estimate" => array( "id_field" => "TxnID", "children" => array( "estimate_linkedtxn" => "FromTxnID", - "estimate_estimateline" => "Estimate_TxnID", - "estimate_estimatelinegroup" => "Estimate_TxnID", + "estimate_estimateline" => "Estimate_TxnID", + "estimate_estimatelinegroup" => "Estimate_TxnID", "dataext" => "Entity_ListID" ) ), - + "estimate_estimatelinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID", "estimate_estimatelinegroup_estimateline" => "Estimate_EstimateLineGroup_TxnLineID" ) ), - + "estimate_estimateline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "estimate_estimatelinegroup_estimateline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "inventoryadjustment" => array( "id_field" => "TxnID", "children" => array( "inventoryadjustment_inventoryadjustmentline" => "InventoryAdjustment_TxnID", "dataext" => "Txn_TxnID" ) ), - - 'invoice' => array( + + 'invoice' => array( 'id_field' => 'TxnID', 'children' => array( 'invoice_linkedtxn' => 'FromTxnID', - 'invoice_invoiceline' => 'Invoice_TxnID', - 'invoice_invoicelinegroup' => 'Invoice_TxnID', + 'invoice_invoiceline' => 'Invoice_TxnID', + 'invoice_invoicelinegroup' => 'Invoice_TxnID', 'dataext' => 'Txn_TxnID', ) ), - + "invoice_invoiceline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "invoice_invoicelinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID", "invoice_invoicelinegroup_invoiceline" => "Invoice_InvoiceLineGroup_TxnLineID" ) ), - + "invoice_invoicelinegroup_invoiceline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "iteminventory" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "iteminventoryassembly" => array( "id_field" => "ListID", "children" => array( "iteminventoryassembly_iteminventoryassemblyline" => "ItemInventoryAssembly_ListID", "dataext" => "Txn_TxnID" ) ), - + "itemnoninventory" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itemdiscount" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itemfixedasset" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itemgroup" => array( "id_field" => "ListID", "children" => array( "itemgroup_itemgroupline" => "ItemGroup_ListID", "dataext" => "Entity_ListID" ) ), - + "itemothercharge" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itempayment" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itemreceipt" => array( "id_field" => "TxnID", "children" => array( "itemreceipt_linkedtxn" => "FromTxnID", @@ -8268,32 +8339,32 @@ protected static function _getChildTables($table) "dataext" => "Entity_ListID" ) ), - + "itemreceipt_itemgroupline" => array( "id_field" => "TxnLineID", "children" => array( "itemreceipt_itemgroupline_itemline" => "ItemReceipt_ItemGroupLine_TxnLineID" ) ), - + "itemsalestaxgroup" => array( "id_field" => "ListID", "children" => array( "itemsalestaxgroup_itemsalestax" => "ItemSalesTaxGroup_ListID", "dataext" => "Entity_ListID" ) ), - + "itemservice" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itemsubtotal" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + 'journalentry' => array( 'id_field' => 'TxnID', 'children' => array( @@ -8302,190 +8373,190 @@ protected static function _getChildTables($table) 'dataext' => 'Entity_ListID' ) ), - + "pricelevel" => array( "id_field" => "ListID", "children" => array( "pricelevel_pricelevelperitem" => "PriceLevel_ListID" ) ), - + "purchaseorder" => array( "id_field" => "TxnID", "children" => array( "purchaseorder_linkedtxn" => "FromTxnID", - 'purchaseorder_linkedtxn' => 'PurchaseOrder_TxnID', - "purchaseorder_purchaseorderline" => "PurchaseOrder_TxnID", - "purchaseorder_purchaseorderlinegroup" => "PurchaseOrder_TxnID", + 'purchaseorder_linkedtxn' => 'PurchaseOrder_TxnID', + "purchaseorder_purchaseorderline" => "PurchaseOrder_TxnID", + "purchaseorder_purchaseorderlinegroup" => "PurchaseOrder_TxnID", "dataext" => "Entity_ListID" ) ), - + "purchaseorder_purchaseorderline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "purchaseorder_purchaseorderlinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID", "purchaseorder_purchaseorderlinegroup_purchaseorderline" => "PurchaseOrder_PurchaseOrderLineGroup_TxnLineID" ) ), - + "purchaseorder_purchaseorderlinegroup_purchaseorderline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - - 'receivepayment' => array( + + 'receivepayment' => array( 'id_field' => 'TxnID', 'children' => array( 'receivepayment_appliedtotxn' => 'ReceivePayment_TxnID', 'dataext' => 'Txn_TxnID' ) - ), - + ), + "salesorder" => array( "id_field" => "TxnID", "children" => array( "salesorder_linkedtxn" => "FromTxnID", - "salesorder_salesorderline" => "SalesOrder_TxnID", - "salesorder_salesorderlinegroup" => "SalesOrder_TxnID", + "salesorder_salesorderline" => "SalesOrder_TxnID", + "salesorder_salesorderlinegroup" => "SalesOrder_TxnID", "dataext" => "Entity_ListID" ) ), - + "salesorder_salesorderline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "salesorder_salesorderlinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID", "salesorder_salesorderlinegroup_salesorderline" => "SalesOrder_SalesOrderLineGroup_TxnLineID" ) ), - + "salesorder_salesorderlinegroup_salesorderline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "salesreceipt" => array( "id_field" => "TxnID", "children" => array( - "salesreceipt_salesreceiptline" => "SalesReceipt_TxnID", - "salesreceipt_salesreceiptlinegroup" => "SalesReceipt_TxnID", + "salesreceipt_salesreceiptline" => "SalesReceipt_TxnID", + "salesreceipt_salesreceiptlinegroup" => "SalesReceipt_TxnID", "dataext" => "Txn_TxnID" ) ), - + "salesreceipt_salesreceiptline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "salereceipt_salesreceiptlinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID", "salesreceipt_salesreceiptlinegroup_salesreceiptline" => "SalesReceipt_SalesReceiptLineGroup_TxnLineID" ) ), - + "salesreceipt_salesreceiptlinegroup_salesreceiptline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "unitofmeasureset" => array( "id_field" => "ListID", "children" => array( - "unitofmeasureset_defaultunit" => "UnitOfMeasureSet_ListID", + "unitofmeasureset_defaultunit" => "UnitOfMeasureSet_ListID", "unitofmeasureset_relatedunit" => "UnitOfMeasureSet_ListID" ) ), - + "vendor" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "vendorcredit" => array( "id_field" => "TxnID", "children" => array( "vendorcredit_linkedtxn" => "FromTxnID", - "vendorcredit_expenseline" => "VendorCredit_TxnID", - "vendorcredit_itemline" => "VendorCredit_TxnID", - "vendorcredit_itemgroupline" => "VendorCredit_TxnID", + "vendorcredit_expenseline" => "VendorCredit_TxnID", + "vendorcredit_itemline" => "VendorCredit_TxnID", + "vendorcredit_itemgroupline" => "VendorCredit_TxnID", "dataext" => "Txn_TxnID" ) ), - + "vendorcredit_itemgroupline" => array( "id_field" => "TxnLineID", "children" => array( "vendorcredit_itemgroupline_itemline" => "VendorCredit_ItemGroupLine_TxnLineID" ) ), - + "workerscompcode" => array( "id_field" => "ListID", "children" => array( "workerscompcode_ratehistory" => "WorkersCompCode_ListID" ) ) - + ); - + // If no children, return empty array if (!isset($map_children[$table])) { return array(); } - + $ret = array(); foreach ($map_children[$table]['children'] as $key => $value) { $index = count($ret); $ret[$index] = array( 'tableName' => $key, - 'table' => $key, - 'relField' => $value, - 'rel' => $value, + 'table' => $key, + 'relField' => $value, + 'rel' => $value, 'parentKey' => $map_children[$table]['id_field'], - 'parent' => $map_children[$table]['id_field'], + 'parent' => $map_children[$table]['id_field'], 'children' => QuickBooks_Callbacks_SQL_Callbacks::_getChildTables($key) ); } - + return $ret; } - + /** - * - * + * + * * @todo Make the Boolean TRUE value used in the QUICKBOOKS_DRIVER_SQL_FIELD_DELETED_FLAG field a constant, in case the sql driver used uses something other than 1 and 0. * @todo Change all ListID and TxnID instances to use the QuickBooks_Utilities::actionToKey function. */ protected static function _queryChildren($children, $keyID) { - /* + /* $retArr[$index]['tableName'] = $key; $retArr[$index]['relField'] = $value; $retArr[$index]['parentKey'] = $get_children_map[$table]['id_field']; $retArr[$index]['children'] = QuickBooks_Callbacks_SQL_Callbacks::_GetChildrenTables($key); */ - + $Driver = QuickBooks_Driver_Singleton::getInstance(); - + if (empty($children)) { return $children; } - + $ret = array(); - + foreach ($children as $child) { $sort = QUICKBOOKS_DRIVER_SQL_FIELD_ID . " ASC "; @@ -8501,59 +8572,59 @@ protected static function _queryChildren($children, $keyID) $sort = ' SortOrder ASC '; break; } - + $table = $child['table']; $sql = " - SELECT + SELECT * - FROM - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table . " - WHERE - " . $child['rel'] . " = '" . $keyID . "' - ORDER BY + FROM + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table . " + WHERE + " . $child['rel'] . " = '" . $keyID . "' + ORDER BY " . $sort; - + $errnum = 0; $errmsg = ''; - + //print($sql); - + $res = $Driver->query($sql, $errnum, $errmsg); while ($arr = $Driver->fetch($res)) { //print_r($arr); - + if (!empty($arr[QUICKBOOKS_DRIVER_SQL_FIELD_TO_SKIP])) { - // If this record has been marked as to skip, do not + // If this record has been marked as to skip, do not // include it among the children - // (this can happen when you're dealing with line items - // that you want to show in a web GUI, but not be actually - // sent to QuickBooks because they really come from a - // LinkedTxn and you don't want to end up with duplicate - // line items (one set from the LinkedTxn and one set + // (this can happen when you're dealing with line items + // that you want to show in a web GUI, but not be actually + // sent to QuickBooks because they really come from a + // LinkedTxn and you don't want to end up with duplicate + // line items (one set from the LinkedTxn and one set // from these actulal line item records...)...) - + continue; } - + //print_r($arr); - + // Some special cases for certain tables switch ($table) { case 'receivepayment_appliedtotxn': case 'billpaymentcheck_appliedtotxn': case 'billpaymentcreditcard_appliedtotxn': - + if (!empty($arr['Amount'])) { $arr['PaymentAmount'] = $arr['Amount']; } - + break; } - + /* $index = count($ret); $ret[$index] = array(); @@ -8568,60 +8639,60 @@ protected static function _queryChildren($children, $keyID) $ret[$index]['children'] = array(); } */ - + $children = array(); if (!empty($child['children'])) { /* - // This fixes a case-sensitivity issue with PostgreSQL... probably need to look into this more... + // This fixes a case-sensitivity issue with PostgreSQL... probably need to look into this more... // @TODO FIX CASE SENSITIVITY ISSUE HERE WITH QBXML - if ($child['children'][0]['parent'] == 'TxnLineID' and + if ($child['children'][0]['parent'] == 'TxnLineID' and empty($arr['TxnLineID'])) { $child['children'][0]['parent'] = 'txnlineid'; } */ - - + + if (empty($arr[$child['children'][0]['parent']])) { $arr[$child['children'][0]['parent']] = null; } - - - + + + $children = QuickBooks_Callbacks_SQL_Callbacks::_queryChildren($child['children'], $arr[$child['children'][0]['parent']]); } - + $ret[] = array( - 'table' => $table, - 'data' => new QuickBooks_SQL_Object($table, null, $arr), - 'children' => $children, + 'table' => $table, + 'data' => new QuickBooks_SQL_Object($table, null, $arr), + 'children' => $children, ); } } - + return $ret; } - + /** * Update relatives which might be referring to an out-of-date temporary ListID or TxnID - * - * When you initially insert things into the SQL database for insertion - * into QuickBooks, you have to make up a unique TxnID or ListID so you can - * link other things to it. When QuickBooks then receives that record, the - * record is updated with the correct TxnID or ListID. This function also + * + * When you initially insert things into the SQL database for insertion + * into QuickBooks, you have to make up a unique TxnID or ListID so you can + * link other things to it. When QuickBooks then receives that record, the + * record is updated with the correct TxnID or ListID. This function also * updates any records that it might be linked to. i.e.: - * If a customer is added to QuickBooks, and you receive the real ListID, - * then you also want to make sure the temporary ListID is changed to + * If a customer is added to QuickBooks, and you receive the real ListID, + * then you also want to make sure the temporary ListID is changed to * the real ListID in these places: * invoice.Customer_ListID * estimate.Customer_ListID * receivepayment.Customer_ListID * etc. etc. etc. - * - * @param - * @return + * + * @param + * @return */ protected static function _updateRelatives($table, $user, $action, $ID, $object, $extra, $callback_config = array(), $deleteDataExt = false, $fullDelete = false) { @@ -8635,39 +8706,39 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, 'bill' => array( 'id_field' => 'TxnID', 'relatives' => array( - 'billpaymentcheck_appliedtotxn' => 'ToTxnID', - 'billpaymentcreditcard_appliedtotxn' => 'ToTxnID', + 'billpaymentcheck_appliedtotxn' => 'ToTxnID', + 'billpaymentcreditcard_appliedtotxn' => 'ToTxnID', //'dataext' => 'Txn_TxnID' ) ), - - /* + + /* "billingrate" => array( "id_field" => "ListID", "relatives" => array( "billingrate_billingrateperitem" => "BillingRate_ListID" ) ), - + "billpaymentcheck" => array( "id_field" => "ListID", "relatives" => array( "billpaymentcheck_appliedtotxn" => "FromTxnID", "dataext" => "Entity_ListID" ) ), - + "billpaymentcreditcard" => array( "id_field" => "ListID", "relatives" => array( "billpaymentcreditcard_appliedtotxn" => "FromTxnID", "dataext" => "Entity_ListID" ) ), - + "charge" => array( "id_field" => "TxnID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "check" => array( "id_field" => "TxnID", "relatives" => array( "check_expenseline" => "Check_TxnID", @@ -8678,13 +8749,13 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "dataext" => "Txn_TxnID" ) ), - + "company" => array( "id_field" => "CompanyName", "relatives" => array( "company_subscribedservices_service" => "Company_CompanyName" ) ), - + "creditcardcharge" => array( "id_field" => "TxnID", "relatives" => array( "creditcardcharge_expenseline" => "CreditCardCharge_TxnID", @@ -8694,7 +8765,7 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "dataext" => "Txn_TxnID" ) ), - + "creditcardcredit" => array( "id_field" => "TxnID", "relatives" => array( "creditcardcredit_expenseline" => "CreditCardCredit_TxnID", @@ -8704,7 +8775,7 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "dataext" => "Txn_TxnID" ) ), - + "creditmemo" => array( "id_field" => "TxnID", "relatives" => array( "creditmemo_creditmemoline" => "CreditMemo_TxnID", @@ -8714,32 +8785,32 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "dataext" => "Txn_TxnID" ) ), - + "creditmemolinegroup" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "creditmemolinegroup_creditmemoline" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - */ - 'customer' => array( + */ + 'customer' => array( 'id_field' => 'ListID', 'relatives' => array( 'estimate' => 'Customer_ListID', 'salesorder' => 'Customer_ListID', 'purchaseorder_purchaseorderline' => 'Customer_ListID', 'invoice' => 'Customer_ListID', - 'receivepayment' => 'Customer_ListID', - 'purchaseorder' => 'ShipToEntity_ListID', - 'salesreceipt' => 'Customer_ListID', + 'receivepayment' => 'Customer_ListID', + 'purchaseorder' => 'ShipToEntity_ListID', + 'salesreceipt' => 'Customer_ListID', ) ), - /* + /* "deposit" => array( "id_field" => "TxnID", "relatives" => array( "deposit_depositline" => "Deposit_TxnID", @@ -8755,38 +8826,38 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, /* "estimate" => array( "id_field" => "TxnID", "relatives" => array( - "estimate_estimateline" => "Estimate_TxnID", - "estimate_estimatelinegroup" => "Estimate_TxnID", + "estimate_estimateline" => "Estimate_TxnID", + "estimate_estimatelinegroup" => "Estimate_TxnID", "estimate_estimatelinegroup_estimateline" => "Estimate_TxnID", "invoice_linkedtxn" => "FromTxnID", "dataext" => "Entity_ListID" ) ), - + "estimate_estimatelinegroup" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "estimate_estimateline" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "estimate_estimatelinegroup" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "estimate_estimatelinegroup_estimateline" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "inventoryadjustment" => array( "id_field" => "TxnID", "relatives" => array( "inventoryadjustment_inventoryadjustmentline" => "InventoryAdjustment_TxnID", @@ -8794,41 +8865,41 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, ) ), */ - 'invoice' => array( + 'invoice' => array( 'id_field' => 'TxnID', 'relatives' => array( 'estimate_linkedtxn' => 'ToTxnID', 'salesorder_linkedtxn' => 'ToTxnID', - 'receivepayment_appliedtotxn' => 'ToTxnID', // 'ToTxnID:Type=Invoice', + 'receivepayment_appliedtotxn' => 'ToTxnID', // 'ToTxnID:Type=Invoice', ) ), - /* + /* "invoice_invoiceline" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - - + + "invoice_invoicelinegroup" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "invoice_invoicelinegroup_invoiceline" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "itemgroup" => array( "id_field" => "ListID", "relatives" => array( "itemgroup_itemgroupline" => "ItemGroup_ListID", "dataext" => "Entity_ListID" ) ), - */ + */ "iteminventory" => array( "id_field" => "ListID", "relatives" => array( "estimate_estimateline" => "Item_ListID", @@ -8837,14 +8908,14 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "invoice_invoiceline" => "Item_ListID" ) ), - /* + /* "iteminventoryassembly" => array( "id_field" => "ListID", "relatives" => array( "iteminventoryassembly_iteminventoryassemblyline" => "ItemInventoryAssembly_ListID", "dataext" => "Txn_TxnID" ) ), - */ + */ "itemnoninventory" => array( "id_field" => "ListID", "relatives" => array( "estimate_estimateline" => "Item_ListID", @@ -8853,7 +8924,7 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "invoice_invoiceline" => "Item_ListID" ) ), - + "itemdiscount" => array( "id_field" => "ListID", "relatives" => array( "estimate_estimateline" => "Item_ListID", @@ -8862,7 +8933,7 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "invoice_invoiceline" => "Item_ListID" ) ), - + "itemfixedasset" => array( "id_field" => "ListID", "relatives" => array( "estimate_estimateline" => "Item_ListID", @@ -8871,7 +8942,7 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "invoice_invoiceline" => "Item_ListID" ) ), - + "itemothercharge" => array( "id_field" => "ListID", "relatives" => array( "estimate_estimateline" => "Item_ListID", @@ -8880,7 +8951,7 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "invoice_invoiceline" => "Item_ListID" ) ), - + "itempayment" => array( "id_field" => "ListID", "relatives" => array( "estimate_estimateline" => "Item_ListID", @@ -8889,7 +8960,7 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "invoice_invoiceline" => "Item_ListID" ) ), - /* + /* "itemreceipt" => array( "id_field" => "TxnID", "relatives" => array( "itemreceipt_expenseline" => "ItemReceipt_TxnID", @@ -8900,7 +8971,7 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "dataext" => "Entity_ListID" ) ), - */ + */ "itemsalestax" => array( "id_field" => "ListID", "relatives" => array( "estimate_estimateline" => "Item_ListID", @@ -8909,14 +8980,14 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "invoice_invoiceline" => "Item_ListID" ) ), - /* + /* "itemsalestaxgroup" => array( "id_field" => "ListID", "relatives" => array( "itemsalestaxgroup_itemsalestax" => "ItemSalesTaxGroup_ListID", "dataext" => "Entity_ListID" ) ), - */ + */ "itemservice" => array( "id_field" => "ListID", "relatives" => array( "estimate_estimateline" => "Item_ListID", @@ -8925,7 +8996,7 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "invoice_invoiceline" => "Item_ListID" ) ), - + "itemsubtotal" => array( "id_field" => "ListID", "relatives" => array( "estimate_estimateline" => "Item_ListID", @@ -8934,7 +9005,7 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "invoice_invoiceline" => "Item_ListID" ) ), - /* + /* "journalentry" => array( "id_field" => "TxnID", "relatives" => array( "journalentry_journalcreditline" => "JournalEntry_TxnID", @@ -8942,96 +9013,96 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "dataext" => "Entity_ListID" ) ), - + "pricelevel" => array( "id_field" => "ListID", "relatives" => array( "pricelevel_pricelevelperitem" => "PriceLevel_ListID" ) ), - */ - "purchaseorder" => array( + */ + "purchaseorder" => array( "id_field" => 'TxnID', "relatives" => array( - //"estimate" => "PONumber", + //"estimate" => "PONumber", //"salesorder" => "PONumber" - 'bill_linkedtxn' => 'ToTxnID', + 'bill_linkedtxn' => 'ToTxnID', ), ), - /* + /* "purchaseorder_purchaseorderline" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "purchaseorder_purchaseorderlinegroup" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "purchaseorder_purchaseorderlinegroup_purchaseorderline" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "receievepayment" => array( "id_field" => "TxnID", "relatives" => array( "receivepayment_appliedtotxn" => "FromTxnID", "dataext" => "Txn_TxnID" ) ), - + "salesorder" => array( "id_field" => "TxnID", "relatives" => array( - "salesorder_salesorderline" => "SalesOrder_TxnID", - "salesorder_salesorderlinegroup" => "SalesOrder_TxnID", + "salesorder_salesorderline" => "SalesOrder_TxnID", + "salesorder_salesorderlinegroup" => "SalesOrder_TxnID", "salesorder_salesorderlinegroup_salesorderline" => "SalesOrder_TxnID", "salesorder_linkedtxn" => "FromTxnID", "dataext" => "Entity_ListID" ) ), - + "salesorder_salesorderline" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "salesorder_salesorderlinegroup" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "salesorder_salesorderlinegroup_salesorderline" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "salesreceipt" => array( "id_field" => "TxnID", "relatives" => array( - "salesreceipt_salesreceiptline" => "SalesReceipt_TxnID", - "salesreceipt_salesreceiptlinegroup" => "SalesReceipt_TxnID", + "salesreceipt_salesreceiptline" => "SalesReceipt_TxnID", + "salesreceipt_salesreceiptlinegroup" => "SalesReceipt_TxnID", "salesreceipt_salesreceiptlinegroup_salesreceiptline" => "SalesReceipt_TxnID", "dataext" => "Txn_TxnID" ) ), - + "salesreceipt_salesreceiptline" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "salereceipt_salesreceiptlinegroup" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" ) ), - + "salesreceipt_salesreceiptlinegroup_salesreceiptline" => array( "id_field" => "TxnLineID", "relatives" => array( "dataext" => "Txn_TxnID" @@ -9045,7 +9116,7 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "invoice" => "SalesRep_ListID" ) ), - + "salestaxcode" => array( "id_field" => "ListID", "relatives" => array( "iteminventory" => "SalesTaxCode_ListID", @@ -9059,10 +9130,10 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "invoice" => "CustomerSalesTaxCode_ListID" ) ), - /* + /* "unitofmeasureset" => array( "id_field" => "ListID", "relatives" => array( - "unitofmeasureset_defaultunit" => "UnitOfMeasureSet_ListID", + "unitofmeasureset_defaultunit" => "UnitOfMeasureSet_ListID", "unitofmeasureset_relatedunit" => "UnitOfMeasureSet_ListID" ) ), @@ -9072,18 +9143,18 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, "purchaseorder" => "Vendor_ListID" ) ), - /* + /* "vendorcredit" => array( "id_field" => "TxnID", "relatives" => array( - "vendorcredit_expenseline" => "VendorCredit_TxnID", - "vendorcredit_itemline" => "VendorCredit_TxnID", - "vendorcredit_itemgroupline" => "VendorCredit_TxnID", + "vendorcredit_expenseline" => "VendorCredit_TxnID", + "vendorcredit_itemline" => "VendorCredit_TxnID", + "vendorcredit_itemgroupline" => "VendorCredit_TxnID", "vendorcredit_itemgroupline_itemline" => "VendorCredit_TxnID", "vendorcredit_linkedtxn" => "FromTxnID", "dataext" => "Txn_TxnID" ) ), - + "workerscompcode" => array( "id_field" => "ListID", "relatives" => array( "workerscompcode_ratehistory" => "WorkersCompCode_ListID" @@ -9091,38 +9162,38 @@ protected static function _updateRelatives($table, $user, $action, $ID, $object, ) */ ); - + $Driver = QuickBooks_Driver_Singleton::getInstance(); - + if (!isset($update_relatives_map[$table])) { //$Driver->log('Record has no RELATIVES...?', null, QUICKBOOKS_LOG_NORMAL); return false; } - + if (!isset($extra['AddResponse_OldKey'])) { //$Driver->log('Missing key for RELATIVE update...?', null, QUICKBOOKS_LOG_NORMAL); return false; } - + $TxnID_or_ListID = $object->get($update_relatives_map[$table]['id_field']); foreach ($update_relatives_map[$table]['relatives'] as $relative_table => $relative_field) { //$Driver->log('Now updating [' . $relative_table . '] for field [' . $relative_field . '] with value [' . $TxnID_or_ListID . ']', null, QUICKBOOKS_LOG_DEBUG); - + $multipart = array( $relative_field => $extra['AddResponse_OldKey'] ); $tmp = new QuickBooks_SQL_Object($relative_table, null); - + //@todo Make the Boolean TRUE value used in the QUICKBOOKS_DRIVER_SQL_FIELD_DELETED_FLAG field a constant, // in case the sql driver used uses something other than 1 and 0. $tmp->set($relative_field, $TxnID_or_ListID); $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $relative_table, $tmp, array( $multipart ), false); } } - + /** - * + * * @todo Make the Boolean TRUE value used in the QUICKBOOKS_DRIVER_SQL_FIELD_DELETED_FLAG field a constant, in case the sql driver used uses something other than 1 and 0. * @todo Change all ListID and TxnID instances to use the QuickBooks_Utilities::actionToKey function. */ @@ -9133,7 +9204,7 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, 'id_field' => 'ListID', 'children' => array( 'account_taxlineinfo' => 'Account_ListID', - 'dataext' => 'Entity_ListID' + 'dataext' => 'Entity_ListID' ) ), 'bill' => array( @@ -9148,33 +9219,33 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, "dataext" => "Txn_TxnID" ) ), - + "billingrate" => array( "id_field" => "ListID", "children" => array( "billingrate_billingrateperitem" => "BillingRate_ListID" ) ), - + "billpaymentcheck" => array( "id_field" => "ListID", "children" => array( "billpaymentcheck_appliedtotxn" => "FromTxnID", "dataext" => "Entity_ListID" ) ), - + "billpaymentcreditcard" => array( "id_field" => "ListID", "children" => array( "billpaymentcreditcard_appliedtotxn" => "FromTxnID", "dataext" => "Entity_ListID" ) ), - + "charge" => array( "id_field" => "TxnID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "check" => array( "id_field" => "TxnID", "children" => array( "check_expenseline" => "Check_TxnID", @@ -9185,13 +9256,13 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, "dataext" => "Txn_TxnID" ) ), - + "company" => array( "id_field" => "CompanyName", "children" => array( "company_subscribedservices_service" => "Company_CompanyName" ) ), - + "creditcardcharge" => array( "id_field" => "TxnID", "children" => array( "creditcardcharge_expenseline" => "CreditCardCharge_TxnID", @@ -9201,7 +9272,7 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, "dataext" => "Txn_TxnID" ) ), - + "creditcardcredit" => array( "id_field" => "TxnID", "children" => array( "creditcardcredit_expenseline" => "CreditCardCredit_TxnID", @@ -9211,7 +9282,7 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, "dataext" => "Txn_TxnID" ) ), - + "creditmemo" => array( "id_field" => "TxnID", "children" => array( "creditmemo_creditmemoline" => "CreditMemo_TxnID", @@ -9221,161 +9292,161 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, "dataext" => "Txn_TxnID" ) ), - + "creditmemolinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "creditmemolinegroup_creditmemoline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - - 'customer' => array( + + 'customer' => array( 'id_field' => 'ListID', 'children' => array( 'dataext' => 'Entity_ListID' ) ), - + "deposit" => array( "id_field" => "TxnID", "children" => array( "deposit_depositline" => "Deposit_TxnID", "dataext" => "Txn_TxnID" ) ), - + "employee" => array( "id_field" => "ListID", "children" => array( "employee_earnings" => "Employee_ListID", "dataext" => "Entity_ListID" ) ), - + 'estimate' => array( 'id_field' => 'TxnID', 'children' => array( - 'estimate_estimateline' => 'Estimate_TxnID', - 'estimate_estimatelinegroup' => 'Estimate_TxnID', + 'estimate_estimateline' => 'Estimate_TxnID', + 'estimate_estimatelinegroup' => 'Estimate_TxnID', 'estimate_estimatelinegroup_estimateline' => 'Estimate_TxnID', //'invoice_linkedtxn" => "FromTxnID", 'dataext' => 'Entity_ListID' ) ), - + "estimate_estimatelinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "estimate_estimateline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "estimate_estimatelinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "estimate_estimatelinegroup_estimateline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "inventoryadjustment" => array( "id_field" => "TxnID", "children" => array( "inventoryadjustment_inventoryadjustmentline" => "InventoryAdjustment_TxnID", "dataext" => "Txn_TxnID" ) ), - + "invoice" => array( "id_field" => "TxnID", "children" => array( - "invoice_invoiceline" => "Invoice_TxnID", - "invoice_invoicelinegroup" => "Invoice_TxnID", + "invoice_invoiceline" => "Invoice_TxnID", + "invoice_invoicelinegroup" => "Invoice_TxnID", "invoice_invoicelinegroup_invoiceline" => "Invoice_TxnID", "invoice_linkedtxn" => "FromTxnID", "dataext" => "Txn_TxnID" ) ), - + "invoice_invoiceline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - - + + "invoice_invoicelinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "invoice_invoicelinegroup_invoiceline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "itemgroup" => array( "id_field" => "ListID", "children" => array( "itemgroup_itemgroupline" => "ItemGroup_ListID", "dataext" => "Entity_ListID" ) ), - + "iteminventory" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "iteminventoryassembly" => array( "id_field" => "ListID", "children" => array( "iteminventoryassembly_iteminventoryassemblyline" => "ItemInventoryAssembly_ListID", "dataext" => "Txn_TxnID" ) ), - + "itemnoninventory" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itemdiscount" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itemfixedasset" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itemothercharge" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itempayment" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itemreceipt" => array( "id_field" => "TxnID", "children" => array( "itemreceipt_expenseline" => "ItemReceipt_TxnID", @@ -9386,26 +9457,26 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, "dataext" => "Entity_ListID" ) ), - + "itemsalestaxgroup" => array( "id_field" => "ListID", "children" => array( "itemsalestaxgroup_itemsalestax" => "ItemSalesTaxGroup_ListID", "dataext" => "Entity_ListID" ) ), - + "itemservice" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "itemsubtotal" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "journalentry" => array( "id_field" => "TxnID", "children" => array( "journalentry_journalcreditline" => "JournalEntry_TxnID", @@ -9413,142 +9484,142 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, "dataext" => "Entity_ListID" ) ), - + "pricelevel" => array( "id_field" => "ListID", "children" => array( "pricelevel_pricelevelperitem" => "PriceLevel_ListID" ) ), - + "purchaseorder" => array( "id_field" => "TxnID", "children" => array( - "purchaseorder_purchaseorderline" => "PurchaseOrder_TxnID", - "purchaseorder_purchaseorderlinegroup" => "PurchaseOrder_TxnID", + "purchaseorder_purchaseorderline" => "PurchaseOrder_TxnID", + "purchaseorder_purchaseorderlinegroup" => "PurchaseOrder_TxnID", "purchaseorder_purchaseorderlinegroup_purchaseorderline" => "PurchaseOrder_TxnID", "purchaseorder_linkedtxn" => "FromTxnID", "dataext" => "Entity_ListID" ) ), - + "purchaseorder_purchaseorderline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "purchaseorder_purchaseorderlinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "purchaseorder_purchaseorderlinegroup_purchaseorderline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "receievepayment" => array( "id_field" => "TxnID", "children" => array( "receivepayment_appliedtotxn" => "FromTxnID", - 'receivepayment_appliedtotxn' => 'ReceivePayment_TxnID', + 'receivepayment_appliedtotxn' => 'ReceivePayment_TxnID', "dataext" => "Txn_TxnID" ) ), - + "salesorder" => array( "id_field" => "TxnID", "children" => array( - "salesorder_salesorderline" => "SalesOrder_TxnID", - "salesorder_salesorderlinegroup" => "SalesOrder_TxnID", + "salesorder_salesorderline" => "SalesOrder_TxnID", + "salesorder_salesorderlinegroup" => "SalesOrder_TxnID", "salesorder_salesorderlinegroup_salesorderline" => "SalesOrder_TxnID", "salesorder_linkedtxn" => "FromTxnID", "dataext" => "Entity_ListID" ) ), - + "salesorder_salesorderline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "salesorder_salesorderlinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "salesorder_salesorderlinegroup_salesorderline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "salesreceipt" => array( "id_field" => "TxnID", "children" => array( - "salesreceipt_salesreceiptline" => "SalesReceipt_TxnID", - "salesreceipt_salesreceiptlinegroup" => "SalesReceipt_TxnID", + "salesreceipt_salesreceiptline" => "SalesReceipt_TxnID", + "salesreceipt_salesreceiptlinegroup" => "SalesReceipt_TxnID", "salesreceipt_salesreceiptlinegroup_salesreceiptline" => "SalesReceipt_TxnID", "dataext" => "Txn_TxnID" ) ), - + "salesreceipt_salesreceiptline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "salereceipt_salesreceiptlinegroup" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "salesreceipt_salesreceiptlinegroup_salesreceiptline" => array( "id_field" => "TxnLineID", "children" => array( "dataext" => "Txn_TxnID" ) ), - + "unitofmeasureset" => array( "id_field" => "ListID", "children" => array( - "unitofmeasureset_defaultunit" => "UnitOfMeasureSet_ListID", + "unitofmeasureset_defaultunit" => "UnitOfMeasureSet_ListID", "unitofmeasureset_relatedunit" => "UnitOfMeasureSet_ListID" ) ), - + "vendor" => array( "id_field" => "ListID", "children" => array( "dataext" => "Entity_ListID" ) ), - + "vendorcredit" => array( "id_field" => "TxnID", "children" => array( - "vendorcredit_expenseline" => "VendorCredit_TxnID", - "vendorcredit_itemline" => "VendorCredit_TxnID", - "vendorcredit_itemgroupline" => "VendorCredit_TxnID", + "vendorcredit_expenseline" => "VendorCredit_TxnID", + "vendorcredit_itemline" => "VendorCredit_TxnID", + "vendorcredit_itemgroupline" => "VendorCredit_TxnID", "vendorcredit_itemgroupline_itemline" => "VendorCredit_TxnID", "vendorcredit_linkedtxn" => "FromTxnID", "dataext" => "Txn_TxnID" ) ), - + "workerscompcode" => array( "id_field" => "ListID", "children" => array( "workerscompcode_ratehistory" => "WorkersCompCode_ListID" ) ) - + ); - + // This stores a list of TxnLineID => qbsql_id mappings that were deleted $deleted = array(); - - // + + // $Driver = QuickBooks_Driver_Singleton::getInstance(); - + if (!isset($delete_children_map[$table])) { return false; @@ -9560,46 +9631,46 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, { //print('key: '); print_r($key); print("\n"); //print('value: '); print_r($value); print("\n"); - + // @todo Fix this wrong delete flag field // If we are actually deleting an entire element, then we need to check the delete mode and if desired, just flag them rather than remove the rows. if ($fullDelete and - isset($callback_config['delete']) and + isset($callback_config['delete']) and $callback_config['delete'] == QuickBooks_WebConnector_Server_SQL::DELETE_FLAG) { if ($key == 'dataext' and !$deleteDataExt) { continue; } - + $multipart = array( $value => $TxnID_or_ListID ); - + $order = array(); if (substr($key, -4, 4) == 'line') { $order = array( 'SortOrder' => 'ASC', 'TxnLineID' => 'ASC' ); - + if ($key == 'iteminventoryassembly_iteminventoryassemblyline') { unset($order['TxnLineID']); } } - + $obj = new QuickBooks_SQL_Object($table, null); - + // Get a list of stuff that's going to be deleted $list = $Driver->select(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $key, $multipart, $order ); foreach ($list as $arr) { if (isset($arr[QUICKBOOKS_TXNLINEID])) { - $deleted[$key][QUICKBOOKS_TXNLINEID][$arr[QUICKBOOKS_TXNLINEID]] = array( - $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID], + $deleted[$key][QUICKBOOKS_TXNLINEID][$arr[QUICKBOOKS_TXNLINEID]] = array( + $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID], $arr[QUICKBOOKS_DRIVER_SQL_FIELD_USERNAME_ID], $arr[QUICKBOOKS_DRIVER_SQL_FIELD_EXTERNAL_ID] ); } } - + // @todo Make the Boolean TRUE value used in the QUICKBOOKS_DRIVER_SQL_FIELD_DELETED_FLAG field a constant, // in case the sql driver used uses something other than 1 and 0. //$obj->set(QUICKBOOKS_DRIVER_SQL_FIELD_DELETED_FLAG, 1); @@ -9613,26 +9684,26 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, { continue; } - + $multipart = array( $value => $TxnID_or_ListID ); - + $order = array(); if (substr($key, -4, 4) == 'line') { $order = array( 'SortOrder' => 'ASC', 'TxnLineID' => 'ASC' ); - + if ($key == 'iteminventoryassembly_iteminventoryassemblyline') { unset($order['TxnLineID']); } } - + //print_r($multipart); - - // + + // // Get a list of stuff that's going to be deleted - // - + // + // These are things that have a permenent TxnID (they've been synced to QB before) $list = $Driver->select(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $key, $multipart, $order ); foreach ($list as $arr) @@ -9640,38 +9711,38 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, if (isset($arr[QUICKBOOKS_TXNLINEID])) { $deleted[$key][QUICKBOOKS_TXNLINEID][$arr[QUICKBOOKS_TXNLINEID]] = array( - $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID], + $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID], $arr[QUICKBOOKS_DRIVER_SQL_FIELD_USERNAME_ID], $arr[QUICKBOOKS_DRIVER_SQL_FIELD_EXTERNAL_ID] ); } } - + // These are things that were using a temporary TxnID, and now have a perm TxnID (it just got synced to QuickBooks) if (isset($extra['is_add_response'])) { $multipart_tmp = array( $value => $extra['AddResponse_OldKey'] ); $list = $Driver->select(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $key, $multipart_tmp, $order); - + foreach ($list as $arr) { if (isset($arr[QUICKBOOKS_TXNLINEID])) { $deleted[$key][QUICKBOOKS_TXNLINEID][$arr[QUICKBOOKS_TXNLINEID]] = array( - $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID], + $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID], $arr[QUICKBOOKS_DRIVER_SQL_FIELD_USERNAME_ID], $arr[QUICKBOOKS_DRIVER_SQL_FIELD_EXTERNAL_ID] ); } } } - + //print_r($list); //print("\n\n\n"); - + // This query deletes anything with an existing TxnID (i.e. this was UPDATEing QuickBooks) $Driver->delete(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $key, array( $multipart )); - - // This query deletes anything with a new TxnID (i.e. the TxnID was temporary, and - // now it's permenent because it's been ADDed to QuickBooks, so we need to delete + + // This query deletes anything with a new TxnID (i.e. the TxnID was temporary, and + // now it's permenent because it's been ADDed to QuickBooks, so we need to delete // the child records with the temporary TxnID) if (isset($extra['IsAddResponse']) or isset($extra['is_add_response'])) { @@ -9681,52 +9752,52 @@ protected static function _deleteChildren($table, $user, $action, $ID, $object, } } } - + //print_r($deleted); } - + protected static function _addResponse($type, $List, $requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $callback_config = array()) { // Call our hooks here, we just *added* something to QuickBooks - + return QuickBooks_Callbacks_SQL_Callbacks::_queryResponse($type, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $callback_config); } - + /** - * - * - * + * + * + * */ protected static function _queryResponse($type, $List, $requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $callback_config = array()) { $type = strtolower($type); - + $Driver = QuickBooks_Driver_Singleton::getInstance(); $objects = array(); - - // For each one of the objects we got back in the qbXML response... + + // For each one of the objects we got back in the qbXML response... foreach ($List->children() as $Node) { - // If this object is a base-level object, we're going to keep track of it's TxnID or - // ListID so that we can use it to tie child elements back to this base-level + // If this object is a base-level object, we're going to keep track of it's TxnID or + // ListID so that we can use it to tie child elements back to this base-level // element (about 20 or 30 lines below this is that code) - - // Child records get deleted, and then re-created with the same - // qbsql_id values so that we don't muck up people's associated - // records. This keeps track of deleted records so we can re-create - // the records with the same qbsql_id values. + + // Child records get deleted, and then re-created with the same + // qbsql_id values so that we don't muck up people's associated + // records. This keeps track of deleted records so we can re-create + // the records with the same qbsql_id values. $deleted = array(); - + // Convert the XML nodes to objects, based on the XML to SQL schema definitions in Schema.php $objects = array(); QuickBooks_Callbacks_SQL_Callbacks::_transformToSQLObjects('', $Node, $objects); - + //print_r($objects); //exit; - - // For each object we created from the XML nodes... + + // For each object we created from the XML nodes... // (might have created more than one, e.g. an Invoice, plus 10 InvoiceLines, plus a Invoice_DataExt, etc.) - + /* if (count($objects) > 1) { @@ -9734,49 +9805,49 @@ protected static function _queryResponse($type, $List, $requestID, $user, $actio exit; } */ - + // This keeps track of whether or not we're ignoring this entire batch of UPDATES/INSERTS $ignore_this_and_its_children = false; - + foreach ($objects as $key => $object) { $Object =& $object; - + if ($ignore_this_and_its_children) { // If we're supposed to ignore this object and it's children, then just continue continue; } - + $table = $Object->table(); $path = $Object->path(); $map = array(); QuickBooks_SQL_Schema::mapPrimaryKey($path, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $map); - + // Special hack for preferences if ($Object->table() == 'preferences') { $map = array( 'qb_preferences', 'qbsql_external_id' ); } - + //print_r($Object); //print_r($path); //print_r($map); //exit; - - // - if ($table and - count($map) and - $map[0] and + + // + if ($table and + count($map) and + $map[0] and $map[1]) { $addMapTest = array(); $addMapTestOthers = array(); QuickBooks_SQL_Schema::mapToSchema(trim(QuickBooks_Utilities::actionToXMLElement($action)), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $addMapTest, $addMapTestOthers); - + if ((!isset($extra['IsAddResponse']) and !isset($extra['is_add_response'])) or !(count($addMapTest) and $addMapTest[0]) or $map[0] != $addMapTest[0]) { - // GARRETT'S bug Fix -- Arrays with primary keys consisting of multiple fields weren't updating properly + // GARRETT'S bug Fix -- Arrays with primary keys consisting of multiple fields weren't updating properly // due to failure to check for arrays. $multipart = array(); if (is_array($map[1])) @@ -9795,219 +9866,219 @@ protected static function _queryResponse($type, $List, $requestID, $user, $actio { $multipart[ QUICKBOOKS_DRIVER_SQL_FIELD_ID ] = $ID; } - + $hooks = array(); if (isset($callback_config['hooks'])) { $hooks = $callback_config['hooks']; } - + if ($tmp = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $multipart )) { $actually_do_update = false; $actually_do_updaterelatives = false; $actually_do_deletechildren = false; - - - + + + if (isset($tmp[Quickbooks_Utilities::keyForAction($action)])) { // I have no idea what this does or what this is for.... // > EDIT: This keeps track of what the old TxnID or ListID is, so that we can use it to update relative tables - + $extra['AddResponse_OldKey'] = $tmp[Quickbooks_Utilities::keyForAction($action)]; $extra['temporary_TxnID_or_ListID_or_LineID'] = $tmp[Quickbooks_Utilities::keyForAction($action)]; - } - - if (empty($extra['AddResponse_OldKey']) and - Quickbooks_Utilities::keyForAction($action) == 'TxnID' and + } + + if (empty($extra['AddResponse_OldKey']) and + Quickbooks_Utilities::keyForAction($action) == 'TxnID' and isset($tmp['TxnLineID'])) { //$extra['AddResponse_OldKey'] = $tmp->get("TxnLineID"); $extra['AddResponse_OldKey'] = $tmp['TxnLineID']; $extra['temporary_TxnID_or_ListID_or_LineID'] = $tmp['TxnLineID']; } - + // Make sure a conflict mode has been selected if (empty($callback_config['conflicts'])) { $callback_config['conflicts'] = null; } - + if (empty($callback_config['mode'])) { $callback_config['mode'] = QuickBooks_WebConnector_Server_SQL::MODE_READONLY; } - + if (isset($extra['is_query_response']) or - isset($extra['is_import_response']) or - isset($extra['is_mod_response']) or + isset($extra['is_import_response']) or + isset($extra['is_mod_response']) or isset($extra['is_add_response'])) { // @TODO There should probably be some conflict handling code below to handle conflicts - + $actually_do_update = true; $actually_do_deletechildren = true; $actually_do_updaterelatives = true; } - + //$Driver->log('Diagnostics for incoming: is_query[' . !empty($extra['is_query_response']) . '], is_import[' . !empty($extra['is_import_response']) . '], is_mod[' . !empty($extra['is_mod_response']) . '], is_add[' . !empty($extra['is_add_response']) . '], conflict mode: ' . $callback_config['conflicts'] . '', null, QUICKBOOKS_LOG_DEVELOP); - + // Conflict handling code - // @todo I think this should only apply to query and improt, right? I mean, if it's a mod or add, then - // *of course* it was modified after resynced, thats how we knew to send it back to QuickBooks... + // @todo I think this should only apply to query and improt, right? I mean, if it's a mod or add, then + // *of course* it was modified after resynced, thats how we knew to send it back to QuickBooks... if ($tmp[QUICKBOOKS_DRIVER_SQL_FIELD_MODIFY] > $tmp[QUICKBOOKS_DRIVER_SQL_FIELD_RESYNC] and $callback_config['mode'] != QuickBooks_WebConnector_Server_SQL::MODE_READONLY) { // CONFLICT resolution code - + switch ($callback_config['conflicts']) { case QuickBooks_WebConnector_Server_SQL::CONFLICT_NEWER: - + $msg = 'Conflict mode: (newer) ' . $callback_config['conflicts'] . ' is not supported right now.'; trigger_error($msg); die($msg); - + case QuickBooks_WebConnector_Server_SQL::CONFLICT_QUICKBOOKS: - + // QuickBooks is master, so remove all existing child records of this record, then apply the QuickBooks version update - + $actually_do_deletechildren = true; $actually_do_update = true; - - //QuickBooks_Callbacks_SQL_Callbacks::_DeleteChildren($table, $user, $action, $ID, $object, $extra); + + //QuickBooks_Callbacks_SQL_Callbacks::_DeleteChildren($table, $user, $action, $ID, $object, $extra); //$Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $object, array( $multipart )); - + break; case QuickBooks_WebConnector_Server_SQL::CONFLICT_CALLBACK: - + $msg = 'Conflict mode: (callback) ' . $callback_config['conflicts'] . ' is not supported right now.'; trigger_error($msg); die($msg); - + break; case QuickBooks_WebConnector_Server_SQL::CONFLICT_SQL: - + // The SQL table is the master table, but we have an out-of-date EditSequence value - // In this case, what we want to do is update our record to the latest EditSequence value, - // and then re-queue the object so that it gets updated the next time the sync runs to + // In this case, what we want to do is update our record to the latest EditSequence value, + // and then re-queue the object so that it gets updated the next time the sync runs to // the values from the SQL record - + $tmp_editsequence_update = new QuickBooks_SQL_Object($table, null); $tmp_editsequence_update->set('EditSequence', $object->get('EditSequence')); - + // *Just* update the EditSequence value $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $tmp_editsequence_update, array( $multipart ), false); - + // Re-queue it so the conflict gets resolved $Driver->queueEnqueue($user, QuickBooks_Utilities::convertActionToMod($action), $tmp[QUICKBOOKS_DRIVER_SQL_FIELD_ID], true, QUICKBOOKS_SERVER_SQL_CONFLICT_QUEUE_PRIORITY, $extra); - + break; case QuickBooks_WebConnector_Server_SQL::CONFLICT_LOG: default: - + if (isset($extra['IsModResponse']) or isset($extra['is_mod_response']) or isset($extra['is_add_response'])) { // If it's actually a mod response, then this isn't actually a conflict, it's just the mod response happening normally - + $actually_do_update = true; $actually_do_deletechildren = true; $actually_do_updaterelatives = true; } else { - - // Log it...? + + // Log it...? $Driver->log('Conflict occured at: ' . $table, null, QUICKBOOKS_LOG_NORMAL); } - + break; } } - + //print_r($object); //print_r($tmp); - - // If the EditSequence has not changed since the last time this record was updated, - // then we can just skip this update because everything should already be up to - // date. - // - // This works around a very important issue as a result of Mod requests. When a Mod + + // If the EditSequence has not changed since the last time this record was updated, + // then we can just skip this update because everything should already be up to + // date. + // + // This works around a very important issue as a result of Mod requests. When a Mod // request is issued and succeeds, it updates the record. Then, on the next Query - // request, the record will be re-imported because the DateModified timestamp was - // updated as a result of the Mod request. However, if the record is modified - // by the end-user in between that Mod request and Import, the changes the user - // made will be overwritten/a conflict will occur *even though the Query response - // was only due to a Mod request that we sent ourselves* and the record in + // request, the record will be re-imported because the DateModified timestamp was + // updated as a result of the Mod request. However, if the record is modified + // by the end-user in between that Mod request and Import, the changes the user + // made will be overwritten/a conflict will occur *even though the Query response + // was only due to a Mod request that we sent ourselves* and the record in // QuickBooks never actually changed between the Mod and the Query. if (empty($extra['is_query_response']) and // However, if is_query_response is set this was a forced-update (like when a balance updates, the EditSequence doesn't change but the record *does* need to be updated) isset($tmp['EditSequence']) and // Check if EditSequence is set, qb_company doesn't have this field - $tmp['EditSequence'] == $object->get('EditSequence')) + $tmp['EditSequence'] == $object->get('EditSequence')) { $actually_do_update = false; $actually_do_deletechildren = false; $actually_do_updaterelatives = false; - + //$Driver->log('Ignoring UPDATE: ' . $table . ': ' . print_r($object, true) . ' due to EditSequence equality.', null, QUICKBOOKS_LOG_DEVELOP); - + // Make sure we ignore the children too (invoice lines, data exts, etc.) $ignore_this_and_its_children = true; } - + if ($callback_config['mode'] == QuickBooks_WebConnector_Server_SQL::MODE_WRITEONLY) { // In WRITE-ONLY mode, we only write changes to QuickBooks, but never read them back - + // (but should we update the EditSequence still?) - + $actually_do_update = false; $actually_do_deletechildren = false; $actually_do_updaterelatives = false; } - + //$deleted = array(); if ($actually_do_deletechildren) { QuickBooks_Callbacks_SQL_Callbacks::_deleteChildren($table, $user, $action, $ID, $object, $extra, $deleted); //$Driver->log('Immediately after deleting: ' . print_r($deleted, true)); } - + if ($actually_do_updaterelatives) { QuickBooks_Callbacks_SQL_Callbacks::_updateRelatives($table, $user, $action, $ID, $object, $extra); } - + if ($actually_do_update) { // This handles setting certain special fields (SortOrder, booleans, etc.) QuickBooks_Callbacks_SQL_Callbacks::_massageUpdateRecord($table, $object); - + //print('applying updates, and with these deletes: '); //print_r($deleted); - + $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_MODIFY, date('Y-m-d H:i:s')); - + //$Driver->log('Applying UPDATE: ' . $table . ': ' . print_r($object, true) . ', where: ' . print_r($multipart, true), null, QUICKBOOKS_LOG_DEVELOP); $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $object, array( $multipart )); - + $qbsql_id = null; if (!empty($multipart[QUICKBOOKS_DRIVER_SQL_FIELD_ID])) // I'm not sure why this would ever be empty...? { $qbsql_id = $multipart[QUICKBOOKS_DRIVER_SQL_FIELD_ID]; } - - // Call any hooks that occur when a record is updated + + // Call any hooks that occur when a record is updated $hook_data = array( 'hook' => QuickBooks_SQL::HOOK_SQL_UPDATE, 'user' => $user, 'table' => QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, 'object' => $object, - 'data' => $object->asArray(), - 'qbsql_id' => $qbsql_id, + 'data' => $object->asArray(), + 'qbsql_id' => $qbsql_id, 'where' => array( $multipart ), ); - + $err = null; QuickBooks_Callbacks_SQL_Callbacks::_callHooks($hooks, QuickBooks_SQL::HOOK_SQL_UPDATE, $requestID, $user, $err, $hook_data, $callback_config); } @@ -10015,7 +10086,7 @@ protected static function _queryResponse($type, $List, $requestID, $user, $actio { //$Driver->log('Skipping UPDATE: ' . $table . ': ' . print_r($object, true) . ', where: ' . print_r($multipart, true), null, QUICKBOOKS_LOG_DEVELOP); } - + if ($actually_do_update and isset($extra['is_add_response'])) { // It's an add response, call the hooks @@ -10024,18 +10095,18 @@ protected static function _queryResponse($type, $List, $requestID, $user, $actio { $qbsql_id = $multipart[QUICKBOOKS_DRIVER_SQL_FIELD_ID]; } - - // Call any hooks that occur when a record is updated + + // Call any hooks that occur when a record is updated $hook_data = array( 'hook' => QuickBooks_SQL::HOOK_QUICKBOOKS_INSERT, 'user' => $user, 'table' => QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, 'object' => $object, - 'data' => $object->asArray(), - 'qbsql_id' => $qbsql_id, + 'data' => $object->asArray(), + 'qbsql_id' => $qbsql_id, 'where' => array( $multipart ), ); - + $err = null; QuickBooks_Callbacks_SQL_Callbacks::_callHooks($hooks, QuickBooks_SQL::HOOK_QUICKBOOKS_INSERT, $requestID, $user, $err, $hook_data, $callback_config); } @@ -10047,18 +10118,18 @@ protected static function _queryResponse($type, $List, $requestID, $user, $actio { $qbsql_id = $multipart[QUICKBOOKS_DRIVER_SQL_FIELD_ID]; } - - // Call any hooks that occur when a record is updated + + // Call any hooks that occur when a record is updated $hook_data = array( 'hook' => QuickBooks_SQL::HOOK_QUICKBOOKS_UPDATE, 'user' => $user, 'table' => QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, 'object' => $object, - 'data' => $object->asArray(), - 'qbsql_id' => $qbsql_id, + 'data' => $object->asArray(), + 'qbsql_id' => $qbsql_id, 'where' => array( $multipart ), ); - + $err = null; QuickBooks_Callbacks_SQL_Callbacks::_callHooks($hooks, QuickBooks_SQL::HOOK_QUICKBOOKS_UPDATE, $requestID, $user, $err, $hook_data, $callback_config); } @@ -10066,70 +10137,70 @@ protected static function _queryResponse($type, $List, $requestID, $user, $actio else { // The record *DOES NOT* exist in the current table, so just INSERT it - + if ($callback_config['mode'] != QuickBooks_WebConnector_Server_SQL::MODE_WRITEONLY) { // This handles setting certain special fields (booleans, SortOrder, etc.) QuickBooks_Callbacks_SQL_Callbacks::_massageInsertRecord($table, $object); - + //$Driver->log('DELETED: ' . print_r($deleted, true) . ', table: [' . $table . ']'); - - // This makes sure that re-inserted child records are re-inserted with the + + // This makes sure that re-inserted child records are re-inserted with the // same qbsql_id values if (isset($deleted[$table][QUICKBOOKS_TXNLINEID][$object->get(QUICKBOOKS_TXNLINEID)][0])) { $tmp = $deleted[$table][QUICKBOOKS_TXNLINEID][$object->get(QUICKBOOKS_TXNLINEID)]; unset($deleted[$table][QUICKBOOKS_TXNLINEID][$object->get(QUICKBOOKS_TXNLINEID)]); // Can't use this anymore after it's been used for an INSERT - + $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_ID, $tmp[0]); $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_USERNAME_ID, $tmp[1]); $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_EXTERNAL_ID, $tmp[2]); } - else if (isset($deleted[$table][QUICKBOOKS_TXNLINEID]) and + else if (isset($deleted[$table][QUICKBOOKS_TXNLINEID]) and count($deleted[$table][QUICKBOOKS_TXNLINEID]) > 0) { - // We deleted some child from this table, and what we deleted *should* - // have been sent to QuickBooks and received from QuickBooks in the - // same order... so we should be able to just fetch the next deleted + // We deleted some child from this table, and what we deleted *should* + // have been sent to QuickBooks and received from QuickBooks in the + // same order... so we should be able to just fetch the next deleted // thing, and re-use that qbsql_id value - + reset($deleted[$table][QUICKBOOKS_TXNLINEID]); $tmp = array_shift($deleted[$table][QUICKBOOKS_TXNLINEID]); // Remove it from the list so it can't be used anymore - + $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_ID, $tmp[0]); $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_USERNAME_ID, $tmp[1]); - $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_EXTERNAL_ID, $tmp[2]); + $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_EXTERNAL_ID, $tmp[2]); } - + if ('' == $object->get(QUICKBOOKS_DRIVER_SQL_FIELD_USERNAME_ID)) { $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_USERNAME_ID, null); } - + if ('' == $object->get(QUICKBOOKS_DRIVER_SQL_FIELD_EXTERNAL_ID)) { $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_EXTERNAL_ID, null); } - + //print_r($object); - + //$Driver->log('Applying INSERT: ' . $table . ': ' . print_r($object, true), null, QUICKBOOKS_LOG_DEVELOP); - + $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_MODIFY, date('Y-m-d H:i:s')); - + $Driver->insert(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $object); $last = $Driver->last(); - + // Call any hooks that occur when a record is inserted $hook_data = array( 'hook' => QuickBooks_SQL::HOOK_SQL_INSERT, - 'user' => $user, + 'user' => $user, 'table' => QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, 'object' => $object, - 'data' => $object->asArray(), - 'qbsql_id' => $last, + 'data' => $object->asArray(), + 'qbsql_id' => $last, ); - + $err = null; QuickBooks_Callbacks_SQL_Callbacks::_callHooks($hooks, QuickBooks_SQL::HOOK_SQL_INSERT, $requestID, $user, $err, $hook_data, $callback_config); } @@ -10138,7 +10209,7 @@ protected static function _queryResponse($type, $List, $requestID, $user, $actio //$Driver->log('Skipping INSERT: ' . $table . ': ' . print_r($object, true), null, QUICKBOOKS_LOG_DEVELOP); } } - + // Triggered actions // Receive Payment => reload any linked invoices // Invoice => reload the customer @@ -10147,156 +10218,156 @@ protected static function _queryResponse($type, $List, $requestID, $user, $actio } } } - + // Find out if we need to iterate further to get more results $matches = array(); //$iterator_count = ereg('iteratorRemainingCount="([0-9]*)" iteratorID="([^"]*)"', $xml, $matches); $matched_iteratorID = QuickBooks_XML::extractTagAttribute('iteratorID', $xml); $matched_iteratorRemainingCount = QuickBooks_XML::extractTagAttribute('iteratorRemainingCount', $xml); - - // If an iterator was used and there's results remaining - if ($matched_iteratorID and + + // If an iterator was used and there's results remaining + if ($matched_iteratorID and $matched_iteratorRemainingCount > 0) { $extra = array( 'iteratorID' => $matched_iteratorID ); // Set the iteratorID to be used - + /* - // What is this code trying to do...? This doesn't look right... + // What is this code trying to do...? This doesn't look right... if ( (int) $matches[1] < QUICKBOOKS_SERVER_SQL_ITERATOR_MAXRETURNED) { $extra['maxReturned'] = (int) $matches[1]; } */ - + // queueEnqueue($user, $action, $ident, $replace = true, $priority = 0, $extra = null, $qbxml = null) $Driver->queueEnqueue($user, $action, null, true, QUICKBOOKS_SERVER_SQL_ITERATOR_PRIORITY, $extra); // Queue up another go! } else { - // We're done with this iterator! - + // We're done with this iterator! + // When the current iterator started... $module = __CLASS__; $type = null; $opts = null; - + // configRead($user, $module, $key, &$type, &$opts) - $curr_sync_datetime = $Driver->configRead($user, $module, QuickBooks_Callbacks_SQL_Callbacks::_keySyncCurr($action), $type, $opts); // last sync started... - + $curr_sync_datetime = $Driver->configRead($user, $module, QuickBooks_Callbacks_SQL_Callbacks::_keySyncCurr($action), $type, $opts); // last sync started... + //print('WRITING: [' . $curr_sync_datetime . '] from /' . $module . '/ {' . QuickBooks_Callbacks_SQL_Callbacks::_keySyncCurr($action) . '}'); - + // Start of the iteration, update the previous timestamp to NOW $Driver->configWrite($user, $module, QuickBooks_Callbacks_SQL_Callbacks::_keySyncPrev($action), $curr_sync_datetime, null); } } - + /** - * - * - */ + * + * + */ protected static function _triggerActions($user, $table, $Object, $action = null) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - - // Be *CAREFUL* here, you don't want to trigger an infinite loop of + + // Be *CAREFUL* here, you don't want to trigger an infinite loop of // high-priority Query requests! i.e.: // ReceivePayment_AppliedToTxn requests an InvoiceQuery // Invoice_LinkedTxn requests a ReceivePaymentQuery // ReceivePayment_AppliedToTxn requests an InvoiceQuery // ... wash rinse repeat - + $priority = 9999; if ($action) { $priority = QuickBooks_Utilities::priorityForAction($action) - 1; } - + // Account. Balance, TotalBalance // Bill. IsPaid, OpenAmount, AmountDue // Charge. BalanceRemaining // CreditMemo. IsPending, CreditRemaining - // Customer. Balance, TotalBalance, + // Customer. Balance, TotalBalance, // Invoice. IsPending, AppliedAmount, BalanceRemaining, IsPaid - + //$Driver->log('Running triggered actions for: [' . $table . ']', null, QUICKBOOKS_LOG_DEBUG); - + switch (strtolower($table)) { case 'receivepayment_appliedtotxn': - + // Fetch the linked invoice $where = array( 'TxnID' => $Object->get('ToTxnID'), ); - + // @todo WARNING WARNING WARNING THIS DOES NOT WORK, I DONT KNOW WHY! - + /* - if ($Object->get('TxnType') == 'Invoice' and + if ($Object->get('TxnType') == 'Invoice' and $arr = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . 'invoice', $where)) { $Driver->log('Running triggered actions: derive invoice, derive customer', null, QUICKBOOKS_LOG_DEBUG); - + // Fetch the derived fields from the invoice, because the invoice needs it's balance updated - $Driver->queueEnqueue($user, QUICKBOOKS_DERIVE_INVOICE, null, true, $priority, + $Driver->queueEnqueue($user, QUICKBOOKS_DERIVE_INVOICE, null, true, $priority, array( 'TxnID' => $arr['TxnID'] ) ); - + // Fetch the derived fields from the customer, balance updated - $Driver->queueEnqueue($user, QUICKBOOKS_DERIVE_CUSTOMER, null, true, $priority, + $Driver->queueEnqueue($user, QUICKBOOKS_DERIVE_CUSTOMER, null, true, $priority, array( 'ListID' => $arr['Customer_ListID'] ) ); } */ - + break; case 'receivepayment': case 'invoice': - + // A customer has an updated invoice or payment, so the Customer Balance changed - + /* $Driver->log('Running triggered actions: derive customer', null, QUICKBOOKS_LOG_DEBUG); - - $Driver->queueEnqueue($user, QUICKBOOKS_DERIVE_CUSTOMER, null, true, $priority, + + $Driver->queueEnqueue($user, QUICKBOOKS_DERIVE_CUSTOMER, null, true, $priority, array( 'ListID' => $Object->get('Customer_ListID') ) ); */ - + break; case 'bill': case 'billpaymentcheck': case 'billpaymentcreditcard': - + // We paid a bill, so the Vendor Balance has changed - - - + + + break; } } - - - + + + /** - * + * */ protected static function _massageUpdateRecord($table, &$object) { $retr = QuickBooks_Callbacks_SQL_Callbacks::_massageInsertRecord($table, $object); - + $parts = array( - '_Addr1', - '_Addr2', - '_Addr3', - '_Addr4', - '_Addr5', - '_City', - '_State', - '_PostalCode', - '_Country', - '_Note', + '_Addr1', + '_Addr2', + '_Addr3', + '_Addr4', + '_Addr5', + '_City', + '_State', + '_PostalCode', + '_Country', + '_Note', ); - + $isset = array(); - + foreach (array( 'ShipAddress', 'BillAddress', 'VendorAddress' ) as $addrtype) { foreach ($parts as $part) @@ -10308,10 +10379,10 @@ protected static function _massageUpdateRecord($table, &$object) } } } - + //$Driver = QuickBooks_Driver_Singleton::getInstance(); //$Driver->log('issets: ' . print_r($isset, true)); - + foreach ($isset as $addrtype => $true) { foreach ($parts as $part) @@ -10322,29 +10393,29 @@ protected static function _massageUpdateRecord($table, &$object) } } } - + //$Driver->log('object: ' . print_r($object, true)); - + return $retr; } - + protected static function _massageBoolean($value) { - + } - + /** - * + * */ protected static function _massageInsertRecord($table, &$object) { $Driver = QuickBooks_Driver_Singleton::getInstance(); $table = strtolower($table); - + // This is a list of "Boolean" fields in QuickBooks - // QuickBooks sends us boolean value as the strings "true" and - // "false", so we need to convert them to 1 and 0 so that we - // can store this in an INT field in the database (not all + // QuickBooks sends us boolean value as the strings "true" and + // "false", so we need to convert them to 1 and 0 so that we + // can store this in an INT field in the database (not all // databases support a BOOLEAN type) $qb_to_sql_booleans = array( 'EmployeePayrollInfo_IsUsingTimeDataToCreatePaychecks', @@ -10368,41 +10439,41 @@ protected static function _massageInsertRecord($table, &$object) 'IsSampleCompany', 'IsTaxable', 'IsVendorEligibleFor1099', - 'AccountingPrefs_IsUsingAccountNumbers', - 'AccountingPrefs_IsRequiringAccounts', - 'AccountingPrefs_IsUsingClassTracking', - 'AccountingPrefs_IsUsingAuditTrail', - 'AccountingPrefs_IsAssigningJournalEntryNumbers', - 'FinanceChargePrefs_IsAssessingForOverdueCharges', - 'FinanceChargePrefs_IsMarkedToBePrinted', - 'JobsAndEstimatesPrefs_IsUsingEstimates', - 'JobsAndEstimatesPrefs_IsUsingProgressInvoicing', - 'JobsAndEstimatesPrefs_IsPrintingItemsWithZeroAmounts', - 'MultiCurrencyPrefs_IsMultiCurrencyOn', - 'MultiLocationInventoryPrefs_IsMultiLocationInventoryAvailable', - 'MultiLocationInventoryPrefs_IsMultiLocationInventoryEnabled', - 'PurchasesAndVendorsPrefs_IsUsingInventory', - 'PurchasesAndVendorsPrefs_IsAutomaticallyUsingDiscounts', - 'SalesAndCustomersPrefs_IsTrackingReimbursedExpensesAsIncome', - 'SalesAndCustomersPrefs_IsAutoApplyingPayments', - 'SalesAndCustomersPrefs_PriceLevels_IsUsingPriceLevels', - 'SalesAndCustomersPrefs_PriceLevels_IsRoundingSalesPriceUp', + 'AccountingPrefs_IsUsingAccountNumbers', + 'AccountingPrefs_IsRequiringAccounts', + 'AccountingPrefs_IsUsingClassTracking', + 'AccountingPrefs_IsUsingAuditTrail', + 'AccountingPrefs_IsAssigningJournalEntryNumbers', + 'FinanceChargePrefs_IsAssessingForOverdueCharges', + 'FinanceChargePrefs_IsMarkedToBePrinted', + 'JobsAndEstimatesPrefs_IsUsingEstimates', + 'JobsAndEstimatesPrefs_IsUsingProgressInvoicing', + 'JobsAndEstimatesPrefs_IsPrintingItemsWithZeroAmounts', + 'MultiCurrencyPrefs_IsMultiCurrencyOn', + 'MultiLocationInventoryPrefs_IsMultiLocationInventoryAvailable', + 'MultiLocationInventoryPrefs_IsMultiLocationInventoryEnabled', + 'PurchasesAndVendorsPrefs_IsUsingInventory', + 'PurchasesAndVendorsPrefs_IsAutomaticallyUsingDiscounts', + 'SalesAndCustomersPrefs_IsTrackingReimbursedExpensesAsIncome', + 'SalesAndCustomersPrefs_IsAutoApplyingPayments', + 'SalesAndCustomersPrefs_PriceLevels_IsUsingPriceLevels', + 'SalesAndCustomersPrefs_PriceLevels_IsRoundingSalesPriceUp', 'SalesTaxPrefs_IsUsingVendorTaxCode', 'SalesTaxPrefs_IsUsingCustomerTaxCode', 'SalesTaxPrefs_IsUsingAmountsIncludeTax', - 'CurrentAppAccessRights_IsAutomaticLoginAllowed', - 'CurrentAppAccessRights_IsPersonalDataAccessAllowed', - 'IsAutomaticLogin', - - - + 'CurrentAppAccessRights_IsAutomaticLoginAllowed', + 'CurrentAppAccessRights_IsPersonalDataAccessAllowed', + 'IsAutomaticLogin', + + + ); - - // Cast QuickBooks booleans (strings, "true" and "false") to database booleans (tinyint 1 and 0) + + // Cast QuickBooks booleans (strings, "true" and "false") to database booleans (tinyint 1 and 0) foreach ($qb_to_sql_booleans as $qb_field_boolean) { $qb_bool = $object->get($qb_field_boolean, false); - + if ($qb_bool !== false) { if ($qb_bool == 'true') @@ -10414,19 +10485,19 @@ protected static function _massageInsertRecord($table, &$object) $object->set($qb_field_boolean, 0); } } - } - - // Some types of objects need some special custom field handling - + } + + // Some types of objects need some special custom field handling + $map = array( - 'invoice_invoiceline' => 'Invoice_TxnID', - 'purchaseorder_purchaseorderline' => 'PurchaseOrder_TxnID', - 'salesreceipt_salesreceiptline' => 'SalesReceipt_TxnID', - 'estimate_estimateline' => 'Estimate_TxnID', - 'bill_itemline' => 'Bill_TxnID', - 'bill_expenseline' => 'Bill_TxnID', + 'invoice_invoiceline' => 'Invoice_TxnID', + 'purchaseorder_purchaseorderline' => 'PurchaseOrder_TxnID', + 'salesreceipt_salesreceiptline' => 'SalesReceipt_TxnID', + 'estimate_estimateline' => 'Estimate_TxnID', + 'bill_itemline' => 'Bill_TxnID', + 'bill_expenseline' => 'Bill_TxnID', ); - + switch ($table) { case 'invoice_invoiceline': @@ -10435,171 +10506,171 @@ protected static function _massageInsertRecord($table, &$object) case 'estimate_estimateline': case 'bill_itemline': case 'bill_expenseline': - + // Set the SortOrder for the line items if (isset($map[$table])) { $TxnID = $object->get($map[$table]); - + if ($TxnID) - { + { $errnum = 0; $errmsg = ''; $res = $Driver->query(" - SELECT + SELECT MAX(SortOrder) AS max_sort_order - FROM - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table . " - WHERE + FROM + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table . " + WHERE " . $map[$table] . " = '" . $TxnID . "' ", $errnum, $errmsg); $arr = $Driver->fetch($res); - + $object->set('SortOrder', (int) $arr['max_sort_order'] + 1); } } - + break; } - + return true; - } - - /** - * - * + } + + /** + * + * * @TODO Clean this up! - */ + */ protected static function _transformToSQLObjects($curpath, $Node, &$objects, $current = null, $extra = array()) { if ($Node->childCount()) { //print('LOOKING AT [' . strtolower(trim(trim($curpath) . ', ' . $Node->name())) . ']' . "\n"); - + // switch (strtolower(trim(trim($curpath) . ' ' . $Node->name()))) { case 'accountret': - + if (!isset($extra['ListID'])) { $extra['ListID'] = $Node->getChildDataAt('AccountRet ListID'); } - + if (empty($extra['FullName'])) { $extra['FullName'] = $Node->getChildDataAt('AccountRet FullName'); } - + $extra['EntityListID'] = $extra['ListID']; $extra['EntityType'] = 'Account'; - + break; case 'billingrateret': - + if (!isset($extra['ListID'])) { $extra['ListID'] = $Node->getChildDataAt('BillingRateRet ListID'); } - + break; case 'billpaymentcheckret': - + if (!isset($extra['TxnID'])) { $extra['TxnID'] = $Node->getChildDataAt('BillPaymentCheckRet TxnID'); } - + $extra['Txn_TxnID'] = $extra['TxnID']; $extra['TxnType'] = 'BillPaymentCheck'; //$extra['ExchangeRate'] = $Node->getChildDataAt('BillPaymentCheckRet ExchangeRate'); //$extra['AmountInHomeCurrency'] = $Node->getChildDataAt('BillPaymentCheckRet AmountInHomeCurrency'); - + break; case 'billpaymentcreditcardret': - + if (!isset($extra['TxnID'])) { $extra['TxnID'] = $Node->getChildDataAt('BillPaymentCreditCardRet TxnID'); } - + break; case 'billret': - + if (!isset($extra['TxnID'])) { $extra['TxnID'] = $Node->getChildDataAt('BillRet TxnID'); } - + $extra['Txn_TxnID'] = $extra['TxnID']; $extra['TxnType'] = 'Bill'; - + break; case 'billret itemgrouplineret': - + if (!isset($extra['ListID'])) { $extra['TxnLineID'] = $Node->getChildDataAt('ItemGroupLineRet TxnLineID'); } - + break; case 'chargeret': - + if (!isset($extra['TxnID'])) { $extra['TxnID'] = $Node->getChildDataAt('ChargeRet TxnID'); } - + $extra['Txn_TxnID'] = $extra['TxnID']; $extra['TxnType'] = 'Charge'; - + break; case 'checkret': - + if (!isset($extra['TxnID'])) { $extra['TxnID'] = $Node->getChildDataAt('CheckRet TxnID'); } - + $extra['Txn_TxnID'] = $extra['TxnID']; $extra['TxnType'] = 'Check'; - + break; case 'checkret itemgrouplineret': - + if (!isset($extra['TxnLineID'])) { $extra['TxnLineID'] = $Node->getChildDataAt('ItemGroupLineRet TxnLineID'); } - + break; case 'companyret': if (!isset($extra['CompanyName'])) { $extra['CompanyName'] = $Node->getChildDataAt('CompanyRet CompanyName'); } - + $extra['EntityListID'] = $extra['CompanyName']; $extra['EntityType'] = 'Company'; - + break; case 'creditcardchargeret': - + if (!isset($extra['TxnID'])) { $extra['TxnID'] = $Node->getChildDataAt('CreditCardChargeRet TxnID'); } - + $extra['Txn_TxnID'] = $extra['TxnID']; $extra['TxnType'] = 'CreditCardCharge'; - + break; case 'creditcardchargeret itemgrouplineret': - + if (!isset($extra['TxnLineID'])) { $extra['TxnLineID'] = $Node->getChildDataAt('ItemGroupLineRet TxnLineID'); } - + break; case 'creditcardcreditret': if (!isset($extra['TxnID'])) @@ -10859,15 +10930,15 @@ protected static function _transformToSQLObjects($curpath, $Node, &$objects, $cu $extra['TxnType'] = 'PurchaseOrderLineGroup_PurchaseOrderLine'; break; case 'receivepaymentret': - + if (!isset($extra['TxnID'])) { $extra['TxnID'] = $Node->getChildDataAt('ReceivePaymentRet TxnID'); } - - $extra['Txn_TxnID'] = $extra['TxnID']; + + $extra['Txn_TxnID'] = $extra['TxnID']; $extra['TxnType'] = 'ReceivePayment'; - + break; case 'salesorderret': if (!isset($extra['TxnID'])) @@ -10945,7 +11016,7 @@ protected static function _transformToSQLObjects($curpath, $Node, &$objects, $cu } break; } - + foreach ($Node->children() as $Child) { $merge = false; @@ -10995,41 +11066,41 @@ protected static function _transformToSQLObjects($curpath, $Node, &$objects, $cu // because it converts our associative array to turn into a // numeric array. This causes objects to get cut into multiple // pieces: - // - // array( - // 'account' => array( 'Name' => 'test', 'ListID' => 1234' ), + // + // array( + // 'account' => array( 'Name' => 'test', 'ListID' => 1234' ), // 0 => array( account_taxlineinforet data here ), - // 1 => array( 'CashFlowClassification' => 'abc' ), // this is the other half of the Account data from the 'account' associative array key + // 1 => array( 'CashFlowClassification' => 'abc' ), // this is the other half of the Account data from the 'account' associative array key // ) - // - // Do not make a change to this code without double checking syncs - // and talking this over with Keith first please! Thanks! - // - // Previously we were using this line, but it was causing problems: + // + // Do not make a change to this code without double checking syncs + // and talking this over with Keith first please! Thanks! + // + // Previously we were using this line, but it was causing problems: //$others = array_values($objects); - + // This line of code seems to work OK $others = $objects; - - - + + + $objects = array(); - + $merge = true; break; } - + QuickBooks_Callbacks_SQL_Callbacks::_transformToSQLObjects($curpath . ' ' . $Node->name(), $Child, $objects, null, $extra); - - // * * * WARNING * * * + + // * * * WARNING * * * // Please see notes above about object chunking problems which might be related to the code below if ($merge) { $objects = array_values($objects); $objects = array_merge($others, $objects); } - // - + // + //echo '
   '; //print_r($objects); //echo '

'; @@ -11040,20 +11111,20 @@ protected static function _transformToSQLObjects($curpath, $Node, &$objects, $cu $map = array(); $others = array(); QuickBooks_SQL_Schema::mapToSchema(trim($curpath . ' ' . $Node->name()), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $map, $others); - + //Okay so if the first element is a child element that is custom mapped, it'll end up creating the object with an incorrect path. //print('map for: {' . $curpath . ' ' . $Node->name() . "} [" . $map[0] . "]\n"); //print_r($map); - + if ($map[0] and !isset($objects[$map[0]])) { //print('creating new object: ' . $map[0] . "\n"); //print_r($objects); - + $tempMap = array(); $tempOthers = array(); QuickBooks_SQL_Schema::mapToSchema(trim($curpath), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $tempMap, $tempOthers); - + if ($map[0] == 'dataextdef_assigntoobject') { $objects[$map[0]] = new QuickBooks_SQL_Object($map[0], trim($curpath . ' ' . $Node->name())); @@ -11061,12 +11132,12 @@ protected static function _transformToSQLObjects($curpath, $Node, &$objects, $cu else { $objects[$map[0]] = new QuickBooks_SQL_Object($map[0], trim($curpath)); - } - - // Some tables, such 'Invoice_InvoiceLine', won't have data in the SQL schema that - // directly links them back to the 'Invoice' record they're part of. Thus, we need - // to add a few schema fields, and then here we set those fields to values from the - // parent of these objects so that they get tied to the correct 'Invoice' in the + } + + // Some tables, such 'Invoice_InvoiceLine', won't have data in the SQL schema that + // directly links them back to the 'Invoice' record they're part of. Thus, we need + // to add a few schema fields, and then here we set those fields to values from the + // parent of these objects so that they get tied to the correct 'Invoice' in the // database table 'Invoice_InvoiceLine' $table = $objects[$map[0]]->table(); switch (strtolower($table)) @@ -11164,7 +11235,7 @@ protected static function _transformToSQLObjects($curpath, $Node, &$objects, $cu $objects[$map[0]]->set('CreditMemo_CreditMemoLineGroup_TxnLineID', $extra['TxnLineID']); break; case 'dataext': - + if (!empty($extra['EntityType'])) { $objects[$map[0]]->set('EntityType', $extra['EntityType']); @@ -11175,20 +11246,20 @@ protected static function _transformToSQLObjects($curpath, $Node, &$objects, $cu $objects[$map[0]]->set('TxnType', $extra['TxnType']); $objects[$map[0]]->set('Txn_TxnID', $extra['Txn_TxnID']); } - + break; case 'dataextdef_assigntoobject': - + if (!empty($extra['DataExtName'])) { $objects[$map[0]]->set('DataExtDef_DataExtName', $extra['DataExtName']); } - + if (!empty($extra['OwnerID']) or (isset($extra['OwnerID']) and $extra['OwnerID'] == 0)) { $objects[$map[0]]->set('DataExtDef_OwnerID', $extra['OwnerID']); } - + break; case 'deposit_depositline': $objects[$map[0]]->set('Deposit_TxnID', $extra['TxnID']); @@ -11333,13 +11404,13 @@ protected static function _transformToSQLObjects($curpath, $Node, &$objects, $cu break; } } - + if (isset($objects[$map[0]])) { $tempMap = array(); $tempOthers = array(); QuickBooks_SQL_Schema::mapToSchema(trim($curpath), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $tempMap, $tempOthers); - + if ($map[0] == 'dataextdef_assigntoobject') { if ($objects[$map[0]]->path() != trim($curpath . ' ' . $Node->name()) and @@ -11355,15 +11426,15 @@ protected static function _transformToSQLObjects($curpath, $Node, &$objects, $cu { $objects[$map[0]]->change(trim($curpath)); } - } - + } + $objects[$map[0]]->set($map[1], $Node->data()); } } } - + /** - * + * * * @param string $action * @return string @@ -11372,15 +11443,15 @@ protected static function _keySyncCurr($action) { return $action . '-curr'; } - + /** * Return the configuration key used for the previous sync operation (quickbooks_config.key field value) - * - * We store a previous and a current datetime stamp for use with iterators. - * We need to know the previous time the action was run so that we know - * when we need to look for modifications from. We need to know the current + * + * We store a previous and a current datetime stamp for use with iterators. + * We need to know the previous time the action was run so that we know + * when we need to look for modifications from. We need to know the current * time the action started to run on each subsequent call for the iterator. - * + * * @param string $action * @return string */ @@ -11388,10 +11459,10 @@ protected static function _keySyncPrev($action) { return $action . '-prev'; } - + /** * Used to build the xml that limits the results to only updated results - * + * * @param string $user Same deal: pass along the $user parameter * @param string $action Ditto with $action parameter * @param array $extra Simply pass in the $extra value that is passed to the function you're calling this from. @@ -11403,41 +11474,41 @@ protected static function _buildFilter($user, $action, $extra, $filter_wrap = fa $Driver = QuickBooks_Driver_Singleton::getInstance(); $xml = ''; $type = ''; - + $key_prev = QuickBooks_Callbacks_SQL_Callbacks::_keySyncPrev($action); $key_curr = QuickBooks_Callbacks_SQL_Callbacks::_keySyncCurr($action); - + $module = __CLASS__; - + //$action = null; $type = null; $opts = null; // configRead($user, $module, $key, &$type, &$opts) - $prev_sync_datetime = $Driver->configRead($user, $module, $key_prev, $type, $opts); // last sync started... - + $prev_sync_datetime = $Driver->configRead($user, $module, $key_prev, $type, $opts); // last sync started... + if (!$prev_sync_datetime) { // If this query has *never* run before, let's get *all* of the records $timestamp = time() - (60 * 60 * 24 * 365 * 25); $prev_sync_datetime = date('Y-m-d', $timestamp) . 'T' . date('H:i:s', $timestamp); $extra = array(); // If an iterator exists, get rid of it (this should *never* happen... how could it?) - + // configWrite($user, $module, $key, $value, $type, $opts $Driver->configWrite($user, $module, $key_prev, $prev_sync_datetime, null); } - - // @TODO MAKE SURE THIS DOESN'T BREAK ANYTHING! + + // @TODO MAKE SURE THIS DOESN'T BREAK ANYTHING! $prev_sync_datetime = date('Y-m-d', strtotime($prev_sync_datetime) - 600) . 'T' . date('H:i:s', strtotime($prev_sync_datetime) - 600); - + if (!is_array($extra) or empty($extra['iteratorID'])) // Checks to see if this is the first iteration or not { // Start of a new iterator! - + // Store when we started to do this iterator (this will become the $prev_sync_datetime after we finish with this iterator) $curr_sync_datetime = date('Y-m-d') . 'T' . date('H:i:s'); $Driver->configWrite($user, $module, $key_curr, $curr_sync_datetime, null); - + if ($filter_wrap) { if ($action == QUICKBOOKS_QUERY_DELETEDLISTS or $action == QUICKBOOKS_QUERY_DELETEDTXNS) @@ -11480,7 +11551,7 @@ protected static function _buildFilter($user, $action, $extra, $filter_wrap = fa $xml .= '' . $prev_sync_datetime . ''; } } - + return $xml; } } @@ -11554,7 +11625,7 @@ protected static function _buildFilter($user, $action, $extra, $filter_wrap = fa 10000-1232327562 Tax - + 10-1232328309 ReceivePayment @@ -11563,14 +11634,14 @@ protected static function _buildFilter($user, $action, $extra, $filter_wrap = fa AMTTYPE -55.00 - + 6-1232328070 Opening balance 100 100.00 - + 7-1232328243 @@ -11628,7 +11699,7 @@ protected static function _buildFilter($user, $action, $extra, $filter_wrap = fa 10000-1232327562 Tax - + 9-1232328243 @@ -11644,7 +11715,7 @@ protected static function _buildFilter($user, $action, $extra, $filter_wrap = fa Tax - + A-1232328243 @@ -11660,7 +11731,7 @@ protected static function _buildFilter($user, $action, $extra, $filter_wrap = fa Tax - + From b6e251c32f9199619fe77370def59d4824fff0db Mon Sep 17 00:00:00 2001 From: Greg Payne Date: Thu, 2 Oct 2014 14:16:04 -0500 Subject: [PATCH 03/49] Use a transaction when initializing the database. --- QuickBooks/Driver/Sql.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/QuickBooks/Driver/Sql.php b/QuickBooks/Driver/Sql.php index 74e400a1..b34b0283 100755 --- a/QuickBooks/Driver/Sql.php +++ b/QuickBooks/Driver/Sql.php @@ -3367,6 +3367,10 @@ protected function _initialize($init_options = array()) } } + // Wrap the SQL statements in a transaction to reduce open handlers. + array_unshift($arr_sql, "START TRANSACTION"); + array_push($arr_sql, "COMMIT"); + // Run each CREATE TABLE statement... foreach ($arr_sql as $sql) { From 635ae4d087a594b33e126e43feab16a22f18f10d Mon Sep 17 00:00:00 2001 From: Greg Payne Date: Thu, 2 Oct 2014 17:52:46 -0500 Subject: [PATCH 04/49] Add basic support for DepositQuery. --- QuickBooks/Callbacks/SQL/Callbacks.php | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/QuickBooks/Callbacks/SQL/Callbacks.php b/QuickBooks/Callbacks/SQL/Callbacks.php index d64c289b..a5fcb2ff 100644 --- a/QuickBooks/Callbacks/SQL/Callbacks.php +++ b/QuickBooks/Callbacks/SQL/Callbacks.php @@ -6395,6 +6395,36 @@ public static function DepositImportResponse($requestID, $user, $action, $ID, $e QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse('deposit', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } + public static function DepositQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) + { + $xml = ''; + + if (!QuickBooks_Server_SQL_Callbacks::_requiredVersion(2.0, $version)) + { + return QUICKBOOKS_SKIP; + } + + $xml .= ' + + + + + ' . QuickBooks_Server_SQL_Callbacks::_buildFilter($user, $action, $extra, true) . ' + true + ' . Quickbooks_Server_SQL_Callbacks::_requiredVersionForElement(2.0, $version, '0') . ' + + + '; + + return $xml; + } + + public static function DepositQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array()) + { + $extra['is_query_response'] = true; + return QuickBooks_Callbacks_SQL_Callbacks::DepositImportResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); + } + /** * * From fef2cb84a8af19d801677f7f56985e4aa90418b7 Mon Sep 17 00:00:00 2001 From: Greg Payne Date: Fri, 3 Oct 2014 08:29:08 -0500 Subject: [PATCH 05/49] Use the map array provided as basis for sql_map. --- QuickBooks/WebConnector/Server/SQL.php | 202 ++++++++++++------------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/QuickBooks/WebConnector/Server/SQL.php b/QuickBooks/WebConnector/Server/SQL.php index 8e3515ac..9cd805b9 100755 --- a/QuickBooks/WebConnector/Server/SQL.php +++ b/QuickBooks/WebConnector/Server/SQL.php @@ -1,24 +1,24 @@ * @author Garrett Griffin - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -40,7 +40,7 @@ { /** * The priority value to use when re-queueing a request for the next part of an iterator - * + * * @var integer */ define('QUICKBOOKS_SERVER_SQL_ITERATOR_PRIORITY', 1000); @@ -51,7 +51,7 @@ { /** * The priority value to use when issuing requests from an Error Handler for Add/Mods - * + * * @var integer */ define('QUICKBOOKS_SERVER_SQL_CONFLICT_QUEUE_PRIORITY', 9999); @@ -61,7 +61,7 @@ { /** * How many records an iterator should grab in a single transaction - * + * * @var integer */ define('QUICKBOOKS_SERVER_SQL_ITERATOR_MAXRETURNED', 25); @@ -108,8 +108,8 @@ QuickBooks_Loader::load('/QuickBooks/WebConnector/Handlers.php', false); /** - * - * + * + * */ class QuickBooks_WebConnector_Server_SQL extends QuickBooks_WebConnector_Server { @@ -117,150 +117,150 @@ class QuickBooks_WebConnector_Server_SQL extends QuickBooks_WebConnector_Server * Read from the QuickBooks database, and write to the SQL database */ const MODE_READONLY = 'r'; - + /** * Read from the SQL database, and write to the QuickBooks database */ const MODE_WRITEONLY = 'w'; - + /** * Read and write from both sources, keeping both sources in sync */ const MODE_READWRITE = '+'; - + const CONFLICT_LOG = 2; const CONFLICT_NEWER = 4; const CONFLICT_QUICKBOOKS = 8; const CONFLICT_SQL = 16; const CONFLICT_CALLBACK = 32; - + /** * Delete Modes. Decides whether an item actually gets deleted, or just remains marked deleted. * */ const DELETE_REMOVE = 2; //define('QUICKBOOKS_SERVER_SQL_ON_DELETE_REMOVE', QUICKBOOKS_SERVER_SQL_DELETE_REMOVE); - + const DELETE_FLAG = 4; //define('QUICKBOOKS_SERVER_SQL::ON_DELETE_FLAG', QUICKBOOKS_SERVER_SQL_DELETE_FLAG); - + /** - * - * + * + * * You can run this server in one of three modes: - * - QUICKBOOKS_SERVER_SQL_MODE_READONLY: Data will only be read from - * QuickBooks; changes to data in the SQL database will never be - * pushed back to QuickBooks. - * - QUICKBOOKS_SERVER_SQL_MODE_WRITEONLY: Data will only be pushed to - * QuickBooks, and nothing that already exists in QuickBooks will be + * - QUICKBOOKS_SERVER_SQL_MODE_READONLY: Data will only be read from + * QuickBooks; changes to data in the SQL database will never be + * pushed back to QuickBooks. + * - QUICKBOOKS_SERVER_SQL_MODE_WRITEONLY: Data will only be pushed to + * QuickBooks, and nothing that already exists in QuickBooks will be * imported into the SQL database. - * - QUICKBOOKS_SERVER_SQL_MODE_READWRITE: The server will do it's best to - * try to import all QuickBooks data into the SQL database, and then - * push changes that occur in either location to the other location. - * The server will try to syncronise the two locations as much as is - * possible. - * + * - QUICKBOOKS_SERVER_SQL_MODE_READWRITE: The server will do it's best to + * try to import all QuickBooks data into the SQL database, and then + * push changes that occur in either location to the other location. + * The server will try to syncronise the two locations as much as is + * possible. + * * @param string $dsn_or_conn DSN-style connection string or an already opened connection to the driver * @param string $how_often The maximum time we wait between updates/syncs (you can use any valid interval: "1 hour", "15 minutes", 60, etc.) * @param char $mode The mode the server should run in (see constants above) * @param char $conflicts The steps towards update conflict resolution the server should take (see constants above) * @param mixed $users The user (or an array of users) who will be using the SQL server - * @param array $map - * @param array $onerror - * @param string $wsdl - * @param array $soap_options - * @param array $handler_options - * @param array $driver_options + * @param array $map + * @param array $onerror + * @param string $wsdl + * @param array $soap_options + * @param array $handler_options + * @param array $driver_options */ public function __construct( - $dsn_or_conn, - $how_often, - $mode, - $conflicts, + $dsn_or_conn, + $how_often, + $mode, + $conflicts, $delete, - $users = null, - $map = array(), - $onerror = array(), - $hooks = array(), - $log_level = QUICKBOOKS_LOG_NORMAL, - $soap = QUICKBOOKS_SOAPSERVER_BUILTIN, - $wsdl = QUICKBOOKS_WSDL, - $soap_options = array(), - $handler_options = array(), + $users = null, + $map = array(), + $onerror = array(), + $hooks = array(), + $log_level = QUICKBOOKS_LOG_NORMAL, + $soap = QUICKBOOKS_SOAPSERVER_BUILTIN, + $wsdl = QUICKBOOKS_WSDL, + $soap_options = array(), + $handler_options = array(), $driver_options = array(), - $sql_options = array(), + $sql_options = array(), $callback_options = array()) { // $dsn_or_conn, $map, $onerror = array(), $hooks = array(), $log_level = QUICKBOOKS_LOG_NORMAL, $soap = QUICKBOOKS_SOAPSERVER_BUILTIN, $wsdl = QUICKBOOKS_WSDL, $soap_options = array(), $handler_options = array(), $driver_options = array() - + if (!is_array($users)) { $users = array( $users ); } - - // Map of callback handlers - $sql_map = array(); - + + // Map of callback handlers + $sql_map = (array) $map; + foreach (get_class_methods('QuickBooks_Callbacks_SQL_Callbacks') as $method) { if (strtolower(substr($method, -7)) == 'request') { $action = substr($method, 0, -7); - - $sql_map[$action] = array( - 'QuickBooks_Callbacks_SQL_Callbacks::' . $action . 'Request', + + $sql_map[$action] = array( + 'QuickBooks_Callbacks_SQL_Callbacks::' . $action . 'Request', 'QuickBooks_Callbacks_SQL_Callbacks::' . $action . 'Response' ); } } - + /* - $sql_map[QUICKBOOKS_DERIVE_ITEM] = array( - 'QuickBooks_Callbacks_SQL_Callbacks::ItemDeriveRequest', + $sql_map[QUICKBOOKS_DERIVE_ITEM] = array( + 'QuickBooks_Callbacks_SQL_Callbacks::ItemDeriveRequest', 'QuickBooks_Callbacks_SQL_Callbacks::ItemDeriveResponse' ); - - $sql_map[QUICKBOOKS_DERIVE_CUSTOMER] = array( - 'QuickBooks_Callbacks_SQL_Callbacks::CustomerDeriveRequest', + + $sql_map[QUICKBOOKS_DERIVE_CUSTOMER] = array( + 'QuickBooks_Callbacks_SQL_Callbacks::CustomerDeriveRequest', 'QuickBooks_Callbacks_SQL_Callbacks::CustomerDeriveResponse' ); - $sql_map[QUICKBOOKS_DERIVE_INVOICE] = array( - 'QuickBooks_Callbacks_SQL_Callbacks::InvoiceDeriveRequest', - 'QuickBooks_Callbacks_SQL_Callbacks::InvoiceDeriveResponse' ); + $sql_map[QUICKBOOKS_DERIVE_INVOICE] = array( + 'QuickBooks_Callbacks_SQL_Callbacks::InvoiceDeriveRequest', + 'QuickBooks_Callbacks_SQL_Callbacks::InvoiceDeriveResponse' ); */ - + //print_r($sql_map); //exit; - + // Default error handlers $sql_onerror = array( - '*' => 'QuickBooks_Callbacks_SQL_Errors::catchall', + '*' => 'QuickBooks_Callbacks_SQL_Errors::catchall', ); - + $sql_onerror = $this->_merge($sql_onerror, $onerror, false); - + // Default hooks $sql_hooks = array( // This hook is neccessary for queueing up the appropriate actions to perform the sync (use login success so we know user to sync for) - QuickBooks_WebConnector_Handlers::HOOK_LOGINSUCCESS => array( 'QuickBooks_Callbacks_SQL_Callbacks::onAuthenticate' ), + QuickBooks_WebConnector_Handlers::HOOK_LOGINSUCCESS => array( 'QuickBooks_Callbacks_SQL_Callbacks::onAuthenticate' ), ); - + // Merge with user-defined hooks $sql_hooks = $this->_merge($hooks, $sql_hooks, true); - + // @TODO Prefix these with _ so that people don't accidentally overwrite them $sql_callback_options = array( - 'hooks' => $sql_hooks, + 'hooks' => $sql_hooks, 'conflicts' => $conflicts, 'mode' => $mode, 'delete' => $delete, 'recur' => QuickBooks_Utilities::intervalToSeconds($how_often), 'map' => $sql_map, ); - + //print_r($sql_options); //exit; - + $defaults = $this->_sqlDefaults($sql_options); - + //$sql_callback_options['_only_query'] = $defaults['only_query']; //$sql_callback_options['_dont_query'] = $defaults['dont_query']; $sql_callback_options['_only_import'] = $defaults['only_import']; @@ -271,18 +271,18 @@ public function __construct( $sql_callback_options['_dont_modify'] = $defaults['dont_modify']; $sql_callback_options['_only_misc'] = $defaults['only_misc']; $sql_callback_options['_dont_misc'] = $defaults['dont_misc']; - + // Merge default values with passed in values - // (in this case, we are *required* to have these values present, so + // (in this case, we are *required* to have these values present, so // we make sure that the SQL options override any user-defined options $sql_callback_options = $this->_merge($callback_options, $sql_callback_options, false); - + // Initialize the Driver singleton - $Driver = QuickBooks_Driver_Singleton::getInstance($dsn_or_conn, $driver_options, $sql_hooks, $log_level); - + $Driver = QuickBooks_Driver_Singleton::getInstance($dsn_or_conn, $driver_options, $sql_hooks, $log_level); + // $dsn_or_conn, $map, $onerror = array(), $hooks = array(), $log_level = QUICKBOOKS_LOG_NORMAL, $soap = QUICKBOOKS_SOAPSERVER_BUILTIN, $wsdl = QUICKBOOKS_WSDL, $soap_options = array(), $handler_options = array(), $driver_options = array() parent::__construct($dsn_or_conn, $sql_map, $sql_onerror, $sql_hooks, $log_level, $soap, $wsdl, $soap_options, $handler_options, $driver_options, $sql_callback_options); - + /* // TESTING only $requestID = null; @@ -294,10 +294,10 @@ public function __construct( QuickBooks_Callbacks_SQL_Callbacks::onAuthenticate($requestID, $user, $hook, $err, $hook_data, $callback_config); */ } - + /** * Apply default options to an array of configuration options - * + * * @param array $config * @return array */ @@ -307,15 +307,15 @@ protected function _sqlDefaults($config) //'only_query', //'dont_query', 'only_import', - 'dont_import', + 'dont_import', 'only_add', 'dont_add', 'only_modify', - 'dont_modify', - 'only_misc', - 'dont_misc', + 'dont_modify', + 'only_misc', + 'dont_misc', ); - + foreach ($tmp as $filter) { if (empty($config[$filter]) or @@ -324,12 +324,12 @@ protected function _sqlDefaults($config) $config[$filter] = array(); } } - - // Any other configuration defaults go here + + // Any other configuration defaults go here $defaults = array( - + ); - + return array_merge($defaults, $config); } } From 1c0327cd37f21225dd873679639fa9ba75199004 Mon Sep 17 00:00:00 2001 From: Greg Payne Date: Fri, 3 Oct 2014 08:31:45 -0500 Subject: [PATCH 06/49] Treat 'no object found' info codes as empty sets. --- QuickBooks/WebConnector/Handlers.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/QuickBooks/WebConnector/Handlers.php b/QuickBooks/WebConnector/Handlers.php index 3348875d..a60c559c 100755 --- a/QuickBooks/WebConnector/Handlers.php +++ b/QuickBooks/WebConnector/Handlers.php @@ -1038,7 +1038,16 @@ protected function _extractStatusCode($xml) if (false !== ($start = strpos($xml, ' statusCode="')) and false !== ($end = strpos($xml, '"', $start + 13))) { - return substr($xml, $start + 13, $end - $start - 13); + $code = substr($xml, $start + 13, $end - $start - 13); + if (empty($code) || $code === '1') { + // Code 1 is informational only: + // statusSeverity="Info" statusMessage="A query request did not find a matching object in QuickBooks" + // Basically, it is how QB reports an empty result set. + // When this is treated as an error, some other actions fail to trigger. + // Ex: the -prev cfgval's never get updated when an empty result set is detected. + return QUICKBOOKS_ERROR_OK; + } + return $code; } return QUICKBOOKS_ERROR_OK; From 074de99a28e24786dd640acb101a634a6f095dfd Mon Sep 17 00:00:00 2001 From: Greg Payne Date: Fri, 3 Oct 2014 08:32:37 -0500 Subject: [PATCH 07/49] Added JournalEntry. Adjusted DepositQuery. --- QuickBooks/Callbacks/SQL/Callbacks.php | 52 +++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/QuickBooks/Callbacks/SQL/Callbacks.php b/QuickBooks/Callbacks/SQL/Callbacks.php index a5fcb2ff..1eed7f8b 100644 --- a/QuickBooks/Callbacks/SQL/Callbacks.php +++ b/QuickBooks/Callbacks/SQL/Callbacks.php @@ -2063,6 +2063,46 @@ public static function JournalEntryModResponse($requestID, $user, $action, $ID, $extra['is_mod_response'] = true; QuickBooks_Callbacks_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_JOURNALENTRY, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } + /** + * + * + */ + public static function JournalEntryQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array()) + { + $xml = ''; + + $xml .= ' + + + + + ' . QuickBooks_Server_SQL_Callbacks::_buildFilter($user, $action, $extra, true) . ' + true + ' . Quickbooks_Server_SQL_Callbacks::_requiredVersionForElement(2.0, $version, '0', $locale) . ' + + + '; + + return $xml; + } + + /** + * + * + */ + public static function JournalEntryQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array() ) + { + $Parser = new QuickBooks_XML_Parser($xml); + + $errnum = 0; + $errmsg = ''; + $Doc = $Parser->parse($errnum, $errmsg); + $Root = $Doc->getRoot(); + + $List = $Root->getChildAt('QBXML QBXMLMsgsRs JournalEntryQueryRs'); + + QuickBooks_Server_SQL_Callbacks::_QueryResponse(QUICKBOOKS_OBJECT_JOURNALENTRY, $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); + } /** * @@ -6421,8 +6461,16 @@ public static function DepositQueryRequest($requestID, $user, $action, $ID, $ext public static function DepositQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $config = array()) { - $extra['is_query_response'] = true; - return QuickBooks_Callbacks_SQL_Callbacks::DepositImportResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); + $Parser = new QuickBooks_XML_Parser($xml); + + $errnum = 0; + $errmsg = ''; + $Doc = $Parser->parse($errnum, $errmsg); + $Root = $Doc->getRoot(); + + $List = $Root->getChildAt('QBXML QBXMLMsgsRs DepositQueryRs'); + + QuickBooks_Server_SQL_Callbacks::_QueryResponse('deposit', $List, $requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents, $config); } /** From e76ff9d3ff8d8bde04984dd692cfb0f8d8cda6c4 Mon Sep 17 00:00:00 2001 From: rdueck Date: Fri, 3 Feb 2023 10:05:55 -0700 Subject: [PATCH 08/49] Remove trailing whitespace --- LICENSE.TXT | 244 +- QuickBooks.php | 114 +- QuickBooks/Adapter/Client.php | 20 +- QuickBooks/Adapter/Client/Php.php | 44 +- QuickBooks/Adapter/Server.php | 34 +- QuickBooks/Adapter/Server/Builtin.php | 34 +- QuickBooks/Adapter/Server/Php.php | 18 +- QuickBooks/Callbacks/API/Callbacks.php | 620 +-- QuickBooks/Callbacks/API/Errors.php | 66 +- QuickBooks/Callbacks/Integrator/Callbacks.php | 772 ++-- QuickBooks/Callbacks/Integrator/Errors.php | 112 +- QuickBooks/Callbacks/SQL/Callbacks.php | 10 +- QuickBooks/Callbacks/SQL/Errors.php | 204 +- QuickBooks/Cast.php | 442 +- QuickBooks/Compat.php | 12 +- QuickBooks/Driver/Factory.php | 50 +- QuickBooks/Driver/Singleton.php | 28 +- QuickBooks/Driver/Sql/Mssql.php | 292 +- QuickBooks/Driver/Sql/Mysql.php | 256 +- QuickBooks/Driver/Sql/Mysqli.php | 218 +- QuickBooks/Driver/Sql/Pgsql.php | 384 +- QuickBooks/Encryption.php | 30 +- QuickBooks/Encryption/Aes.php | 44 +- QuickBooks/Encryption/Blowfish.php | 38 +- QuickBooks/Encryption/Factory.php | 32 +- QuickBooks/Encryption/Mode/CBC.php | 12 +- QuickBooks/Encryption/Mode/ECB.php | 12 +- QuickBooks/Encryption/Rc4.php | 28 +- QuickBooks/ErrorHandler.php | 16 +- QuickBooks/Frameworks.php | 48 +- QuickBooks/HTTP.php | 2 +- QuickBooks/IPP/Cache.php | 52 +- QuickBooks/IPP/Context.php | 32 +- QuickBooks/IPP/Entitlement.php | 22 +- QuickBooks/IPP/IDS.php | 4 +- QuickBooks/IPP/Object.php | 10 +- QuickBooks/IPP/Object/Account.php | 30 +- .../Object/AccountBasedExpenseLineDetail.php | 2 +- QuickBooks/IPP/Object/AccountingInfoPrefs.php | 2 +- QuickBooks/IPP/Object/Address.php | 32 +- QuickBooks/IPP/Object/AlternatePhone.php | 2 +- QuickBooks/IPP/Object/Amount.php | 2 +- QuickBooks/IPP/Object/AssetAccountRef.php | 2 +- QuickBooks/IPP/Object/AvgCost.php | 2 +- QuickBooks/IPP/Object/Bill.php | 2 +- QuickBooks/IPP/Object/BillAddr.php | 32 +- QuickBooks/IPP/Object/BillEmail.php | 4 +- QuickBooks/IPP/Object/BillPayment.php | 2 +- .../IPP/Object/BillPaymentCreditCard.php | 2 +- QuickBooks/IPP/Object/COGSAccountRef.php | 2 +- QuickBooks/IPP/Object/Cash.php | 2 +- QuickBooks/IPP/Object/Check.php | 2 +- QuickBooks/IPP/Object/CheckPayment.php | 2 +- QuickBooks/IPP/Object/Class.php | 12 +- QuickBooks/IPP/Object/ColDesc.php | 2 +- QuickBooks/IPP/Object/CompanyAddr.php | 2 +- QuickBooks/IPP/Object/CompanyInfo.php | 2 +- QuickBooks/IPP/Object/CompanyMetaData.php | 2 +- QuickBooks/IPP/Object/ConvUnit.php | 2 +- QuickBooks/IPP/Object/CreditCard.php | 2 +- QuickBooks/IPP/Object/CreditCardPayment.php | 2 +- QuickBooks/IPP/Object/CreditChargeInfo.php | 2 +- .../IPP/Object/CreditChargeResponse.php | 2 +- QuickBooks/IPP/Object/CreditLimit.php | 2 +- QuickBooks/IPP/Object/CreditMemo.php | 2 +- QuickBooks/IPP/Object/CurrencyPrefs.php | 2 +- QuickBooks/IPP/Object/CustomField.php | 2 +- QuickBooks/IPP/Object/Customer.php | 104 +- .../IPP/Object/CustomerCommunicationAddr.php | 2 +- QuickBooks/IPP/Object/DeliveryInfo.php | 2 +- QuickBooks/IPP/Object/Department.php | 8 +- .../IPP/Object/DescriptionLineDetail.php | 2 +- QuickBooks/IPP/Object/Detail.php | 2 +- QuickBooks/IPP/Object/Discount.php | 2 +- QuickBooks/IPP/Object/DiscountAccountRef.php | 2 +- QuickBooks/IPP/Object/DiscountLineDetail.php | 2 +- QuickBooks/IPP/Object/EffectiveTaxRate.php | 2 +- QuickBooks/IPP/Object/Email.php | 8 +- QuickBooks/IPP/Object/EmailMessagesPrefs.php | 2 +- QuickBooks/IPP/Object/Employee.php | 58 +- QuickBooks/IPP/Object/Entity.php | 2 +- QuickBooks/IPP/Object/Estimate.php | 2 +- QuickBooks/IPP/Object/EstimateMessage.php | 2 +- QuickBooks/IPP/Object/ExpenseAccountRef.php | 2 +- QuickBooks/IPP/Object/Fax.php | 20 +- QuickBooks/IPP/Object/GroupLineDetail.php | 2 +- QuickBooks/IPP/Object/Header.php | 88 +- QuickBooks/IPP/Object/IncomeAccountRef.php | 2 +- QuickBooks/IPP/Object/Invoice.php | 2 +- QuickBooks/IPP/Object/InvoiceMessage.php | 2 +- QuickBooks/IPP/Object/Item.php | 52 +- .../IPP/Object/ItemBasedExpenseLineDetail.php | 2 +- QuickBooks/IPP/Object/ItemGroupDetail.php | 2 +- QuickBooks/IPP/Object/ItemReceipt.php | 2 +- QuickBooks/IPP/Object/Job.php | 102 +- QuickBooks/IPP/Object/JobInfo.php | 14 +- QuickBooks/IPP/Object/JournalEntry.php | 2 +- .../IPP/Object/JournalEntryLineDetail.php | 2 +- QuickBooks/IPP/Object/LegalAddr.php | 2 +- QuickBooks/IPP/Object/LegalAddress.php | 2 +- QuickBooks/IPP/Object/Line.php | 60 +- QuickBooks/IPP/Object/LineEx.php | 2 +- QuickBooks/IPP/Object/MarkupInfo.php | 2 +- QuickBooks/IPP/Object/MetaData.php | 14 +- QuickBooks/IPP/Object/Mobile.php | 2 +- QuickBooks/IPP/Object/NameValue.php | 2 +- QuickBooks/IPP/Object/Notes.php | 2 +- QuickBooks/IPP/Object/OpenBalance.php | 4 +- QuickBooks/IPP/Object/OpenBalanceWithJobs.php | 2 +- QuickBooks/IPP/Object/OtherContactInfo.php | 2 +- QuickBooks/IPP/Object/OtherPrefs.php | 2 +- QuickBooks/IPP/Object/POCustomField.php | 2 +- QuickBooks/IPP/Object/PayeeAddr.php | 2 +- QuickBooks/IPP/Object/Payment.php | 16 +- QuickBooks/IPP/Object/PaymentMethod.php | 2 +- QuickBooks/IPP/Object/Phone.php | 22 +- QuickBooks/IPP/Object/PrefVendorRef.php | 2 +- QuickBooks/IPP/Object/Preferences.php | 2 +- QuickBooks/IPP/Object/PrimaryAddr.php | 2 +- QuickBooks/IPP/Object/PrimaryEmailAddr.php | 2 +- QuickBooks/IPP/Object/PrimaryPhone.php | 2 +- .../IPP/Object/ProductAndServicesPrefs.php | 2 +- QuickBooks/IPP/Object/Purchase.php | 2 +- QuickBooks/IPP/Object/PurchaseCost.php | 2 +- QuickBooks/IPP/Object/PurchaseEx.php | 2 +- QuickBooks/IPP/Object/PurchaseOrder.php | 2 +- QuickBooks/IPP/Object/PurchaseTaxRateList.php | 2 +- QuickBooks/IPP/Object/ReimbursableInfo.php | 2 +- QuickBooks/IPP/Object/RemitToAddr.php | 2 +- QuickBooks/IPP/Object/Report.php | 6 +- QuickBooks/IPP/Object/ReportPrefs.php | 2 +- QuickBooks/IPP/Object/SalesFormsPrefs.php | 2 +- QuickBooks/IPP/Object/SalesItemLineDetail.php | 2 +- QuickBooks/IPP/Object/SalesOrder.php | 2 +- QuickBooks/IPP/Object/SalesReceipt.php | 2 +- QuickBooks/IPP/Object/SalesReceiptMessage.php | 2 +- QuickBooks/IPP/Object/SalesRep.php | 16 +- QuickBooks/IPP/Object/SalesTax.php | 2 +- QuickBooks/IPP/Object/SalesTaxCode.php | 2 +- QuickBooks/IPP/Object/SalesTaxRateList.php | 2 +- QuickBooks/IPP/Object/SalesTerm.php | 2 +- QuickBooks/IPP/Object/ShipAddr.php | 32 +- QuickBooks/IPP/Object/ShipMethod.php | 2 +- QuickBooks/IPP/Object/StatementMessage.php | 2 +- QuickBooks/IPP/Object/SubTotalLineDetail.php | 2 +- QuickBooks/IPP/Object/TaxAgency.php | 2 +- QuickBooks/IPP/Object/TaxCode.php | 2 +- QuickBooks/IPP/Object/TaxLine.php | 2 +- QuickBooks/IPP/Object/TaxLineDetail.php | 2 +- QuickBooks/IPP/Object/TaxPrefs.php | 2 +- QuickBooks/IPP/Object/TaxRate.php | 2 +- QuickBooks/IPP/Object/TaxRateDetail.php | 2 +- QuickBooks/IPP/Object/Telephone.php | 2 +- QuickBooks/IPP/Object/Term.php | 2 +- QuickBooks/IPP/Object/TimeActivity.php | 86 +- QuickBooks/IPP/Object/TimeTrackingPrefs.php | 2 +- QuickBooks/IPP/Object/TxnTaxDetail.php | 2 +- QuickBooks/IPP/Object/UOM.php | 2 +- QuickBooks/IPP/Object/UnitPrice.php | 2 +- QuickBooks/IPP/Object/Vendor.php | 4 +- QuickBooks/IPP/Object/VendorAddr.php | 2 +- .../IPP/Object/VendorAndPurchasesPrefs.php | 2 +- QuickBooks/IPP/Object/VendorCredit.php | 2 +- QuickBooks/IPP/Object/WebAddr.php | 2 +- QuickBooks/IPP/Object/WebSite.php | 2 +- QuickBooks/IPP/Object/qboEntity.php | 6 +- QuickBooks/IPP/Role.php | 16 +- QuickBooks/IPP/Service.php | 4 +- QuickBooks/IPP/Service/Account.php | 8 +- QuickBooks/IPP/Service/Bill.php | 10 +- QuickBooks/IPP/Service/BillPayment.php | 18 +- .../IPP/Service/BillPaymentCreditCard.php | 10 +- QuickBooks/IPP/Service/ChangeDataCapture.php | 10 +- QuickBooks/IPP/Service/ChangeDataDeleted.php | 10 +- QuickBooks/IPP/Service/Check.php | 8 +- QuickBooks/IPP/Service/Class.php | 20 +- QuickBooks/IPP/Service/Company.php | 18 +- QuickBooks/IPP/Service/CompanyInfo.php | 16 +- QuickBooks/IPP/Service/CompanyMetaData.php | 18 +- QuickBooks/IPP/Service/CreditMemo.php | 12 +- QuickBooks/IPP/Service/Customer.php | 32 +- QuickBooks/IPP/Service/Department.php | 10 +- QuickBooks/IPP/Service/Discount.php | 18 +- QuickBooks/IPP/Service/Employee.php | 22 +- QuickBooks/IPP/Service/Entitlements.php | 10 +- QuickBooks/IPP/Service/Factory.php | 10 +- QuickBooks/IPP/Service/Invoice.php | 12 +- QuickBooks/IPP/Service/Item.php | 24 +- QuickBooks/IPP/Service/ItemConsolidated.php | 40 +- QuickBooks/IPP/Service/ItemReceipt.php | 8 +- QuickBooks/IPP/Service/Job.php | 8 +- QuickBooks/IPP/Service/JournalEntry.php | 10 +- QuickBooks/IPP/Service/Payment.php | 8 +- QuickBooks/IPP/Service/PaymentMethod.php | 8 +- QuickBooks/IPP/Service/PayrollItem.php | 20 +- QuickBooks/IPP/Service/Preferences.php | 16 +- QuickBooks/IPP/Service/Purchase.php | 10 +- QuickBooks/IPP/Service/PurchaseOrder.php | 12 +- QuickBooks/IPP/Service/Report.php | 10 +- .../IPP/Service/Report/AccountBalances.php | 8 +- .../IPP/Service/Report/BalanceSheet.php | 8 +- .../IPP/Service/Report/BalanceSheetStd.php | 8 +- .../IPP/Service/Report/CustomersWhoOweMe.php | 8 +- .../IPP/Service/Report/IncomeBreakdown.php | 8 +- .../IPP/Service/Report/ProfitAndLoss.php | 8 +- .../IPP/Service/Report/SalesSummary.php | 8 +- .../Service/Report/TopCustomersBySales.php | 8 +- QuickBooks/IPP/Service/SalesOrder.php | 18 +- QuickBooks/IPP/Service/SalesReceipt.php | 12 +- QuickBooks/IPP/Service/SalesRep.php | 8 +- QuickBooks/IPP/Service/SalesTax.php | 8 +- QuickBooks/IPP/Service/SalesTaxCode.php | 8 +- QuickBooks/IPP/Service/SalesTerm.php | 8 +- QuickBooks/IPP/Service/ShipMethod.php | 12 +- QuickBooks/IPP/Service/SyncStatus.php | 10 +- QuickBooks/IPP/Service/TaxAgency.php | 8 +- QuickBooks/IPP/Service/TaxCode.php | 8 +- QuickBooks/IPP/Service/TaxRate.php | 8 +- QuickBooks/IPP/Service/Term.php | 8 +- QuickBooks/IPP/Service/TimeActivity.php | 14 +- QuickBooks/IPP/Service/UOM.php | 8 +- QuickBooks/IPP/Service/Vendor.php | 12 +- QuickBooks/IPP/Service/VendorCredit.php | 12 +- QuickBooks/IPP/User.php | 46 +- QuickBooks/Loader.php | 60 +- QuickBooks/Map.php | 24 +- QuickBooks/Map/Qbxml.php | 270 +- QuickBooks/MerchantService.php | 914 ++-- .../MerchantService/CheckingAccount.php | 48 +- QuickBooks/MerchantService/CreditCard.php | 74 +- QuickBooks/MerchantService/Transaction.php | 354 +- QuickBooks/Payments/BankAccount.php | 18 +- QuickBooks/Payments/Token.php | 10 +- QuickBooks/Payments/Transaction.php | 10 +- QuickBooks/QBXML.php | 6 +- QuickBooks/QBXML/Object.php | 488 +-- QuickBooks/QBXML/Object/Account.php | 104 +- QuickBooks/QBXML/Object/Bill.php | 100 +- QuickBooks/QBXML/Object/Bill/ExpenseLine.php | 90 +- QuickBooks/QBXML/Object/Bill/ItemLine.php | 162 +- QuickBooks/QBXML/Object/BillPaymentCheck.php | 170 +- .../Object/BillPaymentCheck/AppliedToTxn.php | 70 +- QuickBooks/QBXML/Object/Check.php | 162 +- .../QBXML/Object/Check/ApplyCheckToTxn.php | 32 +- QuickBooks/QBXML/Object/Check/ExpenseLine.php | 116 +- .../QBXML/Object/Check/ItemGroupLine.php | 58 +- QuickBooks/QBXML/Object/Check/ItemLine.php | 188 +- QuickBooks/QBXML/Object/Class.php | 72 +- QuickBooks/QBXML/Object/CreditCardRefund.php | 58 +- QuickBooks/QBXML/Object/CreditMemo.php | 56 +- .../Object/CreditMemo/CreditMemoLine.php | 30 +- QuickBooks/QBXML/Object/Customer.php | 312 +- QuickBooks/QBXML/Object/CustomerType.php | 80 +- QuickBooks/QBXML/Object/DataExt.php | 82 +- QuickBooks/QBXML/Object/Department.php | 48 +- QuickBooks/QBXML/Object/Deposit.php | 94 +- .../QBXML/Object/Deposit/DepositLine.php | 86 +- QuickBooks/QBXML/Object/DiscountItem.php | 104 +- QuickBooks/QBXML/Object/Employee.php | 178 +- QuickBooks/QBXML/Object/Estimate.php | 254 +- .../QBXML/Object/Estimate/EstimateLine.php | 152 +- QuickBooks/QBXML/Object/FixedAssetItem.php | 120 +- QuickBooks/QBXML/Object/Generic.php | 48 +- QuickBooks/QBXML/Object/GroupItem.php | 118 +- .../QBXML/Object/InventoryAdjustment.php | 94 +- .../InventoryAdjustmentLine.php | 2 +- .../QBXML/Object/InventoryAssemblyItem.php | 124 +- QuickBooks/QBXML/Object/InventoryItem.php | 140 +- QuickBooks/QBXML/Object/Invoice.php | 398 +- .../QBXML/Object/Invoice/DiscountLine.php | 64 +- .../QBXML/Object/Invoice/InvoiceLine.php | 182 +- .../QBXML/Object/Invoice/SalesTaxLine.php | 64 +- .../QBXML/Object/Invoice/ShippingLine.php | 58 +- QuickBooks/QBXML/Object/Item.php | 110 +- QuickBooks/QBXML/Object/ItemReceipt.php | 6 +- .../QBXML/Object/ItemReceipt/ExpenseLine.php | 16 +- .../Object/ItemReceipt/ItemGroupLine.php | 14 +- .../QBXML/Object/ItemReceipt/ItemLine.php | 40 +- QuickBooks/QBXML/Object/JournalEntry.php | 56 +- .../Object/JournalEntry/JournalCreditLine.php | 110 +- .../Object/JournalEntry/JournalDebitLine.php | 108 +- QuickBooks/QBXML/Object/NonInventoryItem.php | 168 +- QuickBooks/QBXML/Object/OtherChargeItem.php | 204 +- QuickBooks/QBXML/Object/PaymentItem.php | 204 +- QuickBooks/QBXML/Object/PaymentMethod.php | 56 +- QuickBooks/QBXML/Object/ReceivePayment.php | 188 +- .../Object/ReceivePayment/AppliedToTxn.php | 68 +- QuickBooks/QBXML/Object/SalesOrder.php | 348 +- .../Object/SalesOrder/SalesOrderLine.php | 142 +- QuickBooks/QBXML/Object/SalesReceipt.php | 324 +- .../Object/SalesReceipt/DiscountLine.php | 62 +- .../Object/SalesReceipt/SalesReceiptLine.php | 108 +- .../Object/SalesReceipt/SalesTaxLine.php | 60 +- .../Object/SalesReceipt/ShippingLine.php | 56 +- QuickBooks/QBXML/Object/SalesRep.php | 28 +- QuickBooks/QBXML/Object/SalesTaxCode.php | 48 +- QuickBooks/QBXML/Object/SalesTaxGroupItem.php | 58 +- .../SalesTaxGroupItem/ItemSalesTaxRef.php | 26 +- QuickBooks/QBXML/Object/SalesTaxItem.php | 86 +- QuickBooks/QBXML/Object/ServiceItem.php | 218 +- QuickBooks/QBXML/Object/ShipMethod.php | 70 +- QuickBooks/QBXML/Object/StandardTerms.php | 82 +- QuickBooks/QBXML/Object/UnitOfMeasureSet.php | 96 +- .../Object/UnitOfMeasureSet/DefaultUnit.php | 26 +- .../Object/UnitOfMeasureSet/RelatedUnit.php | 26 +- QuickBooks/QBXML/Object/Vendor.php | 150 +- QuickBooks/QBXML/Schema/Generator.php | 118 +- QuickBooks/QBXML/Schema/Object.php | 190 +- .../Schema/Object/ARRefundCreditCardAddRq.php | 40 +- .../Object/ARRefundCreditCardQueryRq.php | 40 +- .../QBXML/Schema/Object/AccountAddRq.php | 40 +- .../QBXML/Schema/Object/AccountModRq.php | 40 +- .../QBXML/Schema/Object/AccountQueryRq.php | 40 +- QuickBooks/QBXML/Schema/Object/BillAddRq.php | 42 +- QuickBooks/QBXML/Schema/Object/BillModRq.php | 40 +- .../Schema/Object/BillPaymentCheckAddRq.php | 42 +- .../Schema/Object/BillPaymentCheckModRq.php | 40 +- .../Schema/Object/BillPaymentCheckQueryRq.php | 40 +- .../Object/BillPaymentCreditCardAddRq.php | 40 +- .../Object/BillPaymentCreditCardQueryRq.php | 40 +- .../QBXML/Schema/Object/BillQueryRq.php | 40 +- .../QBXML/Schema/Object/BillToPayQueryRq.php | 40 +- .../QBXML/Schema/Object/BillingRateAddRq.php | 40 +- .../Schema/Object/BillingRateQueryRq.php | 40 +- .../Object/BudgetSummaryReportQueryRq.php | 40 +- .../Schema/Object/BuildAssemblyAddRq.php | 40 +- .../Schema/Object/BuildAssemblyModRq.php | 40 +- .../Schema/Object/BuildAssemblyQueryRq.php | 40 +- .../QBXML/Schema/Object/ChargeAddRq.php | 40 +- .../QBXML/Schema/Object/ChargeModRq.php | 40 +- .../QBXML/Schema/Object/ChargeQueryRq.php | 40 +- QuickBooks/QBXML/Schema/Object/CheckAddRq.php | 48 +- QuickBooks/QBXML/Schema/Object/CheckModRq.php | 40 +- .../QBXML/Schema/Object/CheckQueryRq.php | 40 +- QuickBooks/QBXML/Schema/Object/ClassAddRq.php | 40 +- .../QBXML/Schema/Object/ClassQueryRq.php | 40 +- .../Schema/Object/ClearedStatusModRq.php | 40 +- .../Schema/Object/CompanyActivityQueryRq.php | 40 +- .../QBXML/Schema/Object/CompanyQueryRq.php | 40 +- .../Schema/Object/CreditCardChargeAddRq.php | 40 +- .../Schema/Object/CreditCardChargeModRq.php | 40 +- .../Schema/Object/CreditCardChargeQueryRq.php | 40 +- .../Schema/Object/CreditCardCreditAddRq.php | 40 +- .../Schema/Object/CreditCardCreditModRq.php | 40 +- .../Schema/Object/CreditCardCreditQueryRq.php | 40 +- .../QBXML/Schema/Object/CreditMemoAddRq.php | 40 +- .../QBXML/Schema/Object/CreditMemoModRq.php | 40 +- .../QBXML/Schema/Object/CreditMemoQueryRq.php | 40 +- .../Object/CustomDetailReportQueryRq.php | 40 +- .../Object/CustomSummaryReportQueryRq.php | 40 +- .../QBXML/Schema/Object/CustomerAddRq.php | 80 +- .../QBXML/Schema/Object/CustomerModRq.php | 68 +- .../QBXML/Schema/Object/CustomerMsgAddRq.php | 40 +- .../Schema/Object/CustomerMsgQueryRq.php | 40 +- .../QBXML/Schema/Object/CustomerQueryRq.php | 40 +- .../QBXML/Schema/Object/CustomerTypeAddRq.php | 40 +- .../Schema/Object/CustomerTypeQueryRq.php | 40 +- .../QBXML/Schema/Object/DataExtAddRq.php | 40 +- .../QBXML/Schema/Object/DataExtDefAddRq.php | 40 +- .../QBXML/Schema/Object/DataExtDefDelRq.php | 40 +- .../QBXML/Schema/Object/DataExtDefModRq.php | 40 +- .../QBXML/Schema/Object/DataExtDefQueryRq.php | 40 +- .../QBXML/Schema/Object/DataExtDelRq.php | 40 +- .../QBXML/Schema/Object/DataExtModRq.php | 40 +- .../QBXML/Schema/Object/DepartmentAddRq.php | 32 +- .../QBXML/Schema/Object/DepartmentQueryRq.php | 32 +- .../QBXML/Schema/Object/DepositAddRq.php | 44 +- .../QBXML/Schema/Object/DepositModRq.php | 40 +- .../QBXML/Schema/Object/DepositQueryRq.php | 40 +- .../QBXML/Schema/Object/EmployeeAddRq.php | 40 +- .../QBXML/Schema/Object/EmployeeModRq.php | 40 +- .../QBXML/Schema/Object/EmployeeQueryRq.php | 40 +- .../QBXML/Schema/Object/EstimateAddRq.php | 70 +- .../QBXML/Schema/Object/EstimateModRq.php | 46 +- .../QBXML/Schema/Object/EstimateQueryRq.php | 40 +- .../QBXML/Schema/Object/HostQueryRq.php | 40 +- .../Object/InventoryAdjustmentAddRq.php | 40 +- .../Object/InventoryAdjustmentQueryRq.php | 40 +- .../QBXML/Schema/Object/InvoiceAddRq.php | 318 +- .../QBXML/Schema/Object/InvoiceModRq.php | 42 +- .../QBXML/Schema/Object/InvoiceQueryRq.php | 40 +- .../QBXML/Schema/Object/ItemDiscountAddRq.php | 40 +- .../QBXML/Schema/Object/ItemDiscountModRq.php | 40 +- .../Schema/Object/ItemDiscountQueryRq.php | 40 +- .../Schema/Object/ItemFixedAssetAddRq.php | 40 +- .../Schema/Object/ItemFixedAssetModRq.php | 40 +- .../Schema/Object/ItemFixedAssetQueryRq.php | 40 +- .../QBXML/Schema/Object/ItemGroupAddRq.php | 40 +- .../QBXML/Schema/Object/ItemGroupModRq.php | 40 +- .../QBXML/Schema/Object/ItemGroupQueryRq.php | 40 +- .../Schema/Object/ItemInventoryAddRq.php | 40 +- .../Schema/Object/ItemInventoryModRq.php | 40 +- .../Schema/Object/ItemInventoryQueryRq.php | 40 +- .../Schema/Object/ItemNonInventoryAddRq.php | 40 +- .../Schema/Object/ItemNonInventoryModRq.php | 40 +- .../Schema/Object/ItemNonInventoryQueryRq.php | 40 +- .../Schema/Object/ItemOtherChargeAddRq.php | 40 +- .../Schema/Object/ItemOtherChargeModRq.php | 40 +- .../Schema/Object/ItemOtherChargeQueryRq.php | 40 +- .../QBXML/Schema/Object/ItemPaymentAddRq.php | 40 +- .../QBXML/Schema/Object/ItemPaymentModRq.php | 40 +- .../Schema/Object/ItemPaymentQueryRq.php | 40 +- .../QBXML/Schema/Object/ItemQueryRq.php | 48 +- .../QBXML/Schema/Object/ItemReceiptAddRq.php | 40 +- .../QBXML/Schema/Object/ItemReceiptModRq.php | 40 +- .../Schema/Object/ItemReceiptQueryRq.php | 40 +- .../QBXML/Schema/Object/ItemSalesTaxAddRq.php | 40 +- .../Schema/Object/ItemSalesTaxGroupAddRq.php | 42 +- .../Schema/Object/ItemSalesTaxGroupModRq.php | 40 +- .../Object/ItemSalesTaxGroupQueryRq.php | 40 +- .../QBXML/Schema/Object/ItemSalesTaxModRq.php | 40 +- .../Schema/Object/ItemSalesTaxQueryRq.php | 40 +- .../QBXML/Schema/Object/ItemServiceAddRq.php | 40 +- .../QBXML/Schema/Object/ItemServiceModRq.php | 40 +- .../Schema/Object/ItemServiceQueryRq.php | 40 +- .../QBXML/Schema/Object/ItemSubtotalAddRq.php | 40 +- .../QBXML/Schema/Object/ItemSubtotalModRq.php | 40 +- .../Schema/Object/ItemSubtotalQueryRq.php | 40 +- .../QBXML/Schema/Object/JobTypeAddRq.php | 40 +- .../QBXML/Schema/Object/JobTypeQueryRq.php | 40 +- .../QBXML/Schema/Object/JournalEntryAddRq.php | 44 +- .../QBXML/Schema/Object/JournalEntryModRq.php | 40 +- .../Schema/Object/JournalEntryQueryRq.php | 40 +- .../Schema/Object/PaymentMethodAddRq.php | 40 +- .../Schema/Object/PaymentMethodQueryRq.php | 40 +- .../Schema/Object/PreferencesQueryRq.php | 42 +- .../QBXML/Schema/Object/PriceLevelAddRq.php | 40 +- .../QBXML/Schema/Object/PriceLevelModRq.php | 40 +- .../QBXML/Schema/Object/PriceLevelQueryRq.php | 40 +- .../Schema/Object/PurchaseOrderAddRq.php | 40 +- .../Schema/Object/PurchaseOrderModRq.php | 40 +- .../Schema/Object/PurchaseOrderQueryRq.php | 40 +- .../Schema/Object/ReceivePaymentAddRq.php | 44 +- .../Schema/Object/ReceivePaymentModRq.php | 40 +- .../Schema/Object/ReceivePaymentQueryRq.php | 40 +- .../QBXML/Schema/Object/SalesOrderAddRq.php | 40 +- .../QBXML/Schema/Object/SalesOrderModRq.php | 40 +- .../QBXML/Schema/Object/SalesOrderQueryRq.php | 40 +- .../QBXML/Schema/Object/SalesReceiptAddRq.php | 360 +- .../QBXML/Schema/Object/SalesReceiptModRq.php | 40 +- .../Schema/Object/SalesReceiptQueryRq.php | 40 +- .../QBXML/Schema/Object/SalesRepAddRq.php | 40 +- .../QBXML/Schema/Object/SalesRepModRq.php | 40 +- .../QBXML/Schema/Object/SalesRepQueryRq.php | 40 +- .../QBXML/Schema/Object/SalesTaxCodeAddRq.php | 40 +- .../Schema/Object/SalesTaxCodeQueryRq.php | 40 +- .../QBXML/Schema/Object/ShipMethodAddRq.php | 40 +- .../QBXML/Schema/Object/ShipMethodQueryRq.php | 40 +- .../QBXML/Schema/Object/SpecialItemAddRq.php | 40 +- .../Schema/Object/StandardTermsAddRq.php | 40 +- .../Schema/Object/StandardTermsQueryRq.php | 40 +- QuickBooks/QBXML/Schema/Object/Template.php | 42 +- QuickBooks/QBXML/Schema/Object/TxnDelRq.php | 40 +- QuickBooks/QBXML/Schema/Object/TxnVoidRq.php | 40 +- .../Schema/Object/UnitOfMeasureSetAddRq.php | 48 +- .../Schema/Object/UnitOfMeasureSetQueryRq.php | 40 +- .../QBXML/Schema/Object/VehicleAddRq.php | 40 +- .../Schema/Object/VehicleMileageAddRq.php | 40 +- .../Schema/Object/VehicleMileageQueryRq.php | 40 +- .../QBXML/Schema/Object/VehicleModRq.php | 40 +- .../QBXML/Schema/Object/VehicleQueryRq.php | 40 +- .../QBXML/Schema/Object/VendorAddRq.php | 38 +- .../QBXML/Schema/Object/VendorCreditAddRq.php | 40 +- .../Schema/Object/VendorCreditQueryRq.php | 40 +- .../QBXML/Schema/Object/VendorModRq.php | 38 +- .../QBXML/Schema/Object/VendorQueryRq.php | 40 +- .../QBXML/Schema/Object/VendorTypeAddRq.php | 40 +- .../QBXML/Schema/Object/VendorTypeQueryRq.php | 40 +- .../Schema/Object/WorkersCompCodeAddRq.php | 40 +- .../Schema/Object/WorkersCompCodeModRq.php | 40 +- .../Schema/Object/WorkersCompCodeQueryRq.php | 40 +- .../QBXML/Schema/Object/tmp/CustomerAddRq.php | 40 +- .../QBXML/Schema/Object/tmp/CustomerModRq.php | 40 +- .../Schema/Object/tmp/CustomerQueryRq.php | 40 +- .../QBXML/Schema/Object/tmp/InvoiceAddRq.php | 46 +- .../QBXML/Schema/Object/tmp/InvoiceModRq.php | 40 +- .../Schema/Object/tmp/InvoiceQueryRq.php | 40 +- QuickBooks/SOAP/Server.php | 112 +- QuickBooks/SQL.php | 100 +- QuickBooks/SQL/Object.php | 52 +- QuickBooks/SQL/Schema.php | 3762 ++++++++--------- QuickBooks/Status/Report.php | 300 +- QuickBooks/UnitTest.php | 104 +- QuickBooks/UnitTest/Result.php | 22 +- QuickBooks/User.php | 2 +- QuickBooks/Utilities.php | 1014 ++--- QuickBooks/WebConnector/QWC.php | 160 +- QuickBooks/WebConnector/Queue.php | 190 +- QuickBooks/WebConnector/Request.php | 10 +- .../WebConnector/Request/Authenticate.php | 16 +- .../WebConnector/Request/Clientversion.php | 14 +- .../WebConnector/Request/Closeconnection.php | 18 +- .../WebConnector/Request/Connectionerror.php | 18 +- .../WebConnector/Request/Getlasterror.php | 18 +- .../Request/Receiveresponsexml.php | 24 +- .../WebConnector/Request/Sendrequestxml.php | 28 +- .../WebConnector/Request/Serverversion.php | 18 +- QuickBooks/WebConnector/Result.php | 14 +- .../WebConnector/Result/Authenticate.php | 18 +- .../WebConnector/Result/ClientVersion.php | 14 +- .../WebConnector/Result/CloseConnection.php | 14 +- .../WebConnector/Result/ConnectionError.php | 14 +- QuickBooks/WebConnector/Result/Debug.php | 14 +- .../WebConnector/Result/GetInteractiveURL.php | 14 +- .../WebConnector/Result/GetLastError.php | 14 +- .../WebConnector/Result/InteractiveDone.php | 14 +- .../Result/InteractiveRejected.php | 10 +- .../Result/ReceiveResponseXML.php | 14 +- .../WebConnector/Result/SendRequestXML.php | 14 +- .../WebConnector/Result/ServerVersion.php | 14 +- QuickBooks/WebConnector/Server.php | 266 +- QuickBooks/XML.php | 208 +- QuickBooks/XML/Backend.php | 22 +- QuickBooks/XML/Backend/Builtin.php | 156 +- QuickBooks/XML/Backend/Simplexml.php | 50 +- QuickBooks/XML/Document.php | 28 +- QuickBooks/XML/Parser.php | 6 +- data/schema/InventoryAdjustmentQuery.xml | 8 +- data/schema/InvoiceQuery.xml | 2 +- data/schema/TermsQuery.xml | 4 +- dev/DO_NOT_USE_THESE_FILES.txt | 2 +- dev/dev_ids_accounts.php | 4 +- dev/dev_ids_customers.php | 16 +- dev/dev_ids_discounts.php | 12 +- dev/dev_ids_employees.php | 6 +- dev/dev_ids_errors.php | 4 +- dev/dev_ids_estimates.php | 16 +- dev/dev_ids_invoices.php | 4 +- dev/dev_ids_items.php | 4 +- dev/dev_ids_phones.php | 2 +- dev/dev_ids_reports.php | 10 +- dev/dev_ids_salesreceipt.php | 4 +- dev/dev_ids_shipmethods.php | 4 +- dev/dev_ids_uom.php | 6 +- dev/dev_ipp_assert.php | 10 +- dev/dev_ipp_cache.php | 6 +- dev/dev_ipp_db.php | 4 +- dev/dev_ipp_getuserinfo.php | 4 +- dev/dev_ipp_idsrealm.php | 2 +- dev/dev_ipp_renameapp.php | 4 +- dev/dev_qbwc_tester.php | 74 +- dev/dev_qbxml_encoding.php | 12 +- dev/dev_xml_performance.php | 8 +- dev/example_ids_items.php | 4 +- dev/parse_inventory.php | 114 +- dev/test_cast.php | 18 +- dev/test_guess_paymentmethod.php | 20 +- .../example_merchant_service.php | 214 +- .../example_merchant_service_authcapture.php | 104 +- .../example_merchant_service_checks.php | 34 +- .../example_merchant_service_wallet.php | 16 +- docs/misc/example_xml.php | 32 +- .../example_app_ipp_v2/config.php | 38 +- .../example_app_ipp_v2/disconnect.php | 8 +- .../example_customer_add.php | 20 +- .../example_customer_query.php | 22 +- .../example_sync_status.php | 14 +- .../example_app_ipp_v2/index.php | 6 +- .../example_app_ipp_v2/oauth.php | 10 +- .../example_app_ipp_v2/success.php | 2 +- .../example_app_ipp_v3/debugging.php | 8 +- .../example_app_ipp_v3/disconnect.php | 8 +- .../example_app_ipp_v3/example_bill_add.php | 2 +- .../example_bill_payment_query.php | 4 +- .../example_app_ipp_v3/example_bill_query.php | 2 +- .../example_app_ipp_v3/example_cdc.php | 12 +- .../example_class_query.php | 4 +- .../example_company_info_get.php | 4 +- .../example_customer_count.php | 2 +- .../example_employee_query.php | 2 +- .../example_entitlements.php | 4 +- .../example_escaped_customer_query.php | 4 +- .../example_invoice_delete.php | 2 +- .../example_invoice_update.php | 2 +- .../example_invoice_w_lines_query.php | 2 +- .../example_invoices_for_customer_query.php | 2 +- .../example_item_update.php | 2 +- .../example_app_ipp_v3/example_job_query.php | 2 +- .../example_journalentry_query.php | 2 +- .../example_payment_add.php | 4 +- .../example_payment_delete.php | 2 +- .../example_payment_void.php | 6 +- .../example_salesreceipt_query.php | 2 +- .../example_app_ipp_v3/example_time_add.php | 2 +- .../example_app_ipp_v3/example_time_query.php | 2 +- .../example_app_ipp_v3/reconnect.php | 4 +- .../example_app_ipp_v3/success.php | 2 +- docs/payments/config.php | 44 +- docs/payments/disconnect.php | 8 +- docs/payments/example_creditcard_contexts.php | 20 +- docs/payments/example_creditcard_fail.php | 4 +- docs/payments/index.php | 22 +- docs/payments/oauth.php | 10 +- docs/payments/reconnect.php | 4 +- docs/payments/success.php | 2 +- docs/qbxml/example_object_to_qbxml.php | 78 +- .../example_object_to_qbxml_versions.php | 16 +- docs/qbxml/example_qbxml_cast.php | 24 +- docs/qbxml/example_qbxml_to_object.php | 14 +- .../example_app_web_connector/READ ME.txt | 18 +- .../example_app_web_connector/config.php | 16 +- .../example_app_web_connector/form.php | 10 +- .../example_app_web_connector/functions.php | 36 +- .../example_app_web_connector/handler.php | 26 +- .../example_app_web_connector/qbwc.php | 18 +- .../config/quickbooks.php | 8 +- .../controllers/mydemo.php | 36 +- .../controllers/quickbooks.php | 97 +- .../mockci.php | 52 +- .../models/quickbooks.php | 6 +- .../DRUPAL 7 READ ME.txt | 18 +- .../application/bootstrap.php | 9 +- .../classes/controller/qbapi/quickbooks.php | 54 +- .../classes/controller/qbapi/qwc.php | 30 +- .../classes/controller/quickbooks.php | 6 +- .../application/classes/model/qbdata.php | 18 +- .../config/database.php | 10 +- docs/web_connector/example_mssql_mirror.php | 90 +- docs/web_connector/example_mysql_mirror.php | 200 +- .../example_mysql_mirror_qwc.php | 10 +- docs/web_connector/example_pgsql_mirror.php | 148 +- .../example_pgsql_mirror_qwc.php | 10 +- docs/web_connector/example_web_connector.php | 350 +- .../example_web_connector_auth.php | 44 +- .../example_web_connector_custom_fields.php | 166 +- .../example_web_connector_import.php | 460 +- .../example_web_connector_minimal.php | 28 +- .../example_web_connector_oop.php | 206 +- .../example_web_connector_point_of_sale.php | 50 +- .../example_web_connector_queueing.php | 32 +- .../example_web_connector_qwc.php | 10 +- .../example_web_connector_timetracking.php | 36 +- pom.xml | 4 +- 633 files changed, 17152 insertions(+), 17154 deletions(-) diff --git a/LICENSE.TXT b/LICENSE.TXT index 68a14c4b..8368624a 100644 --- a/LICENSE.TXT +++ b/LICENSE.TXT @@ -1,14 +1,14 @@ Eclipse Public License -v 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC +LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 1. DEFINITIONS "Contribution" means: -a) in the case of the initial Contributor, the initial code and documentation +a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and b) in the case of each subsequent Contributor: @@ -17,82 +17,82 @@ i) changes to the Program, and ii) additions to the Program; -where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from a -Contributor if it was added to the Program by such Contributor itself or anyone -acting on such Contributor's behalf. Contributions do not include additions to -the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are +where such changes and/or additions to the Program originate from and are +distributed by that particular Contributor. A Contribution 'originates' from a +Contributor if it was added to the Program by such Contributor itself or anyone +acting on such Contributor's behalf. Contributions do not include additions to +the Program which: (i) are separate modules of software distributed in +conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. "Contributor" means any person or entity that distributes the Program. -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when +"Licensed Patents " mean patent claims licensable by a Contributor which are +necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. "Program" means the Contributions distributed in accordance with this Agreement. -"Recipient" means anyone who receives the Program under this Agreement, +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. 2. GRANT OF RIGHTS -a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, -prepare derivative works of, publicly display, publicly perform, distribute -and sublicense the Contribution of such Contributor, if any, and such derivative +a) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, +prepare derivative works of, publicly display, publicly perform, distribute +and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. -b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, such -addition of the Contribution causes such combination to be covered by the -Licensed Patents. The patent license shall not apply to any other combinations +b) Subject to the terms of this Agreement, each Contributor hereby grants +Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed +Patents to make, use, sell, offer to sell, import and otherwise transfer the +Contribution of such Contributor, if any, in source code and object code form. +This patent license shall apply to the combination of the Contribution and the +Program if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by the +Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. -c) Recipient understands that although each Contributor grants the licenses to -its Contributions set forth herein, no assurances are provided by any Contributor -that the Program does not infringe the patent or other intellectual property -rights of any other entity. Each Contributor disclaims any liability to Recipient -for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, each Recipient hereby assumes sole responsibility -to secure any other intellectual property rights needed, if any. For example, -if a third party patent license is required to allow Recipient to distribute -the Program, it is Recipient's responsibility to acquire that license before +c) Recipient understands that although each Contributor grants the licenses to +its Contributions set forth herein, no assurances are provided by any Contributor +that the Program does not infringe the patent or other intellectual property +rights of any other entity. Each Contributor disclaims any liability to Recipient +for claims brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the rights and +licenses granted hereunder, each Recipient hereby assumes sole responsibility +to secure any other intellectual property rights needed, if any. For example, +if a third party patent license is required to allow Recipient to distribute +the Program, it is Recipient's responsibility to acquire that license before distributing the Program. -d) Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth in +d) Each Contributor represents that to its knowledge it has sufficient copyright +rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. 3. REQUIREMENTS -A Contributor may choose to distribute the Program in object code form under its +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: a) it complies with the terms and conditions of this Agreement; and b) its license agreement: -i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title and -non-infringement, and implied warranties or conditions of merchantability and +i) effectively disclaims on behalf of all Contributors all warranties and +conditions, express and implied, including warranties or conditions of title and +non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; -ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential +ii) effectively excludes on behalf of all Contributors all liability for +damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; -iii) states that any provisions which differ from this Agreement are offered +iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and -iv) states that source code for the Program is available from such -Contributor, and informs licensees how to obtain it in a reasonable manner on +iv) states that source code for the Program is available from such +Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. When the Program is made available in source code form: @@ -101,109 +101,109 @@ a) it must be made available under this Agreement; and b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained within +Contributors may not remove or alter any copyright notices contained within the Program. -Each Contributor must identify itself as the originator of its Contribution, -if any, in a manner that reasonably allows subsequent Recipients to identify +Each Contributor must identify itself as the originator of its Contribution, +if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. 4. COMMERCIAL DISTRIBUTION -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor who -includes the Program in a commercial product offering should do so in a manner -which does not create potential liability for other Contributors. Therefore, -if a Contributor includes the Program in a commercial product offering, such -Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, -damages and costs (collectively "Losses") arising from claims, lawsuits and -other legal actions brought by a third party against the Indemnified -Contributor to the extent caused by the acts or omissions of such Commercial -Contributor in connection with its distribution of the Program in a commercial -product offering. The obligations in this section do not apply to any claims -or Losses relating to any actual or alleged intellectual property infringement. -In order to qualify, an Indemnified Contributor must: a) promptly notify the -Commercial Contributor in writing of such claim, and b) allow the Commercial -Contributor to control, and cooperate with the Commercial Contributor in, the -defense and any related settlement negotiations. The Indemnified Contributor +Commercial distributors of software may accept certain responsibilities with +respect to end users, business partners and the like. While this license is +intended to facilitate the commercial use of the Program, the Contributor who +includes the Program in a commercial product offering should do so in a manner +which does not create potential liability for other Contributors. Therefore, +if a Contributor includes the Program in a commercial product offering, such +Contributor ("Commercial Contributor") hereby agrees to defend and indemnify +every other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits and +other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such Commercial +Contributor in connection with its distribution of the Program in a commercial +product offering. The obligations in this section do not apply to any claims +or Losses relating to any actual or alleged intellectual property infringement. +In order to qualify, an Indemnified Contributor must: a) promptly notify the +Commercial Contributor in writing of such claim, and b) allow the Commercial +Contributor to control, and cooperate with the Commercial Contributor in, the +defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If that -Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such -Commercial Contributor's responsibility alone. Under this section, the -Commercial Contributor would have to defend claims against the other -Contributors related to those performance claims and warranties, and if a court -requires any other Contributor to pay any damages as a result, the Commercial +For example, a Contributor might include the Program in a commercial product +offering, Product X. That Contributor is then a Commercial Contributor. If that +Commercial Contributor then makes performance claims, or offers warranties +related to Product X, those performance claims and warranties are such +Commercial Contributor's responsibility alone. Under this section, the +Commercial Contributor would have to defend claims against the other +Contributors related to those performance claims and warranties, and if a court +requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. 5. NO WARRANTY -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, -NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each -Recipient is solely responsible for determining the appropriateness of using -and distributing the Program and assumes all risks associated with its exercise -of rights under this Agreement , including but not limited to the risks and -costs of program errors, compliance with applicable laws, damage to or loss of +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each +Recipient is solely responsible for determining the appropriateness of using +and distributing the Program and assumes all risks associated with its exercise +of rights under this Agreement , including but not limited to the risks and +costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. 6. DISCLAIMER OF LIABILITY -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY +CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION +LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. GENERAL -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of the -terms of this Agreement, and without further action by the parties hereto, such -provision shall be reformed to the minimum extent necessary to make such +If any provision of this Agreement is invalid or unenforceable under applicable +law, it shall not affect the validity or enforceability of the remainder of the +terms of this Agreement, and without further action by the parties hereto, such +provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -If Recipient institutes patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Program itself -(excluding combinations of the Program with other software or hardware) -infringes such Recipient's patent(s), then such Recipient's rights granted +If Recipient institutes patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Program itself +(excluding combinations of the Program with other software or hardware) +infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and does -not cure such failure in a reasonable period of time after becoming aware of -such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as -reasonably practicable. However, Recipient's obligations under this Agreement -and any licenses granted by Recipient relating to the Program shall continue +All Recipient's rights under this Agreement shall terminate if it fails to +comply with any of the material terms or conditions of this Agreement and does +not cure such failure in a reasonable period of time after becoming aware of +such noncompliance. If all Recipient's rights under this Agreement terminate, +Recipient agrees to cease use and distribution of the Program as soon as +reasonably practicable. However, Recipient's obligations under this Agreement +and any licenses granted by Recipient relating to the Program shall continue and survive. -Everyone is permitted to copy and distribute copies of this Agreement, but in -order to avoid inconsistency the Agreement is copyrighted and may only be -modified in the following manner. The Agreement Steward reserves the right to -publish new versions (including revisions) of this Agreement from time to time. -No one other than the Agreement Steward has the right to modify this Agreement. -The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation -may assign the responsibility to serve as the Agreement Steward to a suitable -separate entity. Each new version of the Agreement will be given a distinguishing -version number. The Program (including Contributions) may always be distributed -subject to the version of the Agreement under which it was received. In addition, -after a new version of the Agreement is published, Contributor may elect to -distribute the Program (including its Contributions) under the new version. -Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives -no rights or licenses to the intellectual property of any Contributor under -this Agreement, whether expressly, by implication, estoppel or otherwise. All +Everyone is permitted to copy and distribute copies of this Agreement, but in +order to avoid inconsistency the Agreement is copyrighted and may only be +modified in the following manner. The Agreement Steward reserves the right to +publish new versions (including revisions) of this Agreement from time to time. +No one other than the Agreement Steward has the right to modify this Agreement. +The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation +may assign the responsibility to serve as the Agreement Steward to a suitable +separate entity. Each new version of the Agreement will be given a distinguishing +version number. The Program (including Contributions) may always be distributed +subject to the version of the Agreement under which it was received. In addition, +after a new version of the Agreement is published, Contributor may elect to +distribute the Program (including its Contributions) under the new version. +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives +no rights or licenses to the intellectual property of any Contributor under +this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to this -Agreement will bring a legal action under this Agreement more than one year -after the cause of action arose. Each party waives its rights to a jury trial +This Agreement is governed by the laws of the State of New York and the +intellectual property laws of the United States of America. No party to this +Agreement will bring a legal action under this Agreement more than one year +after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/QuickBooks.php b/QuickBooks.php index 66f97007..7f4a1588 100755 --- a/QuickBooks.php +++ b/QuickBooks.php @@ -1,37 +1,37 @@ qbXML Validator (the QuickBooks Web Connector error log shows almost no debugging information, run your XML through the Validator and it will tell you *exactly* what the error in your XML stream is) * - Your version of QuickBooks might not support the latest version of the qbXML SDK, so you might have to set the qbXML message version with: (try 2.0 or another low number if you get error messages about versions) * - Check our the QuickBooks_Utilities class, it contains a few helpful static methods - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks */ /** - * + * */ define('QUICKBOOKS_TIMESTAMP', microtime(true)); /** - * + * */ define('QUICKBOOKS_BASEDIR', dirname(__FILE__)); @@ -47,20 +47,20 @@ if (function_exists('date_default_timezone_get')) { @date_default_timezone_get(); - - if (function_exists('error_get_last') and - $arrerr = error_get_last() and + + if (function_exists('error_get_last') and + $arrerr = error_get_last() and substr($arrerr['message'], 0, strlen('date_default_timezone_get')) == 'date_default_timezone_get') { - // Ooops, they never set their time-zone and PHP is warning them about - // this! Let's try to auto-set their timezone, and set a flag so that - // they can find out what's going wrong later. - + // Ooops, they never set their time-zone and PHP is warning them about + // this! Let's try to auto-set their timezone, and set a flag so that + // they can find out what's going wrong later. + /** - * + * */ define('QUICKBOOKS_TIMEZONE_AUTOSET', true); - + date_default_timezone_set('America/New_York'); } } @@ -68,7 +68,7 @@ if (!defined('QUICKBOOKS_TIMEZONE_AUTOSET')) { /** - * + * */ define('QUICKBOOKS_TIMEZONE_AUTOSET', false); } @@ -92,7 +92,7 @@ define('QUICKBOOKS_PACKAGE_NAME', 'QuickBooks PHP DevKit'); /** - * The version of this QuickBooks package + * The version of this QuickBooks package * @var string */ define('QUICKBOOKS_PACKAGE_VERSION', '3.0'); @@ -136,7 +136,7 @@ if (!defined('QUICKBOOKS_WSDL')) { /** - * Path to the QuickBooks WSDL file (the default WSDL is included with this package, you shouldn't need to override this generally) + * Path to the QuickBooks WSDL file (the default WSDL is included with this package, you shouldn't need to override this generally) * @var string */ define('QUICKBOOKS_WSDL', dirname(__FILE__) . '/QuickBooks/QBWebConnectorSvc.wsdl'); @@ -155,7 +155,7 @@ { /** * Debug log (unsupported?) - * + * * @deprecated * @var string */ @@ -204,12 +204,12 @@ */ /** - * + * */ define('QUICKBOOKS_TYPE_QBFS', 'QBFS'); /** - * + * */ define('QUICKBOOKS_TYPE_QBPOS', 'QBPOS'); @@ -225,9 +225,9 @@ define('QUICKBOOKS_SUPPORTED_DEFAULT', ''); define('QUICKBOOKS_SUPPORTED_ALL', '0x0'); -define('QUICKBOOKS_SUPPORTED_SIMPLESTART', '0x1'); -define('QUICKBOOKS_SUPPORTED_PRO', '0x2'); -define('QUICKBOOKS_SUPPORTED_PREMIER', '0x4'); +define('QUICKBOOKS_SUPPORTED_SIMPLESTART', '0x1'); +define('QUICKBOOKS_SUPPORTED_PRO', '0x2'); +define('QUICKBOOKS_SUPPORTED_PREMIER', '0x4'); define('QUICKBOOKS_SUPPORTED_ENTERPRISE', '0x8'); define('QUICKBOOKS_PERSONALDATA_DEFAULT', ''); @@ -267,9 +267,9 @@ /** * QuickBooks flag to request to enter "Interactive Mode" - * + * * *** DO NOT CHANGE THIS *** This is a required QuickBooks-defined constant that is neccessary for interactive mode requests - * + * * @var string */ /* @@ -277,7 +277,7 @@ */ /** - * + * */ define('QUICKBOOKS_NOOP', 'NoOp'); @@ -506,10 +506,10 @@ /** * Job constant in QuickBooks - * - * In actuality, there are no such thing as "Jobs" in QuickBooks. Jobs in - * QuickBooks are handled as customers with parent customers. - * + * + * In actuality, there are no such thing as "Jobs" in QuickBooks. Jobs in + * QuickBooks are handled as customers with parent customers. + * * @var string */ define('QUICKBOOKS_OBJECT_JOB', 'Job'); @@ -758,7 +758,7 @@ define('QUICKBOOKS_DELETE_LIST', QUICKBOOKS_DEL_LIST); /** - * + * */ define('QUICKBOOKS_OBJECT_TIMETRACKING', 'TimeTracking'); define('QUICKBOOKS_ADD_TIMETRACKING','TimeTrackingAdd'); @@ -826,15 +826,15 @@ define('QUICKBOOKS_IMPORT_UNITOFMEASURESET', 'UnitOfMeasureSetImport'); /** - * An always-present QuickBooks constant for "TAXABLE" items to embed in "SalesTaxCodeRef FullName" qbXML values - * + * An always-present QuickBooks constant for "TAXABLE" items to embed in "SalesTaxCodeRef FullName" qbXML values + * * @var string */ define('QUICKBOOKS_TAXABLE', 'TAX'); /** * An always-present QuickBooks constant for "NON-TAXABLE" items to embed in "SalesTaxCodeRef FullName" qbXML values - * + * * @var string */ define('QUICKBOOKS_NONTAXABLE', 'NON'); @@ -874,10 +874,10 @@ define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_PETTYCASH', 'PettyCash'); define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_PURCHASEORDERS', 'PurchaseOrders'); define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_RECONCILIATIONDIFFERENCES', 'ReconciliationDifferences'); -define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_RETAINEDEARNINGS', 'RetainedEarnings'); +define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_RETAINEDEARNINGS', 'RetainedEarnings'); define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_SALESORDERS', 'SalesOrders'); define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_SALESTAXPAYABLE', 'SalesTaxPayable'); -define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_UNCATEGORIZEDEXPENSES', 'UncategorizedExpenses'); +define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_UNCATEGORIZEDEXPENSES', 'UncategorizedExpenses'); define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_UNCATEGORIZEDINCOME', 'UncategorizedIncome'); define('QUICKBOOKS_ACCOUNT_SPECIALACCOUNTTYPE_UNDEPOSITEDFUNDS', 'UndepositedFunds'); @@ -891,10 +891,10 @@ define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASURETYPE_AREA', 'Area'); define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_COUNT', 'Count'); -define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_LENGTH', 'Length'); -define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_OTHER', 'Other'); +define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_LENGTH', 'Length'); +define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_OTHER', 'Other'); define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_TIME', 'Time'); -define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_VOLUME', 'Volume'); +define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_VOLUME', 'Volume'); define('QUICKBOOKS_UNITOFMEASURESET_UNITOFMEASTURETYPE_WEIGHT', 'Weight'); define('QUICKBOOKS_REPORT_GENERAL_SUMMARY', 'GeneralSummaryReportQuery'); @@ -951,7 +951,7 @@ define('QUICKBOOKS_STATUS_NOOP', 'n'); /** - * Error code for errors that are not really errors... + * Error code for errors that are not really errors... * @var integer */ define('QUICKBOOKS_ERROR_OK', 0); @@ -993,7 +993,7 @@ define('QUICKBOOKS_USER_DISABLED', 'd'); /** - * + * */ require_once QUICKBOOKS_BASEDIR . '/QuickBooks/Loader.php'; @@ -1011,7 +1011,7 @@ if (!defined('QUICKBOOKS_FRAMEWORKS')) { $all = 0; - + $constants = get_defined_constants(true); foreach ($constants['user'] as $constant => $value) { @@ -1020,7 +1020,7 @@ $all = $all | $value; } } - + /** * Determines which frameworks are included (if not defined, this defines it to include *everything*) * @var integer @@ -1028,11 +1028,11 @@ define('QUICKBOOKS_FRAMEWORKS', $all); } -if (QUICKBOOKS_FRAMEWORKS & QUICKBOOKS_FRAMEWORK_QUEUE or +if (QUICKBOOKS_FRAMEWORKS & QUICKBOOKS_FRAMEWORK_QUEUE or QUICKBOOKS_FRAMEWORKS & QUICKBOOKS_FRAMEWORK_WEBCONNECTOR) { /** - * Queue class for QuickBooks queueing + * Queue class for QuickBooks queueing */ QuickBooks_Loader::load('/QuickBooks/WebConnector/Queue.php'); } @@ -1043,12 +1043,12 @@ * SOAP server for QuickBooks web services */ QuickBooks_Loader::load('/QuickBooks/WebConnector/Server.php'); - + /** * Web Connector generation */ QuickBooks_Loader::load('/QuickBooks/WebConnector/QWC.php'); - + /** * Various QuickBooks utility classes */ @@ -1058,13 +1058,13 @@ if (QUICKBOOKS_FRAMEWORKS & QUICKBOOKS_FRAMEWORK_IPP) { /** - * + * */ QuickBooks_Loader::load('/QuickBooks/IPP.php'); } -if (QUICKBOOKS_FRAMEWORK_MISCELLANEOUS & QUICKBOOKS_FRAMEWORKS or - QUICKBOOKS_FRAMEWORK_ONLINEEDITION & QUICKBOOKS_FRAMEWORKS or +if (QUICKBOOKS_FRAMEWORK_MISCELLANEOUS & QUICKBOOKS_FRAMEWORKS or + QUICKBOOKS_FRAMEWORK_ONLINEEDITION & QUICKBOOKS_FRAMEWORKS or QUICKBOOKS_FRAMEWORK_MERCHANTSERVICE & QUICKBOOKS_FRAMEWORKS) { /** @@ -1076,7 +1076,7 @@ if (QUICKBOOKS_FRAMEWORK_CONSTANTS != QUICKBOOKS_FRAMEWORKS) { /** - * Functions for calling callback functions + * Functions for calling callback functions */ QuickBooks_Loader::load('/QuickBooks/Callbacks.php'); } @@ -1084,7 +1084,7 @@ if (QUICKBOOKS_FRAMEWORK_MISCELLANEOUS & QUICKBOOKS_FRAMEWORKS) { /** - * Utilities for ensuring values fit into qbXML fields + * Utilities for ensuring values fit into qbXML fields */ QuickBooks_Loader::load('/QuickBooks/Cast.php'); } diff --git a/QuickBooks/Adapter/Client.php b/QuickBooks/Adapter/Client.php index 28853c42..d7d013e8 100755 --- a/QuickBooks/Adapter/Client.php +++ b/QuickBooks/Adapter/Client.php @@ -2,35 +2,35 @@ /** * Client adapter base class - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Adapter */ /** - * + * */ interface QuickBooks_Adapter_Client { public function __construct($endpoint, $wsdl = QUICKBOOKS_WSDL, $trace = true); - + public function authenticate($user, $pass); - + public function sendRequestXML($ticket, $hcpresponse, $companyfile, $country, $majorversion, $minorversion); - + public function receiveResponseXML($ticket, $response, $hresult, $message); - + public function getLastRequest(); - + public function getLastResponse(); - + } diff --git a/QuickBooks/Adapter/Client/Php.php b/QuickBooks/Adapter/Client/Php.php index 4cbbe501..576a59a0 100755 --- a/QuickBooks/Adapter/Client/Php.php +++ b/QuickBooks/Adapter/Client/Php.php @@ -1,48 +1,48 @@ * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Adapter */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/Adapter/Client.php'); /** - * + * */ class QuickBooks_Adapter_Client_Php extends SoapClient implements QuickBooks_Adapter_Client { public function __construct($endpoint, $wsdl = QUICKBOOKS_WSDL, $trace = true) { ini_set('soap.wsdl_cache_enabled', '0'); - + $options['location'] = $endpoint; - + if ($trace) { $options['trace'] = 1; } - + parent::__construct($wsdl, $options); } - + /** * Authenticate against a QuickBooks SOAP server - * + * * @param string $user * @param string $pass * @return array @@ -50,42 +50,42 @@ public function __construct($endpoint, $wsdl = QUICKBOOKS_WSDL, $trace = true) public function authenticate($user, $pass) { $req = new QuickBooks_Request_Authenticate($user, $pass); - + $resp = parent::__soapCall('authenticate', array( $req )); $tmp = current($resp); - + return current($tmp); } - + public function sendRequestXML($ticket, $hcpresponse, $companyfile, $country, $majorversion, $minorversion) { $req = new QuickBooks_Request_SendRequestXML($ticket, $hcpresponse, $companyfile, $country, $majorversion, $minorversion); - + //print("SENDING:
");
 		//print_r($req);
 		//print('
'); - + $resp = parent::__soapCall('sendRequestXML', array( $req )); $tmp = current($resp); - + return $tmp; } - + public function receiveResponseXML($ticket, $response, $hresult, $message) { $req = new QuickBooks_Request_ReceiveResponseXML($ticket, $response, $hresult, $message); - + $resp = parent::__soapCall('receiveResponseXML', array( $req )); $tmp = current($resp); - + return $tmp; } - + public function getLastRequest() { return parent::__getLastRequest(); } - + public function getLastResponse() { return parent::__getLastResponse(); diff --git a/QuickBooks/Adapter/Server.php b/QuickBooks/Adapter/Server.php index e7ad3323..2401d567 100755 --- a/QuickBooks/Adapter/Server.php +++ b/QuickBooks/Adapter/Server.php @@ -2,23 +2,23 @@ /** * QuickBooks Server-Adapter interface - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * - * SOAP servers and clients within the QuickBooks class are not accessed - * directly, but instead via Adapter classes so that we can support more than + * + * SOAP servers and clients within the QuickBooks class are not accessed + * directly, but instead via Adapter classes so that we can support more than * one PHP SOAP server and client type (nuSOAP, PEAR SOAP, PHP ext/soap, etc.) - * - * This is the interface for the server adapters. All supported SOAP servers - * must implement this interface to function with the QuickBooks framework. - * + * + * This is the interface for the server adapters. All supported SOAP servers + * must implement this interface to function with the QuickBooks framework. + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Adapter */ @@ -30,32 +30,32 @@ interface QuickBooks_Adapter_Server { /** * Create a new instance of the server adapter - * + * * @param string $wsdl The path to the WSDL * @param array $soap_options Any SOAP configuration options to pass to the server class */ public function __construct($wsdl, $soap_options); - + /** * Handle a SOAP request - * + * * @param string $raw_http_input * @return boolean */ public function handle($raw_http_input); - + /** * Return a list of implemented SOAP methods/functions - * + * * @return array */ public function getFunctions(); - + /** * Set a class whose methods will handle various SOAP methods/functions - * + * * @param string $class The name of the class - * @param string $dsn_or_conn + * @param string $dsn_or_conn * @param array $map * @param array $onerror * @param array $hooks diff --git a/QuickBooks/Adapter/Server/Builtin.php b/QuickBooks/Adapter/Server/Builtin.php index 418fd925..696a06ac 100755 --- a/QuickBooks/Adapter/Server/Builtin.php +++ b/QuickBooks/Adapter/Server/Builtin.php @@ -2,16 +2,16 @@ /** * Adapter class for the built-in QuickBooks SOAP server - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Adapter */ @@ -27,7 +27,7 @@ QuickBooks_Loader::load('/QuickBooks/SOAP/Server.php'); /** - * + * */ class QuickBooks_Adapter_Server_Builtin implements QuickBooks_Adapter_Server { @@ -35,10 +35,10 @@ class QuickBooks_Adapter_Server_Builtin implements QuickBooks_Adapter_Server * QuickBooks_SOAP_Server built-in SOAP server instance */ protected $_server; - + /** * Create a new adapter for the built-in SOAP server - * + * * @param string $wsdl The path to the WSDL file * @param array $soap_options An array of SOAP server options */ @@ -46,10 +46,10 @@ public function __construct($wsdl, $soap_options) { $this->_server = new QuickBooks_SOAP_Server($wsdl, $soap_options); } - + /** * Handle an incoming SOAP request - * + * * @param string $raw_http_input A string SOAP request * @return string A string containing XML SOAP output */ @@ -57,21 +57,21 @@ public function handle($raw_http_input) { return $this->_server->handle($raw_http_input); } - + /** - * - * - * + * + * + * */ public function setClass($class, $dsn_or_conn, $map, $onerror, $hooks, $log_level, $raw_http_input, $handler_options, $driver_options, $callback_options) { return $this->_server->setClass($class, $dsn_or_conn, $map, $onerror, $hooks, $log_level, $raw_http_input, $handler_options, $driver_options, $callback_options); } - - /** - * - * - * + + /** + * + * + * */ public function getFunctions() { diff --git a/QuickBooks/Adapter/Server/Php.php b/QuickBooks/Adapter/Server/Php.php index 13ce9a4c..0fce6fa7 100755 --- a/QuickBooks/Adapter/Server/Php.php +++ b/QuickBooks/Adapter/Server/Php.php @@ -2,47 +2,47 @@ /** * Adapter class for the PHP SOAP ext/soap SOAP server - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Adapter */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/Adapter/Server.php'); /** - * + * */ class QuickBooks_Adapter_Server_Php implements QuickBooks_Adapter_Server { protected $_server; - + public function __construct($wsdl, $soap_options) { $this->_server = new SoapServer($wsdl, $soap_options); } - + public function handle($raw_http_input) { return $this->_server->handle($raw_http_input); } - + public function setClass($class, $dsn_or_conn, $map, $onerror, $hooks, $log_level, $raw_http_input, $handler_options, $driver_options, $callback_options) { return $this->_server->setClass($class, $dsn_or_conn, $map, $onerror, $hooks, $log_level, $raw_http_input, $handler_options, $driver_options, $callback_options); } - + public function getFunctions() { return $this->_server->getFunctions(); diff --git a/QuickBooks/Callbacks/API/Callbacks.php b/QuickBooks/Callbacks/API/Callbacks.php index 5268c9c9..1e99444d 100755 --- a/QuickBooks/Callbacks/API/Callbacks.php +++ b/QuickBooks/Callbacks/API/Callbacks.php @@ -2,16 +2,16 @@ /** * Static callback methods for the API server - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Callbacks */ @@ -25,7 +25,7 @@ QuickBooks_Loader::load('/QuickBooks/Utilities.php'); /** - * QuickBooks XML parser class + * QuickBooks XML parser class */ QuickBooks_Loader::load('/QuickBooks/XML/Parser.php'); @@ -35,7 +35,7 @@ QuickBooks_Loader::load('/QuickBooks/Object.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/Callbacks.php'); @@ -45,8 +45,8 @@ class QuickBooks_Callbacks_API_Callbacks { /** - * - * + * + * * @param string $xml * @param string $version * @param string $locale @@ -59,24 +59,24 @@ protected static function _replacements($xml, $version, $locale, $requestID, $on { $version = $locale . $version; } - + $xml = str_replace('{$version}', $version, $xml); $xml = str_replace('{$locale}', $locale, $xml); $xml = str_replace('{$requestID}', $requestID, $xml); $xml = str_replace('{$onerror}', $onerror, $xml); - + return $xml; } - - + + /** * Create a mapping between an application's primary key and a QuickBooks object - * + * * @param string $type The type of QuickBooks object (i.e.: QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_OBJECT_INVOICE, etc.) * @param mixed $ID The primary key of the application record * @param string $ListID_or_TxnID The ListID or TxnID of the object within QuickBooks * @param string $editsequence The EditSequence of the object within QuickBooks - * @return boolean + * @return boolean */ protected static function _mapCreate($func, $user, $type, $ID, $ListID_or_TxnID, $editsequence = '', $extra = null) { @@ -84,28 +84,28 @@ protected static function _mapCreate($func, $user, $type, $ID, $ListID_or_TxnID, { if (false === strpos($func, '::')) { - return $func($type, $ID, $ListID_or_TxnID, $editsequence, $extra); + return $func($type, $ID, $ListID_or_TxnID, $editsequence, $extra); } else { $tmp = explode('::', $func); - + return call_user_func(array( $tmp[0], $tmp[1] ), $type, $ID, $ListID_or_TxnID, $editsequence, $extra); } } else - { + { $Driver = QuickBooks_Driver_Singleton::getInstance(); return $Driver->identMap($user, $type, $ID, $ListID_or_TxnID, $editsequence, $extra); } } - + /** * Map an application primary key to a QuickBooks ListID or TxnID - * + * * @param string $type The type of object (i.e.: QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_OBJECT_INVOICE, etc.) * @param mixed $ID The primary key of the record - * @return string The ListID or TxnID (or NULL if it couldn't be mapped) + * @return string The ListID or TxnID (or NULL if it couldn't be mapped) */ protected static function _mapToQuickBooksID($func, $user, $type, $ID) { @@ -113,12 +113,12 @@ protected static function _mapToQuickBooksID($func, $user, $type, $ID) { if (false === strpos($func, '::')) { - return $func($type, $ID); + return $func($type, $ID); } else { $tmp = explode('::', $func); - + return call_user_func(array( $tmp[0], $tmp[1] ), $type, $ID); } } @@ -126,21 +126,21 @@ protected static function _mapToQuickBooksID($func, $user, $type, $ID) { $editsequence = ''; $extra = null; - + //print('mapping: ' . $user . ', ' . $type . ', ' . $ID . "\n"); - + $Driver = QuickBooks_Driver_Singleton::getInstance(); $ListID_or_TxnID = $Driver->identToQuickBooks($user, $type, $ID, $editsequence, $extra); - + //print('got back: ' . $ListID_or_TxnID . "\n"); - + return $ListID_or_TxnID; } } - + /** * Map a QuickBooks ListID or TxnID to an application primary key - * + * * @param string $type The type of object * @param string $ListID_or_TxnID The ListID or TxnID of the object within QuickBooks * @return string The application record primary key @@ -151,27 +151,27 @@ static protected function _mapToApplicationID($func, $user, $type, $ListID_or_Tx { if (false === strpos($func, '::')) { - return $func($type, $ListID_or_TxnID); + return $func($type, $ListID_or_TxnID); } else { $tmp = explode('::', $func); - + return call_user_func(array( $tmp[0], $tmp[1] ), $type, $ListID_or_TxnID); } } else { $extra = null; - + $Driver = QuickBooks_Driver_Singleton::getInstance(); return $Driver->identToApplication($user, $type, $ListID_or_TxnID, $extra); } } - + /** * Map a type and application primary key to a QuickBooks EditSequence string - * + * * @param string $type The type of object * @param mixed $ID The application primary key * @return string The QuickBooks EditSequence string @@ -182,12 +182,12 @@ static protected function _mapToEditSequence($func, $user, $type, $ID) { if (false === strpos($func, '::')) { - return $func($type, $ID); + return $func($type, $ID); } else { $tmp = explode('::', $func); - + return call_user_func(array( $tmp[0], $tmp[1] ), $type, $ID); } } @@ -195,26 +195,26 @@ static protected function _mapToEditSequence($func, $user, $type, $ID) { $editsequence = ''; $extra = null; - + $Driver = QuickBooks_Driver_Singleton::getInstance(); $Driver->identToQuickBooks($user, $type, $ID, $editsequence, $extra); - + return $editsequence; } } - + /** * * @TODO THIS NEEDS SOME SERIOUS CLEANUP - */ + */ public static function mappings($xml, $user, $config = array()) { return QuickBooks_Callbacks_API_Callbacks::_mappings($xml, $user, $config); } - + /** - * + * * @TODO THIS NEEDS SOME SERIOUS CLEANUP - * + * * @param string $xml * @return string */ @@ -224,31 +224,31 @@ protected static function _mappings($xml, $user, $config) { $config['map_to_quickbooks_handler'] = null; } - + //$EditSequence = ''; //$first = true; - + while (false !== ($start = strpos($xml, '<' . QUICKBOOKS_API_APPLICATIONID . '>'))) { $end = strpos($xml, ''); - + $encode = substr($xml, $start + strlen(QUICKBOOKS_API_APPLICATIONID) + 2, $end - $start - strlen(QUICKBOOKS_API_APPLICATIONID) - 2); - + //print('encoded: ' . $encode . "\n"); - + $type = ''; $tag = ''; $ID = ''; QuickBooks_Callbacks_API_Callbacks::_decodeApplicationID($encode, $type, $tag, $ID); - + //print('decode: ' . $type . ', ' . $tag . ', ' . $ID . "\n"); - + $ListID_or_TxnID = QuickBooks_Callbacks_API_Callbacks::_mapToQuickBooksID($config['map_to_quickbooks_handler'], $user, $type, $ID); - + //print('ListID or TxnID: ' . $ListID_or_TxnID . "\n"); - + //exit; - + /* if ($first) { @@ -256,87 +256,87 @@ protected static function _mappings($xml, $user, $config) $first = false; } */ - + $xml = substr($xml, 0, $start) . '<' . $tag . '>' . $ListID_or_TxnID . '' . substr($xml, $end + strlen(QUICKBOOKS_API_APPLICATIONID) + 3); } - + //exit; - + $start = strpos($xml, '<' . QUICKBOOKS_API_APPLICATIONEDITSEQUENCE . '>'); $end = strpos($xml, ''); - + if ($start and $end) { $encode = substr($xml, $start + strlen(QUICKBOOKS_API_APPLICATIONEDITSEQUENCE) + 2, $end - $start - strlen(QUICKBOOKS_API_APPLICATIONEDITSEQUENCE) - 2); - + $type = ''; $tag = ''; $ID = ''; QuickBooks_Callbacks_API_Callbacks::_decodeApplicationEditSequence($encode, $type, $tag, $ID); - + $EditSequence = QuickBooks_Callbacks_API_Callbacks::_mapToEditSequence($config['map_to_quickbooks_handler'], $user, $type, $ID); - + $xml = substr($xml, 0, $start) . '' . $EditSequence . '' . substr($xml, $end + strlen(QUICKBOOKS_API_APPLICATIONEDITSEQUENCE) + 3); } - + /* while (false !== ($start = strpos($xml, ''))) { $end = strpos($xml, ''); - + $encode = substr($xml, $start + strlen(QUICKBOOKS_API_APPLICATIONID) + 2, $end - $start - strlen(QUICKBOOKS_API_APPLICATIONID) - 2); - + $type = ''; $tag = ''; $ID = ''; QuickBooks_Callbacks_API_Callbacks::_decodeApplicationID($encode, $type, $tag, $ID); - + $ListID_or_TxnID = QuickBooks_Callbacks_API_Callbacks::_mapToQuickBooksID($config['map_to_quickbooks_handler'], $user, $type, $ID); - + $xml = substr($xml, 0, $start) . '<' . $tag . '>' . $ListID_or_TxnID . '' . substr($xml, $end + strlen(QUICKBOOKS_API_APPLICATIONID) + 3); } */ - + return $xml; } - + /** - * - * - * + * + * + * */ protected static function _decodeApplicationID($encode, &$type, &$tag, &$ID) { return QuickBooks_API::decodeApplicationID($encode, $type, $tag, $ID); } - + protected static function _decodeApplicationEditSequence($encode, &$type, &$tag, &$ID) { return QuickBooks_API::decodeApplicationEditSequence($encode, $type, $tag, $ID); } - + /** - * - * - * + * + * + * */ protected static function _defaults($options) { $defaults = array( - 'always_use_iterators' => false, - 'map_create_handler' => null, + 'always_use_iterators' => false, + 'map_create_handler' => null, 'map_to_quickbooks_handler' => null, 'map_to_application_handler' => null, - 'map_to_editsequence_handler' => null, + 'map_to_editsequence_handler' => null, ); - + return array_merge($defaults, $options); } - + /** - * + * * @TODO This callback code should be ported to QuickBooks_Callbacks style calls - * + * * @param string $func_or_method * @param string $method * @param string $action @@ -355,30 +355,30 @@ protected static function _callCallbacks($funcs_or_methods, $method, $action, $I { continue; } - - $return = QuickBooks_Callbacks::callAPICallback(null, null, $callback, - $method, - $action, - $ID, - $err, - $qbxml, - $qbobject, + + $return = QuickBooks_Callbacks::callAPICallback(null, null, $callback, + $method, + $action, + $ID, + $err, + $qbxml, + $qbobject, $qbres); - + /* - else if (false !== strpos($func, '::') and + else if (false !== strpos($func, '::') and true) // method_exists()) // is this safe to do? { // Callback *static method* - + $tmp = explode('::', $func); - + $return = call_user_func(array( $tmp[0], $tmp[1] ), $method, $action, $ID, $err, $qbxml, $qbobject, $qbres); } else if (function_exists($func)) { - // Callback *function* - + // Callback *function* + $return = call_user_func($func, $method, $action, $ID, $err, $qbxml, $qbobject, $qbres); } else @@ -387,24 +387,24 @@ protected static function _callCallbacks($funcs_or_methods, $method, $action, $I return false; } */ - + if (!$return) { break; } } - + if ($err) { return false; } - + return true; } - + /** - * - * + * + * * @param string $requestID * @param string $user * @param string $action @@ -426,7 +426,7 @@ protected static function _doQueryRequest($requestID, $user, $action, $ID, $extr { //$qbxml = $extra['qbxml']; $qbxml = QuickBooks_Callbacks_API_Callbacks::_replacements($qbxml, $version, $locale, $requestID); - + return $qbxml; } } @@ -436,9 +436,9 @@ protected static function _doQueryRequest($requestID, $user, $action, $ID, $extr return false; } } - + /** - * + * * @param string $requestID * @param string $user * @param string $action @@ -460,27 +460,27 @@ protected static function _doQueryResponse($requestID, $user, $action, $ID, $ext $qbxml =& $xml; $qbiterator = null; $qbres = null; - + $method = null; if (isset($extra['method'])) { $method = $extra['method']; } - + $xml_errnum = 0; $xml_errmsg = ''; - + $Parser = new QuickBooks_XML_Parser($xml); - if ($Parser->validate($xml_errnum, $xml_errmsg) and + if ($Parser->validate($xml_errnum, $xml_errmsg) and $Doc = $Parser->parse($xml_errnum, $xml_errmsg)) { $list = array(); - + $Root = $Doc->getRoot(); - - // Get rid of some gunk... + + // Get rid of some gunk... $Response = $Root->getChildAt('QBXML QBXMLMsgsRs ' . $action . 'Rs'); - + if ($Response) { foreach ($Response->children() as $Child) @@ -491,40 +491,40 @@ protected static function _doQueryResponse($requestID, $user, $action, $ID, $ext } } } - + $Iterator = new QuickBooks_Iterator($list); } else { $err = 'XML parser error: ' . $xml_errnum . ': ' . $xml_errmsg; } - + if ($err) { return false; } - + //print_r($extra); //print_r($Iterator); - + if (isset($extra['callbacks']) and is_array($extra['callbacks'])) { QuickBooks_Callbacks_API_Callbacks::_callCallbacks($extra['callbacks'], $method, $action, $ID, $err, $qbxml, $Iterator, $qbres, $callback_options); } - + return true; } - + protected static function _doModRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + protected static function _doModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + protected static function _doAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { if (isset($extra['api'])) @@ -532,41 +532,41 @@ protected static function _doAddRequest($requestID, $user, $action, $ID, $extra, if ($qbxml) { $config = QuickBooks_Callbacks_API_Callbacks::_defaults($config); - + $qbxml = QuickBooks_Callbacks_API_Callbacks::_replacements($qbxml, $version, $locale, $requestID); $qbxml = QuickBooks_Callbacks_API_Callbacks::_mappings($qbxml, $user, $config); - + return $qbxml; } - + $err = 'API Server could not find any qbXML requests to send...'; return false; } else { - // this is *not* a request that was supposed to come from the API, - // so, we'll re-queue it, and *not* process it - + // this is *not* a request that was supposed to come from the API, + // so, we'll re-queue it, and *not* process it + $err = 'Request ID ' . $requestID . ', ' . $action . ', ' . $ID . ' is not an API request...'; return false; } } - + public static function RawQBXMLResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { // Determine the $action parameter (_doAddResponse needs this) // @TODO Move this to the _doAddRseponse method - + //$action = 'CustomerQuery'; - + return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + protected static function _doAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { //print('THIS GOT CALLED!'); //print_r($extra); - + // This is stuff we'll be passing to the callback handler functions/methods $method = null; // $action @@ -575,40 +575,40 @@ protected static function _doAddResponse($requestID, $user, $action, $ID, $extra $qbxml =& $xml; $qbobject = null; $qbres = null; - + if (isset($extra['method'])) { $method = $extra['method']; } - + $xml_errnum = 0; $xml_errmsg = ''; - + //print($xml); - + $Object = null; - + if ($action) { $Parser = new QuickBooks_XML_Parser($xml); - if ($Parser->validate($xml_errnum, $xml_errmsg) and + if ($Parser->validate($xml_errnum, $xml_errmsg) and $Doc = $Parser->parse($xml_errnum, $xml_errmsg)) { $Root = $Doc->getRoot(); - + // There is some nested garbage we don't really need here... let's get rid of it $Response = $Root->getChildAt('QBXML QBXMLMsgsRs ' . $action . 'Rs'); - + $Child = null; if ($Response) { $Child = $Response->getChild(0); - + // Try to build an object from the returned XML //if ($qbobject = QuickBooks_Callbacks_API_Callbacks::_objectFromAction($action, $paths)) if ($Object = QuickBooks_Callbacks_API_Callbacks::_objectFromXML($action, $Child)) { - ; + ; } else { @@ -621,30 +621,30 @@ protected static function _doAddResponse($requestID, $user, $action, $ID, $extra $err = 'XML parser error: ' . $xml_errnum . ': ' . $xml_errmsg; } } - + if ($err) { return false; } - + if (isset($extra['callbacks']) and is_array($extra['callbacks'])) { QuickBooks_Callbacks_API_Callbacks::_callCallbacks($extra['callbacks'], $method, $action, $ID, $err, $qbxml, $Object, $qbres); } - + return true; } - + /** - * - * - * - */ + * + * + * + */ protected static function _objectFromXML($action, $XML) { return QuickBooks_Object::fromXML($XML, $action); } - + /* protected static function _objectFromAction($action, $arr = array()) { @@ -652,7 +652,7 @@ protected static function _objectFromAction($action, $arr = array()) { $type = substr($action, 0, -3); $class = 'QuickBooks_Object_' . ucfirst(strtolower($type)); - + if (class_exists($class)) { return new $class($arr); @@ -662,14 +662,14 @@ protected static function _objectFromAction($action, $arr = array()) { $type = substr($action, 0, -3); $class = 'QuickBooks_Object_' . ucfirst(strtolower($type)); - + if (class_exists($class)) { return new $class($arr); } } - - + + //switch ($action) //{ // case QUICKBOOKS_ADD_CUSTOMER: @@ -680,11 +680,11 @@ protected static function _objectFromAction($action, $arr = array()) // return new QuickBooks_Object_Invoice($arr); // case QUICKBOOKS_ //} - + return null; } */ - + /** * @todo Fix this... use the Utilities class? Use constants? Something...? */ @@ -692,54 +692,54 @@ protected static function _objectFromAction($action, $arr = array()) protected static function _objectFromReturned($returned, $arr = array()) { $type = substr(strtolower($returned), 0, -3); - + if (substr(strtolower($type), 0, 4) == 'item') { $type = substr($type, 4) . 'Item'; } - + $class = 'QuickBooks_Object_' . ucfirst(strtolower($type)); - + if (class_exists($class)) { $Object = new $class($arr); - + //print('class: ' . $class . "\n"); //print_r($arr); exit; - + return $Object; } - + return null; } */ - + public static function AccountAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function AccountAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ClassAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ClassAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function EmployeeAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function EmployeeAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -749,7 +749,7 @@ public static function EstimateAddRequest($requestID, $user, $action, $ID, $extr { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function EstimateAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -759,7 +759,7 @@ public static function BillAddRequest($requestID, $user, $action, $ID, $extra, & { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function BillAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -769,7 +769,7 @@ public static function BillPaymentCheckAddRequest($requestID, $user, $action, $I { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function BillPaymentCheckAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -779,7 +779,7 @@ public static function CheckAddRequest($requestID, $user, $action, $ID, $extra, { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function CheckAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -789,7 +789,7 @@ public static function DepositAddRequest($requestID, $user, $action, $ID, $extra { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function DepositAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -799,12 +799,12 @@ public static function JournalEntryAddRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function JournalEntryAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function InventoryAdjustmentAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { @@ -820,7 +820,7 @@ public static function InvoiceAddRequest($requestID, $user, $action, $ID, $extra { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function InvoiceAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -840,27 +840,27 @@ public static function SalesReceiptAddRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function SalesReceiptAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function VendorAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function VendorAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ItemServiceAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ItemServiceAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -870,48 +870,48 @@ public static function ItemSalesTaxAddRequest($requestID, $user, $action, $ID, $ { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ItemSalesTaxAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ItemInventoryAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ItemInventoryAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ItemNonInventoryAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ItemNonInventoryAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ReceivePaymentAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ReceivePaymentAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - - + + public static function CustomerAddRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function CustomerAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { // $requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents @@ -922,7 +922,7 @@ public static function CustomerModRequest($requestID, $user, $action, $ID, $extr { return QuickBooks_Callbacks_API_Callbacks::_doModRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function CustomerModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doModResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -933,7 +933,7 @@ public static function DataExtAddRequest($requestID, $user, $action, $ID, $extra { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function DataExtAddResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -943,49 +943,49 @@ public static function DataExtModRequest($requestID, $user, $action, $ID, $extra { return QuickBooks_Callbacks_API_Callbacks::_doModRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function DataExtModResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doModResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function BillPaymentCheckQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** - * - * - * + * + * + * */ public static function BillPaymentCheckQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function BillQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** - * - * + * + * */ public static function BillQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function BillingRateQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** - * - * + * + * */ public static function BillingRateQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { @@ -996,37 +996,37 @@ public static function CheckQueryRequest($requestID, $user, $action, $ID, $extra { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** - * - * + * + * */ public static function CheckQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + /** - * - * + * + * */ public static function JournalEntryQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** - * - * + * + * */ public static function JournalEntryQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + /** * Pass a request to QuickBooks - * + * * @param string $requestID * @param string $user * @param string $action @@ -1043,10 +1043,10 @@ public static function PaymentMethodQueryRequest($requestID, $user, $action, $ID { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** * Handle a response from QuickBooks - * + * * @param string $requestID * @param string $user * @param string $action @@ -1063,113 +1063,113 @@ public static function PaymentMethodQueryResponse($requestID, $user, $action, $I { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ChargeQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** - * - * + * + * */ public static function ChargeQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ClassQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** - * - * + * + * */ public static function ClassQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function CustomerQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** - * - * - * + * + * + * */ public static function CustomerQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function CustomerTypeQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function CustomerTypeQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + /** - * - * - * + * + * + * */ public static function EmployeeQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** - * - * + * + * */ public static function EmployeeQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + /** - * - * - * + * + * + * */ public static function EstimateQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** - * - * + * + * */ public static function EstimateQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function InvoiceQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function InvoiceQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - - + + /** * Pass a request to QuickBooks - * + * * @param string $requestID * @param string $user * @param string $action @@ -1186,10 +1186,10 @@ public static function ItemQueryRequest($requestID, $user, $action, $ID, $extra, { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** * Handle a response from QuickBooks - * + * * @param string $requestID * @param string $user * @param string $action @@ -1206,32 +1206,32 @@ public static function ItemQueryResponse($requestID, $user, $action, $ID, $extra { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ItemServiceQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ItemServiceQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ItemSalesTaxQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ItemSalesTaxQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ItemSalesTaxGroupQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ItemSalesTaxGroupQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -1241,7 +1241,7 @@ public static function SalesTaxCodeQueryRequest($requestID, $user, $action, $ID, { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function SalesTaxCodeQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); @@ -1251,57 +1251,57 @@ public static function ItemInventoryQueryRequest($requestID, $user, $action, $ID { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ItemInventoryQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ItemNonInventoryQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ItemNonInventoryQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + /* public static function ItemQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ItemQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } */ - + public static function SalesOrderQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function SalesOrderQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function SalesReceiptQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function SalesReceiptQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + /** * Pass a request to QuickBooks - * + * * @param string $requestID * @param string $user * @param string $action @@ -1318,10 +1318,10 @@ public static function ShipMethodAddRequest($requestID, $user, $action, $ID, $ex { return QuickBooks_Callbacks_API_Callbacks::_doAddRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + /** * Handle a response from QuickBooks - * + * * @param string $requestID * @param string $user * @param string $action @@ -1338,97 +1338,97 @@ public static function ShipMethodAddResponse($requestID, $user, $action, $ID, $e { return QuickBooks_Callbacks_API_Callbacks::_doAddResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function ShipMethodQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function ShipMethodQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + public static function UnitOfMeasureSetQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function UnitOfMeasureSetQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); - } - + } + public static function AccountQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { return QuickBooks_Callbacks_API_Callbacks::_doQueryRequest($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $version, $locale, $config, $qbxml); } - + public static function AccountQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { return QuickBooks_Callbacks_API_Callbacks::_doQueryResponse($requestID, $user, $action, $ID, $extra, $err, $last_action_time, $last_actionident_time, $xml, $idents); } - + /** - * - * - * + * + * + * */ public static function TermsQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { - + } - + /** - * - * + * + * */ public static function TermsQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { - + } - + public static function VendorQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { - + } - + /** - * - * + * + * */ public static function VendorQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { - + } - + public static function TermsTypeQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { - + } - + /** - * - * + * + * */ public static function VendorTypeQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { - + } - + public static function VendorCreditQueryQueryRequest($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale, $config = array(), $qbxml = null) { - + } - + /** - * - * + * + * */ public static function VendorCreditQueryResponse($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $xml, $idents) { - + } } diff --git a/QuickBooks/Callbacks/API/Errors.php b/QuickBooks/Callbacks/API/Errors.php index d8b12474..39e8aadd 100755 --- a/QuickBooks/Callbacks/API/Errors.php +++ b/QuickBooks/Callbacks/API/Errors.php @@ -1,23 +1,23 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Callbacks */ /** - * + * */ class QuickBooks_Callbacks_API_Errors { @@ -28,17 +28,17 @@ static public function e1_notfound($requestID, $user, $action, $ident, $extra, & { return QuickBooks_Callbacks_API_Errors::e500_notfound($requestID, $user, $action, $ident, $extra, $err, $xml, $errnum, $errmsg, $config); } - + /** * Handle a QuickBooks error indicating that nothing matched a search - * - * For whatever strange reason, instead of returning an empty result set - * when you do a search that returns no results, QuickBooks instead returns - * an error message. The error message code might be either 1 or 500 - * depending on what filters you use in your query. - * + * + * For whatever strange reason, instead of returning an empty result set + * when you do a search that returns no results, QuickBooks instead returns + * an error message. The error message code might be either 1 or 500 + * depending on what filters you use in your query. + * * @TODO This should use the QuickBooks_Callbacks class, and not it's own custom callback code - * + * * @param string $requestID * @param string $user * @param string $action @@ -55,50 +55,50 @@ static public function e500_notfound($requestID, $user, $action, $ident, $extra, { //$requestID, $user, $action, $ident, $extra, $errerr, $xml, $errnum, $errmsg, $this->_callback_config // Not found, *still call the callback!* - + /* $extra['callbacks'], $method, $action, $ID, $err, $qbxml, $qbobject, $qbres */ - + // Get the driver instance $Driver = QuickBooks_Driver_Singleton::getInstance(); - + if (!isset($extra['callbacks'])) { $extra['callbacks'] = array(); - } - + } + if (!is_array($extra['callbacks'])) { $extra['callbacks'] = array( $extra['callbacks'] ); } - + $method = null; if (isset($extra['method'])) { $method = $extra['method']; } - + $err = ''; - + $qbobject = new QuickBooks_Iterator(array()); $qbres = null; - + foreach ($extra['callbacks'] as $func) { - if (false !== strpos($func, '::') and + if (false !== strpos($func, '::') and true) // method_exists()) // is this safe to do? { // Callback *static method* - + $tmp = explode('::', $func); - + $return = call_user_func(array( $tmp[0], $tmp[1] ), $method, $action, $ident, $err, $xml, $qbobject, $qbres); } else if (function_exists($func)) { - // Callback *function* - + // Callback *function* + $return = call_user_func($func, $method, $action, $ident, $err, $xml, $qbobject, $qbres); } else @@ -107,24 +107,24 @@ static public function e500_notfound($requestID, $user, $action, $ident, $extra, $Driver->log('API: ' . $err, null, QUICKBOOKS_LOG_NORMAL); return false; } - + if (!$return) { break; } } - + if ($err) { return false; } - + return true; } - + static public function catchall($requestID, $user, $action, $ident, $extra, &$err, $xml, $errnum, $errmsg, $config) { - + return false; } } diff --git a/QuickBooks/Callbacks/Integrator/Callbacks.php b/QuickBooks/Callbacks/Integrator/Callbacks.php index c2b32767..2210da9c 100755 --- a/QuickBooks/Callbacks/Integrator/Callbacks.php +++ b/QuickBooks/Callbacks/Integrator/Callbacks.php @@ -2,16 +2,16 @@ /** * Callback methods for the server integrator components - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Server */ @@ -32,7 +32,7 @@ QuickBooks_Loader::load('/QuickBooks/Server/Integrator.php'); /** - * Callback methods for the server integrator + * Callback methods for the server integrator */ class QuickBooks_Callbacks_Integrator_Callbacks { @@ -41,35 +41,35 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat // Get an API instance $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + $module = get_class($Integrator); - - // This is the *very first time the integration was run!* - // Orders *will not* be fetched from before this time! + + // This is the *very first time the integration was run!* + // Orders *will not* be fetched from before this time! $type = null; $opts = null; //$first_datetime = $API->configRead(get_class($this), 'initial', $type, $opts); $first_datetime = $API->configRead($module, 'initial', $type, $opts); - + $first = false; if (!$first_datetime) { $first_datetime = date('Y-m-d H:i:s'); $API->configWrite($module, 'initial', $first_datetime); - + $first = true; } - + // The is the last time the integration was run! $type = null; $opts = null; $last_datetime = $API->configRead($module, 'datetime', $type, $opts); - + if (!$last_datetime) { $last_datetime = date('Y-m-d H:i:s'); } - + /* if (!empty($this->_integrator_config['debug_datetime'])) { @@ -77,7 +77,7 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat $first_datetime = date('Y-m-d H:i:s', strtotime($this->_integrator_config['debug_datetime'])); } */ - + $force = false; /* $force = false; @@ -86,21 +86,21 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat $force = true; } */ - + $this_datetime = date('Y-m-d H:i:s'); $API->log('Integration handle() has started: [first: ' . $first_datetime . '], [last: ' . $last_datetime . '], [this: ' . $this_datetime . ']', QUICKBOOKS_LOG_VERBOSE); - + /* - if (strtotime($this_datetime) - strtotime($last_datetime) > QUICKBOOKS_SERVER_INTEGRATOR_RECUR or - $first or + if (strtotime($this_datetime) - strtotime($last_datetime) > QUICKBOOKS_SERVER_INTEGRATOR_RECUR or + $first or $force) { $API->log('Last integration timestamp: ' . $last_datetime . ', current timestamp: ' . $this_datetime, QUICKBOOKS_LOG_VERBOSE); */ - + // Do some integration routines QuickBooks_Callbacks_Integrator_Callbacks::_integrate($last_datetime, $first_datetime, $first); - + $API->configWrite($module, 'datetime', $this_datetime); /*} else @@ -109,10 +109,10 @@ static public function onAuthenticate($requestID, $user, $hook, &$err, $hook_dat } */ } - + /** - * - * + * + * * @param string $last_datetime * @param boolean $first_time_running * @return boolean @@ -121,175 +121,175 @@ static protected function _integrate($last_datetime, $first_datetime, $first_tim { // Integrator instance $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + // Generics which *must* be present if ($Shipping = $Integrator->getGenericShipping()) - { + { QuickBooks_Callbacks_Integrator_Callbacks::_integrateShipping($Shipping); } - + /* if ($Handling = $Integrator->getGenericHandling()) { $this->_integrateHandling($Handling); } */ - + if ($Discount = $Integrator->getGenericDiscount()) { QuickBooks_Callbacks_Integrator_Callbacks::_integrateDiscounts($Discount); } - + /* if ($Coupon = $Integrator->getGenericCoupon()) { $this->_integrateCoupons($Coupon); } */ - + //$customers = $Integrator>listNewCustomersSince($last_datetime, $first_datetime, $first_time_running); //QuickBooks_Callbacks_Integrator_Callbacks::_integrateNewCustomers($customers); - - // + + // $orders = $Integrator->listNewOrdersSince($last_datetime, $first_datetime, $first_time_running); QuickBooks_Callbacks_Integrator_Callbacks::_integrateNewOrders($orders); - - // + + // $estimates = $Integrator->listNewEstimatesSince($last_datetime, $first_datetime, $first_time_running); QuickBooks_Callbacks_Integrator_Callbacks::_integrateNewEstimates($estimates); - - // + + // QuickBooks_Callbacks_Integrator_Callbacks::_pullNewAccounts($last_datetime, $first_datetime, $first_time_running); - - // + + // QuickBooks_Callbacks_Integrator_Callbacks::_pullNewClasses($last_datetime, $first_datetime, $first_time_running); - - // + + // QuickBooks_Callbacks_Integrator_Callbacks::_pullNewPaymentMethods($last_datetime, $first_datetime, $first_time_running); - - // + + // QuickBooks_Callbacks_Integrator_Callbacks::_pullNewCustomerTypes($last_datetime, $first_datetime, $first_time_running); - - // + + // QuickBooks_Callbacks_Integrator_Callbacks::_pullNewShipMethods($last_datetime, $first_datetime, $first_time_running); - - // + + // QuickBooks_Callbacks_Integrator_Callbacks::_pullNewSalesTaxItems($last_datetime, $first_datetime, $first_time_running); - - // + + // QuickBooks_Callbacks_Integrator_Callbacks::_pullNewSalesTaxGroupItems($last_datetime, $first_datetime, $first_time_running); - + // QuickBooks_Callbacks_Integrator_Callbacks::_pullNewSalesTaxCodes($last_datetime, $first_datetime, $first_time_running); - - // + + // QuickBooks_Callbacks_Integrator_Callbacks::_pullNewUnitOfMeasureSets($last_datetime, $first_datetime, $first_time_running); - - // + + // //QuickBooks_Callbacks_Integrator_Callbacks::_pullNewOrders($last_datetime, $first_datetime, $first_time_running); - - // + + // //QuickBooks_Callbacks_Integrator_Callbacks::_pullNewEstimates($last_datetime, $first_datetime, $first_time_running); } - + /** - * - * + * + * */ static protected function _pullNewAccounts($datetime, $first_datetime, $first_time_running) { // Get the API instance $API = QuickBooks_API_Singleton::getInstance(); - + if (true) //$first_time_running) { // A realllly long time ago $datetime = '1983-01-02 00:00:01'; } - + $API->log('Pulling in accounts modified since ' . $datetime, QUICKBOOKS_LOG_VERBOSE); - + return $API->listAccountsModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listAccountsModifiedAfter'); } /** - * - * - * + * + * + * */ static protected function _pullNewClasses($datetime, $first_datetime, $first_time_running) { // Get the API instance $API = QuickBooks_API_Singleton::getInstance(); - + if (true) // $first_time_running) { // A realllly long time ago $datetime = '1983-01-02 00:00:01'; } - + $API->log('Pulling in classes modified since ' . $datetime, QUICKBOOKS_LOG_VERBOSE); - + return $API->listClassesModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listClassesModifiedAfter'); } - + /** - * - * - * + * + * + * */ static protected function _pullNewPaymentMethods($datetime, $first_datetime, $first_time_running) { // Get the API instance $API = QuickBooks_API_Singleton::getInstance(); - + if (true) // $first_time_running) { // A realllly long time ago $datetime = '1983-01-02 00:00:01'; } - + $API->log('Pulling in payment methods modified since ' . $datetime, QUICKBOOKS_LOG_VERBOSE); - + return $API->listPaymentMethodsModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listPaymentMethodsModifiedAfter'); } - + static protected function _pullNewSalesTaxItems($datetime, $first_datetime, $first_time_running) { // Get the API instance $API = QuickBooks_API_Singleton::getInstance(); - + if (true) // $first_time_running) { // A realllly long time ago $datetime = '1983-01-02 00:00:01'; } - + $API->log('Pulling in sales tax items modified since ' . $datetime, QUICKBOOKS_LOG_VERBOSE); - - return $API->listSalesTaxItemsModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listSalesTaxItemsModifiedAfter'); + + return $API->listSalesTaxItemsModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listSalesTaxItemsModifiedAfter'); } static protected function _pullNewSalesTaxGroupItems($datetime, $first_datetime, $first_time_running) { // Get the API instance $API = QuickBooks_API_Singleton::getInstance(); - + if (true) // $first_time_running) { // A realllly long time ago $datetime = '1983-01-02 00:00:01'; } - + $API->log('Pulling in sales tax *group* items modified since ' . $datetime, QUICKBOOKS_LOG_VERBOSE); - - return $API->listSalesTaxGroupItemsModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listSalesTaxGroupItemsModifiedAfter'); + + return $API->listSalesTaxGroupItemsModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listSalesTaxGroupItemsModifiedAfter'); } - + /** - * - * - * + * + * + * */ static protected function _pullNewShipMethods($datetime, $first_datetime, $first_time_running) { @@ -301,30 +301,30 @@ static protected function _pullNewShipMethods($datetime, $first_datetime, $first // A realllly long time ago $datetime = '1983-01-02 00:00:01'; } - + $API->log('Pulling in ship methods modified since ' . $datetime, QUICKBOOKS_LOG_VERBOSE); - + return $API->listShipMethodsModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listShipMethodsModifiedAfter'); } - + /** - * - * - * + * + * + * */ static protected function _pullNewCustomerTypes($datetime, $first_datetime, $first_time_running) { // Get the API instance $API = QuickBooks_API_Singleton::getInstance(); - + if (true) // $first_time_running) { // A realllly long time ago $datetime = '1983-01-02 00:00:01'; } - + $API->log('Pulling in customer types modified since ' . $datetime, QUICKBOOKS_LOG_VERBOSE); - + return $API->listCustomerTypesModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listCustomerTypesModifiedAfter'); } @@ -332,15 +332,15 @@ static protected function _pullNewUnitOfMeasureSets($datetime, $first_datetime, { // Get the API instance $API = QuickBooks_API_Singleton::getInstance(); - + if (true) // $first_time_running) { // A realllly long time ago $datetime = '1983-01-02 00:00:01'; } - + $API->log('Pulling in unit of measure sets modified since ' . $datetime, QUICKBOOKS_LOG_VERBOSE); - + return $API->listUnitOfMeasureSetsModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listUnitOfMeasureSetsModifiedAfter'); } @@ -348,21 +348,21 @@ static protected function _pullNewSalesTaxCodes($datetime, $first_datetime, $fir { // Get the API instance $API = QuickBooks_API_Singleton::getInstance(); - + if (true) // $first_time_running) { // A realllly long time ago $datetime = '1983-01-02 00:00:01'; } - + $API->log('Pulling in sales tax codes modified since ' . $datetime, QUICKBOOKS_LOG_VERBOSE); - + return $API->listSalesTaxCodesModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listSalesTaxCodesModifiedAfter'); - } - + } + /** - * - * + * + * * @param string $datetime * @return boolean */ @@ -371,22 +371,22 @@ static protected function _pullNewEstimates($datetime, $first_datetime, $first_t /* if ($this->_integrator_config['pull_estimates']) { - // Use the lookback value... + // Use the lookback value... $max = max(strtotime($datetime) - QUICKBOOKS_INTEGRATOR_LOOKBACK, strtotime($first_datetime)); $datetime = date('Y-m-d H:i:s', $max); - + $API->log('Pulling in estimates modified since ' . $datetime, QUICKBOOKS_LOG_VERBOSE); - + return $API->listEstimatesModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listEstimatesModifiedAfter'); } */ - + return true; } - + /** - * - * + * + * * @param string $datetime * @param string $first_datetime * @param boolean $first_time_running @@ -396,19 +396,19 @@ static protected function _pullNewOrders($datetime, $first_datetime, $first_time /* if ($this->_integrator_config['pull_orders']) { - // Use the lookback value... + // Use the lookback value... $max = max(strtotime($datetime) - QUICKBOOKS_INTEGRATOR_LOOKBACK, strtotime($first_datetime)); $datetime = date('Y-m-d H:i:s', $max); - + $API->log('Pulling in invoices modified since ' . $datetime, QUICKBOOKS_LOG_VERBOSE); - - return $API->listInvoicesModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listInvoicesModifiedAfter'); + + return $API->listInvoicesModifiedAfter($datetime, 'QuickBooks_Callbacks_Integrator_Callbacks::listInvoicesModifiedAfter'); } */ - + return true; } - + static protected function _integrateNewCustomers($customers) { foreach ($customers as $CustomerID) @@ -421,7 +421,7 @@ static protected function _integrateNewCustomers($customers) /*else { // Add the customer to QuickBooks - + QuickBooks_Callbacks_Integrator_Callbacks::integrateAddCustomer($CustomerID); //$extras = $Integrator->getCustomerExtras($CustomerID, __FILE__, __LINE__); //$Customer = $Integrator->getCustomer($CustomerID, __FILE__, __LINE__); @@ -429,10 +429,10 @@ static protected function _integrateNewCustomers($customers) }*/ } } - + /** - * - * + * + * * @param array $estimates * @return boolean */ @@ -442,18 +442,18 @@ static protected function _integrateNewEstimates($estimates) foreach ($estimates as $EstimateID) { $API->log('Analyzing estimate #' . $EstimateID, QUICKBOOKS_LOG_VERBOSE); - + $Estimate = $Integrator->getEstimate($EstimateID); QuickBooks_Callbacks_Integrator_Callbacks::_integrateEstimate($Estimate, $EstimateID); - + // Customer $CustomerID = $Estimate->getCustomerApplicationID(); if ($ListID = $Estimate->getCustomerListID()) { // xxx Do nothing, already in QuickBooks // Add it again, just in case! - - // + + // QuickBooks_Callbacks_Integrator_Callbacks::integrateAddCustomer($CustomerID); } else if (true) @@ -465,24 +465,24 @@ static protected function _integrateNewEstimates($estimates) /*else { // Add the customer to QuickBooks - + QuickBooks_Callbacks_Integrator_Callbacks::integrateAddCustomer($CustomerID); //$extras = $Integrator->getCustomerExtras($CustomerID, __FILE__, __LINE__); //$Customer = $Integrator->getCustomer($CustomerID, __FILE__, __LINE__); //$this->_integrateCustomer($Customer, $CustomerID, $extras); }*/ - + $list = $Integrator->getEstimateItemsForEstimate($EstimateID); foreach ($list as $EstimateItem) { $ProductID = $EstimateItem->getItemApplicationID(); - + if (!$EstimateID) { continue; } - - // + + // if ($ListID = $EstimateItem->getItemListID()) { // Add it again anyway, just in case @@ -505,21 +505,21 @@ static protected function _integrateNewEstimates($estimates) } */ } - } + } } - + static protected function _integrateNewOrders($orders) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + // Let's start with new orders foreach ($orders as $OrderID) { $API->log('Analyzing order #' . $OrderID, QUICKBOOKS_LOG_VERBOSE); - + $Order = $Integrator->getOrder($OrderID); - + if ($Order) { // Customer @@ -534,7 +534,7 @@ static protected function _integrateNewOrders($orders) // Try to fetch the customer by name $API->getCustomerByName($Integrator->getCustomerNameForQuery($CustomerID), 'QuickBooks_Callbacks_Integrator_Callbacks::getCustomerByName', $CustomerID); } - + // ShipMethod /* $ShipMethodID = $Order->getShipMethodApplicationID(); @@ -561,19 +561,19 @@ static protected function _integrateNewOrders($orders) } } */ - + $list = $Integrator->getOrderItems($OrderID); foreach ($list as $OrderItem) { - // + // $ProductID = $OrderItem->getItemApplicationID(); - + if (!$ProductID) { continue; } - - // + + // if ($ListID = $OrderItem->getItemListID()) { // Add it again anyway, just in case @@ -583,107 +583,107 @@ static protected function _integrateNewOrders($orders) else { // Queue a request *for each type* of item - + // Try to fetch the product from QuickBooks $API->getItemByName($Integrator->getProductNameForQuery($ProductID), 'QuickBooks_Callbacks_Integrator_Callbacks::getProductByName', $ProductID); } } - - // + + // QuickBooks_Callbacks_Integrator_Callbacks::_integrateOrder($Order, $OrderID); - - // + + // $Payment = $Integrator->getPayment($OrderID); if ($Payment and $Payment->getTotalAmount() > 0) { QuickBooks_Callbacks_Integrator_Callbacks::_integratePayment($Payment, $OrderID); } } - } + } } - + /** - * @deprecated + * @deprecated */ static protected function _integrateHandling($Handling) { $API = QuickBooks_API_Singleton::getInstance(); - + $API->getItemByName($Handling->getFullName(), 'QuickBooks_Callbacks_Integrator_Callbacks::getProductByName', QUICKBOOKS_INTEGRATOR_HANDLING_ID); return QuickBooks_Callbacks_Integrator::_integrateProduct($Handling, QUICKBOOKS_INTEGRATOR_HANDLING_ID); } - + /** - * + * */ static protected function _integrateShipping($Shipping) { $API = QuickBooks_API_Singleton::getInstance(); - + $API->getItemByName($Shipping->getFullName(), 'QuickBooks_Callbacks_Integrator_Callbacks::getProductByName', QUICKBOOKS_INTEGRATOR_SHIPPING_ID); return QuickBooks_Callbacks_Integrator_Callbacks::_integrateProduct($Shipping, QUICKBOOKS_INTEGRATOR_SHIPPING_ID); } - + /** - * + * */ static protected function _integrateCoupons($Coupon) { $API = QuickBooks_API_Singleton::getInstance(); - + $API->getItemByName($Coupon->getFullName(), 'QuickBooks_Callbacks_Integrator_Callbacks::getProductByName', QUICKBOOKS_INTEGRATOR_COUPON_ID); return QuickBooks_Callbacks_Integrator_Callbacks::_integrateProduct($Coupon, QUICKBOOKS_INTEGRATOR_COUPON_ID); } - + /** - * + * */ static protected function _integrateDiscounts($Discount) { $API = QuickBooks_API_Singleton::getInstance(); - + $API->getItemByName($Discount->getFullName(), 'QuickBooks_Callbacks_Integrator_Callbacks::getProductByName', QUICKBOOKS_INTEGRATOR_DISCOUNT_ID); return QuickBooks_Callbacks_Integrator_Callbacks::_integrateProduct($Discount, QUICKBOOKS_INTEGRATOR_DISCOUNT_ID); } - - /** - * - * - * + + /** + * + * + * */ static protected function _integrateOrder($Order, $OrderID) { - // + // $API = QuickBooks_API_Singleton::getInstance(); - + $API->log('Integrating order #' . $OrderID . ' as a ' . $Order->object(), QUICKBOOKS_LOG_DEVELOP); $user = $API->user(); - + // Call a hook to indicate the order is being pushed to QuickBooks $hook_data = array( - 'OrderID' => $OrderID, - 'Order' => $Order, + 'OrderID' => $OrderID, + 'Order' => $Order, ); /*QuickBooks_Callbacks_Integrator_Callbacks::_callHooks( - QUICKBOOKS_SERVER_INTEGRATOR_HOOK_INTEGRATEORDER, - null, - $user, - null, - $err, + QUICKBOOKS_SERVER_INTEGRATOR_HOOK_INTEGRATEORDER, + null, + $user, + null, + $err, $hook_data); */ - + // Send the object to QuickBooks switch ($Order->object()) { case QUICKBOOKS_OBJECT_SALESRECEIPT: - + return $API->addSalesReceipt($Order, 'QuickBooks_Callbacks_Integrator_Callbacks::addSalesReceipt', $OrderID); case QUICKBOOKS_OBJECT_SALESORDER: - + return $API->addSalesOrder($Order, 'QuickBooks_Callbacks_Integrator_Callbacks::addSalesOrder', $OrderID); case QUICKBOOKS_OBJECT_INVOICE: - + return $API->addInvoice($Order, 'QuickBooks_Callbacks_Integrator_Callbacks::addInvoice', $OrderID); default: return false; @@ -692,19 +692,19 @@ static protected function _integrateOrder($Order, $OrderID) static protected function _integrateEstimate($Estimate, $EstimateID) { - // + // $API = QuickBooks_API_Singleton::getInstance(); - - // + + // $API->log('Integrating estimate #' . $EstimateID . ' as a ' . $Estimate->object(), QUICKBOOKS_LOG_DEVELOP); - - // + + // return $API->addEstimate($Estimate, 'QuickBooks_Callbacks_Integrator_Callbacks::addEstimate', $EstimateID); } - + /** - * - * + * + * * @param QuickBooks_Object_ReceivePayment $Payment * @param mixed $OrderID * @return boolean @@ -712,121 +712,121 @@ static protected function _integrateEstimate($Estimate, $EstimateID) static protected function _integratePayment($Payment, $OrderID) { $API = QuickBooks_API_Singleton::getInstance(); - + $API->log('Integrating payment for order #' . $OrderID, QUICKBOOKS_LOG_DEVELOP); return $API->addReceivePayment($Payment, 'QuickBooks_Callbacks_Integrator_Callbacks::addReceivePayment', $OrderID); } - + /** - * - * + * + * * @param QuickBooks_Object $Product * @param mixed $ProductID * @return boolean */ static protected function _integrateProduct($Product, $ProductID) { - // + // $API = QuickBooks_API_Singleton::getInstance(); - + // Call a hook to indicate the order is being pushed to QuickBooks /* $hook_data = array( - 'ProductID' => $ProductID, - 'Product' => $Product, + 'ProductID' => $ProductID, + 'Product' => $Product, ); $this->_callHooks( - QUICKBOOKS_SERVER_INTEGRATOR_HOOK_INTEGRATEPRODUCT, - null, - $user, - null, - $err, + QUICKBOOKS_SERVER_INTEGRATOR_HOOK_INTEGRATEPRODUCT, + null, + $user, + null, + $err, $hook_data); */ - + switch ($Product->object()) { case QUICKBOOKS_OBJECT_INVENTORYITEM: - + return $API->addInventoryItem($Product, 'QuickBooks_Callbacks_Integrator_Callbacks::addInventoryItem', $ProductID); case QUICKBOOKS_OBJECT_NONINVENTORYITEM: - + return $API->addNonInventoryItem($Product, 'QuickBooks_Callbacks_Integrator_Callbacks::addNonInventoryItem', $ProductID); case QUICKBOOKS_OBJECT_SERVICEITEM: - + return $API->addServiceItem($Product, 'QuickBooks_Callbacks_Integrator_Callbacks::addServiceItem', $ProductID); case QUICKBOOKS_OBJECT_DISCOUNTITEM: - + return $API->addDiscountItem($Product, 'QuickBooks_Callbacks_Integrator_Callbacks::addDiscountItem', $ProductID); case QUICKBOOKS_OBJECT_OTHERCHARGEITEM: - + return $API->addOtherChargeItem($Product, 'QuickBooks_Callbacks_Integrator_Callbacks::addOtherChargeItem', $ProductID); default: return false; } } - + static protected function _integrateSalesReceipt() { - + } - + static protected function _integrateSalesOrder() { - + } - + static protected function _integrateInventoryItem() { - + } - + static protected function _integrateNonInventoryItem() { - + } - + static protected function _integrateServiceItem() { - + } - + static protected function _integrateDiscountItem() { - + } - + static protected function _integrateSalesTaxItem() { - + } - + static public function integrateQueryCustomer($CustomerID) { return QuickBooks_Callbacks_Integrator_Callbacks::integrateCustomer($CustomerID, false, true); } - + static public function integrateAddCustomer($CustomerID) { //print('adding!'); return QuickBooks_Callbacks_Integrator_Callbacks::integrateCustomer($CustomerID, false); } - + static public function integrateModCustomer($CustomerID) { //print('modifying!'); return QuickBooks_Callbacks_Integrator_Callbacks::integrateCustomer($CustomerID, true); } - + static public function integrateCustomer($CustomerID, $modify = false, $query = false) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + $API->log('Analyzing customer #' . $CustomerID, QUICKBOOKS_LOG_DEVELOP); - + $extras = $Integrator->getCustomerExtras($CustomerID, __FILE__, __LINE__); - + if ($Customer = $Integrator->getCustomer($CustomerID, __FILE__, __LINE__)) { $action = 'add'; @@ -838,47 +838,47 @@ static public function integrateCustomer($CustomerID, $modify = false, $query = { $action = 'query'; } - + $API->log('Integrating customer #' . $CustomerID . ' (' . $action . ')', QUICKBOOKS_LOG_DEVELOP); - + $continue = false; - + // Turn off modifications of customers /* - if ($modify and + if ($modify and $API->modifyCustomer($Customer, 'QuickBooks_Callbacks_Integrator_Callbacks::modCustomer', $CustomerID)) { $continue = true; } else */ - + if ($query and $API->getCustomerByName($Integrator->getCustomerNameForQuery($CustomerID), 'QuickBooks_Callbacks_Integrator_Callbacks::getCustomerByName', $CustomerID)) { return true; } - else if (!$modify and !$query and + else if (!$modify and !$query and $API->addCustomer($Customer, 'QuickBooks_Callbacks_Integrator_Callbacks::addCustomer', $CustomerID)) { // Call a hook to indicate the customer is being pushed to QuickBooks /* $user = $API->user(); $hook_data = array( - 'CustomerID' => $CustomerID, - 'Customer' => $Customer, + 'CustomerID' => $CustomerID, + 'Customer' => $Customer, ); $this->_callHooks( - QUICKBOOKS_SERVER_INTEGRATOR_HOOK_INTEGRATECUSTOMER, - null, - $user, - null, - $err, + QUICKBOOKS_SERVER_INTEGRATOR_HOOK_INTEGRATECUSTOMER, + null, + $user, + null, + $err, $hook_data); */ - + $continue = true; } - + if ($continue) { if (is_array($extras)) @@ -886,24 +886,24 @@ static public function integrateCustomer($CustomerID, $modify = false, $query = foreach ($extras as $key => $Extra) { $API->addDataExt($Extra, 'QuickBooks_Callbacks_Integrator_Callbacks::addExtra', $CustomerID . '-' . $key, null, QUICKBOOKS_ADD_CUSTOMER); - + if ($modify) { $API->modifyDataExt($Extra, 'QuickBooks_Callbacks_Integrator_Callbacks::modExtra', $CustomerID . '-' . $key, null, QUICKBOOKS_MOD_CUSTOMER); } } } - - return true; + + return true; } } - + return false; } - + /** - * - * + * + * * @param string $method * @param string $action * @param mixed $ID @@ -917,54 +917,54 @@ static public function getCustomerByName($method, $action, $ID, $err, $qbxml, $I { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + if ($Iterator->count() == 1) { // If we found the customer in QuickBooks, create a mapping with the ListID value - + $Customer = $Iterator->next(); if ($API->createMapping(QUICKBOOKS_OBJECT_CUSTOMER, $ID, $Customer->getListID(), $Customer->getEditSequence())) { - // Let's make sure that this customer is up-to-date - + // Let's make sure that this customer is up-to-date + return QuickBooks_Callbacks_Integrator_Callbacks::integrateModCustomer($ID); } } else if ($Iterator->count() == 0) { // Otherwise, we need to queue up an add request to add this cart item to QuickBooks - + return QuickBooks_Callbacks_Integrator_Callbacks::integrateAddCustomer($ID); } - + return false; } - + static public function getInvoiceByRefNumber($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { - + } - + static public function getProductByName($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + if ($Iterator->count() == 1) { // If we found the item in QuickBooks, create a mapping with the ListID value $Item = $Iterator->next(); - + // Save the item in our list of integrator items $Integrator->saveItem($Item); - + // Create an object mapping return $API->createMapping($Item->object(), $ID, $Item->getListID(), $Item->getEditSequence()); } else if ($Iterator->count() == 0) { // Otherwise, we need to queue up an add request to add this cart item to QuickBooks - + if ($ID == QUICKBOOKS_INTEGRATOR_SHIPPING_ID) { return true; @@ -973,9 +973,9 @@ static public function getProductByName($method, $action, $ID, $err, $qbxml, $It { return true; } - + $Product = $Integrator->getProduct($ID, __FILE__, __LINE__); - + switch ($Product->object()) { case QUICKBOOKS_OBJECT_SERVICEITEM: @@ -989,66 +989,66 @@ static public function getProductByName($method, $action, $ID, $err, $qbxml, $It break; } } - + return false; } - + static public function getServiceItemByName($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { - + } - + static public function getInventoryItemByName($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { - + } - + static public function getNonInventoryItemByName($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { - + } - + static public function getDiscountItemByName($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { - + } - + static public function getClassByName($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { - + } - + static public function getAccountByName($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { - + } - + static public function getShipMethodByName($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + if ($Iterator->count() == 1) { // If we found the object in QuickBooks, create a mapping with the ListID value - + $ShipMethod = $Iterator->next(); return $API->createMapping(QUICKBOOKS_OBJECT_SHIPMETHOD, $ID, $ShipMethod->getListID(), $ShipMethod->getEditSequence()); } else if ($Iterator->count() == 0) { // Otherwise, we need to queue up an add request to add this cart item to QuickBooks - + $ShipMethod = $Integrator->getShipMethod($ID); return $API->addShipMethod($ShipMethod, 'QuickBooks_Callbacks_Integrator_Callbacks::addShipMethod', $ID); } - + return false; } - - /** - * - * + + /** + * + * * @param string $method * @param string $action * @param mixed $ID @@ -1057,82 +1057,82 @@ static public function getShipMethodByName($method, $action, $ID, $err, $qbxml, * @param QuickBooks_Iterator $Iterator * @param resource $qbres * @return boolean - */ + */ static public function getPaymentMethodByName($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + if ($Iterator->count() == 1) { // If we found the object in QuickBooks, create a mapping with the ListID value - + $PaymentMethod = $Iterator->next(); return $API->createMapping(QUICKBOOKS_OBJECT_PAYMENTMETHOD, $ID, $PaymentMethod->getListID(), $PaymentMethod->getEditSequence()); } else if ($Iterator->count() == 0) { // Otherwise, we need to queue up an add request to add this cart item to QuickBooks - + $PaymentMethod = $Integrator->getPaymentMethod($ID); return $API->addPaymentMethod($PaymentMethod, 'QuickBooks_Callbacks_Integrator_Callbacks::addPaymentMethod', $ID); } - + return false; } - + static public function listInvoicesModifiedAfter($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + while ($Invoice = $Iterator->next()) { return false; } - + return true; } - + static public function listSalesTaxItemsModifiedAfter($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + while ($SalesTaxItem = $Iterator->next()) { // Store this in the database $Integrator->saveSalesTaxItem($SalesTaxItem); } - + return true; - } + } static public function listSalesTaxGroupItemsModifiedAfter($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + while ($SalesTaxGroupItem = $Iterator->next()) { // Store this in the database $Integrator->saveSalesTaxGroupItem($SalesTaxGroupItem); } - + return true; - } - + } + static public function listAccountsModifiedAfter($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + while ($Account = $Iterator->next()) { // Store this in the database $Integrator->saveAccount($Account); } - + return true; } @@ -1140,55 +1140,55 @@ static public function listClassesModifiedAfter($method, $action, $ID, $err, $qb { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + while ($Class = $Iterator->next()) { // Store this in the database $Integrator->saveClass($Class); } - + return true; - } - + } + static public function listPaymentMethodsModifiedAfter($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + while ($PaymentMethod = $Iterator->next()) { // Store this in the database $Integrator->savePaymentMethod($PaymentMethod); } - + return true; - } - + } + static public function listCustomerTypesModifiedAfter($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + while ($CustomerType = $Iterator->next()) { // Store this in the database $Integrator->saveCustomerType($CustomerType); } - + return true; - } - + } + static public function listShipMethodsModifiedAfter($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + while ($ShipMethod = $Iterator->next()) { // Store this in the database $Integrator->saveShipMethod($ShipMethod); } - + return true; } @@ -1196,13 +1196,13 @@ static public function listSalesTaxCodesModifiedAfter($method, $action, $ID, $er { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + while ($SalesTaxCode = $Iterator->next()) { // Store this in the database $Integrator->saveSalesTaxCode($SalesTaxCode); } - + return true; } @@ -1210,21 +1210,21 @@ static public function listUnitOfMeasureSetsModifiedAfter($method, $action, $ID, { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + while ($UnitOfMeasureSet = $Iterator->next()) { // Store this in the database $Integrator->saveUnitOfMeasureSet($UnitOfMeasureSet); } - + return true; } - + static public function listEstimatesModifiedAfter($method, $action, $ID, $err, $qbxml, $Iterator, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); $Integrator = QuickBooks_Integrator_Singleton::getInstance(); - + while ($Estimate = $Iterator->next()) { // Let's check if this estimate already exists in the system @@ -1233,8 +1233,8 @@ static public function listEstimatesModifiedAfter($method, $action, $ID, $err, $ { $EstimateID = $API->fetchApplicationID(QUICKBOOKS_OBJECT_ESTIMATE, $Estimate->getTxnID()); } - - // Now, there's a customer assigned to this estimate, let's make sure the customer exists + + // Now, there's a customer assigned to this estimate, let's make sure the customer exists if ($API->hasApplicationID(QUICKBOOKS_OBJECT_CUSTOMER, $Estimate->getCustomerListID())) { // Great, it exists! @@ -1245,157 +1245,157 @@ static public function listEstimatesModifiedAfter($method, $action, $ID, $err, $ $Customer = new QuickBooks_Object_Customer(); $Customer->setListID($Estimate->getCustomerListID()); $Customer->setName($Estimate->getCustomerName()); - + $Integrator->setCustomer(null, $Customer); } - + // There are line items assigned to this estimate too, and each line item has a product... //foreach ($Estimate->listLineItems - + $Integrator->setEstimate($EstimateID, $Estimate); } - + return true; } - + static public function addPaymentMethod() { - + } - + static public function addShipMethod() { - + } - + static public function addServiceItem($method, $action, $ID, &$err, $qbxml, $ServiceItem, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); - + if (is_object($ServiceItem)) { // If we found the customer in QuickBooks, create a mapping with the ListID value - + $API->createMapping( - QUICKBOOKS_OBJECT_SERVICEITEM, - $ID, - $ServiceItem->getListID(), + QUICKBOOKS_OBJECT_SERVICEITEM, + $ID, + $ServiceItem->getListID(), $ServiceItem->getEditSequence()); } } - + static public function addInventoryItem($method, $action, $ID, &$err, $qbxml, $InventoryItem, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); - + if (is_object($InventoryItem)) { // If we found the customer in QuickBooks, create a mapping with the ListID value - + $API->createMapping( - QUICKBOOKS_OBJECT_INVENTORYITEM, - $ID, - $InventoryItem->getListID(), + QUICKBOOKS_OBJECT_INVENTORYITEM, + $ID, + $InventoryItem->getListID(), $InventoryItem->getEditSequence()); } } - + static public function addNonInventoryItem($method, $action, $ID, &$err, $qbxml, $NonInventoryItem, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); - + if (is_object($NonInventoryItem)) { // If we found the customer in QuickBooks, create a mapping with the ListID value - + $API->createMapping( - QUICKBOOKS_OBJECT_NONINVENTORYITEM, - $ID, - $NonInventoryItem->getListID(), + QUICKBOOKS_OBJECT_NONINVENTORYITEM, + $ID, + $NonInventoryItem->getListID(), $NonInventoryItem->getEditSequence()); } } - + static public function addInvoice($method, $action, $ID, &$err, $qbxml, $Invoice, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); - + if (is_object($Invoice)) { // If we found the customer in QuickBooks, create a mapping with the ListID value - + $API->createMapping( - QUICKBOOKS_OBJECT_INVOICE, - $ID, - $Invoice->getTxnID(), + QUICKBOOKS_OBJECT_INVOICE, + $ID, + $Invoice->getTxnID(), $Invoice->getEditSequence()); - } + } } - + static public function addEstimate() { - + } - + static public function addSalesReceipt() { - + } - + static public function addAccount() { - + } - + static public function addClass() { - + } - + static public function addExtra() { - + } - + static public function modExtra() { - + } - + static public function addCustomer($method, $action, $ID, &$err, $qbxml, $Customer, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); - + if (is_object($Customer)) { // If we found the customer in QuickBooks, create a mapping with the ListID value - + $API->createMapping( - QUICKBOOKS_OBJECT_CUSTOMER, - $ID, - $Customer->getListID(), + QUICKBOOKS_OBJECT_CUSTOMER, + $ID, + $Customer->getListID(), $Customer->getEditSequence()); } } - + static public function modCustomer() { - + } - + static public function addReceivePayment($method, $action, $ID, &$err, $qbxml, $ReceivePayment, $qbres) { $API = QuickBooks_API_Singleton::getInstance(); - + if (is_object($ReceivePayment)) { // If we found the customer in QuickBooks, create a mapping with the ListID value - + $API->createMapping( - QUICKBOOKS_OBJECT_RECEIVEPAYMENT, - $ID, - $ReceivePayment->getTxnID(), + QUICKBOOKS_OBJECT_RECEIVEPAYMENT, + $ID, + $ReceivePayment->getTxnID(), $ReceivePayment->getEditSequence()); - } + } } } diff --git a/QuickBooks/Callbacks/Integrator/Errors.php b/QuickBooks/Callbacks/Integrator/Errors.php index c3618e3a..68348ed5 100755 --- a/QuickBooks/Callbacks/Integrator/Errors.php +++ b/QuickBooks/Callbacks/Integrator/Errors.php @@ -1,53 +1,53 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ /** - * + * */ class QuickBooks_Callbacks_Integrator_Errors { /** * - * Error message: - * "3170: There was an error when modifying a data extension named - * "e-mail". QuickBooks error message: This list has been + * Error message: + * "3170: There was an error when modifying a data extension named + * "e-mail". QuickBooks error message: This list has been * modified by another user." * - * Solution: + * Solution: * Send the request again, it usually goes through the second time. - * - * + * + * */ static public function e3170_errorsaving($requestID, $user, $action, $ID, $extra, &$err, $xml, $errnum, $errmsg, $config) { switch ($action) { case QUICKBOOKS_MOD_DATAEXT: - + // Ignore it for now... oops! return true; default: return false; } - + // (default clause for switch() statement) - } - + } + /** * * @@ -58,39 +58,39 @@ static public function e3180_errorsaving($requestID, $user, $action, $ID, $extra switch ($action) { case QUICKBOOKS_ADD_DATAEXT: - + // Ignore it, this happens when we try to DataExtAdd a DataExt that already exists return true; default: return false; } - + // (default clause for switch() statement) } - + static public function e3200_editsequence($requestID, $user, $action, $ID, $extra, &$err, $xml, $errnum, $errmsg, $config) { switch ($action) { case QUICKBOOKS_MOD_CUSTOMER: - + // EditSequence for this customer is out-of-date, query for the customer to get the latest EditSequence, and re-send return QuickBooks_Callbacks_Integrator_Callbacks::integrateQueryCustomer($ID); default: return false; } } - + /** - * - * - * - * + * + * + * + * */ static public function e3100_alreadyexists($requestID, $user, $action, $ID, $extra, &$err, $xml, $errnum, $errmsg, $config) { //print('exists!'); - + // These are special-case handlers, handle these by querying switch ($ID) { @@ -98,63 +98,63 @@ static public function e3100_alreadyexists($requestID, $user, $action, $ID, $ext case QUICKBOOKS_INTEGRATOR_SHIPPING_ID: case QUICKBOOKS_INTEGRATOR_HANDLING_ID: case QUICKBOOKS_INTEGRATOR_DISCOUNT_ID: - + // @TODO Fix this... I'm not sure whether we should issue another // query (havn't we queried already...?) or just ignore this because // we'll refer to these items by FullName in the requests, so if - // it already exists we're golden, or...? - + // it already exists we're golden, or...? + return true; - + switch ($action) { case QUICKBOOKS_ADD_SERVICEITEM: - + break; case QUICKBOOKS_ADD_DISCOUNTITEM: - + break; case QUICKBOOKS_ADD_OTHERCHARGEITEM: - + break; } - + return true; } - + switch ($action) { case QUICKBOOKS_ADD_PAYMENTMETHOD: - + break; case QUICKBOOKS_ADD_SHIPMETHOD: - + break; case QUICKBOOKS_ADD_NONINVENTORYITEM: - + break; case QUICKBOOKS_ADD_INVENTORYITEM: - + break; case QUICKBOOKS_ADD_SERVICEITEM: - - - + + + return true; case QUICKBOOKS_ADD_CUSTOMER: - + // Do a query for the customer // @todo Does this have the potential to cause an infinite loop? Add, taken by Vendor, Query, Add, taken by Vendor, Query, etc. etc. etc. //return QuickBooks_Callbacks_Integrator_Callbacks::integrateQueryCustomer($ID); return true; } - + return false; } - - /** + + /** * This error occurs when we send a request to QuickBooks that has an error, or that QuickBooks doesn't understand (old version of QuickBooks) - * + * * @param string $requestID * @return boolean */ @@ -165,10 +165,10 @@ static public function e0x80040400_foundanerror($requestID, $user, $action, $ide // Some versions don't support this query, so ignore this error return true; } - + return false; } - + static public function e3250_featurenotenabled($requestID, $user, $action, $ident, $extra, &$err, $xml, $errnum, $errmsg, $config) { if ($action == QUICKBOOKS_QUERY_UNITOFMEASURESET) @@ -179,12 +179,12 @@ static public function e3250_featurenotenabled($requestID, $user, $action, $iden return false; } - + /** - * - * - * - */ + * + * + * + */ static public function e_catchall($requestID, $user, $action, $ident, $extra, &$err, $xml, $errnum, $errmsg, $config) { if (!empty($config['_error_email'])) @@ -199,10 +199,10 @@ static public function e_catchall($requestID, $user, $action, $ident, $extra, &$ $msg .= 'Extra: ' . print_r($extra, true) . "\r\n"; $msg .= "\r\n"; $msg .= 'qbXML: ' . $xml . "\r\n"; - + mail($config['_error_email'], $config['_error_subject'], $msg, 'From: ' . $config['_error_from'] . "\r\n"); } - + return false; } } diff --git a/QuickBooks/Callbacks/SQL/Callbacks.php b/QuickBooks/Callbacks/SQL/Callbacks.php index 1eed7f8b..6103ec1d 100644 --- a/QuickBooks/Callbacks/SQL/Callbacks.php +++ b/QuickBooks/Callbacks/SQL/Callbacks.php @@ -11138,11 +11138,11 @@ protected static function _transformToSQLObjects($curpath, $Node, &$objects, $cu case 'TaxLineInfoRet': case 'EmployeePayrollInfo': case 'Earnings': - - // * * * WARNING WARNING WARNING * * * - // The next line of code causes problems with some responses - // because it converts our associative array to turn into a - // numeric array. This causes objects to get cut into multiple + + // * * * WARNING WARNING WARNING * * * + // The next line of code causes problems with some responses + // because it converts our associative array to turn into a + // numeric array. This causes objects to get cut into multiple // pieces: // // array( diff --git a/QuickBooks/Callbacks/SQL/Errors.php b/QuickBooks/Callbacks/SQL/Errors.php index c92c52d3..6b096a0f 100644 --- a/QuickBooks/Callbacks/SQL/Errors.php +++ b/QuickBooks/Callbacks/SQL/Errors.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage SQL */ @@ -20,106 +20,106 @@ //require_once '/Users/kpalmer/Projects/QuickBooks/QuickBooks.php'; /** - * + * */ class QuickBooks_Callbacks_SQL_Errors { /** * @TODO Change this to return false by default, and only catch the specific errors we're concerned with. - * + * */ static public function catchall($requestID, $user, $action, $ident, $extra, &$err, $xml, $errnum, $errmsg, $config) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + $ignore = array( - QUICKBOOKS_IMPORT_DELETEDTXNS => true, + QUICKBOOKS_IMPORT_DELETEDTXNS => true, QUICKBOOKS_QUERY_DELETEDTXNS => true, QUICKBOOKS_IMPORT_DELETEDLISTS => true, - QUICKBOOKS_QUERY_DELETEDLISTS => true, - QUICKBOOKS_VOID_TRANSACTION => true, - QUICKBOOKS_DELETE_TRANSACTION => true, - QUICKBOOKS_DELETE_LIST => true, + QUICKBOOKS_QUERY_DELETEDLISTS => true, + QUICKBOOKS_VOID_TRANSACTION => true, + QUICKBOOKS_DELETE_TRANSACTION => true, + QUICKBOOKS_DELETE_LIST => true, ); - + if (isset($ignore[$action])) { // Ignore errors for these requests return true; } - + /* $Parser = new QuickBooks_XML($xml); $errnumTemp = 0; $errmsgTemp = ''; $Doc = $Parser->parse($errnumTemp, $errmsgTemp); - $Root = $Doc->getRoot(); + $Root = $Doc->getRoot(); $emailStr = var_export($Root->children(), true); - + $List = $Root->getChildAt('QBXML QBXMLMsgsRs '.QuickBooks_Utilities::actionToResponse($action)); $Node = current($List->children()); */ - + $map = array(); $others = array(); QuickBooks_SQL_Schema::mapToSchema(trim(QuickBooks_Utilities::actionToXMLElement($action)), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $map, $others); $object = new QuickBooks_SQL_Object($map[0], trim(QuickBooks_Utilities::actionToXMLElement($action))); $table = $object->table(); - + $existing = null; - + if ($table and is_numeric($ident)) { $multipart = array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ident ); - + $existing = $Driver->get(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $multipart ); } - + switch ($errnum) { case 1: // These errors occur when we search for something and it doesn't exist case 500: // i.e. we query for invoices modified since xyz, but there are none that have been modified since then - + // This isn't really an error, just ignore it - + if ($action == QUICKBOOKS_DERIVE_CUSTOMER) { // Tried to derive, doesn't exist, add it $Driver->queueEnqueue( - $user, - QUICKBOOKS_ADD_CUSTOMER, - $ident, - true, + $user, + QUICKBOOKS_ADD_CUSTOMER, + $ident, + true, QuickBooks_Utilities::priorityForAction(QUICKBOOKS_ADD_CUSTOMER)); } else if ($action == QUICKBOOKS_DERIVE_INVOICE) { // Tried to derive, doesn't exist, add it $Driver->queueEnqueue( - $user, - QUICKBOOKS_ADD_INVOICE, - $ident, - true, + $user, + QUICKBOOKS_ADD_INVOICE, + $ident, + true, QuickBooks_Utilities::priorityForAction(QUICKBOOKS_ADD_INVOICE)); } else if ($action == QUICKBOOKS_DERIVE_RECEIVEPAYMENT) { // Tried to derive, doesn't exist, add it $Driver->queueEnqueue( - $user, - QUICKBOOKS_ADD_RECEIVEPAYMENT, - $ident, - true, - QuickBooks_Utilities::priorityForAction(QUICKBOOKS_ADD_RECEIVEPAYMENT)); + $user, + QUICKBOOKS_ADD_RECEIVEPAYMENT, + $ident, + true, + QuickBooks_Utilities::priorityForAction(QUICKBOOKS_ADD_RECEIVEPAYMENT)); } - + return true; case 1000: // An internal error occured - + // @todo Hopefully at some point we'll have a better idea of how to handle this error... - + return true; //case 3120: // 3120 errors are handled in the 3210 error handler section // break; @@ -127,133 +127,133 @@ static public function catchall($requestID, $user, $action, $ident, $extra, &$er case 3175: case 3176: case 3180: - + // This error can occur in several different situations, so we test per situation - if (false !== strpos($errmsg, 'list has been modified by another user') or - false !== strpos($errmsg, 'internals could not be locked') or - false !== strpos($errmsg, 'failed to acquire the lock') or + if (false !== strpos($errmsg, 'list has been modified by another user') or + false !== strpos($errmsg, 'internals could not be locked') or + false !== strpos($errmsg, 'failed to acquire the lock') or false !== strpos($errmsg, 'list element is in use')) { // This is *not* an error, we can just send the request again, and it'll go through just fine return true; } - + break; case 3200: // Ignore EditSequence errors (the record will be picked up and a conflict reported next time it runs... maybe?) - - if ($action == QUICKBOOKS_MOD_CUSTOMER and + + if ($action == QUICKBOOKS_MOD_CUSTOMER and $existing) { // Queue up a derive customer request // Tried to derive, doesn't exist, add it $Driver->queueEnqueue( - $user, - QUICKBOOKS_DERIVE_CUSTOMER, - $ident, - true, - 9999, + $user, + QUICKBOOKS_DERIVE_CUSTOMER, + $ident, + true, + 9999, array( 'ListID' => $existing['ListID'] )); } - else if ($action == QUICKBOOKS_MOD_INVOICE and + else if ($action == QUICKBOOKS_MOD_INVOICE and $existing) { // Queue up a derive customer request // Tried to derive, doesn't exist, add it $Driver->queueEnqueue( - $user, - QUICKBOOKS_DERIVE_INVOICE, - $ident, - true, - 9999, - array( 'TxnID' => $existing['TxnID'] )); + $user, + QUICKBOOKS_DERIVE_INVOICE, + $ident, + true, + 9999, + array( 'TxnID' => $existing['TxnID'] )); } - + return true; case 3120: case 3210: - + //print_r($existing); //print('TXNID: [' . $existing['TxnID'] . ']'); - + // 3210: The "AppliedToTxnAdd payment amount" field has an invalid value "129.43". QuickBooks error message: You cannot pay more than the amount due. - if ($action == QUICKBOOKS_ADD_RECEIVEPAYMENT and - (false !== strpos($errmsg, 'pay more than the amount due') or false !== strpos($errmsg, 'cannot be found')) and + if ($action == QUICKBOOKS_ADD_RECEIVEPAYMENT and + (false !== strpos($errmsg, 'pay more than the amount due') or false !== strpos($errmsg, 'cannot be found')) and $existing) { // If this happens, we're going to try to re-submit the payment, *without* the AppliedToTxn element - + $db_errnum = null; $db_errmsg = null; - + $Driver->query(" - UPDATE - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . "receivepayment_appliedtotxn - SET - qbsql_to_skip = 1 - WHERE - ReceivePayment_TxnID = '%s' ", - $db_errnum, - $db_errmsg, - null, - null, + UPDATE + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . "receivepayment_appliedtotxn + SET + qbsql_to_skip = 1 + WHERE + ReceivePayment_TxnID = '%s' ", + $db_errnum, + $db_errmsg, + null, + null, array( $existing['TxnID'] )); - + return true; } - + break; - case 3250: // This feature is not enabled or not available in this version of QuickBooks. - + case 3250: // This feature is not enabled or not available in this version of QuickBooks. + // Do nothing (this can be safely ignored) - + return true; - case 3260: // Insufficient permission level to perform this action. + case 3260: // Insufficient permission level to perform this action. case 3261: // The integrated application has no permission to ac... - + // There's nothing we can do about this, if they don't grant the user permission, just skip it - + return true; case 3100: // Name of List Element is already in use. - - - + + + break; case '0x8004040D': // The ticket parameter is invalid (how does this happen!?!) - + return true; } - + // This is our catch-all which marks the item as errored out if (strstr($xml, 'statusSeverity="Info"') === false) // If it's NOT just an Info message. - { + { $multipart = array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ident ); $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_NUMBER, $errnum); $object->set(QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_MESSAGE, $errmsg); - + // Do not set the resync field, we want resync and modified timestamps to be different $update_resync_field = false; $update_discov_field = false; $update_derive_field = false; - - if ($table and + + if ($table and is_numeric($ident)) // This catches cases where errors occur on IMPORT requests with ap9y8ag random idents { // Set the error message - $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $object, array( $multipart ), + $Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table, $object, array( $multipart ), $update_resync_field, - $update_discov_field, + $update_discov_field, $update_derive_field); } } - - // Please don't change this, it stops us from knowing what's actually - // going wrong. If an error occurs, we should either catch it if it's - // recoverable, or treated as a fatal error so we know about it and - // can address it later. + + // Please don't change this, it stops us from knowing what's actually + // going wrong. If an error occurs, we should either catch it if it's + // recoverable, or treated as a fatal error so we know about it and + // can address it later. //return false; - - // I'm changing it because otherwise the sync never completes if a + + // I'm changing it because otherwise the sync never completes if a // single error occurs... we need a way to skip errored-out records return true; } diff --git a/QuickBooks/Cast.php b/QuickBooks/Cast.php index d58f5c11..8609dca9 100755 --- a/QuickBooks/Cast.php +++ b/QuickBooks/Cast.php @@ -1,14 +1,14 @@ 'u', - chr(130) => 'e', - chr(131) => 'a', - chr(132) => 'a', + chr(129) => 'u', + chr(130) => 'e', + chr(131) => 'a', + chr(132) => 'a', chr(133) => 'a', chr(134) => 'a', - chr(136) => 'e', - chr(137) => 'e', - chr(138) => 'e', - chr(139) => 'i', - chr(140) => 'i', - chr(141) => 'i', - chr(142) => 'A', - chr(143) => 'A', - chr(144) => 'E', - chr(145) => 'ae', - chr(146) => 'AE', - chr(147) => 'o', - chr(148) => 'o', - chr(149) => 'o', - chr(150) => 'u', - chr(151) => 'u', - chr(152) => '_', - chr(153) => 'O', - chr(154) => 'U', - chr(158) => '_', - chr(160) => 'a', - chr(161) => 'i', - chr(162) => 'o', - chr(163) => 'u', - chr(164) => 'n', - chr(165) => 'N', - chr(173) => 'i', - chr(174) => '<', - chr(175) => '>', - chr(179) => '|', - chr(196) => '-', - chr(242) => '>=', - chr(243) => '<=', - chr(246) => '/', - chr(247) => '~', - chr(249) => '.', - chr(250) => '.', - chr(252) => '_', + chr(136) => 'e', + chr(137) => 'e', + chr(138) => 'e', + chr(139) => 'i', + chr(140) => 'i', + chr(141) => 'i', + chr(142) => 'A', + chr(143) => 'A', + chr(144) => 'E', + chr(145) => 'ae', + chr(146) => 'AE', + chr(147) => 'o', + chr(148) => 'o', + chr(149) => 'o', + chr(150) => 'u', + chr(151) => 'u', + chr(152) => '_', + chr(153) => 'O', + chr(154) => 'U', + chr(158) => '_', + chr(160) => 'a', + chr(161) => 'i', + chr(162) => 'o', + chr(163) => 'u', + chr(164) => 'n', + chr(165) => 'N', + chr(173) => 'i', + chr(174) => '<', + chr(175) => '>', + chr(179) => '|', + chr(196) => '-', + chr(242) => '>=', + chr(243) => '<=', + chr(246) => '/', + chr(247) => '~', + chr(249) => '.', + chr(250) => '.', + chr(252) => '_', ); - + $count = strlen($str); for ($i = 0; $i < $count; $i++) { $ord = ord($str{$i}); - - if ($ord != ord("\t") and - $ord != ord("\n") and - $ord != ord("\r") and - ($ord < 32 or $ord > 126)) + + if ($ord != ord("\t") and + $ord != ord("\n") and + $ord != ord("\r") and + ($ord < 32 or $ord > 126)) { if (isset($replace[$ord])) { @@ -113,79 +113,79 @@ static protected function _castCharset($str) } } } - + return $str; } */ - + /** * Convert certain strings to their abbreviations - * - * QuickBooks often uses unusually short field lengths. This function will - * convert common long words to shorter abbreviations in an attempt to make + * + * QuickBooks often uses unusually short field lengths. This function will + * convert common long words to shorter abbreviations in an attempt to make * a string fit cleanly into the very short fields. - * + * * @param string $value The value to apply the abbreviations to * @return string */ static protected function _castAbbreviations($value) { $abbrevs = array( - 'Administration' => 'Admin.', - 'Academic' => 'Acad.', - 'Academy' => 'Acad.', + 'Administration' => 'Admin.', + 'Academic' => 'Acad.', + 'Academy' => 'Acad.', 'Association' => 'Assn.', - 'Boulevard' => 'Blvd.', - 'Building' => 'Bldg.', - 'College' => 'Coll.', - 'Company' => 'Co.', - 'Consolidated' => 'Consol.', - 'Corporation' => 'Corp.', - 'Incorporated' => 'Inc.', - 'Department' => 'Dept.', - 'Division' => 'Div.', - 'District' => 'Dist.', - 'Eastern' => 'E.', - 'Government' => 'Govt.', - 'International' => 'Intl.', - 'Institute' => 'Inst.', - 'Institution' => 'Inst.', + 'Boulevard' => 'Blvd.', + 'Building' => 'Bldg.', + 'College' => 'Coll.', + 'Company' => 'Co.', + 'Consolidated' => 'Consol.', + 'Corporation' => 'Corp.', + 'Incorporated' => 'Inc.', + 'Department' => 'Dept.', + 'Division' => 'Div.', + 'District' => 'Dist.', + 'Eastern' => 'E.', + 'Government' => 'Govt.', + 'International' => 'Intl.', + 'Institute' => 'Inst.', + 'Institution' => 'Inst.', 'Laboratory' => 'Lab.', - 'Liberty' => 'Lib.', - 'Library' => 'Lib.', - 'Limited' => 'Ltd.', - 'Manufacturing' => 'Mfg.', - 'Manufacturer' => 'Mfr.', - 'Miscellaneous' => 'Misc.', - 'Museum' => 'Mus.', - 'Northern' => 'N.', + 'Liberty' => 'Lib.', + 'Library' => 'Lib.', + 'Limited' => 'Ltd.', + 'Manufacturing' => 'Mfg.', + 'Manufacturer' => 'Mfr.', + 'Miscellaneous' => 'Misc.', + 'Museum' => 'Mus.', + 'Northern' => 'N.', 'Northeastern' => 'NE', // This is *before* Northeast so we don't get "NEern" - 'Northeast' => 'NE', - 'Regional' => 'Reg.', // This is *before* Region so we don't get "Reg.al" - 'Region' => 'Reg.', + 'Northeast' => 'NE', + 'Regional' => 'Reg.', // This is *before* Region so we don't get "Reg.al" + 'Region' => 'Reg.', 'School' => 'Sch.', - 'Services' => 'Svcs.', // This is *before* Service so that we don't get "Svc.s" - 'Service' => 'Svc.', - 'Southern' => 'S.', - 'Southeastern' => 'SE', - 'Southeast' => 'SE', - 'University' => 'Univ.', - 'Western' => 'W.', + 'Services' => 'Svcs.', // This is *before* Service so that we don't get "Svc.s" + 'Service' => 'Svc.', + 'Southern' => 'S.', + 'Southeastern' => 'SE', + 'Southeast' => 'SE', + 'University' => 'Univ.', + 'Western' => 'W.', ); - + return str_ireplace(array_keys($abbrevs), array_values($abbrevs), $value); } - + /** * Shorten a string to a specific length by truncating or abbreviating the string - * - * QuickBooks often uses unusually short field lengths. This function can - * be used to try to make long strings fit cleanly into the QuickBooks + * + * QuickBooks often uses unusually short field lengths. This function can + * be used to try to make long strings fit cleanly into the QuickBooks * fields. It tries to do a few things: * - Convert long words to shorter abbreviations * - Remove non-ASCII characters * - Truncate the string if it's still too long - * + * * @param string $value The string to shorten * @param integer $length The max. length the string should be * @param boolean $with_abbrevs Whether or not to abbreviate some long words to shorten the string @@ -194,49 +194,49 @@ static protected function _castAbbreviations($value) static protected function _castTruncate($value, $length, $with_abbrevs = true) { //$value = QuickBooks_Cast::_castCharset($value); - + if (strlen($value) > $length) { if ($with_abbrevs) { $value = QuickBooks_Cast::_castAbbreviations($value); } - + if (strlen($value) > $length) { $value = substr($value, 0, $length); } } - + // This breaks the UTF8 encoding //return utf8_encode($value); - + // Just return the data return $value; } - + /** - * - * - * + * + * + * */ static protected function _fnmatch($pattern, $str) { $arr = array( - '\*' => '.*', + '\*' => '.*', '\?' => '.' ); return preg_match('#^' . strtr(preg_quote($pattern, '#'), $arr) . '$#i', $str); } - + /** * Cast a value to ensure that it will fit in a particular field within QuickBooks - * - * QuickBooks has some strange length limits on some fields (the max. - * length of the CompanyName field for Customers is only 41 characters, - * etc.) so this method provides an easy way to cast the data type and data + * + * QuickBooks has some strange length limits on some fields (the max. + * length of the CompanyName field for Customers is only 41 characters, + * etc.) so this method provides an easy way to cast the data type and data * length of a value to the correct type and length for a specific field. - * + * * @param string $object_type The QuickBooks object type (Customer, Invoice, etc.) * @param string $field_name The QuickBooks field name (these correspond to the qbXML field names: Addr1, Name, CompanyName, etc.) * @param mixed $value The value you want to cast @@ -247,9 +247,9 @@ static protected function _fnmatch($pattern, $str) static public function cast($type_or_action, $field, $value, $use_abbrevs = true, $htmlspecialchars = true) { $type_or_action = strtolower($type_or_action); - + static $files = array(); - + if (!count($files)) { $dh = opendir(dirname(__FILE__) . '/QBXML/Schema/Object'); @@ -259,73 +259,73 @@ static public function cast($type_or_action, $field, $value, $use_abbrevs = true { continue; } - + $files[] = $file; } - + sort($files); } - + /* if ($htmlspecialchars) - { + { $entities = array( - '&' => '&', - '<' => '<', + '&' => '&', + '<' => '<', '>' => '>', - //'\'' => ''', - '"' => '"', + //'\'' => ''', + '"' => '"', ); - + // First, *unreplace* things so that we don't double escape them $value = str_replace(array_values($entities), array_keys($entities), $value); - + // Then, replace XML entities $value = str_replace(array_keys($entities), array_values($entities), $value); - + //$value = htmlspecialchars($value, ENT_QUOTES, null, false); - } + } */ - + $types = array(); $types3 = array(); $types5 = array(); - - reset($files); + + reset($files); foreach ($files as $file) { $substr = substr($file, 0, -4); $substrlower = strtolower($substr); - + $types[$substrlower] = $substr; - + $substr3 = substr($file, 0, -3 + -3); $substr3lower = strtolower($substr3); - + $substr5 = substr($file, 0, -3 + -6); $substr5lower = strtolower($substr5); - + if (!isset($types3[$substr3lower])) { $types3[$substr3lower] = $substr; } - + if (!isset($types5[$substr5lower])) { $types5[$substr5lower] = $substr; } } - + /* print(' looking for schema: ' . $type_or_action . "\n"); print_r($types); print_r($types3); print_r($types5); */ - + $class = null; $schema = null; - + if (isset($types[$type_or_action])) { QuickBooks_Loader::load('/QuickBooks/QBXML/Schema/Object/' . $types[$type_or_action] . '.php'); @@ -348,33 +348,33 @@ static public function cast($type_or_action, $field, $value, $use_abbrevs = true //{ // return $value; //} - + //print(' casting using schema: ' . get_class($schema) . "\n"); - + if ($class and $schema) { if (!$schema->exists($field) and false !== strpos($field, '_')) { $field = str_replace('_', ' ', $field); } - + if ($schema->exists($field)) { switch ($schema->dataType($field)) { case QUICKBOOKS_DATATYPE_STRING: - + $maxlength = $schema->maxLength($field); - + // Use only ASCII characters //$value = QuickBooks_Cast::_castCharset($value); - + // Make sure it'll fit in the allocated field length if (is_int($maxlength) and $maxlength > 0) { $value = QuickBooks_Cast::_castTruncate($value, $maxlength, $use_abbrevs); } - + break; case QUICKBOOKS_DATATYPE_DATE: if ($value) @@ -398,7 +398,7 @@ static public function cast($type_or_action, $field, $value, $use_abbrevs = true $value = (float) $value; break; case QUICKBOOKS_DATATYPE_BOOLEAN: - + if ($value and $value !== 'false') { $value = 'true'; @@ -407,111 +407,111 @@ static public function cast($type_or_action, $field, $value, $use_abbrevs = true { $value = 'false'; } - + break; case QUICKBOOKS_DATATYPE_INTEGER: $value = (int) $value; break; - } + } } } - + /* if ($htmlspecialchars) - { + { $entities = array( - '&' => '&', - '<' => '<', + '&' => '&', + '<' => '<', '>' => '>', - //'\'' => ''', - '"' => '"', + //'\'' => ''', + '"' => '"', ); - + // First, *unreplace* things so that we don't double escape them $value = str_replace(array_values($entities), array_keys($entities), $value); - + // Then, replace XML entities $value = str_replace(array_keys($entities), array_values($entities), $value); - + //$value = htmlspecialchars($value, ENT_QUOTES, null, false); } */ - + if ($htmlspecialchars) { //print("DECODING"); - + $entities = array( - '&' => '&', - '<' => '<', + '&' => '&', + '<' => '<', '>' => '>', - //'\'' => ''', - '"' => '"', + //'\'' => ''', + '"' => '"', ); - + // First, *unreplace* things so that we don't double escape them $value = str_replace(array_values($entities), array_keys($entities), $value); - + // Then, replace XML entities $value = str_replace(array_keys($entities), array_values($entities), $value); - + //$value = htmlspecialchars($value, ENT_QUOTES, null, false); - + //print($value . "\n\n\n"); - + // UTF8 character handling, decode UTF8 to character decimal codes $value = QuickBooks_Cast::_decodeUTF8($value); - + //die($value . "\n\n"); } - + return $value; } - + /** * Test a string to see if it has 8 bit symbols in it * * @param string $string * @param string $charset - * @return bool + * @return bool */ - static protected function _is8Bit($string, $charset = '') + static protected function _is8Bit($string, $charset = '') { - if (preg_match("/^iso-8859/i", $charset)) + if (preg_match("/^iso-8859/i", $charset)) { $needle = '/\240|[\241-\377]/'; - } - else + } + else { $needle = '/[\200-\237]|\240|[\241-\377]/'; } - + return preg_match("$needle", $string); } - + /** * Converts string from an encoded string to UTF8 - * + * * @param string $string Text with numeric unicode entities * @return string UTF-8 text */ - static protected function _encodeUTF8($string) + static protected function _encodeUTF8($string) { // Don't run encoding function, if there is no encoded characters - if (!preg_match("'&#[0-9]+;'", $string)) + if (!preg_match("'&#[0-9]+;'", $string)) { return $string; } - + $string = preg_replace("/&#([0-9]+);/e", "QuickBooks_Cast_unicodetoutf8('\\1')", $string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetoutf8(hexdec('\\1'))",$string); - + return $string; } - + /** * Decode a UTF-8 string to an entity encoded string - * + * * @param string $string Encoded string * @return string Decoded string */ @@ -522,7 +522,7 @@ static protected function _decodeUTF8($string) { return $string; } - + // decode four byte unicode characters $string = preg_replace_callback("/([\360-\367])([\200-\277])([\200-\277])([\200-\277])/", function($arr) @@ -530,8 +530,8 @@ function($arr) $val = ((ord($arr[1])-240)*262144+(ord($arr[2])-128)*4096+(ord($arr[3])-128)*64+(ord($arr[4])-128)); return "&#" . $val . ";"; }, $string); - - + + // decode three byte unicode characters $string = preg_replace_callback("/([\340-\357])([\200-\277])([\200-\277])/", function($arr) @@ -539,8 +539,8 @@ function($arr) $val = ((ord($arr[1])-224)*4096+(ord($arr[2])-128)*64+(ord($arr[3])-128)); return "&#" . $val . ";"; }, $string); - - + + // decode two byte unicode characters $string = preg_replace_callback("/([\300-\337])([\200-\277])/", function($arr) @@ -548,10 +548,10 @@ function($arr) $val = ((ord($arr[1])-192)*64+(ord($arr[2])-128)); return "&#" . $val . ";"; }, $string); - + // remove broken unicode $string = preg_replace("/[\200-\237]|\240|[\241-\377]/", '?', $string); - + return $string; } } @@ -562,13 +562,13 @@ function($arr) * @param int $var Decimal unicode value * @return string UTF-8 character */ -function QuickBooks_Cast_unicodetoutf8($var) +function QuickBooks_Cast_unicodetoutf8($var) { - if ($var < 128) + if ($var < 128) { $ret = chr ($var); - } - else if ($var < 2048) + } + else if ($var < 2048) { // Two byte utf-8 $binVal = str_pad (decbin ($var), 11, '0', STR_PAD_LEFT); @@ -578,8 +578,8 @@ function QuickBooks_Cast_unicodetoutf8($var) $char1 = chr (192 + bindec ($binPart1)); $char2 = chr (128 + bindec ($binPart2)); $ret = $char1 . $char2; - } - else if ($var < 65536) + } + else if ($var < 65536) { // Three byte utf-8 $binVal = str_pad (decbin ($var), 16, '0', STR_PAD_LEFT); @@ -591,8 +591,8 @@ function QuickBooks_Cast_unicodetoutf8($var) $char2 = chr (128 + bindec ($binPart2)); $char3 = chr (128 + bindec ($binPart3)); $ret = $char1 . $char2 . $char3; - } - else if ($var < 2097152) + } + else if ($var < 2097152) { // Four byte utf-8 $binVal = str_pad (decbin ($var), 21, '0', STR_PAD_LEFT); @@ -606,8 +606,8 @@ function QuickBooks_Cast_unicodetoutf8($var) $char3 = chr (128 + bindec ($binPart3)); $char4 = chr (128 + bindec ($binPart4)); $ret = $char1 . $char2 . $char3 . $char4; - } - else if ($var < 67108864) + } + else if ($var < 67108864) { // Five byte utf-8 $binVal = str_pad (decbin ($var), 26, '0', STR_PAD_LEFT); @@ -623,8 +623,8 @@ function QuickBooks_Cast_unicodetoutf8($var) $char4 = chr (128 + bindec ($binPart4)); $char5 = chr (128 + bindec ($binPart5)); $ret = $char1 . $char2 . $char3 . $char4 . $char5; - } - else if ($var < 2147483648) + } + else if ($var < 2147483648) { // Six byte utf-8 $binVal = str_pad(decbin($var), 31, '0', STR_PAD_LEFT); @@ -642,13 +642,13 @@ function QuickBooks_Cast_unicodetoutf8($var) $char5 = chr(128 + bindec($binPart5)); $char6 = chr(128 + bindec($binPart6)); $ret = $char1 . $char2 . $char3 . $char4 . $char5 . $char6; - } - else + } + else { // there is no such symbol in utf-8 $ret = '?'; } - + return $ret; } diff --git a/QuickBooks/Compat.php b/QuickBooks/Compat.php index 6272ea48..0b66ded5 100644 --- a/QuickBooks/Compat.php +++ b/QuickBooks/Compat.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks */ @@ -33,7 +33,7 @@ function array_intersect_key($isec, $keys) } } } - + return $isec; } else diff --git a/QuickBooks/Driver/Factory.php b/QuickBooks/Driver/Factory.php index c549aca0..b97fdcae 100644 --- a/QuickBooks/Driver/Factory.php +++ b/QuickBooks/Driver/Factory.php @@ -1,55 +1,55 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Driver */ - + /** - * + * */ QuickBooks_Loader::load('/QuickBooks/Utilities.php'); - + /** - * - * + * + * * */ class QuickBooks_Driver_Factory { /** * Create an instance of a driver class from a DSN connection string *or* a connection resource - * + * * You can actually pass in *either* a DSN-style connection string OR an already connected database resource * - mysql://user:pass@localhost:port/database * - $var (Resource ID #XYZ, valid MySQL connection resource) - * + * * @param mixed $dsn_or_conn A DSN-style connection string or a PHP resource * @param array $config An array of configuration options for the driver * @param array $hooks An array mapping hooks to user-defined hook functions to call - * @param integer $log_level + * @param integer $log_level * @return object A class instance, a child class of QuickBooks_Driver */ static public function create($dsn_or_conn, $config = array(), $hooks = array(), $log_level = QUICKBOOKS_LOG_NORMAL) { static $instances = array(); - + if (!is_array($hooks)) { $hooks = array(); } - + // Do not serialize the $hooks because they might contain non-serializeable objects if (is_object($dsn_or_conn)) { @@ -74,7 +74,7 @@ static public function create($dsn_or_conn, $config = array(), $hooks = array(), { $scheme = QuickBooks_Utilities::parseDSN($dsn_or_conn, array(), 'scheme'); } - + if (false !== strpos($scheme, 'sql')) // SQL drivers are subclassed... change class/scheme name { $scheme = 'Sql_' . ucfirst(strtolower($scheme)); @@ -83,21 +83,21 @@ static public function create($dsn_or_conn, $config = array(), $hooks = array(), { $scheme = ucfirst(strtolower($scheme)); } - + $class = 'QuickBooks_Driver_' . $scheme; $file = '/QuickBooks/Driver/' . str_replace(' ', '/', ucwords(str_replace('_', ' ', strtolower($scheme)))) . '.php'; //print('class: ' . $class . "\n"); //print('file: ' . $file . "\n"); - + QuickBooks_Loader::load($file); - + if (class_exists($class)) { $Driver = new $class($dsn_or_conn, $config); $Driver->registerHooks($hooks); $Driver->setLogLevel($log_level); - + /* static $static = 0; $static++; @@ -105,13 +105,13 @@ static public function create($dsn_or_conn, $config = array(), $hooks = array(), mysql_query("INSERT INTO quickbooks_log ( msg, log_datetime ) VALUES ( 'Here is my " . $static . " key: " . $key . "', NOW() )"); //print_r($hooks); */ - + // @todo Ugh this is really ugly... maybe have $log_level passed in as a parameter? Not really a driver option at all? //if (isset($config['log_level'])) //{ // $driver->setLogLevel($config['log_level']); //} - + $instances[$key] = $Driver; } else @@ -119,7 +119,7 @@ static public function create($dsn_or_conn, $config = array(), $hooks = array(), $instances[$key] = null; } } - + return $instances[$key]; - } + } } diff --git a/QuickBooks/Driver/Singleton.php b/QuickBooks/Driver/Singleton.php index da809652..1c3a27d9 100755 --- a/QuickBooks/Driver/Singleton.php +++ b/QuickBooks/Driver/Singleton.php @@ -2,43 +2,43 @@ /** * QuickBooks driver singleton - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Driver */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/Driver.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/Driver/Factory.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/Utilities.php'); /** - * + * */ class QuickBooks_Driver_Singleton { /** - * - * + * + * * @param string $dsn_or_conn * @param array $options * @return QuickBooks_Driver @@ -51,13 +51,13 @@ public static function getInstance($dsn_or_conn = null, $options = array(), $hoo //$instance = QuickBooks_Utilities::driverFactory($dsn_or_conn, $options, $hooks, $log_level); $instance = QuickBooks_Driver_Factory::create($dsn_or_conn, $options, $hooks, $log_level); } - + return $instance; } - + /** - * - * + * + * */ public static function initialize($dsn_or_conn, $options = array(), $hooks = array(), $log_level = null) { @@ -65,7 +65,7 @@ public static function initialize($dsn_or_conn, $options = array(), $hooks = arr { return true; } - + return false; } } diff --git a/QuickBooks/Driver/Sql/Mssql.php b/QuickBooks/Driver/Sql/Mssql.php index 22e0602f..543a4f26 100755 --- a/QuickBooks/Driver/Sql/Mssql.php +++ b/QuickBooks/Driver/Sql/Mssql.php @@ -2,24 +2,24 @@ /** * Microsoft SQL Server backend for the QuickBooks SOAP server - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * - * You need to use some sort of backend to facilitate communication between the - * SOAP server and your application. The SOAP server stores queue requests - * using the backend. - * - * This backend driver is for a Microsoft SQL Server database. You can use the - * {@see QuickBooks_Utilities} class to initalize the tables in the Microsoft - * SQL database. - * + * + * You need to use some sort of backend to facilitate communication between the + * SOAP server and your application. The SOAP server stores queue requests + * using the backend. + * + * This backend driver is for a Microsoft SQL Server database. You can use the + * {@see QuickBooks_Utilities} class to initalize the tables in the Microsoft + * SQL database. + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Driver */ @@ -56,8 +56,8 @@ if (!defined('QUICKBOOKS_DRIVER_SQL_MSSQL_PREFIX')) { /** - * - * + * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MSSQL_PREFIX', QUICKBOOKS_DRIVER_SQL_PREFIX); @@ -67,7 +67,7 @@ { /** * MySQL table name to store queued requests in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MSSQL_QUEUETABLE', QUICKBOOKS_DRIVER_SQL_QUEUETABLE); @@ -77,7 +77,7 @@ { /** * MySQL table name to store usernames/passwords for the QuickBooks SOAP server - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MSSQL_USERTABLE', QUICKBOOKS_DRIVER_SQL_USERTABLE); @@ -87,7 +87,7 @@ { /** * The table name to store session tickets in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MSSQL_TICKETTABLE', QUICKBOOKS_DRIVER_SQL_TICKETTABLE); @@ -97,7 +97,7 @@ { /** * The table name to store log data in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MSSQL_LOGTABLE', QUICKBOOKS_DRIVER_SQL_LOGTABLE); @@ -107,7 +107,7 @@ { /** * The table name to store recurring events in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MSSQL_RECURTABLE', QUICKBOOKS_DRIVER_SQL_RECURTABLE); @@ -117,7 +117,7 @@ { /** * The table name to store identifiers in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MSSQL_IDENTTABLE', QUICKBOOKS_DRIVER_SQL_IDENTTABLE); @@ -127,7 +127,7 @@ { /** * The table name to store configuration options in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MSSQL_CONFIGTABLE', QUICKBOOKS_DRIVER_SQL_CONFIGTABLE); @@ -137,7 +137,7 @@ { /** * The table name to store notifications in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MSSQL_NOTIFYTABLE', QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE); @@ -146,7 +146,7 @@ if (!defined('QUICKBOOKS_DRIVER_SQL_MSSQL_CONNECTIONTABLE')) { /** - * The table name to store connection data in + * The table name to store connection data in * * @var string */ @@ -156,7 +156,7 @@ if (!defined('QUICKBOOKS_DRIVER_SQL_MSSQL_OAUTHTABLE')) { /** - * The table name to store oauth data in + * The table name to store oauth data in * * @var string */ @@ -167,7 +167,7 @@ { /** * Define the default message level to set the SQL server connection to (set to 17 to ignore notices) - * + * * @var integer */ define('QUICKBOOKS_DRIVER_SQL_MSSQL_MESSAGE_LEVEL', 1); @@ -190,28 +190,28 @@ class QuickBooks_Driver_Sql_Mssql extends QuickBooks_Driver_Sql { /** * MySQL connection resource - * + * * @var resource */ protected $_conn; - + /** * Log level (debug, verbose, normal) - * + * * @var integer */ protected $_log_level; - + /** * User-defined hook functions - * - * @var array + * + * @var array */ protected $_hooks; - + /** * Create a new Microsoft SQL Server back-end driver - * + * * @param string $dsn A DSN-style connection string (i.e.: "mysql://your-mysql-username:your-mysql-password@your-mysql-host:port/your-mysql-database") * @param array $config Configuration options for the driver (not currently supported) */ @@ -219,7 +219,7 @@ public function __construct($dsn_or_conn, $config) { $config = $this->_defaults($config); $this->_log_level = (int) $config['log_level']; - + if (is_resource($dsn_or_conn)) { $this->_conn = $dsn_or_conn; @@ -227,75 +227,75 @@ public function __construct($dsn_or_conn, $config) else { $defaults = array( - 'scheme' => 'mssql', - 'host' => 'localhost', - 'port' => 1433, - 'user' => 'admin', - 'pass' => '', + 'scheme' => 'mssql', + 'host' => 'localhost', + 'port' => 1433, + 'user' => 'admin', + 'pass' => '', 'path' => '/quickbooks', ); - + $parse = QuickBooks_Utilities::parseDSN($dsn_or_conn, $defaults); - + $this->_connect($parse['host'], $parse['port'], $parse['user'], $parse['pass'], substr($parse['path'], 1), $config['new_link'], $config['client_flags']); } } - + /** * Merge an array of configuration options with the defaults - * + * * @param array $config - * @return array + * @return array */ protected function _defaults($config) { $defaults = array( 'log_level' => QUICKBOOKS_LOG_NORMAL, - 'client_flags' => 0, - 'new_link' => true, + 'client_flags' => 0, + 'new_link' => true, ); - + return array_merge($defaults, $config); } - + /** * Tell whether or not the SQL driver has been initialized - * + * * @return boolean */ protected function _initialized() { $required = array( - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_IDENTTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_USERTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_LOGTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONFIGTABLE) => false, - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE) => false, - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONNECTIONTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_IDENTTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_USERTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_LOGTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONFIGTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONNECTIONTABLE) => false, ); - + $errnum = 0; $errmsg = ''; $res = $this->_query(" - SELECT - table_name AS name + SELECT + table_name AS name FROM - INFORMATION_SCHEMA.Tables - WHERE + INFORMATION_SCHEMA.Tables + WHERE TABLE_TYPE = 'BASE TABLE' ", $errnum, $errmsg); while ($arr = $this->_fetch($res)) { $table = current($arr); - + if (isset($required[$table])) { $required[$table] = true; } } - + foreach ($required as $table => $exists) { if (!$exists) @@ -303,13 +303,13 @@ protected function _initialized() return false; } } - + return true; } - + /** * Connect to the database - * + * * @param string $host The hostname the database is located at * @param integer $port The port the database is at * @param string $user Username for connecting @@ -323,7 +323,7 @@ protected function _connect($host, $port, $user, $pass, $db, $new_link, $client_ { mssql_min_message_severity(QUICKBOOKS_DRIVER_SQL_MSSQL_MESSAGE_LEVEL); mssql_min_error_severity(QUICKBOOKS_DRIVER_SQL_MSSQL_ERROR_LEVEL); - + if ($port) { $this->_conn = mssql_connect($host, $user, $pass, $new_link) or die('host: ' . $host . ', user: ' . $user . ', pass: ' . $pass . ' mysql_error(): ' . mssql_get_last_message()); @@ -332,32 +332,32 @@ protected function _connect($host, $port, $user, $pass, $db, $new_link, $client_ { $this->_conn = mssql_connect($host . ':' . $port, $user, $pass, $new_link) or die('host: ' . $host . ', user: ' . $user . ', pass: ' . $pass . ' mysql_error(): ' . mssql_get_last_message()); } - + return mssql_select_db($db, $this->_conn); } - + /** * Fetch an array from a database result set - * + * * @param resource $res * @return array */ protected function _fetch($res) { $arr = mssql_fetch_assoc($res); - - // What's going on with this...? + + // What's going on with this...? foreach ($arr as $key => $value) { $arr[$key] = trim($value); } - + return $arr; } - + /** * Query the database - * + * * @param string $sql * @return resource */ @@ -366,7 +366,7 @@ protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null) if ($limit) { $sql = str_replace(array( "SELECT ", "SELECT\n", "SELECT\r" ), 'SELECT TOP ' . (int) $limit . ' ' . "\n", $sql); - + /* select * from ( select top 10 emp_id,lname,fname from ( @@ -374,42 +374,42 @@ protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null) from employee order by lname asc ) as newtbl order by lname desc -) as newtbl2 order by lname asc +) as newtbl2 order by lname asc */ - + if ($offset) { - + } else { - + } } else if ($offset) { // @todo Does this need to be implemented...? } - + $res = mssql_query($sql, $this->_conn); - + if (!$res) { $errnum = 1; $errmsg = mssql_get_last_message(); - + //print($sql); - + trigger_error('Error: ' . $errmsg . "\n" . 'SQL: ' . $sql, E_USER_ERROR); return false; } - + return $res; } - + /** * Issue a query to the SQL server - * + * * @param string $sql * @param integer $errnum * @param string $errmsg @@ -419,20 +419,20 @@ protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null) { return $this->_query($sql, $errnum, $errmsg, $offset, $limit); }*/ - + /** * Tell the number of rows the last run query affected - * + * * @return integer */ public function affected() { return mssql_rows_affected($this->_conn); } - + /** * Tell the last inserted AUTO_INCREMENT value - * + * * @return integer */ public function last() @@ -444,10 +444,10 @@ public function last() $arr = $this->_fetch($res); return $arr['last_insert_id']; } - + return 0; } - + /** * Rewind the result set * @@ -460,13 +460,13 @@ public function rewind($res) { return mssql_data_seek($res, 0); } - + return true; } - + /** * Tell the number of records in a result resource - * + * * @param resource $res * @return integer */ @@ -474,10 +474,10 @@ public function count($res) { return $this->_count($res); } - + /** * Escape a string - * + * * @param string $str * @return string */ @@ -485,10 +485,10 @@ public function escape($str) { return $this->_escape($str); } - + /** * Fetch a record from a result set - * + * * @param resource $res * @return array */ @@ -496,10 +496,10 @@ public function fetch($res) { return $this->_fetch($res); } - + /** * Escape a string for the database - * + * * @param string $str * @return string */ @@ -507,13 +507,13 @@ protected function _escape($str) { $str = str_replace("\0", '[NULL]', $str); $str = str_replace("'", "''", $str); - + return $str; } - + /** * Count the number of rows returned from the database - * + * * @param resource $res * @return integer */ @@ -521,18 +521,18 @@ protected function _count($res) { return mssql_num_rows($res); } - + /** * Override for the default SQL generation functions, MSSQL-specific field generation function - * - * The Microsoft SQL Server PHP module is retarded, and for some reason - * decides to cast anything as DEFAULT NULL unless you specify them just as - * NULL. Specifying DEFAULT NULL doesn't work. This is contrary to the - * actual SQL Server Studio tool, which actually works like it should. - * - * WTF? Seriously, I just wasted like 4 hours trying to figure out what I - * did wrong, and it turns out the stupid module is just stupid. - * + * + * The Microsoft SQL Server PHP module is retarded, and for some reason + * decides to cast anything as DEFAULT NULL unless you specify them just as + * NULL. Specifying DEFAULT NULL doesn't work. This is contrary to the + * actual SQL Server Studio tool, which actually works like it should. + * + * WTF? Seriously, I just wasted like 4 hours trying to figure out what I + * did wrong, and it turns out the stupid module is just stupid. + * * @param string $name * @param array $def * @return string @@ -543,19 +543,19 @@ protected function _generateFieldSchema($name, $def) switch ($def[0]) { case QUICKBOOKS_DRIVER_SQL_SERIAL: - - $sql = $name . ' integer NOT NULL IDENTITY(1, 1) '; // AUTO_INCREMENT + + $sql = $name . ' integer NOT NULL IDENTITY(1, 1) '; // AUTO_INCREMENT return $sql; case QUICKBOOKS_DRIVER_SQL_TIMESTAMP: case QUICKBOOKS_DRIVER_SQL_TIMESTAMP_ON_INSERT_OR_UPDATE: case QUICKBOOKS_DRIVER_SQL_TIMESTAMP_ON_UPDATE: - + $sql = $name . ' TIMESTAMP '; return $sql; case QUICKBOOKS_DRIVER_SQL_DATETIME: case QUICKBOOKS_DRIVER_SQL_DATE: $sql = $name . ' DATETIME '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -567,22 +567,22 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - + return $sql; case QUICKBOOKS_DRIVER_SQL_VARCHAR: $sql = $name . ' VARCHAR'; - + /*if ($name == 'ListID') { print('LIST ID:'); print_r($def); }*/ - + if (!empty($def[1])) { $sql .= '(' . (int) $def[1] . ') '; } - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -602,16 +602,16 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - + return $sql; case QUICKBOOKS_DRIVER_SQL_CHAR: $sql = $name . ' CHAR'; - + if (!empty($def[1])) { $sql .= '(' . (int) $def[1] . ') '; } - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -627,11 +627,11 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - - return $sql; + + return $sql; case QUICKBOOKS_DRIVER_SQL_TEXT: $sql = $name . ' TEXT '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -647,12 +647,12 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - + return $sql; case QUICKBOOKS_DRIVER_SQL_INTEGER: - + $sql = $name . ' INTEGER '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -664,11 +664,11 @@ protected function _generateFieldSchema($name, $def) $sql .= ' DEFAULT ' . (int) $def[2]; } } - + return $sql; case QUICKBOOKS_DRIVER_SQL_BOOLEAN: $sql = $name . ' tinyint '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -684,11 +684,11 @@ protected function _generateFieldSchema($name, $def) $sql .= ' DEFAULT 0 '; } } - + return $sql; /*case QUICKBOOKS_DRIVER_SQL_INTEGER: $sql = $name . ' int(10) unsigned '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -704,17 +704,17 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - + return $sql;*/ default: - + return parent::_generateFieldSchema($name, $def); } } - + /** * Map a default SQL table name to a MySQL table name - * + * * @param string * @return string */ @@ -735,7 +735,7 @@ protected function _mapTableName($table) case QUICKBOOKS_DRIVER_SQL_CONFIGTABLE: return QUICKBOOKS_DRIVER_SQL_MSSQL_PREFIX . QUICKBOOKS_DRIVER_SQL_MSSQL_CONFIGTABLE; case QUICKBOOKS_DRIVER_SQL_IDENTTABLE: - return QUICKBOOKS_DRIVER_SQL_MSSQL_PREFIX . QUICKBOOKS_DRIVER_SQL_MSSQL_IDENTTABLE; + return QUICKBOOKS_DRIVER_SQL_MSSQL_PREFIX . QUICKBOOKS_DRIVER_SQL_MSSQL_IDENTTABLE; case QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE: return QUICKBOOKS_DRIVER_SQL_MSSQL_PREFIX . QUICKBOOKS_DRIVER_SQL_MSSQL_NOTIFYTABLE; case QUICKBOOKS_DRIVER_SQL_CONNECTIONTABLE: @@ -746,7 +746,7 @@ protected function _mapTableName($table) return $table; } } - + protected function _mapSalt($salt) { switch ($salt) @@ -757,13 +757,13 @@ protected function _mapSalt($salt) return $salt; } } - + protected function _fields($table) { $sql = "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'" . $table . "'"; - + $list = array(); - + $errnum = 0; $errmsg = ''; $res = $this->_query($sql, $errnum, $errmsg); diff --git a/QuickBooks/Driver/Sql/Mysql.php b/QuickBooks/Driver/Sql/Mysql.php index cf672027..a25ed535 100755 --- a/QuickBooks/Driver/Sql/Mysql.php +++ b/QuickBooks/Driver/Sql/Mysql.php @@ -2,24 +2,24 @@ /** * MySQL backend for the QuickBooks SOAP server - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * - * You need to use some sort of backend to facilitate communication between the - * SOAP server and your application. The SOAP server stores queue requests - * using the backend. - * - * This backend driver is for a MySQL database. You can use the - * {@see QuickBooks_Utilities} class to initalize the five tables in the MySQL - * database. - * + * + * You need to use some sort of backend to facilitate communication between the + * SOAP server and your application. The SOAP server stores queue requests + * using the backend. + * + * This backend driver is for a MySQL database. You can use the + * {@see QuickBooks_Utilities} class to initalize the five tables in the MySQL + * database. + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Driver */ @@ -51,7 +51,7 @@ if (!defined('QUICKBOOKS_DRIVER_SQL_MYSQL_PREFIX')) { /** - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQL_PREFIX', QUICKBOOKS_DRIVER_SQL_PREFIX); @@ -61,7 +61,7 @@ { /** * MySQL table name to store queued requests in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQL_QUEUETABLE', QUICKBOOKS_DRIVER_SQL_QUEUETABLE); @@ -71,7 +71,7 @@ { /** * MySQL table name to store usernames/passwords for the QuickBooks SOAP server - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQL_USERTABLE', QUICKBOOKS_DRIVER_SQL_USERTABLE); @@ -81,7 +81,7 @@ { /** * The table name to store session tickets in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQL_TICKETTABLE', QUICKBOOKS_DRIVER_SQL_TICKETTABLE); @@ -91,7 +91,7 @@ { /** * The table name to store log data in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQL_LOGTABLE', QUICKBOOKS_DRIVER_SQL_LOGTABLE); @@ -101,7 +101,7 @@ { /** * The table name to store recurring events in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQL_RECURTABLE', QUICKBOOKS_DRIVER_SQL_RECURTABLE); @@ -111,7 +111,7 @@ { /** * The table name to store identifiers in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQL_IDENTTABLE', QUICKBOOKS_DRIVER_SQL_IDENTTABLE); @@ -121,7 +121,7 @@ { /** * The table name to store configuration options in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQL_CONFIGTABLE', QUICKBOOKS_DRIVER_SQL_CONFIGTABLE); @@ -131,7 +131,7 @@ { /** * The table name to store notifications in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQL_NOTIFYTABLE', QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE); @@ -140,7 +140,7 @@ if (!defined('QUICKBOOKS_DRIVER_SQL_MYSQL_CONNECTIONTABLE')) { /** - * The table name to store connection data in + * The table name to store connection data in * * @var string */ @@ -154,28 +154,28 @@ class QuickBooks_Driver_Sql_Mysql extends QuickBooks_Driver_Sql { /** * MySQL connection resource - * + * * @var resource */ protected $_conn; - + /** * Log level (debug, verbose, normal) - * + * * @var integer */ protected $_log_level; - + /** * User-defined hook functions - * - * @var array + * + * @var array */ protected $_hooks; - + /** * Create a new MySQL back-end driver - * + * * @param string $dsn A DSN-style connection string (i.e.: "mysql://your-mysql-username:your-mysql-password@your-mysql-host:port/your-mysql-database") * @param array $config Configuration options for the driver (not currently supported) */ @@ -183,7 +183,7 @@ public function __construct($dsn_or_conn, $config) { $config = $this->_defaults($config); $this->_log_level = (int) $config['log_level']; - + if (is_resource($dsn_or_conn)) { $this->_conn = $dsn_or_conn; @@ -191,74 +191,74 @@ public function __construct($dsn_or_conn, $config) else { $defaults = array( - 'scheme' => 'mysql', - 'host' => 'localhost', - 'port' => 3306, - 'user' => 'root', - 'pass' => '', + 'scheme' => 'mysql', + 'host' => 'localhost', + 'port' => 3306, + 'user' => 'root', + 'pass' => '', 'path' => '/quickbooks', ); - + $parse = QuickBooks_Utilities::parseDSN($dsn_or_conn, $defaults); - + //print_r($parse); - + $this->_connect($parse['host'], $parse['port'], $parse['user'], $parse['pass'], substr($parse['path'], 1), $config['new_link'], $config['client_flags']); } - + // Call the parent constructor too parent::__construct($dsn_or_conn, $config); } - + /** * Merge an array of configuration options with the defaults - * + * * @param array $config - * @return array + * @return array */ protected function _defaults($config) { $defaults = array( 'log_level' => QUICKBOOKS_LOG_NORMAL, - 'client_flags' => 0, - 'new_link' => true, + 'client_flags' => 0, + 'new_link' => true, ); - + return array_merge($defaults, $config); } - + /** * Tell whether or not the SQL driver has been initialized - * + * * @return boolean */ protected function _initialized() { $required = array( - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_IDENTTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_USERTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_LOGTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONFIGTABLE) => false, - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE) => false, - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONNECTIONTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_IDENTTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_USERTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_LOGTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONFIGTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONNECTIONTABLE) => false, ); - + $errnum = 0; $errmsg = ''; $res = $this->_query("SHOW TABLES ", $errnum, $errmsg); while ($arr = $this->_fetch($res)) { $table = current($arr); - + if (isset($required[$table])) { $required[$table] = true; } } - + foreach ($required as $table => $exists) { if (!$exists) @@ -266,13 +266,13 @@ protected function _initialized() return false; } } - + return true; } - + /** * Connect to the database - * + * * @param string $host The hostname the database is located at * @param integer $port The port the database is at * @param string $user Username for connecting @@ -292,25 +292,25 @@ protected function _connect($host, $port, $user, $pass, $db, $new_link, $client_ { $this->_conn = mysql_connect($host, $user, $pass, $new_link, $client_flags) or die('host: ' . $host . ', user: ' . $user . ', pass: XXXX, mysql_error(): ' . mysql_error()); } - + // Select the correct database $tmp = mysql_select_db($db, $this->_conn) or die(mysql_error()); - + // Support UTF-8 chars mysql_query("SET NAMES 'utf8'", $this->_conn); - + /* static $connections = array(); $connections[] = $user . ':' . $pass . '@' . $host . ':' . $port . '/' . $db; mysql_query("INSERT INTO quickbooks_log ( msg, log_datetime ) VALUES ( 'MySQL connection #" . count($connections) . ", " . print_r($connections, true) . "', NOW() )", $this->_conn) or die(mysql_error()); */ - + return $tmp; } - + /** * Fetch an array from a database result set - * + * * @param resource $res * @return array */ @@ -318,10 +318,10 @@ protected function _fetch($res) { return mysql_fetch_assoc($res); } - + /** * Query the database - * + * * @param string $sql * @return resource */ @@ -342,11 +342,11 @@ protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null) { // @todo Should this be implemented...? } - + //print($sql . "\n\n"); $res = mysql_query($sql, $this->_conn); //mysql_query("INSERT INTO quickbooks_log ( msg, log_datetime ) VALUES ( '" . mysql_real_escape_string($sql) . "', NOW() ) "); - + /* CREATE TABLE quickbooks_debug ( quickbooks_debug_id int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -355,48 +355,48 @@ protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null) PRIMARY KEY (quickbooks_debug_id) ) ENGINE=MyISAM */ - - // Debugging... + + // Debugging... /* mysql_query(" INSERT INTO quickbooks_debug ( - msg, - debug_datetime + msg, + debug_datetime ) VALUES ( - '" . $this->_escape($sql) . "', - NOW() + '" . $this->_escape($sql) . "', + NOW() )"); */ - + if (!$res) { $errnum = mysql_errno($this->_conn); $errmsg = mysql_error($this->_conn); - + //print($sql); - + trigger_error('Error Num.: ' . $errnum . "\n" . 'Error Msg.:' . $errmsg . "\n" . 'SQL: ' . $sql, E_USER_ERROR); return false; } - + return $res; } - + /** - * - * - * + * + * + * */ protected function _fields($table) { $sql = "SHOW FIELDS FROM " . $table; - + $list = array(); - + $errnum = 0; $errmsg = ''; $res = $this->_query($sql, $errnum, $errmsg); @@ -404,13 +404,13 @@ protected function _fields($table) { $list[] = current($arr); } - + return $list; } - + /** * Issue a query to the SQL server - * + * * @param string $sql * @param integer $errnum * @param string $errmsg @@ -420,30 +420,30 @@ protected function _fields($table) { return $this->_query($sql, $errnum, $errmsg, $offset, $limit); }*/ - + /** * Tell the number of rows the last run query affected - * + * * @return integer */ public function affected() { return mysql_affected_rows($this->_conn); } - + /** * Tell the last inserted AUTO_INCREMENT value - * + * * @return integer */ public function last() { return mysql_insert_id($this->_conn); } - + /** * Tell the number of records in a result resource - * + * * @param resource $res * @return integer */ @@ -451,10 +451,10 @@ public function count($res) { return $this->_count($res); } - + /** * Escape a string - * + * * @param string $str * @return string */ @@ -462,10 +462,10 @@ public function escape($str) { return $this->_escape($str); } - + /** * Fetch a record from a result set - * + * * @param resource $res * @return array */ @@ -473,7 +473,7 @@ public function fetch($res) { return $this->_fetch($res); } - + /** * Rewind the result set * @@ -486,13 +486,13 @@ public function rewind($res) { return mysql_data_seek($res, 0); } - + return true; } - + /** * Escape a string for the database - * + * * @param string $str * @return string */ @@ -500,10 +500,10 @@ protected function _escape($str) { return mysql_real_escape_string($str, $this->_conn); } - + /** * Count the number of rows returned from the database - * + * * @param resource $res * @return integer */ @@ -511,10 +511,10 @@ protected function _count($res) { return mysql_num_rows($res); } - + /** * Override for the default SQL generation functions, MySQL-specific field generation function - * + * * @param string $name * @param array $def * @return string @@ -524,25 +524,25 @@ protected function _generateFieldSchema($name, $def) switch ($def[0]) { case QUICKBOOKS_DRIVER_SQL_SERIAL: - - $sql = $name . ' int(10) unsigned NOT NULL '; // AUTO_INCREMENT + + $sql = $name . ' int(10) unsigned NOT NULL '; // AUTO_INCREMENT return $sql; case QUICKBOOKS_DRIVER_SQL_TIMESTAMP: case QUICKBOOKS_DRIVER_SQL_TIMESTAMP_ON_INSERT_OR_UPDATE: - + $sql = $name . ' TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP '; return $sql; case QUICKBOOKS_DRIVER_SQL_TIMESTAMP_ON_UPDATE: - + $sql = $name . ' TIMESTAMP DEFAULT 0 ON UPDATE CURRENT_TIMESTAMP '; return $sql; case QUICKBOOKS_DRIVER_SQL_TIMESTAMP_ON_INSERT: - + $sql = $name . ' TIMESTAMP DEFAULT CURRENT_TIMESTAMP '; return $sql; case QUICKBOOKS_DRIVER_SQL_BOOLEAN: $sql = $name . ' tinyint(1) '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -558,11 +558,11 @@ protected function _generateFieldSchema($name, $def) $sql .= ' DEFAULT 0 '; } } - + return $sql; case QUICKBOOKS_DRIVER_SQL_INTEGER: $sql = $name . ' int(10) unsigned '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -578,17 +578,17 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - + return $sql; default: - + return parent::_generateFieldSchema($name, $def); } } - + /** * Map a default SQL table name to a MySQL table name - * + * * @param string * @return string */ @@ -618,7 +618,7 @@ protected function _mapTableName($table) return QUICKBOOKS_DRIVER_SQL_MYSQL_PREFIX . $table; } } - + protected function _mapSalt($salt) { switch ($salt) @@ -629,16 +629,16 @@ protected function _mapSalt($salt) return $salt; } } - + protected function _generateCreateTable($name, $arr, $primary = array(), $keys = array(), $uniques = array(), $if_not_exists = true) { $arr_sql = parent::_generateCreateTable($name, $arr, $primary, $keys, $uniques, $if_not_exists); - + if (is_array($primary) and count($primary) == 1) { $primary = current($primary); } - + if (is_array($primary)) { //ALTER TABLE `quickbooks_ident` ADD PRIMARY KEY ( `qb_action` , `unique_id` ) @@ -647,14 +647,14 @@ protected function _generateCreateTable($name, $arr, $primary = array(), $keys = else if ($primary) { $arr_sql[] = 'ALTER TABLE ' . $name . ' ADD PRIMARY KEY(' . $primary . '); '; - + if ($arr[$primary][0] == QUICKBOOKS_DRIVER_SQL_SERIAL) { // add the auto-increment $arr_sql[] = 'ALTER TABLE ' . $name . ' CHANGE ' . $primary . ' ' . $primary . ' INT(10) UNSIGNED NOT NULL AUTO_INCREMENT;'; } } - + foreach ($keys as $key) { if (is_array($key)) // compound key @@ -666,7 +666,7 @@ protected function _generateCreateTable($name, $arr, $primary = array(), $keys = $arr_sql[] = 'ALTER TABLE ' . $name . ' ADD INDEX(' . $key . ');'; } } - + return $arr_sql; } } diff --git a/QuickBooks/Driver/Sql/Mysqli.php b/QuickBooks/Driver/Sql/Mysqli.php index fe856210..f9c478fa 100644 --- a/QuickBooks/Driver/Sql/Mysqli.php +++ b/QuickBooks/Driver/Sql/Mysqli.php @@ -2,20 +2,20 @@ /** * MySQLi backend for the QuickBooks SOAP server - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * - * This backend driver is for a MySQL database, using the PHP MySQLi extension. - * You can use the {@see QuickBooks_Utilities} class to initalize the tables in - * the MySQL database. - * + * + * This backend driver is for a MySQL database, using the PHP MySQLi extension. + * You can use the {@see QuickBooks_Utilities} class to initalize the tables in + * the MySQL database. + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Driver */ @@ -47,8 +47,8 @@ if (!defined('QUICKBOOKS_DRIVER_SQL_MYSQLI_PREFIX')) { /** - * - * + * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQLI_PREFIX', QUICKBOOKS_DRIVER_SQL_PREFIX); @@ -58,7 +58,7 @@ { /** * MySQL table name to store queued requests in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQLI_QUEUETABLE', QUICKBOOKS_DRIVER_SQL_QUEUETABLE); @@ -68,7 +68,7 @@ { /** * MySQL table name to store usernames/passwords for the QuickBooks SOAP server - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQLI_USERTABLE', QUICKBOOKS_DRIVER_SQL_USERTABLE); @@ -78,7 +78,7 @@ { /** * The table name to store session tickets in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQLI_TICKETTABLE', QUICKBOOKS_DRIVER_SQL_TICKETTABLE); @@ -88,7 +88,7 @@ { /** * The table name to store log data in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQLI_LOGTABLE', QUICKBOOKS_DRIVER_SQL_LOGTABLE); @@ -98,7 +98,7 @@ { /** * The table name to store recurring events in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQLI_RECURTABLE', QUICKBOOKS_DRIVER_SQL_RECURTABLE); @@ -108,7 +108,7 @@ { /** * The table name to store identifiers in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQLI_IDENTTABLE', QUICKBOOKS_DRIVER_SQL_IDENTTABLE); @@ -118,7 +118,7 @@ { /** * The table name to store configuration options in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQLI_CONFIGTABLE', QUICKBOOKS_DRIVER_SQL_CONFIGTABLE); @@ -128,7 +128,7 @@ { /** * The table name to store notifications in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_MYSQLI_NOTIFYTABLE', QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE); @@ -137,7 +137,7 @@ if (!defined('QUICKBOOKS_DRIVER_SQL_MYSQLI_CONNECTIONTABLE')) { /** - * The table name to store connection data in + * The table name to store connection data in * * @var string */ @@ -149,39 +149,39 @@ */ class QuickBooks_Driver_Sql_Mysqli extends QuickBooks_Driver_Sql { - + /** * MySQL connection resource - * + * * @var resource */ protected $_conn; /** * MySQL query result - * + * * @var result */ protected $_res; - + /** * Log level (debug, verbose, normal) - * + * * @var integer */ protected $_log_level; /** * Last error message that occured - * + * * @var integer */ public $_last_error; /** * User-defined hook functions - * - * @var array + * + * @var array */ protected $_hooks; @@ -189,10 +189,10 @@ class QuickBooks_Driver_Sql_Mysqli extends QuickBooks_Driver_Sql * Database name */ protected $_dbname; - + /** * Create a new MySQLi back-end driver - * + * * @param string $dsn A DSN-style connection string (i.e.: "mysql://your-mysql-username:your-mysql-password@your-mysql-host:port/your-mysql-database") * @param array $config Configuration options for the driver (not currently supported) */ @@ -200,7 +200,7 @@ public function __construct($dsn_or_conn, $config) { $config = $this->_defaults($config); $this->_log_level = (int) $config['log_level']; - + if (is_resource($dsn_or_conn) or ($dsn_or_conn instanceof mysqli)) { $this->_conn = $dsn_or_conn; @@ -208,74 +208,74 @@ public function __construct($dsn_or_conn, $config) else { $defaults = array( - 'scheme' => 'mysqli', - 'host' => 'localhost', - 'port' => 3306, - 'user' => 'root', - 'pass' => '', + 'scheme' => 'mysqli', + 'host' => 'localhost', + 'port' => 3306, + 'user' => 'root', + 'pass' => '', 'path' => '/quickbooks', ); - + $parse = QuickBooks_Utilities::parseDSN($dsn_or_conn, $defaults); - + // Store this for debugging $this->_dbname = $parse['path']; $this->_connect($parse['host'], $parse['port'], $parse['user'], $parse['pass'], substr($parse['path'], 1), $config['new_link'], $config['client_flags']); } - + parent::__construct($dsn_or_conn, $config); } - + /** * Merge an array of configuration options with the defaults - * + * * @param array $config - * @return array + * @return array */ protected function _defaults($config) { $defaults = array( 'log_level' => QUICKBOOKS_LOG_NORMAL, - 'client_flags' => 0, - 'new_link' => true, + 'client_flags' => 0, + 'new_link' => true, ); - + return array_merge($defaults, $config); } - + /** * Tell whether or not the SQL driver has been initialized - * + * * @return boolean */ protected function _initialized() { $required = array( - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_IDENTTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_USERTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_LOGTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONFIGTABLE) => false, - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE) => false, - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONNECTIONTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_IDENTTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_USERTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_LOGTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONFIGTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONNECTIONTABLE) => false, ); - + $errnum = 0; $errmsg = ''; $res = $this->_query("SHOW TABLES ", $errnum, $errmsg); while ($arr = $this->_fetch($res)) { $table = current($arr); - + if (isset($required[$table])) { $required[$table] = true; } } - + foreach ($required as $table => $exists) { if (!$exists) @@ -283,13 +283,13 @@ protected function _initialized() return false; } } - + return true; } - + /** * Connect to the database - * + * * @param string $host The hostname the database is located at * @param integer $port The port the database is at * @param string $user Username for connecting @@ -309,13 +309,13 @@ protected function _connect($host, $port, $user, $pass, $db, $new_link, $client_ { $this->_conn = new mysqli($host, $user, $pass, $db) or die('host: ' . $host . ', user: ' . $user . ', pass: ' . $pass . ' mysqli_error(): ' . mysqli_connect_error()); } - + return true; } /** * Fetch an array from a database result set - * + * * @param resource $res * @return array */ @@ -327,7 +327,7 @@ protected function _fetch($res) /** * Fetch a record from a result set - * + * * @param resource $res * @return array */ @@ -338,7 +338,7 @@ public function fetch($res) /** * Query the database - * + * * @param string $sql * @return resource */ @@ -359,28 +359,28 @@ protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null) { // @todo Should this be implemented...? } - + $res = $this->_conn->query($sql); - + $this->_last_error = ''; if (!$res) { $errnum = $this->_conn->errno; $errmsg = $this->_conn->error; $this->_last_error = $this->_conn->error; - + //print($sql); - + trigger_error('Error Num.: ' . $errnum . "\n" . 'Error Msg.:' . $errmsg . "\n" . 'SQL: ' . $sql . "\n" . 'Database: ' . $this->_dbname, E_USER_ERROR); return false; } - + return $res; } /** * Issue a query to the SQL server - * + * * @param string $sql * @param integer $errnum * @param string $errmsg @@ -390,10 +390,10 @@ protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null) { return $this->_query($sql, $errnum, $errmsg, $offset, $limit); }*/ - + /** * Tell the number of rows the last run query affected - * + * * @return integer */ public function affected() @@ -403,7 +403,7 @@ public function affected() /** * Tell the last inserted AUTO_INCREMENT value - * + * * @return integer */ public function last() @@ -413,7 +413,7 @@ public function last() /** * Escape a string - * + * * @param string $str * @return string */ @@ -424,7 +424,7 @@ public function escape($str) /** * Escape a string for the database - * + * * @param string $str * @return string */ @@ -441,7 +441,7 @@ protected function _escape($str) /** * Count the number of rows returned from the database - * + * * @param resource $res * @return integer */ @@ -449,7 +449,7 @@ protected function _count($res) { return $res->num_rows; } - + /** * Rewind the result set * @@ -462,13 +462,13 @@ public function rewind($res) { return $res->data_seek(0); } - + return true; - } - + } + /** * Tell the number of records in a result resource - * + * * @param resource $res * @return integer */ @@ -476,18 +476,18 @@ public function count($res) { return $this->_count($res); } - + /** - * - * - * + * + * + * */ protected function _fields($table) { $sql = "SHOW FIELDS FROM " . $table; - + $list = array(); - + $errnum = 0; $errmsg = ''; $res = $this->_query($sql, $errnum, $errmsg); @@ -495,13 +495,13 @@ protected function _fields($table) { $list[] = current($arr); } - + return $list; - } + } /** * Override for the default SQL generation functions, MySQL-specific field generation function - * + * * @param string $name * @param array $def * @return string @@ -511,25 +511,25 @@ protected function _generateFieldSchema($name, $def) switch ($def[0]) { case QUICKBOOKS_DRIVER_SQL_SERIAL: - - $sql = $name . ' INT(10) UNSIGNED NOT NULL '; // AUTO_INCREMENT + + $sql = $name . ' INT(10) UNSIGNED NOT NULL '; // AUTO_INCREMENT return $sql; case QUICKBOOKS_DRIVER_SQL_TIMESTAMP: case QUICKBOOKS_DRIVER_SQL_TIMESTAMP_ON_INSERT_OR_UPDATE: - + $sql = $name . ' TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP '; return $sql; case QUICKBOOKS_DRIVER_SQL_TIMESTAMP_ON_UPDATE: - + $sql = $name . ' TIMESTAMP DEFAULT 0 ON UPDATE CURRENT_TIMESTAMP '; return $sql; case QUICKBOOKS_DRIVER_SQL_TIMESTAMP_ON_INSERT: - + $sql = $name . ' TIMESTAMP DEFAULT CURRENT_TIMESTAMP '; return $sql; case QUICKBOOKS_DRIVER_SQL_BOOLEAN: $sql = $name . ' tinyint(1) '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -545,11 +545,11 @@ protected function _generateFieldSchema($name, $def) $sql .= ' DEFAULT 0 '; } } - + return $sql; case QUICKBOOKS_DRIVER_SQL_INTEGER: $sql = $name . ' int(10) unsigned '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -565,17 +565,17 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - + return $sql; default: - + return parent::_generateFieldSchema($name, $def); } } - + /** * Map a default SQL table name to a MySQL table name - * + * * @param string * @return string */ @@ -605,7 +605,7 @@ protected function _mapTableName($table) return QUICKBOOKS_DRIVER_SQL_MYSQLI_PREFIX . $table; } } - + protected function _mapSalt($salt) { switch ($salt) @@ -616,16 +616,16 @@ protected function _mapSalt($salt) return $salt; } } - + protected function _generateCreateTable($name, $arr, $primary = array(), $keys = array(), $uniques = array(), $if_not_exists = true) { $arr_sql = parent::_generateCreateTable($name, $arr, $primary, $keys, $uniques, $if_not_exists); - + if (is_array($primary) and count($primary) == 1) { $primary = current($primary); } - + if (is_array($primary)) { //ALTER TABLE `quickbooks_ident` ADD PRIMARY KEY ( `qb_action` , `unique_id` ) @@ -634,14 +634,14 @@ protected function _generateCreateTable($name, $arr, $primary = array(), $keys = else if ($primary) { $arr_sql[] = 'ALTER TABLE ' . $name . ' ADD PRIMARY KEY(' . $primary . '); '; - + if ($arr[$primary][0] == QUICKBOOKS_DRIVER_SQL_SERIAL) { // add the auto-increment $arr_sql[] = 'ALTER TABLE ' . $name . ' CHANGE ' . $primary . ' ' . $primary . ' INT(10) UNSIGNED NOT NULL AUTO_INCREMENT;'; } } - + foreach ($keys as $key) { if (is_array($key)) // compound key @@ -653,7 +653,7 @@ protected function _generateCreateTable($name, $arr, $primary = array(), $keys = $arr_sql[] = 'ALTER TABLE ' . $name . ' ADD INDEX(' . $key . ');'; } } - + return $arr_sql; } diff --git a/QuickBooks/Driver/Sql/Pgsql.php b/QuickBooks/Driver/Sql/Pgsql.php index 3eddf69a..3eb56921 100755 --- a/QuickBooks/Driver/Sql/Pgsql.php +++ b/QuickBooks/Driver/Sql/Pgsql.php @@ -2,24 +2,24 @@ /** * PgSQL backend for the QuickBooks SOAP server - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * - * You need to use some sort of backend to facilitate communication between the - * SOAP server and your application. The SOAP server stores queue requests - * using the backend. - * - * This backend driver is for a PostgreSQL database. You can use the - * {@see QuickBooks_Utilities} class to initalize the five tables in the - * PostgreSQL database. - * + * + * You need to use some sort of backend to facilitate communication between the + * SOAP server and your application. The SOAP server stores queue requests + * using the backend. + * + * This backend driver is for a PostgreSQL database. You can use the + * {@see QuickBooks_Utilities} class to initalize the five tables in the + * PostgreSQL database. + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Driver */ @@ -51,7 +51,7 @@ if (!defined('QUICKBOOKS_DRIVER_SQL_PGSQL_PREFIX')) { /** - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_PGSQL_PREFIX', QUICKBOOKS_DRIVER_SQL_PREFIX); @@ -61,7 +61,7 @@ { /** * MySQL table name to store queued requests in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_PGSQL_QUEUETABLE', QUICKBOOKS_DRIVER_SQL_QUEUETABLE); @@ -71,7 +71,7 @@ { /** * MySQL table name to store usernames/passwords for the QuickBooks SOAP server - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_PGSQL_USERTABLE', QUICKBOOKS_DRIVER_SQL_USERTABLE); @@ -81,7 +81,7 @@ { /** * The table name to store session tickets in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_PGSQL_TICKETTABLE', QUICKBOOKS_DRIVER_SQL_TICKETTABLE); @@ -91,7 +91,7 @@ { /** * The table name to store log data in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_PGSQL_LOGTABLE', QUICKBOOKS_DRIVER_SQL_LOGTABLE); @@ -101,7 +101,7 @@ { /** * The table name to store recurring events in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_PGSQL_RECURTABLE', QUICKBOOKS_DRIVER_SQL_RECURTABLE); @@ -111,7 +111,7 @@ { /** * The table name to store identifiers in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_PGSQL_IDENTTABLE', QUICKBOOKS_DRIVER_SQL_IDENTTABLE); @@ -121,7 +121,7 @@ { /** * The table name to store configuration options in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_PGSQL_CONFIGTABLE', QUICKBOOKS_DRIVER_SQL_CONFIGTABLE); @@ -131,7 +131,7 @@ { /** * The table name to store notifications in - * + * * @var string */ define('QUICKBOOKS_DRIVER_SQL_PGSQL_NOTIFYTABLE', QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE); @@ -140,7 +140,7 @@ if (!defined('QUICKBOOKS_DRIVER_SQL_PGSQL_CONNECTIONTABLE')) { /** - * The table name to store connection data in + * The table name to store connection data in * * @var string */ @@ -154,44 +154,44 @@ class QuickBooks_Driver_Sql_Pgsql extends QuickBooks_Driver_Sql { /** * PostgreSQL connection resource - * + * * @var resource */ protected $_conn; - + /** * User-defined hook functions - * - * @var array + * + * @var array */ protected $_hooks; - + /** - * + * */ protected $_last_result; - + /** - * + * */ protected $_schema; - + /** - * The table last used by $this->insert() - * @var string + * The table last used by $this->insert() + * @var string */ protected $last_insert_table; - + /** * Create a new MySQL back-end driver - * + * * @param string $dsn A DSN-style connection string (i.e.: "mysql://your-mysql-username:your-mysql-password@your-mysql-host:port/your-mysql-database") * @param array $config Configuration options for the driver (not currently supported) */ public function __construct($dsn_or_conn, $config) { $config = $this->_defaults($config); - + if (is_resource($dsn_or_conn)) { $this->_conn = $dsn_or_conn; @@ -199,56 +199,56 @@ public function __construct($dsn_or_conn, $config) else { $defaults = array( - 'scheme' => 'pgsql', - 'host' => 'localhost', - 'port' => 5432, - 'user' => 'pgsql', - 'pass' => '', + 'scheme' => 'pgsql', + 'host' => 'localhost', + 'port' => 5432, + 'user' => 'pgsql', + 'pass' => '', 'path' => '/quickbooks', ); - + $parse = QuickBooks_Utilities::parseDSN($dsn_or_conn, $defaults); - + $this->_connect($parse['host'], $parse['port'], $parse['user'], $parse['pass'], substr($parse['path'], 1), $config['new_link']); } // Call the parent constructor too parent::__construct($dsn_or_conn, $config); } - + /** * Merge an array of configuration options with the defaults - * + * * @param array $config - * @return array + * @return array */ protected function _defaults($config) { $defaults = array( - 'new_link' => true, + 'new_link' => true, ); - + return array_merge($defaults, $config); } - + protected function _initialized() { $required = array( - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_IDENTTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_USERTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_LOGTABLE) => false, - $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONFIGTABLE) => false, - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE) => false, - //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONNECTIONTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_IDENTTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_TICKETTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_USERTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_RECURTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_QUEUETABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_LOGTABLE) => false, + $this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONFIGTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE) => false, + //$this->_mapTableName(QUICKBOOKS_DRIVER_SQL_CONNECTIONTABLE) => false, ); - + $errnum = 0; $errmsg = ''; $res = $this->_query(" - SELECT + SELECT table_name FROM information_schema.tables @@ -257,13 +257,13 @@ protected function _initialized() while ($arr = $this->_fetch($res)) { $table = current($arr); - + if (isset($required[$table])) { $required[$table] = true; } } - + foreach ($required as $table => $exists) { if (!$exists) @@ -271,13 +271,13 @@ protected function _initialized() return false; } } - + return true; } - + /** * Connect to the database - * + * * @param string $host The hostname the database is located at * @param integer $port The port the database is at * @param string $user Username for connecting @@ -290,39 +290,39 @@ protected function _initialized() protected function _connect($host, $port, $user, $pass, $db, $new_link, $client_flags = null) { $this->_schema = null; - + $tmp = array(); - + if ($host) { $tmp[] = 'host=' . $host; } - + if ((int) $port) { $tmp[] = 'port=' . (int) $port; } - + if ($user) { $tmp[] = 'user=' . $user; } - + if ($pass) { $tmp[] = 'password=' . $pass; } - + if ($db) { if (false !== strpos($db, '.')) { $explode = explode('.', $db); - + //$tmp[] = 'schema=' . $explode[0]; - + $this->_schema = $explode[1]; - + $tmp[] = 'dbname=' . $explode[0]; } else @@ -330,9 +330,9 @@ protected function _connect($host, $port, $user, $pass, $db, $new_link, $client_ $tmp[] = 'dbname=' . $db; } } - + $str = implode(' ', $tmp); - + if ($new_link) { $this->_conn = pg_connect($str, PGSQL_CONNECT_FORCE_NEW); @@ -341,11 +341,11 @@ protected function _connect($host, $port, $user, $pass, $db, $new_link, $client_ { $this->_conn = pg_connect($str); } - + if ($this->_schema) { //print('SETTING HERE: [' . $this->_schema . ']'); - + $errnum = 0; $errmsg = null; $this->_query("SET search_path TO " . $this->_escape($this->_schema) . ', public', $errnum, $errmsg); @@ -355,28 +355,28 @@ protected function _connect($host, $port, $user, $pass, $db, $new_link, $client_ // Default to using the 'public' schema $this->_schema = 'public'; } - + //$errnum = 0; //$errmsg = null; //print_r($this->_fetch($this->_query("SHOW search_path", $errnum, $errmsg))); //die('SCHEMA IS: ' . $this->_schema); } - + /** - * + * */ protected function _fields($table) { $list = array(); - + $sql = " - SELECT - column_name - FROM + SELECT + column_name + FROM information_schema.columns WHERE table_name = '" . $this->_escape($table) . "' "; - + $errnum = 0; $errmsg = ""; $res = $this->_query($sql, $errnum, $errmsg); @@ -384,30 +384,30 @@ protected function _fields($table) { $list[] = current($arr); } - + return $list; } - + /** * Fetch an array from a database result set - * + * * @param resource $res * @return array */ protected function _fetch($res, $print = false) { $arr = pg_fetch_assoc($res); - + $booleans = array( QUICKBOOKS_DRIVER_SQL_FIELD_TO_SYNC, QUICKBOOKS_DRIVER_SQL_FIELD_TO_VOID, QUICKBOOKS_DRIVER_SQL_FIELD_TO_DELETE, QUICKBOOKS_DRIVER_SQL_FIELD_TO_SKIP, - QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_SKIPPED, + QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_SKIPPED, QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED, - QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_VOIDED + QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_VOIDED ); - + if ($arr) { foreach ($arr as $key => $value) @@ -426,17 +426,17 @@ protected function _fetch($res, $print = false) { $value = null; } - + $arr[$key] = $value; } } } - + if (is_array($arr)) { reset($arr); } - + /* if ($print) { @@ -445,13 +445,13 @@ protected function _fetch($res, $print = false) die('}} OUTPUT STOP'); } */ - + return $arr; } - + /** * Query the database - * + * * @param string $sql * @return resource */ @@ -460,7 +460,7 @@ protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null) if (strtoupper(substr(trim($sql), 0, 6)) != 'UPDATE') { // PostgreSQL does not support LIMIT for UPDATE queries - + if ($limit) { if ($offset) @@ -475,42 +475,42 @@ protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null) else if ($offset) { // @todo Should this be implemented...? - } + } } - - // + + // $boolean_fixes = array( - 'qbsql_to_skip != 1' => ' qbsql_to_skip <> TRUE ', - 'qbsql_to_delete != 1' => ' qbsql_to_delete <> TRUE ', - 'qbsql_to_delete = 1' => ' qbsql_to_delete = TRUE ', - 'qbsql_flag_deleted != 1' => ' qbsql_flag_deleted <> TRUE ', - 'qbsql_to_void != 1' => ' qbsql_to_void <> TRUE ', - 'qbsql_to_void = 1' => ' qbsql_to_void = TRUE ', - 'qbsql_flag_voided != 1' => ' qbsql_flag_voided <> TRUE ', + 'qbsql_to_skip != 1' => ' qbsql_to_skip <> TRUE ', + 'qbsql_to_delete != 1' => ' qbsql_to_delete <> TRUE ', + 'qbsql_to_delete = 1' => ' qbsql_to_delete = TRUE ', + 'qbsql_flag_deleted != 1' => ' qbsql_flag_deleted <> TRUE ', + 'qbsql_to_void != 1' => ' qbsql_to_void <> TRUE ', + 'qbsql_to_void = 1' => ' qbsql_to_void = TRUE ', + 'qbsql_flag_voided != 1' => ' qbsql_flag_voided <> TRUE ', ); - + $sql = str_replace(array_keys($boolean_fixes), array_values($boolean_fixes), $sql); - + // Run the query $res = pg_query($this->_conn, $sql); - + $this->_last_result = $res; - + if (!$res) { $errnum = -1; $errmsg = pg_last_error($this->_conn); - + trigger_error('PostgreSQL Error: ' . $errmsg . ', SQL: ' . $sql, E_USER_ERROR); return false; } - + return $res; } - + /** * Issue a query to the SQL server - * + * * @param string $sql * @param integer $errnum * @param string $errmsg @@ -520,56 +520,56 @@ protected function _query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null) { return $this->_query($sql, $errnum, $errmsg, $offset, $limit); }*/ - + /** * Tell the number of rows the last run query affected - * + * * @return integer */ public function affected() { return pg_affected_rows($this->_last_result); } - + /** * Tell the last inserted AUTO_INCREMENT value - * + * * @return integer */ public function last() { $errnum = 0; $errmsg = ''; - + // get the current table's primary key - $sql = "SELECT - pg_attribute.attname, - format_type(pg_attribute.atttypid, pg_attribute.atttypmod) - FROM pg_index, pg_class, pg_attribute - WHERE + $sql = "SELECT + pg_attribute.attname, + format_type(pg_attribute.atttypid, pg_attribute.atttypmod) + FROM pg_index, pg_class, pg_attribute + WHERE pg_class.oid = '" . $this->last_insert_table . "'::regclass AND indrelid = pg_class.oid AND - pg_attribute.attrelid = pg_class.oid AND + pg_attribute.attrelid = pg_class.oid AND pg_attribute.attnum = any(pg_index.indkey) AND indisprimary"; - + $res = $this->query($sql, $errnum, $errmsg); - + $sequence = pg_fetch_result($res, 0, 0); - + // get the last ID $sql = "select currval(pg_get_serial_sequence('" . $this->last_insert_table . "', '" . $sequence . "'));"; - + $res = $this->query($sql, $errnum, $errmsg); - + $last_insert_id = pg_fetch_result($res, 0, 0); - + return $last_insert_id; } - + /** * Tell the number of records in a result resource - * + * * @param resource $res * @return integer */ @@ -577,10 +577,10 @@ public function count($res) { return $this->_count($res); } - + /** * Escape a string - * + * * @param string $str * @return string */ @@ -588,10 +588,10 @@ public function escape($str) { return $this->_escape($str); } - + /** * Fetch a record from a result set - * + * * @param resource $res * @return array */ @@ -599,7 +599,7 @@ public function fetch($res) { return $this->_fetch($res); } - + /** * Rewind the result set * @@ -612,13 +612,13 @@ public function rewind($res) { pg_fetch_assoc($res, 0); } - + return true; } - + /** * Escape a string for the database - * + * * @param string $str * @return string */ @@ -626,10 +626,10 @@ protected function _escape($str) { return pg_escape_string($this->_conn, $str); } - + /** * Count the number of rows returned from the database - * + * * @param resource $res * @return integer */ @@ -637,16 +637,16 @@ protected function _count($res) { return pg_num_rows($res); } - + /** * Map a default SQL table name to a PostgreSQL table name - * + * * @param string * @return string */ /** * Map a default SQL table name to a MySQL table name - * + * * @param string * @return string */ @@ -667,7 +667,7 @@ protected function _mapTableName($table) case QUICKBOOKS_DRIVER_SQL_CONFIGTABLE: return QUICKBOOKS_DRIVER_SQL_PGSQL_PREFIX . QUICKBOOKS_DRIVER_SQL_PGSQL_CONFIGTABLE; case QUICKBOOKS_DRIVER_SQL_IDENTTABLE: - return QUICKBOOKS_DRIVER_SQL_PGSQL_PREFIX . QUICKBOOKS_DRIVER_SQL_PGSQL_IDENTTABLE; + return QUICKBOOKS_DRIVER_SQL_PGSQL_PREFIX . QUICKBOOKS_DRIVER_SQL_PGSQL_IDENTTABLE; case QUICKBOOKS_DRIVER_SQL_NOTIFYTABLE: return QUICKBOOKS_DRIVER_SQL_PGSQL_PREFIX . QUICKBOOKS_DRIVER_SQL_PGSQL_NOTIFYTABLE; case QUICKBOOKS_DRIVER_SQL_CONNECTIONTABLE: @@ -676,10 +676,10 @@ protected function _mapTableName($table) return QUICKBOOKS_DRIVER_SQL_PGSQL_PREFIX . $table; } } - + /** * Map an encryption salt to a PostgreSQL-specific encryption salt - * + * * @param string $salt * @return string */ @@ -693,10 +693,10 @@ protected function _mapSalt($salt) return $salt; } } - + /** * Override for the default SQL generation functions, PostgreSQL-specific field generation function - * + * * @param string $name * @param array $def * @return string @@ -707,7 +707,7 @@ protected function _generateFieldSchema($name, $def) { case QUICKBOOKS_DRIVER_SQL_INTEGER: $sql = '"' . $name . '" INTEGER '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -719,11 +719,11 @@ protected function _generateFieldSchema($name, $def) $sql .= ' DEFAULT ' . (int) $def[2]; } } - + break; case QUICKBOOKS_DRIVER_SQL_DECIMAL: $sql = '"' . $name . '" DECIMAL '; - + if (!empty($def[1])) { $tmp = explode(',', $def[1]); @@ -732,7 +732,7 @@ protected function _generateFieldSchema($name, $def) $sql .= '(' . (int) $tmp[0] . ',' . (int) $tmp[1] . ') '; } } - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -751,16 +751,16 @@ protected function _generateFieldSchema($name, $def) } } } - + if (isset($tmp)) { unset($tmp); } - + break; case QUICKBOOKS_DRIVER_SQL_FLOAT: $sql = '"' . $name . '" FLOAT '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -772,11 +772,11 @@ protected function _generateFieldSchema($name, $def) $sql .= ' DEFAULT ' . sprintf('%01.2f', (float) $def[2]); } } - + break; case QUICKBOOKS_DRIVER_SQL_BOOLEAN: $sql = '"' . $name . '" BOOLEAN '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -796,20 +796,20 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - + break; case QUICKBOOKS_DRIVER_SQL_SERIAL: - $sql = '"' . $name . '" SERIAL NOT NULL '; // AUTO_INCREMENT - + $sql = '"' . $name . '" SERIAL NOT NULL '; // AUTO_INCREMENT + return $sql; case QUICKBOOKS_DRIVER_SQL_TIMESTAMP: case QUICKBOOKS_DRIVER_SQL_TIMESTAMP_ON_INSERT_OR_UPDATE: case QUICKBOOKS_DRIVER_SQL_TIMESTAMP_ON_UPDATE: case QUICKBOOKS_DRIVER_SQL_TIMESTAMP_ON_INSERT: case QUICKBOOKS_DRIVER_SQL_DATETIME: - + $sql = '"' . $name . '" timestamp without time zone '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -825,11 +825,11 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - + /*case QUICKBOOKS_DRIVER_SQL_BOOLEAN: $sql = $name . ' tinyint(1) '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -845,22 +845,22 @@ protected function _generateFieldSchema($name, $def) $sql .= ' DEFAULT 0 '; } } - - return $sql;*/ + + return $sql;*/ case QUICKBOOKS_DRIVER_SQL_VARCHAR: $sql = '"' . $name . '" VARCHAR'; - + /*if ($name == 'ListID') { print('LIST ID:'); print_r($def); }*/ - + if (!empty($def[1])) { $sql .= '(' . (int) $def[1] . ') '; } - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -880,16 +880,16 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - + break; case QUICKBOOKS_DRIVER_SQL_CHAR: $sql = '"' . $name . '" CHAR'; - + if (!empty($def[1])) { $sql .= '(' . (int) $def[1] . ') '; } - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -905,12 +905,12 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - + break; default: case QUICKBOOKS_DRIVER_SQL_TEXT: $sql = '"' . $name . '" TEXT '; - + if (isset($def[2])) { if (strtolower($def[2]) == 'null') @@ -926,15 +926,15 @@ protected function _generateFieldSchema($name, $def) { $sql .= ' NOT NULL '; } - + break; } return $sql; } - + /** * Override for the default SQL generation functions, PostgreSQL-specific field generation function - * + * * @param string $name * @param array $arr * @param array $primary @@ -944,12 +944,12 @@ protected function _generateFieldSchema($name, $def) protected function _generateCreateTable($name, $arr, $primary = array(), $keys = array(), $uniques = array(), $if_not_exists = true) { $arr_sql = parent::_generateCreateTable('"' . $name . '"', $arr, $primary, $keys, $if_not_exists); - + if (is_array($primary) and count($primary) == 1) { $primary = current($primary); } - + if (is_array($primary)) { //ALTER TABLE `quickbooks_ident` ADD PRIMARY KEY ( `qb_action` , `unique_id` ) @@ -957,10 +957,10 @@ protected function _generateCreateTable($name, $arr, $primary = array(), $keys = } else if ($primary) { - $arr_sql[] = 'ALTER TABLE ONLY "' . $name . '" + $arr_sql[] = 'ALTER TABLE ONLY "' . $name . '" ADD CONSTRAINT "' . $name . '_pkey" PRIMARY KEY ("' . $primary . '");'; } - + foreach ($keys as $key) { if (is_array($key)) // compound key @@ -972,19 +972,19 @@ protected function _generateCreateTable($name, $arr, $primary = array(), $keys = $arr_sql[] = 'CREATE INDEX "' . $key . '_' . $name . '_index" ON "' . $name . '" USING btree ("' . $key . '")'; } } - + return $arr_sql; } - + public function foldsToLower() { return true; } - + /** * Insert a new record into an SQL table - * + * * @param string $table * @param object $object * @return boolean @@ -992,7 +992,7 @@ public function foldsToLower() public function insert($table, $object, $discov_and_resync = true) { $this->last_insert_table = $table; - + return parent::insert($table, $object, $discov_and_resync); } } diff --git a/QuickBooks/Encryption.php b/QuickBooks/Encryption.php index 8665b0f4..a011e10c 100644 --- a/QuickBooks/Encryption.php +++ b/QuickBooks/Encryption.php @@ -2,56 +2,56 @@ /** * QuickBooks encryption library base class - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/Encryption/Factory.php'); /** - * - * + * + * */ abstract class QuickBooks_Encryption { /** - * - * - * + * + * + * */ public function prefix($str) { return '{' . strlen(get_class($this)) . ':' . strtolower(get_class($this)) . '}' . $str; } - + /** * AES encryption * * @param string $key * @param string $data Content to be encrypted - * @param bool $hex + * @param bool $hex * @return string */ static function salt() { $tmp = array_merge(range('a', 'z'), range('A', 'Z'), range(0, 9)); shuffle($tmp); - + $salt = substr(implode('', $tmp), 0, 32); - + return $salt; - } + } } diff --git a/QuickBooks/Encryption/Aes.php b/QuickBooks/Encryption/Aes.php index 963f5c35..080c8abe 100755 --- a/QuickBooks/Encryption/Aes.php +++ b/QuickBooks/Encryption/Aes.php @@ -1,24 +1,24 @@ - * + * * @package QuickBooks */ -// +// QuickBooks_Loader::load('/QuickBooks/Encryption.php'); /** - * + * */ class QuickBooks_Encryption_Aes extends QuickBooks_Encryption { @@ -28,15 +28,15 @@ static function encrypt($key, $plain, $salt = null) { $salt = QuickBooks_Encryption::salt(); } - + $plain = serialize(array( $plain, $salt )); - + $crypt = mcrypt_module_open('rijndael-256', '', 'ofb', ''); - if (false !== stripos(PHP_OS, 'win') and - version_compare(PHP_VERSION, '5.3.0') == -1) + if (false !== stripos(PHP_OS, 'win') and + version_compare(PHP_VERSION, '5.3.0') == -1) { - $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($crypt), MCRYPT_RAND); + $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($crypt), MCRYPT_RAND); } else { @@ -45,43 +45,43 @@ static function encrypt($key, $plain, $salt = null) $ks = mcrypt_enc_get_key_size($crypt); $key = substr(md5($key), 0, $ks); - + mcrypt_generic_init($crypt, $key, $iv); $encrypted = base64_encode($iv . mcrypt_generic($crypt, $plain)); mcrypt_generic_deinit($crypt); mcrypt_module_close($crypt); - + return $encrypted; } - + static function decrypt($key, $encrypted) { $crypt = mcrypt_module_open('rijndael-256', '', 'ofb', ''); $iv_size = mcrypt_enc_get_iv_size($crypt); $ks = mcrypt_enc_get_key_size($crypt); $key = substr(md5($key), 0, $ks); - + //print('before base64 [' . $encrypted . ']' . '
'); - + $encrypted = base64_decode($encrypted); - + //print('given key was: ' . $key); //print('iv size: ' . $iv_size); - + //print('decrypting [' . $encrypted . ']' . '
'); - + mcrypt_generic_init($crypt, $key, substr($encrypted, 0, $iv_size)); $decrypted = trim(mdecrypt_generic($crypt, substr($encrypted, $iv_size))); mcrypt_generic_deinit($crypt); mcrypt_module_close($crypt); - + //print('decrypted: [[**(' . $salt . ')'); //print_r($decrypted); //print('**]]'); - + $tmp = unserialize($decrypted); $decrypted = current($tmp); - + return $decrypted; } } diff --git a/QuickBooks/Encryption/Blowfish.php b/QuickBooks/Encryption/Blowfish.php index c7da55f9..2b504a37 100644 --- a/QuickBooks/Encryption/Blowfish.php +++ b/QuickBooks/Encryption/Blowfish.php @@ -2,22 +2,22 @@ /** * QuickBooks encryption library: Blowfish - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Encryption */ -/** - * +/** + * */ QuickBooks_Loader::load('/QuickBooks/Encryption.php'); @@ -30,36 +30,36 @@ class QuickBooks_Encryption_Blowfish extends QuickBooks_Encryption { public function __construct() { - + } - + public function setIV() { - + } - + public function getIV() { - + } - + public function setMode() { - + } - + public function getMode() { - + } - + public function encrypt() { - + } - + public function decrypt() { - + } } diff --git a/QuickBooks/Encryption/Factory.php b/QuickBooks/Encryption/Factory.php index 1d552e81..dc28700e 100644 --- a/QuickBooks/Encryption/Factory.php +++ b/QuickBooks/Encryption/Factory.php @@ -2,29 +2,29 @@ /** * QuickBooks encryption library factory method - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Encryption */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/Encryption.php'); /** - * - * - * + * + * + * */ class QuickBooks_Encryption_Factory { @@ -33,30 +33,30 @@ static public function create($encrypt) { $class = 'QuickBooks_Encryption_' . ucfirst(strtolower($encrypt)); $file = '/QuickBooks/Encryption/' . ucfirst(strtolower($encrypt)) . '.php'; - + QuickBooks_Loader::load($file); - + return new $class(); } - + /** - * - * + * + * * @param string $encrypted * @return string */ static public function determine(&$encrypted) { - if ($encrypted[0] == '{' and + if ($encrypted[0] == '{' and false !== ($end = strpos($encrypted, ':'))) { $number = substr($encrypted, 1, $end); - + $method = substr($encrypted, 1 + strlen($number), $number); $encrypted = substr($encrypted, $number + 4); return $method; } - + return null; } } diff --git a/QuickBooks/Encryption/Mode/CBC.php b/QuickBooks/Encryption/Mode/CBC.php index 678a2772..a46d941c 100644 --- a/QuickBooks/Encryption/Mode/CBC.php +++ b/QuickBooks/Encryption/Mode/CBC.php @@ -2,22 +2,22 @@ /** * QuickBooks encryption library factory method - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Encryption */ - + class QuickBooks_Encryption_Mode_CBC { - + } diff --git a/QuickBooks/Encryption/Mode/ECB.php b/QuickBooks/Encryption/Mode/ECB.php index ac4502bf..f2cee5a4 100644 --- a/QuickBooks/Encryption/Mode/ECB.php +++ b/QuickBooks/Encryption/Mode/ECB.php @@ -2,21 +2,21 @@ /** * QuickBooks encryption library factory method - * + * * Copyright (c) 2010 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Encryption */ - + class QuickBooks_Encryption_Mode_ECB { - + } diff --git a/QuickBooks/Encryption/Rc4.php b/QuickBooks/Encryption/Rc4.php index 38a1b8b5..7294ec7a 100644 --- a/QuickBooks/Encryption/Rc4.php +++ b/QuickBooks/Encryption/Rc4.php @@ -1,21 +1,21 @@ encrypt($key, $data, $hex); diff --git a/QuickBooks/ErrorHandler.php b/QuickBooks/ErrorHandler.php index d17b35b6..b7c87a2d 100755 --- a/QuickBooks/ErrorHandler.php +++ b/QuickBooks/ErrorHandler.php @@ -1,29 +1,29 @@ * @license LICENSE.txt - * + * * @package QuickBooks */ /** - * - * - * + * + * + * */ class QuickBooks_ErrorHandler { /** - * + * */ static public function handle($errno, $errstr, $errfile, $errline) { @@ -31,7 +31,7 @@ static public function handle($errno, $errstr, $errfile, $errline) ERROR: [' . $errno . '] ' . $errstr . ' Fatal error on line ' . $errline . ' in file ' . $errfile . ', PHP v' . PHP_VERSION . ' (' . PHP_OS . ') '); - + exit(1); } } diff --git a/QuickBooks/Frameworks.php b/QuickBooks/Frameworks.php index 0876716e..214132b4 100644 --- a/QuickBooks/Frameworks.php +++ b/QuickBooks/Frameworks.php @@ -8,75 +8,75 @@ * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * - * Chances are that you're only using select parts of this large QuickBooks - * package because you're only doing a Web Connector integration, or you're - * only doing Merchant Services, or you're only doing XYZ, etc. etc. etc. - * - * These framework constants allow you to specify that you only want to include - * certain sets of files that are applicable to you, instead of including - * everything. Including everything has a performance penalty (on some machines - * it can take 0.3 seconds to load all of the includes) so including just the - * stuff you need can help to alleviate some performance headaches. - * + * + * Chances are that you're only using select parts of this large QuickBooks + * package because you're only doing a Web Connector integration, or you're + * only doing Merchant Services, or you're only doing XYZ, etc. etc. etc. + * + * These framework constants allow you to specify that you only want to include + * certain sets of files that are applicable to you, instead of including + * everything. Including everything has a performance penalty (on some machines + * it can take 0.3 seconds to load all of the includes) so including just the + * stuff you need can help to alleviate some performance headaches. + * * @license LICENSE.txt * @author Keith Palmer - * + * * @package QuickBooks * @subpackage Frameworks */ /** - * + * */ define('QUICKBOOKS_FRAMEWORK_CONSTANTS', 1); /** - * + * */ define('QUICKBOOKS_FRAMEWORK_QUEUE', 2); /** - * + * */ define('QUICKBOOKS_FRAMEWORK_WEBCONNECTOR', 4); /** - * + * */ define('QUICKBOOKS_FRAMEWORK_MERCHANTSERVICE', 8); /** - * + * */ define('QUICKBOOKS_FRAMEWORK_ONLINEEDITION', 16); /** - * + * */ define('QUICKBOOKS_FRAMEWORK_WINDOWSCOM', 32); /** - * + * */ define('QUICKBOOKS_FRAMEWORK_OBJECTS', 64); /** - * + * */ define('QUICKBOOKS_FRAMEWORK_QBXML', 128); -/** - * +/** + * */ define('QUICKBOOKS_FRAMEWORK_FRONTEND', 256); /** - * + * */ define('QUICKBOOKS_FRAMEWORK_MISCELLANEOUS', 1024); /** - * + * */ define('QUICKBOOKS_FRAMEWORK_IPP', 2048); diff --git a/QuickBooks/HTTP.php b/QuickBooks/HTTP.php index 29e833b2..47ad5fd6 100644 --- a/QuickBooks/HTTP.php +++ b/QuickBooks/HTTP.php @@ -611,7 +611,7 @@ function($curl, $header) use (&$response_headers) $this->_log('HTTP response: ' . substr($response, 0, 500) . '...', QUICKBOOKS_LOG_VERBOSE); $this->_last_info = curl_getinfo($ch); - + if (curl_errno($ch)) { $errnum = curl_errno($ch); diff --git a/QuickBooks/IPP/Cache.php b/QuickBooks/IPP/Cache.php index 58a18aee..a85ad761 100644 --- a/QuickBooks/IPP/Cache.php +++ b/QuickBooks/IPP/Cache.php @@ -1,14 +1,14 @@ _context = $Context; } - + protected function _mapFactory($map) { $class = 'QuickBooks_IPP_Cache_Mapper_' . ucfirst(strtolower($map)); $file = 'QuickBooks/IPP/Cache/Mapper/' . ucfirst(strtolower($map)); - + QuickBooks_Loader::load($file); - + return new $class($map_dsn); } - + public function refresh($resources = array(), $IDs = null) { - + } - + public function add($resources = array(), $IDs = null) { - + } - + public function mod($resources = array(), $IDs = null) { - + } - + public function query($resources = array(), $IDs = null) { - + } - + public function delete($resources = array(), $IDs = null) { - + } - + public function todo($resources = array(), $actions = array()) { foreach ($resources as $resource) { foreach ($actions as $action) { - //$todos = - - + //$todos = + + } } } - + public function initialized() { - + } - + public function initialize() { - + } } \ No newline at end of file diff --git a/QuickBooks/IPP/Context.php b/QuickBooks/IPP/Context.php index 2f2dddb6..5b38e8fb 100755 --- a/QuickBooks/IPP/Context.php +++ b/QuickBooks/IPP/Context.php @@ -1,64 +1,64 @@ _IPP = $IPP; - + $this->_ticket = $ticket; $this->_token = $token; } - + public function IPP() { return $this->_IPP; } - + public function lastRequest() { return $this->_IPP->lastRequest(); } - + public function lastResponse() { return $this->_IPP->lastResponse(); } - + public function lastDebug() { return $this->_IPP->lastDebug(); } - + public function lastError() { return $this->_IPP->lastError(); } - + public function ticket() { return $this->_ticket; } - + public function token() { return $this->_token; @@ -68,7 +68,7 @@ public function authcreds() { return $this->_IPP->authcreds(); } - + public function authmode() { return $this->_IPP->authmode(); diff --git a/QuickBooks/IPP/Entitlement.php b/QuickBooks/IPP/Entitlement.php index 51e595aa..bf7e855d 100755 --- a/QuickBooks/IPP/Entitlement.php +++ b/QuickBooks/IPP/Entitlement.php @@ -1,7 +1,7 @@ _entitlement_id = $entitlement_id; @@ -52,22 +52,22 @@ public function getValue() { return $this->_term; } - + public function getEntitlementId() { return $this->_entitlement_id; } - + public function getName() { return $this->_name; } - + public function getTermId() { return $this->_term_id; } - + public function getTerm() { return $this->_term; diff --git a/QuickBooks/IPP/IDS.php b/QuickBooks/IPP/IDS.php index 89184a61..fd26c271 100644 --- a/QuickBooks/IPP/IDS.php +++ b/QuickBooks/IPP/IDS.php @@ -45,9 +45,9 @@ class QuickBooks_IPP_IDS const OPTYPE_CDC = 'ChangeDataCapture'; const OPTYPE_ENTITLEMENTS = 'Entitlements'; - + const OPTYPE_SEND = 'Send'; - + /** * This is not a real operation type in IDS terms, but is neccessary to distinguish between queries and findById in QuickBooks Online in IDS v2. */ diff --git a/QuickBooks/IPP/Object.php b/QuickBooks/IPP/Object.php index aaf55cfa..27fdf929 100644 --- a/QuickBooks/IPP/Object.php +++ b/QuickBooks/IPP/Object.php @@ -378,9 +378,9 @@ protected function _asXML_v3($indent, $parent, $optype, $flavor) /*else if (substr($key, -2, 2) == 'Id') { $for_qbxml = false; - + $tmp = QuickBooks_IPP_IDS::parseIdType($svalue); - + if ($tmp[0]) { $xml .= str_repeat("\t", $indent + 1) . '<' . $key . ' idDomain="' . $tmp[0] . '">'; @@ -389,9 +389,9 @@ protected function _asXML_v3($indent, $parent, $optype, $flavor) { $xml .= str_repeat("\t", $indent + 1) . '<' . $key . '>'; } - + $xml .= QuickBooks_XML::encode($tmp[1], $for_qbxml); - $xml .= '' . QUICKBOOKS_CRLF; + $xml .= '' . QUICKBOOKS_CRLF; }*/ else { @@ -626,4 +626,4 @@ public function asIDSXML($indent = 0, $parent = null, $optype = null, $flavor = return $xml; } -} \ No newline at end of file +} diff --git a/QuickBooks/IPP/Object/Account.php b/QuickBooks/IPP/Object/Account.php index e8d444ee..0920da07 100644 --- a/QuickBooks/IPP/Object/Account.php +++ b/QuickBooks/IPP/Object/Account.php @@ -7,21 +7,21 @@ class QuickBooks_IPP_Object_Account extends QuickBooks_IPP_Object protected function _order() { return array( - 'Id' => true, - 'MetaData' => true, - 'Name' => true, - 'AccountParentId' => true, - 'AccountParentName' => true, - 'Desc' => true, - 'Active' => true, - 'Type' => true, - 'Subtype' => true, - 'AcctNum' => true, - 'BankNum' => true, - 'OpeningBalance' => true, - 'OpeningBalanceDate' => true, - 'CurrentBalance' => true, - 'CurrentBalanceWithSubAccounts' => true, + 'Id' => true, + 'MetaData' => true, + 'Name' => true, + 'AccountParentId' => true, + 'AccountParentName' => true, + 'Desc' => true, + 'Active' => true, + 'Type' => true, + 'Subtype' => true, + 'AcctNum' => true, + 'BankNum' => true, + 'OpeningBalance' => true, + 'OpeningBalanceDate' => true, + 'CurrentBalance' => true, + 'CurrentBalanceWithSubAccounts' => true, ); } } diff --git a/QuickBooks/IPP/Object/AccountBasedExpenseLineDetail.php b/QuickBooks/IPP/Object/AccountBasedExpenseLineDetail.php index 31dd091a..62b465b6 100644 --- a/QuickBooks/IPP/Object/AccountBasedExpenseLineDetail.php +++ b/QuickBooks/IPP/Object/AccountBasedExpenseLineDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_AccountBasedExpenseLineDetail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/AccountingInfoPrefs.php b/QuickBooks/IPP/Object/AccountingInfoPrefs.php index 27899022..71a4268b 100644 --- a/QuickBooks/IPP/Object/AccountingInfoPrefs.php +++ b/QuickBooks/IPP/Object/AccountingInfoPrefs.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_AccountingInfoPrefs extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Address.php b/QuickBooks/IPP/Object/Address.php index fc73eb99..039e0ebf 100644 --- a/QuickBooks/IPP/Object/Address.php +++ b/QuickBooks/IPP/Object/Address.php @@ -6,33 +6,33 @@ class QuickBooks_IPP_Object_Address extends QuickBooks_IPP_Object { const TAG_BILLING = 'Billing'; const TAG_SHIPPING = 'Shipping'; - + public function setState($state) { return $this->setCountrySubDivisionCode($state); } - + public function getState() { return $this->getCountrySubDivisionCode(); } - + protected function _order() { return array( - 'Id' => true, - 'Line1' => true, - 'Line2' => true, - 'Line3' => true, - 'Line4' => true, - 'Line5' => true, - 'City' => true, - 'Country' => true, - 'CountrySubDivisionCode' => true, - 'PostalCode' => true, - 'PostalCodeSuffix' => true, - 'Default' => true, - 'Tag' => true, + 'Id' => true, + 'Line1' => true, + 'Line2' => true, + 'Line3' => true, + 'Line4' => true, + 'Line5' => true, + 'City' => true, + 'Country' => true, + 'CountrySubDivisionCode' => true, + 'PostalCode' => true, + 'PostalCodeSuffix' => true, + 'Default' => true, + 'Tag' => true, ); } diff --git a/QuickBooks/IPP/Object/AlternatePhone.php b/QuickBooks/IPP/Object/AlternatePhone.php index cecef10d..4dcf6919 100755 --- a/QuickBooks/IPP/Object/AlternatePhone.php +++ b/QuickBooks/IPP/Object/AlternatePhone.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_AlternatePhone extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Amount.php b/QuickBooks/IPP/Object/Amount.php index d998d62d..4d012a4e 100755 --- a/QuickBooks/IPP/Object/Amount.php +++ b/QuickBooks/IPP/Object/Amount.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Amount extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/AssetAccountRef.php b/QuickBooks/IPP/Object/AssetAccountRef.php index 03f05018..49f43df2 100644 --- a/QuickBooks/IPP/Object/AssetAccountRef.php +++ b/QuickBooks/IPP/Object/AssetAccountRef.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_AssetAccountRef extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/AvgCost.php b/QuickBooks/IPP/Object/AvgCost.php index 47cd43cb..1009cf0d 100644 --- a/QuickBooks/IPP/Object/AvgCost.php +++ b/QuickBooks/IPP/Object/AvgCost.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_AvgCost extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Bill.php b/QuickBooks/IPP/Object/Bill.php index 2d429fbe..9cb70542 100644 --- a/QuickBooks/IPP/Object/Bill.php +++ b/QuickBooks/IPP/Object/Bill.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Bill extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/BillAddr.php b/QuickBooks/IPP/Object/BillAddr.php index 07ad9a9f..db689519 100755 --- a/QuickBooks/IPP/Object/BillAddr.php +++ b/QuickBooks/IPP/Object/BillAddr.php @@ -9,29 +9,29 @@ public function setState($state) { return $this->setCountrySubDivisionCode($state); } - + public function getState() { return $this->getCountrySubDivisionCode(); } - + protected function _order() { return array( - 'Id' => true, - 'Line1' => true, - 'Line2' => true, - 'Line3' => true, - 'Line4' => true, - 'Line5' => true, - 'City' => true, - 'Country' => true, - 'CountrySubDivisionCode' => true, - 'PostalCode' => true, - 'PostalCodeSuffix' => true, - 'Default' => true, - 'Tag' => true, + 'Id' => true, + 'Line1' => true, + 'Line2' => true, + 'Line3' => true, + 'Line4' => true, + 'Line5' => true, + 'City' => true, + 'Country' => true, + 'CountrySubDivisionCode' => true, + 'PostalCode' => true, + 'PostalCodeSuffix' => true, + 'Default' => true, + 'Tag' => true, ); } - + } diff --git a/QuickBooks/IPP/Object/BillEmail.php b/QuickBooks/IPP/Object/BillEmail.php index a8a4a1ee..0dd3f3ec 100755 --- a/QuickBooks/IPP/Object/BillEmail.php +++ b/QuickBooks/IPP/Object/BillEmail.php @@ -7,7 +7,7 @@ class QuickBooks_IPP_Object_BillEmail extends QuickBooks_IPP_Object protected function _order() { return array( - 'Address' => true, - ); + 'Address' => true, + ); } } diff --git a/QuickBooks/IPP/Object/BillPayment.php b/QuickBooks/IPP/Object/BillPayment.php index 13f8f78c..973c709e 100755 --- a/QuickBooks/IPP/Object/BillPayment.php +++ b/QuickBooks/IPP/Object/BillPayment.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_BillPayment extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/BillPaymentCreditCard.php b/QuickBooks/IPP/Object/BillPaymentCreditCard.php index 1d8247a2..c43bc4dd 100755 --- a/QuickBooks/IPP/Object/BillPaymentCreditCard.php +++ b/QuickBooks/IPP/Object/BillPaymentCreditCard.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_BillPaymentCreditCard extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/COGSAccountRef.php b/QuickBooks/IPP/Object/COGSAccountRef.php index 04d1be5b..cacbdf23 100644 --- a/QuickBooks/IPP/Object/COGSAccountRef.php +++ b/QuickBooks/IPP/Object/COGSAccountRef.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_COGSAccountRef extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Cash.php b/QuickBooks/IPP/Object/Cash.php index d77ac425..fb3e31ab 100644 --- a/QuickBooks/IPP/Object/Cash.php +++ b/QuickBooks/IPP/Object/Cash.php @@ -3,7 +3,7 @@ QuickBooks_Loader::load('/QuickBooks/IPP/Object.php'); class QuickBooks_IPP_Object_Cash extends QuickBooks_IPP_Object -{ +{ protected function _order() { return array(); diff --git a/QuickBooks/IPP/Object/Check.php b/QuickBooks/IPP/Object/Check.php index 14a3bfd0..792741a6 100755 --- a/QuickBooks/IPP/Object/Check.php +++ b/QuickBooks/IPP/Object/Check.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Check extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CheckPayment.php b/QuickBooks/IPP/Object/CheckPayment.php index 56da4264..e53d1a2b 100644 --- a/QuickBooks/IPP/Object/CheckPayment.php +++ b/QuickBooks/IPP/Object/CheckPayment.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CheckPayment extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Class.php b/QuickBooks/IPP/Object/Class.php index ce19f5f7..306fab17 100644 --- a/QuickBooks/IPP/Object/Class.php +++ b/QuickBooks/IPP/Object/Class.php @@ -7,12 +7,12 @@ class QuickBooks_IPP_Object_Class extends QuickBooks_IPP_Object protected function _order() { return array( - 'Id' => true, - 'MetaData' => true, - 'Name' => true, - 'ClassParentId' => true, - 'ClassParentName' => true, - 'Active' => true, + 'Id' => true, + 'MetaData' => true, + 'Name' => true, + 'ClassParentId' => true, + 'ClassParentName' => true, + 'Active' => true, ); } } diff --git a/QuickBooks/IPP/Object/ColDesc.php b/QuickBooks/IPP/Object/ColDesc.php index a78666c6..e40e00c2 100755 --- a/QuickBooks/IPP/Object/ColDesc.php +++ b/QuickBooks/IPP/Object/ColDesc.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_ColDesc extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CompanyAddr.php b/QuickBooks/IPP/Object/CompanyAddr.php index 76a26380..aa563977 100644 --- a/QuickBooks/IPP/Object/CompanyAddr.php +++ b/QuickBooks/IPP/Object/CompanyAddr.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CompanyAddr extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CompanyInfo.php b/QuickBooks/IPP/Object/CompanyInfo.php index 0c582354..25ff28b8 100644 --- a/QuickBooks/IPP/Object/CompanyInfo.php +++ b/QuickBooks/IPP/Object/CompanyInfo.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CompanyInfo extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CompanyMetaData.php b/QuickBooks/IPP/Object/CompanyMetaData.php index 5d2d24cf..05a9e43b 100755 --- a/QuickBooks/IPP/Object/CompanyMetaData.php +++ b/QuickBooks/IPP/Object/CompanyMetaData.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CompanyMetaData extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/ConvUnit.php b/QuickBooks/IPP/Object/ConvUnit.php index cebddc2c..1a84be1f 100644 --- a/QuickBooks/IPP/Object/ConvUnit.php +++ b/QuickBooks/IPP/Object/ConvUnit.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_ConvUnit extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CreditCard.php b/QuickBooks/IPP/Object/CreditCard.php index c86c6850..632a5c4d 100755 --- a/QuickBooks/IPP/Object/CreditCard.php +++ b/QuickBooks/IPP/Object/CreditCard.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CreditCard extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CreditCardPayment.php b/QuickBooks/IPP/Object/CreditCardPayment.php index d7350c82..9bd1e230 100755 --- a/QuickBooks/IPP/Object/CreditCardPayment.php +++ b/QuickBooks/IPP/Object/CreditCardPayment.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CreditCardPayment extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CreditChargeInfo.php b/QuickBooks/IPP/Object/CreditChargeInfo.php index 846f76a1..9ab56a79 100755 --- a/QuickBooks/IPP/Object/CreditChargeInfo.php +++ b/QuickBooks/IPP/Object/CreditChargeInfo.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CreditChargeInfo extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CreditChargeResponse.php b/QuickBooks/IPP/Object/CreditChargeResponse.php index 3373e4ef..d41d3118 100755 --- a/QuickBooks/IPP/Object/CreditChargeResponse.php +++ b/QuickBooks/IPP/Object/CreditChargeResponse.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CreditChargeResponse extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CreditLimit.php b/QuickBooks/IPP/Object/CreditLimit.php index 05598aaa..1cd90416 100644 --- a/QuickBooks/IPP/Object/CreditLimit.php +++ b/QuickBooks/IPP/Object/CreditLimit.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CreditLimit extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CreditMemo.php b/QuickBooks/IPP/Object/CreditMemo.php index be020f05..b8345101 100755 --- a/QuickBooks/IPP/Object/CreditMemo.php +++ b/QuickBooks/IPP/Object/CreditMemo.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CreditMemo extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CurrencyPrefs.php b/QuickBooks/IPP/Object/CurrencyPrefs.php index 22f9e819..4fae9340 100644 --- a/QuickBooks/IPP/Object/CurrencyPrefs.php +++ b/QuickBooks/IPP/Object/CurrencyPrefs.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CurrencyPrefs extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/CustomField.php b/QuickBooks/IPP/Object/CustomField.php index 5181c2cf..bf0d903d 100755 --- a/QuickBooks/IPP/Object/CustomField.php +++ b/QuickBooks/IPP/Object/CustomField.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CustomField extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Customer.php b/QuickBooks/IPP/Object/Customer.php index fd3a1cc0..5ce59f48 100644 --- a/QuickBooks/IPP/Object/Customer.php +++ b/QuickBooks/IPP/Object/Customer.php @@ -7,64 +7,64 @@ class QuickBooks_IPP_Object_Customer extends QuickBooks_IPP_Object protected function _defaults() { return array( - 'TypeOf' => 'Person', + 'TypeOf' => 'Person', ); } - + protected function _order() { return array( - 'Id' => true, - 'SyncToken' => true, - 'MetaData' => true, - 'Synchronized' => true, - 'CustomField' => true, - 'PartyReferenceId' => true, - 'TypeOf' => true, - 'Name' => true, - 'Address' => true, - 'Phone' => true, - 'Website' => true, - 'Email' => true, - 'Title' => true, - 'GivenName' => true, - 'MiddleName' => true, - 'FamilyName' => true, - 'Suffix' => true, - 'Gender' => true, - 'BirthDate' => true, - 'LegalName' => true, - 'DBAName' => true, - 'TaxIdentifier' => true, - 'Notes' => true, - 'Active' => true, - 'ShowAs' => true, - 'CustomerTypeId' => true, - 'CustomerTypeName' => true, - 'SalesTermId' => true, - 'SalesTermName' => true, - 'SalesRepId' => true, - 'SalesRepName' => true, - 'SalesTaxCodeId' => true, - 'SalesTaxCodeName' => true, - 'TaxId' => true, - 'TaxName' => true, - 'TaxGroupId' => true, - 'TaxGroupName' => true, - 'PaymentMethodId' => true, - 'PaymentMethodName' => true, - 'PriceLevelId' => true, - 'PriceLevelName' => true, - 'OpenBalance' => true, - 'OpenBalanceDate' => true, - 'OpenBalanceWithJobs' => true, - 'CreditLimit' => true, + 'Id' => true, + 'SyncToken' => true, + 'MetaData' => true, + 'Synchronized' => true, + 'CustomField' => true, + 'PartyReferenceId' => true, + 'TypeOf' => true, + 'Name' => true, + 'Address' => true, + 'Phone' => true, + 'Website' => true, + 'Email' => true, + 'Title' => true, + 'GivenName' => true, + 'MiddleName' => true, + 'FamilyName' => true, + 'Suffix' => true, + 'Gender' => true, + 'BirthDate' => true, + 'LegalName' => true, + 'DBAName' => true, + 'TaxIdentifier' => true, + 'Notes' => true, + 'Active' => true, + 'ShowAs' => true, + 'CustomerTypeId' => true, + 'CustomerTypeName' => true, + 'SalesTermId' => true, + 'SalesTermName' => true, + 'SalesRepId' => true, + 'SalesRepName' => true, + 'SalesTaxCodeId' => true, + 'SalesTaxCodeName' => true, + 'TaxId' => true, + 'TaxName' => true, + 'TaxGroupId' => true, + 'TaxGroupName' => true, + 'PaymentMethodId' => true, + 'PaymentMethodName' => true, + 'PriceLevelId' => true, + 'PriceLevelName' => true, + 'OpenBalance' => true, + 'OpenBalanceDate' => true, + 'OpenBalanceWithJobs' => true, + 'CreditLimit' => true, 'WebAddr' => true, - 'AcctNum' => true, - 'OverDueBalance' => true, - 'TotalRevenue' => true, - 'TotalExpense' => true, - 'JobInfo' => true, + 'AcctNum' => true, + 'OverDueBalance' => true, + 'TotalRevenue' => true, + 'TotalExpense' => true, + 'JobInfo' => true, ); } } diff --git a/QuickBooks/IPP/Object/CustomerCommunicationAddr.php b/QuickBooks/IPP/Object/CustomerCommunicationAddr.php index 35b8a19c..b2866ca9 100644 --- a/QuickBooks/IPP/Object/CustomerCommunicationAddr.php +++ b/QuickBooks/IPP/Object/CustomerCommunicationAddr.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_CustomerCommunicationAddr extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/DeliveryInfo.php b/QuickBooks/IPP/Object/DeliveryInfo.php index e6cf17d9..b054f30d 100644 --- a/QuickBooks/IPP/Object/DeliveryInfo.php +++ b/QuickBooks/IPP/Object/DeliveryInfo.php @@ -3,7 +3,7 @@ QuickBooks_Loader::load('/QuickBooks/IPP/Object.php'); class QuickBooks_IPP_Object_DeliveryInfo extends QuickBooks_IPP_Object -{ +{ protected function _order() { return array(); diff --git a/QuickBooks/IPP/Object/Department.php b/QuickBooks/IPP/Object/Department.php index a7a65fff..d89cc755 100644 --- a/QuickBooks/IPP/Object/Department.php +++ b/QuickBooks/IPP/Object/Department.php @@ -7,12 +7,12 @@ class QuickBooks_IPP_Object_Department extends QuickBooks_IPP_Object protected function _order() { return array( - 'Id' => true, - 'MetaData' => true, - 'Name' => true, + 'Id' => true, + 'MetaData' => true, + 'Name' => true, 'DepartmentParentId' => true, 'DepartmentParentName' => true, - 'Active' => true, + 'Active' => true, ); } } diff --git a/QuickBooks/IPP/Object/DescriptionLineDetail.php b/QuickBooks/IPP/Object/DescriptionLineDetail.php index bb19a3ad..68c975eb 100644 --- a/QuickBooks/IPP/Object/DescriptionLineDetail.php +++ b/QuickBooks/IPP/Object/DescriptionLineDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_DescriptionLineDetail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Detail.php b/QuickBooks/IPP/Object/Detail.php index 4c81feac..e8252444 100755 --- a/QuickBooks/IPP/Object/Detail.php +++ b/QuickBooks/IPP/Object/Detail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Detail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Discount.php b/QuickBooks/IPP/Object/Discount.php index aceca888..a3dbeba5 100755 --- a/QuickBooks/IPP/Object/Discount.php +++ b/QuickBooks/IPP/Object/Discount.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Discount extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/DiscountAccountRef.php b/QuickBooks/IPP/Object/DiscountAccountRef.php index 3c69fc69..3eb89d62 100755 --- a/QuickBooks/IPP/Object/DiscountAccountRef.php +++ b/QuickBooks/IPP/Object/DiscountAccountRef.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_DiscountAccountRef extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/DiscountLineDetail.php b/QuickBooks/IPP/Object/DiscountLineDetail.php index 6489092e..4c5dd9fd 100644 --- a/QuickBooks/IPP/Object/DiscountLineDetail.php +++ b/QuickBooks/IPP/Object/DiscountLineDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_DiscountLineDetail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/EffectiveTaxRate.php b/QuickBooks/IPP/Object/EffectiveTaxRate.php index 03623727..1bcc7d1d 100644 --- a/QuickBooks/IPP/Object/EffectiveTaxRate.php +++ b/QuickBooks/IPP/Object/EffectiveTaxRate.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_EffectiveTaxRate extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Email.php b/QuickBooks/IPP/Object/Email.php index cef02afc..5fc1bf36 100755 --- a/QuickBooks/IPP/Object/Email.php +++ b/QuickBooks/IPP/Object/Email.php @@ -7,10 +7,10 @@ class QuickBooks_IPP_Object_Email extends QuickBooks_IPP_Object protected function _order() { return array( - 'Id' => true, - 'Address' => true, - 'Default' => true, + 'Id' => true, + 'Address' => true, + 'Default' => true, 'Tag' => true, - ); + ); } } diff --git a/QuickBooks/IPP/Object/EmailMessagesPrefs.php b/QuickBooks/IPP/Object/EmailMessagesPrefs.php index 3eb335c5..11b578d5 100644 --- a/QuickBooks/IPP/Object/EmailMessagesPrefs.php +++ b/QuickBooks/IPP/Object/EmailMessagesPrefs.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_EmailMessagesPrefs extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Employee.php b/QuickBooks/IPP/Object/Employee.php index f1bafb99..0f699364 100755 --- a/QuickBooks/IPP/Object/Employee.php +++ b/QuickBooks/IPP/Object/Employee.php @@ -7,40 +7,40 @@ class QuickBooks_IPP_Object_Employee extends QuickBooks_IPP_Object protected function _defaults() { return array( - 'TypeOf' => 'Person', + 'TypeOf' => 'Person', ); } - + protected function _order() { return array( - 'Id' => true, - 'MetaData' => true, - 'PartyReferenceId' => true, - 'TypeOf' => true, - 'Name' => true, - 'Address' => true, - 'Phone' => true, - 'WebSite' => true, - 'Email' => true, - 'Title' => true, - 'GivenName' => true, - 'MiddleName' => true, - 'FamilyName' => true, - 'Suffix' => true, - 'Gender' => true, - 'BirthDate' => true, - 'LegalName' => true, - 'DBAName' => true, - 'TaxIdentifier' => true, - 'Notes' => true, - 'Active' => true, - 'ShowAs' => true, - 'EmployeeType' => true, - 'EmployeeNumber' => true, - 'HiredDate' => true, - 'ReleasedDate' => true, - 'UseTimeEntry' => true, + 'Id' => true, + 'MetaData' => true, + 'PartyReferenceId' => true, + 'TypeOf' => true, + 'Name' => true, + 'Address' => true, + 'Phone' => true, + 'WebSite' => true, + 'Email' => true, + 'Title' => true, + 'GivenName' => true, + 'MiddleName' => true, + 'FamilyName' => true, + 'Suffix' => true, + 'Gender' => true, + 'BirthDate' => true, + 'LegalName' => true, + 'DBAName' => true, + 'TaxIdentifier' => true, + 'Notes' => true, + 'Active' => true, + 'ShowAs' => true, + 'EmployeeType' => true, + 'EmployeeNumber' => true, + 'HiredDate' => true, + 'ReleasedDate' => true, + 'UseTimeEntry' => true, ); } } diff --git a/QuickBooks/IPP/Object/Entity.php b/QuickBooks/IPP/Object/Entity.php index ea760d72..f2e953de 100644 --- a/QuickBooks/IPP/Object/Entity.php +++ b/QuickBooks/IPP/Object/Entity.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Entity extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Estimate.php b/QuickBooks/IPP/Object/Estimate.php index 6d7b7264..bcca39dc 100644 --- a/QuickBooks/IPP/Object/Estimate.php +++ b/QuickBooks/IPP/Object/Estimate.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Estimate extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/EstimateMessage.php b/QuickBooks/IPP/Object/EstimateMessage.php index 5aa35f7f..c6406903 100644 --- a/QuickBooks/IPP/Object/EstimateMessage.php +++ b/QuickBooks/IPP/Object/EstimateMessage.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_EstimateMessage extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/ExpenseAccountRef.php b/QuickBooks/IPP/Object/ExpenseAccountRef.php index f9ba4479..37b7ee83 100644 --- a/QuickBooks/IPP/Object/ExpenseAccountRef.php +++ b/QuickBooks/IPP/Object/ExpenseAccountRef.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_ExpenseAccountRef extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Fax.php b/QuickBooks/IPP/Object/Fax.php index 2299f9a7..8a9cc9a4 100644 --- a/QuickBooks/IPP/Object/Fax.php +++ b/QuickBooks/IPP/Object/Fax.php @@ -7,16 +7,16 @@ class QuickBooks_IPP_Object_Fax extends QuickBooks_IPP_Object protected function _order() { return array( - 'Id' => true, - 'DeviceType' => true, - 'CountryCode' => true, - 'AreaCode' => true, - 'ExchangeCode' => true, - 'Extension' => true, - 'FreeFormNumber' => true, - 'PIN' => true, - 'Default' => true, - 'Tag' => true, + 'Id' => true, + 'DeviceType' => true, + 'CountryCode' => true, + 'AreaCode' => true, + 'ExchangeCode' => true, + 'Extension' => true, + 'FreeFormNumber' => true, + 'PIN' => true, + 'Default' => true, + 'Tag' => true, ); } } diff --git a/QuickBooks/IPP/Object/GroupLineDetail.php b/QuickBooks/IPP/Object/GroupLineDetail.php index 311ab595..d59e73c7 100644 --- a/QuickBooks/IPP/Object/GroupLineDetail.php +++ b/QuickBooks/IPP/Object/GroupLineDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_GroupLineDetail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Header.php b/QuickBooks/IPP/Object/Header.php index 8b4e69a1..cdca6e17 100755 --- a/QuickBooks/IPP/Object/Header.php +++ b/QuickBooks/IPP/Object/Header.php @@ -8,68 +8,68 @@ public function setTxnDate($value) { return $this->setDateType('TxnDate', $value); } - + public function getTxnDate($format = 'Y-m-d') { return $this->getDateType('TxnDate', $format); } - + public function setTotalAmt($amt) { return $this->setAmountType('TotalAmt', $amt); } - + protected function _order() { return array( - 'DocNumber' => true, - 'TxnDate' => true, - 'Note' => true, + 'DocNumber' => true, + 'TxnDate' => true, + 'Note' => true, 'Status' => true, - 'VendorId' => true, + 'VendorId' => true, 'VendorName' => true, - 'CustomerId' => true, - 'CustomerName' => true, - 'JobId' => true, - 'JobName' => true, - 'RemitToId' => true, - 'RemitToName' => true, - 'ClassId' => true, - 'ClassName' => true, - 'SalesRepId' => true, - 'SalesRepName' => true, - 'SalesTaxCodeId' => true, - 'SalesTaxCodeName' => true, - 'PONumber' => true, - 'FOB' => true, - 'ShipDate' => true, - 'SubTotalAmt' => true, - 'TaxId' => true, - 'TaxName' => true, - 'TaxGroupId' => true, - 'TaxGroupName' => true, - 'TaxRate' => true, - 'TaxAmt' => true, - 'ToBePrinted' => true, - 'ToBeEmailed' => true, + 'CustomerId' => true, + 'CustomerName' => true, + 'JobId' => true, + 'JobName' => true, + 'RemitToId' => true, + 'RemitToName' => true, + 'ClassId' => true, + 'ClassName' => true, + 'SalesRepId' => true, + 'SalesRepName' => true, + 'SalesTaxCodeId' => true, + 'SalesTaxCodeName' => true, + 'PONumber' => true, + 'FOB' => true, + 'ShipDate' => true, + 'SubTotalAmt' => true, + 'TaxId' => true, + 'TaxName' => true, + 'TaxGroupId' => true, + 'TaxGroupName' => true, + 'TaxRate' => true, + 'TaxAmt' => true, + 'ToBePrinted' => true, + 'ToBeEmailed' => true, 'Custom' => true, - 'PaymentMethodId' => true, - 'PaymentMethodName' => true, + 'PaymentMethodId' => true, + 'PaymentMethodName' => true, 'TotalAmt' => true, // This needs to be almost last for Payments (or at least after PaymentMethodName) 'BillAddr' => true, // Not part of SalesReceipt - 'ShipAddr' => true, + 'ShipAddr' => true, 'BillEmail' => true, - 'ShipMethodId' => true, - 'ShipMethodName' => true, + 'ShipMethodId' => true, + 'ShipMethodName' => true, 'Balance' => true, // Not part of SalesReceipt - 'DepositToAccountId' => true, - 'DepositToAccountName' => true, - 'Detail' => true, - 'DiscountAmt' => true, - 'DiscountRate' => true, - 'DiscountAccountId' => true, - 'DiscountAccountName' => true, - 'DiscountTaxable' => true, + 'DepositToAccountId' => true, + 'DepositToAccountName' => true, + 'Detail' => true, + 'DiscountAmt' => true, + 'DiscountRate' => true, + 'DiscountAccountId' => true, + 'DiscountAccountName' => true, + 'DiscountTaxable' => true, ); } } diff --git a/QuickBooks/IPP/Object/IncomeAccountRef.php b/QuickBooks/IPP/Object/IncomeAccountRef.php index 53562e22..69df9b6b 100644 --- a/QuickBooks/IPP/Object/IncomeAccountRef.php +++ b/QuickBooks/IPP/Object/IncomeAccountRef.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_IncomeAccountRef extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Invoice.php b/QuickBooks/IPP/Object/Invoice.php index 25af99f5..276d52a7 100755 --- a/QuickBooks/IPP/Object/Invoice.php +++ b/QuickBooks/IPP/Object/Invoice.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Invoice extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/InvoiceMessage.php b/QuickBooks/IPP/Object/InvoiceMessage.php index 0cdff5d6..82451ec1 100644 --- a/QuickBooks/IPP/Object/InvoiceMessage.php +++ b/QuickBooks/IPP/Object/InvoiceMessage.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_InvoiceMessage extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Item.php b/QuickBooks/IPP/Object/Item.php index 28b8036a..ff28c906 100644 --- a/QuickBooks/IPP/Object/Item.php +++ b/QuickBooks/IPP/Object/Item.php @@ -7,32 +7,32 @@ class QuickBooks_IPP_Object_Item extends QuickBooks_IPP_Object protected function _order() { return array( - 'Id' => true, - 'MetaData' => true, - 'ItemParentId' => true, - 'Unique Identifier' => true, - 'ItemParentName' => true, - 'Name' => true, - 'Desc' => true, - 'Taxable' => true, - 'Active' => true, - 'UnitPrice' => true, - 'Type' => true, - 'UOMId' => true, - 'UOMAbbrv' => true, - 'IncomeAccountRef' => true, - 'PurchaseDesc' => true, - 'PurchaseCost' => true, - 'ExpenseAccountRef' => true, - 'COGSAccountRef' => true, - 'AssetAccountRef' => true, - 'PrefVendorRef' => true, - 'AvgCost' => true, - 'QtyOnHand' => true, - 'QtyOnPurchaseOrder' => true, - 'QtyOnSalesOrder' => true, - 'ReorderPoint' => true, - 'ManPartNum' => true, + 'Id' => true, + 'MetaData' => true, + 'ItemParentId' => true, + 'Unique Identifier' => true, + 'ItemParentName' => true, + 'Name' => true, + 'Desc' => true, + 'Taxable' => true, + 'Active' => true, + 'UnitPrice' => true, + 'Type' => true, + 'UOMId' => true, + 'UOMAbbrv' => true, + 'IncomeAccountRef' => true, + 'PurchaseDesc' => true, + 'PurchaseCost' => true, + 'ExpenseAccountRef' => true, + 'COGSAccountRef' => true, + 'AssetAccountRef' => true, + 'PrefVendorRef' => true, + 'AvgCost' => true, + 'QtyOnHand' => true, + 'QtyOnPurchaseOrder' => true, + 'QtyOnSalesOrder' => true, + 'ReorderPoint' => true, + 'ManPartNum' => true, ); } } diff --git a/QuickBooks/IPP/Object/ItemBasedExpenseLineDetail.php b/QuickBooks/IPP/Object/ItemBasedExpenseLineDetail.php index 91cdc419..5d8db6e4 100644 --- a/QuickBooks/IPP/Object/ItemBasedExpenseLineDetail.php +++ b/QuickBooks/IPP/Object/ItemBasedExpenseLineDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_ItemBasedExpenseLineDetail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/ItemGroupDetail.php b/QuickBooks/IPP/Object/ItemGroupDetail.php index b0075c33..ce329f36 100644 --- a/QuickBooks/IPP/Object/ItemGroupDetail.php +++ b/QuickBooks/IPP/Object/ItemGroupDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_ItemGroupDetail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/ItemReceipt.php b/QuickBooks/IPP/Object/ItemReceipt.php index 77696c47..0f7f2967 100644 --- a/QuickBooks/IPP/Object/ItemReceipt.php +++ b/QuickBooks/IPP/Object/ItemReceipt.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_ItemReceipt extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Job.php b/QuickBooks/IPP/Object/Job.php index efcd44ad..fb751d1b 100644 --- a/QuickBooks/IPP/Object/Job.php +++ b/QuickBooks/IPP/Object/Job.php @@ -7,56 +7,56 @@ class QuickBooks_IPP_Object_Job extends QuickBooks_IPP_Object protected function _order() { return array( - 'Id' => true, - 'PartyReferenceId' => true, - 'TypeOf' => true, - 'Name' => true, - 'Address' => true, - 'Phone' => true, - 'Website' => true, - 'Email' => true, - 'Title' => true, - 'GivenName' => true, - 'MiddleName' => true, - 'FamilyName' => true, - 'Suffix' => true, - 'Gender' => true, - 'BirthDate' => true, - 'LegalName' => true, - 'DBAName' => true, - 'TaxIdentifier' => true, - 'Notes' => true, - 'Active' => true, - 'ShowAs' => true, - 'CustomerTypeId' => true, - 'CustomerTypeName' => true, - 'SalesTermId' => true, - 'SalesTermName' => true, - 'SalesRepId' => true, - 'SalesRepName' => true, - 'SalesTaxCodeId' => true, - 'SalesTaxCodeName' => true, - 'TaxId' => true, - 'TaxName' => true, - 'TaxGroupId' => true, - 'TaxGroupName' => true, - 'PaymentMethodId' => true, - 'PaymentMethodName' => true, - 'PriceLevelId' => true, - 'PriceLevelName' => true, - 'OpenBalance' => true, - 'OpenBalanceDate' => true, - 'OpenBalanceWithJobs' => true, - 'CreditLimit' => true, - 'AcctNum' => true, - 'OverDueBalance' => true, - 'TotalRevenue' => true, - 'TotalExpense' => true, - 'JobInfo' => true, - 'CustomerId' => true, - 'CustomerName' => true, - 'JobParentId' => true, - 'JobParentName' => true, - ); + 'Id' => true, + 'PartyReferenceId' => true, + 'TypeOf' => true, + 'Name' => true, + 'Address' => true, + 'Phone' => true, + 'Website' => true, + 'Email' => true, + 'Title' => true, + 'GivenName' => true, + 'MiddleName' => true, + 'FamilyName' => true, + 'Suffix' => true, + 'Gender' => true, + 'BirthDate' => true, + 'LegalName' => true, + 'DBAName' => true, + 'TaxIdentifier' => true, + 'Notes' => true, + 'Active' => true, + 'ShowAs' => true, + 'CustomerTypeId' => true, + 'CustomerTypeName' => true, + 'SalesTermId' => true, + 'SalesTermName' => true, + 'SalesRepId' => true, + 'SalesRepName' => true, + 'SalesTaxCodeId' => true, + 'SalesTaxCodeName' => true, + 'TaxId' => true, + 'TaxName' => true, + 'TaxGroupId' => true, + 'TaxGroupName' => true, + 'PaymentMethodId' => true, + 'PaymentMethodName' => true, + 'PriceLevelId' => true, + 'PriceLevelName' => true, + 'OpenBalance' => true, + 'OpenBalanceDate' => true, + 'OpenBalanceWithJobs' => true, + 'CreditLimit' => true, + 'AcctNum' => true, + 'OverDueBalance' => true, + 'TotalRevenue' => true, + 'TotalExpense' => true, + 'JobInfo' => true, + 'CustomerId' => true, + 'CustomerName' => true, + 'JobParentId' => true, + 'JobParentName' => true, + ); } } diff --git a/QuickBooks/IPP/Object/JobInfo.php b/QuickBooks/IPP/Object/JobInfo.php index d12389d6..f427d006 100644 --- a/QuickBooks/IPP/Object/JobInfo.php +++ b/QuickBooks/IPP/Object/JobInfo.php @@ -7,13 +7,13 @@ class QuickBooks_IPP_Object_JobInfo extends QuickBooks_IPP_Object protected function _order() { return array( - 'Status' => true, - 'StartDate' => true, - 'ProjectedEndDate' => true, - 'EndDate' => true, - 'Description' => true, - 'JobTypeId' => true, - 'JobTypeName' => true, + 'Status' => true, + 'StartDate' => true, + 'ProjectedEndDate' => true, + 'EndDate' => true, + 'Description' => true, + 'JobTypeId' => true, + 'JobTypeName' => true, ); } } diff --git a/QuickBooks/IPP/Object/JournalEntry.php b/QuickBooks/IPP/Object/JournalEntry.php index 881dbe2d..3c589221 100644 --- a/QuickBooks/IPP/Object/JournalEntry.php +++ b/QuickBooks/IPP/Object/JournalEntry.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_JournalEntry extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/JournalEntryLineDetail.php b/QuickBooks/IPP/Object/JournalEntryLineDetail.php index 94665db2..05f74e65 100644 --- a/QuickBooks/IPP/Object/JournalEntryLineDetail.php +++ b/QuickBooks/IPP/Object/JournalEntryLineDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_JournalEntryLineDetail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/LegalAddr.php b/QuickBooks/IPP/Object/LegalAddr.php index de898ac8..26e101dd 100644 --- a/QuickBooks/IPP/Object/LegalAddr.php +++ b/QuickBooks/IPP/Object/LegalAddr.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_LegalAddr extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/LegalAddress.php b/QuickBooks/IPP/Object/LegalAddress.php index 98476f24..78a88958 100755 --- a/QuickBooks/IPP/Object/LegalAddress.php +++ b/QuickBooks/IPP/Object/LegalAddress.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_LegalAddress extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Line.php b/QuickBooks/IPP/Object/Line.php index 81c66911..c7ecc10d 100755 --- a/QuickBooks/IPP/Object/Line.php +++ b/QuickBooks/IPP/Object/Line.php @@ -9,52 +9,52 @@ public function setQuantity($quantity) { return $this->set('Qty', (float) $quantity); } - + public function getQuantity() { return $this->get('Qty'); } - + public function setDescription($description) { return $this->set('Desc', $description); } - + public function getDescription() { return $this->get('Desc'); } */ - + protected function _order() { return array( - 'Id' => true, - 'Desc' => true, - 'GroupMember' => true, - 'Amount' => true, - 'ClassId' => true, - 'ClassName' => true, - 'Taxable' => true, - 'ItemId' => true, - 'ItemName' => true, - 'ItemType' => true, - 'UnitPrice' => true, - 'RatePercent' => true, - 'PriceLevelId' => true, - 'PriceLevelName' => true, - 'Qty' => true, - 'UOMId' => true, - 'UOMAbbrv' => true, - 'OverrideItemAccountId' => true, - 'OverrideItemAccountName' => true, - 'DiscountId' => true, - 'DiscountName' => true, - 'SalesTaxCodeId' => true, - 'SalesTaxCodeName' => true, - 'Custom1' => true, - 'Custom2' => true, - 'ServiceDate' => true, + 'Id' => true, + 'Desc' => true, + 'GroupMember' => true, + 'Amount' => true, + 'ClassId' => true, + 'ClassName' => true, + 'Taxable' => true, + 'ItemId' => true, + 'ItemName' => true, + 'ItemType' => true, + 'UnitPrice' => true, + 'RatePercent' => true, + 'PriceLevelId' => true, + 'PriceLevelName' => true, + 'Qty' => true, + 'UOMId' => true, + 'UOMAbbrv' => true, + 'OverrideItemAccountId' => true, + 'OverrideItemAccountName' => true, + 'DiscountId' => true, + 'DiscountName' => true, + 'SalesTaxCodeId' => true, + 'SalesTaxCodeName' => true, + 'Custom1' => true, + 'Custom2' => true, + 'ServiceDate' => true, ); } } diff --git a/QuickBooks/IPP/Object/LineEx.php b/QuickBooks/IPP/Object/LineEx.php index 631f7fa1..122d6b9a 100755 --- a/QuickBooks/IPP/Object/LineEx.php +++ b/QuickBooks/IPP/Object/LineEx.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_LineEx extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/MarkupInfo.php b/QuickBooks/IPP/Object/MarkupInfo.php index 7c2bb3eb..51123e73 100644 --- a/QuickBooks/IPP/Object/MarkupInfo.php +++ b/QuickBooks/IPP/Object/MarkupInfo.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_MarkupInfo extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/MetaData.php b/QuickBooks/IPP/Object/MetaData.php index 80fdbac2..6965d0ed 100644 --- a/QuickBooks/IPP/Object/MetaData.php +++ b/QuickBooks/IPP/Object/MetaData.php @@ -8,16 +8,16 @@ public function getLastUpdatedTime($format = 'Y-m-d H:i:s') { return $this->getDateType('LastUpdatedTime', $format); } - + protected function _order() { return array( - 'CreatedBy' => true, - 'CreatedById' => true, - 'CreateTime' => true, - 'LastModifiedBy' => true, - 'LastModifiedById' => true, - 'LastUpdatedTime' => true, + 'CreatedBy' => true, + 'CreatedById' => true, + 'CreateTime' => true, + 'LastModifiedBy' => true, + 'LastModifiedById' => true, + 'LastUpdatedTime' => true, ); } } diff --git a/QuickBooks/IPP/Object/Mobile.php b/QuickBooks/IPP/Object/Mobile.php index b81e3b43..d6e954de 100755 --- a/QuickBooks/IPP/Object/Mobile.php +++ b/QuickBooks/IPP/Object/Mobile.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Mobile extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/NameValue.php b/QuickBooks/IPP/Object/NameValue.php index d8df2972..50771340 100644 --- a/QuickBooks/IPP/Object/NameValue.php +++ b/QuickBooks/IPP/Object/NameValue.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_NameValue extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Notes.php b/QuickBooks/IPP/Object/Notes.php index 4b694bb3..42fc8ce9 100644 --- a/QuickBooks/IPP/Object/Notes.php +++ b/QuickBooks/IPP/Object/Notes.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Notes extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/OpenBalance.php b/QuickBooks/IPP/Object/OpenBalance.php index 90dd8cdb..d5f25915 100644 --- a/QuickBooks/IPP/Object/OpenBalance.php +++ b/QuickBooks/IPP/Object/OpenBalance.php @@ -7,8 +7,8 @@ class QuickBooks_IPP_Object_OpenBalance extends QuickBooks_IPP_Object protected function _order() { return array( - 'CurrencyCode' => true, - 'Amount' => true, + 'CurrencyCode' => true, + 'Amount' => true, ); } } diff --git a/QuickBooks/IPP/Object/OpenBalanceWithJobs.php b/QuickBooks/IPP/Object/OpenBalanceWithJobs.php index b23e6327..e7d493ab 100644 --- a/QuickBooks/IPP/Object/OpenBalanceWithJobs.php +++ b/QuickBooks/IPP/Object/OpenBalanceWithJobs.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_OpenBalanceWithJobs extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/OtherContactInfo.php b/QuickBooks/IPP/Object/OtherContactInfo.php index f6d13342..96a8fd80 100644 --- a/QuickBooks/IPP/Object/OtherContactInfo.php +++ b/QuickBooks/IPP/Object/OtherContactInfo.php @@ -3,7 +3,7 @@ QuickBooks_Loader::load('/QuickBooks/IPP/Object.php'); class QuickBooks_IPP_Object_OtherContactInfo extends QuickBooks_IPP_Object -{ +{ protected function _order() { return array(); diff --git a/QuickBooks/IPP/Object/OtherPrefs.php b/QuickBooks/IPP/Object/OtherPrefs.php index 7faab9c2..d09a0f7c 100644 --- a/QuickBooks/IPP/Object/OtherPrefs.php +++ b/QuickBooks/IPP/Object/OtherPrefs.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_OtherPrefs extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/POCustomField.php b/QuickBooks/IPP/Object/POCustomField.php index 5fc167c4..639ec92f 100644 --- a/QuickBooks/IPP/Object/POCustomField.php +++ b/QuickBooks/IPP/Object/POCustomField.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_POCustomField extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/PayeeAddr.php b/QuickBooks/IPP/Object/PayeeAddr.php index 1596d5db..ce395684 100755 --- a/QuickBooks/IPP/Object/PayeeAddr.php +++ b/QuickBooks/IPP/Object/PayeeAddr.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_PayeeAddr extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Payment.php b/QuickBooks/IPP/Object/Payment.php index 25a0e388..a182e786 100644 --- a/QuickBooks/IPP/Object/Payment.php +++ b/QuickBooks/IPP/Object/Payment.php @@ -7,19 +7,19 @@ class QuickBooks_IPP_Object_Payment extends QuickBooks_IPP_Object protected function _defaults() { return array( - //'TypeOf' => 'Person', + //'TypeOf' => 'Person', ); } - + protected function _order() { return array( - 'Id' => true, - 'SyncToken' => true, - 'MetaData' => true, - 'CustomField' => true, - 'Header' => true, - 'Line' => true, + 'Id' => true, + 'SyncToken' => true, + 'MetaData' => true, + 'CustomField' => true, + 'Header' => true, + 'Line' => true, ); } } diff --git a/QuickBooks/IPP/Object/PaymentMethod.php b/QuickBooks/IPP/Object/PaymentMethod.php index 380006f1..8aa1edf7 100644 --- a/QuickBooks/IPP/Object/PaymentMethod.php +++ b/QuickBooks/IPP/Object/PaymentMethod.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_PaymentMethod extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Phone.php b/QuickBooks/IPP/Object/Phone.php index d1f1955b..4ceb8894 100644 --- a/QuickBooks/IPP/Object/Phone.php +++ b/QuickBooks/IPP/Object/Phone.php @@ -7,20 +7,20 @@ class QuickBooks_IPP_Object_Phone extends QuickBooks_IPP_Object const DEVICETYPE_LANDLINE = 'LandLine'; const DEVICETYPE_MOBILE = 'Mobile'; const DEVICETYPE_FAX = 'Fax'; - + protected function _order() { return array( - 'Id' => true, - 'DeviceType' => true, - 'CountryCode' => true, - 'AreaCode' => true, - 'ExchangeCode' => true, - 'Extension' => true, - 'FreeFormNumber' => true, - 'PIN' => true, - 'Default' => true, - 'Tag' => true, + 'Id' => true, + 'DeviceType' => true, + 'CountryCode' => true, + 'AreaCode' => true, + 'ExchangeCode' => true, + 'Extension' => true, + 'FreeFormNumber' => true, + 'PIN' => true, + 'Default' => true, + 'Tag' => true, ); } } diff --git a/QuickBooks/IPP/Object/PrefVendorRef.php b/QuickBooks/IPP/Object/PrefVendorRef.php index 07c39172..2a29da1e 100644 --- a/QuickBooks/IPP/Object/PrefVendorRef.php +++ b/QuickBooks/IPP/Object/PrefVendorRef.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_PrefVendorRef extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Preferences.php b/QuickBooks/IPP/Object/Preferences.php index 0236e422..5f2705a1 100644 --- a/QuickBooks/IPP/Object/Preferences.php +++ b/QuickBooks/IPP/Object/Preferences.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Preferences extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/PrimaryAddr.php b/QuickBooks/IPP/Object/PrimaryAddr.php index 89c4d0f2..5d2aa80d 100644 --- a/QuickBooks/IPP/Object/PrimaryAddr.php +++ b/QuickBooks/IPP/Object/PrimaryAddr.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_PrimaryAddr extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/PrimaryEmailAddr.php b/QuickBooks/IPP/Object/PrimaryEmailAddr.php index b69967da..cbaac571 100755 --- a/QuickBooks/IPP/Object/PrimaryEmailAddr.php +++ b/QuickBooks/IPP/Object/PrimaryEmailAddr.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_PrimaryEmailAddr extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/PrimaryPhone.php b/QuickBooks/IPP/Object/PrimaryPhone.php index 6b78b6b0..ebe6d03d 100755 --- a/QuickBooks/IPP/Object/PrimaryPhone.php +++ b/QuickBooks/IPP/Object/PrimaryPhone.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_PrimaryPhone extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/ProductAndServicesPrefs.php b/QuickBooks/IPP/Object/ProductAndServicesPrefs.php index e39ff1fa..d5dead16 100644 --- a/QuickBooks/IPP/Object/ProductAndServicesPrefs.php +++ b/QuickBooks/IPP/Object/ProductAndServicesPrefs.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_ProductAndServicesPrefs extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Purchase.php b/QuickBooks/IPP/Object/Purchase.php index 20f757b7..2b20fc38 100755 --- a/QuickBooks/IPP/Object/Purchase.php +++ b/QuickBooks/IPP/Object/Purchase.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Purchase extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/PurchaseCost.php b/QuickBooks/IPP/Object/PurchaseCost.php index d4b4be53..195f3b61 100644 --- a/QuickBooks/IPP/Object/PurchaseCost.php +++ b/QuickBooks/IPP/Object/PurchaseCost.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_PurchaseCost extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/PurchaseEx.php b/QuickBooks/IPP/Object/PurchaseEx.php index d2bd860d..c1c28883 100644 --- a/QuickBooks/IPP/Object/PurchaseEx.php +++ b/QuickBooks/IPP/Object/PurchaseEx.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_PurchaseEx extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/PurchaseOrder.php b/QuickBooks/IPP/Object/PurchaseOrder.php index 48398203..9ede7a39 100755 --- a/QuickBooks/IPP/Object/PurchaseOrder.php +++ b/QuickBooks/IPP/Object/PurchaseOrder.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_PurchaseOrder extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/PurchaseTaxRateList.php b/QuickBooks/IPP/Object/PurchaseTaxRateList.php index cbfdc564..e5485e2d 100755 --- a/QuickBooks/IPP/Object/PurchaseTaxRateList.php +++ b/QuickBooks/IPP/Object/PurchaseTaxRateList.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_PurchaseTaxRateList extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/ReimbursableInfo.php b/QuickBooks/IPP/Object/ReimbursableInfo.php index d1f88904..2284aec5 100644 --- a/QuickBooks/IPP/Object/ReimbursableInfo.php +++ b/QuickBooks/IPP/Object/ReimbursableInfo.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_ReimbursableInfo extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/RemitToAddr.php b/QuickBooks/IPP/Object/RemitToAddr.php index d140f0cc..d0b23ccc 100644 --- a/QuickBooks/IPP/Object/RemitToAddr.php +++ b/QuickBooks/IPP/Object/RemitToAddr.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_RemitToAddr extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Report.php b/QuickBooks/IPP/Object/Report.php index 9dbbd415..a623d0eb 100755 --- a/QuickBooks/IPP/Object/Report.php +++ b/QuickBooks/IPP/Object/Report.php @@ -5,19 +5,19 @@ class QuickBooks_IPP_Object_Report extends QuickBooks_IPP_Object { protected $_report_name; - + public function __construct($name) { $this->_report_name = $name; parent::__construct(); } - + public function getRowCount() { $Data = $this->_data['Data'][0]; return $Data->getRowCount(); } - + public function getColumnCount() { return count($this->_data['ColDesc']); diff --git a/QuickBooks/IPP/Object/ReportPrefs.php b/QuickBooks/IPP/Object/ReportPrefs.php index 0c8477ee..c29f86ea 100644 --- a/QuickBooks/IPP/Object/ReportPrefs.php +++ b/QuickBooks/IPP/Object/ReportPrefs.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_ReportPrefs extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/SalesFormsPrefs.php b/QuickBooks/IPP/Object/SalesFormsPrefs.php index be6c6d64..d7d0889c 100644 --- a/QuickBooks/IPP/Object/SalesFormsPrefs.php +++ b/QuickBooks/IPP/Object/SalesFormsPrefs.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_SalesFormsPrefs extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/SalesItemLineDetail.php b/QuickBooks/IPP/Object/SalesItemLineDetail.php index cb58f2df..48d08c68 100755 --- a/QuickBooks/IPP/Object/SalesItemLineDetail.php +++ b/QuickBooks/IPP/Object/SalesItemLineDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_SalesItemLineDetail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/SalesOrder.php b/QuickBooks/IPP/Object/SalesOrder.php index 39405c1c..677d99e3 100644 --- a/QuickBooks/IPP/Object/SalesOrder.php +++ b/QuickBooks/IPP/Object/SalesOrder.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_SalesOrder extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/SalesReceipt.php b/QuickBooks/IPP/Object/SalesReceipt.php index 965ca3e3..9ec9d83f 100644 --- a/QuickBooks/IPP/Object/SalesReceipt.php +++ b/QuickBooks/IPP/Object/SalesReceipt.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_SalesReceipt extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/SalesReceiptMessage.php b/QuickBooks/IPP/Object/SalesReceiptMessage.php index ca07614d..108ac2b2 100644 --- a/QuickBooks/IPP/Object/SalesReceiptMessage.php +++ b/QuickBooks/IPP/Object/SalesReceiptMessage.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_SalesReceiptMessage extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/SalesRep.php b/QuickBooks/IPP/Object/SalesRep.php index c3ca7a24..dace5f3c 100755 --- a/QuickBooks/IPP/Object/SalesRep.php +++ b/QuickBooks/IPP/Object/SalesRep.php @@ -6,14 +6,14 @@ class QuickBooks_IPP_Object_SalesRep extends QuickBooks_IPP_Object { protected function _order() { - return array( - 'Id' => true, - 'MetaData' => true, - 'NameOf' => true, - 'Employee' => true, - 'Vendor' => true, - 'OtherName' => true, - 'Initials' => true, + return array( + 'Id' => true, + 'MetaData' => true, + 'NameOf' => true, + 'Employee' => true, + 'Vendor' => true, + 'OtherName' => true, + 'Initials' => true, ); } } diff --git a/QuickBooks/IPP/Object/SalesTax.php b/QuickBooks/IPP/Object/SalesTax.php index 3c7c6d11..7b8d0819 100755 --- a/QuickBooks/IPP/Object/SalesTax.php +++ b/QuickBooks/IPP/Object/SalesTax.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_SalesTax extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/SalesTaxCode.php b/QuickBooks/IPP/Object/SalesTaxCode.php index 7143eb24..64783f88 100755 --- a/QuickBooks/IPP/Object/SalesTaxCode.php +++ b/QuickBooks/IPP/Object/SalesTaxCode.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_SalesTaxCode extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/SalesTaxRateList.php b/QuickBooks/IPP/Object/SalesTaxRateList.php index 8e000296..28239fe2 100644 --- a/QuickBooks/IPP/Object/SalesTaxRateList.php +++ b/QuickBooks/IPP/Object/SalesTaxRateList.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_SalesTaxRateList extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/SalesTerm.php b/QuickBooks/IPP/Object/SalesTerm.php index f2ce11ed..71b527bd 100755 --- a/QuickBooks/IPP/Object/SalesTerm.php +++ b/QuickBooks/IPP/Object/SalesTerm.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_SalesTerm extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/ShipAddr.php b/QuickBooks/IPP/Object/ShipAddr.php index fa38eff8..16f4c7e2 100755 --- a/QuickBooks/IPP/Object/ShipAddr.php +++ b/QuickBooks/IPP/Object/ShipAddr.php @@ -8,29 +8,29 @@ public function setState($state) { return $this->setCountrySubDivisionCode($state); } - + public function getState() { return $this->getCountrySubDivisionCode(); } - + protected function _order() { return array( - 'Id' => true, - 'Line1' => true, - 'Line2' => true, - 'Line3' => true, - 'Line4' => true, - 'Line5' => true, - 'City' => true, - 'Country' => true, - 'CountrySubDivisionCode' => true, - 'PostalCode' => true, - 'PostalCodeSuffix' => true, - 'Default' => true, - 'Tag' => true, + 'Id' => true, + 'Line1' => true, + 'Line2' => true, + 'Line3' => true, + 'Line4' => true, + 'Line5' => true, + 'City' => true, + 'Country' => true, + 'CountrySubDivisionCode' => true, + 'PostalCode' => true, + 'PostalCodeSuffix' => true, + 'Default' => true, + 'Tag' => true, ); } - + } diff --git a/QuickBooks/IPP/Object/ShipMethod.php b/QuickBooks/IPP/Object/ShipMethod.php index ed8fb505..3814f1b2 100644 --- a/QuickBooks/IPP/Object/ShipMethod.php +++ b/QuickBooks/IPP/Object/ShipMethod.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_ShipMethod extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/StatementMessage.php b/QuickBooks/IPP/Object/StatementMessage.php index 78966336..09edcbcd 100644 --- a/QuickBooks/IPP/Object/StatementMessage.php +++ b/QuickBooks/IPP/Object/StatementMessage.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_StatementMessage extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/SubTotalLineDetail.php b/QuickBooks/IPP/Object/SubTotalLineDetail.php index a0c63593..69e00ef2 100644 --- a/QuickBooks/IPP/Object/SubTotalLineDetail.php +++ b/QuickBooks/IPP/Object/SubTotalLineDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_SubTotalLineDetail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/TaxAgency.php b/QuickBooks/IPP/Object/TaxAgency.php index 53b61c5a..1e004940 100644 --- a/QuickBooks/IPP/Object/TaxAgency.php +++ b/QuickBooks/IPP/Object/TaxAgency.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_TaxAgency extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/TaxCode.php b/QuickBooks/IPP/Object/TaxCode.php index b9d848c2..5cf3069f 100644 --- a/QuickBooks/IPP/Object/TaxCode.php +++ b/QuickBooks/IPP/Object/TaxCode.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_TaxCode extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/TaxLine.php b/QuickBooks/IPP/Object/TaxLine.php index 654dc84a..893f505f 100644 --- a/QuickBooks/IPP/Object/TaxLine.php +++ b/QuickBooks/IPP/Object/TaxLine.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_TaxLine extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/TaxLineDetail.php b/QuickBooks/IPP/Object/TaxLineDetail.php index 0d3a31e8..557626ed 100644 --- a/QuickBooks/IPP/Object/TaxLineDetail.php +++ b/QuickBooks/IPP/Object/TaxLineDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_TaxLineDetail extends QuickBooks_IPP_Object { - + } \ No newline at end of file diff --git a/QuickBooks/IPP/Object/TaxPrefs.php b/QuickBooks/IPP/Object/TaxPrefs.php index cb4831db..913f6fde 100644 --- a/QuickBooks/IPP/Object/TaxPrefs.php +++ b/QuickBooks/IPP/Object/TaxPrefs.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_TaxPrefs extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/TaxRate.php b/QuickBooks/IPP/Object/TaxRate.php index 85c53031..aa634d11 100755 --- a/QuickBooks/IPP/Object/TaxRate.php +++ b/QuickBooks/IPP/Object/TaxRate.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_TaxRate extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/TaxRateDetail.php b/QuickBooks/IPP/Object/TaxRateDetail.php index d2a9e005..6367cb34 100644 --- a/QuickBooks/IPP/Object/TaxRateDetail.php +++ b/QuickBooks/IPP/Object/TaxRateDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_TaxRateDetail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Telephone.php b/QuickBooks/IPP/Object/Telephone.php index b4268b6f..8eec8d79 100644 --- a/QuickBooks/IPP/Object/Telephone.php +++ b/QuickBooks/IPP/Object/Telephone.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Telephone extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Term.php b/QuickBooks/IPP/Object/Term.php index cd785568..ccecf728 100644 --- a/QuickBooks/IPP/Object/Term.php +++ b/QuickBooks/IPP/Object/Term.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_Term extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/TimeActivity.php b/QuickBooks/IPP/Object/TimeActivity.php index cd274a01..7ee0e757 100644 --- a/QuickBooks/IPP/Object/TimeActivity.php +++ b/QuickBooks/IPP/Object/TimeActivity.php @@ -9,60 +9,60 @@ protected function _defaults() return array( ); } - + protected function _order() { /* return array( - 'Id' => true, - 'SyncToken' => true, - 'MetaData' => true, - 'Synchronized' => true, - 'Draft' => true, - 'TxnDate' => true, - 'NameOf' => true, - 'Employee' => true, - 'CustomerId' => true, - 'JobId' => true, - 'ItemId' => true, - 'ItemType' => true, - 'PayItemId' => true, - 'BillableStatus' => true, - 'HourlyRate' => true, - 'Hours' => true, - 'Minutes' => true, - 'Seconds' => true, - 'StartTime' => true, - 'EndTime' => true, - 'Description' => true, + 'Id' => true, + 'SyncToken' => true, + 'MetaData' => true, + 'Synchronized' => true, + 'Draft' => true, + 'TxnDate' => true, + 'NameOf' => true, + 'Employee' => true, + 'CustomerId' => true, + 'JobId' => true, + 'ItemId' => true, + 'ItemType' => true, + 'PayItemId' => true, + 'BillableStatus' => true, + 'HourlyRate' => true, + 'Hours' => true, + 'Minutes' => true, + 'Seconds' => true, + 'StartTime' => true, + 'EndTime' => true, + 'Description' => true, ); */ return array( - 'Id' => true, - 'SyncToken' => true, - 'MetaData' => true, - 'Synchronized' => true, - 'Draft' => true, - 'TxnDate' => true, - 'NameOf' => true, - 'Employee' => true, - 'CustomerId' => true, + 'Id' => true, + 'SyncToken' => true, + 'MetaData' => true, + 'Synchronized' => true, + 'Draft' => true, + 'TxnDate' => true, + 'NameOf' => true, + 'Employee' => true, + 'CustomerId' => true, 'CustomerName' => true, // added CustomerName - 'JobId' => true, - 'ItemId' => true, + 'JobId' => true, + 'ItemId' => true, 'ItemName' => true, // added ItemName - 'ItemType' => true, + 'ItemType' => true, 'ClassId' => true, // added ClassId - 'PayItemId' => true, - 'BillableStatus' => true, - 'HourlyRate' => true, - 'Hours' => true, - 'Minutes' => true, - 'Seconds' => true, - 'StartTime' => true, - 'EndTime' => true, - 'Description' => true, + 'PayItemId' => true, + 'BillableStatus' => true, + 'HourlyRate' => true, + 'Hours' => true, + 'Minutes' => true, + 'Seconds' => true, + 'StartTime' => true, + 'EndTime' => true, + 'Description' => true, ); } } diff --git a/QuickBooks/IPP/Object/TimeTrackingPrefs.php b/QuickBooks/IPP/Object/TimeTrackingPrefs.php index 2d98388e..76edf5c2 100644 --- a/QuickBooks/IPP/Object/TimeTrackingPrefs.php +++ b/QuickBooks/IPP/Object/TimeTrackingPrefs.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_TimeTrackingPrefs extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/TxnTaxDetail.php b/QuickBooks/IPP/Object/TxnTaxDetail.php index 54e81359..6fd9d7ac 100755 --- a/QuickBooks/IPP/Object/TxnTaxDetail.php +++ b/QuickBooks/IPP/Object/TxnTaxDetail.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_TxnTaxDetail extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/UOM.php b/QuickBooks/IPP/Object/UOM.php index 92a0c294..0204ccb2 100644 --- a/QuickBooks/IPP/Object/UOM.php +++ b/QuickBooks/IPP/Object/UOM.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_UOM extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/UnitPrice.php b/QuickBooks/IPP/Object/UnitPrice.php index 077a85f0..56a60199 100644 --- a/QuickBooks/IPP/Object/UnitPrice.php +++ b/QuickBooks/IPP/Object/UnitPrice.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_UnitPrice extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/Vendor.php b/QuickBooks/IPP/Object/Vendor.php index 09839494..07eb4252 100755 --- a/QuickBooks/IPP/Object/Vendor.php +++ b/QuickBooks/IPP/Object/Vendor.php @@ -7,7 +7,7 @@ class QuickBooks_IPP_Object_Vendor extends QuickBooks_IPP_Object protected function _defaults() { return array( - 'TypeOf' => 'Person', + 'TypeOf' => 'Person', ); - } + } } diff --git a/QuickBooks/IPP/Object/VendorAddr.php b/QuickBooks/IPP/Object/VendorAddr.php index c2012f07..6b8621b8 100644 --- a/QuickBooks/IPP/Object/VendorAddr.php +++ b/QuickBooks/IPP/Object/VendorAddr.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_VendorAddr extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/VendorAndPurchasesPrefs.php b/QuickBooks/IPP/Object/VendorAndPurchasesPrefs.php index 8e0dee0e..c9a0c7f6 100644 --- a/QuickBooks/IPP/Object/VendorAndPurchasesPrefs.php +++ b/QuickBooks/IPP/Object/VendorAndPurchasesPrefs.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_VendorAndPurchasesPrefs extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/VendorCredit.php b/QuickBooks/IPP/Object/VendorCredit.php index 96b654a2..511a3268 100755 --- a/QuickBooks/IPP/Object/VendorCredit.php +++ b/QuickBooks/IPP/Object/VendorCredit.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_VendorCredit extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/WebAddr.php b/QuickBooks/IPP/Object/WebAddr.php index d6db9f5e..44ae615d 100755 --- a/QuickBooks/IPP/Object/WebAddr.php +++ b/QuickBooks/IPP/Object/WebAddr.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_WebAddr extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/WebSite.php b/QuickBooks/IPP/Object/WebSite.php index 561cae5e..2f27cb97 100755 --- a/QuickBooks/IPP/Object/WebSite.php +++ b/QuickBooks/IPP/Object/WebSite.php @@ -4,5 +4,5 @@ class QuickBooks_IPP_Object_WebSite extends QuickBooks_IPP_Object { - + } diff --git a/QuickBooks/IPP/Object/qboEntity.php b/QuickBooks/IPP/Object/qboEntity.php index 2fcbc89b..d0c73f99 100644 --- a/QuickBooks/IPP/Object/qboEntity.php +++ b/QuickBooks/IPP/Object/qboEntity.php @@ -7,9 +7,9 @@ class QuickBooks_IPP_Object_qboEntity extends QuickBooks_IPP_Object protected function _order() { return array( - 'qboId' => true, - 'qboEntityType' => true, - 'qboLastUpdatedTime' => true, + 'qboId' => true, + 'qboEntityType' => true, + 'qboLastUpdatedTime' => true, ); } } diff --git a/QuickBooks/IPP/Role.php b/QuickBooks/IPP/Role.php index 84f3de14..34c29b92 100755 --- a/QuickBooks/IPP/Role.php +++ b/QuickBooks/IPP/Role.php @@ -1,7 +1,7 @@ _roleid = $roleid; @@ -30,12 +30,12 @@ public function __construct($roleid, $name, $access_id, $access_name) $this->_access_id = $access_id; $this->_access_name = $access_name; } - + public function getRoleId() { return $this->_roleid; } - + public function getName() { return $this->_name; diff --git a/QuickBooks/IPP/Service.php b/QuickBooks/IPP/Service.php index 246adbb6..45251364 100755 --- a/QuickBooks/IPP/Service.php +++ b/QuickBooks/IPP/Service.php @@ -693,8 +693,8 @@ protected function _send($Context, $realmID, $resource, $ID) if ($IPP->errorCode() != QuickBooks_IPP::ERROR_OK) { $this->_setError( - $IPP->errorCode(), - $IPP->errorText(), + $IPP->errorCode(), + $IPP->errorText(), $IPP->errorDetail()); return false; diff --git a/QuickBooks/IPP/Service/Account.php b/QuickBooks/IPP/Service/Account.php index 5f274559..1c266303 100644 --- a/QuickBooks/IPP/Service/Account.php +++ b/QuickBooks/IPP/Service/Account.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Bill.php b/QuickBooks/IPP/Service/Bill.php index 1c755354..55dfd7b0 100644 --- a/QuickBooks/IPP/Service/Bill.php +++ b/QuickBooks/IPP/Service/Bill.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -36,7 +36,7 @@ public function delete($Context, $realmID, $IDType) { return parent::_delete($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_BILL, $IDType); } - + public function update($Context, $realm, $IDType, $Object) { return parent::_update($Context, $realm, QuickBooks_IPP_IDS::RESOURCE_BILL, $Object, $IDType); diff --git a/QuickBooks/IPP/Service/BillPayment.php b/QuickBooks/IPP/Service/BillPayment.php index c3ba87e2..5d349c9d 100755 --- a/QuickBooks/IPP/Service/BillPayment.php +++ b/QuickBooks/IPP/Service/BillPayment.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -25,18 +25,18 @@ public function findAll($Context, $realmID) $xml = null; return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_BILLPAYMENT, $xml); } - + /** - * - * - * + * + * + * */ public function findById($Context, $realmID, $ID, $domain = null) { $xml = null; return parent::_findById($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_BILLPAYMENT, $ID, $domain, $xml); } - + public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_BILLPAYMENT, $Object); diff --git a/QuickBooks/IPP/Service/BillPaymentCreditCard.php b/QuickBooks/IPP/Service/BillPaymentCreditCard.php index e10df430..b3490170 100755 --- a/QuickBooks/IPP/Service/BillPaymentCreditCard.php +++ b/QuickBooks/IPP/Service/BillPaymentCreditCard.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -26,7 +26,7 @@ public function findById($Context, $realmID, $IDType, $domain = null) $xml = null; return parent::_findById($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_BILLPAYMENTCREDITCARD, $IDType, $domain, $xml); } - + public function findAll($Context, $realmID) { $xml = null; diff --git a/QuickBooks/IPP/Service/ChangeDataCapture.php b/QuickBooks/IPP/Service/ChangeDataCapture.php index abd4d8f2..da5876e4 100755 --- a/QuickBooks/IPP/Service/ChangeDataCapture.php +++ b/QuickBooks/IPP/Service/ChangeDataCapture.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -25,5 +25,5 @@ public function cdc($Context, $realmID, $entities, $timestamp, $page = 1, $size { return parent::_cdc($Context, $realmID, $entities, $timestamp, $page, $size); } - + } \ No newline at end of file diff --git a/QuickBooks/IPP/Service/ChangeDataDeleted.php b/QuickBooks/IPP/Service/ChangeDataDeleted.php index 784a15c7..4c27fbe5 100644 --- a/QuickBooks/IPP/Service/ChangeDataDeleted.php +++ b/QuickBooks/IPP/Service/ChangeDataDeleted.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -25,5 +25,5 @@ public function findAll($Context, $realmID, $query = null, $page = 1, $size = 50 { return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_CHANGEDATADELETED, $query, null, $page, $size, ''); } - + } \ No newline at end of file diff --git a/QuickBooks/IPP/Service/Check.php b/QuickBooks/IPP/Service/Check.php index a213e341..dfab00e6 100755 --- a/QuickBooks/IPP/Service/Check.php +++ b/QuickBooks/IPP/Service/Check.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Class.php b/QuickBooks/IPP/Service/Class.php index 908bc1d1..1f79d5dd 100644 --- a/QuickBooks/IPP/Service/Class.php +++ b/QuickBooks/IPP/Service/Class.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -26,12 +26,12 @@ public function findAll($Context, $realmID) $xml = null; return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_CLASS, $xml); } - + /** - * Get a customer by ID - * - * @param QuickBooks_IPP_Context $Context - * @param string $realmID + * Get a customer by ID + * + * @param QuickBooks_IPP_Context $Context + * @param string $realmID * @param string $ID The ID of the customer (this expects an IdType, which includes the domain) * @return QuickBooks_IPP_Object_Customer The customer object */ @@ -40,7 +40,7 @@ public function findById($Context, $realmID, $IDType) $xml = null; return parent::_findById($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_CLASS, $IDType, $xml); } - + /** * Add a new class to QuickBooks * diff --git a/QuickBooks/IPP/Service/Company.php b/QuickBooks/IPP/Service/Company.php index fb4103f2..a2f7b1f6 100755 --- a/QuickBooks/IPP/Service/Company.php +++ b/QuickBooks/IPP/Service/Company.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -22,16 +22,16 @@ class QuickBooks_IPP_Service_Company extends QuickBooks_IPP_Service { /** - * Get a company by realmID - * - * @param QuickBooks_IPP_Context $Context - * @param string $realmID + * Get a company by realmID + * + * @param QuickBooks_IPP_Context $Context + * @param string $realmID * @return QuickBooks_IPP_Object_Customer The customer object */ public function findById($Context, $realmID) { $xml = null; - + // WATCH OUT! We pass in the realmID as ID value return parent::_findById($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_COMPANY, $realmID, $xml); } diff --git a/QuickBooks/IPP/Service/CompanyInfo.php b/QuickBooks/IPP/Service/CompanyInfo.php index 45bb1f2a..0f5d74a0 100755 --- a/QuickBooks/IPP/Service/CompanyInfo.php +++ b/QuickBooks/IPP/Service/CompanyInfo.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -22,10 +22,10 @@ class QuickBooks_IPP_Service_CompanyInfo extends QuickBooks_IPP_Service { /** - * Get a company by realmID - * - * @param QuickBooks_IPP_Context $Context - * @param string $realmID + * Get a company by realmID + * + * @param QuickBooks_IPP_Context $Context + * @param string $realmID * @return QuickBooks_IPP_Object_Customer The customer object */ public function query($Context, $realm, $query) diff --git a/QuickBooks/IPP/Service/CompanyMetaData.php b/QuickBooks/IPP/Service/CompanyMetaData.php index 90a894f1..bd7f8889 100755 --- a/QuickBooks/IPP/Service/CompanyMetaData.php +++ b/QuickBooks/IPP/Service/CompanyMetaData.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -22,16 +22,16 @@ class QuickBooks_IPP_Service_CompanyMetaData extends QuickBooks_IPP_Service { /** - * Get a company by realmID - * - * @param QuickBooks_IPP_Context $Context - * @param string $realmID + * Get a company by realmID + * + * @param QuickBooks_IPP_Context $Context + * @param string $realmID * @return QuickBooks_IPP_Object_Customer The customer object */ public function findById($Context, $realmID) { $xml = null; - + // WATCH OUT! We pass in the realmID as ID value return parent::_findById($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_COMPANYMETADATA, $realmID, $xml); } diff --git a/QuickBooks/IPP/Service/CreditMemo.php b/QuickBooks/IPP/Service/CreditMemo.php index 84f628a7..23a25d3d 100644 --- a/QuickBooks/IPP/Service/CreditMemo.php +++ b/QuickBooks/IPP/Service/CreditMemo.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -26,11 +26,11 @@ public function findAll($Context, $realmID) $xml = null; return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_CREDITMEMO, $xml); } - + public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_CREDITMEMO, $Object); - } + } public function query($Context, $realm, $query) { diff --git a/QuickBooks/IPP/Service/Customer.php b/QuickBooks/IPP/Service/Customer.php index 9a0008b1..30bc62f4 100755 --- a/QuickBooks/IPP/Service/Customer.php +++ b/QuickBooks/IPP/Service/Customer.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -27,10 +27,10 @@ public function findAll($Context, $realm, $query = null, $page = 1, $size = 50, } /** - * Get a customer by ID - * - * @param QuickBooks_IPP_Context $Context - * @param string $realm + * Get a customer by ID + * + * @param QuickBooks_IPP_Context $Context + * @param string $realm * @param string $ID The ID of the customer (this expects an IdType, which includes the domain) * @return QuickBooks_IPP_Object_Customer The customer object */ @@ -39,13 +39,13 @@ public function findById($Context, $realm, $IDType, $query = null) $xml = null; return parent::_findById($Context, $realm, QuickBooks_IPP_IDS::RESOURCE_CUSTOMER, $IDType, $xml, $query); } - + /** * Get a customer by name - * - * @param QuickBooks_IPP_Context $Context - * @param string $realm - * @param string $name The name of the customer + * + * @param QuickBooks_IPP_Context $Context + * @param string $realm + * @param string $name The name of the customer * @return QuickBooks_IPP_Object_Customer The customer object */ public function findByName($Context, $realm, $name) @@ -53,7 +53,7 @@ public function findByName($Context, $realm, $name) $xml = null; return parent::_findByName($Context, $realm, QuickBooks_IPP_IDS::RESOURCE_CUSTOMER, $name, $xml); } - + /** * Delete a customer from IDS/QuickBooks * @@ -63,12 +63,12 @@ public function delete($Context, $realm, $IDType) { return parent::_delete($Context, $realm, QuickBooks_IPP_IDS::RESOURCE_CUSTOMER, $IDType); } - + public function add($Context, $realm, $Object) { return parent::_add($Context, $realm, QuickBooks_IPP_IDS::RESOURCE_CUSTOMER, $Object); } - + public function update($Context, $realm, $IDType, $Object) { return parent::_update($Context, $realm, QuickBooks_IPP_IDS::RESOURCE_CUSTOMER, $Object, $IDType); diff --git a/QuickBooks/IPP/Service/Department.php b/QuickBooks/IPP/Service/Department.php index d0436779..18e6917c 100644 --- a/QuickBooks/IPP/Service/Department.php +++ b/QuickBooks/IPP/Service/Department.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ -// +// QuickBooks_Loader::load('/QuickBooks/IPP/Service.php'); class QuickBooks_IPP_Service_Discount extends QuickBooks_IPP_Service @@ -27,10 +27,10 @@ public function findAll($Context, $realmID, $query = null, $page = 1, $size = 50 } /** - * Get a customer by ID - * - * @param QuickBooks_IPP_Context $Context - * @param string $realmID + * Get a customer by ID + * + * @param QuickBooks_IPP_Context $Context + * @param string $realmID * @param string $ID The ID of the discount (this expects an IdType, which includes the domain) * @return QuickBooks_IPP_Object_Discount The Discount object */ diff --git a/QuickBooks/IPP/Service/Employee.php b/QuickBooks/IPP/Service/Employee.php index 571e6933..8387ae3d 100644 --- a/QuickBooks/IPP/Service/Employee.php +++ b/QuickBooks/IPP/Service/Employee.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -25,12 +25,12 @@ public function findAll($Context, $realmID, $query = null, $page = 1, $size = 50 { return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_EMPLOYEE, $query, null, $page, $size, '', $options); } - + /** - * Get an employee by ID - * - * @param QuickBooks_IPP_Context $Context - * @param string $realmID + * Get an employee by ID + * + * @param QuickBooks_IPP_Context $Context + * @param string $realmID * @param string $ID The ID of the customer (this expects an IdType, which includes the domain) * @return QuickBooks_IPP_Object_Employee The employee object */ @@ -39,7 +39,7 @@ public function findById($Context, $realmID, $ID) $xml = null; return parent::_findById($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_EMPLOYEE, $ID, null, $xml); } - + public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_EMPLOYEE, $Object); @@ -48,5 +48,5 @@ public function add($Context, $realmID, $Object) public function query($Context, $realm, $query) { return parent::_query($Context, $realm, $query); - } + } } \ No newline at end of file diff --git a/QuickBooks/IPP/Service/Entitlements.php b/QuickBooks/IPP/Service/Entitlements.php index 589dc574..619935bb 100755 --- a/QuickBooks/IPP/Service/Entitlements.php +++ b/QuickBooks/IPP/Service/Entitlements.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -34,5 +34,5 @@ public function entitlements($Context, $realmID) return $list['_e']; } - + } \ No newline at end of file diff --git a/QuickBooks/IPP/Service/Factory.php b/QuickBooks/IPP/Service/Factory.php index 24ca25ef..a8dfe16d 100755 --- a/QuickBooks/IPP/Service/Factory.php +++ b/QuickBooks/IPP/Service/Factory.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -22,7 +22,7 @@ class QuickBooks_IPP_Service_Factory public function newInstance($Context, $which) { $class = 'QuickBooks_IPP_Service_' . $which; - + return new $class($Context->IPP()); } } \ No newline at end of file diff --git a/QuickBooks/IPP/Service/Invoice.php b/QuickBooks/IPP/Service/Invoice.php index 1ab615d3..3e982af3 100644 --- a/QuickBooks/IPP/Service/Invoice.php +++ b/QuickBooks/IPP/Service/Invoice.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -25,12 +25,12 @@ public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_INVOICE, $Object); } - + public function update($Context, $realmID, $IDType, $Object) { return parent::_update($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_INVOICE, $Object, $IDType); } - + public function query($Context, $realm, $query) { return parent::_query($Context, $realm, $query); diff --git a/QuickBooks/IPP/Service/Item.php b/QuickBooks/IPP/Service/Item.php index 822a4c59..d8216bed 100644 --- a/QuickBooks/IPP/Service/Item.php +++ b/QuickBooks/IPP/Service/Item.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -25,7 +25,7 @@ public function findAll($Context, $realmID, $query = null, $page = 1, $size = 50 { return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_ITEM, $query, null, $page, $size, '', $options); } - + public function findById($Context, $realmID, $ID) { $xml = null; @@ -33,7 +33,7 @@ public function findById($Context, $realmID, $ID) } /** - * Find an item by name + * Find an item by name * * @param unknown_type $Context * @param unknown_type $realmID @@ -42,13 +42,13 @@ public function findById($Context, $realmID, $ID) public function findByName($Context, $realmID, $name) { $IPP = $Context->IPP(); - + if ($IPP->flavor() == QuickBooks_IPP_IDS::FLAVOR_DESKTOP) { for ($i = 0; $i < 999; $i++) { $list = $this->findAll($Context, $realmID, $name, $i, 50); - + foreach ($list as $Item) { if (strtolower($Item->getName()) == strtolower($name)) @@ -57,7 +57,7 @@ public function findByName($Context, $realmID, $name) } } } - + return false; } else @@ -65,8 +65,8 @@ public function findByName($Context, $realmID, $name) $xml = null; return parent::_findByName($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_ITEM, $name, $xml); } - } - + } + public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_ITEM, $Object); @@ -76,7 +76,7 @@ public function update($Context, $realm, $IDType, $Object) { return parent::_update($Context, $realm, QuickBooks_IPP_IDS::RESOURCE_ITEM, $Object, $IDType); } - + public function delete($Context, $realmID, $IDType) { return parent::_delete($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_ITEM, $IDType); diff --git a/QuickBooks/IPP/Service/ItemConsolidated.php b/QuickBooks/IPP/Service/ItemConsolidated.php index 38b7aed7..dccbc637 100644 --- a/QuickBooks/IPP/Service/ItemConsolidated.php +++ b/QuickBooks/IPP/Service/ItemConsolidated.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -27,10 +27,10 @@ public function findAll($Context, $realmID, $query = null, $page = 1, $size = 50 } /** - * Get an item by ID - * - * @param QuickBooks_IPP_Context $Context - * @param string $realmID + * Get an item by ID + * + * @param QuickBooks_IPP_Context $Context + * @param string $realmID * @param string $ID The ID of the item (this expects an IdType, which includes the domain) * @return QuickBooks_IPP_Object_ItemConsolidated The item object */ @@ -39,29 +39,29 @@ public function findById($Context, $realmID, $ID) $xml = null; return parent::_findById($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_ITEMCONSOLIDATED, $ID, $xml); } - + /* public function findByNameContains($Context, $realmID, $contains) { $IPP = $Context->IPP(); - + $resource = QuickBooks_IPP_IDS::RESOURCE_ITEMCONSOLIDATED; - + $xml = ''; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '<' . $resource . 'Query xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.intuit.com/sb/cdm/' . $IPP->version() . '">' . QUICKBOOKS_CRLF; $xml .= ' ' . QuickBooks_XML::encode($contains) . '' . QUICKBOOKS_CRLF; $xml .= ''; - + return parent::_findAll($Context, $realmID, $resource, $xml); } */ - + /** * Get an item by name - * - * @param QuickBooks_IPP_Context $Context - * @param string $realmID + * + * @param QuickBooks_IPP_Context $Context + * @param string $realmID * @param string $name The name of the item * @return QuickBooks_IPP_Object_ItemConsolidated The customer object */ @@ -69,7 +69,7 @@ public function findByNameContains($Context, $realmID, $contains) public function findByName($Context, $realmID, $name) { $list = $this->findByNameContains($Context, $realmID, $name); - + foreach ($list as $Item) { if (strtolower($Item->getName()) == strtolower($name)) @@ -77,16 +77,16 @@ public function findByName($Context, $realmID, $name) return $Item; } } - + return false; } */ - + public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_ITEMCONSOLIDATED, $Object); } - + public function delete($Context, $realmID, $IDType) { return parent::_delete($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_ITEMCONSOLIDATED, $IDType); diff --git a/QuickBooks/IPP/Service/ItemReceipt.php b/QuickBooks/IPP/Service/ItemReceipt.php index d7a70146..cbb6a7ba 100644 --- a/QuickBooks/IPP/Service/ItemReceipt.php +++ b/QuickBooks/IPP/Service/ItemReceipt.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Job.php b/QuickBooks/IPP/Service/Job.php index d76e35ca..5c5b9386 100644 --- a/QuickBooks/IPP/Service/Job.php +++ b/QuickBooks/IPP/Service/Job.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/JournalEntry.php b/QuickBooks/IPP/Service/JournalEntry.php index 074637d7..f5797a7b 100644 --- a/QuickBooks/IPP/Service/JournalEntry.php +++ b/QuickBooks/IPP/Service/JournalEntry.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -36,7 +36,7 @@ public function add($Context, $realm, $Object) { return parent::_add($Context, $realm, QuickBooks_IPP_IDS::RESOURCE_JOURNALENTRY, $Object); } - + public function delete($Context, $realmID, $IDType) { return parent::_delete($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_JOURNALENTRY, $IDType); diff --git a/QuickBooks/IPP/Service/Payment.php b/QuickBooks/IPP/Service/Payment.php index e48f6619..b30555d5 100644 --- a/QuickBooks/IPP/Service/Payment.php +++ b/QuickBooks/IPP/Service/Payment.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/PaymentMethod.php b/QuickBooks/IPP/Service/PaymentMethod.php index ef8d553c..79c27a8b 100644 --- a/QuickBooks/IPP/Service/PaymentMethod.php +++ b/QuickBooks/IPP/Service/PaymentMethod.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/PayrollItem.php b/QuickBooks/IPP/Service/PayrollItem.php index afcda230..f9ee59c1 100644 --- a/QuickBooks/IPP/Service/PayrollItem.php +++ b/QuickBooks/IPP/Service/PayrollItem.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -25,17 +25,17 @@ public function findAll($Context, $realmID, $query = null, $page = 1, $size = 50 { return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_PAYROLLITEM, $query, null, $page, $size, '', $options); } - + public function findById($Context, $realmID, $ID) { $xml = null; return parent::_findById($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_PAYROLLITEM, $ID, $xml); } - + public function findByName($Context, $realmID, $name) { $list = $this->findAll($Context, $realmID, $name); - + foreach ($list as $Item) { if (strtolower($Item->getName()) == strtolower($name)) @@ -43,15 +43,15 @@ public function findByName($Context, $realmID, $name) return $Item; } } - + return false; } - + public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_PAYROLLITEM, $Object); } - + public function delete($Context, $realmID, $IDType) { return parent::_delete($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_PAYROLLITEM, $IDType); diff --git a/QuickBooks/IPP/Service/Preferences.php b/QuickBooks/IPP/Service/Preferences.php index 99e9912f..dc2da582 100755 --- a/QuickBooks/IPP/Service/Preferences.php +++ b/QuickBooks/IPP/Service/Preferences.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -22,10 +22,10 @@ class QuickBooks_IPP_Service_Preferences extends QuickBooks_IPP_Service { /** - * Get a company by realmID - * - * @param QuickBooks_IPP_Context $Context - * @param string $realmID + * Get a company by realmID + * + * @param QuickBooks_IPP_Context $Context + * @param string $realmID * @return QuickBooks_IPP_Object_Customer The customer object */ public function query($Context, $realm, $query) diff --git a/QuickBooks/IPP/Service/Purchase.php b/QuickBooks/IPP/Service/Purchase.php index 42ae7408..fc9b73d7 100755 --- a/QuickBooks/IPP/Service/Purchase.php +++ b/QuickBooks/IPP/Service/Purchase.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -30,7 +30,7 @@ public function update($Context, $realmID, $IDType, $Object) { return parent::_update($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_PURCHASE, $Object, $IDType); } - + public function query($Context, $realm, $query) { return parent::_query($Context, $realm, $query); diff --git a/QuickBooks/IPP/Service/PurchaseOrder.php b/QuickBooks/IPP/Service/PurchaseOrder.php index 00bcfaf3..5dd8613e 100755 --- a/QuickBooks/IPP/Service/PurchaseOrder.php +++ b/QuickBooks/IPP/Service/PurchaseOrder.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -26,7 +26,7 @@ public function findAll($Context, $realmID) $xml = null; return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_PURCHASEORDER, $xml); } - + public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_PURCHASEORDER, $Object); @@ -36,7 +36,7 @@ public function update($Context, $realmID, $IDType, $Object) { return parent::_update($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_PURCHASEORDER, $Object, $IDType); } - + public function query($Context, $realm, $query) { return parent::_query($Context, $realm, $query); diff --git a/QuickBooks/IPP/Service/Report.php b/QuickBooks/IPP/Service/Report.php index b74b14bc..d9d86455 100755 --- a/QuickBooks/IPP/Service/Report.php +++ b/QuickBooks/IPP/Service/Report.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -21,5 +21,5 @@ class QuickBooks_IPP_Service_Report extends QuickBooks_IPP_Service { - + } \ No newline at end of file diff --git a/QuickBooks/IPP/Service/Report/AccountBalances.php b/QuickBooks/IPP/Service/Report/AccountBalances.php index 26fd2793..e173601d 100755 --- a/QuickBooks/IPP/Service/Report/AccountBalances.php +++ b/QuickBooks/IPP/Service/Report/AccountBalances.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Report/BalanceSheet.php b/QuickBooks/IPP/Service/Report/BalanceSheet.php index 218dd0df..997cc4dd 100755 --- a/QuickBooks/IPP/Service/Report/BalanceSheet.php +++ b/QuickBooks/IPP/Service/Report/BalanceSheet.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Report/BalanceSheetStd.php b/QuickBooks/IPP/Service/Report/BalanceSheetStd.php index 8a60963f..1d0b55af 100755 --- a/QuickBooks/IPP/Service/Report/BalanceSheetStd.php +++ b/QuickBooks/IPP/Service/Report/BalanceSheetStd.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Report/CustomersWhoOweMe.php b/QuickBooks/IPP/Service/Report/CustomersWhoOweMe.php index f1b7ccc3..65b98e89 100755 --- a/QuickBooks/IPP/Service/Report/CustomersWhoOweMe.php +++ b/QuickBooks/IPP/Service/Report/CustomersWhoOweMe.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Report/IncomeBreakdown.php b/QuickBooks/IPP/Service/Report/IncomeBreakdown.php index 449fd181..8a895972 100755 --- a/QuickBooks/IPP/Service/Report/IncomeBreakdown.php +++ b/QuickBooks/IPP/Service/Report/IncomeBreakdown.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Report/ProfitAndLoss.php b/QuickBooks/IPP/Service/Report/ProfitAndLoss.php index 0bfb0ae0..d633f174 100755 --- a/QuickBooks/IPP/Service/Report/ProfitAndLoss.php +++ b/QuickBooks/IPP/Service/Report/ProfitAndLoss.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Report/SalesSummary.php b/QuickBooks/IPP/Service/Report/SalesSummary.php index 2f01b463..b286510d 100755 --- a/QuickBooks/IPP/Service/Report/SalesSummary.php +++ b/QuickBooks/IPP/Service/Report/SalesSummary.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Report/TopCustomersBySales.php b/QuickBooks/IPP/Service/Report/TopCustomersBySales.php index 3d0925ca..231106e3 100755 --- a/QuickBooks/IPP/Service/Report/TopCustomersBySales.php +++ b/QuickBooks/IPP/Service/Report/TopCustomersBySales.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/SalesOrder.php b/QuickBooks/IPP/Service/SalesOrder.php index 25023190..36bfe658 100644 --- a/QuickBooks/IPP/Service/SalesOrder.php +++ b/QuickBooks/IPP/Service/SalesOrder.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -25,18 +25,18 @@ public function findAll($Context, $realmID, $query = null, $page = 1, $size = 50 { return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_SALESORDER, $query, null, $page, $size); } - + /** - * - * - * + * + * + * */ public function findById($Context, $realmID, $ID, $domain = null) { $xml = null; return parent::_findById($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_SALESORDER, $ID, $domain, $xml); } - + public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_SALESORDER, $Object); diff --git a/QuickBooks/IPP/Service/SalesReceipt.php b/QuickBooks/IPP/Service/SalesReceipt.php index 845bdbb5..67b599c8 100755 --- a/QuickBooks/IPP/Service/SalesReceipt.php +++ b/QuickBooks/IPP/Service/SalesReceipt.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -25,7 +25,7 @@ public function update($Context, $realmID, $IDType, $Object) { return parent::_update($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_SALESRECEIPT, $Object, $IDType); } - + /** * Add a new sales receipt to IDS/QuickBooks * @@ -37,7 +37,7 @@ public function update($Context, $realmID, $IDType, $Object) public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_SALESRECEIPT, $Object); - } + } public function query($Context, $realm, $query) { diff --git a/QuickBooks/IPP/Service/SalesRep.php b/QuickBooks/IPP/Service/SalesRep.php index eb3ceddb..ead452f8 100755 --- a/QuickBooks/IPP/Service/SalesRep.php +++ b/QuickBooks/IPP/Service/SalesRep.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/SalesTax.php b/QuickBooks/IPP/Service/SalesTax.php index 988b00c6..86752f18 100755 --- a/QuickBooks/IPP/Service/SalesTax.php +++ b/QuickBooks/IPP/Service/SalesTax.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/SalesTaxCode.php b/QuickBooks/IPP/Service/SalesTaxCode.php index f61f550f..313d1699 100755 --- a/QuickBooks/IPP/Service/SalesTaxCode.php +++ b/QuickBooks/IPP/Service/SalesTaxCode.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/SalesTerm.php b/QuickBooks/IPP/Service/SalesTerm.php index 143f2050..05ceab8a 100755 --- a/QuickBooks/IPP/Service/SalesTerm.php +++ b/QuickBooks/IPP/Service/SalesTerm.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/ShipMethod.php b/QuickBooks/IPP/Service/ShipMethod.php index 8cbbeb27..c36c4983 100644 --- a/QuickBooks/IPP/Service/ShipMethod.php +++ b/QuickBooks/IPP/Service/ShipMethod.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -25,11 +25,11 @@ public function findAll($Context, $realmID, $query = null, $page = 1, $size = 50 { return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_SHIPMETHOD, $query, null, $page, $size); } - + public function map($Context, $realmID) { $list = $this->findAll($Context, $realmID); - + return parent::_map($list, 'Id', 'Name'); } } \ No newline at end of file diff --git a/QuickBooks/IPP/Service/SyncStatus.php b/QuickBooks/IPP/Service/SyncStatus.php index 40553dcd..af1348ba 100755 --- a/QuickBooks/IPP/Service/SyncStatus.php +++ b/QuickBooks/IPP/Service/SyncStatus.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -24,5 +24,5 @@ class QuickBooks_IPP_Service_SyncStatus extends QuickBooks_IPP_Service public function status($Context, $realm, $resource, $IDType) { return parent::_syncStatus($Context, $realm, $resource, $IDType); - } + } } \ No newline at end of file diff --git a/QuickBooks/IPP/Service/TaxAgency.php b/QuickBooks/IPP/Service/TaxAgency.php index 37f63fba..4878376c 100644 --- a/QuickBooks/IPP/Service/TaxAgency.php +++ b/QuickBooks/IPP/Service/TaxAgency.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/TaxCode.php b/QuickBooks/IPP/Service/TaxCode.php index 0ce7788f..51cc9113 100755 --- a/QuickBooks/IPP/Service/TaxCode.php +++ b/QuickBooks/IPP/Service/TaxCode.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/TaxRate.php b/QuickBooks/IPP/Service/TaxRate.php index b7030df7..dfaa17df 100755 --- a/QuickBooks/IPP/Service/TaxRate.php +++ b/QuickBooks/IPP/Service/TaxRate.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Term.php b/QuickBooks/IPP/Service/Term.php index db5bd8fd..542f5569 100755 --- a/QuickBooks/IPP/Service/Term.php +++ b/QuickBooks/IPP/Service/Term.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/TimeActivity.php b/QuickBooks/IPP/Service/TimeActivity.php index eeb70057..6d89fce8 100755 --- a/QuickBooks/IPP/Service/TimeActivity.php +++ b/QuickBooks/IPP/Service/TimeActivity.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -38,7 +38,7 @@ public function query($Context, $realm, $query) { return parent::_query($Context, $realm, $query); } - + /** * Delete a timeactivity from IDS/QuickBooks * @@ -48,12 +48,12 @@ public function delete($Context, $realmID, $IDType) { return parent::_delete($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_TIMEACTIVITY, $IDType); } - + public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_TIMEACTIVITY, $Object); } - + public function update($Context, $realmID, $IDType, $Object) { return parent::_update($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_TIMEACTIVITY, $Object, $IDType); diff --git a/QuickBooks/IPP/Service/UOM.php b/QuickBooks/IPP/Service/UOM.php index d4d24ad5..e88e1d0a 100755 --- a/QuickBooks/IPP/Service/UOM.php +++ b/QuickBooks/IPP/Service/UOM.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ diff --git a/QuickBooks/IPP/Service/Vendor.php b/QuickBooks/IPP/Service/Vendor.php index ae31a2d1..5c3ec298 100755 --- a/QuickBooks/IPP/Service/Vendor.php +++ b/QuickBooks/IPP/Service/Vendor.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -25,11 +25,11 @@ public function findAll($Context, $realmID, $query = null, $page = 1, $size = 50 { return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_VENDOR, $query, null, $page, $size, '', $options); } - + public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_VENDOR, $Object); - } + } public function query($Context, $realm, $query) { diff --git a/QuickBooks/IPP/Service/VendorCredit.php b/QuickBooks/IPP/Service/VendorCredit.php index 0972e6f4..68e5ce93 100644 --- a/QuickBooks/IPP/Service/VendorCredit.php +++ b/QuickBooks/IPP/Service/VendorCredit.php @@ -1,17 +1,17 @@ - * + * * @package QuickBooks * @subpackage IPP */ @@ -28,11 +28,11 @@ public function findAll($Context, $realmID) return parent::_findAll($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_VENDORCREDIT, $xml); } */ - + public function add($Context, $realmID, $Object) { return parent::_add($Context, $realmID, QuickBooks_IPP_IDS::RESOURCE_VENDORCREDIT, $Object); - } + } public function update($Context, $realm, $IDType, $Object) { diff --git a/QuickBooks/IPP/User.php b/QuickBooks/IPP/User.php index 8ee50d93..69122010 100755 --- a/QuickBooks/IPP/User.php +++ b/QuickBooks/IPP/User.php @@ -1,7 +1,7 @@ _userid = $userid; @@ -47,52 +47,52 @@ public function __construct($userid, $email, $firstname, $lastname, $login, $scr $this->_external_auth = $external_auth; $this->_authid = $authid; } - + public function getUserId() { return $this->_userid; } - + public function getEmail() { return $this->_email; } - + public function getScreenName() { return $this->_screenname; } - + public function getFirstName() { return $this->_firstname; } - + public function getLastName() { return $this->_lastname; } - + public function getLogin() { return $this->_login; } - + public function isVerified() { return (boolean) $this->_is_verified; } - + public function isAnonymous() { return $this->_login == QuickBooks_IPP_User::ANONYMOUS; } - + public function getExternalAuth() { return $this->_external_auth; } - + public function getAuthId() { return $this->_authid; diff --git a/QuickBooks/Loader.php b/QuickBooks/Loader.php index facec174..0938eaa9 100755 --- a/QuickBooks/Loader.php +++ b/QuickBooks/Loader.php @@ -1,19 +1,19 @@ _driver = QuickBooks_Driver_Factory::create($dsn_or_Driver, $driver_options); } - } - + } + public function mark($mark_as, $object_or_action, $ID, $TxnID_or_ListID = null, $errnum = null, $errmsg = null, $mark_as_dequeued = true) { $Driver = $this->_driver; - + $object = QuickBooks_Utilities::actionToObject($object_or_action); - + $table_and_field = array(); - + // Convert to table and primary key, select qbsql id - QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); - - if (!empty($table_and_field[0]) and + QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); + + if (!empty($table_and_field[0]) and !empty($table_and_field[1])) { switch ($mark_as) { case QuickBooks_Map::MARK_ADD: - + $arr = array(); - + $where = array( array( QUICKBOOKS_DRIVER_SQL_FIELD_ID => $ID ), ); - + if ($TxnID_or_ListID) { $arr[$table_and_field[1]] = $TxnID_or_ListID; - + // Get the existing temporary ID $errnum = null; $errmsg = null; $existing = $Driver->fetch($Driver->query("SELECT " . $table_and_field[1] . " FROM " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " WHERE " . QUICKBOOKS_DRIVER_SQL_FIELD_ID . " = " . $ID, $errnum, $errmsg)); - + if (!$existing) { return false; } - + $existing_TxnID_or_ListID = $existing[$table_and_field[1]]; } - + $resync = true; $discov = true; - + if ($errnum) { $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_NUMBER] = $errnum; $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_MESSAGE] = $errmsg; - + // Don't mark it as synced/discovered if there was an error $resync = false; $discov = false; } - + /* if ($mark_as_dequeued) { $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ENQUEUE_TIME] = date('Y-m-d H:i:s'); } */ - + $Driver->update( - QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0], - $arr, - $where, - $resync, + QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0], + $arr, + $where, + $resync, $discov); - + if ($TxnID_or_ListID) { $Object = new QuickBooks_SQL_Object($table_and_field[0], '', array()); $Object->set($table_and_field[1], $TxnID_or_ListID); - + $action = QuickBooks_Utilities::objectToAdd($object_or_action); $this->_updateRelatives($table_and_field[0], $action, $Object, $existing_TxnID_or_ListID); } - + break; } } - + return false; } - + public function flat($map, $object_or_action, $ID) { $Driver = $this->_driver; - + if ($map == QuickBooks_Map::MAP_QBXML) { $object = QuickBooks_Utilities::actionToObject($object_or_action); - + $table_and_field = array(); - + // Convert to table and primary key, select qbsql id - QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); - - if (!empty($table_and_field[0]) and + QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); + + if (!empty($table_and_field[0]) and !empty($table_and_field[1])) { $errnum = null; $errmsg = null; return $Driver->fetch($Driver->query(" - SELECT - * - FROM + SELECT + * + FROM " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " - WHERE + WHERE " . QUICKBOOKS_DRIVER_SQL_FIELD_ID . " = " . (int) $ID, $errnum, $errmsg)); } } - + return null; } - + public function table($map, $object_or_action, $ID) { $Driver = $this->_driver; - + if ($map == QuickBooks_Map::MAP_QBXML) { $object = QuickBooks_Utilities::actionToObject($object_or_action); - + $table_and_field = array(); - + // Convert to table and primary key, select qbsql id - QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); - - if (!empty($table_and_field[0]) and + QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); + + if (!empty($table_and_field[0]) and !empty($table_and_field[1])) { return QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0]; } } - + return null; } - + public function adds($adds = array(), $mark_as_queued = true, $limit = null) { $Driver = $this->_driver; - + $NOW = date('Y-m-d H:i:s'); - + $sql_add = $adds; - + $list = array(); - + //$Driver->log('Input is: ' . print_r($adds, true)); - - // Check if any objects need to be pushed back to QuickBooks + + // Check if any objects need to be pushed back to QuickBooks foreach ($sql_add as $action => $priority) { $object = QuickBooks_Utilities::actionToObject($action); - + //$Driver->log('Action is: ' . $action . ', object is: ' . $object); - + $table_and_field = array(); - + // Convert to table and primary key, select qbsql id - QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); - + QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); + $Driver->log('Searching table: ' . print_r($table_and_field, true) . ' for ADDED records.'); - + //print_r($table_and_field); - - if (!empty($table_and_field[0]) and + + if (!empty($table_and_field[0]) and !empty($table_and_field[1])) { // For ADDs // - Do not sync if to_skip = 1 // - Do not sync if to_delete = 1 // - Do not sync if last_errnum is not empty @TODO Implement this - + switch ($table_and_field[0]) { case 'customer': @@ -214,33 +214,33 @@ public function adds($adds = array(), $mark_as_queued = true, $limit = null) default: $priority_reduce = null; } - + $extras = ''; if ($priority_reduce) { $extras = ', ' . $priority_reduce; } - + $sql = " - SELECT - " . QUICKBOOKS_DRIVER_SQL_FIELD_ID . ", + SELECT + " . QUICKBOOKS_DRIVER_SQL_FIELD_ID . ", " . QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_NUMBER . " " . $extras . " - FROM - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " - WHERE - " . QUICKBOOKS_DRIVER_SQL_FIELD_MODIFY . " IS NOT NULL AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_RESYNC . " IS NULL AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_SKIP . " != 1 AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_DELETE . " != 1 AND - " . QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED . " != 1 AND + FROM + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " + WHERE + " . QUICKBOOKS_DRIVER_SQL_FIELD_MODIFY . " IS NOT NULL AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_RESYNC . " IS NULL AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_SKIP . " != 1 AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_TO_DELETE . " != 1 AND + " . QUICKBOOKS_DRIVER_SQL_FIELD_FLAG_DELETED . " != 1 AND " . QUICKBOOKS_DRIVER_SQL_FIELD_MODIFY . " <= '" . $NOW . "' "; // " . QUICKBOOKS_DRIVER_SQL_FLAG_TO_VOID . " != 1 "; - + //$Driver->log($sql); - + $errnum = 0; $errmsg = ''; - + $count = 0; $res = $Driver->query($sql, $errnum, $errmsg); @@ -250,46 +250,46 @@ public function adds($adds = array(), $mark_as_queued = true, $limit = null) { continue; } - + if (!isset($list[$action])) { $list[$action] = array(); } - + $tmp_priority = $priority; - if ($priority_reduce and - isset($arr[$priority_reduce]) and + if ($priority_reduce and + isset($arr[$priority_reduce]) and !empty($arr[$priority_reduce])) { $tmp_priority = $priority - 1; } - + $list[$action][$arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID]] = $tmp_priority; - + $count++; - + if ($mark_as_queued) { // Make the record as having been ->enqueue()d $errnum = 0; $errmsg = ''; $Driver->query(" - UPDATE - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " - SET + UPDATE + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " + SET " . QUICKBOOKS_DRIVER_SQL_FIELD_ENQUEUE_TIME . " = '" . date('Y-m-d H:i:s') . "' - WHERE + WHERE " . QUICKBOOKS_DRIVER_SQL_FIELD_ID . " = " . $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID], $errnum, $errmsg); } - + /* if (count($list[$action]) >= $limit) { break; } */ - - if ($limit > 0 and + + if ($limit > 0 and $count >= $limit) { break 2; @@ -305,19 +305,19 @@ public function mods($mods = array(), $mark_as_queued = true) { return array(); } - + public function imports($imports = array()) { return array(); } - + public function queries($queries = array()) { return array(); } - + /** - * + * * @param unknown_type $table * @param unknown_type $Object * @param unknown_type $tmp_TxnID_or_ListID @@ -325,7 +325,7 @@ public function queries($queries = array()) protected function _updateRelatives($table, $action, $Object, $tmp_TxnID_or_ListID) { $Driver = $this->_driver; - + //print('updating relatives' . "\n"); // This should *ONLY* be used when we are ADDING records @@ -336,92 +336,92 @@ protected function _updateRelatives($table, $action, $Object, $tmp_TxnID_or_List //print('returning false because of action: ' . $action . "\n"); return false; } - + $map = array( - 'invoice' => array( + 'invoice' => array( 'key' => 'TxnID', 'relatives' => array( //'estimate_linkedtxn' => 'ToTxnID:Type=Invoice', //'salesorder_linkedtxn' => 'ToTxnID:Type=Invoice', 'receivepayment_appliedtotxn' => 'ToTxnID:TxnType=Invoice', // 'ToTxnID:Type=Invoice', - 'invoice_invoiceline' => 'Invoice_TxnID', // + 'invoice_invoiceline' => 'Invoice_TxnID', // 'dataext' => 'Entity_ListID:EntityType=Customer', // update the Entity_ListID where EntityType = 'Customer' (and the existing Entity_ListID is the old ListID) ) ), 'receivepayment' => array( - 'key' => 'TxnID', + 'key' => 'TxnID', 'relatives' => array( - 'receivepayment_appliedtotxn' => 'ReceivePayment_TxnID', - ), - ), + 'receivepayment_appliedtotxn' => 'ReceivePayment_TxnID', + ), + ), 'salesreceipt' => array( - 'key' => 'TxnID', + 'key' => 'TxnID', 'relatives' => array( - 'salesreceipt_salesreceiptline' => 'SalesReceipt_TxnID', - ), - ), + 'salesreceipt_salesreceiptline' => 'SalesReceipt_TxnID', + ), + ), 'salesorder' => array( - 'key' => 'TxnID', + 'key' => 'TxnID', 'relatives' => array( - 'salesorder_salesorderline' => 'SalesOrder_TxnID', - 'invoice_linkedtxn' => 'ToTxnID:TxnType=SalesOrder', - ), - ), + 'salesorder_salesorderline' => 'SalesOrder_TxnID', + 'invoice_linkedtxn' => 'ToTxnID:TxnType=SalesOrder', + ), + ), ); - + if (empty($map[$table])) { //print('returning false because of missing map: ' . $table . "\n"); return 0; } - + $TxnID_or_ListID = $Object->get($map[$table]['key']); foreach ($map[$table]['relatives'] as $relative_table => $relative_field) { $Driver->log('Now updating [' . $relative_table . '] for field [' . $relative_field . '] with value [' . $TxnID_or_ListID . ']', null, QUICKBOOKS_LOG_DEBUG); - //print('updating realtive: ' . $relative_table . "\n"); + //print('updating realtive: ' . $relative_table . "\n"); //$multipart = array( $relative_field => $extra['AddResponse_OldKey'] ); //$tmp = new QuickBooks_SQL_Object($relative_table, null); - + //@todo Make the Boolean TRUE value used in the QUICKBOOKS_DRIVER_SQL_FIELD_DELETED_FLAG field a constant, // in case the sql driver used uses something other than 1 and 0. //$tmp->set($relative_field, $TxnID_or_ListID); //$Driver->update(QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $relative_table, $tmp, array( $multipart ), false); - - // First, if the record has already been modified, then we need to - // make sure that it stays marked modified. Otherwise, we need to - // not let this get modified. So, query for the existing record. - + + // First, if the record has already been modified, then we need to + // make sure that it stays marked modified. Otherwise, we need to + // not let this get modified. So, query for the existing record. + $pos = false; $where = ''; if (false !== ($pos = strpos($relative_field, ':'))) { $tmp = substr($relative_field, $pos + 1); - + $relative_field = substr($relative_field, 0, $pos); - + $where = " AND " . str_replace('=', "='", $tmp) . "'"; - + //print('TMP IS: [' . $where . ']'); //exit; } - + $errnum = null; $errmsg = null; $sql = " - UPDATE - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $relative_table . " + UPDATE + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $relative_table . " SET - " . $relative_field . " = '%s' + " . $relative_field . " = '%s' WHERE " . $relative_field . " = '%s' " . $where; //print($sql . "\n\n"); $Driver->query($sql, $errnum, $errmsg, null, null, array( - $TxnID_or_ListID, + $TxnID_or_ListID, $tmp_TxnID_or_ListID)); } } diff --git a/QuickBooks/MerchantService.php b/QuickBooks/MerchantService.php index e9fb960a..f24aaa5b 100644 --- a/QuickBooks/MerchantService.php +++ b/QuickBooks/MerchantService.php @@ -1,22 +1,22 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage MerchantAccount */ @@ -61,130 +61,130 @@ class QuickBooks_MerchantService * @var integer */ const OK = QUICKBOOKS_ERROR_OK; - + /** * No error occurred * @var integer */ const ERROR_OK = QUICKBOOKS_ERROR_OK; - + /** * Indicates a generic internal error * @param integer */ const ERROR_INTERNAL = -1091; - + /** * Indicates an error when parsing an XML stream * @param integer */ const ERROR_XML = -1092; - + /** * Indicates an error establishing a socket connection to QBMS * @param integer */ const ERROR_SOCKET = -1093; - + /** * Indicates an error with a parameter passed to QBMS * @param integer */ const ERROR_PARAM = -1094; - + /** * Indicates an internal SSL-related error * @param integer */ const ERROR_SSL = -1095; - + /** - * - * + * + * */ const ERROR_HTTP = -1096; - + /** * Indicates that this transaction type is a 'Charge' (actually capture funds on a credit/debit card) * @var string */ const TYPE_CHARGE = 'Charge'; - + /** * Indicates that this transaction type is an 'Authorization' (hold funds, but don't actually charge the card) * @var string */ const TYPE_AUTHORIZE = 'Authorize'; - + /** * Capture the authorized funds on a credit card * @var string */ const TYPE_CAPTURE = 'Capture'; - + /** * Void a pending credit card authorization * @var string */ const TYPE_VOID = 'Void'; - + /** * Refund a credit card payment * @var string */ const TYPE_REFUND = 'Refund'; - + /** * Void or refund, depending on the transaction type/status * @var string */ const TYPE_VOIDORREFUND = 'VoidOrRefund'; - + const TYPE_WALLETADD = 'WalletAdd'; - + const TYPE_WALLETMOD = 'WalletMod'; - + const TYPE_WALLETDEL = 'WalletDelete'; - + const TYPE_WALLETQUERY = 'WalletQuery'; - + const TYPE_WALLETAUTHORIZE = 'WalletAuthorize'; - + const TYPE_WALLETCHARGE = 'WalletCharge'; - - + + const TYPE_CHECK_DEBIT = 'CheckDebit'; - + /** - * Constant for the NotAvailable response some fields return + * Constant for the NotAvailable response some fields return * @var string */ const NOTAVAILABLE = 'NotAvailable'; const AVS_NOTAVAILABLE = 'NotAvailable'; - + /** * Constant to indicate success * @var string */ const PASS = 'Pass'; const AVS_PASS = 'Pass'; - + const FAIL = 'Fail'; const AVS_FAIL = 'Fail'; - + const SEVERITY_INFO = 'INFO'; - + const SEVERITY_WARN = 'WARN'; - + const SEVERITY_ERROR = 'ERROR'; - + const MODE_INTERNET = 'Internet'; const MODE_TELEPHONE = 'Telephone'; const MODE_SIGNED = 'SignedAuthOnFile'; const MODE_MAILED = 'Mailed'; const MODE_WITHRECEIPT = 'InPersonWithReceipt'; const MODE_WITHOUTRECEIPT = 'InPersonNoReceipt'; - + /* 2000 Authentication failed -- Invalid login name or password / certificate / ticket @@ -196,45 +196,45 @@ class QuickBooks_MerchantService Unsupported signon version 2040 Internal err - + */ - + /** - * + * * Status OK, AVS Street and Zip fail, card security code fail - * - * IMPORTANT NOTE: This + * + * IMPORTANT NOTE: This */ const TEST_AVSZIPCVVFAIL = 'configid=10000_avscvdfail'; - + const TEST_COMMUNICATIONERROR = 'configid=10200_comm'; - + /* configid=value - Simply replace “value in the above line with one of the ConfigID values listeds in Table 6-2 - on page 44. + Simply replace “value in the above line with one of the ConfigID values listeds in Table 6-2 + on page 44. Table 6-2 ConfigID values and the errors they generate: - Error to be + Error to be Returned ConfigID value to insert Error Emulated - 10200 10200_comm An error occurred while communicating with the credit + 10200 10200_comm An error occurred while communicating with the credit card processing gateway. - 10201 10201_login An error occurred during login to the processing + 10201 10201_login An error occurred during login to the processing gateway. 10301 10301_ccinvalid This credit card account number is invalid. - 10400 10400_insufffunds This account does not have sufficient funds to process + 10400 10400_insufffunds This account does not have sufficient funds to process this transaction. - 10401 10401_decline The request to process this transaction has been - declined. - 10403 10403_acctinvalid The merchant account information submitted is not + 10401 10401_decline The request to process this transaction has been + declined. + 10403 10403_acctinvalid The merchant account information submitted is not recognized. - 10404 10404_referral This transaction has been declined, but can be - approved by obtaining a Voice Authorization code from + 10404 10404_referral This transaction has been declined, but can be + approved by obtaining a Voice Authorization code from the card issuer. - 10405 10405_void An error occurred while attempting to void this + 10405 10405_void An error occurred while attempting to void this transaction. - 10406 10406_capture An error occurred while processing the capture + 10406 10406_capture An error occurred while processing the capture transaction. - 10500 10500_general A general error occurred at the credit card processing + 10500 10500_general A general error occurred at the credit card processing gateway. */ @@ -243,64 +243,64 @@ class QuickBooks_MerchantService * @var string */ protected $_connection_ticket; - + /** * The application login used to log in * @var string */ protected $_application_login; - + //protected $_app_name; - + //protected $_app_url; - + //protected $_app_id; - + //protected $_auth_id; - + protected $_certificate; - + //protected $_logfile = '/tmp/curlerrors.txt'; - + protected $_driver; - + protected $_test; protected $_debug; protected $_masking; - + //Testing - https://webmerchantaccount.ptc.quickbooks.com/j/AppGateway //Debug - https://webmerchantaccount.quickbooks.com/j/diag/http - + protected $_live_gateway = 'https://webmerchantaccount.quickbooks.com/j/AppGateway'; protected $_test_gateway = 'https://webmerchantaccount.ptc.quickbooks.com/j/AppGateway'; - + protected $_ticket_session = ''; protected $_ticket_connection = ''; - + protected $_last_request; protected $_last_response; - + protected $_batch; - + protected $_errnum; protected $_errmsg; - + protected $_warnnum; protected $_warnmsg; - + /** - * - * - * + * + * + * */ - public function __construct($dsn, $certificate, $application_login = null, $connection_ticket = null) + public function __construct($dsn, $certificate, $application_login = null, $connection_ticket = null) { $this->_test = false; $this->_debug = false; - + // Mask credit card numbers $this->_masking = true; - + if ($dsn) { // @TODO Figure out a better way to set the logging level @@ -309,16 +309,16 @@ public function __construct($dsn, $certificate, $application_login = null, $conn $driver_loglevel = QUICKBOOKS_LOG_DEVELOP; $this->_driver = QuickBooks_Driver_Factory::create($dsn, $driver_options, $driver_hooks, $driver_loglevel); } - + if ($application_login) { $this->_application_login = $application_login; } else if ($this->_driver) { - + } - + if ($connection_ticket) { $this->_ticket_connection = $connection_ticket; @@ -327,66 +327,66 @@ public function __construct($dsn, $certificate, $application_login = null, $conn { //$this->_ticket_connection = $this->_driver-> } - - $this->_certificate = $certificate; - + + $this->_certificate = $certificate; + $this->_errnum = QuickBooks_MerchantService::ERROR_OK; $this->_errmsg = ''; - + $this->_warnnum = QuickBooks_MerchantService::ERROR_OK; - $this->_warnmsg = ''; + $this->_warnmsg = ''; } - + /** * Get the error number of the last error that occured - * + * * @return integer */ public function errorNumber() { return $this->_errnum; } - + /** * Get the error message of the last error that occured - * + * * @return string */ public function errorMessage() { return $this->_errmsg; } - + /** * Get the error number of the last error that occured - * + * * @return integer */ public function warningNumber() { return $this->_warnnum; } - + /** * Get the error message of the last error that occured - * + * * @return string */ public function warningMessage() { return $this->_warnmsg; - } - + } + /** * Get the last raw XML response that was received - * + * * @return string */ public function lastResponse() { return $this->_last_response; } - + /** * Get the last raw XML request that was sent * @@ -396,10 +396,10 @@ public function lastRequest() { return $this->_last_request; } - + /** * Set an error message - * + * * @param integer $errnum The error number/code * @param string $errmsg The text error message * @return void @@ -409,28 +409,28 @@ protected function _setError($errnum, $errmsg = '') $this->_errnum = $errnum; $this->_errmsg = $errmsg; } - + /** - * - * - * + * + * + * */ protected function _setWarning($warnnum, $warnmsg = '') { $this->_warnnum = $warnnum; $this->_warnmsg = $warnmsg; } - + /** * * @TODO Implement this */ public function addListener() { - + } - - /** + + /** * Set to TRUE to use the Intuit development environment (make sure you have registered your application as a DEVELOPMENT application!) * * @param boolean $yes_or_no @@ -440,7 +440,7 @@ public function useTestEnvironment($yes_or_no) { $this->_test = (boolean) $yes_or_no; } - + /** * Set to TRUE to use the Intuit live environment (make sure you have registered your application as a PRODUCTION application!) * @@ -451,10 +451,10 @@ public function useLiveEnvironment($yes_or_no) { $this->_test = ! (boolean) $yes_or_no; } - + /** * If masking is enabled (default) then credit card numbers, connection tickets, and session tickets will be masked when output or logged - * + * * @param boolean $yes_or_no * @return void */ @@ -462,13 +462,13 @@ public function useMasking($yes_or_no) { $this->_masking = (boolean) $yes_or_no; } - + /** * Turn debugging mode on or off - * - * Turning debugging mode on will result in a large amount of output being + * + * Turning debugging mode on will result in a large amount of output being * printed directly to stdout (the web browser or the console) - * + * * @param boolean $yes_or_no * @return void */ @@ -476,22 +476,22 @@ public function useDebugMode($yes_or_no) { $this->_debug = (boolean) $yes_or_no; } - + protected function _extractTagContents($tag, $data) { // SessionTicket - if (false !== strpos($data, '<' . $tag . '>') and + if (false !== strpos($data, '<' . $tag . '>') and false !== strpos($data, '')) { $data = strstr($data, '<' . $tag . '>'); $end = strpos($data, ''); - + return substr($data, strlen($tag) + 2, $end - (strlen($tag) + 2)); } - + return null; } - + protected function _extractAttribute($attr, $data, $which = 0) { if ($which == 1) @@ -499,19 +499,19 @@ protected function _extractAttribute($attr, $data, $which = 0) $spos = strpos($data, $attr . '="'); $data = substr($data, $spos + strlen($attr)); } - - if (false !== ($spos = strpos($data, $attr . '="')) and + + if (false !== ($spos = strpos($data, $attr . '="')) and false !== ($epos = strpos($data, '"', $spos + strlen($attr) + 2))) { //print('start: ' . $spos . "\n"); //print('end: ' . $epos . "\n"); - + return substr($data, $spos + strlen($attr) + 2, $epos - $spos - strlen($attr) - 2); } - + return ''; } - + /** * Sign on to the QBMS service to fetch a session ticket * @@ -520,17 +520,17 @@ protected function _extractAttribute($attr, $data, $which = 0) public function signOn() { $this->_setError(QuickBooks_MerchantService::ERROR_OK); - + $xml = ''; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; - + if ($this->_certificate) { $this->_log('Signing on a HOSTED QBMS application.', QUICKBOOKS_LOG_DEBUG); - + $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . date('Y-m-d\TH:i:s') . '' . QUICKBOOKS_CRLF; $xml .= ' ' . $this->_application_login . '' . QUICKBOOKS_CRLF; @@ -540,65 +540,65 @@ public function signOn() else { $this->_log('Signing on as a DESKTOP QBMS application.', QUICKBOOKS_LOG_DEBUG); - + $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . date('Y-m-d\TH:i:s') . '' . QUICKBOOKS_CRLF; $xml .= ' ' . $this->_application_login . '' . QUICKBOOKS_CRLF; $xml .= ' ' . $this->_ticket_connection . '' . QUICKBOOKS_CRLF; - $xml .= ' ' . QUICKBOOKS_CRLF; + $xml .= ' ' . QUICKBOOKS_CRLF; } - + $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - + $errnum = QuickBooks_MerchantService::ERROR_OK; $errmsg = ''; - + $response = $this->_request($xml, $errnum, $errmsg); - + if ($errnum) { $this->_setError(QuickBooks_MerchantService::ERROR_SOCKET, $errnum . ': ' . $errmsg); return false; } - + $code = $this->_extractAttribute('statusCode', $response); $message = $this->_extractAttribute('statusMessage', $response); $severity = $this->_extractAttribute('statusSeverity', $response); - + $this->_log('SignOn (initial) response: ' . $severity . '/' . $code . ': ' . $message, QUICKBOOKS_LOG_DEBUG); - + if ($code != QuickBooks_MerchantService::ERROR_OK) { $this->_setError($code, $message); return false; } - + if ($ticket = $this->_extractTagContents('SessionTicket', $response)) { $this->_ticket_session = $ticket; - + return true; } - + $this->_setError(QuickBooks_MerchantService::ERROR_INTERNAL, 'Could not locate SessionTicket in response.'); - + return false; } - + /** * Tell whether or not you have fetched a session ticket and signed on - * + * * @return boolean */ public function isSignedOn() { return strlen($this->_ticket_session) > 0; } - + /** * Create a unique transaction requestID from a set of parameters - * + * * @param string $type * @param object $Obj * @param float $amount @@ -612,13 +612,13 @@ protected function _transRequestID($type, $Obj, $amount, $force_new_transaction { $rand = mt_rand() . microtime(); } - + return md5($type . '-' . serialize($Obj) . '-' . $amount . '-' . $rand); } - + /** * Do a QuickBooks Merchant Service request and fetch the response - * + * * @param string $type * @param string $path * @param string $xml @@ -630,36 +630,36 @@ protected function _doQBMS($type, $path, $xml, $CreditCard = null, $Transaction $errnum = QuickBooks_MerchantService::ERROR_OK; $errmsg = ''; $response = $this->_request($xml, $errnum, $errmsg); - + if ($errnum) { $this->_setError(QuickBooks_MerchantService::ERROR_SOCKET, $errnum . ': ' . $errmsg); return false; } - + $signon_code = $this->_extractAttribute('statusCode', $response, 0); $signon_message = ''; $signon_severity = $this->_extractAttribute('statusSeverity', $response, 0); - + if ($signon_code != QuickBooks_MerchantService::ERROR_OK) { $signon_message = $this->_extractAttribute('statusMessage', $response, 0); } - + $this->_log('SignOn (with session) response: ' . $signon_severity . '/' . $signon_code . ': ' . $signon_message, QUICKBOOKS_LOG_DEBUG); - + if ($signon_code != QuickBooks_MerchantService::ERROR_OK) { $this->_setError($signon_code, $signon_message); return false; - } - + } + $qbms_code = $this->_extractAttribute('statusCode', $response, 1); $qbms_message = $this->_extractAttribute('statusMessage', $response, 0); // 0th instance, because QBMS doesn't return a statusMessage for the first sucessful request $qbms_severity = $this->_extractAttribute('statusSeverity', $response, 1); - + $this->_log('QBMS Response: ' . $qbms_severity . '/' . $qbms_code . ': ' . $qbms_message, QUICKBOOKS_LOG_DEBUG); - + //if ($qbms_code != QuickBooks_MerchantService::ERROR_OK) if (!$qbms_severity or $qbms_severity == QuickBooks_MerchantService::SEVERITY_ERROR) { @@ -681,8 +681,8 @@ protected function _doQBMS($type, $path, $xml, $CreditCard = null, $Transaction $this->_setError(QuickBooks_MerchantService::ERROR_INTERNAL, 'Could not locate a statusSeverity="..." attribute in returned stream: ' . $response); return false; } - - // Create a transaction result + + // Create a transaction result $xml_errnum = 0; $xml_errmsg = ''; if ($NewTransaction = $this->_parseResponse($type, $path, $response, $xml_errnum, $xml_errmsg)) @@ -690,13 +690,13 @@ protected function _doQBMS($type, $path, $xml, $CreditCard = null, $Transaction if ($CreditCard instanceof QuickBooks_MerchantService_CreditCard) { $NewTransaction->setExtraData( - $qbms_code, - $qbms_message, - $CreditCard->getNumber(true), - $CreditCard->getExpirationMonth(), - $CreditCard->getExpirationYear(), - $CreditCard->getName(), - $CreditCard->getAddress(), + $qbms_code, + $qbms_message, + $CreditCard->getNumber(true), + $CreditCard->getExpirationMonth(), + $CreditCard->getExpirationYear(), + $CreditCard->getName(), + $CreditCard->getAddress(), $CreditCard->getPostalCode()); } else if ($Transaction instanceof QuickBooks_MerchantService_Transaction) @@ -704,8 +704,8 @@ protected function _doQBMS($type, $path, $xml, $CreditCard = null, $Transaction $tmp = $Transaction->toArray(); $NewTransaction->setExtraData( - $qbms_code, - $qbms_message, + $qbms_code, + $qbms_message, $tmp['CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardNumber'], $tmp['CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationMonth'], $tmp['CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationYear'], @@ -718,14 +718,14 @@ protected function _doQBMS($type, $path, $xml, $CreditCard = null, $Transaction $NewTransaction->setAVSZip($tmp['CreditCardTxnInfo_CreditCardTxnResultInfo_AVSZip']); $NewTransaction->setCardSecurityCodeMatch($tmp['CreditCardTxnInfo_CreditCardTxnResultInfo_CardSecurityCodeMatch']); } - + return $NewTransaction; } - + $this->_setError(QuickBooks_MerchantService::ERROR_XML, $xml_errnum . ': ' . $xml_errmsg); - return false; + return false; } - + public function debitCheck($CheckingAccount, $amount, $payment_mode, $check_number = null, $comment = null, $is_recurring = false, $is_mobile = false, $force_new_transaction = true) { /* @@ -751,7 +751,7 @@ public function debitCheck($CheckingAccount, $amount, $payment_mode, $check_numb - + STRTYPE AMTTYPE @@ -773,19 +773,19 @@ public function debitCheck($CheckingAccount, $amount, $payment_mode, $check_numb $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('debitCheck()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - + $transRequestID = $this->_transRequestID(QuickBooks_MerchantService::TYPE_CHECK_DEBIT, $CheckingAccount, $amount, $force_new_transaction); - + $xml = ''; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -794,68 +794,68 @@ public function debitCheck($CheckingAccount, $amount, $payment_mode, $check_numb $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . $transRequestID . '' . QUICKBOOKS_CRLF; - + $xml .= $this->_createCheckingAccountXML($CheckingAccount, $check_number, $amount, $payment_mode); //STRTYPE - + if ($comment) { $xml .= ' ' . substr(QuickBooks_XML::encode($comment), 0, 500) . '' . QUICKBOOKS_CRLF; } $xml .= ' ' . QUICKBOOKS_CRLF; - $xml .= ' ' . QUICKBOOKS_CRLF; + $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - - return $this->_doQBMS(QuickBooks_MerchantService::TYPE_CHECK_DEBIT, 'QBMSXML/QBMSXMLMsgsRs/CustomerCheckDebitRs', $xml, $CheckingAccount); + + return $this->_doQBMS(QuickBooks_MerchantService::TYPE_CHECK_DEBIT, 'QBMSXML/QBMSXMLMsgsRs/CustomerCheckDebitRs', $xml, $CheckingAccount); } - + public function voidCheck() { - + } - + public function addCheckWallet() { - + } - + public function updateCheckWallet() { - + } - + public function deleteCheckWallet($customerID, $walletID) { - + } - + public function debitCheckWallet($customerID, $walletID, $amount) { - + } - + public function debit($Debit, $amount, $force_new_transaction = true) { - + } - + public function addWallet($customerID, $Card) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('addWallet()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - + /* STRTYPE @@ -866,19 +866,19 @@ public function addWallet($customerID, $Card) STRTYPE STRTYPE - + STRTYPE BOOLTYPE STRTYPE - */ - + */ + $include_address_data = true; $include_amounts = false; $include_card_number = true; $include_card_cvv = false; - + $xml = '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -890,17 +890,17 @@ public function addWallet($customerID, $Card) $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - + return $this->_doQBMS(QuickBooks_MerchantService::TYPE_WALLETADD, 'QBMSXML/QBMSXMLMsgsRs/CustomerCreditCardWalletAddRs', $xml); } - + /** * Update a wallet entry - * - * Note: This method *does not* allow you to update the *credit card - * number*. This is used only for updating the data associated with that + * + * Note: This method *does not* allow you to update the *credit card + * number*. This is used only for updating the data associated with that * particular credit card (address, expiration date, etc.) - * + * * @param string $walletID * @param mixed $customerID * @param QuickBooks_MerchantService_CreditCard $Card @@ -910,22 +910,22 @@ public function updateWallet($customerID, $walletID, $Card) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('updateWallet()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - + $include_address_data = true; $include_amounts = false; $include_card_number = false; $include_card_cvv = false; - + $xml = '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -938,25 +938,25 @@ public function updateWallet($customerID, $walletID, $Card) $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - + return $this->_doQBMS(QuickBooks_MerchantService::TYPE_WALLETMOD, 'QBMSXML/QBMSXMLMsgsRs/CustomerCreditCardWalletModRs', $xml); } - + public function deleteWallet($customerID, $walletID) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('deleteWallet()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - + $xml = '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -968,37 +968,37 @@ public function deleteWallet($customerID, $walletID) $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - + return $this->_doQBMS(QuickBooks_MerchantService::TYPE_WALLETDEL, 'QBMSXML/QBMSXMLMsgsRs/CustomerCreditCardWalletDelRs', $xml); } - + public function authorizeWallet($customerID, $walletID, $amount, $salestax = null, $comment = null, $cvv = null, $is_ecommerce = true, $is_recurring = false, $is_mobile = false, $force_new_transaction = true) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('authorizeWallet()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - - // Error checking + + // Error checking if (!is_numeric($amount)) { $this->_setError(QuickBooks_MerchantService::ERROR_PARAM, 'authorizeWallet() expects second parameter to be a float, got: ' . print_r($amount, true)); return false; } - + // Get the Card from the wallet so we can send the data to QuickBooks $Card = $this->getWallet($customerID, $walletID); - + $transRequestID = $this->_transRequestID(QuickBooks_MerchantService::TYPE_WALLETAUTHORIZE, null, $amount, $force_new_transaction); - + $xml = ''; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -1009,50 +1009,50 @@ public function authorizeWallet($customerID, $walletID, $amount, $salestax = nul $xml .= ' ' . $transRequestID . '' . QUICKBOOKS_CRLF; $xml .= ' ' . $walletID . '' . QUICKBOOKS_CRLF; $xml .= ' ' . QuickBooks_XML::encode($customerID) . '' . QUICKBOOKS_CRLF; - + // _createCreditCardXML($Card, $amount, $salestax, $is_card_present, $is_ecommerce, $is_recurring, $include_address_data = true, $include_amounts = true, $include_card_number = true, $include_card_cvv = true, $include_card_dates = true $xml .= $this->_createCreditCardXML(null, $amount, $salestax, false, $is_ecommerce, $is_recurring, $is_mobile, false, true, false, true, false); - + if ($cvv) { $xml .= ' ' . $cvv . '' . QUICKBOOKS_CRLF; } - + //STRTYPE - + if ($comment) { $xml .= ' ' . substr(QuickBooks_XML::encode($comment), 0, 500) . '' . QUICKBOOKS_CRLF; } - + $xml .= ' ' . QUICKBOOKS_CRLF; - $xml .= ' ' . QUICKBOOKS_CRLF; + $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - // We set $type to AUTHORIZE because this really is an authorization, + // We set $type to AUTHORIZE because this really is an authorization, // and this $type gets output to the Transaction object and is view // and checkable by the end-user, and possibly sent to QuickBooks. $type = QuickBooks_MerchantService::TYPE_AUTHORIZE; - + return $this->_doQBMS($type, 'QBMSXML/QBMSXMLMsgsRs/CustomerCreditCardWalletAuthRs', $xml, $Card); } - + public function chargeWallet($customerID, $walletID, $amount, $salestax = null, $comment = null, $cvv = null, $is_ecommerce = true, $is_recurring = false, $is_mobile = false, $force_new_transaction = true) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('chargeWallet()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - - // Error checking + + // Error checking if (!is_numeric($amount)) { $this->_setError(QuickBooks_MerchantService::ERROR_PARAM, 'authorizeCharge() expects second parameter to be a float, got: ' . print_r($amount, true)); @@ -1061,9 +1061,9 @@ public function chargeWallet($customerID, $walletID, $amount, $salestax = null, // Get the Card from the wallet so we can send the data to QuickBooks $Card = $this->getWallet($customerID, $walletID); - + $transRequestID = $this->_transRequestID(QuickBooks_MerchantService::TYPE_WALLETCHARGE, $Card, $amount, $force_new_transaction); - + $xml = ''; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -1074,49 +1074,49 @@ public function chargeWallet($customerID, $walletID, $amount, $salestax = null, $xml .= ' ' . $transRequestID . '' . QUICKBOOKS_CRLF; $xml .= ' ' . $walletID . '' . QUICKBOOKS_CRLF; $xml .= ' ' . QuickBooks_XML::encode($customerID) . '' . QUICKBOOKS_CRLF; - + // _createCreditCardXML($Card, $amount, $salestax, $is_card_present, $is_ecommerce, $is_recurring, $include_address_data = true, $include_amounts = true, $include_card_number = true, $include_card_cvv = true, $include_card_dates = true $xml .= $this->_createCreditCardXML(null, $amount, $salestax, false, $is_ecommerce, $is_recurring, $is_mobile, false, true, false, true, false); - + if ($cvv) { $xml .= ' ' . $cvv . '' . QUICKBOOKS_CRLF; - } - + } + //STRTYPE - + if ($comment) { $xml .= ' ' . substr(QuickBooks_XML::encode($comment), 0, 500) . '' . QUICKBOOKS_CRLF; } - + $xml .= ' ' . QUICKBOOKS_CRLF; - $xml .= ' ' . QUICKBOOKS_CRLF; - $xml .= '' . QUICKBOOKS_CRLF; - - // We set $type to CHARGE because this really is an authorization, and - // this $type gets output to the Transaction object and is view and - // checkable by the end-user, and possibly sent to QuickBooks. + $xml .= ' ' . QUICKBOOKS_CRLF; + $xml .= '' . QUICKBOOKS_CRLF; + + // We set $type to CHARGE because this really is an authorization, and + // this $type gets output to the Transaction object and is view and + // checkable by the end-user, and possibly sent to QuickBooks. $type = QuickBooks_MerchantService::TYPE_CHARGE; - + return $this->_doQBMS($type, 'QBMSXML/QBMSXMLMsgsRs/CustomerCreditCardWalletChargeRs', $xml, $Card); } - + public function getWallet($customerID, $walletID) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('getWallet()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - + $xml = '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -1128,23 +1128,23 @@ public function getWallet($customerID, $walletID) $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - + return $this->_doQBMS(QuickBooks_MerchantService::TYPE_WALLETQUERY, 'QBMSXML/QBMSXMLMsgsRs/CustomerWalletQueryRs', $xml); } - + /** - * - * + * + * */ public function authorize($Card, $amount, $salestax = null, $comment = null, $is_card_present = false, $is_ecommerce = true, $is_recurring = false, $is_mobile = false, $force_new_transaction = true) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('authorize()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; @@ -1157,15 +1157,15 @@ public function authorize($Card, $amount, $salestax = null, $comment = null, $is $this->_setError(QuickBooks_MerchantService::ERROR_PARAM, 'authorize() expects first parameter to be a Card object, got: ' . print_r($Card, true)); return false; } - + if (!is_numeric($amount)) { $this->_setError(QuickBooks_MerchantService::ERROR_PARAM, 'authorize() expects second parameter to be a float, got: ' . print_r($amount, true)); return false; } - + $transRequestID = $this->_transRequestID(QuickBooks_MerchantService::TYPE_AUTHORIZE, $Card, $amount, $force_new_transaction); - + $xml = '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -1177,44 +1177,44 @@ public function authorize($Card, $amount, $salestax = null, $comment = null, $is $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - + return $this->_doQBMS(QuickBooks_MerchantService::TYPE_AUTHORIZE, 'QBMSXML/QBMSXMLMsgsRs/CustomerCreditCardAuthRs', $xml, $Card); } - + protected function _createSessionXML() { $xml = ''; - + $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . date('Y-m-d\TH:i:s') . '' . QUICKBOOKS_CRLF; $xml .= ' ' . $this->_ticket_session . '' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; - + return $xml; } - + protected function _parseResponse($type, $path, $xml, &$errnum, &$errmsg) { static $look_trans = array( - 'CreditCardTransID' => null, - 'AuthorizationCode' => null, + 'CreditCardTransID' => null, + 'AuthorizationCode' => null, 'AVSStreet' => null, - 'AVSZip' => null, - 'CardSecurityCodeMatch' => null, - 'ClientTransID' => null, - 'MerchantAccountNumber' => null, - 'ReconBatchID' => null, + 'AVSZip' => null, + 'CardSecurityCodeMatch' => null, + 'ClientTransID' => null, + 'MerchantAccountNumber' => null, + 'ReconBatchID' => null, 'PaymentGroupingCode' => null, - 'PaymentStatus' => null, - 'TxnAuthorizationTime' => null, - 'TxnAuthorizationStamp' => null, - 'NetworkName' => null, - 'NetworkNumber' => null, - 'DebitCardTransID' => null, + 'PaymentStatus' => null, + 'TxnAuthorizationTime' => null, + 'TxnAuthorizationStamp' => null, + 'NetworkName' => null, + 'NetworkNumber' => null, + 'DebitCardTransID' => null, ); - + static $look_card = array( 'MaskedCreditCardNumber' => null, 'ExpirationMonth' => null, @@ -1223,13 +1223,13 @@ protected function _parseResponse($type, $path, $xml, &$errnum, &$errmsg) 'CreditCardAddress' => null, 'CreditCardPostalCode' => null, ); - + if ($type == QuickBooks_MerchantService::TYPE_WALLETADD) { // This was a wallet add, return the wallet ID return QuickBooks_XML::extractTagContents('WalletEntryID', $xml); } - else if ($type == QuickBooks_MerchantService::TYPE_WALLETMOD or + else if ($type == QuickBooks_MerchantService::TYPE_WALLETMOD or $type == QuickBooks_MerchantService::TYPE_WALLETDEL) { // These just return TRUE or FALSE based on error code @@ -1242,19 +1242,19 @@ protected function _parseResponse($type, $path, $xml, &$errnum, &$errmsg) if ($Doc = $Parser->parse($errnum, $errmsg)) { $Node = $Doc->getRoot(); - + $card = array(); foreach ($look_card as $node => $null) { $card[$node] = $Node->getChildDataAt($path . '/' . $node); } - + return new QuickBooks_MerchantService_CreditCard( - $card['NameOnCard'], - str_replace('*', 'x', $card['MaskedCreditCardNumber']), - $card['ExpirationYear'], - $card['ExpirationMonth'], - $card['CreditCardAddress'], + $card['NameOnCard'], + str_replace('*', 'x', $card['MaskedCreditCardNumber']), + $card['ExpirationYear'], + $card['ExpirationMonth'], + $card['CreditCardAddress'], $card['CreditCardPostalCode']); } } @@ -1264,56 +1264,56 @@ protected function _parseResponse($type, $path, $xml, &$errnum, &$errmsg) if ($Doc = $Parser->parse($errnum, $errmsg)) { $Node = $Doc->getRoot(); - + $trans = array(); foreach ($look_trans as $node => $null) { $trans[$node] = $Node->getChildDataAt($path . '/' . $node); } - - // + + // if ($trans['DebitCardTransID']) { $trans['CreditCardTransID'] = $trans['DebitCardTransID']; } - + return new QuickBooks_MerchantService_Transaction( - $type, - $trans['CreditCardTransID'], - $trans['ClientTransID'], - $trans['AuthorizationCode'], - $trans['MerchantAccountNumber'], - $trans['ReconBatchID'], - $trans['PaymentGroupingCode'], - $trans['PaymentStatus'], - $trans['TxnAuthorizationTime'], - $trans['TxnAuthorizationStamp'], - $trans['AVSStreet'], - $trans['AVSZip'], - $trans['CardSecurityCodeMatch'], - $trans['NetworkName'], + $type, + $trans['CreditCardTransID'], + $trans['ClientTransID'], + $trans['AuthorizationCode'], + $trans['MerchantAccountNumber'], + $trans['ReconBatchID'], + $trans['PaymentGroupingCode'], + $trans['PaymentStatus'], + $trans['TxnAuthorizationTime'], + $trans['TxnAuthorizationStamp'], + $trans['AVSStreet'], + $trans['AVSZip'], + $trans['CardSecurityCodeMatch'], + $trans['NetworkName'], $trans['NetworkNumber']); } } - + return false; } - + protected function _createCheckingAccountXML($CheckingAccount, $check_number, $amount, $payment_mode) { $xml = ''; - + if ($CheckingAccount) { $xml .= '' . QUICKBOOKS_CRLF; $xml .= "\t" . '' . $CheckingAccount->getRoutingNumber() . '' . QUICKBOOKS_CRLF; $xml .= "\t" . '' . $CheckingAccount->getAccountNumber() . '' . QUICKBOOKS_CRLF; - + if ($check_number) { $xml .= "\t" . '' . $check_number . '' . QUICKBOOKS_CRLF; } - + if ($CheckingAccount->getInfo() == QuickBooks_MerchantService_CheckingAccount::INFO_PERSONAL) { $xml .= "\t" . '' . QUICKBOOKS_CRLF; @@ -1332,10 +1332,10 @@ protected function _createCheckingAccountXML($CheckingAccount, $check_number, $a $xml .= "\t" . "\t" . '' . htmlspecialchars($CheckingAccount->getLastName(), ENT_QUOTES) . '' . QUICKBOOKS_CRLF; $xml .= "\t" . '' . QUICKBOOKS_CRLF; } - + $xml .= '' . QUICKBOOKS_CRLF; } - + $xml .= '' . $CheckingAccount->getPhone() . '' . QUICKBOOKS_CRLF; $xml .= '' . sprintf('%01.2f', $amount) . '' . QUICKBOOKS_CRLF; // @@ -1344,29 +1344,29 @@ protected function _createCheckingAccountXML($CheckingAccount, $check_number, $a // STRTYPE // STRTYPE // BOOLTYPE - + return $xml; } - + protected function _createCreditCardXML($Card, $amount, $salestax, $is_card_present, $is_ecommerce, $is_recurring, $is_mobile, $include_address_data = true, $include_amounts = true, $include_card_number = true, $include_card_cvv = true, $include_card_dates = true) { $xml = ''; - + $is_track2_data = false; - + if ($is_track2_data) { - //STRTYPE + //STRTYPE } else { - if ($Card and + if ($Card and $include_card_number) { $xml .= ' ' . $Card->getNumber() . '' . QUICKBOOKS_CRLF; } - - if ($Card and + + if ($Card and $include_card_dates) { $xml .= ' ' . $Card->getExpirationMonth() . '' . QUICKBOOKS_CRLF; @@ -1399,43 +1399,43 @@ protected function _createCreditCardXML($Card, $amount, $salestax, $is_card_pres { } - + //$xml .= ' BOOLTYPE' . QUICKBOOKS_CRLF; //$xml .= ' BOOLTYPE' . QUICKBOOKS_CRLF; //$xml .= ' BOOLTYPE' . QUICKBOOKS_CRLF; } - + if ($include_amounts) { $xml .= ' ' . sprintf('%01.2f', (float) $amount) . '' . QUICKBOOKS_CRLF; } - + if ($Card) { $xml .= ' ' . substr(htmlspecialchars($Card->getName()), 0, 30) . '' . QUICKBOOKS_CRLF; } - + if ($include_address_data) { $xml .= ' ' . substr(htmlspecialchars($Card->getAddress()), 0, 30) . '' . QUICKBOOKS_CRLF; $xml .= ' ' . substr(str_replace(array('-', ' ', '.'), '', $Card->getPostalCode()), 0, 9) . '' . QUICKBOOKS_CRLF; } - + //$xml .= ' STRTYPE' . QUICKBOOKS_CRLF; - - if ($include_amounts and + + if ($include_amounts and !is_null($salestax)) { $xml .= ' ' . sprintf('%01.2f', (float) $salestax) . '' . QUICKBOOKS_CRLF; } - - if ($Card and - $Card->getCVVCode() and + + if ($Card and + $Card->getCVVCode() and $include_card_cvv) { $xml .= ' ' . $Card->getCVVCode() . '' . QUICKBOOKS_CRLF; } - + /* STRTYPE @@ -1459,33 +1459,33 @@ protected function _createCreditCardXML($Card, $amount, $salestax, $is_card_pres AMTTYPE */ - - return $xml; + + return $xml; } - + /** - * - * - * - * + * + * + * + * */ public function charge($Card, $amount, $salestax = null, $comment = null, $is_card_present = false, $is_ecommerce = true, $is_recurring = false, $is_mobile = false, $force_new_transaction = true) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('charge()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - + $transRequestID = $this->_transRequestID(QuickBooks_MerchantService::TYPE_CHARGE, $Card, $amount, $force_new_transaction); - + $xml = ''; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -1494,7 +1494,7 @@ public function charge($Card, $amount, $salestax = null, $comment = null, $is_ca $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . $transRequestID . '' . QUICKBOOKS_CRLF; - + $xml .= $this->_createCreditCardXML($Card, $amount, $salestax, $is_card_present, $is_ecommerce, $is_recurring, $is_mobile); //STRTYPE @@ -1505,15 +1505,15 @@ public function charge($Card, $amount, $salestax = null, $comment = null, $is_ca } $xml .= ' ' . QUICKBOOKS_CRLF; - $xml .= ' ' . QUICKBOOKS_CRLF; + $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - + return $this->_doQBMS(QuickBooks_MerchantService::TYPE_CHARGE, 'QBMSXML/QBMSXMLMsgsRs/CustomerCreditCardChargeRs', $xml, $Card); } - + /** - * - * + * + * * @param QuickBooks_MerchantService_Transaction $Transaction * @param float $amount * @return QuickBooks_MerchantService_Transaction @@ -1522,33 +1522,33 @@ public function capture($Transaction, $amount = null, $comment = null, $force_ne { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('capture()', QUICKBOOKS_LOG_VERBOSE); - + // Fetch a session ticket if we havn't already if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - + // Error checking if (!($Transaction instanceof QuickBooks_MerchantService_Transaction)) { $this->_setError(QuickBooks_MerchantService::ERROR_PARAM, 'capture() expects first parameter to be a Transaction object, got: ' . print_r($Transaction, true)); return false; } - + if (!is_numeric($amount)) { $this->_setError(QuickBooks_MerchantService::ERROR_PARAM, 'capture() expects second parameter to be a float, got: ' . print_r($amount, true)); return false; } - + $transRequestID = $this->_transRequestID(QuickBooks_MerchantService::TYPE_CHARGE, $Transaction, $amount, $force_new_transaction); - + $xml = ''; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -1558,61 +1558,61 @@ public function capture($Transaction, $amount = null, $comment = null, $force_ne $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . $transRequestID . '' . QUICKBOOKS_CRLF; $xml .= ' ' . $Transaction->getTransactionID() . '' . QUICKBOOKS_CRLF; - + if ((float) $amount) { $xml .= ' ' . sprintf('%01.2f', (float) $amount) . '' . QUICKBOOKS_CRLF; } - + //STRTYPE if ($comment) { $xml .= ' ' . substr(QuickBooks_XML::encode($comment), 0, 500) . '' . QUICKBOOKS_CRLF; } - + $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - + return $this->_doQBMS(QuickBooks_MerchantService::TYPE_CAPTURE, 'QBMSXML/QBMSXMLMsgsRs/CustomerCreditCardCaptureRs', $xml, null, $Transaction); } - + /** * Refund a credit card a given amount - * - * + * + * */ public function refund($Card, $amount, $salestax = null, $comment = null, $is_card_present = false, $is_ecommerce = true, $force_new_transaction = true) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('refund()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - + // Error checking if (!($Card instanceof QuickBooks_MerchantService_CreditCard)) { $this->_setError(QuickBooks_MerchantService::ERROR_PARAM, 'refund() expects first parameter to be a Card object, got: ' . print_r($Card, true)); return false; } - + if (!is_numeric($amount)) { $this->_setError(QuickBooks_MerchantService::ERROR_PARAM, 'refund() expects second parameter to be a float, got: ' . print_r($amount, true)); return false; } - + $transRequestID = $this->_transRequestID(QuickBooks_MerchantService::TYPE_REFUND, $Card, $amount, $force_new_transaction); - + $xml = ''; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -1621,10 +1621,10 @@ public function refund($Card, $amount, $salestax = null, $comment = null, $is_ca $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . $transRequestID . '' . QUICKBOOKS_CRLF; - + // $Card, $amount, $salestax, $is_card_present, $is_ecommerce, $is_recurring, $is_mobile, $include_address_data = true, $include_amounts = true, $include_card_number = true, $include_card_cvv = true, $include_card_dates = true $xml .= $this->_createCreditCardXML($Card, $amount, $salestax, $is_card_present, $is_ecommerce, false, null, false, true, true, false); - + //STRTYPE if ($comment) @@ -1633,41 +1633,41 @@ public function refund($Card, $amount, $salestax = null, $comment = null, $is_ca } $xml .= ' ' . QUICKBOOKS_CRLF; - $xml .= ' ' . QUICKBOOKS_CRLF; + $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - + return $this->_doQBMS(QuickBooks_MerchantService::TYPE_REFUND, 'QBMSXML/QBMSXMLMsgsRs/CustomerCreditCardRefundRs', $xml, $Card); } - + /** - * - * - * + * + * + * */ public function void($Transaction, $comment = null, $force_new_transaction = true) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('void()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - + // Error checking if (!($Transaction instanceof QuickBooks_MerchantService_Transaction)) { $this->_setError(QuickBooks_MerchantService::ERROR_PARAM, 'void() expects first parameter to be a Transaction object, got: ' . print_r($Transaction, true)); return false; } - + $transRequestID = $this->_transRequestID(QuickBooks_MerchantService::TYPE_VOID, $Transaction, null, $force_new_transaction); - + $xml = ''; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -1682,49 +1682,49 @@ public function void($Transaction, $comment = null, $force_new_transaction = tru { $xml .= ' ' . substr(QuickBooks_XML::encode($comment), 0, 500) . '' . QUICKBOOKS_CRLF; } - + $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - + return $this->_doQBMS(QuickBooks_MerchantService::TYPE_VOID, 'QBMSXML/QBMSXMLMsgsRs/CustomerCreditCardTxnVoidRs', $xml); } - + /** - * - * - * + * + * + * */ public function voidOrRefund($Transaction, $amount = null, $salestax = null, $comment = null, $force_new_transaction = true) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); $this->_log('voidOrRefund()', QUICKBOOKS_LOG_VERBOSE); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - + // Error checking if (!($Transaction instanceof QuickBooks_MerchantService_Transaction)) { $this->_setError(QuickBooks_MerchantService::ERROR_PARAM, 'voidOrRefund() expects first parameter to be a Transaction object, got: ' . print_r($Transaction, true)); return false; } - + if (!is_numeric($amount)) { $this->_setError(QuickBooks_MerchantService::ERROR_PARAM, 'voidOrRefund() expects second parameter to be a float, got: ' . print_r($amount, true)); return false; } - + $transRequestID = $this->_transRequestID(QuickBooks_MerchantService::TYPE_VOIDORREFUND, $Transaction, $amount, $force_new_transaction); - + $xml = ''; $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; @@ -1734,32 +1734,32 @@ public function voidOrRefund($Transaction, $amount = null, $salestax = null, $co $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . $transRequestID . '' . QUICKBOOKS_CRLF; $xml .= ' ' . $Transaction->getTransactionID() . '' . QUICKBOOKS_CRLF; - + if ((float) $amount) { $xml .= ' ' . sprintf('%01.2f', (float) $amount) . '' . QUICKBOOKS_CRLF; } - - if (!is_null($salestax) and + + if (!is_null($salestax) and (float) $salestax) { $xml .= ' ' . sprintf('%01.2f', (float) $salestax) . '' . QUICKBOOKS_CRLF; } - + //STRTYPE if ($comment) { $xml .= ' ' . substr(QuickBooks_XML::encode($comment), 0, 500) . '' . QUICKBOOKS_CRLF; } - + $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= ' ' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; - + return $this->_doQBMS(QuickBooks_MerchantService::TYPE_VOIDORREFUND, 'QBMSXML/QBMSXMLMsgsRs/CustomerCreditCardTxnVoidOrRefundRs', $xml); - } - + } + protected function _getBatch($BatchID, $for_close = false) { if (!$BatchID) @@ -1773,41 +1773,41 @@ protected function _getBatch($BatchID, $for_close = false) $BatchID = date('md'); } } - + return $BatchID; } - + public function batchOpen($BatchID = null) { $this->_batch = $this->_getBatch($BatchID); } - + public function batchClose($BatchID = null) { $this->_setError(QuickBooks_MerchantService::ERROR_OK); - + if (!$this->isSignedOn()) { $this->signOn(); - + if ($this->errorNumber()) { return false; } } - + $BatchID = $this->_getBatch($BatchID, true); - + // Send the batch close request - - + + } - + /** - * Get the HTTP/HTTPS gateway to use - * + * Get the HTTP/HTTPS gateway to use + * * @return string - */ + */ protected function _gateway() { if ($this->_test) @@ -1815,15 +1815,15 @@ protected function _gateway() $this->_log('Using TEST gateway: ' . $this->_test_gateway, QUICKBOOKS_LOG_DEVELOP); return $this->_test_gateway; } - + $this->_log('Using LIVE gateway: ' . $this->_live_gateway, QUICKBOOKS_LOG_DEVELOP); return $this->_live_gateway; } - + /** - * - * - * + * + * + * * @param string $message * @param integer $level * @return boolean @@ -1834,23 +1834,23 @@ protected function _log($message, $level = QUICKBOOKS_LOG_NORMAL) { $message = QuickBooks_Utilities::mask($message); } - + if ($this->_debug) { print($message . QUICKBOOKS_CRLF); } - + if ($this->_driver) { - // Send it to the driver to be logged + // Send it to the driver to be logged $this->_driver->log($message, $this->_ticket_session, $level); } - + return true; } - + /** - * Log a message + * Log a message * * */ @@ -1858,53 +1858,53 @@ public function log($message, $level = QUICKBOOKS_LOG_NORMAL) { return $this->_log($message, $level); } - + /** - * - * + * + * * @param string $xml * @param integer $errnum * @param string $errmsg - * @return string + * @return string */ - protected function _request($xml, &$errnum, &$errmsg) + protected function _request($xml, &$errnum, &$errmsg) { $HTTP = new QuickBooks_HTTP($this->_gateway()); - + $headers = array( 'Content-Type' => 'application/x-qbmsxml', ); $HTTP->setHeaders($headers); - + // Turn on debugging for the HTTP object if it's been enabled in the payment processor $HTTP->useDebugMode($this->_debug); - - // + + // $HTTP->setRawBody($xml); - + if ($this->_certificate) { $HTTP->setCertificate($this->_certificate); } - + $return = $HTTP->POST(); - + $this->_last_request = $HTTP->lastRequest(); $this->_last_response = $HTTP->lastResponse(); - - // + + // $this->_log($HTTP->getLog(), QUICKBOOKS_LOG_DEBUG); - + $errnum = $HTTP->errorNumber(); $errmsg = $HTTP->errorMessage(); - + if ($errnum) { // An error occurred! $this->_setError(QuickBooks_MerchantService::ERROR_HTTP, $errnum . ': ' . $errmsg); return false; } - + // Everything is good, return the data! $this->_setError(QuickBooks_MerchantService::ERROR_OK, ''); return $return; diff --git a/QuickBooks/MerchantService/CheckingAccount.php b/QuickBooks/MerchantService/CheckingAccount.php index ac0dd32d..3a18f198 100644 --- a/QuickBooks/MerchantService/CheckingAccount.php +++ b/QuickBooks/MerchantService/CheckingAccount.php @@ -2,97 +2,97 @@ /** * Checking account object - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * * @author Keith Palmer Jr. * * @package QuickBooks - * @subpackage MerchantService + * @subpackage MerchantService */ /** - * - * + * + * */ class QuickBooks_MerchantService_CheckingAccount { const INFO_PERSONAL = 'personal'; const INFO_BUSINESS = 'business'; - + const TYPE_CHECKING = 'Checking'; const TYPE_SAVINGS = 'Savings'; - + protected $_routing; protected $_account; - + protected $_info; protected $_type; protected $_first_name; protected $_last_name; protected $_phone; - + /** * Create a new checking account object - * - * @param + * + * @param */ public function __construct($routing, $account, $info, $type, $first_name, $last_name, $phone) { $this->_routing = $routing; $this->_account = $account; - + $this->_info = $info; $this->_type = $type; - + $this->_first_name = $first_name; $this->_last_name = $last_name; - + $phone = trim(str_replace(array('(', ')', '+', ' ', '.', '-'), '', $phone)); - if (strlen($phone) == 11 and + if (strlen($phone) == 11 and $phone{0} == '1') { $phone = substr($phone, 1); } - - $this->_phone = $phone; + + $this->_phone = $phone; } - + public function getRoutingNumber() { return $this->_routing; } - + public function getAccountNumber() { return $this->_account; } - + public function getInfo() { return $this->_info; } - + public function getType() { return $this->_type; } - + public function getFirstName() { return $this->_first_name; } - + public function getLastName() { return $this->_last_name; } - + public function getPhone() { return $this->_phone; diff --git a/QuickBooks/MerchantService/CreditCard.php b/QuickBooks/MerchantService/CreditCard.php index 1237f90b..36fee5be 100644 --- a/QuickBooks/MerchantService/CreditCard.php +++ b/QuickBooks/MerchantService/CreditCard.php @@ -2,25 +2,25 @@ /** * Credit card class - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * * @author Keith Palmer Jr. * * @package QuickBooks - * @subpackage MerchantService + * @subpackage MerchantService */ /** - * - * + * + * */ -class QuickBooks_MerchantService_CreditCard +class QuickBooks_MerchantService_CreditCard { protected $_name; protected $_number; @@ -29,17 +29,17 @@ class QuickBooks_MerchantService_CreditCard protected $_address; protected $_postalcode; protected $_cvv; - + protected $_lodging; - + protected $_restaurant; - + /** * Create a new credit card object - * + * * @param string $name The name on the credit card * @param string $number The credit card number - * @param + * @param */ public function __construct($name, $number, $expyear, $expmonth, $address = null, $postalcode = null, $cvv = null) { @@ -50,106 +50,106 @@ public function __construct($name, $number, $expyear, $expmonth, $address = null $this->_address = $address; $this->_postalcode = str_replace(array('.', '-', ' '), '', $postalcode); $this->_cvv = $cvv; - + $decode = array( - '&' => '&', - '"' => '"', - '>' => '>', - '<' => '<', + '&' => '&', + '"' => '"', + '>' => '>', + '<' => '<', ); - + // Maximum field length of 30 for address and name if (strlen(htmlspecialchars($this->_name)) > 30) { $this->_name = str_replace(array_keys($decode), array_values($decode), substr(htmlspecialchars($this->_name), 0, 30)); } - + if (strlen(htmlspecialchars($this->_address)) > 30) { $this->_address = str_replace(array_keys($decode), array_values($decode), substr(htmlspecialchars($this->_address), 0, 30)); } } - + public function addLodgingData() { - + } - + public function addRestaurantData() { - + } - + public function setName($name) { $this->_name = $name; } - + public function getName() { return $this->_name; } - + public function setNumber($number) { $this->_number = $number; } - + public function getNumber($mask = false) { if ($mask) { return str_repeat('x', min(strlen($this->_number), 12)) . substr($this->_number, 12); } - + return $this->_number; } - + public function setExpirationYear($year) { $this->_expyear = $year; } - + public function getExpirationYear() { return $this->_expyear; } - + public function setExpirationMonth($month) { $this->_expmonth = $month; } - + public function getExpirationMonth() { return $this->_expmonth; } - + public function setAddress($addr) { $this->_address = $addr; } - + public function getAddress() { return $this->_address; } - + public function setPostalCode($postalcode) { $this->_postalcode = $postalcode; } - + public function getPostalCode() { return $this->_postalcode; } - + public function setCVVCode($cvv) { $this->_cvv = $cvv; } - + public function getCVVCode() { return $this->_cvv; diff --git a/QuickBooks/MerchantService/Transaction.php b/QuickBooks/MerchantService/Transaction.php index f05892c0..acabc304 100644 --- a/QuickBooks/MerchantService/Transaction.php +++ b/QuickBooks/MerchantService/Transaction.php @@ -2,16 +2,16 @@ /** * QuickBooks Merchant Service transaction class - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * - * This class represents a transaction returned by the QuickBooks Merchant - * Service web gateway. - * + * + * This class represents a transaction returned by the QuickBooks Merchant + * Service web gateway. + * * @package QuickBooks * @subpackage MerchantService */ @@ -36,13 +36,13 @@ class QuickBooks_MerchantService_Transaction * @var string */ protected $_type; - + /** * The transaction ID * @var string */ protected $_transID; - + /** * The client transaction ID * @var string @@ -60,7 +60,7 @@ class QuickBooks_MerchantService_Transaction protected $_cvvmatch; protected $_networkname; protected $_networknumber; - + protected $_resultcode; protected $_resultmessage; @@ -70,13 +70,13 @@ class QuickBooks_MerchantService_Transaction protected $_nameoncard; protected $_address; protected $_postalcode; - + /** * Create a new Transaction object - * - * @note There is more information available to be set in the transaction - * object by using the ->setExtraData() method. - * + * + * @note There is more information available to be set in the transaction + * object by using the ->setExtraData() method. + * * @param string $type * @param string $transID * @param string $clientTransID @@ -111,29 +111,29 @@ public function __construct($type, $transID, $clientTransID = null, $authcode = $this->_networkname = $networkname; $this->_networknumber = $networknumber; } - - /** - * - * + + /** + * + * */ public function setExtraData($resultcode, $resultmessage, $creditcardnumber, $expmonth, $expyear, $nameoncard, $address, $postalcode) { $this->_resultcode = $resultcode; $this->_resultmessage = $resultmessage; - + $this->_creditcardnumber = $creditcardnumber; $this->_expmonth = $expmonth; $this->_expyear = $expyear; $this->_nameoncard = $nameoncard; $this->_address = $address; $this->_postalcode = $postalcode; - - return true; + + return true; } - + /** * Set the transaction ID for this transaction - * + * * @param string $transID * @return void */ @@ -141,10 +141,10 @@ public function setTransactionID($transID) { $this->_transID = $transID; } - + /** * Set the client transaction ID for this transaction - * + * * @param string $clientTransID * @return void */ @@ -152,39 +152,39 @@ public function setClientTransactionID($clientTransID) { $this->_clientTransID = $clientTransID; } - + /** * Get the transaction ID - * + * * @return string */ public function getTransactionID() { return $this->_transID; } - + /** - * - * + * + * */ public function getClientTransactionID() { return $this->_clientTransID; } - + public function getAuthorizationCode() { return $this->_authcode; } - + public function getMerchantAccountNumber() { return $this->_merchant; } - + /** * Get the address verification (AVS) status of the transaction - * + * * @return string An AVS result (QUICKBOOKS_MERCHANTSERVICE_PASS, QUICKBOOKS_MERCHANTSERVICE_FAIL, QUICKBOOKS_MERCHANTSERVICE_NOTAVAILABLE) */ public function getAVSStreet() @@ -199,9 +199,9 @@ public function setAVSStreet($avsstreet) /** * Get the postal code verification (AVS) status of the transaction - * + * * @return string An AVS result (QUICKBOOKS_MERCHANTSERVICE_PASS, QUICKBOOKS_MERCHANTSERVICE_FAIL, QUICKBOOKS_MERCHANTSERVICE_NOTAVAILABLE) - */ + */ public function getAVSZip() { return $this->_avszip; @@ -211,7 +211,7 @@ public function setAVSZip($avszip) { return $this->_avszip = $avszip; } - + public function getCardSecurityCodeMatch() { return $this->_cvvmatch; @@ -221,174 +221,174 @@ public function setCardSecurityCodeMatch($cvvmatch) { return $this->_cvvmatch = $cvvmatch; } - + public function getReconBatchID() { return $this->_batch; } - + public function getPaymentGroupingCode() { return $this->_paymentgroup; } - + public function getPaymentStatus() { return $this->_paymentstatus; } - + public function getTxnAuthorizationTime() { return $this->_txnauthtime; } - + public function getTxnAuthorizationStamp() { return $this->_txnauthstamp; } /** - * - * + * + * * @return array */ public function toArray() { return array( - 'Type' => $this->_type, - 'CreditCardTransID' => $this->_transID, - 'AuthorizationCode' => $this->_authcode, + 'Type' => $this->_type, + 'CreditCardTransID' => $this->_transID, + 'AuthorizationCode' => $this->_authcode, 'AVSStreet' => $this->_avsstreet, - 'AVSZip' => $this->_avszip, - 'CardSecurityCodeMatch' => $this->_cvvmatch, - 'ClientTransID' => $this->_clientTransID, - 'MerchantAccountNumber' => $this->_merchant, - 'ReconBatchID' => $this->_batch, + 'AVSZip' => $this->_avszip, + 'CardSecurityCodeMatch' => $this->_cvvmatch, + 'ClientTransID' => $this->_clientTransID, + 'MerchantAccountNumber' => $this->_merchant, + 'ReconBatchID' => $this->_batch, 'PaymentGroupingCode' => $this->_paymentgroup, - 'PaymentStatus' => $this->_paymentstatus, - 'TxnAuthorizationTime' => $this->_txnauthtime, - 'TxnAuthorizationStamp' => $this->_txnauthstamp, - 'NetworkName' => $this->_networkname, - 'NetworkNumber' => $this->_networknumber, - //'DebitCardTransID' => $this->_transID, - - 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardNumber' => $this->_creditcardnumber, - 'CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationMonth' => $this->_expmonth, + 'PaymentStatus' => $this->_paymentstatus, + 'TxnAuthorizationTime' => $this->_txnauthtime, + 'TxnAuthorizationStamp' => $this->_txnauthstamp, + 'NetworkName' => $this->_networkname, + 'NetworkNumber' => $this->_networknumber, + //'DebitCardTransID' => $this->_transID, + + 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardNumber' => $this->_creditcardnumber, + 'CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationMonth' => $this->_expmonth, 'CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationYear' => $this->_expyear, - 'CreditCardTxnInfo_CreditCardTxnInputInfo_NameOnCard' => $this->_nameoncard, + 'CreditCardTxnInfo_CreditCardTxnInputInfo_NameOnCard' => $this->_nameoncard, 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardAddress' => $this->_address, - 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardPostalCode' => $this->_postalcode, + 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardPostalCode' => $this->_postalcode, // STRTYPE // // ENUMTYPE // - 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardTxnType' => $this->_type, + 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardTxnType' => $this->_type, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_ResultCode' => $this->_resultcode, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_ResultMessage' => $this->_resultmessage, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_CreditCardTransID' => $this->_transID, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_MerchantAccountNumber' => $this->_merchant, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_AuthorizationCode' => $this->_authcode, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_ResultCode' => $this->_resultcode, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_ResultMessage' => $this->_resultmessage, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_CreditCardTransID' => $this->_transID, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_MerchantAccountNumber' => $this->_merchant, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_AuthorizationCode' => $this->_authcode, // - 'CreditCardTxnInfo_CreditCardTxnResultInfo_AVSStreet' => $this->_avsstreet, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_AVSStreet' => $this->_avsstreet, // - 'CreditCardTxnInfo_CreditCardTxnResultInfo_AVSZip' => $this->_avszip, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_AVSZip' => $this->_avszip, // - 'CreditCardTxnInfo_CreditCardTxnResultInfo_CardSecurityCodeMatch' => $this->_cvvmatch, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_CardSecurityCodeMatch' => $this->_cvvmatch, 'CreditCardTxnInfo_CreditCardTxnResultInfo_ReconBatchID' => $this->_batch, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_PaymentGroupingCode' => $this->_paymentgroup, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_PaymentGroupingCode' => $this->_paymentgroup, // - 'CreditCardTxnInfo_CreditCardTxnResultInfo_PaymentStatus' => $this->_paymentstatus, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_TxnAuthorizationTime' => $this->_txnauthtime, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_PaymentStatus' => $this->_paymentstatus, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_TxnAuthorizationTime' => $this->_txnauthtime, 'CreditCardTxnInfo_CreditCardTxnResultInfo_TxnAuthorizationStamp' => $this->_txnauthstamp, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_ClientTransID' => $this->_clientTransID, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_ClientTransID' => $this->_clientTransID, ); } - + static public function fromArray($arr) { static $defaults = array( - 'Type' => null, - 'CreditCardTransID' => null, - 'AuthorizationCode' => null, + 'Type' => null, + 'CreditCardTransID' => null, + 'AuthorizationCode' => null, 'AVSStreet' => null, - 'AVSZip' => null, - 'CardSecurityCodeMatch' => null, - 'ClientTransID' => null, - 'MerchantAccountNumber' => null, - 'ReconBatchID' => null, + 'AVSZip' => null, + 'CardSecurityCodeMatch' => null, + 'ClientTransID' => null, + 'MerchantAccountNumber' => null, + 'ReconBatchID' => null, 'PaymentGroupingCode' => null, - 'PaymentStatus' => null, - 'TxnAuthorizationTime' => null, - 'TxnAuthorizationStamp' => null, - 'NetworkName' => null, - 'NetworkNumber' => null, - 'DebitCardTransID' => null, - - 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardNumber' => null, - 'CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationMonth' => null, - 'CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationYear' => null, - 'CreditCardTxnInfo_CreditCardTxnInputInfo_NameOnCard' => null, - 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardAddress' => null, - 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardPostalCode' => null, + 'PaymentStatus' => null, + 'TxnAuthorizationTime' => null, + 'TxnAuthorizationStamp' => null, + 'NetworkName' => null, + 'NetworkNumber' => null, + 'DebitCardTransID' => null, + + 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardNumber' => null, + 'CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationMonth' => null, + 'CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationYear' => null, + 'CreditCardTxnInfo_CreditCardTxnInputInfo_NameOnCard' => null, + 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardAddress' => null, + 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardPostalCode' => null, // STRTYPE // // ENUMTYPE // - 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardTxnType' => null, + 'CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardTxnType' => null, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_ResultCode' => null, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_ResultMessage' => null, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_CreditCardTransID' => null, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_MerchantAccountNumber' => null, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_AuthorizationCode' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_ResultCode' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_ResultMessage' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_CreditCardTransID' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_MerchantAccountNumber' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_AuthorizationCode' => null, // - 'CreditCardTxnInfo_CreditCardTxnResultInfo_AVSStreet' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_AVSStreet' => null, // - 'CreditCardTxnInfo_CreditCardTxnResultInfo_AVSZip' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_AVSZip' => null, // - 'CreditCardTxnInfo_CreditCardTxnResultInfo_CardSecurityCodeMatch' => null, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_ReconBatchID' => null, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_PaymentGroupingCode' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_CardSecurityCodeMatch' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_ReconBatchID' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_PaymentGroupingCode' => null, // - 'CreditCardTxnInfo_CreditCardTxnResultInfo_PaymentStatus' => null, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_TxnAuthorizationTime' => null, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_TxnAuthorizationStamp' => null, - 'CreditCardTxnInfo_CreditCardTxnResultInfo_ClientTransID' => null, - ); - + 'CreditCardTxnInfo_CreditCardTxnResultInfo_PaymentStatus' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_TxnAuthorizationTime' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_TxnAuthorizationStamp' => null, + 'CreditCardTxnInfo_CreditCardTxnResultInfo_ClientTransID' => null, + ); + $trans = array_merge($defaults, $arr); - + $obj = new QuickBooks_MerchantService_Transaction( - $trans['Type'], - $trans['CreditCardTransID'], - $trans['ClientTransID'], - $trans['AuthorizationCode'], - $trans['MerchantAccountNumber'], - $trans['ReconBatchID'], - $trans['PaymentGroupingCode'], - $trans['PaymentStatus'], - $trans['TxnAuthorizationTime'], - $trans['TxnAuthorizationStamp'], - $trans['AVSStreet'], - $trans['AVSZip'], - $trans['CardSecurityCodeMatch'], - $trans['NetworkName'], + $trans['Type'], + $trans['CreditCardTransID'], + $trans['ClientTransID'], + $trans['AuthorizationCode'], + $trans['MerchantAccountNumber'], + $trans['ReconBatchID'], + $trans['PaymentGroupingCode'], + $trans['PaymentStatus'], + $trans['TxnAuthorizationTime'], + $trans['TxnAuthorizationStamp'], + $trans['AVSStreet'], + $trans['AVSZip'], + $trans['CardSecurityCodeMatch'], + $trans['NetworkName'], $trans['NetworkNumber']); - + $obj->setExtraData( - $trans['CreditCardTxnInfo_CreditCardTxnResultInfo_ResultCode'], - $trans['CreditCardTxnInfo_CreditCardTxnResultInfo_ResultMessage'], - $trans['CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardNumber'], - $trans['CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationMonth'], - $trans['CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationYear'], - $trans['CreditCardTxnInfo_CreditCardTxnInputInfo_NameOnCard'], + $trans['CreditCardTxnInfo_CreditCardTxnResultInfo_ResultCode'], + $trans['CreditCardTxnInfo_CreditCardTxnResultInfo_ResultMessage'], + $trans['CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardNumber'], + $trans['CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationMonth'], + $trans['CreditCardTxnInfo_CreditCardTxnInputInfo_ExpirationYear'], + $trans['CreditCardTxnInfo_CreditCardTxnInputInfo_NameOnCard'], $trans['CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardAddress'], - $trans['CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardPostalCode']); - + $trans['CreditCardTxnInfo_CreditCardTxnInputInfo_CreditCardPostalCode']); + return $obj; } - + public function toXML() { $xml = ''; @@ -399,99 +399,99 @@ public function toXML() $xml .= '<' . $key . '>' . htmlspecialchars($value, ENT_QUOTES, 'UTF-8') . '' . QUICKBOOKS_CRLF; } $xml .= ''; - + return $xml; } - + public function toQBXML() { // CreditCardTxnInfo - + $arr = array( 'CreditCardTxnInputInfo' => array( - 'CreditCardNumber' => $this->_creditcardnumber, - 'ExpirationMonth' => $this->_expmonth, - 'ExpirationYear' => $this->_expyear, - 'NameOnCard' => $this->_nameoncard, - 'CreditCardAddress' => $this->_address, - 'CreditCardPostalCode' => $this->_postalcode, + 'CreditCardNumber' => $this->_creditcardnumber, + 'ExpirationMonth' => $this->_expmonth, + 'ExpirationYear' => $this->_expyear, + 'NameOnCard' => $this->_nameoncard, + 'CreditCardAddress' => $this->_address, + 'CreditCardPostalCode' => $this->_postalcode, // // TransactionMode // CardNotPresent, CardPresent - 'CreditCardTxnType' => $this->_type, - ), + 'CreditCardTxnType' => $this->_type, + ), 'CreditCardTxnResultInfo' => array( - 'ResultCode' => $this->_resultcode, - 'ResultMessage' => $this->_resultmessage, - - 'CreditCardTransID' => $this->_transID, - 'MerchantAccountNumber' => $this->_merchant, - 'AuthorizationCode' => $this->_authcode, + 'ResultCode' => $this->_resultcode, + 'ResultMessage' => $this->_resultmessage, + + 'CreditCardTransID' => $this->_transID, + 'MerchantAccountNumber' => $this->_merchant, + 'AuthorizationCode' => $this->_authcode, // 'AVSStreet' => $this->_avsstreet, // 'AVSZip' => $this->_avszip, // 'CardSecurityCodeMatch' => $this->_cvvmatch, - 'ReconBatchID' => $this->_batch, - 'PaymentGroupingCode' => $this->_paymentgroup, + 'ReconBatchID' => $this->_batch, + 'PaymentGroupingCode' => $this->_paymentgroup, // - 'PaymentStatus' => $this->_paymentstatus, - 'TxnAuthorizationTime' => $this->_txnauthtime, - 'TxnAuthorizationStamp' => $this->_txnauthstamp, - 'ClientTransID' => $this->_clientTransID, + 'PaymentStatus' => $this->_paymentstatus, + 'TxnAuthorizationTime' => $this->_txnauthtime, + 'TxnAuthorizationStamp' => $this->_txnauthstamp, + 'ClientTransID' => $this->_clientTransID, )); - + $xml = ''; foreach ($arr as $creditcardtxn => $data) { $xml .= '<' . $creditcardtxn . '>' . QUICKBOOKS_CRLF; - + foreach ($data as $key => $value) { $xml .= "\t" . '<' . $key . '>' . htmlspecialchars($value) . '' . QUICKBOOKS_CRLF; } - + $xml .= '' . QUICKBOOKS_CRLF; } - + return $xml; } - + /** - * - * + * + * * @param string $xml * @return QuickBooks_MerchantService_Transaction */ static public function fromXML($xml) - { + { $errnum = 0; $errmsg = ''; - + $arr = array(); - + $Parser = new QuickBooks_XML_Parser($xml); if ($Doc = $Parser->parse($errnum, $errmsg)) { $Root = $Doc->getRoot(); - + foreach ($Root->asArray(QuickBooks_XML::ARRAY_PATHS) as $path => $value) { $tmp = explode(' ', $path); $key = trim(end($tmp)); - + $arr[$key] = $value; } } - + return QuickBooks_MerchantService_Transaction::fromArray($arr); } - + public function serialize() { return serialize($this->toArray()); } - + static public function unserialize($str) { return QuickBooks_MerchantService_Transaction::fromArray(unserialize($str)); diff --git a/QuickBooks/Payments/BankAccount.php b/QuickBooks/Payments/BankAccount.php index 0c88eccc..09aea511 100644 --- a/QuickBooks/Payments/BankAccount.php +++ b/QuickBooks/Payments/BankAccount.php @@ -2,23 +2,23 @@ /** * Bank account class - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * * @author Keith Palmer Jr. * * @package QuickBooks - * @subpackage MerchantService + * @subpackage MerchantService */ /** - * - * + * + * */ class QuickBooks_Payments_BankAccount { @@ -30,10 +30,10 @@ class QuickBooks_Payments_BankAccount public function __construct($name, $number, $routing, $type, $phone) { $this->_data = array( - 'name' => $name, - 'routingNumber' => $routing, - 'accountNumber' => $number, - 'accountType' => $type, + 'name' => $name, + 'routingNumber' => $routing, + 'accountNumber' => $number, + 'accountType' => $type, 'phone' => trim(str_replace(array('-', ' ', '(', ')'), '', $phone)) ); } diff --git a/QuickBooks/Payments/Token.php b/QuickBooks/Payments/Token.php index 61c380e7..9928525b 100644 --- a/QuickBooks/Payments/Token.php +++ b/QuickBooks/Payments/Token.php @@ -2,23 +2,23 @@ /** * Token class - * + * * Copyright (c) {2015-11-01} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * * @author Keith Palmer Jr. * * @package QuickBooks - * @subpackage MerchantService + * @subpackage MerchantService */ /** - * - * + * + * */ class QuickBooks_Payments_Token { diff --git a/QuickBooks/Payments/Transaction.php b/QuickBooks/Payments/Transaction.php index 24c42eb2..ddb69147 100755 --- a/QuickBooks/Payments/Transaction.php +++ b/QuickBooks/Payments/Transaction.php @@ -2,16 +2,16 @@ /** * QuickBooks Merchant Service transaction class - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * - * This class represents a transaction returned by the QuickBooks Merchant - * Service web gateway. - * + * + * This class represents a transaction returned by the QuickBooks Merchant + * Service web gateway. + * * @package QuickBooks * @subpackage MerchantService */ diff --git a/QuickBooks/QBXML.php b/QuickBooks/QBXML.php index 20349328..ed7ca439 100644 --- a/QuickBooks/QBXML.php +++ b/QuickBooks/QBXML.php @@ -7,14 +7,14 @@ class QuickBooks_QBXML const LOCALE_CANADA = 'CA'; const LOCALE_CA = 'CA'; - + const LOCALE_UNITED_KINGDOM = 'UK'; const LOCALE_UK = 'UK'; const LOCALE_AUSTRALIA = 'AU'; const LOCALE_AU = 'AU'; - + const LOCALE_ONLINE_EDITION = 'OE'; const LOCALE_OE = 'OE'; - + } \ No newline at end of file diff --git a/QuickBooks/QBXML/Object.php b/QuickBooks/QBXML/Object.php index 1700196c..e7fd1d53 100755 --- a/QuickBooks/QBXML/Object.php +++ b/QuickBooks/QBXML/Object.php @@ -2,16 +2,16 @@ /** * Base class for QuickBooks objects - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ @@ -40,12 +40,12 @@ abstract class QuickBooks_QBXML_Object * QuickBooks XML parser option - preserve empty XML elements */ const XML_PRESERVE = QuickBooks_XML::XML_PRESERVE; - + /** * QuickBooks XML parser option - drop empty XML elements */ const XML_DROP = QuickBooks_XML::XML_DROP; - + /** * QuickBooks XML parser option - compress /> empty XML elements */ @@ -53,31 +53,31 @@ abstract class QuickBooks_QBXML_Object /** * Keys/values stored within the object - * + * * @var array */ protected $_object = array(); - + /** * Create a new instance of this QuickBooks class - * + * * @param array $arr */ public function __construct($arr) { - $this->_object = $arr; + $this->_object = $arr; } - + /** * Return a constant indicating the type of object - * + * * @return string */ abstract public function object(); - + /** * Get the date/time this object was created in QuickBooks - * + * * @param string $format If you want the date/time in a particular format, specify the format here (use the notation from {@link http://www.php.net/date}) * @return string */ @@ -87,44 +87,44 @@ public function getTimeCreated($format = null) { return date($format, strtotime($this->get('TimeCreated'))); } - + return $this->get('TimeCreated'); } - /** + /** * Get the date/time when this object was last modified in QuickBooks - * + * * @param string $format If you want the date/time in a particular format, specify the format here (use the notation from {@link http://www.php.net/date}) * @return string - */ + */ public function getTimeModified($format = null) { if (!is_null($format)) { return date($format, strtotime($this->get('TimeModified'))); } - + return $this->get('TimeModified'); } - + public function setEditSequence($value) { return $this->set('EditSequence', $value); } - + /** * Get the QuickBooks EditSequence for this object - * + * * @return integer */ public function getEditSequence() { return $this->get('EditSequence'); } - + /** * Set a value within the object - * + * * @param string $key * @param string $value * @return boolean @@ -138,23 +138,23 @@ public function set($key, $value, $cast = true) else { //print('set(' . $key . ', ' . $value . ', ' . $cast . ')' . "\n"); - + if ($cast and $value != '__EMPTY__') { $value = QuickBooks_Cast::cast($this->object(), $key, $value, true, false); } - + //print(' setting [' . $key . '] to value {' . $value . '}' . "\n"); - + $this->_object[$key] = $value; } - + return true; } - + /** * Get a value from the object - * + * * @param string $key The key to fetch the value for * @param mixed $default If there is no value set for the given key, this will be returned * @return mixed The value fetched @@ -165,13 +165,13 @@ public function get($key, $default = null) { return $this->_object[$key]; } - + return $default; } - + /** * Get a FullName value (where : separates parent and child items) - * + * * @param string $fullname_key The key to set, i.e. FullName * @param string $name_key The 'Name' key, i.e. Name * @param string $parent_key The parent key, i.e. ParentRef_FullName @@ -185,7 +185,7 @@ public function getFullNameType($fullname_key, $name_key, $parent_key, $default { $name = $this->get($name_key); $parent = $this->get($parent_key); - + if ($name and $parent) { $fullname = $parent . ':' . $name; @@ -195,13 +195,13 @@ public function getFullNameType($fullname_key, $name_key, $parent_key, $default $fullname = $name; } } - + return $fullname; } - + /** * Set a Name field - * + * * @param string $name_key * @param string $value * @return void @@ -210,10 +210,10 @@ public function setNameType($name_key, $value) { return $this->set($name_key, str_replace(':', '-', $value)); } - + /** * Set a FullName field - * + * * @param string $fullname_key * @param string $name_key * @param string $parent_key @@ -226,65 +226,65 @@ public function setFullNameType($fullname_key, $name_key, $parent_key, $value) { if ($name_key and $parent_key) { - // This covers the case where we are setting FullName, which + // This covers the case where we are setting FullName, which // needs to be broken up into: // Name // ParentRef FullName - + $explode = explode(':', $value); $name = end($explode); $parent = implode(':', array_slice($explode, 0, -1)); - + $this->set($name_key, $name); $this->set($parent_key, $parent); - + // Build the parent name from the newly set Name and ParentRef (need to fetch because they might have been casted/truncate) $value = $this->get($parent_key) . ':' . $this->get($name_key); } else { - // This covers the case where we are setting - // CustomerType_FullName, there is no separate parent element, - // so we just set the whole chunk - - ; + // This covers the case where we are setting + // CustomerType_FullName, there is no separate parent element, + // so we just set the whole chunk + + ; } } else { $this->set($name_key, $value); - + // Fetch the Name (need to fetch because they might have been casted/truncate) $value = $this->get($name_key); } - + $this->set($fullname_key, $value); } - + /** * Set a boolean value - * - * @param string $key - * @param mixed $value - * @return boolean + * + * @param string $key + * @param mixed $value + * @return boolean */ public function setBooleanType($key, $value) { //print('setting BooleanType [' . $key . '] to ' . $value . "\n"); - + if ($value == 'true' or $value === 1 or $value === true) { //print("\t" . ' set to TRUE' . "\n"); return $this->set($key, 'true'); } - + //print("\t" . ' set to FALSE' . "\n"); return $this->set($key, 'false'); } - + /** - * - * + * + * * @param string $key * @param boolean $default * @return boolean @@ -292,7 +292,7 @@ public function setBooleanType($key, $value) public function getBooleanType($key, $default = null) { if ($this->exists($key)) - { + { $boolean = $this->get($key); if (is_bool($boolean)) { @@ -307,13 +307,13 @@ public function getBooleanType($key, $default = null) return true; } } - + return $default == 'true' or $default === 1 or $default === true; } - + /** - * Set a date - * + * Set a date + * * @param string $key The key for where to store the date * @param mixed $date The date value (accepts anything www.php.net/strtotime can convert or unix timestamps) * @return boolean @@ -324,13 +324,13 @@ public function setDateType($key, $date, $dont_allow_19691231 = true) { return false; } - - if (!strlen($date) or + + if (!strlen($date) or $date == '0') { return false; } - + // 1228241458 vs. 19830102 //if (ereg('^[[:digit:]]+$', $date) and strlen($date) > 8) if (ctype_digit($date) and strlen($date) > 8) @@ -338,13 +338,13 @@ public function setDateType($key, $date, $dont_allow_19691231 = true) // It's a unix timestamp (seconds since unix epoch, conver to string) $date = date('Y-m-d', $date); } - + return $this->set($key, date('Y-m-d', strtotime($date))); } - + /** * Get a date value - * + * * @param string $key Get a date value * @param string $format The format (any format from www.php.net/date) * @return string @@ -355,28 +355,28 @@ public function getDateType($key, $format = 'Y-m-d') { $format = 'Y-m-d'; } - + if ($this->exists($key) and $this->get($key)) { return date($format, strtotime($this->get($key))); } - + return null; } - + public function setAmountType($key, $amount) { $this->set($key, sprintf('%01.2f', (float) $amount)); } - + public function getAmountType($key) { return sprintf('%01.2f', (float) $this->get($key)); } - + /** * Tell if a data field exists within the object - * + * * @param string $key * @return boolean */ @@ -384,10 +384,10 @@ public function exists($key) { return isset($this->_object[$key]); } - + /** * Removes a key from this object - * + * * @param string $key * @return boolean */ @@ -398,52 +398,52 @@ public function remove($key) unset($this->_object[$key]); return true; } - + return false; } - + public function getListItem($key, $index) { $list = $this->getList($key); - + if (isset($list[$index])) { return $list[$index]; } - + return null; } - + /** - * - * + * + * */ public function addListItem($key, $obj) { $list = $this->getList($key); - + $list[] = $obj; - + return $this->set($key, $list); } - + /** - * + * */ public function getList($key) { $list = $this->get($key, array()); - + if (!is_array($list)) { $list = array(); } - + return $list; } - + /** - * + * */ public function getArray($pattern, $defaults = array(), $defaults_if_empty = true) { @@ -453,22 +453,22 @@ public function getArray($pattern, $defaults = array(), $defaults_if_empty = tru if ($this->_fnmatch($pattern, $key)) { $list[$key] = $value; - - if ($defaults_if_empty and - empty($value) and + + if ($defaults_if_empty and + empty($value) and isset($defaults[$key])) { $list[$key] = $defaults[$key]; } } } - + return array_merge($defaults, $list); } - + /** * Do some fancy string matching - * + * * @param string $pattern * @param string $str * @return boolean @@ -477,13 +477,13 @@ protected function _fnmatch($pattern, $str) { return QuickBooks_Utilities::fnmatch($pattern, $str); } - + /** * Get a qbXML schema object for a particular type of request - * - * Schema objects are used to build and validate qbXML requests and the - * fields and data types of qbXML elements. - * + * + * Schema objects are used to build and validate qbXML requests and the + * fields and data types of qbXML elements. + * * @param string $request A valid QuickBooks API request (for example: CustomerAddRq, InvoiceQueryRq, CustomerModRq, etc.) * @return QuickBooks_QBXML_Schema_Object */ @@ -493,25 +493,25 @@ protected function _schema($request) { $request = $request . 'Rq'; } - + $class = 'QuickBooks_QBXML_Schema_Object_' . $request; $file = 'QuickBooks/QBXML/Schema/Object/' . $request . '.php'; - + include_once $file; - + if (class_exists($class)) { return new $class(); } - + return false; } - + /** * Convert this QuickBooks object to an XML node object representation - * + * * @param string $root The node to use as the root node of the XML node structure - * @param string $parent + * @param string $parent * @return QuickBooks_XML_Node */ public function asXML($root = null, $parent = null, $object = null) @@ -520,20 +520,20 @@ public function asXML($root = null, $parent = null, $object = null) { $root = $this->object(); } - + if (is_null($object)) { $object = $this->_object; } - + $Node = new QuickBooks_XML_Node($root); - + foreach ($object as $key => $value) { if (is_array($value)) { $Node->setChildDataAt($root . ' ' . $key, '', true); - + foreach ($value as $sub) { //print('printing sub' . "\n"); @@ -542,32 +542,32 @@ public function asXML($root = null, $parent = null, $object = null) $Node->addChildAt($root, $sub->asXML(null, $root)); } } - else + else { $Node->setChildDataAt($root . ' ' . $key, $value, true); } } - + //print_r($Node); - + return $Node; } - + public function asArray($request, $nest = false) { - + } - + protected function _cleanup() { - + } - + /** * Convert this object to a valid qbXML request/response - * + * * @todo Support for qbXML versions - * + * * @param boolean $compress_empty_elements * @param string $indent * @param string $root @@ -578,39 +578,39 @@ public function asQBXML($request, $version = null, $locale = null, $root = null) { $todo_for_empty_elements = QuickBooks_XML::XML_DROP; $indent = "\t"; - + // Call any cleanup routines $this->_cleanup(); - - // + + // if (strtolower(substr($request, -2, 2)) != 'rq') { $request .= 'Rq'; } - + $Request = new QuickBooks_XML_Node($request); - + if ($schema = $this->_schema($request)) { $tmp = array(); - + // Restrict it to a specific qbXML version? if ($version) { - + } - + // Restrict it to a specific qbXML locale? if ($locale) { // List of fields which are not supported for some versions of qbXML - + if (strlen($locale) == 2) { // The OSR lists locales as 'QBOE', 'QBUK', 'QBCA', etc. vs. our QUICKBOOKS_LOCALE_* constants of just 'OE', 'UK', 'CA', etc. $locale = 'QB' . $locale; } - + $locales = $schema->localePaths(); } @@ -620,70 +620,70 @@ public function asQBXML($request, $version = null, $locale = null, $root = null) foreach ($reordered as $key => $path) { $value = $this->_object[$path]; - + if (is_array($value)) - { + { $tmp[$path] = array(); - + foreach ($value as $arr) { $tmp2 = array(); - + foreach ($arr->asList('') as $inkey => $invalue) { $arr->set($path . ' ' . $inkey, $invalue); } - + foreach ($schema->reorderPaths(array_keys($arr->asList(''))) as $subkey => $subpath) { // We need this later, so store it $fullpath = $subpath; - - if ($locale and + + if ($locale and isset($locales[$subpath])) { if (in_array($locale, $locales[$subpath])) { - // + // //print('found: ' . $subpath . ' (' . $locale . ') so skipping!' . "\n"); } else { $subpath = substr($subpath, strlen($path) + 1); - $tmp2[$subpath] = $arr->get($subpath); + $tmp2[$subpath] = $arr->get($subpath); } } else { $subpath = substr($subpath, strlen($path) + 1); - $tmp2[$subpath] = $arr->get($subpath); + $tmp2[$subpath] = $arr->get($subpath); } - - if ($schema->dataType($fullpath) == QUICKBOOKS_QBXML_SCHEMA_TYPE_AMTTYPE and + + if ($schema->dataType($fullpath) == QUICKBOOKS_QBXML_SCHEMA_TYPE_AMTTYPE and isset($tmp2[$subpath])) { $tmp2[$subpath] = sprintf('%01.2f', $tmp2[$subpath]); } } - + $tmp2 = new QuickBooks_QBXML_Object_Generic($tmp2, $arr->object()); - + $tmp[$path][] = $tmp2; } } else { - // Do some simple data type casting... + // Do some simple data type casting... if ($schema->dataType($path) == QUICKBOOKS_QBXML_SCHEMA_TYPE_AMTTYPE) { $this->_object[$path] = sprintf('%01.2f', $this->_object[$path]); } - + if ($locale and // If a locale is specified... isset($locales[$path])) // ... and this path is set in the locales restriction array { // Check to see if it's supported by the given locale - + if (in_array($locale, $locales[$path])) { // It's not supported by this locale, don't show add it @@ -696,68 +696,68 @@ public function asQBXML($request, $version = null, $locale = null, $root = null) else { // If we don't know whether or not it's supported, return it! - + $tmp[$path] = $this->_object[$path]; } } } - - // *DO NOT* change the source values of the original object! + + // *DO NOT* change the source values of the original object! //$this->_object = $tmp; - + if ($wrapper = $schema->qbxmlWrapper()) { - + $Node = $this->asXML($wrapper, null, $tmp); $Request->addChild($Node); - + return $Request->asXML($todo_for_empty_elements, $indent); } else if (count($this->_object) == 0) { - // This catches the cases where we just want to get *all* objects - // back (no filters) and thus the root level qbXML element is *empty* - // and we need to *preserve* this empty element rather than just + // This catches the cases where we just want to get *all* objects + // back (no filters) and thus the root level qbXML element is *empty* + // and we need to *preserve* this empty element rather than just // drop it (which results in an empty string, and thus invalid query) - + $Node = $this->asXML($request, null, $tmp); - + return $Node->asXML(QuickBooks_XML::XML_PRESERVE, $indent); } else { $Node = $this->asXML($request, null, $tmp); - + return $Node->asXML($todo_for_empty_elements, $indent); } } - + return ''; } - + /** - * - * - * + * + * + * */ public function asList($request) { $arr = $this->_object; $object = $this->object(); - + /* foreach ($arr as $key => $value) { $arr[$key] = QuickBooks_Cast::cast($object, $key, $value); } */ - + return $arr; } /** - * - * + * + * */ static protected function _fromXMLHelper($class, $XML) { @@ -770,61 +770,61 @@ static protected function _fromXMLHelper($class, $XML) $paths[$newpath] = $value; unset($paths[$path]); } - - return new $class($paths); + + return new $class($paths); } - + return null; } - + /** - * Convert a QuickBooks_XML_Node object to a QuickBooks_Object_* object instance - * + * Convert a QuickBooks_XML_Node object to a QuickBooks_Object_* object instance + * * @param QuickBooks_XML_Node $XML * @param string $action_or_object * @return QuickBooks_Object */ static public function fromXML($XML, $action_or_object = null) - { + { if (!$action_or_object or $action_or_object == QUICKBOOKS_QUERY_ITEM) { $action_or_object = $XML->name(); } - + $type = QuickBooks_Utilities::actionToObject($action_or_object); - + $exceptions = array( - QUICKBOOKS_OBJECT_SERVICEITEM => 'ServiceItem', - QUICKBOOKS_OBJECT_INVENTORYITEM => 'InventoryItem', - QUICKBOOKS_OBJECT_NONINVENTORYITEM => 'NonInventoryItem', - QUICKBOOKS_OBJECT_DISCOUNTITEM => 'DiscountItem', - QUICKBOOKS_OBJECT_FIXEDASSETITEM => 'FixedAssetItem', - QUICKBOOKS_OBJECT_GROUPITEM => 'GroupItem', - QUICKBOOKS_OBJECT_OTHERCHARGEITEM => 'OtherChargeItem', - QUICKBOOKS_OBJECT_SALESTAXITEM => 'SalesTaxItem', - QUICKBOOKS_OBJECT_SALESTAXGROUPITEM => 'SalesTaxGroupItem', - QUICKBOOKS_OBJECT_SUBTOTALITEM => 'SubtotalItem', - QUICKBOOKS_OBJECT_INVENTORYASSEMBLYITEM => 'InventoryAssemblyItem', + QUICKBOOKS_OBJECT_SERVICEITEM => 'ServiceItem', + QUICKBOOKS_OBJECT_INVENTORYITEM => 'InventoryItem', + QUICKBOOKS_OBJECT_NONINVENTORYITEM => 'NonInventoryItem', + QUICKBOOKS_OBJECT_DISCOUNTITEM => 'DiscountItem', + QUICKBOOKS_OBJECT_FIXEDASSETITEM => 'FixedAssetItem', + QUICKBOOKS_OBJECT_GROUPITEM => 'GroupItem', + QUICKBOOKS_OBJECT_OTHERCHARGEITEM => 'OtherChargeItem', + QUICKBOOKS_OBJECT_SALESTAXITEM => 'SalesTaxItem', + QUICKBOOKS_OBJECT_SALESTAXGROUPITEM => 'SalesTaxGroupItem', + QUICKBOOKS_OBJECT_SUBTOTALITEM => 'SubtotalItem', + QUICKBOOKS_OBJECT_INVENTORYASSEMBLYITEM => 'InventoryAssemblyItem', ); - + if (isset($exceptions[$type])) { $type = $exceptions[$type]; } - + //print('trying to create type: {' . $type . '}' . "\n"); - + $class = 'QuickBooks_QBXML_Object_' . ucfirst(strtolower($type)); - + if (true) //class_exists($class, false)) { $Object = QuickBooks_QBXML_Object::_fromXMLHelper($class, $XML); - + if (!is_object($Object)) { return false; } - + $children = array(); switch ($Object->object()) { @@ -836,71 +836,71 @@ static public function fromXML($XML, $action_or_object = null) break; case QUICKBOOKS_OBJECT_BILL: - + $children = array( - 'ItemLineRet' => array( 'QuickBooks_QBXML_Object_Bill_ItemLine', 'addItemLine' ), - 'ExpenseLineRet' => array( 'QuickBooks_QBXML_Object_Bill_ExpenseLine', 'addExpenseLine' ), - ); - + 'ItemLineRet' => array( 'QuickBooks_QBXML_Object_Bill_ItemLine', 'addItemLine' ), + 'ExpenseLineRet' => array( 'QuickBooks_QBXML_Object_Bill_ExpenseLine', 'addExpenseLine' ), + ); + break; case QUICKBOOKS_OBJECT_PURCHASEORDER: - + $children = array( - 'PurchaseOrderLineRet' => array( 'QuickBooks_QBXML_Object_PurchaseOrder_PurchaseOrderLine', 'addPurchaseOrderLine' ), + 'PurchaseOrderLineRet' => array( 'QuickBooks_QBXML_Object_PurchaseOrder_PurchaseOrderLine', 'addPurchaseOrderLine' ), ); - + break; case QUICKBOOKS_OBJECT_INVOICE: - - $children = array( - 'InvoiceLineRet' => array( 'QuickBooks_QBXML_Object_Invoice_InvoiceLine', 'addInvoiceLine' ), + + $children = array( + 'InvoiceLineRet' => array( 'QuickBooks_QBXML_Object_Invoice_InvoiceLine', 'addInvoiceLine' ), ); - + break; case QUICKBOOKS_OBJECT_ESTIMATE: - - $children = array( - 'EstimateLineRet' => array( 'QuickBooks_QBXML_Object_Estimate_EstimateLine', 'addEstimateLine' ), - ); - + + $children = array( + 'EstimateLineRet' => array( 'QuickBooks_QBXML_Object_Estimate_EstimateLine', 'addEstimateLine' ), + ); + break; case QUICKBOOKS_OBJECT_SALESRECEIPT: - - $children = array( - 'SalesReceiptLineRet' => array( 'QuickBooks_QBXML_Object_SalesReceipt_SalesReceiptLine', 'addSalesReceiptLine' ), - ); - + + $children = array( + 'SalesReceiptLineRet' => array( 'QuickBooks_QBXML_Object_SalesReceipt_SalesReceiptLine', 'addSalesReceiptLine' ), + ); + break; case QUICKBOOKS_OBJECT_JOURNALENTRY: - + $children = array( - 'JournalCreditLineRet' => array( 'QuickBooks_QBXML_Object_JournalEntry_JournalCreditLine', 'addCreditLine' ), - 'JournalDebitLineRet' => array( 'QuickBooks_QBXML_Object_JournalEntry_JournalDebitLine', 'addDebitLine' ), + 'JournalCreditLineRet' => array( 'QuickBooks_QBXML_Object_JournalEntry_JournalCreditLine', 'addCreditLine' ), + 'JournalDebitLineRet' => array( 'QuickBooks_QBXML_Object_JournalEntry_JournalDebitLine', 'addDebitLine' ), ); - + break; case QUICKBOOKS_OBJECT_SALESTAXGROUPITEM: - + $children = array( - 'ItemSalesTaxRef' => array( 'QuickBooks_QBXML_Object_SalesTaxGroupItem_ItemSalesTaxRef', 'addItemSalesTaxRef' ), + 'ItemSalesTaxRef' => array( 'QuickBooks_QBXML_Object_SalesTaxGroupItem_ItemSalesTaxRef', 'addItemSalesTaxRef' ), ); - + break; case QUICKBOOKS_OBJECT_UNITOFMEASURESET: - + $children = array( - 'RelatedUnit' => array( 'QuickBooks_QBXML_Object_UnitOfMeasureSet_RelatedUnit', 'addRelatedUnit' ), - 'DefaultUnit' => array( 'QuickBooks_QBXML_Object_UnitOfMeasureSet_DefaultUnit', 'addDefaultUnit' ), + 'RelatedUnit' => array( 'QuickBooks_QBXML_Object_UnitOfMeasureSet_RelatedUnit', 'addRelatedUnit' ), + 'DefaultUnit' => array( 'QuickBooks_QBXML_Object_UnitOfMeasureSet_DefaultUnit', 'addDefaultUnit' ), ); - + break; } - + foreach ($children as $node => $tmp) { $childclass = $tmp[0]; $childmethod = $tmp[1]; - + if (class_exists($childclass)) { foreach ($XML->children() as $ChildXML) @@ -908,8 +908,8 @@ static public function fromXML($XML, $action_or_object = null) if ($ChildXML->name() == $node) { $ChildObject = QuickBooks_QBXML_Object::_fromXMLHelper($childclass, $ChildXML); - $Object->$childmethod($ChildObject); - } + $Object->$childmethod($ChildObject); + } } } else @@ -917,16 +917,16 @@ static public function fromXML($XML, $action_or_object = null) print('Missing class: ' . $childclass . "\n"); } } - + return $Object; } - - return false; + + return false; } - + /** * Convert a qbXML string to a QuickBooks_Object_* object instance - * + * * @param string $qbxml * @param string $action_or_object * @return QuickBooks_Object @@ -935,15 +935,15 @@ static public function fromQBXML($qbxml, $action_or_object = null) { $errnum = null; $errmsg = null; - + $Parser = new QuickBooks_XML_Parser($qbxml); if ($Doc = $Parser->parse($errnum, $errmsg)) { $XML = $Doc->getRoot(); - + return QuickBooks_QBXML_Object::fromXML($XML, $action_or_object); } - + return false; } } diff --git a/QuickBooks/QBXML/Object/Account.php b/QuickBooks/QBXML/Object/Account.php index c1c8bba5..6e0d3e8f 100755 --- a/QuickBooks/QBXML/Object/Account.php +++ b/QuickBooks/QBXML/Object/Account.php @@ -2,37 +2,37 @@ /** * QuickBooks Account object container - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Account extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Account object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID of the Class - * + * * @param string $ListID * @return boolean */ @@ -40,58 +40,58 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of the Class - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** - * + * */ public function setParentListID($ListID) { return $this->set('ParentRef ListID', $ListID); } - + public function getParentListID() { return $this->get('ParentRef ListID'); } - + public function setParentName($name) { return $this->set('ParentRef FullName', $name); } - + public function getParentName() { return $this->get('ParentRef FullName'); } - + public function getParentFullName() { return $this->get('ParentRef FullName'); } - + public function setParentApplicationID($value) { return $this->set('ParentRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); } - + public function getParentApplicationID() { return $this->get('ParentRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** * Set the name of the class - * + * * @param string $name * @return boolean */ @@ -99,19 +99,19 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name of the class - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** - * + * */ public function getFullName() { @@ -122,10 +122,10 @@ public function setFullName($name) { return $this->set('FullName', $name); } - + /** * Set this Class active or not - * + * * @param boolean $value * @return boolean */ @@ -133,57 +133,57 @@ public function setIsActive($value) { return $this->set('IsActive', (boolean) $value); } - + /** * Tell whether or not this class object is active - * + * * @return boolean */ public function getIsActive() { return $this->getBooleanType('IsActive'); } - + public function setAccountType($type) { return $this->setBooleanType('AccountType', $type); } - + public function getAccountType() { return $this->get('AccountType'); } - + public function setAccountNumber($number) { return $this->set('AccountNumber', $number); } - + public function getAccountNumber() { return $this->get('AccountNumber'); } - + public function setBankNumber($number) { return $this->set('BankNumber', $number); } - + public function getBankNumber() { return $this->get('BankNumber'); } - + public function setDescription($descrip) { return $this->set('Desc', $descrip); } - + public function getDescription() { return $this->get('Desc'); } - + public function setOpenBalance($balance) { return $this->set('OpenBalance', (float) $balance); @@ -193,7 +193,7 @@ public function getOpenBalance() { return $this->get('OpenBalance'); } - + public function setOpenBalanceDate($date) { return $this->setDateType('OpenBalanceDate', $date); @@ -203,7 +203,7 @@ public function getOpenBalanceDate() { return $this->getDateType('OpenBalanceDate'); } - + public function setTaxLineID($value) { return $this->set('TxLineID', $value); @@ -213,7 +213,7 @@ public function getTaxLineID() { return $this->get('TxLineID'); } - + public function getBalance() { return $this->get('Balance'); @@ -223,7 +223,7 @@ public function setBalance($value) { return $this->set('Balance', $value); } - + public function getTotalBalance() { return $this->get('TotalBalance'); @@ -233,7 +233,7 @@ public function setTotalBalance($value) { return $this->set('TotalBalance', $value); } - + public function getSpecialAccountType() { return $this->get('SpecialAccountType'); @@ -243,7 +243,7 @@ public function setSpecialAccountType($type) { return $this->set('SpecialAccountType', $type); } - + public function getCashFlowClassification() { return $this->get('CashFlowClassification'); @@ -257,17 +257,17 @@ public function setCashFlowClassification($type) /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this Class object - * + * * @param string $request * @param boolean $nest * @return array @@ -275,13 +275,13 @@ protected function _cleanup() public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -291,13 +291,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Bill.php b/QuickBooks/QBXML/Object/Bill.php index 292f7058..5db3ba6c 100644 --- a/QuickBooks/QBXML/Object/Bill.php +++ b/QuickBooks/QBXML/Object/Bill.php @@ -1,14 +1,14 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** @@ -27,13 +27,13 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/Bill/ExpenseLine.php'); /** - * + * */ class QuickBooks_QBXML_Object_Bill extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_JournalEntry object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -43,7 +43,7 @@ public function __construct($arr = array()) /** * Set the customer ListID - * + * * @param string $ListID * @return boolean */ @@ -51,10 +51,10 @@ public function setVendorListID($ListID) { return $this->set('VendorRef ListID' , $ListID); } - + /** * Set the customer ApplicationID (auto-replaced by the API with a ListID) - * + * * @param mixed $value * @return boolean */ @@ -62,10 +62,10 @@ public function setVendorApplicationID($value) { return $this->set('VendorRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_VENDOR, QUICKBOOKS_LISTID, $value)); } - + /** * Set the customer name - * + * * @param string $name * @return boolean */ @@ -73,10 +73,10 @@ public function setVendorFullname($name) { return $this->set('VendorRef FullName', $name); } - + /** * Get the customer ListID - * + * * @return string */ public function getVendorListID() @@ -86,7 +86,7 @@ public function getVendorListID() /** * Get the customer application ID - * + * * @return mixed */ public function getVendorApplicationID() @@ -95,10 +95,10 @@ public function getVendorApplicationID() } // Path: TxnDate, datatype: DATETYPE - + /** * Set the TxnDate for the JournalEntry - * + * * @param string $date * @return boolean */ @@ -109,7 +109,7 @@ public function setTxnDate($date) /** * Get the TxnDate for the JournalEntry - * + * * @param ? $format = null * @return string */ @@ -123,7 +123,7 @@ public function getTxnDate($format = null) */ public function setTransactionDate($date) { - return $this->setTxnDate($date); + return $this->setTxnDate($date); } /** @@ -134,20 +134,20 @@ public function getTransactionDate($format = null) $this->getTxnDate($format = null); } // Path: RefNumber, datatype: STRTYPE - + public function setDueDate($date) { return $this->setDateType('DueDate', $date); } - + public function getDueDate($format = 'Y-m-d') { return $this->getDateType('DueDate', $format); } - + /** * Set the RefNumber for the JournalEntry - * + * * @param string $value * @return boolean */ @@ -158,7 +158,7 @@ public function setRefNumber($value) /** * Get the RefNumber for the JournalEntry - * + * * @return string */ public function getRefNumber() @@ -167,10 +167,10 @@ public function getRefNumber() } // Path: Memo, datatype: STRTYPE - + /** * Set the Memo for the JournalEntry - * + * * @param string $value * @return boolean */ @@ -181,48 +181,48 @@ public function setMemo($value) /** * Get the Memo for the JournalEntry - * + * * @return string */ public function getMemo() { return $this->get('Memo'); } - + public function addExpenseLine($obj) { return $this->addListItem('ExpenseLine', $obj); } - + public function addItemLine($obj) { - return $this->addListItem('ItemLine', $obj); + return $this->addListItem('ItemLine', $obj); } - - + + public function asList($request) { switch ($request) { case 'BillAddRq': - + if (isset($this->_object['ItemLine'])) { $this->_object['ItemLineAdd'] = $this->_object['ItemLine']; } - + if (isset($this->_object['ExpenseLine'])) { $this->_object['ExpenseLineAdd'] = $this->_object['ExpenseLine']; } - + break; case 'BillModRq': - - + + break; } - + return parent::asList($request); } @@ -232,11 +232,11 @@ public function asXML($root = null, $parent = null, $object = null) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_BILL: - + if (!empty($object['ItemLineAdd'])) { foreach ($object['ItemLineAdd'] as $key => $obj) @@ -244,18 +244,18 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('ItemLineAdd'); } } - + if (!empty($object['ExpenseLineAdd'])) { foreach ($object['ExpenseLineAdd'] as $key => $obj) { $obj->setOverride('ExpenseLineAdd'); - } + } } - + break; case QUICKBOOKS_MOD_BILL: - + if (!empty($object['ItemLineMod'])) { foreach ($object['ItemLineMod'] as $key => $obj) @@ -263,29 +263,29 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('ItemLineMod'); } } - + if (!empty($object['ExpenseLineMod'])) { foreach ($object['ExpenseLineMod'] as $key => $obj) { $obj->setOverride('ExpenseLineMod'); - } + } } - + break; } - + return parent::asXML($root, $parent, $object); } /** * Tell the type of object this is - * + * * @return string */ public function object() { return QUICKBOOKS_OBJECT_BILL; - } + } } diff --git a/QuickBooks/QBXML/Object/Bill/ExpenseLine.php b/QuickBooks/QBXML/Object/Bill/ExpenseLine.php index 18c0e172..babb0be1 100755 --- a/QuickBooks/QBXML/Object/Bill/ExpenseLine.php +++ b/QuickBooks/QBXML/Object/Bill/ExpenseLine.php @@ -1,14 +1,14 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -16,13 +16,13 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Bill_ExpenseLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Check_ExpenseLine object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -30,11 +30,11 @@ public function __construct($arr = array()) parent::__construct($arr); } - // Path: AccountRef ListID, datatype: - + // Path: AccountRef ListID, datatype: + /** * Set the AccountRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -45,7 +45,7 @@ public function setAccountListID($ListID) /** * Get the AccountRef ListID for the Check - * + * * @return string */ public function getAccountListID() @@ -55,7 +55,7 @@ public function getAccountListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -64,11 +64,11 @@ public function setAccountApplicationID($value) return $this->set('AccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); } - // Path: AccountRef FullName, datatype: - + // Path: AccountRef FullName, datatype: + /** * Set the AccountRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -79,7 +79,7 @@ public function setAccountFullName($FullName) /** * Get the AccountRef FullName for the Check - * + * * @return string */ public function getAccountFullName() @@ -87,11 +87,11 @@ public function getAccountFullName() return $this->get('AccountRef FullName'); } - // Path: Amount, datatype: - + // Path: Amount, datatype: + /** * Set the Amount for the Check - * + * * @param string $value * @return boolean */ @@ -102,7 +102,7 @@ public function setAmount($value) /** * Get the Amount for the Check - * + * * @return string */ public function getAmount() @@ -111,10 +111,10 @@ public function getAmount() } // Path: Memo, datatype: STRTYPE - + /** * Set the Memo for the Check - * + * * @param string $value * @return boolean */ @@ -125,7 +125,7 @@ public function setMemo($value) /** * Get the Memo for the Check - * + * * @return string */ public function getMemo() @@ -133,11 +133,11 @@ public function getMemo() return $this->get('Memo'); } - // Path: CustomerRef ListID, datatype: - + // Path: CustomerRef ListID, datatype: + /** * Set the CustomerRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -148,7 +148,7 @@ public function setCustomerListID($ListID) /** * Get the CustomerRef ListID for the Check - * + * * @return string */ public function getCustomerListID() @@ -158,7 +158,7 @@ public function getCustomerListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -167,11 +167,11 @@ public function setCustomerApplicationID($value) return $this->set('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_LISTID, $value)); } - // Path: CustomerRef FullName, datatype: - + // Path: CustomerRef FullName, datatype: + /** * Set the CustomerRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -182,7 +182,7 @@ public function setCustomerFullName($FullName) /** * Get the CustomerRef FullName for the Check - * + * * @return string */ public function getCustomerFullName() @@ -190,11 +190,11 @@ public function getCustomerFullName() return $this->get('CustomerRef FullName'); } - // Path: ClassRef ListID, datatype: - + // Path: ClassRef ListID, datatype: + /** * Set the ClassRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -205,7 +205,7 @@ public function setClassListID($ListID) /** * Get the ClassRef ListID for the Check - * + * * @return string */ public function getClassListID() @@ -215,7 +215,7 @@ public function getClassListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -224,11 +224,11 @@ public function setClassApplicationID($value) return $this->set('ClassRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CLASS, QUICKBOOKS_LISTID, $value)); } - // Path: ClassRef FullName, datatype: - + // Path: ClassRef FullName, datatype: + /** * Set the ClassRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -239,7 +239,7 @@ public function setClassName($FullName) /** * Get the ClassRef FullName for the Check - * + * * @return string */ public function getClassName() @@ -247,11 +247,11 @@ public function getClassName() return $this->get('ClassRef FullName'); } - // Path: BillableStatus, datatype: - + // Path: BillableStatus, datatype: + /** * Set the BillableStatus for the Check - * + * * @param string $value * @return boolean */ @@ -262,7 +262,7 @@ public function setBillableStatus($value) /** * Get the BillableStatus for the Check - * + * * @return string */ public function getBillableStatus() diff --git a/QuickBooks/QBXML/Object/Bill/ItemLine.php b/QuickBooks/QBXML/Object/Bill/ItemLine.php index 3ab348ab..151e9093 100755 --- a/QuickBooks/QBXML/Object/Bill/ItemLine.php +++ b/QuickBooks/QBXML/Object/Bill/ItemLine.php @@ -1,14 +1,14 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -16,13 +16,13 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Bill_ItemLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Check_ItemLine object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -30,11 +30,11 @@ public function __construct($arr = array()) parent::__construct($arr); } - // Path: ItemRef ListID, datatype: - + // Path: ItemRef ListID, datatype: + /** * Set the ItemRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -45,7 +45,7 @@ public function setItemListID($ListID) /** * Get the ItemRef ListID for the Check - * + * * @return string */ public function getItemListID() @@ -55,7 +55,7 @@ public function getItemListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -64,11 +64,11 @@ public function setItemApplicationID($value) return $this->set('ItemRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ITEM, QUICKBOOKS_LISTID, $value)); } - // Path: ItemRef FullName, datatype: - + // Path: ItemRef FullName, datatype: + /** * Set the ItemRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -79,7 +79,7 @@ public function setItemFullName($FullName) /** * Get the ItemRef FullName for the Check - * + * * @return string */ public function getItemFullName() @@ -87,11 +87,11 @@ public function getItemFullName() return $this->get('ItemRef FullName'); } - // Path: Desc, datatype: - + // Path: Desc, datatype: + /** * Set the Desc for the Check - * + * * @param string $value * @return boolean */ @@ -102,7 +102,7 @@ public function setDesc($value) /** * Get the Desc for the Check - * + * * @return string */ public function getDesc() @@ -115,7 +115,7 @@ public function getDesc() */ public function setDescription($value) { - $this->setDesc($value); + $this->setDesc($value); } /** @@ -125,11 +125,11 @@ public function getDescription() { $this->getDesc(); } - // Path: Quantity, datatype: - + // Path: Quantity, datatype: + /** * Set the Quantity for the Check - * + * * @param string $value * @return boolean */ @@ -140,7 +140,7 @@ public function setQuantity($value) /** * Get the Quantity for the Check - * + * * @return string */ public function getQuantity() @@ -148,11 +148,11 @@ public function getQuantity() return $this->get('Quantity'); } - // Path: UnitOfMeasure, datatype: - + // Path: UnitOfMeasure, datatype: + /** * Set the UnitOfMeasure for the Check - * + * * @param string $value * @return boolean */ @@ -163,7 +163,7 @@ public function setUnitOfMeasure($value) /** * Get the UnitOfMeasure for the Check - * + * * @return string */ public function getUnitOfMeasure() @@ -171,11 +171,11 @@ public function getUnitOfMeasure() return $this->get('UnitOfMeasure'); } - // Path: Cost, datatype: - + // Path: Cost, datatype: + /** * Set the Cost for the Check - * + * * @param string $value * @return boolean */ @@ -186,7 +186,7 @@ public function setCost($value) /** * Get the Cost for the Check - * + * * @return string */ public function getCost() @@ -194,11 +194,11 @@ public function getCost() return $this->get('Cost'); } - // Path: Amount, datatype: - + // Path: Amount, datatype: + /** * Set the Amount for the Check - * + * * @param string $value * @return boolean */ @@ -209,7 +209,7 @@ public function setAmount($value) /** * Get the Amount for the Check - * + * * @return string */ public function getAmount() @@ -217,11 +217,11 @@ public function getAmount() return $this->get('Amount'); } - // Path: CustomerRef ListID, datatype: - + // Path: CustomerRef ListID, datatype: + /** * Set the CustomerRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -232,7 +232,7 @@ public function setCustomerListID($ListID) /** * Get the CustomerRef ListID for the Check - * + * * @return string */ public function getCustomerListID() @@ -242,7 +242,7 @@ public function getCustomerListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -251,11 +251,11 @@ public function setCustomerApplicationID($value) return $this->set('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_LISTID, $value)); } - // Path: CustomerRef FullName, datatype: - + // Path: CustomerRef FullName, datatype: + /** * Set the CustomerRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -266,7 +266,7 @@ public function setCustomerName($FullName) /** * Get the CustomerRef FullName for the Check - * + * * @return string */ public function getCustomerName() @@ -274,11 +274,11 @@ public function getCustomerName() return $this->get('CustomerRef FullName'); } - // Path: ClassRef ListID, datatype: - + // Path: ClassRef ListID, datatype: + /** * Set the ClassRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -289,7 +289,7 @@ public function setClassListID($ListID) /** * Get the ClassRef ListID for the Check - * + * * @return string */ public function getClassListID() @@ -299,7 +299,7 @@ public function getClassListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -308,11 +308,11 @@ public function setClassApplicationID($value) return $this->set('ClassRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CLASS, QUICKBOOKS_LISTID, $value)); } - // Path: ClassRef FullName, datatype: - + // Path: ClassRef FullName, datatype: + /** * Set the ClassRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -323,7 +323,7 @@ public function setClassName($FullName) /** * Get the ClassRef FullName for the Check - * + * * @return string */ public function getClassName() @@ -331,11 +331,11 @@ public function getClassName() return $this->get('ClassRef FullName'); } - // Path: BillableStatus, datatype: - + // Path: BillableStatus, datatype: + /** * Set the BillableStatus for the Check - * + * * @param string $value * @return boolean */ @@ -346,7 +346,7 @@ public function setBillableStatus($value) /** * Get the BillableStatus for the Check - * + * * @return string */ public function getBillableStatus() @@ -354,11 +354,11 @@ public function getBillableStatus() return $this->get('BillableStatus'); } - // Path: OverrideItemAccountRef ListID, datatype: - + // Path: OverrideItemAccountRef ListID, datatype: + /** * Set the OverrideItemAccountRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -369,7 +369,7 @@ public function setOverrideItemAccountListID($ListID) /** * Get the OverrideItemAccountRef ListID for the Check - * + * * @return string */ public function getOverrideItemAccountListID() @@ -379,7 +379,7 @@ public function getOverrideItemAccountListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -388,11 +388,11 @@ public function setOverrideItemAccountApplicationID($value) return $this->set('OverrideItemAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_OVERRIDEITEMACCOUNT, QUICKBOOKS_LISTID, $value)); } - // Path: OverrideItemAccountRef FullName, datatype: - + // Path: OverrideItemAccountRef FullName, datatype: + /** * Set the OverrideItemAccountRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -403,21 +403,21 @@ public function setOverrideItemAccountName($FullName) /** * Get the OverrideItemAccountRef FullName for the Check - * + * * @return string */ public function getOverrideItemAccountName() { return $this->get('OverrideItemAccountRef FullName'); } - + public function asXML($root = null, $parent = null, $object = null) { if (is_null($object)) { $object = $this->_object; } - + switch ($parent) { case QUICKBOOKS_ADD_CHECK: @@ -429,33 +429,33 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -466,7 +466,7 @@ public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_X $this->_cleanup(); return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + public function object() { return 'ItemLine'; diff --git a/QuickBooks/QBXML/Object/BillPaymentCheck.php b/QuickBooks/QBXML/Object/BillPaymentCheck.php index ebd6d730..08d82885 100644 --- a/QuickBooks/QBXML/Object/BillPaymentCheck.php +++ b/QuickBooks/QBXML/Object/BillPaymentCheck.php @@ -2,10 +2,10 @@ /** * QuickBooks ReceivePayment object container - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ @@ -21,23 +21,23 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/BillPaymentCheck/AppliedToTxn.php'); /** - * QuickBooks ReceivePayment object + * QuickBooks ReceivePayment object */ class QuickBooks_QBXML_Object_BillPaymentCheck extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_ReceivePayment object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the TxnID of the Class - * + * * @param string $TxnID * @return boolean */ @@ -45,7 +45,7 @@ public function setTxnID($TxnID) { return $this->set('TxnID', $TxnID); } - + /** * Alias of {@link QuickBooks_Object_ReceivePayment::setTxnID()} */ @@ -53,17 +53,17 @@ public function setTransactionID($TxnID) { return $this->setTxnID($TxnID); } - + /** * Get the ListID of the Class - * + * * @return string */ public function getTxnID() { return $this->get('TxnID'); } - + /** * Alias of {@link QuickBooks_Object_ReceivePayment::getTxnID()} */ @@ -71,10 +71,10 @@ public function getTransactionID() { return $this->getTxnID(); } - + /** * Set the customer ListID - * + * * @param string $ListID * @return boolean */ @@ -82,10 +82,10 @@ public function setPayeeEntityListID($ListID) { return $this->set('PayeeEntityRef ListID' , $ListID); } - + /** * Set the customer ApplicationID (auto-replaced by the API with a ListID) - * + * * @param mixed $value * @return boolean */ @@ -93,16 +93,16 @@ public function setPayeeEntityApplicationID($value) { return $this->set('PayeeEntityRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_VENDOR, QUICKBOOKS_LISTID, $value)); } - - + + public function getPayeeEntityApplicationID() { return $this->get('PayeeEntityRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** * Set the customer name - * + * * @param string $name * @return boolean */ @@ -110,30 +110,30 @@ public function setPayeeEntityFullName($name) { return $this->set('PayeeEntityRef FullName', $name); } - + /** * Get the customer ListID - * + * * @return string */ public function getPayeeEntityListID() { return $this->get('PayeeEntityRef ListID'); } - + /** * Get the customer name - * + * * @return string */ public function getPayeeEntityFullName() { return $this->get('PayeeEntityRef FullName'); } - + /** * Set the transaction date - * + * * @param string $date * @return boolean */ @@ -141,7 +141,7 @@ public function setTxnDate($date) { return $this->setDateType('TxnDate', $date); } - + /** * Alias of {@link QuickBooks_Object_Invoice::setTxnDate()} */ @@ -149,30 +149,30 @@ public function setTransactionDate($date) { return $this->setTxnDate($date); } - + /** * Get the transaction date - * + * * @return string */ public function getTxnDate($format = 'Y-m-d') { return $this->getDateType('TxnDate'); } - + public function setIsToBePrinted($bool) { return $this->setBooleanType('IsToBePrinted', $bool); } - + public function getIsToBePrinted() { return $this->getBooleanType('IsToBePrinted'); } - + /** * Set the reference number - * + * * @param string $str * @return boolean */ @@ -180,17 +180,17 @@ public function setRefNumber($str) { return $this->set('RefNumber', $str); } - + /** * Get the reference number - * + * * @return string */ public function getRefNumber() { return $this->get('RefNumber'); } - + /** * Alias of {@link QuickBooks_Object_ReceivePayment::addAppliedToTxn()} */ @@ -198,29 +198,29 @@ public function addAppliedToTransaction($obj) { return $this->addAppliedToTxn($obj); } - + /** - * - * + * + * */ public function addAppliedToTxn($obj) { /* $lines = $this->get('AppliedToTxn'); - + if (!is_array($lines)) { $lines = array(); } - + // $lines[] = $obj; - + return $this->set('AppliedToTxn', $lines);*/ - + return $this->addListItem('AppliedToTxn', $obj); } - + /** * Alias of {@link QuickBooks_Object_Invoice::getTxnDate()} */ @@ -228,10 +228,10 @@ public function getTransactionDate($format = 'Y-m-d') { return $this->getDateType('TxnDate', $format); } - + /** * Set the total amount of the received payment - * + * * @param float $amount * @return boolean */ @@ -239,27 +239,27 @@ public function setTotalAmount($amount) { return $this->setAmountType('TotalAmount', $amount); } - + /** * Get the total amount of the received payment - * + * * @return float */ public function getTotalAmount() { return $this->getAmountType('TotalAmount'); } - + public function setAPAccountListID($ListID) { return $this->set('APAccountRef ListID', $ListID); } - + public function setAPAccountFullName($name) { return $this->set('APAccountRef FullName', $name); } - + public function setAPAccountApplicationID($value) { return $this->set('APAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -269,27 +269,27 @@ public function getAPAccountApplicationID() { return $this->get('APAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getAPAccountListID() { return $this->get('APAccountRef ListID'); } - + public function getAPAccountFullName() { return $this->get('APAccountRef FullName'); } - + public function setBankAccountListID($ListID) { return $this->set('BankAccountRef ListID', $ListID); } - + public function setBankAccountFullName($name) { return $this->set('BankAccountRef FullName', $name); } - + public function setBankAccountApplicationID($value) { return $this->set('BankAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -299,40 +299,40 @@ public function getBankAccountApplicationID() { return $this->get('BankAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getBankAccountListID() { return $this->get('BankAccountRef ListID'); } - + public function getBankAccountFullName() { return $this->get('BankAccountRef FullName'); } - + public function setMemo($memo) { return $this->set('Memo', $memo); } - + public function getMemo() { return $this->get('Memo'); } - + /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this Class object - * + * * @param string $request * @param boolean $nest * @return array @@ -340,53 +340,53 @@ protected function _cleanup() /*public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); }*/ - + public function asList($request) { switch ($request) { case 'BillPaymentCheckAddRq': - + if (isset($this->_object['AppliedToTxn'])) { $this->_object['AppliedToTxnAdd'] = $this->_object['AppliedToTxn']; } - + break; case 'BillPaymentCheckModRq': - + if (isset($this->_object['AppliedToTxn'])) { - $this->_object['AppliedToTxnMod'] = $this->_object['AppliedToTxn']; + $this->_object['AppliedToTxnMod'] = $this->_object['AppliedToTxn']; } - + break; } - + return parent::asList($request); } - + public function asXML($root = null, $parent = null, $object = null) { if (is_null($object)) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_BILLPAYMENTCHECK: - + /* if (isset($this->_object['AppliedToTxn'])) { $this->_object['AppliedToTxnAdd'] = $this->_object['AppliedToTxn']; } */ - + if ($this->exists('AppliedToTxnAdd')) { foreach ($object['AppliedToTxnAdd'] as $key => $obj) @@ -394,21 +394,21 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('AppliedToTxnAdd'); } } - + break; case QUICKBOOKS_MOD_BILLPAYMENTCHECK: - + // finish me! - + break; } - + return parent::asXML($root, $parent, $object); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -419,14 +419,14 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } */ - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/BillPaymentCheck/AppliedToTxn.php b/QuickBooks/QBXML/Object/BillPaymentCheck/AppliedToTxn.php index a74b7c95..84ecc2f3 100755 --- a/QuickBooks/QBXML/Object/BillPaymentCheck/AppliedToTxn.php +++ b/QuickBooks/QBXML/Object/BillPaymentCheck/AppliedToTxn.php @@ -1,120 +1,120 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/BillPaymentCheck.php'); /** - * - * + * + * */ class QuickBooks_QBXML_Object_BillPaymentCheck_AppliedToTxn extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks ReceivePayment AppliedToTxn object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + public function setTxnID($TxnID) { return $this->set('TxnID', $TxnID); } - + public function setTransactionID($TxnID) { return $this->setTxnID($TxnID); } - + public function getTxnID() { return $this->get('TxnID'); } - + public function getTransactionID() { return $this->getTxnID(); } - + public function setTxnApplicationID($value) { return $this->set(QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_BILL, QUICKBOOKS_TXNID, $value)); //return $this->set('NullRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_INVOICE, QUICKBOOKS_TXNID, $value)); } - + public function getTxnApplicationID() { - + } - + public function getPaymentAmount($amount) { return $this->getAmountType('PaymentAmount'); } - + public function setPaymentAmount($amount) { return $this->setAmountType('PaymentAmount', $amount); } - + public function setDiscountAmount($amount) { return $this->setAmountType('DiscountAmount', $amount); } - + public function getDiscountAmount() { return $this->getDiscountAmount('DiscountAmount'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { $this->_cleanup(); - + if (is_null($object)) { $object = $this->_object; } - + switch ($parent) { case QUICKBOOKS_ADD_BILLPAYMENTCHECK: @@ -126,13 +126,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -141,13 +141,13 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Check.php b/QuickBooks/QBXML/Object/Check.php index 20a194d2..54f729f1 100644 --- a/QuickBooks/QBXML/Object/Check.php +++ b/QuickBooks/QBXML/Object/Check.php @@ -1,14 +1,14 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -36,13 +36,13 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/Check/ApplyCheckToTxn.php'); /** - * + * */ class QuickBooks_QBXML_Object_Check extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Check object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -50,11 +50,11 @@ public function __construct($arr = array()) parent::__construct($arr); } - // Path: AccountRef ListID, datatype: - + // Path: AccountRef ListID, datatype: + /** * Set the AccountRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -65,7 +65,7 @@ public function setAccountListID($ListID) /** * Get the AccountRef ListID for the Check - * + * * @return string */ public function getAccountListID() @@ -75,7 +75,7 @@ public function getAccountListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -89,11 +89,11 @@ public function getAccountApplicationID() return $this->get('AccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - // Path: AccountRef FullName, datatype: - + // Path: AccountRef FullName, datatype: + /** * Set the AccountRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -104,7 +104,7 @@ public function setAccountName($FullName) /** * Get the AccountRef FullName for the Check - * + * * @return string */ public function getAccountName() @@ -112,11 +112,11 @@ public function getAccountName() return $this->get('AccountRef FullName'); } - // Path: PayeeEntityRef ListID, datatype: - + // Path: PayeeEntityRef ListID, datatype: + /** * Set the PayeeEntityRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -127,7 +127,7 @@ public function setPayeeEntityListID($ListID) /** * Get the PayeeEntityRef ListID for the Check - * + * * @return string */ public function getPayeeEntityListID() @@ -137,7 +137,7 @@ public function getPayeeEntityListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -151,11 +151,11 @@ public function getPayeeEntityApplicationID() return $this->get('PayeeEntityRef ' . QUICKBOOKS_API_APPLICATIONID); } - // Path: PayeeEntityRef FullName, datatype: - + // Path: PayeeEntityRef FullName, datatype: + /** * Set the PayeeEntityRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -166,7 +166,7 @@ public function setPayeeEntityFullName($FullName) /** * Get the PayeeEntityRef FullName for the Check - * + * * @return string */ public function getPayeeEntityFullName() @@ -175,10 +175,10 @@ public function getPayeeEntityFullName() } // Path: RefNumber, datatype: STRTYPE - + /** * Set the RefNumber for the Check - * + * * @param string $value * @return boolean */ @@ -189,7 +189,7 @@ public function setRefNumber($value) /** * Get the RefNumber for the Check - * + * * @return string */ public function getRefNumber() @@ -198,10 +198,10 @@ public function getRefNumber() } // Path: TxnDate, datatype: DATETYPE - + /** * Set the TxnDate for the Check - * + * * @param string $date * @return boolean */ @@ -212,7 +212,7 @@ public function setTxnDate($date) /** * Get the TxnDate for the Check - * + * * @param ? $format = null * @return string */ @@ -226,7 +226,7 @@ public function getTxnDate($format = null) */ public function setTransactionDate($date) { - return $this->setTxnDate($date); + return $this->setTxnDate($date); } /** @@ -237,10 +237,10 @@ public function getTransactionDate($format = null) return $this->getTxnDate($format = null); } // Path: Memo, datatype: STRTYPE - + /** * Set the Memo for the Check - * + * * @param string $value * @return boolean */ @@ -251,7 +251,7 @@ public function setMemo($value) /** * Get the Memo for the Check - * + * * @return string */ public function getMemo() @@ -260,10 +260,10 @@ public function getMemo() } // Path: IsToBePrinted, datatype: BOOLTYPE - + /** * Set the IsToBePrinted for the Check - * + * * @param boolean $bool * @return boolean */ @@ -274,7 +274,7 @@ public function setIsToBePrinted($bool) /** * Get the IsToBePrinted for the Check - * + * * @return boolean */ public function getIsToBePrinted() @@ -283,10 +283,10 @@ public function getIsToBePrinted() } // Path: IsTaxIncluded, datatype: BOOLTYPE - + /** * Set the IsTaxIncluded for the Check - * + * * @param boolean $bool * @return boolean */ @@ -297,7 +297,7 @@ public function setIsTaxIncluded($bool) /** * Get the IsTaxIncluded for the Check - * + * * @return boolean */ public function getIsTaxIncluded() @@ -305,11 +305,11 @@ public function getIsTaxIncluded() return $this->getBooleanType('IsTaxIncluded'); } - // Path: SalesTaxCodeRef ListID, datatype: - + // Path: SalesTaxCodeRef ListID, datatype: + /** * Set the SalesTaxCodeRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -320,7 +320,7 @@ public function setSalesTaxCodeListID($ListID) /** * Get the SalesTaxCodeRef ListID for the Check - * + * * @return string */ public function getSalesTaxCodeListID() @@ -330,7 +330,7 @@ public function getSalesTaxCodeListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -344,11 +344,11 @@ public function getSalesTaxCodeApplicationID() return $this->get('SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID); } - // Path: SalesTaxCodeRef FullName, datatype: - + // Path: SalesTaxCodeRef FullName, datatype: + /** * Set the SalesTaxCodeRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -359,7 +359,7 @@ public function setSalesTaxCodeName($FullName) /** * Get the SalesTaxCodeRef FullName for the Check - * + * * @return string */ public function getSalesTaxCodeName() @@ -376,17 +376,17 @@ public function addItemGroupLine($obj) { return $this->addListItem('ItemGroupLine', $obj); } - + public function addExpenseLine($obj) { return $this->addListItem('ExpenseLine', $obj); } - + public function addAddCheckToTxn($obj) { return $this->addListItem('AddCheckToTxn', $obj); } - + public function setAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $addr5 = '', $city = '', $state = '', $postalcode = '', $country = '', $note = '') { return $this->_setAddress('', $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $postalcode, $country, $note); @@ -410,48 +410,48 @@ public function asList($request) switch ($request) { case 'CheckAddRq': - + if (isset($this->_object['ItemLine'])) { $this->_object['ItemLineAdd'] = $this->_object['ItemLine']; } - + if (isset($this->_object['ItemGroupLine'])) { $this->_object['ItemGroupLineAdd'] = $this->_object['ItemGroupLine']; } - + if (isset($this->_object['ExpenseLine'])) { $this->_object['ExpenseLineAdd'] = $this->_object['ExpenseLine']; } - + if (isset($this->_object['AddCheckToTxn'])) { $this->_object['AddCheckToTxnAdd'] = $this->_object['AddCheckToTxn']; } - + break; case 'CheckModRq': - - + + break; } - + return parent::asList($request); } - + public function asXML($root = null, $parent = null, $object = null) { if (is_null($object)) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_CHECK: - + if (!empty($object['ItemLineAdd'])) { foreach ($object['ItemLineAdd'] as $key => $obj) @@ -465,9 +465,9 @@ public function asXML($root = null, $parent = null, $object = null) foreach ($object['ItemGroupLineAdd'] as $key => $obj) { $obj->setOverride('ItemGroupLineAdd'); - } + } } - + if (!empty($object['ExpenseLineAdd'])) { foreach ($object['ExpenseLineAdd'] as $key => $obj) @@ -475,15 +475,15 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('ExpenseLineAdd'); } } - + if (!empty($object['ApplyCheckToTxnAdd'])) { foreach ($object['ApplyCheckToTxnAdd'] as $key => $obj) { $obj->setOverride('ApplyCheckToTxnAdd'); - } + } } - + break; case QUICKBOOKS_MOD_CHECK: if (isset($object['ItemLine'])) @@ -492,22 +492,22 @@ public function asXML($root = null, $parent = null, $object = null) } break; } - + return parent::asXML($root, $parent, $object); } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); return parent::asArray($request, $nest); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -518,23 +518,23 @@ public function asQBXML($request, $todo_for_empty_elements = QuickBooks_QBXML_Ob $this->_cleanup(); return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * */ protected function _cleanup() { - + } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() { return QUICKBOOKS_OBJECT_CHECK; - } + } } diff --git a/QuickBooks/QBXML/Object/Check/ApplyCheckToTxn.php b/QuickBooks/QBXML/Object/Check/ApplyCheckToTxn.php index 3feae6a3..64f6b07e 100644 --- a/QuickBooks/QBXML/Object/Check/ApplyCheckToTxn.php +++ b/QuickBooks/QBXML/Object/Check/ApplyCheckToTxn.php @@ -1,14 +1,14 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -21,13 +21,13 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/Check.php'); /** - * + * */ class QuickBooks_QBXML_Object_Check_ApplyCheckToTxn extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Check_ApplyCheckToTxnAdd object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -35,11 +35,11 @@ public function __construct($arr = array()) parent::__construct($arr); } - // Path: TxnID, datatype: - + // Path: TxnID, datatype: + /** * Set the TxnID for the Check - * + * * @param string $value * @return boolean */ @@ -50,7 +50,7 @@ public function setTxnID($value) /** * Get the TxnID for the Check - * + * * @return string */ public function getTxnID() @@ -58,11 +58,11 @@ public function getTxnID() return $this->get('TxnID'); } - // Path: Amount, datatype: - + // Path: Amount, datatype: + /** * Set the Amount for the Check - * + * * @param string $value * @return boolean */ @@ -73,14 +73,14 @@ public function setAmount($value) /** * Get the Amount for the Check - * + * * @return string */ public function getAmount() { return $this->get('Amount'); } - + public function object() { return 'ApplyCheckToTxn'; diff --git a/QuickBooks/QBXML/Object/Check/ExpenseLine.php b/QuickBooks/QBXML/Object/Check/ExpenseLine.php index 57acf174..50b336fb 100755 --- a/QuickBooks/QBXML/Object/Check/ExpenseLine.php +++ b/QuickBooks/QBXML/Object/Check/ExpenseLine.php @@ -1,14 +1,14 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -16,13 +16,13 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Check_ExpenseLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Check_ExpenseLine object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -30,11 +30,11 @@ public function __construct($arr = array()) parent::__construct($arr); } - // Path: AccountRef ListID, datatype: - + // Path: AccountRef ListID, datatype: + /** * Set the AccountRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -45,7 +45,7 @@ public function setAccountListID($ListID) /** * Get the AccountRef ListID for the Check - * + * * @return string */ public function getAccountListID() @@ -55,7 +55,7 @@ public function getAccountListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -64,11 +64,11 @@ public function setAccountApplicationID($value) return $this->set('AccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); } - // Path: AccountRef FullName, datatype: - + // Path: AccountRef FullName, datatype: + /** * Set the AccountRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -79,7 +79,7 @@ public function setAccountName($FullName) /** * Get the AccountRef FullName for the Check - * + * * @return string */ public function getAccountName() @@ -87,11 +87,11 @@ public function getAccountName() return $this->get('AccountRef FullName'); } - // Path: Amount, datatype: - + // Path: Amount, datatype: + /** * Set the Amount for the Check - * + * * @param string $value * @return boolean */ @@ -102,7 +102,7 @@ public function setAmount($value) /** * Get the Amount for the Check - * + * * @return string */ public function getAmount() @@ -110,11 +110,11 @@ public function getAmount() return $this->get('Amount'); } - // Path: TaxAmount, datatype: - + // Path: TaxAmount, datatype: + /** * Set the TaxAmount for the Check - * + * * @param string $value * @return boolean */ @@ -125,7 +125,7 @@ public function setTaxAmount($value) /** * Get the TaxAmount for the Check - * + * * @return string */ public function getTaxAmount() @@ -134,10 +134,10 @@ public function getTaxAmount() } // Path: Memo, datatype: STRTYPE - + /** * Set the Memo for the Check - * + * * @param string $value * @return boolean */ @@ -148,7 +148,7 @@ public function setMemo($value) /** * Get the Memo for the Check - * + * * @return string */ public function getMemo() @@ -156,11 +156,11 @@ public function getMemo() return $this->get('Memo'); } - // Path: CustomerRef ListID, datatype: - + // Path: CustomerRef ListID, datatype: + /** * Set the CustomerRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -171,7 +171,7 @@ public function setCustomerListID($ListID) /** * Get the CustomerRef ListID for the Check - * + * * @return string */ public function getCustomerListID() @@ -181,7 +181,7 @@ public function getCustomerListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -190,11 +190,11 @@ public function setCustomerApplicationID($value) return $this->set('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_LISTID, $value)); } - // Path: CustomerRef FullName, datatype: - + // Path: CustomerRef FullName, datatype: + /** * Set the CustomerRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -205,7 +205,7 @@ public function setCustomerFullName($FullName) /** * Get the CustomerRef FullName for the Check - * + * * @return string */ public function getCustomerFullName() @@ -213,11 +213,11 @@ public function getCustomerFullName() return $this->get('CustomerRef FullName'); } - // Path: ClassRef ListID, datatype: - + // Path: ClassRef ListID, datatype: + /** * Set the ClassRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -228,7 +228,7 @@ public function setClassListID($ListID) /** * Get the ClassRef ListID for the Check - * + * * @return string */ public function getClassListID() @@ -238,7 +238,7 @@ public function getClassListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -247,11 +247,11 @@ public function setClassApplicationID($value) return $this->set('ClassRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CLASS, QUICKBOOKS_LISTID, $value)); } - // Path: ClassRef FullName, datatype: - + // Path: ClassRef FullName, datatype: + /** * Set the ClassRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -262,7 +262,7 @@ public function setClassName($FullName) /** * Get the ClassRef FullName for the Check - * + * * @return string */ public function getClassName() @@ -270,11 +270,11 @@ public function getClassName() return $this->get('ClassRef FullName'); } - // Path: SalesTaxCodeRef ListID, datatype: - + // Path: SalesTaxCodeRef ListID, datatype: + /** * Set the SalesTaxCodeRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -285,7 +285,7 @@ public function setSalesTaxCodeListID($ListID) /** * Get the SalesTaxCodeRef ListID for the Check - * + * * @return string */ public function getSalesTaxCodeListID() @@ -295,7 +295,7 @@ public function getSalesTaxCodeListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -304,11 +304,11 @@ public function setSalesTaxCodeApplicationID($value) return $this->set('SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SALESTAXCODE, QUICKBOOKS_LISTID, $value)); } - // Path: SalesTaxCodeRef FullName, datatype: - + // Path: SalesTaxCodeRef FullName, datatype: + /** * Set the SalesTaxCodeRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -319,7 +319,7 @@ public function setSalesTaxCodeName($FullName) /** * Get the SalesTaxCodeRef FullName for the Check - * + * * @return string */ public function getSalesTaxCodeName() @@ -327,11 +327,11 @@ public function getSalesTaxCodeName() return $this->get('SalesTaxCodeRef FullName'); } - // Path: BillableStatus, datatype: - + // Path: BillableStatus, datatype: + /** * Set the BillableStatus for the Check - * + * * @param string $value * @return boolean */ @@ -342,7 +342,7 @@ public function setBillableStatus($value) /** * Get the BillableStatus for the Check - * + * * @return string */ public function getBillableStatus() diff --git a/QuickBooks/QBXML/Object/Check/ItemGroupLine.php b/QuickBooks/QBXML/Object/Check/ItemGroupLine.php index b25c6adb..61d1ce6e 100644 --- a/QuickBooks/QBXML/Object/Check/ItemGroupLine.php +++ b/QuickBooks/QBXML/Object/Check/ItemGroupLine.php @@ -1,14 +1,14 @@ * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -16,13 +16,13 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Check_ItemGroupLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Check_ItemGroupLine object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -30,11 +30,11 @@ public function __construct($arr = array()) parent::__construct($arr); } - // Path: ItemGroupRef ListID, datatype: - + // Path: ItemGroupRef ListID, datatype: + /** * Set the ItemGroupRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -45,7 +45,7 @@ public function setItemGroupListID($ListID) /** * Get the ItemGroupRef ListID for the Check - * + * * @return string */ public function getItemGroupListID() @@ -55,7 +55,7 @@ public function getItemGroupListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -64,11 +64,11 @@ public function setItemGroupApplicationID($value) return $this->set('ItemGroupRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ITEMGROUP, QUICKBOOKS_LISTID, $value)); } - // Path: ItemGroupRef FullName, datatype: - + // Path: ItemGroupRef FullName, datatype: + /** * Set the ItemGroupRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -79,7 +79,7 @@ public function setItemGroupName($FullName) /** * Get the ItemGroupRef FullName for the Check - * + * * @return string */ public function getItemGroupName() @@ -87,11 +87,11 @@ public function getItemGroupName() return $this->get('ItemGroupRef FullName'); } - // Path: Desc, datatype: - + // Path: Desc, datatype: + /** * Set the Desc for the Check - * + * * @param string $value * @return boolean */ @@ -102,7 +102,7 @@ public function setDesc($value) /** * Get the Desc for the Check - * + * * @return string */ public function getDesc() @@ -115,7 +115,7 @@ public function getDesc() */ public function setDescription($value) { - $this->setDesc($value); + $this->setDesc($value); } /** @@ -125,11 +125,11 @@ public function getDescription() { $this->getDesc(); } - // Path: Quantity, datatype: - + // Path: Quantity, datatype: + /** * Set the Quantity for the Check - * + * * @param string $value * @return boolean */ @@ -140,7 +140,7 @@ public function setQuantity($value) /** * Get the Quantity for the Check - * + * * @return string */ public function getQuantity() @@ -148,11 +148,11 @@ public function getQuantity() return $this->get('Quantity'); } - // Path: UnitOfMeasure, datatype: - + // Path: UnitOfMeasure, datatype: + /** * Set the UnitOfMeasure for the Check - * + * * @param string $value * @return boolean */ @@ -163,7 +163,7 @@ public function setUnitOfMeasure($value) /** * Get the UnitOfMeasure for the Check - * + * * @return string */ public function getUnitOfMeasure() diff --git a/QuickBooks/QBXML/Object/Check/ItemLine.php b/QuickBooks/QBXML/Object/Check/ItemLine.php index a2ec2bb2..6770a3b0 100755 --- a/QuickBooks/QBXML/Object/Check/ItemLine.php +++ b/QuickBooks/QBXML/Object/Check/ItemLine.php @@ -1,14 +1,14 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -16,13 +16,13 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Check_ItemLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Check_ItemLine object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -30,11 +30,11 @@ public function __construct($arr = array()) parent::__construct($arr); } - // Path: ItemRef ListID, datatype: - + // Path: ItemRef ListID, datatype: + /** * Set the ItemRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -45,7 +45,7 @@ public function setItemListID($ListID) /** * Get the ItemRef ListID for the Check - * + * * @return string */ public function getItemListID() @@ -55,7 +55,7 @@ public function getItemListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -64,11 +64,11 @@ public function setItemApplicationID($value) return $this->set('ItemRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ITEM, QUICKBOOKS_LISTID, $value)); } - // Path: ItemRef FullName, datatype: - + // Path: ItemRef FullName, datatype: + /** * Set the ItemRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -79,7 +79,7 @@ public function setItemFullName($FullName) /** * Get the ItemRef FullName for the Check - * + * * @return string */ public function getItemFullName() @@ -87,11 +87,11 @@ public function getItemFullName() return $this->get('ItemRef FullName'); } - // Path: Desc, datatype: - + // Path: Desc, datatype: + /** * Set the Desc for the Check - * + * * @param string $value * @return boolean */ @@ -102,7 +102,7 @@ public function setDesc($value) /** * Get the Desc for the Check - * + * * @return string */ public function getDesc() @@ -115,7 +115,7 @@ public function getDesc() */ public function setDescription($value) { - $this->setDesc($value); + $this->setDesc($value); } /** @@ -125,11 +125,11 @@ public function getDescription() { $this->getDesc(); } - // Path: Quantity, datatype: - + // Path: Quantity, datatype: + /** * Set the Quantity for the Check - * + * * @param string $value * @return boolean */ @@ -140,7 +140,7 @@ public function setQuantity($value) /** * Get the Quantity for the Check - * + * * @return string */ public function getQuantity() @@ -148,11 +148,11 @@ public function getQuantity() return $this->get('Quantity'); } - // Path: UnitOfMeasure, datatype: - + // Path: UnitOfMeasure, datatype: + /** * Set the UnitOfMeasure for the Check - * + * * @param string $value * @return boolean */ @@ -163,7 +163,7 @@ public function setUnitOfMeasure($value) /** * Get the UnitOfMeasure for the Check - * + * * @return string */ public function getUnitOfMeasure() @@ -171,11 +171,11 @@ public function getUnitOfMeasure() return $this->get('UnitOfMeasure'); } - // Path: Cost, datatype: - + // Path: Cost, datatype: + /** * Set the Cost for the Check - * + * * @param string $value * @return boolean */ @@ -186,7 +186,7 @@ public function setCost($value) /** * Get the Cost for the Check - * + * * @return string */ public function getCost() @@ -194,11 +194,11 @@ public function getCost() return $this->get('Cost'); } - // Path: Amount, datatype: - + // Path: Amount, datatype: + /** * Set the Amount for the Check - * + * * @param string $value * @return boolean */ @@ -209,7 +209,7 @@ public function setAmount($value) /** * Get the Amount for the Check - * + * * @return string */ public function getAmount() @@ -217,11 +217,11 @@ public function getAmount() return $this->get('Amount'); } - // Path: TaxAmount, datatype: - + // Path: TaxAmount, datatype: + /** * Set the TaxAmount for the Check - * + * * @param string $value * @return boolean */ @@ -232,7 +232,7 @@ public function setTaxAmount($value) /** * Get the TaxAmount for the Check - * + * * @return string */ public function getTaxAmount() @@ -240,11 +240,11 @@ public function getTaxAmount() return $this->get('TaxAmount'); } - // Path: CustomerRef ListID, datatype: - + // Path: CustomerRef ListID, datatype: + /** * Set the CustomerRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -255,7 +255,7 @@ public function setCustomerListID($ListID) /** * Get the CustomerRef ListID for the Check - * + * * @return string */ public function getCustomerListID() @@ -265,7 +265,7 @@ public function getCustomerListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -274,11 +274,11 @@ public function setCustomerApplicationID($value) return $this->set('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_LISTID, $value)); } - // Path: CustomerRef FullName, datatype: - + // Path: CustomerRef FullName, datatype: + /** * Set the CustomerRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -289,7 +289,7 @@ public function setCustomerName($FullName) /** * Get the CustomerRef FullName for the Check - * + * * @return string */ public function getCustomerName() @@ -297,11 +297,11 @@ public function getCustomerName() return $this->get('CustomerRef FullName'); } - // Path: ClassRef ListID, datatype: - + // Path: ClassRef ListID, datatype: + /** * Set the ClassRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -312,7 +312,7 @@ public function setClassListID($ListID) /** * Get the ClassRef ListID for the Check - * + * * @return string */ public function getClassListID() @@ -322,7 +322,7 @@ public function getClassListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -331,11 +331,11 @@ public function setClassApplicationID($value) return $this->set('ClassRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CLASS, QUICKBOOKS_LISTID, $value)); } - // Path: ClassRef FullName, datatype: - + // Path: ClassRef FullName, datatype: + /** * Set the ClassRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -346,7 +346,7 @@ public function setClassName($FullName) /** * Get the ClassRef FullName for the Check - * + * * @return string */ public function getClassName() @@ -354,11 +354,11 @@ public function getClassName() return $this->get('ClassRef FullName'); } - // Path: SalesTaxCodeRef ListID, datatype: - + // Path: SalesTaxCodeRef ListID, datatype: + /** * Set the SalesTaxCodeRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -369,7 +369,7 @@ public function setSalesTaxCodeListID($ListID) /** * Get the SalesTaxCodeRef ListID for the Check - * + * * @return string */ public function getSalesTaxCodeListID() @@ -379,7 +379,7 @@ public function getSalesTaxCodeListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -388,11 +388,11 @@ public function setSalesTaxCodeApplicationID($value) return $this->set('SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SALESTAXCODE, QUICKBOOKS_LISTID, $value)); } - // Path: SalesTaxCodeRef FullName, datatype: - + // Path: SalesTaxCodeRef FullName, datatype: + /** * Set the SalesTaxCodeRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -403,7 +403,7 @@ public function setSalesTaxCodeName($FullName) /** * Get the SalesTaxCodeRef FullName for the Check - * + * * @return string */ public function getSalesTaxCodeName() @@ -411,11 +411,11 @@ public function getSalesTaxCodeName() return $this->get('SalesTaxCodeRef FullName'); } - // Path: BillableStatus, datatype: - + // Path: BillableStatus, datatype: + /** * Set the BillableStatus for the Check - * + * * @param string $value * @return boolean */ @@ -426,7 +426,7 @@ public function setBillableStatus($value) /** * Get the BillableStatus for the Check - * + * * @return string */ public function getBillableStatus() @@ -434,11 +434,11 @@ public function getBillableStatus() return $this->get('BillableStatus'); } - // Path: OverrideItemAccountRef ListID, datatype: - + // Path: OverrideItemAccountRef ListID, datatype: + /** * Set the OverrideItemAccountRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -449,7 +449,7 @@ public function setOverrideItemAccountListID($ListID) /** * Get the OverrideItemAccountRef ListID for the Check - * + * * @return string */ public function getOverrideItemAccountListID() @@ -459,7 +459,7 @@ public function getOverrideItemAccountListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -468,11 +468,11 @@ public function setOverrideItemAccountApplicationID($value) return $this->set('OverrideItemAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_OVERRIDEITEMACCOUNT, QUICKBOOKS_LISTID, $value)); } - // Path: OverrideItemAccountRef FullName, datatype: - + // Path: OverrideItemAccountRef FullName, datatype: + /** * Set the OverrideItemAccountRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -483,21 +483,21 @@ public function setOverrideItemAccountName($FullName) /** * Get the OverrideItemAccountRef FullName for the Check - * + * * @return string */ public function getOverrideItemAccountName() { return $this->get('OverrideItemAccountRef FullName'); } - + public function asXML($root = null, $parent = null, $object = null) { if (is_null($object)) { $object = $this->_object; } - + switch ($parent) { case QUICKBOOKS_ADD_CHECK: @@ -509,33 +509,33 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -546,7 +546,7 @@ public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_X $this->_cleanup(); return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + public function object() { return 'ItemLine'; diff --git a/QuickBooks/QBXML/Object/Class.php b/QuickBooks/QBXML/Object/Class.php index 1dcad7ba..aa19d103 100755 --- a/QuickBooks/QBXML/Object/Class.php +++ b/QuickBooks/QBXML/Object/Class.php @@ -2,37 +2,37 @@ /** * QuickBooks Class object container - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Class extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Class object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID of the Class - * + * * @param string $ListID * @return boolean */ @@ -40,30 +40,30 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of the Class - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** - * + * */ public function setParentListID($ListID) { return $this->set('ParentRef ListID', $ListID); } - + public function getParentListID() { return $this->get('ParentRef ListID'); } - + /** * @deprecated */ @@ -76,12 +76,12 @@ public function setParentFullName($name) { return $this->set('ParentRef FullName', $name); } - + public function getParentFullName() { return $this->get('ParentRef FullName'); } - + /** * @deprecated */ @@ -89,10 +89,10 @@ public function getParentName() { return $this->get('ParentRef FullName'); } - + /** * Set the name of the class - * + * * @param string $name * @return boolean */ @@ -100,19 +100,19 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name of the class - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** - * + * */ public function getFullName() { @@ -123,10 +123,10 @@ public function setFullName($name) { return $this->set('FullName', $name); } - + /** * Set this Class active or not - * + * * @param boolean $value * @return boolean */ @@ -134,30 +134,30 @@ public function setIsActive($value) { return $this->set('IsActive', (boolean) $value); } - + /** * Tell whether or not this class object is active - * + * * @return boolean */ public function getIsActive() { return $this->get('IsActive'); } - + /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this Class object - * + * * @param string $request * @param boolean $nest * @return array @@ -165,13 +165,13 @@ protected function _cleanup() public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -181,13 +181,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version, $locale, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/CreditCardRefund.php b/QuickBooks/QBXML/Object/CreditCardRefund.php index f3c0c676..5df7bc10 100644 --- a/QuickBooks/QBXML/Object/CreditCardRefund.php +++ b/QuickBooks/QBXML/Object/CreditCardRefund.php @@ -2,12 +2,12 @@ /** * QuickBooks CreditCardRefund object - * + * * @author Jayson Lindsley * @author Keith Palmer * * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ @@ -25,7 +25,7 @@ class Quickbooks_QBXML_Object_CreditCardRefund extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Customer object - * + * * @param array $arr */ @@ -68,17 +68,17 @@ public function setARAccountListID($ListID) { return $this->set('ARAccountRef ListID', $ListID); } - + public function setARAccountName($name) { return $this->set('ARAccountRef FullName', $name); } - + public function getARAccountListID() { return $this->get('ARAccountRef ListID'); } - + public function getARAccountName() { return $this->get('ARAccountRef FullName'); @@ -88,17 +88,17 @@ public function setPaymentMethodName($name) { return $this->set('PaymentMethodRef FullName', $name); } - + public function getPaymentMethodName() { return $this->get('PaymentMethodRef FullName'); } - + public function setPaymentMethodListID($ListID) { return $this->set('PaymentMethodRef ListID', $ListID); } - + public function getPaymentMethodListID() { return $this->get('PaymentMethodRef ListID'); @@ -128,13 +128,13 @@ public function setMemo($memo) { return $this->set('Memo', $memo); } - + public function getMemo() { return $this->get('Memo'); } - - public function setRefundAppliedToTxnID($ID) + + public function setRefundAppliedToTxnID($ID) { return $this->set('RefundAppliedToTxnAdd TxnID', $ID); } @@ -248,10 +248,10 @@ public function getAccountFilterFullName() /** * Set the credit card information for this refund - * + * * @param string $cardno The credit card number * @param integer $expmonth The expiration month (1 is January, 2 is February, etc.) - * @param integer $expyear The expiration year + * @param integer $expyear The expiration year * @param string $name The name on the credit card * @param string $address The billing address for the credit card * @param string $postalcode The postal code for the credit card @@ -267,13 +267,13 @@ public function setCreditCardInfo($cardno, $expmonth, $expyear, $name, $address, $b = $this->set('CreditCardInfo NameOnCard', $name); $b = $this->set('CreditCardInfo CreditCardAddress', $address); $b = $this->set('CreditCardInfo CreditCardPostalCode', $postalcode); - + return $b; } /** * Get credit card information from the refund - * + * * @param string $part If you just want a specific part of the card info, specify it here * @param array $defaults Defaults for the card data if you want the entire array * @return mixed If you specify a part, a string part is returned, otherwise an array of card data @@ -284,13 +284,13 @@ public function getCreditCardInfo($part = null, $defaults = array()) { return $this->get('CreditCardInfo ' . $part); } - - return $this->getArray('CreditCardInfo *', $defaults); + + return $this->getArray('CreditCardInfo *', $defaults); } /** * Set the address for the refund (optional) - * + * * @param string $addr1 Address line 1 * @param string $addr2 Address line 2 * @param string $addr3 Address line 3 @@ -310,18 +310,18 @@ public function setAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $addr5 { $this->set('Address Addr' . $i, ${'addr' . $i}); } - + $this->set('Address City', $city); $this->set('Address State', $state); $this->set('Address Province', $province); $this->set('Address PostalCode', $postalcode); $this->set('Address Country', $country); - $this->set('Address Note', $note); + $this->set('Address Note', $note); } /** - * Get the address - * + * Get the address + * * @param string $part A specific portion of the address to get (i.e. "Addr1" or "State") * @param array $defaults Default values if a value isn't filled in * @return array The address @@ -332,13 +332,13 @@ public function getAddress($part = null, $defaults = array()) { return $this->get('Address ' . $part); } - + return $this->getArray('Address *', $defaults); } /** * Set the transaction date - * + * * @param string $date * @return boolean */ @@ -349,7 +349,7 @@ public function setTxnDate($date) /** * Get the transaction date - * + * * @param string $format The format you want the date in (as for {@link http://www.php.net/date}) * @return string */ @@ -370,10 +370,10 @@ public function asArray($request, $nest = true) $this->_cleanup(); return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (ARRefundCreditCardAddRq, or ARRefundCreditCardQuery) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -383,7 +383,7 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = NULL, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } diff --git a/QuickBooks/QBXML/Object/CreditMemo.php b/QuickBooks/QBXML/Object/CreditMemo.php index e3586e1e..f85c3c04 100644 --- a/QuickBooks/QBXML/Object/CreditMemo.php +++ b/QuickBooks/QBXML/Object/CreditMemo.php @@ -2,14 +2,14 @@ /** * QuickBooks CreditCardMemo object container - * + * * @author Jayson Lindsley * @author Keith Palmer * * TODO: Add support for items as per the QBXML spec * * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ @@ -32,7 +32,7 @@ class Quickbooks_QBXML_Object_CreditMemo extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Customer object - * + * * @param array $arr */ @@ -61,9 +61,9 @@ public function getCustomerFullName() return $this->get('CustomerRef FullName'); } - /** + /** * Set the class ListID for this creditmemo line item - * + * * @param string $ListID * @return boolean */ @@ -72,9 +72,9 @@ public function setClassListID($ListID) return $this->set('ClassRef ListID', $ListID); } - /** + /** * Set the class name for this invoice line item - * + * * @param string $name * @return boolean */ @@ -87,12 +87,12 @@ public function setClassFullName($name) { return $this->set('ClassRef FullName', $name); } - + public function getClassListID() { return $this->get('ClassRef ListID'); } - + public function getClassName() { return $this->get('ClassRef FullName'); @@ -100,7 +100,7 @@ public function getClassName() /** * Set the reference number - * + * * @param string $str * @return boolean */ @@ -108,7 +108,7 @@ public function setRefNumber($str) { return $this->set('RefNumber', $str); } - + /** * Alias of {@link QuickBooks_Object_Invoice::setRefNumber()} */ @@ -116,10 +116,10 @@ public function setReferenceNumber($str) { return $this->setRefNumber($str); } - + /** * Get the reference number - * + * * @return string */ public function getRefNumber() @@ -134,7 +134,7 @@ public function getReferenceNumber() { return $this->getRefNumber(); } - + public function setSalesRepName($name) { return $this->set('SalesRepRef FullName', $name); @@ -157,7 +157,7 @@ public function getSalesRepListID() /** * Set the transaction date - * + * * @param string $date * @return boolean */ @@ -168,7 +168,7 @@ public function setTxnDate($date) /** * Get the transaction date - * + * * @param string $format The format you want the date in (as for {@link http://www.php.net/date}) * @return string */ @@ -187,17 +187,17 @@ public function setShipMethodName($name) { return $this->set('ShipMethodRef FullName', $name); } - + public function setShipMethodListID($ListID) { return $this->set('ShipMethodRef ListID', $ListID); } - + public function getShipMethodName() { return $this->get('ShipMethodRef FullName'); } - + public function getShipMethodListID() { return $this->get('ShipMethodRef ListID'); @@ -207,7 +207,7 @@ public function setSalesTaxItemFullName($name) { return $this->set('ItemSalesTaxRef FullName', $name); } - + public function getSalesTaxItemName() { return $this->get('ItemSalesTaxRef FullName'); @@ -218,11 +218,11 @@ public function asList($request) switch ($request) { case 'CreditMemoAddRq': - + if (isset($this->_object['CreditMemoLine'])) { $this->_object['CreditMemoLineAdd'] = $this->_object['CreditMemoLine']; - } + } break; case 'CreditMemoModRq': @@ -230,7 +230,7 @@ public function asList($request) if (isset($this->_object['CreditMemoLine'])) { $this->_object['CreditMemoLineMod'] = $this->_object['CreditMemoLine']; - } + } break; } return parent::asList($request); @@ -242,7 +242,7 @@ public function asXML($root = null, $parent = null, $object = null) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_CREDITMEMO: @@ -270,13 +270,13 @@ protected function _cleanup() public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -285,7 +285,7 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QuickBooks_QBXML_Object::XML_DROP, $indent = "\t", $root = null, $parent = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } diff --git a/QuickBooks/QBXML/Object/CreditMemo/CreditMemoLine.php b/QuickBooks/QBXML/Object/CreditMemo/CreditMemoLine.php index 03d5194d..354287fc 100755 --- a/QuickBooks/QBXML/Object/CreditMemo/CreditMemoLine.php +++ b/QuickBooks/QBXML/Object/CreditMemo/CreditMemoLine.php @@ -2,14 +2,14 @@ /** * QuickBooks CreditMemoLine object class - * + * * @author Jayson Lindsley * @author Keith Palmer * * TODO: Add support for items as per the QBXML spec * - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ @@ -28,7 +28,7 @@ class QuickBooks_QBXML_Object_CreditMemo_CreditMemoLine extends QuickBooks_QBXML { /** * Create a new QuickBooks CreditMemo CreditMemoLine object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -38,7 +38,7 @@ public function __construct($arr = array()) /** * Set the item name for this credit memo line - * + * * @param string $name * @return boolean */ @@ -46,7 +46,7 @@ public function setItemName($name) { return $this->set('ItemRef FullName', $name); } - + //Use this one! public function setItemFullName($FullName) { @@ -55,14 +55,14 @@ public function setItemFullName($FullName) /** * Get the name of the item for this invoice line item - * + * * @return string */ public function getItemName() { return $this->get('ItemRef FullName'); } - + public function getItemFullName() { return $this->get('ItemRef FullName'); @@ -72,7 +72,7 @@ public function setDescription($descrip) { return $this->setDesc($descrip); } - + public function getDescription() { return $this->getDesc(); @@ -87,7 +87,7 @@ public function setQuantity($quan) { return $this->set('Quantity', (float) $quan); } - + public function getQuantity() { return $this->get('Quantity'); @@ -125,7 +125,7 @@ public function getAmount() public function asXML($root = null, $parent = null, $object = null) { $this->_cleanup(); - + switch ($parent) { case QUICKBOOKS_ADD_CREDITMEMO: @@ -137,7 +137,7 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } @@ -150,13 +150,13 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Customer.php b/QuickBooks/QBXML/Object/Customer.php index 70f2b333..f6a284a3 100755 --- a/QuickBooks/QBXML/Object/Customer.php +++ b/QuickBooks/QBXML/Object/Customer.php @@ -2,10 +2,10 @@ /** * QuickBooks Customer object container - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ @@ -22,17 +22,17 @@ class QuickBooks_QBXML_Object_Customer extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Customer object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID of this customer record - * + * * @param string $ListID * @return boolean */ @@ -40,20 +40,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of this customer record - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the ListID of the parent client - * + * * @param string $ListID * @return boolean */ @@ -61,10 +61,10 @@ public function setParentListID($ListID) { return $this->set('ParentRef ListID', $ListID); } - + /** * Set the FullName of the parent client - * + * * @param string $name * @return boolean */ @@ -72,12 +72,12 @@ public function setParentName($name) { return $this->set('ParentRef FullName', $name); } - + public function setParentFullName($FullName) { return $this->set('ParentRef FullName', $FullName); } - + /** * Set the application id of the parent client * @@ -88,20 +88,20 @@ public function setParentApplicationID($id) { return $this->set('ParentRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_LISTID, $id)); } - + /** * Get the ListID of the parent client (if exists) - * + * * @return string */ public function getParentListID() { return $this->get('ParentRef ListID'); } - + /** * Get the FullName of the parent client (if exists) - * + * * @return string */ public function getParentName() @@ -123,14 +123,14 @@ public function setCurrencyListID($lid) { return $this->set('CurrencyRef ListID', $lid); } - + public function setCurrencyFullName($FullName) { return $this->setFullNameType('CurrencyRef FullName', null, null, $FullName); } - + /** * Set the customer type list id */ @@ -138,22 +138,22 @@ public function setCustomerTypeListID($lid) { return $this->set('CustomerTypeRef ListID', $lid); } - + public function setCustomerTypeFullName($FullName) { return $this->setFullNameType('CustomerTypeRef FullName', null, null, $FullName); } - + public function setCustomerTypeName($name) { return $this->set('CustomerTypeRef FullName', $name); } - + public function setCustomerTypeApplicationID($value) { return $this->set('CustomerTypeRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CUSTOMERTYPE, QUICKBOOKS_LISTID, $value)); } - + /** * @deprecated */ @@ -166,12 +166,12 @@ public function setTermsFullName($name) { return $this->set('TermsRef FullName', $name); } - + public function setTermsListID($ListID) { return $this->set('TermsRef ListID', $ListID); } - + /* public function setTermsApplicationID($value) { @@ -182,12 +182,12 @@ public function getTermsApplicationID() { return $this->get('TermsRef ' . QUICKBOOKS_API_APPLICATIONID); }*/ - + public function getTermsName() { return $this->get('TermsRef FullName'); } - + public function getTermsListID() { return $this->get('TermsRef ListID'); @@ -202,12 +202,12 @@ public function setSalesRepFullName($name) { return $this->set('SalesRepRef FullName', $name); } - + public function setSalesRepListID($ListID) { return $this->set('SalesRepRef ListID', $ListID); } - + /* public function setSalesRepApplicationID($value) { @@ -223,50 +223,50 @@ public function getSalesRepName() { return $this->get('SalesRepRef FullName'); } - + public function getSalesRepListID() { return $this->get('SalesRepRef ListID'); - } - - /** - * Set the delivery method - * + } + + /** + * Set the delivery method + * * @see QUICKBOOKS_CUSTOMER_DELIVERYMETHOD_PRINT, QUICKBOOKS_CUSTOMER_DELIVERYMETHOD_EMAIL, QUICKBOOKS_CUSTOMER_DELIVERYMETHOD_FAX - * - * Only supported by QuickBooks Online Edition as of qbXML version 7.0. - * QuickBooks Online Edition has a bug where if you do not provide a - * DeliveryMethod when issueing CustomerAdd or CustomerMod requests, the - * CustomerAdd or CustomerMod request will take a very long time to - * process (2+ minutes sometimes). The fix is to simply provide this tag, - * after which requests process very quickly (2 seconds or less). - * + * + * Only supported by QuickBooks Online Edition as of qbXML version 7.0. + * QuickBooks Online Edition has a bug where if you do not provide a + * DeliveryMethod when issueing CustomerAdd or CustomerMod requests, the + * CustomerAdd or CustomerMod request will take a very long time to + * process (2+ minutes sometimes). The fix is to simply provide this tag, + * after which requests process very quickly (2 seconds or less). + * * @param string $value - * @return boolean + * @return boolean */ public function setDeliveryMethod($value) { return $this->set('DeliveryMethod', $value); } - + /** - * Get the delivery method - * + * Get the delivery method + * * @see QUICKBOOKS_CUSTOMER_DELIVERYMETHOD_PRINT, QUICKBOOKS_CUSTOMER_DELIVERYMETHOD_EMAIL, QUICKBOOKS_CUSTOMER_DELIVERYMETHOD_FAX - * + * * @return string */ public function getDeliveryMethod() { return $this->get('DeliveryMethod'); } - + /** * Set the name of this customer - * - * NOTE: This will be auto-set to ->getFirstName() ->getLastName() if you + * + * NOTE: This will be auto-set to ->getFirstName() ->getLastName() if you * don't set it explicitly. - * + * * @param string $name * @return boolean */ @@ -274,12 +274,12 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name of this customer - * + * * @TODO What should the behavior of this be if "Name" is not set...? - * + * * @return string */ public function getName() @@ -289,10 +289,10 @@ public function getName() /** * Set the full name of this customer (full name) - * - * NOTE: This will be auto-set to ->getName() if you don't set it + * + * NOTE: This will be auto-set to ->getName() if you don't set it * explicitly. - * + * * @param string $name * @return boolean */ @@ -300,20 +300,20 @@ public function setFullName($name) { return $this->setFullNameType('FullName', 'Name', 'ParentRef FullName', $name); } - + /** * Get the name of this customer (full name) - * + * * @return string */ public function getFullName() { return $this->getFullNameType('FullName', 'Name', 'ParentRef FullName'); } - + /** * Set the company name of this customer - * + * * @param string $name * @return boolean */ @@ -321,20 +321,20 @@ public function setCompanyName($name) { return $this->set('CompanyName', $name); } - + /** * Get the company name of this customer - * + * * @return string */ public function getCompanyName() { return $this->get('CompanyName'); } - + /** * Set the first name of this customer - * + * * @param string $name * @return boolean */ @@ -342,20 +342,20 @@ public function setFirstName($fname) { return $this->set('FirstName', $fname); } - + /** * Get the first name of this customer - * + * * @return string */ public function getFirstName() { return $this->get('FirstName'); } - + /** * Set the last name of this customer - * + * * @param string $lname * @return boolean */ @@ -363,68 +363,68 @@ public function setLastName($lname) { return $this->set('LastName', $lname); } - + /** * Get the last name of this customer - * + * * @return string */ public function getLastName() { return $this->get('LastName'); } - + public function setMiddleName($mname) { return $this->set('MiddleName', $mname); } - + public function getMiddleName() { return $this->get('MiddleName'); } - + public function getShipAddress($part = null, $defaults = array()) { return $this->_getXYZAddress('Ship', '', $part, $defaults); } - + public function setShipAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $addr5 = '', $city = '', $state = '', $province = '', $postalcode = '', $country = '', $note = '') { - return $this->_setXYZAddress('Ship', '', $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $province, $postalcode, $country, $note); + return $this->_setXYZAddress('Ship', '', $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $province, $postalcode, $country, $note); } - + public function getBillAddress($part = null, $defaults = array()) { return $this->_getXYZAddress('Bill', '', $part, $defaults); } - + public function setBillAddress( - $addr1, - $addr2 = '', - $addr3 = '', - $addr4 = '', - $addr5 = '', - $city = '', - $state = '', - $province = '', - $postalcode = '', - $country = '', + $addr1, + $addr2 = '', + $addr3 = '', + $addr4 = '', + $addr5 = '', + $city = '', + $state = '', + $province = '', + $postalcode = '', + $country = '', $note = '') { - return $this->_setXYZAddress('Bill', '', $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $province, $postalcode, $country, $note); + return $this->_setXYZAddress('Bill', '', $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $province, $postalcode, $country, $note); } public function getShipAddressBlock($part = null, $defaults = array()) { return $this->_getXYZAddress('Ship', 'Block', $part, $defaults); } - + public function getBillAddressBlock($part = null, $defaults = array()) { return $this->_getXYZAddress('Bill', 'Block', $part, $defaults); } - + protected function _setXYZAddress($pre, $post, $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $province, $postalcode, $country, $note) { $b = FALSE; @@ -432,30 +432,30 @@ protected function _setXYZAddress($pre, $post, $addr1, $addr2, $addr3, $addr4, $ { $b = $this->set($pre . 'Address' . $post . ' Addr' . $i, ${'addr' . $i}); } - + $b = $this->set($pre . 'Address' . $post . ' City', $city); $b = $this->set($pre . 'Address' . $post . ' State', $state); $b = $this->set($pre . 'Address' . $post . ' Province', $province); $b = $this->set($pre . 'Address' . $post . ' PostalCode', $postalcode); $b = $this->set($pre . 'Address' . $post . ' Country', $country); - $b = $this->set($pre . 'Address' . $post . ' Note', $note); + $b = $this->set($pre . 'Address' . $post . ' Note', $note); return $b; } - + protected function _getXYZAddress($pre, $post, $part = null, $defaults = array()) { if (!is_null($part)) { return $this->get($pre . 'Address' . $post . ' ' . $part); } - + return $this->getArray($pre . 'Address' . $post . ' *', $defaults); } - + /** - * - * + * + * * @param string $phone * @return boolean */ @@ -468,10 +468,10 @@ public function getPhone() { return $this->get('Phone'); } - + /** * Set the alternate phone number for this customer - * + * * @param string $phone * @return boolean */ @@ -484,12 +484,12 @@ public function getAltPhone() { return $this->get('AltPhone'); } - + /** * Set the fax number for this customer - * + * * @param string $fax - * @return boolean + * @return boolean */ public function setFax($fax) { @@ -500,10 +500,10 @@ public function getFax() { return $this->get('Fax'); } - + /** * Set the e-mail address for this customer - * + * * @param string $email * @return boolean */ @@ -526,10 +526,10 @@ public function getAccountNumber() { return $this->get('AccountNumber'); } - + /** * Set the contact person for this customer - * + * * @param string $contact * @return boolean */ @@ -537,7 +537,7 @@ public function setContact($contact) { return $this->set('Contact', $contact); } - + /** * Get the name of the contact at this company/customer * @@ -547,10 +547,10 @@ public function getContact() { return $this->get('Contact'); } - + /** * Set the alternate contact for this customer - * + * * @param string $contact * @return boolean */ @@ -558,7 +558,7 @@ public function setAltContact($contact) { return $this->set('AltContact', $contact); } - + /** * Get the name of the alternate contact for this customer/company * @@ -568,10 +568,10 @@ public function getAltContact() { return $this->get('AltContact'); } - + /** * Set the salutation for this customer - * + * * @param string $salut * @return boolean */ @@ -579,47 +579,47 @@ public function setSalutation($salut) { return $this->set('Salutation', $salut); } - + /** - * - * + * + * * @return string */ public function getSalutation() { return $this->get('Salutation'); } - + public function getCustomerTypeApplicationID() { return $this->get('CustomerTypeRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getCustomerTypeListID() { return $this->get('CustomerTypeRef ListID'); } - + public function getCustomerTypeName() { return $this->get('CustomerTypeRef FullName'); } - + public function setOpenBalance($balance) { return $this->set('OpenBalance', (float) $balance); } - + public function getOpenBalance() { return $this->get('OpenBalance'); } - + public function setOpenBalanceDate($date) { return $this->setDateType('OpenBalanceDate', $date); } - + public function getOpenBalanceDate($format = 'Y-m-d') { return $this->getDateType('OpenBalanceDate', $format); @@ -627,7 +627,7 @@ public function getOpenBalanceDate($format = 'Y-m-d') /** * Get the balance for this customer (not including sub-customers or jobs) - * + * * @return float */ public function getBalance() @@ -642,7 +642,7 @@ public function setBalance($value) /** * Get the total balance for this customer and all of this customer's sub-customers/jobs - * + * * @return float */ public function getTotalBalance() @@ -654,17 +654,17 @@ public function setTotalBalance($value) { return $this->set('TotalBalance', $value); } - + public function setSalesTaxCodeName($name) { return $this->set('SalesTaxCodeRef FullName', $name); } - + public function setSalesTaxCodeListID($ListID) { return $this->set('SalesTaxCodeRef ListID', $ListID); } - + public function setSalesTaxCodeApplicationID($value) { return $this->set('SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SALESTAXCODE, QUICKBOOKS_LISTID, $value)); @@ -674,23 +674,23 @@ public function getSalesTaxCodeApplicationID() { return $this->get('SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getSalesTaxCodeName() { return $this->get('SalesTaxCodeRef FullName'); } - + public function getSalesTaxCodeListID() { return $this->get('SalesTaxCodeRef ListID'); } - + /** * Set the credit card information for this customer - * + * * @param string $cardno The credit card number * @param integer $expmonth The expiration month (1 is January, 2 is February, etc.) - * @param integer $expyear The expiration year + * @param integer $expyear The expiration year * @param string $name The name on the credit card * @param string $address The billing address for the credit card * @param string $postalcode The postal code for the credit card @@ -706,13 +706,13 @@ public function setCreditCardInfo($cardno, $expmonth, $expyear, $name, $address, $b = $this->set('CreditCardInfo NameOnCard', $name); $b = $this->set('CreditCardInfo CreditCardAddress', $address); $b = $this->set('CreditCardInfo CreditCardPostalCode', $postalcode); - + return $b; } - + /** * Get credit card information for this customer - * + * * @param string $part If you just want a specific part of the card info, specify it here * @param array $defaults Defaults for the card data if you want the entire array * @return mixed If you specify a part, a string part is returned, otherwise an array of card data @@ -723,30 +723,30 @@ public function getCreditCardInfo($part = null, $defaults = array()) { return $this->get('CreditCardInfo ' . $part); } - - return $this->getArray('CreditCardInfo *', $defaults); + + return $this->getArray('CreditCardInfo *', $defaults); } - + public function setNotes($notes) { return $this->set('Notes', $notes); } - + public function getNotes() { return $this->get('Notes'); } - + public function setPriceLevelName($name) { return $this->set('PriceLevelRef FullName', $name); } - + public function setPriceLevelListID($ListID) { return $this->set('PriceLevelRef ListID', $ListID); } - + public function setPriceLevelApplicationID($value) { return $this->set('PriceLevelRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_PRICELEVEL, QUICKBOOKS_LISTID, $value)); @@ -756,12 +756,12 @@ public function getPriceLevelApplicationID() { return $this->get('PriceLevelRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getPriceLevelName() { return $this->get('PriceLevelRef FullName'); } - + public function setPreferredDeliveryMethod($value) { return $this->set('PreferredDeliveryMethod', $value); @@ -776,7 +776,7 @@ public function getPreferredDeliveryMethod() * Get the price level list id. * * @return string - */ + */ public function getPriceLevelListID() { return $this->get('PriceLevelRef ListID'); @@ -784,14 +784,14 @@ public function getPriceLevelListID() /** * Initializes the default name if one hasn't been set. - * + * * @return boolean */ protected function _cleanup() { //return $this->setNameAsFirstLast(); } - + /** * Returns the customer object as an array * @@ -800,13 +800,13 @@ protected function _cleanup() public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -816,13 +816,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version, $locale, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/CustomerType.php b/QuickBooks/QBXML/Object/CustomerType.php index 0d2807de..af3939c2 100755 --- a/QuickBooks/QBXML/Object/CustomerType.php +++ b/QuickBooks/QBXML/Object/CustomerType.php @@ -2,37 +2,37 @@ /** * QuickBooks CustomerType object container - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_CustomerType extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Class object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID of the Class - * + * * @param string $ListID * @return boolean */ @@ -40,30 +40,30 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of the Class - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** - * + * */ public function setParentListID($ListID) { return $this->set('ParentRef ListID', $ListID); } - + public function getParentListID() { return $this->get('ParentRef ListID'); } - + /** * @deprecated */ @@ -71,7 +71,7 @@ public function setParentName($name) { return $this->set('ParentRef FullName', $name); } - + /** * @deprecated */ @@ -79,30 +79,30 @@ public function getParentName() { return $this->get('ParentRef FullName'); } - + public function setParentFullName($name) { return $this->set('ParentRef FullName', $name); } - + public function getParentFullName() { return $this->get('ParentRef FullName'); } - + public function setParentApplicationID($value) { return $this->set('ParentRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID($this->object(), QUICKBOOKS_LISTID, $value)); } - + public function getParentApplicationID() { return $this->get('ParentRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** * Set the name of the class - * + * * @param string $name * @return boolean */ @@ -110,19 +110,19 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name of the class - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** - * + * */ public function getFullName() { @@ -133,10 +133,10 @@ public function setFullName($name) { return $this->set('FullName', $name); } - + /** * Set this Class active or not - * + * * @param boolean $value * @return boolean */ @@ -144,30 +144,30 @@ public function setIsActive($value) { return $this->setBooleanType('IsActive', $value); } - + /** * Tell whether or not this class object is active - * + * * @return boolean */ public function getIsActive() { return $this->getBooleanType('IsActive'); } - + /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this Class object - * + * * @param string $request * @param boolean $nest * @return array @@ -175,13 +175,13 @@ protected function _cleanup() public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -191,13 +191,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/DataExt.php b/QuickBooks/QBXML/Object/DataExt.php index 5f9a51b5..c7c09d46 100755 --- a/QuickBooks/QBXML/Object/DataExt.php +++ b/QuickBooks/QBXML/Object/DataExt.php @@ -2,37 +2,37 @@ /** * QuickBooks DataExt object container - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_DataExt extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_DataExt object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** - * Set the OwnerID - * + * Set the OwnerID + * * @param string $OwnerID * @return boolean */ @@ -40,57 +40,57 @@ public function setOwnerID($OwnerID) { return $this->set('OwnerID', $OwnerID); } - + /** - * Get the OwnerID - * + * Get the OwnerID + * * @return string */ public function getOwnerID() { return $this->get('OwnerID'); } - + public function setDataExtName($name) { return $this->set('DataExtName', $name); } - + public function getDataExtName() { return $this->get('DataExtName'); } - + public function setListDataExtType($type) { return $this->set('ListDataExtType', $type); } - + public function getListDataExtType() { return $this->get('ListDataExtType'); } - + public function setListObjListID($ListID) { return $this->set('ListObjRef ListID', $ListID); } - + public function getListObjListID() { return $this->get('ListObjRef ListID'); } - + public function setListObjName($name) { return $this->set('ListObjRef FullName', $name); } - + public function getListObjName() { return $this->get('ListObjRef FullName'); } - + public function setListObjApplicationID($value, $type) { return $this->set('ListObjRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID($type, QUICKBOOKS_LISTID, $value)); @@ -100,27 +100,27 @@ public function getListObjApplicationID() { return $this->get('ListObjRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setTxnDataExtType($type) { return $this->set('TxnDataExtType', $type); } - + public function getTxnDataExtType() { return $this->get('TxnDataExtType'); } - + public function setTxnID($TxnID) { return $this->set('TxnID', $TxnID); } - + public function getTxnID() { return $this->get('TxnID'); } - + public function setTxnApplicationID($value) { return $this->set(QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_TRANSACTION, QUICKBOOKS_TXNID, $value)); @@ -135,45 +135,45 @@ public function setTxnLineID($value) { return $this->set('TxnLineID', $value); } - + public function getTxnLineID() { return $this->get('TxnLineID'); } - + public function setOtherDataExtType($type) { return $this->set('OtherDataExtType', $type); } - + public function getOtherDataExtType() { return $this->get('OtherDataExtType'); } - + public function setDataExtValue($value) { return $this->set('DataExtValue', $value); } - + public function getDataExtValue() { return $this->get('DataExtValue'); } - + /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this Class object - * + * * @param string $request * @param boolean $nest * @return array @@ -181,13 +181,13 @@ protected function _cleanup() public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -197,13 +197,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version, $locale, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Department.php b/QuickBooks/QBXML/Object/Department.php index c66a2ba7..d71ca260 100644 --- a/QuickBooks/QBXML/Object/Department.php +++ b/QuickBooks/QBXML/Object/Department.php @@ -2,21 +2,21 @@ /** * QuickBooks Department object container - * + * * @author Thomas Rientjes * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Department extends QuickBooks_QBXML_Object { @@ -29,10 +29,10 @@ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID of the department - * + * * @param string $ListID * @return boolean */ @@ -40,17 +40,17 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of the department - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * @param string $ListID * @return boolean @@ -70,7 +70,7 @@ public function getParentListID() /** * Set the name of the department - * + * * @param string $name * @return boolean */ @@ -78,10 +78,10 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name of the department - * + * * @return string */ public function getName() @@ -109,10 +109,10 @@ public function setFullName($name) { return $this->set('FullName', $name); } - + /** * Set this department active or not - * + * * @param boolean $value * @return boolean */ @@ -120,30 +120,30 @@ public function setIsActive($value) { return $this->set('IsActive', (boolean) $value); } - + /** * Tell whether or not this department object is active - * + * * @return boolean */ public function getIsActive() { return $this->get('IsActive'); } - + /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this department object - * + * * @param string $request * @param boolean $nest * @return array @@ -168,13 +168,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version, $locale, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Deposit.php b/QuickBooks/QBXML/Object/Deposit.php index bff260a6..85466d49 100644 --- a/QuickBooks/QBXML/Object/Deposit.php +++ b/QuickBooks/QBXML/Object/Deposit.php @@ -1,14 +1,14 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -21,7 +21,7 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/Deposit/DepositLine.php'); /** - * + * */ class QuickBooks_QBXML_Object_Deposit extends QuickBooks_QBXML_Object { @@ -29,10 +29,10 @@ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the AccountRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -43,7 +43,7 @@ public function setDepositToAccountListID($ListID) /** * Get the AccountRef ListID for the Check - * + * * @return string */ public function getDepositToAccountListID() @@ -53,7 +53,7 @@ public function getDepositToAccountListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -67,11 +67,11 @@ public function getDepositToAccountApplicationID() return $this->get('DepositToAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - // Path: AccountRef FullName, datatype: - + // Path: AccountRef FullName, datatype: + /** * Set the AccountRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -82,7 +82,7 @@ public function setDepositToAccountFullName($FullName) /** * Get the AccountRef FullName for the Check - * + * * @return string */ public function getDepositToAccountFullName() @@ -91,10 +91,10 @@ public function getDepositToAccountFullName() } // Path: TxnDate, datatype: DATETYPE - + /** * Set the TxnDate for the Check - * + * * @param string $date * @return boolean */ @@ -105,7 +105,7 @@ public function setTxnDate($date) /** * Get the TxnDate for the Check - * + * * @param ? $format = null * @return string */ @@ -119,7 +119,7 @@ public function getTxnDate($format = null) */ public function setTransactionDate($date) { - return $this->setTxnDate($date); + return $this->setTxnDate($date); } /** @@ -130,10 +130,10 @@ public function getTransactionDate($format = null) return $this->getTxnDate($format = null); } // Path: Memo, datatype: STRTYPE - + /** * Set the Memo for the Check - * + * * @param string $value * @return boolean */ @@ -144,19 +144,19 @@ public function setMemo($value) /** * Get the Memo for the Check - * + * * @return string */ public function getMemo() { return $this->get('Memo'); } - + public function setAmount($amount) { return $this->setAmountType('Amount', $amount); } - + public function getAmount() { return $this->getAmountType('Amount'); @@ -166,25 +166,25 @@ public function addDepositLine($obj) { return $this->addListItem('DepositLine', $obj); } - + public function asList($request) { switch ($request) { case 'DepositAddRq': - + if (isset($this->_object['DepositLine'])) { $this->_object['DepositLineAdd'] = $this->_object['DepositLine']; } - + break; case 'DepositModRq': - - + + break; } - + return parent::asList($request); } @@ -194,42 +194,42 @@ public function asXML($root = null, $parent = null, $object = null) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_DEPOSIT: - + foreach ($object['DepositLineAdd'] as $key => $obj) { $obj->setOverride('DepositLineAdd'); - } - + } + break; case QUICKBOOKS_MOD_DEPOSIT: - + foreach ($object['DepositLineMod'] as $key => $obj) { $obj->setOverride('DepositLineMod'); } - + break; } - + return parent::asXML($root, $parent, $object); } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); return parent::asArray($request, $nest); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -240,23 +240,23 @@ public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_X $this->_cleanup(); return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * */ protected function _cleanup() { - + } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() { return QUICKBOOKS_OBJECT_DEPOSIT; - } + } } diff --git a/QuickBooks/QBXML/Object/Deposit/DepositLine.php b/QuickBooks/QBXML/Object/Deposit/DepositLine.php index 60b25bd2..8b2516ae 100755 --- a/QuickBooks/QBXML/Object/Deposit/DepositLine.php +++ b/QuickBooks/QBXML/Object/Deposit/DepositLine.php @@ -1,14 +1,14 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -16,7 +16,7 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Deposit_DepositLine extends QuickBooks_QBXML_Object { @@ -24,27 +24,27 @@ public function __construct($arr = array()) { parent::__construct($arr); } - + public function setPaymentTxnID($TxnID) { return $this->set('PaymentTxnID', $TxnID); } - + public function getPaymentTxnID() { return $this->get('PaymentTxnID'); } - + public function setPaymentTxnLineID($TxnLineID) { return $this->set('PaymentTxnLineID', $TxnLineID); } - + public function getPaymentTxnLineID() { return $this->get('PaymentTxnLineID'); - } - + } + public function setOverrideMemo($value) { return $this->set('OverrideMemo', $value); @@ -52,13 +52,13 @@ public function setOverrideMemo($value) /** * Get the Memo for the Check - * + * * @return string */ public function getOverrideMemo() { return $this->get('OverrideMemo'); - } + } public function setOverrideCheckNumber($value) { @@ -67,18 +67,18 @@ public function setOverrideCheckNumber($value) /** * Get the Memo for the Check - * + * * @return string */ public function getOverrideCheckNumber() { return $this->get('OverrideCheckNumber'); - } + } + - /** * Set the Amount for the Check - * + * * @param string $value * @return boolean */ @@ -89,14 +89,14 @@ public function setAmount($value) /** * Get the Amount for the Check - * + * * @return string */ public function getAmount() { return $this->get('Amount'); } - + public function setMemo($value) { return $this->set('Memo', $value); @@ -104,7 +104,7 @@ public function setMemo($value) /** * Get the Memo for the Check - * + * * @return string */ public function getMemo() @@ -113,11 +113,11 @@ public function getMemo() } - // Path: ClassRef ListID, datatype: - + // Path: ClassRef ListID, datatype: + /** * Set the ClassRef ListID for the Check - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -128,7 +128,7 @@ public function setClassListID($ListID) /** * Get the ClassRef ListID for the Check - * + * * @return string */ public function getClassListID() @@ -138,7 +138,7 @@ public function getClassListID() /** * Set the primary key for the related record within your own application for the Check - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -147,11 +147,11 @@ public function setClassApplicationID($value) return $this->set('ClassRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CLASS, QUICKBOOKS_LISTID, $value)); } - // Path: ClassRef FullName, datatype: - + // Path: ClassRef FullName, datatype: + /** * Set the ClassRef FullName for the Check - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -162,21 +162,21 @@ public function setClassFullName($FullName) /** * Get the ClassRef FullName for the Check - * + * * @return string */ public function getClassFullName() { return $this->get('ClassRef FullName'); } - + public function asXML($root = null, $parent = null, $object = null) { if (is_null($object)) { $object = $this->_object; } - + switch ($parent) { case QUICKBOOKS_ADD_DEPOSIT: @@ -188,33 +188,33 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -225,7 +225,7 @@ public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_X $this->_cleanup(); return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + public function object() { return 'DepositLine'; diff --git a/QuickBooks/QBXML/Object/DiscountItem.php b/QuickBooks/QBXML/Object/DiscountItem.php index ac87d2b6..6fcd4eff 100755 --- a/QuickBooks/QBXML/Object/DiscountItem.php +++ b/QuickBooks/QBXML/Object/DiscountItem.php @@ -2,26 +2,26 @@ /** * QuickBooks ServiceItem object container - * - * NOTE: By default, ServiceItems are created as SalesOrPurchase items, and are - * thus *NOT* created as SalesAndPurchase items. If you want to create an item + * + * NOTE: By default, ServiceItems are created as SalesOrPurchase items, and are + * thus *NOT* created as SalesAndPurchase items. If you want to create an item * that is sold *and* purchased, you'll need to set the type with the method: * -> {@link QuickBooks_Object_ServiceItem::isSalesAndPurchase()} - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_DiscountItem extends QuickBooks_QBXML_Object { @@ -29,10 +29,10 @@ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID for this item - * + * * @param string $ListID * @return boolean */ @@ -40,20 +40,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID for this item - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name for this item - * + * * @param string $name * @return boolean */ @@ -61,17 +61,17 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name for this item - * + * * @return string */ public function getName() { return $this->get('Name'); } - + public function setParentApplicationID($value) { return $this->set('ParentRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_DISCOUNTITEM, QUICKBOOKS_LISTID, $value)); @@ -81,69 +81,69 @@ public function getParentApplicationID() { return $this->get('ParentRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setParentListID($ListID) { return $this->set('ParentRef ListID', $ListID); } - + public function getParentListID() { return $this->get('ParentRef ListID'); } - + public function setParentName($name) { return $this->set('ParentRef FullName', $name); } - + public function getParentName() { return $this->get('ParentRef FullName'); } - + public function setDescription($desc) { return $this->set('ItemDesc', $desc); } - + public function getDescription() { return $this->get('ItemDesc'); } - + public function setSalesTaxCodeName($name) { return $this->set('SalesTaxCodeRef FullName', $name); } - + public function getSalesTaxCodeName() { return $this->get('SalesTaxCodeRef FullName'); } - + /** * Discount rate amount (i.e.: $20 off purchase price) - * + * * @param float $rate - * @return boolean + * @return boolean */ public function setDiscountRate($rate) { return $this->set('DiscountRate', (float) $rate); } - + /** - * + * */ public function getDiscountRate() { return $this->get('DiscountRate'); } - + /** * Discount rate percentage (i.e.: 15% discount) - * + * * @param float $percent * @return boolean */ @@ -151,12 +151,12 @@ public function setDiscountRatePercent($percent) { return $this->set('DiscountRatePercent', (float) $percent); } - + public function getDiscountRatePercent() { return $this->get('DiscountRatePercent'); } - + public function setAccountApplicationID($value) { return $this->set('AccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -166,52 +166,52 @@ public function getAccountApplicationID() { return $this->get('AccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setAccountListID($ListID) { return $this->set('AccountRef ListID', $ListID); } - + public function getAccountListID() { return $this->get('AccountRef ListID'); } - + public function setAccountName($name) { return $this->set('AccountRef FullName', $name); } - + public function getAccountName() { return $this->get('AccountRef FullName'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - - + + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -221,13 +221,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Employee.php b/QuickBooks/QBXML/Object/Employee.php index 21e06bff..ed351662 100755 --- a/QuickBooks/QBXML/Object/Employee.php +++ b/QuickBooks/QBXML/Object/Employee.php @@ -2,10 +2,10 @@ /** * QuickBooks Employee object container - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ @@ -22,17 +22,17 @@ class QuickBooks_QBXML_Object_Employee extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Customer object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID of this customer record - * + * * @param string $ListID * @return boolean */ @@ -40,10 +40,10 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of this customer record - * + * * @return string */ public function getListID() @@ -53,18 +53,18 @@ public function getListID() /** * Get the name of this customer - * + * * @return string */ public function getName() { if (!$this->exists('Name')) - { + { if (!is_null($this->getFirstName()) || !is_null($this->getLastName())) { $this->setNameAsFirstLast(); - } - } - + } + } + return $this->get('Name'); } @@ -75,10 +75,10 @@ public function setName($name) /** * Set the full name of this customer (full name) - * - * NOTE: This will be auto-set to ->getName() if you don't set it + * + * NOTE: This will be auto-set to ->getName() if you don't set it * explicitly. - * + * * @param string $name * @return boolean */ @@ -93,7 +93,7 @@ public function setFullName($name) /** * Get the name of this customer (full name) - * + * * @return string */ public function getFullName() @@ -102,28 +102,28 @@ public function getFullName() { $this->setFullName($this->get('Name')); } - + return $this->get('FullName'); } - /** - * Sets the name as first and last. - * - * @return boolean - */ - public function setNameAsFirstLast() { - $first = $this->getFirstName(); - $last = $this->getLastName(); - if (is_null($first)) { $first = ''; } - if (is_null($last)) { $last = ''; } - - return $this->set('Name', $first .' '. $last); + /** + * Sets the name as first and last. + * + * @return boolean + */ + public function setNameAsFirstLast() { + $first = $this->getFirstName(); + $last = $this->getLastName(); + if (is_null($first)) { $first = ''; } + if (is_null($last)) { $last = ''; } + + return $this->set('Name', $first .' '. $last); } - + /** * Set the first name of this customer - * + * * @param string $name * @return boolean */ @@ -131,20 +131,20 @@ public function setFirstName($fname) { return $this->set('FirstName', $fname); } - + /** * Get the first name of this customer - * + * * @return string */ public function getFirstName() { return $this->get('FirstName'); } - + /** * Set the last name of this customer - * + * * @param string $lname * @return boolean */ @@ -152,65 +152,65 @@ public function setLastName($lname) { return $this->set('LastName', $lname); } - + /** * Get the last name of this customer - * + * * @return string */ public function getLastName() { return $this->get('LastName'); } - + public function setMiddleName($mname) { return $this->set('MiddleName', $mname); } - + public function getMiddleName() { return $this->get('MiddleName'); } - + public function getEmployeeAddress($part = null, $defaults = array()) { return $this->_getXYZAddress('Employee', '', $part, $defaults); } - + public function setEmployeeAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $addr5 = '', $city = '', $state = '', $province = '', $postalcode = '', $country = '', $note = '') { - return $this->_setXYZAddress('Employee', '', $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $province, $postalcode, $country, $note); + return $this->_setXYZAddress('Employee', '', $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $province, $postalcode, $country, $note); } - + protected function _setXYZAddress($pre, $post, $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $province, $postalcode, $country, $note) { for ($i = 1; $i <= 5; $i++) { $this->set($pre . 'Address' . $post . ' Addr' . $i, ${'addr' . $i}); } - + $this->set($pre . 'Address' . $post . ' City', $city); $this->set($pre . 'Address' . $post . ' State', $state); $this->set($pre . 'Address' . $post . ' Province', $province); $this->set($pre . 'Address' . $post . ' PostalCode', $postalcode); $this->set($pre . 'Address' . $post . ' Country', $country); - $this->set($pre . 'Address' . $post . ' Note', $note); + $this->set($pre . 'Address' . $post . ' Note', $note); } - + protected function _getXYZAddress($pre, $post, $part = null, $defaults = array()) { if (!is_null($part)) { return $this->get($pre . 'Address' . $post . ' ' . $part); } - + return $this->getArray($pre . 'Address' . $post . ' *', $defaults); } - + /** - * - * + * + * * @param string $phone * @return boolean */ @@ -223,10 +223,10 @@ public function getPhone() { return $this->get('Phone'); } - + /** * Set the alternate phone number for this customer - * + * * @param string $phone * @return boolean */ @@ -239,12 +239,12 @@ public function getAltPhone() { return $this->get('AltPhone'); } - + /** * Set the fax number for this customer - * + * * @param string $fax - * @return boolean + * @return boolean */ public function setFax($fax) { @@ -255,10 +255,10 @@ public function getFax() { return $this->get('Fax'); } - + /** * Set the e-mail address for this customer - * + * * @param string $email * @return boolean */ @@ -271,10 +271,10 @@ public function getEmail() { return $this->get('Email'); } - + /** * Set the salutation for this customer - * + * * @param string $salut * @return boolean */ @@ -282,94 +282,94 @@ public function setSalutation($salut) { return $this->set('Salutation', $salut); } - + /** - * - * + * + * * @return string */ public function getSalutation() { return $this->get('Salutation'); } - + public function setNotes($notes) { return $this->set('Notes', $notes); } - + public function getNotes() { return $this->get('Notes'); } - + public function setMobile($mobile) { - return $this->set('Mobile', $mobile); + return $this->set('Mobile', $mobile); } - + public function getMobile() { return $this->get('Mobile'); } - + public function setPager($pager) { return $this->set('Pager', $pager); } - + public function getPager() { return $this->get('Pager'); } - + public function setGender($gender) { return $this->set('Gender', $gender); } - + public function getGender() { return $this->get('Gender'); } - + public function setBirthDate($date) { return $this->setDateType('BirthDate', $date); } - + public function getBirthDate($format = 'Y-m-d') { return $this->getDateType('BirthDate', $format); } - - - + + + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - - + + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -379,13 +379,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Estimate.php b/QuickBooks/QBXML/Object/Estimate.php index 99d8a2b0..afa07261 100755 --- a/QuickBooks/QBXML/Object/Estimate.php +++ b/QuickBooks/QBXML/Object/Estimate.php @@ -2,45 +2,45 @@ /** * QuickBooks Estimate object container - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/Generic.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/Estimate/EstimateLine.php'); /** - * - * + * + * */ class QuickBooks_QBXML_Object_Estimate extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks Invoice object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Alias of {@link QuickBooks_Object_Estimate::setTxnID()} */ @@ -48,10 +48,10 @@ public function setTransactionID($TxnID) { return $this->setTxnID($TxnID); } - + /** * Set the transaction ID of the object - * + * * @param string $TxnID * @return boolean */ @@ -67,20 +67,20 @@ public function getTransactionID() { return $this->getTxnID(); } - + /** * Get the transaction ID for this invoice - * + * * @return string */ public function getTxnID() { return $this->get('TxnID'); } - + /** * Set the customer ListID - * + * * @param string $ListID * @return boolean */ @@ -88,10 +88,10 @@ public function setCustomerListID($ListID) { return $this->set('CustomerRef ListID' , $ListID); } - + /** * Set the customer ApplicationID (auto-replaced by the API with a ListID) - * + * * @param mixed $value * @return boolean */ @@ -99,10 +99,10 @@ public function setCustomerApplicationID($value) { return $this->set('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_LISTID, $value)); } - + /** * Set the customer name - * + * * @param string $name * @return boolean */ @@ -110,10 +110,10 @@ public function setCustomerName($name) { return $this->set('CustomerRef FullName', $name); } - + /** * Get the customer ListID - * + * * @return string */ public function getCustomerListID() @@ -123,29 +123,29 @@ public function getCustomerListID() /** * Get the customer application ID - * + * * @return mixed */ public function getCustomerApplicationID() { return $this->extractApplicationID($this->get('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + /** * Get the customer name - * + * * @return string */ public function getCustomerName() { return $this->get('CustomerRef FullName'); } - + public function setClassListID($ListID) { return $this->set('ClassRef ListID', $ListID); } - + public function setClassApplicationID($value) { return $this->set('ClassRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CLASS, QUICKBOOKS_LISTID, $value)); @@ -155,22 +155,22 @@ public function getClassApplicationID() { return $this->get('ClassRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setClassName($name) { return $this->set('ClassRef FullName', $name); } - + public function getClassName() { return $this->get('ClassRef FullName'); } - + public function getClassListID() { return $this->get('ClassRef ListID'); } - + public function setTemplateApplicationID($value) { return $this->set('TemplateRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_TEMPLATE, QUICKBOOKS_LISTID, $value)); @@ -180,30 +180,30 @@ public function getTemplateApplicationID() { return $this->get('TemplateRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setTemplateName($name) { return $this->set('TemplateRef FullName', $name); } - + public function setTemplateListID($ListID) { return $this->set('TemplateRef ListID', $ListID); } - + public function getTemplateName() { return $this->get('TemplateRef FullName'); } - + public function getTemplateListID() { return $this->get('TemplateRef ListID'); } - + /** * Set the transaction date - * + * * @param string $date * @return boolean */ @@ -211,7 +211,7 @@ public function setTxnDate($date) { return $this->setDateType('TxnDate', $date); } - + /** * Alias of {@link QuickBooks_Object_Estimate::setTxnDate()} */ @@ -219,10 +219,10 @@ public function setTransactionDate($date) { return $this->setTxnDate($date); } - + /** * Get the transaction date - * + * * @param string $format * @return string */ @@ -230,7 +230,7 @@ public function getTxnDate($format = 'Y-m-d') { return $this->getDateType('TxnDate', $format); } - + /** * Alias of {@link QuickBooks_Object_Estimate::getTxnDate()} */ @@ -238,10 +238,10 @@ public function getTransactionDate($format = 'Y-m-d') { return $this->getDateType('TxnDate', $format); } - + /** * Set the reference number - * + * * @param string $str * @return boolean */ @@ -249,20 +249,20 @@ public function setRefNumber($str) { return $this->set('RefNumber', $str); } - + /** * Get the reference number - * + * * @return string */ public function getRefNumber() { return $this->get('RefNumber'); } - + /** - * - * + * + * * @param string $part * @param array $defaults * @return array @@ -273,13 +273,13 @@ public function getRefNumber() { return $this->get('ShipAddress ' . $part); } - + return $this->getArray('ShipAddress *', $defaults); }*/ - + /** * Set the shipping address for the invoice - * + * * @param string $addr1 * @param string $addr2 * @param string $addr3 @@ -298,18 +298,18 @@ public function getRefNumber() { $this->set('ShipAddress Addr' . $i, ${'addr' . $i}); } - + $this->set('ShipAddress City', $city); $this->set('ShipAddress State', $state); $this->set('ShipAddress Province', $province); $this->set('ShipAddress PostalCode', $postalcode); $this->set('ShipAddress Country', $country); - $this->set('ShipAddress Note', $note); + $this->set('ShipAddress Note', $note); }*/ - + /** - * - * + * + * * @param string $part * @param array $defaults * @return array @@ -320,13 +320,13 @@ public function getBillAddress($part = null, $defaults = array()) { return $this->get('BillAddress ' . $part); } - + return $this->getArray('BillAddress *', $defaults); } - + /** * Set the billing address for the invoice - * + * * @param string $addr1 * @param string $addr2 * @param string $addr3 @@ -345,30 +345,30 @@ public function setBillAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $a { $this->set('BillAddress Addr' . $i, ${'addr' . $i}); } - + $this->set('BillAddress City', $city); $this->set('BillAddress State', $state); $this->set('BillAddress Province', $province); $this->set('BillAddress PostalCode', $postalcode); $this->set('BillAddress Country', $country); - $this->set('BillAddress Note', $note); + $this->set('BillAddress Note', $note); } - + public function setPONumber($num) { return $this->set('PONumber', $num); } - + public function getPONumber() { return $this->get('PONumber'); } - + public function setTermsListID($ListID) { return $this->set('TermsRef ListID', $ListID); } - + public function setTermsApplicationID($value) { return $this->set('TermsRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_TERMS, QUICKBOOKS_LISTID, $value)); @@ -378,42 +378,42 @@ public function getTermsApplicationID() { return $this->get('TermsRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setTermsName($name) { return $this->set('TermsRef FullName', $name); } - + public function getTermsName() { return $this->get('TermsRef FullName'); } - + public function getTermsListID() { return $this->get('TermsRef ListID'); } - + public function setDueDate($date) { return $this->setDateType('DueDate', $date); } - + public function getDueDate($format = 'Y-m-d') { return $this->getDateType('DueDate', $format); } - + public function setSalesRepName($name) { return $this->set('SalesRepRef FullName', $name); } - + public function setSalesRepListID($ListID) { return $this->set('SalesRepRef ListID', $ListID); } - + public function setSalesRepApplicationID($value) { return $this->set('SalesRepRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SALESREP, QUICKBOOKS_LISTID, $value)); @@ -423,32 +423,32 @@ public function getSalesRepApplicationID() { return $this->get('SalesRepRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getSalesRepName() { return $this->get('SalesRepRef FullName'); } - + public function getSalesRepListID() { return $this->get('SalesRepRef ListID'); } - + public function getFOB() { return $this->get('FOB'); } - + public function setFOB($fob) { return $this->set('FOB', $fob); } - + public function setSalesTaxItemListID($ListID) { return $this->set('ItemSalesTaxRef ListID', $ListID); } - + public function setSalesTaxItemApplicationID($value) { return $this->set('ItemSalesTaxRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SALESTAXITEM, QUICKBOOKS_LISTID, $value)); @@ -458,85 +458,85 @@ public function getSalesTaxItemApplicationID() { return $this->get('ItemSalesTaxRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setSalesTaxItemName($name) { return $this->set('ItemSalesTaxRef FullName', $name); } - + public function getSalesTaxItemName() { return $this->get('ItemSalesTaxRef FullName'); } - + public function getSalesTaxItemListID() { return $this->get('ItemSalesTaxRef ListID'); } - + public function setMemo($memo) { return $this->set('Memo', $memo); } - + public function getMemo() { return $this->get('Memo'); } - + public function setIsToBeEmailed($emailed) { return $this->setBooleanType('IsToBeEmailed', $emailed); } - + public function getIsToBeEmailed() { return $this->getBooleanType('IsToBeEmailed'); } - + public function setCustomerSalesTaxCodeListID($ListID) { return $this->set('CustomerSalesTaxCodeRef ListID', $ListID); } - + public function setCustomerSalesTaxCodeName($name) { return $this->set('CustomerSalesTaxCodeRef FullName', $name); } - + public function getCustomerSalesTaxCodeListID() { return $this->get('CustomerSalesTaxCodeRef ListID'); } - + public function getCustomerSalesTaxCodeName() { return $this->get('CustomerSalesTaxCodeRef FullName'); } - + /** - * - * - * @param + * + * + * @param */ public function addEstimateLine($obj) { return $this->addListItem('EstimateLine', $obj); } - + public function setEstimateLine($i, $obj) { - + } - + public function setEstimateLineData($i, $key, $value) { $lines = $this->getEstimateLines(); if (isset($lines[$i])) { - + } - + return $this->set('EstimateLine', $lines); } @@ -544,7 +544,7 @@ public function getEstimateLineData() { return $this->get('EstimateLine'); } - + public function getEstimateLine($i) { return $this->getListItem('EstimateLine', $i); @@ -559,69 +559,69 @@ public function listEstimateLines() { return $this->getList('EstimateLine'); } - + public function setOther($other) { return $this->set('Other', $other); } - + public function getOther() { return $this->get('Other'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + public function asList($request) { switch ($request) { case 'EstimateAddRq': - + if (isset($this->_object['EstimateLine'])) { $this->_object['EstimateLineAdd'] = $this->_object['EstimateLine']; } - + break; case 'EstimateModRq': - + if (isset($this->_object['EstimateLine'])) { - $this->_object['EstimateLineMod'] = $this->_object['EstimateLine']; + $this->_object['EstimateLineMod'] = $this->_object['EstimateLine']; } - + break; } - + return parent::asList($request); } - + public function asXML($root = null, $parent = null, $object = null) { if (is_null($object)) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_ESTIMATE: - + foreach ($object['EstimateLineAdd'] as $key => $obj) { $obj->setOverride('EstimateLineAdd'); } - + break; case QUICKBOOKS_MOD_ESTIMATE: if (isset($object['EstimateLine'])) @@ -630,23 +630,23 @@ public function asXML($root = null, $parent = null, $object = null) } break; } - + return parent::asXML($root, $parent, $object); } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -655,13 +655,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null, $parent = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Estimate/EstimateLine.php b/QuickBooks/QBXML/Object/Estimate/EstimateLine.php index a03d2bc6..f639cf4b 100755 --- a/QuickBooks/QBXML/Object/Estimate/EstimateLine.php +++ b/QuickBooks/QBXML/Object/Estimate/EstimateLine.php @@ -1,60 +1,60 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/Estimate.php'); /** - * - * + * + * */ class QuickBooks_QBXML_Object_Estimate_EstimateLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks Invoice InvoiceLine object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + public function setItemListID($ListID) { return $this->set('ItemRef ListID', $ListID); } - + public function setItemApplicationID($value) { return $this->set('ItemRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ITEM, QUICKBOOKS_LISTID, $value)); } - + public function setItemName($name) { return $this->set('ItemRef FullName', $name); } - + public function getItemListID() { return $this->get('ItemRef ListID'); } - + public function getItemName() { return $this->get('ItemRef FullName'); @@ -62,228 +62,228 @@ public function getItemName() /** * Get the item application ID - * + * * @return mixed */ public function getItemApplicationID() { return $this->extractApplicationID($this->get('ItemRef ' . QUICKBOOKS_API_APPLICATIONID)); } - - + + public function setDescription($descrip) { return $this->set('Desc', $descrip); } - + public function getDescription() { return $this->get('Desc'); } - + public function setQuantity($quan) { return $this->set('Quantity', (float) $quan); } - + public function getQuantity() { return $this->get('Quantity'); } - + public function setUnitOfMeasure($unit) { return $this->set('UnitOfMeasure', $unit); } - + public function getUnitOfMeasure() { return $this->get('UnitOfMeasure'); } - + public function setRate($rate) { return $this->set('Rate', (float) $rate); } - + public function getRate() { return $this->get('Rate'); } - + public function setRatePercent($percent) { return $this->set('RatePercent', (float) $percent); } - + public function getRatePercent() { return $this->get('RatePercent'); } - + public function setClassListID($ListID) { return $this->set('ClassRef ListID', $ListID); } - + public function setClassApplicationID($value) { - + } - + public function setClassName($name) { return $this->set('ClassRef Name', $name); } - + public function getClassListID() { return $this->get('ClassRef ListID'); } - + public function getClassName() { return $this->get('ClassRef FullName'); } - + public function setAmount($amount) { return $this->setAmountType('Amount', $amount); } - + public function getAmount() { return $this->getAmountType('Amount'); } - + public function setSalesTaxCodeName($name) { return $this->set('SalesTaxCodeRef FullName', $name); } - + public function setSalesTaxCodeListID($ListID) { return $this->set('SalesTaxCodeRef ListID', $ListID); } - + public function getSalesTaxCodeName() { return $this->get('SalesTaxCodeRef FullName'); } - + public function getSalesTaxCodeListID() { return $this->get('SalesTaxCodeRef ListID'); } - + public function setTaxable() { return $this->set('SalesTaxCodeRef FullName', QUICKBOOKS_TAXABLE); } - + public function setNonTaxable() { return $this->set('SalesTaxCodeRef FullName', QUICKBOOKS_NONTAXABLE); } - + public function getTaxable() { return $this->get('SalesTaxCodeRef FullName') == QUICKBOOKS_TAXABLE; } - + public function getMarkupRate() { return $this->get('MarkupRate'); } - + public function setMarkupRate($rate) { return $this->set('MarkupRate', (float) $rate); } - + public function setMarkupRatePercent($percent) { return $this->set('MarkupRatePercent', (float) $percent); } - + public function getMarkupRatePercent() { return $this->get('MarkupRatePercent'); } - + public function setPriceLevelListID($ListID) { return $this->set('PriceLevelRef ListID', $ListID); } - + public function setPriceLevelName($name) { return $this->set('PriceLevelRef FullName', $name); } - + public function setPriceLevelApplicationID() { - + } - + public function getPriceLevelName() { return $this->get('PriceLevelRef FullName'); } - + public function getPriceLevelListID() { return $this->get('PriceLevelRef ListID'); } - + public function setOverrideItemAccountName($name) { return $this->set('OverrideItemAccountRef FullName', $name); } - + public function setOverrideItemAccountListID($ListID) { return $this->set('OverrideItemAccountRef ListID', $ListID); } - + public function setOverrideItemAccountApplicationID($value) { - + } - + public function getOverrideItemAccountListID() { return $this->get('OverrideItemAccountRef ListID'); } - + public function getOverrideItemAccountName() { return $this->get('OverrideItemAccountRef FullName'); } - + public function setOther1($value) { return $this->set('Other1', $value); } - + public function getOther1() { return $this->get('Other1'); } - + public function setOther2($value) { return $this->set('Other2', $value); } - + public function getOther2() { return $this->get('Other2'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() @@ -292,24 +292,24 @@ protected function _cleanup() { $this->set('Amount', sprintf('%01.2f', $this->get('Amount'))); } - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { $this->_cleanup(); - + switch ($parent) { case QUICKBOOKS_ADD_ESTIMATE: @@ -321,13 +321,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -336,13 +336,13 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/FixedAssetItem.php b/QuickBooks/QBXML/Object/FixedAssetItem.php index 760e6ebb..e1e1d040 100755 --- a/QuickBooks/QBXML/Object/FixedAssetItem.php +++ b/QuickBooks/QBXML/Object/FixedAssetItem.php @@ -2,24 +2,24 @@ /** * QuickBooks InventoryItem object container - * + * * @todo Verify the get/set methods on this one... it was copied from NonInventoryItem * @todo Add isActive(), getIsActive(), etc. methods - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_FixedAssetItem extends QuickBooks_QBXML_Object { @@ -27,10 +27,10 @@ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID for this item - * + * * @param string $ListID * @return boolean */ @@ -38,20 +38,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID for this item - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name for this item - * + * * @param string $name * @return boolean */ @@ -59,20 +59,20 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name for this item - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** * Set the description of this item - * + * * @param string $descrip * @return boolean */ @@ -85,10 +85,10 @@ public function getSalesDescription() { return $this->get('SalesDesc'); } - + /** * Set the price for this item - * + * * @param string $price * @return boolean */ @@ -96,7 +96,7 @@ public function setSalesPrice($price) { return $this->set('SalesPrice', sprintf('%01.2f', (float) $price)); } - + /** * Get the price for this item */ @@ -104,10 +104,10 @@ public function getSalesPrice() { return $this->get('SalesPrice'); } - + /** * Set the account ListID for this item - * + * * @param string $ListID * @return string */ @@ -115,7 +115,7 @@ public function setIncomeAccountListID($ListID) { return $this->set('IncomeAccountRef ListID', $ListID); } - + /** * (Sales OR Purchase) */ @@ -123,7 +123,7 @@ public function setIncomeAccountName($name) { return $this->set('IncomeAccountRef FullName', $name); } - + /** * (Sales OR Purchase) */ @@ -136,83 +136,83 @@ public function getIncomeAccountApplicationID() { return $this->get('IncomeAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** - * + * */ public function getIncomeAccountListID() { return $this->get('IncomeAccountRef ListID'); } - + /** - * + * */ public function getIncomeAccountName() { return $this->get('IncomeAccountRef FullName'); } - + public function setAssetAccountName($name) { return $this->set('AssetAccountRef FullName', $name); } - + public function getAssetAccountName() { return $this->get('AssetAccountRef FullName'); } - + public function setAssetAccountListID($ListID) { return $this->set('AssetAccountRef ListID', $ListID); } - + public function getAssetAccountListID() { return $this->get('AssetAccountRef ListID'); } - + public function setAssetAccountApplicationID($value) { return $this->set('AssetAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); } - + public function getAssetAccountApplicationID() { return $this->get('AssetAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setPurchaseDescription($desc) { return $this->set('PurchaseDesc', $desc); } - + public function getPurchaseDescription() { return $this->get('PurchaseDesc'); } - + public function setPurchaseCost($cost) { return $this->set('PurchaseCost', sprintf('%01.2f', (float) $cost)); } - + public function getPurchaseCost() { return $this->get('PurchaseCost'); } - + public function setCOGSAccountListID($ListID) { return $this->set('COGSAccountRef ListID', $ListID); } - + public function setCOGSAccountName($name) { return $this->set('COGSAccountRef FullName', $name); } - + public function setCOGSAccountApplicationID($value) { return $this->set('COGSAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -222,27 +222,27 @@ public function getCOGSAccountApplicationID() { return $this->get('COGSAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getCOGSAccountListID() { return $this->get('COGSAccountRef ListID'); } - + public function getCOGSAccountName() { return $this->get('COGSAccountRef FullName'); } - + public function setPreferredVendorListID($ListID) { return $this->set('PrefVendorRef ListID', $ListID); } - + public function setPreferredVendorName($name) { return $this->set('PrefVendorRef FullName', $name); } - + public function setPreferredVendorApplicationID($value) { return $this->set('PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_VENDOR, QUICKBOOKS_LISTID, $value)); @@ -252,41 +252,41 @@ public function getPreferredVendorApplicationID() { return $this->get('PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getPreferredVendorListID() { return $this->get('PrefVendorRef ListID'); } - + public function getPreferredVendorName() { return $this->get('PrefVendorRef FullName'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -296,13 +296,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Generic.php b/QuickBooks/QBXML/Object/Generic.php index 1aee8326..cc213050 100755 --- a/QuickBooks/QBXML/Object/Generic.php +++ b/QuickBooks/QBXML/Object/Generic.php @@ -2,71 +2,71 @@ /** * QuickBooks Customer object container - * + * * Not used, might be used in future versions - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Generic extends QuickBooks_QBXML_Object { protected $_override; - + public function __construct($arr = array(), $override = '') { $this->_override = $override; - + parent::__construct($arr); } - + public function getOverride() { return $this->_override; } - + public function setOverride($override) { $this->_override = $override; - + return true; } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -76,13 +76,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/GroupItem.php b/QuickBooks/QBXML/Object/GroupItem.php index 0493d215..2f398206 100644 --- a/QuickBooks/QBXML/Object/GroupItem.php +++ b/QuickBooks/QBXML/Object/GroupItem.php @@ -2,24 +2,24 @@ /** * QuickBooks InventoryItem object container - * + * * @todo Verify the get/set methods on this one... it was copied from NonInventoryItem * @todo Add isActive(), getIsActive(), etc. methods - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_GroupItem extends QuickBooks_QBXML_Object { @@ -27,10 +27,10 @@ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID for this item - * + * * @param string $ListID * @return boolean */ @@ -38,20 +38,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID for this item - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name for this item - * + * * @param string $name * @return boolean */ @@ -59,20 +59,20 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name for this item - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** * Set the description of this item - * + * * @param string $descrip * @return boolean */ @@ -85,10 +85,10 @@ public function getSalesDescription() { return $this->get('SalesDesc'); } - + /** * Set the price for this item - * + * * @param string $price * @return boolean */ @@ -96,7 +96,7 @@ public function setSalesPrice($price) { return $this->set('SalesPrice', sprintf('%01.2f', (float) $price)); } - + /** * Get the price for this item */ @@ -104,10 +104,10 @@ public function getSalesPrice() { return $this->get('SalesPrice'); } - + /** * Set the account ListID for this item - * + * * @param string $ListID * @return string */ @@ -115,7 +115,7 @@ public function setIncomeAccountListID($ListID) { return $this->set('IncomeAccountRef ListID', $ListID); } - + /** * (Sales OR Purchase) */ @@ -123,7 +123,7 @@ public function setIncomeAccountName($name) { return $this->set('IncomeAccountRef FullName', $name); } - + /** * (Sales OR Purchase) */ @@ -136,43 +136,43 @@ public function getIncomeAccountApplicationID() { return $this->get('IncomeAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** - * + * */ public function getIncomeAccountListID() { return $this->get('IncomeAccountRef ListID'); } - + /** - * + * */ public function getIncomeAccountName() { return $this->get('IncomeAccountRef FullName'); } - + public function setAssetAccountName($name) { return $this->set('AssetAccountRef FullName', $name); } - + public function getAssetAccountName() { return $this->get('AssetAccountRef FullName'); } - + public function setAssetAccountListID($ListID) { return $this->set('AssetAccountRef ListID', $ListID); } - + public function getAssetAccountListID() { return $this->get('AssetAccountRef ListID'); } - + public function setAssetAccountApplicationID($value) { return $this->set('AssetAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -182,37 +182,37 @@ public function getAssetAccountApplicationID() { return $this->get('AssetAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setPurchaseDescription($desc) { return $this->set('PurchaseDesc', $desc); } - + public function getPurchaseDescription() { return $this->get('PurchaseDesc'); } - + public function setPurchaseCost($cost) { return $this->set('PurchaseCost', sprintf('%01.2f', (float) $cost)); } - + public function getPurchaseCost() { return $this->get('PurchaseCost'); } - + public function setCOGSAccountListID($ListID) { return $this->set('COGSAccountRef ListID', $ListID); } - + public function setCOGSAccountName($name) { return $this->set('COGSAccountRef FullName', $name); } - + public function setCOGSAccountApplicationID($value) { return $this->set('COGSAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -222,27 +222,27 @@ public function getCOGSAccountApplicationID() { return $this->get('COGSAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getCOGSAccountListID() { return $this->get('COGSAccountRef ListID'); } - + public function getCOGSAccountName() { return $this->get('COGSAccountRef FullName'); } - + public function setPreferredVendorListID($ListID) { return $this->set('PrefVendorRef ListID', $ListID); } - + public function setPreferredVendorName($name) { return $this->set('PrefVendorRef FullName', $name); } - + public function setPreferredVendorApplicationID($value) { return $this->set('PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_VENDOR, QUICKBOOKS_LISTID, $value)); @@ -252,41 +252,41 @@ public function getPreferredVendorApplicationID() { return $this->get('PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getPreferredVendorListID() { return $this->get('PrefVendorRef ListID'); } - + public function getPreferredVendorName() { return $this->get('PrefVendorRef FullName'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -296,13 +296,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/InventoryAdjustment.php b/QuickBooks/QBXML/Object/InventoryAdjustment.php index 11c8d852..ca557355 100644 --- a/QuickBooks/QBXML/Object/InventoryAdjustment.php +++ b/QuickBooks/QBXML/Object/InventoryAdjustment.php @@ -236,7 +236,7 @@ public function getTxnID() { return $this->get('TxnID'); } - + public function setTxnID($TxnID) { return $this->set('TxnID', $TxnID); @@ -246,17 +246,17 @@ public function getRefNumberCaseSensitive() { return $this->get('RefNumberCaseSensitive'); } - + public function setRefNumberCaseSensitive($value) { return $this->set('RefNumberCaseSensitive', $value); } - + public function getMaxReturned() { return $this->get('MaxReturned'); } - + public function setMaxReturned($max) { return $this->set('MaxReturned', $max); @@ -266,47 +266,47 @@ public function getFromModifiedDate() { return $this->get('ModifiedDateRangeFilter FromModifiedDate'); } - + public function setFromModifiedDate($date) { return $this->set('ModifiedDateRangeFilter FromModifiedDate', $date); } - + public function getToModifiedDate() { return $this->get('ModifiedDateRangeFilter ToModifiedDate'); } - + public function setToModifiedDate($date) { return $this->set('ModifiedDateRangeFilter ToModifiedDate', $date); } - + public function getFromTxnDate() { return $this->get('TxnDateRangeFilter FromTxnDate'); } - + public function setFromTxnDate($date) { return $this->set('TxnDateRangeFilter FromTxnDate', $date); } - + public function getToTxnDate() { return $this->get('TxnDateRangeFilter ToTxnDate'); } - + public function setToTxnDate($date) { return $this->set('TxnDateRangeFilter ToTxnDate', $date); } - + public function getDateMacro() { return $this->get('TxnDateRangeFilter DateMacro'); } - + public function setDateMacro($macro) { return $this->set('TxnDateRangeFilter DateMacro', $macro); @@ -316,37 +316,37 @@ public function getEntityListID() { return $this->get('EntityFilter ListID'); } - + public function setEntityListID($listid) { return $this->set('EntityFilter ListID', $listid); } - + public function getEntityFullName() { return $this->get('EntityFilter FullName'); } - + public function setEntityFullName($name) { return $this->set('EntityFilter FullName', $name); } - + public function getEntityListIDWithChildren() { return $this->get('EntityFilter ListIDWithChildren'); } - + public function setEntityListIDWithChildren($listid) { return $this->set('EntityFilter ListIDWithChildren', $listid); } - + public function getEntityFullNameWithChildren() { return $this->get('EntityFilter FullNameWithChildren'); } - + public function setEntityFullNameWithChildren($name) { return $this->set('EntityFilter FullNameWithChildren', $name); @@ -356,37 +356,37 @@ public function getFilterAccountListID() { return $this->get('AccountFilter ListID'); } - + public function setFilterAccountListID($listid) { return $this->set('AccountFilter ListID', $listid); } - + public function getFilterAccountFullName() { return $this->get('AccountFilter FullName'); } - + public function setFilterAccountFullName($name) { return $this->set('AccountFilter FullName', $name); } - + public function getFilterAccountListIDWithChildren() { return $this->get('AccountFilter ListIDWithChildren'); } - + public function setFilterAccountListIDWithChildren($listid) { return $this->set('AccountFilter ListIDWithChildren', $listid); } - + public function getFilterAccountFullNameWithChildren() { return $this->get('AccountFilter FullNameWithChildren'); } - + public function setFilterAccountFullNameWithChildren($name) { return $this->set('AccountFilter FullNameWithChildren', $name); @@ -396,37 +396,37 @@ public function getFilterItemListID() { return $this->get('ItemFilter ListID'); } - + public function setFilterItemListID($listid) { return $this->set('ItemFilter ListID', $listid); } - + public function getFilterItemName() { return $this->get('ItemFilter FullName'); } - + public function setFilterItemName($name) { return $this->set('ItemFilter FullName', $name); } - + public function getFilterItemListIDWithChildren() { return $this->get('ItemFilter ListIDWithChildren'); } - + public function setFilterItemListIDWithChildren($listid) { return $this->set('ItemFilter ListIDWithChildren', $listid); } - + public function getFilterItemFullNameWithChildren() { return $this->get('ItemFilter FullNameWithChildren'); } - + public function setFilterItemFullNameWithChildren($name) { return $this->set('ItemFilter FullNameWithChildren', $name); @@ -436,37 +436,37 @@ public function getFilterRefNumberMatchCriterion() { return $this->get('RefNumberFilter MatchCriterion'); } - + public function setFilterRefNumberMatchCriterion($refnumber) { return $this->set('RefNumberFilter MatchCriterion', $refnumber); } - + public function getFilterRefNumberRefNumber() { return $this->get('RefNumberFilter RefNumber'); } - + public function setFilterRefNumberRefNumber($refnumber) { return $this->set('RefNumberFilter RefNumber', $refnumber); } - + public function getFilterRefNumberRangeFromRefNumber() { return $this->get('RefNumberRangeFilter FromRefNumber'); } - + public function setFilterRefNumberRangeFromRefNumber($refnumber) { return $this->set('RefNumberRangeFilter FromRefNumber', $refnumber); } - + public function getFilterRefNumberRangeToRefNumber() { return $this->get('RefNumberRangeFilter ToRefNumber'); } - + public function setFilterRefNumberRangeToRefNumber($refnumber) { return $this->set('RefNumberRangeFilter ToRefNumber', $refnumber); @@ -478,27 +478,27 @@ public function getIncludeLineItems() { return $this->get('IncludeLineItems'); } - + public function setIncludeLineItems($) { return $this->set('IncludeLineItems', $); } - + public function getIncludeRetElement() { return $this->get('IncludeRetElement'); } - + public function setIncludeRetElement($) { return $this->set('IncludeRetElement', $); } - + public function getOwnerID() { return $this->get('OwnerID'); } - + public function setOwnerID($) { return $this->set('OwnerID', $); @@ -547,7 +547,7 @@ public function asXML($root = null, $parent = null, $object = null) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_INVENTORYADJUSTMENT: diff --git a/QuickBooks/QBXML/Object/InventoryAdjustment/InventoryAdjustmentLine.php b/QuickBooks/QBXML/Object/InventoryAdjustment/InventoryAdjustmentLine.php index 3abdcfa3..21b038ec 100644 --- a/QuickBooks/QBXML/Object/InventoryAdjustment/InventoryAdjustmentLine.php +++ b/QuickBooks/QBXML/Object/InventoryAdjustment/InventoryAdjustmentLine.php @@ -117,7 +117,7 @@ public function asXML($root = null, $parent = null, $object = null) { $object = $this->_object; } - + switch ($parent) { case QUICKBOOKS_ADD_INVENTORYADJUSTMENT: diff --git a/QuickBooks/QBXML/Object/InventoryAssemblyItem.php b/QuickBooks/QBXML/Object/InventoryAssemblyItem.php index e0cacbef..e13dab26 100755 --- a/QuickBooks/QBXML/Object/InventoryAssemblyItem.php +++ b/QuickBooks/QBXML/Object/InventoryAssemblyItem.php @@ -2,24 +2,24 @@ /** * QuickBooks InventoryItem object container - * + * * @todo Verify the get/set methods on this one... it was copied from NonInventoryItem * @todo Add isActive(), getIsActive(), etc. methods - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_InventoryAssemblyItem extends QuickBooks_QBXML_Object { @@ -27,10 +27,10 @@ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID for this item - * + * * @param string $ListID * @return boolean */ @@ -38,30 +38,30 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID for this item - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + public function setFullName($fullname) { return $this->setFullNameType('FullName', 'Name', 'ParentRef FullName', $fullname); } - + public function getFullName() { return $this->getFullNameType('FullName', 'Name', 'ParentRef FullName'); - } - + } + /** * Set the name for this item - * + * * @param string $name * @return boolean */ @@ -69,20 +69,20 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name for this item - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** * Set the description of this item - * + * * @param string $descrip * @return boolean */ @@ -95,10 +95,10 @@ public function getSalesDescription() { return $this->get('SalesDesc'); } - + /** * Set the price for this item - * + * * @param string $price * @return boolean */ @@ -106,7 +106,7 @@ public function setSalesPrice($price) { return $this->set('SalesPrice', sprintf('%01.2f', (float) $price)); } - + /** * Get the price for this item */ @@ -114,10 +114,10 @@ public function getSalesPrice() { return $this->get('SalesPrice'); } - + /** * Set the account ListID for this item - * + * * @param string $ListID * @return string */ @@ -125,7 +125,7 @@ public function setIncomeAccountListID($ListID) { return $this->set('IncomeAccountRef ListID', $ListID); } - + /** * (Sales OR Purchase) */ @@ -133,7 +133,7 @@ public function setIncomeAccountName($name) { return $this->set('IncomeAccountRef FullName', $name); } - + /** * (Sales OR Purchase) */ @@ -146,43 +146,43 @@ public function getIncomeAccountApplicationID() { return $this->get('IncomeAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** - * + * */ public function getIncomeAccountListID() { return $this->get('IncomeAccountRef ListID'); } - + /** - * + * */ public function getIncomeAccountName() { return $this->get('IncomeAccountRef FullName'); } - + public function setAssetAccountName($name) { return $this->set('AssetAccountRef FullName', $name); } - + public function getAssetAccountName() { return $this->get('AssetAccountRef FullName'); } - + public function setAssetAccountListID($ListID) { return $this->set('AssetAccountRef ListID', $ListID); } - + public function getAssetAccountListID() { return $this->get('AssetAccountRef ListID'); } - + public function setAssetAccountApplicationID($value) { return $this->set('AssetAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -192,37 +192,37 @@ public function getAssetAccountApplicationID() { return $this->get('AssetAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setPurchaseDescription($desc) { return $this->set('PurchaseDesc', $desc); } - + public function getPurchaseDescription() { return $this->get('PurchaseDesc'); } - + public function setPurchaseCost($cost) { return $this->set('PurchaseCost', sprintf('%01.2f', (float) $cost)); } - + public function getPurchaseCost() { return $this->get('PurchaseCost'); } - + public function setCOGSAccountListID($ListID) { return $this->set('COGSAccountRef ListID', $ListID); } - + public function setCOGSAccountName($name) { return $this->set('COGSAccountRef FullName', $name); } - + public function setCOGSAccountApplicationID($value) { return $this->set('COGSAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -232,27 +232,27 @@ public function getCOGSAccountApplicationID() { return $this->get('COGSAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getCOGSAccountListID() { return $this->get('COGSAccountRef ListID'); } - + public function getCOGSAccountName() { return $this->get('COGSAccountRef FullName'); } - + public function setPreferredVendorListID($ListID) { return $this->set('PrefVendorRef ListID', $ListID); } - + public function setPreferredVendorName($name) { return $this->set('PrefVendorRef FullName', $name); } - + public function setPreferredVendorApplicationID($value) { return $this->set('PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_VENDOR, QUICKBOOKS_LISTID, $value)); @@ -262,41 +262,41 @@ public function getPreferredVendorApplicationID() { return $this->get('PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getPreferredVendorListID() { return $this->get('PrefVendorRef ListID'); } - + public function getPreferredVendorName() { return $this->get('PrefVendorRef FullName'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -306,13 +306,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/InventoryItem.php b/QuickBooks/QBXML/Object/InventoryItem.php index 01995b29..69883232 100755 --- a/QuickBooks/QBXML/Object/InventoryItem.php +++ b/QuickBooks/QBXML/Object/InventoryItem.php @@ -2,24 +2,24 @@ /** * QuickBooks InventoryItem object container - * + * * @todo Verify the get/set methods on this one... it was copied from NonInventoryItem * @todo Add isActive(), getIsActive(), etc. methods - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_InventoryItem extends QuickBooks_QBXML_Object { @@ -27,10 +27,10 @@ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID for this item - * + * * @param string $ListID * @return boolean */ @@ -38,20 +38,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID for this item - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name for this item - * + * * @param string $name * @return boolean */ @@ -59,30 +59,30 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name for this item - * + * * @return string */ public function getName() { return $this->get('Name'); } - + public function setFullName($fullname) { return $this->setFullNameType('FullName', 'Name', 'ParentRef FullName', $fullname); } - + public function getFullName() { return $this->getFullNameType('FullName', 'Name', 'ParentRef FullName'); - } - + } + /** * Set the QuantityOnHand for this item - * + * * @param string $ListID * @return boolean */ @@ -90,20 +90,20 @@ public function setQuantityOnHand($quantity) { return $this->set('QuantityOnHand', (int) $quantity); } - + /** * Get the QuantityOnHand for this item - * + * * @return boolean */ public function getQuantityOnHand() { return $this->get('QuantityOnHand'); } - + /** * Set the description of this item - * + * * @param string $descrip * @return boolean */ @@ -116,10 +116,10 @@ public function getSalesDescription() { return $this->get('SalesDesc'); } - + /** * Set the price for this item - * + * * @param string $price * @return boolean */ @@ -127,7 +127,7 @@ public function setSalesPrice($price) { return $this->set('SalesPrice', sprintf('%01.2f', (float) $price)); } - + /** * Get the price for this item */ @@ -135,10 +135,10 @@ public function getSalesPrice() { return $this->get('SalesPrice'); } - + /** * Set the account ListID for this item - * + * * @param string $ListID * @return string */ @@ -146,7 +146,7 @@ public function setIncomeAccountListID($ListID) { return $this->set('IncomeAccountRef ListID', $ListID); } - + /** * (Sales OR Purchase) * @deprecated @@ -155,12 +155,12 @@ public function setIncomeAccountName($name) { return $this->set('IncomeAccountRef FullName', $name); } - + public function setIncomeAccountFullName($FullName) { return $this->setFullNameType('IncomeAccountRef FullName', null, null, $FullName); } - + /** * (Sales OR Purchase) */ @@ -173,15 +173,15 @@ public function getIncomeAccountApplicationID() { return $this->get('IncomeAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** - * + * */ public function getIncomeAccountListID() { return $this->get('IncomeAccountRef ListID'); } - + /** * @deprecated */ @@ -193,13 +193,13 @@ public function getIncomeAccountName() public function getIncomeAccountFullName() { return $this->get('IncomeAccountRef FullName'); - } + } public function setAssetAccountName($name) { return $this->set('AssetAccountRef FullName', $name); } - + /** * @deprecated */ @@ -207,22 +207,22 @@ public function getAssetAccountName() { return $this->get('AssetAccountRef FullName'); } - + public function getAssetAccountFullName() { return $this->get('AssetAccountRef FullName'); } - + public function setAssetAccountListID($ListID) { return $this->set('AssetAccountRef ListID', $ListID); } - + public function getAssetAccountListID() { return $this->get('AssetAccountRef ListID'); } - + public function setAssetAccountApplicationID($value) { return $this->set('AssetAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -232,32 +232,32 @@ public function getAssetAccountApplicationID() { return $this->get('AssetAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setPurchaseDescription($desc) { return $this->set('PurchaseDesc', $desc); } - + public function getPurchaseDescription() { return $this->get('PurchaseDesc'); } - + public function setPurchaseCost($cost) { return $this->set('PurchaseCost', sprintf('%01.2f', (float) $cost)); } - + public function getPurchaseCost() { return $this->get('PurchaseCost'); } - + public function setCOGSAccountListID($ListID) { return $this->set('COGSAccountRef ListID', $ListID); } - + /** * @deprecated */ @@ -265,12 +265,12 @@ public function setCOGSAccountName($name) { return $this->set('COGSAccountRef FullName', $name); } - + public function setCOGSAccountFullName($FullName) { return $this->setFullNameType('COGSAccountRef FullName', null, null, $FullName); } - + public function setCOGSAccountApplicationID($value) { return $this->set('COGSAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -280,12 +280,12 @@ public function getCOGSAccountApplicationID() { return $this->get('COGSAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getCOGSAccountListID() { return $this->get('COGSAccountRef ListID'); } - + /** * @deprecated */ @@ -298,17 +298,17 @@ public function getCOGSAccountFullName() { return $this->get('COGSAccountRef FullName'); } - + public function setPreferredVendorListID($ListID) { return $this->set('PrefVendorRef ListID', $ListID); } - + public function setPreferredVendorName($name) { return $this->set('PrefVendorRef FullName', $name); } - + public function setPreferredVendorApplicationID($value) { return $this->set('PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_VENDOR, QUICKBOOKS_LISTID, $value)); @@ -318,51 +318,51 @@ public function getPreferredVendorApplicationID() { return $this->get('PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getPreferredVendorListID() { return $this->get('PrefVendorRef ListID'); } - + public function getPreferredVendorName() { return $this->get('PrefVendorRef FullName'); } - + public function getUnitOfMeasureSetListID() { return $this->get('UnitOfMeasureSetRef ListID'); } - + public function getUnitOfMeasureSetFullName() { return $this->get('UnitOfMeasureSetRef FullName'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -372,13 +372,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version, $locale, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Invoice.php b/QuickBooks/QBXML/Object/Invoice.php index d85e963b..5e0aad03 100755 --- a/QuickBooks/QBXML/Object/Invoice.php +++ b/QuickBooks/QBXML/Object/Invoice.php @@ -2,10 +2,10 @@ /** * QuickBooks Invoice object container - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ @@ -47,14 +47,14 @@ class QuickBooks_QBXML_Object_Invoice extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks Invoice object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Alias of {@link QuickBooks_Object_Invoice::setTxnID()} */ @@ -62,10 +62,10 @@ public function setTransactionID($TxnID) { return $this->setTxnID($TxnID); } - + /** * Set the transaction ID of the Invoice object - * + * * @param string $TxnID * @return boolean */ @@ -73,7 +73,7 @@ public function setTxnID($TxnID) { return $this->set('TxnID', $TxnID); } - + /** * Alias of {@link QuickBooks_Object_Invoice::getTxnID()} */ @@ -81,20 +81,20 @@ public function getTransactionID() { return $this->getTxnID(); } - + /** * Get the transaction ID for this invoice - * + * * @return string */ public function getTxnID() { return $this->get('TxnID'); } - + /** * Set the customer ListID - * + * * @param string $ListID * @return boolean */ @@ -102,10 +102,10 @@ public function setCustomerListID($ListID) { return $this->set('CustomerRef ListID' , $ListID); } - + /** * Set the customer ApplicationID (auto-replaced by the API with a ListID) - * + * * @param mixed $value * @return boolean */ @@ -113,10 +113,10 @@ public function setCustomerApplicationID($value) { return $this->set('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_LISTID, $value)); } - + /** * Set the customer name - * + * * @param string $name * @return boolean */ @@ -132,30 +132,30 @@ public function setCustomerName($name) { return $this->set('CustomerRef FullName', $name); } - + /** * Get the customer ListID - * + * * @return string */ public function getCustomerListID() { return $this->get('CustomerRef ListID'); } - + /** * Get the customer application ID - * + * * @return mixed */ public function getCustomerApplicationID() { return $this->extractApplicationID($this->get('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + /** * Get the customer name - * + * * @return string */ public function getCustomerFullName() @@ -170,21 +170,21 @@ public function getCustomerName() { return $this->get('CustomerRef FullName'); } - - /** + + /** * Set the class ListID for this invoice - * + * * @param string $ListID * @return boolean - */ + */ public function setClassListID($ListID) { return $this->set('ClassRef ListID', $ListID); } - + /** * Set the class application ID - * + * * @param mixed $value * @return boolean */ @@ -192,101 +192,101 @@ public function setClassApplicationID($value) { return $this->set('ClassRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CLASS, QUICKBOOKS_LISTID, $value)); } - + public function setClassName($name) { return $this->set('ClassRef FullName', $name); } - + public function getClassName() { return $this->get('ClassRef FullName'); } - + public function getClassListID() { return $this->get('ClassRef ListID'); } - + /* public function getClassApplicationID() { return $this->extractApplicationID($this->get('ClassRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + public function setARAccountApplicationID($value) { return $this->set('ARAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); }*/ - + public function setARAccountListID($ListID) { return $this->set('ARAccountRef ListID', $ListID); } - + public function setARAccountName($name) { return $this->set('ARAccountRef FullName', $name); } - + public function getARAccountListID() { return $this->get('ARAccountRef ListID'); } - + public function getARAccountName() { return $this->get('ARAccountRef FullName'); } - + /** * Get the ARAccount application ID - * + * * @return value */ public function getARAccountApplicationID() { return $this->extractApplicationID($this->get('ARAccountRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + public function setTemplateApplicationID($value) { return $this->set('TemplateRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_TEMPLATE, QUICKBOOKS_LISTID, $value)); } - + public function setTemplateName($name) { return $this->set('TemplateRef FullName', $name); } - + public function setTemplateListID($ListID) { return $this->set('TemplateRef ListID', $ListID); } - + public function getTemplateName() { return $this->get('TemplateRef FullName'); } - + public function getTemplateListID() { return $this->get('TemplateRef ListID'); } - + /** * Get the template application ID - * + * * @return value */ public function getTemplateApplicationID() { return $this->extractApplicationID($this->get('TemplateRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + /** * Set the transaction date - * + * * @param string $date * @return boolean */ @@ -294,7 +294,7 @@ public function setTxnDate($date) { return $this->setDateType('TxnDate', $date); } - + /** * Alias of {@link QuickBooks_Object_Invoice::setTxnDate()} */ @@ -302,10 +302,10 @@ public function setTransactionDate($date) { return $this->setTxnDate($date); } - + /** * Get the transaction date - * + * * @param string $format The format you want the date in (as for {@link http://www.php.net/date}) * @return string */ @@ -314,7 +314,7 @@ public function getTxnDate($format = 'Y-m-d') //return date($format, strtotime($this->get('TxnDate'))); return $this->getDateType('TxnDate', $format); } - + /** * Alias of {@link QuickBooks_Object_Invoice::getTxnDate()} */ @@ -322,10 +322,10 @@ public function getTransactionDate() { return $this->getTxnDate($format); } - + /** * Set the reference number - * + * * @param string $str * @return boolean */ @@ -333,7 +333,7 @@ public function setRefNumber($str) { return $this->set('RefNumber', $str); } - + /** * Alias of {@link QuickBooks_Object_Invoice::setRefNumber()} */ @@ -341,10 +341,10 @@ public function setReferenceNumber($str) { return $this->setRefNumber($str); } - + /** * Get the reference number - * + * * @return string */ public function getRefNumber() @@ -359,10 +359,10 @@ public function getReferenceNumber() { return $this->getRefNumber(); } - + /** * Get an shipping address as an array (or a specific portion of the address as a string) - * + * * @param string $part A specific portion of the address to get (i.e. "Addr1" or "State") * @param array $defaults Default values if a value isn't filled in * @return array The address @@ -373,13 +373,13 @@ public function getShipAddress($part = null, $defaults = array()) { return $this->get('ShipAddress ' . $part); } - + return $this->getArray('ShipAddress *', $defaults); } - + /** * Set the shipping address for the invoice - * + * * @param string $addr1 Address line 1 * @param string $addr2 Address line 2 * @param string $addr3 Address line 3 @@ -399,18 +399,18 @@ public function setShipAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $a { $this->set('ShipAddress Addr' . $i, ${'addr' . $i}); } - + $this->set('ShipAddress City', $city); $this->set('ShipAddress State', $state); $this->set('ShipAddress Province', $province); $this->set('ShipAddress PostalCode', $postalcode); $this->set('ShipAddress Country', $country); - $this->set('ShipAddress Note', $note); + $this->set('ShipAddress Note', $note); } - + /** - * Get the billing address - * + * Get the billing address + * * @param string $part A specific portion of the address to get (i.e. "Addr1" or "State") * @param array $defaults Default values if a value isn't filled in * @return array The address @@ -421,13 +421,13 @@ public function getBillAddress($part = null, $defaults = array()) { return $this->get('BillAddress ' . $part); } - + return $this->getArray('BillAddress *', $defaults); } - + /** * Set the billing address for the invoice - * + * * @param string $addr1 Address line 1 * @param string $addr2 Address line 2 * @param string $addr3 Address line 3 @@ -447,18 +447,18 @@ public function setBillAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $a { $this->set('BillAddress Addr' . $i, ${'addr' . $i}); } - + $this->set('BillAddress City', $city); $this->set('BillAddress State', $state); $this->set('BillAddress Province', $province); $this->set('BillAddress PostalCode', $postalcode); $this->set('BillAddress Country', $country); - $this->set('BillAddress Note', $note); + $this->set('BillAddress Note', $note); } - - /** + + /** * Set an invoice as pending - * + * * @param boolean $pending * @return boolean */ @@ -466,60 +466,60 @@ public function setIsPending($pending) { return $this->setBooleanType('IsPending', $pending); } - + public function getIsPending() { return $this->getBooleanType('IsPending'); } - + public function setPONumber($num) { return $this->set('PONumber', $num); } - + public function getPONumber() { return $this->get('PONumber'); } - + public function setTermsListID($ListID) { return $this->set('TermsRef ListID', $ListID); } - + public function setTermsApplicationID($value) { return $this->set('TermsRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_TERMS, QUICKBOOKS_LISTID, $value)); } - + public function setTermsName($name) { return $this->set('TermsRef FullName', $name); } - + public function getTermsName() { return $this->get('TermsRef FullName'); } - + public function getTermsListID() { return $this->get('TermsRef ListID'); } - + /** * Get the terms application ID for this invoice - * + * * @return value */ public function getTermsApplicationID() { return $this->extractApplicationID($this->get('TermsRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + /** * Set the due date for the invoice - * + * * @param string $date * @return boolean */ @@ -528,10 +528,10 @@ public function setDueDate($date) //return $this->set('DueDate', date('Y-m-d', strtotime($date))); return $this->setDateType('DueDate', $date); } - + /** * Get the due date for the invoice - * + * * @param string $format The format to return the date in (as for {@link http://www.php.net/date}) * @return string */ @@ -540,53 +540,53 @@ public function getDueDate($format = 'Y-m-d') //return date($format, strtotime($this->get('DueDate'))); return $this->getDateType('DueDate', $format); } - + public function setSalesRepName($name) { return $this->set('SalesRepRef FullName', $name); } - + public function setSalesRepListID($ListID) { return $this->set('SalesRepRef ListID', $ListID); } - + public function setSalesRepApplicationID($value) { return $this->set('SalesRepRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_EMPLOYEE, QUICKBOOKS_LISTID, $value)); } - + public function getSalesRepName() { return $this->get('SalesRepRef FullName'); } - + public function getSalesRepListID() { return $this->get('SalesRepRef ListID'); } - + public function getSalesRepApplicationID() { return $this->extractApplicationID($this->get('SalesRepRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + public function getFOB() { return $this->get('FOB'); } - + public function setFOB($fob) { return $this->set('FOB', $fob); } - + public function setShipDate($date) { //return $this->set('ShipDate', date('Y-m-d', strtotime($date))); return $this->setDateType('ShipDate', $date); } - + public function getShipDate($format = 'Y-m-d') { /* @@ -594,16 +594,16 @@ public function getShipDate($format = 'Y-m-d') { return date($format, strtotime($this->get('ShipDate'))); } - + return null; */ - + return $this->getDateType('ShipDate', $format); } - + /** * Set the application ID for the shipping method - * + * * @param mixed $value The shipping method primary key from your application * @return boolean */ @@ -611,40 +611,40 @@ public function setShipMethodApplicationID($value) { return $this->set('ShipMethodRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SHIPMETHOD, QUICKBOOKS_LISTID, $value)); } - + public function setShipMethodName($name) { return $this->set('ShipMethodRef FullName', $name); } - + public function setShipMethodListID($ListID) { return $this->set('ShipMethodRef ListID', $ListID); } - + public function getShipMethodName() { return $this->get('ShipMethodRef FullName'); } - + public function getShipMethodListID() { return $this->get('ShipMethodRef ListID'); } - + /** * Get the ship method application ID - * + * * @return value */ public function getShipMethodApplicationID() { return $this->extractApplicationID($this->get('ShipMethodRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + /** * Set the application ID for the payment method - * + * * @param mixed $value The payment method primary key from your application * @return boolean */ @@ -652,42 +652,42 @@ public function setPaymentMethodApplicationID($value) { return $this->set('PaymentMethodRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_PAYMENTMETHOD, QUICKBOOKS_LISTID, $value)); } - + public function setPaymentMethodName($name) { return $this->set('PaymentMethodRef FullName', $name); } - + public function setPaymentMethodListID($ListID) { return $this->set('PaymentMethodRef ListID', $ListID); } - + public function getPaymentMethodName() { return $this->get('PaymentMethodRef FullName'); } - + public function getPaymentMethodListID() { return $this->get('PaymentMethodRef ListID'); } - + /** * Get the payment method application ID - * + * * @return value */ public function getPaymentMethodApplicationID() { return $this->extractApplicationID($this->get('PaymentMethodRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + public function setSalesTaxItemListID($ListID) { return $this->set('ItemSalesTaxRef ListID', $ListID); } - + public function setSalesTaxItemApplicationID($value) { return $this->set('ItemSalesTaxRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SALESTAXITEM, QUICKBOOKS_LISTID, $value)); @@ -697,7 +697,7 @@ public function getSalesTaxItemApplicationID() { return $this->get('ItemSalesTaxRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** * @deprecated */ @@ -710,67 +710,67 @@ public function setSalesTaxItemFullName($name) { return $this->set('ItemSalesTaxRef FullName', $name); } - + public function getSalesTaxItemName() { return $this->get('ItemSalesTaxRef FullName'); } - + public function getSalesTaxItemListID() { return $this->get('ItemSalesTaxRef ListID'); } - + public function setMemo($memo) { return $this->set('Memo', $memo); } - + public function getMemo() { return $this->get('Memo'); } - + public function setIsToBePrinted($printed) { return $this->setBooleanType('IsToBePrinted', $printed); } - + public function getIsToBePrinted() { return $this->getBooleanType('IsToBePrinted'); } - + public function setIsToBeEmailed($emailed) { return $this->setBooleanType('IsToBeEmailed', $emailed); } - + public function getIsToBeEmailed() { return $this->getBooleanType('IsToBeEmailed'); } - + public function setCustomerSalesTaxCodeListID() { - + } - + public function setCustomerSalesTaxCodeName() { - + } - + public function getCustomerSalesTaxCodeListID() { - + } - + public function getCustomerSalesTaxCodeName() { - + } - + public function setLinkToTxnID($TxnID) { return $this->set('LinkToTxnID', $TxnID); @@ -780,78 +780,78 @@ public function getLinkToTxnID() { return $this->get('LinkToTxnID'); } - + /* public function getInvoiceLines() { return $this->getList('InvoiceLine'); } - + public function getInvoiceLine($which) { $list = $this->getInvoiceLines(); - + if (isset($list[$which])) { return $list[$which]; } - + return null; } */ - + /* - public function setInvoiceLine($i, + public function setInvoiceLine($i, { - + } */ - + /** - * - * - * @param + * + * + * @param */ public function addInvoiceLine($obj) { return $this->addListItem('InvoiceLine', $obj); - + /* $lines = $this->get('InvoiceLine'); - + // $lines[] = $obj; - + return $this->set('InvoiceLine', $lines); */ } - + /* public function setInvoiceLineData($i, $key, $value) { $lines = $this->getInvoiceLines(); if (isset($lines[$i])) { - + } - + return $this->set('InvoiceLine', $lines); } */ - + public function getInvoiceLine($i) { return $this->getListItem('InvoiceLine', $i); } - + public function listInvoiceLines() { return $this->getList('InvoiceLine'); } - + /** * Add a discount line (only supported by Online Edition as of 8.0) - * + * * @param QuickBooks_Object_Invoice_DiscountLine * @return boolean */ @@ -862,7 +862,7 @@ public function addDiscountLine($obj) /** * Add a sales tax line (only supported by Online Edition as of 8.0) - * + * * @param QuickBooks_Object_Invoice_SalesTaxLine * @return boolean */ @@ -873,7 +873,7 @@ public function addSalesTaxLine($obj) /** * Add a shipping line (only supported by Online Edition as of 8.0) - * + * * @param QuickBooks_Object_Invoice_ShippingLine * @return boolean */ @@ -883,50 +883,50 @@ public function addShippingLine($obj) } /** - * + * */ public function setOther($other) { return $this->set('Other', $other); } - + public function getOther() { return $this->get('Other'); } - + public function getBalanceRemaining() { return $this->getAmountType('BalanceRemaining'); } - + public function setBalanceRemaining($amount) { return $this->setAmountType('BalanceRemaining', $amount); - } - + } + public function getAppliedAmount() { return $this->getAmountType('AppliedAmount'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + public function asList($request) { switch ($request) { case 'InvoiceAddRq': - + if (isset($this->_object['InvoiceLine'])) { $this->_object['InvoiceLineAdd'] = $this->_object['InvoiceLine']; @@ -935,46 +935,46 @@ public function asList($request) if (isset($this->_object['ShippingLine'])) { $this->_object['ShippingLineAdd'] = $this->_object['ShippingLine']; - } + } if (isset($this->_object['SalesTaxLine'])) { $this->_object['SalesTaxLineAdd'] = $this->_object['SalesTaxLine']; - } + } if (isset($this->_object['DiscountLine'])) { $this->_object['DiscountLineAdd'] = $this->_object['DiscountLine']; - } - + } + break; case 'InvoiceModRq': - + if (isset($this->_object['InvoiceLine'])) { - $this->_object['InvoiceLineMod'] = $this->_object['InvoiceLine']; + $this->_object['InvoiceLineMod'] = $this->_object['InvoiceLine']; } - + break; } - + return parent::asList($request); } - + public function asXML($root = null, $parent = null, $object = null) { //print('INVOICE got called asXML: ' . $root . ', ' . $parent . "\n"); //exit; - + if (is_null($object)) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_INVOICE: - + //if (isset($this->_object['InvoiceLine'])) //{ // $this->_object['InvoiceLineAdd'] = $this->_object['InvoiceLine']; @@ -996,7 +996,7 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('ShippingLineAdd'); } } - + if (!empty($object['DiscountLineAdd'])) { foreach ($object['DiscountLineAdd'] as $key => $obj) @@ -1004,7 +1004,7 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('DiscountLineAdd'); } } - + if (!empty($object['SalesTaxLineAdd'])) { foreach ($object['SalesTaxLineAdd'] as $key => $obj) @@ -1012,10 +1012,10 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('SalesTaxLineAdd'); } } - + break; case QUICKBOOKS_MOD_INVOICE: - + /* if (isset($object['InvoiceLine'])) { @@ -1033,25 +1033,25 @@ public function asXML($root = null, $parent = null, $object = null) break; } - + //print_r($this->_object); - + return parent::asXML($root, $parent, $object); } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -1060,13 +1060,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QuickBooks_QBXML_Object::XML_DROP, $indent = "\t", $root = null, $parent = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Invoice/DiscountLine.php b/QuickBooks/QBXML/Object/Invoice/DiscountLine.php index a99128d2..a02852a6 100755 --- a/QuickBooks/QBXML/Object/Invoice/DiscountLine.php +++ b/QuickBooks/QBXML/Object/Invoice/DiscountLine.php @@ -1,85 +1,85 @@ - * + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/Invoice.php'); /** - * - * + * + * */ class QuickBooks_QBXML_Object_Invoice_DiscountLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks SalesReceipt SalesReceiptLine object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + public function setAmount($amount) { $amount = (float) $amount; - - // Discount amounts are always negative in QuickBooks + + // Discount amounts are always negative in QuickBooks if ($amount > 0) { $amount = $amount * -1.0; } - + return $this->setAmountType('Amount', $amount); } - + public function setAccountListID($ListID) { return $this->set('AccountRef ListID', $ListID); } - + public function setAccountName($name) { return $this->set('AccountRef FullName', $name); - } - + } + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { switch ($parent) @@ -93,13 +93,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -108,15 +108,15 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - - - + + + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Invoice/InvoiceLine.php b/QuickBooks/QBXML/Object/Invoice/InvoiceLine.php index a989b092..451d9dee 100755 --- a/QuickBooks/QBXML/Object/Invoice/InvoiceLine.php +++ b/QuickBooks/QBXML/Object/Invoice/InvoiceLine.php @@ -2,10 +2,10 @@ /** * QuickBooks InvoiceLine object class - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ @@ -27,22 +27,22 @@ class QuickBooks_QBXML_Object_Invoice_InvoiceLine extends QuickBooks_QBXML_Objec { /** * Create a new QuickBooks Invoice InvoiceLine object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + public function getTxnLineID() { return $this->get('TxnLineID'); } - + /** * Set the Item ListID for this InvoiceLine - * + * * @param string $ListID * @return boolean */ @@ -50,10 +50,10 @@ public function setItemListID($ListID) { return $this->set('ItemRef ListID', $ListID); } - - /** - * Set the item application ID for this invoice line - * + + /** + * Set the item application ID for this invoice line + * * @param mixed $value * @return boolean */ @@ -61,10 +61,10 @@ public function setItemApplicationID($value) { return $this->set('ItemRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ITEM, QUICKBOOKS_LISTID, $value)); } - + /** * Set the item name for this invoice line - * + * * @param string $name * @return boolean */ @@ -72,147 +72,147 @@ public function setItemName($name) { return $this->set('ItemRef FullName', $name); } - + public function setItemFullName($FullName) { return $this->setFullNameType('ItemRef FullName', null, null, $FullName); } - + /** * Get the ListID for this item - * + * * @return string */ public function getItemListID() { return $this->get('ItemRef ListID'); } - + /** * Get the item application ID - * + * * @return mixed */ public function getItemApplicationID() { //print($this->get('ItemRef ' . QUICKBOOKS_API_APPLICATIONID) . '
'); - + return $this->extractApplicationID($this->get('ItemRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + /** * Get the name of the item for this invoice line item - * + * * @return string */ public function getItemName() { return $this->get('ItemRef FullName'); } - + public function getItemFullName() { return $this->get('ItemRef FullName'); } - + public function setDesc($descrip) { return $this->set('Desc', $descrip); } - + public function getDesc() { return $this->get('Desc'); } - + public function setDescription($descrip) { return $this->setDesc($descrip); } - + public function getDescription() { return $this->getDesc(); } - + public function setQuantity($quan) { return $this->set('Quantity', (float) $quan); } - + public function getQuantity() { return $this->get('Quantity'); } - + public function setUnitOfMeasure($unit) { return $this->set('UnitOfMeasure', $unit); } - + public function getUnitOfMeasure() { return $this->get('UnitOfMeasure'); } - + public function setRate($rate) { return $this->set('Rate', (float) $rate); } - + public function getRate() { return $this->get('Rate'); } - + public function getAmount() { if ($amount = $this->get('Amount')) { return $this->get('Amount'); } - + return $this->get('Rate') * $this->get('Quantity'); } - + public function setRatePercent($percent) { return $this->set('RatePercent', (float) $percent); } - + public function getRatePercent() { return $this->get('RatePercent'); } - + public function setPriceLevelApplicationID($value) { - + } - + public function setPriceLevelName($name) { return $this->set('PriceLevelRef FullName', $name); } - + public function setPriceLevelListID($ListID) { return $this->set('PriceLevelRef ListID', $ListID); } - + public function getPriceLevelName() { return $this->get('PriceLevelRef FullName'); } - + public function getPriceLevelListID() { return $this->get('PriceLevelRef ListID'); } - - /** + + /** * Set the class ListID for this invoice line item - * + * * @param string $ListID * @return boolean */ @@ -220,15 +220,15 @@ public function setClassListID($ListID) { return $this->set('ClassRef ListID', $ListID); } - + public function setClassApplicationID($value) { - + } - - /** + + /** * Set the class name for this invoice line item - * + * * @param string $name * @return boolean */ @@ -236,70 +236,70 @@ public function setClassName($name) { return $this->set('ClassRef FullName', $name); } - + public function getClassListID() { return $this->get('ClassRef ListID'); } - + public function getClassName() { return $this->get('ClassRef FullName'); } - + public function setAmount($amount) { return $this->setAmountType('Amount', $amount); } - + public function setServiceDate($date) { return $this->setDateType('ServiceDate', $date); } - + public function getServiceDate($format = 'Y-m-d') { return $this->getDateType('ServiceDate', $format); } - + public function setSalesTaxCodeName($name) { return $this->set('SalesTaxCodeRef FullName', $name); } - + public function setSalesTaxCodeListID($ListID) { return $this->set('SalesTaxCodeRef ListID', $ListID); } - + public function getSalesTaxCodeName() { return $this->get('SalesTaxCodeRef FullName'); } - + public function getSalesTaxCodeListID() { return $this->get('SalesTaxCodeRef ListID'); } - + public function setTaxable() { return $this->set('SalesTaxCodeRef FullName', QUICKBOOKS_TAXABLE); } - + public function setNonTaxable() { return $this->set('SalesTaxCodeRef FullName', QUICKBOOKS_NONTAXABLE); } - + public function getTaxable() { return $this->get('SalesTaxCodeRef FullName') == QUICKBOOKS_TAXABLE; } - + /** * Set the account name for this line item - * + * * @param string $name * @return boolean */ @@ -307,10 +307,10 @@ public function setOverrideItemAccountName($name) { return $this->set('OverrideItemAccountRef FullName', $name); } - - /** + + /** * Set the account ListID for this line item - * + * * @param string $ListID * @return boolean */ @@ -318,45 +318,45 @@ public function setOverrideItemAccountListID($ListID) { return $this->set('OverrideItemAccountRef ListID', $ListID); } - + public function setOverrideItemAccountApplicationID($value) { - + } - + public function getOverrideItemAccountListID() { return $this->get('OverrideItemAccountRef ListID'); } - + public function getOverrideItemAccountName() { return $this->get('OverrideItemAccountRef FullName'); } - + public function setOther1($value) { return $this->set('Other1', $value); } - + public function getOther1() { return $this->get('Other1'); } - + public function setOther2($value) { return $this->set('Other2', $value); } - + public function getOther2() { return $this->get('Other2'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() @@ -365,24 +365,24 @@ protected function _cleanup() { $this->setAmountType('Amount', $this->getAmountType('Amount')); } - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { $this->_cleanup(); - + switch ($parent) { case QUICKBOOKS_ADD_INVOICE: @@ -394,13 +394,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -409,13 +409,13 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Invoice/SalesTaxLine.php b/QuickBooks/QBXML/Object/Invoice/SalesTaxLine.php index 2b287ff6..529f9edd 100644 --- a/QuickBooks/QBXML/Object/Invoice/SalesTaxLine.php +++ b/QuickBooks/QBXML/Object/Invoice/SalesTaxLine.php @@ -1,82 +1,82 @@ - * + * @author Keith Palmer + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/SalesReceipt.php'); /** - * - * + * + * */ class QuickBooks_QBXML_Object_Invoice_SalesTaxLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks SalesReceipt SalesReceiptLine object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + public function setAmount($amount) { return $this->setAmountType('Amount', $amount); } - + public function setRate($rate) { return $this->set('Rate', $rate); - } - + } + public function setAccountListID($ListID) { return $this->set('AccountRef ListID', $ListID); } - + public function setAccountName($name) { return $this->set('AccountRef FullName', $name); - } - + } + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { switch ($parent) @@ -90,13 +90,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -105,15 +105,15 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - - - + + + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Invoice/ShippingLine.php b/QuickBooks/QBXML/Object/Invoice/ShippingLine.php index c315129b..dbd24146 100755 --- a/QuickBooks/QBXML/Object/Invoice/ShippingLine.php +++ b/QuickBooks/QBXML/Object/Invoice/ShippingLine.php @@ -1,77 +1,77 @@ - * + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/SalesReceipt.php'); /** - * - * + * + * */ class QuickBooks_QBXML_Object_Invoice_ShippingLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks SalesReceipt SalesReceiptLine object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + public function setAmount($amount) { return $this->setAmountType('Amount', $amount); } - + public function setAccountListID($ListID) { return $this->set('AccountRef ListID', $ListID); } - + public function setAccountName($name) { return $this->set('AccountRef FullName', $name); - } - + } + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { switch ($parent) @@ -85,13 +85,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -100,15 +100,15 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - - - + + + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Item.php b/QuickBooks/QBXML/Object/Item.php index 13253866..09d74201 100644 --- a/QuickBooks/QBXML/Object/Item.php +++ b/QuickBooks/QBXML/Object/Item.php @@ -2,37 +2,37 @@ /** * QuickBooks object container - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Item extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Class object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID of the Class - * + * * @param string $ListID * @return boolean */ @@ -40,10 +40,10 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of the Class - * + * * @return string */ public function getListID() @@ -52,12 +52,12 @@ public function getListID() } - /** + /** * Set the name of this customer - * - * NOTE: This will be auto-set to ->getFirstName() ->getLastName() if you + * + * NOTE: This will be auto-set to ->getFirstName() ->getLastName() if you * don't set it explicitly. - * + * * @param string $name * @return boolean */ @@ -66,43 +66,43 @@ public function setName($name) return $this->set('Name', $name); } - /** - * Sets the name as first and last. - * - * @return boolean - */ - public function setNameAsFirstLast() { - $first = $this->getFirstName(); - $last = $this->getLastName(); - if (is_null($first)) { $first = ''; } - if (is_null($last)) { $last = ''; } - - return $this->set('Name', $first .' '. $last); + /** + * Sets the name as first and last. + * + * @return boolean + */ + public function setNameAsFirstLast() { + $first = $this->getFirstName(); + $last = $this->getLastName(); + if (is_null($first)) { $first = ''; } + if (is_null($last)) { $last = ''; } + + return $this->set('Name', $first .' '. $last); } /** * Get the name of this customer - * + * * @return string */ public function getName() { if (!$this->exists('Name')) - { + { if (!is_null($this->getFirstName()) || !is_null($this->getLastName())) { $this->setNameAsFirstLast(); - } - } + } + } return $this->get('Name'); } /** * Set the full name of this customer (full name) - * - * NOTE: This will be auto-set to ->getName() if you don't set it + * + * NOTE: This will be auto-set to ->getName() if you don't set it * explicitly. - * + * * @param string $name * @return boolean */ @@ -117,7 +117,7 @@ public function setFullName($name) /** * Get the name of this customer (full name) - * + * * @return string */ public function getFullName() @@ -132,7 +132,7 @@ public function getFullName() /** * Set the first name of this customer - * + * * @param string $name * @return boolean */ @@ -143,7 +143,7 @@ public function setFirstName($fname) /** * Get the first name of this customer - * + * * @return string */ public function getFirstName() @@ -153,7 +153,7 @@ public function getFirstName() /** * Set the last name of this customer - * + * * @param string $lname * @return boolean */ @@ -164,7 +164,7 @@ public function setLastName($lname) /** * Get the last name of this customer - * + * * @return string */ public function getLastName() @@ -178,37 +178,37 @@ public function getLastName() public function getFromModifiedDate() { - + } - + public function setFromModifiedDate($date) { - + } - + public function getToModifiedDate() { - + } - + public function setToModifiedDate($date) { - + } - + /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this Class object - * + * * @param string $request * @param boolean $nest * @return array @@ -216,13 +216,13 @@ protected function _cleanup() public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -232,13 +232,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version, $locale, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/ItemReceipt.php b/QuickBooks/QBXML/Object/ItemReceipt.php index 6ce841fe..967eeef7 100644 --- a/QuickBooks/QBXML/Object/ItemReceipt.php +++ b/QuickBooks/QBXML/Object/ItemReceipt.php @@ -228,7 +228,7 @@ public function addItemGroupLine($obj) { return $this->addListItem('ItemGroupLine', $obj); } - + public function addExpenseLine($obj) { return $this->addListItem('ExpenseLine', $obj); @@ -269,7 +269,7 @@ public function getItemLines() { return $this->getList('ItemLine'); } - + /** * Gets the ItemGroupLine at @param $i * @@ -367,7 +367,7 @@ public function asXML($root = null, $parent = null, $object = null) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_ITEMRECEIPT: diff --git a/QuickBooks/QBXML/Object/ItemReceipt/ExpenseLine.php b/QuickBooks/QBXML/Object/ItemReceipt/ExpenseLine.php index 0de7ff61..d6253c7b 100644 --- a/QuickBooks/QBXML/Object/ItemReceipt/ExpenseLine.php +++ b/QuickBooks/QBXML/Object/ItemReceipt/ExpenseLine.php @@ -41,7 +41,7 @@ public function setAccountListID($ListID) { return $this->set('AccountRef ListID', $ListID); } - + public function getAccountName() { return $this->get('AccountRef FullName'); @@ -51,7 +51,7 @@ public function setAccountName($name) { return $this->set('AccountRef FullName', $name); } - + public function getAmount() { return $this->get('Amount'); @@ -71,7 +71,7 @@ public function setMemo($memo) { return $this->set('Memo', $memo); } - + public function getCustomerListID() { return $this->get('CustomerRef ListID'); @@ -81,7 +81,7 @@ public function setCustomerListID($ListID) { return $this->set('CustomerRef ListID', $ListID); } - + public function getCustomerName() { return $this->get('CustomerRef FullName'); @@ -91,7 +91,7 @@ public function setCustomerName($name) { return $this->set('CustomerRef FullName', $name); } - + public function getClassListID() { return $this->get('ClassRef ListID'); @@ -101,7 +101,7 @@ public function setClassListID($ListID) { return $this->set('ClassRef ListID', $ListID); } - + public function getClassName() { return $this->get('ClassRef FullName'); @@ -111,7 +111,7 @@ public function setClassName($name) { return $this->set('ClassRef FullName', $name); } - + public function getBillableStatus() { return $this->get('BillableStatus'); @@ -151,7 +151,7 @@ public function asXML($root = null, $parent = null, $object = null) { $object = $this->_object; } - + switch ($parent) { case QUICKBOOKS_ADD_ITEMRECEIPT: diff --git a/QuickBooks/QBXML/Object/ItemReceipt/ItemGroupLine.php b/QuickBooks/QBXML/Object/ItemReceipt/ItemGroupLine.php index bc5be5e3..febbdf9e 100644 --- a/QuickBooks/QBXML/Object/ItemReceipt/ItemGroupLine.php +++ b/QuickBooks/QBXML/Object/ItemReceipt/ItemGroupLine.php @@ -36,7 +36,7 @@ public function getItemGroupListID() { return $this->get('ItemGroupRef ListID'); } - + public function setItemGroupListID($ListID) { return $this->set('ItemGroupRef ListID', $ListID); @@ -46,27 +46,27 @@ public function getItemGroupName() { return $this->get('ItemGroupRef FullName'); } - + public function setItemGroupName($Name) { return $this->set('ItemGroupRef FullName', $Name); } - + public function getQuantity() { return $this->get('Quantity'); } - + public function setQuantity($Quantity) { return $this->set('Quantity', (float) $Quantity); } - + public function getUnitOfMeasure() { return $this->get('UnitOfMeasure'); } - + public function setUnitOfMeasure($UnitOfMeasure) { return $this->set('UnitOfMeasure', $UnitOfMeasure); @@ -98,7 +98,7 @@ public function asXML($root = null, $parent = null, $object = null) { $object = $this->_object; } - + switch ($parent) { case QUICKBOOKS_ADD_ITEMRECEIPT: diff --git a/QuickBooks/QBXML/Object/ItemReceipt/ItemLine.php b/QuickBooks/QBXML/Object/ItemReceipt/ItemLine.php index c925c239..61d95167 100644 --- a/QuickBooks/QBXML/Object/ItemReceipt/ItemLine.php +++ b/QuickBooks/QBXML/Object/ItemReceipt/ItemLine.php @@ -36,7 +36,7 @@ public function getItemListID() { return $this->get('ItemRef ListID'); } - + public function setItemListID($ListID) { return $this->set('ItemRef ListID', $ListID); @@ -46,7 +46,7 @@ public function getItemName() { return $this->get('ItemRef FullName'); } - + public function setItemName($Name) { return $this->set('ItemRef FullName', $Name); @@ -56,7 +56,7 @@ public function getDescription() { return $this->get('Desc'); } - + public function setDescription($Desc) { return $this->set('Desc', $Desc); @@ -66,7 +66,7 @@ public function getQuantity() { return $this->get('Quantity'); } - + public function setQuantity($Quantity) { return $this->set('Quantity', (float) $Quantity); @@ -76,7 +76,7 @@ public function getUnitOfMeasure() { return $this->get('UnitOfMeasure'); } - + public function setUnitOfMeasure($UnitOfMeasure) { return $this->set('UnitOfMeasure', $UnitOfMeasure); @@ -86,7 +86,7 @@ public function getCost() { return $this->get('Cost'); } - + public function setCost($Cost) { return $this->set('Cost', $Cost); @@ -96,7 +96,7 @@ public function getAmount() { return $this->get('Amount'); } - + public function setAmount($Amount) { return $this->set('Amount', $Amount); @@ -106,7 +106,7 @@ public function getTaxAmount() { return $this->get('TaxAmount'); } - + public function setTaxAmount($TaxAmount) { return $this->set('TaxAmount', $TaxAmount); @@ -126,7 +126,7 @@ public function getCustomerName() { return $this->get('CustomerRef FullName'); } - + public function setCustomerName($Name) { return $this->set('CustomerRef FullName', $Name); @@ -136,7 +136,7 @@ public function getClassListID() { return $this->get('ClassRef ListID'); } - + public function setClassListID($ListID) { return $this->set('ClassRef ListID', $ListID); @@ -146,7 +146,7 @@ public function getClassName() { return $this->get('ClassRef FullName'); } - + public function setClassName($Name) { return $this->set('ClassRef FullName', $Name); @@ -156,7 +156,7 @@ public function getSalesTaxCodeListID() { return $this->get('SalesTaxCodeRef ListID'); } - + public function setSalesTaxCodeListID($ListID) { return $this->set('SalesTaxCodeRef ListID', $ListID); @@ -166,7 +166,7 @@ public function getSalesTaxCodeName() { return $this->get('SalesTaxCodeRef FullName'); } - + public function setSalesTaxCodeName($Name) { return $this->set('SalesTaxCodeRef FullName', $Name); @@ -176,7 +176,7 @@ public function getBillableStatus() { return $this->get('BillableStatus'); } - + public function setBillableStatus($BillableStatus) { return $this->set('BillableStatus', $BillableStatus); @@ -186,7 +186,7 @@ public function getOverrideItemAccountListID() { return $this->get('OverrideItemAccountRef ListID'); } - + public function setOverrideItemAccountListID($ListID) { return $this->set('OverrideItemAccountRef ListID', $ListID); @@ -196,7 +196,7 @@ public function getOverrideItemAccountName() { return $this->get('OverrideItemAccountRef FullName'); } - + public function setOverrideItemAccountName($Name) { return $this->set('OverrideItemAccountRef FullName', $Name); @@ -206,7 +206,7 @@ public function getLinkToTxnID() { return $this->getLinkToTxn('LinkToTxn TxnID'); } - + public function setLinkToTxnID($TxnID) { return $this->set('LinkToTxn TxnID', $TxnID); @@ -216,12 +216,12 @@ public function getLinkToTxnLineID() { return $this->get('LinkToTxn TxnLineID'); } - + public function setLinkToTxnLineID($TxnLineID) { return $this->set('LinkToTxn TxnLineID', $TxnLineID); } - + /** * * @@ -248,7 +248,7 @@ public function asXML($root = null, $parent = null, $object = null) { $object = $this->_object; } - + switch ($parent) { case QUICKBOOKS_ADD_ITEMRECEIPT: diff --git a/QuickBooks/QBXML/Object/JournalEntry.php b/QuickBooks/QBXML/Object/JournalEntry.php index f7184c9a..a5e9842c 100644 --- a/QuickBooks/QBXML/Object/JournalEntry.php +++ b/QuickBooks/QBXML/Object/JournalEntry.php @@ -1,13 +1,13 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -25,13 +25,13 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/JournalEntry/JournalDebitLine.php'); /** - * + * */ class QuickBooks_QBXML_Object_JournalEntry extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_JournalEntry object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -40,10 +40,10 @@ public function __construct($arr = array()) } // Path: TxnDate, datatype: DATETYPE - + /** * Set the TxnDate for the JournalEntry - * + * * @param string $date * @return boolean */ @@ -54,7 +54,7 @@ public function setTxnDate($date) /** * Get the TxnDate for the JournalEntry - * + * * @param ? $format = null * @return string */ @@ -68,7 +68,7 @@ public function getTxnDate($format = null) */ public function setTransactionDate($date) { - return $this->setTxnDate($date); + return $this->setTxnDate($date); } /** @@ -79,10 +79,10 @@ public function getTransactionDate($format = null) $this->getTxnDate($format = null); } // Path: RefNumber, datatype: STRTYPE - + /** * Set the RefNumber for the JournalEntry - * + * * @param string $value * @return boolean */ @@ -93,7 +93,7 @@ public function setRefNumber($value) /** * Get the RefNumber for the JournalEntry - * + * * @return string */ public function getRefNumber() @@ -102,10 +102,10 @@ public function getRefNumber() } // Path: Memo, datatype: STRTYPE - + /** * Set the Memo for the JournalEntry - * + * * @param string $value * @return boolean */ @@ -116,7 +116,7 @@ public function setMemo($value) /** * Get the Memo for the JournalEntry - * + * * @return string */ public function getMemo() @@ -125,10 +125,10 @@ public function getMemo() } // Path: IsAdjustment, datatype: BOOLTYPE - + /** * Set the IsAdjustment for the JournalEntry - * + * * @param boolean $bool * @return boolean */ @@ -139,42 +139,42 @@ public function setIsAdjustment($bool) /** * Get the IsAdjustment for the JournalEntry - * + * * @return boolean */ public function getIsAdjustment() { return $this->getBooleanType('IsAdjustment'); } - + public function addDebitLine($obj) { return $this->addListItem('JournalDebitLine', $obj); } - + public function addJournalDebitLine($obj) { return $this->addDebitLine($obj); } - + public function addCreditLine($obj) { - return $this->addListItem('JournalCreditLine', $obj); + return $this->addListItem('JournalCreditLine', $obj); } - + public function addJournalCreditLine($obj) { return $this->addCreditLine($obj); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() { return QUICKBOOKS_OBJECT_JOURNALENTRY; - } + } } diff --git a/QuickBooks/QBXML/Object/JournalEntry/JournalCreditLine.php b/QuickBooks/QBXML/Object/JournalEntry/JournalCreditLine.php index 4d49f759..1fc32dfb 100644 --- a/QuickBooks/QBXML/Object/JournalEntry/JournalCreditLine.php +++ b/QuickBooks/QBXML/Object/JournalEntry/JournalCreditLine.php @@ -1,13 +1,13 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -15,13 +15,13 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_JournalEntry_JournalCreditLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_JournalEntry object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -29,11 +29,11 @@ public function __construct($arr = array()) parent::__construct($arr); } - // Path: TxnLineID, datatype: - + // Path: TxnLineID, datatype: + /** * Set the TxnLineID for the JournalEntry - * + * * @param string $value * @return boolean */ @@ -44,7 +44,7 @@ public function setTxnLineID($value) /** * Get the TxnLineID for the JournalEntry - * + * * @return string */ public function getTxnLineID() @@ -52,11 +52,11 @@ public function getTxnLineID() return $this->get('TxnLineID'); } - // Path: AccountRef ListID, datatype: - + // Path: AccountRef ListID, datatype: + /** * Set the AccountRef ListID for the JournalEntry - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -67,7 +67,7 @@ public function setAccountListID($ListID) /** * Get the AccountRef ListID for the JournalEntry - * + * * @return string */ public function getAccountListID() @@ -77,7 +77,7 @@ public function getAccountListID() /** * Set the primary key for the related record within your own application for the JournalEntry - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -86,11 +86,11 @@ public function setAccountApplicationID($value) return $this->set('AccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); } - // Path: AccountRef FullName, datatype: - + // Path: AccountRef FullName, datatype: + /** * Set the AccountRef FullName for the JournalEntry - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -101,7 +101,7 @@ public function setAccountName($FullName) /** * Get the AccountRef FullName for the JournalEntry - * + * * @return string */ public function getAccountName() @@ -109,11 +109,11 @@ public function getAccountName() return $this->get('AccountRef FullName'); } - // Path: Amount, datatype: - + // Path: Amount, datatype: + /** * Set the Amount for the JournalEntry - * + * * @param float $value * @return boolean */ @@ -124,7 +124,7 @@ public function setAmount($value) /** * Get the Amount for the JournalEntry - * + * * @return float */ public function getAmount() @@ -133,10 +133,10 @@ public function getAmount() } // Path: Memo, datatype: STRTYPE - + /** * Set the Memo for the JournalEntry - * + * * @param string $value * @return boolean */ @@ -147,7 +147,7 @@ public function setMemo($value) /** * Get the Memo for the JournalEntry - * + * * @return string */ public function getMemo() @@ -156,10 +156,10 @@ public function getMemo() } // Path: EntityRef ListID, datatype: STRTYPE - + /** * Set the EntityRef ListID for the JournalEntry - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -170,7 +170,7 @@ public function setEntityListID($ListID) /** * Get the EntityRef ListID for the JournalEntry - * + * * @return string */ public function getEntityListID() @@ -180,7 +180,7 @@ public function getEntityListID() /** * Set the primary key for the related record within your own application for the JournalEntry - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -190,10 +190,10 @@ public function setEntityApplicationID($value) } // Path: EntityRef FullName, datatype: STRTYPE - + /** * Set the EntityRef FullName for the JournalEntry - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -204,7 +204,7 @@ public function setEntityName($FullName) /** * Get the EntityRef FullName for the JournalEntry - * + * * @return string */ public function getEntityName() @@ -213,10 +213,10 @@ public function getEntityName() } // Path: ClassRef ListID, datatype: STRTYPE - + /** * Set the ClassRef ListID for the JournalEntry - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -227,7 +227,7 @@ public function setClassListID($ListID) /** * Get the ClassRef ListID for the JournalEntry - * + * * @return string */ public function getClassListID() @@ -237,7 +237,7 @@ public function getClassListID() /** * Set the primary key for the related record within your own application for the JournalEntry - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -247,10 +247,10 @@ public function setClassApplicationID($value) } // Path: ClassRef FullName, datatype: STRTYPE - + /** * Set the ClassRef FullName for the JournalEntry - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -261,7 +261,7 @@ public function setClassName($FullName) /** * Get the ClassRef FullName for the JournalEntry - * + * * @return string */ public function getClassName() @@ -270,10 +270,10 @@ public function getClassName() } // Path: ItemSalesTaxRef ListID, datatype: STRTYPE - + /** * Set the ItemSalesTaxRef ListID for the JournalEntry - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -284,7 +284,7 @@ public function setItemSalesTaxListID($ListID) /** * Get the ItemSalesTaxRef ListID for the JournalEntry - * + * * @return string */ public function getItemSalesTaxListID() @@ -294,7 +294,7 @@ public function getItemSalesTaxListID() /** * Set the primary key for the related record within your own application for the JournalEntry - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -304,10 +304,10 @@ public function setItemSalesTaxApplicationID($value) } // Path: ItemSalesTaxRef FullName, datatype: STRTYPE - + /** * Set the ItemSalesTaxRef FullName for the JournalEntry - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -318,7 +318,7 @@ public function setItemSalesTaxName($FullName) /** * Get the ItemSalesTaxRef FullName for the JournalEntry - * + * * @return string */ public function getItemSalesTaxName() @@ -326,11 +326,11 @@ public function getItemSalesTaxName() return $this->get('ItemSalesTaxRef FullName'); } - // Path: BillableStatus, datatype: - + // Path: BillableStatus, datatype: + /** * Set the BillableStatus for the JournalEntry - * + * * @param string $value * @return boolean */ @@ -341,22 +341,22 @@ public function setBillableStatus($value) /** * Get the BillableStatus for the JournalEntry - * + * * @return string */ public function getBillableStatus() { return $this->get('BillableStatus'); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() { return 'JournalCreditLine'; - } + } } diff --git a/QuickBooks/QBXML/Object/JournalEntry/JournalDebitLine.php b/QuickBooks/QBXML/Object/JournalEntry/JournalDebitLine.php index df3d313f..a39adeca 100644 --- a/QuickBooks/QBXML/Object/JournalEntry/JournalDebitLine.php +++ b/QuickBooks/QBXML/Object/JournalEntry/JournalDebitLine.php @@ -1,13 +1,13 @@ - * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object - */ + */ /** * QuickBooks object base class @@ -15,13 +15,13 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_JournalEntry_JournalDebitLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_JournalEntry_JournalDebitLine object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -29,11 +29,11 @@ public function __construct($arr = array()) parent::__construct($arr); } - // Path: TxnLineID, datatype: - + // Path: TxnLineID, datatype: + /** * Set the TxnLineID for the JournalEntry - * + * * @param string $value * @return boolean */ @@ -44,7 +44,7 @@ public function setTxnLineID($value) /** * Get the TxnLineID for the JournalEntry - * + * * @return string */ public function getTxnLineID() @@ -52,11 +52,11 @@ public function getTxnLineID() return $this->get('TxnLineID'); } - // Path: AccountRef ListID, datatype: - + // Path: AccountRef ListID, datatype: + /** * Set the AccountRef ListID for the JournalEntry - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -67,7 +67,7 @@ public function setAccountListID($ListID) /** * Get the AccountRef ListID for the JournalEntry - * + * * @return string */ public function getAccountListID() @@ -77,7 +77,7 @@ public function getAccountListID() /** * Set the primary key for the related record within your own application for the JournalEntry - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -86,11 +86,11 @@ public function setAccountApplicationID($value) return $this->set('AccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); } - // Path: AccountRef FullName, datatype: - + // Path: AccountRef FullName, datatype: + /** * Set the AccountRef FullName for the JournalEntry - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -101,7 +101,7 @@ public function setAccountName($FullName) /** * Get the AccountRef FullName for the JournalEntry - * + * * @return string */ public function getAccountName() @@ -109,11 +109,11 @@ public function getAccountName() return $this->get('AccountRef FullName'); } - // Path: Amount, datatype: - + // Path: Amount, datatype: + /** * Set the Amount for the JournalEntry - * + * * @param float $value * @return boolean */ @@ -124,7 +124,7 @@ public function setAmount($value) /** * Get the Amount for the JournalEntry - * + * * @return float */ public function getAmount() @@ -133,10 +133,10 @@ public function getAmount() } // Path: Memo, datatype: STRTYPE - + /** * Set the Memo for the JournalEntry - * + * * @param string $value * @return boolean */ @@ -147,7 +147,7 @@ public function setMemo($value) /** * Get the Memo for the JournalEntry - * + * * @return string */ public function getMemo() @@ -156,10 +156,10 @@ public function getMemo() } // Path: EntityRef ListID, datatype: STRTYPE - + /** * Set the EntityRef ListID for the JournalEntry - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -170,7 +170,7 @@ public function setEntityListID($ListID) /** * Get the EntityRef ListID for the JournalEntry - * + * * @return string */ public function getEntityListID() @@ -180,7 +180,7 @@ public function getEntityListID() /** * Set the primary key for the related record within your own application for the JournalEntry - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -190,10 +190,10 @@ public function setEntityApplicationID($value) } // Path: EntityRef FullName, datatype: STRTYPE - + /** * Set the EntityRef FullName for the JournalEntry - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -204,7 +204,7 @@ public function setEntityName($FullName) /** * Get the EntityRef FullName for the JournalEntry - * + * * @return string */ public function getEntityName() @@ -213,10 +213,10 @@ public function getEntityName() } // Path: ClassRef ListID, datatype: STRTYPE - + /** * Set the ClassRef ListID for the JournalEntry - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -227,7 +227,7 @@ public function setClassListID($ListID) /** * Get the ClassRef ListID for the JournalEntry - * + * * @return string */ public function getClassListID() @@ -237,7 +237,7 @@ public function getClassListID() /** * Set the primary key for the related record within your own application for the JournalEntry - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -247,10 +247,10 @@ public function setClassApplicationID($value) } // Path: ClassRef FullName, datatype: STRTYPE - + /** * Set the ClassRef FullName for the JournalEntry - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -261,7 +261,7 @@ public function setClassName($FullName) /** * Get the ClassRef FullName for the JournalEntry - * + * * @return string */ public function getClassName() @@ -270,10 +270,10 @@ public function getClassName() } // Path: ItemSalesTaxRef ListID, datatype: STRTYPE - + /** * Set the ItemSalesTaxRef ListID for the JournalEntry - * + * * @param string $ListID The ListID of the record to reference * @return boolean */ @@ -284,7 +284,7 @@ public function setItemSalesTaxListID($ListID) /** * Get the ItemSalesTaxRef ListID for the JournalEntry - * + * * @return string */ public function getItemSalesTaxListID() @@ -294,7 +294,7 @@ public function getItemSalesTaxListID() /** * Set the primary key for the related record within your own application for the JournalEntry - * + * * @param mixed $value The primary key within your own application * @return string */ @@ -304,10 +304,10 @@ public function setItemSalesTaxApplicationID($value) } // Path: ItemSalesTaxRef FullName, datatype: STRTYPE - + /** * Set the ItemSalesTaxRef FullName for the JournalEntry - * + * * @param string $FullName The FullName of the record to reference * @return boolean */ @@ -318,7 +318,7 @@ public function setItemSalesTaxName($FullName) /** * Get the ItemSalesTaxRef FullName for the JournalEntry - * + * * @return string */ public function getItemSalesTaxName() @@ -326,11 +326,11 @@ public function getItemSalesTaxName() return $this->get('ItemSalesTaxRef FullName'); } - // Path: BillableStatus, datatype: - + // Path: BillableStatus, datatype: + /** * Set the BillableStatus for the JournalEntry - * + * * @param string $value * @return boolean */ @@ -341,17 +341,17 @@ public function setBillableStatus($value) /** * Get the BillableStatus for the JournalEntry - * + * * @return string */ public function getBillableStatus() { return $this->get('BillableStatus'); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/NonInventoryItem.php b/QuickBooks/QBXML/Object/NonInventoryItem.php index 98040666..12f20947 100755 --- a/QuickBooks/QBXML/Object/NonInventoryItem.php +++ b/QuickBooks/QBXML/Object/NonInventoryItem.php @@ -2,49 +2,49 @@ /** * QuickBooks NonInventoryItem object container - * - * NOTE: By default, NonInventoryItems are created as SalesOrPurchase items, and are - * thus *NOT* created as SalesAndPurchase items. If you want to create an item + * + * NOTE: By default, NonInventoryItems are created as SalesOrPurchase items, and are + * thus *NOT* created as SalesAndPurchase items. If you want to create an item * that is sold *and* purchased, you'll need to set the type with the method: * -> {@link QuickBooks_Object_NonInventoryItem::isSalesAndPurchase()} - * + * * @todo Verify the get/set methods on this one... it was copied from ServiceItem * @todo Add isActive(), getIsActive(), etc. methods - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_NonInventoryItem extends QuickBooks_QBXML_Object { protected $_is_sales_and_purchase; - + public function __construct($arr = array(), $is_sales_and_purchase = false) { parent::__construct($arr); - + if (count($this->getArray('SalesAndPurchase')) > 0) { $is_sales_and_purchase = true; } - + $this->_is_sales_and_purchase = $is_sales_and_purchase; } - + /** * Set the ListID for this item - * + * * @param string $ListID * @return boolean */ @@ -52,20 +52,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID for this item - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name for this item - * + * * @param string $name * @return boolean */ @@ -73,10 +73,10 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name for this item - * + * * @return string */ public function getName() @@ -88,53 +88,53 @@ public function getUnitOfMeasureSetListID() { return $this->get('UnitOfMeasureSetRef ListID'); } - + public function getUnitOfMeasureSetFullName() { return $this->get('UnitOfMeasureSetRef FullName'); } - + /** * Tell (and optionally set) whether or not this item is currently for Sale *and* Purchase - * + * * @param boolean $enable * @return boolean */ public function isSalesAndPurchase($enable = null) { $current = $this->_is_sales_and_purchase; - + if (!is_null($enable)) { $this->_is_sales_and_purchase = (boolean) $enable; } - + return $current; } - + /** * Tell (and optionall set) whether or not this item is currently for Sale *or* Purchase - * + * * @param boolean $enable * @return boolean */ public function isSalesOrPurchase($enable = null) { $current = !$this->_is_sales_and_purchase; - + if (!is_null($enable)) { $this->_is_sales_and_purchase = ! (boolean) $enable; - } - + } + return $current; } - + // Sales OR Purchase - + /** * Set the description of this item (Sales OR Purchase) - * + * * @param string $descrip * @return boolean */ @@ -147,20 +147,20 @@ public function getDescription() { return $this->get('SalesOrPurchase Desc'); } - + /** * Set the price for this item (Sales OR Purchase) - * + * * @param string $price * @return boolean */ public function setPrice($price) { $this->remove('SalesOrPurchase PricePercent'); - + return $this->set('SalesOrPurchase Price', sprintf('%01.2f', (float) $price)); } - + /** * Get the price for this item (Sales OR Purchase) */ @@ -168,17 +168,17 @@ public function getPrice() { return $this->get('SalesOrPurchase Price'); } - + /** * Set the price percent for this item (Sales OR Purchase) */ public function setPricePercent($percent) { $this->remove('SalesOrPurchase Price'); - + return $this->set('SalesOrPurchase PricePercent', (float) $percent); } - + /** * Get the price percent for this item (Sales OR Purchase) */ @@ -186,10 +186,10 @@ public function getPricePercent() { return $this->get('SalesOrPurchase PricePercent'); } - + /** * Set the account ListID for this item (Sales OR Purchase) - * + * * @param string $ListID * @return string */ @@ -197,7 +197,7 @@ public function setAccountListID($ListID) { return $this->set('SalesOrPurchase AccountRef ListID', $ListID); } - + /** * (Sales OR Purchase) */ @@ -205,7 +205,7 @@ public function setAccountName($name) { return $this->set('SalesOrPurchase AccountRef FullName', $name); } - + /** * (Sales OR Purchase) */ @@ -218,7 +218,7 @@ public function getAccountApplicationID() { return $this->get('SalesOrPurchase AccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** * (Sales OR Purchase) */ @@ -226,7 +226,7 @@ public function getAccountListID() { return $this->get('SalesOrPurchase AccountRef ListID'); } - + /** * (Sales OR Purchase) */ @@ -234,49 +234,49 @@ public function getAccountName() { return $this->get('SalesOrPurchase AccountRef FullName'); } - + // Sales AND Purchase - + public function setSalesDescription($descrip) { return $this->set('SalesAndPurchase SalesDesc', $descrip); } - + public function getSalesDescription() { return $this->get('SalesAndPurchase SalesDesc'); } - + public function setSalesPrice($price) { return $this->set('SalesAndPurchase SalesPrice', sprintf('%01.2f', (float) $price)); } - + public function getSalesPrice() { return $this->get('SalesAndPurchase SalesPrice'); } - + public function setIncomeAccountListID($ListID) { return $this->set('SalesAndPurchase IncomeAccountRef ListID', $ListID); } - + public function getIncomeAccountListID() { return $this->get('SalesAndPurchase IncomeAccountRef ListID'); } - + public function setIncomeAccountName($name) { return $this->set('SalesAndPurchase IncomeAccountRef FullName', $name); } - + public function getIncomeAccountName() { return $this->get('SalesAndPurchase IncomeAccountRef FullName'); } - + public function setIncomeAccountApplicationID($value) { return $this->set('SalesAndPurchase IncomeAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -286,37 +286,37 @@ public function getIncomeAccountApplicationID() { return $this->get('SalesAndPurchase IncomeAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setPurchaseDescription($descrip) { return $this->set('SalesAndPurchase PurchaseDesc', $descrip); } - + public function getPurchaseDescription() { return $this->get('SalesAndPurchase PurchaseDesc'); } - + public function setPurchaseCost($cost) { return $this->set('SalesAndPurchase PurchaseCost', sprintf('%01.2f', (float) $cost)); } - + public function getPurchaseCost() { return $this->get('SalesAndPurchase PurchaseCost'); } - + public function setExpenseAccountListID($ListID) { return $this->set('SalesAndPurchase ExpenseAccountRef ListID', $ListID); } - + public function setExpenseAccountName($name) { return $this->set('SalesAndPurchase ExpenseAccountRef FullName', $name); } - + public function setExpenseAccountApplicationID($value) { return $this->set('SalesAndPurchase ExpenseAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -326,27 +326,27 @@ public function getExpenseAccountApplicationID() { return $this->get('SalesAndPurchase ExpenseAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getExpenseAccountListID() { return $this->get('SalesAndPurchase ExpenseAccountRef ListID'); } - + public function getExpenseAccountName() { return $this->get('SalesAndPurchase ExpenseAccountRef FullName'); } - + public function setPreferredVendorListID($ListID) { return $this->set('SalesAndPurchase PrefVendorRef ListID', $ListID); } - + public function setPreferredVendorName($name) { return $this->set('SalesAndPurchase PrefVendorRef FullName', $name); } - + public function setPreferredVendorApplicationID($value) { return $this->set('SalesAndPurchase PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_VENDOR, QUICKBOOKS_LISTID, $value)); @@ -356,20 +356,20 @@ public function getPreferredVendorApplicationID() { return $this->get('SalesAndPurchase PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getPreferredVendorListID() { return $this->get('SalesAndPurchase PrefVendorRef ListID'); } - + public function getPreferredVendorName() { return $this->get('SalesAndPurchase PrefVendorRef FullName'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() @@ -377,7 +377,7 @@ protected function _cleanup() if ($this->isSalesAndPurchase()) { // Remove any SalesOrPurchase keys - + foreach ($this->getArray('SalesOrPurchase*') as $key => $value) { $this->remove($key); @@ -390,23 +390,23 @@ protected function _cleanup() $this->remove($key); } } - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -416,13 +416,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version, $locale, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/OtherChargeItem.php b/QuickBooks/QBXML/Object/OtherChargeItem.php index f0a50d96..6a5bad7e 100755 --- a/QuickBooks/QBXML/Object/OtherChargeItem.php +++ b/QuickBooks/QBXML/Object/OtherChargeItem.php @@ -2,10 +2,10 @@ /** * QuickBooks OtherChargeItem object container - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ @@ -16,7 +16,7 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * QuickBooks ServiceItem object + * QuickBooks ServiceItem object */ class QuickBooks_QBXML_Object_OtherChargeItem extends QuickBooks_QBXML_Object { @@ -24,25 +24,25 @@ class QuickBooks_QBXML_Object_OtherChargeItem extends QuickBooks_QBXML_Object * Flag indicating whether or not this for sales *AND* purchase, or just sales *OR* purchase */ protected $_is_sales_and_purchase; - + /** * Create a new QuickBooks_Object_ServiceItem object (ServiceItem) */ public function __construct($arr = array(), $is_sales_and_purchase = false) { parent::__construct($arr); - + if (count($this->getArray('SalesAndPurchase')) > 0) { $is_sales_and_purchase = true; } - + $this->_is_sales_and_purchase = $is_sales_and_purchase; } - + /** * Set the ListID for this item - * + * * @param string $ListID * @return boolean */ @@ -50,20 +50,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID for this item - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name for this item - * + * * @param string $name * @return boolean */ @@ -71,137 +71,137 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name for this item - * + * * @return string */ public function getName() { return $this->get('Name'); } - + public function setIsActive($active) { - if (strtolower($active) == 'true' or + if (strtolower($active) == 'true' or (is_bool($active) and $active)) { return $this->set('IsActive', 'true'); } - + return $this->set('IsActive', 'false'); } - + public function getIsActive() { $active = $this->get('IsActive'); - - return strtolower($active) == 'true' or + + return strtolower($active) == 'true' or (is_bool($active) and $active); } - + public function setParentListID($ListID) { return $this->set('ParentRef ListID', $ListID); } - + public function setParentName($name) { return $this->set('ParentRef FullName', $name); } - + public function setParentApplicationID($value) { return $this->set('ParentRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ITEM, QUICKBOOKS_LISTID, $value)); } - + public function getParentListID() { - return $this->get('ParentRef ListID'); + return $this->get('ParentRef ListID'); } - + public function getParentName() { return $this->get('ParentRef FullName'); } - + public function getParentApplicationID() { return $this->extractApplicationID($this->get('ParentRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + public function setSalesTaxCodeListID($ListID) { return $this->set('SalesTaxCodeRef ListID', $ListID); } - + public function setSalesTaxCodeName($name) { return $this->set('SalesTaxCodeRef FullName', $name); } - + public function setSalesTaxCodeApplicationID($value) { return $this->set('SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SALESTAXCODE, QUICKBOOKS_LISTID, $value)); } - + public function getSalesTaxCodeListID() { return $this->get('SalesTaxCodeRef ListID'); } - + public function getSalesTaxCodeName() { return $this->get('SalesTaxCodeRef FullName'); } - + public function getSalesTaxCodeApplicationID() { return $this->extractApplicationID($this->get('SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + /** * Tell (and optionally set) whether or not this item is currently for Sale *and* Purchase - * + * * @param boolean $enable * @return boolean */ public function isSalesAndPurchase($enable = null) { $current = $this->_is_sales_and_purchase; - + if (!is_null($enable)) { $this->_is_sales_and_purchase = (boolean) $enable; } - + return $current; } - + /** * Tell (and optionall set) whether or not this item is currently for Sale *or* Purchase - * + * * @param boolean $enable * @return boolean */ public function isSalesOrPurchase($enable = null) { $current = !$this->_is_sales_and_purchase; - + if (!is_null($enable)) { $this->_is_sales_and_purchase = ! (boolean) $enable; - } - + } + return $current; } - + // Sales OR Purchase - + /** * Set the description of this item (Sales OR Purchase) - * + * * @param string $descrip * @return boolean */ @@ -214,20 +214,20 @@ public function getDescription() { return $this->get('SalesOrPurchase Desc'); } - + /** * Set the price for this item (Sales OR Purchase) - * + * * @param string $price * @return boolean */ public function setPrice($price) { $this->remove('SalesOrPurchase PricePercent'); - + return $this->set('SalesOrPurchase Price', (float) $price); } - + /** * Get the price for this item (Sales OR Purchase) */ @@ -235,30 +235,30 @@ public function getPrice() { return $this->get('SalesOrPurchase Price'); } - + /** * Set the price percent for this item (Sales OR Purchase) */ public function setPricePercent($percent) { $this->remove('SalesOrPurchase Price'); - + return $this->set('SalesOrPurchase PricePercent', $percent); } - + /** * Get the price percent for this item (Sales OR Purchase) - * + * * @return float */ public function getPricePercent() { return $this->get('SalesOrPurchase PricePercent'); } - + /** * Set the account ListID for this item (Sales OR Purchase) - * + * * @param string $ListID * @return boolean */ @@ -266,10 +266,10 @@ public function setAccountListID($ListID) { return $this->set('SalesOrPurchase AccountRef ListID', $ListID); } - + /** * Set the account name for this item (Sales OR Purchase) - * + * * @param string $name * @return boolean */ @@ -277,7 +277,7 @@ public function setAccountName($name) { return $this->set('SalesOrPurchase AccountRef FullName', $name); } - + /** * (Sales OR Purchase) */ @@ -290,69 +290,69 @@ public function getAccountApplicationID() { return $this->get('SalesOrPurchase AccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** * Get the account ListID for this item (Sales OR Purchase) - * + * * @return string */ public function getAccountListID() { return $this->get('SalesOrPurchase AccountRef ListID'); } - + /** * Get the account name for this item (Sales OR Purchase) - * - * @return string + * + * @return string */ public function getAccountName() { return $this->get('SalesOrPurchase AccountRef FullName'); } - + // Sales AND Purchase - + public function setSalesDescription($descrip) { return $this->set('SalesAndPurchase SalesDesc', $descrip); } - + public function getSalesDescription() { return $this->get('SalesAndPurchase SalesDesc'); } - + public function setSalesPrice($price) { return $this->set('SalesAndPurchase SalesPrice', (float) $price); } - + public function getSalesPrice() { return $this->get('SalesAndPurchase SalesPrice'); } - + public function setIncomeAccountListID($ListID) { return $this->set('SalesAndPurchase IncomeAccountRef ListID', $ListID); } - + public function getIncomeAccountListID() { return $this->get('SalesAndPurchase IncomeAccountRef ListID'); } - + public function setIncomeAccountName($name) { return $this->set('SalesAndPurchase IncomeAccountRef FullName', $name); } - + public function getIncomeAccountName() { return $this->get('SalesAndPurchase IncomeAccountRef FullName'); } - + public function setIncomeAccountApplicationID($value) { return $this->set('SalesAndPurchase IncomeAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -362,37 +362,37 @@ public function getIncomeAccountApplicationID() { return $this->get('SalesAndPurchase IncomeAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setPurchaseDescription($descrip) { return $this->set('SalesAndPurchase PurchaseDesc', $descrip); } - + public function getPurchaseDescription() { return $this->get('SalesAndPurchase PurchaseDesc'); } - + public function setPurchaseCost($cost) { return $this->set('SalesAndPurchase PurchaseCost', (int) $cost); } - + public function getPurchaseCost() { return $this->get('SalesAndPurchase PurchaseCost'); } - + public function setExpenseAccountListID($ListID) { return $this->set('SalesAndPurchase ExpenseAccountRef ListID', $ListID); } - + public function setExpenseAccountName($name) { return $this->set('SalesAndPurchase ExpenseAccountRef FullName', $name); } - + public function setExpenseAccountApplicationID($value) { return $this->set('SalesAndPurchase ExpenseAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -402,27 +402,27 @@ public function getExpenseAccountApplicationID() { return $this->get('SalesAndPurchase ExpenseAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getExpenseAccountListID() { return $this->get('SalesAndPurchase ExpenseAccountRef ListID'); } - + public function getExpenseAccountName() { return $this->get('SalesAndPurchase ExpenseAccountRef FullName'); } - + public function setPreferredVendorListID($ListID) { return $this->set('SalesAndPurchase PrefVendorRef ListID', $ListID); } - + public function setPreferredVendorName($name) { return $this->set('SalesAndPurchase PrefVendorRef FullName', $name); } - + public function setPreferredVendorApplicationID($value) { return $this->set('SalesAndPurchase PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_VENDOR, QUICKBOOKS_LISTID, $value)); @@ -432,20 +432,20 @@ public function getPreferredVendorApplicationID() { return $this->get('SalesAndPurchase PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getPreferredVendorListID() { return $this->get('SalesAndPurchase PrefVendorRef ListID'); } - + public function getPreferredVendorName() { return $this->get('SalesAndPurchase PrefVendorRef FullName'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() @@ -453,7 +453,7 @@ protected function _cleanup() if ($this->isSalesAndPurchase()) { // Remove any SalesOrPurchase keys - + foreach ($this->getArray('SalesOrPurchase*') as $key => $value) { $this->remove($key); @@ -466,23 +466,23 @@ protected function _cleanup() $this->remove($key); } } - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -492,13 +492,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/PaymentItem.php b/QuickBooks/QBXML/Object/PaymentItem.php index 2017e603..3882e223 100755 --- a/QuickBooks/QBXML/Object/PaymentItem.php +++ b/QuickBooks/QBXML/Object/PaymentItem.php @@ -2,12 +2,12 @@ /** * QuickBooks OtherChargeItem object container - * + * * @todo FIX THIS FIX THIS FIX THIS! - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ @@ -18,7 +18,7 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * QuickBooks ServiceItem object + * QuickBooks ServiceItem object */ class QuickBooks_QBXML_Object_PaymentItem extends QuickBooks_QBXML_Object { @@ -26,25 +26,25 @@ class QuickBooks_QBXML_Object_PaymentItem extends QuickBooks_QBXML_Object * Flag indicating whether or not this for sales *AND* purchase, or just sales *OR* purchase */ protected $_is_sales_and_purchase; - + /** * Create a new QuickBooks_Object_ServiceItem object (ServiceItem) */ public function __construct($arr = array(), $is_sales_and_purchase = false) { parent::__construct($arr); - + if (count($this->getArray('SalesAndPurchase')) > 0) { $is_sales_and_purchase = true; } - + $this->_is_sales_and_purchase = $is_sales_and_purchase; } - + /** * Set the ListID for this item - * + * * @param string $ListID * @return boolean */ @@ -52,20 +52,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID for this item - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name for this item - * + * * @param string $name * @return boolean */ @@ -73,137 +73,137 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name for this item - * + * * @return string */ public function getName() { return $this->get('Name'); } - + public function setIsActive($active) { - if (strtolower($active) == 'true' or + if (strtolower($active) == 'true' or (is_bool($active) and $active)) { return $this->set('IsActive', 'true'); } - + return $this->set('IsActive', 'false'); } - + public function getIsActive() { $active = $this->get('IsActive'); - - return strtolower($active) == 'true' or + + return strtolower($active) == 'true' or (is_bool($active) and $active); } - + public function setParentListID($ListID) { return $this->set('ParentRef ListID', $ListID); } - + public function setParentName($name) { return $this->set('ParentRef FullName', $name); } - + public function setParentApplicationID($value) { return $this->set('ParentRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ITEM, QUICKBOOKS_LISTID, $value)); } - + public function getParentListID() { - return $this->get('ParentRef ListID'); + return $this->get('ParentRef ListID'); } - + public function getParentName() { return $this->get('ParentRef FullName'); } - + public function getParentApplicationID() { return $this->extractApplicationID($this->get('ParentRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + public function setSalesTaxCodeListID($ListID) { return $this->set('SalesTaxCodeRef ListID', $ListID); } - + public function setSalesTaxCodeName($name) { return $this->set('SalesTaxCodeRef FullName', $name); } - + public function setSalesTaxCodeApplicationID($value) { return $this->set('SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SALESTAXCODE, QUICKBOOKS_LISTID, $value)); } - + public function getSalesTaxCodeListID() { return $this->get('SalesTaxCodeRef ListID'); } - + public function getSalesTaxCodeName() { return $this->get('SalesTaxCodeRef FullName'); } - + public function getSalesTaxCodeApplicationID() { return $this->extractApplicationID($this->get('SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + /** * Tell (and optionally set) whether or not this item is currently for Sale *and* Purchase - * + * * @param boolean $enable * @return boolean */ public function isSalesAndPurchase($enable = null) { $current = $this->_is_sales_and_purchase; - + if (!is_null($enable)) { $this->_is_sales_and_purchase = (boolean) $enable; } - + return $current; } - + /** * Tell (and optionall set) whether or not this item is currently for Sale *or* Purchase - * + * * @param boolean $enable * @return boolean */ public function isSalesOrPurchase($enable = null) { $current = !$this->_is_sales_and_purchase; - + if (!is_null($enable)) { $this->_is_sales_and_purchase = ! (boolean) $enable; - } - + } + return $current; } - + // Sales OR Purchase - + /** * Set the description of this item (Sales OR Purchase) - * + * * @param string $descrip * @return boolean */ @@ -216,20 +216,20 @@ public function getDescription() { return $this->get('SalesOrPurchase Desc'); } - + /** * Set the price for this item (Sales OR Purchase) - * + * * @param string $price * @return boolean */ public function setPrice($price) { $this->remove('SalesOrPurchase PricePercent'); - + return $this->set('SalesOrPurchase Price', (float) $price); } - + /** * Get the price for this item (Sales OR Purchase) */ @@ -237,30 +237,30 @@ public function getPrice() { return $this->get('SalesOrPurchase Price'); } - + /** * Set the price percent for this item (Sales OR Purchase) */ public function setPricePercent($percent) { $this->remove('SalesOrPurchase Price'); - + return $this->set('SalesOrPurchase PricePercent', $percent); } - + /** * Get the price percent for this item (Sales OR Purchase) - * + * * @return float */ public function getPricePercent() { return $this->get('SalesOrPurchase PricePercent'); } - + /** * Set the account ListID for this item (Sales OR Purchase) - * + * * @param string $ListID * @return boolean */ @@ -268,10 +268,10 @@ public function setAccountListID($ListID) { return $this->set('SalesOrPurchase AccountRef ListID', $ListID); } - + /** * Set the account name for this item (Sales OR Purchase) - * + * * @param string $name * @return boolean */ @@ -279,7 +279,7 @@ public function setAccountName($name) { return $this->set('SalesOrPurchase AccountRef FullName', $name); } - + /** * (Sales OR Purchase) */ @@ -292,69 +292,69 @@ public function getAccountApplicationID() { return $this->get('SalesOrPurchase AccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** * Get the account ListID for this item (Sales OR Purchase) - * + * * @return string */ public function getAccountListID() { return $this->get('SalesOrPurchase AccountRef ListID'); } - + /** * Get the account name for this item (Sales OR Purchase) - * - * @return string + * + * @return string */ public function getAccountName() { return $this->get('SalesOrPurchase AccountRef FullName'); } - + // Sales AND Purchase - + public function setSalesDescription($descrip) { return $this->set('SalesAndPurchase SalesDesc', $descrip); } - + public function getSalesDescription() { return $this->get('SalesAndPurchase SalesDesc'); } - + public function setSalesPrice($price) { return $this->set('SalesAndPurchase SalesPrice', (float) $price); } - + public function getSalesPrice() { return $this->get('SalesAndPurchase SalesPrice'); } - + public function setIncomeAccountListID($ListID) { return $this->set('SalesAndPurchase IncomeAccountRef ListID', $ListID); } - + public function getIncomeAccountListID() { return $this->get('SalesAndPurchase IncomeAccountRef ListID'); } - + public function setIncomeAccountName($name) { return $this->set('SalesAndPurchase IncomeAccountRef FullName', $name); } - + public function getIncomeAccountName() { return $this->get('SalesAndPurchase IncomeAccountRef FullName'); } - + public function setIncomeAccountApplicationID($value) { return $this->set('SalesAndPurchase IncomeAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -369,32 +369,32 @@ public function setPurchaseDescription($descrip) { return $this->set('SalesAndPurchase PurchaseDesc', $descrip); } - + public function getPurchaseDescription() { return $this->get('SalesAndPurchase PurchaseDesc'); } - + public function setPurchaseCost($cost) { return $this->set('SalesAndPurchase PurchaseCost', (int) $cost); } - + public function getPurchaseCost() { return $this->get('SalesAndPurchase PurchaseCost'); } - + public function setExpenseAccountListID($ListID) { return $this->set('SalesAndPurchase ExpenseAccountRef ListID', $ListID); } - + public function setExpenseAccountName($name) { return $this->set('SalesAndPurchase ExpenseAccountRef FullName', $name); } - + public function setExpenseAccountApplicationID($value) { return $this->set('SalesAndPurchase ExpenseAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -404,27 +404,27 @@ public function getExpenseAccountApplicationID() { return $this->get('SalesAndPurchase ExpenseAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getExpenseAccountListID() { return $this->get('SalesAndPurchase ExpenseAccountRef ListID'); } - + public function getExpenseAccountName() { return $this->get('SalesAndPurchase ExpenseAccountRef FullName'); } - + public function setPreferredVendorListID($ListID) { return $this->set('SalesAndPurchase PrefVendorRef ListID', $ListID); } - + public function setPreferredVendorName($name) { return $this->set('SalesAndPurchase PrefVendorRef FullName', $name); } - + public function setPreferredVendorApplicationID($value) { return $this->set('SalesAndPurchase PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_VENDOR, QUICKBOOKS_LISTID, $value)); @@ -434,20 +434,20 @@ public function getPreferredVendorApplicationID() { return $this->get('SalesAndPurchase PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getPreferredVendorListID() { return $this->get('SalesAndPurchase PrefVendorRef ListID'); } - + public function getPreferredVendorName() { return $this->get('SalesAndPurchase PrefVendorRef FullName'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() @@ -455,7 +455,7 @@ protected function _cleanup() if ($this->isSalesAndPurchase()) { // Remove any SalesOrPurchase keys - + foreach ($this->getArray('SalesOrPurchase*') as $key => $value) { $this->remove($key); @@ -468,23 +468,23 @@ protected function _cleanup() $this->remove($key); } } - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -494,13 +494,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/PaymentMethod.php b/QuickBooks/QBXML/Object/PaymentMethod.php index 52bff23b..bc7f15cf 100755 --- a/QuickBooks/QBXML/Object/PaymentMethod.php +++ b/QuickBooks/QBXML/Object/PaymentMethod.php @@ -2,37 +2,37 @@ /** * QuickBooks ShipMethod object container - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_PaymentMethod extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_PaymentMethod object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID - * + * * @param string $ListID * @return boolean */ @@ -40,20 +40,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name - * + * * @param string $name * @return boolean */ @@ -61,20 +61,20 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** * Set this as active or not - * + * * @param boolean $value * @return boolean */ @@ -85,32 +85,32 @@ public function setIsActive($value) /** * Tell whether or not this is active - * + * * @return boolean */ public function getIsActive() { return $this->getBooleanType('IsActive'); } - + public function getPaymentMethodType() { return $this->get('PaymentMethodType'); } - + /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this object - * + * * @param string $request * @param boolean $nest * @return array @@ -118,13 +118,13 @@ protected function _cleanup() public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -134,13 +134,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/ReceivePayment.php b/QuickBooks/QBXML/Object/ReceivePayment.php index d4c099b8..6e1e1c51 100755 --- a/QuickBooks/QBXML/Object/ReceivePayment.php +++ b/QuickBooks/QBXML/Object/ReceivePayment.php @@ -2,10 +2,10 @@ /** * QuickBooks ReceivePayment object container - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ @@ -21,23 +21,23 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/ReceivePayment/AppliedToTxn.php'); /** - * QuickBooks ReceivePayment object + * QuickBooks ReceivePayment object */ class QuickBooks_QBXML_Object_ReceivePayment extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_ReceivePayment object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the TxnID of the Class - * + * * @param string $TxnID * @return boolean */ @@ -45,7 +45,7 @@ public function setTxnID($TxnID) { return $this->set('TxnID', $TxnID); } - + /** * Alias of {@link QuickBooks_Object_ReceivePayment::setTxnID()} */ @@ -53,17 +53,17 @@ public function setTransactionID($TxnID) { return $this->setTxnID($TxnID); } - + /** * Get the ListID of the Class - * + * * @return string */ public function getTxnID() { return $this->get('TxnID'); } - + /** * Alias of {@link QuickBooks_Object_ReceivePayment::getTxnID()} */ @@ -71,10 +71,10 @@ public function getTransactionID() { return $this->getTxnID(); } - + /** * Set the customer ListID - * + * * @param string $ListID * @return boolean */ @@ -82,10 +82,10 @@ public function setCustomerListID($ListID) { return $this->set('CustomerRef ListID' , $ListID); } - + /** * Set the customer ApplicationID (auto-replaced by the API with a ListID) - * + * * @param mixed $value * @return boolean */ @@ -93,13 +93,13 @@ public function setCustomerApplicationID($value) { return $this->set('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_LISTID, $value)); } - - + + public function getCustomerApplicationID() { return $this->get('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** * @deprecated */ @@ -107,22 +107,22 @@ public function setCustomerName($name) { return $this->set('CustomerRef FullName', $name); } - + public function setCustomerFullName($name) { return $this->set('CustomerRef FullName', $name); } - + /** * Get the customer ListID - * + * * @return string */ public function getCustomerListID() { return $this->get('CustomerRef ListID'); } - + /** * @deprecated */ @@ -130,15 +130,15 @@ public function getCustomerName() { return $this->get('CustomerRef FullName'); } - + public function getCustomerFullName() { return $this->get('CustomerRef FullName'); } - + /** * Set the transaction date - * + * * @param string $date * @return boolean */ @@ -146,7 +146,7 @@ public function setTxnDate($date) { return $this->setDateType('TxnDate', $date); } - + /** * Alias of {@link QuickBooks_Object_Invoice::setTxnDate()} */ @@ -154,22 +154,22 @@ public function setTransactionDate($date) { return $this->setTxnDate($date); } - + /** * Get the transaction date - * + * * @return string */ public function getTxnDate($format = 'Y-m-d') { return $this->getDateType('TxnDate'); } - - + + /** * Set the reference number - * + * * @param string $str * @return boolean */ @@ -177,17 +177,17 @@ public function setRefNumber($str) { return $this->set('RefNumber', $str); } - + /** * Get the reference number - * + * * @return string */ public function getRefNumber() { return $this->get('RefNumber'); } - + /** * Alias of {@link QuickBooks_Object_ReceivePayment::addAppliedToTxn()} */ @@ -195,34 +195,34 @@ public function addAppliedToTransaction($obj) { return $this->addAppliedToTxn($obj); } - + /** - * - * + * + * */ public function addAppliedToTxn($obj) { /* $lines = $this->get('AppliedToTxn'); - + if (!is_array($lines)) { $lines = array(); } - + // $lines[] = $obj; - + return $this->set('AppliedToTxn', $lines);*/ - + return $this->addListItem('AppliedToTxn', $obj); } - + public function getAppliedToTxn($i) { return $this->getListItem('AppliedToTxn', $i); } - + public function listAppliedToTxns() { return $this->getList('AppliedToTxn'); @@ -235,10 +235,10 @@ public function getTransactionDate($format = 'Y-m-d') { return $this->getDateType('TxnDate', $format); } - + /** * Set the total amount of the received payment - * + * * @param float $amount * @return boolean */ @@ -246,22 +246,22 @@ public function setTotalAmount($amount) { return $this->setAmountType('TotalAmount', $amount); } - + /** * Get the total amount of the received payment - * + * * @return float */ public function getTotalAmount() { return $this->getAmountType('TotalAmount'); } - + public function setARAccountListID($ListID) { return $this->set('ARAccountRef ListID', $ListID); } - + /** * @deprecated */ @@ -274,7 +274,7 @@ public function setARAccountFullName($name) { return $this->set('ARAccountRef FullName', $name); } - + public function setARAccountApplicationID($value) { return $this->set('ARAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -284,12 +284,12 @@ public function getARAccountApplicationID() { return $this->get('ARAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getARAccountListID() { return $this->get('ARAccountRef ListID'); } - + /** * @deprecated */ @@ -302,12 +302,12 @@ public function getARAccountFullName() { return $this->get('ARAccountRef FullName'); } - + public function setPaymentMethodListID($ListID) { return $this->set('PaymentMethodRef ListID', $ListID); } - + /** * @deprecated */ @@ -315,12 +315,12 @@ public function setPaymentMethodName($name) { return $this->set('PaymentMethodRef FullName', $name); } - + public function setPaymentMethodFullName($name) { return $this->set('PaymentMethodRef FullName', $name); } - + public function setPaymentMethodApplicationID($value) { return $this->set('PaymentMethodRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_PAYMENTMETHOD, QUICKBOOKS_LISTID, $value)); @@ -330,12 +330,12 @@ public function getPaymentMethodApplicationID() { return $this->get('PaymentMethodRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getPaymentMethodListID() { return $this->get('PaymentMethodRef ListID'); } - + /** * @deprecated */ @@ -343,17 +343,17 @@ public function getPaymentMethodName() { return $this->get('PaymentMethodRef FullName'); } - + public function getPaymentMethodFullName() { return $this->get('PaymentMethodRef FullName'); } - + public function setDepositToAccountListID($ListID) { return $this->set('DepositToAccountRef ListID', $ListID); } - + /** * @deprecated */ @@ -361,12 +361,12 @@ public function setDepositToAccountName($name) { return $this->set('DepositToAccountRef FullName', $name); } - + public function setDepositToAccountFullName($name) { return $this->set('DepositToAccountRef FullName', $name); } - + public function setDepositToAccountApplicationID($value) { return $this->set('DepositToAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -376,12 +376,12 @@ public function getDepositToAccountApplicationID() { return $this->get('DepositToAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getDepositToAccountListID() { return $this->get('DepositToAccountRef ListID'); } - + /** * @deprecated */ @@ -389,25 +389,25 @@ public function getDepositToAccountName() { return $this->get('DepositToAccountRef FullName'); } - + public function getDepositToAccountFullName() { return $this->get('DepositToAccountRef FullName'); } - + public function setMemo($memo) { return $this->set('Memo', $memo); } - + public function getMemo() { return $this->get('Memo'); } - + /** * Set whether or not this transaction is an auto-apply transaction - * + * * @param boolean $isautoapply * @return boolean */ @@ -425,27 +425,27 @@ public function setIsAutoApply($isautoapply) /** * Get whether or not this transaction is an auto-apply transaction - * + * * @return boolean */ public function getIsAutoApply() { return $this->get('IsAutoApply') != 'false'; } - + /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this Class object - * + * * @param string $request * @param boolean $nest * @return array @@ -453,42 +453,42 @@ protected function _cleanup() /*public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); }*/ - + public function asList($request) { switch ($request) { case 'ReceivePaymentAddRq': - + if (isset($this->_object['AppliedToTxn'])) { $this->_object['AppliedToTxnAdd'] = $this->_object['AppliedToTxn']; } - + break; case 'ReceivePaymentModRq': - + if (isset($this->_object['AppliedToTxn'])) { - $this->_object['AppliedToTxnMod'] = $this->_object['AppliedToTxn']; + $this->_object['AppliedToTxnMod'] = $this->_object['AppliedToTxn']; } - + break; } - + return parent::asList($request); } - + public function asXML($root = null, $parent = null, $object = null) { if (is_null($object)) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_RECEIVEPAYMENT: @@ -500,7 +500,7 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('AppliedToTxnAdd'); } } - + break; case QUICKBOOKS_MOD_RECEIVEPAYMENT: @@ -511,16 +511,16 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('AppliedToTxnMod'); } } - + break; } - + return parent::asXML($root, $parent, $object); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -531,14 +531,14 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } */ - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/ReceivePayment/AppliedToTxn.php b/QuickBooks/QBXML/Object/ReceivePayment/AppliedToTxn.php index d4becb37..432b6a86 100755 --- a/QuickBooks/QBXML/Object/ReceivePayment/AppliedToTxn.php +++ b/QuickBooks/QBXML/Object/ReceivePayment/AppliedToTxn.php @@ -1,115 +1,115 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/ReceivePayment.php'); /** - * - * + * + * */ class QuickBooks_QBXML_Object_ReceivePayment_AppliedToTxn extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks ReceivePayment AppliedToTxn object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + public function setTxnID($TxnID) { return $this->set('TxnID', $TxnID); } - + public function setTransactionID($TxnID) { return $this->setTxnID($TxnID); } - + public function getTxnID() { return $this->get('TxnID'); } - + public function getTransactionID() { return $this->getTxnID(); } - + public function setTxnApplicationID($value) { return $this->set(QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_INVOICE, QUICKBOOKS_TXNID, $value)); //return $this->set('NullRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_INVOICE, QUICKBOOKS_TXNID, $value)); } - + public function getTxnApplicationID() { - + } - + public function getPaymentAmount($amount) { return $this->getAmountType('PaymentAmount'); } - + public function setPaymentAmount($amount) { return $this->setAmountType('PaymentAmount', $amount); } - + public function setDiscountAmount($amount) { return $this->setAmountType('DiscountAmount', $amount); } - + public function getDiscountAmount() { return $this->getDiscountAmount('DiscountAmount'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { $this->_cleanup(); - + switch ($parent) { case QUICKBOOKS_ADD_RECEIVEPAYMENT: @@ -121,13 +121,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -136,13 +136,13 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesOrder.php b/QuickBooks/QBXML/Object/SalesOrder.php index a92232b1..bdfbd287 100755 --- a/QuickBooks/QBXML/Object/SalesOrder.php +++ b/QuickBooks/QBXML/Object/SalesOrder.php @@ -2,45 +2,45 @@ /** * QuickBooks SalesOrder object container - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/Generic.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/SalesOrder/SalesOrderLine.php'); /** - * - * + * + * */ class QuickBooks_QBXML_Object_SalesOrder extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks SalesOrder object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Alias of {@link QuickBooks_Object_SalesOrder::setTxnID()} */ @@ -53,10 +53,10 @@ public function getTransactionID() { return $this->getTxnID(); } - + /** * Set the transaction ID of the Invoice object - * + * * @param string $TxnID * @return boolean */ @@ -69,10 +69,10 @@ public function getTxnId() { return $this->get('TxnID'); } - + /** * Set the customer ListID - * + * * @param string $ListID * @return boolean */ @@ -80,10 +80,10 @@ public function setCustomerListID($ListID) { return $this->set('CustomerRef ListID' , $ListID); } - + /** * Set the customer ApplicationID (auto-replaced by the API with a ListID) - * + * * @param mixed $value * @return boolean */ @@ -96,10 +96,10 @@ public function getCustomerApplicationID() { return $this->get('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** * Set the customer name - * + * * @param string $name * @return boolean */ @@ -107,32 +107,32 @@ public function setCustomerName($name) { return $this->set('CustomerRef FullName', $name); } - + /** * Get the customer ListID - * + * * @return string */ public function getCustomerListID() { return $this->get('CustomerRef ListID'); } - + /** * Get the customer name - * + * * @return string */ public function getCustomerName() { return $this->get('CustomerRef FullName'); } - + public function setClassListID($ListID) { return $this->set('ClassRef ListID', $ListID); } - + public function setClassApplicationID($value) { return $this->set('ClassRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CLASS, QUICKBOOKS_LISTID, $value)); @@ -142,22 +142,22 @@ public function getClassApplicationID() { return $this->get('ClassRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setClassName($name) { return $this->set('ClassRef FullName', $name); } - + public function getClassName() { return $this->get('ClassRef FullName'); } - + public function getClassListID() { return $this->get('ClassRef ListID'); } - + public function setARAccountApplicationID($value) { return $this->set('ARAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -167,27 +167,27 @@ public function getARAccountApplicationID() { return $this->get('ARAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setARAccountListID($ListID) { return $this->set('ARAccountRef ListID', $ListID); } - + public function setARAccountName($name) { return $this->set('ARAccountRef FullName', $name); } - + public function getARAccountListID() { return $this->get('ARAccountRef ListID'); } - + public function getARAccountName() { return $this->get('ARAccountRef FullName'); } - + public function setTemplateApplicationID($value) { return $this->set('TemplateRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_TEMPLATE, QUICKBOOKS_LISTID, $value)); @@ -197,30 +197,30 @@ public function getTemplateApplicationID() { return $this->get('TemplateRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setTemplateName($name) { return $this->set('TemplateRef FullName', $name); } - + public function setTemplateListID($ListID) { return $this->set('TemplateRef ListID', $ListID); } - + public function getTemplateName() { return $this->get('TemplateRef FullName'); } - + public function getTemplateListID() { return $this->get('TemplateRef ListID'); } - + /** * Set the transaction date - * + * * @param string $date * @return boolean */ @@ -228,7 +228,7 @@ public function setTxnDate($date) { return $this->setDateType('TxnDate', $date); } - + /** * Alias of {@link QuickBooks_Object_Invoice::setTxnDate()} */ @@ -236,17 +236,17 @@ public function setTransactionDate($date) { return $this->setTxnDate($date); } - + /** * Get the transaction date - * + * * @return string */ public function getTxnDate($format = 'Y-m-d') { return $this->getDateType('TxnDate', $format); } - + /** * Alias of {@link QuickBooks_Object_Invoice::getTxnDate()} */ @@ -254,10 +254,10 @@ public function getTransactionDate() { return $this->getTxnDate(); } - + /** * Set the reference number - * + * * @param string $str * @return boolean */ @@ -265,20 +265,20 @@ public function setRefNumber($str) { return $this->set('RefNumber', $str); } - + /** * Get the reference number - * + * * @return string */ public function getRefNumber() { return $this->get('RefNumber'); } - + /** - * - * + * + * * @param string $part * @param array $defaults * @return array @@ -289,13 +289,13 @@ public function getShipAddress($part = null, $defaults = array()) { return $this->get('ShipAddress ' . $part); } - + return $this->getArray('ShipAddress *', $defaults); } - + /** * Set the shipping address for the invoice - * + * * @param string $addr1 * @param string $addr2 * @param string $addr3 @@ -315,17 +315,17 @@ public function setShipAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $a { $this->set('ShipAddress Addr' . $i, ${'addr' . $i}); } - + $this->set('ShipAddress City', $city); $this->set('ShipAddress State', $state); $this->set('ShipAddress PostalCode', $postalcode); $this->set('ShipAddress Country', $country); - $this->set('ShipAddress Note', $note); + $this->set('ShipAddress Note', $note); } - + /** - * - * + * + * * @param string $part * @param array $defaults * @return array @@ -336,13 +336,13 @@ public function getBillAddress($part = null, $defaults = array()) { return $this->get('BillAddress ' . $part); } - + return $this->getArray('BillAddress *', $defaults); } - + /** * Set the billing address for the invoice - * + * * @param string $addr1 * @param string $addr2 * @param string $addr3 @@ -361,23 +361,23 @@ public function setBillAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $a { $this->set('BillAddress Addr' . $i, ${'addr' . $i}); } - + $this->set('BillAddress City', $city); $this->set('BillAddress State', $state); $this->set('BillAddress PostalCode', $postalcode); $this->set('BillAddress Country', $country); - $this->set('BillAddress Note', $note); + $this->set('BillAddress Note', $note); } - + public function setIsPending($pending) { return $this->set('IsPending', (boolean) $pending); } - + public function getIsPending() { if ($this->exists('IsPending')) - { + { $pending = $this->get('IsPending'); if (is_bool($pending)) { @@ -392,25 +392,25 @@ public function getIsPending() return true; } } - + return null; } - + public function setPONumber($num) { return $this->set('PONumber', $num); } - + public function getPONumber() { return $this->get('PONumber'); } - + public function setTermsListID($ListID) { return $this->set('TermsRef ListID', $ListID); } - + public function setTermsApplicationID($value) { return $this->set('TermsRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_TERMS, QUICKBOOKS_LISTID, $value)); @@ -420,192 +420,192 @@ public function getTermsApplicationID() { return $this->get('TermsRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setTermsName($name) { return $this->set('TermsRef FullName', $name); } - + public function getTermsName() { return $this->get('TermsRef FullName'); } - + public function getTermsListID() { return $this->get('TermsRef ListID'); } - + public function setDueDate($date) { return $this->setDateType('DueDate', $date); } - + public function getDueDate($format = 'Y-m-d') { return $this->getDateType('DueDate', $format); } - + public function setSalesRepName($name) { - + } - + public function setSalesRepListID($ListID) { - + } - + public function setSalesRepApplicationID($value) { - + } public function getSalesRepApplicationID() { - + } - + public function getSalesRepName() { - + } - + public function getSalesRepListID() { - + } - + public function getFOB() { return $this->get('FOB'); } - + public function setFOB($fob) { return $this->set('FOB', $fob); } - + public function setShipDate($date) { return $this->setDateType('ShipDate', $date); } - + public function getShipDate($format = 'Y-m-d') { return $this->getDateType('ShipDate', $format); } - + public function setShipMethodApplicationID() { - + } public function getShipMethodApplicationID() { - + } - + public function setShipMethodName() { - + } - + public function setShipMethodListID() { - + } - + public function getShipMethodName() { - + } - + public function getShipMethodListID() { - + } - + public function setSalesTaxItemListID() { - + } - + public function setSalesTaxItemApplicationID() { - + } public function getSalesTaxItemApplicationID() { - + } - + public function setSalesTaxItemName() { - + } - + public function getSalesTaxItemName() { - + } - + public function getSalesTaxItemListID() { - + } - + public function setMemo($memo) { return $this->set('Memo', $memo); } - + public function getMemo() { return $this->get('Memo'); } - + public function setIsToBePrinted() { - + } - + public function getIsToBePrinted() { - + } - + public function setIsToBeEmailed() { - + } - + public function getIsToBeEmailed() { - + } - + public function setCustomerSalesTaxCodeListID() { - + } - + public function setCustomerSalesTaxCodeName() { - + } - + public function getCustomerSalesTaxCodeListID() { - + } - + public function getCustomerSalesTaxCodeName() { - + } - + public function setLinkToTxnID($TxnID) { return $this->set('LinkToTxnID', $TxnID); @@ -615,48 +615,48 @@ public function getLinkToTxnID() { return $this->get('LinkToTxnID'); } - + /* public function getInvoiceLines() { return $this->getList('InvoiceLine'); } - + public function getInvoiceLine($which) { $list = $this->getInvoiceLines(); - + if (isset($list[$which])) { return $list[$which]; } - + return null; } */ - + /* - public function setInvoiceLine($i, + public function setInvoiceLine($i, { - + } */ - + /** - * - * - * @param + * + * + * @param */ public function addInvoiceLine($obj) { $lines = $this->get('InvoiceLine'); /*$lines[] = array( - 'Quantity' => mt_rand(4, 8), - 'Amount' => mt_rand(255, 300), - 'ItemRef ListID' => 'test', + 'Quantity' => mt_rand(4, 8), + 'Amount' => mt_rand(255, 300), + 'ItemRef ListID' => 'test', ); */ - + /* $tmp = new QuickBooks_Object_Generic(); $tmp->set('Quantity', mt_rand(4, 8)); @@ -664,10 +664,10 @@ public function addInvoiceLine($obj) $tmp->set('ItemRef ListID', 'test'); $lines[] = $tmp; */ - + // $lines[] = $obj; - + return $this->set('InvoiceLine', $lines); } @@ -687,71 +687,71 @@ public function getSalesOrderLine($i) { return $this->getListItem('SalesOrderLine', $i); } - + public function setOther($other) { return $this->set('Other', $other); } - + public function getOther() { return $this->get('Other'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + public function asList($request) { switch ($request) { case 'SalesOrderAddRq': - + if (isset($this->_object['SalesOrderLine'])) { $this->_object['SalesOrderLineAdd'] = $this->_object['SalesOrderLine']; } - + break; case 'SalesOrderModRq': - + if (isset($this->_object['SalesOrderLine'])) { $this->_object['SalesOrderLineMod'] = $this->_object['SalesOrderLine']; } - + break; } - + return parent::asList($request); } - + public function asXML($root = null, $parent = null, $object = null) { if (is_null($object)) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_SALESORDER: - + foreach ($object['SalesOrderLineAdd'] as $key => $obj) { $obj->setOverride('SalesOrderLineAdd'); } - + break; - + case QUICKBOOKS_MOD_SALESORDER: if (isset($object['SalesOrderLine'])) { @@ -759,19 +759,19 @@ public function asXML($root = null, $parent = null, $object = null) } break; } - + //print_r($this->_object); - + return parent::asXML($root, $parent, $object); } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } @@ -788,13 +788,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version, $locale, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesOrder/SalesOrderLine.php b/QuickBooks/QBXML/Object/SalesOrder/SalesOrderLine.php index eb88274b..9d2d1ad2 100755 --- a/QuickBooks/QBXML/Object/SalesOrder/SalesOrderLine.php +++ b/QuickBooks/QBXML/Object/SalesOrder/SalesOrderLine.php @@ -1,263 +1,263 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/SalesOrder.php'); /** - * - * + * + * */ class QuickBooks_QBXML_Object_SalesOrder_SalesOrderLine extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks Invoice InvoiceLine object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + public function setItemListID($ListID) { return $this->set('ItemRef ListID', $ListID); } - + public function setItemApplicationID($value) { return $this->set('ItemRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ITEM, QUICKBOOKS_LISTID, $value)); } - + public function setItemName($name) { return $this->set('ItemRef FullName', $name); } - + public function getItemListID() { return $this->get('ItemRef ListID'); } - + public function getItemName() { return $this->get('ItemRef FullName'); } - + public function setDescription($descrip) { return $this->set('Desc', $descrip); } - + public function getDescription() { return $this->get('Desc'); } - + public function setQuantity($quan) { return $this->set('Quantity', (float) $quan); } - + public function getQuantity() { return $this->get('Quantity'); } - + public function setUnitOfMeasure($unit) { return $this->set('UnitOfMeasure', $unit); } - + public function getUnitOfMeasure() { return $this->get('UnitOfMeasure'); } - + public function setRate($rate) { return $this->set('Rate', (float) $rate); } - + public function getRate() { return $this->get('Rate'); } - + public function setRatePercent($percent) { return $this->set('RatePercent', (float) $percent); } - + public function getRatePercent() { return $this->get('RatePercent'); } - + public function setPriceLevelApplicationID($value) { - + } - + public function setPriceLevelName($name) { return $this->set('PriceLevelRef FullName', $name); } - + public function setPriceLevelListID($ListID) { return $this->set('PriceLevelRef ListID', $ListID); } - + public function getPriceLevelName() { return $this->get('PriceLevelRef FullName'); } - + public function getPriceLevelListID() { return $this->get('PriceLevelRef ListID'); } - + public function setClassListID($ListID) { return $this->set('ClassRef ListID', $ListID); } - + public function setClassApplicationID($value) { - + } - + public function setClassName($name) { return $this->set('ClassRef Name', $name); } - + public function getClassListID() { return $this->get('ClassRef ListID'); } - + public function getClassName() { return $this->get('ClassRef FullName'); } - + public function setAmount($amount) { return $this->setAmountType('Amount', $amount); } - + public function setServiceDate($date) { return $this->setDateType('ServiceDate', $date); } - + public function getServiceDate($format = 'Y-m-d') { return $this->getDateType('ServiceDate', $format); } - + public function setSalesTaxCodeName($name) { return $this->set('SalesTaxCodeRef FullName', $name); } - + public function setSalesTaxCodeListID($ListID) { return $this->set('SalesTaxCodeRef ListID', $ListID); } - + public function getSalesTaxCodeName() { return $this->get('SalesTaxCodeRef FullName'); } - + public function getSalesTaxCodeListID() { return $this->get('SalesTaxCodeRef ListID'); } - + public function setTaxable() { return $this->set('SalesTaxCodeRef FullName', QUICKBOOKS_TAXABLE); } - + public function setNonTaxable() { return $this->set('SalesTaxCodeRef FullName', QUICKBOOKS_NONTAXABLE); } - + public function getTaxable() { return $this->get('SalesTaxCodeRef FullName') == QUICKBOOKS_TAXABLE; } - + public function setOverrideItemAccountName($name) { return $this->set('OverrideItemAccountRef FullName', $name); } - + public function setOverrideItemAccountListID($ListID) { return $this->set('OverrideItemAccountRef ListID', $ListID); } - + public function setOverrideItemAccountApplicationID($value) { - + } - + public function getOverrideItemAccountListID() { return $this->get('OverrideItemAccountRef ListID'); } - + public function getOverrideItemAccountName() { return $this->get('OverrideItemAccountRef FullName'); } - + public function setOther1($value) { return $this->set('Other1', $value); } - + public function getOther1() { return $this->get('Other1'); } - + public function setOther2($value) { return $this->set('Other2', $value); } - + public function getOther2() { return $this->get('Other2'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() @@ -266,24 +266,24 @@ protected function _cleanup() { $this->set('Amount', sprintf('%01.2f', $this->get('Amount'))); } - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { $this->_cleanup(); - + switch ($parent) { case QUICKBOOKS_ADD_SALESORDER: @@ -295,13 +295,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -310,13 +310,13 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesReceipt.php b/QuickBooks/QBXML/Object/SalesReceipt.php index 6ad6fec4..28fd3735 100755 --- a/QuickBooks/QBXML/Object/SalesReceipt.php +++ b/QuickBooks/QBXML/Object/SalesReceipt.php @@ -2,10 +2,10 @@ /** * QuickBooks SalesReceipt object - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ @@ -46,20 +46,20 @@ * Sales receipts are like invoices and payments combined together, and are * usually used in cases where the purchase and payment are made at the same * time (store front purchases, shopping cart purchases by credit card, etc.) - * + * */ class QuickBooks_QBXML_Object_SalesReceipt extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks SalesReceipt object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Alias of {@link QuickBooks_Object_SalesReceipt::setTxnID()} */ @@ -72,10 +72,10 @@ public function getTransactionID() { return $this->getTxnID(); } - + /** * Set the transaction ID of the SalesReceipt object - * + * * @param string $TxnID * @return boolean */ @@ -88,10 +88,10 @@ public function getTxnID() { return $this->get('TxnID'); } - + /** * Set the customer ListID - * + * * @param string $ListID * @return boolean */ @@ -99,10 +99,10 @@ public function setCustomerListID($ListID) { return $this->set('CustomerRef ListID' , $ListID); } - + /** * Set the customer ApplicationID (auto-replaced by the API with a ListID) - * + * * @param mixed $value * @return boolean */ @@ -110,10 +110,10 @@ public function setCustomerApplicationID($value) { return $this->set('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_LISTID, $value)); } - + /** * Set the customer name - * + * * @param string $name * @return boolean */ @@ -121,84 +121,84 @@ public function setCustomerName($name) { return $this->set('CustomerRef FullName', $name); } - + public function setCustomerFullName($FullName) { return $this->setFullNameType('CustomerRef FullName', null, null, $FullName); } - + /** * Get the customer ListID - * + * * @return string */ public function getCustomerListID() { return $this->get('CustomerRef ListID'); } - + /** * Get the customer name - * + * * @return string */ public function getCustomerName() { return $this->get('CustomerRef FullName'); } - + /** * Get the customer application ID - * + * * @return mixed */ public function getCustomerApplicationID() { return $this->extractApplicationID($this->get('CustomerRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + /* public function setDiscountLineAmount($amount) { return $this->set('DiscountLine } - + public function setDiscountLineAccountName($name) { - + } - + public function setShippingLineAmount($amount) { - + } - + public function setShippingLineAccountName($name) { - + } - + public function setSalesTaxLineAmount($amount) { - + } - + public function setSalesTaxLineAccountName($name) { - + } */ - + public function setSalesTaxItemFullName($FullName) { return $this->setItemSalesTaxFullName($FullName); } - + public function setItemSalesTaxFullName($FullName) { return $this->setFullNameType('ItemSalesTaxRef FullName', null, null, $FullName); } - + public function setClassListID($ListID) { return $this->set('ClassRef ListID', $ListID); @@ -208,7 +208,7 @@ public function getClassListID() { return $this->get('ClassRef ListID'); } - + public function setClassApplicationID($value) { return $this->set('ClassRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_CLASS, QUICKBOOKS_LISTID, $value)); @@ -223,7 +223,7 @@ public function getClassApplicationID() /** * Set the application ID for the shipping method - * + * * @param mixed $value The shipping method primary key from your application * @return boolean */ @@ -231,30 +231,30 @@ public function setShipMethodApplicationID($value) { return $this->set('ShipMethodRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SHIPMETHOD, QUICKBOOKS_LISTID, $value)); } - + public function setShipMethodName($name) { return $this->set('ShipMethodRef FullName', $name); } - + public function setShipMethodListID($ListID) { return $this->set('ShipMethodRef ListID', $ListID); } - + public function getShipMethodName() { return $this->get('ShipMethodRef FullName'); } - + public function getShipMethodListID() { return $this->get('ShipMethodRef ListID'); } - - /** + + /** * Set an invoice as pending - * + * * @param boolean $pending * @return boolean */ @@ -262,22 +262,22 @@ public function setIsPending($pending) { return $this->setBooleanType('IsPending', $pending); } - + public function getIsPending() { return $this->getBooleanType('IsPending'); } - + public function setCheckNumber($check) { return $this->set('CheckNumber', $check); } - + public function getCheckNumber() { return $this->get('CheckNumber'); } - + public function setPaymentMethodApplicationID($value) { return $this->set('PaymentMethodRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_PAYMENTMETHOD, QUICKBOOKS_LISTID, $value)); @@ -287,37 +287,37 @@ public function getPaymentMethodApplicationID() { return $this->get('PaymentMethodRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setPaymentMethodListID($ListID) { return $this->set('PaymentMethodRef ListID', $ListID); } - + public function setPaymentMethodName($name) { return $this->set('PaymentMethodRef FullName', $name); } - + public function getPaymentMethodListID() { return $this->get('PaymentMethodRef ListID'); } - + public function getPaymentMethodName() { return $this->get('PaymentMethodRef FullName'); } - + public function setDueDate($date) { return $this->setDateType('DueDate', $date); } - + public function getDueDate($format = null) { return $this->getDateType('DueDate', $format); } - + public function setSalesRepApplicationID($value) { return $this->set('SalesRepRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SALESREP, QUICKBOOKS_LISTID, $value)); @@ -327,97 +327,97 @@ public function getSalesRepApplicationID() { return $this->get('SalesRepRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setSalesRepListID($ListID) { return $this->set('SalesRepRef ListID', $ListID); } - + public function setSalesRepName($name) { return $this->set('SalesRepRef FullName', $name); } - + public function getSalesRepListID() { return $this->get('SalesRepRef ListID'); } - + public function getSalesRepName() { return $this->get('SalesRepRef FullName'); - } - - - + } + + + public function setIsToBePrinted($printed) { return $this->setBooleanType('IsToBePrinted', $printed); } - + public function getIsToBePrinted() { return $this->getBooleanType('IsToBePrinted'); } - + public function setIsToBeEmailed($emailed) { return $this->setBooleanType('IsToBeEmailed', $emailed); } - + public function getIsToBeEmailed() { return $this->getBooleanType('IsToBeEmailed'); } - + /** * Get the ship method application ID - * + * * @return value */ public function getShipMethodApplicationID() { return $this->extractApplicationID($this->get('ShipMethodRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + public function setDepositToAccountApplicationID($value) { return $this->set('DepositToAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); } - + public function setDepositToAccountListID($ListID) { return $this->set('DepositToAccountRef ListID', $ListID); } - + public function setDepositToAccountName($name) { return $this->set('DepositToAccountRef FullName', $name); } - + public function getDepositToAccountListID() { return $this->get('DepositToAccountRef ListID'); } - + public function getDepositToAccountName() { return $this->get('DepositToAccountRef FullName'); } - + /** * Get the ARAccount application ID - * + * * @return value */ public function getDepositToAccountApplicationID() { return $this->extractApplicationID($this->get('DepositToAccountRef ' . QUICKBOOKS_API_APPLICATIONID)); - } - + } + /** * Set the transaction date - * + * * @param string $date * @return boolean */ @@ -428,13 +428,13 @@ public function setTxnDate($date) { $date = date('Y-m-d', strtotime($date)); } - + return $this->set('TxnDate', $date); */ - + return $this->setDateType('TxnDate', $date); } - + /** * Alias of {@link QuickBooks_Object_Invoice::setTxnDate()} */ @@ -447,7 +447,7 @@ public function getTxnDate($format = null) { return $this->getDateType('TxnDate', $format); } - + public function getTransactionDate($format = null) { return $this->getTxnDate($format); @@ -455,7 +455,7 @@ public function getTransactionDate($format = null) /** * Set the shipping date - * + * * @param string $date * @return boolean */ @@ -466,29 +466,29 @@ public function setShipDate($date) { $date = date('Y-m-d', strtotime($date)); } - + return $this->set('ShipDate', $date); */ - + return $this->setDateType('ShipDate', $date); } - + /** * Get the shipping date - * + * * @param string $format The format you want the date in (as for {@link http://www.php.net/date}) * @return string */ public function getShipDate($format = null) { //return date($format, strtotime($this->get('ShipDate'))); - + return $this->getDateType('ShipDate', $format); } - + /** * Set the reference number - * + * * @param string $str * @return boolean */ @@ -499,34 +499,34 @@ public function setRefNumber($str) /** * Get the reference number - * + * * @return string */ public function getRefNumber() { return $this->get('RefNumber'); } - + public function setMemo($memo) { return $this->set('Memo', $memo); } - + public function getMemo() { return $this->get('Memo'); } - + public function getFOB() { return $this->get('FOB'); } - + public function setFOB($fob) { return $this->set('FOB', $fob); } - + public function setLinkToTxnID($TxnID) { return $this->set('LinkToTxnID', $TxnID); @@ -536,39 +536,39 @@ public function getLinkToTxnID() { return $this->get('LinkToTxnID'); } - + /** - * - * - * @param + * + * + * @param */ public function addSalesReceiptLine($obj) { $lines = $this->get('SalesReceiptLine'); $lines[] = $obj; - + return $this->set('SalesReceiptLine', $lines); } - + /** - * + * */ public function getSalesReceiptLines() { return $this->getList('SalesReceiptLine'); } - + /** - * + * */ public function getSalesReceiptLine($i) { return $this->getListItem('SalesReceiptLine', $i); } - + /** * Add a discount line (only supported by Online Edition as of 8.0) - * + * * @param QuickBooks_Object_SalesReceipt_DiscountLine * @return boolean */ @@ -579,7 +579,7 @@ public function addDiscountLine($obj) /** * Add a shipping line (only supported by Online Edition as of 8.0) - * + * * @param QuickBooks_Object_SalesReceipt_SalesTaxLine * @return boolean */ @@ -587,10 +587,10 @@ public function addSalesTaxLine($obj) { return $this->addListItem('SalesTaxLine', $obj); } - + /** * Add a shipping line (only supported by Online Edition as of 8.0) - * + * * @param QuickBooks_Object_SalesReceipt_ShippingLine * @return boolean */ @@ -598,10 +598,10 @@ public function addShippingLine($obj) { return $this->addListItem('ShippingLine', $obj); } - + /** * Get an shipping address as an array (or a specific portion of the address as a string) - * + * * @param string $part A specific portion of the address to get (i.e. "Addr1" or "State") * @param array $defaults Default values if a value isn't filled in * @return array The address @@ -612,13 +612,13 @@ public function getShipAddress($part = null, $defaults = array()) { return $this->get('ShipAddress ' . $part); } - + return $this->getArray('ShipAddress *', $defaults); } - + /** * Set the shipping address for the invoice - * + * * @param string $addr1 Address line 1 * @param string $addr2 Address line 2 * @param string $addr3 Address line 3 @@ -638,18 +638,18 @@ public function setShipAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $a { $this->set('ShipAddress Addr' . $i, ${'addr' . $i}); } - + $this->set('ShipAddress City', $city); $this->set('ShipAddress State', $state); $this->set('ShipAddress Province', $province); $this->set('ShipAddress PostalCode', $postalcode); $this->set('ShipAddress Country', $country); - $this->set('ShipAddress Note', $note); + $this->set('ShipAddress Note', $note); } - + /** - * Get the billing address - * + * Get the billing address + * * @param string $part A specific portion of the address to get (i.e. "Addr1" or "State") * @param array $defaults Default values if a value isn't filled in * @return array The address @@ -660,13 +660,13 @@ public function getBillAddress($part = null, $defaults = array()) { return $this->get('BillAddress ' . $part); } - + return $this->getArray('BillAddress *', $defaults); } - + /** * Set the billing address for the invoice - * + * * @param string $addr1 Address line 1 * @param string $addr2 Address line 2 * @param string $addr3 Address line 3 @@ -686,101 +686,101 @@ public function setBillAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $a { $this->set('BillAddress Addr' . $i, ${'addr' . $i}); } - + $this->set('BillAddress City', $city); $this->set('BillAddress State', $state); $this->set('BillAddress Province', $province); $this->set('BillAddress PostalCode', $postalcode); $this->set('BillAddress Country', $country); - $this->set('BillAddress Note', $note); + $this->set('BillAddress Note', $note); } - + public function setOther($other) { return $this->set('Other', $other); } - + public function getOther() { return $this->get('Other'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + public function asList($request) { switch ($request) { case 'SalesReceiptAddRq': - + if (isset($this->_object['SalesReceiptLine'])) { $this->_object['SalesReceiptLineAdd'] = $this->_object['SalesReceiptLine']; } - + if (isset($this->_object['ShippingLine'])) { $this->_object['ShippingLineAdd'] = $this->_object['ShippingLine']; - } + } if (isset($this->_object['SalesTaxLine'])) { $this->_object['SalesTaxLineAdd'] = $this->_object['SalesTaxLine']; - } + } if (isset($this->_object['DiscountLine'])) { $this->_object['DiscountLineAdd'] = $this->_object['DiscountLine']; - } - + } + break; case 'SalesReceiptModRq': - + if (isset($this->_object['SalesReceiptLine'])) { - $this->_object['SalesReceiptLineMod'] = $this->_object['SalesReceiptLine']; + $this->_object['SalesReceiptLineMod'] = $this->_object['SalesReceiptLine']; } - + break; } - + return parent::asList($request); } - + public function asXML($root = null, $parent = null, $object = null) { //print('INVOICE got called asXML: ' . $root . ', ' . $parent . "\n"); //print('sales receipt got called as: {' . $root . '}, {' . QUICKBOOKS_ADD_SALESRECEIPT . "}\n"); //exit; - + if (is_null($object)) { $object = $this->_object; } - + switch ($root) { case QUICKBOOKS_ADD_SALESRECEIPT: - + //if (isset($this->_object['InvoiceLine'])) //{ // $this->_object['InvoiceLineAdd'] = $this->_object['InvoiceLine']; //} - + foreach ($object['SalesReceiptLineAdd'] as $key => $obj) { $obj->setOverride('SalesReceiptLineAdd'); } - + if (!empty($object['ShippingLineAdd'])) { foreach ($object['ShippingLineAdd'] as $key => $obj) @@ -788,7 +788,7 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('ShippingLineAdd'); } } - + if (!empty($object['DiscountLineAdd'])) { foreach ($object['DiscountLineAdd'] as $key => $obj) @@ -796,7 +796,7 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('DiscountLineAdd'); } } - + if (!empty($object['SalesTaxLineAdd'])) { foreach ($object['SalesTaxLineAdd'] as $key => $obj) @@ -804,7 +804,7 @@ public function asXML($root = null, $parent = null, $object = null) $obj->setOverride('SalesTaxLineAdd'); } } - + break; case QUICKBOOKS_MOD_SALESRECEIPT: if (isset($object['SalesReceiptLine'])) @@ -813,25 +813,25 @@ public function asXML($root = null, $parent = null, $object = null) } break; } - + //print_r($this->_object); - + return parent::asXML($root, $parent, $object); } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -840,13 +840,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null, $parent = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version, $locale, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesReceipt/DiscountLine.php b/QuickBooks/QBXML/Object/SalesReceipt/DiscountLine.php index 6f642af5..80d3949d 100755 --- a/QuickBooks/QBXML/Object/SalesReceipt/DiscountLine.php +++ b/QuickBooks/QBXML/Object/SalesReceipt/DiscountLine.php @@ -1,82 +1,82 @@ 0) { $amount = $amount * -1.0; } - + return $this->setAmountType('Amount', $amount); } - + public function setAccountListID($ListID) { return $this->set('AccountRef ListID', $ListID); } - + public function setAccountName($name) { return $this->set('AccountRef FullName', $name); - } - + } + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { switch ($parent) @@ -90,13 +90,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -105,15 +105,15 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - - - + + + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesReceipt/SalesReceiptLine.php b/QuickBooks/QBXML/Object/SalesReceipt/SalesReceiptLine.php index 986b5f17..87183e78 100755 --- a/QuickBooks/QBXML/Object/SalesReceipt/SalesReceiptLine.php +++ b/QuickBooks/QBXML/Object/SalesReceipt/SalesReceiptLine.php @@ -1,41 +1,41 @@ set('ItemRef ListID', $ListID); } - - /** - * Set the item application ID for this invoice line - * + + /** + * Set the item application ID for this invoice line + * * @param mixed $value * @return boolean */ @@ -54,7 +54,7 @@ public function setItemApplicationID($value) { return $this->set('ItemRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ITEM, QUICKBOOKS_LISTID, $value)); } - + /** * Set the item name for this invoice line * @deprecated @@ -65,34 +65,34 @@ public function setItemName($name) { return $this->set('ItemRef FullName', $name); } - + public function setItemFullName($FullName) { return $this->setFullNameType('ItemRef FullName', null, null, $FullName); } - + /** * Get the ListID for this item - * + * * @return string */ public function getItemListID() { return $this->get('ItemRef ListID'); } - + /** * Get the item application ID - * + * * @return mixed */ public function getItemApplicationID() { //print($this->get('ItemRef ' . QUICKBOOKS_API_APPLICATIONID) . '
'); - + return $this->extractApplicationID($this->get('ItemRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + /** * Get the name of the item for this invoice line item * @deprecated @@ -102,103 +102,103 @@ public function getItemName() { return $this->get('ItemRef FullName'); } - + public function getItemFullName() { return $this->get('ItemRef FullName'); } - + public function setDesc($descrip) { - return $this->set('Desc', $descrip); + return $this->set('Desc', $descrip); } - + public function setDescription($descrip) { return $this->setDesc($descrip); } - + public function setQuantity($quan) { return $this->set('Quantity', (float) $quan); } - + public function setRate($rate) { return $this->set('Rate', sprintf('%01.2f', (float) $rate)); } - + public function setAmount($amount) { return $this->setAmountType('Amount', $amount); } - + public function setUnitOfMeasure($uom) { return $this->set('UnitOfMeasure', $uom); } - + public function getUnitOfMeasure() { return $this->get('UnitOfMeasure'); } - + public function setTaxable() { return $this->setSalesTaxCodeName(QUICKBOOKS_TAXABLE); } - + public function setNonTaxable() { return $this->setSalesTaxCodeName(QUICKBOOKS_NONTAXABLE); } - + public function setSalesTaxCodeName($name) { return $this->setSalesTaxCodeFullName($name); } - + public function setSalesTaxCodeFullName($FullName) { return $this->setFullNameType('SalesTaxCodeRef FullName', null, null, $FullName); } - + public function setSalesTaxCodeListID($ListID) { return $this->set('SalesTaxCodeRef ListID', $ListID); } - + public function getSalesTaxCodeName() { return $this->get('SalesTaxCodeRef FullName'); } - + public function getSalesTaxCodeListID() { return $this->get('SalesTaxCodeRef ListID'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { switch ($parent) @@ -212,13 +212,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -227,15 +227,15 @@ public function asXML($root = null, $parent = null, $object = null) /*public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - - - + + + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); }*/ - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesReceipt/SalesTaxLine.php b/QuickBooks/QBXML/Object/SalesReceipt/SalesTaxLine.php index 066722f2..ba57b005 100644 --- a/QuickBooks/QBXML/Object/SalesReceipt/SalesTaxLine.php +++ b/QuickBooks/QBXML/Object/SalesReceipt/SalesTaxLine.php @@ -1,79 +1,79 @@ setAmountType('Amount', $amount); } - + public function setRate($rate) { return $this->setRate('Rate', $rate); - } - + } + public function setAccountListID($ListID) { return $this->set('AccountRef ListID', $ListID); } - + public function setAccountName($name) { return $this->set('AccountRef FullName', $name); - } - + } + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { switch ($parent) @@ -87,13 +87,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -102,15 +102,15 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - - - + + + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesReceipt/ShippingLine.php b/QuickBooks/QBXML/Object/SalesReceipt/ShippingLine.php index 64da1550..bb1e678f 100755 --- a/QuickBooks/QBXML/Object/SalesReceipt/ShippingLine.php +++ b/QuickBooks/QBXML/Object/SalesReceipt/ShippingLine.php @@ -1,74 +1,74 @@ setAmountType('Amount', $amount); } - + public function setAccountListID($ListID) { return $this->set('AccountRef ListID', $ListID); } - + public function setAccountName($name) { return $this->set('AccountRef FullName', $name); - } - + } + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + public function asXML($root = null, $parent = null, $object = null) { switch ($parent) @@ -82,13 +82,13 @@ public function asXML($root = null, $parent = null, $object = null) $parent = null; break; } - + return parent::asXML($root, $parent, $object); } - + /** - * - * + * + * * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent * @param string $root @@ -97,15 +97,15 @@ public function asXML($root = null, $parent = null, $object = null) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - - - + + + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesRep.php b/QuickBooks/QBXML/Object/SalesRep.php index 6a813315..89e60d0e 100644 --- a/QuickBooks/QBXML/Object/SalesRep.php +++ b/QuickBooks/QBXML/Object/SalesRep.php @@ -1,10 +1,10 @@ * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ @@ -21,7 +21,7 @@ class QuickBooks_QBXML_Object_SalesRep extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_SalesRep object - * + * * @param array $arr */ public function __construct($arr = array()) @@ -39,7 +39,7 @@ public function setInitial($value) { return $this->set('Initial', $value); } - + /** * Get the initials of this sales rep * @@ -49,7 +49,7 @@ public function getInitial() { return $this->get('Initial'); } - + /** * Set this sales rep active or not * @@ -60,7 +60,7 @@ public function setIsActive($value) { return $this->set('IsActive', (boolean) $value); } - + /** * Get whether or not this sales rep is active * @@ -79,7 +79,7 @@ public function setSalesRepEntityListID($lid) { return $this->set('SalesRepEntityRef ListID', $lid); } - + /** * @param string $name * @return boolean @@ -97,13 +97,13 @@ public function setSalesRepEntityName($name) public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -113,13 +113,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version = null, $locale = null, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesTaxCode.php b/QuickBooks/QBXML/Object/SalesTaxCode.php index 9bb8ea1f..49105fdb 100755 --- a/QuickBooks/QBXML/Object/SalesTaxCode.php +++ b/QuickBooks/QBXML/Object/SalesTaxCode.php @@ -2,37 +2,37 @@ /** * QuickBooks SalesTaxCode object container - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_SalesTaxCode extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Class object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID of the Class - * + * * @param string $ListID * @return boolean */ @@ -40,20 +40,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of the Class - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name of the class - * + * * @param string $name * @return boolean */ @@ -61,20 +61,20 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name of the class - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** * Set this Class active or not - * + * * @param boolean $value * @return boolean */ @@ -82,40 +82,40 @@ public function setIsActive($value) { return $this->setBooleanType('IsActive', $value); } - + /** * Tell whether or not this class object is active - * + * * @return boolean */ public function getIsActive() { return $this->getBooleanType('IsActive'); } - + public function setIsTaxable($boolean) { return $this->setBooleanType('IsTaxable', $boolean); } - + public function getIsTaxable() { return $this->getBooleanType('IsTaxable', true); } - + public function setDescription($Desc) { return $this->set('Desc', $Desc); } - + public function getDescription() { return $this->get('Desc'); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesTaxGroupItem.php b/QuickBooks/QBXML/Object/SalesTaxGroupItem.php index a46bffc7..d91196bb 100644 --- a/QuickBooks/QBXML/Object/SalesTaxGroupItem.php +++ b/QuickBooks/QBXML/Object/SalesTaxGroupItem.php @@ -2,48 +2,48 @@ /** * QuickBooks ServiceItem object container - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/SalesTaxGroupItem/ItemSalesTaxRef.php'); /** - * + * */ class QuickBooks_QBXML_Object_SalesTaxGroupItem extends QuickBooks_QBXML_Object { public function __construct($arr = array()) { parent::__construct($arr); - + // These two things occur because it's a repeatable element who name doesn't do the *Add, *Mod, *Ret thing, trash these if (isset($this->_object['ItemSalesTaxRef FullName'])) { unset($this->_object['ItemSalesTaxRef FullName']); } - + if (isset($this->_object['ItemSalesTaxRef ListID'])) { unset($this->_object['ItemSalesTaxRef ListID']); } } - + /** * Set the ListID for this item - * + * * @param string $ListID * @return boolean */ @@ -51,20 +51,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID for this item - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name for this item - * + * * @param string $name * @return boolean */ @@ -72,42 +72,42 @@ public function setName($name) { return $this->set('Name', $name); } - + public function getIsActive() { return $this->getBooleanType('IsActive', true); } - + public function setIsActive($IsActive) { return $this->setBooleanType('IsActive', $IsActive); } - + /** * Get the name for this item - * + * * @return string */ public function getName() { return $this->get('Name'); } - + public function setItemDesc($desc) { return $this->set('ItemDesc', $desc); } - + public function getItemDesc($desc) { return $this->get('ItemDesc', $desc); } - + public function setDescription($desc) { return $this->set('ItemDesc', $desc); } - + public function getDescription() { return $this->get('ItemDesc'); @@ -117,20 +117,20 @@ public function addItemSalesTaxRef($obj) { return $this->addListItem('ItemSalesTaxRef', $obj); } - + public function getItemSalesTaxRef($i) { return $this->getListItem('ItemSalesTaxRef', $i); } - + public function listItemSalesTaxRefs() { return $this->getList('ItemSalesTaxRef'); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -141,10 +141,10 @@ public function asQBXML($request, $version = null, $locale = null, $root = null) { return parent::asQBXML($request, $version, $locale, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesTaxGroupItem/ItemSalesTaxRef.php b/QuickBooks/QBXML/Object/SalesTaxGroupItem/ItemSalesTaxRef.php index 73900d57..a208818b 100644 --- a/QuickBooks/QBXML/Object/SalesTaxGroupItem/ItemSalesTaxRef.php +++ b/QuickBooks/QBXML/Object/SalesTaxGroupItem/ItemSalesTaxRef.php @@ -1,66 +1,66 @@ setFullNameType('FullName', null, null, $FullName); } - + public function setListID($ListID) { return $this->set('ListID', $ListID); } - + public function getListID() { return $this->get('ListID'); } - + public function getFullName() { return $this->get('FullName'); } - + /*public function asXML($root = null, $parent = null, $object = null) { $parent = null; return parent::asXML($root, $parent, $object); }*/ - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/SalesTaxItem.php b/QuickBooks/QBXML/Object/SalesTaxItem.php index 0c684646..1db0fb44 100755 --- a/QuickBooks/QBXML/Object/SalesTaxItem.php +++ b/QuickBooks/QBXML/Object/SalesTaxItem.php @@ -2,26 +2,26 @@ /** * QuickBooks ServiceItem object container - * - * NOTE: By default, ServiceItems are created as SalesOrPurchase items, and are - * thus *NOT* created as SalesAndPurchase items. If you want to create an item + * + * NOTE: By default, ServiceItems are created as SalesOrPurchase items, and are + * thus *NOT* created as SalesAndPurchase items. If you want to create an item * that is sold *and* purchased, you'll need to set the type with the method: * -> {@link QuickBooks_Object_ServiceItem::isSalesAndPurchase()} - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_SalesTaxItem extends QuickBooks_QBXML_Object { @@ -29,10 +29,10 @@ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID for this item - * + * * @param string $ListID * @return boolean */ @@ -40,20 +40,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID for this item - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name for this item - * + * * @param string $name * @return boolean */ @@ -61,63 +61,63 @@ public function setName($name) { return $this->set('Name', $name); } - + public function getIsActive() { return $this->getBooleanType('IsActive', true); } - + public function setIsActive($IsActive) { return $this->setBooleanType('IsActive', $IsActive); } - + /** * Get the name for this item - * + * * @return string */ public function getName() { return $this->get('Name'); } - + public function setTaxRate($rate) { return $this->set('TaxRate', (float) $rate); } - + public function getTaxRate() { return $this->get('TaxRate'); } - + public function setDescription($desc) { return $this->set('ItemDesc', $desc); } - + public function getDescription() { return $this->get('ItemDesc'); } - + public function setTaxVendorListID($ListID) { return $this->set('TaxVendorRef ListID', $ListID); } - + public function setTaxVendorName($name) { return $this->set('TaxVendorRef FullName', $name); } - + // @todo Make sure these are ->setFullNameType instead of just ->set public function setTaxVendorFullName($FullName) { return $this->set('TaxVendorRef FullName', $FullName); } - + public function setTaxVendorApplicationID($value) { return $this->set('TaxVendorRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_VENDOR, QUICKBOOKS_LISTID, $value)); @@ -127,47 +127,47 @@ public function getTaxVendorApplicationID() { return $this->get('TaxVendorRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getTaxVendorListID() { return $this->get('TaxVendorRef ListID'); } - + public function getTaxVendorName() { return $this->get('TaxVendorRef FullName'); } - + public function getTaxVendorFullName() { return $this->get('TaxVendorRef FullName'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() { - - + + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -177,13 +177,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/ServiceItem.php b/QuickBooks/QBXML/Object/ServiceItem.php index 9a8c9fca..865104a1 100755 --- a/QuickBooks/QBXML/Object/ServiceItem.php +++ b/QuickBooks/QBXML/Object/ServiceItem.php @@ -2,15 +2,15 @@ /** * QuickBooks ServiceItem object container - * - * NOTE: By default, ServiceItems are created as SalesOrPurchase items, and are - * thus *NOT* created as SalesAndPurchase items. If you want to create an item + * + * NOTE: By default, ServiceItems are created as SalesOrPurchase items, and are + * thus *NOT* created as SalesAndPurchase items. If you want to create an item * that is sold *and* purchased, you'll need to set the type with the method: * -> {@link QuickBooks_Object_ServiceItem::isSalesAndPurchase()} - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ @@ -21,7 +21,7 @@ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * QuickBooks ServiceItem object + * QuickBooks ServiceItem object */ class QuickBooks_QBXML_Object_ServiceItem extends QuickBooks_QBXML_Object { @@ -29,25 +29,25 @@ class QuickBooks_QBXML_Object_ServiceItem extends QuickBooks_QBXML_Object * Flag indicating whether or not this for sales *AND* purchase, or just sales *OR* purchase */ protected $_is_sales_and_purchase; - + /** * Create a new QuickBooks_Object_ServiceItem object (ServiceItem) */ public function __construct($arr = array(), $is_sales_and_purchase = false) { parent::__construct($arr); - + if (count($this->getArray('SalesAndPurchase')) > 0) { $is_sales_and_purchase = true; } - + $this->_is_sales_and_purchase = $is_sales_and_purchase; } - + /** * Set the ListID for this item - * + * * @param string $ListID * @return boolean */ @@ -55,20 +55,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID for this item - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name for this item - * + * * @param string $name * @return boolean */ @@ -76,101 +76,101 @@ public function setName($name) { return $this->setNameType('Name', $name); } - + /** * Get the name for this item - * + * * @return string */ public function getName() { return $this->get('Name'); } - + public function setFullName($fullname) { return $this->setFullNameType('FullName', 'Name', 'ParentRef FullName', $fullname); } - + public function getFullName() { return $this->getFullNameType('FullName', 'Name', 'ParentRef FullName'); } - + public function setIsActive($active) { - if (strtolower($active) == 'true' or + if (strtolower($active) == 'true' or (is_bool($active) and $active)) { return $this->set('IsActive', 'true'); } - + return $this->set('IsActive', 'false'); } - + public function getIsActive() { $active = $this->get('IsActive'); - - return strtolower($active) == 'true' or + + return strtolower($active) == 'true' or (is_bool($active) and $active); } - + public function setParentListID($ListID) { return $this->set('ParentRef ListID', $ListID); } - + public function setParentName($name) { return $this->set('ParentRef FullName', $name); } - + public function setParentApplicationID($value) { return $this->set('ParentRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ITEM, QUICKBOOKS_LISTID, $value)); } - + public function getParentListID() { - return $this->get('ParentRef ListID'); + return $this->get('ParentRef ListID'); } - + public function getParentName() { return $this->get('ParentRef FullName'); } - + public function getParentApplicationID() { return $this->extractApplicationID($this->get('ParentRef ' . QUICKBOOKS_API_APPLICATIONID)); } - + public function setSalesTaxCodeListID($ListID) { return $this->set('SalesTaxCodeRef ListID', $ListID); } - + public function setSalesTaxCodeName($name) { return $this->set('SalesTaxCodeRef FullName', $name); } - + public function setSalesTaxCodeApplicationID($value) { return $this->set('SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_SALESTAXCODE, QUICKBOOKS_LISTID, $value)); } - + public function getSalesTaxCodeListID() { return $this->get('SalesTaxCodeRef ListID'); } - + public function getSalesTaxCodeName() { return $this->get('SalesTaxCodeRef FullName'); } - + public function getSalesTaxCodeApplicationID() { return $this->extractApplicationID($this->get('SalesTaxCodeRef ' . QUICKBOOKS_API_APPLICATIONID)); @@ -180,53 +180,53 @@ public function getUnitOfMeasureSetListID() { return $this->get('UnitOfMeasureSetRef ListID'); } - + public function getUnitOfMeasureSetFullName() { return $this->get('UnitOfMeasureSetRef FullName'); } - + /** * Tell (and optionally set) whether or not this item is currently for Sale *and* Purchase - * + * * @param boolean $enable * @return boolean */ public function isSalesAndPurchase($enable = null) { $current = $this->_is_sales_and_purchase; - + if (!is_null($enable)) { $this->_is_sales_and_purchase = (boolean) $enable; } - + return $current; } - + /** * Tell (and optionall set) whether or not this item is currently for Sale *or* Purchase - * + * * @param boolean $enable * @return boolean */ public function isSalesOrPurchase($enable = null) { $current = !$this->_is_sales_and_purchase; - + if (!is_null($enable)) { $this->_is_sales_and_purchase = ! (boolean) $enable; - } - + } + return $current; } - + // Sales OR Purchase - + /** * Set the description of this item (Sales OR Purchase) - * + * * @param string $descrip * @return boolean */ @@ -239,20 +239,20 @@ public function getDescription() { return $this->get('SalesOrPurchase Desc'); } - + /** * Set the price for this item (Sales OR Purchase) - * + * * @param string $price * @return boolean */ public function setPrice($price) { $this->remove('SalesOrPurchase PricePercent'); - + return $this->set('SalesOrPurchase Price', sprintf('%01.2f', (float) $price)); } - + /** * Get the price for this item (Sales OR Purchase) */ @@ -260,30 +260,30 @@ public function getPrice() { return $this->get('SalesOrPurchase Price'); } - + /** * Set the price percent for this item (Sales OR Purchase) */ public function setPricePercent($percent) { $this->remove('SalesOrPurchase Price'); - + return $this->set('SalesOrPurchase PricePercent', $percent); } - + /** * Get the price percent for this item (Sales OR Purchase) - * + * * @return float */ public function getPricePercent() { return $this->get('SalesOrPurchase PricePercent'); } - + /** * Set the account ListID for this item (Sales OR Purchase) - * + * * @param string $ListID * @return boolean */ @@ -291,10 +291,10 @@ public function setAccountListID($ListID) { return $this->set('SalesOrPurchase AccountRef ListID', $ListID); } - + /** * Set the account name for this item (Sales OR Purchase) - * + * * @param string $name * @return boolean */ @@ -302,12 +302,12 @@ public function setAccountName($name) { return $this->set('SalesOrPurchase AccountRef FullName', $name); } - + public function setAccountFullName($name) { return $this->set('SalesOrPurchase AccountRef FullName', $name); } - + /** * (Sales OR Purchase) */ @@ -320,17 +320,17 @@ public function getAccountApplicationID() { return $this->get('SalesOrPurchase AccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** * Get the account ListID for this item (Sales OR Purchase) - * + * * @return string */ public function getAccountListID() { return $this->get('SalesOrPurchase AccountRef ListID'); } - + /** * @deprecated */ @@ -341,46 +341,46 @@ public function getAccountName() /** * Get the account name for this item (Sales OR Purchase) - * - * @return string + * + * @return string */ public function getAccountFullName() { return $this->get('SalesOrPurchase AccountRef FullName'); } - + // Sales AND Purchase - + public function setSalesDescription($descrip) { return $this->set('SalesAndPurchase SalesDesc', $descrip); } - + public function getSalesDescription() { return $this->get('SalesAndPurchase SalesDesc'); } - + public function setSalesPrice($price) { return $this->set('SalesAndPurchase SalesPrice', sprintf('%01.2f', (float) $price)); } - + public function getSalesPrice() { return $this->get('SalesAndPurchase SalesPrice'); } - + public function setIncomeAccountListID($ListID) { return $this->set('SalesAndPurchase IncomeAccountRef ListID', $ListID); } - + public function getIncomeAccountListID() { return $this->get('SalesAndPurchase IncomeAccountRef ListID'); } - + /** * @deprecated */ @@ -393,7 +393,7 @@ public function getIncomeAccountFullName() { return $this->get('SalesAndPurchase IncomeAccountRef FullName'); } - + /** * @deprecated */ @@ -401,7 +401,7 @@ public function getIncomeAccountName() { return $this->get('SalesAndPurchase IncomeAccountRef FullName'); } - + public function setIncomeAccountApplicationID($value) { return $this->set('SalesAndPurchase IncomeAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -411,37 +411,37 @@ public function getIncomeAccountApplicationID() { return $this->get('SalesAndPurchase IncomeAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function setPurchaseDescription($descrip) { return $this->set('SalesAndPurchase PurchaseDesc', $descrip); } - + public function getPurchaseDescription() { return $this->get('SalesAndPurchase PurchaseDesc'); } - + public function setPurchaseCost($cost) { return $this->set('SalesAndPurchase PurchaseCost', sprintf('%01.2f', (float) $cost)); } - + public function getPurchaseCost() { return $this->get('SalesAndPurchase PurchaseCost'); } - + public function setExpenseAccountListID($ListID) { return $this->set('SalesAndPurchase ExpenseAccountRef ListID', $ListID); } - + public function setExpenseAccountName($name) { return $this->set('SalesAndPurchase ExpenseAccountRef FullName', $name); } - + public function setExpenseAccountApplicationID($value) { return $this->set('SalesAndPurchase ExpenseAccountRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); @@ -451,27 +451,27 @@ public function getExpenseAccountApplicationID() { return $this->get('SalesAndPurchase ExpenseAccountRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getExpenseAccountListID() { return $this->get('SalesAndPurchase ExpenseAccountRef ListID'); } - + public function getExpenseAccountName() { return $this->get('SalesAndPurchase ExpenseAccountRef FullName'); } - + public function setPreferredVendorListID($ListID) { return $this->set('SalesAndPurchase PrefVendorRef ListID', $ListID); } - + public function setPreferredVendorName($name) { return $this->set('SalesAndPurchase PrefVendorRef FullName', $name); } - + public function setPreferredVendorApplicationID($value) { return $this->set('SalesAndPurchase PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_VENDOR, QUICKBOOKS_LISTID, $value)); @@ -481,20 +481,20 @@ public function getPreferredVendorApplicationID() { return $this->get('SalesAndPurchase PrefVendorRef ' . QUICKBOOKS_API_APPLICATIONID); } - + public function getPreferredVendorListID() { return $this->get('SalesAndPurchase PrefVendorRef ListID'); } - + public function getPreferredVendorName() { return $this->get('SalesAndPurchase PrefVendorRef FullName'); } - + /** - * - * + * + * * @return boolean */ protected function _cleanup() @@ -502,7 +502,7 @@ protected function _cleanup() if ($this->isSalesAndPurchase()) { // Remove any SalesOrPurchase keys - + foreach ($this->getArray('SalesOrPurchase*') as $key => $value) { $this->remove($key); @@ -515,23 +515,23 @@ protected function _cleanup() $this->remove($key); } } - + return true; } - + /** - * + * */ public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -541,13 +541,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version, $locale, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/ShipMethod.php b/QuickBooks/QBXML/Object/ShipMethod.php index c42d78a4..cc449759 100755 --- a/QuickBooks/QBXML/Object/ShipMethod.php +++ b/QuickBooks/QBXML/Object/ShipMethod.php @@ -2,37 +2,37 @@ /** * QuickBooks ShipMethod object container - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_ShipMethod extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_ShipMethod object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID of the shipping method - * + * * @param string $ListID * @return boolean */ @@ -40,20 +40,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of the shipping method - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name of the shipping method - * + * * @param string $name * @return boolean */ @@ -61,20 +61,20 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name of the shipping method - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** * Set this shipping method as active or not - * + * * @param boolean $value * @return boolean */ @@ -82,63 +82,63 @@ public function setIsActive($value) { return $this->setBooleanType('IsActive', $value); } - + /** * Tell whether or not this shipping method is active - * + * * @return boolean */ public function getIsActive() { return $this->getBooleanType('IsActive'); } - + /** - * + * */ public function setParentListID($ListID) { return $this->set('ParentRef ListID', $ListID); } - + public function getParentListID() { return $this->get('ParentRef ListID'); } - + public function setParentFullName($value) { return $this->set('ParentRef FullName', $value); } - + public function getParentFullName() { return $this->get('ParentRef FullName'); } - + public function setParentApplicationID($value) { return $this->set('ParentRef ' . QUICKBOOKS_API_APPLICATIONID, $this->encodeApplicationID(QUICKBOOKS_OBJECT_ACCOUNT, QUICKBOOKS_LISTID, $value)); } - + public function getParentApplicationID() { return $this->get('ParentRef ' . QUICKBOOKS_API_APPLICATIONID); } - + /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this shipping method object - * + * * @param string $request * @param boolean $nest * @return array @@ -146,13 +146,13 @@ protected function _cleanup() public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -162,13 +162,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $version = null, $locale = null, $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $version = null, $locale = null, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/StandardTerms.php b/QuickBooks/QBXML/Object/StandardTerms.php index 7bd4c5d1..fa7e4017 100755 --- a/QuickBooks/QBXML/Object/StandardTerms.php +++ b/QuickBooks/QBXML/Object/StandardTerms.php @@ -2,10 +2,10 @@ /** * QuickBooks StandardTerms object container - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ @@ -22,17 +22,17 @@ class QuickBooks_QBXML_Object_StandardTerms extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_StandardTerms object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID of the termspwd - * + * * @param string $ListID * @return boolean */ @@ -40,20 +40,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of the terms - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name of the terms - * + * * @param string $name * @return boolean */ @@ -61,20 +61,20 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name of these terms - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** * Set this as active or not - * + * * @param boolean $value * @return boolean */ @@ -82,27 +82,27 @@ public function setIsActive($value) { return $this->set('IsActive', (boolean) $value); } - + /** * Tell whether or not this class object is active - * + * * @return boolean */ public function getIsActive() { return $this->get('IsActive'); } - + /** * Get the number of days until payment is due - * + * * @return integer */ public function getStdDueDays() { return $this->get('StdDueDays'); } - + /** * Alias of QuickBooks_Object_StandardTerms::getStdDueDays() */ @@ -110,7 +110,7 @@ public function getStandardDueDays() { return $this->getStdDueDays(); } - + /** * Set the number of days until payment is due * @@ -121,7 +121,7 @@ public function setStdDueDays($days) { return $this->set('StdDueDays', (int) $days); } - + /** * Alias of QuickBooks_Object_StandardTerms::setStdDueDays() */ @@ -129,63 +129,63 @@ public function setStandardDueDays($days) { return $this->setStdDueDays($days); } - + /** - * + * */ public function getStdDiscountDays() { return $this->get('StdDiscountDays'); } - + public function getStandardDiscountDays() { return $this->getStdDiscountDays(); } - + public function setStdDiscountDays($days) { return $this->set('StdDiscountDays', (int) $days); } - + public function setStandardDiscountDays($days) { return $this->setStdDiscountDays($days); } - + public function getDiscountPct() { return $this->get('DiscountPct'); } - + public function getDiscountPercent() { return $this->getDiscountPct(); } - + public function setDiscountPercent($percent) { return $this->setDiscountPct($percent); } - + public function setDiscountPct($percent) { return $this->set('DiscountPct', (float) $percent); - } - + } + /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this Class object - * + * * @param string $request * @param boolean $nest * @return array @@ -193,13 +193,13 @@ protected function _cleanup() public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -209,13 +209,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/UnitOfMeasureSet.php b/QuickBooks/QBXML/Object/UnitOfMeasureSet.php index a0b84447..486d17c6 100644 --- a/QuickBooks/QBXML/Object/UnitOfMeasureSet.php +++ b/QuickBooks/QBXML/Object/UnitOfMeasureSet.php @@ -2,54 +2,54 @@ /** * QuickBooks Unit of Measure Set object container - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * - * + * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/UnitOfMeasureSet/DefaultUnit.php'); -/** - * - * +/** + * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object/UnitOfMeasureSet/RelatedUnit.php'); /** - * + * */ class QuickBooks_QBXML_Object_UnitOfMeasureSet extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Class object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); - + // These things occur because it's a repeatable element who name doesn't do the *Add, *Mod, *Ret thing, trash these $unsets = array( - 'RelatedUnit Name', - 'RelatedUnit Abbreviation', - 'RelatedUnit ConversionRatio', - 'DefaultUnit UnitUsedFor', - 'DefaultUnit Unit', + 'RelatedUnit Name', + 'RelatedUnit Abbreviation', + 'RelatedUnit ConversionRatio', + 'DefaultUnit UnitUsedFor', + 'DefaultUnit Unit', ); - + foreach ($unsets as $unset) { if (isset($this->_object[$unset])) @@ -58,10 +58,10 @@ public function __construct($arr = array()) } } } - + /** * Set the ListID of the Class - * + * * @param string $ListID * @return boolean */ @@ -69,20 +69,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of the Class - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name of the class - * + * * @param string $name * @return boolean */ @@ -90,20 +90,20 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name of the class - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** * Set this Class active or not - * + * * @param boolean $value * @return boolean */ @@ -111,63 +111,63 @@ public function setIsActive($value) { return $this->setBooleanType('IsActive', $value); } - + /** * Tell whether or not this class object is active - * + * * @return boolean */ public function getIsActive() { return $this->getBooleanType('IsActive'); } - + /** - * - * - * + * + * + * */ public function setUnitOfMeasureType($type) { return $this->set('UnitOfMeasureType', $type); } - + public function getUnitOfMeasureType() { return $this->get('UnitOfMeasureType'); } - + public function setBaseUnitName($name) { return $this->set('BaseUnit Name', $name); } - + public function getBaseUnitName() { return $this->get('BaseUnit Name'); } - + public function setBaseUnitAbbreviation($abbr) { return $this->set('BaseUnit Abbreviation', $abbr); } - + public function getBaseUnitAbbreviation() { return $this->get('BaseUnit Abbreviation'); } - - + + public function addRelatedUnit($obj) { return $this->addListItem('RelatedUnit', $obj); } - + public function getRelatedUnit($i) { return $this->getListItem('RelatedUnit', $i); } - + public function listRelatedUnits() { return $this->getList('RelatedUnit'); @@ -178,21 +178,21 @@ public function addDefaultUnit($obj) { return $this->addListItem('DefaultUnit', $obj); } - + public function getDefaultUnit($i) { return $this->getListItem('DefaultUnit', $i); } - + public function listDefaultUnits() { return $this->getList('DefaultUnit'); } - - + + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/UnitOfMeasureSet/DefaultUnit.php b/QuickBooks/QBXML/Object/UnitOfMeasureSet/DefaultUnit.php index ec1a0b5c..9b0c6081 100644 --- a/QuickBooks/QBXML/Object/UnitOfMeasureSet/DefaultUnit.php +++ b/QuickBooks/QBXML/Object/UnitOfMeasureSet/DefaultUnit.php @@ -1,61 +1,61 @@ setUnitUsedFor('UnitUsedFor', $str); } - + public function getUnitUsedFor() { return $this->get('UnitUsedFor'); } - + public function setUnit($unit) { return $this->set('Unit', $unit); } - + public function getUnit() { return $this->get('Unit'); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/UnitOfMeasureSet/RelatedUnit.php b/QuickBooks/QBXML/Object/UnitOfMeasureSet/RelatedUnit.php index 419ffb0c..ff7814b9 100644 --- a/QuickBooks/QBXML/Object/UnitOfMeasureSet/RelatedUnit.php +++ b/QuickBooks/QBXML/Object/UnitOfMeasureSet/RelatedUnit.php @@ -1,25 +1,25 @@ set('Name', $name); } - + public function getName() { return $this->get('Name'); } - + public function setAbbreviation($abbrev) { return $this->set('Abbreviation', $abbrev); } - + public function getAbbreviation() { return $this->get('Abbreviation'); } - + public function getConversionRatio() { return $this->get('ConversionRatio'); } - + public function setConversionRatio($ratio) { return $this->set('ConversionRatio', $ratio); } - + /** * Tell the type of object this is - * + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Object/Vendor.php b/QuickBooks/QBXML/Object/Vendor.php index b59810b4..37bc3a70 100755 --- a/QuickBooks/QBXML/Object/Vendor.php +++ b/QuickBooks/QBXML/Object/Vendor.php @@ -2,37 +2,37 @@ /** * QuickBooks Vendor object container - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Object */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php'); /** - * + * */ class QuickBooks_QBXML_Object_Vendor extends QuickBooks_QBXML_Object { /** * Create a new QuickBooks_Object_Account object - * + * * @param array $arr */ public function __construct($arr = array()) { parent::__construct($arr); } - + /** * Set the ListID of the Class - * + * * @param string $ListID * @return boolean */ @@ -40,20 +40,20 @@ public function setListID($ListID) { return $this->set('ListID', $ListID); } - + /** * Get the ListID of the Class - * + * * @return string */ public function getListID() { return $this->get('ListID'); } - + /** * Set the name of the class - * + * * @param string $name * @return boolean */ @@ -61,19 +61,19 @@ public function setName($name) { return $this->set('Name', $name); } - + /** * Get the name of the class - * + * * @return string */ public function getName() { return $this->get('Name'); } - + /** - * + * */ public function getFullName() { @@ -84,10 +84,10 @@ public function setFullName($name) { return $this->set('FullName', $name); } - + /** * Set this Class active or not - * + * * @param boolean $value * @return boolean */ @@ -95,30 +95,30 @@ public function setIsActive($value) { return $this->set('IsActive', (boolean) $value); } - + /** * Tell whether or not this class object is active - * + * * @return boolean */ public function getIsActive() { return $this->get('IsActive'); } - + public function setCompanyName($name) { return $this->set('CompanyName', $name); } - + public function getCompanyName() { return $this->get('CompanyName'); } - + /** - * - * + * + * * @param string $name * @return boolean */ @@ -126,20 +126,20 @@ public function setFirstName($fname) { return $this->set('FirstName', $fname); } - + /** - * - * + * + * * @return string */ public function getFirstName() { return $this->get('FirstName'); } - + /** - * - * + * + * * @param string $lname * @return boolean */ @@ -147,56 +147,56 @@ public function setLastName($lname) { return $this->set('LastName', $lname); } - + public function getLastName() { return $this->get('LastName'); } - + public function setMiddleName($mname) { return $this->set('MiddleName', $mname); } - + public function getMiddleName() { return $this->get('MiddleName'); } - + public function getVendorAddress($part = null, $defaults = array()) { return $this->_getXYZAddress('Vendor', '', $part, $defaults); } - + public function setVendorAddress($addr1, $addr2 = '', $addr3 = '', $addr4 = '', $addr5 = '', $city = '', $state = '', $postalcode = '', $country = '', $note = '') { - return $this->_setXYZAddress('Vendor', '', $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $postalcode, $country, $note); + return $this->_setXYZAddress('Vendor', '', $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $postalcode, $country, $note); } - + protected function _setXYZAddress($pre, $post, $addr1, $addr2, $addr3, $addr4, $addr5, $city, $state, $postalcode, $country, $note) { for ($i = 1; $i <= 5; $i++) { $this->set($pre . 'Address' . $post . ' Addr' . $i, ${'addr' . $i}); } - + $this->set($pre . 'Address' . $post . ' City', $city); $this->set($pre . 'Address' . $post . ' State', $state); $this->set($pre . 'Address' . $post . ' PostalCode', $postalcode); $this->set($pre . 'Address' . $post . ' Country', $country); - $this->set($pre . 'Address' . $post . ' Note', $note); + $this->set($pre . 'Address' . $post . ' Note', $note); } - + protected function _getXYZAddress($pre, $post, $part = null, $defaults = array()) { if (!is_null($part)) { return $this->get($pre . 'Address' . $post . ' ' . $part); } - + return $this->getArray($pre . 'Address' . $post . ' *', $defaults); } - + public function setPhone($phone) { return $this->set('Phone', $phone); @@ -206,10 +206,10 @@ public function getPhone() { return $this->get('Phone'); } - + /** * Set the alternate phone number for this customer - * + * * @param string $phone * @return boolean */ @@ -225,15 +225,15 @@ public function getAltPhone() /** * Set the fax number for this customer - * + * * @param string $fax - * @return boolean + * @return boolean */ public function setFax($fax) { return $this->set('Fax', $fax); } - + public function getFax() { return $this->get('Fax'); @@ -241,7 +241,7 @@ public function getFax() /** * Set the e-mail address for this customer - * + * * @param string $email * @return boolean */ @@ -254,10 +254,10 @@ public function getEmail() { return $this->get('Email'); } - + /** * Set the contact person for this customer - * + * * @param string $contact * @return boolean */ @@ -270,10 +270,10 @@ public function getContact() { return $this->get('Contact'); } - + /** * Set the alternate contact for this customer - * + * * @param string $contact * @return boolean */ @@ -286,10 +286,10 @@ public function getAltContact() { return $this->get('AltContact'); } - + /** * Set the salutation for this customer - * + * * @param string $salut * @return boolean */ @@ -297,27 +297,27 @@ public function setSalutation($salut) { return $this->set('Salutation', $salut); } - + /** - * - * + * + * * @return string */ public function getSalutation() { return $this->get('Salutation'); } - + /** - * - * + * + * * @return string */ public function getNameOnCheck() { return $this->get('NameOnCheck'); } - + /** * Set the payee name for this vendor * @@ -328,7 +328,7 @@ public function setNameOnCheck($name) { return $this->set('NameOnCheck', $name); } - + /** * Set the VendorTypeRef FullName for the vendor * @@ -339,7 +339,7 @@ public function setVendorTypeRef($type) { return $this->set('VendorTypeRef FullName', $type); } - + /** * Get the VendorTypeRef FullName for the vendor * @@ -349,20 +349,20 @@ public function getVendorTypeRef() { return $this->get('VendorTypeRef FullName'); } - + /** * Perform any needed clean-up of the object data members - * + * * @return boolean */ protected function _cleanup() { return true; } - + /** * Get an array representation of this Class object - * + * * @param string $request * @param boolean $nest * @return array @@ -370,13 +370,13 @@ protected function _cleanup() public function asArray($request, $nest = true) { $this->_cleanup(); - + return parent::asArray($request, $nest); } - + /** * Convert this object to a valid qbXML request - * + * * @param string $request The type of request to convert this to (examples: CustomerAddRq, CustomerModRq, CustomerQueryRq) * @param boolean $todo_for_empty_elements A constant, one of: QUICKBOOKS_XML_XML_COMPRESS, QUICKBOOKS_XML_XML_DROP, QUICKBOOKS_XML_XML_PRESERVE * @param string $indent @@ -386,13 +386,13 @@ public function asArray($request, $nest = true) public function asQBXML($request, $todo_for_empty_elements = QUICKBOOKS_OBJECT_XML_DROP, $indent = "\t", $root = null) { $this->_cleanup(); - + return parent::asQBXML($request, $todo_for_empty_elements, $indent, $root); } - + /** - * Tell what type of object this is - * + * Tell what type of object this is + * * @return string */ public function object() diff --git a/QuickBooks/QBXML/Schema/Generator.php b/QuickBooks/QBXML/Schema/Generator.php index 3b67ca28..f8da8b14 100755 --- a/QuickBooks/QBXML/Schema/Generator.php +++ b/QuickBooks/QBXML/Schema/Generator.php @@ -1,95 +1,95 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/XML.php'); /** - * + * */ class QuickBooks_QBXML_Schema_Generator { protected $_xml; - + public function __construct($xml) { ini_set('memory_limit', '128M'); - + $this->_xml = $xml; } - + public function saveAll($dir) { $Parser = new QuickBooks_XML($this->_xml); - + $arr_actions_adds = QuickBooks_Utilities::listActions('*Add', false); $arr_actions_mods = QuickBooks_Utilities::listActions('*Mod', false); - + //print_r($arr_actions_mods); //exit; - + $i = 0; - + $errnum = 0; $errmsg = ''; if ($Doc = $Parser->parse($errnum, $errmsg)) { $children = $Doc->children(); $children = $children[0]->children(); - + foreach ($children as $Action) { print('Action name is: ' . $Action->name() . "\n"); - + //if ($Action->name() != 'VendorAddRq') //{ // continue; //} - + //print_r($Action); - + $section = $this->_extractSectionForTag($this->_xml, $Action->name()); - + //print($section); - + $wrapper = ''; if ($Action->hasChildren()) { $first = $Action->getChild(0); - + //print_r($first); - - - - if (in_array($first->name(), $arr_actions_mods) or + + + + if (in_array($first->name(), $arr_actions_mods) or in_array($first->name(), $arr_actions_adds)) { $wrapper = $first->name(); - + print(' WRAPPER NODE IS: ' . $wrapper . "\n"); } } - + //exit; - + $paths_datatype = array(); $paths_maxlength = array(); $paths_isoptional = array(); $paths_sinceversion = array(); $paths_isrepeatable = array(); $paths_reorder = array(); - + //$curdepth = 0; $lastdepth = 0; $paths = $Action->asArray(QUICKBOOKS_XML_ARRAY_PATHS); @@ -97,27 +97,27 @@ public function saveAll($dir) { $tmp = explode(' ', $path); $tag = end($tmp); - + $comment = $this->_extractCommentForTag($section, $tag); //print("\t{" . $path . '} => ' . $datatype . ' (' . $comment . ')' . "\n"); $parse = $this->_parseComment($comment); //print_r($parse); //print("\n"); - + $path = trim(substr($path, strlen($Action->name()))); - - if (strlen($wrapper) and + + if (strlen($wrapper) and substr($path, 0, strlen($wrapper)) == $wrapper) { $path = substr($path, strlen($wrapper) + 1); } - + $paths_datatype[$path] = $datatype; $paths_maxlength[$path] = $parse['maxlength']; $paths_isoptional[$path] = $parse['isoptional']; $paths_sinceversion[$path] = $parse['version']; $paths_isrepeatable[$path] = $parse['mayrepeat']; - + $curdepth = substr_count($path, ' '); if ($curdepth - $lastdepth > 1) { @@ -128,19 +128,19 @@ public function saveAll($dir) } } $lastdepth = substr_count($path, ' '); - + $paths_reorder[] = $path; } - + //print(var_export($paths_datatype)); //print(var_export($paths_maxlength)); //print(var_export($paths_isoptional)); //print(var_export($paths_sinceversion)); //print(var_export($paths_isrepeatable)); //print(var_export($paths_reorder)); - + $contents = file_get_contents('/home/asdg/QuickBooks/QBXML/Schema/Object/Template.php'); - + $contents = str_replace('Template', $Action->name(), $contents); $contents = str_replace('\'_qbxmlWrapper\'', var_export($wrapper, true), $contents); $contents = str_replace('\'_dataTypePaths\'', var_export($paths_datatype, true), $contents); @@ -149,81 +149,81 @@ public function saveAll($dir) $contents = str_replace('\'_sinceVersionPaths\'', var_export($paths_sinceversion, true), $contents); $contents = str_replace('\'_isRepeatablePaths\'', var_export($paths_isrepeatable, true), $contents); $contents = str_replace('\'_reorderPaths\'', var_export($paths_reorder, true), $contents); - + $fp = fopen('/home/adg/QuickBooks/tmp/' . $Action->name() . '.php', 'w+'); fwrite($fp, $contents); fclose($fp); - + print("\n\n"); - + if ($i > 150) { exit; } - + $i++; } } } - + protected function _parseComment($comment) { $defaults = array( - 'maxlength' => 0, + 'maxlength' => 0, 'isoptional' => false, - 'mayrepeat' => false, + 'mayrepeat' => false, 'version' => 999.99, ); - + if (false !== strpos($comment, 'rep')) { $defaults['mayrepeat'] = true; } - + if (false !== strpos($comment, 'opt')) { $defaults['isoptional'] = true; } - + if (false !== ($pos = strpos($comment, 'max length'))) { $defaults['maxlength'] = (int) trim(substr($comment, $pos + 10), ' ='); } - + if (false !== ($pos = strpos($comment, 'v'))) { $defaults['version'] = (float) trim(substr($comment, $pos + 1)); } - + return $defaults; } - + protected function _extractCommentForTag($section, $tag) { - if (false !== ($start_open = strpos($section, '<' . $tag)) and - false !== ($start_close = strpos($section, '>', $start_open)) and + if (false !== ($start_open = strpos($section, '<' . $tag)) and + false !== ($start_close = strpos($section, '>', $start_open)) and false !== ($stop_open = strpos($section, ''))) { $str = substr($section, $stop_open + strlen($tag) + 3); $arr = explode("\n", $str); - + $line = current($arr); - + return trim($line, "\n\r"); } - + return ''; } - + protected function _extractSectionForTag($xml, $tag) { if (false !== ($start_open = strpos($xml, '<' . $tag)) and - false !== ($start_close = strpos($xml, '>', $start_open)) and + false !== ($start_close = strpos($xml, '>', $start_open)) and false !== ($stop_open = strpos($xml, ''))) { return substr($xml, $start_open, $stop_open - $start_open + strlen($tag) + 3); } - + return ''; } } diff --git a/QuickBooks/QBXML/Schema/Object.php b/QuickBooks/QBXML/Schema/Object.php index 01689ab5..cb4c4459 100755 --- a/QuickBooks/QBXML/Schema/Object.php +++ b/QuickBooks/QBXML/Schema/Object.php @@ -1,62 +1,62 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ define('QUICKBOOKS_QBXML_SCHEMA_TYPE_STRTYPE', 'STRTYPE'); /** - * + * */ define('QUICKBOOKS_QBXML_SCHEMA_TYPE_IDTYPE', 'IDTYPE'); /** - * + * */ define('QUICKBOOKS_QBXML_SCHEMA_TYPE_BOOLTYPE', 'BOOLTYPE'); define('QUICKBOOKS_QBXML_SCHEMA_TYPE_AMTTYPE', 'AMTTYPE'); /** - * + * */ abstract class QuickBooks_QBXML_Schema_Object { abstract protected function &_qbxmlWrapper(); - + public function qbxmlWrapper() { return $this->_qbxmlWrapper(); } - + abstract protected function &_dataTypePaths(); - + /** - * - * + * + * * @param string $match * @return array */ public function paths($match = null) { $paths = $this->_dataTypePaths(); - + return array_keys($paths); } - - /** - * - * + + /** + * + * * @param string $path * @param boolean $case_doesnt_matter * @return string @@ -65,12 +65,12 @@ public function dataType($path, $case_doesnt_matter = true) { /* static $paths = array( - 'Name' => 'STRTYPE', + 'Name' => 'STRTYPE', ); */ - + $paths = $this->_dataTypePaths(); - + if (isset($paths[$path])) { return $paths[$path]; @@ -85,15 +85,15 @@ public function dataType($path, $case_doesnt_matter = true) } } } - + return null; } - + abstract protected function &_maxLengthPaths(); - + /** - * - * + * + * * @param string $path * @param boolean $case_doesnt_matter * @param string $locale @@ -103,13 +103,13 @@ public function maxLength($path, $case_doesnt_matter = true, $locale = null) { /* static $paths = array( - 'Name' => 40, - 'FirstName' => 41, + 'Name' => 40, + 'FirstName' => 41, ); */ - + $paths = $this->_maxLengthPaths(); - + if (isset($paths[$path])) { return $paths[$path]; @@ -124,58 +124,58 @@ public function maxLength($path, $case_doesnt_matter = true, $locale = null) } } } - + return 0; } - + abstract protected function &_isOptionalPaths(); - + public function isOptional($path) { /* static $paths = array( - 'Name' => false, - 'FirstName' => true, - 'LastName' => true, + 'Name' => false, + 'FirstName' => true, + 'LastName' => true, ); */ - + $paths = $this->_isOptionalPaths(); - + if (isset($paths[$path])) { return $paths[$path]; } - + return true; } - + abstract protected function &_sinceVersionPaths(); - + public function sinceVersion($path) { /* static $paths = array( - 'FirstName' => '0.0', - 'LastName' => '0.0', + 'FirstName' => '0.0', + 'LastName' => '0.0', ); */ - + $paths = $this->_sinceVersionPaths(); - + if (isset($paths[$path])) { return $paths[$path]; } - + return '999.99'; } - + abstract protected function &_isRepeatablePaths(); - + /** - * Tell whether or not a specific element is repeatable - * + * Tell whether or not a specific element is repeatable + * * @param string $path * @return boolean */ @@ -183,31 +183,31 @@ public function isRepeatable($path) { /* static $paths = array( - 'FirstName' => false, - 'LastName' => false, + 'FirstName' => false, + 'LastName' => false, ); */ - + $paths = $this->_isRepeatablePaths(); - + if (isset($paths[$path])) { return $paths[$path]; } - + return false; } - + /** * Tell whether or not an element exists - * + * * @param string $path * @return boolean */ public function exists($path, $case_doesnt_matter = true, $is_end_element = false) { $ordered_paths = $this->_reorderPathsPaths(); - + if (in_array($path, $ordered_paths)) { return true; @@ -222,83 +222,83 @@ public function exists($path, $case_doesnt_matter = true, $is_end_element = fals } } } - + return false; } - + /** - * + * */ public function unfold($path) { static $paths = null; - + if (is_null($paths)) { $paths = $this->_reorderPathsPaths(); $paths = array_change_key_case(array_combine(array_values($paths), array_values($paths)), CASE_LOWER); } - + //print('unfolding: {' . $path . '}' . "\n"); - + if (isset($paths[strtolower($path)])) { return $paths[strtolower($path)]; } - + return null; } - + /** - * + * * @note WARNING! These are lists of UNSUPPORTED locales, NOT lists of supported ones! - * - */ + * + */ protected function &_inLocalePaths() { $arr = array(); return $arr; } - + /** - * + * * @note WARNING! These are lists of UNSUPPORTED locales, NOT lists of supported ones! - * + * */ public function localePaths() { return $this->_inLocalePaths(); } - + /* public function inLocale($path, $locale) { //static $paths = array( - // 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + // 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), // 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), // ); - + $paths = $this->_inLocalePaths(); - + if (isset($paths[$path])) { return in_array($locale, $paths[$path]); } - + return false; } */ - + /** * Return a list of paths in a specific schema order - * + * * @return array */ abstract protected function &_reorderPathsPaths(); - + /** * Re-order an array to match the schema order - * + * * @param array $unordered_paths * @param boolean $allow_application_id * @return array @@ -307,16 +307,16 @@ public function reorderPaths($unordered_paths, $allow_application_id = true, $al { /* static $ordered_paths = array( - 0 => 'Name', - 1 => 'FirstName', + 0 => 'Name', + 1 => 'FirstName', 2 => 'LastName', ); */ - + $ordered_paths = $this->_reorderPathsPaths(); - + $tmp = array(); - + foreach ($ordered_paths as $key => $path) { if (in_array($path, $unordered_paths)) @@ -326,14 +326,14 @@ public function reorderPaths($unordered_paths, $allow_application_id = true, $al /*else if (substr($path, -6) == 'ListID' and $allow_application_id) { // Modify and add: (so that application IDs are supported and in the correct place) - // CustomerRef ListID tags + // CustomerRef ListID tags // modified to: // CustomerRef APIApplicationID tags - + $parent = trim(substr($path, 0, -7)); - + $apppath = trim($parent . ' ' . QUICKBOOKS_API_APPLICATIONID); - + if (in_array($apppath, $unordered_paths)) { $tmp[$key] = $apppath; @@ -342,9 +342,9 @@ public function reorderPaths($unordered_paths, $allow_application_id = true, $al else if (substr($path, -5) == 'TxnID' and $allow_application_id) { $parent = trim(substr($path, 0, -6)); - + $apppath = $parent . ' ' . QUICKBOOKS_API_APPLICATIONID; - + if (in_array($apppath, $unordered_paths)) { $tmp[$key] = $apppath; @@ -353,19 +353,19 @@ public function reorderPaths($unordered_paths, $allow_application_id = true, $al else if ($path == 'EditSequence' and $allow_application_editsequence) { $apppath = QUICKBOOKS_API_APPLICATIONEDITSEQUENCE; - + if (in_array($apppath, $unordered_paths)) { $tmp[$key] = $apppath; } }*/ - + /*else if ($path == QUICKBOOKS_API_APPLICATIONID) { print('HERE!'); }*/ } - + return array_merge($tmp); } } diff --git a/QuickBooks/QBXML/Schema/Object/ARRefundCreditCardAddRq.php b/QuickBooks/QBXML/Schema/Object/ARRefundCreditCardAddRq.php index d028ee92..8805f56d 100755 --- a/QuickBooks/QBXML/Schema/Object/ARRefundCreditCardAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ARRefundCreditCardAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ARRefundCreditCardAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ARRefundCreditCardAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ARRefundCreditCardAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -83,10 +83,10 @@ protected function &_dataTypePaths() 'RefundAppliedToTxnAdd RefundAmount' => 'AMTTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -138,10 +138,10 @@ protected function &_maxLengthPaths() 'RefundAppliedToTxnAdd RefundAmount' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -194,7 +194,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -246,10 +246,10 @@ protected function &_sinceVersionPaths() 'RefundAppliedToTxnAdd RefundAmount' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -301,22 +301,22 @@ protected function &_isRepeatablePaths() 'RefundAppliedToTxnAdd RefundAmount' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -373,7 +373,7 @@ protected function &_reorderPathsPaths() 50 => 'RefundAppliedToTxnAdd RefundAmount', 51 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ARRefundCreditCardQueryRq.php b/QuickBooks/QBXML/Schema/Object/ARRefundCreditCardQueryRq.php index 8cdf3dee..bac99421 100755 --- a/QuickBooks/QBXML/Schema/Object/ARRefundCreditCardQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ARRefundCreditCardQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ARRefundCreditCardQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ARRefundCreditCardQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -92,10 +92,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -125,7 +125,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -154,10 +154,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -186,22 +186,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -230,7 +230,7 @@ protected function &_reorderPathsPaths() 22 => 'IncludeRetElement', 23 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/AccountAddRq.php b/QuickBooks/QBXML/Schema/Object/AccountAddRq.php index 2bba67f2..67154422 100755 --- a/QuickBooks/QBXML/Schema/Object/AccountAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/AccountAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: AccountAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_AccountAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'AccountAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -51,10 +51,10 @@ protected function &_dataTypePaths() 'TaxLineID' => 'INTTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -74,10 +74,10 @@ protected function &_maxLengthPaths() 'TaxLineID' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -98,7 +98,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -118,10 +118,10 @@ protected function &_sinceVersionPaths() 'TaxLineID' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -141,22 +141,22 @@ protected function &_isRepeatablePaths() 'TaxLineID' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -176,7 +176,7 @@ protected function &_reorderPathsPaths() 13 => 'TaxLineID', 14 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/AccountModRq.php b/QuickBooks/QBXML/Schema/Object/AccountModRq.php index cd590225..c41208a7 100755 --- a/QuickBooks/QBXML/Schema/Object/AccountModRq.php +++ b/QuickBooks/QBXML/Schema/Object/AccountModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: AccountModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_AccountModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'AccountMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -52,10 +52,10 @@ protected function &_dataTypePaths() 'TaxLineID' => 'INTTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -76,10 +76,10 @@ protected function &_maxLengthPaths() 'TaxLineID' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -101,7 +101,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -122,10 +122,10 @@ protected function &_sinceVersionPaths() 'TaxLineID' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -146,22 +146,22 @@ protected function &_isRepeatablePaths() 'TaxLineID' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -182,7 +182,7 @@ protected function &_reorderPathsPaths() 14 => 'TaxLineID', 15 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/AccountQueryRq.php b/QuickBooks/QBXML/Schema/Object/AccountQueryRq.php index 1e07dd0d..a042a272 100755 --- a/QuickBooks/QBXML/Schema/Object/AccountQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/AccountQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: AccountQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_AccountQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -49,10 +49,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -70,10 +70,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -92,7 +92,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -110,10 +110,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -131,22 +131,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -164,7 +164,7 @@ protected function &_reorderPathsPaths() 11 => 'IncludeRetElement', 12 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BillAddRq.php b/QuickBooks/QBXML/Schema/Object/BillAddRq.php index 4004eb68..e1d4b2d9 100755 --- a/QuickBooks/QBXML/Schema/Object/BillAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/BillAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BillAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BillAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'BillAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -91,10 +91,10 @@ protected function &_dataTypePaths() 'ItemGroupLineAdd UnitOfMeasure' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -154,10 +154,10 @@ protected function &_maxLengthPaths() 'ItemGroupLineAdd UnitOfMeasure' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -218,7 +218,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -278,10 +278,10 @@ protected function &_sinceVersionPaths() 'ItemGroupLineAdd UnitOfMeasure' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -341,22 +341,22 @@ protected function &_isRepeatablePaths() 'ItemGroupLineAdd UnitOfMeasure' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -388,7 +388,7 @@ protected function &_reorderPathsPaths() 25 => 'ExpenseLineAdd SalesTaxCodeRef ListID', 26 => 'ExpenseLineAdd SalesTaxCodeRef FullName', 27 => 'ExpenseLineAdd BillableStatus', - 28 => 'ItemLineAdd', + 28 => 'ItemLineAdd', 29 => 'ItemLineAdd ItemRef ListID', 30 => 'ItemLineAdd ItemRef FullName', 31 => 'ItemLineAdd InventorySiteRef ListID', @@ -419,7 +419,7 @@ protected function &_reorderPathsPaths() 56 => 'ItemGroupLineAdd UnitOfMeasure', 57 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BillModRq.php b/QuickBooks/QBXML/Schema/Object/BillModRq.php index 3f2fb2a9..09501c32 100755 --- a/QuickBooks/QBXML/Schema/Object/BillModRq.php +++ b/QuickBooks/QBXML/Schema/Object/BillModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BillModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BillModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'BillMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -114,10 +114,10 @@ protected function &_dataTypePaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -200,10 +200,10 @@ protected function &_maxLengthPaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 41, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -287,7 +287,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -370,10 +370,10 @@ protected function &_sinceVersionPaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -456,22 +456,22 @@ protected function &_isRepeatablePaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -554,7 +554,7 @@ protected function &_reorderPathsPaths() 76 => 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName', 77 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BillPaymentCheckAddRq.php b/QuickBooks/QBXML/Schema/Object/BillPaymentCheckAddRq.php index 2a050faa..d3d938e5 100755 --- a/QuickBooks/QBXML/Schema/Object/BillPaymentCheckAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/BillPaymentCheckAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BillPaymentCheckAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BillPaymentCheckAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'BillPaymentCheckAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -57,10 +57,10 @@ protected function &_dataTypePaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -86,10 +86,10 @@ protected function &_maxLengthPaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => 209, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -116,7 +116,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -142,10 +142,10 @@ protected function &_sinceVersionPaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -171,22 +171,22 @@ protected function &_isRepeatablePaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -201,7 +201,7 @@ protected function &_reorderPathsPaths() 'IsToBePrinted', 'RefNumber', 'Memo', - 'AppliedToTxnAdd', + 'AppliedToTxnAdd', 'AppliedToTxnAdd TxnID', 'AppliedToTxnAdd PaymentAmount', 'AppliedToTxnAdd TxnLineDetail TxnLineID', @@ -214,7 +214,7 @@ protected function &_reorderPathsPaths() 'AppliedToTxnAdd DiscountAccountRef FullName', 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BillPaymentCheckModRq.php b/QuickBooks/QBXML/Schema/Object/BillPaymentCheckModRq.php index d57e496b..b664f53d 100755 --- a/QuickBooks/QBXML/Schema/Object/BillPaymentCheckModRq.php +++ b/QuickBooks/QBXML/Schema/Object/BillPaymentCheckModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BillPaymentCheckModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BillPaymentCheckModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -54,10 +54,10 @@ protected function &_dataTypePaths() 'BillPaymentCheckMod AppliedToTxnMod DiscountAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -80,10 +80,10 @@ protected function &_maxLengthPaths() 'BillPaymentCheckMod AppliedToTxnMod DiscountAccountRef FullName' => 159, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -107,7 +107,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -130,10 +130,10 @@ protected function &_sinceVersionPaths() 'BillPaymentCheckMod AppliedToTxnMod DiscountAccountRef FullName' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -156,22 +156,22 @@ protected function &_isRepeatablePaths() 'BillPaymentCheckMod AppliedToTxnMod DiscountAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -194,7 +194,7 @@ protected function &_reorderPathsPaths() 16 => 'BillPaymentCheckMod AppliedToTxnMod DiscountAccountRef FullName', 17 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BillPaymentCheckQueryRq.php b/QuickBooks/QBXML/Schema/Object/BillPaymentCheckQueryRq.php index 0b89dffd..c91e7647 100755 --- a/QuickBooks/QBXML/Schema/Object/BillPaymentCheckQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/BillPaymentCheckQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BillPaymentCheckQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BillPaymentCheckQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -92,10 +92,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -125,7 +125,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -154,10 +154,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -186,22 +186,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -230,7 +230,7 @@ protected function &_reorderPathsPaths() 22 => 'IncludeRetElement', 23 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BillPaymentCreditCardAddRq.php b/QuickBooks/QBXML/Schema/Object/BillPaymentCreditCardAddRq.php index 1659359e..476534b1 100755 --- a/QuickBooks/QBXML/Schema/Object/BillPaymentCreditCardAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/BillPaymentCreditCardAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BillPaymentCreditCardAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BillPaymentCreditCardAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -56,10 +56,10 @@ protected function &_dataTypePaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -84,10 +84,10 @@ protected function &_maxLengthPaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => 209, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -113,7 +113,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -138,10 +138,10 @@ protected function &_sinceVersionPaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -166,22 +166,22 @@ protected function &_isRepeatablePaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -206,7 +206,7 @@ protected function &_reorderPathsPaths() 'AppliedToTxnAdd DiscountAccountRef ListID', 'AppliedToTxnAdd DiscountAccountRef FullName', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BillPaymentCreditCardQueryRq.php b/QuickBooks/QBXML/Schema/Object/BillPaymentCreditCardQueryRq.php index a0e70a2b..ef67aafc 100755 --- a/QuickBooks/QBXML/Schema/Object/BillPaymentCreditCardQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/BillPaymentCreditCardQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BillPaymentCreditCardQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BillPaymentCreditCardQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -92,10 +92,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -125,7 +125,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -154,10 +154,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -186,22 +186,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -230,7 +230,7 @@ protected function &_reorderPathsPaths() 22 => 'IncludeRetElement', 23 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BillQueryRq.php b/QuickBooks/QBXML/Schema/Object/BillQueryRq.php index e64e0d6d..ef692bcb 100755 --- a/QuickBooks/QBXML/Schema/Object/BillQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/BillQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BillQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BillQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -62,10 +62,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -96,10 +96,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -131,7 +131,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -162,10 +162,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -196,22 +196,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -242,7 +242,7 @@ protected function &_reorderPathsPaths() 24 => 'IncludeRetElement', 25 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BillToPayQueryRq.php b/QuickBooks/QBXML/Schema/Object/BillToPayQueryRq.php index ab0d8176..0d3d19f9 100755 --- a/QuickBooks/QBXML/Schema/Object/BillToPayQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/BillToPayQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BillToPayQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BillToPayQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -42,10 +42,10 @@ protected function &_dataTypePaths() 'DueDate' => 'DATETYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -56,10 +56,10 @@ protected function &_maxLengthPaths() 'DueDate' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -71,7 +71,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -82,10 +82,10 @@ protected function &_sinceVersionPaths() 'DueDate' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -96,22 +96,22 @@ protected function &_isRepeatablePaths() 'DueDate' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -122,7 +122,7 @@ protected function &_reorderPathsPaths() 4 => 'DueDate', 5 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BillingRateAddRq.php b/QuickBooks/QBXML/Schema/Object/BillingRateAddRq.php index 2dd18931..2d6e1ab2 100755 --- a/QuickBooks/QBXML/Schema/Object/BillingRateAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/BillingRateAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BillingRateAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BillingRateAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -45,10 +45,10 @@ protected function &_dataTypePaths() 'BillingRateAdd BillingRatePerItem AdjustBillingRateRelativeTo' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -62,10 +62,10 @@ protected function &_maxLengthPaths() 'BillingRateAdd BillingRatePerItem AdjustBillingRateRelativeTo' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -80,7 +80,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_sinceVersionPaths() 'BillingRateAdd BillingRatePerItem AdjustBillingRateRelativeTo' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -111,22 +111,22 @@ protected function &_isRepeatablePaths() 'BillingRateAdd BillingRatePerItem AdjustBillingRateRelativeTo' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -143,7 +143,7 @@ protected function &_reorderPathsPaths() 10 => 'BillingRateAdd BillingRatePerItem AdjustBillingRateRelativeTo', 11 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BillingRateQueryRq.php b/QuickBooks/QBXML/Schema/Object/BillingRateQueryRq.php index b43a3ef2..cfbb9429 100755 --- a/QuickBooks/QBXML/Schema/Object/BillingRateQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/BillingRateQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BillingRateQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BillingRateQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'ItemRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'ItemRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'ItemRef FullName' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'ItemRef FullName' => true, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'ItemRef FullName', 11 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BudgetSummaryReportQueryRq.php b/QuickBooks/QBXML/Schema/Object/BudgetSummaryReportQueryRq.php index 8769d222..2a836e79 100755 --- a/QuickBooks/QBXML/Schema/Object/BudgetSummaryReportQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/BudgetSummaryReportQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BudgetSummaryReportQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BudgetSummaryReportQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -42,10 +42,10 @@ protected function &_dataTypePaths() 'SummarizeBudgetColumnsBy' => 'ENUMTYPE', 'SummarizeBudgetRowsBy' => 'ENUMTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -56,10 +56,10 @@ protected function &_maxLengthPaths() 'SummarizeBudgetColumnsBy' => 0, 'SummarizeBudgetRowsBy' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -71,7 +71,7 @@ protected function &_isOptionalPaths() 'SummarizeBudgetRowsBy' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -82,10 +82,10 @@ protected function &_sinceVersionPaths() 'SummarizeBudgetColumnsBy' => 999.99, 'SummarizeBudgetRowsBy' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -96,22 +96,22 @@ protected function &_isRepeatablePaths() 'SummarizeBudgetColumnsBy' => false, 'SummarizeBudgetRowsBy' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -122,7 +122,7 @@ protected function &_reorderPathsPaths() 4 => 'SummarizeBudgetColumnsBy', 5 => 'SummarizeBudgetRowsBy', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BuildAssemblyAddRq.php b/QuickBooks/QBXML/Schema/Object/BuildAssemblyAddRq.php index 05738408..80c7ca09 100755 --- a/QuickBooks/QBXML/Schema/Object/BuildAssemblyAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/BuildAssemblyAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BuildAssemblyAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BuildAssemblyAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -44,10 +44,10 @@ protected function &_dataTypePaths() 'BuildAssemblyAdd MarkPendingIfRequired' => 'BOOLTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_maxLengthPaths() 'BuildAssemblyAdd MarkPendingIfRequired' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -77,7 +77,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -90,10 +90,10 @@ protected function &_sinceVersionPaths() 'BuildAssemblyAdd MarkPendingIfRequired' => 7, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -106,22 +106,22 @@ protected function &_isRepeatablePaths() 'BuildAssemblyAdd MarkPendingIfRequired' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -136,7 +136,7 @@ protected function &_reorderPathsPaths() 8 => 'BuildAssemblyAdd MarkPendingIfRequired', 9 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BuildAssemblyModRq.php b/QuickBooks/QBXML/Schema/Object/BuildAssemblyModRq.php index e788a321..21bc68ce 100755 --- a/QuickBooks/QBXML/Schema/Object/BuildAssemblyModRq.php +++ b/QuickBooks/QBXML/Schema/Object/BuildAssemblyModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BuildAssemblyModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BuildAssemblyModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -45,10 +45,10 @@ protected function &_dataTypePaths() 'BuildAssemblyMod RemovePending' => 'BOOLTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -62,10 +62,10 @@ protected function &_maxLengthPaths() 'BuildAssemblyMod RemovePending' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -80,7 +80,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_sinceVersionPaths() 'BuildAssemblyMod RemovePending' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -111,22 +111,22 @@ protected function &_isRepeatablePaths() 'BuildAssemblyMod RemovePending' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -140,7 +140,7 @@ protected function &_reorderPathsPaths() 7 => 'BuildAssemblyMod RemovePending', 8 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/BuildAssemblyQueryRq.php b/QuickBooks/QBXML/Schema/Object/BuildAssemblyQueryRq.php index 35d388b2..7c231af8 100755 --- a/QuickBooks/QBXML/Schema/Object/BuildAssemblyQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/BuildAssemblyQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: BuildAssemblyQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_BuildAssemblyQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -57,10 +57,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -86,10 +86,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -116,7 +116,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -142,10 +142,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 999.99, 'OwnerID' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -171,22 +171,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -212,7 +212,7 @@ protected function &_reorderPathsPaths() 19 => 'IncludeRetElement', 20 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ChargeAddRq.php b/QuickBooks/QBXML/Schema/Object/ChargeAddRq.php index d9f37aca..67b02072 100755 --- a/QuickBooks/QBXML/Schema/Object/ChargeAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ChargeAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ChargeAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ChargeAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -56,10 +56,10 @@ protected function &_dataTypePaths() 'ChargeAdd OverrideItemAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -84,10 +84,10 @@ protected function &_maxLengthPaths() 'ChargeAdd OverrideItemAccountRef FullName' => 209, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -113,7 +113,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -138,10 +138,10 @@ protected function &_sinceVersionPaths() 'ChargeAdd OverrideItemAccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -166,22 +166,22 @@ protected function &_isRepeatablePaths() 'ChargeAdd OverrideItemAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -208,7 +208,7 @@ protected function &_reorderPathsPaths() 20 => 'ChargeAdd OverrideItemAccountRef FullName', 21 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ChargeModRq.php b/QuickBooks/QBXML/Schema/Object/ChargeModRq.php index 92a0fb74..47a9a1c1 100755 --- a/QuickBooks/QBXML/Schema/Object/ChargeModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ChargeModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ChargeModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ChargeModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_dataTypePaths() 'ChargeMod OverrideItemAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -92,10 +92,10 @@ protected function &_maxLengthPaths() 'ChargeMod OverrideItemAccountRef FullName' => 209, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -125,7 +125,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -154,10 +154,10 @@ protected function &_sinceVersionPaths() 'ChargeMod OverrideItemAccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -186,22 +186,22 @@ protected function &_isRepeatablePaths() 'ChargeMod OverrideItemAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -230,7 +230,7 @@ protected function &_reorderPathsPaths() 22 => 'ChargeMod OverrideItemAccountRef FullName', 23 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ChargeQueryRq.php b/QuickBooks/QBXML/Schema/Object/ChargeQueryRq.php index a8a708f3..1b3eae00 100755 --- a/QuickBooks/QBXML/Schema/Object/ChargeQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ChargeQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ChargeQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ChargeQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -61,10 +61,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -128,7 +128,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -158,10 +158,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -191,22 +191,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -236,7 +236,7 @@ protected function &_reorderPathsPaths() 23 => 'IncludeRetElement', 24 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CheckAddRq.php b/QuickBooks/QBXML/Schema/Object/CheckAddRq.php index 865af73b..9d2a40b8 100755 --- a/QuickBooks/QBXML/Schema/Object/CheckAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/CheckAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CheckAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CheckAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'CheckAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -96,10 +96,10 @@ protected function &_dataTypePaths() 'ItemGroupLineAdd UnitOfMeasure' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -164,10 +164,10 @@ protected function &_maxLengthPaths() 'ItemGroupLineAdd UnitOfMeasure' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -233,7 +233,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -298,10 +298,10 @@ protected function &_sinceVersionPaths() 'ItemGroupLineAdd UnitOfMeasure' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -366,22 +366,22 @@ protected function &_isRepeatablePaths() 'ItemGroupLineAdd UnitOfMeasure' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -406,10 +406,10 @@ protected function &_reorderPathsPaths() 18 => 'IsTaxIncluded', 19 => 'SalesTaxCodeRef ListID', 20 => 'SalesTaxCodeRef FullName', - 21 => 'ApplyCheckToTxnAdd', + 21 => 'ApplyCheckToTxnAdd', 22 => 'ApplyCheckToTxnAdd TxnID', 23 => 'ApplyCheckToTxnAdd Amount', - 24 => 'ExpenseLineAdd', + 24 => 'ExpenseLineAdd', 25 => 'ExpenseLineAdd AccountRef ListID', 26 => 'ExpenseLineAdd AccountRef FullName', 27 => 'ExpenseLineAdd Amount', @@ -422,7 +422,7 @@ protected function &_reorderPathsPaths() 34 => 'ExpenseLineAdd SalesTaxCodeRef ListID', 35 => 'ExpenseLineAdd SalesTaxCodeRef FullName', 36 => 'ExpenseLineAdd BillableStatus', - 37 => 'ItemLineAdd', + 37 => 'ItemLineAdd', 38 => 'ItemLineAdd ItemRef ListID', 39 => 'ItemLineAdd ItemRef FullName', 40 => 'ItemLineAdd Desc', @@ -442,7 +442,7 @@ protected function &_reorderPathsPaths() 54 => 'ItemLineAdd OverrideItemAccountRef FullName', 55 => 'ItemLineAdd LinkToTxn TxnID', 56 => 'ItemLineAdd LinkToTxn TxnLineID', - 57 => 'ItemGroupLineAdd', + 57 => 'ItemGroupLineAdd', 58 => 'ItemGroupLineAdd ItemGroupRef ListID', 59 => 'ItemGroupLineAdd ItemGroupRef FullName', 60 => 'ItemGroupLineAdd Desc', @@ -450,7 +450,7 @@ protected function &_reorderPathsPaths() 62 => 'ItemGroupLineAdd UnitOfMeasure', 63 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CheckModRq.php b/QuickBooks/QBXML/Schema/Object/CheckModRq.php index 8986a89f..ea3865ac 100755 --- a/QuickBooks/QBXML/Schema/Object/CheckModRq.php +++ b/QuickBooks/QBXML/Schema/Object/CheckModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CheckModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CheckModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'CheckMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -124,10 +124,10 @@ protected function &_dataTypePaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -220,10 +220,10 @@ protected function &_maxLengthPaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 159, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -317,7 +317,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -410,10 +410,10 @@ protected function &_sinceVersionPaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -506,22 +506,22 @@ protected function &_isRepeatablePaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -614,7 +614,7 @@ protected function &_reorderPathsPaths() 86 => 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName', 87 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CheckQueryRq.php b/QuickBooks/QBXML/Schema/Object/CheckQueryRq.php index ba351d77..07fb33ee 100755 --- a/QuickBooks/QBXML/Schema/Object/CheckQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/CheckQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CheckQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CheckQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -61,10 +61,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -128,7 +128,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -158,10 +158,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -191,22 +191,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -236,7 +236,7 @@ protected function &_reorderPathsPaths() 23 => 'IncludeRetElement', 24 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ClassAddRq.php b/QuickBooks/QBXML/Schema/Object/ClassAddRq.php index f20eaf73..2d395d2c 100755 --- a/QuickBooks/QBXML/Schema/Object/ClassAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ClassAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ClassAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ClassAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ClassAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -41,10 +41,10 @@ protected function &_dataTypePaths() 'ParentRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -54,10 +54,10 @@ protected function &_maxLengthPaths() 'ParentRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -68,7 +68,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -78,10 +78,10 @@ protected function &_sinceVersionPaths() 'ParentRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -91,22 +91,22 @@ protected function &_isRepeatablePaths() 'ParentRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -116,7 +116,7 @@ protected function &_reorderPathsPaths() 3 => 'ParentRef FullName', 4 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ClassQueryRq.php b/QuickBooks/QBXML/Schema/Object/ClassQueryRq.php index 2c071683..0bfe2988 100755 --- a/QuickBooks/QBXML/Schema/Object/ClassQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ClassQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ClassQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ClassQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ClearedStatusModRq.php b/QuickBooks/QBXML/Schema/Object/ClearedStatusModRq.php index a11bfde6..c9217b3d 100755 --- a/QuickBooks/QBXML/Schema/Object/ClearedStatusModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ClearedStatusModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ClearedStatusModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ClearedStatusModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -39,10 +39,10 @@ protected function &_dataTypePaths() 'ClearedStatusMod TxnLineID' => 'IDTYPE', 'ClearedStatusMod ClearedStatus' => 'ENUMTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -50,10 +50,10 @@ protected function &_maxLengthPaths() 'ClearedStatusMod TxnLineID' => 0, 'ClearedStatusMod ClearedStatus' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -62,7 +62,7 @@ protected function &_isOptionalPaths() 'ClearedStatusMod ClearedStatus' => false, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -70,10 +70,10 @@ protected function &_sinceVersionPaths() 'ClearedStatusMod TxnLineID' => 0, 'ClearedStatusMod ClearedStatus' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -81,22 +81,22 @@ protected function &_isRepeatablePaths() 'ClearedStatusMod TxnLineID' => false, 'ClearedStatusMod ClearedStatus' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -104,7 +104,7 @@ protected function &_reorderPathsPaths() 1 => 'ClearedStatusMod TxnLineID', 2 => 'ClearedStatusMod ClearedStatus', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CompanyActivityQueryRq.php b/QuickBooks/QBXML/Schema/Object/CompanyActivityQueryRq.php index f27c6e4f..dc1b1378 100755 --- a/QuickBooks/QBXML/Schema/Object/CompanyActivityQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/CompanyActivityQueryRq.php @@ -2,97 +2,97 @@ /** * Schema object for: CompanyActivityQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CompanyActivityQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( 0 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CompanyQueryRq.php b/QuickBooks/QBXML/Schema/Object/CompanyQueryRq.php index 389eaac5..2990608c 100755 --- a/QuickBooks/QBXML/Schema/Object/CompanyQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/CompanyQueryRq.php @@ -2,56 +2,56 @@ /** * Schema object for: CompanyQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CompanyQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -59,46 +59,46 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( 0 => 'IncludeRetElement', 1 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CreditCardChargeAddRq.php b/QuickBooks/QBXML/Schema/Object/CreditCardChargeAddRq.php index 50000fee..857abf18 100755 --- a/QuickBooks/QBXML/Schema/Object/CreditCardChargeAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/CreditCardChargeAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CreditCardChargeAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CreditCardChargeAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -83,10 +83,10 @@ protected function &_dataTypePaths() 'CreditCardChargeAdd ItemGroupLineAdd UnitOfMeasure' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -138,10 +138,10 @@ protected function &_maxLengthPaths() 'CreditCardChargeAdd ItemGroupLineAdd UnitOfMeasure' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -194,7 +194,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -246,10 +246,10 @@ protected function &_sinceVersionPaths() 'CreditCardChargeAdd ItemGroupLineAdd UnitOfMeasure' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -301,22 +301,22 @@ protected function &_isRepeatablePaths() 'CreditCardChargeAdd ItemGroupLineAdd UnitOfMeasure' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -370,7 +370,7 @@ protected function &_reorderPathsPaths() 47 => 'CreditCardChargeAdd ItemGroupLineAdd UnitOfMeasure', 48 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CreditCardChargeModRq.php b/QuickBooks/QBXML/Schema/Object/CreditCardChargeModRq.php index a80ec3b7..2af7c231 100755 --- a/QuickBooks/QBXML/Schema/Object/CreditCardChargeModRq.php +++ b/QuickBooks/QBXML/Schema/Object/CreditCardChargeModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CreditCardChargeModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CreditCardChargeModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -111,10 +111,10 @@ protected function &_dataTypePaths() 'CreditCardChargeMod ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -194,10 +194,10 @@ protected function &_maxLengthPaths() 'CreditCardChargeMod ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 159, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -278,7 +278,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -358,10 +358,10 @@ protected function &_sinceVersionPaths() 'CreditCardChargeMod ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -441,22 +441,22 @@ protected function &_isRepeatablePaths() 'CreditCardChargeMod ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -536,7 +536,7 @@ protected function &_reorderPathsPaths() 73 => 'CreditCardChargeMod ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName', 74 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CreditCardChargeQueryRq.php b/QuickBooks/QBXML/Schema/Object/CreditCardChargeQueryRq.php index 88370a70..d33210df 100755 --- a/QuickBooks/QBXML/Schema/Object/CreditCardChargeQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/CreditCardChargeQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CreditCardChargeQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CreditCardChargeQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -92,10 +92,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -125,7 +125,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -154,10 +154,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -186,22 +186,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -230,7 +230,7 @@ protected function &_reorderPathsPaths() 22 => 'IncludeRetElement', 23 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CreditCardCreditAddRq.php b/QuickBooks/QBXML/Schema/Object/CreditCardCreditAddRq.php index 76573b1c..0db5bf9b 100755 --- a/QuickBooks/QBXML/Schema/Object/CreditCardCreditAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/CreditCardCreditAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CreditCardCreditAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CreditCardCreditAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -80,10 +80,10 @@ protected function &_dataTypePaths() 'CreditCardCreditAdd ItemGroupLineAdd UnitOfMeasure' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -132,10 +132,10 @@ protected function &_maxLengthPaths() 'CreditCardCreditAdd ItemGroupLineAdd UnitOfMeasure' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -185,7 +185,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -234,10 +234,10 @@ protected function &_sinceVersionPaths() 'CreditCardCreditAdd ItemGroupLineAdd UnitOfMeasure' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -286,22 +286,22 @@ protected function &_isRepeatablePaths() 'CreditCardCreditAdd ItemGroupLineAdd UnitOfMeasure' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -355,7 +355,7 @@ protected function &_reorderPathsPaths() 47 => 'CreditCardCreditAdd ItemGroupLineAdd UnitOfMeasure', 48 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CreditCardCreditModRq.php b/QuickBooks/QBXML/Schema/Object/CreditCardCreditModRq.php index 6f03d7ea..05ed6d39 100755 --- a/QuickBooks/QBXML/Schema/Object/CreditCardCreditModRq.php +++ b/QuickBooks/QBXML/Schema/Object/CreditCardCreditModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CreditCardCreditModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CreditCardCreditModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -108,10 +108,10 @@ protected function &_dataTypePaths() 'CreditCardCreditMod ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -188,10 +188,10 @@ protected function &_maxLengthPaths() 'CreditCardCreditMod ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 159, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -269,7 +269,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -346,10 +346,10 @@ protected function &_sinceVersionPaths() 'CreditCardCreditMod ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -426,22 +426,22 @@ protected function &_isRepeatablePaths() 'CreditCardCreditMod ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -518,7 +518,7 @@ protected function &_reorderPathsPaths() 70 => 'CreditCardCreditMod ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName', 71 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CreditCardCreditQueryRq.php b/QuickBooks/QBXML/Schema/Object/CreditCardCreditQueryRq.php index d0b36c2c..5a9971d4 100755 --- a/QuickBooks/QBXML/Schema/Object/CreditCardCreditQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/CreditCardCreditQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CreditCardCreditQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CreditCardCreditQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -92,10 +92,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -125,7 +125,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -154,10 +154,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -186,22 +186,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -230,7 +230,7 @@ protected function &_reorderPathsPaths() 22 => 'IncludeRetElement', 23 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CreditMemoAddRq.php b/QuickBooks/QBXML/Schema/Object/CreditMemoAddRq.php index e4ba4518..ae65bbea 100755 --- a/QuickBooks/QBXML/Schema/Object/CreditMemoAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/CreditMemoAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CreditMemoAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CreditMemoAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'CreditMemoAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -156,10 +156,10 @@ protected function &_dataTypePaths() 'ShippingLineAdd AccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -284,10 +284,10 @@ protected function &_maxLengthPaths() 'ShippingLineAdd AccountRef FullName' => 209, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -413,7 +413,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -538,10 +538,10 @@ protected function &_sinceVersionPaths() 'ShippingLineAdd AccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -666,22 +666,22 @@ protected function &_isRepeatablePaths() 'ShippingLineAdd AccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -811,7 +811,7 @@ protected function &_reorderPathsPaths() 'ShippingLineAdd AccountRef ListID', 'ShippingLineAdd AccountRef FullName', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CreditMemoModRq.php b/QuickBooks/QBXML/Schema/Object/CreditMemoModRq.php index aafe0030..2a6cfb4e 100755 --- a/QuickBooks/QBXML/Schema/Object/CreditMemoModRq.php +++ b/QuickBooks/QBXML/Schema/Object/CreditMemoModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CreditMemoModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CreditMemoModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'CreditMemoMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -142,10 +142,10 @@ protected function &_dataTypePaths() 'CreditMemoLineGroupMod CreditMemoLineMod Other2' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -256,10 +256,10 @@ protected function &_maxLengthPaths() 'CreditMemoLineGroupMod CreditMemoLineMod Other2' => 29, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -371,7 +371,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -482,10 +482,10 @@ protected function &_sinceVersionPaths() 'CreditMemoLineGroupMod CreditMemoLineMod Other2' => 6, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -596,22 +596,22 @@ protected function &_isRepeatablePaths() 'CreditMemoLineGroupMod CreditMemoLineMod Other2' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -721,7 +721,7 @@ protected function &_reorderPathsPaths() 'CreditMemoLineGroupMod CreditMemoLineMod Other1', 'CreditMemoLineGroupMod CreditMemoLineMod Other2', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CreditMemoQueryRq.php b/QuickBooks/QBXML/Schema/Object/CreditMemoQueryRq.php index e5cdf3c2..b705ae83 100755 --- a/QuickBooks/QBXML/Schema/Object/CreditMemoQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/CreditMemoQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CreditMemoQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CreditMemoQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -61,10 +61,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -128,7 +128,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -158,10 +158,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -191,22 +191,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -236,7 +236,7 @@ protected function &_reorderPathsPaths() 23 => 'IncludeRetElement', 24 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CustomDetailReportQueryRq.php b/QuickBooks/QBXML/Schema/Object/CustomDetailReportQueryRq.php index a7eaf583..d9aa6633 100755 --- a/QuickBooks/QBXML/Schema/Object/CustomDetailReportQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/CustomDetailReportQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CustomDetailReportQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomDetailReportQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -71,10 +71,10 @@ protected function &_dataTypePaths() 'ReportOpenBalanceAsOf' => 'ENUMTYPE', 'ReportBasis' => 'ENUMTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -114,10 +114,10 @@ protected function &_maxLengthPaths() 'ReportOpenBalanceAsOf' => 0, 'ReportBasis' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_isOptionalPaths() 'ReportBasis' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -198,10 +198,10 @@ protected function &_sinceVersionPaths() 'ReportOpenBalanceAsOf' => 999.99, 'ReportBasis' => 2.1, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -241,22 +241,22 @@ protected function &_isRepeatablePaths() 'ReportOpenBalanceAsOf' => false, 'ReportBasis' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -296,7 +296,7 @@ protected function &_reorderPathsPaths() 33 => 'ReportOpenBalanceAsOf', 34 => 'ReportBasis', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CustomSummaryReportQueryRq.php b/QuickBooks/QBXML/Schema/Object/CustomSummaryReportQueryRq.php index d402271f..d1d92cfc 100755 --- a/QuickBooks/QBXML/Schema/Object/CustomSummaryReportQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/CustomSummaryReportQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CustomSummaryReportQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomSummaryReportQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -73,10 +73,10 @@ protected function &_dataTypePaths() 'ReturnColumns' => 'ENUMTYPE', 'ReportBasis' => 'ENUMTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -118,10 +118,10 @@ protected function &_maxLengthPaths() 'ReturnColumns' => 0, 'ReportBasis' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -164,7 +164,7 @@ protected function &_isOptionalPaths() 'ReportBasis' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -206,10 +206,10 @@ protected function &_sinceVersionPaths() 'ReturnColumns' => 999.99, 'ReportBasis' => 2.1, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -251,22 +251,22 @@ protected function &_isRepeatablePaths() 'ReturnColumns' => false, 'ReportBasis' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -308,7 +308,7 @@ protected function &_reorderPathsPaths() 35 => 'ReturnColumns', 36 => 'ReportBasis', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CustomerAddRq.php b/QuickBooks/QBXML/Schema/Object/CustomerAddRq.php index 0bfe0cf0..88876dc9 100755 --- a/QuickBooks/QBXML/Schema/Object/CustomerAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/CustomerAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CustomerAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomerAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'CustomerAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -116,10 +116,10 @@ protected function &_dataTypePaths() 'PriceLevelRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -140,8 +140,8 @@ protected function &_maxLengthPaths() 'BillAddress Addr5' => 41, 'BillAddress City' => 31, 'BillAddress State' => 21, - 'BillAddress County' => 21, - 'BillAddress Province' => 21, + 'BillAddress County' => 21, + 'BillAddress Province' => 21, 'BillAddress PostalCode' => 13, 'BillAddress Country' => 31, 'BillAddress Note' => 41, @@ -152,8 +152,8 @@ protected function &_maxLengthPaths() 'ShipAddress Addr5' => 41, 'ShipAddress City' => 31, 'ShipAddress State' => 21, - 'ShipAddress County' => 21, - 'ShipAddress Province' => 21, + 'ShipAddress County' => 21, + 'ShipAddress Province' => 21, 'ShipAddress PostalCode' => 13, 'ShipAddress Country' => 31, 'ShipAddress Note' => 41, @@ -204,10 +204,10 @@ protected function &_maxLengthPaths() 'PriceLevelRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -228,8 +228,8 @@ protected function &_isOptionalPaths() 'BillAddress Addr5' => true, 'BillAddress City' => true, 'BillAddress State' => true, - 'BillAddress County' => true, - 'BillAddress Province' => true, + 'BillAddress County' => true, + 'BillAddress Province' => true, 'BillAddress PostalCode' => true, 'BillAddress Country' => true, 'BillAddress Note' => true, @@ -240,8 +240,8 @@ protected function &_isOptionalPaths() 'ShipAddress Addr5' => true, 'ShipAddress City' => true, 'ShipAddress State' => true, - 'ShipAddress County' => true, - 'ShipAddress Province' => true, + 'ShipAddress County' => true, + 'ShipAddress Province' => true, 'ShipAddress PostalCode' => true, 'ShipAddress Country' => true, 'ShipAddress Note' => true, @@ -293,7 +293,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -314,8 +314,8 @@ protected function &_sinceVersionPaths() 'BillAddress Addr5' => 6, 'BillAddress City' => 999.99, 'BillAddress State' => 999.99, - 'BillAddress County' => 999.99, - 'BillAddress Province' => 999.99, + 'BillAddress County' => 999.99, + 'BillAddress Province' => 999.99, 'BillAddress PostalCode' => 999.99, 'BillAddress Country' => 999.99, 'BillAddress Note' => 6, @@ -326,8 +326,8 @@ protected function &_sinceVersionPaths() 'ShipAddress Addr5' => 6, 'ShipAddress City' => 999.99, 'ShipAddress State' => 999.99, - 'ShipAddress County' => 999.99, - 'ShipAddress Province' => 999.99, + 'ShipAddress County' => 999.99, + 'ShipAddress Province' => 999.99, 'ShipAddress PostalCode' => 999.99, 'ShipAddress Country' => 999.99, 'ShipAddress Note' => 6, @@ -378,10 +378,10 @@ protected function &_sinceVersionPaths() 'PriceLevelRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -402,8 +402,8 @@ protected function &_isRepeatablePaths() 'BillAddress Addr5' => false, 'BillAddress City' => false, 'BillAddress State' => false, - 'BillAddress County' => false, - 'BillAddress Province' => false, + 'BillAddress County' => false, + 'BillAddress Province' => false, 'BillAddress PostalCode' => false, 'BillAddress Country' => false, 'BillAddress Note' => false, @@ -414,8 +414,8 @@ protected function &_isRepeatablePaths() 'ShipAddress Addr5' => false, 'ShipAddress City' => false, 'ShipAddress State' => false, - 'ShipAddress County' => false, - 'ShipAddress Province' => false, + 'ShipAddress County' => false, + 'ShipAddress Province' => false, 'ShipAddress PostalCode' => false, 'ShipAddress Country' => false, 'ShipAddress Note' => false, @@ -466,19 +466,19 @@ protected function &_isRepeatablePaths() 'PriceLevelRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + protected function &_inLocalePaths() { static $paths = array( - 'CustomerTypeRef FullName' => array( 'QBOE' ), + 'CustomerTypeRef FullName' => array( 'QBOE' ), ); - + return $paths; } - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -498,8 +498,8 @@ protected function &_reorderPathsPaths() 'BillAddress Addr4', 'BillAddress Addr5', 'BillAddress City', - 'BillAddress County', - 'BillAddress Province', + 'BillAddress County', + 'BillAddress Province', 'BillAddress State', 'BillAddress PostalCode', 'BillAddress Country', @@ -510,8 +510,8 @@ protected function &_reorderPathsPaths() 'ShipAddress Addr4', 'ShipAddress Addr5', 'ShipAddress City', - 'ShipAddress County', - 'ShipAddress Province', + 'ShipAddress County', + 'ShipAddress Province', 'ShipAddress State', 'ShipAddress PostalCode', 'ShipAddress Country', @@ -564,7 +564,7 @@ protected function &_reorderPathsPaths() 'PreferredDeliveryMethod', 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CustomerModRq.php b/QuickBooks/QBXML/Schema/Object/CustomerModRq.php index 19f9cc56..311bf874 100755 --- a/QuickBooks/QBXML/Schema/Object/CustomerModRq.php +++ b/QuickBooks/QBXML/Schema/Object/CustomerModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CustomerModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomerModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'CustomerMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -54,7 +54,7 @@ protected function &_dataTypePaths() 'BillAddress Addr5' => 'STRTYPE', 'BillAddress City' => 'STRTYPE', 'BillAddress State' => 'STRTYPE', - 'BillAddress Province' => 'STRTYPE', + 'BillAddress Province' => 'STRTYPE', 'BillAddress PostalCode' => 'STRTYPE', 'BillAddress Country' => 'STRTYPE', 'BillAddress Note' => 'STRTYPE', @@ -65,7 +65,7 @@ protected function &_dataTypePaths() 'ShipAddress Addr5' => 'STRTYPE', 'ShipAddress City' => 'STRTYPE', 'ShipAddress State' => 'STRTYPE', - 'ShipAddress Province' => 'STRTYPE', + 'ShipAddress Province' => 'STRTYPE', 'ShipAddress PostalCode' => 'STRTYPE', 'ShipAddress Country' => 'STRTYPE', 'ShipAddress Note' => 'STRTYPE', @@ -112,13 +112,13 @@ protected function &_dataTypePaths() 'DeliveryMethod' => 'ENUMTYPE', 'PriceLevelRef ListID' => 'IDTYPE', 'PriceLevelRef FullName' => 'STRTYPE', - 'PreferredDeliveryMethod' => 'STRTYPE', + 'PreferredDeliveryMethod' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -141,7 +141,7 @@ protected function &_maxLengthPaths() 'BillAddress Addr5' => 41, 'BillAddress City' => 31, 'BillAddress State' => 21, - 'BillAddress Province' => 21, + 'BillAddress Province' => 21, 'BillAddress PostalCode' => 13, 'BillAddress Country' => 31, 'BillAddress Note' => 41, @@ -152,7 +152,7 @@ protected function &_maxLengthPaths() 'ShipAddress Addr5' => 41, 'ShipAddress City' => 31, 'ShipAddress State' => 21, - 'ShipAddress Province' => 21, + 'ShipAddress Province' => 21, 'ShipAddress PostalCode' => 13, 'ShipAddress Country' => 31, 'ShipAddress Note' => 41, @@ -201,10 +201,10 @@ protected function &_maxLengthPaths() 'PriceLevelRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -227,7 +227,7 @@ protected function &_isOptionalPaths() 'BillAddress Addr5' => true, 'BillAddress City' => true, 'BillAddress State' => true, - 'BillAddress Province' => true, + 'BillAddress Province' => true, 'BillAddress PostalCode' => true, 'BillAddress Country' => true, 'BillAddress Note' => true, @@ -238,7 +238,7 @@ protected function &_isOptionalPaths() 'ShipAddress Addr5' => true, 'ShipAddress City' => true, 'ShipAddress State' => true, - 'ShipAddress Province' => true, + 'ShipAddress Province' => true, 'ShipAddress PostalCode' => true, 'ShipAddress Country' => true, 'ShipAddress Note' => true, @@ -288,7 +288,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -311,7 +311,7 @@ protected function &_sinceVersionPaths() 'BillAddress Addr5' => 6, 'BillAddress City' => 999.99, 'BillAddress State' => 999.99, - 'BillAddress Province' => 999.99, + 'BillAddress Province' => 999.99, 'BillAddress PostalCode' => 999.99, 'BillAddress Country' => 999.99, 'BillAddress Note' => 6, @@ -322,7 +322,7 @@ protected function &_sinceVersionPaths() 'ShipAddress Addr5' => 6, 'ShipAddress City' => 999.99, 'ShipAddress State' => 999.99, - 'ShipAddress Province' => 999.99, + 'ShipAddress Province' => 999.99, 'ShipAddress PostalCode' => 999.99, 'ShipAddress Country' => 999.99, 'ShipAddress Note' => 6, @@ -369,13 +369,13 @@ protected function &_sinceVersionPaths() 'DeliveryMethod' => 3, 'PriceLevelRef ListID' => 999.99, 'PriceLevelRef FullName' => 999.99, - 'PreferredDeliveryMethod' => 12, + 'PreferredDeliveryMethod' => 12, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -398,7 +398,7 @@ protected function &_isRepeatablePaths() 'BillAddress Addr5' => false, 'BillAddress City' => false, 'BillAddress State' => false, - 'BillAddress Province' => false, + 'BillAddress Province' => false, 'BillAddress PostalCode' => false, 'BillAddress Country' => false, 'BillAddress Note' => false, @@ -409,7 +409,7 @@ protected function &_isRepeatablePaths() 'ShipAddress Addr5' => false, 'ShipAddress City' => false, 'ShipAddress State' => false, - 'ShipAddress Province' => false, + 'ShipAddress Province' => false, 'ShipAddress PostalCode' => false, 'ShipAddress Country' => false, 'ShipAddress Note' => false, @@ -458,22 +458,22 @@ protected function &_isRepeatablePaths() 'PriceLevelRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -496,7 +496,7 @@ protected function &_reorderPathsPaths() 'BillAddress Addr5', 'BillAddress City', 'BillAddress State', - 'BillAddress Province', + 'BillAddress Province', 'BillAddress PostalCode', 'BillAddress Country', 'BillAddress Note', @@ -507,7 +507,7 @@ protected function &_reorderPathsPaths() 'ShipAddress Addr5', 'ShipAddress City', 'ShipAddress State', - 'ShipAddress Province', + 'ShipAddress Province', 'ShipAddress PostalCode', 'ShipAddress Country', 'ShipAddress Note', @@ -557,7 +557,7 @@ protected function &_reorderPathsPaths() 'PreferredDeliveryMethod', 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CustomerMsgAddRq.php b/QuickBooks/QBXML/Schema/Object/CustomerMsgAddRq.php index fab226ad..b3b24652 100755 --- a/QuickBooks/QBXML/Schema/Object/CustomerMsgAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/CustomerMsgAddRq.php @@ -2,56 +2,56 @@ /** * Schema object for: CustomerMsgAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomerMsgAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( 'Name' => 'STRTYPE', 'IsActive' => 'BOOLTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( 'Name' => 101, 'IsActive' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -59,46 +59,46 @@ protected function &_isOptionalPaths() 'IsActive' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( 'Name' => 999.99, 'IsActive' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( 'Name' => false, 'IsActive' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( 'Name', 'IsActive', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CustomerMsgQueryRq.php b/QuickBooks/QBXML/Schema/Object/CustomerMsgQueryRq.php index 9f1b08cc..26be2521 100755 --- a/QuickBooks/QBXML/Schema/Object/CustomerMsgQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/CustomerMsgQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CustomerMsgQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomerMsgQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CustomerQueryRq.php b/QuickBooks/QBXML/Schema/Object/CustomerQueryRq.php index bd918f8d..1eb13a11 100755 --- a/QuickBooks/QBXML/Schema/Object/CustomerQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/CustomerQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CustomerQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomerQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -50,10 +50,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -72,10 +72,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -95,7 +95,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -114,10 +114,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -136,22 +136,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -170,7 +170,7 @@ protected function &_reorderPathsPaths() 12 => 'IncludeRetElement', 13 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CustomerTypeAddRq.php b/QuickBooks/QBXML/Schema/Object/CustomerTypeAddRq.php index 0245a89e..d604a459 100755 --- a/QuickBooks/QBXML/Schema/Object/CustomerTypeAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/CustomerTypeAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CustomerTypeAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomerTypeAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -41,10 +41,10 @@ protected function &_dataTypePaths() 'CustomerTypeAdd ParentRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -54,10 +54,10 @@ protected function &_maxLengthPaths() 'CustomerTypeAdd ParentRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -68,7 +68,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -78,10 +78,10 @@ protected function &_sinceVersionPaths() 'CustomerTypeAdd ParentRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -91,22 +91,22 @@ protected function &_isRepeatablePaths() 'CustomerTypeAdd ParentRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -116,7 +116,7 @@ protected function &_reorderPathsPaths() 3 => 'CustomerTypeAdd ParentRef FullName', 4 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/CustomerTypeQueryRq.php b/QuickBooks/QBXML/Schema/Object/CustomerTypeQueryRq.php index a8a71a1b..82255182 100755 --- a/QuickBooks/QBXML/Schema/Object/CustomerTypeQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/CustomerTypeQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CustomerTypeQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomerTypeQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DataExtAddRq.php b/QuickBooks/QBXML/Schema/Object/DataExtAddRq.php index 3a7d947b..a9eae3e8 100755 --- a/QuickBooks/QBXML/Schema/Object/DataExtAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/DataExtAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: DataExtAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DataExtAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'DataExtAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -46,10 +46,10 @@ protected function &_dataTypePaths() 'OtherDataExtType' => 'ENUMTYPE', 'DataExtValue' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -64,10 +64,10 @@ protected function &_maxLengthPaths() 'OtherDataExtType' => 0, 'DataExtValue' => 1024, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -83,7 +83,7 @@ protected function &_isOptionalPaths() 'DataExtValue' => false, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -98,10 +98,10 @@ protected function &_sinceVersionPaths() 'OtherDataExtType' => 999.99, 'DataExtValue' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -116,22 +116,22 @@ protected function &_isRepeatablePaths() 'OtherDataExtType' => false, 'DataExtValue' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -146,7 +146,7 @@ protected function &_reorderPathsPaths() 8 => 'OtherDataExtType', 9 => 'DataExtValue', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DataExtDefAddRq.php b/QuickBooks/QBXML/Schema/Object/DataExtDefAddRq.php index 1844329f..dd4d3b18 100755 --- a/QuickBooks/QBXML/Schema/Object/DataExtDefAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/DataExtDefAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: DataExtDefAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DataExtDefAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -41,10 +41,10 @@ protected function &_dataTypePaths() 'DataExtDefAdd AssignToObject' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -54,10 +54,10 @@ protected function &_maxLengthPaths() 'DataExtDefAdd AssignToObject' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -68,7 +68,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -78,10 +78,10 @@ protected function &_sinceVersionPaths() 'DataExtDefAdd AssignToObject' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -91,22 +91,22 @@ protected function &_isRepeatablePaths() 'DataExtDefAdd AssignToObject' => true, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -116,7 +116,7 @@ protected function &_reorderPathsPaths() 3 => 'DataExtDefAdd AssignToObject', 4 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DataExtDefDelRq.php b/QuickBooks/QBXML/Schema/Object/DataExtDefDelRq.php index a998a98a..65e3ea46 100755 --- a/QuickBooks/QBXML/Schema/Object/DataExtDefDelRq.php +++ b/QuickBooks/QBXML/Schema/Object/DataExtDefDelRq.php @@ -2,56 +2,56 @@ /** * Schema object for: DataExtDefDelRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DataExtDefDelRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( 'OwnerID' => 'GUIDTYPE', 'DataExtName' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( 'OwnerID' => 0, 'DataExtName' => 31, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -59,46 +59,46 @@ protected function &_isOptionalPaths() 'DataExtName' => false, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( 'OwnerID' => 999.99, 'DataExtName' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( 'OwnerID' => false, 'DataExtName' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( 0 => 'OwnerID', 1 => 'DataExtName', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DataExtDefModRq.php b/QuickBooks/QBXML/Schema/Object/DataExtDefModRq.php index 78b3a0de..96574163 100755 --- a/QuickBooks/QBXML/Schema/Object/DataExtDefModRq.php +++ b/QuickBooks/QBXML/Schema/Object/DataExtDefModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: DataExtDefModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DataExtDefModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -42,10 +42,10 @@ protected function &_dataTypePaths() 'DataExtDefMod RemoveFromObject' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -56,10 +56,10 @@ protected function &_maxLengthPaths() 'DataExtDefMod RemoveFromObject' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -71,7 +71,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -82,10 +82,10 @@ protected function &_sinceVersionPaths() 'DataExtDefMod RemoveFromObject' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -96,22 +96,22 @@ protected function &_isRepeatablePaths() 'DataExtDefMod RemoveFromObject' => true, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -122,7 +122,7 @@ protected function &_reorderPathsPaths() 4 => 'DataExtDefMod RemoveFromObject', 5 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DataExtDefQueryRq.php b/QuickBooks/QBXML/Schema/Object/DataExtDefQueryRq.php index 86f01702..622b84d3 100755 --- a/QuickBooks/QBXML/Schema/Object/DataExtDefQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/DataExtDefQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: DataExtDefQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DataExtDefQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -39,10 +39,10 @@ protected function &_dataTypePaths() 'AssignToObject' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -50,10 +50,10 @@ protected function &_maxLengthPaths() 'AssignToObject' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -62,7 +62,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -70,10 +70,10 @@ protected function &_sinceVersionPaths() 'AssignToObject' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -81,22 +81,22 @@ protected function &_isRepeatablePaths() 'AssignToObject' => true, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -104,7 +104,7 @@ protected function &_reorderPathsPaths() 1 => 'AssignToObject', 2 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DataExtDelRq.php b/QuickBooks/QBXML/Schema/Object/DataExtDelRq.php index 95998f1b..f8973436 100755 --- a/QuickBooks/QBXML/Schema/Object/DataExtDelRq.php +++ b/QuickBooks/QBXML/Schema/Object/DataExtDelRq.php @@ -2,36 +2,36 @@ /** * Schema object for: DataExtDelRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DataExtDelRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -45,10 +45,10 @@ protected function &_dataTypePaths() 'DataExtDel TxnLineID' => 'IDTYPE', 'DataExtDel OtherDataExtType' => 'ENUMTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -62,10 +62,10 @@ protected function &_maxLengthPaths() 'DataExtDel TxnLineID' => 0, 'DataExtDel OtherDataExtType' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -80,7 +80,7 @@ protected function &_isOptionalPaths() 'DataExtDel OtherDataExtType' => false, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_sinceVersionPaths() 'DataExtDel TxnLineID' => 3, 'DataExtDel OtherDataExtType' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -111,22 +111,22 @@ protected function &_isRepeatablePaths() 'DataExtDel TxnLineID' => false, 'DataExtDel OtherDataExtType' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -140,7 +140,7 @@ protected function &_reorderPathsPaths() 7 => 'DataExtDel TxnLineID', 8 => 'DataExtDel OtherDataExtType', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DataExtModRq.php b/QuickBooks/QBXML/Schema/Object/DataExtModRq.php index 6a68b7a5..ce05b485 100755 --- a/QuickBooks/QBXML/Schema/Object/DataExtModRq.php +++ b/QuickBooks/QBXML/Schema/Object/DataExtModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: DataExtModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DataExtModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'DataExtMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -46,10 +46,10 @@ protected function &_dataTypePaths() 'OtherDataExtType' => 'ENUMTYPE', 'DataExtValue' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -64,10 +64,10 @@ protected function &_maxLengthPaths() 'OtherDataExtType' => 0, 'DataExtValue' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -83,7 +83,7 @@ protected function &_isOptionalPaths() 'DataExtValue' => false, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -98,10 +98,10 @@ protected function &_sinceVersionPaths() 'OtherDataExtType' => 999.99, 'DataExtValue' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -116,22 +116,22 @@ protected function &_isRepeatablePaths() 'OtherDataExtType' => false, 'DataExtValue' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -146,7 +146,7 @@ protected function &_reorderPathsPaths() 8 => 'OtherDataExtType', 9 => 'DataExtValue', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DepartmentAddRq.php b/QuickBooks/QBXML/Schema/Object/DepartmentAddRq.php index 9d6f2972..31bf7e2f 100644 --- a/QuickBooks/QBXML/Schema/Object/DepartmentAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/DepartmentAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: DepartmentAddRq - * + * * @author Thomas Rientjes * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DepartmentAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'DepartmentAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -41,10 +41,10 @@ protected function &_dataTypePaths() 'ParentRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -54,10 +54,10 @@ protected function &_maxLengthPaths() 'ParentRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -70,7 +70,7 @@ protected function &_isOptionalPaths() return $paths; } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -80,10 +80,10 @@ protected function &_sinceVersionPaths() 'ParentRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -93,7 +93,7 @@ protected function &_isRepeatablePaths() 'ParentRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } @@ -106,7 +106,7 @@ protected function &_reorderPathsPaths() 3 => 'ParentRef FullName', 4 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DepartmentQueryRq.php b/QuickBooks/QBXML/Schema/Object/DepartmentQueryRq.php index 8b7b9da5..1201ee6f 100644 --- a/QuickBooks/QBXML/Schema/Object/DepartmentQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/DepartmentQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: DepartmentQueryRq - * + * * @author Thomas Rientjes * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DepartmentQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -88,7 +88,7 @@ protected function &_isOptionalPaths() return $paths; } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -104,10 +104,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -123,7 +123,7 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } @@ -142,7 +142,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DepositAddRq.php b/QuickBooks/QBXML/Schema/Object/DepositAddRq.php index 52448078..c7c4b8f7 100755 --- a/QuickBooks/QBXML/Schema/Object/DepositAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/DepositAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: DepositAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DepositAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'DepositAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -58,10 +58,10 @@ protected function &_dataTypePaths() 'DepositLineAdd Amount' => 'AMTTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -88,10 +88,10 @@ protected function &_maxLengthPaths() 'DepositLineAdd Amount' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -119,7 +119,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -146,10 +146,10 @@ protected function &_sinceVersionPaths() 'DepositLineAdd Amount' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -176,22 +176,22 @@ protected function &_isRepeatablePaths() 'DepositLineAdd Amount' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -205,7 +205,7 @@ protected function &_reorderPathsPaths() 'CashBackInfoAdd AccountRef FullName', 'CashBackInfoAdd Memo', 'CashBackInfoAdd Amount', - 'DepositLineAdd', + 'DepositLineAdd', 'DepositLineAdd PaymentTxnID', 'DepositLineAdd PaymentTxnLineID', @@ -213,7 +213,7 @@ protected function &_reorderPathsPaths() 'DepositLineAdd OverrideCheckNumber', 'DepositLineAdd ClassRef ListID', 'DepositLineAdd ClassRef FullName', - + 'DepositLineAdd EntityRef ListID', 'DepositLineAdd EntityRef FullName', 'DepositLineAdd AccountRef ListID', @@ -227,7 +227,7 @@ protected function &_reorderPathsPaths() 'DepositLineAdd Amount', 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DepositModRq.php b/QuickBooks/QBXML/Schema/Object/DepositModRq.php index 82f74e84..502b6a6f 100755 --- a/QuickBooks/QBXML/Schema/Object/DepositModRq.php +++ b/QuickBooks/QBXML/Schema/Object/DepositModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: DepositModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DepositModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'DepositMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -61,10 +61,10 @@ protected function &_dataTypePaths() 'DepositLineMod Amount' => 'AMTTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_maxLengthPaths() 'DepositLineMod Amount' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -128,7 +128,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -158,10 +158,10 @@ protected function &_sinceVersionPaths() 'DepositLineMod Amount' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -191,22 +191,22 @@ protected function &_isRepeatablePaths() 'DepositLineMod Amount' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -238,7 +238,7 @@ protected function &_reorderPathsPaths() 'DepositLineMod Amount', 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/DepositQueryRq.php b/QuickBooks/QBXML/Schema/Object/DepositQueryRq.php index 427b4854..856bba56 100755 --- a/QuickBooks/QBXML/Schema/Object/DepositQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/DepositQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: DepositQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_DepositQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -54,10 +54,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -80,10 +80,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -107,7 +107,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -130,10 +130,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -156,22 +156,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -194,7 +194,7 @@ protected function &_reorderPathsPaths() 16 => 'IncludeRetElement', 17 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/EmployeeAddRq.php b/QuickBooks/QBXML/Schema/Object/EmployeeAddRq.php index cb9f6483..d34bc9bc 100755 --- a/QuickBooks/QBXML/Schema/Object/EmployeeAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/EmployeeAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: EmployeeAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_EmployeeAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'EmployeeAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -92,10 +92,10 @@ protected function &_dataTypePaths() 'EmployeePayrollInfo VacationHours AccrualStartDate' => 'DATETYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -156,10 +156,10 @@ protected function &_maxLengthPaths() 'EmployeePayrollInfo VacationHours AccrualStartDate' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -221,7 +221,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -282,10 +282,10 @@ protected function &_sinceVersionPaths() 'EmployeePayrollInfo VacationHours AccrualStartDate' => 5, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -346,22 +346,22 @@ protected function &_isRepeatablePaths() 'EmployeePayrollInfo VacationHours AccrualStartDate' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -425,7 +425,7 @@ protected function &_reorderPathsPaths() 57 => 'EmployeePayrollInfo VacationHours AccrualStartDate', 58 => 'IncludeRetElement' ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/EmployeeModRq.php b/QuickBooks/QBXML/Schema/Object/EmployeeModRq.php index 57c69bf9..7e169e40 100755 --- a/QuickBooks/QBXML/Schema/Object/EmployeeModRq.php +++ b/QuickBooks/QBXML/Schema/Object/EmployeeModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: EmployeeModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_EmployeeModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'EmployeeMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -89,10 +89,10 @@ protected function &_dataTypePaths() 'EmployeePayrollInfoMod VacationHours AccrualStartDate' => 'DATETYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -150,10 +150,10 @@ protected function &_maxLengthPaths() 'EmployeePayrollInfoMod VacationHours AccrualStartDate' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -212,7 +212,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -270,10 +270,10 @@ protected function &_sinceVersionPaths() 'EmployeePayrollInfoMod VacationHours AccrualStartDate' => 5, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -331,22 +331,22 @@ protected function &_isRepeatablePaths() 'EmployeePayrollInfoMod VacationHours AccrualStartDate' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -407,7 +407,7 @@ protected function &_reorderPathsPaths() 54 => 'EmployeePayrollInfoMod VacationHours AccrualStartDate', 55 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/EmployeeQueryRq.php b/QuickBooks/QBXML/Schema/Object/EmployeeQueryRq.php index cd3c5a36..c1247640 100755 --- a/QuickBooks/QBXML/Schema/Object/EmployeeQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/EmployeeQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: EmployeeQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_EmployeeQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/EstimateAddRq.php b/QuickBooks/QBXML/Schema/Object/EstimateAddRq.php index 220393bd..00e80bcf 100755 --- a/QuickBooks/QBXML/Schema/Object/EstimateAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/EstimateAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: EstimateAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_EstimateAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'EstimateAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -50,7 +50,7 @@ protected function &_dataTypePaths() 'BillAddress Addr5' => 'STRTYPE', 'BillAddress City' => 'STRTYPE', 'BillAddress State' => 'STRTYPE', - 'BillAddress Province' => 'STRTYPE', + 'BillAddress Province' => 'STRTYPE', 'BillAddress PostalCode' => 'STRTYPE', 'BillAddress Country' => 'STRTYPE', 'BillAddress Note' => 'STRTYPE', @@ -61,7 +61,7 @@ protected function &_dataTypePaths() 'ShipAddress Addr5' => 'STRTYPE', 'ShipAddress City' => 'STRTYPE', 'ShipAddress State' => 'STRTYPE', - 'ShipAddress Province' => 'STRTYPE', + 'ShipAddress Province' => 'STRTYPE', 'ShipAddress PostalCode' => 'STRTYPE', 'ShipAddress Country' => 'STRTYPE', 'ShipAddress Note' => 'STRTYPE', @@ -93,8 +93,8 @@ protected function &_dataTypePaths() 'EstimateLineAdd ClassRef ListID' => 'IDTYPE', 'EstimateLineAdd ClassRef FullName' => 'STRTYPE', 'EstimateLineAdd Amount' => 'AMTTYPE', - 'EstimateLineAdd InventorySiteRef ListID' => 'IDTYPE', - 'EstimateLineAdd InventorySiteRef FullName' => 'STRTYPE', + 'EstimateLineAdd InventorySiteRef ListID' => 'IDTYPE', + 'EstimateLineAdd InventorySiteRef FullName' => 'STRTYPE', 'EstimateLineAdd SalesTaxCodeRef ListID' => 'IDTYPE', 'EstimateLineAdd SalesTaxCodeRef FullName' => 'STRTYPE', 'EstimateLineAdd MarkupRate' => 'PRICETYPE', @@ -118,10 +118,10 @@ protected function &_dataTypePaths() 'EstimateLineGroupAdd DataExt DataExtValue' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -140,7 +140,7 @@ protected function &_maxLengthPaths() 'BillAddress Addr5' => 41, 'BillAddress City' => 31, 'BillAddress State' => 21, - 'BillAddress Province' => 21, + 'BillAddress Province' => 21, 'BillAddress PostalCode' => 13, 'BillAddress Country' => 31, 'BillAddress Note' => 41, @@ -151,7 +151,7 @@ protected function &_maxLengthPaths() 'ShipAddress Addr5' => 41, 'ShipAddress City' => 31, 'ShipAddress State' => 21, - 'ShipAddress Province' => 21, + 'ShipAddress Province' => 21, 'ShipAddress PostalCode' => 13, 'ShipAddress Country' => 31, 'ShipAddress Note' => 41, @@ -208,10 +208,10 @@ protected function &_maxLengthPaths() 'EstimateLineGroupAdd DataExt DataExtValue' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -230,7 +230,7 @@ protected function &_isOptionalPaths() 'BillAddress Addr5' => true, 'BillAddress City' => true, 'BillAddress State' => true, - 'BillAddress Province' => true, + 'BillAddress Province' => true, 'BillAddress PostalCode' => true, 'BillAddress Country' => true, 'BillAddress Note' => true, @@ -241,7 +241,7 @@ protected function &_isOptionalPaths() 'ShipAddress Addr5' => true, 'ShipAddress City' => true, 'ShipAddress State' => true, - 'ShipAddress Province' => true, + 'ShipAddress Province' => true, 'ShipAddress PostalCode' => true, 'ShipAddress Country' => true, 'ShipAddress Note' => true, @@ -299,7 +299,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -318,7 +318,7 @@ protected function &_sinceVersionPaths() 'BillAddress Addr5' => 6, 'BillAddress City' => 999.99, 'BillAddress State' => 999.99, - 'BillAddress Province' => 999.99, + 'BillAddress Province' => 999.99, 'BillAddress PostalCode' => 999.99, 'BillAddress Country' => 999.99, 'BillAddress Note' => 6, @@ -329,7 +329,7 @@ protected function &_sinceVersionPaths() 'ShipAddress Addr5' => 6, 'ShipAddress City' => 999.99, 'ShipAddress State' => 999.99, - 'ShipAddress Province' => 999.99, + 'ShipAddress Province' => 999.99, 'ShipAddress PostalCode' => 999.99, 'ShipAddress Country' => 999.99, 'ShipAddress Note' => 6, @@ -386,10 +386,10 @@ protected function &_sinceVersionPaths() 'EstimateLineGroupAdd DataExt DataExtValue' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -408,7 +408,7 @@ protected function &_isRepeatablePaths() 'BillAddress Addr5' => false, 'BillAddress City' => false, 'BillAddress State' => false, - 'BillAddress Province' => false, + 'BillAddress Province' => false, 'BillAddress PostalCode' => false, 'BillAddress Country' => false, 'BillAddress Note' => false, @@ -419,7 +419,7 @@ protected function &_isRepeatablePaths() 'ShipAddress Addr5' => false, 'ShipAddress City' => false, 'ShipAddress State' => false, - 'ShipAddress Province' => false, + 'ShipAddress Province' => false, 'ShipAddress PostalCode' => false, 'ShipAddress Country' => false, 'ShipAddress Note' => false, @@ -476,22 +476,22 @@ protected function &_isRepeatablePaths() 'EstimateLineGroupAdd DataExt DataExtValue' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -510,7 +510,7 @@ protected function &_reorderPathsPaths() 'BillAddress Addr5', 'BillAddress City', 'BillAddress State', - 'BillAddress Province', + 'BillAddress Province', 'BillAddress PostalCode', 'BillAddress Country', 'BillAddress Note', @@ -521,7 +521,7 @@ protected function &_reorderPathsPaths() 'ShipAddress Addr5', 'ShipAddress City', 'ShipAddress State', - 'ShipAddress Province', + 'ShipAddress Province', 'ShipAddress PostalCode', 'ShipAddress Country', 'ShipAddress Note', @@ -570,7 +570,7 @@ protected function &_reorderPathsPaths() 'EstimateLineAdd DataExt OwnerID', 'EstimateLineAdd DataExt DataExtName', 'EstimateLineAdd DataExt DataExtValue', - 'EstimateLineGroupAdd', + 'EstimateLineGroupAdd', 'EstimateLineGroupAdd ItemGroupRef ListID', 'EstimateLineGroupAdd ItemGroupRef FullName', 'EstimateLineGroupAdd Desc', @@ -581,7 +581,7 @@ protected function &_reorderPathsPaths() 'EstimateLineGroupAdd DataExt DataExtValue', 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/EstimateModRq.php b/QuickBooks/QBXML/Schema/Object/EstimateModRq.php index 6b5345ed..20c61140 100755 --- a/QuickBooks/QBXML/Schema/Object/EstimateModRq.php +++ b/QuickBooks/QBXML/Schema/Object/EstimateModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: EstimateModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_EstimateModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'EstimateMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -55,7 +55,7 @@ protected function &_dataTypePaths() 'BillAddress PostalCode' => 'STRTYPE', 'BillAddress Country' => 'STRTYPE', 'BillAddress Note' => 'STRTYPE', - 'ShipAddress Addr1' => 'STRTYPE', // This OSR says this is supported, but it's actually not... + 'ShipAddress Addr1' => 'STRTYPE', // This OSR says this is supported, but it's actually not... 'ShipAddress Addr2' => 'STRTYPE', 'ShipAddress Addr3' => 'STRTYPE', 'ShipAddress Addr4' => 'STRTYPE', @@ -137,10 +137,10 @@ protected function &_dataTypePaths() 'EstimateLineGroupMod EstimateLineMod Other2' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -246,10 +246,10 @@ protected function &_maxLengthPaths() 'EstimateLineGroupMod EstimateLineMod Other2' => 29, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -356,7 +356,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -462,10 +462,10 @@ protected function &_sinceVersionPaths() 'EstimateLineGroupMod EstimateLineMod Other2' => 6, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -571,22 +571,22 @@ protected function &_isRepeatablePaths() 'EstimateLineGroupMod EstimateLineMod Other2' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -639,7 +639,7 @@ protected function &_reorderPathsPaths() 'CustomerSalesTaxCodeRef ListID', 'CustomerSalesTaxCodeRef FullName', 'Other', - 'EstimateLineMod', + 'EstimateLineMod', 'EstimateLineMod TxnLineID', 'EstimateLineMod ItemRef ListID', 'EstimateLineMod ItemRef FullName', @@ -663,7 +663,7 @@ protected function &_reorderPathsPaths() 'EstimateLineMod PriceLevelRef FullName', 'EstimateLineMod Other1', 'EstimateLineMod Other2', - 'EstimateLineGroupMod', + 'EstimateLineGroupMod', 'EstimateLineGroupMod TxnLineID', 'EstimateLineGroupMod ItemGroupRef ListID', 'EstimateLineGroupMod ItemGroupRef FullName', @@ -694,7 +694,7 @@ protected function &_reorderPathsPaths() 'EstimateLineGroupMod EstimateLineMod Other2', 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/EstimateQueryRq.php b/QuickBooks/QBXML/Schema/Object/EstimateQueryRq.php index 2188682c..42503c96 100755 --- a/QuickBooks/QBXML/Schema/Object/EstimateQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/EstimateQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: EstimateQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_EstimateQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -61,10 +61,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -128,7 +128,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -158,10 +158,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -191,22 +191,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -236,7 +236,7 @@ protected function &_reorderPathsPaths() 23 => 'IncludeRetElement', 24 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/HostQueryRq.php b/QuickBooks/QBXML/Schema/Object/HostQueryRq.php index f009f423..8e1f1c38 100755 --- a/QuickBooks/QBXML/Schema/Object/HostQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/HostQueryRq.php @@ -2,56 +2,56 @@ /** * Schema object for: HostQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ //require_once 'QuickBooks.php'; /** - * + * */ //require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_HostQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( 'IncludeListMetaData IncludeMaxCapacity' => 'BOOLTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( 'IncludeListMetaData IncludeMaxCapacity' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -59,46 +59,46 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( 'IncludeListMetaData IncludeMaxCapacity' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( 'IncludeListMetaData IncludeMaxCapacity' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( 0 => 'IncludeListMetaData IncludeMaxCapacity', 1 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/InventoryAdjustmentAddRq.php b/QuickBooks/QBXML/Schema/Object/InventoryAdjustmentAddRq.php index 5cd04876..4766a0dc 100755 --- a/QuickBooks/QBXML/Schema/Object/InventoryAdjustmentAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/InventoryAdjustmentAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: InventoryAdjustmentAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_InventoryAdjustmentAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'InventoryAdjustmentAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -52,10 +52,10 @@ protected function &_dataTypePaths() 'InventoryAdjustmentLineAdd ValueAdjustment NewValue' => 'AMTTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -76,10 +76,10 @@ protected function &_maxLengthPaths() 'InventoryAdjustmentLineAdd ValueAdjustment NewValue' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -101,7 +101,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -122,10 +122,10 @@ protected function &_sinceVersionPaths() 'InventoryAdjustmentLineAdd ValueAdjustment NewValue' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -146,22 +146,22 @@ protected function &_isRepeatablePaths() 'InventoryAdjustmentLineAdd ValueAdjustment NewValue' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -187,7 +187,7 @@ protected function &_reorderPathsPaths() 19 => 'InventoryAdjustmentLineAdd ValueAdjustment NewValue', 20 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/InventoryAdjustmentQueryRq.php b/QuickBooks/QBXML/Schema/Object/InventoryAdjustmentQueryRq.php index 2dcb2947..18f33d5f 100755 --- a/QuickBooks/QBXML/Schema/Object/InventoryAdjustmentQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/InventoryAdjustmentQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: InventoryAdjustmentQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_InventoryAdjustmentQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -64,10 +64,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -100,10 +100,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -137,7 +137,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -170,10 +170,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -206,22 +206,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -254,7 +254,7 @@ protected function &_reorderPathsPaths() 26 => 'IncludeRetElement', 27 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/InvoiceAddRq.php b/QuickBooks/QBXML/Schema/Object/InvoiceAddRq.php index b62da95b..0641f740 100755 --- a/QuickBooks/QBXML/Schema/Object/InvoiceAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/InvoiceAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: InvoiceAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_InvoiceAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'InvoiceAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -52,8 +52,8 @@ protected function &_dataTypePaths() 'BillAddress Addr5' => 'STRTYPE', 'BillAddress City' => 'STRTYPE', 'BillAddress State' => 'STRTYPE', - 'BillAddress County' => 'STRTYPE', - 'BillAddress Province' => 'STRTYPE', + 'BillAddress County' => 'STRTYPE', + 'BillAddress Province' => 'STRTYPE', 'BillAddress PostalCode' => 'STRTYPE', 'BillAddress Country' => 'STRTYPE', 'BillAddress Note' => 'STRTYPE', @@ -64,8 +64,8 @@ protected function &_dataTypePaths() 'ShipAddress Addr5' => 'STRTYPE', 'ShipAddress City' => 'STRTYPE', 'ShipAddress State' => 'STRTYPE', - 'ShipAddress County' => 'STRTYPE', - 'ShipAddress Province' => 'STRTYPE', + 'ShipAddress County' => 'STRTYPE', + 'ShipAddress Province' => 'STRTYPE', 'ShipAddress PostalCode' => 'STRTYPE', 'ShipAddress Country' => 'STRTYPE', 'ShipAddress Note' => 'STRTYPE', @@ -104,8 +104,8 @@ protected function &_dataTypePaths() 'InvoiceLineAdd ClassRef ListID' => 'IDTYPE', 'InvoiceLineAdd ClassRef FullName' => 'STRTYPE', 'InvoiceLineAdd Amount' => 'AMTTYPE', - 'InvoiceLineAdd InventorySiteRef ListID' => 'IDTYPE', - 'InvoiceLineAdd InventorySiteRef FullName' => 'STRTYPE', + 'InvoiceLineAdd InventorySiteRef ListID' => 'IDTYPE', + 'InvoiceLineAdd InventorySiteRef FullName' => 'STRTYPE', 'InvoiceLineAdd ServiceDate' => 'DATETYPE', 'InvoiceLineAdd SalesTaxCodeRef ListID' => 'IDTYPE', 'InvoiceLineAdd SalesTaxCodeRef FullName' => 'STRTYPE', @@ -142,10 +142,10 @@ protected function &_dataTypePaths() 'ShippingLineAdd AccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -166,8 +166,8 @@ protected function &_maxLengthPaths() 'BillAddress Addr5' => 41, 'BillAddress City' => 31, 'BillAddress State' => 21, - 'BillAddress County' => 21, - 'BillAddress Province' => 21, + 'BillAddress County' => 21, + 'BillAddress Province' => 21, 'BillAddress PostalCode' => 13, 'BillAddress Country' => 31, 'BillAddress Note' => 41, @@ -178,8 +178,8 @@ protected function &_maxLengthPaths() 'ShipAddress Addr5' => 41, 'ShipAddress City' => 31, 'ShipAddress State' => 21, - 'ShipAddress County' => 21, - 'ShipAddress Province' => 21, + 'ShipAddress County' => 21, + 'ShipAddress Province' => 21, 'ShipAddress PostalCode' => 13, 'ShipAddress Country' => 31, 'ShipAddress Note' => 41, @@ -256,10 +256,10 @@ protected function &_maxLengthPaths() 'ShippingLineAdd AccountRef FullName' => 209, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -280,8 +280,8 @@ protected function &_isOptionalPaths() 'BillAddress Addr5' => true, 'BillAddress City' => true, 'BillAddress State' => true, - 'BillAddress County' => true, - 'BillAddress Province' => true, + 'BillAddress County' => true, + 'BillAddress Province' => true, 'BillAddress PostalCode' => true, 'BillAddress Country' => true, 'BillAddress Note' => true, @@ -293,7 +293,7 @@ protected function &_isOptionalPaths() 'ShipAddress City' => true, 'ShipAddress State' => true, 'ShipAddress County' => true, - 'ShipAddress Province' => true, + 'ShipAddress Province' => true, 'ShipAddress PostalCode' => true, 'ShipAddress Country' => true, 'ShipAddress Note' => true, @@ -371,7 +371,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -392,8 +392,8 @@ protected function &_sinceVersionPaths() 'BillAddress Addr5' => 6, 'BillAddress City' => 999.99, 'BillAddress State' => 999.99, - 'BillAddress County' => 999.99, - 'BillAddress Province' => 999.99, + 'BillAddress County' => 999.99, + 'BillAddress Province' => 999.99, 'BillAddress PostalCode' => 999.99, 'BillAddress Country' => 999.99, 'BillAddress Note' => 6, @@ -405,7 +405,7 @@ protected function &_sinceVersionPaths() 'ShipAddress City' => 999.99, 'ShipAddress State' => 999.99, 'ShipAddress County' => 999.99, - 'ShipAddress Province' => 999.99, + 'ShipAddress Province' => 999.99, 'ShipAddress PostalCode' => 999.99, 'ShipAddress Country' => 999.99, 'ShipAddress Note' => 6, @@ -482,10 +482,10 @@ protected function &_sinceVersionPaths() 'ShippingLineAdd AccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -506,8 +506,8 @@ protected function &_isRepeatablePaths() 'BillAddress Addr5' => false, 'BillAddress City' => false, 'BillAddress State' => false, - 'BillAddress County' => false, - 'BillAddress Province' => false, + 'BillAddress County' => false, + 'BillAddress Province' => false, 'BillAddress PostalCode' => false, 'BillAddress Country' => false, 'BillAddress Note' => false, @@ -518,8 +518,8 @@ protected function &_isRepeatablePaths() 'ShipAddress Addr5' => false, 'ShipAddress City' => false, 'ShipAddress State' => false, - 'ShipAddress County' => false, - 'ShipAddress Province' => false, + 'ShipAddress County' => false, + 'ShipAddress Province' => false, 'ShipAddress PostalCode' => false, 'ShipAddress Country' => false, 'ShipAddress Note' => false, @@ -596,7 +596,7 @@ protected function &_isRepeatablePaths() 'ShippingLineAdd AccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } @@ -604,144 +604,144 @@ protected function &_isRepeatablePaths() protected function &_inLocalePaths() { static $paths = array( - 'SalesTaxLineAdd Amount' => array( 'QBUS' ), - 'ItemSalesTaxRef FullName' => array( 'QBOE' ), - 'InvoiceLineAdd SalesTaxCodeRef FullName' => array( 'QBOE' ), + 'SalesTaxLineAdd Amount' => array( 'QBUS' ), + 'ItemSalesTaxRef FullName' => array( 'QBOE' ), + 'InvoiceLineAdd SalesTaxCodeRef FullName' => array( 'QBOE' ), ); - + return $paths; } */ - + protected function &_inLocalePaths() { static $paths = array( - 'SalesTaxLineAdd Amount' => array( 'QBUS' ), - 'ItemSalesTaxRef FullName' => array( 'QBOE' ), - 'InvoiceLineAdd SalesTaxCodeRef FullName' => array( 'QBOE' ), + 'SalesTaxLineAdd Amount' => array( 'QBUS' ), + 'ItemSalesTaxRef FullName' => array( 'QBOE' ), + 'InvoiceLineAdd SalesTaxCodeRef FullName' => array( 'QBOE' ), ); - + return $paths; } - + protected function &_reorderPathsPaths() { static $paths = array ( - 'CustomerRef ListID', - 'CustomerRef FullName', - 'ClassRef ListID', - 'ClassRef FullName', - 'ARAccountRef ListID', - 'ARAccountRef FullName', - 'TemplateRef ListID', - 'TemplateRef FullName', - 'TxnDate', - 'RefNumber', - 'BillAddress Addr1', - 'BillAddress Addr2', - 'BillAddress Addr3', - 'BillAddress Addr4', - 'BillAddress Addr5', - 'BillAddress City', - 'BillAddress State', - 'BillAddress County', - 'BillAddress Province', - 'BillAddress PostalCode', - 'BillAddress Country', - 'BillAddress Note', - 'ShipAddress Addr1', - 'ShipAddress Addr2', - 'ShipAddress Addr3', - 'ShipAddress Addr4', - 'ShipAddress Addr5', - 'ShipAddress City', - 'ShipAddress State', - 'ShipAddress County', - 'ShipAddress Province', - 'ShipAddress PostalCode', - 'ShipAddress Country', - 'ShipAddress Note', - 'IsPending', - 'PONumber', - 'TermsRef ListID', - 'TermsRef FullName', - 'DueDate', - 'SalesRepRef ListID', - 'SalesRepRef FullName', - 'FOB', - 'ShipDate', - 'ShipMethodRef ListID', - 'ShipMethodRef FullName', - 'ItemSalesTaxRef ListID', - 'ItemSalesTaxRef FullName', - 'Memo', - 'CustomerMsgRef ListID', - 'CustomerMsgRef FullName', - 'IsToBePrinted', - 'IsToBeEmailed', - 'IsTaxIncluded', - 'CustomerSalesTaxCodeRef ListID', - 'CustomerSalesTaxCodeRef FullName', - 'Other', - 'LinkToTxnID', - 'InvoiceLineAdd', - 'InvoiceLineAdd ItemRef', - 'InvoiceLineAdd ItemRef ListID', - 'InvoiceLineAdd ItemRef FullName', - 'InvoiceLineAdd Desc', - 'InvoiceLineAdd Quantity', - 'InvoiceLineAdd UnitOfMeasure', - 'InvoiceLineAdd Rate', - 'InvoiceLineAdd RatePercent', - 'InvoiceLineAdd PriceLevelRef ListID', - 'InvoiceLineAdd PriceLevelRef FullName', - 'InvoiceLineAdd ClassRef ListID', - 'InvoiceLineAdd ClassRef FullName', - 'InvoiceLineAdd Amount', - 'InvoiceLineAdd InventorySiteRef ListID', - 'InvoiceLineAdd InventorySiteRef FullName', - 'InvoiceLineAdd ServiceDate', - 'InvoiceLineAdd SalesTaxCodeRef ListID', - 'InvoiceLineAdd SalesTaxCodeRef FullName', - 'InvoiceLineAdd IsTaxable', - 'InvoiceLineAdd OverrideItemAccountRef ListID', - 'InvoiceLineAdd OverrideItemAccountRef FullName', - 'InvoiceLineAdd Other1', - 'InvoiceLineAdd Other2', - 'InvoiceLineAdd LinkToTxn TxnID', - 'InvoiceLineAdd LinkToTxn TxnLineID', - 'InvoiceLineAdd DataExt', - 'InvoiceLineAdd DataExt OwnerID', - 'InvoiceLineAdd DataExt DataExtName', - 'InvoiceLineAdd DataExt DataExtValue', - 'InvoiceLineGroupAdd', - 'InvoiceLineGroupAdd ItemGroupRef ListID', - 'InvoiceLineGroupAdd ItemGroupRef FullName', - 'InvoiceLineGroupAdd Desc', - 'InvoiceLineGroupAdd Quantity', - 'InvoiceLineGroupAdd UnitOfMeasure', - 'InvoiceLineGroupAdd ServiceDate', - 'InvoiceLineGroupAdd DataExt OwnerID', - 'InvoiceLineGroupAdd DataExt DataExtName', - 'InvoiceLineGroupAdd DataExt DataExtValue', - 'DiscountLineAdd', - 'DiscountLineAdd Amount', - 'DiscountLineAdd RatePercent', - 'DiscountLineAdd IsTaxable', - 'DiscountLineAdd AccountRef ListID', - 'DiscountLineAdd AccountRef FullName', - 'SalesTaxLineAdd', - 'SalesTaxLineAdd Amount', - 'SalesTaxLineAdd RatePercent', - 'SalesTaxLineAdd AccountRef ListID', - 'SalesTaxLineAdd AccountRef FullName', - 'ShippingLineAdd', - 'ShippingLineAdd Amount', - 'ShippingLineAdd AccountRef ListID', - 'ShippingLineAdd AccountRef FullName', - 'IncludeRetElement', + 'CustomerRef ListID', + 'CustomerRef FullName', + 'ClassRef ListID', + 'ClassRef FullName', + 'ARAccountRef ListID', + 'ARAccountRef FullName', + 'TemplateRef ListID', + 'TemplateRef FullName', + 'TxnDate', + 'RefNumber', + 'BillAddress Addr1', + 'BillAddress Addr2', + 'BillAddress Addr3', + 'BillAddress Addr4', + 'BillAddress Addr5', + 'BillAddress City', + 'BillAddress State', + 'BillAddress County', + 'BillAddress Province', + 'BillAddress PostalCode', + 'BillAddress Country', + 'BillAddress Note', + 'ShipAddress Addr1', + 'ShipAddress Addr2', + 'ShipAddress Addr3', + 'ShipAddress Addr4', + 'ShipAddress Addr5', + 'ShipAddress City', + 'ShipAddress State', + 'ShipAddress County', + 'ShipAddress Province', + 'ShipAddress PostalCode', + 'ShipAddress Country', + 'ShipAddress Note', + 'IsPending', + 'PONumber', + 'TermsRef ListID', + 'TermsRef FullName', + 'DueDate', + 'SalesRepRef ListID', + 'SalesRepRef FullName', + 'FOB', + 'ShipDate', + 'ShipMethodRef ListID', + 'ShipMethodRef FullName', + 'ItemSalesTaxRef ListID', + 'ItemSalesTaxRef FullName', + 'Memo', + 'CustomerMsgRef ListID', + 'CustomerMsgRef FullName', + 'IsToBePrinted', + 'IsToBeEmailed', + 'IsTaxIncluded', + 'CustomerSalesTaxCodeRef ListID', + 'CustomerSalesTaxCodeRef FullName', + 'Other', + 'LinkToTxnID', + 'InvoiceLineAdd', + 'InvoiceLineAdd ItemRef', + 'InvoiceLineAdd ItemRef ListID', + 'InvoiceLineAdd ItemRef FullName', + 'InvoiceLineAdd Desc', + 'InvoiceLineAdd Quantity', + 'InvoiceLineAdd UnitOfMeasure', + 'InvoiceLineAdd Rate', + 'InvoiceLineAdd RatePercent', + 'InvoiceLineAdd PriceLevelRef ListID', + 'InvoiceLineAdd PriceLevelRef FullName', + 'InvoiceLineAdd ClassRef ListID', + 'InvoiceLineAdd ClassRef FullName', + 'InvoiceLineAdd Amount', + 'InvoiceLineAdd InventorySiteRef ListID', + 'InvoiceLineAdd InventorySiteRef FullName', + 'InvoiceLineAdd ServiceDate', + 'InvoiceLineAdd SalesTaxCodeRef ListID', + 'InvoiceLineAdd SalesTaxCodeRef FullName', + 'InvoiceLineAdd IsTaxable', + 'InvoiceLineAdd OverrideItemAccountRef ListID', + 'InvoiceLineAdd OverrideItemAccountRef FullName', + 'InvoiceLineAdd Other1', + 'InvoiceLineAdd Other2', + 'InvoiceLineAdd LinkToTxn TxnID', + 'InvoiceLineAdd LinkToTxn TxnLineID', + 'InvoiceLineAdd DataExt', + 'InvoiceLineAdd DataExt OwnerID', + 'InvoiceLineAdd DataExt DataExtName', + 'InvoiceLineAdd DataExt DataExtValue', + 'InvoiceLineGroupAdd', + 'InvoiceLineGroupAdd ItemGroupRef ListID', + 'InvoiceLineGroupAdd ItemGroupRef FullName', + 'InvoiceLineGroupAdd Desc', + 'InvoiceLineGroupAdd Quantity', + 'InvoiceLineGroupAdd UnitOfMeasure', + 'InvoiceLineGroupAdd ServiceDate', + 'InvoiceLineGroupAdd DataExt OwnerID', + 'InvoiceLineGroupAdd DataExt DataExtName', + 'InvoiceLineGroupAdd DataExt DataExtValue', + 'DiscountLineAdd', + 'DiscountLineAdd Amount', + 'DiscountLineAdd RatePercent', + 'DiscountLineAdd IsTaxable', + 'DiscountLineAdd AccountRef ListID', + 'DiscountLineAdd AccountRef FullName', + 'SalesTaxLineAdd', + 'SalesTaxLineAdd Amount', + 'SalesTaxLineAdd RatePercent', + 'SalesTaxLineAdd AccountRef ListID', + 'SalesTaxLineAdd AccountRef FullName', + 'ShippingLineAdd', + 'ShippingLineAdd Amount', + 'ShippingLineAdd AccountRef ListID', + 'ShippingLineAdd AccountRef FullName', + 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/InvoiceModRq.php b/QuickBooks/QBXML/Schema/Object/InvoiceModRq.php index c53c5bcb..b94f421b 100755 --- a/QuickBooks/QBXML/Schema/Object/InvoiceModRq.php +++ b/QuickBooks/QBXML/Schema/Object/InvoiceModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: InvoiceModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_InvoiceModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'InvoiceMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -144,10 +144,10 @@ protected function &_dataTypePaths() 'InvoiceLineGroupMod InvoiceLineMod Other2' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -260,10 +260,10 @@ protected function &_maxLengthPaths() 'InvoiceLineGroupMod InvoiceLineMod Other2' => 29, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -377,7 +377,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -490,10 +490,10 @@ protected function &_sinceVersionPaths() 'InvoiceLineGroupMod InvoiceLineMod Other2' => 6, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -606,22 +606,22 @@ protected function &_isRepeatablePaths() 'InvoiceLineGroupMod InvoiceLineMod Other2' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -679,7 +679,7 @@ protected function &_reorderPathsPaths() 'CustomerSalesTaxCodeRef ListID', 'CustomerSalesTaxCodeRef FullName', 'Other', - 'InvoiceLineMod', + 'InvoiceLineMod', 'InvoiceLineMod TxnLineID', 'InvoiceLineMod ItemRef ListID', 'InvoiceLineMod ItemRef FullName', @@ -735,7 +735,7 @@ protected function &_reorderPathsPaths() 'InvoiceLineGroupMod InvoiceLineMod Other2', 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/InvoiceQueryRq.php b/QuickBooks/QBXML/Schema/Object/InvoiceQueryRq.php index 78a6c36c..5d60b5e0 100755 --- a/QuickBooks/QBXML/Schema/Object/InvoiceQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/InvoiceQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: InvoiceQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_InvoiceQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -62,10 +62,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -96,10 +96,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -131,7 +131,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -162,10 +162,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -196,22 +196,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -242,7 +242,7 @@ protected function &_reorderPathsPaths() 24 => 'IncludeRetElement', 25 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemDiscountAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemDiscountAddRq.php index 4f4674b5..1966e868 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemDiscountAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemDiscountAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemDiscountAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemDiscountAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemDiscountAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'AccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'AccountRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'AccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'AccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'AccountRef FullName', 11 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemDiscountModRq.php b/QuickBooks/QBXML/Schema/Object/ItemDiscountModRq.php index 858cf6b7..93de5276 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemDiscountModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemDiscountModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemDiscountModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemDiscountModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemDiscountMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -51,10 +51,10 @@ protected function &_dataTypePaths() 'ApplyAccountRefToExistingTxns' => 'BOOLTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -74,10 +74,10 @@ protected function &_maxLengthPaths() 'ApplyAccountRefToExistingTxns' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -98,7 +98,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -118,10 +118,10 @@ protected function &_sinceVersionPaths() 'ApplyAccountRefToExistingTxns' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -141,22 +141,22 @@ protected function &_isRepeatablePaths() 'ApplyAccountRefToExistingTxns' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -176,7 +176,7 @@ protected function &_reorderPathsPaths() 13 => 'ApplyAccountRefToExistingTxns', 14 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemDiscountQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemDiscountQueryRq.php index fb3da75a..79df513f 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemDiscountQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemDiscountQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemDiscountQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemDiscountQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemFixedAssetAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemFixedAssetAddRq.php index 1acf6beb..6f85ef06 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemFixedAssetAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemFixedAssetAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemFixedAssetAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemFixedAssetAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemFixedAssetAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_dataTypePaths() 'YearEndBookValue' => 'AMTTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -92,10 +92,10 @@ protected function &_maxLengthPaths() 'YearEndBookValue' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -125,7 +125,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -154,10 +154,10 @@ protected function &_sinceVersionPaths() 'YearEndBookValue' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -186,22 +186,22 @@ protected function &_isRepeatablePaths() 'YearEndBookValue' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -230,7 +230,7 @@ protected function &_reorderPathsPaths() 22 => 'YearEndBookValue', 23 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemFixedAssetModRq.php b/QuickBooks/QBXML/Schema/Object/ItemFixedAssetModRq.php index 0fae666f..7ecc4c49 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemFixedAssetModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemFixedAssetModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemFixedAssetModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemFixedAssetModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemFixedAssetMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -62,10 +62,10 @@ protected function &_dataTypePaths() 'YearEndBookValue' => 'AMTTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -96,10 +96,10 @@ protected function &_maxLengthPaths() 'YearEndBookValue' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -131,7 +131,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -162,10 +162,10 @@ protected function &_sinceVersionPaths() 'YearEndBookValue' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -196,22 +196,22 @@ protected function &_isRepeatablePaths() 'YearEndBookValue' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -242,7 +242,7 @@ protected function &_reorderPathsPaths() 24 => 'YearEndBookValue', 25 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemFixedAssetQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemFixedAssetQueryRq.php index 78555f53..961600ff 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemFixedAssetQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemFixedAssetQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemFixedAssetQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemFixedAssetQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemGroupAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemGroupAddRq.php index 08a127f0..98442d10 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemGroupAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemGroupAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemGroupAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemGroupAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemGroupAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'ItemGroupLine UnitOfMeasure' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'ItemGroupLine UnitOfMeasure' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'ItemGroupLine UnitOfMeasure' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'ItemGroupLine UnitOfMeasure' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -154,7 +154,7 @@ protected function &_reorderPathsPaths() 11 => 'ItemGroupLine UnitOfMeasure', 12 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemGroupModRq.php b/QuickBooks/QBXML/Schema/Object/ItemGroupModRq.php index 06fbadc5..fe4e7476 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemGroupModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemGroupModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemGroupModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemGroupModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemGroupMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -51,10 +51,10 @@ protected function &_dataTypePaths() 'ItemGroupLine UnitOfMeasure' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -74,10 +74,10 @@ protected function &_maxLengthPaths() 'ItemGroupLine UnitOfMeasure' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -98,7 +98,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -118,10 +118,10 @@ protected function &_sinceVersionPaths() 'ItemGroupLine UnitOfMeasure' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -141,22 +141,22 @@ protected function &_isRepeatablePaths() 'ItemGroupLine UnitOfMeasure' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -178,7 +178,7 @@ protected function &_reorderPathsPaths() 15 => 'ItemGroupLine UnitOfMeasure', 16 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemGroupQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemGroupQueryRq.php index 07daf670..9e90a994 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemGroupQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemGroupQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemGroupQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemGroupQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemInventoryAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemInventoryAddRq.php index 354cf350..cc564068 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemInventoryAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemInventoryAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemInventoryAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemInventoryAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemInventoryAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -65,10 +65,10 @@ protected function &_dataTypePaths() 'InventoryDate' => 'DATETYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_maxLengthPaths() 'InventoryDate' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -140,7 +140,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -174,10 +174,10 @@ protected function &_sinceVersionPaths() 'InventoryDate' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -211,22 +211,22 @@ protected function &_isRepeatablePaths() 'InventoryDate' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -260,7 +260,7 @@ protected function &_reorderPathsPaths() 27 => 'InventoryDate', 28 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemInventoryModRq.php b/QuickBooks/QBXML/Schema/Object/ItemInventoryModRq.php index 7b61b665..d79d9a70 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemInventoryModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemInventoryModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemInventoryModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemInventoryModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemInventoryMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_dataTypePaths() 'ReorderPoint' => 'QUANTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -104,10 +104,10 @@ protected function &_maxLengthPaths() 'ReorderPoint' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -143,7 +143,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -178,10 +178,10 @@ protected function &_sinceVersionPaths() 'ReorderPoint' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -216,22 +216,22 @@ protected function &_isRepeatablePaths() 'ReorderPoint' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -266,7 +266,7 @@ protected function &_reorderPathsPaths() 28 => 'ReorderPoint', 29 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemInventoryQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemInventoryQueryRq.php index 4f545d94..43708ec8 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemInventoryQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemInventoryQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemInventoryQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemInventoryQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemNonInventoryAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemNonInventoryAddRq.php index ddd7bc12..a25bfd0d 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemNonInventoryAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemNonInventoryAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemNonInventoryAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemNonInventoryAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemNonInventoryAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -64,10 +64,10 @@ protected function &_dataTypePaths() 'SalesAndPurchase PrefVendorRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -100,10 +100,10 @@ protected function &_maxLengthPaths() 'SalesAndPurchase PrefVendorRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -137,7 +137,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -170,10 +170,10 @@ protected function &_sinceVersionPaths() 'SalesAndPurchase PrefVendorRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -206,22 +206,22 @@ protected function &_isRepeatablePaths() 'SalesAndPurchase PrefVendorRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -254,7 +254,7 @@ protected function &_reorderPathsPaths() 26 => 'SalesAndPurchase PrefVendorRef FullName', 27 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemNonInventoryModRq.php b/QuickBooks/QBXML/Schema/Object/ItemNonInventoryModRq.php index c82a0f3e..be990676 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemNonInventoryModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemNonInventoryModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemNonInventoryModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemNonInventoryModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemNonInventoryMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -70,10 +70,10 @@ protected function &_dataTypePaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -112,10 +112,10 @@ protected function &_maxLengthPaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -155,7 +155,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -194,10 +194,10 @@ protected function &_sinceVersionPaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -236,22 +236,22 @@ protected function &_isRepeatablePaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -290,7 +290,7 @@ protected function &_reorderPathsPaths() 32 => 'SalesAndPurchaseMod PrefVendorRef FullName', 33 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemNonInventoryQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemNonInventoryQueryRq.php index 4e426115..b2627d7a 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemNonInventoryQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemNonInventoryQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemNonInventoryQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemNonInventoryQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemOtherChargeAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemOtherChargeAddRq.php index b492e772..e638fba9 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemOtherChargeAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemOtherChargeAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemOtherChargeAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemOtherChargeAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemOtherChargeAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -61,10 +61,10 @@ protected function &_dataTypePaths() 'SalesAndPurchase PrefVendorRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_maxLengthPaths() 'SalesAndPurchase PrefVendorRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -128,7 +128,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -158,10 +158,10 @@ protected function &_sinceVersionPaths() 'SalesAndPurchase PrefVendorRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -191,22 +191,22 @@ protected function &_isRepeatablePaths() 'SalesAndPurchase PrefVendorRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -236,7 +236,7 @@ protected function &_reorderPathsPaths() 23 => 'SalesAndPurchase PrefVendorRef FullName', 24 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemOtherChargeModRq.php b/QuickBooks/QBXML/Schema/Object/ItemOtherChargeModRq.php index 6421a4b8..ac947577 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemOtherChargeModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemOtherChargeModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemOtherChargeModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemOtherChargeModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemOtherChargeMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_dataTypePaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -104,10 +104,10 @@ protected function &_maxLengthPaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -143,7 +143,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -178,10 +178,10 @@ protected function &_sinceVersionPaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -216,22 +216,22 @@ protected function &_isRepeatablePaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -266,7 +266,7 @@ protected function &_reorderPathsPaths() 28 => 'SalesAndPurchaseMod PrefVendorRef FullName', 29 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemOtherChargeQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemOtherChargeQueryRq.php index 3da457ed..56da1d37 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemOtherChargeQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemOtherChargeQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemOtherChargeQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemOtherChargeQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemPaymentAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemPaymentAddRq.php index 6671d797..2c43b644 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemPaymentAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemPaymentAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemPaymentAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemPaymentAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemPaymentAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -44,10 +44,10 @@ protected function &_dataTypePaths() 'PaymentMethodRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_maxLengthPaths() 'PaymentMethodRef FullName' => 159, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -77,7 +77,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -90,10 +90,10 @@ protected function &_sinceVersionPaths() 'PaymentMethodRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -106,22 +106,22 @@ protected function &_isRepeatablePaths() 'PaymentMethodRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -134,7 +134,7 @@ protected function &_reorderPathsPaths() 6 => 'PaymentMethodRef FullName', 7 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemPaymentModRq.php b/QuickBooks/QBXML/Schema/Object/ItemPaymentModRq.php index a60dfc72..7e16b095 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemPaymentModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemPaymentModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemPaymentModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemPaymentModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemPaymentMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -46,10 +46,10 @@ protected function &_dataTypePaths() 'PaymentMethodRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -64,10 +64,10 @@ protected function &_maxLengthPaths() 'PaymentMethodRef FullName' => 159, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -83,7 +83,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -98,10 +98,10 @@ protected function &_sinceVersionPaths() 'PaymentMethodRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -116,22 +116,22 @@ protected function &_isRepeatablePaths() 'PaymentMethodRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -146,7 +146,7 @@ protected function &_reorderPathsPaths() 8 => 'PaymentMethodRef FullName', 9 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemPaymentQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemPaymentQueryRq.php index 4e4480e3..a610b33b 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemPaymentQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemPaymentQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemPaymentQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemPaymentQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemQueryRq.php index 784b043e..16d3dc20 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,31 +126,31 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_inLocalePaths() { static $paths = array( - 'ActiveStatus' => array( 'QBOE' ), + 'ActiveStatus' => array( 'QBOE' ), ); - + return $paths; - } - + } + protected function &_reorderPathsPaths() { static $paths = array ( @@ -167,7 +167,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemReceiptAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemReceiptAddRq.php index aa633a71..ffd7da97 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemReceiptAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemReceiptAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemReceiptAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemReceiptAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemReceiptAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -81,10 +81,10 @@ protected function &_dataTypePaths() 'ItemGroupLineAdd UnitOfMeasure' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -134,10 +134,10 @@ protected function &_maxLengthPaths() 'ItemGroupLineAdd UnitOfMeasure' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -188,7 +188,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -238,10 +238,10 @@ protected function &_sinceVersionPaths() 'ItemGroupLineAdd UnitOfMeasure' => 7, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -291,22 +291,22 @@ protected function &_isRepeatablePaths() 'ItemGroupLineAdd UnitOfMeasure' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -363,7 +363,7 @@ protected function &_reorderPathsPaths() 49 => 'ItemGroupLineAdd UnitOfMeasure', 50 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemReceiptModRq.php b/QuickBooks/QBXML/Schema/Object/ItemReceiptModRq.php index 995cb87d..9ec3ccef 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemReceiptModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemReceiptModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemReceiptModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemReceiptModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -108,10 +108,10 @@ protected function &_dataTypePaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -188,10 +188,10 @@ protected function &_maxLengthPaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 41, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -269,7 +269,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -346,10 +346,10 @@ protected function &_sinceVersionPaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -426,22 +426,22 @@ protected function &_isRepeatablePaths() 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -518,7 +518,7 @@ protected function &_reorderPathsPaths() 70 => 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName', 71 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemReceiptQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemReceiptQueryRq.php index da1cba6b..140d1cbc 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemReceiptQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemReceiptQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemReceiptQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemReceiptQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -61,10 +61,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -128,7 +128,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -158,10 +158,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -191,22 +191,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -236,7 +236,7 @@ protected function &_reorderPathsPaths() 23 => 'IncludeRetElement', 24 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxAddRq.php index 7d39eb9b..7d00fb0b 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemSalesTaxAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemSalesTaxAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemSalesTaxAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -45,10 +45,10 @@ protected function &_dataTypePaths() 'SalesTaxReturnLineNumber' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -62,10 +62,10 @@ protected function &_maxLengthPaths() 'SalesTaxReturnLineNumber' => 79, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -80,7 +80,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_sinceVersionPaths() 'SalesTaxReturnLineNumber' => 6, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -111,22 +111,22 @@ protected function &_isRepeatablePaths() 'SalesTaxReturnLineNumber' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -140,7 +140,7 @@ protected function &_reorderPathsPaths() 7 => 'SalesTaxReturnLineNumber', 8 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupAddRq.php index c2b04abf..e216e4ae 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemSalesTaxGroupAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemSalesTaxGroupAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemSalesTaxGroup'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -42,10 +42,10 @@ protected function &_dataTypePaths() 'ItemSalesTaxRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -56,10 +56,10 @@ protected function &_maxLengthPaths() 'ItemSalesTaxRef FullName' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -71,7 +71,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -82,10 +82,10 @@ protected function &_sinceVersionPaths() 'ItemSalesTaxRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -96,34 +96,34 @@ protected function &_isRepeatablePaths() 'ItemSalesTaxRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( 0 => 'Name', 1 => 'IsActive', 2 => 'ItemDesc', - 3 => 'ItemSalesTaxRef', + 3 => 'ItemSalesTaxRef', 4 => 'ItemSalesTaxRef ListID', 5 => 'ItemSalesTaxRef FullName', 6 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupModRq.php b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupModRq.php index 42a053ca..d2f1662c 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemSalesTaxGroupModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemSalesTaxGroupModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -44,10 +44,10 @@ protected function &_dataTypePaths() 'ItemSalesTaxGroupMod ItemSalesTaxRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_maxLengthPaths() 'ItemSalesTaxGroupMod ItemSalesTaxRef FullName' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -77,7 +77,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -90,10 +90,10 @@ protected function &_sinceVersionPaths() 'ItemSalesTaxGroupMod ItemSalesTaxRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -106,22 +106,22 @@ protected function &_isRepeatablePaths() 'ItemSalesTaxGroupMod ItemSalesTaxRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -134,7 +134,7 @@ protected function &_reorderPathsPaths() 6 => 'ItemSalesTaxGroupMod ItemSalesTaxRef FullName', 7 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupQueryRq.php index bfd8d7c3..79694044 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxGroupQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemSalesTaxGroupQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemSalesTaxGroupQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxModRq.php b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxModRq.php index 38541d9d..4ed409b0 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemSalesTaxModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemSalesTaxModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemSalesTaxMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'SalesTaxReturnLineNumber' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'SalesTaxReturnLineNumber' => 79, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'SalesTaxReturnLineNumber' => 6, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'SalesTaxReturnLineNumber' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'SalesTaxReturnLineNumber', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxQueryRq.php index 8bcc81c9..b8141c5e 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemSalesTaxQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemSalesTaxQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemSalesTaxQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemSalesTaxQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemServiceAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemServiceAddRq.php index f859d8d1..33e075e2 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemServiceAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemServiceAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemServiceAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemServiceAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemServiceAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -63,10 +63,10 @@ protected function &_dataTypePaths() 'SalesAndPurchase PrefVendorRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -98,10 +98,10 @@ protected function &_maxLengthPaths() 'SalesAndPurchase PrefVendorRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -134,7 +134,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -166,10 +166,10 @@ protected function &_sinceVersionPaths() 'SalesAndPurchase PrefVendorRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -201,22 +201,22 @@ protected function &_isRepeatablePaths() 'SalesAndPurchase PrefVendorRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -248,7 +248,7 @@ protected function &_reorderPathsPaths() 25 => 'SalesAndPurchase PrefVendorRef FullName', 26 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemServiceModRq.php b/QuickBooks/QBXML/Schema/Object/ItemServiceModRq.php index e6754964..f20f8359 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemServiceModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemServiceModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemServiceModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemServiceModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemServiceMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -69,10 +69,10 @@ protected function &_dataTypePaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -110,10 +110,10 @@ protected function &_maxLengthPaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -190,10 +190,10 @@ protected function &_sinceVersionPaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -231,22 +231,22 @@ protected function &_isRepeatablePaths() 'SalesAndPurchaseMod PrefVendorRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -284,7 +284,7 @@ protected function &_reorderPathsPaths() 31 => 'SalesAndPurchaseMod PrefVendorRef FullName', 32 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemServiceQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemServiceQueryRq.php index a25c8af3..c1bd6577 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemServiceQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemServiceQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemServiceQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemServiceQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemSubtotalAddRq.php b/QuickBooks/QBXML/Schema/Object/ItemSubtotalAddRq.php index 34217ecc..fae5d053 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemSubtotalAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemSubtotalAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemSubtotalAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemSubtotalAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemSubtotalAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -40,10 +40,10 @@ protected function &_dataTypePaths() 'ItemDesc' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -52,10 +52,10 @@ protected function &_maxLengthPaths() 'ItemDesc' => 4095, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -65,7 +65,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -74,10 +74,10 @@ protected function &_sinceVersionPaths() 'ItemDesc' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -86,22 +86,22 @@ protected function &_isRepeatablePaths() 'ItemDesc' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -110,7 +110,7 @@ protected function &_reorderPathsPaths() 2 => 'ItemDesc', 3 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemSubtotalModRq.php b/QuickBooks/QBXML/Schema/Object/ItemSubtotalModRq.php index 17e8ddb9..db9805ca 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemSubtotalModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemSubtotalModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemSubtotalModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemSubtotalModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ItemSubtotalMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -42,10 +42,10 @@ protected function &_dataTypePaths() 'ItemDesc' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -56,10 +56,10 @@ protected function &_maxLengthPaths() 'ItemDesc' => 4095, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -71,7 +71,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -82,10 +82,10 @@ protected function &_sinceVersionPaths() 'ItemDesc' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -96,22 +96,22 @@ protected function &_isRepeatablePaths() 'ItemDesc' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -122,7 +122,7 @@ protected function &_reorderPathsPaths() 4 => 'ItemDesc', 5 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ItemSubtotalQueryRq.php b/QuickBooks/QBXML/Schema/Object/ItemSubtotalQueryRq.php index 19cf7fa8..9cfbaccf 100755 --- a/QuickBooks/QBXML/Schema/Object/ItemSubtotalQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ItemSubtotalQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ItemSubtotalQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ItemSubtotalQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'IncludeRetElement', 11 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/JobTypeAddRq.php b/QuickBooks/QBXML/Schema/Object/JobTypeAddRq.php index c60afe13..e869a812 100755 --- a/QuickBooks/QBXML/Schema/Object/JobTypeAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/JobTypeAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: JobTypeAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_JobTypeAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -41,10 +41,10 @@ protected function &_dataTypePaths() 'JobTypeAdd ParentRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -54,10 +54,10 @@ protected function &_maxLengthPaths() 'JobTypeAdd ParentRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -68,7 +68,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -78,10 +78,10 @@ protected function &_sinceVersionPaths() 'JobTypeAdd ParentRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -91,22 +91,22 @@ protected function &_isRepeatablePaths() 'JobTypeAdd ParentRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -116,7 +116,7 @@ protected function &_reorderPathsPaths() 3 => 'JobTypeAdd ParentRef FullName', 4 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/JobTypeQueryRq.php b/QuickBooks/QBXML/Schema/Object/JobTypeQueryRq.php index 3c7902cf..a58c4a04 100755 --- a/QuickBooks/QBXML/Schema/Object/JobTypeQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/JobTypeQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: JobTypeQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_JobTypeQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/JournalEntryAddRq.php b/QuickBooks/QBXML/Schema/Object/JournalEntryAddRq.php index a16c52ab..e94b01a9 100755 --- a/QuickBooks/QBXML/Schema/Object/JournalEntryAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/JournalEntryAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: JournalEntryAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_JournalEntryAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'JournalEntryAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -65,10 +65,10 @@ protected function &_dataTypePaths() 'JournalCreditLine BillableStatus' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_maxLengthPaths() 'JournalCreditLine BillableStatus' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -140,7 +140,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -174,10 +174,10 @@ protected function &_sinceVersionPaths() 'JournalCreditLine BillableStatus' => 3, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -211,22 +211,22 @@ protected function &_isRepeatablePaths() 'JournalCreditLine BillableStatus' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -234,7 +234,7 @@ protected function &_reorderPathsPaths() 1 => 'RefNumber', 2 => 'Memo', 3 => 'IsAdjustment', - 4 => 'JournalDebitLine', + 4 => 'JournalDebitLine', 5 => 'JournalDebitLine TxnLineID', 6 => 'JournalDebitLine AccountRef ListID', 7 => 'JournalDebitLine AccountRef FullName', @@ -247,7 +247,7 @@ protected function &_reorderPathsPaths() 14 => 'JournalDebitLine ItemSalesTaxRef ListID', 15 => 'JournalDebitLine ItemSalesTaxRef FullName', 16 => 'JournalDebitLine BillableStatus', - 17 => 'JournalCreditLine', + 17 => 'JournalCreditLine', 18 => 'JournalCreditLine TxnLineID', 19 => 'JournalCreditLine AccountRef ListID', 20 => 'JournalCreditLine AccountRef FullName', @@ -262,7 +262,7 @@ protected function &_reorderPathsPaths() 29 => 'JournalCreditLine BillableStatus', 30 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/JournalEntryModRq.php b/QuickBooks/QBXML/Schema/Object/JournalEntryModRq.php index 392f54a0..bd32ff29 100755 --- a/QuickBooks/QBXML/Schema/Object/JournalEntryModRq.php +++ b/QuickBooks/QBXML/Schema/Object/JournalEntryModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: JournalEntryModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_JournalEntryModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'JournalEntryMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -55,10 +55,10 @@ protected function &_dataTypePaths() 'JournalLineMod BillableStatus' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -82,10 +82,10 @@ protected function &_maxLengthPaths() 'JournalLineMod BillableStatus' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -110,7 +110,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -134,10 +134,10 @@ protected function &_sinceVersionPaths() 'JournalLineMod BillableStatus' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -161,22 +161,22 @@ protected function &_isRepeatablePaths() 'JournalLineMod BillableStatus' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -200,7 +200,7 @@ protected function &_reorderPathsPaths() 17 => 'JournalLineMod BillableStatus', 18 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/JournalEntryQueryRq.php b/QuickBooks/QBXML/Schema/Object/JournalEntryQueryRq.php index 1ae3d29d..e8c62a79 100755 --- a/QuickBooks/QBXML/Schema/Object/JournalEntryQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/JournalEntryQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: JournalEntryQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_JournalEntryQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -92,10 +92,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -125,7 +125,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -154,10 +154,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -186,22 +186,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -230,7 +230,7 @@ protected function &_reorderPathsPaths() 22 => 'IncludeRetElement', 23 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/PaymentMethodAddRq.php b/QuickBooks/QBXML/Schema/Object/PaymentMethodAddRq.php index 06e7f494..75f69f0d 100755 --- a/QuickBooks/QBXML/Schema/Object/PaymentMethodAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/PaymentMethodAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: PaymentMethodAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_PaymentMethodAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -39,10 +39,10 @@ protected function &_dataTypePaths() 'IsActive' => 'BOOLTYPE', 'PaymentMethodType' => 'ENUMTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -50,10 +50,10 @@ protected function &_maxLengthPaths() 'IsActive' => 0, 'PaymentMethodType' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -62,7 +62,7 @@ protected function &_isOptionalPaths() 'PaymentMethodType' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -71,10 +71,10 @@ protected function &_sinceVersionPaths() 'PaymentMethodAdd PaymentMethodType' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -82,22 +82,22 @@ protected function &_isRepeatablePaths() 'IsActive' => false, 'PaymentMethodType' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -105,7 +105,7 @@ protected function &_reorderPathsPaths() 1 => 'IsActive', 2 => 'PaymentMethodType', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/PaymentMethodQueryRq.php b/QuickBooks/QBXML/Schema/Object/PaymentMethodQueryRq.php index 10d52757..49897d16 100755 --- a/QuickBooks/QBXML/Schema/Object/PaymentMethodQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/PaymentMethodQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: PaymentMethodQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_PaymentMethodQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'PaymentMethodType' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'PaymentMethodType' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'PaymentMethodType' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'PaymentMethodType' => true, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -158,7 +158,7 @@ protected function &_reorderPathsPaths() 10 => 'PaymentMethodType', 11 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/PreferencesQueryRq.php b/QuickBooks/QBXML/Schema/Object/PreferencesQueryRq.php index 62d3d373..275a1461 100755 --- a/QuickBooks/QBXML/Schema/Object/PreferencesQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/PreferencesQueryRq.php @@ -2,97 +2,97 @@ /** * Schema object for: PreferencesQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_PreferencesQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( - 'AccountingPreferences IsRequiringAccounts' => 'BOOLTYPE', + 'AccountingPreferences IsRequiringAccounts' => 'BOOLTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( 0 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/PriceLevelAddRq.php b/QuickBooks/QBXML/Schema/Object/PriceLevelAddRq.php index 68234be6..34fe7402 100755 --- a/QuickBooks/QBXML/Schema/Object/PriceLevelAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/PriceLevelAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: PriceLevelAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_PriceLevelAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -46,10 +46,10 @@ protected function &_dataTypePaths() 'PriceLevelAdd PriceLevelPerItem AdjustRelativeTo' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -64,10 +64,10 @@ protected function &_maxLengthPaths() 'PriceLevelAdd PriceLevelPerItem AdjustRelativeTo' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -83,7 +83,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -98,10 +98,10 @@ protected function &_sinceVersionPaths() 'PriceLevelAdd PriceLevelPerItem AdjustRelativeTo' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -116,22 +116,22 @@ protected function &_isRepeatablePaths() 'PriceLevelAdd PriceLevelPerItem AdjustRelativeTo' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -149,7 +149,7 @@ protected function &_reorderPathsPaths() 11 => 'PriceLevelAdd PriceLevelPerItem AdjustRelativeTo', 12 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/PriceLevelModRq.php b/QuickBooks/QBXML/Schema/Object/PriceLevelModRq.php index 667e1ea0..4b8a9389 100755 --- a/QuickBooks/QBXML/Schema/Object/PriceLevelModRq.php +++ b/QuickBooks/QBXML/Schema/Object/PriceLevelModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: PriceLevelModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_PriceLevelModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -48,10 +48,10 @@ protected function &_dataTypePaths() 'PriceLevelMod PriceLevelPerItem AdjustRelativeTo' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -68,10 +68,10 @@ protected function &_maxLengthPaths() 'PriceLevelMod PriceLevelPerItem AdjustRelativeTo' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -89,7 +89,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -106,10 +106,10 @@ protected function &_sinceVersionPaths() 'PriceLevelMod PriceLevelPerItem AdjustRelativeTo' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -126,22 +126,22 @@ protected function &_isRepeatablePaths() 'PriceLevelMod PriceLevelPerItem AdjustRelativeTo' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -161,7 +161,7 @@ protected function &_reorderPathsPaths() 13 => 'PriceLevelMod PriceLevelPerItem AdjustRelativeTo', 14 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/PriceLevelQueryRq.php b/QuickBooks/QBXML/Schema/Object/PriceLevelQueryRq.php index 0bac7fec..6ee3ccbb 100755 --- a/QuickBooks/QBXML/Schema/Object/PriceLevelQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/PriceLevelQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: PriceLevelQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_PriceLevelQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -49,10 +49,10 @@ protected function &_dataTypePaths() 'ItemRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -70,10 +70,10 @@ protected function &_maxLengthPaths() 'ItemRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -92,7 +92,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -110,10 +110,10 @@ protected function &_sinceVersionPaths() 'ItemRef FullName' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -131,22 +131,22 @@ protected function &_isRepeatablePaths() 'ItemRef FullName' => true, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -164,7 +164,7 @@ protected function &_reorderPathsPaths() 11 => 'ItemRef FullName', 12 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/PurchaseOrderAddRq.php b/QuickBooks/QBXML/Schema/Object/PurchaseOrderAddRq.php index e1198a97..d45d0ca4 100755 --- a/QuickBooks/QBXML/Schema/Object/PurchaseOrderAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/PurchaseOrderAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: PurchaseOrderAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_PurchaseOrderAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'PurchaseOrderAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -114,10 +114,10 @@ protected function &_dataTypePaths() 'PurchaseOrderLineGroupAdd DataExt DataExtValue' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -200,10 +200,10 @@ protected function &_maxLengthPaths() 'PurchaseOrderLineGroupAdd DataExt DataExtValue' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -287,7 +287,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -370,10 +370,10 @@ protected function &_sinceVersionPaths() 'PurchaseOrderLineGroupAdd DataExt DataExtValue' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -456,22 +456,22 @@ protected function &_isRepeatablePaths() 'PurchaseOrderLineGroupAdd DataExt DataExtValue' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -556,7 +556,7 @@ protected function &_reorderPathsPaths() 78 => 'PurchaseOrderLineGroupAdd DataExt DataExtValue', 79 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/PurchaseOrderModRq.php b/QuickBooks/QBXML/Schema/Object/PurchaseOrderModRq.php index 6ec7c81a..114941e7 100755 --- a/QuickBooks/QBXML/Schema/Object/PurchaseOrderModRq.php +++ b/QuickBooks/QBXML/Schema/Object/PurchaseOrderModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: PurchaseOrderModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_PurchaseOrderModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'PurchaseOrderMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -139,10 +139,10 @@ protected function &_dataTypePaths() 'PurchaseOrderLineGroupMod PurchaseOrderLineMod Other2' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -250,10 +250,10 @@ protected function &_maxLengthPaths() 'PurchaseOrderLineGroupMod PurchaseOrderLineMod Other2' => 29, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -362,7 +362,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -470,10 +470,10 @@ protected function &_sinceVersionPaths() 'PurchaseOrderLineGroupMod PurchaseOrderLineMod Other2' => 6, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -581,22 +581,22 @@ protected function &_isRepeatablePaths() 'PurchaseOrderLineGroupMod PurchaseOrderLineMod Other2' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -704,7 +704,7 @@ protected function &_reorderPathsPaths() 101 => 'PurchaseOrderLineGroupMod PurchaseOrderLineMod Other2', 102 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/PurchaseOrderQueryRq.php b/QuickBooks/QBXML/Schema/Object/PurchaseOrderQueryRq.php index 73fbb9c7..6b39a3ff 100755 --- a/QuickBooks/QBXML/Schema/Object/PurchaseOrderQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/PurchaseOrderQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: PurchaseOrderQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_PurchaseOrderQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -61,10 +61,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -128,7 +128,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -158,10 +158,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -191,22 +191,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -236,7 +236,7 @@ protected function &_reorderPathsPaths() 23 => 'IncludeRetElement', 24 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ReceivePaymentAddRq.php b/QuickBooks/QBXML/Schema/Object/ReceivePaymentAddRq.php index 1e858b0f..08ab6d4d 100755 --- a/QuickBooks/QBXML/Schema/Object/ReceivePaymentAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ReceivePaymentAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ReceivePaymentAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ReceivePaymentAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ReceivePaymentAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -83,10 +83,10 @@ protected function &_dataTypePaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -138,10 +138,10 @@ protected function &_maxLengthPaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => 209, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -194,7 +194,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -246,10 +246,10 @@ protected function &_sinceVersionPaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -301,22 +301,22 @@ protected function &_isRepeatablePaths() 'AppliedToTxnAdd DiscountAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -356,8 +356,8 @@ protected function &_reorderPathsPaths() 33 => 'CreditCardTxnInfo CreditCardTxnResultInfo TxnAuthorizationStamp', 34 => 'CreditCardTxnInfo CreditCardTxnResultInfo ClientTransID', 35 => 'IsAutoApply', - 36 => 'AppliedToTxnAdd', - 37 => 'AppliedToTxnAdd APIApplicationID', + 36 => 'AppliedToTxnAdd', + 37 => 'AppliedToTxnAdd APIApplicationID', 38 => 'AppliedToTxnAdd TxnID', 39 => 'AppliedToTxnAdd PaymentAmount', 40 => 'AppliedToTxnAdd TxnLineDetail TxnLineID', @@ -370,7 +370,7 @@ protected function &_reorderPathsPaths() 47 => 'AppliedToTxnAdd DiscountAccountRef FullName', 48 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ReceivePaymentModRq.php b/QuickBooks/QBXML/Schema/Object/ReceivePaymentModRq.php index 37cd9ee1..31b81a61 100755 --- a/QuickBooks/QBXML/Schema/Object/ReceivePaymentModRq.php +++ b/QuickBooks/QBXML/Schema/Object/ReceivePaymentModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ReceivePaymentModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ReceivePaymentModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ReceivePaymentMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -82,10 +82,10 @@ protected function &_dataTypePaths() 'AppliedToTxnMod DiscountAccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -136,10 +136,10 @@ protected function &_maxLengthPaths() 'AppliedToTxnMod DiscountAccountRef FullName' => 209, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -191,7 +191,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -242,10 +242,10 @@ protected function &_sinceVersionPaths() 'AppliedToTxnMod DiscountAccountRef FullName' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -296,22 +296,22 @@ protected function &_isRepeatablePaths() 'AppliedToTxnMod DiscountAccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -363,7 +363,7 @@ protected function &_reorderPathsPaths() 45 => 'AppliedToTxnMod DiscountAccountRef FullName', 46 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ReceivePaymentQueryRq.php b/QuickBooks/QBXML/Schema/Object/ReceivePaymentQueryRq.php index fd72e14e..2e0a3fbd 100755 --- a/QuickBooks/QBXML/Schema/Object/ReceivePaymentQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ReceivePaymentQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ReceivePaymentQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ReceivePaymentQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -92,10 +92,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -125,7 +125,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -154,10 +154,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -186,22 +186,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -230,7 +230,7 @@ protected function &_reorderPathsPaths() 22 => 'IncludeRetElement', 23 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SalesOrderAddRq.php b/QuickBooks/QBXML/Schema/Object/SalesOrderAddRq.php index 27bca624..8cd24ce3 100755 --- a/QuickBooks/QBXML/Schema/Object/SalesOrderAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/SalesOrderAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: SalesOrderAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SalesOrderAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'SalesOrderAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -117,10 +117,10 @@ protected function &_dataTypePaths() 'SalesOrderLineGroupAdd DataExt DataExtValue' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -206,10 +206,10 @@ protected function &_maxLengthPaths() 'SalesOrderLineGroupAdd DataExt DataExtValue' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -296,7 +296,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -382,10 +382,10 @@ protected function &_sinceVersionPaths() 'SalesOrderLineGroupAdd DataExt DataExtValue' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -471,22 +471,22 @@ protected function &_isRepeatablePaths() 'SalesOrderLineGroupAdd DataExt DataExtValue' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -574,7 +574,7 @@ protected function &_reorderPathsPaths() 'SalesOrderLineGroupAdd DataExt DataExtValue', 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SalesOrderModRq.php b/QuickBooks/QBXML/Schema/Object/SalesOrderModRq.php index 1fdfc5cf..436955d5 100755 --- a/QuickBooks/QBXML/Schema/Object/SalesOrderModRq.php +++ b/QuickBooks/QBXML/Schema/Object/SalesOrderModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: SalesOrderModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SalesOrderModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'SalesOrderMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -138,10 +138,10 @@ protected function &_dataTypePaths() 'SalesOrderLineGroupMod SalesOrderLineMod Other2' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -248,10 +248,10 @@ protected function &_maxLengthPaths() 'SalesOrderLineGroupMod SalesOrderLineMod Other2' => 29, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -359,7 +359,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -466,10 +466,10 @@ protected function &_sinceVersionPaths() 'SalesOrderLineGroupMod SalesOrderLineMod Other2' => 6, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -576,22 +576,22 @@ protected function &_isRepeatablePaths() 'SalesOrderLineGroupMod SalesOrderLineMod Other2' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -698,7 +698,7 @@ protected function &_reorderPathsPaths() 'SalesOrderLineGroupMod SalesOrderLineMod Other2', 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SalesOrderQueryRq.php b/QuickBooks/QBXML/Schema/Object/SalesOrderQueryRq.php index 8fa6ecba..c1170ca5 100755 --- a/QuickBooks/QBXML/Schema/Object/SalesOrderQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/SalesOrderQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: SalesOrderQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SalesOrderQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -57,10 +57,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -86,10 +86,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -116,7 +116,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -142,10 +142,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -171,22 +171,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -212,7 +212,7 @@ protected function &_reorderPathsPaths() 19 => 'IncludeRetElement', 20 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SalesReceiptAddRq.php b/QuickBooks/QBXML/Schema/Object/SalesReceiptAddRq.php index 7c90e268..574e21fb 100755 --- a/QuickBooks/QBXML/Schema/Object/SalesReceiptAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/SalesReceiptAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: SalesReceiptAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SalesReceiptAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'SalesReceiptAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -185,10 +185,10 @@ protected function &_dataTypePaths() 'ShippingLineAdd AccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -342,10 +342,10 @@ protected function &_maxLengthPaths() 'ShippingLineAdd AccountRef FullName' => 209, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -500,7 +500,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -654,10 +654,10 @@ protected function &_sinceVersionPaths() 'ShippingLineAdd AccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -811,184 +811,184 @@ protected function &_isRepeatablePaths() 'ShippingLineAdd AccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + protected function &_inLocalePaths() { static $paths = array( - 'SalesTaxLineAdd Amount' => array( 'QBUS' ), - 'ShipMethodRef FullName' => array( 'QBOE' ), - 'ItemSalesTaxRef FullName' => array( 'QBOE' ), - 'SalesReceiptLineAdd SalesTaxCodeRef FullName' => array( 'QBOE' ), + 'SalesTaxLineAdd Amount' => array( 'QBUS' ), + 'ShipMethodRef FullName' => array( 'QBOE' ), + 'ItemSalesTaxRef FullName' => array( 'QBOE' ), + 'SalesReceiptLineAdd SalesTaxCodeRef FullName' => array( 'QBOE' ), ); - + return $paths; } - + protected function &_reorderPathsPaths() { static $paths = array ( - 'CustomerRef ListID', - 'CustomerRef FullName', - 'ClassRef ListID', - 'ClassRef FullName', - 'TemplateRef ListID', - 'TemplateRef FullName', - 'TxnDate', - 'RefNumber', - 'BillAddress Addr1', - 'BillAddress Addr2', - 'BillAddress Addr3', - 'BillAddress Addr4', - 'BillAddress Addr5', - 'BillAddress City', - 'BillAddress State', - 'BillAddress County', - 'BillAddress Province', - 'BillAddress PostalCode', - 'BillAddress Country', - 'BillAddress Note', - 'ShipAddress Addr1', - 'ShipAddress Addr2', - 'ShipAddress Addr3', - 'ShipAddress Addr4', - 'ShipAddress Addr5', - 'ShipAddress City', - 'ShipAddress State', - 'ShipAddress County', - 'ShipAddress Province', - 'ShipAddress PostalCode', - 'ShipAddress Country', - 'ShipAddress Note', - 'IsPending', - 'CheckNumber', - 'PaymentMethodRef ListID', - 'PaymentMethodRef FullName', - 'DueDate', - 'SalesRepRef ListID', - 'SalesRepRef FullName', - 'ShipDate', - 'ShipMethodRef ListID', - 'ShipMethodRef FullName', - 'FOB', - 'ItemSalesTaxRef ListID', - 'ItemSalesTaxRef FullName', - 'Memo', - 'CustomerMsgRef ListID', - 'CustomerMsgRef FullName', - 'IsToBePrinted', - 'IsToBeEmailed', - 'IsTaxIncluded', - 'CustomerSalesTaxCodeRef ListID', - 'CustomerSalesTaxCodeRef FullName', - 'DepositToAccountRef ListID', - 'DepositToAccountRef FullName', - 'CreditCardTxnInfo CreditCardTxnInputInfo CreditCardNumber', - 'CreditCardTxnInfo CreditCardTxnInputInfo ExpirationMonth', - 'CreditCardTxnInfo CreditCardTxnInputInfo ExpirationYear', - 'CreditCardTxnInfo CreditCardTxnInputInfo NameOnCard', - 'CreditCardTxnInfo CreditCardTxnInputInfo CreditCardAddress', - 'CreditCardTxnInfo CreditCardTxnInputInfo CreditCardPostalCode', - 'CreditCardTxnInfo CreditCardTxnInputInfo CommercialCardCode', - 'CreditCardTxnInfo CreditCardTxnInputInfo TransactionMode', - 'CreditCardTxnInfo CreditCardTxnInputInfo CreditCardTxnType', - 'CreditCardTxnInfo CreditCardTxnResultInfo ResultCode', - 'CreditCardTxnInfo CreditCardTxnResultInfo ResultMessage', - 'CreditCardTxnInfo CreditCardTxnResultInfo CreditCardTransID', - 'CreditCardTxnInfo CreditCardTxnResultInfo MerchantAccountNumber', - 'CreditCardTxnInfo CreditCardTxnResultInfo AuthorizationCode', - 'CreditCardTxnInfo CreditCardTxnResultInfo AVSStreet', - 'CreditCardTxnInfo CreditCardTxnResultInfo AVSZip', - 'CreditCardTxnInfo CreditCardTxnResultInfo CardSecurityCodeMatch', - 'CreditCardTxnInfo CreditCardTxnResultInfo ReconBatchID', - 'CreditCardTxnInfo CreditCardTxnResultInfo PaymentGroupingCode', - 'CreditCardTxnInfo CreditCardTxnResultInfo PaymentStatus', - 'CreditCardTxnInfo CreditCardTxnResultInfo TxnAuthorizationTime', - 'CreditCardTxnInfo CreditCardTxnResultInfo TxnAuthorizationStamp', - 'CreditCardTxnInfo CreditCardTxnResultInfo ClientTransID', - 'Other', - 'SalesReceiptLineAdd', - 'SalesReceiptLineAdd ItemRef', - 'SalesReceiptLineAdd ItemRef ListID', - 'SalesReceiptLineAdd ItemRef FullName', - 'SalesReceiptLineAdd Desc', - 'SalesReceiptLineAdd Quantity', - 'SalesReceiptLineAdd UnitOfMeasure', - 'SalesReceiptLineAdd Rate', - 'SalesReceiptLineAdd RatePercent', - 'SalesReceiptLineAdd PriceLevelRef ListID', - 'SalesReceiptLineAdd PriceLevelRef FullName', - 'SalesReceiptLineAdd ClassRef ListID', - 'SalesReceiptLineAdd ClassRef FullName', - 'SalesReceiptLineAdd Amount', - 'SalesReceiptLineAdd InventorySiteRef ListID', - 'SalesReceiptLineAdd InventorySiteRef FullName', - 'SalesReceiptLineAdd ServiceDate', - 'SalesReceiptLineAdd SalesTaxCodeRef ListID', - 'SalesReceiptLineAdd SalesTaxCodeRef FullName', - 'SalesReceiptLineAdd IsTaxable', - 'SalesReceiptLineAdd OverrideItemAccountRef ListID', - 'SalesReceiptLineAdd OverrideItemAccountRef FullName', - 'SalesReceiptLineAdd Other1', - 'SalesReceiptLineAdd Other2', - 'SalesReceiptLineAdd', - 'SalesReceiptLineAdd CreditCardTxnInfo', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo CreditCardNumber', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo ExpirationMonth', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo ExpirationYear', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo NameOnCard', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo CreditCardAddress', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo CreditCardPostalCode', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo CommercialCardCode', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo TransactionMode', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo CreditCardTxnType', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo ResultCode', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo ResultMessage', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo CreditCardTransID', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo MerchantAccountNumber', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo AuthorizationCode', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo AVSStreet', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo AVSZip', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo CardSecurityCodeMatch', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo ReconBatchID', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo PaymentGroupingCode', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo PaymentStatus', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo TxnAuthorizationTime', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo TxnAuthorizationStamp', - 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo ClientTransID', - 'SalesReceiptLineAdd DataExt OwnerID', - 'SalesReceiptLineAdd DataExt DataExtName', - 'SalesReceiptLineAdd DataExt DataExtValue', - 'SalesReceiptLineGroupAdd ItemGroupRef ListID', - 'SalesReceiptLineGroupAdd ItemGroupRef FullName', - 'SalesReceiptLineGroupAdd Desc', - 'SalesReceiptLineGroupAdd Quantity', - 'SalesReceiptLineGroupAdd UnitOfMeasure', - 'SalesReceiptLineGroupAdd ServiceDate', - 'SalesReceiptLineGroupAdd DataExt OwnerID', - 'SalesReceiptLineGroupAdd DataExt DataExtName', - 'SalesReceiptLineGroupAdd DataExt DataExtValue', - 'DiscountLineAdd', - 'DiscountLineAdd Amount', - 'DiscountLineAdd RatePercent', - 'DiscountLineAdd IsTaxable', - 'DiscountLineAdd AccountRef ListID', - 'DiscountLineAdd AccountRef FullName', - 'SalesTaxLineAdd', - 'SalesTaxLineAdd Amount', - 'SalesTaxLineAdd RatePercent', - 'SalesTaxLineAdd AccountRef ListID', - 'SalesTaxLineAdd AccountRef FullName', - 'ShippingLineAdd', - 'ShippingLineAdd Amount', - 'ShippingLineAdd AccountRef ListID', - 'ShippingLineAdd AccountRef FullName', - 'IncludeRetElement', + 'CustomerRef ListID', + 'CustomerRef FullName', + 'ClassRef ListID', + 'ClassRef FullName', + 'TemplateRef ListID', + 'TemplateRef FullName', + 'TxnDate', + 'RefNumber', + 'BillAddress Addr1', + 'BillAddress Addr2', + 'BillAddress Addr3', + 'BillAddress Addr4', + 'BillAddress Addr5', + 'BillAddress City', + 'BillAddress State', + 'BillAddress County', + 'BillAddress Province', + 'BillAddress PostalCode', + 'BillAddress Country', + 'BillAddress Note', + 'ShipAddress Addr1', + 'ShipAddress Addr2', + 'ShipAddress Addr3', + 'ShipAddress Addr4', + 'ShipAddress Addr5', + 'ShipAddress City', + 'ShipAddress State', + 'ShipAddress County', + 'ShipAddress Province', + 'ShipAddress PostalCode', + 'ShipAddress Country', + 'ShipAddress Note', + 'IsPending', + 'CheckNumber', + 'PaymentMethodRef ListID', + 'PaymentMethodRef FullName', + 'DueDate', + 'SalesRepRef ListID', + 'SalesRepRef FullName', + 'ShipDate', + 'ShipMethodRef ListID', + 'ShipMethodRef FullName', + 'FOB', + 'ItemSalesTaxRef ListID', + 'ItemSalesTaxRef FullName', + 'Memo', + 'CustomerMsgRef ListID', + 'CustomerMsgRef FullName', + 'IsToBePrinted', + 'IsToBeEmailed', + 'IsTaxIncluded', + 'CustomerSalesTaxCodeRef ListID', + 'CustomerSalesTaxCodeRef FullName', + 'DepositToAccountRef ListID', + 'DepositToAccountRef FullName', + 'CreditCardTxnInfo CreditCardTxnInputInfo CreditCardNumber', + 'CreditCardTxnInfo CreditCardTxnInputInfo ExpirationMonth', + 'CreditCardTxnInfo CreditCardTxnInputInfo ExpirationYear', + 'CreditCardTxnInfo CreditCardTxnInputInfo NameOnCard', + 'CreditCardTxnInfo CreditCardTxnInputInfo CreditCardAddress', + 'CreditCardTxnInfo CreditCardTxnInputInfo CreditCardPostalCode', + 'CreditCardTxnInfo CreditCardTxnInputInfo CommercialCardCode', + 'CreditCardTxnInfo CreditCardTxnInputInfo TransactionMode', + 'CreditCardTxnInfo CreditCardTxnInputInfo CreditCardTxnType', + 'CreditCardTxnInfo CreditCardTxnResultInfo ResultCode', + 'CreditCardTxnInfo CreditCardTxnResultInfo ResultMessage', + 'CreditCardTxnInfo CreditCardTxnResultInfo CreditCardTransID', + 'CreditCardTxnInfo CreditCardTxnResultInfo MerchantAccountNumber', + 'CreditCardTxnInfo CreditCardTxnResultInfo AuthorizationCode', + 'CreditCardTxnInfo CreditCardTxnResultInfo AVSStreet', + 'CreditCardTxnInfo CreditCardTxnResultInfo AVSZip', + 'CreditCardTxnInfo CreditCardTxnResultInfo CardSecurityCodeMatch', + 'CreditCardTxnInfo CreditCardTxnResultInfo ReconBatchID', + 'CreditCardTxnInfo CreditCardTxnResultInfo PaymentGroupingCode', + 'CreditCardTxnInfo CreditCardTxnResultInfo PaymentStatus', + 'CreditCardTxnInfo CreditCardTxnResultInfo TxnAuthorizationTime', + 'CreditCardTxnInfo CreditCardTxnResultInfo TxnAuthorizationStamp', + 'CreditCardTxnInfo CreditCardTxnResultInfo ClientTransID', + 'Other', + 'SalesReceiptLineAdd', + 'SalesReceiptLineAdd ItemRef', + 'SalesReceiptLineAdd ItemRef ListID', + 'SalesReceiptLineAdd ItemRef FullName', + 'SalesReceiptLineAdd Desc', + 'SalesReceiptLineAdd Quantity', + 'SalesReceiptLineAdd UnitOfMeasure', + 'SalesReceiptLineAdd Rate', + 'SalesReceiptLineAdd RatePercent', + 'SalesReceiptLineAdd PriceLevelRef ListID', + 'SalesReceiptLineAdd PriceLevelRef FullName', + 'SalesReceiptLineAdd ClassRef ListID', + 'SalesReceiptLineAdd ClassRef FullName', + 'SalesReceiptLineAdd Amount', + 'SalesReceiptLineAdd InventorySiteRef ListID', + 'SalesReceiptLineAdd InventorySiteRef FullName', + 'SalesReceiptLineAdd ServiceDate', + 'SalesReceiptLineAdd SalesTaxCodeRef ListID', + 'SalesReceiptLineAdd SalesTaxCodeRef FullName', + 'SalesReceiptLineAdd IsTaxable', + 'SalesReceiptLineAdd OverrideItemAccountRef ListID', + 'SalesReceiptLineAdd OverrideItemAccountRef FullName', + 'SalesReceiptLineAdd Other1', + 'SalesReceiptLineAdd Other2', + 'SalesReceiptLineAdd', + 'SalesReceiptLineAdd CreditCardTxnInfo', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo CreditCardNumber', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo ExpirationMonth', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo ExpirationYear', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo NameOnCard', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo CreditCardAddress', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo CreditCardPostalCode', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo CommercialCardCode', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo TransactionMode', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnInputInfo CreditCardTxnType', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo ResultCode', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo ResultMessage', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo CreditCardTransID', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo MerchantAccountNumber', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo AuthorizationCode', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo AVSStreet', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo AVSZip', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo CardSecurityCodeMatch', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo ReconBatchID', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo PaymentGroupingCode', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo PaymentStatus', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo TxnAuthorizationTime', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo TxnAuthorizationStamp', + 'SalesReceiptLineAdd CreditCardTxnInfo CreditCardTxnResultInfo ClientTransID', + 'SalesReceiptLineAdd DataExt OwnerID', + 'SalesReceiptLineAdd DataExt DataExtName', + 'SalesReceiptLineAdd DataExt DataExtValue', + 'SalesReceiptLineGroupAdd ItemGroupRef ListID', + 'SalesReceiptLineGroupAdd ItemGroupRef FullName', + 'SalesReceiptLineGroupAdd Desc', + 'SalesReceiptLineGroupAdd Quantity', + 'SalesReceiptLineGroupAdd UnitOfMeasure', + 'SalesReceiptLineGroupAdd ServiceDate', + 'SalesReceiptLineGroupAdd DataExt OwnerID', + 'SalesReceiptLineGroupAdd DataExt DataExtName', + 'SalesReceiptLineGroupAdd DataExt DataExtValue', + 'DiscountLineAdd', + 'DiscountLineAdd Amount', + 'DiscountLineAdd RatePercent', + 'DiscountLineAdd IsTaxable', + 'DiscountLineAdd AccountRef ListID', + 'DiscountLineAdd AccountRef FullName', + 'SalesTaxLineAdd', + 'SalesTaxLineAdd Amount', + 'SalesTaxLineAdd RatePercent', + 'SalesTaxLineAdd AccountRef ListID', + 'SalesTaxLineAdd AccountRef FullName', + 'ShippingLineAdd', + 'ShippingLineAdd Amount', + 'ShippingLineAdd AccountRef ListID', + 'ShippingLineAdd AccountRef FullName', + 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SalesReceiptModRq.php b/QuickBooks/QBXML/Schema/Object/SalesReceiptModRq.php index e957dd40..e208edc9 100755 --- a/QuickBooks/QBXML/Schema/Object/SalesReceiptModRq.php +++ b/QuickBooks/QBXML/Schema/Object/SalesReceiptModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: SalesReceiptModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SalesReceiptModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'SalesReceiptMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -144,10 +144,10 @@ protected function &_dataTypePaths() 'SalesReceiptLineGroupMod SalesReceiptLineMod Other2' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -260,10 +260,10 @@ protected function &_maxLengthPaths() 'SalesReceiptLineGroupMod SalesReceiptLineMod Other2' => 29, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -377,7 +377,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -490,10 +490,10 @@ protected function &_sinceVersionPaths() 'SalesReceiptLineGroupMod SalesReceiptLineMod Other2' => 6, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -606,22 +606,22 @@ protected function &_isRepeatablePaths() 'SalesReceiptLineGroupMod SalesReceiptLineMod Other2' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -734,7 +734,7 @@ protected function &_reorderPathsPaths() 'SalesReceiptLineGroupMod SalesReceiptLineMod Other2', 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SalesReceiptQueryRq.php b/QuickBooks/QBXML/Schema/Object/SalesReceiptQueryRq.php index 609c290f..52052dea 100755 --- a/QuickBooks/QBXML/Schema/Object/SalesReceiptQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/SalesReceiptQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: SalesReceiptQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SalesReceiptQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -92,10 +92,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -125,7 +125,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -154,10 +154,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -186,22 +186,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -230,7 +230,7 @@ protected function &_reorderPathsPaths() 22 => 'IncludeRetElement', 23 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SalesRepAddRq.php b/QuickBooks/QBXML/Schema/Object/SalesRepAddRq.php index 23a6fdc8..ba5a5a8c 100755 --- a/QuickBooks/QBXML/Schema/Object/SalesRepAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/SalesRepAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: SalesRepAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SalesRepAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'SalesRepAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -41,10 +41,10 @@ protected function &_dataTypePaths() 'SalesRepEntityRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -54,10 +54,10 @@ protected function &_maxLengthPaths() 'SalesRepEntityRef FullName' => 41, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -68,7 +68,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -78,10 +78,10 @@ protected function &_sinceVersionPaths() 'SalesRepEntityRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -91,22 +91,22 @@ protected function &_isRepeatablePaths() 'SalesRepEntityRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -116,7 +116,7 @@ protected function &_reorderPathsPaths() 3 => 'SalesRepEntityRef FullName', 4 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SalesRepModRq.php b/QuickBooks/QBXML/Schema/Object/SalesRepModRq.php index 40710c57..cb55809e 100755 --- a/QuickBooks/QBXML/Schema/Object/SalesRepModRq.php +++ b/QuickBooks/QBXML/Schema/Object/SalesRepModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: SalesRepModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SalesRepModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'SalesRepMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -43,10 +43,10 @@ protected function &_dataTypePaths() 'SalesRepEntityRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -58,10 +58,10 @@ protected function &_maxLengthPaths() 'SalesRepEntityRef FullName' => 41, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -74,7 +74,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -86,10 +86,10 @@ protected function &_sinceVersionPaths() 'SalesRepEntityRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -101,22 +101,22 @@ protected function &_isRepeatablePaths() 'SalesRepEntityRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -128,7 +128,7 @@ protected function &_reorderPathsPaths() 5 => 'SalesRepEntityRef FullName', 6 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SalesRepQueryRq.php b/QuickBooks/QBXML/Schema/Object/SalesRepQueryRq.php index 0c0b38f8..27869f87 100755 --- a/QuickBooks/QBXML/Schema/Object/SalesRepQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/SalesRepQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: SalesRepQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SalesRepQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SalesTaxCodeAddRq.php b/QuickBooks/QBXML/Schema/Object/SalesTaxCodeAddRq.php index f8bd7926..a5037925 100755 --- a/QuickBooks/QBXML/Schema/Object/SalesTaxCodeAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/SalesTaxCodeAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: SalesTaxCodeAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SalesTaxCodeAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'SalesTaxCodeAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -45,10 +45,10 @@ protected function &_dataTypePaths() 'ItemSalesTaxRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -62,10 +62,10 @@ protected function &_maxLengthPaths() 'ItemSalesTaxRef FullName' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -80,7 +80,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_sinceVersionPaths() 'ItemSalesTaxRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -111,22 +111,22 @@ protected function &_isRepeatablePaths() 'ItemSalesTaxRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -140,7 +140,7 @@ protected function &_reorderPathsPaths() 7 => 'ItemSalesTaxRef FullName', 8 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SalesTaxCodeQueryRq.php b/QuickBooks/QBXML/Schema/Object/SalesTaxCodeQueryRq.php index adf9c279..80269f0f 100755 --- a/QuickBooks/QBXML/Schema/Object/SalesTaxCodeQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/SalesTaxCodeQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: SalesTaxCodeQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SalesTaxCodeQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ShipMethodAddRq.php b/QuickBooks/QBXML/Schema/Object/ShipMethodAddRq.php index 512efee3..56d1c2db 100755 --- a/QuickBooks/QBXML/Schema/Object/ShipMethodAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/ShipMethodAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ShipMethodAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ShipMethodAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'ShipMethodAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -39,10 +39,10 @@ protected function &_dataTypePaths() 'IsActive' => 'BOOLTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -50,10 +50,10 @@ protected function &_maxLengthPaths() 'IsActive' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -62,7 +62,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -70,10 +70,10 @@ protected function &_sinceVersionPaths() 'IsActive' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -81,22 +81,22 @@ protected function &_isRepeatablePaths() 'IsActive' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -104,7 +104,7 @@ protected function &_reorderPathsPaths() 1 => 'IsActive', 2 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/ShipMethodQueryRq.php b/QuickBooks/QBXML/Schema/Object/ShipMethodQueryRq.php index 34268ecd..5886a521 100755 --- a/QuickBooks/QBXML/Schema/Object/ShipMethodQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/ShipMethodQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: ShipMethodQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_ShipMethodQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/SpecialItemAddRq.php b/QuickBooks/QBXML/Schema/Object/SpecialItemAddRq.php index 276d24d9..57741a96 100755 --- a/QuickBooks/QBXML/Schema/Object/SpecialItemAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/SpecialItemAddRq.php @@ -2,56 +2,56 @@ /** * Schema object for: SpecialItemAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_SpecialItemAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'SpecialItemAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( 'SpecialItemType' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( 'SpecialItemType' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -59,46 +59,46 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( 'SpecialItemType' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( 'SpecialItemType' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( 0 => 'SpecialItemType', 1 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/StandardTermsAddRq.php b/QuickBooks/QBXML/Schema/Object/StandardTermsAddRq.php index 131d1289..f41ad564 100755 --- a/QuickBooks/QBXML/Schema/Object/StandardTermsAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/StandardTermsAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: StandardTermsAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_StandardTermsAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'StandardTermsAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -42,10 +42,10 @@ protected function &_dataTypePaths() 'DiscountPct' => 'PERCENTTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -56,10 +56,10 @@ protected function &_maxLengthPaths() 'DiscountPct' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -71,7 +71,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -82,10 +82,10 @@ protected function &_sinceVersionPaths() 'DiscountPct' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -96,22 +96,22 @@ protected function &_isRepeatablePaths() 'DiscountPct' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -122,7 +122,7 @@ protected function &_reorderPathsPaths() 4 => 'DiscountPct', 5 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/StandardTermsQueryRq.php b/QuickBooks/QBXML/Schema/Object/StandardTermsQueryRq.php index a9ecf87c..c61e3341 100755 --- a/QuickBooks/QBXML/Schema/Object/StandardTermsQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/StandardTermsQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: StandardTermsQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_StandardTermsQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/Template.php b/QuickBooks/QBXML/Schema/Object/Template.php index a329dcd9..c7a46fa6 100755 --- a/QuickBooks/QBXML/Schema/Object/Template.php +++ b/QuickBooks/QBXML/Schema/Object/Template.php @@ -2,85 +2,85 @@ /** * Schema object for: Template - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_Template extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = '_qbxmlWrapper'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = '_dataTypePaths'; - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = '_maxLengthPaths'; - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = '_isOptionalPaths'; } - + protected function &_sinceVersionPaths() { static $paths = '_sinceVersionPaths'; - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = '_isRepeatablePaths'; - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = '_reorderPaths'; - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/TxnDelRq.php b/QuickBooks/QBXML/Schema/Object/TxnDelRq.php index ce33afa1..8069ec6f 100755 --- a/QuickBooks/QBXML/Schema/Object/TxnDelRq.php +++ b/QuickBooks/QBXML/Schema/Object/TxnDelRq.php @@ -2,56 +2,56 @@ /** * Schema object for: TxnDelRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_TxnDelRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( 'TxnDelType' => 'ENUMTYPE', 'TxnID' => 'IDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( 'TxnDelType' => 0, 'TxnID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -59,46 +59,46 @@ protected function &_isOptionalPaths() 'TxnID' => false, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( 'TxnDelType' => 999.99, 'TxnID' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( 'TxnDelType' => false, 'TxnID' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( 0 => 'TxnDelType', 1 => 'TxnID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/TxnVoidRq.php b/QuickBooks/QBXML/Schema/Object/TxnVoidRq.php index 6aa66ba8..3dce3d75 100755 --- a/QuickBooks/QBXML/Schema/Object/TxnVoidRq.php +++ b/QuickBooks/QBXML/Schema/Object/TxnVoidRq.php @@ -2,56 +2,56 @@ /** * Schema object for: TxnVoidRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_TxnVoidRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( 'TxnVoidType' => 'ENUMTYPE', 'TxnID' => 'IDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( 'TxnVoidType' => 0, 'TxnID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -59,46 +59,46 @@ protected function &_isOptionalPaths() 'TxnID' => false, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( 'TxnVoidType' => 999.99, 'TxnID' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( 'TxnVoidType' => false, 'TxnID' => false, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( 0 => 'TxnVoidType', 1 => 'TxnID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/UnitOfMeasureSetAddRq.php b/QuickBooks/QBXML/Schema/Object/UnitOfMeasureSetAddRq.php index 60e99583..56be84f7 100755 --- a/QuickBooks/QBXML/Schema/Object/UnitOfMeasureSetAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/UnitOfMeasureSetAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: UnitOfMeasureSetAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_UnitOfMeasureSetAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'UnitOfMeasureSetAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'DefaultUnit Unit' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'DefaultUnit Unit' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'DefaultUnit Unit' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -114,31 +114,31 @@ protected function &_isRepeatablePaths() 'UnitOfMeasureType' => false, 'BaseUnit Name' => false, 'BaseUnit Abbreviation' => false, - 'RelatedUnit' => true, + 'RelatedUnit' => true, 'RelatedUnit Name' => false, 'RelatedUnit Abbreviation' => false, 'RelatedUnit ConversionRatio' => false, - 'DefaultUnit' => true, + 'DefaultUnit' => true, 'DefaultUnit UnitUsedFor' => false, 'DefaultUnit Unit' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -147,16 +147,16 @@ protected function &_reorderPathsPaths() 2 => 'UnitOfMeasureType', 3 => 'BaseUnit Name', 4 => 'BaseUnit Abbreviation', - 5 => 'RelatedUnit', + 5 => 'RelatedUnit', 6 => 'RelatedUnit Name', 7 => 'RelatedUnit Abbreviation', 8 => 'RelatedUnit ConversionRatio', - 9 => 'DefaultUnit', + 9 => 'DefaultUnit', 10 => 'DefaultUnit UnitUsedFor', 11 => 'DefaultUnit Unit', 12 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/UnitOfMeasureSetQueryRq.php b/QuickBooks/QBXML/Schema/Object/UnitOfMeasureSetQueryRq.php index 3f5d0b91..71b22ba1 100755 --- a/QuickBooks/QBXML/Schema/Object/UnitOfMeasureSetQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/UnitOfMeasureSetQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: UnitOfMeasureSetQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_UnitOfMeasureSetQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VehicleAddRq.php b/QuickBooks/QBXML/Schema/Object/VehicleAddRq.php index 3f967bbe..1c0fd921 100755 --- a/QuickBooks/QBXML/Schema/Object/VehicleAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/VehicleAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: VehicleAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_VehicleAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'VehicleAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -40,10 +40,10 @@ protected function &_dataTypePaths() 'Desc' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -52,10 +52,10 @@ protected function &_maxLengthPaths() 'Desc' => 256, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -65,7 +65,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -74,10 +74,10 @@ protected function &_sinceVersionPaths() 'Desc' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -86,22 +86,22 @@ protected function &_isRepeatablePaths() 'Desc' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -110,7 +110,7 @@ protected function &_reorderPathsPaths() 2 => 'Desc', 3 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VehicleMileageAddRq.php b/QuickBooks/QBXML/Schema/Object/VehicleMileageAddRq.php index 71f12329..b0063c49 100755 --- a/QuickBooks/QBXML/Schema/Object/VehicleMileageAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/VehicleMileageAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: VehicleMileageAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_VehicleMileageAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'VehicleMileageAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -52,10 +52,10 @@ protected function &_dataTypePaths() 'BillableStatus' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -76,10 +76,10 @@ protected function &_maxLengthPaths() 'BillableStatus' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -101,7 +101,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -122,10 +122,10 @@ protected function &_sinceVersionPaths() 'BillableStatus' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -146,22 +146,22 @@ protected function &_isRepeatablePaths() 'BillableStatus' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -182,7 +182,7 @@ protected function &_reorderPathsPaths() 14 => 'BillableStatus', 15 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VehicleMileageQueryRq.php b/QuickBooks/QBXML/Schema/Object/VehicleMileageQueryRq.php index c509eb2c..dee789fa 100755 --- a/QuickBooks/QBXML/Schema/Object/VehicleMileageQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/VehicleMileageQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: VehicleMileageQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_VehicleMileageQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -44,10 +44,10 @@ protected function &_dataTypePaths() 'TxnDateRangeFilter DateMacro' => 'ENUMTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_maxLengthPaths() 'TxnDateRangeFilter DateMacro' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -77,7 +77,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -90,10 +90,10 @@ protected function &_sinceVersionPaths() 'TxnDateRangeFilter DateMacro' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -106,22 +106,22 @@ protected function &_isRepeatablePaths() 'TxnDateRangeFilter DateMacro' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -134,7 +134,7 @@ protected function &_reorderPathsPaths() 6 => 'TxnDateRangeFilter DateMacro', 7 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VehicleModRq.php b/QuickBooks/QBXML/Schema/Object/VehicleModRq.php index 76be0c85..ceb0d572 100755 --- a/QuickBooks/QBXML/Schema/Object/VehicleModRq.php +++ b/QuickBooks/QBXML/Schema/Object/VehicleModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: VehicleModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_VehicleModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'VehicleMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -42,10 +42,10 @@ protected function &_dataTypePaths() 'Desc' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -56,10 +56,10 @@ protected function &_maxLengthPaths() 'Desc' => 256, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -71,7 +71,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -82,10 +82,10 @@ protected function &_sinceVersionPaths() 'Desc' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -96,22 +96,22 @@ protected function &_isRepeatablePaths() 'Desc' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -122,7 +122,7 @@ protected function &_reorderPathsPaths() 4 => 'Desc', 5 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VehicleQueryRq.php b/QuickBooks/QBXML/Schema/Object/VehicleQueryRq.php index a308aa20..7e8af24d 100755 --- a/QuickBooks/QBXML/Schema/Object/VehicleQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/VehicleQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: VehicleQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_VehicleQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VendorAddRq.php b/QuickBooks/QBXML/Schema/Object/VendorAddRq.php index 27d7ec70..b46d05ab 100755 --- a/QuickBooks/QBXML/Schema/Object/VendorAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/VendorAddRq.php @@ -2,31 +2,31 @@ /** * Schema object for: VendorAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Schema/Object.php'); /** - * + * */ class QuickBooks_QBXML_Schema_Object_VendorAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'VendorAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -72,10 +72,10 @@ protected function &_dataTypePaths() 'BillingRateRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -121,10 +121,10 @@ protected function &_maxLengthPaths() 'BillingRateRef FullName' => 159, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -171,7 +171,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -217,10 +217,10 @@ protected function &_sinceVersionPaths() 'BillingRateRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -266,22 +266,22 @@ protected function &_isRepeatablePaths() 'BillingRateRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -327,7 +327,7 @@ protected function &_reorderPathsPaths() 39 => 'BillingRateRef FullName', 40 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VendorCreditAddRq.php b/QuickBooks/QBXML/Schema/Object/VendorCreditAddRq.php index 295d3bea..e6966c84 100755 --- a/QuickBooks/QBXML/Schema/Object/VendorCreditAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/VendorCreditAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: VendorCreditAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_VendorCreditAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -80,10 +80,10 @@ protected function &_dataTypePaths() 'VendorCreditAdd ItemGroupLineAdd UnitOfMeasure' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -132,10 +132,10 @@ protected function &_maxLengthPaths() 'VendorCreditAdd ItemGroupLineAdd UnitOfMeasure' => 31, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -185,7 +185,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -234,10 +234,10 @@ protected function &_sinceVersionPaths() 'VendorCreditAdd ItemGroupLineAdd UnitOfMeasure' => 7, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -286,22 +286,22 @@ protected function &_isRepeatablePaths() 'VendorCreditAdd ItemGroupLineAdd UnitOfMeasure' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -355,7 +355,7 @@ protected function &_reorderPathsPaths() 47 => 'VendorCreditAdd ItemGroupLineAdd UnitOfMeasure', 48 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VendorCreditQueryRq.php b/QuickBooks/QBXML/Schema/Object/VendorCreditQueryRq.php index 5acb882c..061006de 100755 --- a/QuickBooks/QBXML/Schema/Object/VendorCreditQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/VendorCreditQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: VendorCreditQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_VendorCreditQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -61,10 +61,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -94,10 +94,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -128,7 +128,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -158,10 +158,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -191,22 +191,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -236,7 +236,7 @@ protected function &_reorderPathsPaths() 23 => 'IncludeRetElement', 24 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VendorModRq.php b/QuickBooks/QBXML/Schema/Object/VendorModRq.php index 0726e536..cad8e9f2 100755 --- a/QuickBooks/QBXML/Schema/Object/VendorModRq.php +++ b/QuickBooks/QBXML/Schema/Object/VendorModRq.php @@ -2,31 +2,31 @@ /** * Schema object for: VendorModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ QuickBooks_Loader::load('/QuickBooks/QBXML/Schema/Object.php'); /** - * + * */ class QuickBooks_QBXML_Schema_Object_VendorModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'VendorMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -72,10 +72,10 @@ protected function &_dataTypePaths() 'BillingRateRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -121,10 +121,10 @@ protected function &_maxLengthPaths() 'BillingRateRef FullName' => 159, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -171,7 +171,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -217,10 +217,10 @@ protected function &_sinceVersionPaths() 'BillingRateRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -266,22 +266,22 @@ protected function &_isRepeatablePaths() 'BillingRateRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -327,7 +327,7 @@ protected function &_reorderPathsPaths() 39 => 'BillingRateRef FullName', 40 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VendorQueryRq.php b/QuickBooks/QBXML/Schema/Object/VendorQueryRq.php index 3704d1bb..1821406d 100755 --- a/QuickBooks/QBXML/Schema/Object/VendorQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/VendorQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: VendorQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_VendorQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -50,10 +50,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -72,10 +72,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -95,7 +95,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -114,10 +114,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -136,22 +136,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -170,7 +170,7 @@ protected function &_reorderPathsPaths() 12 => 'IncludeRetElement', 13 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VendorTypeAddRq.php b/QuickBooks/QBXML/Schema/Object/VendorTypeAddRq.php index 8698157d..afaec5de 100755 --- a/QuickBooks/QBXML/Schema/Object/VendorTypeAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/VendorTypeAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: VendorTypeAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_VendorTypeAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -41,10 +41,10 @@ protected function &_dataTypePaths() 'VendorTypeAdd ParentRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -54,10 +54,10 @@ protected function &_maxLengthPaths() 'VendorTypeAdd ParentRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -68,7 +68,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -78,10 +78,10 @@ protected function &_sinceVersionPaths() 'VendorTypeAdd ParentRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -91,22 +91,22 @@ protected function &_isRepeatablePaths() 'VendorTypeAdd ParentRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -116,7 +116,7 @@ protected function &_reorderPathsPaths() 3 => 'VendorTypeAdd ParentRef FullName', 4 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/VendorTypeQueryRq.php b/QuickBooks/QBXML/Schema/Object/VendorTypeQueryRq.php index 32b73a25..cbcf419f 100755 --- a/QuickBooks/QBXML/Schema/Object/VendorTypeQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/VendorTypeQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: VendorTypeQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_VendorTypeQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -47,10 +47,10 @@ protected function &_dataTypePaths() 'NameRangeFilter ToName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -66,10 +66,10 @@ protected function &_maxLengthPaths() 'NameRangeFilter ToName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -86,7 +86,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -102,10 +102,10 @@ protected function &_sinceVersionPaths() 'NameRangeFilter ToName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -121,22 +121,22 @@ protected function &_isRepeatablePaths() 'NameRangeFilter ToName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -152,7 +152,7 @@ protected function &_reorderPathsPaths() 9 => 'NameRangeFilter ToName', 10 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/WorkersCompCodeAddRq.php b/QuickBooks/QBXML/Schema/Object/WorkersCompCodeAddRq.php index 44bf40ec..cd75b905 100755 --- a/QuickBooks/QBXML/Schema/Object/WorkersCompCodeAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/WorkersCompCodeAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: WorkersCompCodeAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_WorkersCompCodeAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -42,10 +42,10 @@ protected function &_dataTypePaths() 'WorkersCompCodeAdd RateEntry EffectiveDate' => 'DATETYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -56,10 +56,10 @@ protected function &_maxLengthPaths() 'WorkersCompCodeAdd RateEntry EffectiveDate' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -71,7 +71,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -82,10 +82,10 @@ protected function &_sinceVersionPaths() 'WorkersCompCodeAdd RateEntry EffectiveDate' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -96,22 +96,22 @@ protected function &_isRepeatablePaths() 'WorkersCompCodeAdd RateEntry EffectiveDate' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -122,7 +122,7 @@ protected function &_reorderPathsPaths() 4 => 'WorkersCompCodeAdd RateEntry EffectiveDate', 5 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/WorkersCompCodeModRq.php b/QuickBooks/QBXML/Schema/Object/WorkersCompCodeModRq.php index 09e19c87..0646b7c4 100755 --- a/QuickBooks/QBXML/Schema/Object/WorkersCompCodeModRq.php +++ b/QuickBooks/QBXML/Schema/Object/WorkersCompCodeModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: WorkersCompCodeModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_WorkersCompCodeModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -44,10 +44,10 @@ protected function &_dataTypePaths() 'WorkersCompCodeMod RateEntry EffectiveDate' => 'DATETYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -60,10 +60,10 @@ protected function &_maxLengthPaths() 'WorkersCompCodeMod RateEntry EffectiveDate' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -77,7 +77,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -90,10 +90,10 @@ protected function &_sinceVersionPaths() 'WorkersCompCodeMod RateEntry EffectiveDate' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -106,22 +106,22 @@ protected function &_isRepeatablePaths() 'WorkersCompCodeMod RateEntry EffectiveDate' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -134,7 +134,7 @@ protected function &_reorderPathsPaths() 6 => 'WorkersCompCodeMod RateEntry EffectiveDate', 7 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/WorkersCompCodeQueryRq.php b/QuickBooks/QBXML/Schema/Object/WorkersCompCodeQueryRq.php index a416a616..ede3807d 100755 --- a/QuickBooks/QBXML/Schema/Object/WorkersCompCodeQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/WorkersCompCodeQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: WorkersCompCodeQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_WorkersCompCodeQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -49,10 +49,10 @@ protected function &_dataTypePaths() 'ToEffectiveDate' => 'DATETYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -70,10 +70,10 @@ protected function &_maxLengthPaths() 'ToEffectiveDate' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -92,7 +92,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -110,10 +110,10 @@ protected function &_sinceVersionPaths() 'ToEffectiveDate' => 999.99, 'IncludeRetElement' => 999.99, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -131,22 +131,22 @@ protected function &_isRepeatablePaths() 'ToEffectiveDate' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -164,7 +164,7 @@ protected function &_reorderPathsPaths() 11 => 'ToEffectiveDate', 12 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/tmp/CustomerAddRq.php b/QuickBooks/QBXML/Schema/Object/tmp/CustomerAddRq.php index 768303a7..01221add 100755 --- a/QuickBooks/QBXML/Schema/Object/tmp/CustomerAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/tmp/CustomerAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CustomerAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomerAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'CustomerAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -112,10 +112,10 @@ protected function &_dataTypePaths() 'PriceLevelRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -196,10 +196,10 @@ protected function &_maxLengthPaths() 'PriceLevelRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -281,7 +281,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -362,10 +362,10 @@ protected function &_sinceVersionPaths() 'PriceLevelRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -446,22 +446,22 @@ protected function &_isRepeatablePaths() 'PriceLevelRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -542,7 +542,7 @@ protected function &_reorderPathsPaths() 74 => 'PriceLevelRef FullName', 75 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/tmp/CustomerModRq.php b/QuickBooks/QBXML/Schema/Object/tmp/CustomerModRq.php index 47ac06ad..0301821c 100755 --- a/QuickBooks/QBXML/Schema/Object/tmp/CustomerModRq.php +++ b/QuickBooks/QBXML/Schema/Object/tmp/CustomerModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CustomerModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomerModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'CustomerMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -112,10 +112,10 @@ protected function &_dataTypePaths() 'PriceLevelRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -196,10 +196,10 @@ protected function &_maxLengthPaths() 'PriceLevelRef FullName' => 0, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -281,7 +281,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -362,10 +362,10 @@ protected function &_sinceVersionPaths() 'PriceLevelRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -446,22 +446,22 @@ protected function &_isRepeatablePaths() 'PriceLevelRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -542,7 +542,7 @@ protected function &_reorderPathsPaths() 74 => 'PriceLevelRef FullName', 75 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/tmp/CustomerQueryRq.php b/QuickBooks/QBXML/Schema/Object/tmp/CustomerQueryRq.php index bd918f8d..1eb13a11 100755 --- a/QuickBooks/QBXML/Schema/Object/tmp/CustomerQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/tmp/CustomerQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: CustomerQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_CustomerQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -50,10 +50,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -72,10 +72,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -95,7 +95,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -114,10 +114,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -136,22 +136,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -170,7 +170,7 @@ protected function &_reorderPathsPaths() 12 => 'IncludeRetElement', 13 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/tmp/InvoiceAddRq.php b/QuickBooks/QBXML/Schema/Object/tmp/InvoiceAddRq.php index 016e5123..f0b1633a 100755 --- a/QuickBooks/QBXML/Schema/Object/tmp/InvoiceAddRq.php +++ b/QuickBooks/QBXML/Schema/Object/tmp/InvoiceAddRq.php @@ -2,36 +2,36 @@ /** * Schema object for: InvoiceAddRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_InvoiceAddRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'InvoiceAdd'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -136,10 +136,10 @@ protected function &_dataTypePaths() 'ShippingLineAdd AccountRef FullName' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -244,10 +244,10 @@ protected function &_maxLengthPaths() 'ShippingLineAdd AccountRef FullName' => 209, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -353,7 +353,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -458,10 +458,10 @@ protected function &_sinceVersionPaths() 'ShippingLineAdd AccountRef FullName' => 999.99, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -566,28 +566,28 @@ protected function &_isRepeatablePaths() 'ShippingLineAdd AccountRef FullName' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( 0 => 'CustomerRef ListID', 1 => 'CustomerRef FullName', - 100 => 'CustomerRef ApplicationID', + 100 => 'CustomerRef ApplicationID', 2 => 'ClassRef ListID', 3 => 'ClassRef FullName', 4 => 'ARAccountRef ListID', @@ -640,8 +640,8 @@ protected function &_reorderPathsPaths() 51 => 'Other', 52 => 'LinkToTxnID', //53 => 'InvoiceLineAdd ItemRef ListID', - 53 => 'InvoiceLineAdd', - 54 => 'InvoiceLineAdd ItemRef ListID', + 53 => 'InvoiceLineAdd', + 54 => 'InvoiceLineAdd ItemRef ListID', 55 => 'InvoiceLineAdd ItemRef FullName', 55 => 'InvoiceLineAdd Desc', 56 => 'InvoiceLineAdd Quantity', @@ -689,7 +689,7 @@ protected function &_reorderPathsPaths() 98 => 'ShippingLineAdd AccountRef FullName', 99 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/tmp/InvoiceModRq.php b/QuickBooks/QBXML/Schema/Object/tmp/InvoiceModRq.php index 637a117f..08e2bad8 100755 --- a/QuickBooks/QBXML/Schema/Object/tmp/InvoiceModRq.php +++ b/QuickBooks/QBXML/Schema/Object/tmp/InvoiceModRq.php @@ -2,36 +2,36 @@ /** * Schema object for: InvoiceModRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_InvoiceModRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = 'InvoiceMod'; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -142,10 +142,10 @@ protected function &_dataTypePaths() 'InvoiceLineGroupMod InvoiceLineMod Other2' => 'STRTYPE', 'IncludeRetElement' => 'STRTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -256,10 +256,10 @@ protected function &_maxLengthPaths() 'InvoiceLineGroupMod InvoiceLineMod Other2' => 29, 'IncludeRetElement' => 50, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -371,7 +371,7 @@ protected function &_isOptionalPaths() 'IncludeRetElement' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -482,10 +482,10 @@ protected function &_sinceVersionPaths() 'InvoiceLineGroupMod InvoiceLineMod Other2' => 6, 'IncludeRetElement' => 4, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -596,22 +596,22 @@ protected function &_isRepeatablePaths() 'InvoiceLineGroupMod InvoiceLineMod Other2' => false, 'IncludeRetElement' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -722,7 +722,7 @@ protected function &_reorderPathsPaths() 104 => 'InvoiceLineGroupMod InvoiceLineMod Other2', 105 => 'IncludeRetElement', ); - + return $paths; } } diff --git a/QuickBooks/QBXML/Schema/Object/tmp/InvoiceQueryRq.php b/QuickBooks/QBXML/Schema/Object/tmp/InvoiceQueryRq.php index 78a6c36c..5d60b5e0 100755 --- a/QuickBooks/QBXML/Schema/Object/tmp/InvoiceQueryRq.php +++ b/QuickBooks/QBXML/Schema/Object/tmp/InvoiceQueryRq.php @@ -2,36 +2,36 @@ /** * Schema object for: InvoiceQueryRq - * + * * @author "Keith Palmer Jr." * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage QBXML */ /** - * + * */ require_once 'QuickBooks.php'; /** - * + * */ require_once 'QuickBooks/QBXML/Schema/Object.php'; /** - * + * */ class QuickBooks_QBXML_Schema_Object_InvoiceQueryRq extends QuickBooks_QBXML_Schema_Object { protected function &_qbxmlWrapper() { static $wrapper = ''; - + return $wrapper; } - + protected function &_dataTypePaths() { static $paths = array ( @@ -62,10 +62,10 @@ protected function &_dataTypePaths() 'IncludeRetElement' => 'STRTYPE', 'OwnerID' => 'GUIDTYPE', ); - + return $paths; } - + protected function &_maxLengthPaths() { static $paths = array ( @@ -96,10 +96,10 @@ protected function &_maxLengthPaths() 'IncludeRetElement' => 50, 'OwnerID' => 0, ); - + return $paths; } - + protected function &_isOptionalPaths() { static $paths = array ( @@ -131,7 +131,7 @@ protected function &_isOptionalPaths() 'OwnerID' => true, ); } - + protected function &_sinceVersionPaths() { static $paths = array ( @@ -162,10 +162,10 @@ protected function &_sinceVersionPaths() 'IncludeRetElement' => 4, 'OwnerID' => 2, ); - + return $paths; } - + protected function &_isRepeatablePaths() { static $paths = array ( @@ -196,22 +196,22 @@ protected function &_isRepeatablePaths() 'IncludeRetElement' => true, 'OwnerID' => true, ); - + return $paths; } - + /* abstract protected function &_inLocalePaths() { static $paths = array( - 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), + 'FirstName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), 'LastName' => array( 'QBD', 'QBCA', 'QBUK', 'QBAU' ), ); - + return $paths; } */ - + protected function &_reorderPathsPaths() { static $paths = array ( @@ -242,7 +242,7 @@ protected function &_reorderPathsPaths() 24 => 'IncludeRetElement', 25 => 'OwnerID', ); - + return $paths; } } diff --git a/QuickBooks/SOAP/Server.php b/QuickBooks/SOAP/Server.php index 53ec9e71..27ba6c69 100755 --- a/QuickBooks/SOAP/Server.php +++ b/QuickBooks/SOAP/Server.php @@ -2,22 +2,22 @@ /** * QuickBooks SOAP server component - * - * This pure PHP SOAP server is provided for users that do not have access to - * the PHP ext/soap SOAP extension. It's also useful for testing, as it makes - * debugging a little bit easier (non-fatal errors and print() statements will - * show up, where-as with the PHP extension, it gobbles up all regular PHP - * standard output) - * - * Note: This is *not* a generic SOAP server, and *will not* work with other - * SOAP services outside of the QuickBooks Web Connector SOAP specification. - * + * + * This pure PHP SOAP server is provided for users that do not have access to + * the PHP ext/soap SOAP extension. It's also useful for testing, as it makes + * debugging a little bit easier (non-fatal errors and print() statements will + * show up, where-as with the PHP extension, it gobbles up all regular PHP + * standard output) + * + * Note: This is *not* a generic SOAP server, and *will not* work with other + * SOAP services outside of the QuickBooks Web Connector SOAP specification. + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage SOAP - */ + */ /** * QuickBooks framework built-in XML parser @@ -33,21 +33,21 @@ class QuickBooks_SOAP_Server * An instance of the class which handles the SOAP methods */ protected $_class; - + /** * Create a new QuickBooks_SOAP_Server instance - * + * * @param string $wsdl * @param array $soap_options */ public function __construct($wsdl, $soap_options) { - // + // } - + /** * Create an instance of a request type object - * + * * @param string $request * @return QuickBooks_Request */ @@ -55,47 +55,47 @@ protected function _requestFactory($request) { $class = 'QuickBooks_WebConnector_Request_' . ucfirst(strtolower($request)); $file = '/QuickBooks/WebConnector/Request/' . ucfirst(strtolower($request)) . '.php'; - + // Make sure that class gets loaded QuickBooks_Loader::load($file, false); - + if (class_exists($class)) { return new $class(); } - + return false; } - + /** * Handle a SOAP request - * + * * @param string $raw_http_input The raw incoming SOAP request (HTTP request body) * @return boolean - */ + */ public function handle($raw_http_input) { - // Determine the method, call the correct handler function - + // Determine the method, call the correct handler function + $builtin = QuickBooks_XML::PARSER_BUILTIN; // The SimpleXML parser has a difference namespace behavior, so force this to use the builtin parser $Parser = new QuickBooks_XML_Parser($raw_http_input, $builtin); - + $errnum = 0; $errmsg = ''; if ($Doc = $Parser->parse($errnum, $errmsg)) { //print('parsing...'); - + $Root = $Doc->getRoot(); - + $Body = $Root->getChildAt('SOAP-ENV:Envelope SOAP-ENV:Body'); if (!$Body) { $Body = $Root->getChildAt('soap:Envelope soap:Body'); } - + $Container = $Body->getChild(0); - + $Request = null; $method = ''; if ($Container) @@ -103,38 +103,38 @@ public function handle($raw_http_input) $namespace = ''; $method = $this->_namespace($Container->name(), $namespace); $Request = $this->_requestFactory($method); - + foreach ($Container->children() as $Child) { $namespace = ''; $member = $this->_namespace($Child->name(), $namespace); - + //$Request->$member = html_entity_decode($Child->data(), ENT_QUOTES); $Request->$member = $Child->data(); } } - + //print('method is: ' . $method . "\n"); - + $Response = null; if (method_exists($this->_class, $method)) { $Response = $this->_class->$method($Request); } - + $soap = ' - '; - + $vars = get_object_vars($Response); - + $soap .= $this->_serialize($vars); - + $soap .= ' '; - + print($soap); return true; } @@ -150,39 +150,39 @@ public function handle($raw_http_input) $soap .= ' ' . QUICKBOOKS_CRLF; $soap .= ' ' . QUICKBOOKS_CRLF; $soap .= '' . QUICKBOOKS_CRLF; - + print($soap); return false; } } - + protected function _namespace($full_tag, &$namespace) { if (false !== strpos($full_tag, ':')) { $tmp = explode(':', $full_tag); - + $namespace = current($tmp); return next($tmp); } - + $namespace = ''; return $full_tag; } - + /** - * + * */ protected function _serialize($vars) { $soap = ''; - + if (is_array($vars)) { foreach ($vars as $key => $value) { $soap .= ''; - + if (is_array($value)) { foreach ($value as $subkey => $subvalue) @@ -194,24 +194,24 @@ protected function _serialize($vars) { $soap .= htmlspecialchars($value); } - + $soap .= ''; } } - + return $soap; } - - /** - * + + /** + * */ public function setClass($class, $dsn_or_conn, $map, $onerror, $hooks, $log_level, $raw_http_input, $handler_options, $driver_options, $callback_options) { $this->_class = new $class($dsn_or_conn, $map, $onerror, $hooks, $log_level, $raw_http_input, $handler_options, $driver_options, $callback_options); } - + /** - * + * */ public function getFunctions() { diff --git a/QuickBooks/SQL.php b/QuickBooks/SQL.php index 5d8417bf..9ac32012 100755 --- a/QuickBooks/SQL.php +++ b/QuickBooks/SQL.php @@ -1,17 +1,17 @@ * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage SQL */ /** - * + * */ class QuickBooks_SQL { @@ -19,47 +19,47 @@ class QuickBooks_SQL * Hook which occurs every time a new record is INSERTed into the SQL mirror */ const HOOK_SQL_INSERT = 'QuickBooks_SQL sql-insert'; - + /** - * Hook which occurs every time a record is UPDATEd in the SQL mirror + * Hook which occurs every time a record is UPDATEd in the SQL mirror */ const HOOK_SQL_UPDATE = 'QuickBooks_SQL sql-update'; - + /** * */ const HOOK_SQL_DELETE = 'QuickBooks_SQL sql-delete'; - + /** - * + * */ const HOOK_SQL_INVENTORY = 'QuickBooks_SQL sql-inventory'; - + const HOOK_SQL_INVENTORYASSEMBLY = 'QuickBooks_SQL sql-inventoryassembly'; - + /** * */ const HOOK_QUICKBOOKS_INSERT = 'QuickBooks_SQL quickbooks-insert'; - + /** * */ const HOOK_QUICKBOOKS_UPDATE = 'QuickBooks_SQL quickbooks-update'; - + /** * */ const HOOK_QUICKBOOKS_DELETE = 'QuickBooks_SQL quickbooks-delete'; - + /** - * + * */ protected $_config; - + /** - * - * + * + * * @param string $dsn * @param array $sql_options * @param array $driver_options @@ -68,33 +68,33 @@ public function __construct($dsn, $sql_options = array(), $driver_options = arra { $this->_config = $this->_defaults($sql_options); } - + protected function _defaults($options) { $defaults = array( - + ); - + return array_merge($defaults, $options); } - + /** * Tell whether or not a string starts with another string - * + * * @param string $str * @param string $startswith - * @return boolean + * @return boolean */ protected function _startsWith($str, $startswith) { $length = strlen($startswith); - + return (substr($str, 0, $length)) == $startswith; } - + /** * Execute an SQL query and return the result resource - * + * * @param string $sql The SQL query to execute * @param boolean $look Whether or not to examine the query and see if it's an INSERT/UPDATE/DELETE query * @return resource @@ -106,30 +106,30 @@ public function query($sql, $look = true) if ($look) { $tmp = trim(strtoupper($sql)); - + if ($this->_startsWith($sql, 'UPDATE ')) { - + } else if ($this->_startsWith($sql, 'INSERT INTO ')) { - + } else if ($this->_startsWith($sql, 'DELETE FROM ')) { - + } } - + return $this->_driver->query($sql); } - + return false; } - + /** * Fetch a record from a result resource - * + * * @param resource $res The result resource to fetch the next record from * @param boolean $as_object * @param integer $index @@ -137,42 +137,42 @@ public function query($sql, $look = true) */ public function fetch($res, $as_object = true, $index = null) { - + } - + /** - * - * + * + * * @param string $str * @return string */ public function escape($str) { - + } - + public function last() { - + } - + public function getCustomer($listID) { - + } - + public function addCustomer($customer) { - + } - + public function modifyCustomer($listID, $customer) { - + } - + public function deleteCustomer($listID) { - + } } diff --git a/QuickBooks/SQL/Object.php b/QuickBooks/SQL/Object.php index 78f28670..c9cc5477 100755 --- a/QuickBooks/SQL/Object.php +++ b/QuickBooks/SQL/Object.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage SQL */ /** - * + * */ class QuickBooks_SQL_Object { @@ -19,20 +19,20 @@ class QuickBooks_SQL_Object * @var string */ protected $_table; - + /** * @var string */ protected $_path; - + /** * @var array */ protected $_arr; - + /** - * - * + * + * * @param string $type * @param array $arr */ @@ -42,10 +42,10 @@ public function __construct($table, $path, $arr = array()) $this->_path = $path; $this->_arr = $arr; } - + /** * Return the type of SQL object this is - * + * * @deprecated * @return string */ @@ -53,20 +53,20 @@ public function type() { return $this->_table; } - + public function table() { return $this->_table; } - + public function path() { return $this->_path; } - + /** * Set an attribute of the SQL object - * + * * @param string $key * @param mixed $value * @return void @@ -75,10 +75,10 @@ public function set($key, $value) { $this->_arr[$key] = $value; } - + /** * Set an attribute of the SQL object - * + * * @param string $key * @param mixed $value * @return void @@ -90,10 +90,10 @@ public function remove($key) unset($this->_arr[$key]); } } - + /** * Change the path (i.e. "InvoiceRet InvoiceLineRet" of this SQL object to something else - * + * * @param string $path * @return void */ @@ -101,29 +101,29 @@ public function change($path) { $this->_path = $path; } - + public function get($key, $default = null) { if ($this->exists($key)) { return $this->_arr[$key]; } - + return $default; } - + public function exists($key) { return isset($this->_arr[$key]); } - + public function asArray() { return $this->_arr; } - + public function asXML() { - + } } diff --git a/QuickBooks/SQL/Schema.php b/QuickBooks/SQL/Schema.php index b4955cd4..0330ae21 100755 --- a/QuickBooks/SQL/Schema.php +++ b/QuickBooks/SQL/Schema.php @@ -2,14 +2,14 @@ /** * Schema mapping methods for mapping XML schemas to SQL schemas, and vice-versa - * + * * * THANKS! * - * Extra special thanks go out to Garrett at Space Coast IC for putting gobs of - * time and effort into completing this schema for a project for his company. - * + * Extra special thanks go out to Garrett at Space Coast IC for putting gobs of + * time and effort into completing this schema for a project for his company. + * * @author Keith Palmer , Garrett - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage SQL */ @@ -43,182 +43,182 @@ /** * Schema mapping methods for mapping XML schemas to SQL schemas, and vice versa - * - * The QuickBooks SQL mirror server needs to map the QuickBooks qbXML XML - * schema to an SQL schema that can be stored in a standard SQL database. This - * class provides static methods which provide mapping from XML to SQL schemas, - * and then vice-versa for when you need to convert SQL objects back to qbXML - * objects. + * + * The QuickBooks SQL mirror server needs to map the QuickBooks qbXML XML + * schema to an SQL schema that can be stored in a standard SQL database. This + * class provides static methods which provide mapping from XML to SQL schemas, + * and then vice-versa for when you need to convert SQL objects back to qbXML + * objects. */ class QuickBooks_SQL_Schema { /** * Take a qbXML schema and transform that schema to an SQL schema definition - * + * * @param string $xml The XML string to transform * @param array $tables An array of... erm... something? - * @return boolean + * @return boolean */ static public function mapSchemaToSQLDefinition($xml, &$tables) { $Parser = new QuickBooks_XML_Parser($xml); - + $errnum = 0; $errmsg = ''; $tmp = $Parser->parse($errnum, $errmsg); - + $tmp = $tmp->children(); $base = current($tmp); - + $tmp = $base->children(); $rs = next($tmp); - + foreach ($rs->children() as $qbxml) { QuickBooks_SQL_Schema::_transform('', $qbxml, $tables); } - + /* while (count($subtables) > 0) { $node = array_shift($subtables); - + $subsubtables = array(); $tables[] = QuickBooks_SQL_Schema::_transform('', $node, $subsubtables); - + $subtables = array_merge($subtables, $subsubtables); } */ - - // The code below tries to guess as a good set of indexes to use for - // any database tables we've generated from the schema. The code looks - // at all of the fields in the table and if any of them are *ListID or - // *TxnID it makes them indexes. - - // This is a list of field names that will *always* be assigned + + // The code below tries to guess as a good set of indexes to use for + // any database tables we've generated from the schema. The code looks + // at all of the fields in the table and if any of them are *ListID or + // *TxnID it makes them indexes. + + // This is a list of field names that will *always* be assigned // indexes, regardless of what table they are in $always_index_fields = array( - 'qbsql_external_id', - 'Name', - 'FullName', - 'EntityType', - 'TxnType', - 'Email', - //'Phone', - 'IsActive', - 'RefNumber', - //'Address_City', - //'Address_State', - 'Address_Country', - //'Address_PostalCode', - //'BillAddress_City', - //'BillAddress_State', - 'BillAddress_Country', - //'BillAddress_PostalCode', - //'ShipAddress_City', - //'ShipAddress_State', - 'ShipAddress_Country', - //'ShipAddress_PostalCode', - 'CompanyName', - //'FirstName', - 'LastName', - //'Contact', - 'TxnDate', - 'IsPaid', - 'IsPending', - 'IsManuallyClosed', - 'IsFullyReceived', - 'IsToBePrinted', - 'IsToBeEmailed', - 'IsFullyInvoiced', - //'IsFinanceCharge', + 'qbsql_external_id', + 'Name', + 'FullName', + 'EntityType', + 'TxnType', + 'Email', + //'Phone', + 'IsActive', + 'RefNumber', + //'Address_City', + //'Address_State', + 'Address_Country', + //'Address_PostalCode', + //'BillAddress_City', + //'BillAddress_State', + 'BillAddress_Country', + //'BillAddress_PostalCode', + //'ShipAddress_City', + //'ShipAddress_State', + 'ShipAddress_Country', + //'ShipAddress_PostalCode', + 'CompanyName', + //'FirstName', + 'LastName', + //'Contact', + 'TxnDate', + 'IsPaid', + 'IsPending', + 'IsManuallyClosed', + 'IsFullyReceived', + 'IsToBePrinted', + 'IsToBeEmailed', + 'IsFullyInvoiced', + //'IsFinanceCharge', ); - - // This is a list of table.field names that will be assigned indexes + + // This is a list of table.field names that will be assigned indexes $always_index_tablefields = array( - //'Account.AccountType', + //'Account.AccountType', ); - + /* - '*FullName', - '*ListID', - '*TxnID', - '*EntityType', - '*TxnType', - '*LineID', + '*FullName', + '*ListID', + '*TxnID', + '*EntityType', + '*TxnType', + '*LineID', */ - + foreach ($tables as $table => $tabledef) { $uniques = array(); $indexes = array(); - + foreach ($tabledef[1] as $field => $fielddef) { if ($field == 'ListID' or // Unique keys - $field == 'TxnID' or + $field == 'TxnID' or $field == 'Name') { - // We can't apply indexes to TEXT columns, so we need to - // check and make sure the column isn't of type TEXT + // We can't apply indexes to TEXT columns, so we need to + // check and make sure the column isn't of type TEXT // before we decide to use this as an index - + if ($fielddef[0] != QUICKBOOKS_DRIVER_SQL_TEXT) { $uniques[] = $field; } } else if (substr($field, -6, 6) == 'ListID' or // Other things we should index for performance - substr($field, -5, 5) == 'TxnID' or - substr($field, -6, 6) == 'LineID' or - in_array($field, $always_index_fields) or + substr($field, -5, 5) == 'TxnID' or + substr($field, -6, 6) == 'LineID' or + in_array($field, $always_index_fields) or in_array($table . '.' . $field, $always_index_tablefields)) { - // We can't apply indexes to TEXT columns, so we need to - // check and make sure the column isn't of type TEXT + // We can't apply indexes to TEXT columns, so we need to + // check and make sure the column isn't of type TEXT // before we decide to use this as an index - + if ($fielddef[0] != QUICKBOOKS_DRIVER_SQL_TEXT) { $indexes[] = $field; } } } - + //print_r($indexes); //print_r($uniques); - + $tables[$table][3] = $indexes; $tables[$table][4] = $uniques; } - + return true; } - + /** * Transform an XML document into an SQL schema - * + * * @param string $curpath * @param QuickBooks_XML_Node $node * @param array $tables - * @return + * @return */ static protected function _transform($curpath, $node, &$tables) { print('' . $curpath . ' node: ' . $node->name() . "\n"); - + $table = ''; $field = ''; - + $this_sql = array(); $other_sql = array(); QuickBooks_SQL_Schema::mapToSchema($curpath . ' ' . $node->name(), QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $this_sql, $other_sql); - + foreach (array_merge(array( $this_sql ), $other_sql) as $sql) { $table = $sql[0]; $field = $sql[1]; - + /* if (!$sql[0] or !$sql[1]) { @@ -230,13 +230,13 @@ static protected function _transform($curpath, $node, &$tables) print("\n"); } */ - + if ($table) { if (!isset($tables[$table])) { $tables[$table] = array( - 0 => $table, + 0 => $table, 1 => array(), // fields 2 => null, // primary key 3 => array(), // other keys @@ -244,7 +244,7 @@ static protected function _transform($curpath, $node, &$tables) ); } } - + if ($table and $field) { if (!isset($tables[$table][1][$field])) @@ -253,7 +253,7 @@ static protected function _transform($curpath, $node, &$tables) } } } - + if ($node->childCount()) { foreach ($node->children() as $child) @@ -261,13 +261,13 @@ static protected function _transform($curpath, $node, &$tables) QuickBooks_SQL_Schema::_transform($curpath . ' ' . $node->name(), $child, $tables); } } - + return true; } - + /** * Tell whether or not a string matches the given pattern (replacement for fnmatch(), which isn't available on some systems) - * + * * @param string $pattern The pattern (use wild-cards like * and ?) * @param string $str The string to test * @return boolean @@ -276,67 +276,67 @@ static protected function _fnmatch($pattern, $str) { return QuickBooks_Utilities::fnmatch($pattern, $str); } - + /** - * - * - * - * + * + * + * + * */ static public function mapIndexes($table) { - + } - + /** * Tell the SQL primary key for a given XML path, or the XML path for a given table/field combination - * + * * @todo This should support the uppercase/lowercase table/field names option set (->_defaults() a generic method, everything calls it to get default options) - * + * * @param string $path_or_tablefield * @param string $mode * @param mixed $map In SCHEMA_MAP_TO_SQL mode, this is set to a tuple containing the SQL table and SQL field name, in SQL_MAP_TO_SCHEMA mode this is set to the XML path * @return void */ static public function mapPrimaryKey($path_or_tablefield, $mode, &$map, $options = array()) - { + { static $xml_to_sql = array( - 'AccountRet' => array( 'Account', 'ListID' ), - 'AccountRet TaxLineInfoRet' => array( 'Account_TaxLineInfo', array( 'Account_ListID', 'TaxLineInfo_TaxLineID') ), + 'AccountRet' => array( 'Account', 'ListID' ), + 'AccountRet TaxLineInfoRet' => array( 'Account_TaxLineInfo', array( 'Account_ListID', 'TaxLineInfo_TaxLineID') ), 'AccountRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'BillingRateRet' => array( 'BillingRate', 'ListID' ), - 'BillingRateRet BillingRatePerItemRet' => array( 'BillingRate_BillingRatePerItem', array( 'BillingRate_ListID', 'Item_ListID' ) ), + 'BillingRateRet BillingRatePerItemRet' => array( 'BillingRate_BillingRatePerItem', array( 'BillingRate_ListID', 'Item_ListID' ) ), 'BillPaymentCheckRet' => array( 'BillPaymentCheck', 'TxnID' ), - 'BillPaymentCheckRet AppliedToTxnRet' => array( 'BillPaymentCheck_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), + 'BillPaymentCheckRet AppliedToTxnRet' => array( 'BillPaymentCheck_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), 'BillPaymentCheckRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'BillPaymentCreditCardRet' => array( 'BillPaymentCreditCard', 'TxnID' ), - 'BillPaymentCreditCardRet AppliedToTxnRet' => array( 'BillPaymentCreditCard_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), + 'BillPaymentCreditCardRet AppliedToTxnRet' => array( 'BillPaymentCreditCard_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), 'BillPaymentCreditCardRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'BillRet' => array( 'Bill', 'TxnID' ), 'BillRet LinkedTxn' => array( 'Bill_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), - 'BillRet ExpenseLineRet' => array( 'Bill_ExpenseLine', array( 'Bill_TxnID', 'TxnLineID') ), - 'BillRet ItemLineRet' => array( 'Bill_ItemLine', array( 'Bill_TxnID', 'TxnLineID' ) ), - 'BillRet ItemGroupLineRet' => array( 'Bill_ItemGroupLine', array( 'Bill_TxnID', 'TxnLineID' ) ), - 'BillRet ItemGroupLineRet ItemLineRet' => array( 'Bill_ItemGroupLine_ItemLine', array( 'Bill_TxnID', 'Bill_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), + 'BillRet ExpenseLineRet' => array( 'Bill_ExpenseLine', array( 'Bill_TxnID', 'TxnLineID') ), + 'BillRet ItemLineRet' => array( 'Bill_ItemLine', array( 'Bill_TxnID', 'TxnLineID' ) ), + 'BillRet ItemGroupLineRet' => array( 'Bill_ItemGroupLine', array( 'Bill_TxnID', 'TxnLineID' ) ), + 'BillRet ItemGroupLineRet ItemLineRet' => array( 'Bill_ItemGroupLine_ItemLine', array( 'Bill_TxnID', 'Bill_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), 'BillRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'BillToPayRet BillToPay' => array( 'BillToPay', 'TxnID' ), - 'BillToPayRet CreditToApply' => array( 'CreditToApply', 'TxnID' ), - 'BuildAssemblyRet' => array( 'BuildAssembly', 'TxnID' ), - 'ChargeRet' => array( 'Charge', 'TxnID' ), + 'BillToPayRet BillToPay' => array( 'BillToPay', 'TxnID' ), + 'BillToPayRet CreditToApply' => array( 'CreditToApply', 'TxnID' ), + 'BuildAssemblyRet' => array( 'BuildAssembly', 'TxnID' ), + 'ChargeRet' => array( 'Charge', 'TxnID' ), 'ChargeRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'CheckRet' => array( 'Check', 'TxnID' ), - 'CheckRet ExpenseLineRet' => array( 'Check_ExpenseLine', array( 'Check_TxnID', 'TxnLineID' ) ), - 'CheckRet ItemLineRet' => array( 'Check_ItemLine', array( 'Check_TxnID', 'TxnLineID' ) ), - 'CheckRet ItemGroupLineRet' => array( 'Check_ItemGroupLine', array( 'Check_TxnID', 'TxnLineID' ) ), + 'CheckRet' => array( 'Check', 'TxnID' ), + 'CheckRet ExpenseLineRet' => array( 'Check_ExpenseLine', array( 'Check_TxnID', 'TxnLineID' ) ), + 'CheckRet ItemLineRet' => array( 'Check_ItemLine', array( 'Check_TxnID', 'TxnLineID' ) ), + 'CheckRet ItemGroupLineRet' => array( 'Check_ItemGroupLine', array( 'Check_TxnID', 'TxnLineID' ) ), 'CheckRet ItemGroupLineRet ItemLineRet' => array( 'Check_ItemGroupLine_ItemLine', array( 'Check_TxnID', 'Check_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), 'CheckRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'CheckRet LinkedTxn' => array( 'Check_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), - 'ClassRet' => array( 'Class', 'ListID' ), - 'CompanyRet' => array( 'Company', 'CompanyName' ), - 'CompanyRet SubscribedServices Services' => array( 'Company_SubscribedServices_Services', array('Company_CompanyName', 'Name') ), + 'CheckRet LinkedTxn' => array( 'Check_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), + 'ClassRet' => array( 'Class', 'ListID' ), + 'CompanyRet' => array( 'Company', 'CompanyName' ), + 'CompanyRet SubscribedServices Services' => array( 'Company_SubscribedServices_Services', array('Company_CompanyName', 'Name') ), 'CompanyRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'HostRet' => array( 'Host', 'ProductName' ), - 'PreferencesRet' => array( 'Preferences', 'qbsql_external_id' ), + 'HostRet' => array( 'Host', 'ProductName' ), + 'PreferencesRet' => array( 'Preferences', 'qbsql_external_id' ), 'CreditCardChargeRet' => array( 'CreditCardCharge', 'TxnID' ), 'CreditCardChargeRet ExpenseLineRet' => array( 'CreditCardCharge_ExpenseLine', array( 'CreditCardCharge_TxnID', 'TxnLineID' ) ), 'CreditCardChargeRet ItemLineRet' => array( 'CreditCardCharge_ItemLine', array( 'CreditCardCharge_TxnID', 'TxnLineID' ) ), @@ -349,147 +349,147 @@ static public function mapPrimaryKey($path_or_tablefield, $mode, &$map, $options 'CreditCardCreditRet ItemGroupLineRet' => array( 'CreditCardCredit_ItemGroupLine', array( 'CreditCardCredit_TxnID', 'TxnLineID' ) ), 'CreditCardCreditRet ItemGroupLineRet ItemLineRet' => array( 'CreditCardCredit_ItemGroupLine_ItemLine', array( 'CreditCardCredit_TxnID', 'CreditCardCredit_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), 'CreditCardCreditRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'CreditMemoRet' => array( 'CreditMemo', 'TxnID' ), - 'CreditMemoRet CreditMemoLineRet' => array( 'CreditMemo_CreditMemoLine', array( 'CreditMemo_TxnID', 'TxnLineID' ) ), - 'CreditMemoRet CreditMemoLineGroupRet' => array( 'CreditMemo_CreditMemoLineGroup', array( 'CreditMemo_TxnID', 'TxnLineID' ) ), - //'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef' => array( null, null ), - //'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef *' => array( 'CreditMemo_CreditMemoLineGroup', 'ItemGroup_*' ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', array( 'CreditMemo_TxnID', 'CreditMemo_CreditMemoLineGroup_TxnLineID', 'TxnLineID' ) ), + 'CreditMemoRet' => array( 'CreditMemo', 'TxnID' ), + 'CreditMemoRet CreditMemoLineRet' => array( 'CreditMemo_CreditMemoLine', array( 'CreditMemo_TxnID', 'TxnLineID' ) ), + 'CreditMemoRet CreditMemoLineGroupRet' => array( 'CreditMemo_CreditMemoLineGroup', array( 'CreditMemo_TxnID', 'TxnLineID' ) ), + //'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef' => array( null, null ), + //'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef *' => array( 'CreditMemo_CreditMemoLineGroup', 'ItemGroup_*' ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', array( 'CreditMemo_TxnID', 'CreditMemo_CreditMemoLineGroup_TxnLineID', 'TxnLineID' ) ), 'CreditMemoRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'CreditMemoRet CreditMemoLineGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'CreditMemoRet LinkedTxn' => array( 'CreditMemo_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), + 'CreditMemoRet LinkedTxn' => array( 'CreditMemo_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 'CustomerRet' => array( 'Customer', 'ListID' ), 'CustomerRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'CustomerMsgRet' => array( 'CustomerMsg', 'ListID' ), 'CustomerTypeRet' => array( 'CustomerType', 'ListID' ), - 'CurrencyRet' => array( 'Currency', 'ListID' ), + 'CurrencyRet' => array( 'Currency', 'ListID' ), 'DataExtDefRet' => array( 'DataExtDef', 'DataExtName' ), 'DataExtDefRet AssignToObject' => array( 'DataExtDef_AssignToObject', array( 'DataExtDef_DataExtName', 'AssignToObject' ) ), 'DateDrivenTermsRet' => array( 'DateDrivenTerms', 'ListID' ), - 'DepositRet' => array( 'Deposit', 'TxnID' ), - 'DepositRet DepositLineRet' => array( 'Deposit_DepositLine', array( 'Deposit_TxnID', 'TxnID' ) ), + 'DepositRet' => array( 'Deposit', 'TxnID' ), + 'DepositRet DepositLineRet' => array( 'Deposit_DepositLine', array( 'Deposit_TxnID', 'TxnID' ) ), 'DepositRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'EmployeeRet' => array( 'Employee', 'ListID' ), - 'EmployeeRet EmployeePayrollInfo Earnings' => array( 'Employee_Earnings', array( 'Employee_ListID', 'PayrollItemWage_ListID' ) ), + 'EmployeeRet' => array( 'Employee', 'ListID' ), + 'EmployeeRet EmployeePayrollInfo Earnings' => array( 'Employee_Earnings', array( 'Employee_ListID', 'PayrollItemWage_ListID' ) ), 'EmployeeRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'EstimateRet' => array( 'Estimate', 'TxnID' ), - 'EstimateRet EstimateLineRet' => array( 'Estimate_EstimateLine', array( 'Estimate_TxnID', 'TxnLineID' ) ), + 'EstimateRet' => array( 'Estimate', 'TxnID' ), + 'EstimateRet EstimateLineRet' => array( 'Estimate_EstimateLine', array( 'Estimate_TxnID', 'TxnLineID' ) ), 'EstimateRet EstimateLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'EstimateRet EstimateLineGroupRet' => array( 'Estimate_EstimateLineGroup', array( 'Estimate_TxnID', 'TxnLineID' ) ), + 'EstimateRet EstimateLineGroupRet' => array( 'Estimate_EstimateLineGroup', array( 'Estimate_TxnID', 'TxnLineID' ) ), 'EstimateRet EstimateLineGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet' => array( 'Estimate_EstimateLineGroup_EstimateLine', array( 'Estimate_TxnID', 'Estimate_EstimateLineGroup_TxnLineID', 'TxnLineID' ) ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet' => array( 'Estimate_EstimateLineGroup_EstimateLine', array( 'Estimate_TxnID', 'Estimate_EstimateLineGroup_TxnLineID', 'TxnLineID' ) ), 'EstimateRet EstimateLineGroupRet EstimateLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'EstimateRet LinkedTxn' => array( 'Estimate_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), - 'EstimateRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'InventoryAdjustmentRet' => array( 'InventoryAdjustment', 'TxnID' ), - 'InventoryAdjustmentRet InventoryAdjustmentLineRet' => array( 'InventoryAdjustment_InventoryAdjustmentLine', array( 'InventoryAdjustment_TxnID', 'TxnLineID' ) ), - 'InventoryAdjustmentRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'InvoiceRet' => array( 'Invoice', 'TxnID' ), - 'InvoiceRet InvoiceLineRet' => array( 'Invoice_InvoiceLine', array( 'Invoice_TxnID', 'TxnLineID' ) ), - 'InvoiceRet InvoiceLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'InvoiceRet InvoiceLineGroupRet' => array( 'Invoice_InvoiceLineGroup', array( 'Invoice_TxnID', 'TxnLineID' ) ), - 'InvoiceRet InvoiceLineGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', array( 'Invoice_TxnID', 'Invoice_InvoiceLineGroup_TxnLineID', 'TxnLineID' ) ), + 'EstimateRet LinkedTxn' => array( 'Estimate_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), + 'EstimateRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'InventoryAdjustmentRet' => array( 'InventoryAdjustment', 'TxnID' ), + 'InventoryAdjustmentRet InventoryAdjustmentLineRet' => array( 'InventoryAdjustment_InventoryAdjustmentLine', array( 'InventoryAdjustment_TxnID', 'TxnLineID' ) ), + 'InventoryAdjustmentRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'InvoiceRet' => array( 'Invoice', 'TxnID' ), + 'InvoiceRet InvoiceLineRet' => array( 'Invoice_InvoiceLine', array( 'Invoice_TxnID', 'TxnLineID' ) ), + 'InvoiceRet InvoiceLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'InvoiceRet InvoiceLineGroupRet' => array( 'Invoice_InvoiceLineGroup', array( 'Invoice_TxnID', 'TxnLineID' ) ), + 'InvoiceRet InvoiceLineGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', array( 'Invoice_TxnID', 'Invoice_InvoiceLineGroup_TxnLineID', 'TxnLineID' ) ), 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'InvoiceRet LinkedTxn' => array( 'Invoice_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), - 'InvoiceRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'ItemInventoryRet' => array( 'ItemInventory', 'ListID' ), - 'ItemInventoryRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'ItemInventoryAssemblyRet' => array( 'ItemInventoryAssembly', 'ListID' ), - 'ItemInventoryAssemblyRet ItemInventoryAssemblyLine' => array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', array( 'ItemInventoryAssembly_ListID', 'ItemInventory_ListID' ) ), - 'ItemInventoryAssemblyRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'ItemNonInventoryRet' => array( 'ItemNonInventory', 'ListID' ), - 'ItemNonInventoryRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'InvoiceRet LinkedTxn' => array( 'Invoice_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), + 'InvoiceRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemInventoryRet' => array( 'ItemInventory', 'ListID' ), + 'ItemInventoryRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemInventoryAssemblyRet' => array( 'ItemInventoryAssembly', 'ListID' ), + 'ItemInventoryAssemblyRet ItemInventoryAssemblyLine' => array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', array( 'ItemInventoryAssembly_ListID', 'ItemInventory_ListID' ) ), + 'ItemInventoryAssemblyRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemNonInventoryRet' => array( 'ItemNonInventory', 'ListID' ), + 'ItemNonInventoryRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'ItemDiscountRet' => array( 'ItemDiscount', 'ListID' ), - 'ItemDiscountRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemDiscountRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'ItemFixedAssetRet' => array( 'ItemFixedAsset', 'ListID' ), - 'ItemFixedAssetRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemFixedAssetRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'ItemGroupRet' => array( 'ItemGroup', 'ListID' ), 'ItemGroupRet ItemGroupLine' => array( 'ItemGroup_ItemGroupLine', array( 'ItemGroup_ListID', 'Item_ListID' ) ), - 'ItemGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'ItemOtherChargeRet' => array( 'ItemOtherCharge', 'ListID' ), - 'ItemOtherChargeRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'ItemPaymentRet' => array( 'ItemPayment', 'ListID' ), - 'ItemPaymentRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'ItemReceiptRet' => array( 'ItemReceipt', 'TxnID' ), - 'ItemReceiptRet ExpenseLineRet' => array( 'ItemReceipt_ExpenseLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), - 'ItemReceiptRet ItemLineRet' => array( 'ItemReceipt_ItemLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), - 'ItemReceiptRet ItemGroupLineRet' => array( 'ItemReceipt_ItemGroupLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet' => array( 'ItemReceipt_ItemGroupLine_ItemLine', array( 'ItemReceipt_TxnID', 'ItemReceipt_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), - 'ItemReceiptRet LinkedTxn' => array( 'ItemReceipt_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), - 'ItemReceiptRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'ItemSalesTaxRet' => array( 'ItemSalesTax', 'ListID' ), - 'ItemSalesTaxRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'ItemSalesTaxGroupRet' => array( 'ItemSalesTaxGroup', 'ListID' ), - 'ItemSalesTaxGroupRet ItemSalesTaxRef' => array( 'ItemSalesTaxGroup_ItemSalesTax', array( 'ItemSalesTaxGroup_ListID', 'ListID' ) ), - 'ItemSalesTaxGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'ItemServiceRet' => array( 'ItemService', 'ListID' ), - 'ItemServiceRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemOtherChargeRet' => array( 'ItemOtherCharge', 'ListID' ), + 'ItemOtherChargeRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemPaymentRet' => array( 'ItemPayment', 'ListID' ), + 'ItemPaymentRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemReceiptRet' => array( 'ItemReceipt', 'TxnID' ), + 'ItemReceiptRet ExpenseLineRet' => array( 'ItemReceipt_ExpenseLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), + 'ItemReceiptRet ItemLineRet' => array( 'ItemReceipt_ItemLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), + 'ItemReceiptRet ItemGroupLineRet' => array( 'ItemReceipt_ItemGroupLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet' => array( 'ItemReceipt_ItemGroupLine_ItemLine', array( 'ItemReceipt_TxnID', 'ItemReceipt_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), + 'ItemReceiptRet LinkedTxn' => array( 'ItemReceipt_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), + 'ItemReceiptRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemSalesTaxRet' => array( 'ItemSalesTax', 'ListID' ), + 'ItemSalesTaxRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemSalesTaxGroupRet' => array( 'ItemSalesTaxGroup', 'ListID' ), + 'ItemSalesTaxGroupRet ItemSalesTaxRef' => array( 'ItemSalesTaxGroup_ItemSalesTax', array( 'ItemSalesTaxGroup_ListID', 'ListID' ) ), + 'ItemSalesTaxGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemServiceRet' => array( 'ItemService', 'ListID' ), + 'ItemServiceRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'ItemSubtotalRet' => array( 'ItemSubtotal', 'ListID' ), - 'ItemSubtotalRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ItemSubtotalRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'JobTypeRet' => array( 'JobType', 'ListID' ), 'JournalEntryRet' => array( 'JournalEntry', 'TxnID' ), 'JournalEntryRet JournalCreditLine' => array( 'JournalEntry_JournalCreditLine', array( 'JournalEntry_TxnID', 'TxnLineID' ) ), 'JournalEntryRet JournalDebitLine' => array( 'JournalEntry_JournalDebitLine', array( 'JournalEntry_TxnID', 'TxnLineID' ) ), - 'JournalEntryRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'JournalEntryRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'PaymentMethodRet' => array( 'PaymentMethod', 'ListID' ), 'PayrollItemWageRet' => array( 'PayrollItemWage', 'ListID' ), 'PriceLevelRet' => array( 'PriceLevel', 'ListID' ), 'PriceLevelRet PriceLevelPerItemRet' => array( 'PriceLevel_PriceLevelPerItem', array( 'PriceLevel_ListID', 'Item_ListID' ) ), 'PurchaseOrderRet' => array( 'PurchaseOrder', 'TxnID' ), 'PurchaseOrderRet PurchaseOrderLineRet' => array( 'PurchaseOrder_PurchaseOrderLine', array( 'PurchaseOrder_TxnID', 'TxnLineID' ) ), - 'PurchaseOrderRet PurchaseOrderLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'PurchaseOrderRet PurchaseOrderLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'PurchaseOrderRet PurchaseOrderLineGroupRet' => array( 'PurchaseOrder_PurchaseOrderLineGroup', array( 'PurchaseOrder_TxnID', 'TxnLineID' ) ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', array( 'PurchaseOrder_TxnID', 'PurchaseOrder_PurchaseOrderLineGroup_TxnLineID', 'TxnLineID' ) ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'PurchaseOrderRet LinkedTxn' => array( 'PurchaseOrder_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), - 'PurchaseOrderRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'ReceivePaymentRet' => array( 'ReceivePayment', 'TxnID' ), - 'ReceivePaymentRet AppliedToTxnRet' => array( 'ReceivePayment_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), - 'ReceivePaymentRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'PurchaseOrderRet LinkedTxn' => array( 'PurchaseOrder_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), + 'PurchaseOrderRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'ReceivePaymentRet' => array( 'ReceivePayment', 'TxnID' ), + 'ReceivePaymentRet AppliedToTxnRet' => array( 'ReceivePayment_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), + 'ReceivePaymentRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'SalesOrderRet' => array( 'SalesOrder', 'TxnID' ), 'SalesOrderRet SalesOrderLineRet' => array( 'SalesOrder_SalesOrderLine', array( 'SalesOrder_TxnID', 'TxnLineID' ) ), - 'SalesOrderRet SalesOrderLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'SalesOrderRet SalesOrderLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'SalesOrderRet SalesOrderLineGroupRet' => array( 'SalesOrder_SalesOrderLineGroup', array( 'SalesOrder_TxnID', 'TxnLineID' ) ), - 'SalesOrderRet SalesOrderLineGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'SalesOrderRet SalesOrderLineGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', array( 'SalesOrder_TxnID', 'SalesOrder_SalesOrderLineGroup_TxnLineID', 'TxnLineID' ) ), - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'SalesOrderRet LinkedTxn' => array( 'SalesOrder_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), - 'SalesOrderRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'SalesOrderRet LinkedTxn' => array( 'SalesOrder_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), + 'SalesOrderRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'SalesReceiptRet' => array( 'SalesReceipt', 'TxnID' ), 'SalesReceiptRet SalesReceiptLineRet' => array( 'SalesReceipt_SalesReceiptLine', array( 'SalesReceipt_TxnID', 'TxnLineID' ) ), - 'SalesReceiptRet SalesReceiptLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'SalesReceiptRet SalesReceiptLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'SalesReceiptRet SalesReceiptLineGroupRet' => array( 'SalesReceipt_SalesReceiptLineGroup', array( 'SalesReceipt_TxnID', 'TxnLineID' ) ), - 'SalesReceiptRet SalesReceiptLineGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'SalesReceiptRet SalesReceiptLineGroupRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', array( 'SalesReceipt_TxnID', 'SalesReceipt_SalesReceiptLineGroup_TxnLineID', 'TxnLineID' ) ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'SalesReceiptRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'SalesReceiptRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), 'SalesRepRet' => array( 'SalesRep', 'ListID' ), 'SalesTaxCodeRet' => array( 'SalesTaxCode', 'ListID' ), 'ShipMethodRet' => array( 'ShipMethod', 'ListID' ), 'StandardTermsRet' => array( 'StandardTerms', 'ListID' ), - 'TimeTrackingRet' => array( 'TimeTracking', 'TxnID' ), - 'UnitOfMeasureSetRet' => array( 'UnitOfMeasureSet', 'ListID' ), - 'UnitOfMeasureSetRet RelatedUnit' => array( 'UnitOfMeasureSet_RelatedUnit', array( 'UnitOfMeasureSet_ListID', 'Name' ) ), - 'UnitOfMeasureSetRet DefaultUnit' => array( 'UnitOfMeasureSet_DefaultUnit', array( 'UnitOfMeasureSet_ListID', 'UnitUsedFor' ) ), + 'TimeTrackingRet' => array( 'TimeTracking', 'TxnID' ), + 'UnitOfMeasureSetRet' => array( 'UnitOfMeasureSet', 'ListID' ), + 'UnitOfMeasureSetRet RelatedUnit' => array( 'UnitOfMeasureSet_RelatedUnit', array( 'UnitOfMeasureSet_ListID', 'Name' ) ), + 'UnitOfMeasureSetRet DefaultUnit' => array( 'UnitOfMeasureSet_DefaultUnit', array( 'UnitOfMeasureSet_ListID', 'UnitUsedFor' ) ), 'VehicleRet' => array( 'Vehicle', 'ListID' ), - 'VehicleMileageRet' => array( 'VehicleMileage', 'TxnID' ), - 'VendorRet' => array( 'Vendor', 'ListID' ), - 'VendorRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'VendorCreditRet' => array( 'VendorCredit', 'TxnID' ), - 'VendorCreditRet ExpenseLineRet' => array( 'VendorCredit_ExpenseLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ), - 'VendorCreditRet ItemLineRet' => array( 'VendorCredit_ItemLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ), - 'VendorCreditRet ItemGroupLineRet' => array( 'VendorCredit_ItemGroupLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet' => array( 'VendorCredit_ItemGroupLine_ItemLine', array( 'VendorCredit_TxnID', 'VendorCredit_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), - 'VendorCreditRet LinkedTxn' => array( 'VendorCredit_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), - 'VendorCreditRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), - 'VendorTypeRet' => array( 'VendorType', 'ListID' ), - 'WorkersCompCodeRet' => array( 'WorkersCompCode', 'ListID' ), - + 'VehicleMileageRet' => array( 'VehicleMileage', 'TxnID' ), + 'VendorRet' => array( 'Vendor', 'ListID' ), + 'VendorRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'VendorCreditRet' => array( 'VendorCredit', 'TxnID' ), + 'VendorCreditRet ExpenseLineRet' => array( 'VendorCredit_ExpenseLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ), + 'VendorCreditRet ItemLineRet' => array( 'VendorCredit_ItemLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ), + 'VendorCreditRet ItemGroupLineRet' => array( 'VendorCredit_ItemGroupLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet' => array( 'VendorCredit_ItemGroupLine_ItemLine', array( 'VendorCredit_TxnID', 'VendorCredit_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), + 'VendorCreditRet LinkedTxn' => array( 'VendorCredit_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), + 'VendorCreditRet DataExtRet' => array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ), + 'VendorTypeRet' => array( 'VendorType', 'ListID' ), + 'WorkersCompCodeRet' => array( 'WorkersCompCode', 'ListID' ), + ); - + if ($mode == QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL) { if (!isset($xml_to_sql[$path_or_tablefield])) @@ -498,7 +498,7 @@ static public function mapPrimaryKey($path_or_tablefield, $mode, &$map, $options { //$path_or_tablefield = substr($path_or_tablefield, 0, -3); $path_or_tablefield .= 'Ret'; - + if (isset($xml_to_sql[$path_or_tablefield])) { $map = $xml_to_sql[$path_or_tablefield]; @@ -514,16 +514,16 @@ static public function mapPrimaryKey($path_or_tablefield, $mode, &$map, $options } else { - + } - + return; } - + /** * Map an XML node path to an SQL table/field OR map an SQL table/field to an XML node path - * - * @param string $path The XML path *or* + * + * @param string $path The XML path *or* * @param char $mode * @param array $map * @return void @@ -531,1361 +531,1361 @@ static public function mapPrimaryKey($path_or_tablefield, $mode, &$map, $options static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, $options = array()) { static $xml_to_sql = array( - 'AccountRet' => array( 'Account', null ), - 'AccountRet ParentRef' => array( null, null ), - 'AccountRet ParentRef *' => array( 'Account', 'Parent_*' ), - 'AccountRet TaxLineInfoRet' => array( 'Account_TaxLineInfo', null ), - //'AccountRet TaxLineInfoRet TaxLineID' => array( 'Account_TaxLineInfo', 'TaxLineInfo_TaxLineID' ), - 'AccountRet TaxLineInfoRet *' => array( 'Account_TaxLineInfo', 'TaxLineInfo_*' ), - //'AccountRet DataExtRet' => array( null, null ), - //'AccountRet DataExtRet *' => array( 'DataExt', '*' ), + 'AccountRet' => array( 'Account', null ), + 'AccountRet ParentRef' => array( null, null ), + 'AccountRet ParentRef *' => array( 'Account', 'Parent_*' ), + 'AccountRet TaxLineInfoRet' => array( 'Account_TaxLineInfo', null ), + //'AccountRet TaxLineInfoRet TaxLineID' => array( 'Account_TaxLineInfo', 'TaxLineInfo_TaxLineID' ), + 'AccountRet TaxLineInfoRet *' => array( 'Account_TaxLineInfo', 'TaxLineInfo_*' ), + //'AccountRet DataExtRet' => array( null, null ), + //'AccountRet DataExtRet *' => array( 'DataExt', '*' ), 'AccountRet Desc' => array( 'Account', 'Descrip' ), - - 'AccountRet DataExtRet' => array( 'DataExt', null ), - 'AccountRet DataExtRet *' => array( 'DataExt', '*' ), - - 'AccountRet *' => array( 'Account', '*' ), - + + 'AccountRet DataExtRet' => array( 'DataExt', null ), + 'AccountRet DataExtRet *' => array( 'DataExt', '*' ), + + 'AccountRet *' => array( 'Account', '*' ), + 'BillingRateRet' => array( 'BillingRate', null ), 'BillingRateRet BillingRatePerItemRet' => array( null, null ), - 'BillingRateRet BillingRatePerItemRet ItemRef' => array( null, null ), - 'BillingRateRet BillingRatePerItemRet ItemRef *' => array( 'BillingRate_BillingRatePerItem', 'Item_*' ), - 'BillingRateRet BillingRatePerItemRet *' => array( 'BillingRate_BillingRatePerItem', '*' ), - 'BillingRateRet *' => array( 'BillingRate', '*' ), - - 'BillPaymentRet' => array( 'BillPayment', null ), - 'BillPaymentRet *' => array( 'BillPayment', '*' ), - + 'BillingRateRet BillingRatePerItemRet ItemRef' => array( null, null ), + 'BillingRateRet BillingRatePerItemRet ItemRef *' => array( 'BillingRate_BillingRatePerItem', 'Item_*' ), + 'BillingRateRet BillingRatePerItemRet *' => array( 'BillingRate_BillingRatePerItem', '*' ), + 'BillingRateRet *' => array( 'BillingRate', '*' ), + + 'BillPaymentRet' => array( 'BillPayment', null ), + 'BillPaymentRet *' => array( 'BillPayment', '*' ), + 'BillPaymentCheckRet' => array( 'BillPaymentCheck', null ), - - 'BillPaymentCheckRet PayeeEntityRef' => array( null, null ), - 'BillPaymentCheckRet PayeeEntityRef *' => array( 'BillPaymentCheck', 'PayeeEntity_*' ), - 'BillPaymentCheckRet APAccountRef' => array( null, null ), - 'BillPaymentCheckRet APAccountRef *' => array( 'BillPaymentCheck', 'APAccount_*' ), - 'BillPaymentCheckRet BankAccountRef' => array( null, null ), - 'BillPaymentCheckRet BankAccountRef *' => array( 'BillPaymentCheck', 'BankAccount_*' ), - 'BillPaymentCheckRet Address' => array( null, null ), - 'BillPaymentCheckRet Address *' => array( 'BillPaymentCheck', 'Address_*' ), - 'BillPaymentCheckRet AddressBlock' => array( null, null ), - 'BillPaymentCheckRet AddressBlock *' => array( 'BillPaymentCheck', 'AddressBlock_*' ), - 'BillPaymentCheckRet AppliedToTxnRet' => array( null, null ), - 'BillPaymentCheckRet AppliedToTxnRet TxnID' => array( 'BillPaymentCheck_AppliedToTxn', 'ToTxnID' ), - 'BillPaymentCheckRet AppliedToTxnRet DiscountAccountRef' => array( null, null ), - 'BillPaymentCheckRet AppliedToTxnRet DiscountAccountRef *' => array( 'BillPaymentCheck_AppliedToTxn', 'DiscountAccount_*' ), - 'BillPaymentCheckRet AppliedToTxnRet *' => array( 'BillPaymentCheck_AppliedToTxn', '*' ), - 'BillPaymentCheckRet DataExtRet' => array( 'DataExt', null ), - 'BillPaymentCheckRet DataExtRet *' => array( 'DataExt', '*' ), - 'BillPaymentCheckRet *' => array( 'BillPaymentCheck', '*' ), - - 'BillPaymentCreditCardRet' => array( 'BillPaymentCreditCard', null ), - - 'BillPaymentCreditCardRet PayeeEntityRef' => array( null, null ), - 'BillPaymentCreditCardRet PayeeEntityRef *' => array( 'BillPaymentCreditCard', 'PayeeEntity_*' ), - 'BillPaymentCreditCardRet APAccountRef' => array( null, null ), - 'BillPaymentCreditCardRet APAccountRef *' => array( 'BillPaymentCreditCard', 'APAccount_*' ), - 'BillPaymentCreditCardRet CreditCardAccountRef' => array( null, null ), - 'BillPaymentCreditCardRet CreditCardAccountRef *' => array( 'BillPaymentCreditCard', 'CreditCardAccount_*' ), - 'BillPaymentCreditCardRet AppliedToTxnRet' => array( null, null ), - 'BillPaymentCreditCardRet AppliedToTxnRet TxnID' => array( 'BillPaymentCreditCard_AppliedToTxn', 'ToTxnID' ), - 'BillPaymentCreditCardRet AppliedToTxnRet DiscountAccountRef' => array( null, null ), - 'BillPaymentCreditCardRet AppliedToTxnRet DiscountAccountRef *' => array( 'BillPaymentCreditCard_AppliedToTxn', 'DiscountAccount_*' ), - 'BillPaymentCreditCardRet AppliedToTxnRet *' => array( 'BillPaymentCreditCard_AppliedToTxn', '*' ), - 'BillPaymentCreditCardRet DataExtRet' => array( 'DataExt', null ), - 'BillPaymentCreditCardRet DataExtRet *' => array( 'DataExt', '*' ), - - 'BillPaymentCreditCardRet *' => array( 'BillPaymentCreditCard', '*' ), - + + 'BillPaymentCheckRet PayeeEntityRef' => array( null, null ), + 'BillPaymentCheckRet PayeeEntityRef *' => array( 'BillPaymentCheck', 'PayeeEntity_*' ), + 'BillPaymentCheckRet APAccountRef' => array( null, null ), + 'BillPaymentCheckRet APAccountRef *' => array( 'BillPaymentCheck', 'APAccount_*' ), + 'BillPaymentCheckRet BankAccountRef' => array( null, null ), + 'BillPaymentCheckRet BankAccountRef *' => array( 'BillPaymentCheck', 'BankAccount_*' ), + 'BillPaymentCheckRet Address' => array( null, null ), + 'BillPaymentCheckRet Address *' => array( 'BillPaymentCheck', 'Address_*' ), + 'BillPaymentCheckRet AddressBlock' => array( null, null ), + 'BillPaymentCheckRet AddressBlock *' => array( 'BillPaymentCheck', 'AddressBlock_*' ), + 'BillPaymentCheckRet AppliedToTxnRet' => array( null, null ), + 'BillPaymentCheckRet AppliedToTxnRet TxnID' => array( 'BillPaymentCheck_AppliedToTxn', 'ToTxnID' ), + 'BillPaymentCheckRet AppliedToTxnRet DiscountAccountRef' => array( null, null ), + 'BillPaymentCheckRet AppliedToTxnRet DiscountAccountRef *' => array( 'BillPaymentCheck_AppliedToTxn', 'DiscountAccount_*' ), + 'BillPaymentCheckRet AppliedToTxnRet *' => array( 'BillPaymentCheck_AppliedToTxn', '*' ), + 'BillPaymentCheckRet DataExtRet' => array( 'DataExt', null ), + 'BillPaymentCheckRet DataExtRet *' => array( 'DataExt', '*' ), + 'BillPaymentCheckRet *' => array( 'BillPaymentCheck', '*' ), + + 'BillPaymentCreditCardRet' => array( 'BillPaymentCreditCard', null ), + + 'BillPaymentCreditCardRet PayeeEntityRef' => array( null, null ), + 'BillPaymentCreditCardRet PayeeEntityRef *' => array( 'BillPaymentCreditCard', 'PayeeEntity_*' ), + 'BillPaymentCreditCardRet APAccountRef' => array( null, null ), + 'BillPaymentCreditCardRet APAccountRef *' => array( 'BillPaymentCreditCard', 'APAccount_*' ), + 'BillPaymentCreditCardRet CreditCardAccountRef' => array( null, null ), + 'BillPaymentCreditCardRet CreditCardAccountRef *' => array( 'BillPaymentCreditCard', 'CreditCardAccount_*' ), + 'BillPaymentCreditCardRet AppliedToTxnRet' => array( null, null ), + 'BillPaymentCreditCardRet AppliedToTxnRet TxnID' => array( 'BillPaymentCreditCard_AppliedToTxn', 'ToTxnID' ), + 'BillPaymentCreditCardRet AppliedToTxnRet DiscountAccountRef' => array( null, null ), + 'BillPaymentCreditCardRet AppliedToTxnRet DiscountAccountRef *' => array( 'BillPaymentCreditCard_AppliedToTxn', 'DiscountAccount_*' ), + 'BillPaymentCreditCardRet AppliedToTxnRet *' => array( 'BillPaymentCreditCard_AppliedToTxn', '*' ), + 'BillPaymentCreditCardRet DataExtRet' => array( 'DataExt', null ), + 'BillPaymentCreditCardRet DataExtRet *' => array( 'DataExt', '*' ), + + 'BillPaymentCreditCardRet *' => array( 'BillPaymentCreditCard', '*' ), + 'BillRet' => array( 'Bill', null ), - 'BillRet VendorRef' => array( null, null ), - 'BillRet VendorRef *' => array( 'Bill', 'Vendor_*' ), - 'BillRet APAccountRef' => array( null, null ), + 'BillRet VendorRef' => array( null, null ), + 'BillRet VendorRef *' => array( 'Bill', 'Vendor_*' ), + 'BillRet APAccountRef' => array( null, null ), 'BillRet APAccountRef *' => array( 'Bill', 'APAccount_*' ), - 'BillRet TermsRef' => array( null, null ), - 'BillRet TermsRef *' => array( 'Bill', 'Terms_*' ), - 'BillRet CurrencyRef' => array( null, null ), - 'BillRet CurrencyRef *' => array( 'Bill', 'Currency_*' ), - 'BillRet LinkedTxn' => array( null, null ), + 'BillRet TermsRef' => array( null, null ), + 'BillRet TermsRef *' => array( 'Bill', 'Terms_*' ), + 'BillRet CurrencyRef' => array( null, null ), + 'BillRet CurrencyRef *' => array( 'Bill', 'Currency_*' ), + 'BillRet LinkedTxn' => array( null, null ), 'BillRet LinkedTxn TxnID' => array( 'Bill_LinkedTxn', 'ToTxnID' ), - 'BillRet LinkedTxn *' => array( 'Bill_LinkedTxn', '*' ), - 'BillRet ExpenseLineRet' => array( null, null ), - 'BillRet ExpenseLineRet AccountRef' => array( null, null ), - 'BillRet ExpenseLineRet AccountRef *' => array( 'Bill_ExpenseLine', 'Account_*' ), - 'BillRet ExpenseLineRet CustomerRef' => array( null, null ), - 'BillRet ExpenseLineRet CustomerRef *' => array( 'Bill_ExpenseLine', 'Customer_*' ), - 'BillRet ExpenseLineRet ClassRef' => array( null, null ), - 'BillRet ExpenseLineRet ClassRef *' => array( 'Bill_ExpenseLine', 'Class_*' ), - 'BillRet ExpenseLineRet *' => array( 'Bill_ExpenseLine', '*' ), - 'BillRet ItemLineRet' => array( null, null ), - 'BillRet ItemLineRet ItemRef' => array( null, null ), - 'BillRet ItemLineRet ItemRef *' => array( 'Bill_ItemLine', 'Item_*' ), - 'BillRet ItemLineRet CustomerRef' => array( null, null ), - 'BillRet ItemLineRet CustomerRef *' => array( 'Bill_ItemLine', 'Customer_*' ), - 'BillRet ItemLineRet ClassRef' => array( null, null ), - 'BillRet ItemLineRet ClassRef *' => array( 'Bill_ItemLine', 'Class_*' ), - 'BillRet ItemLineRet Desc' => array( 'Bill_ItemLine', 'Descrip' ), - 'BillRet ItemLineRet *' => array( 'Bill_ItemLine', '*' ), - 'BillRet ItemGroupLineRet' => array( null, null ), - 'BillRet ItemGroupLineRet ItemGroupRef' => array( null, null ), - 'BillRet ItemGroupLineRet ItemGroupRef *' => array( 'Bill_ItemGroupLine', 'ItemGroup_*' ), - 'BillRet ItemGroupLineRet Desc' => array( 'Bill_ItemGroupLine', 'Descrip' ), - 'BillRet ItemGroupLineRet ItemLineRet' => array( null, null ), - 'BillRet ItemGroupLineRet ItemLineRet ItemRef' => array( null, null ), - 'BillRet ItemGroupLineRet ItemLineRet ItemRef *' => array( 'Bill_ItemGroupLine_ItemLine', 'Item_*' ), - 'BillRet ItemGroupLineRet ItemLineRet Desc' => array( 'Bill_ItemGroupLine_ItemLine', 'Descrip' ), - 'BillRet ItemGroupLineRet ItemLineRet CustomerRef' => array( null, null ), - 'BillRet ItemGroupLineRet ItemLineRet CustomerRef *' => array( 'Bill_ItemGroupLine_ItemLine', 'Customer_*' ), - 'BillRet ItemGroupLineRet ItemLineRet ClassRef' => array( null, null ), - 'BillRet ItemGroupLineRet ItemLineRet ClassRef *' => array( 'Bill_ItemGroupLine_ItemLine', 'Class_*' ), - 'BillRet ItemGroupLineRet ItemLineRet *' => array( 'Bill_ItemGroupLine_ItemLine', '*' ), - 'BillRet ItemGroupLineRet *' => array( 'Bill_ItemGroupLine', '*' ), - 'BillRet DataExtRet' => array( 'DataExt', null ), - 'BillRet DataExtRet *' => array( 'DataExt', '*' ), - - 'BillRet *' => array( 'Bill', '*' ), - - 'BillToPayRet' => array( 'BillToPay', null ), - 'BillToPayRet BillToPay' => array( null, null ), - 'BillToPayRet BillToPay APAccountRef' => array( null, null ), - 'BillToPayRet BillToPay APAccountRef *' => array( 'BillToPay', 'APAccount_*' ), - 'BillToPayRet BillToPay *' => array( 'BillToPay', '*' ), - 'BillToPayRet CreditToApply' => array( null, null ), - 'BillToPayRet CreditToApply APAccountRef' => array( null, null ), - 'BillToPayRet CreditToApply APAccountRef *' => array( 'CreditToApply', 'APAccount_*' ), - 'BillToPayRet CreditToApply *' => array( 'CreditToApply', '*' ), - 'BillToPayRet *' => array( null, null ), - - 'ChargeRet' => array( 'Charge', null ), - 'ChargeRet CustomerRef' => array( null, null ), - 'ChargeRet CustomerRef *' => array( 'Charge', 'Customer_*' ), - 'ChargeRet ItemRef' => array( null, null ), - 'ChargeRet ItemRef *' => array( 'Charge', 'Item_*' ), - 'ChargeRet OverrideUOMSetRef' => array( null, null ), - 'ChargeRet OverrideUOMSetRef *' => array( 'Charge', 'OverrideUOMSet_*' ), - 'ChargeRet Desc' => array( 'Charge', 'Descrip' ), - 'ChargeRet ARAccountRef' => array( null, null ), - 'ChargeRet ARAccountRef *' => array( 'Charge', 'ARAccount_*' ), - 'ChargeRet ClassRef' => array( null, null ), - 'ChargeRet ClassRef *' => array( 'Charge', 'Class_*' ), - 'ChargeRet DataExtRet' => array( 'DataExt', null ), - 'ChargeRet DataExtRet *' => array( 'DataExt', '*' ), - 'ChargeRet *' => array( 'Charge', '*' ), - - 'CheckRet' => array( 'Check', null ), - 'CheckRet AccountRef' => array( null, null ), - 'CheckRet AccountRef *' => array( 'Check', 'Account_*' ), - 'CheckRet PayeeEntityRef' => array( null, null ), - 'CheckRet PayeeEntityRef *' => array( 'Check', 'PayeeEntityRef_*' ), - 'CheckRet AddressBlock' => array( null, null ), + 'BillRet LinkedTxn *' => array( 'Bill_LinkedTxn', '*' ), + 'BillRet ExpenseLineRet' => array( null, null ), + 'BillRet ExpenseLineRet AccountRef' => array( null, null ), + 'BillRet ExpenseLineRet AccountRef *' => array( 'Bill_ExpenseLine', 'Account_*' ), + 'BillRet ExpenseLineRet CustomerRef' => array( null, null ), + 'BillRet ExpenseLineRet CustomerRef *' => array( 'Bill_ExpenseLine', 'Customer_*' ), + 'BillRet ExpenseLineRet ClassRef' => array( null, null ), + 'BillRet ExpenseLineRet ClassRef *' => array( 'Bill_ExpenseLine', 'Class_*' ), + 'BillRet ExpenseLineRet *' => array( 'Bill_ExpenseLine', '*' ), + 'BillRet ItemLineRet' => array( null, null ), + 'BillRet ItemLineRet ItemRef' => array( null, null ), + 'BillRet ItemLineRet ItemRef *' => array( 'Bill_ItemLine', 'Item_*' ), + 'BillRet ItemLineRet CustomerRef' => array( null, null ), + 'BillRet ItemLineRet CustomerRef *' => array( 'Bill_ItemLine', 'Customer_*' ), + 'BillRet ItemLineRet ClassRef' => array( null, null ), + 'BillRet ItemLineRet ClassRef *' => array( 'Bill_ItemLine', 'Class_*' ), + 'BillRet ItemLineRet Desc' => array( 'Bill_ItemLine', 'Descrip' ), + 'BillRet ItemLineRet *' => array( 'Bill_ItemLine', '*' ), + 'BillRet ItemGroupLineRet' => array( null, null ), + 'BillRet ItemGroupLineRet ItemGroupRef' => array( null, null ), + 'BillRet ItemGroupLineRet ItemGroupRef *' => array( 'Bill_ItemGroupLine', 'ItemGroup_*' ), + 'BillRet ItemGroupLineRet Desc' => array( 'Bill_ItemGroupLine', 'Descrip' ), + 'BillRet ItemGroupLineRet ItemLineRet' => array( null, null ), + 'BillRet ItemGroupLineRet ItemLineRet ItemRef' => array( null, null ), + 'BillRet ItemGroupLineRet ItemLineRet ItemRef *' => array( 'Bill_ItemGroupLine_ItemLine', 'Item_*' ), + 'BillRet ItemGroupLineRet ItemLineRet Desc' => array( 'Bill_ItemGroupLine_ItemLine', 'Descrip' ), + 'BillRet ItemGroupLineRet ItemLineRet CustomerRef' => array( null, null ), + 'BillRet ItemGroupLineRet ItemLineRet CustomerRef *' => array( 'Bill_ItemGroupLine_ItemLine', 'Customer_*' ), + 'BillRet ItemGroupLineRet ItemLineRet ClassRef' => array( null, null ), + 'BillRet ItemGroupLineRet ItemLineRet ClassRef *' => array( 'Bill_ItemGroupLine_ItemLine', 'Class_*' ), + 'BillRet ItemGroupLineRet ItemLineRet *' => array( 'Bill_ItemGroupLine_ItemLine', '*' ), + 'BillRet ItemGroupLineRet *' => array( 'Bill_ItemGroupLine', '*' ), + 'BillRet DataExtRet' => array( 'DataExt', null ), + 'BillRet DataExtRet *' => array( 'DataExt', '*' ), + + 'BillRet *' => array( 'Bill', '*' ), + + 'BillToPayRet' => array( 'BillToPay', null ), + 'BillToPayRet BillToPay' => array( null, null ), + 'BillToPayRet BillToPay APAccountRef' => array( null, null ), + 'BillToPayRet BillToPay APAccountRef *' => array( 'BillToPay', 'APAccount_*' ), + 'BillToPayRet BillToPay *' => array( 'BillToPay', '*' ), + 'BillToPayRet CreditToApply' => array( null, null ), + 'BillToPayRet CreditToApply APAccountRef' => array( null, null ), + 'BillToPayRet CreditToApply APAccountRef *' => array( 'CreditToApply', 'APAccount_*' ), + 'BillToPayRet CreditToApply *' => array( 'CreditToApply', '*' ), + 'BillToPayRet *' => array( null, null ), + + 'ChargeRet' => array( 'Charge', null ), + 'ChargeRet CustomerRef' => array( null, null ), + 'ChargeRet CustomerRef *' => array( 'Charge', 'Customer_*' ), + 'ChargeRet ItemRef' => array( null, null ), + 'ChargeRet ItemRef *' => array( 'Charge', 'Item_*' ), + 'ChargeRet OverrideUOMSetRef' => array( null, null ), + 'ChargeRet OverrideUOMSetRef *' => array( 'Charge', 'OverrideUOMSet_*' ), + 'ChargeRet Desc' => array( 'Charge', 'Descrip' ), + 'ChargeRet ARAccountRef' => array( null, null ), + 'ChargeRet ARAccountRef *' => array( 'Charge', 'ARAccount_*' ), + 'ChargeRet ClassRef' => array( null, null ), + 'ChargeRet ClassRef *' => array( 'Charge', 'Class_*' ), + 'ChargeRet DataExtRet' => array( 'DataExt', null ), + 'ChargeRet DataExtRet *' => array( 'DataExt', '*' ), + 'ChargeRet *' => array( 'Charge', '*' ), + + 'CheckRet' => array( 'Check', null ), + 'CheckRet AccountRef' => array( null, null ), + 'CheckRet AccountRef *' => array( 'Check', 'Account_*' ), + 'CheckRet PayeeEntityRef' => array( null, null ), + 'CheckRet PayeeEntityRef *' => array( 'Check', 'PayeeEntityRef_*' ), + 'CheckRet AddressBlock' => array( null, null ), 'CheckRet AddressBlock *' => array( 'Check', 'AddressBlock_*' ), - 'CheckRet Address' => array( null, null ), + 'CheckRet Address' => array( null, null ), 'CheckRet Address *' => array( 'Check', 'Address_*' ), - 'CheckRet CurrencyRef' => array( null, null ), - 'CheckRet CurrencyRef *' => array( 'Check', 'Currency_*' ), - 'CheckRet LinkedTxn' => array( null, null ), + 'CheckRet CurrencyRef' => array( null, null ), + 'CheckRet CurrencyRef *' => array( 'Check', 'Currency_*' ), + 'CheckRet LinkedTxn' => array( null, null ), 'CheckRet LinkedTxn TxnID' => array( 'Check_LinkedTxn', 'ToTxnID' ), - 'CheckRet LinkedTxn *' => array( 'Check_LinkedTxn', '*' ), - 'CheckRet ExpenseLineRet' => array( null, null ), - 'CheckRet ExpenseLineRet AccountRef' => array( null, null ), - 'CheckRet ExpenseLineRet AccountRef *' => array( 'Check_ExpenseLine', 'Account_*' ), - 'CheckRet ExpenseLineRet CustomerRef' => array( null, null ), - 'CheckRet ExpenseLineRet CustomerRef *' => array( 'Check_ExpenseLine', 'Customer_*' ), - 'CheckRet ExpenseLineRet ClassRef' => array( null, null ), - 'CheckRet ExpenseLineRet ClassRef *' => array( 'Check_ExpenseLine', 'Class_*' ), - 'CheckRet ExpenseLineRet *' => array( 'Check_ExpenseLine', '*' ), - 'CheckRet ItemLineRet' => array( null, null ), - 'CheckRet ItemLineRet ItemRef' => array( null, null ), - 'CheckRet ItemLineRet ItemRef *' => array( 'Check_ItemLine', 'Item_*' ), - 'CheckRet ItemLineRet OverrideUOMSetRef' => array( null, null ), - 'CheckRet ItemLineRet OverrideUOMSetRef *' => array( 'Check_ItemLine', 'OverrideUOMSet_*' ), - 'CheckRet ItemLineRet CustomerRef' => array( null, null ), + 'CheckRet LinkedTxn *' => array( 'Check_LinkedTxn', '*' ), + 'CheckRet ExpenseLineRet' => array( null, null ), + 'CheckRet ExpenseLineRet AccountRef' => array( null, null ), + 'CheckRet ExpenseLineRet AccountRef *' => array( 'Check_ExpenseLine', 'Account_*' ), + 'CheckRet ExpenseLineRet CustomerRef' => array( null, null ), + 'CheckRet ExpenseLineRet CustomerRef *' => array( 'Check_ExpenseLine', 'Customer_*' ), + 'CheckRet ExpenseLineRet ClassRef' => array( null, null ), + 'CheckRet ExpenseLineRet ClassRef *' => array( 'Check_ExpenseLine', 'Class_*' ), + 'CheckRet ExpenseLineRet *' => array( 'Check_ExpenseLine', '*' ), + 'CheckRet ItemLineRet' => array( null, null ), + 'CheckRet ItemLineRet ItemRef' => array( null, null ), + 'CheckRet ItemLineRet ItemRef *' => array( 'Check_ItemLine', 'Item_*' ), + 'CheckRet ItemLineRet OverrideUOMSetRef' => array( null, null ), + 'CheckRet ItemLineRet OverrideUOMSetRef *' => array( 'Check_ItemLine', 'OverrideUOMSet_*' ), + 'CheckRet ItemLineRet CustomerRef' => array( null, null ), 'CheckRet ItemLineRet CustomerRef *' => array( 'Check_ItemLine', 'Customer_*' ), - 'CheckRet ItemLineRet ClassRef' => array( null, null ), + 'CheckRet ItemLineRet ClassRef' => array( null, null ), 'CheckRet ItemLineRet ClassRef *' => array( 'Check_ItemLine', 'Class_*' ), - 'CheckRet ItemLineRet Desc' => array( 'Check_ItemLine', 'Descrip' ), - 'CheckRet ItemLineRet *' => array( 'Check_ItemLine', '*' ), - 'CheckRet ItemGroupLineRet' => array( null, null ), - 'CheckRet ItemGroupLineRet ItemGroupRef' => array( null, null ), - 'CheckRet ItemGroupLineRet ItemGroupRef *' => array( 'Check_ItemGroupLine', 'ItemGroup_*' ), - 'CheckRet ItemGroupLineRet Desc' => array( 'Check_ItemGroupLine', 'Descrip' ), - 'CheckRet ItemGroupLineRet OverrideUOMSetRef' => array( null, null ), - 'CheckRet ItemGroupLineRet OverrideUOMSetRef *' => array( 'Check_ItemGroupLine', 'OverrideUOMSet_*' ), - 'CheckRet ItemGroupLineRet ItemLineRet' => array( null, null ), - 'CheckRet ItemGroupLineRet ItemLineRet ItemRef' => array( null, null ), - 'CheckRet ItemGroupLineRet ItemLineRet ItemRef *' => array( 'Check_ItemGroupLine_ItemLine', 'Item_*' ), - 'CheckRet ItemGroupLineRet ItemLineRet Desc' => array( 'Check_ItemGroupLine_ItemLine', 'Descrip' ), - 'CheckRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef' => array( null, null ), - 'CheckRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef *' => array( 'Check_ItemGroupLine_ItemLine', 'OverrideUOMSet_*' ), - 'CheckRet ItemGroupLineRet ItemLineRet CustomerRef' => array( null, null ), - 'CheckRet ItemGroupLineRet ItemLineRet CustomerRef *' => array( 'Check_ItemGroupLine_ItemLine', 'Customer_*' ), - 'CheckRet ItemGroupLineRet ItemLineRet ClassRef' => array( null, null ), - 'CheckRet ItemGroupLineRet ItemLineRet ClassRef *' => array( 'Check_ItemGroupLine_ItemLine', 'Class_*' ), - 'CheckRet ItemGroupLineRet ItemLineRet *' => array( 'Check_ItemGroupLine_ItemLine', '*' ), - 'CheckRet ItemGroupLineRet *' => array( 'Check_ItemGroupLine', '*' ), - 'CheckRet DataExtRet' => array( null, null ), - 'CheckRet DataExtRet *' => array( 'DataExt', '*' ), - 'CheckRet *' => array( 'Check', '*' ), - - 'ClassRet' => array( 'Class', null ), - 'ClassRet ParentRef' => array( null, null ), + 'CheckRet ItemLineRet Desc' => array( 'Check_ItemLine', 'Descrip' ), + 'CheckRet ItemLineRet *' => array( 'Check_ItemLine', '*' ), + 'CheckRet ItemGroupLineRet' => array( null, null ), + 'CheckRet ItemGroupLineRet ItemGroupRef' => array( null, null ), + 'CheckRet ItemGroupLineRet ItemGroupRef *' => array( 'Check_ItemGroupLine', 'ItemGroup_*' ), + 'CheckRet ItemGroupLineRet Desc' => array( 'Check_ItemGroupLine', 'Descrip' ), + 'CheckRet ItemGroupLineRet OverrideUOMSetRef' => array( null, null ), + 'CheckRet ItemGroupLineRet OverrideUOMSetRef *' => array( 'Check_ItemGroupLine', 'OverrideUOMSet_*' ), + 'CheckRet ItemGroupLineRet ItemLineRet' => array( null, null ), + 'CheckRet ItemGroupLineRet ItemLineRet ItemRef' => array( null, null ), + 'CheckRet ItemGroupLineRet ItemLineRet ItemRef *' => array( 'Check_ItemGroupLine_ItemLine', 'Item_*' ), + 'CheckRet ItemGroupLineRet ItemLineRet Desc' => array( 'Check_ItemGroupLine_ItemLine', 'Descrip' ), + 'CheckRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef' => array( null, null ), + 'CheckRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef *' => array( 'Check_ItemGroupLine_ItemLine', 'OverrideUOMSet_*' ), + 'CheckRet ItemGroupLineRet ItemLineRet CustomerRef' => array( null, null ), + 'CheckRet ItemGroupLineRet ItemLineRet CustomerRef *' => array( 'Check_ItemGroupLine_ItemLine', 'Customer_*' ), + 'CheckRet ItemGroupLineRet ItemLineRet ClassRef' => array( null, null ), + 'CheckRet ItemGroupLineRet ItemLineRet ClassRef *' => array( 'Check_ItemGroupLine_ItemLine', 'Class_*' ), + 'CheckRet ItemGroupLineRet ItemLineRet *' => array( 'Check_ItemGroupLine_ItemLine', '*' ), + 'CheckRet ItemGroupLineRet *' => array( 'Check_ItemGroupLine', '*' ), + 'CheckRet DataExtRet' => array( null, null ), + 'CheckRet DataExtRet *' => array( 'DataExt', '*' ), + 'CheckRet *' => array( 'Check', '*' ), + + 'ClassRet' => array( 'Class', null ), + 'ClassRet ParentRef' => array( null, null ), 'ClassRet ParentRef *' => array( 'Class', 'Parent_*' ), - - 'ClassRet *' => array( 'Class', '*' ), - - 'CompanyRet' => array( 'Company', null ), - 'CompanyRet Address' => array( null, null ), - 'CompanyRet Address *' => array( 'Company', 'Address_*' ), - 'CompanyRet AddressBlock' => array( null, null ), - 'CompanyRet AddressBlock *' => array( 'Company', 'AddressBlock_*' ), - 'CompanyRet LegalAddress' => array( null, null ), - 'CompanyRet LegalAddress *' => array( 'Company', 'LegalAddress_*' ), - 'CompanyRet CompanyAddressForCustomer' => array( null, null ), - 'CompanyRet CompanyAddressForCustomer *' => array( 'Company', 'Company_CompanyAddressForCustomer_*' ), - 'CompanyRet CompanyAddressBlockForCustomer' => array( null, null ), - 'CompanyRet CompanyAddressBlockForCustomer *' => array( 'Company', 'Company_CompanyAddressBlockForCustomer_*' ), - - 'CompanyRet SubscribedServices' => array( null, null ), - 'CompanyRet SubscribedServices Service' => array( null, null ), - 'CompanyRet SubscribedServices Service *' => array( 'Company_SubscribedServices_Service', '*' ), - 'CompanyRet SubscribedServices *' => array( 'Company', 'SubscribedServices_*' ), - - 'CompanyRet DataExtRet' => array( null, null ), - 'CompanyRet DataExtRet *' => array( 'DataExt', '*' ), - - 'CompanyRet *' => array( 'Company', '*' ), - + + 'ClassRet *' => array( 'Class', '*' ), + + 'CompanyRet' => array( 'Company', null ), + 'CompanyRet Address' => array( null, null ), + 'CompanyRet Address *' => array( 'Company', 'Address_*' ), + 'CompanyRet AddressBlock' => array( null, null ), + 'CompanyRet AddressBlock *' => array( 'Company', 'AddressBlock_*' ), + 'CompanyRet LegalAddress' => array( null, null ), + 'CompanyRet LegalAddress *' => array( 'Company', 'LegalAddress_*' ), + 'CompanyRet CompanyAddressForCustomer' => array( null, null ), + 'CompanyRet CompanyAddressForCustomer *' => array( 'Company', 'Company_CompanyAddressForCustomer_*' ), + 'CompanyRet CompanyAddressBlockForCustomer' => array( null, null ), + 'CompanyRet CompanyAddressBlockForCustomer *' => array( 'Company', 'Company_CompanyAddressBlockForCustomer_*' ), + + 'CompanyRet SubscribedServices' => array( null, null ), + 'CompanyRet SubscribedServices Service' => array( null, null ), + 'CompanyRet SubscribedServices Service *' => array( 'Company_SubscribedServices_Service', '*' ), + 'CompanyRet SubscribedServices *' => array( 'Company', 'SubscribedServices_*' ), + + 'CompanyRet DataExtRet' => array( null, null ), + 'CompanyRet DataExtRet *' => array( 'DataExt', '*' ), + + 'CompanyRet *' => array( 'Company', '*' ), + 'CurrencyRet' => array( 'Currency', null ), - - 'CurrencyRet CurrencyFormat' => array( null, null ), - 'CurrencyRet CurrencyFormat *' => array( 'Currency', 'Currency_CurrencyFormat_*' ), - - 'CurrencyRet *' => array( 'Currency', '*' ), - - 'HostRet' => array( 'Host', null ), - 'HostRet *' => array( 'Host', '*' ), - - - 'PreferencesRet' => array( 'Preferences', null ), - - 'PreferencesRet AccountingPreferences' => array( null, null ), - 'PreferencesRet AccountingPreferences *' => array( 'Preferences', 'AccountingPrefs_*' ), - - 'PreferencesRet FinanceChargePreferences' => array( null, null ), - - 'PreferencesRet FinanceChargePreferences FinanceChargeAccountRef' => array( null, null ), - 'PreferencesRet FinanceChargePreferences FinanceChargeAccountRef *' => array( 'Preferences', 'FinanceChargePrefs_FinanceChargeAccount_*' ), - - 'PreferencesRet FinanceChargePreferences *' => array( 'Preferences', 'FinanceChargePrefs_*' ), - - 'PreferencesRet JobsAndEstimatesPreferences' => array( null, null ), - 'PreferencesRet JobsAndEstimatesPreferences *' => array( 'Preferences', 'JobsAndEstimatesPrefs_*' ), - - 'PreferencesRet MultiCurrencyPreferences' => array( null, null ), - 'PreferencesRet MultiCurrencyPreferences HomeCurrencyRef' => array( null, null ), - 'PreferencesRet MultiCurrencyPreferences HomeCurrencyRef *' => array( 'Preferences', 'MultiCurrencyPrefs_HomeCurrency_*' ), - 'PreferencesRet MultiCurrencyPreferences *' => array( 'Preferences', 'MultiCurrencyPrefs_*' ), - - 'PreferencesRet MultiLocationInventoryPreferences' => array( null, null ), - 'PreferencesRet MultiLocationInventoryPreferences *' => array( 'Preferences', 'MultiLocationInventoryPrefs_*' ), - - 'PreferencesRet PurchasesAndVendorsPreferences' => array( null, null ), - 'PreferencesRet PurchasesAndVendorsPreferences DefaultDiscountAccountRef' => array( null, null ), - 'PreferencesRet PurchasesAndVendorsPreferences DefaultDiscountAccountRef *' => array( 'Preferences', 'PurchasesAndVendorsPrefs_DefaultDiscountAccount_*' ), - 'PreferencesRet PurchasesAndVendorsPreferences *' => array( 'Preferences', 'PurchasesAndVendorsPrefs_*' ), - - 'PreferencesRet ReportsPreferences' => array( null, null ), - 'PreferencesRet ReportsPreferences *' => array( 'Preferences', 'ReportsPrefs_*' ), - - 'PreferencesRet SalesAndCustomersPreferences' => array( null, null ), - 'PreferencesRet SalesAndCustomersPreferences DefaultShipMethodRef' => array( null, null ), + + 'CurrencyRet CurrencyFormat' => array( null, null ), + 'CurrencyRet CurrencyFormat *' => array( 'Currency', 'Currency_CurrencyFormat_*' ), + + 'CurrencyRet *' => array( 'Currency', '*' ), + + 'HostRet' => array( 'Host', null ), + 'HostRet *' => array( 'Host', '*' ), + + + 'PreferencesRet' => array( 'Preferences', null ), + + 'PreferencesRet AccountingPreferences' => array( null, null ), + 'PreferencesRet AccountingPreferences *' => array( 'Preferences', 'AccountingPrefs_*' ), + + 'PreferencesRet FinanceChargePreferences' => array( null, null ), + + 'PreferencesRet FinanceChargePreferences FinanceChargeAccountRef' => array( null, null ), + 'PreferencesRet FinanceChargePreferences FinanceChargeAccountRef *' => array( 'Preferences', 'FinanceChargePrefs_FinanceChargeAccount_*' ), + + 'PreferencesRet FinanceChargePreferences *' => array( 'Preferences', 'FinanceChargePrefs_*' ), + + 'PreferencesRet JobsAndEstimatesPreferences' => array( null, null ), + 'PreferencesRet JobsAndEstimatesPreferences *' => array( 'Preferences', 'JobsAndEstimatesPrefs_*' ), + + 'PreferencesRet MultiCurrencyPreferences' => array( null, null ), + 'PreferencesRet MultiCurrencyPreferences HomeCurrencyRef' => array( null, null ), + 'PreferencesRet MultiCurrencyPreferences HomeCurrencyRef *' => array( 'Preferences', 'MultiCurrencyPrefs_HomeCurrency_*' ), + 'PreferencesRet MultiCurrencyPreferences *' => array( 'Preferences', 'MultiCurrencyPrefs_*' ), + + 'PreferencesRet MultiLocationInventoryPreferences' => array( null, null ), + 'PreferencesRet MultiLocationInventoryPreferences *' => array( 'Preferences', 'MultiLocationInventoryPrefs_*' ), + + 'PreferencesRet PurchasesAndVendorsPreferences' => array( null, null ), + 'PreferencesRet PurchasesAndVendorsPreferences DefaultDiscountAccountRef' => array( null, null ), + 'PreferencesRet PurchasesAndVendorsPreferences DefaultDiscountAccountRef *' => array( 'Preferences', 'PurchasesAndVendorsPrefs_DefaultDiscountAccount_*' ), + 'PreferencesRet PurchasesAndVendorsPreferences *' => array( 'Preferences', 'PurchasesAndVendorsPrefs_*' ), + + 'PreferencesRet ReportsPreferences' => array( null, null ), + 'PreferencesRet ReportsPreferences *' => array( 'Preferences', 'ReportsPrefs_*' ), + + 'PreferencesRet SalesAndCustomersPreferences' => array( null, null ), + 'PreferencesRet SalesAndCustomersPreferences DefaultShipMethodRef' => array( null, null ), 'PreferencesRet SalesAndCustomersPreferences DefaultShipMethodRef *' => array( 'Preferences', 'SalesAndCustomersPrefs_DefaultShipMethod_*' ), - 'PreferencesRet SalesAndCustomersPreferences PriceLevels' => array( null, null ), + 'PreferencesRet SalesAndCustomersPreferences PriceLevels' => array( null, null ), 'PreferencesRet SalesAndCustomersPreferences PriceLevels *' => array( 'Preferences', 'SalesAndCustomersPrefs_PriceLevels_*' ), - 'PreferencesRet SalesAndCustomersPreferences *' => array( 'Preferences', 'SalesAndCustomersPrefs_*' ), - - 'PreferencesRet SalesTaxPreferences' => array( null, null ), - 'PreferencesRet SalesTaxPreferences DefaultItemSalesTaxRef' => array( null, null ), + 'PreferencesRet SalesAndCustomersPreferences *' => array( 'Preferences', 'SalesAndCustomersPrefs_*' ), + + 'PreferencesRet SalesTaxPreferences' => array( null, null ), + 'PreferencesRet SalesTaxPreferences DefaultItemSalesTaxRef' => array( null, null ), 'PreferencesRet SalesTaxPreferences DefaultItemSalesTaxRef *' => array( 'Preferences', 'SalesTaxPrefs_DefaultItemSalesTax_*' ), - 'PreferencesRet SalesTaxPreferences DefaultTaxableSalesTaxCodeRef' => array( null, null ), + 'PreferencesRet SalesTaxPreferences DefaultTaxableSalesTaxCodeRef' => array( null, null ), 'PreferencesRet SalesTaxPreferences DefaultTaxableSalesTaxCodeRef *' => array( 'Preferences', 'SalesTaxPrefs_DefaultTaxableSalesTaxCode_*' ), - 'PreferencesRet SalesTaxPreferences DefaultNonTaxableSalesTaxCodeRef' => array( null, null ), + 'PreferencesRet SalesTaxPreferences DefaultNonTaxableSalesTaxCodeRef' => array( null, null ), 'PreferencesRet SalesTaxPreferences DefaultNonTaxableSalesTaxCodeRef *' => array( 'Preferences', 'SalesTaxPrefs_DefaultNonTaxableSalesTaxCode_*' ), - 'PreferencesRet SalesTaxPreferences *' => array( 'Preferences', 'SalesTaxPrefs_*' ), - - 'PreferencesRet TimeTrackingPreferences' => array( null, null ), - 'PreferencesRet TimeTrackingPreferences *' => array( 'Preferences', 'TimeTrackingPrefs_*' ), - - 'PreferencesRet CurrentAppAccessRights' => array( null, null ), - 'PreferencesRet CurrentAppAccessRights *' => array( 'Preferences', 'CurrentAppAccessRights_*' ), - - 'PreferencesRet *' => array( 'Preferences', '*' ), - - + 'PreferencesRet SalesTaxPreferences *' => array( 'Preferences', 'SalesTaxPrefs_*' ), + + 'PreferencesRet TimeTrackingPreferences' => array( null, null ), + 'PreferencesRet TimeTrackingPreferences *' => array( 'Preferences', 'TimeTrackingPrefs_*' ), + + 'PreferencesRet CurrentAppAccessRights' => array( null, null ), + 'PreferencesRet CurrentAppAccessRights *' => array( 'Preferences', 'CurrentAppAccessRights_*' ), + + 'PreferencesRet *' => array( 'Preferences', '*' ), + + 'CreditCardChargeRet' => array( 'CreditCardCharge', null ), - 'CreditCardChargeRet AccountRef' => array( null, null ), - 'CreditCardChargeRet AccountRef *' => array( 'CreditCardCharge', 'Account_*' ), - 'CreditCardChargeRet PayeeEntityRef' => array( null, null ), - 'CreditCardChargeRet PayeeEntityRef *' => array( 'CreditCardCharge', 'PayeeEntity_*' ), - 'CreditCardChargeRet CurrencyRef' => array( null, null ), - 'CreditCardChargeRet CurrencyRef *' => array( 'CreditCardCharge', 'Currency_*' ), - - 'CreditCardChargeRet ItemLineRet' => array( null, null ), - 'CreditCardChargeRet ItemLineRet Desc' => array( 'CreditCardCharge_ItemLine', 'Descrip' ), - 'CreditCardChargeRet ItemLineRet ItemRef' => array( null, null ), - 'CreditCardChargeRet ItemLineRet ItemRef *' => array( 'CreditCardCharge_ItemLine', 'Item_*' ), - 'CreditCardChargeRet ItemLineRet OverrideUOMSetRef' => array( null, null ), - 'CreditCardChargeRet ItemLineRet OverrideUOMSetRef *' => array( 'CreditCardCharge_ItemLine', 'OverrideUOMSet_*' ), - 'CreditCardChargeRet ItemLineRet CustomerRef' => array( null, null ), - 'CreditCardChargeRet ItemLineRet CustomerRef *' => array( 'CreditCardCharge_ItemLine', 'Customer_*' ), - 'CreditCardChargeRet ItemLineRet ClassRef' => array( null, null ), - 'CreditCardChargeRet ItemLineRet ClassRef *' => array( 'CreditCardCharge_ItemLine', 'Class_*' ), - 'CreditCardChargeRet ItemLineRet *' => array( 'CreditCardCharge_ItemLine', '*' ), - - 'CreditCardChargeRet ItemGroupLineRet' => array( null, null ), - 'CreditCardChargeRet ItemGroupLineRet Desc' => array( 'CreditCardCharge_ItemGroupLine', 'Descrip' ), - 'CreditCardChargeRet ItemGroupLineRet ItemGroupRef' => array( null, null ), - 'CreditCardChargeRet ItemGroupLineRet ItemGroupRef *' => array( 'CreditCardCharge_ItemGroupLine', 'ItemGroup_*' ), - 'CreditCardChargeRet ItemGroupLineRet OverrideUOMSetRef' => array( null, null ), - 'CreditCardChargeRet ItemGroupLineRet OverrideUOMSetRef *' => array( 'CreditCardCharge_ItemGroupLine', 'OverrideUOMSet_*' ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet' => array( null, null ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet ItemRef' => array( null, null ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet ItemRef *' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'Item_*' ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet Desc' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'Descrip' ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef' => array( null, null ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef *' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'OverrideUOMSet_*' ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet CustomerRef' => array( null, null ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet CustomerRef *' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'Customer_*' ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet ClassRef' => array( null, null ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet ClassRef *' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'Class_*' ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet *' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', '*' ), - 'CreditCardChargeRet ItemGroupLineRet *' => array( 'CreditCardCharge_ItemGroupLine', '*' ), - - 'CreditCardChargeRet ExpenseLineRet' => array( null, null ), - 'CreditCardChargeRet ExpenseLineRet AccountRef' => array( null, null ), - 'CreditCardChargeRet ExpenseLineRet AccountRef *' => array( 'CreditCardCharge_ExpenseLine', 'Account_*' ), - 'CreditCardChargeRet ExpenseLineRet CustomerRef' => array( null, null ), - 'CreditCardChargeRet ExpenseLineRet CustomerRef *' => array( 'CreditCardCharge_ExpenseLine', 'Customer_*' ), - 'CreditCardChargeRet ExpenseLineRet ClassRef' => array( null, null ), - 'CreditCardChargeRet ExpenseLineRet ClassRef *' => array( 'CreditCardCharge_ExpenseLine', 'Class_*' ), - 'CreditCardChargeRet ExpenseLineRet *' => array( 'CreditCardCharge_ExpenseLine', '*' ), - - 'CreditCardChargeRet DataExtRet' => array( null, null ), - 'CreditCardChargeRet DataExtRet *' => array( 'DataExt', '*' ), - 'CreditCardChargeRet *' => array( 'CreditCardCharge', '*' ), - - - + 'CreditCardChargeRet AccountRef' => array( null, null ), + 'CreditCardChargeRet AccountRef *' => array( 'CreditCardCharge', 'Account_*' ), + 'CreditCardChargeRet PayeeEntityRef' => array( null, null ), + 'CreditCardChargeRet PayeeEntityRef *' => array( 'CreditCardCharge', 'PayeeEntity_*' ), + 'CreditCardChargeRet CurrencyRef' => array( null, null ), + 'CreditCardChargeRet CurrencyRef *' => array( 'CreditCardCharge', 'Currency_*' ), + + 'CreditCardChargeRet ItemLineRet' => array( null, null ), + 'CreditCardChargeRet ItemLineRet Desc' => array( 'CreditCardCharge_ItemLine', 'Descrip' ), + 'CreditCardChargeRet ItemLineRet ItemRef' => array( null, null ), + 'CreditCardChargeRet ItemLineRet ItemRef *' => array( 'CreditCardCharge_ItemLine', 'Item_*' ), + 'CreditCardChargeRet ItemLineRet OverrideUOMSetRef' => array( null, null ), + 'CreditCardChargeRet ItemLineRet OverrideUOMSetRef *' => array( 'CreditCardCharge_ItemLine', 'OverrideUOMSet_*' ), + 'CreditCardChargeRet ItemLineRet CustomerRef' => array( null, null ), + 'CreditCardChargeRet ItemLineRet CustomerRef *' => array( 'CreditCardCharge_ItemLine', 'Customer_*' ), + 'CreditCardChargeRet ItemLineRet ClassRef' => array( null, null ), + 'CreditCardChargeRet ItemLineRet ClassRef *' => array( 'CreditCardCharge_ItemLine', 'Class_*' ), + 'CreditCardChargeRet ItemLineRet *' => array( 'CreditCardCharge_ItemLine', '*' ), + + 'CreditCardChargeRet ItemGroupLineRet' => array( null, null ), + 'CreditCardChargeRet ItemGroupLineRet Desc' => array( 'CreditCardCharge_ItemGroupLine', 'Descrip' ), + 'CreditCardChargeRet ItemGroupLineRet ItemGroupRef' => array( null, null ), + 'CreditCardChargeRet ItemGroupLineRet ItemGroupRef *' => array( 'CreditCardCharge_ItemGroupLine', 'ItemGroup_*' ), + 'CreditCardChargeRet ItemGroupLineRet OverrideUOMSetRef' => array( null, null ), + 'CreditCardChargeRet ItemGroupLineRet OverrideUOMSetRef *' => array( 'CreditCardCharge_ItemGroupLine', 'OverrideUOMSet_*' ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet' => array( null, null ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet ItemRef' => array( null, null ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet ItemRef *' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'Item_*' ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet Desc' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'Descrip' ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef' => array( null, null ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef *' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'OverrideUOMSet_*' ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet CustomerRef' => array( null, null ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet CustomerRef *' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'Customer_*' ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet ClassRef' => array( null, null ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet ClassRef *' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'Class_*' ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet *' => array( 'CreditCardCharge_ItemGroupLine_ItemLine', '*' ), + 'CreditCardChargeRet ItemGroupLineRet *' => array( 'CreditCardCharge_ItemGroupLine', '*' ), + + 'CreditCardChargeRet ExpenseLineRet' => array( null, null ), + 'CreditCardChargeRet ExpenseLineRet AccountRef' => array( null, null ), + 'CreditCardChargeRet ExpenseLineRet AccountRef *' => array( 'CreditCardCharge_ExpenseLine', 'Account_*' ), + 'CreditCardChargeRet ExpenseLineRet CustomerRef' => array( null, null ), + 'CreditCardChargeRet ExpenseLineRet CustomerRef *' => array( 'CreditCardCharge_ExpenseLine', 'Customer_*' ), + 'CreditCardChargeRet ExpenseLineRet ClassRef' => array( null, null ), + 'CreditCardChargeRet ExpenseLineRet ClassRef *' => array( 'CreditCardCharge_ExpenseLine', 'Class_*' ), + 'CreditCardChargeRet ExpenseLineRet *' => array( 'CreditCardCharge_ExpenseLine', '*' ), + + 'CreditCardChargeRet DataExtRet' => array( null, null ), + 'CreditCardChargeRet DataExtRet *' => array( 'DataExt', '*' ), + 'CreditCardChargeRet *' => array( 'CreditCardCharge', '*' ), + + + 'CreditCardCreditRet' => array( 'CreditCardCredit', null ), - 'CreditCardCreditRet AccountRef' => array( null, null ), - 'CreditCardCreditRet AccountRef *' => array( 'CreditCardCredit', 'Account_*' ), - 'CreditCardCreditRet PayeeEntityRef' => array( null, null ), - 'CreditCardCreditRet PayeeEntityRef *' => array( 'CreditCardCredit', 'PayeeEntity_*' ), - 'CreditCardCreditRet CurrencyRef' => array( null, null ), - 'CreditCardCreditRet CurrencyRef *' => array( 'CreditCardCredit', 'Currency_*' ), - + 'CreditCardCreditRet AccountRef' => array( null, null ), + 'CreditCardCreditRet AccountRef *' => array( 'CreditCardCredit', 'Account_*' ), + 'CreditCardCreditRet PayeeEntityRef' => array( null, null ), + 'CreditCardCreditRet PayeeEntityRef *' => array( 'CreditCardCredit', 'PayeeEntity_*' ), + 'CreditCardCreditRet CurrencyRef' => array( null, null ), + 'CreditCardCreditRet CurrencyRef *' => array( 'CreditCardCredit', 'Currency_*' ), + 'CreditCardCreditRet ExpenseLineRet' => array( null, null ), - 'CreditCardCreditRet ExpenseLineRet AccountRef' => array( null, null ), - 'CreditCardCreditRet ExpenseLineRet AccountRef *' => array( 'CreditCardCredit_ExpenseLine', 'Account_*' ), - 'CreditCardCreditRet ExpenseLineRet CustomerRef' => array( null, null ), - 'CreditCardCreditRet ExpenseLineRet CustomerRef *' => array( 'CreditCardCredit_ExpenseLine', 'Customer_*' ), - 'CreditCardCreditRet ExpenseLineRet ClassRef' => array( null, null ), - 'CreditCardCreditRet ExpenseLineRet ClassRef *' => array( 'CreditCardCredit_ExpenseLine', 'Class_*' ), - 'CreditCardCreditRet ExpenseLineRet *' => array( 'CreditCardCredit_ExpenseLine', '*' ), - + 'CreditCardCreditRet ExpenseLineRet AccountRef' => array( null, null ), + 'CreditCardCreditRet ExpenseLineRet AccountRef *' => array( 'CreditCardCredit_ExpenseLine', 'Account_*' ), + 'CreditCardCreditRet ExpenseLineRet CustomerRef' => array( null, null ), + 'CreditCardCreditRet ExpenseLineRet CustomerRef *' => array( 'CreditCardCredit_ExpenseLine', 'Customer_*' ), + 'CreditCardCreditRet ExpenseLineRet ClassRef' => array( null, null ), + 'CreditCardCreditRet ExpenseLineRet ClassRef *' => array( 'CreditCardCredit_ExpenseLine', 'Class_*' ), + 'CreditCardCreditRet ExpenseLineRet *' => array( 'CreditCardCredit_ExpenseLine', '*' ), + 'CreditCardCreditRet ItemLineRet' => array( null, null ), - 'CreditCardCreditRet ItemLineRet Desc' => array( 'CreditCardCredit_ItemLine', 'Descrip' ), - 'CreditCardCreditRet ItemLineRet ItemRef' => array( null, null ), - 'CreditCardCreditRet ItemLineRet ItemRef *' => array( 'CreditCardCredit_ItemLine', 'Item_*' ), - 'CreditCardCreditRet ItemLineRet OverrideUOMSetRef' => array( null, null ), - 'CreditCardCreditRet ItemLineRet OverrideUOMSetRef *' => array( 'CreditCardCredit_ItemLine', 'OverrideUOMSet_*' ), - 'CreditCardCreditRet ItemLineRet CustomerRef' => array( null, null ), - 'CreditCardCreditRet ItemLineRet CustomerRef *' => array( 'CreditCardCredit_ItemLine', 'Customer_*' ), - 'CreditCardCreditRet ItemLineRet ClassRef' => array( null, null ), - 'CreditCardCreditRet ItemLineRet ClassRef *' => array( 'CreditCardCredit_ItemLine', 'Class_*' ), - 'CreditCardCreditRet ItemLineRet *' => array( 'CreditCardCredit_ItemLine', '*' ), - + 'CreditCardCreditRet ItemLineRet Desc' => array( 'CreditCardCredit_ItemLine', 'Descrip' ), + 'CreditCardCreditRet ItemLineRet ItemRef' => array( null, null ), + 'CreditCardCreditRet ItemLineRet ItemRef *' => array( 'CreditCardCredit_ItemLine', 'Item_*' ), + 'CreditCardCreditRet ItemLineRet OverrideUOMSetRef' => array( null, null ), + 'CreditCardCreditRet ItemLineRet OverrideUOMSetRef *' => array( 'CreditCardCredit_ItemLine', 'OverrideUOMSet_*' ), + 'CreditCardCreditRet ItemLineRet CustomerRef' => array( null, null ), + 'CreditCardCreditRet ItemLineRet CustomerRef *' => array( 'CreditCardCredit_ItemLine', 'Customer_*' ), + 'CreditCardCreditRet ItemLineRet ClassRef' => array( null, null ), + 'CreditCardCreditRet ItemLineRet ClassRef *' => array( 'CreditCardCredit_ItemLine', 'Class_*' ), + 'CreditCardCreditRet ItemLineRet *' => array( 'CreditCardCredit_ItemLine', '*' ), + 'CreditCardCreditRet ItemGroupLineRet' => array( null, null ), - 'CreditCardCreditRet ItemGroupLineRet Desc' => array( 'CreditCardCredit_ItemGroupLine', 'Descrip' ), - 'CreditCardCreditRet ItemGroupLineRet ItemGroupRef' => array( null, null ), - 'CreditCardCreditRet ItemGroupLineRet ItemGroupRef *' => array( 'CreditCardCredit_ItemGroupLine', 'ItemGroup_*' ), - 'CreditCardCreditRet ItemGroupLineRet OverrideUOMSetRef' => array( null, null ), - 'CreditCardCreditRet ItemGroupLineRet OverrideUOMSetRef *' => array( 'CreditCardCredit_ItemGroupLine', 'OverrideUOMSet_*' ), - 'CreditCardCreditRet ItemGroupLineRet ItemLineRet' => array( null, null ), - 'CreditCardCreditRet ItemGroupLineRet ItemLineRet Desc' => array( 'CreditCardCredit_ItemGroupLine_ItemLine', 'Descrip' ), - 'CreditCardCreditRet ItemGroupLineRet ItemLineRet *' => array( 'CreditCardCredit_ItemGroupLine_ItemLine', '*' ), - 'CreditCardCreditRet ItemGroupLineRet *' => array( 'CreditCardCredit_ItemGroupLine', '*' ), - - 'CreditCardCreditRet DataExtRet' => array( null, null ), - 'CreditCardCreditRet DataExtRet *' => array( 'DataExt', '*' ), - - 'CreditCardCreditRet *' => array( 'CreditCardCredit', '*' ), - + 'CreditCardCreditRet ItemGroupLineRet Desc' => array( 'CreditCardCredit_ItemGroupLine', 'Descrip' ), + 'CreditCardCreditRet ItemGroupLineRet ItemGroupRef' => array( null, null ), + 'CreditCardCreditRet ItemGroupLineRet ItemGroupRef *' => array( 'CreditCardCredit_ItemGroupLine', 'ItemGroup_*' ), + 'CreditCardCreditRet ItemGroupLineRet OverrideUOMSetRef' => array( null, null ), + 'CreditCardCreditRet ItemGroupLineRet OverrideUOMSetRef *' => array( 'CreditCardCredit_ItemGroupLine', 'OverrideUOMSet_*' ), + 'CreditCardCreditRet ItemGroupLineRet ItemLineRet' => array( null, null ), + 'CreditCardCreditRet ItemGroupLineRet ItemLineRet Desc' => array( 'CreditCardCredit_ItemGroupLine_ItemLine', 'Descrip' ), + 'CreditCardCreditRet ItemGroupLineRet ItemLineRet *' => array( 'CreditCardCredit_ItemGroupLine_ItemLine', '*' ), + 'CreditCardCreditRet ItemGroupLineRet *' => array( 'CreditCardCredit_ItemGroupLine', '*' ), + + 'CreditCardCreditRet DataExtRet' => array( null, null ), + 'CreditCardCreditRet DataExtRet *' => array( 'DataExt', '*' ), + + 'CreditCardCreditRet *' => array( 'CreditCardCredit', '*' ), + 'CreditMemoRet' => array( 'CreditMemo', null ), - 'CreditMemoRet CustomerRef' => array( null, null ), - 'CreditMemoRet CustomerRef *' => array( 'CreditMemo', 'Customer_*' ), - 'CreditMemoRet ClassRef' => array( null, null ), - 'CreditMemoRet ClassRef *' => array( 'CreditMemo', 'Class_*' ), - 'CreditMemoRet ARAccountRef' => array( null, null ), - 'CreditMemoRet ARAccountRef *' => array( 'CreditMemo', 'ARAccount_*' ), - 'CreditMemoRet TemplateRef' => array( null, null ), - 'CreditMemoRet TemplateRef *' => array( 'CreditMemo', 'Template_*' ), - 'CreditMemoRet BillAddress' => array( null, null ), - 'CreditMemoRet BillAddress *' => array( 'CreditMemo', 'BillAddress_*' ), - 'CreditMemoRet BillAddressBlock' => array( null, null ), - 'CreditMemoRet BillAddressBlock *' => array( 'CreditMemo', 'BillAddressBlock_*' ), - 'CreditMemoRet ShipAddress' => array( null, null ), - 'CreditMemoRet ShipAddress *' => array( 'CreditMemo', 'ShipAddress_*' ), - 'CreditMemoRet ShipAddressBlock' => array( null, null ), - 'CreditMemoRet ShipAddressBlock *' => array( 'CreditMemo', 'ShipAddressBlock_*' ), - 'CreditMemoRet TermsRef' => array( null, null ), - 'CreditMemoRet TermsRef *' => array( 'CreditMemo', 'Terms_*' ), - 'CreditMemoRet SalesRepRef' => array( null, null ), - 'CreditMemoRet SalesRepRef *' => array( 'CreditMemo', 'SalesRep_*' ), - 'CreditMemoRet ShipMethodRef' => array( null, null ), - 'CreditMemoRet ShipMethodRef *' => array( 'CreditMemo', 'ShipMethod_*' ), - 'CreditMemoRet ItemSalesTaxRef' => array( null, null ), - 'CreditMemoRet ItemSalesTaxRef *' => array( 'CreditMemo', 'ItemSalesTax_*' ), - 'CreditMemoRet CustomerMsgRef' => array( null, null ), - 'CreditMemoRet CustomerMsgRef *' => array( 'CreditMemo', 'CustomerMsg_*' ), - 'CreditMemoRet CustomerSalesTaxCodeRef' => array( null, null ), - 'CreditMemoRet CustomerSalesTaxCodeRef *' => array( 'CreditMemo', 'CustomerSalesTaxCode_*' ), - - 'CreditMemoRet LinkedTxn' => array( null, null ), + 'CreditMemoRet CustomerRef' => array( null, null ), + 'CreditMemoRet CustomerRef *' => array( 'CreditMemo', 'Customer_*' ), + 'CreditMemoRet ClassRef' => array( null, null ), + 'CreditMemoRet ClassRef *' => array( 'CreditMemo', 'Class_*' ), + 'CreditMemoRet ARAccountRef' => array( null, null ), + 'CreditMemoRet ARAccountRef *' => array( 'CreditMemo', 'ARAccount_*' ), + 'CreditMemoRet TemplateRef' => array( null, null ), + 'CreditMemoRet TemplateRef *' => array( 'CreditMemo', 'Template_*' ), + 'CreditMemoRet BillAddress' => array( null, null ), + 'CreditMemoRet BillAddress *' => array( 'CreditMemo', 'BillAddress_*' ), + 'CreditMemoRet BillAddressBlock' => array( null, null ), + 'CreditMemoRet BillAddressBlock *' => array( 'CreditMemo', 'BillAddressBlock_*' ), + 'CreditMemoRet ShipAddress' => array( null, null ), + 'CreditMemoRet ShipAddress *' => array( 'CreditMemo', 'ShipAddress_*' ), + 'CreditMemoRet ShipAddressBlock' => array( null, null ), + 'CreditMemoRet ShipAddressBlock *' => array( 'CreditMemo', 'ShipAddressBlock_*' ), + 'CreditMemoRet TermsRef' => array( null, null ), + 'CreditMemoRet TermsRef *' => array( 'CreditMemo', 'Terms_*' ), + 'CreditMemoRet SalesRepRef' => array( null, null ), + 'CreditMemoRet SalesRepRef *' => array( 'CreditMemo', 'SalesRep_*' ), + 'CreditMemoRet ShipMethodRef' => array( null, null ), + 'CreditMemoRet ShipMethodRef *' => array( 'CreditMemo', 'ShipMethod_*' ), + 'CreditMemoRet ItemSalesTaxRef' => array( null, null ), + 'CreditMemoRet ItemSalesTaxRef *' => array( 'CreditMemo', 'ItemSalesTax_*' ), + 'CreditMemoRet CustomerMsgRef' => array( null, null ), + 'CreditMemoRet CustomerMsgRef *' => array( 'CreditMemo', 'CustomerMsg_*' ), + 'CreditMemoRet CustomerSalesTaxCodeRef' => array( null, null ), + 'CreditMemoRet CustomerSalesTaxCodeRef *' => array( 'CreditMemo', 'CustomerSalesTaxCode_*' ), + + 'CreditMemoRet LinkedTxn' => array( null, null ), 'CreditMemoRet LinkedTxn TxnID' => array( 'CreditMemo_LinkedTxn', 'ToTxnID' ), - 'CreditMemoRet LinkedTxn *' => array( 'CreditMemo_LinkedTxn', '*' ), - - 'CreditMemoRet CreditMemoLineRet' => array( null, null ), - 'CreditMemoRet CreditMemoLineRet Desc' => array( 'CreditMemo_CreditMemoLine', 'Descrip' ), - 'CreditMemoRet CreditMemoLineRet ItemRef' => array( null, null ), - 'CreditMemoRet CreditMemoLineRet ItemRef *' => array( 'CreditMemo_CreditMemoLine', 'Item_*' ), - 'CreditMemoRet CreditMemoLineRet OverrideUOMSetRef' => array( null, null ), - 'CreditMemoRet CreditMemoLineRet OverrideUOMSetRef *' => array( 'CreditMemo_CreditMemoLine', 'OverrideUOMSet_*' ), - 'CreditMemoRet CreditMemoLineRet ClassRef' => array( null, null ), - 'CreditMemoRet CreditMemoLineRet ClassRef *' => array( 'CreditMemo_CreditMemoLine', 'Class_*' ), - 'CreditMemoRet CreditMemoLineRet SalesTaxCodeRef' => array( null, null ), - 'CreditMemoRet CreditMemoLineRet SalesTaxCodeRef *' => array( 'CreditMemo_CreditMemoLine', 'SalesTaxCode_*' ), - 'CreditMemoRet CreditMemoLineRet CreditCardTxnInfo' => array( null, null ), - 'CreditMemoRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), - 'CreditMemoRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'CreditMemo_CreditMemoLine', 'CreditCardTxnInputInfo_*' ), - 'CreditMemoRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), - 'CreditMemoRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'CreditMemo_CreditMemoLine', 'CreditCardTxnResultInfo_*' ), - - 'CreditMemoRet CreditMemoLineRet DataExtRet' => array( 'DataExt', null ), - 'CreditMemoRet CreditMemoLineRet DataExtRet *' => array( 'DataExt', '*' ), - 'CreditMemoRet CreditMemoLineRet *' => array( 'CreditMemo_CreditMemoLine', '*' ), - - 'CreditMemoRet CreditMemoLineGroupRet' => array( 'CreditMemo_CreditMemoLineGroup', null ), - 'CreditMemoRet CreditMemoLineGroupRet Desc' => array( 'CreditMemo_CreditMemoLineGroup', 'Descrip' ), - 'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef *' => array( 'CreditMemo_CreditMemoLineGroup', 'ItemGroup_*' ), - 'CreditMemoRet CreditMemoLineGroupRet ItemRef' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet ItemRef *' => array( 'CreditMemo_CreditMemoLineGroup', 'ItemGroup_*' ), - 'CreditMemoRet CreditMemoLineGroupRet OverrideUOMSetRef' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet OverrideUOMSetRef *' => array( 'CreditMemo_CreditMemoLineGroup', 'OverrideUOMSet_*' ), - - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet ItemRef' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet ItemRef *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'Item_*' ), + 'CreditMemoRet LinkedTxn *' => array( 'CreditMemo_LinkedTxn', '*' ), + + 'CreditMemoRet CreditMemoLineRet' => array( null, null ), + 'CreditMemoRet CreditMemoLineRet Desc' => array( 'CreditMemo_CreditMemoLine', 'Descrip' ), + 'CreditMemoRet CreditMemoLineRet ItemRef' => array( null, null ), + 'CreditMemoRet CreditMemoLineRet ItemRef *' => array( 'CreditMemo_CreditMemoLine', 'Item_*' ), + 'CreditMemoRet CreditMemoLineRet OverrideUOMSetRef' => array( null, null ), + 'CreditMemoRet CreditMemoLineRet OverrideUOMSetRef *' => array( 'CreditMemo_CreditMemoLine', 'OverrideUOMSet_*' ), + 'CreditMemoRet CreditMemoLineRet ClassRef' => array( null, null ), + 'CreditMemoRet CreditMemoLineRet ClassRef *' => array( 'CreditMemo_CreditMemoLine', 'Class_*' ), + 'CreditMemoRet CreditMemoLineRet SalesTaxCodeRef' => array( null, null ), + 'CreditMemoRet CreditMemoLineRet SalesTaxCodeRef *' => array( 'CreditMemo_CreditMemoLine', 'SalesTaxCode_*' ), + 'CreditMemoRet CreditMemoLineRet CreditCardTxnInfo' => array( null, null ), + 'CreditMemoRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), + 'CreditMemoRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'CreditMemo_CreditMemoLine', 'CreditCardTxnInputInfo_*' ), + 'CreditMemoRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), + 'CreditMemoRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'CreditMemo_CreditMemoLine', 'CreditCardTxnResultInfo_*' ), + + 'CreditMemoRet CreditMemoLineRet DataExtRet' => array( 'DataExt', null ), + 'CreditMemoRet CreditMemoLineRet DataExtRet *' => array( 'DataExt', '*' ), + 'CreditMemoRet CreditMemoLineRet *' => array( 'CreditMemo_CreditMemoLine', '*' ), + + 'CreditMemoRet CreditMemoLineGroupRet' => array( 'CreditMemo_CreditMemoLineGroup', null ), + 'CreditMemoRet CreditMemoLineGroupRet Desc' => array( 'CreditMemo_CreditMemoLineGroup', 'Descrip' ), + 'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef *' => array( 'CreditMemo_CreditMemoLineGroup', 'ItemGroup_*' ), + 'CreditMemoRet CreditMemoLineGroupRet ItemRef' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet ItemRef *' => array( 'CreditMemo_CreditMemoLineGroup', 'ItemGroup_*' ), + 'CreditMemoRet CreditMemoLineGroupRet OverrideUOMSetRef' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet OverrideUOMSetRef *' => array( 'CreditMemo_CreditMemoLineGroup', 'OverrideUOMSet_*' ), + + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet ItemRef' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet ItemRef *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'Item_*' ), 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet Desc' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'Descrip' ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet OverrideUOMSetRef' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet OverrideUOMSetRef *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'OverrideUOMSet_*' ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet ClassRef' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet ClassRef *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'Class_*' ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet SalesTaxCodeRef' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet SalesTaxCodeRef *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'SalesTaxCode_*' ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'CreditCardTxnInfo_CreditCardTxnInputInfo_*' ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'CreditCardTxnInfo_CreditCardTxnResultInfo_*' ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'CreditCardTxnInfo_*' ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet DataExtRet' => array( null, null ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet DataExtRet *' => array( 'DataExt', '*' ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', '*' ), - - 'CreditMemoRet CreditMemoLineGroupRet DataExtRet' => array( 'DataExt', null ), - 'CreditMemoRet CreditMemoLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), - 'CreditMemoRet CreditMemoLineGroupRet *' => array( 'CreditMemo_CreditMemoLineGroup', '*' ), - - - 'CreditMemoRet DataExtRet' => array( 'DataExt', null ), - 'CreditMemoRet DataExtRet *' => array( 'DataExt', '*' ), - 'CreditMemoRet *' => array( 'CreditMemo', '*' ), - + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet OverrideUOMSetRef' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet OverrideUOMSetRef *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'OverrideUOMSet_*' ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet ClassRef' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet ClassRef *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'Class_*' ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet SalesTaxCodeRef' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet SalesTaxCodeRef *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'SalesTaxCode_*' ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'CreditCardTxnInfo_CreditCardTxnInputInfo_*' ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'CreditCardTxnInfo_CreditCardTxnResultInfo_*' ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet CreditCardTxnInfo *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'CreditCardTxnInfo_*' ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet DataExtRet' => array( null, null ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet DataExtRet *' => array( 'DataExt', '*' ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet *' => array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', '*' ), + + 'CreditMemoRet CreditMemoLineGroupRet DataExtRet' => array( 'DataExt', null ), + 'CreditMemoRet CreditMemoLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), + 'CreditMemoRet CreditMemoLineGroupRet *' => array( 'CreditMemo_CreditMemoLineGroup', '*' ), + + + 'CreditMemoRet DataExtRet' => array( 'DataExt', null ), + 'CreditMemoRet DataExtRet *' => array( 'DataExt', '*' ), + 'CreditMemoRet *' => array( 'CreditMemo', '*' ), + 'CustomerRet' => array( 'Customer', null ), - 'CustomerRet ParentRef' => array( null, null ), - 'CustomerRet ParentRef *' => array( 'Customer', 'Parent_*' ), - 'CustomerRet BillAddress' => array( null, null ), - 'CustomerRet BillAddress *' => array( 'Customer', 'BillAddress_*' ), - 'CustomerRet ShipAddress' => array( null, null ), - 'CustomerRet ShipAddress *' => array( 'Customer', 'ShipAddress_*' ), - 'CustomerRet BillAddressBlock' => array( null, null ), - 'CustomerRet BillAddressBlock *' => array( 'Customer', 'BillAddressBlock_*' ), - 'CustomerRet ShipAddressBlock' => array( null, null ), - 'CustomerRet ShipAddressBlock *' => array( 'Customer', 'ShipAddressBlock_*' ), - 'CustomerRet CreditCardInfo' => array( null, null ), - 'CustomerRet CreditCardInfo *' => array( 'Customer', 'CreditCardInfo_*' ), - 'CustomerRet CustomerTypeRef' => array( null, null ), - 'CustomerRet CustomerTypeRef *' => array( 'Customer', 'CustomerType_*' ), - 'CustomerRet TermsRef' => array( null, null ), - 'CustomerRet TermsRef *' => array( 'Customer', 'Terms_*' ), - 'CustomerRet SalesRepRef' => array( null, null ), - 'CustomerRet SalesRepRef *' => array( 'Customer', 'SalesRep_*' ), - 'CustomerRet SalesTaxCodeRef' => array( null, null ), - 'CustomerRet SalesTaxCodeRef *' => array( 'Customer', 'SalesTaxCode_*' ), - 'CustomerRet ItemSalesTaxRef' => array( null, null ), - 'CustomerRet ItemSalesTaxRef *' => array( 'Customer', 'ItemSalesTax_*' ), - 'CustomerRet PreferredPaymentMethodRef' => array( null, null ), - 'CustomerRet PreferredPaymentMethodRef *' => array( 'Customer', 'PreferredPaymentMethod_*' ), - 'CustomerRet JobTypeRef' => array( null, null ), - 'CustomerRet JobTypeRef *' => array( 'Customer', 'JobType_*' ), - 'CustomerRet PriceLevelRef' => array( null, null ), - 'CustomerRet PriceLevelRef *' => array( 'Customer', 'PriceLevel_*' ), - - 'CustomerRet DataExtRet' => array( 'DataExt', null ), - 'CustomerRet DataExtRet *' => array( 'DataExt', '*' ), - - 'CustomerRet *' => array( 'Customer', '*' ), - + 'CustomerRet ParentRef' => array( null, null ), + 'CustomerRet ParentRef *' => array( 'Customer', 'Parent_*' ), + 'CustomerRet BillAddress' => array( null, null ), + 'CustomerRet BillAddress *' => array( 'Customer', 'BillAddress_*' ), + 'CustomerRet ShipAddress' => array( null, null ), + 'CustomerRet ShipAddress *' => array( 'Customer', 'ShipAddress_*' ), + 'CustomerRet BillAddressBlock' => array( null, null ), + 'CustomerRet BillAddressBlock *' => array( 'Customer', 'BillAddressBlock_*' ), + 'CustomerRet ShipAddressBlock' => array( null, null ), + 'CustomerRet ShipAddressBlock *' => array( 'Customer', 'ShipAddressBlock_*' ), + 'CustomerRet CreditCardInfo' => array( null, null ), + 'CustomerRet CreditCardInfo *' => array( 'Customer', 'CreditCardInfo_*' ), + 'CustomerRet CustomerTypeRef' => array( null, null ), + 'CustomerRet CustomerTypeRef *' => array( 'Customer', 'CustomerType_*' ), + 'CustomerRet TermsRef' => array( null, null ), + 'CustomerRet TermsRef *' => array( 'Customer', 'Terms_*' ), + 'CustomerRet SalesRepRef' => array( null, null ), + 'CustomerRet SalesRepRef *' => array( 'Customer', 'SalesRep_*' ), + 'CustomerRet SalesTaxCodeRef' => array( null, null ), + 'CustomerRet SalesTaxCodeRef *' => array( 'Customer', 'SalesTaxCode_*' ), + 'CustomerRet ItemSalesTaxRef' => array( null, null ), + 'CustomerRet ItemSalesTaxRef *' => array( 'Customer', 'ItemSalesTax_*' ), + 'CustomerRet PreferredPaymentMethodRef' => array( null, null ), + 'CustomerRet PreferredPaymentMethodRef *' => array( 'Customer', 'PreferredPaymentMethod_*' ), + 'CustomerRet JobTypeRef' => array( null, null ), + 'CustomerRet JobTypeRef *' => array( 'Customer', 'JobType_*' ), + 'CustomerRet PriceLevelRef' => array( null, null ), + 'CustomerRet PriceLevelRef *' => array( 'Customer', 'PriceLevel_*' ), + + 'CustomerRet DataExtRet' => array( 'DataExt', null ), + 'CustomerRet DataExtRet *' => array( 'DataExt', '*' ), + + 'CustomerRet *' => array( 'Customer', '*' ), + 'CustomerTypeRet' => array( 'CustomerType', null ), - 'CustomerTypeRet ParentRef' => array( 'CustomerType', null ), - 'CustomerTypeRet ParentRef *' => array( 'CustomerType', 'Parent_*' ), - - 'CustomerTypeRet *' => array( 'CustomerType', '*' ), - - 'CustomerMsgRet' => array( 'CustomerMsg', null ), - - 'CustomerMsgRet *' => array( 'CustomerMsg', '*' ), - + 'CustomerTypeRet ParentRef' => array( 'CustomerType', null ), + 'CustomerTypeRet ParentRef *' => array( 'CustomerType', 'Parent_*' ), + + 'CustomerTypeRet *' => array( 'CustomerType', '*' ), + + 'CustomerMsgRet' => array( 'CustomerMsg', null ), + + 'CustomerMsgRet *' => array( 'CustomerMsg', '*' ), + 'DataExtDefRet' => array( 'DataExtDef', null ), - 'DataExtDefRet AssignToObject' => array( 'DataExtDef_AssignToObject', 'AssignToObject' ), - 'DataExtDefRet *' => array( 'DataExtDef', '*' ), - - 'DateDrivenTermsRet' => array( 'DateDrivenTerms', null ), - 'DateDrivenTermsRet *' => array( 'DateDrivenTerms', '*' ), - - 'DepositRet' => array( 'Deposit', null ), - 'DepositRet DepositToAccountRef' => array( null, null ), - 'DepositRet DepositToAccountRef *' => array( 'Deposit', 'DepositToAccount_*' ), - 'DepositRet CashBackInfoRet' => array( null, null ), - 'DepositRet CashBackInfoRet AccountRef' => array( null, null ), - 'DepositRet CashBackInfoRet AccountRef *' => array( 'Deposit', 'CashBackInfo_Account_*' ), - 'DepositRet CashBackInfoRet *' => array( 'Deposit', 'CashBackInfo_*' ), - - 'DepositRet DepositLineRet' => array( null, null ), - 'DepositRet DepositLineRet EntityRef' => array( null, null ), - 'DepositRet DepositLineRet EntityRef *' => array( 'Deposit_DepositLine', 'Entity_*' ), - 'DepositRet DepositLineRet AccountRef' => array( null, null ), - 'DepositRet DepositLineRet AccountRef *' => array( 'Deposit_DepositLine', 'Account_*' ), - 'DepositRet DepositLineRet PaymentMethodRef' => array( null, null ), - 'DepositRet DepositLineRet PaymentMethodRef *' => array( 'Deposit_DepositLine', 'PaymentMethod_*' ), - 'DepositRet DepositLineRet ClassRef' => array( null, null ), - 'DepositRet DepositLineRet ClassRef *' => array( 'Deposit_DepositLine', 'Class_*' ), - 'DepositRet DepositLineRet *' => array( 'Deposit_DepositLine', '*' ), - - 'DepositRet DataExtRet' => array( null, null ), - 'DepositRet DataExtRet *' => array( 'DataExt', '*' ), - - 'DepositRet *' => array( 'Deposit', '*' ), - - 'EmployeeRet' => array( 'Employee', null ), - 'EmployeeRet EmployeeAddress' => array( null, null ), - 'EmployeeRet EmployeeAddress *' => array( 'Employee', 'EmployeeAddress_*' ), - 'EmployeeRet BillingRateRef' => array( null, null ), - 'EmployeeRet BillingRateRef *' => array( 'Employee', 'BillingRate_*' ), - - 'EmployeeRet EmployeePayrollInfo' => array( null, null ), - 'EmployeeRet EmployeePayrollInfo ClassRef' => array( null, null ), - 'EmployeeRet EmployeePayrollInfo ClassRef *' => array( 'Employee', 'EmployeePayrollInfo_Class_*' ), - 'EmployeeRet EmployeePayrollInfo Earnings' => array( null, null ), - 'EmployeeRet EmployeePayrollInfo Earnings PayrollItemWageRef' => array( null, null ), - 'EmployeeRet EmployeePayrollInfo Earnings PayrollItemWageRef *' => array( 'Employee_Earnings', 'PayrollItemWage_*' ), - 'EmployeeRet EmployeePayrollInfo Earnings *' => array( 'Employee_Earnings', '*' ), - - 'EmployeeRet EmployeePayrollInfo SickHours' => array( null, null ), - 'EmployeeRet EmployeePayrollInfo SickHours *' => array( 'Employee', 'EmployeePayrollInfo_SickHours_*' ), - - 'EmployeeRet EmployeePayrollInfo VacationHours' => array( null, null ), - 'EmployeeRet EmployeePayrollInfo VacationHours *' => array( 'Employee', 'EmployeePayrollInfo_VacationHours_*' ), - - 'EmployeeRet EmployeePayrollInfo *' => array( 'Employee', 'EmployeePayrollInfo_*' ), - - 'EmployeeRet DataExtRet' => array( null, null ), - 'EmployeeRet DataExtRet *' => array( 'DataExt', '*' ), - - 'EmployeeRet *' => array( 'Employee', '*' ), - - 'EstimateRet' => array( 'Estimate', null ), - - 'EstimateRet CustomerRef' => array( null, null ), - 'EstimateRet CustomerRef *' => array( 'Estimate', 'Customer_*' ), - 'EstimateRet ClassRef' => array( null, null ), - 'EstimateRet ClassRef *' => array( 'Estimate', 'Class_*' ), - 'EstimateRet TemplateRef' => array( null, null ), - 'EstimateRet TemplateRef *' => array( 'Estimate', 'Template_*' ), - 'EstimateRet BillAddress' => array( null, null ), - 'EstimateRet BillAddress *' => array( 'Estimate', 'BillAddress_*' ), - 'EstimateRet ShipAddress' => array( null, null ), - 'EstimateRet ShipAddress *' => array( 'Estimate', 'ShipAddress_*' ), - 'EstimateRet BillAddressBlock' => array( null, null ), - 'EstimateRet BillAddressBlock *' => array( 'Estimate', 'BillAddressBlock_*' ), - 'EstimateRet ShipAddressBlock' => array( null, null ), + 'DataExtDefRet AssignToObject' => array( 'DataExtDef_AssignToObject', 'AssignToObject' ), + 'DataExtDefRet *' => array( 'DataExtDef', '*' ), + + 'DateDrivenTermsRet' => array( 'DateDrivenTerms', null ), + 'DateDrivenTermsRet *' => array( 'DateDrivenTerms', '*' ), + + 'DepositRet' => array( 'Deposit', null ), + 'DepositRet DepositToAccountRef' => array( null, null ), + 'DepositRet DepositToAccountRef *' => array( 'Deposit', 'DepositToAccount_*' ), + 'DepositRet CashBackInfoRet' => array( null, null ), + 'DepositRet CashBackInfoRet AccountRef' => array( null, null ), + 'DepositRet CashBackInfoRet AccountRef *' => array( 'Deposit', 'CashBackInfo_Account_*' ), + 'DepositRet CashBackInfoRet *' => array( 'Deposit', 'CashBackInfo_*' ), + + 'DepositRet DepositLineRet' => array( null, null ), + 'DepositRet DepositLineRet EntityRef' => array( null, null ), + 'DepositRet DepositLineRet EntityRef *' => array( 'Deposit_DepositLine', 'Entity_*' ), + 'DepositRet DepositLineRet AccountRef' => array( null, null ), + 'DepositRet DepositLineRet AccountRef *' => array( 'Deposit_DepositLine', 'Account_*' ), + 'DepositRet DepositLineRet PaymentMethodRef' => array( null, null ), + 'DepositRet DepositLineRet PaymentMethodRef *' => array( 'Deposit_DepositLine', 'PaymentMethod_*' ), + 'DepositRet DepositLineRet ClassRef' => array( null, null ), + 'DepositRet DepositLineRet ClassRef *' => array( 'Deposit_DepositLine', 'Class_*' ), + 'DepositRet DepositLineRet *' => array( 'Deposit_DepositLine', '*' ), + + 'DepositRet DataExtRet' => array( null, null ), + 'DepositRet DataExtRet *' => array( 'DataExt', '*' ), + + 'DepositRet *' => array( 'Deposit', '*' ), + + 'EmployeeRet' => array( 'Employee', null ), + 'EmployeeRet EmployeeAddress' => array( null, null ), + 'EmployeeRet EmployeeAddress *' => array( 'Employee', 'EmployeeAddress_*' ), + 'EmployeeRet BillingRateRef' => array( null, null ), + 'EmployeeRet BillingRateRef *' => array( 'Employee', 'BillingRate_*' ), + + 'EmployeeRet EmployeePayrollInfo' => array( null, null ), + 'EmployeeRet EmployeePayrollInfo ClassRef' => array( null, null ), + 'EmployeeRet EmployeePayrollInfo ClassRef *' => array( 'Employee', 'EmployeePayrollInfo_Class_*' ), + 'EmployeeRet EmployeePayrollInfo Earnings' => array( null, null ), + 'EmployeeRet EmployeePayrollInfo Earnings PayrollItemWageRef' => array( null, null ), + 'EmployeeRet EmployeePayrollInfo Earnings PayrollItemWageRef *' => array( 'Employee_Earnings', 'PayrollItemWage_*' ), + 'EmployeeRet EmployeePayrollInfo Earnings *' => array( 'Employee_Earnings', '*' ), + + 'EmployeeRet EmployeePayrollInfo SickHours' => array( null, null ), + 'EmployeeRet EmployeePayrollInfo SickHours *' => array( 'Employee', 'EmployeePayrollInfo_SickHours_*' ), + + 'EmployeeRet EmployeePayrollInfo VacationHours' => array( null, null ), + 'EmployeeRet EmployeePayrollInfo VacationHours *' => array( 'Employee', 'EmployeePayrollInfo_VacationHours_*' ), + + 'EmployeeRet EmployeePayrollInfo *' => array( 'Employee', 'EmployeePayrollInfo_*' ), + + 'EmployeeRet DataExtRet' => array( null, null ), + 'EmployeeRet DataExtRet *' => array( 'DataExt', '*' ), + + 'EmployeeRet *' => array( 'Employee', '*' ), + + 'EstimateRet' => array( 'Estimate', null ), + + 'EstimateRet CustomerRef' => array( null, null ), + 'EstimateRet CustomerRef *' => array( 'Estimate', 'Customer_*' ), + 'EstimateRet ClassRef' => array( null, null ), + 'EstimateRet ClassRef *' => array( 'Estimate', 'Class_*' ), + 'EstimateRet TemplateRef' => array( null, null ), + 'EstimateRet TemplateRef *' => array( 'Estimate', 'Template_*' ), + 'EstimateRet BillAddress' => array( null, null ), + 'EstimateRet BillAddress *' => array( 'Estimate', 'BillAddress_*' ), + 'EstimateRet ShipAddress' => array( null, null ), + 'EstimateRet ShipAddress *' => array( 'Estimate', 'ShipAddress_*' ), + 'EstimateRet BillAddressBlock' => array( null, null ), + 'EstimateRet BillAddressBlock *' => array( 'Estimate', 'BillAddressBlock_*' ), + 'EstimateRet ShipAddressBlock' => array( null, null ), 'EstimateRet ShipAddressBlock *' => array( 'Estimate', 'ShipAddressBlock_*' ), - 'EstimateRet TermsRef' => array( null, null ), - 'EstimateRet TermsRef *' => array( 'Estimate', 'Terms_*' ), - 'EstimateRet ItemSalesTaxRef' => array( null, null ), - 'EstimateRet ItemSalesTaxRef *' => array( 'Estimate', 'ItemSalesTax_*' ), - 'EstimateRet SalesRepRef' => array( null, null ), - 'EstimateRet SalesRepRef *' => array( 'Estimate', 'SalesRep_*' ), - 'EstimateRet CurrencyRef' => array( null, null ), - 'EstimateRet CurrencyRef *' => array( 'Estimate', 'Currency_*' ), - 'EstimateRet CustomerMsgRef' => array( null, null ), - 'EstimateRet CustomerMsgRef *' => array( 'Estimate', 'CustomerMsg_*' ), - 'EstimateRet CustomerSalesTaxCodeRef' => array( null, null ), - 'EstimateRet CustomerSalesTaxCodeRef *' => array( 'Estimate', 'CustomerSalesTaxCode_*' ), - - 'EstimateRet LinkedTxn' => array( 'Estimate_LinkedTxn', null ), + 'EstimateRet TermsRef' => array( null, null ), + 'EstimateRet TermsRef *' => array( 'Estimate', 'Terms_*' ), + 'EstimateRet ItemSalesTaxRef' => array( null, null ), + 'EstimateRet ItemSalesTaxRef *' => array( 'Estimate', 'ItemSalesTax_*' ), + 'EstimateRet SalesRepRef' => array( null, null ), + 'EstimateRet SalesRepRef *' => array( 'Estimate', 'SalesRep_*' ), + 'EstimateRet CurrencyRef' => array( null, null ), + 'EstimateRet CurrencyRef *' => array( 'Estimate', 'Currency_*' ), + 'EstimateRet CustomerMsgRef' => array( null, null ), + 'EstimateRet CustomerMsgRef *' => array( 'Estimate', 'CustomerMsg_*' ), + 'EstimateRet CustomerSalesTaxCodeRef' => array( null, null ), + 'EstimateRet CustomerSalesTaxCodeRef *' => array( 'Estimate', 'CustomerSalesTaxCode_*' ), + + 'EstimateRet LinkedTxn' => array( 'Estimate_LinkedTxn', null ), 'EstimateRet LinkedTxn TxnID' => array( 'Estimate_LinkedTxn', 'ToTxnID' ), 'EstimateRet LinkedTxn *' => array( 'Estimate_LinkedTxn', '*' ), - + 'EstimateRet EstimateLineRet' => array( null, null ), - 'EstimateRet EstimateLineRet Desc' => array( 'Estimate_EstimateLine', 'Descrip' ), - 'EstimateRet EstimateLineRet ItemRef' => array( null, null ), - 'EstimateRet EstimateLineRet ItemRef *' => array( 'Estimate_EstimateLine', 'Item_*' ), - 'EstimateRet EstimateLineRet OverrideUOMSetRef' => array( null, null ), - 'EstimateRet EstimateLineRet OverrideUOMSetRef *' => array( 'Estimate_EstimateLine', 'OverrideUOMSet_*' ), - 'EstimateRet EstimateLineRet ClassRef' => array( null, null ), + 'EstimateRet EstimateLineRet Desc' => array( 'Estimate_EstimateLine', 'Descrip' ), + 'EstimateRet EstimateLineRet ItemRef' => array( null, null ), + 'EstimateRet EstimateLineRet ItemRef *' => array( 'Estimate_EstimateLine', 'Item_*' ), + 'EstimateRet EstimateLineRet OverrideUOMSetRef' => array( null, null ), + 'EstimateRet EstimateLineRet OverrideUOMSetRef *' => array( 'Estimate_EstimateLine', 'OverrideUOMSet_*' ), + 'EstimateRet EstimateLineRet ClassRef' => array( null, null ), 'EstimateRet EstimateLineRet ClassRef *' => array( 'Estimate_EstimateLine', 'Class_*' ), - 'EstimateRet EstimateLineRet InventorySiteRef' => array( null, null ), - 'EstimateRet EstimateLineRet InventorySiteRef *' => array( 'Estimate_EstimateLine', 'InventorySite_*' ), - 'EstimateRet EstimateLineRet SalesTaxCodeRef' => array( null, null ), - 'EstimateRet EstimateLineRet SalesTaxCodeRef *' => array( 'Estimate_EstimateLine', 'SalesTaxCode_*' ), - - 'EstimateRet EstimateLineRet DataExtRet' => array( 'DataExt', null ), - 'EstimateRet EstimateLineRet DataExtRet *' => array( 'DataExt', '*' ), - - 'EstimateRet EstimateLineRet *' => array( 'Estimate_EstimateLine', '*' ), - - 'EstimateRet EstimateLineGroupRet' => array( null, null ), + 'EstimateRet EstimateLineRet InventorySiteRef' => array( null, null ), + 'EstimateRet EstimateLineRet InventorySiteRef *' => array( 'Estimate_EstimateLine', 'InventorySite_*' ), + 'EstimateRet EstimateLineRet SalesTaxCodeRef' => array( null, null ), + 'EstimateRet EstimateLineRet SalesTaxCodeRef *' => array( 'Estimate_EstimateLine', 'SalesTaxCode_*' ), + + 'EstimateRet EstimateLineRet DataExtRet' => array( 'DataExt', null ), + 'EstimateRet EstimateLineRet DataExtRet *' => array( 'DataExt', '*' ), + + 'EstimateRet EstimateLineRet *' => array( 'Estimate_EstimateLine', '*' ), + + 'EstimateRet EstimateLineGroupRet' => array( null, null ), 'EstimateRet EstimateLineGroupRet Desc' => array( 'Estimate_EstimateLineGroup', 'Descrip' ), - 'EstimateRet EstimateLineGroupRet ItemGroupRef' => array( null, null ), - 'EstimateRet EstimateLineGroupRet ItemGroupRef *' => array( 'Estimate_EstimateLineGroup', 'ItemGroup_*' ), - 'EstimateRet EstimateLineGroupRet OverrideUOMSetRef' => array( null, null ), - 'EstimateRet EstimateLineGroupRet OverrideUOMSetRef *' => array( 'Estimate_EstimateLineGroup', 'OverrideUOMSet_*' ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet' => array( null, null ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet ItemRef' => array( null, null ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet ItemRef *' => array( 'Estimate_EstimateLineGroup_EstimateLine', 'Item_*' ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet Desc' => array( 'Estimate_EstimateLineGroup_EstimateLine', 'Descrip' ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet OverrideUOMSetRef' => array( null, null ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet OverrideUOMSetRef *' => array( 'Estimate_EstimateLineGroup_EstimateLine', 'OverrideUOMSet_*' ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet ClassRef' => array( null, null ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet ClassRef *' => array( 'Estimate_EstimateLineGroup_EstimateLine', 'Class_*' ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet SalesTaxCodeRef' => array( null, null ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet SalesTaxCodeRef *' => array( 'Estimate_EstimateLineGroup_EstimateLine', 'SalesTaxCode_*' ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet DataExtRet' => array( null, null ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet DataExtRet *' => array( 'DataExt', '*' ), - 'EstimateRet EstimateLineGroupRet EstimateLineRet *' => array( 'Estimate_EstimateLineGroup_EstimateLine', '*' ), - 'EstimateRet EstimateLineGroupRet DataExtRet' => array( null, null ), - 'EstimateRet EstimateLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), - - 'EstimateRet EstimateLineGroupRet *' => array( 'Estimate_EstimateLineGroup', '*' ), - - 'EstimateRet DataExtRet' => array( null, null ), - 'EstimateRet DataExtRet *' => array( 'DataExt', '*' ), - - 'EstimateRet *' => array( 'Estimate', '*' ), - - 'InventoryAdjustmentRet' => array( 'InventoryAdjustment', null ), - 'InventoryAdjustmentRet AccountRef' => array( null, null ), - 'InventoryAdjustmentRet AccountRef *' => array( 'InventoryAdjustment', 'Account_*' ), - 'InventoryAdjustmentRet CustomerRef' => array( null, null ), - 'InventoryAdjustmentRet CustomerRef *' => array( 'InventoryAdjustment', 'Customer_*' ), - 'InventoryAdjustmentRet ClassRef' => array( null, null ), - 'InventoryAdjustmentRet ClassRef *' => array( 'InventoryAdjustment', 'Class_*' ), - - 'InventoryAdjustmentRet InventoryAdjustmentLineRet' => array( null, null ), - 'InventoryAdjustmentRet InventoryAdjustmentLineRet ItemRef' => array( null, null ), - 'InventoryAdjustmentRet InventoryAdjustmentLineRet ItemRef *' => array( 'InventoryAdjustment_InventoryAdjustmentLine', 'Item_*' ), - 'InventoryAdjustmentRet InventoryAdjustmentLineRet QuantityAdjustment' => array( null, null ), - 'InventoryAdjustmentRet InventoryAdjustmentLineRet QuantityAdjustment *' => array( 'InventoryAdjustment_InventoryAdjustmentLine', 'QuantityAdjustment_*' ), - 'InventoryAdjustmentRet InventoryAdjustmentLineRet ValueAdjustment' => array( null, null ), - 'InventoryAdjustmentRet InventoryAdjustmentLineRet ValueAdjustment *' => array( 'InventoryAdjustment_InventoryAdjustmentLine', 'ValueAdjustment_*' ), - 'InventoryAdjustmentRet InventoryAdjustmentLineRet *' => array( 'InventoryAdjustment_InventoryAdjustmentLine', '*' ), - - 'InventoryAdjustmentRet DataExtRet' => array( null, null ), - 'InventoryAdjustmentRet DataExtRet *' => array( 'DataExt', '*' ), - - 'InventoryAdjustmentRet *' => array( 'InventoryAdjustment', '*' ), - - 'InvoiceRet' => array( 'Invoice', null ), - 'InvoiceRet CustomerRef' => array( null, null ), - 'InvoiceRet CustomerRef *' => array( 'Invoice', 'Customer_*' ), - 'InvoiceRet ARAccountRef' => array( null, null ), + 'EstimateRet EstimateLineGroupRet ItemGroupRef' => array( null, null ), + 'EstimateRet EstimateLineGroupRet ItemGroupRef *' => array( 'Estimate_EstimateLineGroup', 'ItemGroup_*' ), + 'EstimateRet EstimateLineGroupRet OverrideUOMSetRef' => array( null, null ), + 'EstimateRet EstimateLineGroupRet OverrideUOMSetRef *' => array( 'Estimate_EstimateLineGroup', 'OverrideUOMSet_*' ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet' => array( null, null ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet ItemRef' => array( null, null ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet ItemRef *' => array( 'Estimate_EstimateLineGroup_EstimateLine', 'Item_*' ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet Desc' => array( 'Estimate_EstimateLineGroup_EstimateLine', 'Descrip' ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet OverrideUOMSetRef' => array( null, null ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet OverrideUOMSetRef *' => array( 'Estimate_EstimateLineGroup_EstimateLine', 'OverrideUOMSet_*' ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet ClassRef' => array( null, null ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet ClassRef *' => array( 'Estimate_EstimateLineGroup_EstimateLine', 'Class_*' ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet SalesTaxCodeRef' => array( null, null ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet SalesTaxCodeRef *' => array( 'Estimate_EstimateLineGroup_EstimateLine', 'SalesTaxCode_*' ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet DataExtRet' => array( null, null ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet DataExtRet *' => array( 'DataExt', '*' ), + 'EstimateRet EstimateLineGroupRet EstimateLineRet *' => array( 'Estimate_EstimateLineGroup_EstimateLine', '*' ), + 'EstimateRet EstimateLineGroupRet DataExtRet' => array( null, null ), + 'EstimateRet EstimateLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), + + 'EstimateRet EstimateLineGroupRet *' => array( 'Estimate_EstimateLineGroup', '*' ), + + 'EstimateRet DataExtRet' => array( null, null ), + 'EstimateRet DataExtRet *' => array( 'DataExt', '*' ), + + 'EstimateRet *' => array( 'Estimate', '*' ), + + 'InventoryAdjustmentRet' => array( 'InventoryAdjustment', null ), + 'InventoryAdjustmentRet AccountRef' => array( null, null ), + 'InventoryAdjustmentRet AccountRef *' => array( 'InventoryAdjustment', 'Account_*' ), + 'InventoryAdjustmentRet CustomerRef' => array( null, null ), + 'InventoryAdjustmentRet CustomerRef *' => array( 'InventoryAdjustment', 'Customer_*' ), + 'InventoryAdjustmentRet ClassRef' => array( null, null ), + 'InventoryAdjustmentRet ClassRef *' => array( 'InventoryAdjustment', 'Class_*' ), + + 'InventoryAdjustmentRet InventoryAdjustmentLineRet' => array( null, null ), + 'InventoryAdjustmentRet InventoryAdjustmentLineRet ItemRef' => array( null, null ), + 'InventoryAdjustmentRet InventoryAdjustmentLineRet ItemRef *' => array( 'InventoryAdjustment_InventoryAdjustmentLine', 'Item_*' ), + 'InventoryAdjustmentRet InventoryAdjustmentLineRet QuantityAdjustment' => array( null, null ), + 'InventoryAdjustmentRet InventoryAdjustmentLineRet QuantityAdjustment *' => array( 'InventoryAdjustment_InventoryAdjustmentLine', 'QuantityAdjustment_*' ), + 'InventoryAdjustmentRet InventoryAdjustmentLineRet ValueAdjustment' => array( null, null ), + 'InventoryAdjustmentRet InventoryAdjustmentLineRet ValueAdjustment *' => array( 'InventoryAdjustment_InventoryAdjustmentLine', 'ValueAdjustment_*' ), + 'InventoryAdjustmentRet InventoryAdjustmentLineRet *' => array( 'InventoryAdjustment_InventoryAdjustmentLine', '*' ), + + 'InventoryAdjustmentRet DataExtRet' => array( null, null ), + 'InventoryAdjustmentRet DataExtRet *' => array( 'DataExt', '*' ), + + 'InventoryAdjustmentRet *' => array( 'InventoryAdjustment', '*' ), + + 'InvoiceRet' => array( 'Invoice', null ), + 'InvoiceRet CustomerRef' => array( null, null ), + 'InvoiceRet CustomerRef *' => array( 'Invoice', 'Customer_*' ), + 'InvoiceRet ARAccountRef' => array( null, null ), 'InvoiceRet ARAccountRef *' => array( 'Invoice', 'ARAccount_*' ), - 'InvoiceRet ClassRef' => array( null, null ), - 'InvoiceRet ClassRef *' => array( 'Invoice', 'Class_*' ), - 'InvoiceRet TemplateRef' => array( null, null ), - 'InvoiceRet TemplateRef *' => array( 'Invoice', 'Template_*' ), - 'InvoiceRet BillAddress' => array( 'Invoice', null ), - 'InvoiceRet BillAddress *' => array( 'Invoice', 'BillAddress_*' ), - 'InvoiceRet ShipAddress' => array( 'Invoice', null ), - 'InvoiceRet ShipAddress *' => array( 'Invoice', 'ShipAddress_*' ), - 'InvoiceRet BillAddressBlock' => array( 'Invoice', null ), - 'InvoiceRet BillAddressBlock *' => array( 'Invoice', 'BillAddressBlock_*' ), - 'InvoiceRet ShipAddressBlock' => array( 'Invoice', null ), - 'InvoiceRet ShipAddressBlock *' => array( 'Invoice', 'ShipAddressBlock_*' ), - 'InvoiceRet TermsRef' => array( null, null ), - 'InvoiceRet TermsRef *' => array( 'Invoice', 'Terms_*' ), - 'InvoiceRet ItemSalesTaxRef' => array( null, null ), - 'InvoiceRet ItemSalesTaxRef *' => array( 'Invoice', 'ItemSalesTax_*' ), + 'InvoiceRet ClassRef' => array( null, null ), + 'InvoiceRet ClassRef *' => array( 'Invoice', 'Class_*' ), + 'InvoiceRet TemplateRef' => array( null, null ), + 'InvoiceRet TemplateRef *' => array( 'Invoice', 'Template_*' ), + 'InvoiceRet BillAddress' => array( 'Invoice', null ), + 'InvoiceRet BillAddress *' => array( 'Invoice', 'BillAddress_*' ), + 'InvoiceRet ShipAddress' => array( 'Invoice', null ), + 'InvoiceRet ShipAddress *' => array( 'Invoice', 'ShipAddress_*' ), + 'InvoiceRet BillAddressBlock' => array( 'Invoice', null ), + 'InvoiceRet BillAddressBlock *' => array( 'Invoice', 'BillAddressBlock_*' ), + 'InvoiceRet ShipAddressBlock' => array( 'Invoice', null ), + 'InvoiceRet ShipAddressBlock *' => array( 'Invoice', 'ShipAddressBlock_*' ), + 'InvoiceRet TermsRef' => array( null, null ), + 'InvoiceRet TermsRef *' => array( 'Invoice', 'Terms_*' ), + 'InvoiceRet ItemSalesTaxRef' => array( null, null ), + 'InvoiceRet ItemSalesTaxRef *' => array( 'Invoice', 'ItemSalesTax_*' ), 'InvoiceRet ShipMethodRef' => array( null, null ), - 'InvoiceRet ShipMethodRef *' => array( 'Invoice', 'ShipMethod_*' ), - 'InvoiceRet SalesRepRef' => array( null, null ), - 'InvoiceRet SalesRepRef *' => array( 'Invoice', 'SalesRep_*' ), - 'InvoiceRet CurrencyRef' => array( null, null ), - 'InvoiceRet CurrencyRef *' => array( 'Invoice', 'Currency_*' ), - 'InvoiceRet CustomerMsgRef' => array( null, null ), - 'InvoiceRet CustomerMsgRef *' => array( 'Invoice', 'CustomerMsg_*' ), - 'InvoiceRet CustomerSalesTaxCodeRef' => array( null, null ), - 'InvoiceRet CustomerSalesTaxCodeRef *' => array( 'Invoice', 'CustomerSalesTaxCode_*' ), - - 'InvoiceRet LinkedTxn' => array( 'Invoice_LinkedTxn', null ), + 'InvoiceRet ShipMethodRef *' => array( 'Invoice', 'ShipMethod_*' ), + 'InvoiceRet SalesRepRef' => array( null, null ), + 'InvoiceRet SalesRepRef *' => array( 'Invoice', 'SalesRep_*' ), + 'InvoiceRet CurrencyRef' => array( null, null ), + 'InvoiceRet CurrencyRef *' => array( 'Invoice', 'Currency_*' ), + 'InvoiceRet CustomerMsgRef' => array( null, null ), + 'InvoiceRet CustomerMsgRef *' => array( 'Invoice', 'CustomerMsg_*' ), + 'InvoiceRet CustomerSalesTaxCodeRef' => array( null, null ), + 'InvoiceRet CustomerSalesTaxCodeRef *' => array( 'Invoice', 'CustomerSalesTaxCode_*' ), + + 'InvoiceRet LinkedTxn' => array( 'Invoice_LinkedTxn', null ), 'InvoiceRet LinkedTxn TxnID' => array( 'Invoice_LinkedTxn', 'ToTxnID' ), 'InvoiceRet LinkedTxn *' => array( 'Invoice_LinkedTxn', '*' ), - + 'InvoiceRet InvoiceLineRet' => array( null, null ), - 'InvoiceRet InvoiceLineRet ItemRef' => array( null, null ), - 'InvoiceRet InvoiceLineRet ItemRef *' => array( 'Invoice_InvoiceLine', 'Item_*' ), - 'InvoiceRet InvoiceLineRet OverrideUOMSetRef' => array( null, null ), - 'InvoiceRet InvoiceLineRet OverrideUOMSetRef *' => array( 'Invoice_InvoiceLine', 'OverrideUOMSet_*' ), - 'InvoiceRet InvoiceLineRet ClassRef' => array( null, null ), - 'InvoiceRet InvoiceLineRet ClassRef *' => array( 'Invoice_InvoiceLine', 'Class_*' ), - 'InvoiceRet InvoiceLineRet InventorySiteRef' => array( null, null ), - 'InvoiceRet InvoiceLineRet InventorySiteRef *' => array( 'Invoice_InvoiceLine', 'InventorySite_*' ), - 'InvoiceRet InvoiceLineRet SalesTaxCodeRef' => array( null, null ), - 'InvoiceRet InvoiceLineRet SalesTaxCodeRef *' => array( 'Invoice_InvoiceLine', 'SalesTaxCode_*' ), - - 'InvoiceRet InvoiceLineRet Desc' => array( 'Invoice_InvoiceLine', 'Descrip' ), - - 'InvoiceRet InvoiceLineRet DataExtRet' => array( 'DataExt', null ), - 'InvoiceRet InvoiceLineRet DataExtRet *' => array( 'DataExt', '*' ), - - 'InvoiceRet InvoiceLineRet *' => array( 'Invoice_InvoiceLine', '*' ), - - 'InvoiceRet InvoiceLineGroupRet' => array( null, null ), - 'InvoiceRet InvoiceLineGroupRet ItemGroupRef' => array( null, null ), - 'InvoiceRet InvoiceLineGroupRet ItemGroupRef *' => array( 'Invoice_InvoiceLineGroup', 'ItemGroup_*' ), - 'InvoiceRet InvoiceLineGroupRet OverrideUOMSetRef' => array( null, null ), - 'InvoiceRet InvoiceLineGroupRet OverrideUOMSetRef *' => array( 'Invoice_InvoiceLineGroup', 'OverrideUOMSet_*' ), - - 'InvoiceRet InvoiceLineGroupRet Desc' => array( 'Invoice_InvoiceLineGroup', 'Descrip' ), - - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet' => array( null, null ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet ItemRef' => array( null, null ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet ItemRef *' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'Item_*' ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet Desc' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'Descrip' ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet OverrideUOMSetRef' => array( null, null ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet OverrideUOMSetRef *' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'OverrideUOMSet_*' ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet ClassRef' => array( null, null ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet ClassRef *' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'Class_*' ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet SalesTaxCodeRef' => array( null, null ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet SalesTaxCodeRef *' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'SalesTaxCode_*' ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet DataExtRet' => array( null, null ), - 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet DataExtRet *' => array( 'DataExt', '*' ), + 'InvoiceRet InvoiceLineRet ItemRef' => array( null, null ), + 'InvoiceRet InvoiceLineRet ItemRef *' => array( 'Invoice_InvoiceLine', 'Item_*' ), + 'InvoiceRet InvoiceLineRet OverrideUOMSetRef' => array( null, null ), + 'InvoiceRet InvoiceLineRet OverrideUOMSetRef *' => array( 'Invoice_InvoiceLine', 'OverrideUOMSet_*' ), + 'InvoiceRet InvoiceLineRet ClassRef' => array( null, null ), + 'InvoiceRet InvoiceLineRet ClassRef *' => array( 'Invoice_InvoiceLine', 'Class_*' ), + 'InvoiceRet InvoiceLineRet InventorySiteRef' => array( null, null ), + 'InvoiceRet InvoiceLineRet InventorySiteRef *' => array( 'Invoice_InvoiceLine', 'InventorySite_*' ), + 'InvoiceRet InvoiceLineRet SalesTaxCodeRef' => array( null, null ), + 'InvoiceRet InvoiceLineRet SalesTaxCodeRef *' => array( 'Invoice_InvoiceLine', 'SalesTaxCode_*' ), + + 'InvoiceRet InvoiceLineRet Desc' => array( 'Invoice_InvoiceLine', 'Descrip' ), + + 'InvoiceRet InvoiceLineRet DataExtRet' => array( 'DataExt', null ), + 'InvoiceRet InvoiceLineRet DataExtRet *' => array( 'DataExt', '*' ), + + 'InvoiceRet InvoiceLineRet *' => array( 'Invoice_InvoiceLine', '*' ), + + 'InvoiceRet InvoiceLineGroupRet' => array( null, null ), + 'InvoiceRet InvoiceLineGroupRet ItemGroupRef' => array( null, null ), + 'InvoiceRet InvoiceLineGroupRet ItemGroupRef *' => array( 'Invoice_InvoiceLineGroup', 'ItemGroup_*' ), + 'InvoiceRet InvoiceLineGroupRet OverrideUOMSetRef' => array( null, null ), + 'InvoiceRet InvoiceLineGroupRet OverrideUOMSetRef *' => array( 'Invoice_InvoiceLineGroup', 'OverrideUOMSet_*' ), + + 'InvoiceRet InvoiceLineGroupRet Desc' => array( 'Invoice_InvoiceLineGroup', 'Descrip' ), + + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet' => array( null, null ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet ItemRef' => array( null, null ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet ItemRef *' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'Item_*' ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet Desc' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'Descrip' ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet OverrideUOMSetRef' => array( null, null ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet OverrideUOMSetRef *' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'OverrideUOMSet_*' ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet ClassRef' => array( null, null ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet ClassRef *' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'Class_*' ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet SalesTaxCodeRef' => array( null, null ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet SalesTaxCodeRef *' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'SalesTaxCode_*' ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet DataExtRet' => array( null, null ), + 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet DataExtRet *' => array( 'DataExt', '*' ), 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet *' => array( 'Invoice_InvoiceLineGroup_InvoiceLine', '*' ) , - - 'InvoiceRet InvoiceLineGroupRet DataExtRet' => array( null, null ), - 'InvoiceRet InvoiceLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), - - 'InvoiceRet InvoiceLineGroupRet *' => array( 'Invoice_InvoiceLineGroup', '*' ), - - 'InvoiceRet DataExtRet' => array( null, null ), - 'InvoiceRet DataExtRet *' => array( 'DataExt', '*' ), - - 'InvoiceRet *' => array( 'Invoice', '*' ), - - 'ItemDiscountRet' => array( 'ItemDiscount', null ), - 'ItemDiscountRet ParentRef' => array( null, null ), - 'ItemDiscountRet ParentRef *' => array( 'ItemDiscount', 'Parent_*' ), - 'ItemDiscountRet SalesTaxCodeRef' => array( null, null ), - 'ItemDiscountRet SalesTaxCodeRef *' => array( 'ItemDiscount', 'SalesTaxCode_*' ), - 'ItemDiscountRet AccountRef' => array( null, null ), - 'ItemDiscountRet AccountRef *' => array( 'ItemDiscount', 'Account_*' ), - 'ItemDiscountRet DataExtRet' => array( null, null ), - 'ItemDiscountRet DataExtRet *' => array( 'DataExt', '*' ), - 'ItemDiscountRet *' => array( 'ItemDiscount', '*' ), - - 'ItemServiceRet' => array( 'ItemService', null ), - 'ItemServiceRet ParentRef' => array( null, null ), - 'ItemServiceRet ParentRef *' => array( 'ItemService', 'Parent_*' ), - 'ItemServiceRet UnitOfMeasureSetRef' => array( null, null ), - 'ItemServiceRet UnitOfMeasureSetRef *' => array( 'ItemService', 'UnitOfMeasureSet_*' ), - 'ItemServiceRet SalesTaxCodeRef' => array( null, null ), - 'ItemServiceRet SalesTaxCodeRef *' => array( 'ItemService', 'SalesTaxCode_*' ), - 'ItemServiceRet SalesOrPurchase' => array( null, null ), - 'ItemServiceRet SalesOrPurchase AccountRef' => array( null, null ), - 'ItemServiceRet SalesOrPurchase AccountRef *' => array( 'ItemService', 'SalesOrPurchase_Account_*' ), - 'ItemServiceRet SalesOrPurchase *' => array( 'ItemService', 'SalesOrPurchase_*' ), - 'ItemServiceRet SalesAndPurchase' => array( null, null ), - 'ItemServiceRet SalesAndPurchase IncomeAccountRef' => array( null, null ), - 'ItemServiceRet SalesAndPurchase IncomeAccountRef *' => array( 'ItemService', 'SalesAndPurchase_IncomeAccount_*' ), - 'ItemServiceRet SalesAndPurchase ExpenseAccountRef' => array( null, null ), - 'ItemServiceRet SalesAndPurchase ExpenseAccountRef *' => array( 'ItemService', 'SalesAndPurchase_ExpenseAccount_*' ), - 'ItemServiceRet SalesAndPurchase PrefVendorRef' => array( null, null ), - 'ItemServiceRet SalesAndPurchase PrefVendorRef *' => array( 'ItemService', 'SalesAndPurchase_PrefVendor_*' ), - 'ItemServiceRet SalesAndPurchase *' => array( 'ItemService', 'SalesAndPurchase_*' ), - - 'ItemServiceRet DataExtRet' => array( null, null ), - 'ItemServiceRet DataExtRet *' => array( 'DataExt', '*' ), - 'ItemServiceRet *' => array( 'ItemService', '*' ), - - 'ItemNonInventoryRet' => array( 'ItemNonInventory', null ), - 'ItemNonInventoryRet ParentRef' => array( null, null ), - 'ItemNonInventoryRet ParentRef *' => array( 'ItemNonInventory', 'Parent_*' ), - 'ItemNonInventoryRet UnitOfMeasureRef' => array( null, null ), - 'ItemNonInventoryRet UnitOfMeasureRef *' => array( 'itemnoninventory', 'UnitOfMeasure_*' ), - 'ItemNonInventoryRet SalesTaxCodeRef' => array( null, null ), - 'ItemNonInventoryRet SalesTaxCodeRef' => array( 'itemnoninventory', 'SalesTaxCode_*' ), - 'ItemNonInventoryRet UnitOfMeasureSetRef' => array( null, null ), - 'ItemNonInventoryRet UnitOfMeasureSetRef *' => array( 'ItemNonInventory', 'UnitOfMeasureSet_*' ), - 'ItemNonInventoryRet SalesTaxCodeRef' => array( null, null ), - 'ItemNonInventoryRet SalesTaxCodeRef *' => array( 'ItemNonInventory', 'SalesTaxCode_*' ), - 'ItemNonInventoryRet SalesOrPurchase' => array( null, null ), - 'ItemNonInventoryRet SalesOrPurchase *' => array( 'ItemNonInventory', 'SalesOrPurchase_*' ), - 'ItemNonInventoryRet SalesOrPurchase AccountRef' => array( null, null ), - 'ItemNonInventoryRet SalesOrPurchase AccountRef *' => array( 'ItemNonInventory', 'SalesOrPurchase_Account_*' ), - 'ItemNonInventoryRet SalesAndPurchase' => array( null, null ), - 'ItemNonInventoryRet SalesAndPurchase IncomeAccountRef' => array( null, null ), - 'ItemNonInventoryRet SalesAndPurchase IncomeAccountRef *' => array( 'ItemNonInventory', 'SalesAndPurchase_IncomeAccount_*' ), - 'ItemNonInventoryRet SalesAndPurchase ExpenseAccountRef' => array( null, null ), - 'ItemNonInventoryRet SalesAndPurchase ExpenseAccountRef *' => array( 'ItemNonInventory', 'SalesAndPurchase_ExpenseAccount_*' ), - 'ItemNonInventoryRet SalesAndPurchase PrefVendorRef' => array( null, null ), - 'ItemNonInventoryRet SalesAndPurchase PrefVendorRef *' => array( 'ItemNonInventory', 'SalesAndPurchase_PrefVendor_*' ), - 'ItemNonInventoryRet SalesAndPurchase *' => array( 'ItemNonInventory', 'SalesAndPurchase_*' ), - 'ItemNonInventoryRet DataExtRet' => array( null, null ), - 'ItemNonInventoryRet DataExtRet *' => array( 'DataExt', '*' ), - 'ItemNonInventoryRet *' => array( 'ItemNonInventory', '*' ), - - 'ItemOtherChargeRet' => array( 'ItemOtherCharge', null ), - 'ItemOtherChargeRet ParentRef' => array( null, null ), - 'ItemOtherChargeRet ParentRef *' => array( 'ItemOtherCharge', 'Parent_*' ), - 'ItemOtherChargeRet SalesTaxCodeRef' => array( null, null ), - 'ItemOtherChargeRet SalesTaxCodeRef *' => array( 'ItemOtherCharge', 'SalesTaxCode_*' ), - 'ItemOtherChargeRet SalesOrPurchase' => array( null, null ), - 'ItemOtherChargeRet SalesOrPurchase *' => array( 'ItemOtherCharge', 'SalesOrPurchase_*' ), - 'ItemOtherChargeRet SalesOrPurchase AccountRef' => array( null, null ), - 'ItemOtherChargeRet SalesOrPurchase AccountRef *' => array( 'ItemOtherCharge', 'SalesOrPurchase_Account_*' ), - 'ItemOtherChargeRet SalesAndPurchase' => array( null, null ), - 'ItemOtherChargeRet SalesAndPurchase IncomeAccountRef' => array( null, null ), - 'ItemOtherChargeRet SalesAndPurchase IncomeAccountRef *' => array( 'ItemOtherCharge', 'SalesAndPurchase_IncomeAccount_*' ), - 'ItemOtherChargeRet SalesAndPurchase ExpenseAccountRef' => array( null, null ), - 'ItemOtherChargeRet SalesAndPurchase ExpenseAccountRef *' => array( 'ItemOtherCharge', 'SalesAndPurchase_ExpenseAccount_*' ), - 'ItemOtherChargeRet SalesAndPurchase PrefVendorRef' => array( null, null ), - 'ItemOtherChargeRet SalesAndPurchase PrefVendorRef *' => array( 'ItemOtherCharge', 'SalesAndPurchase_PrefVendor_*' ), - 'ItemOtherChargeRet SalesAndPurchase *' => array( 'ItemOtherCharge', 'SalesAndPurchase_*' ), - - 'ItemOtherChargeRet DataExtRet' => array( null, null ), - 'ItemOtherChargeRet DataExtRet *' => array( 'DataExt', '*' ), - 'ItemOtherChargeRet *' => array( 'ItemOtherCharge', '*' ), - - 'ItemInventoryRet' => array( 'ItemInventory', null ), - 'ItemInventoryRet ParentRef' => array( null, null ), - 'ItemInventoryRet ParentRef *' => array( 'ItemInventory', 'Parent_*' ), - 'ItemInventoryRet SalesTaxCodeRef' => array( null, null ), - 'ItemInventoryRet SalesTaxCodeRef *' => array( 'ItemInventory', 'SalesTaxCode_*' ), - 'ItemInventoryRet UnitOfMeasureSetRef' => array( null, null ), - 'ItemInventoryRet UnitOfMeasureSetRef *' => array( 'ItemInventory', 'UnitOfMeasureSet_*' ), - 'ItemInventoryRet IncomeAccountRef' => array( null, null ), - 'ItemInventoryRet IncomeAccountRef *' => array( 'ItemInventory', 'IncomeAccount_*', ), - 'ItemInventoryRet COGSAccountRef' => array( null, null ), - 'ItemInventoryRet COGSAccountRef *' => array( 'ItemInventory', 'COGSAccount_*' ), - 'ItemInventoryRet PrefVendorRef' => array( null, null ), - 'ItemInventoryRet PrefVendorRef *' => array( 'ItemInventory', 'PrefVendor_*' ), - 'ItemInventoryRet AssetAccountRef' => array( null, null ), + + 'InvoiceRet InvoiceLineGroupRet DataExtRet' => array( null, null ), + 'InvoiceRet InvoiceLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), + + 'InvoiceRet InvoiceLineGroupRet *' => array( 'Invoice_InvoiceLineGroup', '*' ), + + 'InvoiceRet DataExtRet' => array( null, null ), + 'InvoiceRet DataExtRet *' => array( 'DataExt', '*' ), + + 'InvoiceRet *' => array( 'Invoice', '*' ), + + 'ItemDiscountRet' => array( 'ItemDiscount', null ), + 'ItemDiscountRet ParentRef' => array( null, null ), + 'ItemDiscountRet ParentRef *' => array( 'ItemDiscount', 'Parent_*' ), + 'ItemDiscountRet SalesTaxCodeRef' => array( null, null ), + 'ItemDiscountRet SalesTaxCodeRef *' => array( 'ItemDiscount', 'SalesTaxCode_*' ), + 'ItemDiscountRet AccountRef' => array( null, null ), + 'ItemDiscountRet AccountRef *' => array( 'ItemDiscount', 'Account_*' ), + 'ItemDiscountRet DataExtRet' => array( null, null ), + 'ItemDiscountRet DataExtRet *' => array( 'DataExt', '*' ), + 'ItemDiscountRet *' => array( 'ItemDiscount', '*' ), + + 'ItemServiceRet' => array( 'ItemService', null ), + 'ItemServiceRet ParentRef' => array( null, null ), + 'ItemServiceRet ParentRef *' => array( 'ItemService', 'Parent_*' ), + 'ItemServiceRet UnitOfMeasureSetRef' => array( null, null ), + 'ItemServiceRet UnitOfMeasureSetRef *' => array( 'ItemService', 'UnitOfMeasureSet_*' ), + 'ItemServiceRet SalesTaxCodeRef' => array( null, null ), + 'ItemServiceRet SalesTaxCodeRef *' => array( 'ItemService', 'SalesTaxCode_*' ), + 'ItemServiceRet SalesOrPurchase' => array( null, null ), + 'ItemServiceRet SalesOrPurchase AccountRef' => array( null, null ), + 'ItemServiceRet SalesOrPurchase AccountRef *' => array( 'ItemService', 'SalesOrPurchase_Account_*' ), + 'ItemServiceRet SalesOrPurchase *' => array( 'ItemService', 'SalesOrPurchase_*' ), + 'ItemServiceRet SalesAndPurchase' => array( null, null ), + 'ItemServiceRet SalesAndPurchase IncomeAccountRef' => array( null, null ), + 'ItemServiceRet SalesAndPurchase IncomeAccountRef *' => array( 'ItemService', 'SalesAndPurchase_IncomeAccount_*' ), + 'ItemServiceRet SalesAndPurchase ExpenseAccountRef' => array( null, null ), + 'ItemServiceRet SalesAndPurchase ExpenseAccountRef *' => array( 'ItemService', 'SalesAndPurchase_ExpenseAccount_*' ), + 'ItemServiceRet SalesAndPurchase PrefVendorRef' => array( null, null ), + 'ItemServiceRet SalesAndPurchase PrefVendorRef *' => array( 'ItemService', 'SalesAndPurchase_PrefVendor_*' ), + 'ItemServiceRet SalesAndPurchase *' => array( 'ItemService', 'SalesAndPurchase_*' ), + + 'ItemServiceRet DataExtRet' => array( null, null ), + 'ItemServiceRet DataExtRet *' => array( 'DataExt', '*' ), + 'ItemServiceRet *' => array( 'ItemService', '*' ), + + 'ItemNonInventoryRet' => array( 'ItemNonInventory', null ), + 'ItemNonInventoryRet ParentRef' => array( null, null ), + 'ItemNonInventoryRet ParentRef *' => array( 'ItemNonInventory', 'Parent_*' ), + 'ItemNonInventoryRet UnitOfMeasureRef' => array( null, null ), + 'ItemNonInventoryRet UnitOfMeasureRef *' => array( 'itemnoninventory', 'UnitOfMeasure_*' ), + 'ItemNonInventoryRet SalesTaxCodeRef' => array( null, null ), + 'ItemNonInventoryRet SalesTaxCodeRef' => array( 'itemnoninventory', 'SalesTaxCode_*' ), + 'ItemNonInventoryRet UnitOfMeasureSetRef' => array( null, null ), + 'ItemNonInventoryRet UnitOfMeasureSetRef *' => array( 'ItemNonInventory', 'UnitOfMeasureSet_*' ), + 'ItemNonInventoryRet SalesTaxCodeRef' => array( null, null ), + 'ItemNonInventoryRet SalesTaxCodeRef *' => array( 'ItemNonInventory', 'SalesTaxCode_*' ), + 'ItemNonInventoryRet SalesOrPurchase' => array( null, null ), + 'ItemNonInventoryRet SalesOrPurchase *' => array( 'ItemNonInventory', 'SalesOrPurchase_*' ), + 'ItemNonInventoryRet SalesOrPurchase AccountRef' => array( null, null ), + 'ItemNonInventoryRet SalesOrPurchase AccountRef *' => array( 'ItemNonInventory', 'SalesOrPurchase_Account_*' ), + 'ItemNonInventoryRet SalesAndPurchase' => array( null, null ), + 'ItemNonInventoryRet SalesAndPurchase IncomeAccountRef' => array( null, null ), + 'ItemNonInventoryRet SalesAndPurchase IncomeAccountRef *' => array( 'ItemNonInventory', 'SalesAndPurchase_IncomeAccount_*' ), + 'ItemNonInventoryRet SalesAndPurchase ExpenseAccountRef' => array( null, null ), + 'ItemNonInventoryRet SalesAndPurchase ExpenseAccountRef *' => array( 'ItemNonInventory', 'SalesAndPurchase_ExpenseAccount_*' ), + 'ItemNonInventoryRet SalesAndPurchase PrefVendorRef' => array( null, null ), + 'ItemNonInventoryRet SalesAndPurchase PrefVendorRef *' => array( 'ItemNonInventory', 'SalesAndPurchase_PrefVendor_*' ), + 'ItemNonInventoryRet SalesAndPurchase *' => array( 'ItemNonInventory', 'SalesAndPurchase_*' ), + 'ItemNonInventoryRet DataExtRet' => array( null, null ), + 'ItemNonInventoryRet DataExtRet *' => array( 'DataExt', '*' ), + 'ItemNonInventoryRet *' => array( 'ItemNonInventory', '*' ), + + 'ItemOtherChargeRet' => array( 'ItemOtherCharge', null ), + 'ItemOtherChargeRet ParentRef' => array( null, null ), + 'ItemOtherChargeRet ParentRef *' => array( 'ItemOtherCharge', 'Parent_*' ), + 'ItemOtherChargeRet SalesTaxCodeRef' => array( null, null ), + 'ItemOtherChargeRet SalesTaxCodeRef *' => array( 'ItemOtherCharge', 'SalesTaxCode_*' ), + 'ItemOtherChargeRet SalesOrPurchase' => array( null, null ), + 'ItemOtherChargeRet SalesOrPurchase *' => array( 'ItemOtherCharge', 'SalesOrPurchase_*' ), + 'ItemOtherChargeRet SalesOrPurchase AccountRef' => array( null, null ), + 'ItemOtherChargeRet SalesOrPurchase AccountRef *' => array( 'ItemOtherCharge', 'SalesOrPurchase_Account_*' ), + 'ItemOtherChargeRet SalesAndPurchase' => array( null, null ), + 'ItemOtherChargeRet SalesAndPurchase IncomeAccountRef' => array( null, null ), + 'ItemOtherChargeRet SalesAndPurchase IncomeAccountRef *' => array( 'ItemOtherCharge', 'SalesAndPurchase_IncomeAccount_*' ), + 'ItemOtherChargeRet SalesAndPurchase ExpenseAccountRef' => array( null, null ), + 'ItemOtherChargeRet SalesAndPurchase ExpenseAccountRef *' => array( 'ItemOtherCharge', 'SalesAndPurchase_ExpenseAccount_*' ), + 'ItemOtherChargeRet SalesAndPurchase PrefVendorRef' => array( null, null ), + 'ItemOtherChargeRet SalesAndPurchase PrefVendorRef *' => array( 'ItemOtherCharge', 'SalesAndPurchase_PrefVendor_*' ), + 'ItemOtherChargeRet SalesAndPurchase *' => array( 'ItemOtherCharge', 'SalesAndPurchase_*' ), + + 'ItemOtherChargeRet DataExtRet' => array( null, null ), + 'ItemOtherChargeRet DataExtRet *' => array( 'DataExt', '*' ), + 'ItemOtherChargeRet *' => array( 'ItemOtherCharge', '*' ), + + 'ItemInventoryRet' => array( 'ItemInventory', null ), + 'ItemInventoryRet ParentRef' => array( null, null ), + 'ItemInventoryRet ParentRef *' => array( 'ItemInventory', 'Parent_*' ), + 'ItemInventoryRet SalesTaxCodeRef' => array( null, null ), + 'ItemInventoryRet SalesTaxCodeRef *' => array( 'ItemInventory', 'SalesTaxCode_*' ), + 'ItemInventoryRet UnitOfMeasureSetRef' => array( null, null ), + 'ItemInventoryRet UnitOfMeasureSetRef *' => array( 'ItemInventory', 'UnitOfMeasureSet_*' ), + 'ItemInventoryRet IncomeAccountRef' => array( null, null ), + 'ItemInventoryRet IncomeAccountRef *' => array( 'ItemInventory', 'IncomeAccount_*', ), + 'ItemInventoryRet COGSAccountRef' => array( null, null ), + 'ItemInventoryRet COGSAccountRef *' => array( 'ItemInventory', 'COGSAccount_*' ), + 'ItemInventoryRet PrefVendorRef' => array( null, null ), + 'ItemInventoryRet PrefVendorRef *' => array( 'ItemInventory', 'PrefVendor_*' ), + 'ItemInventoryRet AssetAccountRef' => array( null, null ), 'ItemInventoryRet AssetAccountRef *' => array( 'ItemInventory', 'AssetAccount_*' ), - 'ItemInventoryRet DataExtRet' => array( null, null ), - 'ItemInventoryRet DataExtRet *' => array( 'DataExt', '*' ), + 'ItemInventoryRet DataExtRet' => array( null, null ), + 'ItemInventoryRet DataExtRet *' => array( 'DataExt', '*' ), 'ItemInventoryRet *' => array( 'ItemInventory', '*' ), - - - 'ItemInventoryAssemblyRet' => array( 'ItemInventoryAssembly', null ), - 'ItemInventoryAssemblyRet ParentRef' => array( null, null ), - 'ItemInventoryAssemblyRet ParentRef *' => array( 'ItemInventoryAssembly', 'Parent_*' ), - 'ItemInventoryAssemblyRet UnitOfMeasureSetRef' => array( null, null ), - 'ItemInventoryAssemblyRet UnitOfMeasureSetRef *' => array( 'ItemInventoryAssembly', 'UnitOfMeasureSet_*' ), - 'ItemInventoryAssemblyRet SalesTaxCodeRef' => array( null, null ), - 'ItemInventoryAssemblyRet SalesTaxCodeRef *' => array( 'ItemInventoryAssembly', 'SalesTaxCode_*' ), - 'ItemInventoryAssemblyRet IncomeAccountRef' => array( null, null ), - 'ItemInventoryAssemblyRet IncomeAccountRef *' => array( 'ItemInventoryAssembly', 'IncomeAccount_*' ), - 'ItemInventoryAssemblyRet COGSAccountRef' => array( null, null ), - 'ItemInventoryAssemblyRet COGSAccountRef *' => array( 'ItemInventoryAssembly', 'COGSAccount_*' ), - 'ItemInventoryAssemblyRet PrefVendorRef' => array( null, null ), - 'ItemInventoryAssemblyRet PrefVendorRef *' => array( 'ItemInventoryAssembly', 'PrefVendor_*' ), - 'ItemInventoryAssemblyRet AssetAccountRef' => array( null, null ), - 'ItemInventoryAssemblyRet AssetAccountRef *' => array( 'ItemInventoryAssembly', 'AssetAccount_*' ), - - 'ItemInventoryAssemblyRet ItemInventoryAssemblyLine' => array( null, null ), - 'ItemInventoryAssemblyRet ItemInventoryAssemblyLine ItemInventoryRef' => array( null, null ), - 'ItemInventoryAssemblyRet ItemInventoryAssemblyLine ItemInventoryRef *' => array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', 'ItemInventory_*' ), - 'ItemInventoryAssemblyRet ItemInventoryAssemblyLine *' => array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', '*' ), - - 'ItemInventoryAssemblyRet DataExtRet' => array( null, null ), - 'ItemInventoryAssemblyRet DataExtRet *' => array( 'DataExt', '*' ), - - 'ItemInventoryAssemblyRet *' => array( 'ItemInventoryAssembly', '*' ), - - 'ItemFixedAssetRet' => array( 'ItemFixedAsset', null ), - 'ItemFixedAssetRet AssetAccountRef' => array( null, null ), - 'ItemFixedAssetRet AssetAccountRef *' => array( 'ItemFixedAsset', 'AssetAccount_*' ), - 'ItemFixedAssetRet FixedAssetSalesInfo' => array( null, null ), - 'ItemFixedAssetRet FixedAssetSalesInfo *' => array( 'ItemFixedAsset', 'FixedAssetSalesInfo_*' ), - 'ItemFixedAssetRet DataExtRet' => array( null, null ), - 'ItemFixedAssetRet DataExtRet *' => array( 'DataExt', '*' ), - - 'ItemFixedAssetRet *' => array( 'ItemFixedAsset', '*' ), - + + + 'ItemInventoryAssemblyRet' => array( 'ItemInventoryAssembly', null ), + 'ItemInventoryAssemblyRet ParentRef' => array( null, null ), + 'ItemInventoryAssemblyRet ParentRef *' => array( 'ItemInventoryAssembly', 'Parent_*' ), + 'ItemInventoryAssemblyRet UnitOfMeasureSetRef' => array( null, null ), + 'ItemInventoryAssemblyRet UnitOfMeasureSetRef *' => array( 'ItemInventoryAssembly', 'UnitOfMeasureSet_*' ), + 'ItemInventoryAssemblyRet SalesTaxCodeRef' => array( null, null ), + 'ItemInventoryAssemblyRet SalesTaxCodeRef *' => array( 'ItemInventoryAssembly', 'SalesTaxCode_*' ), + 'ItemInventoryAssemblyRet IncomeAccountRef' => array( null, null ), + 'ItemInventoryAssemblyRet IncomeAccountRef *' => array( 'ItemInventoryAssembly', 'IncomeAccount_*' ), + 'ItemInventoryAssemblyRet COGSAccountRef' => array( null, null ), + 'ItemInventoryAssemblyRet COGSAccountRef *' => array( 'ItemInventoryAssembly', 'COGSAccount_*' ), + 'ItemInventoryAssemblyRet PrefVendorRef' => array( null, null ), + 'ItemInventoryAssemblyRet PrefVendorRef *' => array( 'ItemInventoryAssembly', 'PrefVendor_*' ), + 'ItemInventoryAssemblyRet AssetAccountRef' => array( null, null ), + 'ItemInventoryAssemblyRet AssetAccountRef *' => array( 'ItemInventoryAssembly', 'AssetAccount_*' ), + + 'ItemInventoryAssemblyRet ItemInventoryAssemblyLine' => array( null, null ), + 'ItemInventoryAssemblyRet ItemInventoryAssemblyLine ItemInventoryRef' => array( null, null ), + 'ItemInventoryAssemblyRet ItemInventoryAssemblyLine ItemInventoryRef *' => array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', 'ItemInventory_*' ), + 'ItemInventoryAssemblyRet ItemInventoryAssemblyLine *' => array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', '*' ), + + 'ItemInventoryAssemblyRet DataExtRet' => array( null, null ), + 'ItemInventoryAssemblyRet DataExtRet *' => array( 'DataExt', '*' ), + + 'ItemInventoryAssemblyRet *' => array( 'ItemInventoryAssembly', '*' ), + + 'ItemFixedAssetRet' => array( 'ItemFixedAsset', null ), + 'ItemFixedAssetRet AssetAccountRef' => array( null, null ), + 'ItemFixedAssetRet AssetAccountRef *' => array( 'ItemFixedAsset', 'AssetAccount_*' ), + 'ItemFixedAssetRet FixedAssetSalesInfo' => array( null, null ), + 'ItemFixedAssetRet FixedAssetSalesInfo *' => array( 'ItemFixedAsset', 'FixedAssetSalesInfo_*' ), + 'ItemFixedAssetRet DataExtRet' => array( null, null ), + 'ItemFixedAssetRet DataExtRet *' => array( 'DataExt', '*' ), + + 'ItemFixedAssetRet *' => array( 'ItemFixedAsset', '*' ), + 'ItemGroupRet' => array( 'ItemGroup', null ), - 'ItemGroupRet UnitOfMeasureSetRef' => array( null, null ), - 'ItemGroupRet UnitOfMeasureSetRef *' => array( 'ItemGroup', 'UnitOfMeasureSet_*' ), - 'ItemGroupRet ItemGroupLine' => array( null, null ), + 'ItemGroupRet UnitOfMeasureSetRef' => array( null, null ), + 'ItemGroupRet UnitOfMeasureSetRef *' => array( 'ItemGroup', 'UnitOfMeasureSet_*' ), + 'ItemGroupRet ItemGroupLine' => array( null, null ), 'ItemGroupRet ItemGroupLine ItemRef' => array( null, null ), 'ItemGroupRet ItemGroupLine ItemRef *' => array( 'ItemGroup_ItemGroupLine', 'Item_*' ), - 'ItemGroupRet ItemGroupLine *' => array( 'ItemGroup_ItemGroupLine', '*' ), - 'ItemGroupRet DataExtRet' => array( null, null ), - 'ItemGroupRet DataExtRet *' => array( 'DataExt', '*' ), - - 'ItemGroupRet *' => array( 'ItemGroup', '*' ), - - 'ItemSubtotalRet' => array( 'ItemSubtotal', null ), - 'ItemSubtotalRet DataExtRet' => array( null, null ), - 'ItemSubtotalRet DataExtRet *' => array( 'DataExt', '*' ), - - 'ItemSubtotalRet *' => array( 'ItemSubtotal', '*' ), - - 'ItemPaymentRet' => array( 'ItemPayment', null ), - 'ItemPaymentRet DepositToAccountRef' => array( null, null ), - 'ItemPaymentRet DepositToAccountRef *' => array( 'ItemPayment', 'DepositToAccount_*' ), - 'ItemPaymentRet PaymentMethodRef' => array( null, null ), - 'ItemPaymentRet PaymentMethodRef *' => array( 'ItemPayment', 'PaymentMethod_*' ), - - 'ItemPaymentRet DataExtRet' => array( null, null ), - 'ItemPaymentRet DataExtRet *' => array( 'DataExt', '*' ), - 'ItemPaymentRet *' => array( 'ItemPayment', '*' ), - - 'ItemSalesTaxRet' => array( 'ItemSalesTax', null ), - 'ItemSalesTaxRet TaxVendorRef' => array( null, null ), + 'ItemGroupRet ItemGroupLine *' => array( 'ItemGroup_ItemGroupLine', '*' ), + 'ItemGroupRet DataExtRet' => array( null, null ), + 'ItemGroupRet DataExtRet *' => array( 'DataExt', '*' ), + + 'ItemGroupRet *' => array( 'ItemGroup', '*' ), + + 'ItemSubtotalRet' => array( 'ItemSubtotal', null ), + 'ItemSubtotalRet DataExtRet' => array( null, null ), + 'ItemSubtotalRet DataExtRet *' => array( 'DataExt', '*' ), + + 'ItemSubtotalRet *' => array( 'ItemSubtotal', '*' ), + + 'ItemPaymentRet' => array( 'ItemPayment', null ), + 'ItemPaymentRet DepositToAccountRef' => array( null, null ), + 'ItemPaymentRet DepositToAccountRef *' => array( 'ItemPayment', 'DepositToAccount_*' ), + 'ItemPaymentRet PaymentMethodRef' => array( null, null ), + 'ItemPaymentRet PaymentMethodRef *' => array( 'ItemPayment', 'PaymentMethod_*' ), + + 'ItemPaymentRet DataExtRet' => array( null, null ), + 'ItemPaymentRet DataExtRet *' => array( 'DataExt', '*' ), + 'ItemPaymentRet *' => array( 'ItemPayment', '*' ), + + 'ItemSalesTaxRet' => array( 'ItemSalesTax', null ), + 'ItemSalesTaxRet TaxVendorRef' => array( null, null ), 'ItemSalesTaxRet TaxVendorRef *' => array( 'ItemSalesTax', 'TaxVendor_*' ), - 'ItemSalesTaxRet DataExtRet' => array( null, null ), - 'ItemSalesTaxRet DataExtRet *' => array( 'DataExt', '*' ), - - 'ItemSalesTaxRet *' => array( 'ItemSalesTax', '*' ), - - 'ItemSalesTaxGroupRet' => array( 'ItemSalesTaxGroup', null ), - 'ItemSalesTaxGroupRet ItemSalesTaxRef' => array( null, null ), - 'ItemSalesTaxGroupRet ItemSalesTaxRef *' => array( 'ItemSalesTaxGroup_ItemSalesTax', '*' ), - 'ItemSalesTaxGroupRet DataExtRet' => array( null, null ), - 'ItemSalesTaxGroupRet DataExtRet *' => array( 'DataExt', '*' ), - 'ItemSalesTaxGroupRet *' => array( 'ItemSalesTaxGroup', '*' ), - - 'ItemReceiptRet' => array( 'ItemReceipt', null ), - 'ItemReceiptRet VendorRef' => array( null, null ), - 'ItemReceiptRet VendorRef *' => array( 'ItemReceipt', 'Vendor_*' ), - 'ItemReceiptRet APAccountRef' => array( null, null ), - 'ItemReceiptRet APAccountRef *' => array( 'ItemReceipt', 'APAccount_*' ), - - 'ItemReceiptRet LinkedTxn' => array( 'ItemReceipt_LinkedTxn', null ), + 'ItemSalesTaxRet DataExtRet' => array( null, null ), + 'ItemSalesTaxRet DataExtRet *' => array( 'DataExt', '*' ), + + 'ItemSalesTaxRet *' => array( 'ItemSalesTax', '*' ), + + 'ItemSalesTaxGroupRet' => array( 'ItemSalesTaxGroup', null ), + 'ItemSalesTaxGroupRet ItemSalesTaxRef' => array( null, null ), + 'ItemSalesTaxGroupRet ItemSalesTaxRef *' => array( 'ItemSalesTaxGroup_ItemSalesTax', '*' ), + 'ItemSalesTaxGroupRet DataExtRet' => array( null, null ), + 'ItemSalesTaxGroupRet DataExtRet *' => array( 'DataExt', '*' ), + 'ItemSalesTaxGroupRet *' => array( 'ItemSalesTaxGroup', '*' ), + + 'ItemReceiptRet' => array( 'ItemReceipt', null ), + 'ItemReceiptRet VendorRef' => array( null, null ), + 'ItemReceiptRet VendorRef *' => array( 'ItemReceipt', 'Vendor_*' ), + 'ItemReceiptRet APAccountRef' => array( null, null ), + 'ItemReceiptRet APAccountRef *' => array( 'ItemReceipt', 'APAccount_*' ), + + 'ItemReceiptRet LinkedTxn' => array( 'ItemReceipt_LinkedTxn', null ), 'ItemReceiptRet LinkedTxn TxnID' => array( 'ItemReceipt_LinkedTxn', 'ToTxnID' ), 'ItemReceiptRet LinkedTxn *' => array( 'ItemReceipt_LinkedTxn', '*' ), - - 'ItemReceiptRet ExpenseLineRet' => array( 'ItemReceipt_ExpenseLine', null ), - 'ItemReceiptRet ExpenseLineRet AccountRef' => array( null, null ), - 'ItemReceiptRet ExpenseLineRet AccountRef *' => array( 'ItemReceipt_ExpenseLine', 'Account_*' ), - 'ItemReceiptRet ExpenseLineRet CustomerRef' => array( null, null ), - 'ItemReceiptRet ExpenseLineRet CustomerRef *' => array( 'ItemReceipt_ExpenseLine', 'Customer_*' ), - 'ItemReceiptRet ExpenseLineRet ClassRef' => array( null, null ), - 'ItemReceiptRet ExpenseLineRet ClassRef *' => array( 'ItemReceipt_ExpenseLine', 'Class_*' ), + + 'ItemReceiptRet ExpenseLineRet' => array( 'ItemReceipt_ExpenseLine', null ), + 'ItemReceiptRet ExpenseLineRet AccountRef' => array( null, null ), + 'ItemReceiptRet ExpenseLineRet AccountRef *' => array( 'ItemReceipt_ExpenseLine', 'Account_*' ), + 'ItemReceiptRet ExpenseLineRet CustomerRef' => array( null, null ), + 'ItemReceiptRet ExpenseLineRet CustomerRef *' => array( 'ItemReceipt_ExpenseLine', 'Customer_*' ), + 'ItemReceiptRet ExpenseLineRet ClassRef' => array( null, null ), + 'ItemReceiptRet ExpenseLineRet ClassRef *' => array( 'ItemReceipt_ExpenseLine', 'Class_*' ), 'ItemReceiptRet ExpenseLineRet *' => array( 'ItemReceipt_ExpenseLine', '*' ), - - - 'ItemReceiptRet ItemLineRet' => array( 'ItemReceipt_ItemLine', null ), - 'ItemReceiptRet ItemLineRet Desc' => array( 'ItemReceipt_ItemLine', 'Descrip' ), - 'ItemReceiptRet ItemLineRet ItemRef' => array( null, null ), - 'ItemReceiptRet ItemLineRet ItemRef *' => array( 'ItemReceipt_ItemLine', 'Item_*' ), - 'ItemReceiptRet ItemLineRet OverrideUOMSetRef' => array( null, null ), - 'ItemReceiptRet ItemLineRet OverrideUOMSetRef *' => array( 'ItemReceipt_ItemLine', 'OverrideUOMSet_*' ), - 'ItemReceiptRet ItemLineRet CustomerRef' => array( null, null ), - 'ItemReceiptRet ItemLineRet CustomerRef *' => array( 'ItemReceipt_ItemLine', 'Customer_*' ), - 'ItemReceiptRet ItemLineRet ClassRef' => array( null, null ), - 'ItemReceiptRet ItemLineRet ClassRef *' => array( 'ItemReceipt_ItemLine', 'Class_*' ), + + + 'ItemReceiptRet ItemLineRet' => array( 'ItemReceipt_ItemLine', null ), + 'ItemReceiptRet ItemLineRet Desc' => array( 'ItemReceipt_ItemLine', 'Descrip' ), + 'ItemReceiptRet ItemLineRet ItemRef' => array( null, null ), + 'ItemReceiptRet ItemLineRet ItemRef *' => array( 'ItemReceipt_ItemLine', 'Item_*' ), + 'ItemReceiptRet ItemLineRet OverrideUOMSetRef' => array( null, null ), + 'ItemReceiptRet ItemLineRet OverrideUOMSetRef *' => array( 'ItemReceipt_ItemLine', 'OverrideUOMSet_*' ), + 'ItemReceiptRet ItemLineRet CustomerRef' => array( null, null ), + 'ItemReceiptRet ItemLineRet CustomerRef *' => array( 'ItemReceipt_ItemLine', 'Customer_*' ), + 'ItemReceiptRet ItemLineRet ClassRef' => array( null, null ), + 'ItemReceiptRet ItemLineRet ClassRef *' => array( 'ItemReceipt_ItemLine', 'Class_*' ), 'ItemReceiptRet ItemLineRet *' => array( 'ItemReceipt_ItemLine', '*' ), - - 'ItemReceiptRet ItemGroupLineRet' => array( 'ItemReceipt_ItemGroupLine', null ), - 'ItemReceiptRet ItemGroupLineRet Desc' => array( 'ItemReceipt_ItemGroupLine', 'Descrip' ), - 'ItemReceiptRet ItemGroupLineRet ItemGroupRef' => array( null, null ), - 'ItemReceiptRet ItemGroupLineRet ItemGroupRef *' => array( 'ItemReceipt_ItemGroupLine', 'ItemGroup_*' ), - 'ItemReceiptRet ItemGroupLineRet OverrideUOMSetRef' => array( null, null ), - 'ItemReceiptRet ItemGroupLineRet OverrideUOMSetRef *' => array( 'ItemReceipt_ItemGroupLine', 'OverrideUOMSet_*' ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet' => array( null, null ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet ItemRef' => array( null, null ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet ItemRef *' => array( 'ItemReceipt_ItemGroupLine_ItemLine', 'Item_*' ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet Desc' => array( 'ItemReceipt_ItemGroupLine_ItemLine', 'Descrip' ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef' => array( null, null ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef *' => array( 'ItemReceipt_ItemGroupLine_ItemLine', 'OverrideUOMSet_*' ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet CustomerRef' => array( null, null ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet CustomerRef *' => array( 'ItemReceipt_ItemGroupLine_ItemLine', 'Customer_*' ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet ClassRef' => array( null, null ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet ClassRef *' => array( 'ItemReceipt_ItemGroupLine_ItemLine', 'Class_*' ), - 'ItemReceiptRet ItemGroupLineRet ItemLineRet *' => array( 'ItemReceipt_ItemGroupLine_ItemLine', '*' ), - + + 'ItemReceiptRet ItemGroupLineRet' => array( 'ItemReceipt_ItemGroupLine', null ), + 'ItemReceiptRet ItemGroupLineRet Desc' => array( 'ItemReceipt_ItemGroupLine', 'Descrip' ), + 'ItemReceiptRet ItemGroupLineRet ItemGroupRef' => array( null, null ), + 'ItemReceiptRet ItemGroupLineRet ItemGroupRef *' => array( 'ItemReceipt_ItemGroupLine', 'ItemGroup_*' ), + 'ItemReceiptRet ItemGroupLineRet OverrideUOMSetRef' => array( null, null ), + 'ItemReceiptRet ItemGroupLineRet OverrideUOMSetRef *' => array( 'ItemReceipt_ItemGroupLine', 'OverrideUOMSet_*' ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet' => array( null, null ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet ItemRef' => array( null, null ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet ItemRef *' => array( 'ItemReceipt_ItemGroupLine_ItemLine', 'Item_*' ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet Desc' => array( 'ItemReceipt_ItemGroupLine_ItemLine', 'Descrip' ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef' => array( null, null ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef *' => array( 'ItemReceipt_ItemGroupLine_ItemLine', 'OverrideUOMSet_*' ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet CustomerRef' => array( null, null ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet CustomerRef *' => array( 'ItemReceipt_ItemGroupLine_ItemLine', 'Customer_*' ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet ClassRef' => array( null, null ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet ClassRef *' => array( 'ItemReceipt_ItemGroupLine_ItemLine', 'Class_*' ), + 'ItemReceiptRet ItemGroupLineRet ItemLineRet *' => array( 'ItemReceipt_ItemGroupLine_ItemLine', '*' ), + 'ItemReceiptRet ItemGroupLineRet *' => array( 'ItemReceipt_ItemGroupLine', '*' ), - - 'ItemReceiptRet DataExtRet' => array( null, null ), - 'ItemReceiptRet DataExtRet *' => array( 'DataExt', '*' ), - 'ItemReceiptRet *' => array( 'ItemReceipt', '*' ), - - 'JobTypeRet' => array( 'JobType', null ), - 'JobTypeRet ParentRef' => array( null, null ), - 'JobTypeRet ParentRef *' => array( 'JobType', 'Parent_*' ), - 'JobTypeRet *' => array( 'JobType', '*' ), - + + 'ItemReceiptRet DataExtRet' => array( null, null ), + 'ItemReceiptRet DataExtRet *' => array( 'DataExt', '*' ), + 'ItemReceiptRet *' => array( 'ItemReceipt', '*' ), + + 'JobTypeRet' => array( 'JobType', null ), + 'JobTypeRet ParentRef' => array( null, null ), + 'JobTypeRet ParentRef *' => array( 'JobType', 'Parent_*' ), + 'JobTypeRet *' => array( 'JobType', '*' ), + 'JournalEntryRet' => array( 'JournalEntry', null ), - 'JournalEntryRet JournalDebitLine' => array( null, null ), - 'JournalEntryRet JournalDebitLine AccountRef' => array( null, null ), - 'JournalEntryRet JournalDebitLine AccountRef *' => array( 'JournalEntry_JournalDebitLine', 'Account_*' ), - 'JournalEntryRet JournalDebitLine EntityRef' => array( null, null ), - 'JournalEntryRet JournalDebitLine EntityRef *' => array( 'JournalEntry_JournalDebitLine', 'Entity_*' ), - 'JournalEntryRet JournalDebitLine ClassRef' => array( null, null ), - 'JournalEntryRet JournalDebitLine ClassRef *' => array( 'JournalEntry_JournalDebitLine', 'Class_*' ), - 'JournalEntryRet JournalDebitLine *' => array( 'JournalEntry_JournalDebitLine', '*' ), - - - 'JournalEntryRet JournalCreditLine' => array( null, null ), - 'JournalEntryRet JournalCreditLine AccountRef' => array( null, null ), - 'JournalEntryRet JournalCreditLine AccountRef *' => array( 'JournalEntry_JournalCreditLine', 'Account_*' ), - 'JournalEntryRet JournalCreditLine EntityRef' => array( null, null ), - 'JournalEntryRet JournalCreditLine EntityRef *' => array( 'JournalEntry_JournalCreditLine', 'Entity_*' ), - 'JournalEntryRet JournalCreditLine ClassRef' => array( null, null ), - 'JournalEntryRet JournalCreditLine ClassRef *' => array( 'JournalEntry_JournalCreditLine', 'Class_*' ), - 'JournalEntryRet JournalCreditLine *' => array( 'JournalEntry_JournalCreditLine', '*' ), - - 'JournalEntryRet DataExtRet' => array( null, null ), - 'JournalEntryRet DataExtRet *' => array( 'DataExt', '*' ), - 'JournalEntryRet *' => array( 'JournalEntry', '*' ), - - 'PaymentMethodRet' => array( 'PaymentMethod', null ), - 'PaymentMethodRet *' => array( 'PaymentMethod', '*' ), - + 'JournalEntryRet JournalDebitLine' => array( null, null ), + 'JournalEntryRet JournalDebitLine AccountRef' => array( null, null ), + 'JournalEntryRet JournalDebitLine AccountRef *' => array( 'JournalEntry_JournalDebitLine', 'Account_*' ), + 'JournalEntryRet JournalDebitLine EntityRef' => array( null, null ), + 'JournalEntryRet JournalDebitLine EntityRef *' => array( 'JournalEntry_JournalDebitLine', 'Entity_*' ), + 'JournalEntryRet JournalDebitLine ClassRef' => array( null, null ), + 'JournalEntryRet JournalDebitLine ClassRef *' => array( 'JournalEntry_JournalDebitLine', 'Class_*' ), + 'JournalEntryRet JournalDebitLine *' => array( 'JournalEntry_JournalDebitLine', '*' ), + + + 'JournalEntryRet JournalCreditLine' => array( null, null ), + 'JournalEntryRet JournalCreditLine AccountRef' => array( null, null ), + 'JournalEntryRet JournalCreditLine AccountRef *' => array( 'JournalEntry_JournalCreditLine', 'Account_*' ), + 'JournalEntryRet JournalCreditLine EntityRef' => array( null, null ), + 'JournalEntryRet JournalCreditLine EntityRef *' => array( 'JournalEntry_JournalCreditLine', 'Entity_*' ), + 'JournalEntryRet JournalCreditLine ClassRef' => array( null, null ), + 'JournalEntryRet JournalCreditLine ClassRef *' => array( 'JournalEntry_JournalCreditLine', 'Class_*' ), + 'JournalEntryRet JournalCreditLine *' => array( 'JournalEntry_JournalCreditLine', '*' ), + + 'JournalEntryRet DataExtRet' => array( null, null ), + 'JournalEntryRet DataExtRet *' => array( 'DataExt', '*' ), + 'JournalEntryRet *' => array( 'JournalEntry', '*' ), + + 'PaymentMethodRet' => array( 'PaymentMethod', null ), + 'PaymentMethodRet *' => array( 'PaymentMethod', '*' ), + 'PayrollItemWageRet' => array( 'PayrollItemWage', null ), - 'PayrollItemWageRet ExpenseAccountRef' => array( null, null ), - 'PayrollItemWageRet ExpenseAccountRef *' => array( 'PayrollItemWage', 'ExpenseAccount_*' ), - - 'PayrollItemWageRet *' => array( 'PayrollItemWage', '*' ), - - 'PriceLevelRet' => array( 'PriceLevel', null ), - 'PriceLevelRet PriceLevelPerItemRet' => array( null, null ), - 'PriceLevelRet PriceLevelPerItemRet ItemRef' => array( null, null ), - 'PriceLevelRet PriceLevelPerItemRet ItemRef *' => array( 'PriceLevel_PriceLevelPerItem', 'Item_*' ), - 'PriceLevelRet PriceLevelPerItemRet *' => array( 'PriceLevel_PriceLevelPerItem', '*' ), - 'PriceLevelRet *' => array( 'PriceLevel', '*' ), - + 'PayrollItemWageRet ExpenseAccountRef' => array( null, null ), + 'PayrollItemWageRet ExpenseAccountRef *' => array( 'PayrollItemWage', 'ExpenseAccount_*' ), + + 'PayrollItemWageRet *' => array( 'PayrollItemWage', '*' ), + + 'PriceLevelRet' => array( 'PriceLevel', null ), + 'PriceLevelRet PriceLevelPerItemRet' => array( null, null ), + 'PriceLevelRet PriceLevelPerItemRet ItemRef' => array( null, null ), + 'PriceLevelRet PriceLevelPerItemRet ItemRef *' => array( 'PriceLevel_PriceLevelPerItem', 'Item_*' ), + 'PriceLevelRet PriceLevelPerItemRet *' => array( 'PriceLevel_PriceLevelPerItem', '*' ), + 'PriceLevelRet *' => array( 'PriceLevel', '*' ), + 'PurchaseOrderRet' => array( 'PurchaseOrder', null ), - 'PurchaseOrderRet VendorRef' => array( null, null ), - 'PurchaseOrderRet VendorRef *' => array( 'PurchaseOrder', 'Vendor_*' ), - 'PurchaseOrderRet VendorRef FullName' => array( 'PurchaseOrder', 'Vendor_FullName' ), - 'PurchaseOrderRet ClassRef' => array( null, null ), - 'PurchaseOrderRet ClassRef *' => array( 'PurchaseOrder', 'Class_*' ), - 'PurchaseOrderRet ShipToEntityRef' => array( null, null ), - 'PurchaseOrderRet ShipToEntityRef *' => array( 'PurchaseOrder', 'ShipToEntity_*' ), - 'PurchaseOrderRet ShipToEntityRef FullName' => array( 'PurchaseOrder', 'ShipToEntity_FullName' ), - 'PurchaseOrderRet TemplateRef' => array( null, null ), - 'PurchaseOrderRet TemplateRef *' => array( 'PurchaseOrder', 'Template_*' ), - 'PurchaseOrderRet VendorAddress' => array( 'PurchaseOrder', null ), - 'PurchaseOrderRet VendorAddress *' => array( 'PurchaseOrder', 'VendorAddress_*' ), - 'PurchaseOrderRet VendorAddressBlock' => array( 'PurchaseOrder', null ), - 'PurchaseOrderRet VendorAddressBlock *' => array( 'PurchaseOrder', 'VendorAddressBlock_*' ), - 'PurchaseOrderRet ShipAddress' => array( 'PurchaseOrder', null ), - 'PurchaseOrderRet ShipAddress *' => array( 'PurchaseOrder', 'ShipAddress_*' ), - 'PurchaseOrderRet ShipAddressBlock' => array( 'PurchaseOrder', null ), - 'PurchaseOrderRet ShipAddressBlock *' => array( 'PurchaseOrder', 'ShipAddressBlock_*' ), - 'PurchaseOrderRet TermsRef' => array( null, null ), - 'PurchaseOrderRet TermsRef *' => array( 'PurchaseOrder', 'Terms_*' ), - 'PurchaseOrderRet ShipMethodRef' => array( null, null ), - 'PurchaseOrderRet ShipMethodRef *' => array( 'PurchaseOrder', 'ShipMethod_*' ), - 'PurchaseOrderRet CurrencyRef' => array( null, null ), - 'PurchaseOrderRet CurrencyRef *' => array( 'PurchaseOrder', 'Currency_*' ), - 'PurchaseOrderRet PurchaseOrderLineRet' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineRet ItemRef' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineRet ItemRef *' => array( 'PurchaseOrder_PurchaseOrderLine', 'Item_*' ), - 'PurchaseOrderRet PurchaseOrderLineRet OverrideUOMSetRef' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineRet OverrideUOMSetRef *' => array( 'PurchaseOrder_PurchaseOrderLine', 'OverrideUOMSet_*' ), - 'PurchaseOrderRet PurchaseOrderLineRet ClassRef' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineRet ClassRef *' => array( 'PurchaseOrder_PurchaseOrderLine', 'Class_*' ), - 'PurchaseOrderRet PurchaseOrderLineRet CustomerRef' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineRet CustomerRef *' => array( 'PurchaseOrder_PurchaseOrderLine', 'Customer_*' ), - 'PurchaseOrderRet PurchaseOrderLineRet Desc' => array( 'PurchaseOrder_PurchaseOrderLine', 'Descrip' ), - 'PurchaseOrderRet PurchaseOrderLineRet DataExtRet' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineRet DataExtRet *' => array( 'DataExt', '*' ), - 'PurchaseOrderRet PurchaseOrderLineRet *' => array( 'PurchaseOrder_PurchaseOrderLine', '*' ), - - 'PurchaseOrderRet PurchaseOrderLineGroupRet' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet ItemGroupRef' => array( null, null ), + 'PurchaseOrderRet VendorRef' => array( null, null ), + 'PurchaseOrderRet VendorRef *' => array( 'PurchaseOrder', 'Vendor_*' ), + 'PurchaseOrderRet VendorRef FullName' => array( 'PurchaseOrder', 'Vendor_FullName' ), + 'PurchaseOrderRet ClassRef' => array( null, null ), + 'PurchaseOrderRet ClassRef *' => array( 'PurchaseOrder', 'Class_*' ), + 'PurchaseOrderRet ShipToEntityRef' => array( null, null ), + 'PurchaseOrderRet ShipToEntityRef *' => array( 'PurchaseOrder', 'ShipToEntity_*' ), + 'PurchaseOrderRet ShipToEntityRef FullName' => array( 'PurchaseOrder', 'ShipToEntity_FullName' ), + 'PurchaseOrderRet TemplateRef' => array( null, null ), + 'PurchaseOrderRet TemplateRef *' => array( 'PurchaseOrder', 'Template_*' ), + 'PurchaseOrderRet VendorAddress' => array( 'PurchaseOrder', null ), + 'PurchaseOrderRet VendorAddress *' => array( 'PurchaseOrder', 'VendorAddress_*' ), + 'PurchaseOrderRet VendorAddressBlock' => array( 'PurchaseOrder', null ), + 'PurchaseOrderRet VendorAddressBlock *' => array( 'PurchaseOrder', 'VendorAddressBlock_*' ), + 'PurchaseOrderRet ShipAddress' => array( 'PurchaseOrder', null ), + 'PurchaseOrderRet ShipAddress *' => array( 'PurchaseOrder', 'ShipAddress_*' ), + 'PurchaseOrderRet ShipAddressBlock' => array( 'PurchaseOrder', null ), + 'PurchaseOrderRet ShipAddressBlock *' => array( 'PurchaseOrder', 'ShipAddressBlock_*' ), + 'PurchaseOrderRet TermsRef' => array( null, null ), + 'PurchaseOrderRet TermsRef *' => array( 'PurchaseOrder', 'Terms_*' ), + 'PurchaseOrderRet ShipMethodRef' => array( null, null ), + 'PurchaseOrderRet ShipMethodRef *' => array( 'PurchaseOrder', 'ShipMethod_*' ), + 'PurchaseOrderRet CurrencyRef' => array( null, null ), + 'PurchaseOrderRet CurrencyRef *' => array( 'PurchaseOrder', 'Currency_*' ), + 'PurchaseOrderRet PurchaseOrderLineRet' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineRet ItemRef' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineRet ItemRef *' => array( 'PurchaseOrder_PurchaseOrderLine', 'Item_*' ), + 'PurchaseOrderRet PurchaseOrderLineRet OverrideUOMSetRef' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineRet OverrideUOMSetRef *' => array( 'PurchaseOrder_PurchaseOrderLine', 'OverrideUOMSet_*' ), + 'PurchaseOrderRet PurchaseOrderLineRet ClassRef' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineRet ClassRef *' => array( 'PurchaseOrder_PurchaseOrderLine', 'Class_*' ), + 'PurchaseOrderRet PurchaseOrderLineRet CustomerRef' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineRet CustomerRef *' => array( 'PurchaseOrder_PurchaseOrderLine', 'Customer_*' ), + 'PurchaseOrderRet PurchaseOrderLineRet Desc' => array( 'PurchaseOrder_PurchaseOrderLine', 'Descrip' ), + 'PurchaseOrderRet PurchaseOrderLineRet DataExtRet' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineRet DataExtRet *' => array( 'DataExt', '*' ), + 'PurchaseOrderRet PurchaseOrderLineRet *' => array( 'PurchaseOrder_PurchaseOrderLine', '*' ), + + 'PurchaseOrderRet PurchaseOrderLineGroupRet' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet ItemGroupRef' => array( null, null ), 'PurchaseOrderRet PurchaseOrderLineGroupRet ItemGroupRef *' => array( 'PurchaseOrder_PurchaseOrderLineGroup', 'ItemGroup_*' ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet OverrideUOMSetRef' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet OverrideUOMSetRef *' => array( 'PurchaseOrder_PurchaseOrderLineGroup', 'OverrideUOMSet_*' ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet Desc' => array( 'PurchaseOrder_PurchaseOrderLineGroup', 'Descrip' ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet ItemRef' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet ItemRef *' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', 'Item_*' ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet Desc' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', 'Descrip' ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet OverrideUOMSetRef' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet OverrideUOMSetRef *' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', 'OverrideUOMSet_*' ), - - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet ClassRef' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet ClassRef *' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', 'Class_*' ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet CustomerRef' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet CustomerRef *' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', 'Customer_*' ), - - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet DataExtRet' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet DataExtRet *' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet OverrideUOMSetRef' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet OverrideUOMSetRef *' => array( 'PurchaseOrder_PurchaseOrderLineGroup', 'OverrideUOMSet_*' ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet Desc' => array( 'PurchaseOrder_PurchaseOrderLineGroup', 'Descrip' ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet ItemRef' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet ItemRef *' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', 'Item_*' ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet Desc' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', 'Descrip' ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet OverrideUOMSetRef' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet OverrideUOMSetRef *' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', 'OverrideUOMSet_*' ), + + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet ClassRef' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet ClassRef *' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', 'Class_*' ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet CustomerRef' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet CustomerRef *' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', 'Customer_*' ), + + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet DataExtRet' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet DataExtRet *' => array( null, null ), 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet DataExtRet *' => array( 'DataExt', '*' ), - - 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet *' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', '*' ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet DataExtRet' => array( null, null ), - 'PurchaseOrderRet PurchaseOrderLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), - - 'PurchaseOrderRet PurchaseOrderLineGroupRet *' => array( 'PurchaseOrder_PurchaseOrderLineGroup', '*' ), - - 'PurchaseOrderRet DataExtRet' => array( null, null ), - 'PurchaseOrderRet DataExtRet *' => array( 'DataExt', '*' ), - - 'PurchaseOrderRet LinkedTxn' => array( null, null ), - 'PurchaseOrderRet LinkedTxn TxnID' => array( 'PurchaseOrder_LinkedTxn', 'ToTxnID' ), - 'PurchaseOrderRet LinkedTxn *' => array( 'PurchaseOrder_LinkedTxn', '*' ), - 'PurchaseOrderRet *' => array( 'PurchaseOrder', '*' ), - - 'ReceivePaymentRet' => array( 'ReceivePayment', null ), - 'ReceivePaymentRet CustomerRef' => array( null, null ), - 'ReceivePaymentRet CustomerRef *' => array( 'ReceivePayment', 'Customer_*' ), - 'ReceivePaymentRet ARAccountRef' => array( null, null ), + + 'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet *' => array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', '*' ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet DataExtRet' => array( null, null ), + 'PurchaseOrderRet PurchaseOrderLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), + + 'PurchaseOrderRet PurchaseOrderLineGroupRet *' => array( 'PurchaseOrder_PurchaseOrderLineGroup', '*' ), + + 'PurchaseOrderRet DataExtRet' => array( null, null ), + 'PurchaseOrderRet DataExtRet *' => array( 'DataExt', '*' ), + + 'PurchaseOrderRet LinkedTxn' => array( null, null ), + 'PurchaseOrderRet LinkedTxn TxnID' => array( 'PurchaseOrder_LinkedTxn', 'ToTxnID' ), + 'PurchaseOrderRet LinkedTxn *' => array( 'PurchaseOrder_LinkedTxn', '*' ), + 'PurchaseOrderRet *' => array( 'PurchaseOrder', '*' ), + + 'ReceivePaymentRet' => array( 'ReceivePayment', null ), + 'ReceivePaymentRet CustomerRef' => array( null, null ), + 'ReceivePaymentRet CustomerRef *' => array( 'ReceivePayment', 'Customer_*' ), + 'ReceivePaymentRet ARAccountRef' => array( null, null ), 'ReceivePaymentRet ARAccountRef *' => array( 'ReceivePayment', 'ARAccount_*', ), - 'ReceivePaymentRet PaymentMethodRef' => array( null, null ), - 'ReceivePaymentRet PaymentMethodRef *' => array( 'ReceivePayment', 'PaymentMethod_*' ), - - 'ReceivePaymentRet DepositToAccountRef' => array( null, null ), - 'ReceivePaymentRet DepositToAccountRef *' => array( 'ReceivePayment', 'DepositToAccount_*' ), - 'ReceivePaymentRet CreditCardTxnInfo' => array( null, null ), - 'ReceivePaymentRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), - 'ReceivePaymentRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'ReceivePayment', 'CreditCardTxnInfo_CreditCardTxnInputInfo_*' ), - 'ReceivePaymentRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), - 'ReceivePaymentRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'ReceivePayment', 'CreditCardTxnInfo_CreditCardTxnResultInfo_*' ), - 'ReceivePaymentRet AppliedToTxnRet' => array( null, null ), - 'ReceivePaymentRet AppliedToTxnRet TxnID' => array( 'ReceivePayment_AppliedToTxn', 'ToTxnID' ), + 'ReceivePaymentRet PaymentMethodRef' => array( null, null ), + 'ReceivePaymentRet PaymentMethodRef *' => array( 'ReceivePayment', 'PaymentMethod_*' ), + + 'ReceivePaymentRet DepositToAccountRef' => array( null, null ), + 'ReceivePaymentRet DepositToAccountRef *' => array( 'ReceivePayment', 'DepositToAccount_*' ), + 'ReceivePaymentRet CreditCardTxnInfo' => array( null, null ), + 'ReceivePaymentRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), + 'ReceivePaymentRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'ReceivePayment', 'CreditCardTxnInfo_CreditCardTxnInputInfo_*' ), + 'ReceivePaymentRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), + 'ReceivePaymentRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'ReceivePayment', 'CreditCardTxnInfo_CreditCardTxnResultInfo_*' ), + 'ReceivePaymentRet AppliedToTxnRet' => array( null, null ), + 'ReceivePaymentRet AppliedToTxnRet TxnID' => array( 'ReceivePayment_AppliedToTxn', 'ToTxnID' ), 'ReceivePaymentRet AppliedToTxnRet DiscountAccountRef' => array( null, null ), 'ReceivePaymentRet AppliedToTxnRet DiscountAccountRef *' => array( 'ReceivePayment_AppliedToTxn', 'DiscountAccount_*' ), 'ReceivePaymentRet AppliedToTxnRet *' => array( 'ReceivePayment_AppliedToTxn', '*' ), - 'ReceivePaymentRet DataExtRet' => array( null, null ), - 'ReceivePaymentRet DataExtRet *' => array( 'DataExt', '*' ), - 'ReceivePaymentRet *' => array( 'ReceivePayment', '*' ), - - 'SalesOrderRet' => array( 'SalesOrder', null ), - 'SalesOrderRet CustomerRef' => array( null, null ), - 'SalesOrderRet CustomerRef *' => array( 'SalesOrder', 'Customer_*' ), - 'SalesOrderRet ClassRef' => array( null, null ), - 'SalesOrderRet ClassRef *' => array( 'SalesOrder', 'Class_*' ), - 'SalesOrderRet TemplateRef' => array( null, null ), - 'SalesOrderRet TemplateRef *' => array( 'SalesOrder', 'Template_*' ), - 'SalesOrderRet BillAddress' => array( null, null ), - 'SalesOrderRet BillAddress *' => array( 'SalesOrder', 'BillAddress_*' ), - 'SalesOrderRet BillAddressBlock' => array( null, null ), - 'SalesOrderRet BillAddressBlock *' => array( 'SalesOrder', 'BillAddressBlock_*' ), - 'SalesOrderRet ShipAddress' => array( null, null ), - 'SalesOrderRet ShipAddress *' => array( 'SalesOrder', 'ShipAddress_*' ), - 'SalesOrderRet ShipAddressBlock' => array( null, null ), - 'SalesOrderRet ShipAddressBlock *' => array( 'SalesOrder', 'ShipAddressBlock_*' ), - 'SalesOrderRet TermsRef' => array( null, null ), - 'SalesOrderRet TermsRef *' => array( 'SalesOrder', 'Terms_*' ), - 'SalesOrderRet SalesRepRef' => array( null, null ), - 'SalesOrderRet SalesRepRef *' => array( 'SalesOrder', 'SalesRep_*' ), - 'SalesOrderRet ShipMethodRef' => array( null, null ), - 'SalesOrderRet ShipMethodRef *' => array( 'SalesOrder', 'ShipMethod_*' ), - 'SalesOrderRet ItemSalesTaxRef' => array( null, null ), - 'SalesOrderRet ItemSalesTaxRef *' => array( 'SalesOrder', 'ItemSalesTax_*' ), - 'SalesOrderRet CustomerMsgRef' => array( null, null ), - 'SalesOrderRet CustomerMsgRef *' => array( 'SalesOrder', 'CustomerMsg_*' ), - 'SalesOrderRet CustomerSalesTaxCodeRef' => array( null, null ), - 'SalesOrderRet CustomerSalesTaxCodeRef *' => array( 'SalesOrder', 'CustomerSalesTaxCode_*' ), - - 'SalesOrderRet LinkedTxn' => array( 'SalesOrder_LinkedTxn', null ), + 'ReceivePaymentRet DataExtRet' => array( null, null ), + 'ReceivePaymentRet DataExtRet *' => array( 'DataExt', '*' ), + 'ReceivePaymentRet *' => array( 'ReceivePayment', '*' ), + + 'SalesOrderRet' => array( 'SalesOrder', null ), + 'SalesOrderRet CustomerRef' => array( null, null ), + 'SalesOrderRet CustomerRef *' => array( 'SalesOrder', 'Customer_*' ), + 'SalesOrderRet ClassRef' => array( null, null ), + 'SalesOrderRet ClassRef *' => array( 'SalesOrder', 'Class_*' ), + 'SalesOrderRet TemplateRef' => array( null, null ), + 'SalesOrderRet TemplateRef *' => array( 'SalesOrder', 'Template_*' ), + 'SalesOrderRet BillAddress' => array( null, null ), + 'SalesOrderRet BillAddress *' => array( 'SalesOrder', 'BillAddress_*' ), + 'SalesOrderRet BillAddressBlock' => array( null, null ), + 'SalesOrderRet BillAddressBlock *' => array( 'SalesOrder', 'BillAddressBlock_*' ), + 'SalesOrderRet ShipAddress' => array( null, null ), + 'SalesOrderRet ShipAddress *' => array( 'SalesOrder', 'ShipAddress_*' ), + 'SalesOrderRet ShipAddressBlock' => array( null, null ), + 'SalesOrderRet ShipAddressBlock *' => array( 'SalesOrder', 'ShipAddressBlock_*' ), + 'SalesOrderRet TermsRef' => array( null, null ), + 'SalesOrderRet TermsRef *' => array( 'SalesOrder', 'Terms_*' ), + 'SalesOrderRet SalesRepRef' => array( null, null ), + 'SalesOrderRet SalesRepRef *' => array( 'SalesOrder', 'SalesRep_*' ), + 'SalesOrderRet ShipMethodRef' => array( null, null ), + 'SalesOrderRet ShipMethodRef *' => array( 'SalesOrder', 'ShipMethod_*' ), + 'SalesOrderRet ItemSalesTaxRef' => array( null, null ), + 'SalesOrderRet ItemSalesTaxRef *' => array( 'SalesOrder', 'ItemSalesTax_*' ), + 'SalesOrderRet CustomerMsgRef' => array( null, null ), + 'SalesOrderRet CustomerMsgRef *' => array( 'SalesOrder', 'CustomerMsg_*' ), + 'SalesOrderRet CustomerSalesTaxCodeRef' => array( null, null ), + 'SalesOrderRet CustomerSalesTaxCodeRef *' => array( 'SalesOrder', 'CustomerSalesTaxCode_*' ), + + 'SalesOrderRet LinkedTxn' => array( 'SalesOrder_LinkedTxn', null ), 'SalesOrderRet LinkedTxn TxnID' => array( 'SalesOrder_LinkedTxn', 'ToTxnID' ), 'SalesOrderRet LinkedTxn *' => array( 'SalesOrder_LinkedTxn', '*' ), - - 'SalesOrderRet SalesOrderLineRet' => array( 'SalesOrder_SalesOrderLine', null ), - 'SalesOrderRet SalesOrderLineRet Desc' => array( 'SalesOrder_SalesOrderLine', 'Descrip' ), - 'SalesOrderRet SalesOrderLineRet ItemRef' => array( null, null ), - 'SalesOrderRet SalesOrderLineRet ItemRef *' => array( 'SalesOrder_SalesOrderLine', 'Item_*' ), - 'SalesOrderRet SalesOrderLineRet OverrideUOMSetRef' => array( null, null ), - 'SalesOrderRet SalesOrderLineRet OverrideUOMSetRef *' => array( 'SalesOrder_SalesOrderLine', 'OverrideUOMSet_*' ), - 'SalesOrderRet SalesOrderLineRet ClassRef' => array( null, null ), - 'SalesOrderRet SalesOrderLineRet ClassRef *' => array( 'SalesOrder_SalesOrderLine', 'Class_*' ), - 'SalesOrderRet SalesOrderLineRet InventorySiteRef' => array( null, null ), - 'SalesOrderRet SalesOrderLineRet InventorySiteRef *' => array( 'SalesOrder_SalesOrderLine', 'InventorySite_*' ), - 'SalesOrderRet SalesOrderLineRet SalesTaxCodeRef' => array( null, null ), - 'SalesOrderRet SalesOrderLineRet SalesTaxCodeRef *' => array( 'SalesOrder_SalesOrderLine', 'SalesTaxCode_*' ), - - 'SalesOrderRet SalesOrderLineRet DataExtRet' => array( null, null ), - 'SalesOrderRet SalesOrderLineRet DataExtRet *' => array( 'DataExt', '*' ), - 'SalesOrderRet SalesOrderLineRet *' => array( 'SalesOrder_SalesOrderLine', '*' ), - - 'SalesOrderRet SalesOrderLineGroupRet' => array( 'SalesOrder_SalesOrderLineGroup', null ), - 'SalesOrderRet SalesOrderLineGroupRet Desc' => array( 'SalesOrder_SalesOrderLineGroup', 'Descrip' ), - 'SalesOrderRet SalesOrderLineGroupRet ItemGroupRef' => array( null, null ), + + 'SalesOrderRet SalesOrderLineRet' => array( 'SalesOrder_SalesOrderLine', null ), + 'SalesOrderRet SalesOrderLineRet Desc' => array( 'SalesOrder_SalesOrderLine', 'Descrip' ), + 'SalesOrderRet SalesOrderLineRet ItemRef' => array( null, null ), + 'SalesOrderRet SalesOrderLineRet ItemRef *' => array( 'SalesOrder_SalesOrderLine', 'Item_*' ), + 'SalesOrderRet SalesOrderLineRet OverrideUOMSetRef' => array( null, null ), + 'SalesOrderRet SalesOrderLineRet OverrideUOMSetRef *' => array( 'SalesOrder_SalesOrderLine', 'OverrideUOMSet_*' ), + 'SalesOrderRet SalesOrderLineRet ClassRef' => array( null, null ), + 'SalesOrderRet SalesOrderLineRet ClassRef *' => array( 'SalesOrder_SalesOrderLine', 'Class_*' ), + 'SalesOrderRet SalesOrderLineRet InventorySiteRef' => array( null, null ), + 'SalesOrderRet SalesOrderLineRet InventorySiteRef *' => array( 'SalesOrder_SalesOrderLine', 'InventorySite_*' ), + 'SalesOrderRet SalesOrderLineRet SalesTaxCodeRef' => array( null, null ), + 'SalesOrderRet SalesOrderLineRet SalesTaxCodeRef *' => array( 'SalesOrder_SalesOrderLine', 'SalesTaxCode_*' ), + + 'SalesOrderRet SalesOrderLineRet DataExtRet' => array( null, null ), + 'SalesOrderRet SalesOrderLineRet DataExtRet *' => array( 'DataExt', '*' ), + 'SalesOrderRet SalesOrderLineRet *' => array( 'SalesOrder_SalesOrderLine', '*' ), + + 'SalesOrderRet SalesOrderLineGroupRet' => array( 'SalesOrder_SalesOrderLineGroup', null ), + 'SalesOrderRet SalesOrderLineGroupRet Desc' => array( 'SalesOrder_SalesOrderLineGroup', 'Descrip' ), + 'SalesOrderRet SalesOrderLineGroupRet ItemGroupRef' => array( null, null ), 'SalesOrderRet SalesOrderLineGroupRet ItemGroupRef *' => array( 'SalesOrder_SalesOrderLineGroup', 'ItemGroup_*' ), - 'SalesOrderRet SalesOrderLineGroupRet OverrideUOMSetRef' => array( null, null ), - 'SalesOrderRet SalesOrderLineGroupRet OverrideUOMSetRef *' => array( 'SalesOrder_SalesOrderLineGroup', 'OverrideUOMSet_*' ), - - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet' => array( null, null ), - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet ItemRef' => array( null, null ), - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet ItemRef *' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', 'Item_*' ), - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet Desc' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', 'Descrip' ), - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet OverrideUOMSetRef' => array( null, null ), - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet OverrideUOMSetRef *' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', 'OverrideUOMSet_*' ), - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet SalesTaxCodeRef' => array( null, null ), - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet SalesTaxCodeRef *' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', 'SalesTaxCode_*' ), - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet ClassRef' => array( null, null ), - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet ClassRef *' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', 'Class_*' ), - - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet DataExtRet' => array( null, null ), - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet DataExtRet *' => array( 'DataExt', '*' ), - - 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet *' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', '*' ), - - 'SalesOrderRet SalesOrderLineGroupRet DataExtRet' => array( null, null ), - 'SalesOrderRet SalesOrderLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), - 'SalesOrderRet SalesOrderLineGroupRet *' => array( 'SalesOrder_SalesOrderLineGroup', '*' ), - - 'SalesOrderRet DataExtRet' => array( null, null ), - 'SalesOrderRet DataExtRet *' => array( 'DataExt', '*' ), - 'SalesOrderRet *' => array( 'SalesOrder', '*' ), - - 'SalesReceiptRet' => array( 'SalesReceipt', null ), - 'SalesReceiptRet CustomerRef' => array( null, null ), - 'SalesReceiptRet CustomerRef *' => array( 'SalesReceipt', 'Customer_*' ), - 'SalesReceiptRet ClassRef' => array( null, null ), - 'SalesReceiptRet ClassRef *' => array( 'SalesReceipt', 'Class_*' ), - 'SalesReceiptRet TemplateRef' => array( null, null ), - 'SalesReceiptRet TemplateRef *' => array( 'SalesReceipt', 'Template_*' ), - 'SalesReceiptRet BillAddressBlock' => array( null, null ), - 'SalesReceiptRet BillAddressBlock *' => array( 'SalesReceipt', 'BillAddressBlock_*' ), - 'SalesReceiptRet BillAddress' => array( null, null ), - 'SalesReceiptRet BillAddress *' => array( 'SalesReceipt', 'BillAddress_*' ), - 'SalesReceiptRet ShipAddressBlock' => array( null, null ), - 'SalesReceiptRet ShipAddressBlock *' => array( 'SalesReceipt', 'ShipAddressBlock_*' ), - 'SalesReceiptRet ShipAddress' => array( null, null ), - 'SalesReceiptRet ShipAddress *' => array( 'SalesReceipt', 'ShipAddress_*' ), - 'SalesReceiptRet PaymentMethodRef' => array( null, null ), - 'SalesReceiptRet PaymentMethodRef *' => array( 'SalesReceipt', 'PaymentMethod_*' ), - 'SalesReceiptRet SalesRepRef' => array( null, null ), - 'SalesReceiptRet SalesRepRef *' => array( 'SalesReceipt', 'SalesRep_*' ), - 'SalesReceiptRet ShipMethodRef' => array( null, null ), - 'SalesReceiptRet ShipMethodRef *' => array( 'SalesReceipt', 'ShipMethod_*' ), - 'SalesReceiptRet ItemSalesTaxRef' => array( null, null ), - 'SalesReceiptRet ItemSalesTaxRef *' => array( 'SalesReceipt', 'ItemSalesTax_*' ), - 'SalesReceiptRet CurrencyRef' => array( null, null ), - 'SalesReceiptRet CurrencyRef *' => array( 'SalesReceipt', 'Currency_*' ), - 'SalesReceiptRet CustomerMsgRef' => array( null, null ), - 'SalesReceiptRet CustomerMsgRef *' => array( 'SalesReceipt', 'CustomerMsg_*' ), - 'SalesReceiptRet CustomerSalesTaxCodeRef' => array( null, null ), - 'SalesReceiptRet CustomerSalesTaxCodeRef *' => array( 'SalesReceipt', 'CustomerSalesTaxCode_*' ), - 'SalesReceiptRet DepositToAccountRef' => array( null, null ), - 'SalesReceiptRet DepositToAccountRef *' => array( 'SalesReceipt', 'DepositToAccount_*' ), - - 'SalesReceiptRet CreditCardTxnInfo' => array( null, null ), - 'SalesReceiptRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), - 'SalesReceiptRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'SalesReceipt', 'CreditCardTxnInfo_CreditCardTxnInputInfo_*' ), - 'SalesReceiptRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), - 'SalesReceiptRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'SalesReceipt', 'CreditCardTxnInfo_CreditCardTxnResultInfo_*' ), - 'SalesReceiptRet CreditCardTxnInfo *' => array( 'SalesReceipt', 'CreditCardTxnInfo_*' ), - - 'SalesReceiptRet SalesReceiptLineRet' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineRet Desc' => array( 'SalesReceipt_SalesReceiptLine', 'Descrip' ), - 'SalesReceiptRet SalesReceiptLineRet ItemRef' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineRet ItemRef *' => array( 'SalesReceipt_SalesReceiptLine', 'Item_*' ), - 'SalesReceiptRet SalesReceiptLineRet OverrideUOMSetRef' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineRet OverrideUOMSetRef *' => array( 'SalesReceipt_SalesReceiptLine', 'OverrideUOMSet_*' ), - 'SalesReceiptRet SalesReceiptLineRet ClassRef' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineRet ClassRef *' => array( 'SalesReceipt_SalesReceiptLine', 'Class_*' ), - 'SalesReceiptRet SalesReceiptLineRet InventorySiteRef' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineRet InventorySiteRef *' => array( 'SalesReceipt_SalesReceiptLine', 'InventorySite_*' ), - 'SalesReceiptRet SalesReceiptLineRet SalesTaxCodeRef' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineRet SalesTaxCodeRef *' => array( 'SalesReceipt_SalesReceiptLine', 'SalesTaxCode_*' ), - 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo' => array( null, null ), - - 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'SalesReceipt_SalesReceiptLine', 'CreditCardTxnInfo_CreditCardTxnInputInfo_*' ), - 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'SalesReceipt_SalesReceiptLine', 'CreditCardTxnInfo_CreditCardTxnResultInfo_*' ), - 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo *' => array( 'SalesReceipt_SalesReceiptLine_CreditCardTxnInfo', '*' ), - - 'SalesReceiptRet SalesReceiptLineRet DataExtRet' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineRet DataExtRet *' => array( 'DataExt', '*' ), - 'SalesReceiptRet SalesReceiptLineRet *' => array( 'SalesReceipt_SalesReceiptLine', '*' ), - - 'SalesReceiptRet SalesReceiptLineGroupRet' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet ItemGroupRef' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet ItemGroupRef *' => array( 'SalesReceipt_SalesReceiptLineGroup', 'ItemGroup_*' ), - 'SalesReceiptRet SalesReceiptLineGroupRet OverrideUOMSetRef' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet OverrideUOMSetRef *' => array( 'SalesReceipt_SalesReceiptLineGroup', 'OverrideUOMSet_*' ), - 'SalesReceiptRet SalesReceiptLineGroupRet Desc' => array( 'SalesReceipt_SalesReceiptLineGroup', 'Descrip' ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet ItemRef' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet ItemRef *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'Item_*' ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet OverrideUOMSetRef' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet OverrideUOMSetRef *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'OverrideUOMSet_*' ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet ClassRef' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet ClassRef *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'Class_*' ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet SalesTaxCodeRef' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet SalesTaxCodeRef *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'SalesTaxCode_*' ), - - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet Desc' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'Descrip' ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'CreditCardTxnInfo_CreditCardTxnInputInfo_*' ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'CreditCardTxnInfo_CreditCardTxnResultInfo_*' ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'CreditCardTxnInfo_*' ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet DataExtRet' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet DataExtRet *' => array( 'DataExt', '*' ), - 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', '*' ), - - 'SalesReceiptRet SalesReceiptLineGroupRet DataExtRet' => array( null, null ), - 'SalesReceiptRet SalesReceiptLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), - 'SalesReceiptRet SalesReceiptLineGroupRet *' => array( 'SalesReceipt_SalesReceiptLineGroup', '*' ), - - 'SalesReceiptRet DataExtRet' => array( null, null ), - 'SalesReceiptRet DataExtRet *' => array( 'DataExt', '*' ), - 'SalesReceiptRet *' => array( 'SalesReceipt', '*' ), - - 'SalesRepRet' => array( 'SalesRep', null ), - 'SalesRepRet SalesRepEntityRef' => array( null, null ), - 'SalesRepRet SalesRepEntityRef *' => array( 'SalesRep', 'SalesRepEntity_*' ), - 'SalesRepRet *' => array( 'SalesRep', '*' ), - + 'SalesOrderRet SalesOrderLineGroupRet OverrideUOMSetRef' => array( null, null ), + 'SalesOrderRet SalesOrderLineGroupRet OverrideUOMSetRef *' => array( 'SalesOrder_SalesOrderLineGroup', 'OverrideUOMSet_*' ), + + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet' => array( null, null ), + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet ItemRef' => array( null, null ), + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet ItemRef *' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', 'Item_*' ), + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet Desc' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', 'Descrip' ), + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet OverrideUOMSetRef' => array( null, null ), + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet OverrideUOMSetRef *' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', 'OverrideUOMSet_*' ), + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet SalesTaxCodeRef' => array( null, null ), + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet SalesTaxCodeRef *' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', 'SalesTaxCode_*' ), + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet ClassRef' => array( null, null ), + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet ClassRef *' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', 'Class_*' ), + + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet DataExtRet' => array( null, null ), + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet DataExtRet *' => array( 'DataExt', '*' ), + + 'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet *' => array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', '*' ), + + 'SalesOrderRet SalesOrderLineGroupRet DataExtRet' => array( null, null ), + 'SalesOrderRet SalesOrderLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), + 'SalesOrderRet SalesOrderLineGroupRet *' => array( 'SalesOrder_SalesOrderLineGroup', '*' ), + + 'SalesOrderRet DataExtRet' => array( null, null ), + 'SalesOrderRet DataExtRet *' => array( 'DataExt', '*' ), + 'SalesOrderRet *' => array( 'SalesOrder', '*' ), + + 'SalesReceiptRet' => array( 'SalesReceipt', null ), + 'SalesReceiptRet CustomerRef' => array( null, null ), + 'SalesReceiptRet CustomerRef *' => array( 'SalesReceipt', 'Customer_*' ), + 'SalesReceiptRet ClassRef' => array( null, null ), + 'SalesReceiptRet ClassRef *' => array( 'SalesReceipt', 'Class_*' ), + 'SalesReceiptRet TemplateRef' => array( null, null ), + 'SalesReceiptRet TemplateRef *' => array( 'SalesReceipt', 'Template_*' ), + 'SalesReceiptRet BillAddressBlock' => array( null, null ), + 'SalesReceiptRet BillAddressBlock *' => array( 'SalesReceipt', 'BillAddressBlock_*' ), + 'SalesReceiptRet BillAddress' => array( null, null ), + 'SalesReceiptRet BillAddress *' => array( 'SalesReceipt', 'BillAddress_*' ), + 'SalesReceiptRet ShipAddressBlock' => array( null, null ), + 'SalesReceiptRet ShipAddressBlock *' => array( 'SalesReceipt', 'ShipAddressBlock_*' ), + 'SalesReceiptRet ShipAddress' => array( null, null ), + 'SalesReceiptRet ShipAddress *' => array( 'SalesReceipt', 'ShipAddress_*' ), + 'SalesReceiptRet PaymentMethodRef' => array( null, null ), + 'SalesReceiptRet PaymentMethodRef *' => array( 'SalesReceipt', 'PaymentMethod_*' ), + 'SalesReceiptRet SalesRepRef' => array( null, null ), + 'SalesReceiptRet SalesRepRef *' => array( 'SalesReceipt', 'SalesRep_*' ), + 'SalesReceiptRet ShipMethodRef' => array( null, null ), + 'SalesReceiptRet ShipMethodRef *' => array( 'SalesReceipt', 'ShipMethod_*' ), + 'SalesReceiptRet ItemSalesTaxRef' => array( null, null ), + 'SalesReceiptRet ItemSalesTaxRef *' => array( 'SalesReceipt', 'ItemSalesTax_*' ), + 'SalesReceiptRet CurrencyRef' => array( null, null ), + 'SalesReceiptRet CurrencyRef *' => array( 'SalesReceipt', 'Currency_*' ), + 'SalesReceiptRet CustomerMsgRef' => array( null, null ), + 'SalesReceiptRet CustomerMsgRef *' => array( 'SalesReceipt', 'CustomerMsg_*' ), + 'SalesReceiptRet CustomerSalesTaxCodeRef' => array( null, null ), + 'SalesReceiptRet CustomerSalesTaxCodeRef *' => array( 'SalesReceipt', 'CustomerSalesTaxCode_*' ), + 'SalesReceiptRet DepositToAccountRef' => array( null, null ), + 'SalesReceiptRet DepositToAccountRef *' => array( 'SalesReceipt', 'DepositToAccount_*' ), + + 'SalesReceiptRet CreditCardTxnInfo' => array( null, null ), + 'SalesReceiptRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), + 'SalesReceiptRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'SalesReceipt', 'CreditCardTxnInfo_CreditCardTxnInputInfo_*' ), + 'SalesReceiptRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), + 'SalesReceiptRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'SalesReceipt', 'CreditCardTxnInfo_CreditCardTxnResultInfo_*' ), + 'SalesReceiptRet CreditCardTxnInfo *' => array( 'SalesReceipt', 'CreditCardTxnInfo_*' ), + + 'SalesReceiptRet SalesReceiptLineRet' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineRet Desc' => array( 'SalesReceipt_SalesReceiptLine', 'Descrip' ), + 'SalesReceiptRet SalesReceiptLineRet ItemRef' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineRet ItemRef *' => array( 'SalesReceipt_SalesReceiptLine', 'Item_*' ), + 'SalesReceiptRet SalesReceiptLineRet OverrideUOMSetRef' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineRet OverrideUOMSetRef *' => array( 'SalesReceipt_SalesReceiptLine', 'OverrideUOMSet_*' ), + 'SalesReceiptRet SalesReceiptLineRet ClassRef' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineRet ClassRef *' => array( 'SalesReceipt_SalesReceiptLine', 'Class_*' ), + 'SalesReceiptRet SalesReceiptLineRet InventorySiteRef' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineRet InventorySiteRef *' => array( 'SalesReceipt_SalesReceiptLine', 'InventorySite_*' ), + 'SalesReceiptRet SalesReceiptLineRet SalesTaxCodeRef' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineRet SalesTaxCodeRef *' => array( 'SalesReceipt_SalesReceiptLine', 'SalesTaxCode_*' ), + 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo' => array( null, null ), + + 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'SalesReceipt_SalesReceiptLine', 'CreditCardTxnInfo_CreditCardTxnInputInfo_*' ), + 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'SalesReceipt_SalesReceiptLine', 'CreditCardTxnInfo_CreditCardTxnResultInfo_*' ), + 'SalesReceiptRet SalesReceiptLineRet CreditCardTxnInfo *' => array( 'SalesReceipt_SalesReceiptLine_CreditCardTxnInfo', '*' ), + + 'SalesReceiptRet SalesReceiptLineRet DataExtRet' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineRet DataExtRet *' => array( 'DataExt', '*' ), + 'SalesReceiptRet SalesReceiptLineRet *' => array( 'SalesReceipt_SalesReceiptLine', '*' ), + + 'SalesReceiptRet SalesReceiptLineGroupRet' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet ItemGroupRef' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet ItemGroupRef *' => array( 'SalesReceipt_SalesReceiptLineGroup', 'ItemGroup_*' ), + 'SalesReceiptRet SalesReceiptLineGroupRet OverrideUOMSetRef' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet OverrideUOMSetRef *' => array( 'SalesReceipt_SalesReceiptLineGroup', 'OverrideUOMSet_*' ), + 'SalesReceiptRet SalesReceiptLineGroupRet Desc' => array( 'SalesReceipt_SalesReceiptLineGroup', 'Descrip' ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet ItemRef' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet ItemRef *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'Item_*' ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet OverrideUOMSetRef' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet OverrideUOMSetRef *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'OverrideUOMSet_*' ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet ClassRef' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet ClassRef *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'Class_*' ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet SalesTaxCodeRef' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet SalesTaxCodeRef *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'SalesTaxCode_*' ), + + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet Desc' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'Descrip' ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnInputInfo' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnInputInfo *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'CreditCardTxnInfo_CreditCardTxnInputInfo_*' ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnResultInfo' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo CreditCardTxnResultInfo *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'CreditCardTxnInfo_CreditCardTxnResultInfo_*' ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet CreditCardTxnInfo *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', 'CreditCardTxnInfo_*' ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet DataExtRet' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet DataExtRet *' => array( 'DataExt', '*' ), + 'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet *' => array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', '*' ), + + 'SalesReceiptRet SalesReceiptLineGroupRet DataExtRet' => array( null, null ), + 'SalesReceiptRet SalesReceiptLineGroupRet DataExtRet *' => array( 'DataExt', '*' ), + 'SalesReceiptRet SalesReceiptLineGroupRet *' => array( 'SalesReceipt_SalesReceiptLineGroup', '*' ), + + 'SalesReceiptRet DataExtRet' => array( null, null ), + 'SalesReceiptRet DataExtRet *' => array( 'DataExt', '*' ), + 'SalesReceiptRet *' => array( 'SalesReceipt', '*' ), + + 'SalesRepRet' => array( 'SalesRep', null ), + 'SalesRepRet SalesRepEntityRef' => array( null, null ), + 'SalesRepRet SalesRepEntityRef *' => array( 'SalesRep', 'SalesRepEntity_*' ), + 'SalesRepRet *' => array( 'SalesRep', '*' ), + 'SalesTaxCodeRet' => array( 'SalesTaxCode', null ), - 'SalesTaxCodeRet Desc' => array( 'SalesTaxCode', 'Descrip' ), - 'SalesTaxCodeRet *' => array( 'SalesTaxCode', '*' ), - + 'SalesTaxCodeRet Desc' => array( 'SalesTaxCode', 'Descrip' ), + 'SalesTaxCodeRet *' => array( 'SalesTaxCode', '*' ), + 'ShipMethodRet' => array( 'ShipMethod', null ), - 'ShipMethodRet *' => array( 'ShipMethod', '*' ), - - 'StandardTermsRet' => array( 'StandardTerms', null ), - + 'ShipMethodRet *' => array( 'ShipMethod', '*' ), + + 'StandardTermsRet' => array( 'StandardTerms', null ), + 'StandardTermsRet *' => array( 'StandardTerms', '*' ), - - 'StandardTermsRet' => array( null, null ), + + 'StandardTermsRet' => array( null, null ), 'StandardTermsRet *' => array( 'StandardTerms', '*' ), - - 'TemplateRet' => array( 'Template', null ), - 'TemplateRet *' => array( 'Template', '*' ), - + + 'TemplateRet' => array( 'Template', null ), + 'TemplateRet *' => array( 'Template', '*' ), + 'TimeTrackingRet' => array( 'TimeTracking', null ), 'TimeTrackingRet EntityRef' => array( null, null ), 'TimeTrackingRet EntityRef *' => array( 'TimeTracking', 'Entity_*' ), @@ -1897,114 +1897,114 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, 'TimeTrackingRet ClassRef *' => array( 'TimeTracking', 'Class_*' ), 'TimeTrackingRet PayrollItemWageRef' => array( null, null ), 'TimeTrackingRet PayrollItemWageRef *' => array( 'TimeTracking', 'PayrollItemWage_*' ), - 'TimeTrackingRet *' => array( 'TimeTracking', '*' ), - + 'TimeTrackingRet *' => array( 'TimeTracking', '*' ), + 'UnitOfMeasureSetRet' => array( 'UnitOfMeasureSet', null ), - 'UnitOfMeasureSetRet BaseUnit' => array( null, null ), - 'UnitOfMeasureSetRet BaseUnit *' => array( 'UnitOfMeasureSet', 'BaseUnit_*' ), - 'UnitOfMeasureSetRet RelatedUnit' => array( null, null ), - 'UnitOfMeasureSetRet RelatedUnit *' => array( 'UnitOfMeasureSet_RelatedUnit', '*' ), - 'UnitOfMeasureSetRet DefaultUnit' => array( null, null ), - 'UnitOfMeasureSetRet DefaultUnit *' => array( 'UnitOfMeasureSet_DefaultUnit', '*' ), - 'UnitOfMeasureSetRet *' => array( 'UnitOfMeasureSet', '*' ), - - 'VehicleRet' => array( 'Vehicle', null ), - 'VehicleRet Desc' => array( 'Vehicle', 'Descrip' ), - - 'VehicleRet *' => array( 'Vehicle', '*' ), - - 'VehicleMileageRet' => array( 'VehicleMileage', null ), - 'VehicleMileageRet VehicleRef' => array( null, null ), - 'VehicleMileageRet VehicleRef *' => array( 'VehicleMileage', 'Vehicle_*' ), - 'VehicleMileageRet CustomerRef' => array( null, null ), - 'VehicleMileageRet CustomerRef *' => array( 'VehicleMileage', 'Customer_*' ), - 'VehicleMileageRet ItemRef' => array( null, null ), - 'VehicleMileageRet ItemRef *' => array( 'VehicleMileage', 'Item_*' ), - 'VehicleMileageRet ClassRef' => array( null, null ), - 'VehicleMileageRet ClassRef *' => array( 'VehicleMileage', 'Class_*' ), - 'VehicleMileageRet *' => array( 'VehicleMileage', '*' ), - - 'VendorRet' => array( 'Vendor', null ), - 'VendorRet VendorAddress' => array( null, null ), - 'VendorRet VendorAddress *' => array( 'Vendor', 'VendorAddress_*' ), - 'VendorRet VendorAddressBlock' => array( null, null ), - 'VendorRet VendorAddressBlock *' => array( 'Vendor', 'VendorAddressBlock_*' ), - 'VendorRet VendorTypeRef' => array( null, null ), - 'VendorRet VendorTypeRef *' => array( 'Vendor', 'VendorType_*' ), - 'VendorRet TermsRef' => array( null, null ), - 'VendorRet TermsRef *' => array( 'Vendor', 'Terms_*' ), - 'VendorRet BillingRateRef' => array( null, null ), - 'VendorRet BillingRateRef *' => array( 'Vendor', 'BillingRate_*' ), - 'VendorRet DataExtRet' => array( null, null ), - 'VendorRet DataExtRet *' => array( 'DataExt', '*' ), + 'UnitOfMeasureSetRet BaseUnit' => array( null, null ), + 'UnitOfMeasureSetRet BaseUnit *' => array( 'UnitOfMeasureSet', 'BaseUnit_*' ), + 'UnitOfMeasureSetRet RelatedUnit' => array( null, null ), + 'UnitOfMeasureSetRet RelatedUnit *' => array( 'UnitOfMeasureSet_RelatedUnit', '*' ), + 'UnitOfMeasureSetRet DefaultUnit' => array( null, null ), + 'UnitOfMeasureSetRet DefaultUnit *' => array( 'UnitOfMeasureSet_DefaultUnit', '*' ), + 'UnitOfMeasureSetRet *' => array( 'UnitOfMeasureSet', '*' ), + + 'VehicleRet' => array( 'Vehicle', null ), + 'VehicleRet Desc' => array( 'Vehicle', 'Descrip' ), + + 'VehicleRet *' => array( 'Vehicle', '*' ), + + 'VehicleMileageRet' => array( 'VehicleMileage', null ), + 'VehicleMileageRet VehicleRef' => array( null, null ), + 'VehicleMileageRet VehicleRef *' => array( 'VehicleMileage', 'Vehicle_*' ), + 'VehicleMileageRet CustomerRef' => array( null, null ), + 'VehicleMileageRet CustomerRef *' => array( 'VehicleMileage', 'Customer_*' ), + 'VehicleMileageRet ItemRef' => array( null, null ), + 'VehicleMileageRet ItemRef *' => array( 'VehicleMileage', 'Item_*' ), + 'VehicleMileageRet ClassRef' => array( null, null ), + 'VehicleMileageRet ClassRef *' => array( 'VehicleMileage', 'Class_*' ), + 'VehicleMileageRet *' => array( 'VehicleMileage', '*' ), + + 'VendorRet' => array( 'Vendor', null ), + 'VendorRet VendorAddress' => array( null, null ), + 'VendorRet VendorAddress *' => array( 'Vendor', 'VendorAddress_*' ), + 'VendorRet VendorAddressBlock' => array( null, null ), + 'VendorRet VendorAddressBlock *' => array( 'Vendor', 'VendorAddressBlock_*' ), + 'VendorRet VendorTypeRef' => array( null, null ), + 'VendorRet VendorTypeRef *' => array( 'Vendor', 'VendorType_*' ), + 'VendorRet TermsRef' => array( null, null ), + 'VendorRet TermsRef *' => array( 'Vendor', 'Terms_*' ), + 'VendorRet BillingRateRef' => array( null, null ), + 'VendorRet BillingRateRef *' => array( 'Vendor', 'BillingRate_*' ), + 'VendorRet DataExtRet' => array( null, null ), + 'VendorRet DataExtRet *' => array( 'DataExt', '*' ), 'VendorRet *' => array( 'Vendor', '*' ), - + 'VendorCreditRet' => array( 'VendorCredit', null, ), - 'VendorCreditRet VendorRef' => array( null, null ), - 'VendorCreditRet VendorRef *' => array( 'VendorCredit', 'Vendor_*' ), - 'VendorCreditRet APAccountRef' => array( null, null ), - 'VendorCreditRet APAccountRef *' => array( 'VendorCredit', 'APAccount_*' ), - - 'VendorCreditRet LinkedTxn' => array( null, null ), + 'VendorCreditRet VendorRef' => array( null, null ), + 'VendorCreditRet VendorRef *' => array( 'VendorCredit', 'Vendor_*' ), + 'VendorCreditRet APAccountRef' => array( null, null ), + 'VendorCreditRet APAccountRef *' => array( 'VendorCredit', 'APAccount_*' ), + + 'VendorCreditRet LinkedTxn' => array( null, null ), 'VendorCreditRet LinkedTxn TxnID' => array( 'VendorCredit_LinkedTxn', 'ToTxnID' ), - 'VendorCreditRet LinkedTxn *' => array( 'VendorCredit_LinkedTxn', '*' ), - - 'VendorCreditRet ExpenseLineRet' => array( null, null ), - 'VendorCreditRet ExpenseLineRet AccountRef' => array( null, null ), - 'VendorCreditRet ExpenseLineRet AccountRef *' => array( 'VendorCredit_ExpenseLine', 'Account_*' ), - 'VendorCreditRet ExpenseLineRet CustomerRef' => array( null, null ), - 'VendorCreditRet ExpenseLineRet CustomerRef *' => array( 'VendorCredit_ExpenseLine', 'Customer_*' ), - 'VendorCreditRet ExpenseLineRet ClassRef' => array( null, null ), - 'VendorCreditRet ExpenseLineRet ClassRef *' => array( 'VendorCredit_ExpenseLine', 'Class_*' ), - 'VendorCreditRet ExpenseLineRet *' => array( 'VendorCredit_ExpenseLine', '*' ), - + 'VendorCreditRet LinkedTxn *' => array( 'VendorCredit_LinkedTxn', '*' ), + + 'VendorCreditRet ExpenseLineRet' => array( null, null ), + 'VendorCreditRet ExpenseLineRet AccountRef' => array( null, null ), + 'VendorCreditRet ExpenseLineRet AccountRef *' => array( 'VendorCredit_ExpenseLine', 'Account_*' ), + 'VendorCreditRet ExpenseLineRet CustomerRef' => array( null, null ), + 'VendorCreditRet ExpenseLineRet CustomerRef *' => array( 'VendorCredit_ExpenseLine', 'Customer_*' ), + 'VendorCreditRet ExpenseLineRet ClassRef' => array( null, null ), + 'VendorCreditRet ExpenseLineRet ClassRef *' => array( 'VendorCredit_ExpenseLine', 'Class_*' ), + 'VendorCreditRet ExpenseLineRet *' => array( 'VendorCredit_ExpenseLine', '*' ), + 'VendorCreditRet ItemLineRet' => array( null, null ), - 'VendorCreditRet ItemLineRet Desc' => array( 'VendorCredit_ItemLine', 'Descrip' ), - 'VendorCreditRet ItemLineRet ItemRef' => array( null, null ), - 'VendorCreditRet ItemLineRet ItemRef *' => array( 'VendorCredit_ItemLine', 'Item_*' ), - 'VendorCreditRet ItemLineRet OverrideUOMSetRef' => array( null, null ), - 'VendorCreditRet ItemLineRet OverrideUOMSetRef *' => array( 'VendorCredit_ItemLine', 'OverrideUOMSet_*' ), - 'VendorCreditRet ItemLineRet CustomerRef' => array( null, null ), - 'VendorCreditRet ItemLineRet CustomerRef *' => array( 'VendorCredit_ItemLine', 'Customer_*' ), - 'VendorCreditRet ItemLineRet ClassRef' => array( null, null ), - 'VendorCreditRet ItemLineRet ClassRef *' => array( 'VendorCredit_ItemLine', 'Class_*' ), - 'VendorCreditRet ItemLineRet *' => array( 'VendorCredit_ItemLine', '*' ), - + 'VendorCreditRet ItemLineRet Desc' => array( 'VendorCredit_ItemLine', 'Descrip' ), + 'VendorCreditRet ItemLineRet ItemRef' => array( null, null ), + 'VendorCreditRet ItemLineRet ItemRef *' => array( 'VendorCredit_ItemLine', 'Item_*' ), + 'VendorCreditRet ItemLineRet OverrideUOMSetRef' => array( null, null ), + 'VendorCreditRet ItemLineRet OverrideUOMSetRef *' => array( 'VendorCredit_ItemLine', 'OverrideUOMSet_*' ), + 'VendorCreditRet ItemLineRet CustomerRef' => array( null, null ), + 'VendorCreditRet ItemLineRet CustomerRef *' => array( 'VendorCredit_ItemLine', 'Customer_*' ), + 'VendorCreditRet ItemLineRet ClassRef' => array( null, null ), + 'VendorCreditRet ItemLineRet ClassRef *' => array( 'VendorCredit_ItemLine', 'Class_*' ), + 'VendorCreditRet ItemLineRet *' => array( 'VendorCredit_ItemLine', '*' ), + 'VendorCreditRet ItemGroupLineRet' => array( null, null ), - 'VendorCreditRet ItemGroupLineRet Desc' => array( 'VendorCredit_ItemGroupLine', 'Descrip' ), - 'VendorCreditRet ItemGroupLineRet ItemGroupRef' => array( null, null ), - 'VendorCreditRet ItemGroupLineRet ItemGroupRef *' => array( 'VendorCredit_ItemGroupLine', 'ItemGroup_*' ), - 'VendorCreditRet ItemGroupLineRet OverrideUOMSetRef' => array( null, null ), - 'VendorCreditRet ItemGroupLineRet OverrideUOMSetRef *' => array( 'VendorCredit_ItemGroupLine', 'OverrideUOMSet_*' ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet' => array( null, null ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet ItemRef' => array( null, null ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet ItemRef *' => array( 'VendorCredit_ItemGroupLine_ItemLine', 'Item_*' ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet Desc' => array( 'VendorCredit_ItemGroupLine_ItemLine', 'Descrip' ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef' => array( null, null ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef *' => array( 'VendorCredit_ItemGroupLine_ItemLine', 'OverrideUOMSet_*' ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet CustomerRef' => array( null, null ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet CustomerRef *' => array( 'VendorCredit_ItemGroupLine_ItemLine', 'Customer_*' ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet ClassRef' => array( null, null ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet ClassRef *' => array( 'VendorCredit_ItemGroupLine_ItemLine', 'Class_*' ), - 'VendorCreditRet ItemGroupLineRet ItemLineRet *' => array( 'VendorCredit_ItemGroupLine_ItemLine', '*' ), - 'VendorCreditRet ItemGroupLineRet *' => array( 'VendorCredit_ItemGroupLine', '*' ), - - 'VendorCreditRet DataExtRet' => array( null, null ), - 'VendorCreditRet DataExtRet *' => array( 'DataExt', '*' ), - 'VendorCreditRet *' => array( 'VendorCredit', '*' ), - - 'VendorTypeRet' => array( 'VendorType', null ), - 'VendorTypeRet ParentRef' => array( null, null ), - 'VendorTypeRet ParentRef *' => array( 'VendorType', 'Parent_*' ), - 'VendorTypeRet *' => array( 'VendorType', '*' ), - - 'WorkersCompCodeRet' => array( 'WorkersCompCode', null ), - 'WorkersCompCodeRet Desc' => array( 'WorkersCompCode', 'Descrip' ), - 'WorkersCompCodeRet RateHistory' => array( null, null ), - 'WorkersCompCodeRet RateHistory *' => array( 'WorkersCompCode_RateHistory', '*' ), - 'WorkersCompCodeRet *' => array( 'WorkersCompCode', '*' ), + 'VendorCreditRet ItemGroupLineRet Desc' => array( 'VendorCredit_ItemGroupLine', 'Descrip' ), + 'VendorCreditRet ItemGroupLineRet ItemGroupRef' => array( null, null ), + 'VendorCreditRet ItemGroupLineRet ItemGroupRef *' => array( 'VendorCredit_ItemGroupLine', 'ItemGroup_*' ), + 'VendorCreditRet ItemGroupLineRet OverrideUOMSetRef' => array( null, null ), + 'VendorCreditRet ItemGroupLineRet OverrideUOMSetRef *' => array( 'VendorCredit_ItemGroupLine', 'OverrideUOMSet_*' ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet' => array( null, null ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet ItemRef' => array( null, null ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet ItemRef *' => array( 'VendorCredit_ItemGroupLine_ItemLine', 'Item_*' ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet Desc' => array( 'VendorCredit_ItemGroupLine_ItemLine', 'Descrip' ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef' => array( null, null ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet OverrideUOMSetRef *' => array( 'VendorCredit_ItemGroupLine_ItemLine', 'OverrideUOMSet_*' ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet CustomerRef' => array( null, null ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet CustomerRef *' => array( 'VendorCredit_ItemGroupLine_ItemLine', 'Customer_*' ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet ClassRef' => array( null, null ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet ClassRef *' => array( 'VendorCredit_ItemGroupLine_ItemLine', 'Class_*' ), + 'VendorCreditRet ItemGroupLineRet ItemLineRet *' => array( 'VendorCredit_ItemGroupLine_ItemLine', '*' ), + 'VendorCreditRet ItemGroupLineRet *' => array( 'VendorCredit_ItemGroupLine', '*' ), + + 'VendorCreditRet DataExtRet' => array( null, null ), + 'VendorCreditRet DataExtRet *' => array( 'DataExt', '*' ), + 'VendorCreditRet *' => array( 'VendorCredit', '*' ), + + 'VendorTypeRet' => array( 'VendorType', null ), + 'VendorTypeRet ParentRef' => array( null, null ), + 'VendorTypeRet ParentRef *' => array( 'VendorType', 'Parent_*' ), + 'VendorTypeRet *' => array( 'VendorType', '*' ), + + 'WorkersCompCodeRet' => array( 'WorkersCompCode', null ), + 'WorkersCompCodeRet Desc' => array( 'WorkersCompCode', 'Descrip' ), + 'WorkersCompCodeRet RateHistory' => array( null, null ), + 'WorkersCompCodeRet RateHistory *' => array( 'WorkersCompCode_RateHistory', '*' ), + 'WorkersCompCodeRet *' => array( 'WorkersCompCode', '*' ), ); - + static $sql_to_xml = null; if (is_null($sql_to_xml)) { @@ -2013,15 +2013,15 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, $sql_to_xml[$sql[0] . '.' . $sql[1]] = $xml; } } - + // Mapping of: // XPATH => array( - // array( table => extra field ), - // array( another table => another extra field ), + // array( table => extra field ), + // array( another table => another extra field ), static $xml_to_sql_others = array( 'AccountRet TaxLineInfoRet' => array( array( 'Account_TaxLineInfo', 'Account_ListID'), - array( 'Account_TaxLineInfo', 'Account_FullName' ), + array( 'Account_TaxLineInfo', 'Account_FullName' ), ), 'AccountRet DataExtRet' => array( array( 'DataExt', 'EntityType' ), @@ -2029,219 +2029,219 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, array( 'DataExt', 'Entity_ListID' ), array( 'DataExt', 'Txn_TxnID' ), ), - 'BillingRateRet BillingRatePerItemRet' => array( + 'BillingRateRet BillingRatePerItemRet' => array( array( 'BillingRate_BillingRatePerItem', 'BillingRate_ListID' ), - array( 'BillingRate_BillingRatePerItem', 'BillingRate_FullName' ), + array( 'BillingRate_BillingRatePerItem', 'BillingRate_FullName' ), ), 'BillPaymentCheckRet' => array( - array( 'BillPaymentCheck', 'ExchangeRate' ), - array( 'BillPaymentCheck', 'AmountInHomeCurrency' ), - ), - 'BillPaymentCheckRet AppliedToTxnRet' => array( + array( 'BillPaymentCheck', 'ExchangeRate' ), + array( 'BillPaymentCheck', 'AmountInHomeCurrency' ), + ), + 'BillPaymentCheckRet AppliedToTxnRet' => array( array( 'BillPaymentCheck_AppliedToTxn', 'FromTxnID' ), - array( 'BillPaymentCheck_AppliedToTxn', 'BillPaymentCheck_TxnID' ), + array( 'BillPaymentCheck_AppliedToTxn', 'BillPaymentCheck_TxnID' ), ), - 'BillPaymentCreditCardRet AppliedToTxnRet' => array( + 'BillPaymentCreditCardRet AppliedToTxnRet' => array( array( 'BillPaymentCreditCard_AppliedToTxn', 'FromTxnID' ), - array( 'BillPaymentCreditCard_AppliedToTxn', 'BillPaymentCreditCard_TxnID' ), + array( 'BillPaymentCreditCard_AppliedToTxn', 'BillPaymentCreditCard_TxnID' ), ), 'BillRet' => array( array( 'Bill', 'Tax1Total' ), array( 'Bill', 'Tax2Total' ), - //array( 'Bill', 'ExchangeRate' ), + //array( 'Bill', 'ExchangeRate' ), ), - 'BillRet LinkedTxn' => array( + 'BillRet LinkedTxn' => array( array( 'Bill_LinkedTxn', 'FromTxnID' ), - array( 'Bill_LinkedTxn', 'Bill_TxnID' ), + array( 'Bill_LinkedTxn', 'Bill_TxnID' ), array( 'Bill_LinkedTxn', 'LinkType' ), - ), + ), 'BillRet ExpenseLineRet' => array( - array( 'Bill_ExpenseLine', 'Bill_TxnID' ), - array( 'Bill_ExpenseLine', 'SortOrder' ), + array( 'Bill_ExpenseLine', 'Bill_TxnID' ), + array( 'Bill_ExpenseLine', 'SortOrder' ), ), 'BillRet ItemLineRet' => array( - array( 'Bill_ItemLine', 'Bill_TxnID' ), - array( 'Bill_ItemLine', 'SortOrder' ), + array( 'Bill_ItemLine', 'Bill_TxnID' ), + array( 'Bill_ItemLine', 'SortOrder' ), ), 'BillRet ItemGroupLineRet' => array( - array( 'Bill_ItemGroupLine', 'Bill_TxnID' ), - array( 'Bill_ItemGroupLine', 'TxnLineID' ), - array( 'Bill_ItemGroupLine', 'SortOrder' ), + array( 'Bill_ItemGroupLine', 'Bill_TxnID' ), + array( 'Bill_ItemGroupLine', 'TxnLineID' ), + array( 'Bill_ItemGroupLine', 'SortOrder' ), ), 'BillRet ItemGroupLineRet ItemLineRet' => array( - array( 'Bill_ItemGroupLine_ItemLine', 'Bill_ItemGroupLine_TxnLineID' ), - array( 'Bill_ItemGroupLine_ItemLine', 'Bill_TxnID' ), - array( 'Bill_ItemGroupLine_ItemLine', 'SortOrder' ), + array( 'Bill_ItemGroupLine_ItemLine', 'Bill_ItemGroupLine_TxnLineID' ), + array( 'Bill_ItemGroupLine_ItemLine', 'Bill_TxnID' ), + array( 'Bill_ItemGroupLine_ItemLine', 'SortOrder' ), ), 'ChargeRet' => array( array( 'Charge', 'IsPaid' ), ), 'CheckRet ExpenseLineRet' => array( - array( 'Check_ExpenseLine', 'Check_TxnID' ), - array( 'Check_ExpenseLine', 'SortOrder' ), - ), + array( 'Check_ExpenseLine', 'Check_TxnID' ), + array( 'Check_ExpenseLine', 'SortOrder' ), + ), 'CheckRet ItemGroupLineRet' => array( - array( 'Check_ItemGroupLine', 'Check_TxnID' ), - array( 'Check_ItemGroupLine', 'SortOrder' ), - ), + array( 'Check_ItemGroupLine', 'Check_TxnID' ), + array( 'Check_ItemGroupLine', 'SortOrder' ), + ), 'CheckRet ItemGroupLineRet ItemLineRet' => array( - array( 'Check_ItemGroupLine_ItemLine', 'Check_TxnID' ), - array( 'Check_ItemGroupLine_ItemLine', 'Check_ItemGroupLine_TxnLineID' ), - array( 'Check_ItemGroupLine_ItemLine', 'SortOrder' ), - ), + array( 'Check_ItemGroupLine_ItemLine', 'Check_TxnID' ), + array( 'Check_ItemGroupLine_ItemLine', 'Check_ItemGroupLine_TxnLineID' ), + array( 'Check_ItemGroupLine_ItemLine', 'SortOrder' ), + ), 'CheckRet ItemLineRet' => array( - array( 'Check_ItemLine', 'Check_TxnID' ), - array( 'Check_ItemLine', 'SortOrder' ), - ), - 'CheckRet LinkedTxn' => array( + array( 'Check_ItemLine', 'Check_TxnID' ), + array( 'Check_ItemLine', 'SortOrder' ), + ), + 'CheckRet LinkedTxn' => array( array( 'Check_LinkedTxn', 'FromTxnID' ), - array( 'Check_LinkedTxn', 'Check_TxnID' ), + array( 'Check_LinkedTxn', 'Check_TxnID' ), array( 'Check_LinkedTxn', 'LinkType' ), - ), - 'CompanyRet SubscribedServices Service' => array( + ), + 'CompanyRet SubscribedServices Service' => array( array( 'Company_SubscribedServices_Service', 'Company_CompanyName' ), - ), - 'CreditCardChargeRet ExpenseLineRet' => array( + ), + 'CreditCardChargeRet ExpenseLineRet' => array( array( 'CreditCardCharge_ExpenseLine', 'CreditCardCharge_TxnID' ), - array( 'CreditCardCharge_ExpenseLine', 'SortOrder' ), - ), - 'CreditCardChargeRet ItemLineRet' => array( + array( 'CreditCardCharge_ExpenseLine', 'SortOrder' ), + ), + 'CreditCardChargeRet ItemLineRet' => array( array( 'CreditCardCharge_ItemLine', 'CreditCardCharge_TxnID' ), - array( 'CreditCardCharge_ItemLine', 'SortOrder' ), - ), - 'CreditCardChargeRet ItemGroupLineRet' => array( + array( 'CreditCardCharge_ItemLine', 'SortOrder' ), + ), + 'CreditCardChargeRet ItemGroupLineRet' => array( array( 'CreditCardCharge_ItemGroupLine', 'CreditCardCharge_TxnID' ), - array( 'CreditCardCharge_ItemGroupLine', 'SortOrder' ), - ), - 'CreditCardChargeRet ItemGroupLineRet ItemLineRet' => array( + array( 'CreditCardCharge_ItemGroupLine', 'SortOrder' ), + ), + 'CreditCardChargeRet ItemGroupLineRet ItemLineRet' => array( array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'CreditCardCharge_TxnID' ), array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'CreditCardCharge_ItemGroupLine_TxnLineID' ), - array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'SortOrder' ), - ), - 'CreditCardCreditRet ExpenseLineRet' => array( + array( 'CreditCardCharge_ItemGroupLine_ItemLine', 'SortOrder' ), + ), + 'CreditCardCreditRet ExpenseLineRet' => array( array( 'CreditCardCredit_ExpenseLine', 'CreditCardCredit_TxnID' ), - array( 'CreditCardCredit_ExpenseLine', 'SortOrder' ), - ), - 'CreditCardCreditRet ItemLineRet' => array( + array( 'CreditCardCredit_ExpenseLine', 'SortOrder' ), + ), + 'CreditCardCreditRet ItemLineRet' => array( array( 'CreditCardCredit_ItemLine', 'CreditCardCredit_TxnID' ), - array( 'CreditCardCredit_ItemLine', 'SortOrder' ), - ), - 'CreditCardCreditRet ItemGroupLineRet' => array( + array( 'CreditCardCredit_ItemLine', 'SortOrder' ), + ), + 'CreditCardCreditRet ItemGroupLineRet' => array( array( 'CreditCardCredit_ItemGroupLine', 'CreditCardCredit_TxnID' ), - array( 'CreditCardCredit_ItemGroupLine', 'SortOrder' ), - ), - 'CreditCardCreditRet ItemGroupLineRet ItemLineRet' => array( + array( 'CreditCardCredit_ItemGroupLine', 'SortOrder' ), + ), + 'CreditCardCreditRet ItemGroupLineRet ItemLineRet' => array( array( 'CreditCardCredit_ItemGroupLine_ItemLine', 'CreditCardCredit_TxnID' ), array( 'CreditCardCredit_ItemGroupLine_ItemLine', 'CreditCardCredit_ItemGroupLine_TxnLineID' ), - array( 'CreditCardCredit_ItemGroupLine_ItemLine', 'SortOrder' ), - ), - 'CreditMemoRet CreditMemoLineRet' => array( + array( 'CreditCardCredit_ItemGroupLine_ItemLine', 'SortOrder' ), + ), + 'CreditMemoRet CreditMemoLineRet' => array( array( 'CreditMemo_CreditMemoLine', 'CreditMemo_TxnID' ), - array( 'CreditMemo_CreditMemoLine', 'SortOrder' ), - ), - 'CreditMemoRet CreditMemoLineGroupRet' => array( + array( 'CreditMemo_CreditMemoLine', 'SortOrder' ), + ), + 'CreditMemoRet CreditMemoLineGroupRet' => array( array( 'CreditMemo_CreditMemoLineGroup', 'CreditMemo_TxnID' ), - array( 'CreditMemo_CreditMemoLineGroup', 'SortOrder' ), - ), - 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet' => array( + array( 'CreditMemo_CreditMemoLineGroup', 'SortOrder' ), + ), + 'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet' => array( array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'CreditMemo_TxnID' ), array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'CreditMemo_CreditMemoLineGroup_TxnLineID' ), - array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'SortOrder' ), - ), - 'CreditMemoRet LinkedTxn' => array( + array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', 'SortOrder' ), + ), + 'CreditMemoRet LinkedTxn' => array( array( 'CreditMemo_LinkedTxn', 'FromTxnID' ), - array( 'CreditMemo_LinkedTxn', 'CreditMemo_TxnID' ), + array( 'CreditMemo_LinkedTxn', 'CreditMemo_TxnID' ), array( 'CreditMemo_LinkedTxn', 'LinkType' ), ), 'DataExtDefRet AssignToObject' => array( array( 'DataExtDef_AssignToObject', 'DataExtDef_OwnerID' ), - array( 'DataExtDef_AssignToObject', 'DataExtDef_DataExtName' ), + array( 'DataExtDef_AssignToObject', 'DataExtDef_DataExtName' ), ), - 'DepositRet DepositLineRet' => array( + 'DepositRet DepositLineRet' => array( array( 'Deposit_DepositLine', 'Deposit_TxnID' ), - array( 'Deposit_DepositLine', 'SortOrder' ), - ), - 'EmployeeRet EmployeePayrollInfo Earnings' => array( + array( 'Deposit_DepositLine', 'SortOrder' ), + ), + 'EmployeeRet EmployeePayrollInfo Earnings' => array( array( 'Employee_Earnings', 'Employee_ListID' ), - ), + ), 'EstimateRet EstimateLineRet' => array( - array( 'Estimate_EstimateLine', 'Estimate_TxnID' ), - array( 'Estimate_EstimateLine', 'SortOrder' ), + array( 'Estimate_EstimateLine', 'Estimate_TxnID' ), + array( 'Estimate_EstimateLine', 'SortOrder' ), ), 'EstimateRet EstimateLineGroupRet' => array( - array( 'Estimate_EstimateLineGroup', 'Estimate_TxnID' ), - array( 'Estimate_EstimateLineGroup', 'SortOrder' ), + array( 'Estimate_EstimateLineGroup', 'Estimate_TxnID' ), + array( 'Estimate_EstimateLineGroup', 'SortOrder' ), ), 'EstimateRet EstimateLineGroupRet EstimateLineRet' => array( - array( 'Estimate_EstimateLineGroup_EstimateLine', 'Estimate_TxnID' ), - array( 'Estimate_EstimateLineGroup_EstimateLine', 'Estimate_EstimateLineGroup_TxnLineID' ), - array( 'Estimate_EstimateLineGroup_EstimateLine', 'SortOrder' ), + array( 'Estimate_EstimateLineGroup_EstimateLine', 'Estimate_TxnID' ), + array( 'Estimate_EstimateLineGroup_EstimateLine', 'Estimate_EstimateLineGroup_TxnLineID' ), + array( 'Estimate_EstimateLineGroup_EstimateLine', 'SortOrder' ), ), 'EstimateRet LinkedTxn' => array( array( 'Estimate_LinkedTxn', 'FromTxnID' ), - array( 'Estimate_LinkedTxn', 'Estimate_TxnID' ), + array( 'Estimate_LinkedTxn', 'Estimate_TxnID' ), array( 'Estimate_LinkedTxn', 'LinkType' ), - ), + ), 'InventoryAdjustmentRet InventoryAdjustmentLineRet' => array( - array( 'InventoryAdjustment_InventoryAdjustmentLine', 'InventoryAdjustment_TxnID' ), - array( 'InventoryAdjustment_InventoryAdjustmentLine', 'SortOrder' ), - + array( 'InventoryAdjustment_InventoryAdjustmentLine', 'InventoryAdjustment_TxnID' ), + array( 'InventoryAdjustment_InventoryAdjustmentLine', 'SortOrder' ), + /* - array( 'InventoryAdjustment_InventoryAdjustmentLine', 'QuantityAdjustment_NewQuantity' ), - array( 'InventoryAdjustment_InventoryAdjustmentLine', 'QuantityAdjustment_QuantityDifference' ), - - array( 'InventoryAdjustment_InventoryAdjustmentLine', 'ValueAdjustment_NewQuantity' ), - array( 'InventoryAdjustment_InventoryAdjustmentLine', 'ValueAdjustment_QuantityDifference' ), - array( 'InventoryAdjustment_InventoryAdjustmentLine', 'ValueAdjustment_NewValue' ), - array( 'InventoryAdjustment_InventoryAdjustmentLine', 'ValueAdjustment_ValueDifference' ), + array( 'InventoryAdjustment_InventoryAdjustmentLine', 'QuantityAdjustment_NewQuantity' ), + array( 'InventoryAdjustment_InventoryAdjustmentLine', 'QuantityAdjustment_QuantityDifference' ), + + array( 'InventoryAdjustment_InventoryAdjustmentLine', 'ValueAdjustment_NewQuantity' ), + array( 'InventoryAdjustment_InventoryAdjustmentLine', 'ValueAdjustment_QuantityDifference' ), + array( 'InventoryAdjustment_InventoryAdjustmentLine', 'ValueAdjustment_NewValue' ), + array( 'InventoryAdjustment_InventoryAdjustmentLine', 'ValueAdjustment_ValueDifference' ), */ - ), + ), 'InvoiceRet InvoiceLineRet' => array( - array( 'Invoice_InvoiceLine', 'Invoice_TxnID' ), - array( 'Invoice_InvoiceLine', 'SortOrder' ), + array( 'Invoice_InvoiceLine', 'Invoice_TxnID' ), + array( 'Invoice_InvoiceLine', 'SortOrder' ), ), 'InvoiceRet InvoiceLineGroupRet' => array( - array( 'Invoice_InvoiceLineGroup', 'Invoice_TxnID' ), - array( 'Invoice_InvoiceLineGroup', 'SortOrder' ), + array( 'Invoice_InvoiceLineGroup', 'Invoice_TxnID' ), + array( 'Invoice_InvoiceLineGroup', 'SortOrder' ), ), 'InvoiceRet InvoiceLineGroupRet InvoiceLineRet' => array( - array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'Invoice_TxnID' ), - array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'Invoice_InvoiceLineGroup_TxnLineID' ), - array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'SortOrder' ), + array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'Invoice_TxnID' ), + array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'Invoice_InvoiceLineGroup_TxnLineID' ), + array( 'Invoice_InvoiceLineGroup_InvoiceLine', 'SortOrder' ), ), 'InvoiceRet LinkedTxn' => array( array( 'Invoice_LinkedTxn', 'FromTxnID' ), - array( 'Invoice_LinkedTxn', 'Invoice_TxnID' ), + array( 'Invoice_LinkedTxn', 'Invoice_TxnID' ), array( 'Invoice_LinkedTxn', 'LinkType' ), ), 'ItemGroupRet ItemGroupLine' => array( - array( 'ItemGroup_ItemGroupLine', 'ItemGroup_ListID' ), - array( 'ItemGroup_ItemGroupLine', 'SortOrder' ), + array( 'ItemGroup_ItemGroupLine', 'ItemGroup_ListID' ), + array( 'ItemGroup_ItemGroupLine', 'SortOrder' ), ), 'ItemInventoryAssemblyRet ItemInventoryAssemblyLine' => array( - array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', 'ItemInventoryAssembly_ListID' ), - array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', 'SortOrder' ), + array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', 'ItemInventoryAssembly_ListID' ), + array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', 'SortOrder' ), ), 'ItemReceiptRet ExpenseLineRet' => array( - array( 'ItemReceipt_ExpenseLine', 'ItemReceipt_TxnID' ), - array( 'ItemReceipt_ExpenseLine', 'SortOrder' ), + array( 'ItemReceipt_ExpenseLine', 'ItemReceipt_TxnID' ), + array( 'ItemReceipt_ExpenseLine', 'SortOrder' ), ), 'ItemReceiptRet ItemLineRet' => array( - array( 'ItemReceipt_ItemLine', 'ItemReceipt_TxnID' ), - array( 'ItemReceipt_ItemLine', 'SortOrder' ), + array( 'ItemReceipt_ItemLine', 'ItemReceipt_TxnID' ), + array( 'ItemReceipt_ItemLine', 'SortOrder' ), ), 'ItemReceiptRet ItemGroupLineRet' => array( - array( 'ItemReceipt_ItemGroupLine', 'ItemReceipt_TxnID' ), - array( 'ItemReceipt_ItemGroupLine', 'SortOrder' ), + array( 'ItemReceipt_ItemGroupLine', 'ItemReceipt_TxnID' ), + array( 'ItemReceipt_ItemGroupLine', 'SortOrder' ), ), 'ItemReceiptRet ItemGroupLineRet ItemLineRet' => array( - array( 'ItemReceipt_ItemGroupLine_ItemLine', 'ItemReceipt_TxnID' ), - array( 'ItemReceipt_ItemGroupLine_ItemLine', 'ItemReceipt_ItemGroupLine_TxnLineID' ), - array( 'ItemReceipt_ItemGroupLine_ItemLine', 'SortOrder' ), + array( 'ItemReceipt_ItemGroupLine_ItemLine', 'ItemReceipt_TxnID' ), + array( 'ItemReceipt_ItemGroupLine_ItemLine', 'ItemReceipt_ItemGroupLine_TxnLineID' ), + array( 'ItemReceipt_ItemGroupLine_ItemLine', 'SortOrder' ), ), 'ItemReceiptRet LinkedTxn' => array( array( 'ItemReceipt_LinkedTxn', 'FromTxnID' ), - array( 'ItemReceipt_LinkedTxn', 'ItemReceipt_TxnID' ), + array( 'ItemReceipt_LinkedTxn', 'ItemReceipt_TxnID' ), array( 'ItemReceipt_LinkedTxn', 'LinkType' ), ), 'ItemSalesTaxGroupRet ItemSalesTaxRef' => array( @@ -2249,7 +2249,7 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, ), 'JournalEntryRet JournalDebitLine' => array( array( 'JournalEntry_JournalDebitLine', 'JournalEntry_TxnID' ), - array( 'JournalEntry_JournalDebitLine', 'SortOrder' ), + array( 'JournalEntry_JournalDebitLine', 'SortOrder' ), ), 'JournalEntryRet JournalCreditLine' => array( array( 'JournalEntry_JournalCreditLine', 'JournalEntry_TxnID' ), @@ -2318,21 +2318,21 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, array( 'UnitOfMeasureSet_DefaultUnit', 'UnitOfMeasureSet_ListID' ), ), 'VendorCreditRet ExpenseLineRet' => array( - array( 'VendorCredit_ExpenseLine', 'VendorCredit_TxnID' ), - array( 'VendorCredit_ExpenseLine', 'SortOrder' ), + array( 'VendorCredit_ExpenseLine', 'VendorCredit_TxnID' ), + array( 'VendorCredit_ExpenseLine', 'SortOrder' ), ), 'VendorCreditRet ItemLineRet' => array( - array( 'VendorCredit_ItemLine', 'VendorCredit_TxnID' ), - array( 'VendorCredit_ItemLine', 'SortOrder' ), + array( 'VendorCredit_ItemLine', 'VendorCredit_TxnID' ), + array( 'VendorCredit_ItemLine', 'SortOrder' ), ), 'VendorCreditRet ItemGroupLineRet' => array( - array( 'VendorCredit_ItemGroupLine', 'VendorCredit_TxnID' ), - array( 'VendorCredit_ItemGroupLine', 'SortOrder' ), + array( 'VendorCredit_ItemGroupLine', 'VendorCredit_TxnID' ), + array( 'VendorCredit_ItemGroupLine', 'SortOrder' ), ), 'VendorCreditRet ItemGroupLineRet ItemLineRet' => array( - array( 'VendorCredit_ItemGroupLine_ItemLine', 'VendorCredit_TxnID' ), - array( 'VendorCredit_ItemGroupLine_ItemLine', 'VendorCredit_ItemGroupLine_TxnLineID' ), - array( 'VendorCredit_ItemGroupLine_ItemLine', 'SortOrder' ), + array( 'VendorCredit_ItemGroupLine_ItemLine', 'VendorCredit_TxnID' ), + array( 'VendorCredit_ItemGroupLine_ItemLine', 'VendorCredit_ItemGroupLine_TxnLineID' ), + array( 'VendorCredit_ItemGroupLine_ItemLine', 'SortOrder' ), ), 'VendorCreditRet LinkedTxn' => array( array( 'VendorCredit_LinkedTxn', 'FromTxnID' ), @@ -2340,18 +2340,18 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, array( 'VendorCredit_LinkedTxn', 'LinkType' ), ), 'WorkersCompCodeRet RateHistory' => array( - array( 'WorkersCompCode_RateHistory', 'WorkersCompCode_ListID' ), + array( 'WorkersCompCode_RateHistory', 'WorkersCompCode_ListID' ), ), - ); - + ); + if ($mode == QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL) // map the QuickBooks XML tags to SQL schema { $path = trim($path_or_tablefield); $spaces = substr_count($path, ' '); $map = array( null, null ); // default map - - // @todo Can we break out of this big loop early to improve performance? - + + // @todo Can we break out of this big loop early to improve performance? + foreach ($xml_to_sql as $pattern => $table_and_field) { if (substr_count($pattern, ' ') == $spaces and // check path depth @@ -2363,9 +2363,9 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, { if ($vpart == '*') { - $xml = explode(' ', $path); + $xml = explode(' ', $path); $match = $xml[$kpart]; - + /* if ($options['uppercase_tables']) { @@ -2375,7 +2375,7 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, { $table_and_field[0] = strtolower($table_and_field[0]); } - + if ($options['uppercase_fields']) { $table_and_field[1] = strtoupper($table_and_field[1]); @@ -2385,14 +2385,14 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, $table_and_field[1] = strtolower($table_and_field[1]); } */ - + $map = array( - $table_and_field[0], - str_replace('*', $match, $table_and_field[1]), + $table_and_field[0], + str_replace('*', $match, $table_and_field[1]), ); - + QuickBooks_SQL_Schema::_applyOptions($map, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $options); - + break; } } @@ -2402,7 +2402,7 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, { $map = $table_and_field; QuickBooks_SQL_Schema::_applyOptions($map, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $options); - + if (isset($xml_to_sql_others[$pattern])) { $others = $xml_to_sql_others[$pattern]; @@ -2412,11 +2412,11 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, $others[$key] = $other; } } - + break; } } - + //print_r($map); //print_r($others); } @@ -2424,10 +2424,10 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, { $tablefield = trim($path_or_tablefield); $tablefield_compare = strtolower($tablefield); - + $underscores = substr_count($tablefield, '_'); $map = ''; - + foreach ($sql_to_xml as $pattern => $path) { $pattern_compare = strtolower($pattern); @@ -2436,28 +2436,28 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, $map = $path; break; } - else if (substr_count($pattern, '_') == $underscores and + else if (substr_count($pattern, '_') == $underscores and false !== strpos($pattern, '*')) { if (QuickBooks_SQL_Schema::_fnmatch($pattern_compare, $tablefield_compare)) { $tmp_pattern = explode('.', $pattern); - if (count($tmp_pattern) == 2 and + if (count($tmp_pattern) == 2 and $tmp_pattern[1] == '*') { // table.* pattern $tmp_tablefield = explode('.', $tablefield); - + $map = str_replace('*', $tmp_tablefield[1], $path); break; } else { //print('matched ' . $tablefield . ' to ' . $path . ' (' . $pattern . ') ' . "\n"); - + $pos = strpos($pattern, '*'); $field = substr($tablefield, $pos); - + $map = str_replace('*', $field, $path); break; } @@ -2466,25 +2466,25 @@ static public function mapToSchema($path_or_tablefield, $mode, &$map, &$others, } } } - + static protected function _applyOptions(&$path_or_arrtablefield, $mode, $options) { $applied = 0; - + $defaults = array( - 'desc_to_descrip' => true, - 'uppercase_tables' => false, - 'lowercase_tables' => true, + 'desc_to_descrip' => true, + 'uppercase_tables' => false, + 'lowercase_tables' => true, 'uppercase_fields' => false, 'lowercase_fields' => false, - 'prepend_parent' => true, + 'prepend_parent' => true, ); - + $options = array_merge($defaults, $options); - + if ($mode == QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL) { - + if ($options['uppercase_tables']) { $path_or_arrtablefield[0] = strtoupper($path_or_arrtablefield[0]); @@ -2495,7 +2495,7 @@ static protected function _applyOptions(&$path_or_arrtablefield, $mode, $options $path_or_arrtablefield[0] = strtolower($path_or_arrtablefield[0]); $applied++; } - + if ($options['uppercase_fields']) { $path_or_arrtablefield[1] = strtoupper($path_or_arrtablefield[1]); @@ -2506,37 +2506,37 @@ static protected function _applyOptions(&$path_or_arrtablefield, $mode, $options $path_or_arrtablefield[1] = strtolower($path_or_arrtablefield[1]); $applied++; } - + return $applied; } else { - + } } - + /** * Map a qbXML XML field type to it's SQL type definition - * + * * @param string $object_type * @param string $field * @param string $qb_type - * @return array + * @return array * @TODO We case the input to lowercase, and so the array has to be in lowercase. Is there a better way to do this? */ static public function mapFieldToSQLDefinition($object_type, $field, $qb_type) { // array( type, length, default ) - + static $overrides = array( 'billpaymentcheck' => array( - 'istobeprinted' => array( null, null, 'null' ), - ), + 'istobeprinted' => array( null, null, 'null' ), + ), 'check' => array( - 'istobeprinted' => array( null, null, 'null' ), + 'istobeprinted' => array( null, null, 'null' ), ), 'creditmemo' => array( - 'ispending' => array( null, null, 'null' ), + 'ispending' => array( null, null, 'null' ), ), 'creditmemo_creditmemoline' => array( 'creditcardtxninputinfo_expirationmonth' => array( null, null, 'null' ), @@ -2544,26 +2544,26 @@ static public function mapFieldToSQLDefinition($object_type, $field, $qb_type) 'creditcardtxnresultinfo_resultcode' => array( null, null, 'null' ), 'creditcardtxnresultinfo_paymentgroupingcode' => array( null, null, 'null' ), 'creditcardtxnresultinfo_txnauthorizationstamp' => array( null, null, 'null' ), - ), + ), 'creditmemo_creditmemolinegroup_creditmemoline' => array( 'creditcardtxninfo_creditcardtxninputinfo_expirationmonth' => array( null, null, 'null' ), 'creditcardtxninfo_creditcardtxninputinfo_expirationyear' => array( null, null, 'null' ), 'creditcardtxninfo_creditcardtxnresultinfo_resultcode' => array( null, null, 'null' ), 'creditcardtxninfo_creditcardtxnresultinfo_paymentgroupingcode' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxnresultinfo_txnauthorizationstamp' => array( null, null, 'null' ), - ), + 'creditcardtxninfo_creditcardtxnresultinfo_txnauthorizationstamp' => array( null, null, 'null' ), + ), 'customer' => array( 'creditcardinfo_expirationmonth' => array( null, null, 'null' ), 'creditcardinfo_expirationyear' => array( null, null, 'null' ) ), 'employee' => array( 'employeepayrollinfo_clearearnings' => array( null, null, 'null' ), - 'employeepayrollinfo_isusingtimedatatocreatepaychecks' => array( null, null, 'null' ), + 'employeepayrollinfo_isusingtimedatatocreatepaychecks' => array( null, null, 'null' ), 'employeepayrollinfo_sickhours_isresettinghourseachnewyear' => array( null, null, 'null' ), 'employeepayrollinfo_vacationhours_isresettinghourseachnewyear' => array( null, null, 'null' ), - ), + ), 'estimate' => array( - 'istobeemailed' => array( null, null, 'null' ), + 'istobeemailed' => array( null, null, 'null' ), ), 'estimate_estimateline' => array( 'quantity' => array( null, null, 'null' ), @@ -2590,157 +2590,157 @@ static public function mapFieldToSQLDefinition($object_type, $field, $qb_type) 'ispending' => array( null, null, 'null' ), 'isfinancecharge' => array( null, null, 'null' ), 'ispaid' => array( null, null, 'null' ), - 'istobeprinted' => array( null, null, 'null' ), - 'istobeemailed' => array( null, null, 'null' ), - ), + 'istobeprinted' => array( null, null, 'null' ), + 'istobeemailed' => array( null, null, 'null' ), + ), 'invoice_invoiceline' => array( 'quantity' => array( null, null, 'null' ) ), 'purchaseorder' => array( 'ismanuallyclosed' => array( null, null, 'null' ), 'isfullyreceived' => array( null, null, 'null' ), - 'istobeprinted' => array( null, null, 'null' ), - 'istobeemailed' => array( null, null, 'null' ), - ), + 'istobeprinted' => array( null, null, 'null' ), + 'istobeemailed' => array( null, null, 'null' ), + ), 'purchaseorder_purchaseorderline' => array( 'ismanuallyclosed' => array( null, null, 'null' ), 'receivedquantity' => array( null, null, 'null' ), 'quantity' => array( null, null, 'null' ) ), 'receivepayment' => array( - 'creditcardtxninfo_creditcardtxninputinfo_expirationmonth' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxninputinfo_expirationyear' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxnresultinfo_resultcode' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxnresultinfo_paymentgroupingcode' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxnresultinfo_txnauthorizationstamp' => array( null, null, 'null' ), - ), + 'creditcardtxninfo_creditcardtxninputinfo_expirationmonth' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxninputinfo_expirationyear' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxnresultinfo_resultcode' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxnresultinfo_paymentgroupingcode' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxnresultinfo_txnauthorizationstamp' => array( null, null, 'null' ), + ), 'salesorder' => array( 'ismanuallyclosed' => array( null, null, 'null' ), 'isfullyinvoiced' => array( null, null, 'null' ), - 'istobeprinted' => array( null, null, 'null' ), - 'istobeemailed' => array( null, null, 'null' ), - ), + 'istobeprinted' => array( null, null, 'null' ), + 'istobeemailed' => array( null, null, 'null' ), + ), 'salesorder_salesorderline' => array( 'quantity' => array( null, null, 'null' ), 'invoiced' => array( null, null, 'null' ), 'ismanuallyclosed' => array( null, null, 'null' ), ), 'salesreceipt' => array( - 'ispending' => array( null, null, 'null' ), - 'istobeprinted' => array( null, null, 'null' ), - 'istobeemailed' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxninputinfo_expirationmonth' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxninputinfo_expirationyear' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxnresultinfo_resultcode' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxnresultinfo_paymentgroupingcode' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxnresultinfo_txnauthorizationstamp' => array( null, null, 'null' ), + 'ispending' => array( null, null, 'null' ), + 'istobeprinted' => array( null, null, 'null' ), + 'istobeemailed' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxninputinfo_expirationmonth' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxninputinfo_expirationyear' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxnresultinfo_resultcode' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxnresultinfo_paymentgroupingcode' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxnresultinfo_txnauthorizationstamp' => array( null, null, 'null' ), ), 'salesreceipt_salesreceiptline' => array( 'quantity' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxninputinfo_expirationmonth' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxninputinfo_expirationyear' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxnresultinfo_resultcode' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxnresultinfo_paymentgroupingcode' => array( null, null, 'null' ), - 'creditcardtxninfo_creditcardtxnresultinfo_txnauthorizationstamp' => array( null, null, 'null' ), - ), + 'creditcardtxninfo_creditcardtxninputinfo_expirationmonth' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxninputinfo_expirationyear' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxnresultinfo_resultcode' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxnresultinfo_paymentgroupingcode' => array( null, null, 'null' ), + 'creditcardtxninfo_creditcardtxnresultinfo_txnauthorizationstamp' => array( null, null, 'null' ), + ), ); - + $object_type = strtolower($object_type); $field = strtolower($field); - + $type = QUICKBOOKS_DRIVER_SQL_VARCHAR; $length = 32; $default = null; - + // Default mappings for types switch ($qb_type) { case 'AMTTYPE': - + $type = QUICKBOOKS_DRIVER_SQL_DECIMAL; $length = '10,2'; $default = 'null'; - + break; case 'PRICETYPE': - + $type = QUICKBOOKS_DRIVER_SQL_DECIMAL; $length = '13,5'; $default = 'null'; - + break; case 'PERCENTTYPE': - + $type = QUICKBOOKS_DRIVER_SQL_DECIMAL; $length = '12,5'; $default = 'null'; - + break; case 'DATETYPE': - + $type = QUICKBOOKS_DRIVER_SQL_DATE; $length = null; $default = 'null'; - + break; case 'DATETIMETYPE': - + $type = QUICKBOOKS_DRIVER_SQL_DATETIME; $length = null; $default = 'null'; - + break; case 'BOOLTYPE': - + $type = QUICKBOOKS_DRIVER_SQL_BOOLEAN; $length = null; $default = false; - + break; case 'INTTYPE': - + $type = QUICKBOOKS_DRIVER_SQL_INTEGER; $length = null; $default = 0; - + break; case 'QUANTYPE': - + $type = QUICKBOOKS_DRIVER_SQL_DECIMAL; $length = '12,5'; $default = 0; - + break; case 'IDTYPE': - + $type = QUICKBOOKS_DRIVER_SQL_VARCHAR; $length = 40; $default = 'null'; - + break; case 'ENUMTYPE': - + $type = QUICKBOOKS_DRIVER_SQL_VARCHAR; $length = 40; $default = 'null'; - + break; case 'STRTYPE': default: - + //print('casting: ' . $object_type . "\n"); //print('field: ' . $field . "\n"); - + $x = str_repeat('x', 10000); $length = strlen(QuickBooks_Cast::cast($object_type, $field, $x)); - + // All FullName and *_FullName fields should be VARCHAR(255) so we can add INDEXes to them - if ($length > 255 and + if ($length > 255 and strtolower(substr($field, -8)) == 'fullname') { $length = 255; } - + // If the length is really long, put it in a TEXT field instead of a VARCHAR if ($length > 255) { @@ -2750,27 +2750,27 @@ static public function mapFieldToSQLDefinition($object_type, $field, $qb_type) { $type = QUICKBOOKS_DRIVER_SQL_VARCHAR; } - + $default = 'null'; - + if ($field == 'EditSequence') { $length = 16; } else if (isset($overrides[$object_type][$field])) { - // - + // + if (!is_null($overrides[$object_type][$field][2])) { $default = $overrides[$object_type][$field][2]; } } - + break; } - - // Overrides for mappings that couldn't be done automatically + + // Overrides for mappings that couldn't be done automatically /*switch ($object_type) { case 'invoice': @@ -2780,20 +2780,20 @@ static public function mapFieldToSQLDefinition($object_type, $field, $qb_type) break; } default: - + switch ($field) { case 'isactive': $default = true; break; default: - + break; } - + break; }*/ - + // @TODO -- Keith, is this a good way to accomplish converting all txnid/listid fields to varchar? ~Garrett if (stripos($field, 'listid') !== false or stripos($field, 'txnid') !== false) { @@ -2807,25 +2807,25 @@ static public function mapFieldToSQLDefinition($object_type, $field, $qb_type) $length = null; $default = 0; } - + if (isset($overrides[$object_type][$field])) { if (!is_null($overrides[$object_type][$field][0])) { $type = $overrides[$object_type][$field][0]; } - + if (!is_null($overrides[$object_type][$field][1])) { $length = $overrides[$object_type][$field][1]; } - + if (!is_null($overrides[$object_type][$field][2])) { $default = $overrides[$object_type][$field][2]; } } - + return array( $type, $length, $default ); } } diff --git a/QuickBooks/Status/Report.php b/QuickBooks/Status/Report.php index 21a7412d..c63fa5d5 100755 --- a/QuickBooks/Status/Report.php +++ b/QuickBooks/Status/Report.php @@ -1,211 +1,211 @@ - * + * * @package QuickBooks * @subpackage Error */ -// +// QuickBooks_Loader::load('/QuickBooks/Driver/Factory.php'); -// +// QuickBooks_Loader::load('/QuickBooks/Utilities.php'); -// +// QuickBooks_Loader::load('/QuickBooks/SQL/Schema.php'); /** - * - * + * + * * */ class QuickBooks_Status_Report { const MODE_QUEUE_ERRORS = 'queue-errors'; - + const MODE_QUEUE_RECORDS = 'queue-records'; - + const MODE_MIRROR_ERRORS = 'mirror-errors'; - + const MODE_MIRROR_RECORDS = 'mirror-records'; - + const STATUS_OK = 'OK'; - + const STATUS_NOTICE = 'Notice'; - + const STATUS_CAUTION = 'Caution'; - + const STATUS_WARNING = 'Warning'; - + const STATUS_DANGER = 'Danger'; - + const STATUS_UNKNOWN = 'Unknown'; - + protected $_driver; - + public function __construct($dsn, $config = array()) { $this->_driver = QuickBooks_Driver_Factory::create($dsn, $config); } - + /** - * - * - * + * + * + * */ public function create($mode, $user = null, $date_from = null, $date_to = null, $fetch_full_record = false, $restrict = array()) { $Driver = $this->_driver; - + if (!$user) { $user = $Driver->authDefault(); } - + switch ($mode) { case QuickBooks_Status_Report::MODE_QUEUE_ERRORS: case QuickBooks_Status_Report::MODE_QUEUE_RECORDS: return $this->_createForQueue($mode, $user, $date_from, $date_to, $fetch_full_record, $restrict); case QuickBooks_Status_Report::MODE_MIRROR_ERRORS: - case QuickBooks_Status_Report::MODE_MIRROR_RECORDS: + case QuickBooks_Status_Report::MODE_MIRROR_RECORDS: return $this->_createForMirror($mode, $user, $date_from, $date_to, $fetch_full_record, $restrict); default: return false; } } - + /** * Get information about the status of a connection to QuickBooks - * + * * The returned array will look something like this: *
-	 * Array ( 
+	 * Array (
 	 * 	[0] => danger 					// This is a constant, one of the QuickBooks_Status_Report::STATUS_* constants
-	 * 	[1] => ERROR: A connection has not been made in 54 days, 1 hours and 46 minutes! Contact support to get this issue resolved! 
+	 * 	[1] => ERROR: A connection has not been made in 54 days, 1 hours and 46 minutes! Contact support to get this issue resolved!
 	 * 	[2] => 2010-03-19 12:26:41 		// This is the last time the given user logged in
-	 * 	[3] => 2010-03-19 12:26:41 		// This is the last time the given user performed any action 
+	 * 	[3] => 2010-03-19 12:26:41 		// This is the last time the given user performed any action
 	 * )
 	 * 
- * + * * @param string $user * @param array $levels - * @return array An array of status information + * @return array An array of status information */ public function status($user = null, $levels = array()) { $Driver = $this->_driver; - + if (!$user) { $user = $Driver->authDefault(); } - + if (!count($levels)) { $levels = array( - 60 * 60 * 12 => array( QuickBooks_Status_Report::STATUS_NOTICE, 'Notice: A connection has not been made in %d days, %d hours and %d minutes.' ), + 60 * 60 * 12 => array( QuickBooks_Status_Report::STATUS_NOTICE, 'Notice: A connection has not been made in %d days, %d hours and %d minutes.' ), 60 * 60 * 24 => array( QuickBooks_Status_Report::STATUS_CAUTION, 'Caution: A connection has not been made in %d days, %d hours and %d minutes.' ), 60 * 60 * 36 => array( QuickBooks_Status_Report::STATUS_WARNING, 'Warning! A connection has not been made in %d days, %d hours and %d minutes.' ), - 60 * 60 * 48 => array( QuickBooks_Status_Report::STATUS_DANGER, 'DANGER! A connection has not been made in %d days, %d hours and %d minutes! Contact support to get this issue resolved!' ), + 60 * 60 * 48 => array( QuickBooks_Status_Report::STATUS_DANGER, 'DANGER! A connection has not been made in %d days, %d hours and %d minutes! Contact support to get this issue resolved!' ), ); } - + if (!isset($levels[0])) { $levels[0] = array( QuickBooks_Status_Report::STATUS_OK, 'Status is OK. Last connection made %d days, %d hours, and %d minutes ago.' ); } - + if (!isset($levels[-1])) { $levels[-1] = array( QuickBooks_Status_Report::STATUS_UNKNOWN, 'Status is unknown.'); } - + //print_r($levels); - + // Find the status from the ticket table $last = $Driver->authLast($user); if (is_array($last)) { krsort($levels); - + $ago = time() - strtotime($last[1]); - + $days = floor($ago / (60 * 60 * 24)); $hours = floor(($ago - ($days * 60 * 60 * 24)) / 60.0 / 60.0); $minutes = max(1, floor(($ago - ($days * 60 * 60 * 24) - ($hours * 60 * 60)) / 60.0)); - + $retr = null; - + foreach ($levels as $level => $tuple) { if ($level <= 0) { continue; } - + if ($ago > $level) { $retr = $tuple; break; } } - + if (!$retr) { $retr = $levels[0]; } - + $retr[1] = sprintf($retr[1], $days, $hours, $minutes); - + $retr[] = $last[0]; $retr[] = $last[1]; - + return $retr; } - + return $levels[-1]; } - + public function connection($type, $user = null) { - + } - + protected function &_createForQueue($mode, $user, $date_from, $date_to, $fetch_full_record, $restrict) { $Driver = $this->_driver; - + $report = array(); - + $list = $Driver->queueReport($user, $date_from, $date_to); - + $statuses = array( - QUICKBOOKS_STATUS_QUEUED => 'Queued', - QUICKBOOKS_STATUS_SUCCESS => 'Successfully processed', - QUICKBOOKS_STATUS_ERROR => 'Error', - QUICKBOOKS_STATUS_PROCESSING => 'Currently being processed', - QUICKBOOKS_STATUS_HANDLED => 'An error occurred, but the error was handled', - QUICKBOOKS_STATUS_CANCELLED => 'Cancelled', - QUICKBOOKS_STATUS_REMOVED => 'Removed from queue', - QUICKBOOKS_STATUS_NOOP => 'No operation occurred', + QUICKBOOKS_STATUS_QUEUED => 'Queued', + QUICKBOOKS_STATUS_SUCCESS => 'Successfully processed', + QUICKBOOKS_STATUS_ERROR => 'Error', + QUICKBOOKS_STATUS_PROCESSING => 'Currently being processed', + QUICKBOOKS_STATUS_HANDLED => 'An error occurred, but the error was handled', + QUICKBOOKS_STATUS_CANCELLED => 'Cancelled', + QUICKBOOKS_STATUS_REMOVED => 'Removed from queue', + QUICKBOOKS_STATUS_NOOP => 'No operation occurred', ); foreach ($list as $key => $arr) { $errnum = ''; $errmsg = ''; - if ($arr['msg'] and + if ($arr['msg'] and $pos = strpos($arr['msg'], ':')) { $errnum = substr($arr['msg'], 0, $pos); @@ -216,74 +216,74 @@ protected function &_createForQueue($mode, $user, $date_from, $date_to, $fetch_f $errnum = '?'; $errmsg = $arr['msg']; } - + $record = array( - $arr['quickbooks_queue_id'], - $arr['qb_action'], - $arr['ident'], - $arr['priority'], - $statuses[$arr['qb_status']], - $errnum, - $errmsg, + $arr['quickbooks_queue_id'], + $arr['qb_action'], + $arr['ident'], + $arr['priority'], + $statuses[$arr['qb_status']], + $errnum, + $errmsg, QuickBooks_Status_Report::describe($errnum, $errmsg), - $arr['enqueue_datetime'], - $arr['dequeue_datetime'], + $arr['enqueue_datetime'], + $arr['dequeue_datetime'], ); - + $report[] = $record; } - + return $report; } - + /** - * - * - * + * + * + * */ protected function &_createForMirror($mode, $user, $date_from, $date_to, $fetch_full_record, $restrict) { $Driver = $this->_driver; - + $report = array(); - + $do_restrict = count($restrict) > 0; - + $actions = QuickBooks_Utilities::listActions('*IMPORT*'); //print_r($actions); //print_r($restrict); - + foreach ($actions as $action) { $object = QuickBooks_Utilities::actionToObject($action); - + //print('checking object [' . $object . ']' . "
"); - - if ($do_restrict and + + if ($do_restrict and !in_array($object, $restrict)) { continue; } - + //print('doing object: ' . $object . '
'); - + $pretty = $this->_prettyName($object); $report[$pretty] = array(); - - QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); - + + QuickBooks_SQL_Schema::mapPrimaryKey($object, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $table_and_field); + //print_r($table_and_field); - - if (!empty($table_and_field[0]) and + + if (!empty($table_and_field[0]) and !empty($table_and_field[1])) { $sql = " - SELECT + SELECT * - FROM - " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " + FROM + " . QUICKBOOKS_DRIVER_SQL_PREFIX_SQL . $table_and_field[0] . " WHERE "; - + if ($mode == QuickBooks_Status_Report::MODE_MIRROR_ERRORS) { $sql .= " LENGTH(" . QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_NUMBER . ") > 0 "; @@ -293,22 +293,22 @@ protected function &_createForMirror($mode, $user, $date_from, $date_to, $fetch_ $sql .= " 1 "; } - if ($timestamp = strtotime($date_from) and + if ($timestamp = strtotime($date_from) and $timestamp > 0) { $sql .= " AND TimeCreated >= '" . date('Y-m-d H:i:s', $timestamp) . "' "; } - - if ($timestamp = strtotime($date_to) and + + if ($timestamp = strtotime($date_to) and $timestamp > 0) { $sql .= " AND TimeCreated <= '" . date('Y-m-d H:i:s', $timestamp) . "' "; } - + $sql .= " ORDER BY qbsql_id DESC "; - + //print($sql); - + $errnum = 0; $errmsg = ''; $res = $Driver->query($sql, $errnum, $errmsg); @@ -319,7 +319,7 @@ protected function &_createForMirror($mode, $user, $date_from, $date_to, $fetch_ { $record = $arr; } - + if ($arr[QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_NUMBER]) { $details = QuickBooks_Status_Report::describe($arr[QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_NUMBER], $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_MESSAGE]); @@ -332,26 +332,26 @@ protected function &_createForMirror($mode, $user, $date_from, $date_to, $fetch_ { $details = 'Waiting to sync.'; } - + $report[$pretty][] = array( - $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID], - $this->_fetchSomeField($arr, array( 'ListID', 'TxnID' )), + $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ID], + $this->_fetchSomeField($arr, array( 'ListID', 'TxnID' )), $this->_fetchSomeField($arr, array( 'FullName', 'Name', 'RefNumber' )), - $this->_fetchSomeField($arr, array( 'TxnDate' )), + $this->_fetchSomeField($arr, array( 'TxnDate' )), $this->_fetchSomeField($arr, array( 'Customer_FullName', 'Vendor_FullName' )), - $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_NUMBER], - $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_MESSAGE], - $details, - $arr[QUICKBOOKS_DRIVER_SQL_FIELD_DEQUEUE_TIME], - $record, + $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_NUMBER], + $arr[QUICKBOOKS_DRIVER_SQL_FIELD_ERROR_MESSAGE], + $details, + $arr[QUICKBOOKS_DRIVER_SQL_FIELD_DEQUEUE_TIME], + $record, ); } } } - + return $report; } - + protected function _fetchSomeField($arr, $fields) { foreach ($fields as $field) @@ -361,18 +361,18 @@ protected function _fetchSomeField($arr, $fields) return $arr[$field]; } } - + return null; } - + /** - * + * * @todo This might be better suited to the Utilities class in case we want to use it somewhere else */ protected function _prettyName($constant) { //$constant = str_replace('Import', '', $constant); - + $strlen = strlen($constant); for ($i = 1; $i < $strlen; $i++) { @@ -382,18 +382,18 @@ protected function _prettyName($constant) $i = $i + 2; } } - + return $constant; } - + public function HTML($mode, $user = null, $date_from = null, $date_to = null, $fetch_full_record = false, $restrict = array(), $skip_empties = true) { $report = $this->create($mode, $user, $date_from, $date_to, $fetch_full_record, $restrict); - + switch ($mode) { case QuickBooks_Status_Report::MODE_MIRROR_RECORDS: - case QuickBooks_Status_Report::MODE_MIRROR_ERRORS: + case QuickBooks_Status_Report::MODE_MIRROR_ERRORS: return $this->_htmlForMirror($report, $skip_empties); case QuickBooks_Status_Report::MODE_QUEUE_RECORDS: case QuickBooks_Status_Report::MODE_QUEUE_ERRORS: @@ -402,11 +402,11 @@ public function HTML($mode, $user = null, $date_from = null, $date_to = null, $f return ''; } } - + protected function _htmlForQueue($report) { $html = ''; - + $html .= '' . QUICKBOOKS_CRLF; $html .= ' ' . QUICKBOOKS_CRLF; $html .= ' ' . QUICKBOOKS_CRLF; @@ -423,7 +423,7 @@ protected function _htmlForQueue($report) $html .= ' ' . QUICKBOOKS_CRLF; $html .= ' ' . QUICKBOOKS_CRLF; $html .= ' ' . QUICKBOOKS_CRLF; - + foreach ($report as $record) { $html .= ' ' . QUICKBOOKS_CRLF; @@ -439,25 +439,25 @@ protected function _htmlForQueue($report) $html .= ' ' . QUICKBOOKS_CRLF; $html .= ' ' . QUICKBOOKS_CRLF; } - + $html .= ' ' . QUICKBOOKS_CRLF; $html .= '
' . $record[9] . '
' . QUICKBOOKS_CRLF; - + return $html; } - + protected function _htmlForMirror($report, $skip_empties) { $html = ''; - + foreach ($report as $type => $records) { - if ($skip_empties and + if ($skip_empties and !count($records)) { - continue; + continue; } - + $html .= '' . QUICKBOOKS_CRLF; $html .= ' ' . QUICKBOOKS_CRLF; $html .= ' ' . QUICKBOOKS_CRLF; @@ -476,7 +476,7 @@ protected function _htmlForMirror($report, $skip_empties) $html .= ' ' . QUICKBOOKS_CRLF; $html .= ' ' . QUICKBOOKS_CRLF; $html .= ' ' . QUICKBOOKS_CRLF; - + foreach ($records as $record) { $html .= ' ' . QUICKBOOKS_CRLF; @@ -491,39 +491,39 @@ protected function _htmlForMirror($report, $skip_empties) $html .= ' ' . QUICKBOOKS_CRLF; $html .= ' ' . QUICKBOOKS_CRLF; } - + $html .= ' ' . QUICKBOOKS_CRLF; $html .= '
' . $record[8] . '
' . QUICKBOOKS_CRLF; $html .= '
' . QUICKBOOKS_CRLF; } - + return $html; } - + public function XML($mode, $date_from = null, $date_to = null, $fetch_full_record = false, $restrict = array()) { - + } - + /** - * - * + * + * * @todo Make this better for error codes that get thrown for more than one different type of error. - * + * */ static public function describe($errcode, $errmsg) { static $errs = array( 3100 => array( - '*' => 'QuickBooks "Name" fields must be unique across all Customers, Vendors, Employees, and Other Names. Is there another Customer, Vendor, Employee, or Other Name with the same name as this record?', - ), + '*' => 'QuickBooks "Name" fields must be unique across all Customers, Vendors, Employees, and Other Names. Is there another Customer, Vendor, Employee, or Other Name with the same name as this record?', + ), ); - + if (isset($errs[$errcode])) { return $errs[$errcode]['*']; } - + return ''; } } \ No newline at end of file diff --git a/QuickBooks/UnitTest.php b/QuickBooks/UnitTest.php index 74dc1a35..0b3cd76d 100755 --- a/QuickBooks/UnitTest.php +++ b/QuickBooks/UnitTest.php @@ -2,10 +2,10 @@ /** * QuickBooks Unit-test framework - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks */ @@ -14,45 +14,45 @@ class QuickBooks_UnitTest { protected $__result; - + protected $__lastStatus; protected $__lastMessage; protected $__lastActual; protected $__lastExpected; - + public function __construct() { - + } - + final public function markTestSkipped() { - + } - + final public function markTestIncomplete() { - + } - + final public function run($print = true) { $all = true; $result = array(); - + // Call the custom setup method (connect to database, whatever else the test needs to do, etc.) $this->setUp(); - + $methods = get_class_methods($this); - + foreach ($methods as $method) { if (strtolower(substr($method, 0, 4)) == 'test') { $this->__clearLastStatus(); - + $this->$method(); - + if ($this->__getLastStatus()) { $result[] = new QuickBooks_UnitTest_Result($method, true, $this->__getLastExpected(), $this->__getLastActual()); @@ -60,30 +60,30 @@ final public function run($print = true) else { $result[] = new QuickBooks_UnitTest_Result($method, false, $this->__getLastExpected(), $this->__getLastActual(), $this->__getLastMessage()); - + $all = false; } } } - + // Call the custom teardown method (disconnect, etc.) $this->tearDown(); - + // Store results $this->__result = $result; - + if ($print) { $this->__print(); } - + return $all; } - + final protected function __print() { $class = get_class($this); - + foreach ($this->__result as $Result) { if ($Result->result()) @@ -98,122 +98,122 @@ final protected function __print() } } } - + /** - * - * + * + * */ final public function result($format = null) { - + } - + final protected function __clearLastStatus() { $this->__lastStatus = null; } - + final protected function __setLastStatus($status) { $this->__lastStatus = $status; } - + final protected function __getLastStatus() { return $this->__lastStatus; } - + final protected function __setLastMessage($msg) { $this->__lastMessage = $msg; } - + final protected function __getLastMessage() { return $this->__lastMessage; } - + final protected function __setLastError($errno) { $this->__lastError = $errno; } - + final protected function __getLastError() { return $this->__lastError; } - + final protected function __getLastActual() { return $this->__lastActual; } - + final protected function __getLastExpected() { return $this->__lastExpected; } - + final protected function __setLastActual($actual) { $this->__lastActual = $actual; } - + final protected function __setLastExpected($expected) { $this->__lastExpected = $expected; } - + final public function assertEquals($expected, $actual, $strict_types = false) { if (is_array($expected)) { - + } else if (is_object($expected)) { - + } else if ($strict_types) { $this->__setLastStatus($expected === $actual); } - + $this->__setLastStatus($expected == $actual); } - + final public function assertGreaterThan($expected, $actual) { $this->__setLastStatus($actual > $expected); } - + final public function assertLessThan($expected, $actual) { $this->__setLastStatus($actual < $expected); } - + final public function assertArrayIsEmpty($actual) { $this->__setLastExpected(array()); $this->__setLastActual($actual); - + $this->__setLastStatus(count($actual) == 0); } - + final public function assertIsNull($actual, $or_blank = false) { $this->__setLastExpected(null); $this->__setLastActual($actual); - + $this->__setLastStatus( - is_null($actual) or + is_null($actual) or ($or_blank and strlen($actual) == 0)); } - + final public function assertTrue($actual, $strict = false) { $this->__setLastExpected(true); $this->__setLastActual($actual); - + if ($strict) { $this->__setLastStatus($actual === true); @@ -223,12 +223,12 @@ final public function assertTrue($actual, $strict = false) $this->__setLastStatus($actual == true); } } - + public function setUp() { return; } - + public function tearDown() { return; diff --git a/QuickBooks/UnitTest/Result.php b/QuickBooks/UnitTest/Result.php index 24b707e8..9b75f511 100755 --- a/QuickBooks/UnitTest/Result.php +++ b/QuickBooks/UnitTest/Result.php @@ -1,11 +1,11 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage UnitTest */ @@ -17,37 +17,37 @@ class QuickBooks_UnitTest_Result protected $_msg; protected $_actual; protected $_expected; - + public function __construct($name, $result, $expected, $actual, $msg = null) { $this->_name = $name; $this->_result = $result; $this->_msg = $msg; - + $this->_expected = $expected; $this->_actual = $actual; } - + public function name() { return $this->_name; } - + public function result() { return $this->_result; } - + public function message() { return $this->_msg; } - + public function expected() { return $this->_expected; } - + public function actual() { return $this->_actual; diff --git a/QuickBooks/User.php b/QuickBooks/User.php index e742e01d..ddfeb8b4 100644 --- a/QuickBooks/User.php +++ b/QuickBooks/User.php @@ -4,6 +4,6 @@ class QuickBooks_User { public function __construct() { - + } } \ No newline at end of file diff --git a/QuickBooks/Utilities.php b/QuickBooks/Utilities.php index c90ece51..847e05dc 100755 --- a/QuickBooks/Utilities.php +++ b/QuickBooks/Utilities.php @@ -2,16 +2,16 @@ /** * Various QuickBooks related utility methods - * + * * Copyright (c) 2010-04-16 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks */ @@ -22,40 +22,40 @@ /** * Various QuickBooks related utilities - * + * * All methods are static */ class QuickBooks_Utilities { /** - * Parse a DSN style connection string - * + * Parse a DSN style connection string + * * @param string $dsn The DSN connection string * @param string $part If you want just a specific part of the string, choose which part here: scheme, host, port, user, pass, query, fragment - * @return mixed An array or a string, depending on if you wanted the whole thing parsed or just a piece of it + * @return mixed An array or a string, depending on if you wanted the whole thing parsed or just a piece of it */ static public function parseDSN($dsn, $defaults = array(), $part = null) { // Some DSN strings look like this: filesystem:///path/to/file // parse_url() will not parse this *unless* we provide some sort of hostname (in this case, null) $dsn = str_replace(':///', '://null/', $dsn); - + $defaults = array_merge(array( - 'scheme' => '', - 'host' => '', - 'port' => 0, - 'user' => '', + 'scheme' => '', + 'host' => '', + 'port' => 0, + 'user' => '', 'pass' => '', - 'path' => '', + 'path' => '', 'query' => '', - 'fragment' => '', + 'fragment' => '', ), $defaults); - + $parse = array_merge($defaults, parse_url($dsn)); - + $parse['user'] = urldecode($parse['user']); $parse['pass'] = urldecode($parse['pass']); - + if (is_null($part)) { return $parse; @@ -64,43 +64,43 @@ static public function parseDSN($dsn, $defaults = array(), $part = null) { return $parse[$part]; } - + return null; } - + /** - * Mask certain sensitive data from occuring in output/logs - * + * Mask certain sensitive data from occuring in output/logs + * * @param string $message * @returns string */ static public function mask($message) { $masks = array( - '', - '', - '', - '', - '', - '', + '', + '', + '', + '', + '', + '', ); - + foreach ($masks as $key) { if (substr($key, 0, 1) == '<') { // It's an XML tag $contents = QuickBooks_Utilities::_extractTagContents(trim($key, '<> '), $message); - + $masked = str_repeat('x', min(strlen($contents), 12)) . substr($contents, 12); - + $message = str_replace($key . $contents . ' ') . '>', $key . $masked . ' ') . '>', $message); } } - + return $message; } - + /** * @deprecated Use QuickBooks_XML::extractTagContents() instead */ @@ -109,10 +109,10 @@ static protected function _extractTagContents($tag, $data) $tmp = QuickBooks_XML::extractTagContents($tag, $data); return $tmp; } - + /** - * Write a message to the log (via the back-end driver) - * + * Write a message to the log (via the back-end driver) + * * @param string $dsn The DSN connection string to the logger * @param string $msg The message to log * @param integer $lvl The message log level @@ -121,64 +121,64 @@ static protected function _extractTagContents($tag, $data) static public function log($dsn, $msg, $lvl = QUICKBOOKS_LOG_NORMAL) { $Driver = QuickBooks_Utilities::driverFactory($dsn); - + // Mask important data $msg = QuickBooks_Utilities::mask($msg); - + return $Driver->log($msg, null, $lvl); } - + /** - * + * * 1 2 3 * -3 -2 -1 * domainParts('tools.consolibyte.com'); * 0 1 2 - * + * */ /*static public function domainParts($domain, $part = null) { $tmp = explode('.', $domain); - + $part = (int) $part; - if ($part > 0 and + if ($part > 0 and isset($tmp[$part - 1])) { return $tmp[$part - 1]; } - else if ($part < 0 and + else if ($part < 0 and isset($tmp[count($tmp) + $part])) { return $tmp[count($tmp) + $part]; } - + return $tmp; }*/ /** * Extract the requestID attribute from an XML stream - * + * * @param string $xml The XML stream to look for a requestID attribute in * @return mixed The request ID */ static public function extractRequestID($xml) { $look = array( - + ); - - if (false !== ($start = strpos($xml, ' requestID="')) and + + if (false !== ($start = strpos($xml, ' requestID="')) and false !== ($end = strpos($xml, '"', $start + 12))) { return substr($xml, $start + 12, $end - $start - 12); } - + return false; } - + /** * Create a requestID string from action and ident parts - * + * * @param string $action * @param mixed $ident * @return string @@ -187,10 +187,10 @@ static public function constructRequestID($action, $ident) { return base64_encode($action . '|' . $ident); } - + /** * Parse a requestID string into it's action and ident parts - * + * * @param string $requestID * @param string $action * @param mixed $ident @@ -199,42 +199,42 @@ static public function constructRequestID($action, $ident) static public function parseRequestID($requestID, &$action, &$ident) { $tmp = explode('|', base64_decode($requestID)); - + if (count($tmp) == 2) { $action = $tmp[0]; $ident = $tmp[1]; - + return true; } - + $action = null; $ident = null; - + return false; } - + /** * Create an instance of a driver class from a DSN connection string *or* a connection resource - * + * * You can actually pass in *either* a DSN-style connection string OR an already connected database resource * - mysql://user:pass@localhost:port/database * - $var (Resource ID #XYZ, valid MySQL connection resource) - * + * * @param mixed $dsn_or_conn A DSN-style connection string or a PHP resource * @param array $config An array of configuration options for the driver * @param array $hooks An array mapping hooks to user-defined hook functions to call - * @param integer $log_level + * @param integer $log_level * @return object A class instance, a child class of QuickBooks_Driver - */ + */ static public function driverFactory($dsn_or_conn, $config = array(), $hooks = array(), $log_level = QUICKBOOKS_LOG_NORMAL) { return QuickBooks_Driver_Factory::create($dsn_or_conn, $config, $hooks, $log_level); } /** - * - * + * + * * @param string $module * @param string $key * @param mixed $value @@ -248,13 +248,13 @@ static public function configWrite($dsn, $user, $module, $key, $value, $type = n { return $Driver->configWrite($user, $module, $key, $value, $type, $opts); } - + return false; } - + /** - * - * + * + * * @param string $module * @param string $key * @param string $type @@ -267,13 +267,13 @@ static public function configRead($dsn, $user, $module, $key, &$type, &$opts) { return $Driver->configRead($user, $module, $key, $type, $opts); } - + return false; } - + /** * Convert a time interval to a number of seconds (i.e.: "1 hour" => 600, "3 hours" => 1800, "2 minutes" => 120, etc.) - * + * * @param mixed $interval * @return integer */ @@ -281,22 +281,22 @@ static public function intervalToSeconds($interval) { if ( (string) (int) $interval === (string) $interval) { - // It's already an integer... + // It's already an integer... } else { $intervals = array( - 'second' => 1, - 'minute' => 60, - 'hour' => 60 * 60, - 'day' => 60 * 60 * 24, - 'week' => 60 * 60 * 24 * 7, - 'month' => 60 * 60 * 24 * 30, + 'second' => 1, + 'minute' => 60, + 'hour' => 60 * 60, + 'day' => 60 * 60 * 24, + 'week' => 60 * 60 * 24 * 7, + 'month' => 60 * 60 * 24 * 30, 'year' => 60 * 60 * 24 * 365, ); - + $interval = strtolower(trim($interval)); - + $justletters = true; $count = strlen($interval); for ($i = 0; $i < $count; $i++) @@ -306,12 +306,12 @@ static public function intervalToSeconds($interval) $justletters = false; } } - + if ($justletters) { $interval = '1 ' . $interval; } - + foreach ($intervals as $str => $multiplier) { if (false !== strpos($interval, ' ' . $str)) @@ -320,14 +320,14 @@ static public function intervalToSeconds($interval) } } } - + // If it's not an integer yet, cast it! return (int) $interval; } - + /** * Check if a given IP address lies within a CIDR range - * + * * @param string $remoteaddr The remote machine's IP address (example: 192.168.1.4) * @param string $CIDR A CIDR network address (example: 192.168.0.0/24) * @return boolean @@ -335,39 +335,39 @@ static public function intervalToSeconds($interval) static protected function _checkCIDR($remoteaddr, $CIDR) { $remoteaddr_long = ip2long($remoteaddr); - + list ($net, $mask) = split('/', $CIDR); $ip_net = ip2long($net); $ip_mask = ~((1 << (32 - $mask)) - 1); - + $remoteaddr_net = $remoteaddr_long & $ip_mask; - + return $remoteaddr_net == $ip_net; } /** * Check if a given remote address (IP address) is allowed based on allow and deny arrays - * + * * @param string $remoteaddr * @param array $allow * @param array $deny * @return boolean - */ + */ static public function checkRemoteAddress($remoteaddr, $arr_allow, $arr_deny) { $allowed = true; - + if (count($arr_allow)) { // only allow these addresses $allowed = false; - + foreach ($arr_allow as $allow) { if (false !== strpos($allow, '/')) { // CIDR notation - + if (QuickBooks_Utilities::_checkCIDR($remoteaddr, $allow)) { $allowed = true; @@ -377,7 +377,7 @@ static public function checkRemoteAddress($remoteaddr, $arr_allow, $arr_deny) else if (ereg('^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$', $allow)) { // IPv4 address - + if ($remoteaddr == $allow) { $allowed = true; @@ -385,13 +385,13 @@ static public function checkRemoteAddress($remoteaddr, $arr_allow, $arr_deny) } } } - + if (!$allowed) { return false; } } - + if (count($arr_deny)) { // do *not* allow these addresses @@ -400,7 +400,7 @@ static public function checkRemoteAddress($remoteaddr, $arr_allow, $arr_deny) if (false !== strpos($deny, '/')) { // CIDR notation - + if (QuickBooks_Utilities::_checkCIDR($remoteaddr, $deny)) { return false; @@ -409,7 +409,7 @@ static public function checkRemoteAddress($remoteaddr, $arr_allow, $arr_deny) else if (ereg('^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$', $deny)) { // IPv4 address - + if ($remoteaddr == $deny) { return false; @@ -417,32 +417,32 @@ static public function checkRemoteAddress($remoteaddr, $arr_allow, $arr_deny) } } } - + return $allowed; } - - + + /** * Create a user for the QuickBooks Web Connector SOAP server - * + * * @param string $dsn A DSN-style connection string for the back-end driver * @param string $username The username for the new user * @param string $password The password for the new user - * @param string $company_file - * @param string $wait_before_next_update - * @param string $min_run_every_n_seconds - * @return boolean + * @param string $company_file + * @param string $wait_before_next_update + * @param string $min_run_every_n_seconds + * @return boolean */ static public function createUser($dsn, $username, $password, $company_file = null, $wait_before_next_update = null, $min_run_every_n_seconds = null) { $driver = QuickBooks_Utilities::driverFactory($dsn); - + return $driver->authCreate($username, $password, $company_file, $wait_before_next_update, $min_run_every_n_seconds); } - + /** * Disable a user for the QuickBooks Web Connector SOAP server - * + * * @param string $dsn A DSN-style connection string * @param string $username The username for the user to disable * @return boolean @@ -450,13 +450,13 @@ static public function createUser($dsn, $username, $password, $company_file = nu static public function disableUser($dsn, $username) { $driver = QuickBooks_Utilities::driverFactory($dsn); - + return $driver->authDisable($username); } - + /** * Generate a unique hash from a bunch of variables - * + * * @param mixed $mixed1 * @param mixed $mixed2 * @param mixed $mixed3 @@ -468,10 +468,10 @@ static public function generateUniqueHash($mixed1, $mixed2 = null, $mixed3 = nul { return md5(serialize($mixed1) . serialize($mixed2) . serialize($mixed3) . serialize($mixed4) . serialize($mixed5)); } - + /** * Create a mapping between a QuickBooks object and an object in your own database/application - * + * * @param string $dsn * @param string $user * @param string $object_type @@ -482,13 +482,13 @@ static public function generateUniqueHash($mixed1, $mixed2 = null, $mixed3 = nul public static function createMapping($dsn, $user, $object_type, $TxnID_or_ListID, $app_ID, $editsequence = '') { $Driver = QuickBooks_Utilities::driverFactory($dsn); - + return $Driver->identMap($user, $object_type, $app_ID, $TxnID_or_ListID, $editsequence); } - + /** - * - * + * + * * @param string $dsn * @param string $user * @param string $object_type @@ -498,13 +498,13 @@ public static function createMapping($dsn, $user, $object_type, $TxnID_or_ListID public static function fetchApplicationID($dsn, $user, $object_type, $TxnID_or_ListID) { $Driver = QuickBooks_Utilities::driverFactory($dsn); - + $extra = null; return $Driver->identToApplication($user, $object_type, $TxnID_or_ListID, $extra); } - + /** - * + * */ public static function hasApplicationID($dsn, $user, $object_type, $TxnID_or_ListID) { @@ -512,60 +512,60 @@ public static function hasApplicationID($dsn, $user, $object_type, $TxnID_or_Lis { return true; } - + return false; } - + /** - * - * @param string $object_type A QuickBooks object-type constant, i.e.: QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_OBJECT_INVOICE, etc. + * + * @param string $object_type A QuickBooks object-type constant, i.e.: QUICKBOOKS_OBJECT_CUSTOMER, QUICKBOOKS_OBJECT_INVOICE, etc. * @param mixed $webapp_ID The unique ID or PRIMARY KEY of the object within your application * @return string A QuickBooks TxnID or ListID */ public static function fetchQuickbooksID($dsn, $user, $object_type, $webapp_ID) { $Driver = QuickBooks_Utilities::driverFactory($dsn); - + $editseq = null; $extra = null; return $Driver->identToQuickBooks($user, $object_type, $webapp_ID, $editseq, $extra); } - + /** - * - * - * + * + * + * */ public static function fetchQuickBooksEditSequence($dsn, $user, $object_type, $webapp_ID) { $Driver = QuickBooks_Utilities::driverFactory($dsn); - + $editseq = null; $extra = null; $Driver->identToQuickBooks($user, $object_type, $webapp_ID, $editseq, $extra); return $editseq; } - + /** * Fetches extra data stored along with the mapping of a QuickBooks ListID or TxnID to application primary key - * - * @param string $dsn The driver connection string + * + * @param string $dsn The driver connection string * @param string $user The QuickBooks username * @param string $object_type The object type (e.g. QUICKBOOKS_OBJECT_CUSTOMER, or QUICKBOOKS_OBJECT_INVOICE, etc.) - * @param mixed $webapp_ID The primary key for the record - * @return mixed Any extra data stored + * @param mixed $webapp_ID The primary key for the record + * @return mixed Any extra data stored */ public static function fetchQuickBooksExtra($dsn, $user, $object_type, $webapp_ID) { $Driver = QuickBooks_Utilities::driverFactory($dsn); - + $editseq = null; $extra = null; $Driver->identToQuickBooks($user, $object_type, $webapp_ID, $editseq, $extra); - + return $extra; } - + /** * Alias of {@link QuickBooks_Utilities::fetchQuickBooksEditSequence()} */ @@ -573,18 +573,18 @@ public static function fetchEditSequence($dsn, $user, $object_type, $webapp_ID) { return QuickBooks_Utilities::fetchQuickBooksEditSequence($dsn, $user, $object_type, $webapp_ID); } - + /** * Tell whether or not a given object has a ListID or TxnID associated with it - * + * * * Note * - * This function *does not* query QuickBooks, it only queries the internal - * mapping of QuickBooks IDs to PRIMARY KEYS. The mappings can be created - * with the {@link QuickBooks_Utilities::createMapping()} method and the API - * tries to automatically create the mapping when you add or update an - * object and provide a PRIMARY KEY when calling the ->add* or ->update* - * method. - * + * This function *does not* query QuickBooks, it only queries the internal + * mapping of QuickBooks IDs to PRIMARY KEYS. The mappings can be created + * with the {@link QuickBooks_Utilities::createMapping()} method and the API + * tries to automatically create the mapping when you add or update an + * object and provide a PRIMARY KEY when calling the ->add* or ->update* + * method. + * * @param string $object_type * @param mixed $app_ID * @return boolean @@ -595,16 +595,16 @@ public static function hasQuickBooksID($dsn, $user, $object_type, $app_ID) { return true; } - + return false; } - + /** * Initialize the backend driver - * - * Initialization should only be done once, and is used to take care of + * + * Initialization should only be done once, and is used to take care of * things like creating the database schema, etc. - * + * * @param string $dsn A DSN-style connection string * @param array $driver_options * @return boolean @@ -612,13 +612,13 @@ public static function hasQuickBooksID($dsn, $user, $object_type, $app_ID) static public function initialize($dsn, $driver_options = array(), $init_options = array()) { $Driver = QuickBooks_Utilities::driverFactory($dsn, $driver_options); - + return $Driver->initialize($init_options); } - + /** * Tell whether or not a driver has been initialized - * + * * @param string $dsn * @param array $driver_options * @return boolean @@ -626,30 +626,30 @@ static public function initialize($dsn, $driver_options = array(), $init_options static public function initialized($dsn, $driver_options = array()) { $Driver = QuickBooks_Utilities::driverFactory($dsn, $driver_options); - + return $Driver->initialized(); } - + /** - * - * + * + * */ static public function date($date = null) { if ($date) { - if (is_numeric($date) and + if (is_numeric($date) and strlen($date) > 6) { return date('Y-m-d', $date); } - + return date('Y-m-d', strtotime($date)); } - + return date('Y-m-d'); } - + /** * * @@ -659,21 +659,21 @@ static public function datetime($datetime = null) { if ($datetime) { - if (is_numeric($datetime) and + if (is_numeric($datetime) and strlen($datetime) > 6) { return date('Y-m-d', $datetime) . 'T' . date('H:i:s', $datetime); } - + return date('Y-m-d', strtotime($datetime)) . 'T' . date('H:i:s', strtotime($datetime)); } - + return date('Y-m-d') . 'T' . date('H:i:s'); } - + /** * Tell if a pattern matches a string or not (Windows-compatible version of www.php.net/fnmatch) - * + * * @param string $pattern * @param string $str * @return boolean @@ -684,17 +684,17 @@ static public function fnmatch($pattern, $str) { return fnmatch($pattern, $str, FNM_CASEFOLD); } - + $arr = array( - '\*' => '.*', + '\*' => '.*', '\?' => '.' ); return preg_match('#^' . strtr(preg_quote($pattern, '#'), $arr) . '$#i', $str); } - + /** * List all of the QuickBooks object types supported by the framework - * + * * @param string $filter * @param boolean $return_keys * @param boolean $order_for_mapping @@ -703,26 +703,26 @@ static public function fnmatch($pattern, $str) static public function listObjects($filter = null, $return_keys = false, $order_for_mapping = false) { static $cache = array(); - + $crunch = $filter . '[' . $return_keys . '[' . $order_for_mapping; - + if (isset($cache[$crunch])) { return $cache[$crunch]; } - + $constants = array(); - + foreach (get_defined_constants() as $constant => $value) { - if (substr($constant, 0, strlen('QUICKBOOKS_OBJECT_')) == 'QUICKBOOKS_OBJECT_' and + if (substr($constant, 0, strlen('QUICKBOOKS_OBJECT_')) == 'QUICKBOOKS_OBJECT_' and substr_count($constant, '_') == 2) { if (!$return_keys) { $constant = $value; } - + if ($filter) { if (QuickBooks_Utilities::fnmatch($filter, $constant)) @@ -736,7 +736,7 @@ static public function listObjects($filter = null, $return_keys = false, $order_ } } } - + if ($order_for_mapping) { // Sort with the very longest values first, to the shortest values last @@ -746,30 +746,30 @@ static public function listObjects($filter = null, $return_keys = false, $order_ { sort($constants); } - + $cache[$crunch] = $constants; - + return $constants; } - + /** * Convert a QuickBooks action to a QuickBooks object type (i.e.: QUICKBOOKS_ADD_CUSTOMER gets converted to QUICKBOOKS_OBJECT_CUSTOMER) - * + * * @param string $action * @return string */ static public function actionToObject($action) { static $cache = array(); - + if (isset($cache[$action])) { //print('returning cached [' . $action . ']' . "\n"); return $cache[$action]; } - + $types = QuickBooks_Utilities::listObjects(null, false, true); - + foreach ($types as $type) { if (QuickBooks_Utilities::fnmatch('*' . $type . '*', $action)) @@ -779,34 +779,34 @@ static public function actionToObject($action) return $type; } } - + return null; } /** * Generate a GUID - * + * * Note: This is used for tickets too, so it *must* be a RANDOM GUID! - * + * * @param boolean $surround * @return string */ static public function GUID() { $guid = sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x', - mt_rand(0, 65535), mt_rand(0, 65535), - mt_rand(0, 65535), - mt_rand(0, 4095), + mt_rand(0, 65535), mt_rand(0, 65535), + mt_rand(0, 65535), + mt_rand(0, 4095), bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) - ); - - return $guid; - } - + ); + + return $guid; + } + /** * Try to guess the queueing priority for this action - * + * * @param string $action The action you're trying to guess for * @param string $dependency If the action depends on another action (i.e. a DataExtAdd for a CustomerAdd) you can pass the dependency here * @return integer A best guess at the proper priority @@ -815,254 +815,254 @@ static public function priorityForAction($action, $dependency = null) { // low priorities up here (*lots* of dependencies) static $priorities = array( - QUICKBOOKS_DELETE_TRANSACTION, - - QUICKBOOKS_VOID_TRANSACTION, - - QUICKBOOKS_DEL_DATAEXT, + QUICKBOOKS_DELETE_TRANSACTION, + + QUICKBOOKS_VOID_TRANSACTION, + + QUICKBOOKS_DEL_DATAEXT, QUICKBOOKS_MOD_DATAEXT, - QUICKBOOKS_ADD_DATAEXT, - - QUICKBOOKS_MOD_JOURNALENTRY, - QUICKBOOKS_ADD_JOURNALENTRY, - - QUICKBOOKS_MOD_RECEIVEPAYMENT, - QUICKBOOKS_ADD_RECEIVEPAYMENT, - - QUICKBOOKS_MOD_BILLPAYMENTCHECK, - QUICKBOOKS_ADD_BILLPAYMENTCHECK, - - //QUICKBOOKS_MOD_BILLPAYMENTCREDITCARD, - QUICKBOOKS_ADD_BILLPAYMENTCREDITCARD, - - QUICKBOOKS_MOD_BILL, - QUICKBOOKS_ADD_BILL, - - QUICKBOOKS_MOD_PURCHASEORDER, - QUICKBOOKS_ADD_PURCHASEORDER, - + QUICKBOOKS_ADD_DATAEXT, + + QUICKBOOKS_MOD_JOURNALENTRY, + QUICKBOOKS_ADD_JOURNALENTRY, + + QUICKBOOKS_MOD_RECEIVEPAYMENT, + QUICKBOOKS_ADD_RECEIVEPAYMENT, + + QUICKBOOKS_MOD_BILLPAYMENTCHECK, + QUICKBOOKS_ADD_BILLPAYMENTCHECK, + + //QUICKBOOKS_MOD_BILLPAYMENTCREDITCARD, + QUICKBOOKS_ADD_BILLPAYMENTCREDITCARD, + + QUICKBOOKS_MOD_BILL, + QUICKBOOKS_ADD_BILL, + + QUICKBOOKS_MOD_PURCHASEORDER, + QUICKBOOKS_ADD_PURCHASEORDER, + QUICKBOOKS_MOD_INVOICE, QUICKBOOKS_ADD_INVOICE, - - QUICKBOOKS_MOD_SALESORDER, - QUICKBOOKS_ADD_SALESORDER, - - QUICKBOOKS_MOD_ESTIMATE, - QUICKBOOKS_ADD_ESTIMATE, - - QUICKBOOKS_ADD_INVENTORYADJUSTMENT, - - QUICKBOOKS_ADD_CREDITMEMO, - QUICKBOOKS_MOD_CREDITMEMO, - + + QUICKBOOKS_MOD_SALESORDER, + QUICKBOOKS_ADD_SALESORDER, + + QUICKBOOKS_MOD_ESTIMATE, + QUICKBOOKS_ADD_ESTIMATE, + + QUICKBOOKS_ADD_INVENTORYADJUSTMENT, + + QUICKBOOKS_ADD_CREDITMEMO, + QUICKBOOKS_MOD_CREDITMEMO, + QUICKBOOKS_ADD_ITEMRECEIPT, QUICKBOOKS_MOD_ITEMRECEIPT, - QUICKBOOKS_MOD_SALESRECEIPT, - QUICKBOOKS_ADD_SALESRECEIPT, - - QUICKBOOKS_ADD_SALESTAXITEM, - QUICKBOOKS_MOD_SALESTAXITEM, - - QUICKBOOKS_ADD_DISCOUNTITEM, - QUICKBOOKS_MOD_DISCOUNTITEM, - - QUICKBOOKS_ADD_OTHERCHARGEITEM, - QUICKBOOKS_MOD_OTHERCHARGEITEM, - - QUICKBOOKS_MOD_NONINVENTORYITEM, + QUICKBOOKS_MOD_SALESRECEIPT, + QUICKBOOKS_ADD_SALESRECEIPT, + + QUICKBOOKS_ADD_SALESTAXITEM, + QUICKBOOKS_MOD_SALESTAXITEM, + + QUICKBOOKS_ADD_DISCOUNTITEM, + QUICKBOOKS_MOD_DISCOUNTITEM, + + QUICKBOOKS_ADD_OTHERCHARGEITEM, + QUICKBOOKS_MOD_OTHERCHARGEITEM, + + QUICKBOOKS_MOD_NONINVENTORYITEM, QUICKBOOKS_ADD_NONINVENTORYITEM, - - QUICKBOOKS_MOD_INVENTORYITEM, - QUICKBOOKS_ADD_INVENTORYITEM, - + + QUICKBOOKS_MOD_INVENTORYITEM, + QUICKBOOKS_ADD_INVENTORYITEM, + QUICKBOOKS_MOD_INVENTORYASSEMBLYITEM, QUICKBOOKS_ADD_INVENTORYASSEMBLYITEM, - - QUICKBOOKS_MOD_SERVICEITEM, - QUICKBOOKS_ADD_SERVICEITEM, - - QUICKBOOKS_MOD_PAYMENTITEM, - QUICKBOOKS_ADD_PAYMENTITEM, - - QUICKBOOKS_MOD_SALESREP, - QUICKBOOKS_ADD_SALESREP, - - QUICKBOOKS_MOD_EMPLOYEE, - QUICKBOOKS_ADD_EMPLOYEE, - + + QUICKBOOKS_MOD_SERVICEITEM, + QUICKBOOKS_ADD_SERVICEITEM, + + QUICKBOOKS_MOD_PAYMENTITEM, + QUICKBOOKS_ADD_PAYMENTITEM, + + QUICKBOOKS_MOD_SALESREP, + QUICKBOOKS_ADD_SALESREP, + + QUICKBOOKS_MOD_EMPLOYEE, + QUICKBOOKS_ADD_EMPLOYEE, + //QUICKBOOKS_MOD_SALESTAXCODE, // The SDK doesn't support this - QUICKBOOKS_ADD_SALESTAXCODE, - - QUICKBOOKS_MOD_VENDOR, - QUICKBOOKS_ADD_VENDOR, - + QUICKBOOKS_ADD_SALESTAXCODE, + + QUICKBOOKS_MOD_VENDOR, + QUICKBOOKS_ADD_VENDOR, + QUICKBOOKS_MOD_JOB, QUICKBOOKS_ADD_JOB, - + QUICKBOOKS_MOD_CUSTOMER, QUICKBOOKS_ADD_CUSTOMER, - - QUICKBOOKS_MOD_ACCOUNT, - QUICKBOOKS_ADD_ACCOUNT, - - //QUICKBOOKS_MOD_CLASS, (does not exist in qbXML API) - QUICKBOOKS_ADD_CLASS, - - QUICKBOOKS_ADD_PAYMENTMETHOD, - QUICKBOOKS_ADD_SHIPMETHOD, - - // Queries + + QUICKBOOKS_MOD_ACCOUNT, + QUICKBOOKS_ADD_ACCOUNT, + + //QUICKBOOKS_MOD_CLASS, (does not exist in qbXML API) + QUICKBOOKS_ADD_CLASS, + + QUICKBOOKS_ADD_PAYMENTMETHOD, + QUICKBOOKS_ADD_SHIPMETHOD, + + // Queries QUICKBOOKS_QUERY_PURCHASEORDER, QUICKBOOKS_QUERY_ITEMRECEIPT, - QUICKBOOKS_QUERY_SALESORDER, - QUICKBOOKS_QUERY_SALESRECEIPT, + QUICKBOOKS_QUERY_SALESORDER, + QUICKBOOKS_QUERY_SALESRECEIPT, QUICKBOOKS_QUERY_INVOICE, - QUICKBOOKS_QUERY_ESTIMATE, - QUICKBOOKS_QUERY_RECEIVEPAYMENT, - QUICKBOOKS_QUERY_CREDITMEMO, - - QUICKBOOKS_QUERY_BILLPAYMENTCHECK, - QUICKBOOKS_QUERY_BILLPAYMENTCREDITCARD, - QUICKBOOKS_QUERY_BILLTOPAY, - QUICKBOOKS_QUERY_BILL, - - QUICKBOOKS_QUERY_CREDITCARDCHARGE, - QUICKBOOKS_QUERY_CREDITCARDCREDIT, - QUICKBOOKS_QUERY_CHECK, + QUICKBOOKS_QUERY_ESTIMATE, + QUICKBOOKS_QUERY_RECEIVEPAYMENT, + QUICKBOOKS_QUERY_CREDITMEMO, + + QUICKBOOKS_QUERY_BILLPAYMENTCHECK, + QUICKBOOKS_QUERY_BILLPAYMENTCREDITCARD, + QUICKBOOKS_QUERY_BILLTOPAY, + QUICKBOOKS_QUERY_BILL, + + QUICKBOOKS_QUERY_CREDITCARDCHARGE, + QUICKBOOKS_QUERY_CREDITCARDCREDIT, + QUICKBOOKS_QUERY_CHECK, QUICKBOOKS_QUERY_CHARGE, - + QUICKBOOKS_QUERY_DELETEDLISTS, // This gets all items deleted in the last 90 days QUICKBOOKS_QUERY_DELETEDTXNS, // This gets all transactions deleted in the last 90 days - - QUICKBOOKS_QUERY_TIMETRACKING, - QUICKBOOKS_QUERY_VENDORCREDIT, - - QUICKBOOKS_QUERY_INVENTORYADJUSTMENT, - - QUICKBOOKS_QUERY_ITEM, - QUICKBOOKS_QUERY_DISCOUNTITEM, - QUICKBOOKS_QUERY_SALESTAXITEM, + + QUICKBOOKS_QUERY_TIMETRACKING, + QUICKBOOKS_QUERY_VENDORCREDIT, + + QUICKBOOKS_QUERY_INVENTORYADJUSTMENT, + + QUICKBOOKS_QUERY_ITEM, + QUICKBOOKS_QUERY_DISCOUNTITEM, + QUICKBOOKS_QUERY_SALESTAXITEM, QUICKBOOKS_QUERY_SERVICEITEM, - QUICKBOOKS_QUERY_NONINVENTORYITEM, - QUICKBOOKS_QUERY_INVENTORYITEM, + QUICKBOOKS_QUERY_NONINVENTORYITEM, + QUICKBOOKS_QUERY_INVENTORYITEM, - QUICKBOOKS_QUERY_SALESREP, + QUICKBOOKS_QUERY_SALESREP, - QUICKBOOKS_QUERY_VEHICLEMILEAGE, - QUICKBOOKS_QUERY_VEHICLE, + QUICKBOOKS_QUERY_VEHICLEMILEAGE, + QUICKBOOKS_QUERY_VEHICLE, QUICKBOOKS_QUERY_CUSTOMER, - QUICKBOOKS_QUERY_VENDOR, - QUICKBOOKS_QUERY_EMPLOYEE, + QUICKBOOKS_QUERY_VENDOR, + QUICKBOOKS_QUERY_EMPLOYEE, QUICKBOOKS_QUERY_JOB, - QUICKBOOKS_QUERY_WORKERSCOMPCODE, + QUICKBOOKS_QUERY_WORKERSCOMPCODE, QUICKBOOKS_QUERY_UNITOFMEASURESET, - - QUICKBOOKS_QUERY_JOURNALENTRY, - QUICKBOOKS_QUERY_DEPOSIT, - - QUICKBOOKS_QUERY_SHIPMETHOD, - QUICKBOOKS_QUERY_PAYMENTMETHOD, - QUICKBOOKS_QUERY_PRICELEVEL, - QUICKBOOKS_QUERY_DATEDRIVENTERMS, - QUICKBOOKS_QUERY_BILLINGRATE, - QUICKBOOKS_QUERY_CUSTOMERTYPE, - QUICKBOOKS_QUERY_CUSTOMERMSG, - QUICKBOOKS_QUERY_TERMS, - QUICKBOOKS_QUERY_SALESTAXCODE, - QUICKBOOKS_QUERY_ACCOUNT, - QUICKBOOKS_QUERY_CLASS, - QUICKBOOKS_QUERY_JOBTYPE, - QUICKBOOKS_QUERY_VENDORTYPE, - - QUICKBOOKS_QUERY_COMPANY, - - - QUICKBOOKS_IMPORT_RECEIVEPAYMENT, - - + + QUICKBOOKS_QUERY_JOURNALENTRY, + QUICKBOOKS_QUERY_DEPOSIT, + + QUICKBOOKS_QUERY_SHIPMETHOD, + QUICKBOOKS_QUERY_PAYMENTMETHOD, + QUICKBOOKS_QUERY_PRICELEVEL, + QUICKBOOKS_QUERY_DATEDRIVENTERMS, + QUICKBOOKS_QUERY_BILLINGRATE, + QUICKBOOKS_QUERY_CUSTOMERTYPE, + QUICKBOOKS_QUERY_CUSTOMERMSG, + QUICKBOOKS_QUERY_TERMS, + QUICKBOOKS_QUERY_SALESTAXCODE, + QUICKBOOKS_QUERY_ACCOUNT, + QUICKBOOKS_QUERY_CLASS, + QUICKBOOKS_QUERY_JOBTYPE, + QUICKBOOKS_QUERY_VENDORTYPE, + + QUICKBOOKS_QUERY_COMPANY, + + + QUICKBOOKS_IMPORT_RECEIVEPAYMENT, + + QUICKBOOKS_IMPORT_PURCHASEORDER, QUICKBOOKS_IMPORT_ITEMRECEIPT, - QUICKBOOKS_IMPORT_SALESRECEIPT, - - // The ESTIMATE, then INVOICE, then SALES ORDER order is important, - // because we might have events which depend on the estimate being present - // when the invoice is imported, or the sales order being present when - // then invoice is imported, etc. + QUICKBOOKS_IMPORT_SALESRECEIPT, + + // The ESTIMATE, then INVOICE, then SALES ORDER order is important, + // because we might have events which depend on the estimate being present + // when the invoice is imported, or the sales order being present when + // then invoice is imported, etc. QUICKBOOKS_IMPORT_INVOICE, - QUICKBOOKS_IMPORT_SALESORDER, - QUICKBOOKS_IMPORT_ESTIMATE, - - QUICKBOOKS_IMPORT_BILLPAYMENTCHECK, - QUICKBOOKS_IMPORT_BILLPAYMENTCREDITCARD, - QUICKBOOKS_IMPORT_BILLTOPAY, - QUICKBOOKS_IMPORT_BILL, - - QUICKBOOKS_IMPORT_CREDITCARDCHARGE, - QUICKBOOKS_IMPORT_CREDITCARDCREDIT, - QUICKBOOKS_IMPORT_CHECK, + QUICKBOOKS_IMPORT_SALESORDER, + QUICKBOOKS_IMPORT_ESTIMATE, + + QUICKBOOKS_IMPORT_BILLPAYMENTCHECK, + QUICKBOOKS_IMPORT_BILLPAYMENTCREDITCARD, + QUICKBOOKS_IMPORT_BILLTOPAY, + QUICKBOOKS_IMPORT_BILL, + + QUICKBOOKS_IMPORT_CREDITCARDCHARGE, + QUICKBOOKS_IMPORT_CREDITCARDCREDIT, + QUICKBOOKS_IMPORT_CHECK, QUICKBOOKS_IMPORT_CHARGE, - + QUICKBOOKS_IMPORT_DELETEDLISTS, // This gets all items deleted in the last 90 days. QUICKBOOKS_IMPORT_DELETEDTXNS, // This gets all transactions deleted in the last 90 days. - - QUICKBOOKS_IMPORT_TIMETRACKING, - QUICKBOOKS_IMPORT_VENDORCREDIT, - - QUICKBOOKS_IMPORT_INVENTORYADJUSTMENT, - - QUICKBOOKS_IMPORT_ITEM, - QUICKBOOKS_IMPORT_DISCOUNTITEM, - QUICKBOOKS_IMPORT_SALESTAXITEM, + + QUICKBOOKS_IMPORT_TIMETRACKING, + QUICKBOOKS_IMPORT_VENDORCREDIT, + + QUICKBOOKS_IMPORT_INVENTORYADJUSTMENT, + + QUICKBOOKS_IMPORT_ITEM, + QUICKBOOKS_IMPORT_DISCOUNTITEM, + QUICKBOOKS_IMPORT_SALESTAXITEM, QUICKBOOKS_IMPORT_SERVICEITEM, - QUICKBOOKS_IMPORT_NONINVENTORYITEM, - QUICKBOOKS_IMPORT_INVENTORYITEM, + QUICKBOOKS_IMPORT_NONINVENTORYITEM, + QUICKBOOKS_IMPORT_INVENTORYITEM, QUICKBOOKS_IMPORT_INVENTORYASSEMBLYITEM, - QUICKBOOKS_IMPORT_SALESREP, + QUICKBOOKS_IMPORT_SALESREP, - QUICKBOOKS_IMPORT_VEHICLEMILEAGE, - QUICKBOOKS_IMPORT_VEHICLE, + QUICKBOOKS_IMPORT_VEHICLEMILEAGE, + QUICKBOOKS_IMPORT_VEHICLE, QUICKBOOKS_IMPORT_CUSTOMER, - QUICKBOOKS_IMPORT_VENDOR, - QUICKBOOKS_IMPORT_EMPLOYEE, + QUICKBOOKS_IMPORT_VENDOR, + QUICKBOOKS_IMPORT_EMPLOYEE, QUICKBOOKS_IMPORT_JOB, - QUICKBOOKS_IMPORT_WORKERSCOMPCODE, + QUICKBOOKS_IMPORT_WORKERSCOMPCODE, QUICKBOOKS_IMPORT_UNITOFMEASURESET, - - QUICKBOOKS_IMPORT_JOURNALENTRY, - QUICKBOOKS_IMPORT_DEPOSIT, - - QUICKBOOKS_IMPORT_SHIPMETHOD, - QUICKBOOKS_IMPORT_PAYMENTMETHOD, - QUICKBOOKS_IMPORT_PRICELEVEL, - QUICKBOOKS_IMPORT_DATEDRIVENTERMS, - QUICKBOOKS_IMPORT_BILLINGRATE, - QUICKBOOKS_IMPORT_CUSTOMERTYPE, - QUICKBOOKS_IMPORT_CUSTOMERMSG, - QUICKBOOKS_IMPORT_TERMS, - QUICKBOOKS_IMPORT_SALESTAXCODE, - QUICKBOOKS_IMPORT_ACCOUNT, - QUICKBOOKS_IMPORT_CLASS, - QUICKBOOKS_IMPORT_JOBTYPE, - QUICKBOOKS_IMPORT_VENDORTYPE, - - QUICKBOOKS_IMPORT_COMPANY, + + QUICKBOOKS_IMPORT_JOURNALENTRY, + QUICKBOOKS_IMPORT_DEPOSIT, + + QUICKBOOKS_IMPORT_SHIPMETHOD, + QUICKBOOKS_IMPORT_PAYMENTMETHOD, + QUICKBOOKS_IMPORT_PRICELEVEL, + QUICKBOOKS_IMPORT_DATEDRIVENTERMS, + QUICKBOOKS_IMPORT_BILLINGRATE, + QUICKBOOKS_IMPORT_CUSTOMERTYPE, + QUICKBOOKS_IMPORT_CUSTOMERMSG, + QUICKBOOKS_IMPORT_TERMS, + QUICKBOOKS_IMPORT_SALESTAXCODE, + QUICKBOOKS_IMPORT_ACCOUNT, + QUICKBOOKS_IMPORT_CLASS, + QUICKBOOKS_IMPORT_JOBTYPE, + QUICKBOOKS_IMPORT_VENDORTYPE, + + QUICKBOOKS_IMPORT_COMPANY, ); // high priorities down here (no dependencies OR queries) - - // Now, let's space those priorities out a little bit, it gives us some - // wiggle room in case we need to add things inbetween the default + + // Now, let's space those priorities out a little bit, it gives us some + // wiggle room in case we need to add things inbetween the default // priority values static $wiggled = false; $wiggle = 6; - + if (!$wiggled) { $count = count($priorities); @@ -1070,67 +1070,67 @@ static public function priorityForAction($action, $dependency = null) { $priorities[$i * $wiggle] = $priorities[$i]; unset($priorities[$i]); - + // with a wiggle multiplier of 2... // priority 25 goes to 50 // priority 24 goes to 48 // priority 23 goes to 46 - // etc. etc. etc. + // etc. etc. etc. } - + $wiggled = true; - + //print_r($priorities); } - + if ($dependency) { - // + // // This is a list of dependency modifications - // For instance, normally, you'd want to send just any old DataExtAdd - // with a really low priority, because whatever record it applies to - // must be in QuickBooks before you send the DataExtAdd/Mod request. - // - // However, if we pass in the $dependency of QUICKBOOKS_ADD_CUSTOMER, - // then we know that this DataExt applies to a CustomerAdd, and can - // therefore be sent with a priority *just barely lower than* than a - // CustomerAdd request, which will ensure this gets run as soon as + // For instance, normally, you'd want to send just any old DataExtAdd + // with a really low priority, because whatever record it applies to + // must be in QuickBooks before you send the DataExtAdd/Mod request. + // + // However, if we pass in the $dependency of QUICKBOOKS_ADD_CUSTOMER, + // then we know that this DataExt applies to a CustomerAdd, and can + // therefore be sent with a priority *just barely lower than* than a + // CustomerAdd request, which will ensure this gets run as soon as // possible, but not sooner than the CustomerAdd. - // - // This is important because in some cases, this data will be - // automatically used by QuickBooks. For instance, a custom field that - // is placed on an Invoice *must already be populated for the - // Customer* before the invoice is created. // - // This is an example of a priority list without dependencies, and it's bad: - // CustomerAdd, InvoiceAdd, DataExtAdd + // This is important because in some cases, this data will be + // automatically used by QuickBooks. For instance, a custom field that + // is placed on an Invoice *must already be populated for the + // Customer* before the invoice is created. + // + // This is an example of a priority list without dependencies, and it's bad: + // CustomerAdd, InvoiceAdd, DataExtAdd // (the custom field for the customer doesn't get populated in the invoice) // - // This is an example of a priority list with dependencies, and it's good: + // This is an example of a priority list with dependencies, and it's good: // CustomerAdd, DataExtAdd, InvoiceAdd - // + // $dependencies = array( - QUICKBOOKS_ADD_DATAEXT => array( - QUICKBOOKS_ADD_CUSTOMER => QuickBooks_Utilities::priorityForAction(QUICKBOOKS_ADD_CUSTOMER) - 1, - QUICKBOOKS_MOD_CUSTOMER => QuickBooks_Utilities::priorityForAction(QUICKBOOKS_MOD_CUSTOMER) - 1, + QUICKBOOKS_ADD_DATAEXT => array( + QUICKBOOKS_ADD_CUSTOMER => QuickBooks_Utilities::priorityForAction(QUICKBOOKS_ADD_CUSTOMER) - 1, + QUICKBOOKS_MOD_CUSTOMER => QuickBooks_Utilities::priorityForAction(QUICKBOOKS_MOD_CUSTOMER) - 1, ), QUICKBOOKS_MOD_DATAEXT => array( - QUICKBOOKS_ADD_CUSTOMER => QuickBooks_Utilities::priorityForAction(QUICKBOOKS_ADD_CUSTOMER) - 1, - QUICKBOOKS_MOD_CUSTOMER => QuickBooks_Utilities::priorityForAction(QUICKBOOKS_MOD_CUSTOMER) - 1, + QUICKBOOKS_ADD_CUSTOMER => QuickBooks_Utilities::priorityForAction(QUICKBOOKS_ADD_CUSTOMER) - 1, + QUICKBOOKS_MOD_CUSTOMER => QuickBooks_Utilities::priorityForAction(QUICKBOOKS_MOD_CUSTOMER) - 1, ), - - // A *Bill VOID* has a slightly higher priority than a PurchaseOrderMod so that we can IsManuallyClosed POs (we'll get an error if we try to close it and a bill is dependent on it) + + // A *Bill VOID* has a slightly higher priority than a PurchaseOrderMod so that we can IsManuallyClosed POs (we'll get an error if we try to close it and a bill is dependent on it) QUICKBOOKS_VOID_TRANSACTION => array( - QUICKBOOKS_MOD_PURCHASEORDER => QuickBooks_Utilities::priorityForAction(QUICKBOOKS_MOD_PURCHASEORDER) + 1, - ), - ); + QUICKBOOKS_MOD_PURCHASEORDER => QuickBooks_Utilities::priorityForAction(QUICKBOOKS_MOD_PURCHASEORDER) + 1, + ), + ); } - + // Check for dependency priorities - if ($dependency and - isset($dependencies[$action]) and + if ($dependency and + isset($dependencies[$action]) and isset($dependencies[$action][$dependency])) - { + { // Dependency modified priority return $dependencies[$action][$dependency]; } @@ -1139,14 +1139,14 @@ static public function priorityForAction($action, $dependency = null) // Regular priority return $key; } - + // Default priority - return 999; + return 999; } - + /** * List all of the QuickBooks actions the framework supports - * + * * @param string $filter * @param boolean $return_keys * @return array @@ -1154,16 +1154,16 @@ static public function priorityForAction($action, $dependency = null) static public function listActions($filter = null, $return_keys = false) { $startswith = array( - 'QUICKBOOKS_IMPORT_', - 'QUICKBOOKS_QUERY_', - 'QUICKBOOKS_ADD_', - 'QUICKBOOKS_MOD_', - 'QUICKBOOKS_DEL_', - 'QUICKBOOKS_VOID_', + 'QUICKBOOKS_IMPORT_', + 'QUICKBOOKS_QUERY_', + 'QUICKBOOKS_ADD_', + 'QUICKBOOKS_MOD_', + 'QUICKBOOKS_DEL_', + 'QUICKBOOKS_VOID_', ); - + $constants = array(); - + //$inter_key = 'QUICKBOOKS_INTERACTIVE_MODE'; //$inter_val = QUICKBOOKS_INTERACTIVE_MODE; /* @@ -1189,7 +1189,7 @@ static public function listActions($filter = null, $return_keys = false) $constants[] = $inter_val; } */ - + foreach (get_defined_constants() as $constant => $value) { foreach ($startswith as $start) @@ -1200,7 +1200,7 @@ static public function listActions($filter = null, $return_keys = false) { $constant = $value; } - + if (!is_null($filter)) { if (QuickBooks_Utilities::fnmatch($filter, $constant)) @@ -1215,23 +1215,23 @@ static public function listActions($filter = null, $return_keys = false) } } } - + sort($constants); - + return $constants; } - + /** * Get the primary key within QuickBooks for this type of object (or this type of action) - * + * * * // This prints "ListID" * print(QuickBooks_Utilities::keyForObject(QUICKBOOKS_OBJECT_CUSTOMER)); - * + * * // This prints "TxnID" (this method also works for actions) * print(QuickBooks_Utilities::keyForObject(QUICKBOOKS_ADD_INVOICE)); * - * + * * @param string $object An object or action type * @return string */ @@ -1239,7 +1239,7 @@ static public function keyForObject($object) { // Make sure it's an object $object = QuickBooks_Utilities::actionToObject($object); - + switch ($object) { case QUICKBOOKS_OBJECT_BILLPAYMENTCREDITCARD: @@ -1272,7 +1272,7 @@ static public function keyForObject($object) return 'ListID'; } } - + /** * Alias of QuickBooks_Utilities::keyForObject() */ @@ -1280,10 +1280,10 @@ static public function keyForAction($action) { return QuickBooks_Utilities::keyForObject($action); } - + /** * Converts an action to a request (example: "CustomerAdd" to "CustomerAddRq") - * + * * @param string $action * @return string */ @@ -1291,10 +1291,10 @@ static public function actionToRequest($action) { return $action . 'Rq'; } - + /** * Converts an action to a response (example: "CustomerAdd" to "CustomerAddRs") - * + * * @param string $action * @return string */ @@ -1302,10 +1302,10 @@ static public function actionToResponse($action) { return $action . 'Rs'; } - + /** * Converts a request to an action (example: "CustomerAddRq" to "CustomerAdd") - * + * * @param string $request * @return string */ @@ -1313,10 +1313,10 @@ static public function requestToAction($request) { return substr($request, 0, -2); } - + /** * Converts an action to an XML Element (example: "CustomerAdd" to "CustomerRet") - * + * * @param string $action * @return string */ @@ -1324,10 +1324,10 @@ static public function objectToXMLElement($object) { return $object . 'Ret'; } - + /** * Converts an action to an XML Element (example: "CustomerAdd" to "CustomerRet") - * + * * @param string $action * @return string */ @@ -1335,10 +1335,10 @@ static public function actionToXMLElement($action) { return QuickBooks_Utilities::actionToObject($action) . 'Ret'; } - + /** * Converts an object type to the corresponding Query Action (example: "Customer" to "CustomerQuery") - * + * * @param string $type * @return string */ @@ -1346,7 +1346,7 @@ static public function objectToQuery($type) { return QuickBooks_Utilities::actionToObject($type) . 'Query'; } - + /** * Converts an object type to the corresponding Mod Action * Ex: Customer to CustomerMod @@ -1355,7 +1355,7 @@ static public function objectToMod($type) { return QuickBooks_Utilities::actionToObject($type) . 'Mod'; } - + /** * Converts an object type to the corresponding Add Action * Ex: Customer to CustomerAdd @@ -1364,8 +1364,8 @@ static public function objectToAdd($type) { return QuickBooks_Utilities::actionToObject($type) . 'Add'; } - - + + /** * Converts an actrion to the corresponding Query Action * Ex: Customer to CustomerQuery @@ -1374,7 +1374,7 @@ static public function convertActionToQuery($action) { return QuickBooks_Utilities::objectToQuery(QuickBooks_Utilities::actionToObject($action)); } - + /** * Converts an action to the corresponding Mod Action * Ex: Customer to CustomerQuery @@ -1383,14 +1383,14 @@ static public function convertActionToMod($action) { return QuickBooks_Utilities::objectToMod(QuickBooks_Utilities::actionToObject($action)); } - + /** * Converts a MySQL timestamp value to the timezone of the PHP server this script is running on. - * + * * @deprecated This need to be removed and moved to a driver class! - * + * * Expects $datetime in the formation of "YYYY-MM-DD HH:MM:SS" - * + * * @TODO Double check that a lack of a Driver Instance properly returns false. * @TODO Investigate possible bug if within a few hours of daylight savings change. * @TODO This should *not* be in the QuickBooks_Utilties class, any database queries that arn't abstracted need to be in QuickBooks/Driver/Sql/your-sql-file-here.php @@ -1398,63 +1398,63 @@ static public function convertActionToMod($action) /*static public function mysqlTZToPHPTZ($datetime) { $Driver = QuickBooks_Driver_Singleton::getInstance(); - + $sql = " SELECT UTC_TIME() AS theUtcTime, CURTIME() AS theCurTime "; $res = $Driver->query($sql, $errnum, $errmsg); - + if (!$res) { return false; } - + if (!($arr = $Driver->fetch($res))) { return false; } - - // get the time bits: - $utcTime = explode(":", $arr['theUtcTime']); - $curTime = explode(":", $arr['theCurTime']); - + + // get the time bits: + $utcTime = explode(":", $arr['theUtcTime']); + $curTime = explode(":", $arr['theCurTime']); + // create unix timestamps for each - // since we're calculating a relative time only: - $utc_t = mktime($utcTime[0], $utcTime[1], $utcTime[2]); - $cur_t = mktime($curTime[0], $curTime[1], $curTime[2]); - + // since we're calculating a relative time only: + $utc_t = mktime($utcTime[0], $utcTime[1], $utcTime[2]); + $cur_t = mktime($curTime[0], $curTime[1], $curTime[2]); + $mysqlOffset = ($cur_t - $utc_t); - + $phpOffset = (int) date('Z'); - + //mail("grgisme@gmail.com","Offsets","MysqlOffset: ".($mysqlOffset)."\n\n\nPHPOffset: ".$phpOffset); - + $timezoneDiff = $mysqlOffset - $phpOffset; - + $tempTime = explode(" ", $datetime); - + if (count($tempTime) != 2)//Improper input { return FALSE; } - + $mysqlTime = explode(":", $tempTime[1]); - + $mysql_t = mktime($mysqlTime[0], $mysqlTime[1], $mysqlTime[2]); - + $newMysqlTime = $mysql_t - $timezoneDiff; - + //mail("grgisme@gmail.com","TimeZone Diff","TimeZone Diff: ".($timezoneDiff)); - + return $tempTime[0]." ".date("H:i:s", $newMysqlTime); - + }*/ - + /** * Compares a time reported from QuickBooks to a mysql datetime field * Ex: QB Time: 2009-01-23T08:33:56-05:00 * SQL Time: 2009-01-23 08:31:11 - * + * * @deprecated This needs to be moved to a driver class! - * + * * Returns -1 if QB Time is Smaller * Returns 0 if Times are Equal * Returns 1 if QB Time is Greater @@ -1463,16 +1463,16 @@ static public function convertActionToMod($action) /*static public function compareQBTimeToSQLTime($QBTime, $SQLTime) { $SQLTime = QuickBooks_Utilities::mysqlTZToPHPTZ($SQLTime); - + $tempTime = explode(" ", $SQLTime); $mysqlTime = explode(":", $tempTime[1]); $tempTime = explode("-", $tempTime[0]); - + $mysql_t = mktime($mysqlTime[0], $mysqlTime[1], $mysqlTime[2], $tempTime[1], $tempTime[2], $tempTime[0], 0); $QBTime = strtotime($QBTime); - + //mail("grgisme@gmail.com","QBTime","QBTime: ".($QBTime)."\n\n\nSQLTime: ".$mysql_t."\n\n\n".$SQLTime."\n\n\nDaylight Savings?: ".date('I')); - + if ($QBTime < $mysql_t) return -1; elseif($QBTime > $mysql_t) diff --git a/QuickBooks/WebConnector/QWC.php b/QuickBooks/WebConnector/QWC.php index 3e790ef1..d1b1e0cb 100644 --- a/QuickBooks/WebConnector/QWC.php +++ b/QuickBooks/WebConnector/QWC.php @@ -2,23 +2,23 @@ /** * QuickBooks .QWC file generation class - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks */ /** * QuickBooks .QWC file generation - * - * + * + * */ class QuickBooks_WebConnector_QWC { @@ -39,12 +39,12 @@ class QuickBooks_WebConnector_QWC protected $_appdisplayname; protected $_appuniquename; protected $_appid; - + const SUPPORTED_DEFAULT = ''; const SUPPORTED_ALL = '0x0'; - const SUPPORTED_SIMPLESTART = '0x1'; - const SUPPORTED_PRO = '0x2'; - const SUPPORTED_PREMIER = '0x4'; + const SUPPORTED_SIMPLESTART = '0x1'; + const SUPPORTED_PRO = '0x2'; + const SUPPORTED_PREMIER = '0x4'; const SUPPORTED_ENTERPRISE = '0x8'; const PERSONALDATA_DEFAULT = ''; @@ -55,10 +55,10 @@ class QuickBooks_WebConnector_QWC const UNATTENDEDMODE_DEFAULT = ''; const UNATTENDEDMODE_REQUIRED = 'umpRequired'; const UNATTENDEDMODE_OPTIONAL = 'umpOptional'; - + /** - * Generate a valid QuickBooks Web Connector *.QWC file - * + * Generate a valid QuickBooks Web Connector *.QWC file + * * @param string $name The name of the QuickBooks Web Connector job (something descriptive, this gets displayed to the end-user) * @param string $descrip A short description of the QuickBooks Web Connector job (something descriptive, this gets displayed to the end-user) * @param string $appurl The absolute URL to the SOAP server (this *MUST* be a HTTPS:// link *UNLESS* it's running on localhost) @@ -69,7 +69,7 @@ class QuickBooks_WebConnector_QWC * @param string $qbtype Either QUICKBOOKS_TYPE_QBFS or QUICKBOOKS_TYPE_QBPOS * @param boolean $readonly Whether or not to open the connection as read-only * @param integer $run_every_n_seconds If you want to schedule the job to run every once in a while automatically, you can pass in a number of seconds between runs here - * @param string $personaldata + * @param string $personaldata * @param string $unattendedmode * @param string $authflags * @param boolean $notify @@ -79,22 +79,22 @@ class QuickBooks_WebConnector_QWC * @return string */ public function __construct( - $name, - $descrip, - $appurl, - $appsupport, - $username, - $fileid, - $ownerid, - $qbtype = QUICKBOOKS_TYPE_QBFS, - $readonly = false, - $run_every_n_seconds = null, - $personaldata = QuickBooks_WebConnector_QWC::PERSONALDATA_DEFAULT, - $unattendedmode = QuickBooks_WebConnector_QWC::UNATTENDEDMODE_DEFAULT, - $authflags = QuickBooks_WebConnector_QWC::SUPPORTED_DEFAULT, - $notify = false, - $appdisplayname = '', - $appuniquename = '', + $name, + $descrip, + $appurl, + $appsupport, + $username, + $fileid, + $ownerid, + $qbtype = QUICKBOOKS_TYPE_QBFS, + $readonly = false, + $run_every_n_seconds = null, + $personaldata = QuickBooks_WebConnector_QWC::PERSONALDATA_DEFAULT, + $unattendedmode = QuickBooks_WebConnector_QWC::UNATTENDEDMODE_DEFAULT, + $authflags = QuickBooks_WebConnector_QWC::SUPPORTED_DEFAULT, + $notify = false, + $appdisplayname = '', + $appuniquename = '', $appid = '') { $this->_name = $name; @@ -103,7 +103,7 @@ public function __construct( $this->_appsupport = $appsupport; $this->_username = $username; $this->_fileid = $fileid; - $this->_ownerid = $ownerid; + $this->_ownerid = $ownerid; $this->_qbtype = $qbtype; $this->_readonly = $readonly; $this->_run_every_n_seconds = $run_every_n_seconds; @@ -115,7 +115,7 @@ public function __construct( $this->_appuniquename = $appuniquename; $this->_appid = $appid; } - + public function http($filename = 'quickbooks.qwc') { header('Content-type: text/xml'); @@ -123,15 +123,15 @@ public function http($filename = 'quickbooks.qwc') print($this->generate()); return true; } - + public function save($where) { - + } /** - * - * + * + * * @return string */ public function generate() @@ -142,7 +142,7 @@ public function generate() $appsupport = $this->_appsupport; $username = $this->_username; $fileid = $this->_fileid; - $ownerid = $this->_ownerid; + $ownerid = $this->_ownerid; $qbtype = $this->_qbtype; $readonly = $this->_readonly; $run_every_n_seconds = $this->_run_every_n_seconds; @@ -152,17 +152,17 @@ public function generate() $notify = $this->_notify; $appdisplayname = $this->_appdisplayname; $appuniquename = $this->_appuniquename; - $appid = $this->_appid; - + $appid = $this->_appid; + /* AppDisplayName AppUniqueName AuthFlags - 0x0 (all, default) - - 0x0 (All, default) - - 0x1 (SupportQBSimpleStart) - - 0x2 (SupportQBPro) - - 0x4 (SupportQBPremier) + - 0x0 (All, default) + - 0x1 (SupportQBSimpleStart) + - 0x2 (SupportQBPro) + - 0x4 (SupportQBPremier) - 0x8 (SupportQBEnterprise) Notify true or false PersonalDataPref @@ -174,19 +174,19 @@ public function generate() - umpRequired - umpOptional CertURL - */ - - if ($run_every_n_seconds and + */ + + if ($run_every_n_seconds and !is_numeric($run_every_n_seconds)) { $run_every_n_seconds = QuickBooks_Utilities::intervalToSeconds($run_every_n_seconds); } - + $ownerid = '{' . trim($ownerid, '{}') . '}'; $fileid = '{' . trim($fileid, '{}') . '}'; - + $xml = ''; - + $xml .= '' . QUICKBOOKS_CRLF; $xml .= '' . QUICKBOOKS_CRLF; $xml .= "\t" . '' . htmlspecialchars($name) . '' . QUICKBOOKS_CRLF; @@ -198,22 +198,22 @@ public function generate() $xml .= "\t" . '' . $ownerid . '' . QUICKBOOKS_CRLF; $xml .= "\t" . '' . $fileid . '' . QUICKBOOKS_CRLF; $xml .= "\t" . '' . $qbtype . '' . QUICKBOOKS_CRLF; - + if ($personaldata != QuickBooks_WebConnector_QWC::PERSONALDATA_DEFAULT) { $xml .= "\t" . '' . $personaldata . '' . QUICKBOOKS_CRLF; } - + if ($unattendedmode != QuickBooks_WebConnector_QWC::UNATTENDEDMODE_DEFAULT) { $xml .= "\t" . '' . $unattendedmode . '' . QUICKBOOKS_CRLF; } - + if ($authflags != QuickBooks_WebConnector_QWC::SUPPORTED_DEFAULT) { $xml .= "\t" . '' . $authflags . '' . QUICKBOOKS_CRLF; } - + if ($notify) { $xml .= "\t" . 'true' . QUICKBOOKS_CRLF; @@ -222,17 +222,17 @@ public function generate() { $xml .= "\t" . 'false' . QUICKBOOKS_CRLF; } - + if ($appdisplayname) { $xml .= "\t" . '' . $appdisplayname . '' . QUICKBOOKS_CRLF; } - + if ($appuniquename) { $xml .= "\t" . '' . $appuniquename . '' . QUICKBOOKS_CRLF; } - + if ((int) $run_every_n_seconds > 0 and (int) $run_every_n_seconds < 60) { $xml .= "\t" . '' . QUICKBOOKS_CRLF; @@ -245,7 +245,7 @@ public function generate() $xml .= "\t" . "\t" . '' . floor($run_every_n_seconds / 60) . '' . QUICKBOOKS_CRLF; $xml .= "\t" . '' . QUICKBOOKS_CRLF; } - + if ($readonly) { $xml .= "\t" . 'true' . QUICKBOOKS_CRLF; @@ -254,12 +254,12 @@ public function generate() { $xml .= "\t" . 'false' . QUICKBOOKS_CRLF; } - + $xml .= ''; - - return trim($xml); + + return trim($xml); } - + /** * Alias of QuickBooks_QWC::generate() */ @@ -267,12 +267,12 @@ public function __toString() { return $this->generate(); } - + /** * Generate a random File ID string - * - * *** WARNING *** I have no idea if it is OK or not to do it like this... do you know? E-mail me! - * + * + * *** WARNING *** I have no idea if it is OK or not to do it like this... do you know? E-mail me! + * * @param boolean $surround * @return string */ @@ -280,10 +280,10 @@ static public function fileID($surround = true) { return QuickBooks_WebConnector_QWC::_guid($surround); } - + /** * Generate a random GUID string - * + * * @param boolean $surround * @return string */ @@ -291,37 +291,37 @@ static public function GUID($surround = true) { return QuickBooks_WebConnector_QWC::_guid($surround); } - + /** * Generate a GUID - * + * * Note: This is used for tickets too, so it *must* be a RANDOM GUID! - * + * * @param boolean $surround * @return string */ static protected function _guid($surround = true) { $guid = sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x', - mt_rand(0, 65535), mt_rand(0, 65535), - mt_rand(0, 65535), - mt_rand(0, 4095), + mt_rand(0, 65535), mt_rand(0, 65535), + mt_rand(0, 65535), + mt_rand(0, 4095), bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) - ); + ); if ($surround) { $guid = '{' . $guid . '}'; } - - return $guid; + + return $guid; } - + /** * Generate a random Owner ID string - * - * *** WARNING *** I have no idea if it is OK or not to do it like this... do you know? E-mail me! - * + * + * *** WARNING *** I have no idea if it is OK or not to do it like this... do you know? E-mail me! + * * @param boolean $surround * @return string */ @@ -329,5 +329,5 @@ static public function ownerID($surround = true) { return QuickBooks_WebConnector_QWC::_guid($surround); } - + } diff --git a/QuickBooks/WebConnector/Queue.php b/QuickBooks/WebConnector/Queue.php index 3168d4f3..3bcd2dc8 100755 --- a/QuickBooks/WebConnector/Queue.php +++ b/QuickBooks/WebConnector/Queue.php @@ -1,42 +1,42 @@ * require_once 'QuickBooks/Queue.php'; * $queue = new QuickBooks_Queue('mysql://user:pass@localhost/database'); * $queue->enqueue(QUICKBOOKS_ADD_CUSTOMER, $the_customer_ID_number_here); * - * - * The next time the QuickBooks Web Connector calls your QuickBooks SOAP server, - * the SOAP server calls your SOAP server handler function associated with - * adding customer records, your handler function will generate the qbXML - * request, and the request will be sent off to QuickBooks and (if everything + * + * The next time the QuickBooks Web Connector calls your QuickBooks SOAP server, + * the SOAP server calls your SOAP server handler function associated with + * adding customer records, your handler function will generate the qbXML + * request, and the request will be sent off to QuickBooks and (if everything * goes well) the customer will appear in QuickBooks. - * - * If you need to perform a particular action on a set schedule, say, for - * example, pull customers from QuickBooks to your web application once per - * day, then you can register a recurring event instead of queueing up a - * request every single day. - * + * + * If you need to perform a particular action on a set schedule, say, for + * example, pull customers from QuickBooks to your web application once per + * day, then you can register a recurring event instead of queueing up a + * request every single day. + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks */ @@ -60,10 +60,10 @@ class QuickBooks_WebConnector_Queue * @var string */ protected $_user; - + /** * Create a new QuickBooks queue instance - * + * * @param mixed $dsn_or_conn A DSN-style connection string (i.e.: mysq://root:pass@locahost/database) or a database connection (if you wish to re-use an existing database connection) * @param array $config Configuration array for the driver */ @@ -71,20 +71,20 @@ public function __construct($dsn_or_conn, $user = null, $config = array()) { //$this->_driver = QuickBooks_Utilities::driverFactory($dsn_or_conn, $config); $this->_driver = QuickBooks_Driver_Factory::create($dsn_or_conn, $config); - + // No default username was provided, fetch the default from the driver if (!$user) { $user = $this->_driver->authDefault(); } - + // Set the default username $this->_user = $user; } - + /** * Get or set the username the queue is operating on/for - * + * * @param string $user * @return string */ @@ -94,15 +94,15 @@ public function user($user = null) { $this->_user = $user; } - + return $this->_user; } - + /** * Request to enter "Interactive Mode" with the Web Connector - * - * * This function *does not* work. Please don't use it. - * + * + * * This function *does not* work. Please don't use it. + * * @param integer $priority * @param string $user * @return boolean @@ -114,38 +114,38 @@ public function interactive($priority = 0, $user = null) $tmp = array_merge(range('a', 'z'), range(0, 9)); shuffle($tmp); $random = substr(implode('', $tmp), 0, 8); - + /* if (!$user) { $user = $this->_driver->authDefault(); } */ - + if (!$user) { $user = $this->_user; } - + return $this->_driver->queueEnqueue(QUICKBOOKS_INTERACTIVE_MODE, $random, true, $priority, $user); } - + return false; } - + /** - * Register a recurring event - * - * Recurring events are actions that get queued up to run once every so - * often. So, for instance, if you want to make sure you issue a - * CustomerQuery every day, you can register a recurring event that occurs - * every day, and then the SOAP server/Web Connector will try to make sure - * that it gets run every day. - * - * Note that the SOAP server can't guarantee that an action will occur - * every interval *unless* the Web Connector is set to connect at that same + * Register a recurring event + * + * Recurring events are actions that get queued up to run once every so + * often. So, for instance, if you want to make sure you issue a + * CustomerQuery every day, you can register a recurring event that occurs + * every day, and then the SOAP server/Web Connector will try to make sure + * that it gets run every day. + * + * Note that the SOAP server can't guarantee that an action will occur + * every interval *unless* the Web Connector is set to connect at that same * interval or (preferably) more often. - * + * * @param mixed $run_every This can be either an integer number of seconds, or a string like: "15 minutes", "2 days", "hour", etc. * @param string $action The QuickBooks action you want to execute * @param mixed $ident An optional ident string (say you wanted to do a CustomerQuery for customer #14 every 15 minutes, you'd pass CustomerQuery for the action, and 14 for the ident) @@ -153,19 +153,19 @@ public function interactive($priority = 0, $user = null) * @param mixed $extra Any extra data to include for the request handler * @param string $user The username of the QuickBooks Web Connector user this event should be registered for * @param boolean $replace Whether or not this should replace any other recurring events with this action/ident - * @return boolean + * @return boolean */ public function recurring($run_every, $action, $ident = null, $priority = 0, $extra = null, $user = null, $qbxml = null, $replace = true) { $run_every = QuickBooks_Utilities::intervalToSeconds($run_every); - + if (!strlen($ident)) { $tmp = array_merge(array('a', 'z'), range(0, 9)); shuffle($tmp); $ident = substr(implode('', $tmp), 0, 8); } - + if ($this->_driver) { /* @@ -174,48 +174,48 @@ public function recurring($run_every, $action, $ident = null, $priority = 0, $ex $user = $this->_driver->authDefault(); } */ - + // Use the default user (provided in __construct) if none is given if (!$user) { $user = $this->_user; } - + return $this->_driver->recurEnqueue($user, $run_every, $action, substr($ident, 0, 40), $replace, $priority, $extra, $qbxml); } - + return false; } - + /** * Add a new item/action to the QuickBooks queue - * - * Queue up a request for an action/ident pair to be sent over to - * QuickBooks. The next time the Web Connector connects, your request - * handler for the given action will be called, generating a qbXML request - * which will then be passed to QuickBooks. QuickBooks will pass the - * response back to the SOAP server and your response handler will be - * called. - * + * + * Queue up a request for an action/ident pair to be sent over to + * QuickBooks. The next time the Web Connector connects, your request + * handler for the given action will be called, generating a qbXML request + * which will then be passed to QuickBooks. QuickBooks will pass the + * response back to the SOAP server and your response handler will be + * called. + * * @param string $action An action to be performed within QuickBooks (see the qbXML and QuickBooks SDK documentation, i.e.: "CustomerAdd", "InvoiceAdd", "CustomerMod", etc.) * @param mixed $ident A unique identifier (if required) for a record being operated on (i.e. if you're doing a "CustomerAdd", you'd probaly put a unique customer ID number here, so you're SOAP handler function knows which customer it is supposed to add) * @param integer $priority The priority of the update (higher priority actions will be pushed to QuickBooks before lower priority actions) * @param array $extra If you need to make additional bits of data available to your request/response functions, you can pass an array of extra data here - * @param string $user The username of the QuickBooks Web Connector user this item should be queued for + * @param string $user The username of the QuickBooks Web Connector user this item should be queued for * @param boolean $replace Whether or not to replace any other currently queued entries with the same action/ident * @return boolean - */ + */ public function enqueue($action, $ident = null, $priority = 0, $extra = null, $user = null, $qbxml = null, $replace = true) { if (!strlen($ident)) { // If they didn't provide an $ident, generate a random, unique one - + $tmp = array_merge(range('a', 'z'), range(0, 9)); shuffle($tmp); $ident = substr(implode('', $tmp), 0, 8); } - + if ($this->_driver) { /* @@ -224,22 +224,22 @@ public function enqueue($action, $ident = null, $priority = 0, $extra = null, $u $user = $this->_driver->authDefault(); } */ - + // Use the default user (provided in __construct) if none is given if (!$user) { $user = $this->_user; } - + return $this->_driver->queueEnqueue($user, $action, substr($ident, 0, 40), $replace, $priority, $extra, $qbxml); } - + return false; } - + /** * Tell whether or not an action/ident already exists in the queue - * + * * @param string $action An action to be performed within QuickBooks * @param mixed $ident A unique identifier (if required) for the record being operated on * @param string $user The username of the user to check if the queued item exists for @@ -253,17 +253,17 @@ public function exists($action, $ident, $user = null) if (!$user) { $user = $this->_user; - } - + } + return $this->_driver->queueExists($user, $action, $ident); } - + return null; } - + /** * Tell the number of items currently in the queue - * + * * @param string $user The username of the user to check the queue size for * @return integer The number of items in the queue */ @@ -276,17 +276,17 @@ public function size($user = null) { $user = $this->_user; } - + $queued = true; return $this->_driver->queueLeft($user, $queued); } - + return null; } - + /** * Forcibly remove an item from the queue - * + * * @param string $action * @param string $ident * @param string $user @@ -301,55 +301,55 @@ public function remove($action, $ident, $user = null) { $user = $this->_user; } - + $ticket = null; $new_status = QUICKBOOKS_STATUS_CANCELLED; return $this->_driver->queueRemove($user, $action, $ident); } - + return null; } - + /*public function identifier($type, $ident, $user = null) { $types = QuickBooks_Utilities::listObjects(); //if ( - + if ($this->_driver) { //if (!$user) //{ // $user = $this->_driver->authDefault(); //} - + // Use the default user (provided in __construct) if none is given if (!$user) { $user = $this->_user; - } - + } + $editseq = ''; return $this->_driver->identFetch($user, $type, $ident, $editseq); } - + return null; } - + public function sequence($type, $ident, $user = null) { - + } */ - + /** * Get debugging information from the queue - * + * * @return array */ public function debug() { return array( - 'driver' => var_export($this->_driver), + 'driver' => var_export($this->_driver), ); } } diff --git a/QuickBooks/WebConnector/Request.php b/QuickBooks/WebConnector/Request.php index 6a307e20..ad669113 100755 --- a/QuickBooks/WebConnector/Request.php +++ b/QuickBooks/WebConnector/Request.php @@ -2,16 +2,16 @@ /** * QuickBooks request base class - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Client */ @@ -22,8 +22,8 @@ abstract class QuickBooks_WebConnector_Request { /** - * - * + * + * * @param string $key * @param mixed $value * @return void diff --git a/QuickBooks/WebConnector/Request/Authenticate.php b/QuickBooks/WebConnector/Request/Authenticate.php index 6f4864b1..9b70b30f 100755 --- a/QuickBooks/WebConnector/Request/Authenticate.php +++ b/QuickBooks/WebConnector/Request/Authenticate.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Client */ @@ -22,14 +22,14 @@ QuickBooks_Loader::load('/QuickBooks/WebConnector/Request.php'); /** - * + * */ class QuickBooks_WebConnector_Request_Authenticate extends QuickBooks_WebConnector_Request { public $strUserName; - + public $strPassword; - + public function __construct($username = null, $password = null) { $this->strUserName = $username; diff --git a/QuickBooks/WebConnector/Request/Clientversion.php b/QuickBooks/WebConnector/Request/Clientversion.php index e1f3ba23..fab8474c 100755 --- a/QuickBooks/WebConnector/Request/Clientversion.php +++ b/QuickBooks/WebConnector/Request/Clientversion.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Client */ @@ -22,12 +22,12 @@ QuickBooks_Loader::load('/QuickBooks/WebConnector/Request.php'); /** - * + * */ class QuickBooks_WebConnector_Request_ClientVersion extends QuickBooks_WebConnector_Request { public $strVersion; - + public function __construct($version = null) { $this->strVersion = $version; diff --git a/QuickBooks/WebConnector/Request/Closeconnection.php b/QuickBooks/WebConnector/Request/Closeconnection.php index c93b7425..eb5fe3d5 100755 --- a/QuickBooks/WebConnector/Request/Closeconnection.php +++ b/QuickBooks/WebConnector/Request/Closeconnection.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Client */ @@ -22,14 +22,14 @@ QuickBooks_Loader::load('/QuickBooks/WebConnector/Request.php'); /** - * - * - * + * + * + * */ class QuickBooks_WebConnector_Request_CloseConnection extends QuickBooks_WebConnector_Request { public $ticket; - + public function __construct($ticket = null) { $this->ticket = $ticket; diff --git a/QuickBooks/WebConnector/Request/Connectionerror.php b/QuickBooks/WebConnector/Request/Connectionerror.php index 1e89e654..c4a5db0a 100755 --- a/QuickBooks/WebConnector/Request/Connectionerror.php +++ b/QuickBooks/WebConnector/Request/Connectionerror.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Client */ @@ -22,16 +22,16 @@ QuickBooks_Loader::load('/QuickBooks/WebConnector/Request.php'); /** - * - * - * + * + * + * */ class QuickBooks_WebConnector_Request_ConnectionError extends QuickBooks_WebConnector_Request { public $ticket; public $hresult; public $message; - + public function __construct($ticket = null, $hresult = null, $message = null) { $this->ticket = $ticket; diff --git a/QuickBooks/WebConnector/Request/Getlasterror.php b/QuickBooks/WebConnector/Request/Getlasterror.php index e734c27c..289965eb 100755 --- a/QuickBooks/WebConnector/Request/Getlasterror.php +++ b/QuickBooks/WebConnector/Request/Getlasterror.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Client */ @@ -22,14 +22,14 @@ QuickBooks_Loader::load('/QuickBooks/WebConnector/Request.php'); /** - * - * - * + * + * + * */ class QuickBooks_WebConnector_Request_GetLastError extends QuickBooks_WebConnector_Request { public $ticket; - + public function __construct($ticket = null) { $this->ticket = $ticket; diff --git a/QuickBooks/WebConnector/Request/Receiveresponsexml.php b/QuickBooks/WebConnector/Request/Receiveresponsexml.php index c6ddc6b7..a03f2d2a 100755 --- a/QuickBooks/WebConnector/Request/Receiveresponsexml.php +++ b/QuickBooks/WebConnector/Request/Receiveresponsexml.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Client */ @@ -22,20 +22,20 @@ QuickBooks_Loader::load('/QuickBooks/WebConnector/Request.php'); /** - * - * - * + * + * + * */ class QuickBooks_WebConnector_Request_ReceiveResponseXML extends QuickBooks_WebConnector_Request { public $ticket; - + public $hresult; - + public $message; - + public $response; - + public function __construct($ticket = null, $response = null, $hresult = null, $message = null) { $this->ticket = $ticket; diff --git a/QuickBooks/WebConnector/Request/Sendrequestxml.php b/QuickBooks/WebConnector/Request/Sendrequestxml.php index 545c3e7a..8fa75ce6 100755 --- a/QuickBooks/WebConnector/Request/Sendrequestxml.php +++ b/QuickBooks/WebConnector/Request/Sendrequestxml.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Client */ @@ -22,24 +22,24 @@ QuickBooks_Loader::load('/QuickBooks/WebConnector/Request.php'); /** - * - * - * + * + * + * */ class QuickBooks_WebConnector_Request_SendRequestXML extends QuickBooks_WebConnector_Request { public $ticket; - + public $strHCPResponse; - + public $strCompanyFileName; - + public $qbXMLCountry; - + public $qbXMLMajorVers; - + public $qbXMLMinorVers; - + public function __construct($ticket = null, $hcpresponse = null, $companyfile = null, $country = null, $majorversion = null, $minorversion = null) { $this->ticket = $ticket; diff --git a/QuickBooks/WebConnector/Request/Serverversion.php b/QuickBooks/WebConnector/Request/Serverversion.php index b01d8d11..fed7415d 100755 --- a/QuickBooks/WebConnector/Request/Serverversion.php +++ b/QuickBooks/WebConnector/Request/Serverversion.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Client */ @@ -22,14 +22,14 @@ QuickBooks_Loader::load('/QuickBooks/WebConnector/Request.php'); /** - * - * - * + * + * + * */ class QuickBooks_WebConnector_Request_ServerVersion extends QuickBooks_WebConnector_Request { public function __construct() { - + } } diff --git a/QuickBooks/WebConnector/Result.php b/QuickBooks/WebConnector/Result.php index 634d4bba..983693c2 100755 --- a/QuickBooks/WebConnector/Result.php +++ b/QuickBooks/WebConnector/Result.php @@ -2,19 +2,19 @@ /** * QuickBooks result base class - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * - * Result subclasses are returned by the SOAP server handler methods to pass - * data back to the QuickBooks web connector. - * + * + * Result subclasses are returned by the SOAP server handler methods to pass + * data back to the QuickBooks web connector. + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ diff --git a/QuickBooks/WebConnector/Result/Authenticate.php b/QuickBooks/WebConnector/Result/Authenticate.php index 30e4d01b..55b574b6 100755 --- a/QuickBooks/WebConnector/Result/Authenticate.php +++ b/QuickBooks/WebConnector/Result/Authenticate.php @@ -2,16 +2,16 @@ /** * Result container object for the SOAP ->authenticate() method call - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -28,26 +28,26 @@ class QuickBooks_WebConnector_Result_Authenticate extends QuickBooks_WebConnecto { /** * A two element array indicating the result of the call to ->authenticate() - * + * * @var array */ public $authenticateResult; - + /** * Create a new result object - * + * * @param string $ticket The ticket of the new login session * @param string $status The status of the new login session (blank, a company file path, or "nvu" for an invalid login) */ public function __construct($ticket, $status, $wait_before_next_update = null, $min_run_every_n_seconds = null) { $this->authenticateResult = array( $ticket, $status ); - + if ((int) $wait_before_next_update) { $this->authenticateResult[] = (int) $wait_before_next_update; } - + if ((int) $min_run_every_n_seconds) { $this->authenticateResult[] = (int) $min_run_every_n_seconds; diff --git a/QuickBooks/WebConnector/Result/ClientVersion.php b/QuickBooks/WebConnector/Result/ClientVersion.php index 2c34d746..70e99a97 100755 --- a/QuickBooks/WebConnector/Result/ClientVersion.php +++ b/QuickBooks/WebConnector/Result/ClientVersion.php @@ -2,16 +2,16 @@ /** * Result container object for the SOAP ->clientVersion() method call - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -28,14 +28,14 @@ class QuickBooks_WebConnector_Result_ClientVersion extends QuickBooks_WebConnect { /** * Client version response string (empty string, E:..., W:..., or O:... - * + * * @var string The response string */ public $clientVersionResult; - + /** * Create a new result object - * + * * @param string $response The response string */ public function __construct($response) diff --git a/QuickBooks/WebConnector/Result/CloseConnection.php b/QuickBooks/WebConnector/Result/CloseConnection.php index 5b777d3f..d3af6bf5 100755 --- a/QuickBooks/WebConnector/Result/CloseConnection.php +++ b/QuickBooks/WebConnector/Result/CloseConnection.php @@ -2,16 +2,16 @@ /** * Result container object for the SOAP ->connectionError() method call - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -28,14 +28,14 @@ class QuickBooks_WebConnector_Result_CloseConnection extends QuickBooks_WebConne { /** * A message indicating the connection has been closed/update was successful - * + * * @var string */ public $closeConnectionResult; - + /** * Create a new result object - * + * * @param string $resp A message indicating the connection has been closed */ public function __construct($result) diff --git a/QuickBooks/WebConnector/Result/ConnectionError.php b/QuickBooks/WebConnector/Result/ConnectionError.php index 4219675e..69891308 100755 --- a/QuickBooks/WebConnector/Result/ConnectionError.php +++ b/QuickBooks/WebConnector/Result/ConnectionError.php @@ -2,16 +2,16 @@ /** * Result container object for the SOAP ->connectionError() method call - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -28,14 +28,14 @@ class QuickBooks_WebConnector_Result_ConnectionError extends QuickBooks_WebConne { /** * An error message - * + * * @var string */ public $connectionErrorResult; - + /** * Create a new result object - * + * * @param string $err An error message describing the problem */ public function __construct($err) diff --git a/QuickBooks/WebConnector/Result/Debug.php b/QuickBooks/WebConnector/Result/Debug.php index 2a5be015..741037f7 100755 --- a/QuickBooks/WebConnector/Result/Debug.php +++ b/QuickBooks/WebConnector/Result/Debug.php @@ -2,16 +2,16 @@ /** * Result container object for the SOAP ->authenticate() method call - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -28,14 +28,14 @@ class QuickBooks_WebConnector_Result_Debug extends QuickBooks_WebConnector_Resul { /** * A two element array indicating the result of the call to ->authenticate() - * + * * @var array */ public $debug; - + /** * Create a new result object - * + * * @param string $ticket The ticket of the new login session * @param string $status The status of the new login session (blank, a company file path, or "nvu" for an invalid login) */ diff --git a/QuickBooks/WebConnector/Result/GetInteractiveURL.php b/QuickBooks/WebConnector/Result/GetInteractiveURL.php index af9499a7..4148c0a1 100755 --- a/QuickBooks/WebConnector/Result/GetInteractiveURL.php +++ b/QuickBooks/WebConnector/Result/GetInteractiveURL.php @@ -2,16 +2,16 @@ /** * SOAP response container for ->getInteractiveURL() call - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -22,13 +22,13 @@ QuickBooks_Loader::load('/QuickBooks/WebConnector/Result.php'); /** - * + * */ class QuickBooks_WebConnector_Result_GetInteractiveURL extends QuickBooks_WebConnector_Result { - + public function __construct($url) { - + } } diff --git a/QuickBooks/WebConnector/Result/GetLastError.php b/QuickBooks/WebConnector/Result/GetLastError.php index ac60d7ce..641e0e8a 100755 --- a/QuickBooks/WebConnector/Result/GetLastError.php +++ b/QuickBooks/WebConnector/Result/GetLastError.php @@ -2,16 +2,16 @@ /** * Result container object for the SOAP ->getLastError() method call - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -28,14 +28,14 @@ class QuickBooks_WebConnector_Result_GetLastError extends QuickBooks_WebConnecto { /** * An error message - * + * * @param string $resp */ public $getLastErrorResult; - + /** * Create a new result object - * + * * @param string $resp A message describing the last error that occured */ public function __construct($result) diff --git a/QuickBooks/WebConnector/Result/InteractiveDone.php b/QuickBooks/WebConnector/Result/InteractiveDone.php index fbe8312f..c27cea8a 100755 --- a/QuickBooks/WebConnector/Result/InteractiveDone.php +++ b/QuickBooks/WebConnector/Result/InteractiveDone.php @@ -2,16 +2,16 @@ /** * QuickBooks response object for responses to the ->interactiveDone() SOAP method call - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -28,14 +28,14 @@ class QuickBooks_WebConnector_Result_InteractiveDone extends QuickBooks_WebConne { /** * A string indicating the interactive session is done - * + * * @var string */ public $interactiveDoneResult; - + /** * Create a new result object - * + * * @param string $version */ public function __construct($str) diff --git a/QuickBooks/WebConnector/Result/InteractiveRejected.php b/QuickBooks/WebConnector/Result/InteractiveRejected.php index 68e11087..44b946be 100755 --- a/QuickBooks/WebConnector/Result/InteractiveRejected.php +++ b/QuickBooks/WebConnector/Result/InteractiveRejected.php @@ -1,17 +1,17 @@ - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ diff --git a/QuickBooks/WebConnector/Result/ReceiveResponseXML.php b/QuickBooks/WebConnector/Result/ReceiveResponseXML.php index 2afbdfd0..0a2e2868 100755 --- a/QuickBooks/WebConnector/Result/ReceiveResponseXML.php +++ b/QuickBooks/WebConnector/Result/ReceiveResponseXML.php @@ -2,16 +2,16 @@ /** * Response result for the SOAP ->receiveRequestXML() method call - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -28,14 +28,14 @@ class QuickBooks_WebConnector_Result_ReceiveResponseXML extends QuickBooks_WebCo { /** * Integer indicating update progress - * + * * @var integer */ public $receiveResponseXMLResult; - + /** * Create a new ->receiveResponseXML result object - * + * * @param integer $complete An integer between 0 and 100 indicating the percentage complete this update is *OR* a negative integer indicating an error has occured */ public function __construct($complete) diff --git a/QuickBooks/WebConnector/Result/SendRequestXML.php b/QuickBooks/WebConnector/Result/SendRequestXML.php index dd388e13..6134ff26 100755 --- a/QuickBooks/WebConnector/Result/SendRequestXML.php +++ b/QuickBooks/WebConnector/Result/SendRequestXML.php @@ -2,16 +2,16 @@ /** * Response result for the SOAP ->sendRequestXML() method call - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -28,14 +28,14 @@ class QuickBooks_WebConnector_Result_SendRequestXML extends QuickBooks_WebConnec { /** * A QBXML XML request string - * + * * @var string */ public $sendRequestXMLResult; - + /** * Create a new result response - * + * * @param string $xml The XML request to send to QuickBooks */ public function __construct($xml) diff --git a/QuickBooks/WebConnector/Result/ServerVersion.php b/QuickBooks/WebConnector/Result/ServerVersion.php index e4a79671..8d2cc9f6 100755 --- a/QuickBooks/WebConnector/Result/ServerVersion.php +++ b/QuickBooks/WebConnector/Result/ServerVersion.php @@ -2,16 +2,16 @@ /** * QuickBooks response object for responses to the ->getServerVersion() SOAP method call - * + * * Copyright (c) {2010-04-16} {Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @author Keith Palmer - * @license LICENSE.txt - * + * @license LICENSE.txt + * * @package QuickBooks * @subpackage Server */ @@ -28,14 +28,14 @@ class QuickBooks_WebConnector_Result_ServerVersion extends QuickBooks_WebConnect { /** * A string describing the server version - * + * * @var string */ public $serverVersionResult; - + /** * Create a new result object - * + * * @param string $version */ public function __construct($version) diff --git a/QuickBooks/WebConnector/Server.php b/QuickBooks/WebConnector/Server.php index 7e86d1a2..83a1da6f 100755 --- a/QuickBooks/WebConnector/Server.php +++ b/QuickBooks/WebConnector/Server.php @@ -1,32 +1,32 @@ receiveResponseXML() * - If you return an integer between 0 and 99 (inclusive) from ->receiveResponseXML(), the QBWC will call ->sendRequestXML() again, to get the next qbXML command * - Once you return a 100 from ->receiveResponseXML(), the QBWC calls ->closeConnection() and closes the socket connection shortly thereafter - * + * * Troubleshooting: * - Errors which QuickBooks reports will be logged (check the quickbooks_queue and quickbooks_log tables in your database) * - If actions get stuck in the queue and never seem to be pulled out, it is most likely that you're generating badly-formed XML for that request. Check the XML document you're creating for well-formedness, *and especially* character set issues - * - The quickbooks_log database table shows everything that is happening - * + * - The quickbooks_log database table shows everything that is happening + * * @author Keith Palmer * @license LICENSE.txt - * + * * @package QuickBooks * @subpackage Server */ @@ -78,46 +78,46 @@ class QuickBooks_WebConnector_Server * @var string */ protected $_wsdl; - + /** * The logging level * @var integer */ protected $_loglevel; - + /** * Driver instance object * @var object */ protected $_driver; - + /** * Server instance object * @var object */ protected $_server; - + /** * Registered hook functions for the server - * @var array + * @var array */ protected $_hooks; - + /** * An array of data to pass to every callback function * @var array */ protected $_callback_config; - + /** * The raw input to the script * @var string */ protected $_input; - + /** * Create a new QuickBooks SOAP server - * + * * @param mixed $dsn_or_conn Either a DSN-style connection string *or* a database resource (if reusing an existing connection) * @param array $map An associative array mapping queued commands to function/method calls * @param array $onerror An associative array mapping error codes to function/method calls @@ -130,13 +130,13 @@ class QuickBooks_WebConnector_Server public function __construct($dsn_or_conn, $map, $onerror = array(), $hooks = array(), $log_level = QUICKBOOKS_LOG_NORMAL, $soap = QUICKBOOKS_SOAPSERVER_BUILTIN, $wsdl = QUICKBOOKS_WSDL, $soap_options = array(), $handler_options = array(), $driver_options = array(), $callback_options = array()) { $soap_options = $this->_defaults($soap_options); - - // If safe mode is turned on, this causes a NOTICE/WARNING to be issued... + + // If safe mode is turned on, this causes a NOTICE/WARNING to be issued... if (!ini_get('safe_mode')) { set_time_limit($soap_options['time_limit']); } - + /* if ($soap_options['error_handler']) { @@ -146,32 +146,32 @@ public function __construct($dsn_or_conn, $map, $onerror = array(), $hooks = arr { set_error_handler( array( 'QuickBooks_ErrorHandler', 'handle' ) ); } - + if ($soap_options['log_to_syslog']) { - + } - + if ($soap_options['log_to_file']) { - + } - */ + */ // WSDL location $this->_wsdl = $wsdl; - + // Logging level $this->_loglevel = $log_level; - + if ($this->_loglevel >= QUICKBOOKS_LOG_DEVELOP) { $this->_driver = QuickBooks_Utilities::driverFactory($dsn_or_conn, $driver_options, $hooks, $log_level); } - + // SOAP server adapter class $this->_server = $this->_adapterFactory($soap, $wsdl, $soap_options, $log_level); - + /* $this->_hooks = array(); foreach ($hooks as $hook => $funcs) @@ -180,31 +180,31 @@ public function __construct($dsn_or_conn, $map, $onerror = array(), $hooks = arr { $funcs = array( $funcs ); } - + $hooks[$hook] = $funcs; // Do this so that when we pass it to the handlers, the hooks are already in lists $this->_hooks[$hook] = $funcs; } */ - + // Assign hooks $this->_hooks = $hooks; - + // Assign callback configuration info $this->_callback_config = $callback_options; - + // Raw input $input = file_get_contents('php://input'); - + $this->_input = $input; - + // Base handlers // $dsn_or_conn, $map, $onerror, $hooks, $log_level, $input, $handler_config = array(), $driver_config = array() $this->_server->setClass('QuickBooks_WebConnector_Handlers', $dsn_or_conn, $map, $onerror, $hooks, $log_level, $input, $handler_options, $driver_options, $callback_options); } - + /** * Get an adapter class instance - * + * * @param string $adapter * @param string $wsdl * @param array $soap_options @@ -214,50 +214,50 @@ public function __construct($dsn_or_conn, $map, $onerror = array(), $hooks = arr protected function _adapterFactory($adapter, $wsdl, $soap_options, $loglevel) { $adapter = ucfirst(strtolower($adapter)); - + $file = '/QuickBooks/Adapter/Server/' . $adapter . '.php'; $class = 'QuickBooks_Adapter_Server_' . $adapter; - + QuickBooks_Loader::load($file); - + if (class_exists($class)) { return new $class($wsdl, $soap_options); } - + return null; } - + /** * Merge configurations with the defaults - * + * * @param array $arr - * @return array + * @return array */ final protected function _defaults($arr) { $defaults = array( - 'error_handler' => '', - 'use_builtin_error_handler' => false, - 'time_limit' => 0, - 'log_to_file' => null, - 'log_to_syslog' => null, - 'masking' => true, + 'error_handler' => '', + 'use_builtin_error_handler' => false, + 'time_limit' => 0, + 'log_to_file' => null, + 'log_to_syslog' => null, + 'masking' => true, ); - + $arr = array_merge($defaults, $arr); - + return $arr; } /** * Merge two arrays, allowing $arr2 to be merged over matching keys in $arr1 - * - * If $arr1 or $arr2 are arrays of arrays, and $array_of_arrays is set to - * true, then the arrays of arrays will be merged, allowing $arr2 to - * override $arr1 entries. If the arrays of arrays are numerically indexed, - * $arr2 entries will be appended to $arr1 entries. - * + * + * If $arr1 or $arr2 are arrays of arrays, and $array_of_arrays is set to + * true, then the arrays of arrays will be merged, allowing $arr2 to + * override $arr1 entries. If the arrays of arrays are numerically indexed, + * $arr2 entries will be appended to $arr1 entries. + * * @param array $arr1 * @param array $arr2 * @param boolean $array_of_arrays @@ -273,14 +273,14 @@ protected function _merge($arr1, $arr2, $array_of_arrays = false) { $funcs = array( $funcs ); } - + if (isset($arr1[$key])) { if (!is_array($arr1[$key])) { $arr1[$key] = array( $arr1[$key] ); } - + $arr1[$key] = array_merge($arr1[$key], $funcs); } else @@ -288,26 +288,26 @@ protected function _merge($arr1, $arr2, $array_of_arrays = false) $arr1[$key] = $funcs; } } - + return $arr1; } else { // *DO NOT* use array_merge() here, it screws things up!!! //return array_merge($arr1, $arr2); - + foreach ($arr2 as $key => $value) { $arr1[$key] = $value; } - + return $arr1; } } - + /** * Send the correct HTTP headers for this request - * + * * @return boolean */ protected function _headers() @@ -324,10 +324,10 @@ protected function _headers() { header('Content-Type: text/plain'); } - + return true; } - + /** * Log a message to the error/debug log * @@ -339,20 +339,20 @@ protected function _headers() protected function _log($msg, $ticket, $level = QUICKBOOKS_LOG_NORMAL) { $Driver = $this->_driver; - + $msg = QuickBooks_Utilities::mask($msg); - + if ($Driver) { return $Driver->log($msg, $ticket, $level); } - + return false; } - + /** * Handle the SOAP request - * + * * @param boolean $return * @param boolean $debug * @return void @@ -361,14 +361,14 @@ public function handle($return = false, $debug = false) { // Get the raw input $input = $this->_input; - - // + + // if ($_SERVER['REQUEST_METHOD'] == 'POST') { $this->_headers(); - + $output_buffering = false; - + /* if (isset($this->_hooks[QUICKBOOKS_SERVER_HOOK_PREHANDLE])) { @@ -378,15 +378,15 @@ public function handle($return = false, $debug = false) } } */ - + $hook_data = array( - 'input' => $input, + 'input' => $input, ); - + $err = ''; $this->_callHooks(QUICKBOOKS_SERVER_HOOK_PREHANDLE, null, null, null, $err, $hook_data); //QuickBooks_Callbacks::callHook($this->_driver, $this->_hooks, QUICKBOOKS_SERVER_HOOK_PREHANDLE, null, null, null, $err, $hook_data, $this->_callback_config, __FILE__, __LINE__); - + if ($this->_loglevel >= QUICKBOOKS_LOG_DEVELOP) { if (function_exists('apache_request_headers')) @@ -394,27 +394,27 @@ public function handle($return = false, $debug = false) $headers = ''; foreach (apache_request_headers() as $header => $value) { - $headers .= $header . ': ' . $value . "\n"; + $headers .= $header . ': ' . $value . "\n"; } - + //$this->_driver->log('Incoming HTTP Headers: ' . $headers, null, QUICKBOOKS_LOG_DEVELOP); $this->_log('Incoming HTTP Headers: ' . $headers, null, QUICKBOOKS_LOG_DEVELOP); } - + //$this->_driver->log('Incoming SOAP Request: ' . $input, null, QUICKBOOKS_LOG_DEVELOP); $this->_log('Incoming SOAP Request: ' . $input, null, QUICKBOOKS_LOG_DEVELOP); } - + if ($return or isset($this->_hooks[QUICKBOOKS_SERVER_HOOK_POSTHANDLE])) { $output_buffering = true; ob_start(); } - + $this->_server->handle($input); - - if ($return or - isset($this->_hooks[QUICKBOOKS_SERVER_HOOK_POSTHANDLE]) or + + if ($return or + isset($this->_hooks[QUICKBOOKS_SERVER_HOOK_POSTHANDLE]) or $this->_loglevel >= QUICKBOOKS_LOG_DEVELOP) { $output = ''; @@ -423,7 +423,7 @@ public function handle($return = false, $debug = false) $output = ob_get_contents(); ob_end_flush(); } - + /* if (isset($this->_hooks[QUICKBOOKS_SERVER_HOOK_POSTHANDLE])) { @@ -433,28 +433,28 @@ public function handle($return = false, $debug = false) } } */ - + $hook_data = array( 'input' => $input, - 'output' => $output, + 'output' => $output, ); - + $err = ''; $this->_callHooks(QUICKBOOKS_SERVER_HOOK_POSTHANDLE, null, null, null, $err, $hook_data); //QuickBooks_Callbacks::callHook($this->_driver, $this->_hooks, QUICKBOOKS_SERVER_HOOK_POSTHANDLE, null, null, null, $err, $hook_data, $this->_callback_config); - + if ($this->_loglevel >= QUICKBOOKS_LOG_DEVELOP) { //$this->_driver->log('Outgoing SOAP Response: ' . $output, null, QUICKBOOKS_LOG_DEVELOP); $this->_log('Outgoing SOAP Response: ' . $output, null, QUICKBOOKS_LOG_DEVELOP); } - + if ($return) { return $output; } } - + return; } else if (isset($_GET['WSDL']) or isset($_GET['wsdl'])) @@ -476,7 +476,7 @@ public function handle($return = false, $debug = false) print("\n"); print('Use the QuickBooks Web Connector to access this SOAP server.' . "\n"); print("\n"); - + if ($debug) { print(get_class($this) . str_replace(__CLASS__, '', __METHOD__) . '() parameters: ' . "\n"); @@ -485,28 +485,28 @@ public function handle($return = false, $debug = false) print("\n"); print('Misc. information: ' . "\n"); print(' - Logging: ' . $this->_loglevel . "\n"); - + if (function_exists('date_default_timezone_get')) { print(' - Timezone: ' . date_default_timezone_get() . ' (Auto-set: '); - + if (QUICKBOOKS_TIMEZONE_AUTOSET) { print('Yes'); } - + print(')' . "\n"); } print(' - Current Date/Time: ' . date('Y-m-d H:i:s') . "\n"); print(' - Error Reporting: ' . error_reporting() . "\n"); - + print("\n"); print('SOAP adapter: ' . "\n"); print(' - ' . get_class($this->_server) . "\n"); print("\n"); print('Registered handler functions: ' . "\n"); print_r($this->_server->getFunctions()); - + /* print("\n"); print('Registered hooks: ' . "\n"); @@ -517,17 +517,17 @@ public function handle($return = false, $debug = false) { continue; } - + print(' - ' . $hook . QUICKBOOKS_CRLF); foreach ($arr as $x) { $y = current(explode("\n", print_r($x, true))); - + print(' ' . $y . QUICKBOOKS_CRLF); } } */ - + print("\n"); print('Detected input: ' . "\n"); print($input); @@ -536,14 +536,14 @@ public function handle($return = false, $debug = false) print('Timestamp: ' . "\n"); print(' - ' . date('Y-m-d H:i:s') . ' -- process ' . round(microtime(true) - QUICKBOOKS_TIMESTAMP, 5) . "\n"); } - + return; } } - + /** - * - * + * + * * @param string $hook * @param string $requestID * @param string $user @@ -556,21 +556,21 @@ protected function _callHooks($hook, $requestID, $user, $ticket, &$err, $hook_da { $err = ''; return QuickBooks_Callbacks::callHook( - $this->_driver, - $this->_hooks, - $hook, - $requestID, - $user, - $ticket, - $err, - $hook_data, - $this->_callback_config); + $this->_driver, + $this->_hooks, + $hook, + $requestID, + $user, + $ticket, + $err, + $hook_data, + $this->_callback_config); } - + /** * Get debugging information from the SOAP server - * - * @return array + * + * @return array */ public function debug() { diff --git a/QuickBooks/XML.php b/QuickBooks/XML.php index b58ec3c5..679f3ebf 100755 --- a/QuickBooks/XML.php +++ b/QuickBooks/XML.php @@ -2,13 +2,13 @@ /** * XML constants (and backward compat. class) - * + * * Copyright (c) 2010-04-16 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @package QuickBooks * @subpackage XML */ @@ -48,58 +48,58 @@ class QuickBooks_XML * @var integer */ const ERROR_OK = 0; - + /** * Alias of QUICKBOOKS_XML_ERROR_OK */ const OK = 0; - + /** * Indicates a tag mismatch/bad tag order * @var integer */ const ERROR_MISMATCH = 1; - + /** - * Indicates garbage somewhere in the XML stream + * Indicates garbage somewhere in the XML stream * @var integer */ const ERROR_GARBAGE = 2; - + /** * Indicates a bad XML entity * @var integer */ const ERROR_ENTITY = 3; - + /** * Indicates a dangling XML attribute after parsing * @var integer */ const ERROR_DANGLING = 4; - + /** * Internal XML parser error * @var integer */ const ERROR_INTERNAL = 5; - + /** * No content to parse error * @var integer */ const ERROR_CONTENT = 6; - + /** - * + * */ const PARSER_BUILTIN = 'builtin'; - + /** - * + * */ const PARSER_SIMPLEXML = 'simplexml'; - + /** * * $xml = ' @@ -107,84 +107,84 @@ class QuickBooks_XML * Keith * * '; - * + * * $arr = array( * 'Person' => array( - * 'Name' => 'Keith', - * ), + * 'Name' => 'Keith', + * ), * ); * */ const ARRAY_NOATTRIBUTES = 'no-attrs'; - + /** - * + * * * $arr = array( * 'Person' => array( * 'Name' => 'Keith', - * 'Name_type' => 'firstname', - * ), + * 'Name_type' => 'firstname', + * ), * ); * - * + * */ const ARRAY_EXPANDATTRIBUTES = 'child-attrs'; - + /** * * $arr = array( * 0 => array( - * 'name' => 'Person', + * 'name' => 'Person', * 'attributes' => array( ), * 'children' => array( * 0 => array( - * 'name' => 'Name', - * 'attributes' => array( - * 'type' => 'firstname', - * ), - * 'children' => array( ), - * 'data' => 'Keith', - * ), - * ), - * 'data' => null, - * ), + * 'name' => 'Name', + * 'attributes' => array( + * 'type' => 'firstname', + * ), + * 'children' => array( ), + * 'data' => 'Keith', + * ), + * ), + * 'data' => null, + * ), * ); * */ const ARRAY_BRANCHED = 'branched'; - + /** - * + * * * $arr = array( - * 'Person Name' => 'Keith', + * 'Person Name' => 'Keith', * ); * - * + * */ const ARRAY_PATHS = 'paths'; - + /** * Flag to compress empty XML elements - * + * * * Keith * * - * + * * @note Defined as an integer for backwards compat. - * @var integer + * @var integer */ const XML_COMPRESS = 1; - + /** * Flag to drop empty XML elements - * + * * * Keith * - * + * * @note Defined as an integer for backwards compat. * @var integer */ @@ -192,85 +192,85 @@ class QuickBooks_XML /** * Flag to preserve empty elements - * + * * * Keith * * - * + * * @note Defined as an integer for backwards compat. * @var integer */ const XML_PRESERVE = 0; - + /** * Extract the contents from a particular XML tag in an XML string - * + * * * $xml = 'bla blable ble'; * $contents = QuickBooks_Utilities::_extractTagContents('stuff', $xml); * print($contents); // prints "bla bla" * - * - * @param string $tag The XML tag to extract the contents from + * + * @param string $tag The XML tag to extract the contents from * @param string $data The XML document * @return string The contents of the tag - */ + */ static public function extractTagContents($tag, $data) { $tag = trim($tag, '<> '); - - if (false !== strpos($data, '<' . $tag . '>') and + + if (false !== strpos($data, '<' . $tag . '>') and false !== strpos($data, '')) { $data = strstr($data, '<' . $tag . '>'); $end = strpos($data, ''); - + return substr($data, strlen($tag) + 2, $end - (strlen($tag) + 2)); } - + return null; - } - + } + // @todo Documentation static public function extractTagAttribute($attribute, $tag_w_attrs, $which = 0) { /* - if (false !== ($start = strpos($tag_w_attrs, $attribute . '="')) and + if (false !== ($start = strpos($tag_w_attrs, $attribute . '="')) and false !== ($end = strpos($tag_w_attrs, '"', $start + strlen($attribute) + 2))) { return substr($tag_w_attrs, $start + strlen($attribute) + 2, $end - $start - strlen($attribute) - 2); } - + return null; */ - + $attr = $attribute; $data = $tag_w_attrs; - + if ($which == 1) { $spos = strpos($data, $attr . '="'); $data = substr($data, $spos + strlen($attr)); } - - if (false !== ($spos = strpos($data, $attr . '="')) and + + if (false !== ($spos = strpos($data, $attr . '="')) and false !== ($epos = strpos($data, '"', $spos + strlen($attr) + 2))) { //print('start: ' . $spos . "\n"); //print('end: ' . $epos . "\n"); - + return substr($data, $spos + strlen($attr) + 2, $epos - $spos - strlen($attr) - 2); } - + return ''; } - + /** * Extract the attributes from a tag container - * + * * @todo Holy confusing code Batman! - * + * * @param string $tag_w_attributes * @param string $tag * @param array $attributes @@ -280,33 +280,33 @@ static public function extractTagAttributes($tag_w_attrs, $return_tag_first = fa { $tag = ''; $attributes = array(); - + $tag_w_attrs = trim($tag_w_attrs); - + /*if (substr($tag_w_attrs, -1, 1) == '/') // condensed empty tag { $tag = trim($tag_w_attrs, '/ '); $attributes = array(); } - else*/ + else*/ if (false !== strpos($tag_w_attrs, ' ')) { $tmp = explode(' ', $tag_w_attrs); //$tag = trim(array_shift($tmp), " \n\r\t<>"); $tag = trim(array_shift($tmp)); - + $attributes = array(); - + $attrs = trim(implode(' ', $tmp)); $length = strlen($attrs); - + $key = ''; $value = ''; $in_key = true; $in_value = false; $expect_key = false; $expect_value = false; - + for ($i = 0; $i < $length; $i++) { if ($attrs[$i] == '=') @@ -331,10 +331,10 @@ static public function extractTagAttributes($tag_w_attrs, $return_tag_first = fa else if (($attrs[$i] == '"' or $attrs[$i] == '\'') and $in_value) { $attributes[trim($key)] = $value; - + $key = ''; $value = ''; - + $in_value = false; $expect_key = true; } @@ -352,7 +352,7 @@ static public function extractTagAttributes($tag_w_attrs, $return_tag_first = fa $value .= $attrs[$i]; } } - + /* foreach ($tmp as $attribute) { @@ -360,7 +360,7 @@ static public function extractTagAttributes($tag_w_attrs, $return_tag_first = fa { $key = trim(substr($attribute, 0, $pos)); $value = trim(substr($attribute, $pos + 1), '"'); - + $attributes[$key] = $value; } }*/ @@ -370,37 +370,37 @@ static public function extractTagAttributes($tag_w_attrs, $return_tag_first = fa $tag = $tag_w_attrs; $attributes = array(); } - + // This returns the actual tag without attributes as the first key of the array if ($return_tag_first) { array_unshift($attributes, $tag); } - + return $attributes; } - + /** * Encode a string for use within an XML document * * @todo Investigate QuickBooks qbXML encoding and implement solution - * + * * @param string $str The string to encode - * @param boolean $for_qbxml + * @param boolean $for_qbxml * @return string */ static public function encode($str, $for_qbxml = true, $double_encode = true) { $transform = array( - '&' => '&', - '<' => '<', - '>' => '>', - //'\'' => ''', - '"' => '"', + '&' => '&', + '<' => '<', + '>' => '>', + //'\'' => ''', + '"' => '"', ); - + $str = str_replace(array_keys($transform), array_values($transform), $str); - + if (!$double_encode) { $fix = array(); @@ -408,33 +408,33 @@ static public function encode($str, $for_qbxml = true, $double_encode = true) { $fix[str_replace('&', '&', $encoded)] = $encoded; } - + $str = str_replace(array_keys($fix), array_values($fix), $str); } - + return $str; } - + /** * Decode a string for use within an XML document * * @todo Investigate QuickBooks qbXML encoding and implement solution - * + * * @param string $str The string to encode - * @param boolean $for_qbxml + * @param boolean $for_qbxml * @return string */ static public function decode($str, $for_qbxml = true) { $transform = array( - '<' => '<', - '>' => '>', - ''' => '\'', - '"' => '"', + '<' => '<', + '>' => '>', + ''' => '\'', + '"' => '"', '&' => '&', // Make sure that this is *the last* transformation to run, otherwise we end up double-un-encoding things ); - - return str_replace(array_keys($transform), array_values($transform), $str); + + return str_replace(array_keys($transform), array_values($transform), $str); } } diff --git a/QuickBooks/XML/Backend.php b/QuickBooks/XML/Backend.php index c66ee2e4..06acca18 100644 --- a/QuickBooks/XML/Backend.php +++ b/QuickBooks/XML/Backend.php @@ -2,52 +2,52 @@ /** * XML parser interface - * + * * Copyright (c) 2010-04-16 Keith Palmer / ConsoliBYTE, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.opensource.org/licenses/eclipse-1.0.php - * + * * @package QuickBooks * @subpackage XML */ /** * XML parser interface - * - * + * + * */ interface QuickBooks_XML_Backend { /** * Create the XML parser - * + * * @param string $xml */ public function __construct($xml); - + /** * Validate the XML string - * + * * @param integer $errnum * @param string $errmsg * @return boolean */ public function validate(&$errnum, &$errmsg); - + /** * Parse an XML string - * + * * @param integer $errnum * @param string $errmsg * @return QuickBooks_XML_Document */ public function parse(&$errnum, &$errmsg); - + /** * Load a new string to parse - * + * * @param string $str * @return boolean */ diff --git a/QuickBooks/XML/Backend/Builtin.php b/QuickBooks/XML/Backend/Builtin.php index 76849412..034ae3e7 100644 --- a/QuickBooks/XML/Backend/Builtin.php +++ b/QuickBooks/XML/Backend/Builtin.php @@ -3,29 +3,29 @@ class QuickBooks_XML_Backend_Builtin implements QuickBooks_XML_Backend { protected $_xml; - + public function __construct($xml) { $this->_xml = $xml; } - + public function load($xml) { $this->_xml = $xml; - + return strlen($xml) > 0; } - + public function validate(&$errnum, &$errmsg) { if (!strlen($this->_xml)) { return false; } - + $stack = array(); $xml = $this->_xml; - + // Remove comments while (false !== strpos($xml, ' STRTYPE - + QUANTYPE AMTTYPE - QUANTYPE + QUANTYPE QUANTYPE - + QUANTYPE @@ -124,7 +124,7 @@ AMTTYPE - + GUIDTYPE diff --git a/data/schema/InvoiceQuery.xml b/data/schema/InvoiceQuery.xml index ab91ed3c..084bbd9b 100755 --- a/data/schema/InvoiceQuery.xml +++ b/data/schema/InvoiceQuery.xml @@ -244,7 +244,7 @@ STRTYPE STRTYPE - + GUIDTYPE STRTYPE diff --git a/data/schema/TermsQuery.xml b/data/schema/TermsQuery.xml index a08e0aa7..ea5fd961 100755 --- a/data/schema/TermsQuery.xml +++ b/data/schema/TermsQuery.xml @@ -42,7 +42,7 @@ INTTYPE PERCENTTYPE - + IDTYPE @@ -56,7 +56,7 @@ INTTYPE PERCENTTYPE - + diff --git a/dev/DO_NOT_USE_THESE_FILES.txt b/dev/DO_NOT_USE_THESE_FILES.txt index eadccb3c..7472df61 100644 --- a/dev/DO_NOT_USE_THESE_FILES.txt +++ b/dev/DO_NOT_USE_THESE_FILES.txt @@ -1,4 +1,4 @@ -DO NOT USE THE EXAMPLES IN THIS FOLDER! +DO NOT USE THE EXAMPLES IN THIS FOLDER! THESE ARE ALL DEVELOPMENT/TEST SCRIPTS, AND ARE NOT PRODUCTION READY! \ No newline at end of file diff --git a/dev/dev_ids_accounts.php b/dev/dev_ids_accounts.php index d563ee77..b441c205 100755 --- a/dev/dev_ids_accounts.php +++ b/dev/dev_ids_accounts.php @@ -5,13 +5,13 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = 'password42'; $token = 'tex3r7hwifx6cci3zk43ibmnd'; $realmID = 173642438; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); $IPP->application($Context, 'be9mh7qd5'); diff --git a/dev/dev_ids_customers.php b/dev/dev_ids_customers.php index 7be9333b..479683ea 100755 --- a/dev/dev_ids_customers.php +++ b/dev/dev_ids_customers.php @@ -9,35 +9,35 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = 'password42'; $token = 'tex3r7hwifx6cci3zk43ibmnd'; $realmID = 173642438; -// +// $IPP = new QuickBooks_IPP(); if ($Context = $IPP->authenticate($username, $password, $token)) { $IPP->application($Context, 'be9mh7qd5'); - + $user = $IPP->getUserInfo($Context); print_r($user); - + //exit; - + $Service = new QuickBooks_IPP_Service_Customer(); - + if ($list = $Service->findAll($Context, $realmID)) { //print_r($list); - + foreach ($list as $Customer) { print('Name is [' . $Customer->getName() . ']' . "\n"); } } - + //print($Service->lastRequest()); //print($Service->lastResponse()); } diff --git a/dev/dev_ids_discounts.php b/dev/dev_ids_discounts.php index 1548b881..5b7e3e91 100755 --- a/dev/dev_ids_discounts.php +++ b/dev/dev_ids_discounts.php @@ -9,24 +9,24 @@ require_once '../QuickBooks.php'; -// +// $username = 'support@consolibyte.com'; $password = ''; $token = ''; $realmID = 182938192; -// +// $IPP = new QuickBooks_IPP(); if ($Context = $IPP->authenticate($username, $password, $token)) { $IPP->application($Context, 'bf4in6uym'); - + $Service = new QuickBooks_IPP_Service_Discount(); - + $list = $Service->findAll($Context, $realmID); - + //print_r($list); - + foreach ($list as $Discount) { //print_r($Discount); diff --git a/dev/dev_ids_employees.php b/dev/dev_ids_employees.php index 7377a628..04ff36a6 100644 --- a/dev/dev_ids_employees.php +++ b/dev/dev_ids_employees.php @@ -5,14 +5,14 @@ require_once '../QuickBooks.php'; -// +// $username = 'support@consolibyte.com'; $password = '$up3rW0rmy42'; $token = 'bf8cp2mihs6vsdibgqsybinugvj'; $realmID = 182938192; $application = 'bfrccpnge'; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); $IPP->application($Context, $application); @@ -20,7 +20,7 @@ //$IPP->useIDSParser(false); -$Service = new QuickBooks_IPP_Service_Employee(); +$Service = new QuickBooks_IPP_Service_Employee(); $Employee = $Service->findById($Context, $realmID, '{NG-124029}'); diff --git a/dev/dev_ids_errors.php b/dev/dev_ids_errors.php index 7d819bf1..cd2ff1ea 100755 --- a/dev/dev_ids_errors.php +++ b/dev/dev_ids_errors.php @@ -6,13 +6,13 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = 'password42'; $token = 'tex3r7hwifx6cci3zk43ibmnd'; $realmID = 173642438; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); $IPP->application($Context, 'be9mh7qd5'); diff --git a/dev/dev_ids_estimates.php b/dev/dev_ids_estimates.php index dc93eb8c..40a24893 100644 --- a/dev/dev_ids_estimates.php +++ b/dev/dev_ids_estimates.php @@ -5,13 +5,13 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = 'password42'; $token = 'tex3r7hwifx6cci3zk43ibmnd'; $realmID = 173642438; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); $IPP->application($Context, 'be9mh7qd5'); @@ -25,7 +25,7 @@ { print('Estimate ' . $Estimate->getId() . ' / #' . $Estimate->getHeader()->getDocNumber() . ' is to be emailed: ' . $Estimate->getHeader()->getToBeEmailed() . "\n"); print(' Should we email it? '); - + if ($Estimate->getHeader()->getToBeEmailed()) { print('YES'); @@ -34,23 +34,23 @@ { print('NO'); } - + print("\n"); - + for ($i = 0; $i < 10; $i++) { $Line = $Estimate->getLine($i); - + if ($Line) { print($Line->getDescription() . ' $ ' . $Line->getUnitPrice() . ' x ' . $Line->getQuantity() . "\n"); //print_r($Line); } } - + print("\n"); print("\n"); - + $ID = $Estimate->getId(); break; } diff --git a/dev/dev_ids_invoices.php b/dev/dev_ids_invoices.php index bfd072e5..9934237d 100644 --- a/dev/dev_ids_invoices.php +++ b/dev/dev_ids_invoices.php @@ -6,13 +6,13 @@ require_once '../QuickBooks.php'; -// +// $username = 'support@consolibyte.com'; $password = '$up3rW0rmy42'; $token = 'tex3r7hwifx6cci3zk43ibmnd'; $realmID = 173642438; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); $IPP->application($Context, 'be9mh7qd5'); diff --git a/dev/dev_ids_items.php b/dev/dev_ids_items.php index 10e8036e..7ffcce7a 100755 --- a/dev/dev_ids_items.php +++ b/dev/dev_ids_items.php @@ -5,14 +5,14 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = 'password42'; $token = 'tex3r7hwifx6cci3zk43ibmnd'; $realmID = 173642438; $application = 'be9mh7qd5'; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); diff --git a/dev/dev_ids_phones.php b/dev/dev_ids_phones.php index 30e7fd5c..cc75b99a 100644 --- a/dev/dev_ids_phones.php +++ b/dev/dev_ids_phones.php @@ -1,7 +1,7 @@ useDebugMode(true); @@ -53,14 +53,14 @@ } print("\n"); - + for ($i = 0; $i < $Report->getRowCount(); $i++) { for ($j = 0; $j < $Report->getColumnCount(); $j++) { print(str_pad($Report->getData()->getDataRow($i)->getColumnData($j), 25)); } - + print("\r\n"); } diff --git a/dev/dev_ids_salesreceipt.php b/dev/dev_ids_salesreceipt.php index 67400b09..be52a038 100644 --- a/dev/dev_ids_salesreceipt.php +++ b/dev/dev_ids_salesreceipt.php @@ -5,13 +5,13 @@ require_once '../QuickBooks.php'; -// +// $username = 'support@consolibyte.com'; $password = ''; $token = 'bf8cp2mihs6vsdibgqsybinugvj12346'; $realmID = 18293819223456; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); $IPP->application($Context, 'bfrccpnge'); diff --git a/dev/dev_ids_shipmethods.php b/dev/dev_ids_shipmethods.php index c554ea21..76590135 100755 --- a/dev/dev_ids_shipmethods.php +++ b/dev/dev_ids_shipmethods.php @@ -9,13 +9,13 @@ require_once '../QuickBooks.php'; -// +// $username = ''; $password = ''; $token = ''; $realmID = 182938192; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); diff --git a/dev/dev_ids_uom.php b/dev/dev_ids_uom.php index 5318c350..8569646c 100644 --- a/dev/dev_ids_uom.php +++ b/dev/dev_ids_uom.php @@ -9,13 +9,13 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = ''; $token = ''; $realmID = 192848234; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); @@ -33,7 +33,7 @@ for ($i = 0; $i < $UOM->countConvUnit(); $i++) { $ConvUnit = $UOM->getConvUnit($i); - + print("\t" . $ConvUnit->getName() . ', ' . $ConvUnit->getConvRatio() . "\n"); } print("\n"); diff --git a/dev/dev_ipp_assert.php b/dev/dev_ipp_assert.php index 8966ae64..5e6e3c8c 100755 --- a/dev/dev_ipp_assert.php +++ b/dev/dev_ipp_assert.php @@ -5,22 +5,22 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = 'password'; $token = 'app token here'; $realmID = 1234; $appdbid = 'app dbid here'; -// +// $IPP = new QuickBooks_IPP(); if ($Context = $IPP->authenticate($username, $password, $token)) { $IPP->application($appdbid); - + //$IPP->useDebugMode(true); - + if ($IPP->assertFederatedIdentity($Context, 'XXXXXod-intuit.ipp.prod', 'https://secure.your-url.com/saml.php')) { print('SUCCESS!'); @@ -29,7 +29,7 @@ { print('Error [' . $IPP->errorCode() . ': ' . $IPP->errorText() . ', ' . $IPP->errorDetail() . ']'); } - + print("\n\n\n\n"); print($IPP->lastRequest()); print("\n\n\n\n"); diff --git a/dev/dev_ipp_cache.php b/dev/dev_ipp_cache.php index 52314672..e524a164 100644 --- a/dev/dev_ipp_cache.php +++ b/dev/dev_ipp_cache.php @@ -6,13 +6,13 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = 'password42'; $token = 'tex3r7hwifx6cci3zk43ibmnd'; $realmID = 173642438; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); $IPP->application($Context, 'be9mh7qd5'); @@ -20,7 +20,7 @@ $map = QuickBooks_IPP_Cache::MAP_QBXML; $options = array( - + ); $Cache = new QuickBooks_IPP_Cache($Context, $dsn, $map, $options); diff --git a/dev/dev_ipp_db.php b/dev/dev_ipp_db.php index 658982f9..a232d2b8 100755 --- a/dev/dev_ipp_db.php +++ b/dev/dev_ipp_db.php @@ -5,13 +5,13 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = 'password42'; $token = 'tex3r7hwifx6cci3zk43ibmnd'; $realmID = 173642438; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); $IPP->application('be9mh7qd5'); diff --git a/dev/dev_ipp_getuserinfo.php b/dev/dev_ipp_getuserinfo.php index 7aebd68f..60255615 100755 --- a/dev/dev_ipp_getuserinfo.php +++ b/dev/dev_ipp_getuserinfo.php @@ -5,13 +5,13 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = 'password42'; $token = 'tex3r7hwifx6cci3zk43ibmnd'; $realmID = 173642438; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); $IPP->application('be9mh7qd5'); diff --git a/dev/dev_ipp_idsrealm.php b/dev/dev_ipp_idsrealm.php index af5d33f1..6f217b48 100755 --- a/dev/dev_ipp_idsrealm.php +++ b/dev/dev_ipp_idsrealm.php @@ -5,7 +5,7 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = 'password42'; $token = 'tex3r7hwifx6cci3zk43ibmnd'; diff --git a/dev/dev_ipp_renameapp.php b/dev/dev_ipp_renameapp.php index bde7f95f..47f95cd8 100755 --- a/dev/dev_ipp_renameapp.php +++ b/dev/dev_ipp_renameapp.php @@ -5,7 +5,7 @@ require_once '../QuickBooks.php'; -// +// $username = 'keith@consolibyte.com'; $password = 'password42'; $token = 'tex3r7hwifx6cci3zk43ibmnd'; @@ -28,7 +28,7 @@ } print("\n\n"); -print($IPP->lastRequest()); +print($IPP->lastRequest()); print("\n\n"); print($IPP->lastResponse()); print("\n\n"); diff --git a/dev/dev_qbwc_tester.php b/dev/dev_qbwc_tester.php index ce10032a..c2018984 100755 --- a/dev/dev_qbwc_tester.php +++ b/dev/dev_qbwc_tester.php @@ -46,13 +46,13 @@ for ($i = 0; $i < $max; $i++) { //print(date('Y-m-d H:i:s: ') . tester($url, $ticket, null, 'sendRequestXML')); - + $resp = tester($url, $ticket, null, 'sendRequestXML'); - + $pos = strpos($resp, 'requestID="'); - + print('got back [' . $resp . ']'); - + //sleep(10); } @@ -264,10 +264,10 @@ function tester($url, $username_or_ticket, $password, $method, $data = null) { print(date('Y-m-d H:i:s: ') . 'Sending request method: ' . $method . "\n"); - + global $DATA; $DATA .= date('Y-m-d H:i:s: ') . 'Sending request method: ' . $method . "\r\n"; - + switch ($method) { case 'fetchVersion': @@ -302,7 +302,7 @@ function tester($url, $username_or_ticket, $password, $method, $data = null) break; case 'sendRequestXML': $soap = ' - @@ -331,35 +331,35 @@ function tester($url, $username_or_ticket, $password, $method, $data = null) '; break; } - + $headers = array( - 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.1433)', + 'User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.1433)', 'Content-Type: text/xml; charset=utf-8', 'Soapaction: "http://developer.intuit.com/' . $method . '"', ); if (function_exists('curl_init')) { - $curl = curl_init($url); - + $curl = curl_init($url); + curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); - - + + curl_setopt($curl, CURLOPT_POSTFIELDS, $soap); - + curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); curl_setopt($curl, CURLOPT_HEADER, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); //curl_setopt($curl, CURLOPT_FORBID_REUSE, true); //curl_setopt($curl, CURLOPT_FRESH_CONNECT, true); //curl_setopt($curl, CURLOPT_MAXCONNECTS, 1); - + //curl_setopt($curl, CURLOPT_USERPWD, 'milo:foofoo'); - + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); //print_r(curl_getinfo($curl)); - + $return = curl_exec($curl); } else @@ -369,60 +369,60 @@ function tester($url, $username_or_ticket, $password, $method, $data = null) { $parse['port'] = 80; } - + if ($parse['scheme'] == 'https') { die('sorry, you need curl to test https (for now at least)'); } - + if ($fp = fsockopen($parse['host'], $parse['port'])) { $request = ''; $request .= 'POST ' . $parse['path'] . '?' . $parse['query'] . ' HTTP/1.0' . "\r\n"; $request .= 'Host: ' . $parse['host'] . "\r\n"; - + foreach ($headers as $key => $value) { //$request .= $key . ': ' . $value . "\r\n"; $request .= $value . "\r\n"; } - - $request .= 'Content-Length: ' . strlen($soap) ."\r\n"; + + $request .= 'Content-Length: ' . strlen($soap) ."\r\n"; $request .= 'Connection: close' . "\r\n"; - $request .= "\r\n"; - $request .= $soap; - + $request .= "\r\n"; + $request .= $soap; + print(str_repeat('-', 20) . ' REQUEST ' . str_repeat('-', 20) . "\n"); print($request . "\n"); print(str_repeat('-', 48) . "\n"); - + fputs($fp, $request); - + $bytes = 0; $resp = ''; - while (!feof($fp) and $bytes < 10000) - { + while (!feof($fp) and $bytes < 10000) + { $tmp = fgets($fp, 128); $bytes += strlen($tmp); - - $resp .= $tmp; + + $resp .= $tmp; } - - print(str_repeat('-', 19) . ' RESPONSE ' . str_repeat('-', 19) . "\n"); + + print(str_repeat('-', 19) . ' RESPONSE ' . str_repeat('-', 19) . "\n"); print($resp . "\n"); print(str_repeat('-', 48) . "\n"); print("\n\n"); - - fclose($fp); + + fclose($fp); } else { die('Connection failed!'); } - + $return = $resp; } - + $DATA .= $return . "\r\n"; return $return; } diff --git a/dev/dev_qbxml_encoding.php b/dev/dev_qbxml_encoding.php index c2600c07..69fd4a2d 100644 --- a/dev/dev_qbxml_encoding.php +++ b/dev/dev_qbxml_encoding.php @@ -5,14 +5,14 @@ $arr = array( - 'Cable Raceway/Wire Chase, 1.25" x 6\', White', + 'Cable Raceway/Wire Chase, 1.25" x 6\', White', ' à â ', - 'desempeños artísticos', - 'Zugängliche', + 'desempeños artísticos', + 'Zugängliche', 'investigación', - 'desempeños artísticos', - 'desempeños artísticos', - 'Zugängliche investigación', + 'desempeños artísticos', + 'desempeños artísticos', + 'Zugängliche investigación', ); foreach ($arr as $str) diff --git a/dev/dev_xml_performance.php b/dev/dev_xml_performance.php index 2485666e..cd4ccdb2 100644 --- a/dev/dev_xml_performance.php +++ b/dev/dev_xml_performance.php @@ -12,7 +12,7 @@ require_once 'QuickBooks.php'; $start = microtime(true); - + $xml = ' @@ -374,7 +374,7 @@ $use_parser = null; // Auto-detect the best choice //$use_parser = QuickBooks_XML::PARSER_BUILTIN; // Use the built in XML parser //$use_parser = QuickBooks_XML::PARSER_SIMPLEXML; // Use the PHP simpleXML extension - + // Create the new object $Parser = new QuickBooks_XML_Parser($xml, $use_parser); @@ -389,10 +389,10 @@ { // Parse it into a document $Doc = $Parser->parse($errnum, $errmsg); - + // Get the root node from the document $Root = $Doc->getRoot(); - + $fp = fopen('dev_xml_performance.' . $Parser->backend() . '.txt', 'w+'); fwrite($fp, print_r($Root, true)); fclose($fp); diff --git a/dev/example_ids_items.php b/dev/example_ids_items.php index 91b0fef4..407af2cc 100644 --- a/dev/example_ids_items.php +++ b/dev/example_ids_items.php @@ -5,13 +5,13 @@ require_once '../QuickBooks.php'; -// +// $username = 'support@consolibyte.com'; $password = ''; $token = 'bf8cp2mihs6vsdibgqsybinugvj12346'; $realmID = 18293819223456; -// +// $IPP = new QuickBooks_IPP(); $Context = $IPP->authenticate($username, $password, $token); $IPP->application($Context, 'bfrccpnge'); diff --git a/dev/parse_inventory.php b/dev/parse_inventory.php index 5a81c6cb..5a0f5760 100755 --- a/dev/parse_inventory.php +++ b/dev/parse_inventory.php @@ -1,4 +1,4 @@ - @@ -11,55 +11,55 @@ 6 9 1 - + Blank - + ItemDesc - + ItemVendor - + ReorderPoint - + QuantityOnHand - + SuggestedReorder - + QuantityOnOrder - + EarliestReceiptDate - + SalesPerWeek - + - + @@ -69,9 +69,9 @@ - + - + @@ -80,7 +80,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -114,7 +114,7 @@ class Testme public function _processReport($xml) { $col_defs = array(); - + // First, find the column definitions $tmp = $xml; $find = 'ColDesc'; @@ -123,22 +123,22 @@ public function _processReport($xml) //print('---------' . "\n"); //print($inner); //print("\n" . '-----------' . "\n"); - + $colID = Testme::_reportExtractColID($inner); $type = Testme::_reportExtractColType($inner); - + $col_defs[$colID] = $type; - + //print(' colID [' . $colID . ']'); //print(' type [' . $type . ']' . "\n"); - + //print("\n\n\n\n"); } - + //print_r($col_defs); - + $items = array(); - + // Now, find the actual data $tmp = $xml; $find = 'DataRow'; @@ -147,11 +147,11 @@ public function _processReport($xml) //print('---------' . "\n"); //print($inner); //print("\n" . '-----------' . "\n"); - + $item = array( - 'FullName' => null, - 'Blank' => null, // - 'ItemDesc' => null, // + 'FullName' => null, + 'Blank' => null, // + 'ItemDesc' => null, // 'ItemVendor' => null, // Pref Vendor 'ReorderPoint' => null, // Reorder Pt 'QuantityOnHand' => null, // On Hand @@ -160,84 +160,84 @@ public function _processReport($xml) 'EarliestReceiptDate' => null, // Next Deliv 'SalesPerWeek' => null, // Sales/Week ); - + $find2 = 'RowData'; if ($tag = Testme::_reportNextTag($inner, $find2)) { $value = Testme::_reportExtractColValue($tag); - + $item['FullName'] = $value; } - + $find3 = 'ColData'; while ($tag = Testme::_reportNextTag($inner, $find3)) { $colID = Testme::_reportExtractColID($tag); $value = Testme::_reportExtractColValue($tag); - + //print('[' . $tag . ']' . "\n"); //print(' colID: [' . $colID . ']' . "\n"); //print(' value: [' . $value . ']' . "\n"); - + //print("\n"); - + if (array_key_exists($colID, $col_defs)) { $item[$col_defs[$colID]] = $value; } } - + $items[] = $item; - + //print("\n\n\n\n\n"); } - + print_r($items); - + // UPDATE item SET QuantityOnHand = x WHERE FullName = y, resync = NOW() AND qbsql_resync_datetime = qbsql_modify_timestamp // if (!affected_rows) // UPDATE item SET QuantityOnHand = x WHERE FullName = y // this was a modified item, so it needs to stay modified } - + static protected function _reportExtractColID($xml) { $find = 'colID="'; if (false !== ($sta = strpos($xml, $find))) { $end = strpos($xml, '"', $sta + strlen($find)); - + return substr($xml, $sta + strlen($find), $end - $sta - strlen($find)); } - + return null; } - + static protected function _reportExtractColType($xml) { $find = ''; if (false !== ($sta = strpos($xml, $find))) { $end = strpos($xml, '', $sta + strlen($find)); - + return substr($xml, $sta + strlen($find), $end - $sta - strlen($find)); } - + return null; } - + static protected function _reportExtractColValue($xml) { $find = 'value="'; if (false !== ($sta = strpos($xml, $find))) { $end = strpos($xml, '"', $sta + strlen($find)); - + return substr($xml, $sta + strlen($find), $end - $sta - strlen($find)); } - + return null; } - + static protected function _reportNextTag(&$xml, $find) { if (false !== ($sta = strpos($xml, $find))) @@ -247,33 +247,33 @@ static protected function _reportNextTag(&$xml, $find) { $end = strpos($xml, ' $value) { $cast = QuickBooks_Cast::cast(QUICKBOOKS_ADD_CUSTOMER, str_replace('_', ' ', $field), ucfirst($value)); print("\t" . $field . ': {' . $cast . '} (length: ' . strlen($cast) . ')' . "\n"); } - + print("\n"); } print("\n"); @@ -72,7 +72,7 @@ 'IsFinanceCharge' => false, 'IsPending' => true, ); - + foreach ($invoice as $key => $value) { print($key . ' => ' . QuickBooks_Cast::cast(QUICKBOOKS_ADD_INVOICE, $field, $value) . "\n"); diff --git a/dev/test_guess_paymentmethod.php b/dev/test_guess_paymentmethod.php index b71a6277..3c39c8d5 100644 --- a/dev/test_guess_paymentmethod.php +++ b/dev/test_guess_paymentmethod.php @@ -5,16 +5,16 @@ $cart_paymentmethod = 'Visa'; $arr_qb_paymentmethod_names = array( - 'Cash', - 'Check', - 'American Express', - 'Discover', - 'Visa/Mastercard', - 'Credit Card', - 'Credit on Ad Account', - 'Wire Transfer', - 'PayPal', - 'Mastercard', + 'Cash', + 'Check', + 'American Express', + 'Discover', + 'Visa/Mastercard', + 'Credit Card', + 'Credit on Ad Account', + 'Wire Transfer', + 'PayPal', + 'Mastercard', ); $choice = QuickBooks_Integrator::_guessQuickBooksPaymentMethod($cart_paymentmethod, $arr_qb_paymentmethod_names); diff --git a/docs/merchant_services/example_merchant_service.php b/docs/merchant_services/example_merchant_service.php index da274304..2a383c85 100644 --- a/docs/merchant_services/example_merchant_service.php +++ b/docs/merchant_services/example_merchant_service.php @@ -2,12 +2,12 @@ /** * Example of connecting PHP to the QuickBooks Merchant Service - * - * * IMPORTANT * - * In order to use this example, you'll need to go through the Intuit - * application registration process first! This is documented here: + * + * * IMPORTANT * + * In order to use this example, you'll need to go through the Intuit + * application registration process first! This is documented here: * http://wiki.consolibyte.com/wiki/doku.php/quickbooks_qbms_integration - * + * * @package QuickBooks * @subpackage Documentation */ @@ -22,111 +22,111 @@ // Include the QuickBooks files require_once '../QuickBooks.php'; -// If you want to log requests/responses to a database, you can provide a +// If you want to log requests/responses to a database, you can provide a // database DSN-style connection string here $dsn = null; // $dsn = 'mysql://root:@localhost/quickbooks_merchantservice'; -// There are two methods of attaching an application to QuickBooks Merchant -// Services. Intuit provides a 'Hosted' model, and a 'Desktop' model. The -// 'Hosted' model provides additional security benefits and is designed for -// web applications, while the 'Desktop' model is easier to set up and -// designed for desktop applications. -// -// Either the 'Hosted' or the 'Desktop' model can be used if you're developing -// a web application. -// -// If you're using the 'Hosted' model, you'll need to provide the full path to -// the key/certificate you/Intuit generates here. Otherwise, you can pass a -// null. This file should have the private key you generated concatenated to -// the beginning of the file. So the file contents should look something like: -// +// There are two methods of attaching an application to QuickBooks Merchant +// Services. Intuit provides a 'Hosted' model, and a 'Desktop' model. The +// 'Hosted' model provides additional security benefits and is designed for +// web applications, while the 'Desktop' model is easier to set up and +// designed for desktop applications. +// +// Either the 'Hosted' or the 'Desktop' model can be used if you're developing +// a web application. +// +// If you're using the 'Hosted' model, you'll need to provide the full path to +// the key/certificate you/Intuit generates here. Otherwise, you can pass a +// null. This file should have the private key you generated concatenated to +// the beginning of the file. So the file contents should look something like: +// // -----BEGIN RSA PRIVATE KEY----- // ... bla bla bla lots of stuff here ... // -----END RSA PRIVATE KEY----- // -----BEGIN CERTIFICATE----- // ... bla bla bla lots of stuff here ... // -----END CERTIFICATE----- -// -// If you're using the 'Hosted' model, you should see the additional -// documentation about how to set up your certificate here: +// +// If you're using the 'Hosted' model, you should see the additional +// documentation about how to set up your certificate here: // http://wiki.consolibyte.com/wiki/doku.php/quickbooks_qbms_integration //$path_to_private_key_and_certificate = '/Users/keithpalmerjr/Projects/QuickBooks/QuickBooks/dev/test_qbms.pem'; //$path_to_private_key_and_certificate = '/path/doesnt/exist.pem'; // This should trigger an error //$path_to_private_key_and_certificate = null; // If you're using the DESKTOP model $path_to_private_key_and_certificate = null; -// This is your login ID that Intuit assignes you during the application +// This is your login ID that Intuit assignes you during the application // registration process. //$application_login = 'test.www.academickeys.com'; $application_login = 'test.foxycart.com'; $application_login = 'qbms.consolibyte.com'; -// This is the connection ticket assigned to you during the application -// registration process. To conform to Intuit security practices, you are -// *required* to store this key *encrypted* and not in plain-text. -// -// The ticket below is provided as an example, you should *not* store your -// connection ticket in plain text as shown below. You should store it in your -// database or in a separate file, outside of the web server document root, +// This is the connection ticket assigned to you during the application +// registration process. To conform to Intuit security practices, you are +// *required* to store this key *encrypted* and not in plain-text. +// +// The ticket below is provided as an example, you should *not* store your +// connection ticket in plain text as shown below. You should store it in your +// database or in a separate file, outside of the web server document root, // encrypted with a crypto library such as {@link http://www.php.net/mcrypt}. //$connection_ticket = 'TGT-152-LWGj1YQUufTAlSW8DK1c6A'; $connection_ticket = 'TGT-145-niiEL2kCFoOTYHvkwBarmg'; $connection_ticket = 'TGT-157-p3PyZPoH3DtieLSh4ykp6Q'; -// Create an instance of the MerchantService object +// Create an instance of the MerchantService object $MS = new QuickBooks_MerchantService( - $dsn, - $path_to_private_key_and_certificate, + $dsn, + $path_to_private_key_and_certificate, $application_login, $connection_ticket); -// If you're using a Intuit QBMS development account, you must set this to true! +// If you're using a Intuit QBMS development account, you must set this to true! $MS->useTestEnvironment(true); // If you want to see the full XML input/output, you can turn on debug mode $MS->useDebugMode(true); /* -There are several methods available in the QuickBooks_MerchantService class. -The most common methods are described below: - - - authorize() - This authorizes a given amount against the a credit card. It is important - to note that this *does not* actually charge the credit card, it just - "reserves" the amount on the credit card and guarentees that if you do a - capture() on the same credit card within X days, the funds will be - available. - - Authorizations are used in situations where you want to ensure the money - will be availble, but not actually charge the card yet. For instance, if - you have an online shopping cart, you should authorize() the credit card - when the customer checks out. However, because you might not have the item - in stock, or there might be other problems with the order, you don't want - to actually charge the card yet. Once the order is all ready to ship and - you've made sure there's no problems with it, you should issue a capture() - using the returned transaction information from the authorize() to actually - charge the credit card. - - - capture() - +There are several methods available in the QuickBooks_MerchantService class. +The most common methods are described below: + + - authorize() + This authorizes a given amount against the a credit card. It is important + to note that this *does not* actually charge the credit card, it just + "reserves" the amount on the credit card and guarentees that if you do a + capture() on the same credit card within X days, the funds will be + available. + + Authorizations are used in situations where you want to ensure the money + will be availble, but not actually charge the card yet. For instance, if + you have an online shopping cart, you should authorize() the credit card + when the customer checks out. However, because you might not have the item + in stock, or there might be other problems with the order, you don't want + to actually charge the card yet. Once the order is all ready to ship and + you've made sure there's no problems with it, you should issue a capture() + using the returned transaction information from the authorize() to actually + charge the credit card. + + - capture() + - charge() - + - void() - + - refund() - - - voidOrRefund() - + + - voidOrRefund() + - openBatch() - + - closeBatch() */ /** * There are a number of test credit card numbers you can use while testing - * + * * Master Card 5105105105105100 * Master Card 5555555555554444 * VISA 4222222222222 @@ -151,9 +151,9 @@ $cvv = null; /** - * There are also some test configurations you can use to simulate certain - * errors occuring. You pass these test configuration constants in as the $name - * parameter to the credit card to trigger various errors/warnings. + * There are also some test configurations you can use to simulate certain + * errors occuring. You pass these test configuration constants in as the $name + * parameter to the credit card to trigger various errors/warnings. */ // $name = QuickBooks_MerchantService::TEST_AVSZIPCVVFAIL; // Simulate a sucessful transaction that failed all AVS and CVV checks, but was still processed (i.e. your gateway is set up to accept everything) // $name = QuickBooks_MerchantService::TEST_COMMUNICATIONERROR; // Simulate a general communication error @@ -167,64 +167,64 @@ if ($Transaction = $MS->authorize($Card, $amount)) { print('Card authorized!' . "\n"); - print_r($Transaction); - - // Every time the MerchantService class returns a $Transaction object to you, - // you should store the returned $Transaction. You'll need the returned - // $Transaction object (or at the very least the data contained therein) in - // order to push these transactions to QuickBooks, to actually capture the - // funds, to issue a refund, or to issue a void. - // - // There are several convienence methods to convert the $Transaction object to - // more storage-friendly formats if you would prefer to use these: - + print_r($Transaction); + + // Every time the MerchantService class returns a $Transaction object to you, + // you should store the returned $Transaction. You'll need the returned + // $Transaction object (or at the very least the data contained therein) in + // order to push these transactions to QuickBooks, to actually capture the + // funds, to issue a refund, or to issue a void. + // + // There are several convienence methods to convert the $Transaction object to + // more storage-friendly formats if you would prefer to use these: + // Get the transaction as a string which can later be turned back into a transaction object - $str = $Transaction->serialize(); + $str = $Transaction->serialize(); print('Serialized transaction: ' . $str . "\n\n"); - + // Now convert it back to a transaction object $Transaction = QuickBooks_MerchantService_Transaction::unserialize($str); - - // ... maybe you'd rather convert it to an array? + + // ... maybe you'd rather convert it to an array? $arr = $Transaction->toArray(); - print('Array transaction: '); + print('Array transaction: '); print_r($arr); print("\n\n"); - + // ... and back again? $Transaction = QuickBooks_MerchantService_Transaction::fromArray($arr); - + // ... or an XML document? $xml = $Transaction->toXML(); print('XML transaction: ' . $xml . "\n\n"); - - // ... and back again? + + // ... and back again? $Transaction = QuickBooks_MerchantService_Transaction::fromXML($xml); - + // How about XML that can be used in a qbXML SalesReceiptAdd request? $qbxml = $Transaction->toQBXML(); print('qbXML transaction info: ' . $qbxml . "\n\n"); - - // Now that that card has been authorized, let's actually capture the funds. - // - // You can just pass in the transaction if you want to capture for the same - // amount as the authorization. Alternatively, you can pass in a different - // amount *less than* the authorization amount to only capture a portion of - // the authorization. - // - // If you want to capture more than the authorization was for, use charge(). - + + // Now that that card has been authorized, let's actually capture the funds. + // + // You can just pass in the transaction if you want to capture for the same + // amount as the authorization. Alternatively, you can pass in a different + // amount *less than* the authorization amount to only capture a portion of + // the authorization. + // + // If you want to capture more than the authorization was for, use charge(). + // Only capture $50.00 // $amount = 50.0; - + if ($Transaction = $MS->capture($Transaction, $amount)) { print('Card captured!' . "\n"); - print_r($Transaction); - + print_r($Transaction); + // Let's print that qbXML bit again because it'll have more data now $qbxml = $Transaction->toQBXML(); - print('qbXML transaction info: ' . $qbxml . "\n\n"); + print('qbXML transaction info: ' . $qbxml . "\n\n"); } else { @@ -240,16 +240,16 @@ -// If you didn't want to do a two-part authorize + capture, you can just do a -// single call to ->charge() to charge the credit card right away. +// If you didn't want to do a two-part authorize + capture, you can just do a +// single call to ->charge() to charge the credit card right away. if ($Transaction = $MS->charge($Card, $amount)) { print('Card charged!' . "\n"); print_r($Transaction); - + print('Transaction array: ' . "\n"); print_r($Transaction->toArray()); - + print("\n"); } else @@ -259,7 +259,7 @@ -// We can issue refunds too... +// We can issue refunds too... if ($Transaction = $MS->refund($Card, $amount)) { print('Card refunded $' . $amount . ' dollars!' . "\n"); diff --git a/docs/merchant_services/example_merchant_service_authcapture.php b/docs/merchant_services/example_merchant_service_authcapture.php index 88bb01f9..875737ec 100755 --- a/docs/merchant_services/example_merchant_service_authcapture.php +++ b/docs/merchant_services/example_merchant_service_authcapture.php @@ -2,12 +2,12 @@ /** * Example of connecting PHP to the QuickBooks Merchant Service - * - * * IMPORTANT * - * In order to use this example, you'll need to go through the Intuit - * application registration process first! This is documented here: + * + * * IMPORTANT * + * In order to use this example, you'll need to go through the Intuit + * application registration process first! This is documented here: * http://wiki.consolibyte.com/wiki/doku.php/quickbooks_qbms_integration - * + * * @package QuickBooks * @subpackage Documentation */ @@ -22,66 +22,66 @@ // Include the QuickBooks files require_once '../QuickBooks.php'; -// If you want to log requests/responses to a database, you can provide a +// If you want to log requests/responses to a database, you can provide a // database DSN-style connection string here $dsn = null; // $dsn = 'mysql://root:@localhost/quickbooks_merchantservice'; -// There are two methods of attaching an application to QuickBooks Merchant -// Services. Intuit provides a 'Hosted' model, and a 'Desktop' model. The -// 'Hosted' model provides additional security benefits and is designed for -// web applications, while the 'Desktop' model is easier to set up and -// designed for desktop applications. -// -// Either the 'Hosted' or the 'Desktop' model can be used if you're developing -// a web application. -// -// If you're using the 'Hosted' model, you'll need to provide the full path to -// the key/certificate you/Intuit generates here. Otherwise, you can pass a -// null. This file should have the private key you generated concatenated to -// the beginning of the file. So the file contents should look something like: -// +// There are two methods of attaching an application to QuickBooks Merchant +// Services. Intuit provides a 'Hosted' model, and a 'Desktop' model. The +// 'Hosted' model provides additional security benefits and is designed for +// web applications, while the 'Desktop' model is easier to set up and +// designed for desktop applications. +// +// Either the 'Hosted' or the 'Desktop' model can be used if you're developing +// a web application. +// +// If you're using the 'Hosted' model, you'll need to provide the full path to +// the key/certificate you/Intuit generates here. Otherwise, you can pass a +// null. This file should have the private key you generated concatenated to +// the beginning of the file. So the file contents should look something like: +// // -----BEGIN RSA PRIVATE KEY----- // ... bla bla bla lots of stuff here ... // -----END RSA PRIVATE KEY----- // -----BEGIN CERTIFICATE----- // ... bla bla bla lots of stuff here ... // -----END CERTIFICATE----- -// -// If you're using the 'Hosted' model, you should see the additional -// documentation about how to set up your certificate here: +// +// If you're using the 'Hosted' model, you should see the additional +// documentation about how to set up your certificate here: // http://wiki.consolibyte.com/wiki/doku.php/quickbooks_qbms_integration //$path_to_private_key_and_certificate = '/Users/keithpalmerjr/Projects/QuickBooks/QuickBooks/dev/test_qbms.pem'; //$path_to_private_key_and_certificate = '/path/doesnt/exist.pem'; // This should trigger an error //$path_to_private_key_and_certificate = null; // If you're using the DESKTOP model $path_to_private_key_and_certificate = null; -// This is your login ID that Intuit assignes you during the application +// This is your login ID that Intuit assignes you during the application // registration process. //$application_login = 'test.www.academickeys.com'; $application_login = 'test.foxycart.com'; $application_login = 'qbms.consolibyte.com'; -// This is the connection ticket assigned to you during the application -// registration process. To conform to Intuit security practices, you are -// *required* to store this key *encrypted* and not in plain-text. -// -// The ticket below is provided as an example, you should *not* store your -// connection ticket in plain text as shown below. You should store it in your -// database or in a separate file, outside of the web server document root, +// This is the connection ticket assigned to you during the application +// registration process. To conform to Intuit security practices, you are +// *required* to store this key *encrypted* and not in plain-text. +// +// The ticket below is provided as an example, you should *not* store your +// connection ticket in plain text as shown below. You should store it in your +// database or in a separate file, outside of the web server document root, // encrypted with a crypto library such as {@link http://www.php.net/mcrypt}. //$connection_ticket = 'TGT-152-LWGj1YQUufTAlSW8DK1c6A'; $connection_ticket = 'TGT-145-niiEL2kCFoOTYHvkwBarmg'; $connection_ticket = 'TGT-157-p3PyZPoH3DtieLSh4ykp6Q'; -// Create an instance of the MerchantService object +// Create an instance of the MerchantService object $MS = new QuickBooks_MerchantService( - $dsn, - $path_to_private_key_and_certificate, + $dsn, + $path_to_private_key_and_certificate, $application_login, $connection_ticket); -// If you're using a Intuit QBMS development account, you must set this to true! +// If you're using a Intuit QBMS development account, you must set this to true! $MS->useTestEnvironment(true); // If you want to see the full XML input/output, you can turn on debug mode @@ -105,24 +105,24 @@ if ($Transaction = $MS->authorize($Card, $amount)) { print('Card authorized!' . "\n"); - print_r($Transaction); - - // Every time the MerchantService class returns a $Transaction object to you, - // you should store the returned $Transaction. You'll need the returned - // $Transaction object (or at the very least the data contained therein) in - // order to push these transactions to QuickBooks, to actually capture the - // funds, to issue a refund, or to issue a void. - // - // There are several convienence methods to convert the $Transaction object to - // more storage-friendly formats if you would prefer to use these: - + print_r($Transaction); + + // Every time the MerchantService class returns a $Transaction object to you, + // you should store the returned $Transaction. You'll need the returned + // $Transaction object (or at the very least the data contained therein) in + // order to push these transactions to QuickBooks, to actually capture the + // funds, to issue a refund, or to issue a void. + // + // There are several convienence methods to convert the $Transaction object to + // more storage-friendly formats if you would prefer to use these: + // Get the transaction as a string which can later be turned back into a transaction object - $str = $Transaction->serialize(); + $str = $Transaction->serialize(); print('Serialized transaction: ' . $str . "\n\n"); - + // Now convert it back to a transaction object $Transaction = QuickBooks_MerchantService_Transaction::unserialize($str); - + if ($Transaction = $MS->capture($Transaction, $amount)) { /* @@ -138,12 +138,12 @@ */ print('Card captured!' . "\n"); - print_r($Transaction); + print_r($Transaction); print("\n\n"); - + // Let's print that qbXML bit again because it'll have more data now $qbxml = $Transaction->toQBXML(); - print('qbXML transaction info: ' . $qbxml . "\n\n"); + print('qbXML transaction info: ' . $qbxml . "\n\n"); } else { diff --git a/docs/merchant_services/example_merchant_service_checks.php b/docs/merchant_services/example_merchant_service_checks.php index e135aab1..275908a7 100644 --- a/docs/merchant_services/example_merchant_service_checks.php +++ b/docs/merchant_services/example_merchant_service_checks.php @@ -2,12 +2,12 @@ /** * Example of connecting PHP to the QuickBooks Merchant Service - * - * * IMPORTANT * - * In order to use this example, you'll need to go through the Intuit - * application registration process first! This is documented here: + * + * * IMPORTANT * + * In order to use this example, you'll need to go through the Intuit + * application registration process first! This is documented here: * http://wiki.consolibyte.com/wiki/doku.php/quickbooks_qbms_integration - * + * * @package QuickBooks * @subpackage Documentation */ @@ -15,7 +15,7 @@ // Plain text output header('Content-Type: text/plain'); -// Show some errors... +// Show some errors... error_reporting(E_ALL | E_STRICT); ini_set('display_errors', true); @@ -34,14 +34,14 @@ //$connection_ticket = 'TGT-152-LWGj1YQUufTAlSW8DK1c6A'; $connection_ticket = 'TGT-157-p3PyZPoH3DtieLSh4ykp6Q'; -// Create an instance of the MerchantService object +// Create an instance of the MerchantService object $MS = new QuickBooks_MerchantService( - $dsn, - $path_to_private_key_and_certificate, + $dsn, + $path_to_private_key_and_certificate, $application_login, $connection_ticket); -// If you're using a Intuit QBMS development account, you must set this to true! +// If you're using a Intuit QBMS development account, you must set this to true! $MS->useTestEnvironment(true); // If you want to see the full XML input/output, you can turn on debug mode @@ -59,12 +59,12 @@ $phone = '+1 (860) 634-1602'; $Check = new QuickBooks_MerchantService_CheckingAccount( - $routing, - $account, - $info, - $type, - $first_name, - $last_name, + $routing, + $account, + $info, + $type, + $first_name, + $last_name, $phone); // We're going to transfer $295 out of their checking account @@ -72,7 +72,7 @@ if ($Transaction = $MS->debitCheck($Check, $amount, QuickBooks_MerchantService::MODE_INTERNET)) { - + print_r($Transaction); } else diff --git a/docs/merchant_services/example_merchant_service_wallet.php b/docs/merchant_services/example_merchant_service_wallet.php index bf9d38b2..a2f80cb1 100644 --- a/docs/merchant_services/example_merchant_service_wallet.php +++ b/docs/merchant_services/example_merchant_service_wallet.php @@ -2,9 +2,9 @@ /** * Example of using QuickBooks Merchant Services 'Payment Wallet' support - * + * * Make sure you look at docs/example_merchant_service.php first! - * + * * @package QuickBooks * @subpackage Documentation */ @@ -12,7 +12,7 @@ // Plain text output header('Content-Type: text/plain'); -// I always program in E_STRICT error mode... +// I always program in E_STRICT error mode... error_reporting(E_ALL | E_STRICT); ini_set('display_errors', true); @@ -31,14 +31,14 @@ $connection_ticket = 'TGT-145-niiEL2kCFoOTYHvkwBarmg'; //$connection_ticket = 'TGT-152-LWGj1YQUufTAlSW8DK1c6A'; -// Create an instance of the MerchantService object +// Create an instance of the MerchantService object $MS = new QuickBooks_MerchantService( - $dsn, - $path_to_private_key_and_certificate, + $dsn, + $path_to_private_key_and_certificate, $application_login, $connection_ticket); -// If you're using a Intuit QBMS development account, you must set this to true! +// If you're using a Intuit QBMS development account, you must set this to true! $MS->useTestEnvironment(true); // If you want to see the full XML input/output, you can turn on debug mode @@ -145,4 +145,4 @@ print('An error occurred: [' . $MS->errorNumber() . ': ' . $MS->errorMessage() . ']' . "\n"); } -// +// diff --git a/docs/misc/example_xml.php b/docs/misc/example_xml.php index 2db33e7f..b0757fdd 100755 --- a/docs/misc/example_xml.php +++ b/docs/misc/example_xml.php @@ -2,14 +2,14 @@ /** * Example XML parsing - * - * I've decided to include a simple XML parser as I've had some - * requests/concerns from people who don't have PHP XML support built in or - * just didn't care for the PHP simplexml or DOM extensions. In any case, this - * might make it easier for some people to parse the result qbXML responses. - * + * + * I've decided to include a simple XML parser as I've had some + * requests/concerns from people who don't have PHP XML support built in or + * just didn't care for the PHP simplexml or DOM extensions. In any case, this + * might make it easier for some people to parse the result qbXML responses. + * * @author Keith Palmer - * + * * @package QuickBooks * @subpackage Documentation */ @@ -31,16 +31,16 @@ // Our test XML tag $xml = ' - Keith '; - + $use_parser = null; // Auto-detect the best choice //$use_parser = QuickBooks_XML::PARSER_BUILTIN; // Use the built in XML parser //$use_parser = QuickBooks_XML::PARSER_SIMPLEXML; // Use the PHP simpleXML extension - + // Create the new object $Parser = new QuickBooks_XML_Parser($xml, $use_parser); @@ -54,13 +54,13 @@ { // Parse it into a document $Doc = $Parser->parse($errnum, $errmsg); - + // Get the root node from the document $Root = $Doc->getRoot(); - + // Now fetch some stuff from the parsed document print('Hello there ' . $Root->getChildDataAt('Tag1 NestedTag AnotherTag') . "\n"); - + print_r($Root->getChildAttributesAt('Tag1 NestedTag')); print("\n"); print('Root tag name is: ' . $Root->name() . "\n"); @@ -104,15 +104,15 @@ { $Doc = $Parser->parse($errnum, $errmsg); $Root = $Doc->getRoot(); - + $List = $Root->getChildAt('Animals'); - + foreach ($List->children() as $Animal) { $name = $Animal->getChildDataAt('Animal Name'); $note = $Animal->getChildDataAt('Animal Note'); print("\t" . $name . ' (' . $note . ')' . "\n"); - } + } } else { diff --git a/docs/partner_platform/example_app_ipp_v2/config.php b/docs/partner_platform/example_app_ipp_v2/config.php index 9130aadc..a2f6d117 100755 --- a/docs/partner_platform/example_app_ipp_v2/config.php +++ b/docs/partner_platform/example_app_ipp_v2/config.php @@ -2,9 +2,9 @@ /** * Intuit Partner Platform configuration variables - * - * See the scripts that use these variables for more details. - * + * + * See the scripts that use these variables for more details. + * * @package QuickBooks * @subpackage Documentation */ @@ -20,13 +20,13 @@ $token = '4e9da499ba070b411dbab8abf6d02c616402'; // Your OAuth consumer key and secret (Intuit will give you both of these when you register an Intuit app) -// +// // IMPORTANT: -// To pass your tech review with Intuit, you'll have to AES encrypt these and -// store them somewhere safe. -// -// The OAuth request/access tokens will be encrypted and stored for you by the -// PHP DevKit IntuitAnywhere classes automatically. +// To pass your tech review with Intuit, you'll have to AES encrypt these and +// store them somewhere safe. +// +// The OAuth request/access tokens will be encrypted and stored for you by the +// PHP DevKit IntuitAnywhere classes automatically. $oauth_consumer_key = 'qyprdlGJ4gWv4sMW0syilH2o4KirQe'; $oauth_consumer_secret = '49ou99QiG47KhvY6AaMPSnHhXXNMAJxLv7QXNm4L'; @@ -36,13 +36,13 @@ // This is the URL to forward the user to after they have connected to IPP/IDS via OAuth $quickbooks_success_url = 'http://example.com/trunk/docs/example_app_ipp_v2/success.php'; -// This is the menu URL script +// This is the menu URL script $quickbooks_menu_url = 'http://example.com/trunk/docs/example_app_ipp_v2/menu.php'; -// This is a database connection string that will be used to store the OAuth credentials +// This is a database connection string that will be used to store the OAuth credentials // $dsn = 'pgsql://username:password@hostname/database'; // $dsn = 'mysql://username:password@hostname/database'; -$dsn = 'mysqli://root:root@localhost/example_app_ipp_v3'; +$dsn = 'mysqli://root:root@localhost/example_app_ipp_v3'; // You should set this to an encryption key specific to your app $encryption_key = 'bcde1234'; @@ -60,22 +60,22 @@ QuickBooks_Utilities::initialize($dsn); } -// Instantiate our Intuit Anywhere auth handler -// +// Instantiate our Intuit Anywhere auth handler +// // The parameters passed to the constructor are: -// $dsn +// $dsn // $oauth_consumer_key Intuit will give this to you when you create a new Intuit Anywhere application at AppCenter.Intuit.com // $oauth_consumer_secret Intuit will give this to you too // $this_url This is the full URL (e.g. http://path/to/this/file.php) of THIS SCRIPT // $that_url After the user authenticates, they will be forwarded to this URL -// +// $IntuitAnywhere = new QuickBooks_IPP_IntuitAnywhere($dsn, $encryption_key, $oauth_consumer_key, $oauth_consumer_secret, $quickbooks_oauth_url, $quickbooks_success_url); -// Are they connected to QuickBooks right now? -if ($IntuitAnywhere->check($the_username, $the_tenant) and +// Are they connected to QuickBooks right now? +if ($IntuitAnywhere->check($the_username, $the_tenant) and $IntuitAnywhere->test($the_username, $the_tenant)) { - // Yes, they are + // Yes, they are $quickbooks_is_connected = true; } else diff --git a/docs/partner_platform/example_app_ipp_v2/disconnect.php b/docs/partner_platform/example_app_ipp_v2/disconnect.php index e8a067a9..e0e86c73 100755 --- a/docs/partner_platform/example_app_ipp_v2/disconnect.php +++ b/docs/partner_platform/example_app_ipp_v2/disconnect.php @@ -4,7 +4,7 @@ if ($IntuitAnywhere->disconnect($the_username, $the_tenant)) { - + } require_once dirname(__FILE__) . '/views/header.tpl.php'; @@ -15,12 +15,12 @@
DISCONNECTED! Please wait...
- - + + - + authMode( - QuickBooks_IPP::AUTHMODE_OAUTH, - $the_username, + QuickBooks_IPP::AUTHMODE_OAUTH, + $the_username, $creds); // Print the credentials we're using @@ -33,29 +33,29 @@ { // Set the DBID $IPP->dbid($Context, 'something'); - + // Set the IPP flavor $IPP->flavor($creds['qb_flavor']); - + // Get the base URL if it's QBO if ($creds['qb_flavor'] == QuickBooks_IPP_IDS::FLAVOR_ONLINE) { $IPP->baseURL($IPP->getBaseURL($Context, $realm)); } - + //print('Base URL is [' . $IPP->baseURL() . ']' . "\n\n"); - + $CustomerService = new QuickBooks_IPP_Service_Customer(); - + $Customer = new QuickBooks_IPP_Object_Customer(); $Customer->setName('Willy Wonka #' . mt_rand(0, 1000)); $Customer->setGivenName('Willy'); $Customer->setFamilyName('Wonka'); - + $resp = $CustomerService->add($Context, $realm, $Customer); - + print('We added a new customer named [' . $Customer->getName() . '] and got back an ID value of [' . $resp . ']' . "\n\n"); - + /* print("\n\n\n\n"); print('Request [' . $IPP->lastRequest() . ']'); diff --git a/docs/partner_platform/example_app_ipp_v2/example_customer_query.php b/docs/partner_platform/example_app_ipp_v2/example_customer_query.php index 7b2f0d5c..b18aae40 100755 --- a/docs/partner_platform/example_app_ipp_v2/example_customer_query.php +++ b/docs/partner_platform/example_app_ipp_v2/example_customer_query.php @@ -18,8 +18,8 @@ // Tell the framework to load some data from the OAuth store $IPP->authMode( - QuickBooks_IPP::AUTHMODE_OAUTH, - $the_username, + QuickBooks_IPP::AUTHMODE_OAUTH, + $the_username, $creds); // Print the credentials we're using @@ -33,37 +33,37 @@ { // Set the DBID $IPP->dbid($Context, 'something'); - + // Set the IPP flavor $IPP->flavor($creds['qb_flavor']); - + // Get the base URL if it's QBO if ($creds['qb_flavor'] == QuickBooks_IPP_IDS::FLAVOR_ONLINE) { $IPP->baseURL($IPP->getBaseURL($Context, $realm)); } - + //print('Base URL is [' . $IPP->baseURL() . ']' . "\n\n"); - + $CustomerService = new QuickBooks_IPP_Service_Customer(); - + $perpage = 10; $page = 1; do { print('

PAGE ' . $page . '

' . "\n\n"); - + $list = $CustomerService->findAll($Context, $realm, null, $page, $perpage); - + foreach ($list as $Customer) { print('• ' . $Customer->getId() . ' => ' . $Customer->getName() . '
' . "\n\n"); } - + $page++; } while (count($list) >= $perpage); - + /* print("\n\n\n\n"); print('Request [' . $IPP->lastRequest() . ']'); diff --git a/docs/partner_platform/example_app_ipp_v2/example_sync_status.php b/docs/partner_platform/example_app_ipp_v2/example_sync_status.php index 0df32c86..28d75e59 100755 --- a/docs/partner_platform/example_app_ipp_v2/example_sync_status.php +++ b/docs/partner_platform/example_app_ipp_v2/example_sync_status.php @@ -18,8 +18,8 @@ // Tell the framework to load some data from the OAuth store $IPP->authMode( - QuickBooks_IPP::AUTHMODE_OAUTH, - $the_username, + QuickBooks_IPP::AUTHMODE_OAUTH, + $the_username, $creds); // Print the credentials we're using @@ -33,18 +33,18 @@ { // Set the DBID $IPP->dbid($Context, 'something'); - + // Set the IPP flavor $IPP->flavor($creds['qb_flavor']); - + // Get the base URL if it's QBO if ($creds['qb_flavor'] == QuickBooks_IPP_IDS::FLAVOR_ONLINE) { $IPP->baseURL($IPP->getBaseURL($Context, $realm)); } - + $SyncStatus = new QuickBooks_IPP_Service_SyncStatus(); - + $id = '{QBO-119}'; $status = $SyncStatus->status($Context, $realm, QuickBooks_IPP_IDS::RESOURCE_CUSTOMER, $id); @@ -54,7 +54,7 @@ print("\n\n\n\n"); print('Response [' . $IPP->lastResponse() . ']'); print("\n\n\n\n"); - + } else { diff --git a/docs/partner_platform/example_app_ipp_v2/index.php b/docs/partner_platform/example_app_ipp_v2/index.php index 11a1e144..37229a11 100755 --- a/docs/partner_platform/example_app_ipp_v2/index.php +++ b/docs/partner_platform/example_app_ipp_v2/index.php @@ -12,7 +12,7 @@

- QuickBooks connection status: + QuickBooks connection status:

@@ -36,8 +36,8 @@ NOT CONNECTED!

-
- + +

diff --git a/docs/partner_platform/example_app_ipp_v2/oauth.php b/docs/partner_platform/example_app_ipp_v2/oauth.php index 8d4627ec..7ea13b31 100755 --- a/docs/partner_platform/example_app_ipp_v2/oauth.php +++ b/docs/partner_platform/example_app_ipp_v2/oauth.php @@ -2,9 +2,9 @@ /** * Example of OAuth authentication for an Intuit Anywhere application - * - * - * + * + * + * * @package QuickBooks * @subpackage Documentation */ @@ -19,10 +19,10 @@ */ require_once dirname(__FILE__) . '/config.php'; -// Try to handle the OAuth request +// Try to handle the OAuth request if ($IntuitAnywhere->handle($the_username, $the_tenant)) { - ; // The user has been connected, and will be redirected to $that_url automatically. + ; // The user has been connected, and will be redirected to $that_url automatically. } else { diff --git a/docs/partner_platform/example_app_ipp_v2/success.php b/docs/partner_platform/example_app_ipp_v2/success.php index e1468e85..b23e3dd4 100755 --- a/docs/partner_platform/example_app_ipp_v2/success.php +++ b/docs/partner_platform/example_app_ipp_v2/success.php @@ -7,7 +7,7 @@
You're connected! Please wait...
- + - + query($Context, $realm, "SELECT * FROM BillPayment "); @@ -19,7 +19,7 @@ foreach ($billpayments as $BillPayment) { print('Bill Payment # ' . $BillPayment->getDocNumber() . ' has a total of $' . $BillPayment->getTotalAmt() . "\n"); - + print_r($BillPayment); } diff --git a/docs/partner_platform/example_app_ipp_v3/example_bill_query.php b/docs/partner_platform/example_app_ipp_v3/example_bill_query.php index b848af40..afd88369 100755 --- a/docs/partner_platform/example_app_ipp_v3/example_bill_query.php +++ b/docs/partner_platform/example_app_ipp_v3/example_bill_query.php @@ -19,7 +19,7 @@ foreach ($bills as $Bill) { print('Bill # ' . $Bill->getDocNumber() . ' has a total of $' . $Bill->getTotalAmt() . "\n"); - + $num_line = $Bill->countLine(); for ($i = 0; $i < $num_line; $i++) { diff --git a/docs/partner_platform/example_app_ipp_v3/example_cdc.php b/docs/partner_platform/example_app_ipp_v3/example_cdc.php index 6ba42e63..20e537d8 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_cdc.php +++ b/docs/partner_platform/example_app_ipp_v3/example_cdc.php @@ -12,16 +12,16 @@ $CDCService = new QuickBooks_IPP_Service_ChangeDataCapture(); -// What types of objects do you want to get? -$objects = array( - 'Customer', - 'Invoice', +// What types of objects do you want to get? +$objects = array( + 'Customer', + 'Invoice', ); -// The date they should have been updated after +// The date they should have been updated after $timestamp = QuickBooks_Utilities::datetime('-5 years'); -$cdc = $CDCService->cdc($Context, $realm, +$cdc = $CDCService->cdc($Context, $realm, $objects, $timestamp); diff --git a/docs/partner_platform/example_app_ipp_v3/example_class_query.php b/docs/partner_platform/example_app_ipp_v3/example_class_query.php index 7a8c2d0e..a77289a2 100755 --- a/docs/partner_platform/example_app_ipp_v3/example_class_query.php +++ b/docs/partner_platform/example_app_ipp_v3/example_class_query.php @@ -9,7 +9,7 @@
 
 query($Context, $realm, "SELECT * FROM Class");
@@ -27,7 +27,7 @@
 print("\n\n\n\n");
 print('Response [' . $ClassService->lastResponse() . ']');
 print("\n\n\n\n");
-	
+
 ?>
 
 
diff --git a/docs/partner_platform/example_app_ipp_v3/example_company_info_get.php b/docs/partner_platform/example_app_ipp_v3/example_company_info_get.php index 8ae19a3d..b6276158 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_company_info_get.php +++ b/docs/partner_platform/example_app_ipp_v3/example_company_info_get.php @@ -14,7 +14,7 @@ $Info = $CompanyInfoService->get($Context, $realm); -// Let's get some data! +// Let's get some data! $company_type = $Info->getXPath('//CompanyInfo/NameValue[Name="CompanyType"]/Value'); print('Company type: ' . $company_type . "\n"); @@ -41,7 +41,7 @@ print("\n\n\n"); -// Here's a dump of all the data +// Here's a dump of all the data print('Dump of all data: ' . "\n"); print_r($Info); diff --git a/docs/partner_platform/example_app_ipp_v3/example_customer_count.php b/docs/partner_platform/example_app_ipp_v3/example_customer_count.php index 75bd988c..c563a310 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_customer_count.php +++ b/docs/partner_platform/example_app_ipp_v3/example_customer_count.php @@ -9,7 +9,7 @@
 
 query($Context, $realm, "SELECT COUNT(*) FROM Customer  ");
diff --git a/docs/partner_platform/example_app_ipp_v3/example_employee_query.php b/docs/partner_platform/example_app_ipp_v3/example_employee_query.php
index f2343615..315495d3 100755
--- a/docs/partner_platform/example_app_ipp_v3/example_employee_query.php
+++ b/docs/partner_platform/example_app_ipp_v3/example_employee_query.php
@@ -19,7 +19,7 @@
 foreach ($employees as $Employee)
 {
 	print('Employee id=' . $Employee->getId() . ' has a name of ' . $Employee->getGivenName() . ' ' . $Employee->getFamilyName() . "\n");
-	
+
 }
 
 
diff --git a/docs/partner_platform/example_app_ipp_v3/example_entitlements.php b/docs/partner_platform/example_app_ipp_v3/example_entitlements.php
index dec8d37a..8eadde93 100644
--- a/docs/partner_platform/example_app_ipp_v3/example_entitlements.php
+++ b/docs/partner_platform/example_app_ipp_v3/example_entitlements.php
@@ -12,7 +12,7 @@
 

- DUE TO AN INTUIT BUG, THIS DOES NOT WORK WITH SANDBOX COMPANIES! + DUE TO AN INTUIT BUG, THIS DOES NOT WORK WITH SANDBOX COMPANIES!


@@ -27,7 +27,7 @@ $EntitlementsService = new QuickBooks_IPP_Service_Entitlements(); -// This gets the entitlements/features of a QBO install +// This gets the entitlements/features of a QBO install $es = $EntitlementsService->entitlements($Context, $realm); if ($es) diff --git a/docs/partner_platform/example_app_ipp_v3/example_escaped_customer_query.php b/docs/partner_platform/example_app_ipp_v3/example_escaped_customer_query.php index c8962a3a..8086e9f2 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_escaped_customer_query.php +++ b/docs/partner_platform/example_app_ipp_v3/example_escaped_customer_query.php @@ -9,7 +9,7 @@
 
 query($Context, $realm, "SELECT * FROM Customer WHERE FullyQualifiedName LIKE '%Keith O\'Mally%' ");
@@ -26,7 +26,7 @@
 print("\n\n\n\n");
 print('Response [' . $CustomerService->lastResponse() . ']');
 print("\n\n\n\n");
-	
+
 ?>
 
 
diff --git a/docs/partner_platform/example_app_ipp_v3/example_invoice_delete.php b/docs/partner_platform/example_app_ipp_v3/example_invoice_delete.php index 37e705dc..c58a7a8c 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_invoice_delete.php +++ b/docs/partner_platform/example_app_ipp_v3/example_invoice_delete.php @@ -25,7 +25,7 @@ } /* -// For debugging +// For debugging print("\n\n\n\n"); print('Request [' . $IPP->lastRequest() . ']'); diff --git a/docs/partner_platform/example_app_ipp_v3/example_invoice_update.php b/docs/partner_platform/example_app_ipp_v3/example_invoice_update.php index 35a2412a..b9841118 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_invoice_update.php +++ b/docs/partner_platform/example_app_ipp_v3/example_invoice_update.php @@ -21,7 +21,7 @@ print_r($Invoice); -$Invoice->setTxnDate(date('Y-m-d')); // Update the invoice date to today's date +$Invoice->setTxnDate(date('Y-m-d')); // Update the invoice date to today's date if ($resp = $InvoiceService->update($Context, $realm, $Invoice->getId(), $Invoice)) { diff --git a/docs/partner_platform/example_app_ipp_v3/example_invoice_w_lines_query.php b/docs/partner_platform/example_app_ipp_v3/example_invoice_w_lines_query.php index 19bd8f9b..3732e3f7 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_invoice_w_lines_query.php +++ b/docs/partner_platform/example_app_ipp_v3/example_invoice_w_lines_query.php @@ -23,7 +23,7 @@ for ($i = 0; $i < $num_lines; $i++) { $Line = $Invoice->getLine($i); - + // Let's find out what item this uses if ($Line->getDetailType() == 'SalesItemLineDetail') { diff --git a/docs/partner_platform/example_app_ipp_v3/example_invoices_for_customer_query.php b/docs/partner_platform/example_app_ipp_v3/example_invoices_for_customer_query.php index 73b34ad7..fa5f55ea 100755 --- a/docs/partner_platform/example_app_ipp_v3/example_invoices_for_customer_query.php +++ b/docs/partner_platform/example_app_ipp_v3/example_invoices_for_customer_query.php @@ -33,7 +33,7 @@ print("\n\n\n\n"); exit; */ - + if (count($invoices)) { foreach ($invoices as $Invoice) diff --git a/docs/partner_platform/example_app_ipp_v3/example_item_update.php b/docs/partner_platform/example_app_ipp_v3/example_item_update.php index 19b50570..ec00a22a 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_item_update.php +++ b/docs/partner_platform/example_app_ipp_v3/example_item_update.php @@ -12,7 +12,7 @@ $ItemService = new QuickBooks_IPP_Service_Item(); -// Get the existing item +// Get the existing item $items = $ItemService->query($Context, $realm, "SELECT * FROM Item WHERE Id = '2' "); $Item = $items[0]; diff --git a/docs/partner_platform/example_app_ipp_v3/example_job_query.php b/docs/partner_platform/example_app_ipp_v3/example_job_query.php index adbb9b15..97eb3a03 100755 --- a/docs/partner_platform/example_app_ipp_v3/example_job_query.php +++ b/docs/partner_platform/example_app_ipp_v3/example_job_query.php @@ -10,7 +10,7 @@ query($Context, $realm, "SELECT * FROM JournalEntry STARTPOSITION 1 MAXRESULTS 10"); diff --git a/docs/partner_platform/example_app_ipp_v3/example_payment_add.php b/docs/partner_platform/example_app_ipp_v3/example_payment_add.php index 33e45b7f..1817e794 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_payment_add.php +++ b/docs/partner_platform/example_app_ipp_v3/example_payment_add.php @@ -34,7 +34,7 @@ $Payment->setCustomerRef('{-67}'); -// Send payment to QBO +// Send payment to QBO if ($resp = $PaymentService->add($Context, $realm, $Payment)) { print('Our new Payment ID is: [' . $resp . ']'); @@ -51,7 +51,7 @@ print("\n\n\n\n"); print('Response [' . $IPP->lastResponse() . ']'); print("\n\n\n\n\n\n\n\n\n"); -*/ +*/ ?> diff --git a/docs/partner_platform/example_app_ipp_v3/example_payment_delete.php b/docs/partner_platform/example_app_ipp_v3/example_payment_delete.php index 56a1bf48..340667fd 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_payment_delete.php +++ b/docs/partner_platform/example_app_ipp_v3/example_payment_delete.php @@ -25,7 +25,7 @@ } /* -// For debugging +// For debugging print("\n\n\n\n"); print('Request [' . $IPP->lastRequest() . ']'); diff --git a/docs/partner_platform/example_app_ipp_v3/example_payment_void.php b/docs/partner_platform/example_app_ipp_v3/example_payment_void.php index cf7b4aff..44bf1605 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_payment_void.php +++ b/docs/partner_platform/example_app_ipp_v3/example_payment_void.php @@ -14,11 +14,11 @@ $Id = 76; -// Let's look at this payment first +// Let's look at this payment first $payments = $PaymentService->query($Context, $realm, "SELECT * FROM Payment WHERE Id = '76' "); print_r($payments[0]); -// Now let's VOID it +// Now let's VOID it if ($resp = $PaymentService->void($Context, $realm, $Id)) { print('We voided the payment.'); @@ -35,7 +35,7 @@ print("\n\n\n\n"); print('Response [' . $IPP->lastResponse() . ']'); print("\n\n\n\n\n\n\n\n\n"); -*/ +*/ ?> diff --git a/docs/partner_platform/example_app_ipp_v3/example_salesreceipt_query.php b/docs/partner_platform/example_app_ipp_v3/example_salesreceipt_query.php index 245727f6..322df615 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_salesreceipt_query.php +++ b/docs/partner_platform/example_app_ipp_v3/example_salesreceipt_query.php @@ -19,7 +19,7 @@ foreach ($salesreceipts as $SalesReceipt) { print('Receipt # ' . $SalesReceipt->getDocNumber() . ' has a total of $' . $SalesReceipt->getTotalAmt() . "\n"); - + } /* diff --git a/docs/partner_platform/example_app_ipp_v3/example_time_add.php b/docs/partner_platform/example_app_ipp_v3/example_time_add.php index c749664b..f21079ab 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_time_add.php +++ b/docs/partner_platform/example_app_ipp_v3/example_time_add.php @@ -37,7 +37,7 @@ print("\n\n\n\n"); print('Response [' . $IPP->lastResponse() . ']'); print("\n\n\n\n\n\n\n\n\n"); - + ?>
diff --git a/docs/partner_platform/example_app_ipp_v3/example_time_query.php b/docs/partner_platform/example_app_ipp_v3/example_time_query.php index d7baac0c..5a94cb26 100644 --- a/docs/partner_platform/example_app_ipp_v3/example_time_query.php +++ b/docs/partner_platform/example_app_ipp_v3/example_time_query.php @@ -9,7 +9,7 @@
 
 query($Context, $realm, "SELECT * FROM TimeActivity  ");
diff --git a/docs/partner_platform/example_app_ipp_v3/reconnect.php b/docs/partner_platform/example_app_ipp_v3/reconnect.php
index 8b9212e7..e4040e5c 100755
--- a/docs/partner_platform/example_app_ipp_v3/reconnect.php
+++ b/docs/partner_platform/example_app_ipp_v3/reconnect.php
@@ -47,7 +47,7 @@
 		
RECONNECTED! (refreshed OAuth tokens)
- +
@@ -55,7 +55,7 @@
- + You're connected! Please wait... - + - + true, // defaults to FALSE // This indicates it's an e-commerce payment (made online) - 'isEcommerce' => true, // defaults to FALSE + 'isEcommerce' => true, // defaults to FALSE ); if ($Transaction = $Payments->charge($Context, $CreditCard, $amount, $currency, $context)) diff --git a/docs/payments/example_creditcard_fail.php b/docs/payments/example_creditcard_fail.php index f76e1c5b..e469f8ab 100644 --- a/docs/payments/example_creditcard_fail.php +++ b/docs/payments/example_creditcard_fail.php @@ -11,8 +11,8 @@

- This app demos a PHP connection to QuickBooks Payments. + This app demos a PHP connection to QuickBooks Payments.

Please make sure you review the quick-start tutorial! @@ -57,7 +57,7 @@

- QuickBooks connection status: + QuickBooks connection status:

@@ -90,7 +90,7 @@ - Disconnect from QuickBooks + Disconnect from QuickBooks (If you do this, you'll have to go back through the authorization/connection process to get connected again) @@ -132,13 +132,13 @@ You must authenticate to QuickBooks once before you can exchange data with it.

You only have to do this once!

- - After you've authenticated once, you never have to go + + After you've authenticated once, you never have to go through this connection process again.
- Click the button above to + Click the button above to authenticate and connect. -
- + +

diff --git a/docs/payments/oauth.php b/docs/payments/oauth.php index 8d4627ec..7ea13b31 100755 --- a/docs/payments/oauth.php +++ b/docs/payments/oauth.php @@ -2,9 +2,9 @@ /** * Example of OAuth authentication for an Intuit Anywhere application - * - * - * + * + * + * * @package QuickBooks * @subpackage Documentation */ @@ -19,10 +19,10 @@ */ require_once dirname(__FILE__) . '/config.php'; -// Try to handle the OAuth request +// Try to handle the OAuth request if ($IntuitAnywhere->handle($the_username, $the_tenant)) { - ; // The user has been connected, and will be redirected to $that_url automatically. + ; // The user has been connected, and will be redirected to $that_url automatically. } else { diff --git a/docs/payments/reconnect.php b/docs/payments/reconnect.php index 8b9212e7..e4040e5c 100755 --- a/docs/payments/reconnect.php +++ b/docs/payments/reconnect.php @@ -47,7 +47,7 @@
RECONNECTED! (refreshed OAuth tokens)
- +
@@ -55,7 +55,7 @@
- + You're connected! Please wait... - +