'true', 'message'=> Tools::displayError('Vente non trouvée') )); } $report = Db::getInstance()->getRow(' SELECT `report_data` FROM `'._DB_PREFIX_.'philea_syncreport` WHERE `id_sale` = '.$id_sale.' AND `filename` LIKE "'.$type.'%" '); if(isset($report) && $report != false) { return json_encode(array( 'error' => 'false', 'report' => $report )); } else { return json_encode(array( 'error'=> 'true', 'message' => Tools::displayError('Pas de rapport '.$type.' disponible') )); } }