noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 04/14: SUIVI : ajout prénom


From: dwm
Subject: [Noalyss-commit] [noalyss] 04/14: SUIVI : ajout prénom
Date: Sun, 4 Feb 2024 05:51:22 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit d1f0bb2ddd05a44bf77dd1da723e28361da6e6e7
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Wed Jan 31 08:03:35 2024 +0100

    SUIVI : ajout prénom
---
 html/fid.php                      | 28 +++++++++++++---------------
 include/class/follow_up.class.php |  4 ++--
 2 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/html/fid.php b/html/fid.php
index 6fc1fa3eb..f7d17666a 100644
--- a/html/fid.php
+++ b/html/fid.php
@@ -115,7 +115,7 @@ if ( isset($_SESSION[SESSION_KEY.'isValid']) && 
$_SESSION[SESSION_KEY.'isValid']
         $filter_card=$d;
         $filter_card=noalyss_str_replace('[sql]','',$d);
     }
-    $sql="select vw_name,vw_addr,vw_cp,vw_buy,vw_sell,tva_id
+    $sql="select vw_name,vw_first_name,vw_addr,vw_cp,vw_buy,vw_sell,tva_id
          from vw_fiche_attr
          where quick_code=upper($1)". $filter_card;
 
@@ -141,20 +141,18 @@ if ( isset($_SESSION[SESSION_KEY.'isValid']) && 
$_SESSION[SESSION_KEY.'isValid']
     $tva_id=($tva_id==null)?" ":noalyss_str_replace('"','',$tva_id);
     /* store the answer in an array and transform it later into a JSON object 
*/
     $tmp=array();
-    $tmp[]=array('flabel',$fLabel);
-    $tmp[]=array('name',$name);
-    $tmp[]=array('ftva_id',$fTva_id);
-    $tmp[]=array('tva_id',$tva_id);
-    $tmp[]=array('fPrice_sale',$fPrice_sale);
-    $tmp[]=array('sell',$sell);
-    $tmp[]=array('fPrice_purchase',$fPrice_purchase);
-    $tmp[]=array('buy',$buy);
-    $a='{"answer":"ok"';
-    for ($o=0;$o < count($tmp);$o++)
-    {
-        $a.=sprintf(',"%s":"%s"',$tmp[$o][0],$tmp[$o][1]);
-    }
-    $a.='}';
+    //$tmp[]=array('flabel',$fLabel);
+    $tmp['flabel']=$fLabel;
+    //$tmp[]=array('name',$name);
+    $tmp['name']=$name." ".$array[0]['vw_first_name'];
+    $tmp['ftva_id']=$fTva_id;
+    $tmp['tva_id']=$tva_id;
+    $tmp['fPrice_sale']=$fPrice_sale;
+    $tmp['sell']=$sell;
+    $tmp['fPrice_purchase']=$fPrice_purchase;
+    $tmp['buy']=$buy;
+    $tmp["answer"]="ok";
+    $a=json_encode($tmp);
 }
 else
     $a='{"answer":"unauthorized"}';
diff --git a/include/class/follow_up.class.php 
b/include/class/follow_up.class.php
index a3559e61f..c4f260a09 100644
--- a/include/class/follow_up.class.php
+++ b/include/class/follow_up.class.php
@@ -333,7 +333,7 @@ class Follow_Up
             $tiers=new Fiche($this->db);
             $tiers->get_by_qcode($this->qcode_dest);
             $qcode_dest_label=strtoupper($tiers->strAttribut(1));
-            $qcode_dest_label.=" ".$tiers->strAttribut(ATTR_DEF_FIRST_NAME);
+            $qcode_dest_label.=" ".$tiers->strAttribut(ATTR_DEF_FIRST_NAME,0);
             $this->f_id_dest=$tiers->id;
         }
         else
@@ -405,7 +405,7 @@ class Follow_Up
         if ($fiche_contact->id!=0)
         {
             
$spcontact->value=strtoupper($fiche_contact->strAttribut(ATTR_DEF_NAME)??"");
-            $spcontact->value.=" 
".$fiche_contact->strAttribut(ATTR_DEF_FIRST_NAME);
+            $spcontact->value.=" 
".$fiche_contact->strAttribut(ATTR_DEF_FIRST_NAME,0);
         }
 
 



reply via email to

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