42 $this->
db=$p_database;
43 $this->
ag_id=$p_action_gestion_id;
76 if (
$g_user->can_write_action($this->ag_id))
78 $this->
db->exec_sql(
'delete from action_person where ag_id = $1 and f_id = $2',
79 array($this->
ag_id, $p_fiche_id));
92 $a_linked=$this->
db->get_array(
'select ap_id,f_id from action_person where ag_id=$1', array($this->
ag_id));
93 if (count($a_linked)==0)
110 if (
$g_user->can_write_action($this->ag_id))
115 $count=$this->
db->get_value(
'select count(*) from action_person where f_id=$1 and ag_id=$2',
116 array($p_fiche_id, $this->
ag_id));
119 $this->
db->exec_sql(
'insert into action_person (ag_id,f_id) values ($1,$2)',
120 array($this->
ag_id, $p_fiche_id));
150 $action_person_id=$this->
db->get_value(
"select ap_id from action_person where f_id=$1 and ag_id=$2",
151 [$p_fid, $this->
ag_id]);
154 $row=$this->
db->get_row(
"select
155 (select ad_value from fiche_detail fd2 where fd2.f_id=ap.f_id and fd2.ad_id = 1) as xname,
156 (select ad_value from fiche_detail fd2 where fd2.f_id=ap.f_id and fd2.ad_id = 32) as xfirst_name,
157 (select ad_value from fiche_detail fd2 where fd2.f_id=ap.f_id and fd2.ad_id = 23) as xqcode
166 'class="line"', _(
"Options"));
168 $js_remove=sprintf(
"action_remove_concerned('%s','%s','%s')",
dossier::id(), $p_fid, $this->
ag_id);
171 <
tr id=
"other_{$action_person_id}">
180 {
$row[
'xfirst_name']}
188 from action_person_option apo2
189 join action_person ap on (apo2.action_person_id=ap.ap_id)
191 apo2.contact_option_ref_id =$1
194 ", array($pa_Column[
$i][
'cor_id'], $p_fid, $this->
ag_id));
197 $r.=
'<td>'.$remove.
'</td>';
207 require_once NOALYSS_TEMPLATE.
"/follow_up_other_concerned_display_table.php";
215 $aColumn=$this->
db->get_array(
"select cor_id,cor_label,jdoc.jdoc_enable
216 from contact_option_ref cor
217 join jnt_document_option_contact jdoc on (cor.cor_id=jdoc.contact_option_ref_id )
218 join action_gestion ag on (ag.ag_type=jdoc.document_type_id )
219 where ag_id=$1 and jdoc.jdoc_enable=1
220 order by upper(cor_label)", [$this->
ag_id]);
tr($p_string, $p_extra='')
td($p_string='', $p_extra='')
surround the string with td
global $g_user
if no group available , then stop
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
static id()
return the 'gDossier' value after a check
Others concerned card in an action.
display_row($p_fid, $p_row, $pa_Column)
Display one row for all the option of a card.
__construct($p_database, $p_action_gestion_id)
get_option()
Get Available options.
remove_linked_card($p_fiche_id)
Remove another concerned (tiers, supplier...)
button_action_add_concerned_card()
Return a HTML string with a button for adding other cards.
display_table()
Display all the person with option in a html table.
insert_linked_card($p_fiche_id)
Add another concerned (tiers, supplier...)
display_linked_count()
Display the count of other concerned card (tiers, supplier...) in button which call.
static trash($p_id, $p_javascript)
Display the icon of a trashbin.