phpcompta-dev
[Top][All Lists]
Advanced

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

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


From: phpcompta-dev
Subject: [Phpcompta-dev] r4807 - in phpcompta/trunk: . include
Date: Tue, 24 Apr 2012 19:48:54 +0200 (CEST)

Author: danydb
Date: 2012-04-24 19:48:54 +0200 (Tue, 24 Apr 2012)
New Revision: 4807

Modified:
   phpcompta/trunk/
   phpcompta/trunk/include/class_acc_reconciliation.php
   phpcompta/trunk/include/class_anc_balance_double.php
   phpcompta/trunk/include/class_anc_balance_simple.php
   phpcompta/trunk/include/class_fiche.php
   phpcompta/trunk/include/class_html_table.php
   phpcompta/trunk/include/export_balance_pdf.php
   phpcompta/trunk/include/export_fiche_balance_pdf.php
   phpcompta/trunk/include/export_fiche_detail_pdf.php
   phpcompta/trunk/include/export_fiche_pdf.php
   phpcompta/trunk/include/export_form_pdf.php
   phpcompta/trunk/include/export_gl_pdf.php
   phpcompta/trunk/include/export_ledger_pdf.php
   phpcompta/trunk/include/export_poste_detail_pdf.php
   phpcompta/trunk/include/export_security_pdf.php
   phpcompta/trunk/include/impress_poste.inc.php
Log:
Merged revisions 4797-4802 via svnmerge from 
svn+ssh://ns352270.ovh.net/svn/phpcompta/tags/rel600

........
  r4797 | danydb | 2012-03-27 20:24:27 +0200 (Tue, 27 Mar 2012) | 2 lines
  
  Force the download, problem with adobe plugin.
  Limit size of description in export_poste_detail_pdf.php
........
  r4798 | danydb | 2012-03-27 23:22:04 +0200 (Tue, 27 Mar 2012) | 1 line
  
  ajout quick code dans pdf
........
  r4799 | danydb | 2012-03-27 23:22:25 +0200 (Tue, 27 Mar 2012) | 1 line
  
  ajout le code journal dans la requ?\195?\170te
........
  r4800 | danydb | 2012-03-28 15:23:08 +0200 (Wed, 28 Mar 2012) | 1 line
  
  faire apparentre nom,id et quickcode lors impression fiche (PRINTPOSTE)
........
  r4801 | danydb | 2012-03-31 19:09:51 +0200 (Sat, 31 Mar 2012) | 1 line
  
  Improve SQL2TABLE
........
  r4802 | danydb | 2012-04-12 00:15:30 +0200 (Thu, 12 Apr 2012) | 1 line
  
  Reconciliation check that jr_id does exist
........



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /phpcompta/tags/rel600:1-4795
   + /phpcompta/tags/rel600:1-4806

Modified: phpcompta/trunk/include/class_acc_reconciliation.php
===================================================================
--- phpcompta/trunk/include/class_acc_reconciliation.php        2012-04-24 
17:46:21 UTC (rev 4806)
+++ phpcompta/trunk/include/class_acc_reconciliation.php        2012-04-24 
17:48:54 UTC (rev 4807)
@@ -108,6 +108,11 @@
         if ( $this->jr_id==$jr_id2)
             return true;
 
