phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r5333 - in phpcompta/trunk: . html include include/templ


From: phpcompta-dev
Subject: [Phpcompta-dev] r5333 - in phpcompta/trunk: . html include include/template
Date: Wed, 10 Jul 2013 19:16:03 +0200 (CEST)

Author: danydb
Date: 2013-07-10 19:16:02 +0200 (Wed, 10 Jul 2013)
New Revision: 5333

Modified:
   phpcompta/trunk/
   phpcompta/trunk/html/ajax_card.php
   phpcompta/trunk/html/ajax_ledger.php
   phpcompta/trunk/html/popup.php
   phpcompta/trunk/include/class_acc_ledger.php
   phpcompta/trunk/include/class_tool_uos.php
   phpcompta/trunk/include/compta_ods.inc.php
   phpcompta/trunk/include/constant.php
   phpcompta/trunk/include/operation_ods_new.inc.php
   phpcompta/trunk/include/template/forecast_result.php
   phpcompta/trunk/include/user_detail.inc.php
Log:
Merged revisions 5324,5326-5332 via svnmerge from 
svn+ssh://ns352270.ovh.net/svn/phpcompta/tags/rel660

........
  r5324 | danydb | 2013-06-10 18:17:15 +0200 (Mon, 10 Jun 2013) | 1 line
  
  Probleme journaux ODS: mauvais filtre pour les fiches
........
  r5326 | danydb | 2013-06-26 21:25:42 +0200 (Wed, 26 Jun 2013) | 1 line
  
  bug : use POST instead of array
........
  r5327 | danydb | 2013-06-29 00:24:33 +0200 (Sat, 29 Jun 2013) | 1 line
  
  Bug : missing php path
........
  r5328 | danydb | 2013-06-29 00:34:51 +0200 (Sat, 29 Jun 2013) | 1 line
  
  Bug : mixed 2 variables : cannot save Analytic operation
........
  r5329 | danydb | 2013-06-29 00:56:50 +0200 (Sat, 29 Jun 2013) | 1 line
  
  Bug #0000859: FORECAST ; bug Total Categorie reel
........
  r5330 | danydb | 2013-07-03 22:08:41 +0200 (Wed, 03 Jul 2013) | 1 line
  
  Bug #0000860: creation de comptes utilisateurs sur serveur mutualis?\195?\169 
(mono dossier)
........
  r5331 | danydb | 2013-07-10 19:12:32 +0200 (Wed, 10 Jul 2013) | 1 line
  
  Card ordered by name
........
  r5332 | danydb | 2013-07-10 19:13:44 +0200 (Wed, 10 Jul 2013) | 1 line
  
  Card ordered by name
........



Property changes on: phpcompta/trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /phpcompta/tags/rel660:1-5322
   + /phpcompta/tags/rel660:1-5332

Modified: phpcompta/trunk/html/ajax_card.php
===================================================================
--- phpcompta/trunk/html/ajax_card.php  2013-07-10 17:13:44 UTC (rev 5332)
+++ phpcompta/trunk/html/ajax_card.php  2013-07-10 17:16:02 UTC (rev 5333)
@@ -258,7 +258,8 @@
                 $html.='</h3>';
                 break;
        }
-       $sql.=" ".$where;
+    $sql.=" ".$where." order by fd_label";
+
     $array=$cn->make_array($sql);
     $html=HtmlInput::anchor_close('select_card_div');
     $html.=h2info('Choix de la catégorie');
@@ -364,9 +365,8 @@
                 $html.='</h3>';
                 break;
        }
