[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 11/13: Bug : error end-of-file
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 11/13: Bug : error end-of-file |
Date: |
Wed, 11 Nov 2020 10:23:44 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 008495a7055282c8050389f613e198eb111c509c
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Wed Nov 11 00:53:19 2020 +0100
Bug : error end-of-file
---
include/class/follow_up_other_concerned.class.php | 98 +++++++++++++----------
1 file changed, 55 insertions(+), 43 deletions(-)
diff --git a/include/class/follow_up_other_concerned.class.php
b/include/class/follow_up_other_concerned.class.php
index 1995016..33942d9 100644
--- a/include/class/follow_up_other_concerned.class.php
+++ b/include/class/follow_up_other_concerned.class.php
@@ -31,17 +31,18 @@
* @brief Others concerned card in an action
* @see Follow_Up
*/
-
class Follow_Up_Other_Concerned
{
- private $ag_id; /*!< action_gestion.ag_id*/
- private $db; /*!< Database handle */
-
- function __construct($p_database,$p_action_gestion_id)
+
+ private $ag_id; /* !< action_gestion.ag_id */
+ private $db; /* !< Database handle */
+
+ function __construct($p_database, $p_action_gestion_id)
{
$this->db=$p_database;
$this->ag_id=$p_action_gestion_id;
}
+
public function get_ag_id()
{
return $this->ag_id;
@@ -52,6 +53,7 @@ class Follow_Up_Other_Concerned
$this->ag_id=$ag_id;
return $this;
}
+
public function get_db()
{
return $this->db;
@@ -63,8 +65,7 @@ class Follow_Up_Other_Concerned
return $this;
}
-
- /**
+ /**
* Remove another concerned (tiers, supplier...)
* @remark type $g_user
* @param type $p_fiche_id
@@ -74,7 +75,8 @@ class Follow_Up_Other_Concerned
global $g_user;
if ($g_user->can_write_action($this->ag_id))
{
- $this->db->exec_sql('delete from action_person where ag_id = $1
and f_id = $2', array($this->ag_id, $p_fiche_id));
+ $this->db->exec_sql('delete from action_person where ag_id = $1
and f_id = $2',
+ array($this->ag_id, $p_fiche_id));
return true;
}
return false;
@@ -105,6 +107,7 @@ class Follow_Up_Other_Concerned
// echo ' ';
// }
// }
+
/**
* Display the count of other concerned card (tiers, supplier...) in
button which call
* @return string
@@ -120,7 +123,7 @@ class Follow_Up_Other_Concerned
EOF;
echo HtmlInput::anchor_action(count($a_linked), $javascript, null,
"button");
}
-
+
/**
* Add another concerned (tiers, supplier...)
* @remark type $g_user
@@ -134,13 +137,16 @@ EOF;
/**
* insert into action_person
*/
- $count=$this->db->get_value('select count(*) from action_person
where f_id=$1 and ag_id=$2', array($p_fiche_id, $this->ag_id));
+ $count=$this->db->get_value('select count(*) from action_person
where f_id=$1 and ag_id=$2',
+ array($p_fiche_id, $this->ag_id));
if ($count==0)
{
- $this->db->exec_sql('insert into action_person (ag_id,f_id)
values ($1,$2)', array($this->ag_id, $p_fiche_id));
+ $this->db->exec_sql('insert into action_person (ag_id,f_id)
values ($1,$2)',
+ array($this->ag_id, $p_fiche_id));
}
}
}
+
/**
* Return a HTML string with a button for adding other cards
* @return type
@@ -151,41 +157,41 @@ EOF;
$javascript=<<<EOF
var
obj={dossier:$dossier,ag_id:$this->ag_id};action_concerned_search_card(obj);
EOF;
- $js=HtmlInput::button_action(_('Ajout autres'), $javascript, 'xx',
- 'smallbutton');
+ $js=HtmlInput::button_action(_('Ajout autres'), $javascript, 'xx',
'smallbutton');
return $js;
}
-
+
/**
* Display one row for all the option of a card
* @param int $p_fid card if (fiche.f_id)
* @param int $p_row index of the row used for alternate the color of the
rows
* @param array $aOther Column of the options
*/
- function display_row($p_fid,$p_row,$pa_Column){
+ function display_row($p_fid, $p_row, $pa_Column)
+ {
static $dossier_id;
$dossier_id=Dossier::id();
-
+
$action_person_id=$this->db->get_value("select ap_id from
action_person where f_id=$1 and ag_id=$2",
- [$p_fid,$this->ag_id]);
-
+ [$p_fid, $this->ag_id]);
+
// Name , first & quick code from fiche
- $row= $this->db->get_row("select
+ $row=$this->db->get_row("select
(select ad_value from fiche_detail fd2 where fd2.f_id=ap.f_id and
fd2.ad_id = 1) as xname,
(select ad_value from fiche_detail fd2 where fd2.f_id=ap.f_id and
fd2.ad_id = 32) as xfirst_name,
(select ad_value from fiche_detail fd2 where fd2.f_id=ap.f_id and
fd2.ad_id = 23) as xqcode
from fiche ap
where ap.f_id=$1
- ",[$p_fid]);
-
-
- // Detail for this one
- $detail = HtmlInput::anchor($row['xqcode'],"",
sprintf("onclick=\"linked_card_option('%s','%s')\"",
-
$action_person_id,$dossier_id),'class="line"',_("Options"));
- // remove card
- $js_remove=sprintf("action_remove_concerned('%s','%s','%s')",
dossier::id(), $p_fid,
- $this->ag_id);
- $remove = Icon_Action::trash(uniqid(), $js_remove);
+ ", [$p_fid]);
+
+
+ // Detail for this one
+ $detail=HtmlInput::anchor($row['xqcode'], "",
+ sprintf("onclick=\"linked_card_option('%s','%s')\"",
$action_person_id, $dossier_id),
+ 'class="line"', _("Options"));
+ // remove card
+ $js_remove=sprintf("action_remove_concerned('%s','%s','%s')",
dossier::id(), $p_fid, $this->ag_id);
+ $remove=Icon_Action::trash(uniqid(), $js_remove);
$r=<<<EOF
<tr id="other_{$action_person_id}">
@@ -198,40 +204,46 @@ EOF;
<td>
{$row['xfirst_name']}
</td>
-EOF;
- $nb_other=count($pa_Column);
- for ($i=0;$i<$nb_other;$i++) {
- $value=$this->db->get_value("
+EOF;
+ $nb_other=count($pa_Column);
+ for ($i=0; $i<$nb_other; $i++)
+ {
+ $value=$this->db->get_value("
select apo2.ap_value
from action_person_option apo2
join action_person ap on
(apo2.action_person_id=ap.ap_id)
where
apo2.contact_option_ref_id =$1
and ap.f_id=$2
- ",array($pa_Column[$i]['cor_id'] , $p_fid));
- $r.= td($value);
- }
+ ", array($pa_Column[$i]['cor_id'], $p_fid));
+ $r.=td($value);
+ }
$r.='<td>'.$remove.'</td>';
- $r.='</tr>';
+ $r.='</tr>';
return $r;
}
+
/**
* Display all the person with option in a html table
*/
- function display_table(){
- require_once
NOALYSS_TEMPLATE."/follow_up_other_concerned_display_table.php";
+ function display_table()
+ {
+ require_once
NOALYSS_TEMPLATE."/follow_up_other_concerned_display_table.php";
}
+
/**
* Get Available options
*/
- function get_option()
+ function get_option()
{
- $aColumn = $this->db->get_array("select
cor_id,cor_label,jdoc.jdoc_enable
+ $aColumn=$this->db->get_array("select
cor_id,cor_label,jdoc.jdoc_enable
from contact_option_ref cor
join jnt_document_option_contact jdoc on
(cor.cor_id=jdoc.contact_option_ref_id )
join action_gestion ag on (ag.ag_type=jdoc.document_type_id )
where ag_id=$1 and jdoc.jdoc_enable=1
- order by upper(cor_label)",[$this->ag_id]);
+ order by upper(cor_label)", [$this->ag_id]);
return $aColumn;
}
-}
\ No newline at end of file
+
+}
+?>
\ No newline at end of file
- [Noalyss-commit] [noalyss] branch master updated (9d5d626 -> 8bd9ba4), Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 02/13: HtmlInput::anchor, needs a javascript:void(0), Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 01/13: Cosmetic : use H2, Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 03/13: Compatibility edge, Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 04/13: Minor : remove warning and typo, Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 05/13: Follow_Up : other card, change presentation, use a button instead of displaying a lot of cells , one per card, the button calls a dialog box with the list of other cards, Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 11/13: Bug : error end-of-file,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 09/13: Export FollowUp option doesn't work, Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 12/13: Bug : followup detail operation: price Purchase or Sale, amount_from_type lost when searching , because exists in double, Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 08/13: Tag sorted alphabetically, Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 06/13: Tag : add color to tags, Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 10/13: Bug : display unused other card options, Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 13/13: minor changes : remove commented code, add new color for tags, Dany De Bontridder, 2020/11/11
- [Noalyss-commit] [noalyss] 07/13: task #0001697: Extension usage des étiquettes , tag on operation + export CSV + filter, Dany De Bontridder, 2020/11/11