+               if ( $this->db->count_sql("select jr_id from jrn where 
jr_id=".$this->jr_id)==0 )
+                               return false;
+               if ( $this->db->count_sql("select jr_id from jrn where 
jr_id=".$jr_id2)==0 )
+                               return false;
+
         // verify if exists
         if ( $this->db->count_sql(
                     "select jra_id from jrn_rapt where 
jra_concerned=".$this->jr_id.

Modified: phpcompta/trunk/include/class_anc_balance_double.php
===================================================================
--- phpcompta/trunk/include/class_anc_balance_double.php        2012-04-24 
17:46:21 UTC (rev 4806)
+++ phpcompta/trunk/include/class_anc_balance_double.php        2012-04-24 
17:48:54 UTC (rev 4807)
@@ -150,7 +150,7 @@
            $tot_deb=bcadd($tot_deb,$row['debit']);
 
            $r.=td(nbm($diff),' class="num" ');
-           
+
             $r.='<td>'.$row['dc'].'</td>';
             $r.='</tr>';
         }
@@ -263,7 +263,7 @@
             $pdf->Ln();
         }
         $fDate=date('dmy-Hi');
-        $pdf->output('crossbalance-'.$fDate.'.pdf','I');
+        $pdf->output('crossbalance-'.$fDate.'.pdf','D');
     }
 
 
@@ -440,14 +440,14 @@
              pb.po_name as b_po_name,
              sum(a_oa_amount_c) as a_c,
              sum(a_oa_amount_d) as a_d
-             from (select 
+             from (select
                        a.j_id,
              a.po_id as a_po_id,
              b.po_id as b_po_id,
              case when a.oa_debit='t' then a.oa_amount else 0 end as 
a_oa_amount_d,
              case when a.oa_debit='f' then a.oa_amount else 0 end as 
a_oa_amount_c
              from
-             operation_analytique as a join operation_analytique as b on 
(a.j_id=b.j_id and a.oa_row=b.oa_row) 
+             operation_analytique as a join operation_analytique as b on 
(a.j_id=b.j_id and a.oa_row=b.oa_row)
                join poste_analytique as poa on (a.po_id=poa.po_id)
                join poste_analytique as pob on (b.po_id=pob.po_id)
              where poa.pa_id=".
@@ -514,7 +514,7 @@
                 $array[]=array('poste'=>$old,'desc'=>$old_desc
                                                     
,'debit'=>$tot_deb,'credit'=>$tot_cred,
                                'solde'=>$s,'dc'=>$d);
-      
+
                 $tot_deb=0;
                 $tot_cred=0;
 
@@ -538,10 +538,10 @@
         $d=($tot_deb>$tot_cred)?'debit':'credit';
         $array[]=array('poste'=>$old,'desc'=>$old_desc
                       ,'debit'=>$tot_deb,'credit'=>$tot_cred,
-                      
+
                        'solde'=>$s,'dc'=>$d);
 
- 
+
         return $array;
 
     }

Modified: phpcompta/trunk/include/class_anc_balance_simple.php
===================================================================
--- phpcompta/trunk/include/class_anc_balance_simple.php        2012-04-24 
17:46:21 UTC (rev 4806)
+++ phpcompta/trunk/include/class_anc_balance_simple.php        2012-04-24 
17:48:54 UTC (rev 4807)
@@ -199,7 +199,7 @@
             $pdf->Ln();
         }
         $fDate=date('dmy-Hi');
-        $pdf->output('simple-balance-'.$fDate.'.pdf','I');
+        $pdf->output('simple-balance-'.$fDate.'.pdf','D');
 
     }
     /*!

Modified: phpcompta/trunk/include/class_fiche.php
===================================================================
--- phpcompta/trunk/include/class_fiche.php     2012-04-24 17:46:21 UTC (rev 
4806)
+++ phpcompta/trunk/include/class_fiche.php     2012-04-24 17:48:54 UTC (rev 
4807)
@@ -1172,7 +1172,8 @@
                                  " jr_comment as description,jrn_def_name as 
jrn_name,".
                                 " jr_pj_number,".
                                  "j_debit, 
jr_internal,jr_id,coalesce(comptaproc.get_letter_jnt(j_id),-1) as letter, ".
-                                " jr_tech_per,p_exercice".
+                                " jr_tech_per,p_exercice,
+                                                                 jrn_def_code".
                                  " from jrnx left join jrn_def on 
jrn_def_id=j_jrn_def ".
                                  " left join jrn on jr_grpt_id=j_grpt".
                                 " left join parm_periode on (p_id=jr_tech_per) 
".

Modified: phpcompta/trunk/include/class_html_table.php
===================================================================
--- phpcompta/trunk/include/class_html_table.php        2012-04-24 17:46:21 UTC 
(rev 4806)
+++ phpcompta/trunk/include/class_html_table.php        2012-04-24 17:48:54 UTC 
(rev 4807)
@@ -30,9 +30,9 @@
    * Receives a SQL command and returns a string with the HTML code
    * to display it as a table.
    * Simple table without any feature (link in certain cell, sort,...)
-   * @param $cn database object 
+   * @param $cn database object
    * @param $a_col header of the column it is an array of array
-   *        indexes are link, name,image, style 
+   *        indexes are link, name,image, style
    * @param $sql query to execute
    * @param $table_style style of the table
    * @parm $a_sql_var array variable for the $sql DEFAULT NULL
@@ -69,7 +69,7 @@
                                     )
                               ,
                               $sql
-                              );                  
+                              );
   }
 @endcode
    */
@@ -81,6 +81,7 @@
     for ( $i=0;$i <count($a_col);$i++)
       {
        $content=h($a_col[$i]['name']);
+       $style=(isset($a_col[$i]['style']))?$a_col[$i]['style']:"";
        if ( isset($a_col[$i]['image']) && $a_col[$i]['image'] != '')
          {
            $content=sprintf('<img src="%s" 
border="0"></img>%s',$a_col[$i]['image'],$content);
@@ -90,10 +91,10 @@
            $content=sprintf('<a href="%s">%s</a>',
                             $a_col[$i]['link'],
                             $content);
-           $r.="<th>$content</th>";
-         } 
+           $r.="<th $style>$content</th>";
+         }
        else
-         $r.= th($content);
+         $r.= "<th $style>". h($content)."</th>";
       }
     $r.='</tr>';
     $ret=$cn->exec_sql($sql,$a_sql_var);
@@ -106,10 +107,11 @@
            $style='';$content=h($row[$e]);
 
            if ( isset($a_col[$e]['style']) )
-             $style=sprintf('style="%s"',$a_col[$e]['style']);
-
-
-           $r.=td($content,$style);
+             $style=$a_col[$e]['style'];
+               if  ( isset ($a_col[$e]['raw']))
+                       $r.='<td $style>'.$row[$e].'</td>';
+               else
+                       $r.=td($content,$style);
          }
        $r.='</tr>';
       }
