phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r4648 - in phpcompta/trunk: html html/js include include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4648 - in phpcompta/trunk: html html/js include include/template
Date: Wed, 21 Dec 2011 22:30:11 +0100 (CET)

Author: danydb
Date: 2011-12-21 22:30:09 +0100 (Wed, 21 Dec 2011)
New Revision: 4648

Modified:
   phpcompta/trunk/html/ajax_card.php
   phpcompta/trunk/html/fid.php
   phpcompta/trunk/html/js/card.js
   phpcompta/trunk/include/class_acc_ledger_purchase.php
   phpcompta/trunk/include/class_acc_ledger_sold.php
   phpcompta/trunk/include/class_document.php
   phpcompta/trunk/include/class_fiche.php
   phpcompta/trunk/include/class_print_ledger_detail.php
   phpcompta/trunk/include/template/detail-action.php
   phpcompta/trunk/include/template/ledger_detail_fin.php
Log:

fix cosmetic bug :


Modified: phpcompta/trunk/html/ajax_card.php
===================================================================
--- phpcompta/trunk/html/ajax_card.php  2011-12-21 11:12:32 UTC (rev 4647)
+++ phpcompta/trunk/html/ajax_card.php  2011-12-21 21:30:09 UTC (rev 4648)
@@ -234,7 +234,7 @@
         /* we filter thanks a given model of card */
         if ( isset($cat))
         {
-            $sql=$sql.sprintf(' where frd_id = '.sql_string ($cat));
+            $sql=$sql.sprintf(' where frd_id in ('.sql_string ($cat).')');
         }
         else
             /* we filter thanks a given list of category of card

Modified: phpcompta/trunk/html/fid.php
===================================================================
--- phpcompta/trunk/html/fid.php        2011-12-21 11:12:32 UTC (rev 4647)
+++ phpcompta/trunk/html/fid.php        2011-12-21 21:30:09 UTC (rev 4648)
@@ -135,7 +135,7 @@
     /* store the answer in an array and transform it later into a JSON object 
*/
     $tmp=array();
     $tmp[]=array('flabel',$fLabel);
-    $tmp[]=array('name',h($name));
+    $tmp[]=array('name',$name);
     $tmp[]=array('ftva_id',$fTva_id);
     $tmp[]=array('tva_id',$tva_id);
     $tmp[]=array('fPrice_sale',$fPrice_sale);

Modified: phpcompta/trunk/html/js/card.js
===================================================================
--- phpcompta/trunk/html/js/card.js     2011-12-21 11:12:32 UTC (rev 4647)
+++ phpcompta/trunk/html/js/card.js     2011-12-21 21:30:09 UTC (rev 4648)
@@ -409,7 +409,7 @@
         sx=document.body.scrollTop+60;
     }
 
-    var str_style="top:"+sx+";left:25%;width:50%;height:auto";
+    var str_style="top:"+sx+";left:25%;width:50%;height:30%";
 
     var popup={'id':  
content,'cssclass':'inner_box','style':str_style,'html':loading(),'drag':true};
 

Modified: phpcompta/trunk/include/class_acc_ledger_purchase.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger_purchase.php       2011-12-21 
11:12:32 UTC (rev 4647)
+++ phpcompta/trunk/include/class_acc_ledger_purchase.php       2011-12-21 
21:30:09 UTC (rev 4648)
@@ -1089,7 +1089,7 @@
             
$march_label=(isset(${"e_march".$i."_label"}))?${"e_march".$i."_label"}:"";
             // retrieve the tva label and name
             //--
