Suivi : description modifiable
This commit is contained in:
parent
6952f87934
commit
0f4b05ab46
5 changed files with 117 additions and 35 deletions
|
|
@ -80,6 +80,7 @@ class Action_Document_Type_MTable extends Manage_Table_SQL
|
|||
$this->other['contact_multiple']=$http->request("det_contact_mul", "string", 0);
|
||||
$this->other['make_invoice']=$http->request("make_invoice", "string", 0);
|
||||
$this->other['followup_comment']=$http->request("followup_comment", "string", 0);
|
||||
$this->other['editable_description']=$http->request("editable_description", "string", 0);
|
||||
$this->other['enable_followup']=$http->request("enable_followup", "string", 0);
|
||||
$this->other['seq']=$http->request("seq", "string", 0);
|
||||
$this->other['select_option_operation']=$http->request("select_option_operation", "string", null);
|
||||
|
|
@ -258,6 +259,12 @@ class Action_Document_Type_MTable extends Manage_Table_SQL
|
|||
on conflict on constraint document_option_un
|
||||
do update set do_enable=$3 ", ["contact_multiple", $object_sql->dt_id, $this->other['contact_multiple']]);
|
||||
|
||||
// Save editable description
|
||||
$cn->exec_sql("insert into document_option (do_code,document_type_id,do_enable) values ($1,$2,$3)
|
||||
on conflict on constraint document_option_un
|
||||
do update set do_enable=$3 ", ["editable_description", $object_sql->dt_id
|
||||
, $this->other['editable_description']]);
|
||||
|
||||
// Save make invoice
|
||||
$cn->exec_sql("insert into document_option (do_code,document_type_id,do_enable) values ($1,$2,$3)
|
||||
on conflict on constraint document_option_un
|
||||
|
|
|
|||
|
|
@ -144,5 +144,23 @@ class Document_Option
|
|||
[$p_document_type, 'followup_comment']);
|
||||
return $option_operation;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns true if it is possible to edit the description , otherwise false
|
||||
*
|
||||
* @param int $p_document_type Document_Type.dt_id
|
||||
* @return boolean
|
||||
*/
|
||||
static function is_enable_editable_description($p_document_type)
|
||||
{
|
||||
$return=false;
|
||||
$cn=Dossier::connect();
|
||||
if ($cn->get_value("select do_enable from document_option where document_type_id=$1 and do_code = $2",
|
||||
[$p_document_type, 'editable_description'])=='1')
|
||||
{
|
||||
$return=true;
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue