noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 155/219: Task #1493 Encodage VEN , ACH, Ord


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 155/219: Task #1493 Encodage VEN , ACH, Ordre des opérations Déplacement du bouton modèle d'opérations
Date: Mon, 18 Dec 2017 13:22:55 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 7280f7982de24696704d8ea37a0db42dc3f05144
Author: Dany De Bontridder <address@hidden>
Date:   Sun Nov 19 18:28:57 2017 +0100

    Task #1493  Encodage VEN , ACH, Ordre des opérations
    Déplacement du bouton modèle d'opérations
---
 html/style-classic.css                      |  8 --------
 html/style-light.css                        |  8 --------
 html/style-mobile.css                       |  8 --------
 html/style-r692.css                         |  8 +++++---
 include/class/acc_ledger.class.php          | 23 +++++++++++++++++++++--
 include/class/acc_ledger_purchase.class.php | 17 ++++++++++++++++-
 include/class/acc_ledger_sold.class.php     | 17 ++++++++++++++++-
 include/compta_ach.inc.php                  | 10 +---------
 include/compta_ven.inc.php                  |  4 ++--
 include/operation_ods_new.inc.php           | 14 +++-----------
 include/template/form_ledger_detail.php     |  6 ++++++
 scenario/ajax_acc_plan_mtable.php           |  1 -
 12 files changed, 70 insertions(+), 54 deletions(-)

diff --git a/html/style-classic.css b/html/style-classic.css
index e591e65..baf4a2c 100644
--- a/html/style-classic.css
+++ b/html/style-classic.css
@@ -1159,10 +1159,6 @@ span.remain {
 
     }
     #predef_form {
-        margin-left:35%;
-        width:60%;
-        position:absolute;
-        z-index:2
     }
 @media only screen and (min-width: 1155px) {
     div#jrn_name_div
@@ -1171,10 +1167,6 @@ span.remain {
 
     }
     #predef_form {
-        margin-left:35%;
-        width:60%;
-        position:absolute;
-        z-index:2
     }
 }
 @media only screen and (max-width: 1155px) {
diff --git a/html/style-light.css b/html/style-light.css
index da4954d..44cf303 100644
--- a/html/style-light.css
+++ b/html/style-light.css
@@ -1151,10 +1151,6 @@ span.remain {
 
     }
     #predef_form {
-        margin-left:35%;
-        width:60%;
-        position:absolute;
-        z-index:2
     }
 @media only screen and (min-width: 955px) {
     div#jrn_name_div
@@ -1165,10 +1161,6 @@ span.remain {
 
     }
     #predef_form {
-        margin-left:35%;
-        width:60%;
-        position:absolute;
-        z-index:2
     }
 }
 @media only screen and (max-width: 955px) {
diff --git a/html/style-mobile.css b/html/style-mobile.css
index a3fba80..d1d9e02 100644
--- a/html/style-mobile.css
+++ b/html/style-mobile.css
@@ -1184,10 +1184,6 @@ div#jrn_name_div {
   margin-right: 150px;
 }
 #predef_form {
-  margin-left: 20%;
-  width: 60%;
-  position: absolute;
-  z-index: 2;
 }
 @media only screen and (min-width: 955px) {
   div#jrn_name_div {
@@ -1195,10 +1191,6 @@ div#jrn_name_div {
     margin-right: 150px;
   }
   #predef_form {
-    margin-left: 20%;
-    width: 60%;
-    position: absolute;
-    z-index: 2;
   }
 }
 @media only screen and (max-width: 955px) {
diff --git a/html/style-r692.css b/html/style-r692.css
index 98a914e..91d8ccc 100644
--- a/html/style-r692.css
+++ b/html/style-r692.css
@@ -972,10 +972,11 @@ span.remain {
 
     }
     #predef_form {
-        margin-left:35%;
+      /*  margin-left:35%;
         width:60%;
         position:absolute;
         z-index:2
+      */
     }
 @media only screen and (min-width: 1155px) {
     div#jrn_name_div
@@ -984,10 +985,11 @@ span.remain {
 
     }
     #predef_form {
-        margin-left:35%;
+        /*margin-left:35%;
         width:60%;
         position:absolute;
         z-index:2
+        */
     }
 }
 @media only screen and (max-width: 1155px) {
@@ -1003,7 +1005,7 @@ span.remain {
 }
 @media only screen and (max-width: 900px) {
     #predef_form {
-        display: none;
+        /* display: none;*/
     }
 }
 #direct
