noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 20/46: Cosmetic : Opération prédéfinie, modèl


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 20/46: Cosmetic : Opération prédéfinie, modèle
Date: Mon, 4 May 2020 13:38:47 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 53a36e7ab65982a28fec7df02f20914fb14fe55f
Author: Dany De Bontridder <address@hidden>
AuthorDate: Mon Mar 2 20:39:34 2020 +0100

    Cosmetic : Opération prédéfinie, modèle
---
 html/js/scripts.js                       |  4 +---
 include/class/pre_op_ach.class.php       | 19 ++++++++++---------
 include/class/pre_operation.class.php    | 16 ++++++++--------
 include/template/predf_ledger_detail.php |  2 +-
 4 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/html/js/scripts.js b/html/js/scripts.js
index af9f5ac..ae36f04 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 00fbad9..fb9640e 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 885e7a1..8243b58 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 '<span class="notice">'.("Vous avez atteint le max. 
d'op&eacute;ration pr&eacute;d&eacute;finie, d&eacute;sol&eacute;").'</span>';
+            echo '<span class="notice">'.("Vous avez atteint le max. 
d'opération prédéfinie, désolé").'</span>';
             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 9723534..a3cdd8f 100644
--- a/include/template/predf_ledger_detail.php
+++ b/include/template/predf_ledger_detail.php
@@ -36,7 +36,7 @@ echo '<tr>';
 echo $item['quick_code'];
 echo '<td>'.$item['bt'].'</td>';
 ?>
-<td style="border-bottom: 1px dotted grey; width: 75%;"><?php echo 
$item['denom'] ?></td>
+<td style="border-bottom: 1px dotted grey;"><?php echo $item['denom'] ?></td>
 <?php 
 echo td($item['pu']);
 echo td($item['quantity' ]);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]