phpcompta-dev
[Top][All Lists]
Advanced

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

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


From: phpcompta-dev
Subject: [Phpcompta-dev] r5055 - in phpcompta/trunk: . doc include
Date: Sat, 30 Jun 2012 14:23:45 +0200 (CEST)

Author: danydb
Date: 2012-06-30 14:23:44 +0200 (Sat, 30 Jun 2012)
New Revision: 5055

Modified:
   phpcompta/trunk/
   phpcompta/trunk/doc/manuel-fr.odt
   phpcompta/trunk/doc/manuel-fr.pdf
   phpcompta/trunk/include/ac_common.php
   phpcompta/trunk/include/class_impress.php
   phpcompta/trunk/include/impress_rapport.inc.php
Log:
Merged revisions 5050-5053 via svnmerge from 
svn+ssh://ns352270.ovh.net/svn/phpcompta/tags/rel650

........
  r5050 | danydb | 2012-06-30 07:07:54 +0200 (Sat, 30 Jun 2012) | 10 lines
  
  ------------------------------------------------------------------------
  r5048 | danydb | 2012-06-30 06:09:28 +0200 (Sat, 30 Jun 2012) | 1 line
  
  Cosmetic : select tva 
  ------------------------------------------------------------------------
  r5049 | danydb | 2012-06-30 06:31:21 +0200 (Sat, 30 Jun 2012) | 1 line
  
  Cosmetic: ajout action - retard
  ------------------------------------------------------------------------
........
  r5051 | danydb | 2012-06-30 14:08:26 +0200 (Sat, 30 Jun 2012) | 1 line
  
  update comment
........
  r5052 | danydb | 2012-06-30 14:14:10 +0200 (Sat, 30 Jun 2012) | 1 line
  
  Manuel Documentation : syntaxe rapport
........
  r5053 | danydb | 2012-06-30 14:16:40 +0200 (Sat, 30 Jun 2012) | 1 line
  
  Rapport BUG avec les postes comptables alphanum?\195?\169riques
........



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /phpcompta/tags/rel650:1-5045,5047
   + /phpcompta/tags/rel650:1-5054

Modified: phpcompta/trunk/doc/manuel-fr.odt
===================================================================
(Binary files differ)

Modified: phpcompta/trunk/doc/manuel-fr.pdf
===================================================================
(Binary files differ)

Modified: phpcompta/trunk/include/ac_common.php
===================================================================
--- phpcompta/trunk/include/ac_common.php       2012-06-30 12:22:35 UTC (rev 
5054)
+++ phpcompta/trunk/include/ac_common.php       2012-06-30 12:23:44 UTC (rev 
5055)
@@ -239,7 +239,7 @@
        {
            return null;
        }
-    }// !ereg
+    }
     return $p_date;
 }
 

Modified: phpcompta/trunk/include/class_impress.php
===================================================================
--- phpcompta/trunk/include/class_impress.php   2012-06-30 12:22:35 UTC (rev 
5054)
+++ phpcompta/trunk/include/class_impress.php   2012-06-30 12:23:44 UTC (rev 
5055)
@@ -60,8 +60,7 @@
 
         include_once("class_acc_account_ledger.php");
 
-        //    while (@ereg("(\[[0-9]*%*D*C*S*\])",$p_formula,$e) == true)
-        while (preg_match_all("(\[[0-9]*%*D*C*S*\])",$p_formula,$e) == true)
+        while (preg_match_all("(\[[0-9]*[A-Z]*%*c*d*s*\])",$p_formula,$e) == 
true)
           {
 
             // remove the [ ]
@@ -69,17 +68,17 @@
             foreach ($x as $line)
               {
                 $compute='all';
-                if ( strpos($line,'D') != 0 )
+                if ( strpos($line,'d') != 0 )
                   $compute='deb';
-                if ( strpos($line,'C') != 0 )
+                if ( strpos($line,'c') != 0 )
                   $compute='cred';
-                if ( strpos($line,'S') != 0 )
+                if ( strpos($line,'s') != 0 )
                   $compute='signed';
                 $line=str_replace ("[","",$line);
                 $line=str_replace ("]","",$line);
-                $line=str_replace ("D","",$line);
-                $line=str_replace ("C","",$line);
-                $line=str_replace ("S","",$line);
+                $line=str_replace ("d","",$line);
+                $line=str_replace ("c","",$line);
+                $line=str_replace ("s","",$line);
                 // If there is a FROM clause we must recompute
                 // the time cond
 
@@ -159,7 +158,6 @@
         if ( $p_eval == true)
         {
             $p_formula="\$result=".$p_formula.";";
-
             eval("$p_formula");
 
             while (preg_match("/\[([0-9]+)([Tt]*)\]/",trim($p_label),$e) == 1)
@@ -213,20 +211,30 @@
         // eat Space
         $p_string=str_replace(" ","",$p_string);
         // Remove D/C/S
-        $p_string=str_replace("C","",$p_string);
-        $p_string=str_replace("D","",$p_string);
-        $p_string=str_replace("S","",$p_string);
+        $p_string=str_replace("c","",$p_string);
+        $p_string=str_replace("d","",$p_string);
+        $p_string=str_replace("s","",$p_string);
         // Remove T,t
-        $p_string=str_replace("T","",$p_string);
         $p_string=str_replace("t","",$p_string);
 
-        if ( @ereg 
("^(\\$[a-zA-Z]*[0-9]*=){0,1}((\[{0,1}[0-9]+\.*[0-9]*%{0,1}\]{0,1})+ 
*([+-\*/])* 
*(\[{0,1}[0-9]+\.*[0-9]*%{0,1}\]{0,1})*)*(([+-\*/])*\\$([a-zA-Z])+[0-9]*([+-\*/])*)*
 *( *FROM=[0-9][0-0].20[0-9][0-9]){0,1}$",$p_string) == false)
+               // remove date
+               $p_string=  preg_replace("/FROM*=*[0-9]+/", "", $p_string);
+
+               // remove account
+               $p_string=  preg_replace("/\[[0-9]*[A-Z]*%*\]/", "", $p_string);
+
+               $p_string=  preg_replace("/\+|-|\/\*/", "", $p_string);
+               
//********************************************************************************************************************
+               // If the string is empty then formula should be good
+               //
+               
//********************************************************************************************************************
+               if ($p_string == '')
         {
-            return false;
+            return true;
         }
         else
         {
-            return true;
+            return false;
         }
     }
      /**

Modified: phpcompta/trunk/include/impress_rapport.inc.php
===================================================================
--- phpcompta/trunk/include/impress_rapport.inc.php     2012-06-30 12:22:35 UTC 
(rev 5054)
+++ phpcompta/trunk/include/impress_rapport.inc.php     2012-06-30 12:23:44 UTC 
(rev 5055)
@@ -273,7 +273,7 @@
 
         echo "<TR $class>".
         "<TD>".h($op['desc'])."</TD>".
-        "<TD align=\"right\">".sprintf("% 8.2f",$op['montant'])."</TD>".
+        "<TD align=\"right\">".nbm($op['montant'])."</TD>".
         "</TR>";
     }
     echo "</table>";



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