phpcompta-dev
[Top][All Lists]
Advanced

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

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


From: phpcompta-dev
Subject: [Phpcompta-dev] r5448 - in phpcompta/trunk/include: . template
Date: Sat, 28 Sep 2013 23:44:08 +0200 (CEST)

Author: danydb
Date: 2013-09-28 23:44:08 +0200 (Sat, 28 Sep 2013)
New Revision: 5448

Modified:
   phpcompta/trunk/include/class_fiche.php
   phpcompta/trunk/include/class_follow_up.php
   phpcompta/trunk/include/template/detail-action.php
Log:

Ajout ligne dans gestion + am?\195?\169lioration apparence

Modified: phpcompta/trunk/include/class_fiche.php
===================================================================
--- phpcompta/trunk/include/class_fiche.php     2013-09-28 21:43:09 UTC (rev 
5447)
+++ phpcompta/trunk/include/class_fiche.php     2013-09-28 21:44:08 UTC (rev 
5448)
@@ -1552,11 +1552,14 @@
         $step_tiers=$this->GetAll($offset,$search.$filter_amount,'name');
 
         if ( $all_tiers == 0 || count($step_tiers)==0 ) return "";
-        $r=$bar;
-        $r.='<table  class="result" style="width:90%;margin-left:5%">
+        $r="";
+        $r.="Filtre rapide ".HtmlInput::filter_table("tiers_tb", '0,1', 1);
+        $r.=$bar;
+        
+        $r.='<table  id="tiers_tb" class="sortable"  
style="width:90%;margin-left:5%">
             <TR >
-            <TH>'._('Quick Code').'</TH>
-            <th>'._('Nom').'</th>
+            <TH>'._('Quick Code').HtmlInput::infobulle(17).'</TH>
+            <th  class="sorttable_sorted_reverse">'._('Nom').'<span 
id="sorttable_sortrevind">&nbsp;&blacktriangle;</span>'.'</th>
             <th>'._('Adresse').'</th>
             <th style="text-align:right">'._('Total débit').'</th>
             <th style="text-align:right">'._('Total crédit').'</th>
@@ -1589,19 +1592,22 @@
                          " ".$tiers->strAttribut(ATTR_DEF_CP).
                          " ".$tiers->strAttribut(ATTR_DEF_PAYS)).
                 "</TD>";
+            $deb=(($amount['debit']==0)?0:nbm($amount['debit']));
+            $cred=(($amount['credit']==0)?0:nbm($amount['credit']));
+            $solde=nbm($amount['solde']);
+            $r.='<TD sorttable_customkey="'.$amount['debit'].'" align="right"> 
'.$deb.'</TD>';
+            $r.='<TD sorttable_customkey="'.$amount['credit'].'" 
align="right"> '.$cred.'</TD>';
+            $r.='<TD sorttable_customkey="'.$amount['solde'].'" align="right"> 
'.$solde."</TD>";
+            $deb=bcadd($deb,$amount['debit']);
+            $cred=bcadd($cred,$amount['credit']);
 
-            $r.='<TD align="right"> 
'.(($amount['debit']==0)?0:nbm($amount['debit'])).'</TD>';
-                       $r.='<TD align="right"> 
'.(($amount['credit']==0)?0:nbm($amount['credit'])).'</TD>';
-                       $r.='<TD align="right"> '.nbm($amount['solde'])."</TD>";
-                       $deb=bcadd($deb,$amount['debit']);
-                       $cred=bcadd($cred,$amount['credit']);
-
             $r.="</TR>";
 
         }
-               $r.="<tr>";
+               $r.="<tfoot>";
                $solde=bcsub($deb,$cred);
                
$r.=td("").td("").td("Totaux").td(nbm($deb),'class="num"').td(nbm($cred),'class="num"').td(nbm($solde),'class="num"');
+               $r.="</tfoot>";
         $r.="</TABLE>";
         $r.=$bar;
         return $r;

Modified: phpcompta/trunk/include/class_follow_up.php
===================================================================
--- phpcompta/trunk/include/class_follow_up.php 2013-09-28 21:43:09 UTC (rev 
5447)
+++ phpcompta/trunk/include/class_follow_up.php 2013-09-28 21:44:08 UTC (rev 
5448)
@@ -414,7 +414,9 @@
                $itva->in_table = true;
                $aCard=array();
                /* create aArticle for the detail section */
