//	we can add an invoice that depends on them. You can again refer to the item
//	in three different ways:
//	- Name/FullName
//	- ListID
//	- a mapped primary key from your application
//
// 	For this example, we're going to refer to the items by name, so the items
//	must already be present in QuickBooks for this invoice to be added.
// 3 items of type "Item Type 1" at $10.00 per item
$InvoiceLine1 = new QuickBooks_Object_Invoice_InvoiceLine();
$InvoiceLine1->setItemName('Item Type 1');
$InvoiceLine1->setRate(10.0);
$InvoiceLine1->setQuantity(3);
// 5 items of type "Item Type 2", for a total amount of $225.00 ($45.00 each)
$InvoiceLine2 = new QuickBooks_Object_Invoice_InvoiceLine();
$InvoiceLine2->setItemName('Item Type 2');
$InvoiceLine2->setAmount(225.0);
$InvoiceLine2->setQuantity(5);
// Make sure you add those invoice lines on to the invoice
$Invoice->addInvoiceLine($InvoiceLine1);
$Invoice->addInvoiceLine($InvoiceLine2);
// Queue up the request to be sent to QuickBooks
$priority_of_add_invoice_request = 10;
// Make sure this is lower than the customer add it depends on
if ($API->addInvoice($Invoice, '_quickbooks_ca_invoice_add_callback', $primary_key_of_invoice_in_your_application, $priority_of_add_invoice_request)) {
    print 'Queued up a request to add invoice #' . $primary_key_of_invoice_in_your_application . ' to QuickBooks!' . "\n";
}
// Adding an estimate for a customer
$primary_key_of_estimate_in_your_application = 'ABC-123';
// Adding an estimate is very similar to adding an invoice, as most of the
//	estimate data within QuickBooks closely mirrors the invoice data.