Compta analytic : improve apperance, fix bug

This commit is contained in:
Dany De Bontridder 2010-12-07 22:04:31 +00:00
parent 69d773d5f7
commit 2f1cce1da5
7 changed files with 33 additions and 21 deletions

View file

@ -55,7 +55,7 @@ if ( isset($_POST['add']))
}
$array=$r->myList();
echo '<div class="content">';
echo '<div class="content" style="width:80%;margin-left:10%">';
echo '<form method="post">';
echo dossier::hidden();
echo '<table style="border: 2px outset blue; width: 100%;" >';

View file

@ -38,9 +38,13 @@ $menu=array(array("?p_action=ca_imp&sub=listing&$str_dossier",_("Listing"),_("Li
array("?p_action=ca_imp&sub=bc2&$str_dossier",_("Balance croisée"),_("Balance croisée de 2 plans analytiques"),"bc2")
);
$sub=(isset($_GET['sub']))?$_GET['sub']:'no';
echo '<div class="content" style="margin-left:12%">';
echo '<div class="content" style="width:88%;margin-left:12%">';
echo ShowItem($menu,"H","mtitle","mtitle",$sub);
echo '</div>';
echo '<div class="content" style="width:80%;margin-left:10%">';
$hidden=new IHidden();
$str_hidden=$hidden->input("p_action","ca_imp");
$str_hidden.=$hidden->input("sub",$sub);
@ -67,6 +71,7 @@ if ( $sub=='listing')
echo $list->display_html();
echo '</div>';
}
echo '</div>';
}
//------------------------------------------------------------------------------

View file

@ -48,7 +48,7 @@ if ( ! $m )
// show the left menu
//----------------------------------------------------------------------
echo '
<div class="content" style="margin-left:12%">
<div class="content" style="width:88%;margin-left:12%">
<div class="lmenu">
<table>
<tr>

View file

@ -88,7 +88,7 @@ class Anc_Balance_Double extends Anc_Print
// new
$r.="</table>";
$r.="<table class=\"mtitle\">";
$r.="<table class=\"result\">";
$r.="<tr>";
$r.="<th>Poste comptable Analytique</th>";
$r.="<th>Poste comptable Analytique</th>";
@ -105,19 +105,19 @@ class Anc_Balance_Double extends Anc_Print
$tot_cred+=$row['a_c'];
$r.=sprintf("<td>%s</td>",h($row['b_po_name']));
$r.=sprintf("<td>%12.2f</td>",$row['a_d']);
$r.=sprintf("<td>%12.2f</td>",$row['a_c']);
$r.=sprintf("<td>%12.2f</td>",$row['a_solde']);
$r.=td(nbm($row['a_d']));
$r.=td(nbm($row['a_c']));
$r.=td(nbm($row['a_solde']));
$r.=sprintf("<td>%s</td>",$row['a_debit']);
$r.="</tr>";
}
if ( $tot_deb != 0 || $tot_cred !=0 )
{
$r.="<tr>";
$r.="<td>Total </td> <td></td><td> $tot_deb </td> <td>$tot_cred</td>";
$r.="<td>Total </td> <td></td><td> ".nbm($tot_deb)." </td> <td>".nbm($tot_cred)."</td>";
$s=abs($tot_deb-$tot_cred);
$d=($tot_deb>$tot_cred)?'debit':'credit';
$r.="<td>$s</td><td>$d</td>";
$r.="<td>".nbm($s)."</td><td>$d</td>";
$r.="</tr>";
}
@ -129,8 +129,8 @@ class Anc_Balance_Double extends Anc_Print
$r.='<tr>';
$r.='<td>'.$row['poste'].'</td>';
$r.='<td>'.$row['desc'].'</td>';
$r.='<td>'.$row['debit'].'</td>';
$r.='<td>'.$row['credit'].'</td>';
$r.='<td>'.nbm($row['debit']).'</td>';
$r.='<td>'.nbm($row['credit']).'</td>';
$r.='<td>'.$row['dc'].'</td>';
$r.='</tr>';
}

View file

@ -121,7 +121,7 @@ class Anc_Balance_Simple extends Anc_Print
*/
function display_html()
{
$r="<table class=\"mtitle\">";
$r="<table class=\"result\">";
$r.="<tr>";
$r.="<th>Poste comptable Analytique</th>";
$r.="<th>D&eacute;bit</th>";
@ -145,9 +145,9 @@ class Anc_Balance_Simple extends Anc_Print
// the name and po_id
// $r.=sprintf("<td>%s</td>",$row['po_id']);
$r.=sprintf("<td align=\"left\">%s</td>",h($row['po_name']));
$r.=sprintf("<td>%12.2f</td>",$row['sum_deb']);
$r.=sprintf("<td>%12.2f</td>",$row['sum_cred']);
$r.=sprintf("<td>%12.2f</td>",$row['solde']);
$r.=td(nbm($row['sum_deb']));
$r.=td(nbm($row['sum_cred']));
$r.=td(nbm($row['solde']));
$deb=($row['sum_deb'] > $row['sum_cred'])?"D":"C";
$deb=($row['solde'] == 0 )?'':$deb;
$r.=sprintf("<td>%s</td>",$deb);

View file

@ -77,7 +77,7 @@ class Anc_Listing extends Anc_Print
$r.= _("aucune donnée");
return $r;
}
$r.= '<table>';
$r.= '<table class="result">';
$r.= '<tr>'.
'<th>'._('Date').'</th>'.
'<th>'._('Nom').'</th>'.
@ -92,7 +92,7 @@ class Anc_Listing extends Anc_Print
'<td>'.$row['oa_date'].'</td>'.
'<td>'.h($row['po_name']).'</td>'.
'<td>'.h($row['oa_description']).'</td>'.
'<td>'.$row['oa_amount'].'</td>'.
'<td>'.nbm($row['oa_amount']).'</td>'.
'<td>'.(($row['oa_debit']=='f')?'CREDIT':'DEBIT').'</td>';
$r.= '</tr>';
}

View file

@ -44,9 +44,15 @@ if ( $action=="change_per")
echo '<TR> <FORM ACTION="?p_action=periode" METHOD="POST">';
echo dossier::hidden();
echo ' <INPUT TYPE="HIDDEN" NAME="p_per" VALUE="'.$p_per.'">';
echo '<TD> <INPUT TYPE="text" NAME="p_date_start" VALUE="'.$p_date_start.'"></TD>';
echo '<TD> <INPUT TYPE="text" NAME="p_date_end" VALUE="'.$p_date_end.'"></TD>';
echo '<TD> <INPUT TYPE="text" NAME="p_exercice" VALUE="'.$p_exercice.'"></TD>';
$istart=new IDate('p_date_start');
$iend=new IDate('p_date_end');
$iexercice=new INum('p_exercice');
$iexercice->size=5;
echo td($istart->input());
echo td($iend->input());
echo td($iexercice->input());
echo '<TD> <INPUT TYPE="SUBMIT" class="button" NAME="conf_chg_per" Value="Change"</TD>';
echo '</FORM></TR>';
echo "</TABLE>";
@ -62,7 +68,8 @@ if ( isset ($_POST["conf_chg_per"] ) )
if (isDate($p_date_start) == null ||
isDate($p_date_end) == null ||
strlen (trim($p_exercice)) == 0 ||
(string) $p_exercice != (string)(int) $p_exercice)
(string) $p_exercice != (string)(int) $p_exercice ||
$p_exercice < 2000 || $p_exercice > 2099 )
{
alert(_('Valeurs invalides'));
}