phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r4116 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4116 - phpcompta/trunk/include
Date: Sat, 21 May 2011 01:29:12 +0200 (CEST)

Author: danydb
Date: 2011-05-21 01:29:12 +0200 (Sat, 21 May 2011)
New Revision: 4116

Modified:
   phpcompta/trunk/include/anc_imp.inc.php
   phpcompta/trunk/include/anc_pa.inc.php
   phpcompta/trunk/include/class_anc_acc_list.php
   phpcompta/trunk/include/class_anc_balance_double.php
   phpcompta/trunk/include/class_anc_balance_simple.php
   phpcompta/trunk/include/class_anc_plan.php
   phpcompta/trunk/include/class_anc_print.php
Log:
Change Analytic Account by activity
Export CSV use the coma as decimal separator
Underline the activity
Sort the activity by name


Modified: phpcompta/trunk/include/anc_imp.inc.php
===================================================================
--- phpcompta/trunk/include/anc_imp.inc.php     2011-05-20 22:12:55 UTC (rev 
4115)
+++ phpcompta/trunk/include/anc_imp.inc.php     2011-05-20 23:29:12 UTC (rev 
4116)
@@ -164,7 +164,6 @@
     echo '</form>';
     if ( isset($_GET['result']))
     {
-      //        echo $gl->show_button($str_hidden);
        echo $gl->display_html();
     }
-  }
\ No newline at end of file
+  }

