phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r524 - in trunk: . importbank/include importbank/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r524 - in trunk: . importbank/include importbank/include/template rapport_avance rapport_avance/doc rapport_avance/include tools/include
Date: Wed, 10 Jul 2013 19:27:28 +0200 (CEST)

Author: danydb
Date: 2013-07-10 19:27:28 +0200 (Wed, 10 Jul 2013)
New Revision: 524

Modified:
   trunk/
   trunk/importbank/include/class_bank_item.php
   trunk/importbank/include/template/show_transfer.php
   trunk/rapport_avance/ajax.php
   trunk/rapport_avance/doc/rapav.odt
   trunk/rapport_avance/include/class_formulaire_param.php
   trunk/rapport_avance/include/class_rapav_formulaire.php
   trunk/rapport_avance/include/formulaire.inc.php
   trunk/tools/include/operation.inc.php
   trunk/tools/include/tool_function.php
Log:
Merged revisions 514-523 via svnmerge from 
svn+ssh://address@hidden/svn_extension/tag/rel660

........
  r514 | danydb | 2013-05-28 21:25:01 +0200 (Tue, 28 May 2013) | 1 line
  
  bug version
........
  r515 | danydb | 2013-06-09 19:39:21 +0200 (Sun, 09 Jun 2013) | 1 line
  
  bug #0000855: Ordre des pi?\195?\168ces justificatives
........
  r516 | danydb | 2013-06-10 19:59:39 +0200 (Mon, 10 Jun 2013) | 1 line
  
  bug #0000853: ImportBank / champ "info suppl?\195?\169mentaire"
........
  r517 | danydb | 2013-06-10 20:13:58 +0200 (Mon, 10 Jun 2013) | 1 line
  
  cosmetic
........
  r518 | danydb | 2013-06-13 16:25:34 +0200 (Thu, 13 Jun 2013) | 1 line
  
  Bug# 0000857: [Plugin Rapport Avanc?\195?\169 : Export d'un formulaire : la 
restauration ne se fait pas
........
  r519 | danydb | 2013-06-29 19:20:59 +0200 (Sat, 29 Jun 2013) | 1 line
  
  Correct input : doublon p_code
........
  r520 | danydb | 2013-06-29 19:32:38 +0200 (Sat, 29 Jun 2013) | 1 line
  
  Correct input : doublon p_code
........
  r521 | danydb | 2013-06-29 19:32:53 +0200 (Sat, 29 Jun 2013) | 1 line
  
  remove debug code
........
  r522 | danydb | 2013-07-10 19:18:05 +0200 (Wed, 10 Jul 2013) | 1 line
  
  Message si sauvegarde non possible
........
  r523 | danydb | 2013-07-10 19:24:27 +0200 (Wed, 10 Jul 2013) | 1 line
  
  Update doc
........



Property changes on: trunk
___________________________________________________________________
Name: svnmerge-integrated
   - /tag/rel660:1-512
   + /tag/rel660:1-523

Modified: trunk/importbank/include/class_bank_item.php
===================================================================
--- trunk/importbank/include/class_bank_item.php        2013-07-10 17:24:27 UTC 
(rev 523)
+++ trunk/importbank/include/class_bank_item.php        2013-07-10 17:27:28 UTC 
(rev 524)
@@ -78,6 +78,8 @@
          {
            $libelle=new ITextArea('libelle');
            $libelle->value=$bi->libelle;
+           $libelle->heigh=3;
+           $libelle->width=60;
 
          }
        else
@@ -150,4 +152,4 @@
 
     $bi_sql->update();
   }
-}
\ No newline at end of file
+}

Modified: trunk/importbank/include/template/show_transfer.php
===================================================================
--- trunk/importbank/include/template/show_transfer.php 2013-07-10 17:24:27 UTC 
(rev 523)
+++ trunk/importbank/include/template/show_transfer.php 2013-07-10 17:27:28 UTC 
(rev 524)
@@ -56,7 +56,7 @@
                        $third=utf8_encode($array_row[$i]);
                        break;
                 case 5:
-                       $extra=utf8_encode($array_row[$i]);
+                       $extra=utf8_encode(preg_replace('/[^[: 
print:]]/','',$array_row[$i]));
                        break;
 
                 }
@@ -222,4 +222,4 @@
 ?>
 </table>
 <?php echo $table?>
-</form>
\ No newline at end of file
+</form>

Modified: trunk/rapport_avance/ajax.php
===================================================================
--- trunk/rapport_avance/ajax.php       2013-07-10 17:24:27 UTC (rev 523)
+++ trunk/rapport_avance/ajax.php       2013-07-10 17:27:28 UTC (rev 524)
@@ -120,7 +120,6 @@
                require_once 'include/class_rapav_formulaire.php';
                $rapav=new Rapav_Formulaire($_GET['f_id']);
                $rapav->remove_doc_template();
-               defaut:
                break;
 }
 ?>

Modified: trunk/rapport_avance/doc/rapav.odt
===================================================================
(Binary files differ)

Modified: trunk/rapport_avance/include/class_formulaire_param.php
===================================================================
--- trunk/rapport_avance/include/class_formulaire_param.php     2013-07-10 
17:24:27 UTC (rev 523)
+++ trunk/rapport_avance/include/class_formulaire_param.php     2013-07-10 
17:27:28 UTC (rev 524)
@@ -150,14 +150,13 @@
                        }
                        /// Update now the table  