diff --git a/include/class/acc_ledger.class.php 
b/include/class/acc_ledger.class.php
index 55db550..8e50a87 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -1620,8 +1620,27 @@ class Acc_Ledger extends jrn_def_sql
 
         $ret.="<table>";
                $ret.=tr(td($label ).td( $wLedger->input()));
-
-
+                
+                // 
+                // Button for template operation
+                //
+                ob_start();
+                echo '<div id="predef_form">';
+                echo HtmlInput::hidden('p_jrn_predef', $this->id);
+                $op = new Pre_op_ods($this->db);
+                $op->set('ledger', $this->id);
+                $op->set('ledger_type', "ODS");
+                $op->set('direct', 't');
+                
$url=http_build_query(array('action'=>'use_opd','p_jrn_predef'=>$this->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id()));
+                echo $op->form_get('do.php?'.$url);
+
+                echo '</div>';
+                $str_op_template=ob_get_contents();
+                ob_end_clean();
+                $ret.="<tr>";
+                $ret.="<td>"._("Modèle d'opération")."</td>";
+                $ret.="<td>".$str_op_template."</td>";
+                $ret.="</tr>";
                // Load the javascript
                //
                //$ret.= '<tr ><td colspan="2" style="width:auto">';
diff --git a/include/class/acc_ledger_purchase.class.php 
b/include/class/acc_ledger_purchase.class.php
index 88dc863..3d9c11d 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -1281,7 +1281,22 @@ class  Acc_Ledger_Purchase extends Acc_Ledger
 
         }
         $f_type=_('Fournisseur');
-
+        // 
+        // Button for template operation
+        //
+        ob_start();
+        echo '<div id="predef_form">';
+        echo HtmlInput::hidden('p_jrn_predef', $this->id);
+        $op = new Pre_op_ach($this->db);
+        $op->set('ledger', $this->id);
+        $op->set('ledger_type', "ACH");
+        $op->set('direct', 'f');
+        
$url=http_build_query(array('p_jrn_predef'=>$this->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id()));
+        echo $op->form_get('do.php?'.$url);
+        echo '</div>';
+        $str_op_template=ob_get_contents();
+        ob_end_clean();
+        
         ob_start();
         require_once NOALYSS_TEMPLATE.'/form_ledger_detail.php';
         $r.=ob_get_contents();
diff --git a/include/class/acc_ledger_sold.class.php 
b/include/class/acc_ledger_sold.class.php
index df377c5..32ce417 100644
--- a/include/class/acc_ledger_sold.class.php
+++ b/include/class/acc_ledger_sold.class.php
@@ -1311,7 +1311,22 @@ EOF;
             $array[$i]['quantity'] = $Quantity->input("e_quant" . $i, $quant);
         }// foreach article
         $f_type = _('Client');
-
+        // 
+        // Button for template operation
+        //
+        ob_start();
+        echo '<div id="predef_form">';
+        echo HtmlInput::hidden('p_jrn_predef', $this->id);
+        $op=new Pre_op_ven($this->db);
+        $op->set('ledger', $this->id);
+        $op->set('ledger_type', "VEN");
+        $op->set('direct', 'f');
+        $url=http_build_query(array('p_jrn_predef'=>$this->id, 
'ac'=>$_REQUEST['ac'],
+            'gDossier'=>dossier::id()));
+        echo $op->form_get('do.php?'.$url);
+        echo '</div>';
+        $str_op_template=ob_get_contents();
+        ob_end_clean();
 
         ob_start();
         require_once NOALYSS_TEMPLATE.'/form_ledger_detail.php';
diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php
index f572e61..ef6f46f 100644
--- a/include/compta_ach.inc.php
+++ b/include/compta_ach.inc.php
@@ -242,15 +242,7 @@ if (isset ($_REQUEST['p_jrn_predef'])){
 }
 // pre defined operation
 //
