Esempio n. 1
0
 /**
  * Get the instance of the queueing class
  * 
  * @return QuickBooks_Queue
  */
 public static function getInstance()
 {
     return QuickBooks_Queue_Singleton::initialize(null, null, null, false);
 }
Esempio n. 2
0
/**
 * Handle a 500 not found error from QuickBooks
 * 
 * Instead of returning empty result sets for queries that don't find any 
 * records, QuickBooks returns an error message. This handles those error 
 * messages, and acts on them by adding the missing item to QuickBooks. 
 */
function _quickbooks_error_e500_notfound($requestID, $user, $action, $ID, $extra, &$err, $xml, $errnum, $errmsg)
{
    $Queue = QuickBooks_Queue_Singleton::getInstance();
    if ($action == QUICKBOOKS_IMPORT_INVOICE) {
        return TRUE;
    } else {
        if ($action == QUICKBOOKS_IMPORT_CUSTOMER) {
            return TRUE;
        } else {
            if ($action == QUICKBOOKS_IMPORT_SALESORDER) {
                return TRUE;
            } else {
                if ($action == QUICKBOOKS_IMPORT_ITEM) {
                    return TRUE;
                }
            }
        }
    }
    return false;
}
/**
 * Handle a 500 not found error from QuickBooks
 * 
 * Instead of returning empty result sets for queries that don't find any 
 * records, QuickBooks returns an error message. This handles those error 
 * messages, and acts on them by adding the missing item to QuickBooks. 
 */
function _quickbooks_error_e500_notfound($requestID, $user, $action, $ID, $extra, &$err, $xml, $errnum, $errmsg)
{
    $Queue = QuickBooks_Queue_Singleton::getInstance();
    if ($action == QUICKBOOKS_IMPORT_ITEM) {
        return true;
    }
    return false;
}