-    /* We limit the search to 20 records */
-    $sql=$sql.' order by vw_name limit 20';
-    $a=$cn->get_array($sql);
+     /* We limit the search to MAX_SEARCH_CARD records */
+    $sql=$sql.' order by vw_name limit '.MAX_SEARCH_CARD;
 
     for($i=0;$i<count($a);$i++)
     {
@@ -439,7 +439,7 @@
         $search->set_attribute('account',$search->name);
         $search->set_attribute('ipopup','ipop_account');
 
-               $nom_mod=new IText("nom_mod");
+       $nom_mod=new IText("nom_mod");
         $str_poste=$search->input();
         $submit=HtmlInput::submit('save',_('Sauve'));
         ob_start();

Modified: phpcompta/trunk/html/ajax_ledger.php
===================================================================
--- phpcompta/trunk/html/ajax_ledger.php        2013-07-10 17:13:44 UTC (rev 
5332)
+++ phpcompta/trunk/html/ajax_ledger.php        2013-07-10 17:16:02 UTC (rev 
5333)
@@ -467,15 +467,15 @@
             if ( $owner->MY_ANALYTIC != "nu" && isset ($_POST['op']) )
             {
                 // for each item, insert into operation_analytique */
-                $op=new Anc_Operation($cn);
-                $op->save_update_form($_POST);
+                $opanc=new Anc_Operation($cn);
+                $opanc->save_update_form($_POST);
             }
             //////////////////////////////////////////////////////////////////
             //Save other info
             //////////////////////////////////////////////////////////////////
             $op->save_info($_POST['OTHER'],'OTHER');
             $op->save_info($_POST['BON_COMMANDE'],'BON_COMMANDE');
-            
+
         }
         echo _('Opération sauvée');
         $cn->commit();

Modified: phpcompta/trunk/html/popup.php
===================================================================
--- phpcompta/trunk/html/popup.php      2013-07-10 17:13:44 UTC (rev 5332)
+++ phpcompta/trunk/html/popup.php      2013-07-10 17:16:02 UTC (rev 5333)
@@ -1,6 +1,6 @@
-<?php 
+<?php
 
-require_once('ac_common.php');
+require_once('../include/ac_common.php');
 require_once('function_javascript.php');
 require_once('class_html_input.php');
 require_once('class_dossier.php');

Modified: phpcompta/trunk/include/class_acc_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger.php        2013-07-10 17:13:44 UTC 
(rev 5332)
+++ phpcompta/trunk/include/class_acc_ledger.php        2013-07-10 17:16:02 UTC 
(rev 5333)
@@ -3382,6 +3382,7 @@
                                break;
                        case 'ODS':
                                $this->jrn_def_class_deb = $p_jrn_class_deb;
+                               $this->jrn_def_fiche_cred=null;
                                break;
                        case 'FIN':
                                $a = new Fiche($this->db);
@@ -3500,6 +3501,7 @@
                                break;
                        case 'ODS':
                                $this->jrn_def_class_deb = $p_jrn_class_deb;
+                               $this->jrn_def_fiche_cred = null;
                                break;
                        case 'FIN':
                                $a = new Fiche($this->db);