-            if ( strlen(trim($march))!=0 )
+            if ( strlen(trim($march))!=0  && strlen(trim($march_label))==0 )
             {
                 $fMarch=new Fiche($this->db);
                 $fMarch->get_by_qcode($march);

Modified: phpcompta/trunk/include/class_acc_ledger_sold.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger_sold.php   2011-12-21 11:12:32 UTC 
(rev 4647)
+++ phpcompta/trunk/include/class_acc_ledger_sold.php   2011-12-21 21:30:09 UTC 
(rev 4648)
@@ -1198,7 +1198,7 @@
 
             // retrieve the tva label and name
             //--
-            if ( strlen(trim($march))!=0 )
+            if ( strlen(trim($march))!=0 && strlen(trim($march_label))==0)
             {
                 $fMarch=new Fiche($this->db);
                 $fMarch->get_by_qcode($march);

Modified: phpcompta/trunk/include/class_document.php
===================================================================
--- phpcompta/trunk/include/class_document.php  2011-12-21 11:12:32 UTC (rev 
4647)
+++ phpcompta/trunk/include/class_document.php  2011-12-21 21:30:09 UTC (rev 
4648)
@@ -66,8 +66,8 @@
     /*!
      * \brief Generate the document, Call $this-\>Replace to replace
      *        tag by value
-     *        
      *
+     *
      * \return an array : the url where the generated doc can be found, the 
name
      * of the file and his mimetype
      */
@@ -108,7 +108,7 @@
              $zip->extractTo($dirname.DIRECTORY_SEPARATOR);
              $zip->close();
            } else {
-             echo __FILE__.":".__LINE__."cannot unzip model ".$filename;       
+             echo __FILE__.":".__LINE__."cannot unzip model ".$filename;
            }
 
             // Remove the file we do  not need anymore
@@ -154,7 +154,7 @@
 
     /*! ParseDocument
      * \brief This function parse a document and replace all
-     *        the predefined tags by a value. This functions 
+     *        the predefined tags by a value. This functions
      *        generate diffent documents (invoice, order, letter)
      *        with the info from the database
      *
@@ -169,7 +169,7 @@
          *  - MY_*   table parameter
          *  - ART_VEN* table quant_sold for invoice
          *  - CUST_* table quant_sold and fiche for invoice
-         *  - e_* for the invoice in the $_POST 
+         *  - e_* for the invoice in the $_POST
          */
         // open the document
         $infile_name=$p_dir.DIRECTORY_SEPARATOR.$p_file;
@@ -223,7 +223,7 @@
             while ( preg_match_all ($regex,$buffer,$f) >0  )
              {
 
-                           
+
                 foreach ( $f as $apattern )
                  {
 
@@ -276,8 +276,8 @@
     /*! SaveGenerated
      * \brief Save the generated Document
      * \param $p_file is the generated file
-     * 
      *
+     *
      * \return 0 if no error otherwise 1
      */
     function SaveGenerated($p_file)
@@ -307,7 +307,7 @@
         return 0;
     }
     /*! Upload
-     * \brief Upload a file into document 
+     * \brief Upload a file into document
      *  all the needed data are in $_FILES we don't increment the seq
      * \param $p_file : array containing by default $_FILES
      *
@@ -447,7 +447,7 @@
     }
     /*!
      * \brief replace the TAG by the real value, this value can be into
-     * the database or in $_POST 
+     * the database or in $_POST
      * The possible tags are
      *  - [CUST_NAME] customer's name
      *  - [CUST_ADDR_1] customer's address line 1
@@ -456,7 +456,7 @@
      *  - [CUST_CITY] customer's city
      *  - [CUST_VAT] customer's VAT
      *  - [MARCH_NEXT]   end this item and increment the counter $i
-     *  - [DATE_LIMIT] 
+     *  - [DATE_LIMIT]
      *  - [VEN_ART_NAME]
      *  - [VEN_ART_PRICE]
      *  - [VEN_ART_QUANT]
@@ -804,13 +804,13 @@
             extract ($_POST);
             $id='e_march'.$counter."_label";
             // check if the march exists
-            
+
             if (! isset (${$id}) || (isset (${$id}) && strlen(trim(${$id})) == 
0))
                 {
                     $id = 'e_march' . $counter;
                     // check if the march exists
                     if (!isset(${$id}))
-                        return "";
+                        $r= "";
                     // check that something is sold
                     if (${'e_march' . $counter . '_price'} != 0 && ${'e_quant' 
. $counter} != 0)
                     {
@@ -818,10 +818,11 @@
                         $f->get_by_qcode(${$id}, false);
                         $r = $f->strAttribut(ATTR_DEF_NAME);
                     }
+                                       else
+                                               $r="";
                 }
                 else
                     $r=${'e_march'.$counter.'_label'};
-            return $r;
             break;
 
         case 'VEN_ART_PRICE':

Modified: phpcompta/trunk/include/class_fiche.php
===================================================================
--- phpcompta/trunk/include/class_fiche.php     2011-12-21 11:12:32 UTC (rev 
4647)
+++ phpcompta/trunk/include/class_fiche.php     2011-12-21 21:30:09 UTC (rev 
4648)
@@ -758,7 +758,7 @@
                     try
                     {
 
-                        if (isNumber($v) == 1 || strpos($v,',') != 0)
+                        if ( strlen(trim($v)) != 0)
                         {
                             $parameter=array($this->id,$v);
                         }

Modified: phpcompta/trunk/include/class_print_ledger_detail.php
===================================================================
--- phpcompta/trunk/include/class_print_ledger_detail.php       2011-12-21 
11:12:32 UTC (rev 4647)
+++ phpcompta/trunk/include/class_print_ledger_detail.php       2011-12-21 
21:30:09 UTC (rev 4648)
@@ -81,10 +81,10 @@
 
         $this->SetFont('DejaVu','BI',7);
         $this->Cell(215,7,'report Débit',0,0,'R');
-        $this->Cell(30,7,sprintf('%10.2f',$rap_deb),0,0,'R');
+        $this->Cell(30,7,nbm($rap_deb),0,0,'R');
         $this->Ln(4);
         $this->Cell(215,7,'report Crédit',0,0,'R');
-        $this->Cell(30,7,sprintf('%10.2f',$rap_cred),0,0,'R');
+        $this->Cell(30,7,nbm($rap_cred),0,0,'R');
         $this->Ln(4);
 
         // print all operation
@@ -101,7 +101,8 @@
 
             $this->Ln(4);
             // get the entries
-            $aEntry=$this->cn->get_array("select 
j_id,j_poste,j_qcode,j_montant,j_debit, ".
+            $aEntry=$this->cn->get_array("select 
j_id,j_poste,j_qcode,j_montant,j_debit, j_text,".
+                                                                               
 " case when j_text='' or j_text is null then pcm_lib else j_text end as desc,".
                                          " pcm_lib ".
                                          " from jrnx join tmp_pcmn on 
(j_poste=pcm_val) where j_grpt = $1".
                                          " order by j_debit desc,j_id",
@@ -115,7 +116,7 @@
                 $this->Cell(23,6,$entry['j_poste'],0,0,'R');
 
                 // if j_qcode is not empty retrieve name
-                if ( $entry['j_qcode'] != '')
+                if ( $entry['j_text'] =='' && $entry['j_qcode'] != '')
                 {
                     $f_id=$this->cn->get_value('select f_id from 
vw_poste_qcode where j_qcode=$1',array($entry['j_qcode']));
                     if ($f_id != '')
@@ -125,7 +126,7 @@
                         $name=$entry['pcm_lib'];
                 }
                 else
-                    $name=$entry['pcm_lib'];
+                    $name=$entry['desc'];
                 $this->Cell(150,6,$name,0,0,'L');
 
                 // print amount

Modified: phpcompta/trunk/include/template/detail-action.php
===================================================================
--- phpcompta/trunk/include/template/detail-action.php  2011-12-21 11:12:32 UTC 
(rev 4647)
+++ phpcompta/trunk/include/template/detail-action.php  2011-12-21 21:30:09 UTC 
(rev 4648)
@@ -210,7 +210,7 @@
 
 </script>
 <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="<?=_('Actualiser')?>" 
onclick="compute_all_purchase();" type="button">
+  <input name="act" id="act" class="button" value="<?=_('Actualiser')?>" 
onclick="compute_all_ledger();" type="button">
 
     <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>

Modified: phpcompta/trunk/include/template/ledger_detail_fin.php
===================================================================
--- phpcompta/trunk/include/template/ledger_detail_fin.php      2011-12-21 
11:12:32 UTC (rev 4647)
+++ phpcompta/trunk/include/template/ledger_detail_fin.php      2011-12-21 
21:30:09 UTC (rev 4648)
@@ -27,9 +27,9 @@
 <tr>
 <?
 $bk=new Fiche($cn,$obj->det->array[0]['qf_bank']);
-$view_history= sprintf('<A class="detail" 
HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>',
+$view_history= sprintf('<A class="line" 
HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>',
                                $bk->id, $gDossier, $bk->get_quick_code());
-echo td(h($bk->getName())).td($view_history);;
+echo td('Compte en banque').td(h($bk->getName())).td($view_history);;
 
 ?>
 </tr>
@@ -37,9 +37,9 @@
 <?
 
 $bk=new Fiche($cn,$obj->det->array[0]['qf_other']);
-$view_history= sprintf('<A class="detail" 
HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>',
+$view_history= sprintf('<A class="line" 
HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>',
                                $bk->id, $gDossier, $bk->get_quick_code());
-echo td(h($bk->getName()));
+echo td('Tiers').td(h($bk->getName()));
 echo td($view_history);
 ?>
 </tr>
@@ -49,7 +49,7 @@
   $itext=new IText('lib');
   $itext->value=strip_tags($obj->det->jr_comment);
   $itext->size=40;
-  echo td(_('Libellé')).td($itext->input());
+  echo td(_('Libellé')).td($itext->input(),' colspan="2" style="width:auto"');
 
 
 ?>




reply via email to

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