-               for ($i = 0; $i < MAX_ARTICLE; $i++)
+                
$article_count=(count($this->aAction_detail)==0)?MAX_ARTICLE:count($this->aAction_detail);
+                
+               for ($i = 0; $i < $article_count; $i++)
                {
                        /* fid = Icard  */
                        $icard = new ICard();
@@ -450,6 +452,7 @@
                        $aArticle[$i]['fid'] = $icard->search() . 
$icard->input();
 
                        $text->javascript = ' onchange="clean_tva(' . $i . 
');compute_ledger(' . $i . ')"';
+                        $text->css_size="100%";
                        $text->name = "e_march" . $i . "_label";
                        $text->id = "e_march" . $i . "_label";
                        $text->size = 40;
@@ -503,7 +506,7 @@
 
                /* add the number of item */
                $Hid = new IHidden();
-               $r.=$Hid->input("nb_item", MAX_ARTICLE);
+               $r.=$Hid->input("nb_item", $article_count);
                
$r.=HtmlInput::request_to_hidden(array("closed_action","remind_date_end","remind_date","sag_ref","only_internal","state","qcode",
 "ag_dest_query", "query", "tdoc", "date_start", "date_end", 
"hsstate","searchtag"));
                 $a_tag=$this->tag_get();
                /* get template */
@@ -641,7 +644,7 @@
                );
 
                /* insert also the details */
-               for ($i = 0; $i < MAX_ARTICLE; $i++)
+               for ($i = 0; $i < $_POST['nb_item']; $i++)
                {
                        $act = new Follow_Up_Detail($this->db);
                        $act->from_array($_POST, $i);
@@ -935,7 +938,7 @@
                $doc->Upload($this->ag_id);
 
                /* save action details */
-               for ($i = 0; $i < MAX_ARTICLE; $i++)
+               for ($i = 0; $i < $_POST['nb_item']; $i++)
                {
                        $act = new Follow_Up_Detail($this->db);
                        $act->from_array($_POST, $i);

Modified: phpcompta/trunk/include/template/detail-action.php
===================================================================
--- phpcompta/trunk/include/template/detail-action.php  2013-09-28 21:43:09 UTC 
(rev 5447)
+++ phpcompta/trunk/include/template/detail-action.php  2013-09-28 21:44:08 UTC 
(rev 5448)
@@ -199,7 +199,7 @@
                <?php if ( $p_view != 'READ') echo '<span 
class="noprint">'.$iaction->input().'</span>';?>
        </div>
 </fieldset>
-<div style="margin-left:15px;margin-right: 15px">
+<div class="myfieldset">
   <h1 class="legend">
            <?php echo _('Description')?>
   </h1>
@@ -294,8 +294,8 @@
        if ( ($aCard[$i] != 0 && $p_view == 'READ') || $p_view != 'READ'){ 
$show_row=1;}
 endfor;
 ?>
-
-<table id="art" >
+    <div>
+<table style="width:100%" id="art" >
 <tr>
   <th><?php echo _('Fiche')?></th>
   <th><?php echo _('Description')?></th>
@@ -323,7 +323,7 @@
 <?php endif; ?>
 <?php endfor; ?>
 </table>
-
+    </div>
 <script language="JavaScript">
 if ( $('e_march0') && $('e_march0').value =='') { toggleShowDetail();}
 function toggleShowDetail() {
@@ -336,20 +336,22 @@
 
 </script>
 <?php if ( $show_row != 0 ): ?>
-<div style="float: left; text-align: right; padding-right: 5px; font-size: 
1.2em; font-weight: bold; color: blue;">
-  <input name="act" id="act" class="button" value="<?php echo 
_('Actualiser')?>" onclick="compute_all_ledger();" type="button">
-
+<div style="float: right; text-align: right; padding-right: 5px; font-size: 
1.2em; font-weight: bold; color: blue;">
+  
     <div style="float: right; text-align: left; font-size: 1.2em; font-weight: 
bold; color: blue;" id="sum">
-    <br><span id="htva">0.0</span>
-     <br><span id="tva">0.0</span>
-    <br><span id="tvac">0.0</span>
+    <br><span style="text-align: right" id="htva">0.0</span>
+     <br><span style="text-align: right"  id="tva">0.0</span>
+    <br><span style="text-align: right" id="tvac">0.0</span>
  </div>
 
-<div style="float: left; text-align: right; padding-right: 5px; font-size: 
1.2em; font-weight: bold; color: blue;">
+<div style="float: right; text-align: right; padding-right: 5px; font-size: 
1.2em; font-weight: bold; color: blue;">
     <br>Total HTVA
     <br>Total TVA
     <br>Total TVAC
  </div>
+<div>
+    <input name="act" id="act_bt" class="button" value="<?php echo 
_('Actualiser')?>" onclick="compute_all_ledger();" type="button">
+  <input type="button" class="button" onclick="gestion_add_row()" 
value="Ajouter une ligne">
 </div>
 <?php endif; ?>
 </fieldset>
@@ -417,4 +419,5 @@
   </div>
  <?php endif;?>
 </fieldset>
+</div>
 <script>compute_all_ledger()</script>
\ No newline at end of file



---
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]