示例#1
0
<?php

require_once '/Users/kpalmer/Projects/QuickBooks/QuickBooks.php';
/*
$filter = null;
$return_keys = false;
$order_for_mapping = true;

print_r(QuickBooks_Utilities::listObjects($filter, $return_keys, $order_for_mapping));

print('object: ' . QuickBooks_Utilities::actionToObject(QUICKBOOKS_ADD_NONINVENTORYITEM));

print("\n\n");
*/
$Check = new QuickBooks_Object_Check();
$Check->setRefNumber('1234');
$Check->setTxnDate('2009-05-02');
$ItemLine = new QuickBooks_Object_Check_ItemLine();
$ItemLine->setItemName('test');
$Check->addItemLine($ItemLine);
print_r($Check);
print $Check->asQBXML(QUICKBOOKS_ADD_CHECK);
示例#2
0
<?php

require_once '../QuickBooks.php';
$Check = new QuickBooks_Object_Check();
$Check->setRefNumber(1234);
$Check->setPayeeEntityFullName('test vendor');
$Check->setTxnDate(time());
//$Check->setIsToBePrinted(true);
$Check->setIsToBePrinted(false);
$ExpenseLine = new QuickBooks_Object_Check_ExpenseLine();
$ExpenseLine->setMemo('test memo');
$ExpenseLine->setCustomerFullName('Michael Baxter');
$ExpenseLine->setAmount(40.0);
$ItemLine1 = new QuickBooks_Object_Check_ItemLine();
$ItemLine1->setItemFullName('test');
$ItemLine1->setQuantity(2);
$ItemLine1->setCost(15.5);
$ItemLine2 = new QuickBooks_Object_Check_ItemLine();
$ItemLine2->setItemFullName('test');
$ItemLine2->setQuantity(3);
$ItemLine2->setCost(5.5);
$Check->addExpenseLine($ExpenseLine);
$Check->addItemLine($ItemLine1);
$Check->addItemLine($ItemLine2);
//print_r($Check);
print $Check->asQBXML(QUICKBOOKS_ADD_CHECK);