noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 01/08: Task #0001421: Détail fiche : recherc


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/08: Task #0001421: Détail fiche : recherche poste comptable
Date: Sat, 25 Mar 2017 08:29:39 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 5f0e1d149c1e5aae5c98b0d63a8b30e334891b49
Author: Dany De Bontridder <address@hidden>
Date:   Fri Mar 24 23:47:53 2017 +0100

    Task #0001421: Détail fiche : recherche poste comptable
---
 include/ajax/ajax_card.php    |  3 ++-
 include/class/class_fiche.php | 13 ++++++++-----
 include/lib/class_iposte.php  |  2 +-
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/include/ajax/ajax_card.php b/include/ajax/ajax_card.php
index 6c6d515..22b9a7b 100644
--- a/include/ajax/ajax_card.php
+++ b/include/ajax/ajax_card.php
@@ -114,6 +114,7 @@ case 'rmfa':
     catch (Exception $e)
     {
         $cn->rollback();
+        record_log($e->getTraceAsString());
         echo $e->getMessage();
     }
     $html=ob_get_contents();
@@ -136,7 +137,7 @@ case 'dc':
            $can_modify=0;
          }
        if ( $can_modify==1)
-         $card=$f->Display(false);
+         $card=$f->Display(false,$ctl);
        else
          $card=$f->Display(true);
        if ( $card == 'FNT' )
diff --git a/include/class/class_fiche.php b/include/class/class_fiche.php
index c4e5d02..062daeb 100644
--- a/include/class/class_fiche.php
+++ b/include/class/class_fiche.php
@@ -539,11 +539,12 @@ class Fiche
      * \brief  Display object instance, getAttribute
      *        sort the attribute and add missing ones
      * \param $p_readonly true= if can not modify, otherwise false
-     *
+     *\param string $p_in if called from an ajax it is the id of the html 
+     * elt containing
      *
      * \return string to display or FNT string for fiche non trouvé
      */
-    function Display($p_readonly)
+    function Display($p_readonly,$p_in="")
     {
         $this->GetAttribut();
         $attr=$this->attribut;
@@ -579,8 +580,9 @@ class Fiche
                 if ($r->ad_id==ATTR_DEF_ACCOUNT)
                 {
                     $w=new IPoste("av_text".$r->ad_id);
+                    $w->id=$p_in."av_text".$r->ad_id;
                     $w->set_attribute('ipopup', 'ipop_account');
-                    $w->set_attribute('account', "av_text".$r->ad_id);
+                    $w->set_attribute('account', $w->id);
                     $w->dbl_click_history();
                     //  account created automatically
                     $w->table=0;
@@ -854,6 +856,7 @@ class Fiche
         }
         catch (Exception $e)
         {
+            record_log($e->getTraceAsString());
             $this->cn->rollback();
             throw ($e);
             return;
@@ -994,8 +997,8 @@ class Fiche
             echo '<span class="error">'.
             $e->getMessage().
             '</span>';
-            error_log($e->getMessage());
-            error_log($e->getTraceAsString());
+            record_log($e->getMessage());
+            record_log($e->getTraceAsString());
             $this->cn->rollback();
             return;
         }
diff --git a/include/lib/class_iposte.php b/include/lib/class_iposte.php
index a8d887f..71e10a6 100644
--- a/include/lib/class_iposte.php
+++ b/include/lib/class_iposte.php
@@ -194,7 +194,7 @@ class IPoste extends HtmlInput
         */
        public function dbl_click_history()
        {
-               $r=' 
ondblclick="get_history_account(\''.$this->name.'\',\''.dossier::id().'\')"';
+               $r=' 
ondblclick="get_history_account(\''.$this->id.'\',\''.dossier::id().'\')"';
                $this->javascript=$r;
        }
     static public function test_me()



reply via email to

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