phpcompta-dev
[Top][All Lists]
Advanced

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

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


From: phpcompta-dev
Subject: [Phpcompta-dev] r5350 - phpcompta/trunk/include
Date: Tue, 13 Aug 2013 08:51:14 +0200 (CEST)

Author: danydb
Date: 2013-08-13 08:51:13 +0200 (Tue, 13 Aug 2013)
New Revision: 5350

Modified:
   phpcompta/trunk/include/class_acc_ledger.php
   phpcompta/trunk/include/class_print_ledger_detail.php
   phpcompta/trunk/include/class_print_ledger_simple.php
   phpcompta/trunk/include/class_print_ledger_simple_without_vat.php
   phpcompta/trunk/include/export_ledger_csv.php
   phpcompta/trunk/include/impress_jrn.inc.php
Log:
Task #0000874: Am?\195?\169lioration impression journaux

Modified: phpcompta/trunk/include/class_acc_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger.php        2013-08-13 02:03:24 UTC 
(rev 5349)
+++ phpcompta/trunk/include/class_acc_ledger.php        2013-08-13 06:51:13 UTC 
(rev 5350)
@@ -1070,6 +1070,8 @@
                $p_array['TVA'] = array();
                $p_array['AMOUNT_TVA'] = 0.0;
                $p_array['dep_priv'] = 0;
+               $p_array['dna'] = 0;
+               $p_array['tva_dna'] = 0;
                $dep_priv = 0.0;
                //
                // Retrieve data from jrnx
@@ -1179,7 +1181,10 @@
                                $purchase->load();
                                $dep_priv+=$purchase->qp_dep_priv;
                                $p_array['dep_priv'] = $dep_priv;
+                                $p_array['dna']=$purchase->qp_nd_amount;
+                                $p_array['tva_dna']=$purchase->qp_nd_tva;
                        }