-echo '<div id="predef_form">';
-echo HtmlInput::hidden('p_jrn_predef', $Ledger->id);
-$op = new Pre_op_ach($cn);
-$op->set('ledger', $Ledger->id);
-$op->set('ledger_type', "ACH");
-$op->set('direct', 'f');
-$url=http_build_query(array('p_jrn_predef'=>$Ledger->id,'ac'=>$ac,'gDossier'=>dossier::id()));
-echo $op->form_get('do.php?'.$url);
-echo '</div>';
+
 echo '</div>';
 
 echo '<div class="content">';
diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php
index b6ee2bc..eb6872f 100644
--- a/include/compta_ven.inc.php
+++ b/include/compta_ven.inc.php
@@ -256,7 +256,7 @@ if (isset($_REQUEST['p_jrn_predef']))
     $Ledger->id=$_REQUEST['p_jrn_predef'];
 }
 
-echo '<div id="predef_form">';
+/* echo '<div id="predef_form">';
 echo HtmlInput::hidden('p_jrn_predef', $Ledger->id);
 $op=new Pre_op_ven($cn);
 $op->set('ledger',$Ledger->id);
@@ -265,7 +265,7 @@ $op->set('direct','f');
 
$url=http_build_query(array('p_jrn_predef'=>$Ledger->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id()));
 echo $op->form_get('do.php?'.$url);
 echo '</div>';
-
+*/
 echo '<div class="content">';
 echo '<p class="notice">'.$p_msg.'</p>';
 try
diff --git a/include/operation_ods_new.inc.php 
b/include/operation_ods_new.inc.php
index a305945..abded40 100644
--- a/include/operation_ods_new.inc.php
+++ b/include/operation_ods_new.inc.php
@@ -40,20 +40,12 @@ $ledger->id = ($ledger->id == -1) ? 
$first_ledger['jrn_def_id'] : $id_ledger;
 // check if we can write in the ledger
 if ( $g_user->check_jrn($ledger->id)=='X')
 {
-       alert(_("Vous ne pouvez pas écrire dans ce journal, contacter votre 
administrateur"));
+       alert(_("Vous ne pouvez pas écrire dans ce journal, contactez votre 
administrateur"));
        return;
-}
+}              
 echo '<div class="content">';
-echo '<div id="predef_form">';
-echo HtmlInput::hidden('p_jrn_predef', $ledger->id);
-$op = new Pre_op_ods($cn);
-$op->set('ledger', $ledger->id);
-$op->set('ledger_type', "ODS");
-$op->set('direct', 't');
-$url=http_build_query(array('action'=>'use_opd','p_jrn_predef'=>$ledger->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id()));
-echo $op->form_get('do.php?'.$url);
 
-echo '</div>';
+
 echo '<div id="jrn_name_div">';
 echo '<h2 id="jrn_name" style="display:inline">' . $ledger->get_name() . 
'</h2>';
 echo '</div>';
diff --git a/include/template/form_ledger_detail.php 
b/include/template/form_ledger_detail.php
index 8629700..4fa25b3 100644
--- a/include/template/form_ledger_detail.php
+++ b/include/template/form_ledger_detail.php
@@ -12,6 +12,12 @@
         </td>
     </tr>
     <tr>
+        <td> <?php echo _('Modèle opération') ?></td>
+        <td>
+            <?php echo $str_op_template;?>
+        </td>
+    </tr>
+    <tr>
         <td>
             <?php echo _('Date')?> 
         </td>
diff --git a/scenario/ajax_acc_plan_mtable.php 
b/scenario/ajax_acc_plan_mtable.php
index 03413f2..935bde2 100644
--- a/scenario/ajax_acc_plan_mtable.php
+++ b/scenario/ajax_acc_plan_mtable.php
@@ -36,7 +36,6 @@ $action=$http->request('action');
 $p_id=$http->request('p_id', "number");
 $ctl_id=$http->request('ctl');
 } catch(Exception $e) {
-   
     echo $e->getMessage();
 }
 require_once NOALYSS_INCLUDE."/lib/manage_table_sql.class.php";



reply via email to

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