Modified: phpcompta/trunk/include/anc_pa.inc.php
===================================================================
--- phpcompta/trunk/include/anc_pa.inc.php      2011-05-20 22:12:55 UTC (rev 
4115)
+++ phpcompta/trunk/include/anc_pa.inc.php      2011-05-20 23:29:12 UTC (rev 
4116)
@@ -167,7 +167,7 @@
         $ret.=HtmlInput::hidden('sa','po_update');
         $ret.=HtmlInput::submit('Correction','Correction');
         $ret.=sprintf('<A class="mtitle" 
HREF="?p_action=ca_pa&sa=po_delete&po_id=%s&pa_id=%s&'.$str_dossier.'">'.
-                      '<input type="button" value="Efface" onClick="return 
confirm(\' Voulez-vous vraiment effacer ce poste\');"></A>',
+                      '<input type="button" value="Efface" onClick="return 
confirm(\' Voulez-vous vraiment effacer cette activité\');"></A>',
                       $po->id,
                       $_REQUEST['pa_id']
                      );
@@ -195,7 +195,7 @@
 
         $new=new Anc_Plan($cn,$_REQUEST['pa_id']);
         $new->get();
-        $array=$new->get_poste_analytique();
+        $array=$new->get_poste_analytique(" order by po_name");
         $ret.='<div class="u_redcontent">';
         $ret.='<table style="width:100%;border:solid blue 2px 
;border-style:outset;">';
         $ret.="<tr>";
@@ -215,8 +215,8 @@
                 $class="odd";
 
             $ret.="<TR class=\"$class\">";
-            $ret.="<TD>".
-                  '<a class="mtitle" 
href="?p_action=ca_pa&sa=po_detail&po_id='.$obj->id.'&pa_id='.$_REQUEST['pa_id'].'&'.
+            $ret.="<TD >".
+                  '<a style="text-decoration:underline;" 
href="?p_action=ca_pa&sa=po_detail&po_id='.$obj->id.'&pa_id='.$_REQUEST['pa_id'].'&'.
                   $str_dossier.'">'.
                   h($obj->name).
                   '</a>';
@@ -278,7 +278,7 @@
         '</TD>';
         echo '<td class="mtitle">'.
         '<a class="mtitle" 
href="?p_action=ca_pa&sa=list&pa_id='.$line['id'].'&'.$str_dossier.'">'.
-        "Postes".
+        "Activités".
         "</a>";
 
         echo '</TR>';

Modified: phpcompta/trunk/include/class_anc_acc_list.php
===================================================================
--- phpcompta/trunk/include/class_anc_acc_list.php      2011-05-20 22:12:55 UTC 
(rev 4115)
+++ phpcompta/trunk/include/class_anc_acc_list.php      2011-05-20 23:29:12 UTC 
(rev 4116)
@@ -42,10 +42,10 @@
     $r=parent::display_form($p_hidden);
     $icard=new ISelect('card_poste');
     $icard->value=array(
-                       array('value'=>1,'label'=>'Par fiche /Poste 
Analytique'),
-                       array('value'=>2,'label'=>'Par poste comptable/Poste 
Analytique'),
-                       array('value'=>3,'label'=>'Par poste Analytique/Fiche'),
-                       array('value'=>4,'label'=>'Par poste Analytique/Poste 
Comptable')
+                       array('value'=>1,'label'=>'Par fiche /Activité'),
+                       array('value'=>2,'label'=>'Par poste 
comptable/Activité'),
+                       array('value'=>3,'label'=>'Par activité/Fiche'),
+                       array('value'=>4,'label'=>'Par activité/Poste 
Comptable')
 
                        );
     

Modified: phpcompta/trunk/include/class_anc_balance_double.php
===================================================================
--- phpcompta/trunk/include/class_anc_balance_double.php        2011-05-20 
22:12:55 UTC (rev 4115)
+++ phpcompta/trunk/include/class_anc_balance_double.php        2011-05-20 
23:29:12 UTC (rev 4116)
@@ -273,12 +273,12 @@
     {
         $r="";
 
-        $r.='"Poste comptable Analytique",';
-        $r.='"Poste comptable Analytique",';
-        $r.='"Debit",';
-        $r.='"Credit",';
-        $r.='"Solde",';
-        $r.='"D/C",';
+        $r.='"Poste comptable Analytique";';
+        $r.='"Poste comptable Analytique";';
+        $r.='"Debit";';
+        $r.='"Credit";';
+        $r.='"Solde";';
+        $r.='"D/C"';
 
         $r.="\r\n";
 
@@ -291,11 +291,11 @@
         foreach ( $array as $row)
         {
 
-            $r.=sprintf('"%s",',$row['a_po_name']);
-            $r.=sprintf('"%s",',$row['b_po_name']);
-            $r.=sprintf("%12.2f,",$row['a_d']);
-            $r.=sprintf("%12.2f,",$row['a_c']);
-            $r.=sprintf("%12.2f,",$row['a_solde']);
+            $r.=sprintf('"%s";',$row['a_po_name']);
+            $r.=sprintf('"%s";',$row['b_po_name']);
+            $r.=sprintf("%s;",nb($row['a_d']));
+            $r.=sprintf("%s;",nb($row['a_c']));
+            $r.=sprintf("%s;",nb($row['a_solde']));
             $r.=sprintf('"%s"',$row['a_debit']);
             $r.="\r\n";
         }

Modified: phpcompta/trunk/include/class_anc_balance_simple.php
===================================================================
--- phpcompta/trunk/include/class_anc_balance_simple.php        2011-05-20 
22:12:55 UTC (rev 4115)
+++ phpcompta/trunk/include/class_anc_balance_simple.php        2011-05-20 
23:29:12 UTC (rev 4116)
@@ -191,9 +191,9 @@
             $row=$array[$i];
             $pdf->Cell(20,6,$row['po_id'],0,0,'L');
             $pdf->Cell(90,6,$row['po_name'],0,0,'L');
-            $pdf->Cell(20,6,sprintf('%.2f',$row['sum_deb']),0,0,'R');
-            $pdf->Cell(20,6,sprintf('%.2f',$row['sum_cred']),0,0,'R');
-            $pdf->Cell(20,6,sprintf('%.2f',$row['solde']),0,0,'R');
+            $pdf->Cell(20,6,sprintf('%s',nbm($row['sum_deb'])),0,0,'R');
+            $pdf->Cell(20,6,sprintf('%s',nbm($row['sum_cred'])),0,0,'R');
+            $pdf->Cell(20,6,sprintf('%s',nbm($row['solde'])),0,0,'R');
             $pdf->Cell(20,6,$row['debit'],0,0,'R');
             $pdf->Ln();
         }
@@ -219,11 +219,11 @@
             // the name and po_id
             $solde=($row['sum_cred']>$row['sum_deb'])?'C':'D';
             $solde=($row['sum_cred']==$row['sum_deb'])?'':$solde;
-            $r.=sprintf("'%s',",$row['po_id']);
-            $r.=sprintf("'%s',",$row['po_name']);
-            $r.=sprintf("%12.2f,",$row['sum_deb']);
-            $r.=sprintf("%12.2f,",$row['sum_cred']);
-            $r.=sprintf("%12.2f,",$row['solde']);
+            $r.=sprintf("'%s';",$row['po_id']);
+            $r.=sprintf("'%s';",$row['po_name']);
+            $r.=sprintf("%s;",nb($row['sum_deb']));
+            $r.=sprintf("%s;",nb($row['sum_cred']));
+            $r.=sprintf("%s;",nb($row['solde']));
             $r.=sprintf("'%s'",$row['debit']);
             $r.="\r\n";
         }

Modified: phpcompta/trunk/include/class_anc_plan.php
===================================================================
--- phpcompta/trunk/include/class_anc_plan.php  2011-05-20 22:12:55 UTC (rev 
4115)
+++ phpcompta/trunk/include/class_anc_plan.php  2011-05-20 23:29:12 UTC (rev 
4116)
@@ -140,9 +140,9 @@
      *        Analytic plan
      * \return an array of Poste_analytic object
      */
-    function get_poste_analytique()
+    function get_poste_analytique($p_order="")
     {
-        $sql="select po_id from poste_analytique where pa_id=".$this->id;
+        $sql="select po_id,po_name from poste_analytique where 
pa_id=".$this->id." $p_order";
         $r=$this->db->exec_sql($sql);
         $ret=array();
         if ( Database::num_row($r) == 0 )

Modified: phpcompta/trunk/include/class_anc_print.php
===================================================================
--- phpcompta/trunk/include/class_anc_print.php 2011-05-20 22:12:55 UTC (rev 
4115)
+++ phpcompta/trunk/include/class_anc_print.php 2011-05-20 23:29:12 UTC (rev 
4116)
@@ -127,14 +127,14 @@
 
         $poste=new IText();
         $poste->size=10;
-        $r.=_("Entre le poste ").$poste->input("from_poste",$this->from_poste);
+        $r.=_("Entre l'activité 
").$poste->input("from_poste",$this->from_poste);
         $choose=new IButton();
         $choose->name=_("Choix Poste");
         $choose->label=_("Recherche");
         
$choose->javascript="onClick=search_ca(".dossier::id().",'from_poste','pa_id')";
         $r.=$choose->input();
 
-        $r.=_(" et le poste ").$poste->input("to_poste",$this->to_poste);
+        $r.=_(" et l'activité ").$poste->input("to_poste",$this->to_poste);
         
$choose->javascript="onClick=search_ca(".dossier::id().",'to_poste','pa_id')";
         $r.=$choose->input();
         $r.='<span class="notice" style="display:block">'._('Selectionnez le 
plan qui vous intéresse avant de cliquer sur Recherche').'</span>';




reply via email to

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