diff --git a/include/ac_common.php b/include/ac_common.php index 371c6f395..238084708 100644 --- a/include/ac_common.php +++ b/include/ac_common.php @@ -1054,7 +1054,7 @@ function display_dashboard_operation($p_array,$p_title,$p_div) ?> - + diff --git a/include/class_acc_account_ledger.php b/include/class_acc_account_ledger.php index c21f12070..cafc00ca3 100644 --- a/include/class_acc_account_ledger.php +++ b/include/class_acc_account_ledger.php @@ -159,7 +159,7 @@ class Acc_Account_Ledger " ( to_date($2,'DD.MM.YYYY') <= j_date and ". " to_date($3,'DD.MM.YYYY') >= j_date )". " and $filter_sql $sql_let ". - " order by j_date,substring(jr_pj_number,'\\\\d+$') asc",array($this->id,$p_from,$p_to)); + " order by j_date,substring(jr_pj_number,'[0-9]+$') asc",array($this->id,$p_from,$p_to)); return $this->get_row_sql($Res); } diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 448dbf06e..77970c1f6 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -391,7 +391,7 @@ class Acc_Ledger extends jrn_def_sql "jr_grpt_id=j_grpt " . " left join tmp_pcmn on pcm_val=j_poste " . " where j_jrn_def=" . $this->id . - " and " . $periode . " order by j_date::date asc,substring(jr_pj_number,'\\\\d+$')::numeric asc,j_grpt,j_debit desc " . + " and " . $periode . " order by j_date::date asc,substring(jr_pj_number,'[0-9]+$')::numeric asc,j_grpt,j_debit desc " . $cond_limite); } else @@ -411,7 +411,7 @@ class Acc_Ledger extends jrn_def_sql join jrn_def on (jr_def_id=jrn_def_id) where " . $g_user->get_ledger_sql() . " and " . - " " . $periode . " order by j_date::date,substring(jr_pj_number,'\\\\d+$') asc,j_grpt,j_debit desc " . + " " . $periode . " order by j_date::date,substring(jr_pj_number,'[0-9]+$') asc,j_grpt,j_debit desc " . $cond_limite); } @@ -545,7 +545,7 @@ class Acc_Ledger extends jrn_def_sql jrn_def_type, jrn.jr_tech_per FROM jrn join jrn_def on (jrn_def_id=jr_def_id) - WHERE $periode $jrn order by jr_date,substring(jrn.jr_pj_number,'\\\d+$')::numeric asc $cond_limite"; + WHERE $periode $jrn order by jr_date,substring(jrn.jr_pj_number,'[0-9]+$')::numeric asc $cond_limite"; $Res = $this->db->exec_sql($sql); $Max = Database::num_row($Res); @@ -813,9 +813,9 @@ class Acc_Ledger extends jrn_def_sql // Sort $url = "?" . CleanUrl(); $str_dossier = dossier::get(); - $table->add("Date", $url, 'order by jr_date asc,substring(jr_pj_number,\'\\\d+$\')::numeric asc', 'order by jr_date desc,substring(jr_pj_number,\'\\\d+$\')::numeric desc', "da", "dd"); + $table->add("Date", $url, 'order by jr_date asc,substring(jr_pj_number,\'[0-9]+$\')::numeric asc', 'order by jr_date desc,substring(jr_pj_number,\'[0-9]+$\')::numeric desc', "da", "dd"); $table->add('Echeance', $url, " order by jr_ech asc", " order by jr_ech desc", 'ea', 'ed'); - $table->add('PJ', $url, ' order by substring(jr_pj_number,\'\\\d+$\')::numeric asc ', ' order by substring(jr_pj_number,\'\\\d+$\')::numeric desc ', "pja", "pjd"); + $table->add('PJ', $url, ' order by substring(jr_pj_number,\'[0-9]+$\')::numeric asc ', ' order by substring(jr_pj_number,\'[0-9]+$\')::numeric desc ', "pja", "pjd"); $table->add('Tiers', $url, " order by name asc", " order by name desc", 'na', 'nd'); $table->add('Montant', $url, " order by jr_montant asc", " order by jr_montant desc", "ma", "md"); $table->add("Description", $url, "order by jr_comment asc", "order by jr_comment desc", "ca", "cd"); @@ -1681,7 +1681,6 @@ class Acc_Ledger extends jrn_def_sql // name of the field to update with the name of the card $quick_code->set_attribute('label', "ld" . $i); - $quick_code->set_attribute('jrn', $this->id); // name of the field to update with the name of the card $quick_code->set_attribute('typecard', 'filter'); @@ -1691,7 +1690,6 @@ class Acc_Ledger extends jrn_def_sql $quick_code->set_function('fill_data'); $quick_code->javascript = sprintf(' onchange="fill_data_onchange(\'%s\');" ', $quick_code->name); - $quick_code->jrn = $this->id; $quick_code->value = (isset(${'qc_' . $i})) ? ${'qc_' . $i} : ""; $quick_code->readonly = $p_readonly; @@ -2859,7 +2857,7 @@ class Acc_Ledger extends jrn_def_sql " from jrn join jrn_def on (jr_def_id=jrn_def_id) where " . " jr_date >= (select p_start from parm_periode where p_id = $1) and jr_date <= (select p_end from parm_periode where p_id = $2)" . - ' ' . $jrn . ' order by jr_date,substring(jr_pj_number,\'\\\d+$\')::numeric asc'; + ' ' . $jrn . ' order by jr_date,substring(jr_pj_number,\'[0-9]+$\')::numeric asc'; $ret = $this->db->get_array($sql, array($p_from, $p_to)); return $ret; } diff --git a/include/class_fiche.php b/include/class_fiche.php index 3a4fba1ff..05a3bd313 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -1119,7 +1119,7 @@ class Fiche } $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); - $Res=$this->cn->exec_sql("select distinct substring(jr_pj_number,'\\\\d+$'),j_id,j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_qcode,". + $Res=$this->cn->exec_sql("select distinct substring(jr_pj_number,'[0-9]+$'),j_id,j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_qcode,". "case when j_debit='t' then j_montant else 0 end as deb_montant,". "case when j_debit='f' then j_montant else 0 end as cred_montant,". " jr_comment as description,jrn_def_name as jrn_name,". @@ -1134,7 +1134,7 @@ class Fiche " ( to_date($2,'DD.MM.YYYY') <= j_date and ". " to_date($3,'DD.MM.YYYY') >= j_date )". " and $filter_sql $sql_let ". - " order by j_date,substring(jr_pj_number,'\\\\d+$')",array($qcode,$p_from,$p_to)); + " order by j_date,substring(jr_pj_number,'[0-9]+$')",array($qcode,$p_from,$p_to)); return $this->get_row_result($Res); } @@ -1910,7 +1910,7 @@ class Fiche } function get_all_account() { - + } } diff --git a/include/export_histo_csv.php b/include/export_histo_csv.php index ee1cf3085..680545e68 100644 --- a/include/export_histo_csv.php +++ b/include/export_histo_csv.php @@ -31,7 +31,7 @@ header('Content-Disposition: attachment;filename="histo-export.csv"',FALSE); $ledger=new Acc_Ledger($cn,0); list($sql,$where)=$ledger->build_search_sql($_GET); -$order=" order by jr_date_order asc,substring(jr_pj_number,'\\\d+$')::numeric asc "; +$order=" order by jr_date_order asc,substring(jr_pj_number,'[0-9]+$')::numeric asc "; $res=$cn->get_array($sql.$order); diff --git a/include/template/dashboard.php b/include/template/dashboard.php index 824cd699e..31698a7f3 100644 --- a/include/template/dashboard.php +++ b/include/template/dashboard.php @@ -334,11 +334,7 @@ try { var array=Array('customer_now_div','customer_late_div','supplier_now_div','supplier_late_div','action_now_div','action_late_div'); var i=0; for (i=0;i < array.length;i++) { - - if ( ! document.getElementById(array[i])) { - console.log('ATTENTION'+array[i]); - } new Draggable(array[i],{}); -} + } } catch (e) { alert(e.getMessage);} \ No newline at end of file