@@ -148,6 +150,6 @@
                                     )
                               ,
                               $sql
-                              );                  
+                              );
   }
 }
\ No newline at end of file

Modified: phpcompta/trunk/include/export_balance_pdf.php
===================================================================
--- phpcompta/trunk/include/export_balance_pdf.php      2012-04-24 17:46:21 UTC 
(rev 4806)
+++ phpcompta/trunk/include/export_balance_pdf.php      2012-04-24 17:48:54 UTC 
(rev 4807)
@@ -219,7 +219,7 @@
   } // if ! empty
 
 $fDate=date('dmy-Hi');
-$pdf->Output('balance-'.$fDate.'.pdf','I');
+$pdf->Output('balance-'.$fDate.'.pdf','D');
 
 
 

Modified: phpcompta/trunk/include/export_fiche_balance_pdf.php
===================================================================
--- phpcompta/trunk/include/export_fiche_balance_pdf.php        2012-04-24 
17:46:21 UTC (rev 4806)
+++ phpcompta/trunk/include/export_fiche_balance_pdf.php        2012-04-24 
17:48:54 UTC (rev 4807)
@@ -59,7 +59,7 @@
         $pdf->Cell(0,10, "Cette catégorie n'ayant pas de poste comptable n'a 
pas de balance");
         //Save PDF to file
         $fDate=date('dmy-Hi');
-        $pdf->Output("category-$fDate.pdf", 'I');
+        $pdf->Output("category-$fDate.pdf", 'D');
         exit;
     }
        // all card
@@ -76,7 +76,7 @@
     {
         $pdf->Cell(0,10, "Aucune fiche trouvée");//Save PDF to file
         $fDate=date('dmy-Hi');
-        $pdf->Output("category-$fDate.pdf", 'I');
+        $pdf->Output("category-$fDate.pdf", 'D');
         exit;
     }
        $pdf->SetFont('DejaVuCond','',7);
