25 require_once NOALYSS_INCLUDE.
'/lib/class_ipopup.php';
26 require_once NOALYSS_INCLUDE.
'/lib/class_ibutton.php';
27 require_once NOALYSS_INCLUDE.
'/lib/class_ispan.php';
61 $this->in_table=
false;
62 $this->
value=$p_value;
73 public function input($p_name=null,$p_value=null)
75 $this->
name=($p_name==null)?$this->
name:$p_name;
76 $this->
value=($p_value==null)?$this->
value:$p_value;
77 $this->js=(isset($this->js))?$this->js:
'onchange="format_number(this);"';
78 $this->
id=($this->
id==
"")?$this->
name:$this->
id;
82 $str=
'<input type="TEXT" class="input_text" name="%s" value="%s" id="%s" size="3" %s>';
88 if ( $this->
button==
true && ! $this->in_table)
91 if ( $this->
button==
true && $this->in_table)
94 if ( isset($this->code))
96 if ( $this->
cn != NULL)
100 $this->code->value=$this->
cn->get_value(
'select tva_label from tva_rate where tva_id=$1',
101 array($this->
value));
104 $r.=$this->code->input();
125 if(
trim($this->
name)==
'')
throw new Exception (_(
'Le nom ne peut ĂȘtre vide'));
126 $this->
id=($this->
id==
"")?$this->
name:$this->
id;
131 $bt->label=_(
' TVA ');
133 $bt->set_attribute(
'ctl',$this->
id);
134 $bt->set_attribute(
'popup',
'popup_tva');
135 if ( isset($this->code))
136 $bt->set_attribute(
'jcode',$this->code->name);
137 if ( isset($this->compute))
138 $bt->set_attribute(
'compute',$this->compute);
139 $bt->javascript=(isset($this->but_javascript))?$this->but_javascript:
'popup_select_tva(this)';
150 $comment=($tva->load() !=
"-1")? $tva->tva_label:
"";
151 $res=sprintf(
'<input type="text" name="%s" size="6" class="input_text_ro" value="%s" id="%s" readonly="">%s',$this->
name,$this->
value,$this->
name,
$comment);
162 $this->code=
new ISpan($p_code);
167 $a->set_title(
'Choix de la tva');
170 $tva->with_button(
true);
172 $tva->add_label(
'code');
173 $tva->js=
'onchange="set_tva_label(this);"';
175 echo $tva->dbutton();
td($p_string='', $p_extra='')
surround the string with td
for($e=0;$e< count($array);$e++) $desc readOnly
Acc_Tva is used for to map the table tva_rate parameter are.
function trim(s)
remove trailing and heading space
if(!isset($_REQUEST['p_jrn'])) else $Ledger id