phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r5236 - in phpcompta/trunk/include: . template


From: phpcompta-dev
Subject: [Phpcompta-dev] r5236 - in phpcompta/trunk/include: . template
Date: Sat, 11 May 2013 19:30:15 +0200 (CEST)

Author: danydb
Date: 2013-05-11 19:30:15 +0200 (Sat, 11 May 2013)
New Revision: 5236

Modified:
   phpcompta/trunk/include/constant.php
   phpcompta/trunk/include/param_pcmn.inc.php
   phpcompta/trunk/include/template/account_result.php
Log:
task #0000813: plan comptable - quick code

Limite des qcode visibles 

Modified: phpcompta/trunk/include/constant.php
===================================================================
--- phpcompta/trunk/include/constant.php        2013-05-11 17:18:19 UTC (rev 
5235)
+++ phpcompta/trunk/include/constant.php        2013-05-11 17:30:15 UTC (rev 
5236)
@@ -63,6 +63,7 @@
 define ('COMPTA_MAX_YEAR',2100);
 define ('COMPTA_MIN_YEAR',1990);
 define ('MAX_RECONCILE',25);
+define ('MAX_QCODE',4);
 
 if ( DEBUG ) error_reporting(2147483647);  else error_reporting(0);
 // Erreur

Modified: phpcompta/trunk/include/param_pcmn.inc.php
===================================================================
--- phpcompta/trunk/include/param_pcmn.inc.php  2013-05-11 17:18:19 UTC (rev 
5235)
+++ phpcompta/trunk/include/param_pcmn.inc.php  2013-05-11 17:30:15 UTC (rev 
5236)
@@ -251,6 +251,7 @@
              echo HtmlInput::hidden('p_action','pcmn');
 //echo HtmlInput::hidden('sa','detail');
 echo dossier::hidden();
+$limite=MAX_QCODE;
 ?>
 <TABLE class="result">
                              <TR>
@@ -310,10 +311,14 @@
                if (strpos($A['acode'], ",") >0 ) {
                        $det_qcode=  split(",", $A['acode']);
                        echo '<ul 
style="paddding:0;margin:0;padding-left:0;list-style-type:none;padding-start-value:0">';
-                       for ($e=0;$e<count($det_qcode);$e++) {
+                       
$max=(count($det_qcode)>MAX_QCODE)?MAX_QCODE:count($det_qcode);
+                       for ($e=0;$e<$max;$e++) {
                                echo '<li 
style="padding-start-value:0">'.HtmlInput::card_detail($det_qcode[$e]).'</li>';
                        }
                        echo '</ol>';
+                       if ($max < count($det_qcode)) {
+                               echo "...";
+                       }
                } else {
                        echo HtmlInput::card_detail($A['acode']);
                }

Modified: phpcompta/trunk/include/template/account_result.php
===================================================================
--- phpcompta/trunk/include/template/account_result.php 2013-05-11 17:18:19 UTC 
(rev 5235)
+++ phpcompta/trunk/include/template/account_result.php 2013-05-11 17:30:15 UTC 
(rev 5236)
@@ -1,7 +1,16 @@
 <fieldset id="asearch" style="height:88%">
 <legend><? echo _('Résultats')?></legend>
 <div style="height:88%;overflow:auto;">
-<table>
+       <?php
+               $limite=5;
+               ?>
+<table
+       <tr>
+               <th>Poste comptable</th>
+               <th>Libellé</th>
+               <th>Fiche (limite:<?php echo $limite; ?>)</th>
+
+       </tr>
 <? for ($i=0;$i<sizeof($array);$i++) : ?>
 <tr>
 <td>
@@ -20,12 +29,17 @@
        <?php
        if ( strlen($array[$i]['acode']) >0 ) {
                if (strpos($array[$i]['acode'], ",") >0 ) {
+
                        $det_qcode=  split(",", $array[$i]['acode']);
                        $sep="";
-                       for ($e=0;$e<count($det_qcode);$e++) {
+                       
$max=(count($det_qcode)>$limite)?$limite:count($det_qcode);
+                       for ($e=0;$e<$max;$e++) {
                                echo 
$sep.HtmlInput::card_detail($det_qcode[$e]);
                                $sep=" , ";
                        }
+                       if ($max < count($det_qcode)) {
+                               echo "...";
+                       }
                } else {
                        echo HtmlInput::card_detail($array[$i]['acode']);
                }



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

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