[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4791 - in phpcompta/tags/rel600: html include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4791 - in phpcompta/tags/rel600: html include |
Date: |
Thu, 22 Mar 2012 21:12:17 +0100 (CET) |
Author: danydb
Date: 2012-03-22 21:12:17 +0100 (Thu, 22 Mar 2012)
New Revision: 4791
Modified:
phpcompta/tags/rel600/html/ajax_history.php
phpcompta/tags/rel600/include/class_acc_account_ledger.php
phpcompta/tags/rel600/include/class_fiche.php
Log:
Cosmetic : alignement et taille d?\195?\169tail op?\195?\169rations
Modified: phpcompta/tags/rel600/html/ajax_history.php
===================================================================
--- phpcompta/tags/rel600/html/ajax_history.php 2012-03-22 19:54:18 UTC (rev
4790)
+++ phpcompta/tags/rel600/html/ajax_history.php 2012-03-22 20:12:17 UTC (rev
4791)
@@ -44,8 +44,8 @@
/* security */
if ( $user->check_dossier(dossier::id(),true) == 'X' ) exit();
+$from_div=(isset ($_REQUEST['ajax']))?1:0;
-
///////////////////////////////////////////////////////////////////////////
/* first detail for a card */
///////////////////////////////////////////////////////////////////////////
@@ -87,7 +87,7 @@
$obj="{div:'$div',f_id:'".$_GET['f_id']."',gDossier:'$dossier',select:this}";
$is=$exercice->select('p_exercice',$default,'
onchange="update_history_card('.$obj.');"');
$old="Autre exercice ".$is->input();
- }
+ }
else
{
$old='<form method="get" action="popup.php">';
@@ -108,7 +108,7 @@
echo h2info(
$fiche->getName().'['.$fiche->strAttribut(ATTR_DEF_QUICKCODE).']');
echo '<p style="text-align:center;font-size:125%">'.$detail_card.'</p>';
- if ( $fiche->HtmlTable($array,0,0)==-1){
+ if ( $fiche->HtmlTable($array,0,$from_div)==-1){
echo h2("Aucune opération pour l'exercice courant",'class="error"');
}
Modified: phpcompta/tags/rel600/include/class_acc_account_ledger.php
===================================================================
--- phpcompta/tags/rel600/include/class_acc_account_ledger.php 2012-03-22
19:54:18 UTC (rev 4790)
+++ phpcompta/tags/rel600/include/class_acc_account_ledger.php 2012-03-22
20:12:17 UTC (rev 4791)
@@ -315,7 +315,7 @@
* \param $let lettering of operation 0
* \return -1 if nothing is found otherwise 0
*/
- function HtmlTable($p_array=null,$let=0 )
+ function HtmlTable($p_array=null,$let=0 , $from_div=0)
{
if ( $p_array==null)$p_array=$_REQUEST;
$this->get_name();
@@ -329,13 +329,16 @@
$rep="";
echo '<h2 class="info">'.$this->id." ".$this->name.'</h2>';
- echo "<TABLE class=\"resultfooter\"
style=\"border-collapse:separate;width:100%;border-spacing:5px\">";
+ if ( $from_div == 0)
+ echo "<TABLE class=\"resultfooter\"
style=\"border-collapse:separate;width:100%;border-spacing:5px\">";
+ else
+ echo "<TABLE class=\"resultfooter\"
style=\"border-collapse:separate;width:100%;border-spacing:2px\">";
echo '<tbody>';
echo "<TR>".
- "<TH> Date</TH>".
- "<TH> n° de pièce </TH>".
- "<TH> Code interne </TH>".
- "<TH> Description </TH>".
+ "<TH style=\"text-align:left\"> Date</TH>".
+ "<TH style=\"text-align:left\"> n° de pièce </TH>".
+ "<TH style=\"text-align:left\"> Code interne </TH>".
+ "<TH style=\"text-align:left\"> Description </TH>".
"<TH style=\"text-align:right\"> Débit </TH>".
"<TH style=\"text-align:right\"> Crédit </TH>".
th('Prog.','style="text-align:right"').
@@ -345,6 +348,7 @@
$progress=0;$sum_deb=0;$sum_cred=0;
bcscale(2);
$old_exercice="";
+ $idx=0;
foreach ( $this->row as $op )
{
$vw_operation=sprintf('<A class="detail"
style="text-decoration:underline"
HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s</A>',
@@ -381,9 +385,11 @@
$progress=bcadd($progress,$tmp_diff);
$sum_cred=bcadd($sum_cred,$op['cred_montant']);
$sum_deb=bcadd($sum_deb,$op['deb_montant']);
+ if ($idx%2 == 0) $class='class="odd"'; else $class='
class="even"';
+ $idx++;
- echo "<TR>".
- "<TD>".format_date($op['j_date'])."</TD>".
+ echo "<TR $class>".
+ "<TD>".smaller_date(format_date($op['j_date']))."</TD>".
td(h($op['jr_pj_number'])).
"<TD>".$vw_operation."</TD>".
"<TD>".h($op['description'])."</TD>".
Modified: phpcompta/tags/rel600/include/class_fiche.php
===================================================================
--- phpcompta/tags/rel600/include/class_fiche.php 2012-03-22 19:54:18 UTC
(rev 4790)
+++ phpcompta/tags/rel600/include/class_fiche.php 2012-03-22 20:12:17 UTC
(rev 4791)
@@ -1307,19 +1307,18 @@
$rep="";
if ( $from_div==1)
{
- echo '<h2 class="info">'." ".$name.'</h2>';
echo "<TABLE class=\"resultfooter\"
style=\"width:100%;border-collapse:separate;border-spacing:5px\">";
}
else
{
- echo "<TABLE class=\"result\"
style=\"width:100%;border-collapse:separate;border-spacing:5px\">";
+ echo "<TABLE class=\"result\"
style=\"width:100%;border-collapse:separate;border-spacing:2px\">";
}
echo '<tbody>';
echo "<TR>".
- "<TH>"._('Date')."</TH>".
- "<TH>"._('n° pièce')." </TH>".
- "<TH>"._('Code interne')." </TH>".
- "<TH>"._('Description')." </TH>".
+ "<TH style=\"text-align:left\">"._('Date')."</TH>".
+ "<TH style=\"text-align:left\">"._('n° pièce')." </TH>".
+ "<TH style=\"text-align:left\">"._('Code interne')." </TH>".
+ "<TH style=\"text-align:left\">"._('Description')." </TH>".
"<TH style=\"text-align:right\">"._('Débit')." </TH>".
"<TH style=\"text-align:right\">"._('Crédit')." </TH>".
th('Prog.','style="text-align:right"').
@@ -1328,6 +1327,7 @@
;
$old_exercice="";$sum_deb=0;$sum_cred=0;
bcscale(2);
+ $idx=0;
foreach ( $this->row as $op )
{
$vw_operation=sprintf('<A class="detail"
style="text-decoration:underline"
HREF="javascript:modifyOperation(\'%s\',\'%s\')" >%s</A>',
@@ -1364,9 +1364,11 @@
$progress=bcadd($progress,$tmp_diff);
$sum_cred=bcadd($sum_cred,$op['cred_montant']);
$sum_deb=bcadd($sum_deb,$op['deb_montant']);
+ if ($idx%2 == 0) $class='class="odd"'; else $class='
class="even"';
+ $idx++;
- echo "<TR>".
- "<TD>".format_date($op['j_date_fmt'])."</TD>".
+ echo "<TR $class>".
+ "<TD>".smaller_date(format_date($op['j_date_fmt']))."</TD>".
td(h($op['jr_pj_number'])).
"<TD>".$vw_operation."</TD>".
"<TD>".h($op['description'])."</TD>".
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4791 - in phpcompta/tags/rel600: html include,
phpcompta-dev <=