Esempio n. 1
0
$Customer->setMiddleName('R');
$Customer->setSalutation('Mr.');
$Customer->setPhone('1.860.634.1602');
$API->addCustomer($Customer, '_quickbooks_customer_add_callback', 15);
// INVOICES
$Invoice = new QuickBooks_Object_Invoice();
//$Invoice->setOther('test of other');		// for some reason this field doesn't work...
$Invoice->setMemo('test of a memo');
$Invoice->setCustomerApplicationID(15);
$Invoice->setRefNumber(125);
$InvoiceLine1 = new QuickBooks_Object_Invoice_InvoiceLine();
$InvoiceLine1->setItemApplicationID(12);
$InvoiceLine1->setAmount(300.0);
$InvoiceLine1->setQuantity(3);
$InvoiceLine2 = new QuickBooks_Object_Invoice_InvoiceLine();
$InvoiceLine2->setItemApplicationID(11);
$InvoiceLine2->setAmount(225.0);
$InvoiceLine2->setQuantity(5);
$Invoice->addInvoiceLine($InvoiceLine1);
$Invoice->addInvoiceLine($InvoiceLine2);
$API->addInvoice($Invoice, '_quickbooks_invoice_add_callback', 20);
// VENDORS
$Vendor = new QuickBooks_Object_Vendor();
$Vendor->setName('Test Vendor ' . mt_rand());
$Vendor->setPhone('1.860.634.1602');
$Vendor->setFirstName('Test');
$Vendor->setFax('1.860.429.5183');
$API->addVendor($Vendor, '_quickbooks_vendor_add_callback', 19);
// SERVICE ITEMS
$ServiceItem = new QuickBooks_Object_ServiceItem();
$ServiceItem->isSalesOrPurchase(true);