+                        
                }
                $p_array['TVAC'] = sprintf('% 10.2f', $p_array['TVAC'] );
                $p_array['HTVA'] = sprintf('% 10.2f', $p_array['TVAC'] - 
$p_array['AMOUNT_TVA']);
@@ -2912,7 +2917,7 @@
                if ($this->type == 'ACH')
                {
                        $array = $this->db->get_array('select sum(qp_price) as 
price,sum(qp_vat) as vat ' .
-                                       ',sum(qp_dep_priv) as priv' .
+                                       
',coalesce(sum(qp_nd_amount),0)+coalesce(sum(qp_dep_priv),0) as priv' .
                                        ',sum(qp_nd_tva_recup)+sum(qp_nd_tva) 
as tva_nd' .
                                        '  from quant_purchase join jrnx 
using(j_id)
                                         where  j_grpt=$1 ', array($p_jr_id));

Modified: phpcompta/trunk/include/class_print_ledger_detail.php
===================================================================
--- phpcompta/trunk/include/class_print_ledger_detail.php       2013-08-13 
02:03:24 UTC (rev 5349)
+++ phpcompta/trunk/include/class_print_ledger_detail.php       2013-08-13 
06:51:13 UTC (rev 5350)
@@ -59,10 +59,9 @@
         //Arial italic 8
         $this->SetFont('Arial', 'I', 8);
         //Page number
-        $this->Cell(0,8,'Date '.$this->date." - Page 
".$this->PageNo().'/{nb}',0,0,'C');
-        $this->Ln(3);
+        $this->Cell(0,8,'Date '.$this->date." - Page 
".$this->PageNo().'/{nb}',0,0,'L');
         // Created by PhpCompta
-        $this->Cell(0,8,'Created by Phpcompta, online on 
http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
+        $this->Cell(0,8,'Created by Phpcompta, online on 
http://www.aevalys.eu',0,0,'R',false,'http://www.aevalys.eu');
 
     }
     function Cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', 
$fill=false, $link='')

Modified: phpcompta/trunk/include/class_print_ledger_simple.php
===================================================================
--- phpcompta/trunk/include/class_print_ledger_simple.php       2013-08-13 
02:03:24 UTC (rev 5349)
+++ phpcompta/trunk/include/class_print_ledger_simple.php       2013-08-13 
06:51:13 UTC (rev 5350)
@@ -104,7 +104,7 @@
         $this->Cell(15,6,'HTVA',0,0,'R');
         if ( $this->jrn_type=='ACH')
         {
-            $this->Cell(15,6,'Privé',0,0,'R');
+            $this->Cell(15,6,'Priv/DNA',0,0,'R');
             $this->Cell(15,6,'TVA ND',0,0,'R');
         }
         foreach($this->a_Tva as $line_tva)
@@ -181,10 +181,9 @@
         //Arial italic 8
         $this->SetFont('Arial', 'I', 8);
         //Page number
-        $this->Cell(0,8,'Date '.$this->date." - Page 
".$this->PageNo().'/{nb}',0,0,'C');
-        $this->Ln(3);
+        $this->Cell(0,8,'Date '.$this->date." - Page 
".$this->PageNo().'/{nb}',0,0,'L');
         // Created by PhpCompta
-        $this->Cell(0,8,'Created by Phpcompta, online on 
http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
+        $this->Cell(0,8,'Created by Phpcompta, online on 
http://www.aevalys.eu',0,0,'R',false,'http://www.aevalys.eu');
     }
 
     function Cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', 
$fill=false, $link='')

Modified: phpcompta/trunk/include/class_print_ledger_simple_without_vat.php
===================================================================
--- phpcompta/trunk/include/class_print_ledger_simple_without_vat.php   
2013-08-13 02:03:24 UTC (rev 5349)
+++ phpcompta/trunk/include/class_print_ledger_simple_without_vat.php   
2013-08-13 06:51:13 UTC (rev 5350)
@@ -132,10 +132,9 @@
         //Arial italic 8
         $this->SetFont('Arial', 'I', 8);
         //Page number
-        $this->Cell(0,8,'Date '.$this->date." - Page 
".$this->PageNo().'/{nb}',0,0,'C');
-        $this->Ln(3);
+        $this->Cell(0,8,'Date '.$this->date." - Page 
".$this->PageNo().'/{nb}',0,0,'L');
         // Created by PhpCompta
-        $this->Cell(0,8,'Created by Phpcompta, online on 
http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
+        $this->Cell(0,8,'Created by Phpcompta, online on 
http://www.aevalys.eu',0,0,'R',false,'http://www.aevalys.eu');
     }
 
     function Cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', 
$fill=false, $link='')

Modified: phpcompta/trunk/include/export_ledger_csv.php
===================================================================
--- phpcompta/trunk/include/export_ledger_csv.php       2013-08-13 02:03:24 UTC 
(rev 5349)
+++ phpcompta/trunk/include/export_ledger_csv.php       2013-08-13 06:51:13 UTC 
(rev 5350)
@@ -144,17 +144,20 @@
                 $col_tva.='"Tva '.$line_tva['tva_label'].'";';
             }
         }
-        echo 
'"Date";"operation";"Client/Fourn.";"Commentaire";"inter.";"HTVA";privé;'.$col_tva.'"TVAC"'."\n\r";
+        echo 
'"Date";"operation";"Client/Fourn.";"Commentaire";"inter.";"HTVA";privé;DNA;tva 
non ded.;'.$col_tva.'"TVAC"'."\n\r";
         foreach ($Row as $line)
         {
-            printf('"%s";"%s";"%s";"%s";"%s";%s;%s;',
+            printf('"%s";"%s";"%s";"%s";"%s";%s;%s;%s;%s;',
                    $line['date'],
                    $line['num'],
                    $Jrn->get_tiers($line['jrn_def_type'],$line['jr_id']),
                    $line['comment'],
                    $line['jr_internal'],
                    nb($line['HTVA']),
-                   nb($line['dep_priv']));
+                   nb($line['dep_priv']),
+                   nb($line['dna']),
+                   nb($line['tva_dna'])
+                   );
             $a_tva_amount=array();
             foreach ($line['TVA'] as $lineTVA)
             {

Modified: phpcompta/trunk/include/impress_jrn.inc.php
===================================================================
--- phpcompta/trunk/include/impress_jrn.inc.php 2013-08-13 02:03:24 UTC (rev 
5349)
+++ phpcompta/trunk/include/impress_jrn.inc.php 2013-08-13 06:51:13 UTC (rev 
5350)
@@ -64,13 +64,12 @@
                        uj_login='$g_user->id'
                        and uj_priv ='X'
                        ");
-// Pour voir tout les journal ?
-if ($NoPriv == 0 && $ret != null)
-{
-       $a = count($ret);
-       $all = array('value' => 0, 'label' => 'Tous les journaux');
-       $ret[$a] = $all;
-}
+/*
+ * Show all the available ledgers
+ */
+$a = count($ret);
+$all = array('value' => 0, 'label' => 'Tous les journaux disponibles');
+$ret[$a] = $all;
 if (count($ret) < 1)
        NoAccess();
 $exercice = (isset($_GET['exercice'])) ? $_GET['exercice'] : 
$g_user->get_exercice();
@@ -255,6 +254,8 @@
        
/////////////////////////////////////////////////////////////////////////////////////
        elseif ($_GET['p_simple'] == 1)
        {
+            if ( $Jrn->get_type() != 'ACH' && $Jrn->get_type() != 'VEN')
+            {
                // Simple printing
                //---
                echo '<TABLE class="result">';
@@ -307,6 +308,14 @@
                        echo "</tr>";
                }
                echo "</table>";
+            } else {
+                /*
+                 * Ledger ACH or VEN
+                 */
+                $own=new Own($cn);
+                require_once 'template/print_ledger_simple.php';
+                
+            }
        }
        
/////////////////////////////////////////////////////////////////////////////////////
        // Détaillé



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