diff --git a/html/fiche_search.php b/html/fiche_search.php index 2712d6912..9885bc1b9 100644 --- a/html/fiche_search.php +++ b/html/fiche_search.php @@ -135,6 +135,7 @@ if ( isset ( $_POST['search']) ) { if (strlen(trim($e_fic_search) ) == 0 ) { $Res=ExecSql($cn,$sql); } else { + $e_fic_search=FormatString($e_fic_search); $Res=ExecSql($cn,"$sql and upper(vw_name) like upper('%$e_fic_search%')"); } @@ -149,7 +150,7 @@ if ( isset ( $_POST['search']) ) { //set focus on first "Select" button. $row=pg_fetch_array($Res,$i); - // if quick code is empty pass ( it not used for the contact) + // if quick code is empty pass if (trim($row['quick_code']) == "") continue; diff --git a/include/fiche_inc.php b/include/fiche_inc.php index f888bdcf3..72e21267b 100644 --- a/include/fiche_inc.php +++ b/include/fiche_inc.php @@ -1488,7 +1488,8 @@ function GetParent($p_cn,$p_val) * \param p_id quick_code * \param attribut if attribut == "" then return a array * taken from vw_fiche_attr - * \return string avec nom fiche or array + * \return string avec nom fiche is attr is not null + * or array is attr is empty * */ function getFicheAttribut($p_cn,$p_id,$p_attr="") { @@ -1520,15 +1521,14 @@ function getFicheAttribut($p_cn,$p_id,$p_attr="") { * \brief Check if a fiche is used by a jrn * return 1 if the fiche is in the range otherwise 0 * - * parm : - * - p_cn connextion - * - j_jrn journal_id - * - $p_type : deb or cred - * - $p_fiche : quick_code - * gen : - * - none + * + * \param $p_cn connextion + * \param $j_jrn journal_id + * \param $p_fiche : quick_code + * \param $p_type : deb or cred default empty + * * - * return 1 if the fiche is in the range otherwise 0 + * \return 1 if the fiche is in the range otherwise 0 * */ function IsFicheOfJrn($p_cn,$p_jrn,$p_fiche,$p_type="") diff --git a/include/user_common.php b/include/user_common.php index 036fa9b71..ff0c90f5d 100644 --- a/include/user_common.php +++ b/include/user_common.php @@ -600,7 +600,7 @@ function InsertStockGoods($p_cn,$p_j_id,$p_good,$p_quant,$p_type) // Retrieve the good account for stock $code_marchandise=GetFicheAttribut($p_cn,$p_good,ATTR_DEF_STOCK); $p_good=FormatString($p_good); - $sql="select f_id from vw_poste_qcode where j_qcode=upper('$p_good')/"; + $sql="select f_id from vw_poste_qcode where j_qcode=upper('$p_good')"; $Res=ExecSql($p_cn,$sql); $r=pg_fetch_array($Res,0); $f_id=$r['f_id']; diff --git a/include/user_form_ach.php b/include/user_form_ach.php index 2e09d6c30..9b260d21b 100644 --- a/include/user_form_ach.php +++ b/include/user_form_ach.php @@ -77,14 +77,9 @@ echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_peri echo_error('user_form_ach.php',__LINE__,'Erreur invalid request uri '.$href); exit (-1); } - - - // $r.="