@@ -270,5 +270,5 @@
 }
 //Save PDF to file
 $fDate=date('dmy-Hi');
-$pdf->Output("category-$fDate.pdf", 'I');
+$pdf->Output("category-$fDate.pdf", 'D');
 exit;

Modified: phpcompta/trunk/include/export_fiche_detail_pdf.php
===================================================================
--- phpcompta/trunk/include/export_fiche_detail_pdf.php 2012-04-24 17:46:21 UTC 
(rev 4806)
+++ phpcompta/trunk/include/export_fiche_detail_pdf.php 2012-04-24 17:48:54 UTC 
(rev 4807)
@@ -58,7 +58,7 @@
 $size=array(13,25,20,60,12,20,20,20);
 $align=array('L','C','C','L','R','R','R','R');
 
-$Libelle=sprintf("(%s) %s ",$Fiche->id,$Fiche->getName());
+$Libelle=sprintf("(%s) %s [ %s 
]",$Fiche->id,$Fiche->getName(),$Fiche->get_quick_code());
 $pdf->SetFont('DejaVu','',10);
 $pdf->Cell(0,8,$Libelle,1,0,'C');
 $pdf->Ln();
@@ -104,7 +104,7 @@
     $l++;
     $pdf->Cell($size[$l],6,substr($row['jrn_name'],0,14),0,0,$align[$l]);
     $l++;
-    
$pdf->Cell($size[$l],6,$row['description'].'('.$row['jr_internal'].')',0,0,$align[$l]);
+    
$pdf->Cell($size[$l],6,substr($row['description'],0,50).'('.$row['jr_internal'].')',0,0,$align[$l]);
 
     $l++;
     
$pdf->Cell($size[$l],6,(($row['letter']!=-1)?$row['letter']:''),0,0,$align[$l]);
@@ -187,7 +187,7 @@
 $pdf->Ln();
 
 $fDate=date('dmy-Hi');
-$pdf->Output('fiche-'.$fDate.'.pdf','I');
+$pdf->Output('fiche-'.$fDate.'.pdf','D');
 
 
 ?>

Modified: phpcompta/trunk/include/export_fiche_pdf.php
===================================================================
--- phpcompta/trunk/include/export_fiche_pdf.php        2012-04-24 17:46:21 UTC 
(rev 4806)
+++ phpcompta/trunk/include/export_fiche_pdf.php        2012-04-24 17:48:54 UTC 
(rev 4807)
@@ -58,7 +58,7 @@
         $pdf->Cell(0,10, "Cette catégorie n'ayant pas de poste comptable n'a 
pas de balance");
         //Save PDF to file
         $fDate=date('dmy-Hi');
-        $pdf->Output("category-$fDate.pdf", 'I');
+        $pdf->Output("category-$fDate.pdf", 'D');
         exit;
     }
     $aCard=$cn->get_array("select f_id,ad_value from fiche join fiche_Detail 
using (f_id)  where ad_id=1 and fd_id=$1 order by 2 ",array($_REQUEST['cat']));
@@ -67,7 +67,7 @@
     {
         $pdf->Cell(0,10, "Aucune fiche trouvée");//Save PDF to file
         $fDate=date('dmy-Hi');
-        $pdf->Output("category-$fDate.pdf", 'I');
+        $pdf->Output("category-$fDate.pdf", 'D');
         exit;
     }
     $pdf->SetFont('DejaVuCond','',7);
@@ -230,5 +230,5 @@
 }
 //Save PDF to file
 $fDate=date('dmy-Hi');
-$pdf->Output("category-$fDate.pdf", 'I');
+$pdf->Output("category-$fDate.pdf", 'D');
 exit;

