phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r196 - in trunk/amortis/include: . template


From: phpcompta-dev
Subject: [Phpcompta-dev] r196 - in trunk/amortis/include: . template
Date: Sun, 27 Nov 2011 00:04:39 +0100 (CET)

Author: danydb
Date: 2011-11-27 00:04:38 +0100 (Sun, 27 Nov 2011)
New Revision: 196

Modified:
   trunk/amortis/include/am_histo.inc.php
   trunk/amortis/include/template/listing_histo.php
   trunk/amortis/include/template/material_display.php
Log:

#440 AMORTISSEMENT : montant mal format?\195?\169
#441  AMORTISSEMENT : tri dans l'historique
#439  AMORTISSEMENT : total tableau incorrect, il manque les d?\195?\169cimales



Modified: trunk/amortis/include/am_histo.inc.php
===================================================================
--- trunk/amortis/include/am_histo.inc.php      2011-11-26 01:15:17 UTC (rev 
195)
+++ trunk/amortis/include/am_histo.inc.php      2011-11-26 23:04:38 UTC (rev 
196)
@@ -19,13 +19,30 @@
 /* $Revision$ */
 
 // Copyright Author Dany De Bontridder address@hidden
-
 /*!\file
  * \brief print all
  */
-$sql="select quick_code,a_id,ha_id,h_amount,jr_internal,h_year,h_pj,vw_name 
from amortissement.amortissement join amortissement.amortissement_histo using 
(a_id) join vw_fiche_attr using(f_id) where h_amount > 0 order by vw_name";
+$sql="select quick_code,a_id,ha_id,h_amount,jr_internal,h_year,h_pj,vw_name
+       from amortissement.amortissement
+       join amortissement.amortissement_histo using (a_id)
+       join vw_fiche_attr using(f_id) where h_amount > 0";
 
+$header=new Sort_Table();
+$r=HtmlInput::array_to_string(array('ac','gDossier','sa','sb','plugin_code'),$_REQUEST);
+$url=basename($_SERVER['PHP_SELF']).$r;
+$header->add('Quick_code',$url,'order by 1 asc','order by 1 desc','qca','qcd');
+$header->add('Nom',$url,'order by vw_name asc','order by vw_name 
desc','na','nd');
+$header->add('Montant',$url,'order by h_amount asc','order by h_amount 
desc','aa','ad');
+$header->add('Année',$url,'order by h_year asc','order by h_year 
desc','ya','yd');
+$header->add('Pièce',$url,'order by h_pj asc','order by h_pj 
desc','pja','pjd');
+$header->add('N° interne',$url,'order by jr_internal asc','order by 
jr_internal desc','nia','nid');
 
+$ord=(isset($_REQUEST['ord']))?$_REQUEST['ord']:'na';
+
+$sql_ord=$header->get_sql_order($ord);
+
+$sql.=$sql_ord;
+
 if ( isset($_POST['remove']))
   {
     for ($i=0;$i<count($_POST['h']);$i++)

Modified: trunk/amortis/include/template/listing_histo.php
===================================================================
--- trunk/amortis/include/template/listing_histo.php    2011-11-26 01:15:17 UTC 
(rev 195)
+++ trunk/amortis/include/template/listing_histo.php    2011-11-26 23:04:38 UTC 
(rev 196)
@@ -10,12 +10,12 @@
 ?>
 <table class="result">
 <tr>
-<th>Quick Code</th>
-<th>Nom</th>
-<th style="text-align:right">Montant</th>
-<th style="text-align:center">Année</th>
-<th>N°</th>
-<th>Opération</th>
+<th><?=$header->get_header(0)?></th>
+<th><?=$header->get_header(1)?></th>
+<th style="text-align:right"><?=$header->get_header(2)?></th>
+<th style="text-align:center"><?=$header->get_header(3)?></th>
+<th><?=$header->get_header(4)?></th>
+<th><?=$header->get_header(5)?></th>
 
 </tr>
 <?

Modified: trunk/amortis/include/template/material_display.php
===================================================================
--- trunk/amortis/include/template/material_display.php 2011-11-26 01:15:17 UTC 
(rev 195)
+++ trunk/amortis/include/template/material_display.php 2011-11-26 23:04:38 UTC 
(rev 196)
@@ -40,8 +40,8 @@
 <table class="result">
 <th>Année</th>
 <th>Montant</th>
-<th>Amortissement acté</th>
-<th>Pièce </th>
+<th style="text-align:right" >Amortissement acté</th>
+<th style="text-align:center">Pièce </th>
 <th>n°  interne</th>
 
 
@@ -59,7 +59,7 @@
        </td>
        <td>
        <?
-       echo $array[$i]->ad_amount;
+       echo nbm($array[$i]->ad_amount);
         ?>
 
 </td>
@@ -68,22 +68,22 @@
 
        $x=$cn->get_array('select ha_id,h_pj,jr_internal,h_amount from 
amortissement.amortissement_histo where a_id=$1 and h_year=$2',
                           array($amort->a_id,$array[$i]->ad_year));
-       if ( count ($x) == 1) 
+       if ( count ($x) == 1)
        {
        $done=bcadd($done,$x[0]['h_amount']);
 
-       echo td($x[0]['h_amount']);
+       echo td(nbm($x[0]['h_amount']),' class="num"');
 
-       echo td($x[0]['h_pj']);
+       echo td($x[0]['h_pj'],' style="text-align:center"');
 
-       if ( $x[0]['jr_internal'] != '' ) { 
+       if ( $x[0]['jr_internal'] != '' ) {
        $jr_id=$cn->get_value('select jr_id from jrn where 
jr_internal=$1',array($x[0]['jr_internal']));
        echo td(HtmlInput::detail_op($jr_id,$x[0]['jr_internal']));
        } else {
        echo td();
        }
        }
-       echo td($array[$i]->ad_percentage);
+       echo td(nbm($array[$i]->ad_percentage).'%');
        ?>
 </tr>
 
@@ -104,7 +104,7 @@
        echo '<h2>';
  }
  ?>
-</fieldset> 
+</fieldset>
 <? echo "Date ".date ('d.m.Y');?>
 <? echo HtmlInput::print_window()?>
-   
+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]