Improve grand livre to have the same look at the others

This commit is contained in:
sparkyx 2004-12-04 14:07:01 +00:00
parent 1d3b629152
commit d224f117a3
2 changed files with 9 additions and 19 deletions

View file

@ -23,8 +23,8 @@ echo_debug(__FILE__,__LINE__,"include user_action_gl.php");
include_once ("preference.php");
include_once ("user_common.php");
include_once ("class_widget.php");
include_once("class_jrn.php");
include_once("class_user.php");
include("jrn.php");
$dossier=sprintf("dossier%d",$g_dossier);
$cn=DbConnect($dossier);
@ -38,26 +38,15 @@ $periode_start=make_array($cn,"select p_id,to_char(p_start,'DD-MM-YYYY') from pa
$User=new cl_user($cn);
$current=(isset($_POST['p_periode']))?$_POST['p_periode']:$User->GetPeriode();
$w->selected=$current;
echo 'Période'.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider');
echo 'Période '.$w->IOValue("p_periode",$periode_start).$w->Submit('gl_submit','Valider');
?>
</form>
<?
$Jrn = new jrn($cn,0);
$Jrn->GetRow($current,$current);
if ( count($Jrn->row ) == 0 )
exit;
echo "<TABLE>";
foreach ( $Jrn->row as $op ) {
echo "<TR>".
"<TD>".$op['internal']."</TD>".
"<TD>".$op['j_date']."</TD>".
"<TD>".$op['poste']."</TD>".
"<TD>".$op['description']."</TD>".
"<TD>".$op['deb_montant']."</TD>".
"<TD>".$op['cred_montant']."</TD>".
"</TR>";
}
echo "</table>";
$sql=SQL_LIST_ALL_INVOICE." and jr_tech_per=".$current;
$list=ListJrn($cn,0,$sql);
echo $list;
?>
</div>

View file

@ -265,7 +265,8 @@ function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null)
jrn_def_type,
jr_valid
from
jrn join jrn_def on jrn_def_id=jr_def_id where jrn_def_id=$p_jrn";
jrn join jrn_def on jrn_def_id=jr_def_id where ";
$jrn_sql=($p_jrn =0)?"1=1":"jrn_def_id=$p_jrn ";
$l_and=" and ";
if ( ereg("^[0-9]+$", $l_s_montant) || ereg ("^[0-9]+\.[0-9]+$", $l_s_montant) ) {
$sql.=" and jr_montant $l_mont_sel $l_s_montant";