Modified: phpcompta/trunk/include/class_tool_uos.php
===================================================================
--- phpcompta/trunk/include/class_tool_uos.php  2013-07-10 17:13:44 UTC (rev 
5332)
+++ phpcompta/trunk/include/class_tool_uos.php  2013-07-10 17:16:02 UTC (rev 
5333)
@@ -64,7 +64,7 @@
     {
         global $cn;
                if ( $p_array == null ) $p_array=$_POST;
-               $this->id=$_POST[$this->name];
+               $this->id=$p_array[$this->name];
         $sql="insert into tool_uos(uos_value) values ($1)";
         try {
             $cn->exec_sql($sql,array($this->id));

Modified: phpcompta/trunk/include/compta_ods.inc.php
===================================================================
--- phpcompta/trunk/include/compta_ods.inc.php  2013-07-10 17:13:44 UTC (rev 
5332)
+++ phpcompta/trunk/include/compta_ods.inc.php  2013-07-10 17:16:02 UTC (rev 
5333)
@@ -39,15 +39,15 @@
 
 $cn = new Database(dossier::id());
 
-$id = (isset($_REQUEST['p_jrn'])) ? $_REQUEST['p_jrn'] : -1;
-$id = (isset($_REQUEST['p_jrn_predef'])) ? $_REQUEST['p_jrn_predef'] : -1;
-$ledger = new Acc_Ledger($cn, $id);
+$id_predef = (isset($_REQUEST['p_jrn_predef'])) ? $_REQUEST['p_jrn_predef'] : 
-1;
+$id_ledger = (isset($_REQUEST['p_jrn'])) ? $_REQUEST['p_jrn'] : $id_predef;
+$ledger = new Acc_Ledger($cn, $id_ledger);
 $first_ledger = $ledger->get_first('ODS');
 if ( empty ($first_ledger))
 {
        exit('Pas de journal disponible');
 }
-$ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id;
+$ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger;
 
 /**\brief show a form for quick_writing */
 $def = -1;

Modified: phpcompta/trunk/include/constant.php
===================================================================
--- phpcompta/trunk/include/constant.php        2013-07-10 17:13:44 UTC (rev 
5332)
+++ phpcompta/trunk/include/constant.php        2013-07-10 17:16:02 UTC (rev 
5333)
@@ -78,7 +78,7 @@
 
 
 define ("DBVERSION",107);
-
+define ("MONO_DATABASE",25);
 define ("DBVERSIONREPO",14);
 define ('NOTFOUND','--not found--');
 
@@ -93,6 +93,7 @@
 define ('COMPTA_MIN_YEAR',1990);
 define ('MAX_RECONCILE',25);
 define ('MAX_QCODE',4);
+define ('MAX_SEARCH_CARD',20);
 
 if ( DEBUG ) {
        error_reporting(2147483647);

Modified: phpcompta/trunk/include/operation_ods_new.inc.php
===================================================================
--- phpcompta/trunk/include/operation_ods_new.inc.php   2013-07-10 17:13:44 UTC 
(rev 5332)
+++ phpcompta/trunk/include/operation_ods_new.inc.php   2013-07-10 17:16:02 UTC 
(rev 5333)
@@ -31,11 +31,11 @@
 global $g_user,$g_parameter;
 $cn=new Database(dossier::id());
 
-$id = (isset($_REQUEST['p_jrn'])) ? $_REQUEST['p_jrn'] : -1;
-$id = (isset($_REQUEST['p_jrn_predef'])) ? $_REQUEST['p_jrn_predef'] : -1;
-$ledger=new Acc_Ledger($cn,$id);
+$id_predef = (isset($_REQUEST['p_jrn_predef'])) ? $_REQUEST['p_jrn_predef'] : 
-1;
+$id_ledger = (isset($_REQUEST['p_jrn'])) ? $_REQUEST['p_jrn'] : $id_predef;
+$ledger = new Acc_Ledger($cn, $id_ledger);
 $first_ledger=$ledger->get_first('ODS');
-$ledger->id=($ledger->id==-1)?$first_ledger['jrn_def_id']:$id;
+$ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger;
 
 // check if we can write in the ledger
 if ( $g_user->check_jrn($ledger->id)=='X')

Modified: phpcompta/trunk/include/template/forecast_result.php
===================================================================
--- phpcompta/trunk/include/template/forecast_result.php        2013-07-10 
17:13:44 UTC (rev 5332)
+++ phpcompta/trunk/include/template/forecast_result.php        2013-07-10 
17:16:02 UTC (rev 5333)
@@ -4,7 +4,7 @@
 <?php if (count($aItem[$i])==0) continue;?>
 <fieldset>
 <legend>
-<?php echo $aCat[$i]['fc_desc'];$tot_cat_estm=0;$tot_cat_real=0;?>
+<?php echo 
$aCat[$i]['fc_desc'];$tot_cat_estm=0;$tot_cat_real=0;$tot_cum_real=0;?>
 </legend>
 
 <?php for ($e=0;$e<count($aItem[$i]);$e++):?>
@@ -79,12 +79,15 @@
                <tr>
                        <td>
                                                <?php echo _('Total réel');
-                                               $tot_cat_real = 0;?>
+
+                                               $tot_cat_real = 0;
+                                               ?>
                                        </td>
                                <?php for ($h = 0; $h < count($aPeriode); 
$h++):?>
                                <td align="right">
-                               <?php 
+                               <?php
                                $tot_cat_real = bcadd($tot_cat_real, 
$aReal[$i][$e][$h]);
+                               
$tot_cum_real=bcadd($tot_cum_real,$aReal[$i][$e][$h]);
                                echo nbm($tot_cat_real);
                        ?>
                        </td>
@@ -97,7 +100,7 @@
 </td>
 <?php for ($h=0;$h<count($aPeriode);$h++):?>
 
-    <?php 
+    <?php
  $diff= bcsub( $aReal[$i][$e][$h],$estm[$i][$e][$h]);
 if ( ($aItem[$i][$e]['fi_debit'] == 'C' && $diff < 0) || 
($aItem[$i][$e]['fi_debit'] == 'D' && $diff > 0))
   {
@@ -111,7 +114,7 @@
   {
     echo '<td style="text-align:right;background-color:green;color:white">';
   }
-  
+
 echo nbm( $diff);
 ?>
 </td>
@@ -170,10 +173,10 @@
 <?php echo td(_('Total Catégorie estimé'));echo td(nbm($tot_cat_estm),'num');?>
 </tr>
 <tr>
-<?php echo td(_('Total Catégorie réel'));echo td(nbm($tot_cat_real),'num');?>
+<?php echo td(_('Total Catégorie réel'));echo td(nbm($tot_cum_real),'num');?>
 </tr>
 <tr>
-<?php echo td(_('Différence'));echo 
td(nbm($tot_cat_real-$tot_cat_estm),'num');?>
+<?php echo td(_('Différence'));echo 
td(nbm($tot_cum_real-$tot_cat_estm),'num');?>
 </tr>
 </table>
 </fieldset>
@@ -182,12 +185,12 @@
 <?php endfor;?>
 <?php if ( ! empty ($error) ) : ?>
 <div class="error">
-Désolé il y a des formules incorrectes 
+Désolé il y a des formules incorrectes
 <ul style="list-style-type:none">
 
    <?php $last="";?>
    <?php for ($i=0;$i<count($error);$i++) : ?>
-<?php 
+<?php
    if ( $last != $error[$i] ) {  echo h($error[$i]); }
 $last=$error[$i];
 endfor;

Modified: phpcompta/trunk/include/user_detail.inc.php
===================================================================
--- phpcompta/trunk/include/user_detail.inc.php 2013-07-10 17:13:44 UTC (rev 
5332)
+++ phpcompta/trunk/include/user_detail.inc.php 2013-07-10 17:16:02 UTC (rev 
5333)
@@ -73,15 +73,24 @@
         {
             if (substr_count($name, 'PRIV') != 0)
             {
-                $db_id = mb_substr($name, 4);
                 $cn = new Database();
-                               $name=$cn->format_name($db_id, "dos");
-                               if ( $cn->exist_database($name) == 1 )
+                               if ( defined ('MULTI')&& MULTI==0)
                                {
+                                       $name=dbname;
+                                       $db_id=MONO_DATABASE;
                                        $UserChange->set_folder_access($db_id, 
$elem);
-                                       Dossier::synchro_admin($db_id);
                                }
-            }
+                               else
+                               {
+                                   $db_id = mb_substr($name, 4);
+                                       $name=$cn->format_name($db_id, "dos");
+                                       if ( $cn->exist_database($name) == 1 )
+                                       {
+                                               
$UserChange->set_folder_access($db_id, $elem);
+                                               Dossier::synchro_admin($db_id);
+                                       }
+                               }
+                       }
         }
     }
 }
@@ -206,8 +215,13 @@
 $mod_user = new User(new Database(), $uid);
 foreach ($Dossier as $rDossier)
 {
-
-    $priv = $mod_user->get_folder_access($rDossier['dos_id']);
+       if (defined ("MULTI") && MULTI==0)
+       {
+                       $priv = $mod_user->get_folder_access(MONO_DATABASE);
+                       $priv=($priv=='L')?'R':$priv;
+       }
+               else
+                       $priv = 
$mod_user->get_folder_access($rDossier['dos_id']);
     printf("<TR><TD> Dossier : %s </TD>", h($rDossier['dos_name']));
 
     $select = new ISelect();



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