Modified: phpcompta/trunk/include/export_form_pdf.php
===================================================================
--- phpcompta/trunk/include/export_form_pdf.php 2012-04-24 17:46:21 UTC (rev 
4806)
+++ phpcompta/trunk/include/export_form_pdf.php 2012-04-24 17:48:54 UTC (rev 
4807)
@@ -124,6 +124,6 @@
 }
 
 $fDate=date('dmy-Hi');
-$pdf->Output('rapport-'.$fDate.'.pdf','I');
+$pdf->Output('rapport-'.$fDate.'.pdf','D');
 
 ?>

Modified: phpcompta/trunk/include/export_gl_pdf.php
===================================================================
--- phpcompta/trunk/include/export_gl_pdf.php   2012-04-24 17:46:21 UTC (rev 
4806)
+++ phpcompta/trunk/include/export_gl_pdf.php   2012-04-24 17:48:54 UTC (rev 
4807)
@@ -198,6 +198,6 @@
 
 }
 //Save PDF to file
-$pdf->Output("gl_comptes.pdf", 'I');
+$pdf->Output("gl_comptes.pdf", 'D');
 exit;
 ?>

Modified: phpcompta/trunk/include/export_ledger_pdf.php
===================================================================
--- phpcompta/trunk/include/export_ledger_pdf.php       2012-04-24 17:46:21 UTC 
(rev 4806)
+++ phpcompta/trunk/include/export_ledger_pdf.php       2012-04-24 17:48:54 UTC 
(rev 4807)
@@ -80,11 +80,11 @@
     $pdf->AddPage();
     $pdf->SetAuthor('Phpcompta');
     $pdf->setTitle("Journal",true);
-    
+
     $pdf->export($Jrn);
 
     $fDate=date('dmy-Hi');
-    $pdf->Output('journal-'.$fDate.'.pdf','I');
+    $pdf->Output('journal-'.$fDate.'.pdf','D');
     exit(0);
 
 } // impression detaillé
@@ -105,7 +105,7 @@
             $pdf->setTitle("Journal",true);
 
             $pdf->Cell(0,6,'Ce journal ne peut être imprimé en mode simple');
-            $pdf->output('erreur.pdf','I');
+            $pdf->output('erreur.pdf','D');
             exit();
         }
         if ( $jrn_type=='VEN' && $cn->get_value('select count(qs_id) from 
quant_sold') == 0 )
@@ -115,7 +115,7 @@
             $pdf->AliasNbPages();
             $pdf->AddPage();
             $pdf->Cell(0,6,'Ce journal ne peut être imprimé en mode simple');
-            $pdf->output('erreur.pdf','I');
+            $pdf->output('erreur.pdf','D');
             exit();
         }
 
@@ -130,7 +130,7 @@
 
             $pdf->export();
             $fDate=date('dmy-Hi');
-            $pdf->Output('journal-'.$fDate.'.pdf','I');
+            $pdf->Output('journal-'.$fDate.'.pdf','D');
             exit(0);
         }
         if ( $own->MY_TVA_USE=='N')
@@ -144,7 +144,7 @@
 
             $pdf->export($Jrn);
             $fDate=date('dmy-Hi');
-            $pdf->Output('journal-'.$fDate.'.pdf','I');
+            $pdf->Output('journal-'.$fDate.'.pdf','D');
             exit(0);
         }
 
@@ -158,10 +158,10 @@
         $pdf->AddPage();
         $pdf->SetAuthor('Phpcompta');
         $pdf->setTitle("Journal",true);
-        
+
         $pdf->export();
         $fDate=date('dmy-Hi');
-        $pdf->Output('journal-'.$fDate.'.pdf','I');
+        $pdf->Output('journal-'.$fDate.'.pdf','D');
         exit(0);
     }
     if ( $jrn_type=='ODS' || $Jrn->id==0)
@@ -171,11 +171,11 @@
         $pdf->AliasNbPages();
         $pdf->SetAuthor('Phpcompta');
         $pdf->setTitle("Journal",true);
-        
+
         $pdf->AddPage();
         $pdf->export();
         $fDate=date('dmy-Hi');
