noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 74/119: Search concerned card with company ,


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 74/119: Search concerned card with company , name , ... and export contact option to CSV
Date: Mon, 26 Oct 2020 18:27:26 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 14a8d24b991b40f5bf179ba6dd415beef93cb051
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sat Oct 10 21:34:51 2020 +0200

    Search concerned card with company , name , ... and export contact option 
to CSV
---
 include/ajax/ajax_add_concerned_card.php  | 2 +-
 include/class/card_multiple.class.php     | 3 ++-
 include/template/card_multiple_result.php | 9 +++++++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/include/ajax/ajax_add_concerned_card.php 
b/include/ajax/ajax_add_concerned_card.php
index 1f9f972..de16902 100644
--- a/include/ajax/ajax_add_concerned_card.php
+++ b/include/ajax/ajax_add_concerned_card.php
@@ -112,9 +112,9 @@ for ($i=0; $i<count($a); $i++)
     $array[$i]['checkbox']=$ic->input();
     $array[$i]['quick_code']=$a[$i]['quick_code'];
     $array[$i]['name']=h($a[$i]['vw_name']);
-    $array[$i]['accounting']=$a[$i]['accounting'];
     $array[$i]['first_name']=h($a[$i]['vw_first_name']);
     $array[$i]['description']=h($a[$i]['vw_description']);
+    $array[$i]['company']=h($a[$i]['company']);
 }//foreach
 
 // No accountancy history
diff --git a/include/class/card_multiple.class.php 
b/include/class/card_multiple.class.php
index b409485..2fbd1a4 100644
--- a/include/class/card_multiple.class.php
+++ b/include/class/card_multiple.class.php
@@ -28,7 +28,8 @@ class Card_Multiple
     private $sql ; //!< SQL with the right column name
     function __construct()
     {
-        $this->sql="select 
f_id,quick_code,vw_name,accounting,vw_first_name,vw_description
+        $this->sql="select 
f_id,quick_code,vw_name,accounting,vw_first_name,vw_description,
+            (select ad_value from fiche_detail fd where 
fd.f_id=vw_fiche_attr.f_id and fd.ad_id=25) as company
                   from vw_fiche_attr  ";
     }
     /**
diff --git a/include/template/card_multiple_result.php 
b/include/template/card_multiple_result.php
index cef4de1..9afdb56 100644
--- a/include/template/card_multiple_result.php
+++ b/include/template/card_multiple_result.php
@@ -13,6 +13,11 @@ $nb_array=count($array);
              ?>
         <?php printf (_("Nombre de fiches trouvées %d montrées 
%d"),$count_card,$nb_array);?>
         <table id="card_list" class="result" >
+            <th></th>
+            <th><?=_("QCode")?></th>
+            <th><?=_("Société")?></th>
+            <th><?=_("Nom")?></th>
+            <th><?=_("Description")?></th>
             <?php for ($i=0; $i<$nb_array; $i++) : ?>
                 <?php $class=($i%2==0)?'odd':'even'; ?>
                 <tr class="<?php echo $class; ?>">
@@ -22,11 +27,11 @@ $nb_array=count($array);
                     <td style="padding-right:55px">
                         <?php echo $array[$i]['quick_code'] ?>
                     </td>
-
                     <td>
-                        <?php echo $array[$i]['name'] ?>
+                        <?php echo $array[$i]['company'] ?>
                     </td>
                     <td>
+                        <?php echo $array[$i]['name'] ?>
                         <?php echo $array[$i]['first_name'] ?>
                     </td>
                     <td>



reply via email to

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