26#[AllowDynamicProperties]
60 $Res=$p_cn->exec_sql(
"select * from parameter where pr_id like 'MY_%'");
65 $elt=
$row[
'pr_value'];
75MY_TVA = [ {$this->MY_TVA }]
76MY_STREET = [ {$this->MY_STREET }]
77MY_NUMBER= [ {$this->MY_NUMBER }]
78MY_CP= [ {$this->MY_CP }]
79MY_TEL= [ {$this->MY_TEL }]
80MY_PAYS= [ {$this->MY_PAYS }]
81MY_COMMUNE= [ {$this->MY_COMMUNE }]
82MY_FAX= [ {$this->MY_FAX }]
83MY_ANALYTIC= [ {$this->MY_ANALYTIC }]
84MY_STRICT= [ {$this->MY_STRICT }]
85MY_TVA_USE= [ {$this->MY_TVA_USE }]
86MY_PJ_SUGGEST= [ {$this->MY_PJ_SUGGEST }]
87MY_CHECK_PERIODE= [ {$this->MY_CHECK_PERIODE }]
88MY_DATE_SUGGEST= [ {$this->MY_DATE_SUGGEST }]
89MY_ALPHANUM= [ {$this->MY_ALPHANUM }]
90MY_UPDLAB= [ {$this->MY_UPDLAB }]
91MY_STOCK= [ {$this->MY_STOCK }]
92MY_DEFAULT_ROUND_ERROR_DEB= [ {$this->MY_DEFAULT_ROUND_ERROR_DEB }]
93MY_DEFAULT_ROUND_ERROR_CRED= [ {$this->MY_DEFAULT_ROUND_ERROR_CRED }]
94MY_ANC_FILTER= [ {$this->MY_ANC_FILTER }]
95MY_REPORT = [ {$this->MY_REPORT } ]
104 $tmp_value=preg_replace(
"/[0-9]|,/",
'', $p_value);
105 if ( $tmp_value !=
"") {
106 throw new Exception (sprintf(_(
"Valeur invalide %s"),$tmp_value),1000);
108 if (trim($p_value) ==
"") {
109 throw new Exception (sprintf(_(
"Erreur Filtre analytique %s"),$tmp_value),1001);
121 if (empty($p_value) ||($p_value!=
'Y'&&$p_value!=
'N'))
127 case 'MY_ANC_FILTER':
134 catch (Exception $exc)
141 $ret_value=htmlspecialchars($p_value);
160 if ( $this->
db->get_value(
'select count(*) from parameter where pr_id=$1',array($p_attr)) != 0 )
162 $Res=$this->
db->exec_sql(
"update parameter set pr_value=$1 where pr_id=$2",
168 $Res=$this->
db->exec_sql(
"insert into parameter (pr_id,pr_value) values( $1,$2)",
172 }
catch (Exception
$e) {
187 $this->
save(
'MY_NAME');
188 $this->
save(
'MY_TVA');
189 $this->
save(
'MY_STREET');
190 $this->
save(
'MY_NUMBER');
191 $this->
save(
'MY_CP');
192 $this->
save(
'MY_TEL');
193 $this->
save(
'MY_PAYS');
194 $this->
save(
'MY_COMMUNE');
195 $this->
save(
'MY_FAX');
196 $this->
save(
'MY_ANALYTIC');
197 $this->
save(
'MY_STRICT');
198 $this->
save(
'MY_TVA_USE');
199 $this->
save(
'MY_PJ_SUGGEST');
200 $this->
save(
'MY_CHECK_PERIODE');
201 $this->
save(
'MY_DATE_SUGGEST');
202 $this->
save(
'MY_ALPHANUM');
203 $this->
save(
'MY_UPDLAB');
204 $this->
save(
'MY_STOCK');
205 $this->
save(
'MY_DEFAULT_ROUND_ERROR_DEB');
206 $this->
save(
'MY_DEFAULT_ROUND_ERROR_CRED');
207 $this->
save(
"MY_ANC_FILTER");
208 $this->
save(
"MY_REPORT");
218 $string=
"/^[".$this->MY_ANC_FILTER.
"]+/";
219 if ( preg_match(
$string,$p_accounting) == 0 )
return FALSE;
noalyss_str_replace($search, $replace, $string)
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
static num_row($ret)
wrapper for the function pg_num_rows
Class to manage the company parameter (address, name...)
save($p_attr)
save the parameter into the database by inserting or updating
$MY_DEFAULT_ROUND_ERROR_DEB
check_anc_filter($p_value)
$MY_DEFAULT_ROUND_ERROR_CRED
match_analytic($p_accounting)
Check if an accounting match the anc_filter.
$MY_REPORT
In Belgium , we need a report on the beginning of the exercice , not in French,.