rapport_advanced.restore_formulaire_param and set the correct pk
                        $cn->exec_sql("update 
rapport_advanced.restore_formulaire_param set 
p_id=nextval('rapport_advanced.formulaire_param_p_id_seq')");
-                       $cn->exec_sql("update 
rapport_advanced.restore_formulaire_param_detail set 
fp_id=nextval('rapport_advanced.formulaire_param_detail_fp_id_seq')");
 
                        $cn->exec_sql('insert into 
rapport_advanced.formulaire_param select  p_id, p_code, p_libelle, p_type, 
p_order, f_id, t_id
                                from rapport_advanced.restore_formulaire_param 
where f_id=$1',array($form->f_id));
 
-                       $cn->exec_sql('insert into 
rapport_advanced.formulaire_param_detail select fp_id, p_id, tmp_val, tva_id, 
fp_formula, fp_signed, jrn_def_type,
+                       $cn->exec_sql("insert into 
rapport_advanced.formulaire_param_detail select 
nextval('rapport_advanced.formulaire_param_detail_fp_id_seq'), p_id, tmp_val, 
tva_id, fp_formula, fp_signed, jrn_def_type,
             tt_id, type_detail, with_tmp_val, type_sum_account, 
operation_pcm_val from  rapport_advanced.restore_formulaire_param_detail where 
p_id in (
-                       select p_id from 
rapport_advanced.restore_formulaire_param where f_id=$1)',array($form->f_id));
+                       select p_id from 
rapport_advanced.restore_formulaire_param where f_id=$1)",array($form->f_id));
 
                        $cn->exec_sql('delete from  
rapport_advanced.restore_formulaire_param where f_id=$1',array($form->f_id));
                        $cn->commit();

Modified: trunk/rapport_avance/include/class_rapav_formulaire.php
===================================================================
--- trunk/rapport_avance/include/class_rapav_formulaire.php     2013-07-10 
17:24:27 UTC (rev 523)
+++ trunk/rapport_avance/include/class_rapav_formulaire.php     2013-07-10 
17:27:28 UTC (rev 524)
@@ -110,10 +110,30 @@
         */
        static function save_definition($p_array)
        {
+               self::verify_definition($p_array);
                self::update_definition($p_array);
                return;
        }
+       /**
+        * @brief Check data and change them if needed
+        * @global database connection $cn
+        * @param array $p_array normally $_POST
+        */
+       static function verify_definition(&$p_array)
+       {
+               global $cn;
+               for ($i=0;$i<count($p_array['p_code']);$i++)
+               {
+                       $c=$cn->get_value('select count(*) from 
rapport_advanced.formulaire_param
+                               where p_code=$1 and p_id <> $2 and f_id=$3',
+                                       
array($p_array['p_code'][$i],$p_array['p_id'][$i],$p_array['f_id']));
 
+                       if ( $c > 0 ) {
+                               $p_array['p_code'][$i]='C'.$i.microtime();
+                       }
+               }
+       }
+
        /**
         *
         * @see save_definition

Modified: trunk/rapport_avance/include/formulaire.inc.php
===================================================================
--- trunk/rapport_avance/include/formulaire.inc.php     2013-07-10 17:24:27 UTC 
(rev 523)
+++ trunk/rapport_avance/include/formulaire.inc.php     2013-07-10 17:27:28 UTC 
(rev 524)
@@ -36,10 +36,19 @@
        }
        else
        {
-               echo '<p class="notice">'._(' dernière sauvegarde 
').date('d-m-Y H:i').'</p>';
-               RAPAV_formulaire::save_definition($_POST);
+               //echo '<p class="notice">'._(' dernière sauvegarde 
').date('d-m-Y H:i').'</p>';
+               try
+               {
+                       RAPAV_formulaire::save_definition($_POST);
+                       echo '<p class="notice">'._(' dernière sauvegarde 
').date('d-m-Y H:i').'</p>';
+               }
+               catch (Exception $exc)
+               {
+                       echo '<p class="notice">'._(' Impossible de 
sauver').$exc->getMessage().'</p>';
+
+                       //throw $exc;
+               }
                require_once 'formulaire_definition_show.inc.php';
-               echo '<p class="notice">'._(' dernière sauvegarde 
').date('d-m-Y H:i').'</p>';
                exit();
        }
 }

Modified: trunk/tools/include/operation.inc.php
===================================================================
--- trunk/tools/include/operation.inc.php       2013-07-10 17:24:27 UTC (rev 
523)
+++ trunk/tools/include/operation.inc.php       2013-07-10 17:27:28 UTC (rev 
524)
@@ -55,7 +55,7 @@
     list($sql,$where)=$ledger->build_search_sql($array);
 
     // order
-    $sql.=' order by jr_date_order 
asc,substring(jr_pj_number,\'\\\d+$\')::numeric asc  ';
+    $sql.=' order by jr_date_order 
asc,substring(jr_pj_number,\'[0-9]+$\')::numeric asc  ';
 
     // Count nb of line
     $max_line=$cn->count_sql($sql);

Modified: trunk/tools/include/tool_function.php
===================================================================
--- trunk/tools/include/tool_function.php       2013-07-10 17:24:27 UTC (rev 
523)
+++ trunk/tools/include/tool_function.php       2013-07-10 17:27:28 UTC (rev 
524)
@@ -377,7 +377,7 @@
        where
        jr_def_id=$1 and jr_date >= to_date($2,'DD.MM.YYYY')
        and jr_date <= to_date($3,'DD.MM.YYYY')
-        order by jr_date asc,substring(jr_pj_number,'\\\\d+$')::numeric asc
+        order by jr_date asc,substring(jr_pj_number,'[0-9]+$')::numeric asc
        ";
   
$ret=$cn->exec_sql($sql,array($_GET['ledger'],$_GET['dstart'],$_GET['dend']));
   $nb_row=Database::num_row($ret);



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