diff --git a/QuickBooks/Driver/Sql.php b/QuickBooks/Driver/Sql.php index c0601f34..33450e2e 100755 --- a/QuickBooks/Driver/Sql.php +++ b/QuickBooks/Driver/Sql.php @@ -1057,7 +1057,7 @@ protected function _recurEnqueue($user, $run_every, $action, $ident, $replace = } } - if ($extra) + if (is_array($extra) || is_object($extra)) { $extra = serialize($extra); } diff --git a/QuickBooks/QBXML/Object/Bill.php b/QuickBooks/QBXML/Object/Bill.php index 292f7058..ed6a4ef8 100644 --- a/QuickBooks/QBXML/Object/Bill.php +++ b/QuickBooks/QBXML/Object/Bill.php @@ -218,7 +218,11 @@ public function asList($request) break; case 'BillModRq': - + + if (isset($this->_object['ExpenseLine'])) + { + $this->_object['ExpenseLineMod'] = $this->_object['ExpenseLine']; + } break; } diff --git a/QuickBooks/QBXML/Schema/Object/BillModRq.php b/QuickBooks/QBXML/Schema/Object/BillModRq.php index 3f2fb2a9..cfefb4a0 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,107 +456,108 @@ 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 ( - 0 => 'TxnID', - 1 => 'EditSequence', - 2 => 'VendorRef ListID', - 3 => 'VendorRef FullName', - 4 => 'APAccountRef ListID', - 5 => 'APAccountRef FullName', - 6 => 'TxnDate', - 7 => 'DueDate', - 8 => 'RefNumber', - 9 => 'TermsRef ListID', - 10 => 'TermsRef FullName', - 11 => 'Memo', - 12 => 'IsTaxIncluded', - 13 => 'SalesTaxCodeRef ListID', - 14 => 'SalesTaxCodeRef FullName', - 15 => 'ClearExpenseLines', - 16 => 'ExpenseLineMod TxnLineID', - 17 => 'ExpenseLineMod AccountRef ListID', - 18 => 'ExpenseLineMod AccountRef FullName', - 19 => 'ExpenseLineMod Amount', - 20 => 'ExpenseLineMod TaxAmount', - 21 => 'ExpenseLineMod Memo', - 22 => 'ExpenseLineMod CustomerRef ListID', - 23 => 'ExpenseLineMod CustomerRef FullName', - 24 => 'ExpenseLineMod ClassRef ListID', - 25 => 'ExpenseLineMod ClassRef FullName', - 26 => 'ExpenseLineMod SalesTaxCodeRef ListID', - 27 => 'ExpenseLineMod SalesTaxCodeRef FullName', - 28 => 'ExpenseLineMod BillableStatus', - 29 => 'ClearItemLines', - 30 => 'ItemLineMod TxnLineID', - 31 => 'ItemLineMod ItemRef ListID', - 32 => 'ItemLineMod ItemRef FullName', - 33 => 'ItemLineMod Desc', - 34 => 'ItemLineMod Quantity', - 35 => 'ItemLineMod UnitOfMeasure', - 36 => 'ItemLineMod OverrideUOMSetRef ListID', - 37 => 'ItemLineMod OverrideUOMSetRef FullName', - 38 => 'ItemLineMod Cost', - 39 => 'ItemLineMod Amount', - 40 => 'ItemLineMod TaxAmount', - 41 => 'ItemLineMod CustomerRef ListID', - 42 => 'ItemLineMod CustomerRef FullName', - 43 => 'ItemLineMod ClassRef ListID', - 44 => 'ItemLineMod ClassRef FullName', - 45 => 'ItemLineMod SalesTaxCodeRef ListID', - 46 => 'ItemLineMod SalesTaxCodeRef FullName', - 47 => 'ItemLineMod BillableStatus', - 48 => 'ItemLineMod OverrideItemAccountRef ListID', - 49 => 'ItemLineMod OverrideItemAccountRef FullName', - 50 => 'ItemGroupLineMod TxnLineID', - 51 => 'ItemGroupLineMod ItemGroupRef ListID', - 52 => 'ItemGroupLineMod ItemGroupRef FullName', - 53 => 'ItemGroupLineMod Quantity', - 54 => 'ItemGroupLineMod UnitOfMeasure', - 55 => 'ItemGroupLineMod OverrideUOMSetRef ListID', - 56 => 'ItemGroupLineMod OverrideUOMSetRef FullName', - 57 => 'ItemGroupLineMod ItemLineMod TxnLineID', - 58 => 'ItemGroupLineMod ItemLineMod ItemRef ListID', - 59 => 'ItemGroupLineMod ItemLineMod ItemRef FullName', - 60 => 'ItemGroupLineMod ItemLineMod Desc', - 61 => 'ItemGroupLineMod ItemLineMod Quantity', - 62 => 'ItemGroupLineMod ItemLineMod UnitOfMeasure', - 63 => 'ItemGroupLineMod ItemLineMod OverrideUOMSetRef ListID', - 64 => 'ItemGroupLineMod ItemLineMod OverrideUOMSetRef FullName', - 65 => 'ItemGroupLineMod ItemLineMod Cost', - 66 => 'ItemGroupLineMod ItemLineMod Amount', - 67 => 'ItemGroupLineMod ItemLineMod TaxAmount', - 68 => 'ItemGroupLineMod ItemLineMod CustomerRef ListID', - 69 => 'ItemGroupLineMod ItemLineMod CustomerRef FullName', - 70 => 'ItemGroupLineMod ItemLineMod ClassRef ListID', - 71 => 'ItemGroupLineMod ItemLineMod ClassRef FullName', - 72 => 'ItemGroupLineMod ItemLineMod SalesTaxCodeRef ListID', - 73 => 'ItemGroupLineMod ItemLineMod SalesTaxCodeRef FullName', - 74 => 'ItemGroupLineMod ItemLineMod BillableStatus', - 75 => 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef ListID', - 76 => 'ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName', - 77 => 'IncludeRetElement', + 0 => "TxnID", + 1 => "EditSequence", + 2 => "VendorRef ListID", + 3 => "VendorRef FullName", + 4 => "APAccountRef ListID", + 5 => "APAccountRef FullName", + 6 => "TxnDate", + 7 => "DueDate", + 8 => "RefNumber", + 9 => "TermsRef ListID", + 10 => "TermsRef FullName", + 11 => "Memo", + 12 => "IsTaxIncluded", + 13 => "SalesTaxCodeRef ListID", + 14 => "SalesTaxCodeRef FullName", + 15 => "ClearExpenseLines", + 16 => "ExpenseLineMod", + 17 => "ExpenseLineMod TxnLineID", + 18 => "ExpenseLineMod AccountRef ListID", + 19 => "ExpenseLineMod AccountRef FullName", + 20 => "ExpenseLineMod Amount", + 21 => "ExpenseLineMod TaxAmount", + 22 => "ExpenseLineMod Memo", + 23 => "ExpenseLineMod CustomerRef ListID", + 24 => "ExpenseLineMod CustomerRef FullName", + 25 => "ExpenseLineMod ClassRef ListID", + 26 => "ExpenseLineMod ClassRef FullName", + 27 => "ExpenseLineMod SalesTaxCodeRef ListID", + 28 => "ExpenseLineMod SalesTaxCodeRef FullName", + 29 => "ExpenseLineMod BillableStatus", + 30 => "ClearItemLines", + 31 => "ItemLineMod TxnLineID", + 32 => "ItemLineMod ItemRef ListID", + 33 => "ItemLineMod ItemRef FullName", + 34 => "ItemLineMod Desc", + 35 => "ItemLineMod Quantity", + 36 => "ItemLineMod UnitOfMeasure", + 37 => "ItemLineMod OverrideUOMSetRef ListID", + 38 => "ItemLineMod OverrideUOMSetRef FullName", + 39 => "ItemLineMod Cost", + 40 => "ItemLineMod Amount", + 41 => "ItemLineMod TaxAmount", + 42 => "ItemLineMod CustomerRef ListID", + 43 => "ItemLineMod CustomerRef FullName", + 44 => "ItemLineMod ClassRef ListID", + 45 => "ItemLineMod ClassRef FullName", + 46 => "ItemLineMod SalesTaxCodeRef ListID", + 47 => "ItemLineMod SalesTaxCodeRef FullName", + 48 => "ItemLineMod BillableStatus", + 49 => "ItemLineMod OverrideItemAccountRef ListID", + 50 => "ItemLineMod OverrideItemAccountRef FullName", + 51 => "ItemGroupLineMod TxnLineID", + 52 => "ItemGroupLineMod ItemGroupRef ListID", + 53 => "ItemGroupLineMod ItemGroupRef FullName", + 54 => "ItemGroupLineMod Quantity", + 55 => "ItemGroupLineMod UnitOfMeasure", + 56 => "ItemGroupLineMod OverrideUOMSetRef ListID", + 57 => "ItemGroupLineMod OverrideUOMSetRef FullName", + 58 => "ItemGroupLineMod ItemLineMod TxnLineID", + 59 => "ItemGroupLineMod ItemLineMod ItemRef ListID", + 60 => "ItemGroupLineMod ItemLineMod ItemRef FullName", + 61 => "ItemGroupLineMod ItemLineMod Desc", + 62 => "ItemGroupLineMod ItemLineMod Quantity", + 63 => "ItemGroupLineMod ItemLineMod UnitOfMeasure", + 64 => "ItemGroupLineMod ItemLineMod OverrideUOMSetRef ListID", + 65 => "ItemGroupLineMod ItemLineMod OverrideUOMSetRef FullName", + 66 => "ItemGroupLineMod ItemLineMod Cost", + 67 => "ItemGroupLineMod ItemLineMod Amount", + 68 => "ItemGroupLineMod ItemLineMod TaxAmount", + 69 => "ItemGroupLineMod ItemLineMod CustomerRef ListID", + 70 => "ItemGroupLineMod ItemLineMod CustomerRef FullName", + 71 => "ItemGroupLineMod ItemLineMod ClassRef ListID", + 72 => "ItemGroupLineMod ItemLineMod ClassRef FullName", + 73 => "ItemGroupLineMod ItemLineMod SalesTaxCodeRef ListID", + 74 => "ItemGroupLineMod ItemLineMod SalesTaxCodeRef FullName", + 75 => "ItemGroupLineMod ItemLineMod BillableStatus", + 76 => "ItemGroupLineMod ItemLineMod OverrideItemAccountRef ListID", + 77 => "ItemGroupLineMod ItemLineMod OverrideItemAccountRef FullName", + 78 => "IncludeRetElement", ); - + return $paths; } } -?> \ No newline at end of file +?>