22if (!defined(
'ALLOWED'))
23 die(
'Appel direct ne sont pas permis');
34require_once NOALYSS_INCLUDE.
"/database/parameter_extra_sql.class.php";
40 parent::__construct($p_table);
47 $object->set_button_add_top(
false);
48 $object->set_col_label(
"pe_code", _(
"Code"));
49 $object->set_col_label(
"pe_label", _(
"Intitulé"));
50 $object->set_col_label(
"pe_value", _(
"Valeur"));
51 $object->set_order([
'pe_code',
'pe_label',
'pe_value']);
52 $object->set_search_table(
false);
53 $object->set_callback(
"ajax_misc.php");
54 $object->add_json_param(
"op",
"company");
55 $object->setCssClass(
"inner_box w-20");
68 $code=
$cn->get_value(
"select comptaproc.transform_to_code($1)",[
$object->getp(
"pe_code")]);
69 if (
$cn->get_value(
"select count(*) from parameter_extra where pe_code =$1 and id != $2",
71 $this->
set_error(
"pe_code", _(
"Code déjà utilisé"));
76 $this->
set_error(
"pe_code", _(
"ne peut être vide"));
80 if ( preg_match(
'/^ATTR/',
$code) == 1 ||
81 preg_match(
'/^CUSTATTR/',
$code) == 1 ||
82 preg_match(
'/^BENEFATTR/',
$code) == 1 )
84 $this->
set_error(
"pe_code", _(
"ne peut être pas commencer par ATTR , BENEFATTR ou CUSTATTR"));
87 if (
$error > 0) {
return false;}
this an abstract class , all the SQL class, like noalyss_sql (table), Acc_Plan_SQL (based on a SQL no...
Purpose is to propose a librairy to display a table content and allow to update and delete row ,...
set_error($p_col, $p_message)
set the error message for a wrong input