diff --git a/html/index.php b/html/index.php index e69f47ba3..8238928ff 100644 --- a/html/index.php +++ b/html/index.php @@ -255,7 +255,7 @@ echo ' Mot de passe oublié ?
- Indiquez votre login ou votre email + Indiquez votre login ou votre email
diff --git a/html/js/card.js b/html/js/card.js index 0d6dd3bf6..87eb2785a 100644 --- a/html/js/card.js +++ b/html/js/card.js @@ -318,7 +318,7 @@ function result_card_search(req) sx=document.body.scrollTop+60; } - var div_style="top:"+sx+"px;height:auto"; + var div_style="top:"+sx+"px;min-height:80%;height:auto"; add_div({id:'search_card',cssclass:'inner_box',html:"",style:div_style,drag:false,effect:'blinddown'}); $('search_card').innerHTML=code_html; @@ -1020,4 +1020,4 @@ function delete_card(obj) { }); } }); -} \ No newline at end of file +} diff --git a/html/js/sorttable.js b/html/js/sorttable.js index fd33a8a45..b36f3833c 100644 --- a/html/js/sorttable.js +++ b/html/js/sorttable.js @@ -21,7 +21,8 @@ Show the default order example: - + .... ▴ + Sort on date // format YYYYMMDD diff --git a/include/class/tva_rate_mtable.class.php b/include/class/tva_rate_mtable.class.php index 19c047fce..804672f1c 100644 --- a/include/class/tva_rate_mtable.class.php +++ b/include/class/tva_rate_mtable.class.php @@ -272,7 +272,7 @@ class Tva_Rate_MTable extends Manage_Table_SQL if ( $count < 2) { throw new Exception(_("Vous ne pouvez pas effacer tous les taux. Si votre société n'utilise pas la TVA, changer dans le menu société")); } - + $cn->exec_sql("delete from tva_rate where tva_id=$1", [$this->table->tva_id]); } } diff --git a/include/constant.php b/include/constant.php index 1354c8135..7ab2deca5 100644 --- a/include/constant.php +++ b/include/constant.php @@ -126,7 +126,10 @@ define ('COMPTA_MAX_YEAR',2100); define ('COMPTA_MIN_YEAR',1900); define ('MAX_RECONCILE',25); define ('MAX_QCODE',4); -define ('MAX_SEARCH_CARD',20); +if ( ! defined ('MAX_SEARCH_CARD') ) { + define ('MAX_SEARCH_CARD',20); +} + define ('MAX_FOLDER_TO_SHOW',80); define ('MAX_ACTION_SHOW',20); diff --git a/include/lib/manage_table_sql.class.php b/include/lib/manage_table_sql.class.php index fc42f2102..87427d300 100644 --- a/include/lib/manage_table_sql.class.php +++ b/include/lib/manage_table_sql.class.php @@ -806,9 +806,29 @@ function check() { if ( $this->get_col_type($v)=="select") { + /** + * we translate the code from the database into a hardcoded label + */ $idx=$p_row[$v]; if ( ! isset($this->a_select[$v][$idx])) { - echo td("--"); + /* + * Check if index exists + */ + $array_to_search=$this->a_select[$v]; + $value=$p_row[$v]; + $nb_search=count($array_to_search); + $found=FALSE; + for ( $e=0;$e< $nb_search;$e++) { + if (isset ($array_to_search[$e]['value']) && $array_to_search[$e]['value']==$value ) { + $found=TRUE; + echo td($array_to_search[$e]['label']); + } + } + + if ( ! $found) { + echo td("--"); + + } } else { echo td($this->a_select[$v][$idx]["label"]); }