Exemplo n.º 1
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;
}