-        $pdf->Output('journal-'.$fDate.'.pdf','I');
+        $pdf->Output('journal-'.$fDate.'.pdf','D');
         exit(0);
     }
 }

Modified: phpcompta/trunk/include/export_poste_detail_pdf.php
===================================================================
--- phpcompta/trunk/include/export_poste_detail_pdf.php 2012-04-24 17:46:21 UTC 
(rev 4806)
+++ phpcompta/trunk/include/export_poste_detail_pdf.php 2012-04-24 17:48:54 UTC 
(rev 4807)
@@ -58,7 +58,7 @@
 
 if ( count($a_poste) == 0 )
 {
-    $pdf->Output('poste.pdf','I');
+    $pdf->Output('poste.pdf','D');
     exit;
 }
 $size=array(13,25,20,60,12,20,20,20);
@@ -112,11 +112,11 @@
        if ( $row['jr_pj_number'] == '')
          $pdf->Cell($size[$l],6,$row['jr_internal'],0,0,$align[$l]);
        else
-         $pdf->Cell($size[$l],6,$row['jr_pj_number'],0,0,$align[$l]);    
+         $pdf->Cell($size[$l],6,$row['jr_pj_number'],0,0,$align[$l]);
         $l++;
         $pdf->Cell($size[$l],6,substr($row['jrn_name'],0,14),0,0,$align[$l]);
         $l++;
-        $pdf->Cell($size[$l],6,$row['description'],0,0,$align[$l]);
+        $pdf->Cell($size[$l],6,  
substr($row['description'],0,55),0,0,$align[$l]);
         $l++;
         
$pdf->Cell($size[$l],6,(($row['letter']!=-1)?$row['letter']:''),0,0,$align[$l]);
         $l++;
@@ -198,5 +198,5 @@
 
 }
 $fDate=date('dmy-Hi');
-$pdf->Output('poste-'.$fDate.'.pdf','I');
+$pdf->Output('poste-'.$fDate.'.pdf','D');
 ?>

Modified: phpcompta/trunk/include/export_security_pdf.php
===================================================================
--- phpcompta/trunk/include/export_security_pdf.php     2012-04-24 17:46:21 UTC 
(rev 4806)
+++ phpcompta/trunk/include/export_security_pdf.php     2012-04-24 17:48:54 UTC 
(rev 4807)
@@ -175,5 +175,5 @@
     $pdf->Ln();
 }
 $fDate=date('dmy-HI');
-$pdf->Output('security-'.$fDate.'pdf','I');
+$pdf->Output('security-'.$fDate.'pdf','D');
 ?>

Modified: phpcompta/trunk/include/impress_poste.inc.php
===================================================================
--- phpcompta/trunk/include/impress_poste.inc.php       2012-04-24 17:46:21 UTC 
(rev 4806)
+++ phpcompta/trunk/include/impress_poste.inc.php       2012-04-24 17:48:54 UTC 
(rev 4807)
@@ -219,8 +219,13 @@
         if ( ! isset($_REQUEST['oper_detail']) )
         {
             echo '<div class="content">';
+            echo '<h2 class="info"> ' .
+                '(' . $fiche->id . ')' .
+                $fiche->getName() . ' ' .
+                ' [ ' . $fiche->get_quick_code() . ' ] ' .
+                '<h2>';
             $fiche->HtmlTableHeader();
-            $fiche->HtmlTable(null,$_GET['ople']);
+            $fiche->HtmlTable(null, $_GET['ople']);
             $fiche->HtmlTableHeader();
             echo "</div>";
         }
@@ -228,10 +233,16 @@
         {
             // Detail //
             echo '<div class="content">';
+            echo '<h2 class="info"> ' .
+                '(' . $fiche->id . ')' .
+                $fiche->getName() . ' ' .
+                ' [ ' . $fiche->get_quick_code() . ' ] ' .
+                '<h2>';
+
             $fiche->HtmlTableHeader();
             $fiche->HtmlTableDetail();
             $fiche->HtmlTableHeader();
-
+            echo "</div>";
         }
         exit;
     }



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