diff --git a/html/js/scripts.js b/html/js/scripts.js index af9f5ac66..ae36f0445 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -1227,9 +1227,7 @@ function mod_predf_op(dossier_id, od_id) { var target = "mod_predf_op"; removeDiv(target); - var sx = '20%'; - var sy = '10%'; - var str_style = "top:" + sx + ";left:" + sy + ";"; + var str_style = "top:10%;left:2%;width:96%"; var div = {id: target, cssclass: 'inner_box', style: str_style, html: loading(), drag: 1}; diff --git a/include/class/pre_op_ach.class.php b/include/class/pre_op_ach.class.php index 00fbad9b0..fb9640e77 100644 --- a/include/class/pre_op_ach.class.php +++ b/include/class/pre_op_ach.class.php @@ -40,18 +40,19 @@ class Pre_op_ach extends Pre_operation_detail function get_post() { parent::get_post(); + $http=new HttpInput(); $this->operation->od_direct='f'; - $this->e_client=$_POST['e_client']; + $this->e_client=$http->post('e_client'); for ($i=0;$i<$this->operation->nb_item;$i++) { $march="e_march".$i; - $this->$march=$_POST['e_march'.$i]; - $this->{"e_march".$i."_price"}=(isset ($_POST['e_march'.$i."_price"]))?$_POST['e_march'.$i."_price"]:0; - $this->{"e_march".$i."_price"}=(trim($_POST['e_march'.$i."_price"])=="")?0:$_POST['e_march'.$i."_price"]; - $this->{"e_march".$i."_tva_id"}=(isset ($_POST['e_march'.$i."_tva_id"]))?$_POST['e_march'.$i."_tva_id"]:0; - $this->{"e_march".$i."_tva_amount"}=(isset($_POST['e_march'.$i."_tva_amount"]))?$_POST['e_march'.$i."_tva_amount"]:0; - $this->{"e_march".$i."_label"}=(isset($_POST['e_march'.$i."_label"]))?$_POST['e_march'.$i."_label"]:null; - $this->{"e_quant".$i}=$_POST['e_quant'.$i]; + $this->$march=$http->post('e_march'.$i); + $this->{"e_march".$i."_price"}=$http->post('e_march'.$i."_price","string",0); + $this->{"e_march".$i."_price"}=$http->post('e_march'.$i."_price","string",0); + $this->{"e_march".$i."_tva_id"}=$http->post('e_march'.$i."_tva_id","string",0); + $this->{"e_march".$i."_tva_amount"}=$http->post('e_march'.$i."_tva_amount","string",0); + $this->{"e_march".$i."_label"}=$http->post('e_march'.$i."_label","string",NULL); + $this->{"e_quant".$i}=$http->post('e_quant'.$i); } } @@ -403,7 +404,7 @@ class Pre_op_ach extends Pre_operation_detail // Set correctly the REQUEST param for jrn_type $r.= HtmlInput::hidden('jrn_type','ACH'); - $r.= HtmlInput::button('add_item',_('Ajout article'), ' onClick="ledger_add_row()"'); + $r.= Html_Input_Noalyss::ledger_add_item("O"); return $r; } diff --git a/include/class/pre_operation.class.php b/include/class/pre_operation.class.php index 885e7a1fd..8243b58bb 100644 --- a/include/class/pre_operation.class.php +++ b/include/class/pre_operation.class.php @@ -71,14 +71,14 @@ class Pre_operation /*!\brief fill the object with the $_POST variable */ function get_post() { - $this->nb_item=$_POST['nb_item']; - $this->p_jrn=$_REQUEST['p_jrn']; - $this->jrn_type=$_POST['jrn_type']; - - $this->name=$_POST['opd_name']; + $http=new HttpInput(); + $this->nb_item=$http->post('nb_item',"number"); + $this->p_jrn=$http->request('p_jrn',"number"); + $this->jrn_type=$http->post('jrn_type'); + $this->name=$http->post('opd_name'); - $this->name=(trim($this->name)=='')?$_POST['e_comm']:$this->name; - $this->description= $_POST['od_description']; + $this->name=(trim($this->name)=='')?$http->post('e_comm'):$this->name; + $this->description= $http->post('od_description'); if ( $this->name=="") { $n=$this->db->get_next_seq('op_def_op_seq'); @@ -106,7 +106,7 @@ class Pre_operation } if ( $this->count() > MAX_PREDEFINED_OPERATION ) { - echo ''.("Vous avez atteint le max. d'opération prédéfinie, désolé").''; + echo ''.("Vous avez atteint le max. d'opération prédéfinie, désolé").''; return false; } $sql='insert into op_predef (jrn_def_id,od_name,od_item,od_jrn_type,od_direct,od_description)'. diff --git a/include/template/predf_ledger_detail.php b/include/template/predf_ledger_detail.php index 972353466..a3cdd8f8a 100644 --- a/include/template/predf_ledger_detail.php +++ b/include/template/predf_ledger_detail.php @@ -36,7 +36,7 @@ echo '