Merged revisions 5320-5322 via svnmerge from

svn+ssh://danydb@svn/svn/phpcompta/tags/rel660

........
  r5320 | danydb | 2013-06-09 19:27:58 +0200 (Sun, 09 Jun 2013) | 1 line
  
  bug #0000856: Problème filtre fiche dans ODS
........
  r5321 | danydb | 2013-06-09 19:39:13 +0200 (Sun, 09 Jun 2013) | 1 line
  
  bug #0000855: Ordre des pièces justificatives
........
  r5322 | danydb | 2013-06-09 19:46:50 +0200 (Sun, 09 Jun 2013) | 1 line
  
  bug #0000854: DASHBOARD : date mal formée
........
This commit is contained in:
Dany De Bontridder 2013-06-09 18:21:57 +00:00
parent 3c6dc2d5c7
commit 4322b2395b
6 changed files with 13 additions and 19 deletions

View file

@ -1054,7 +1054,7 @@ function display_dashboard_operation($p_array,$p_title,$p_div)
?>
<tr class="<?php echo (($i%2)==0)?'odd':'even';?>">
<td>
<?php echo smaller_date($p_array[$i]['jr_date']) ?>
<?php echo smaller_date(format_date($p_array[$i]['jr_date']) );?>
</td>
<td>
<?php echo HtmlInput::detail_op($p_array[$i]['jr_id'], $p_array[$i]['jr_internal']) ?>

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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()
{
}
}

View file

@ -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);

View file

@ -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);}
</script>