phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r5564 - in phpcompta/tags/rel670: html html/js include


From: phpcompta-dev
Subject: [Phpcompta-dev] r5564 - in phpcompta/tags/rel670: html html/js include
Date: Thu, 5 Dec 2013 07:23:15 +0100 (CET)

Author: danydb
Date: 2013-12-05 07:23:14 +0100 (Thu, 05 Dec 2013)
New Revision: 5564

Modified:
   phpcompta/tags/rel670/html/ajax_misc.php
   phpcompta/tags/rel670/html/js/acc_ledger.js
   phpcompta/tags/rel670/html/style.css
   phpcompta/tags/rel670/include/class_html_input.php
   phpcompta/tags/rel670/include/class_user.php
   phpcompta/tags/rel670/include/compta_ach.inc.php
   phpcompta/tags/rel670/include/compta_fin.inc.php
   phpcompta/tags/rel670/include/compta_ven.inc.php
   phpcompta/tags/rel670/include/operation_ods_new.inc.php
Log:
Task #929 : Ajout d'une description pour les journaux

Description pour les journaux visibles dans lors encodages 
Task #929 - Ajout d'une description pour les journaux

Modified: phpcompta/tags/rel670/html/ajax_misc.php
===================================================================
--- phpcompta/tags/rel670/html/ajax_misc.php    2013-12-05 05:37:23 UTC (rev 
5563)
+++ phpcompta/tags/rel670/html/ajax_misc.php    2013-12-05 06:23:14 UTC (rev 
5564)
@@ -620,6 +620,18 @@
             break;
         case 'ledger_show':
             require_once 'ajax_ledger_show.php';
+        case 'ledger_description':
+            $ajrn=$cn->get_array('select jrn_def_name,jrn_def_description from 
jrn_def where jrn_def_id=$1',array($l));
+            if ( count($ajrn)==1)
+            {
+                
+                echo '<h2 id="jrn_name">'.$ajrn[0]['jrn_def_name'].'</h2>';
+                if ( trim($ajrn[0]['jrn_def_description']) != "") {
+                    echo '<p style="border:1px solid 
blue;margin-top:0">'.$ajrn[0]['jrn_def_description'].'</p>';
+                }
+            }
+            exit();
+            break;
        default:
                var_dump($_GET);
 }

Modified: phpcompta/tags/rel670/html/js/acc_ledger.js
===================================================================
--- phpcompta/tags/rel670/html/js/acc_ledger.js 2013-12-05 05:37:23 UTC (rev 
5563)
+++ phpcompta/tags/rel670/html/js/acc_ledger.js 2013-12-05 06:23:14 UTC (rev 
5564)
@@ -92,7 +92,21 @@
  */
 function update_name()
 {
-       
$('jrn_name').innerHTML=$('p_jrn').options[$('p_jrn').selectedIndex].innerHTML;
+    var jrn_id=$('p_jrn').value;
+    var dossier=g("gDossier").value;
+    var querystring='gDossier='+dossier+'&l='+jrn_id+"&op=ledger_description";
+    var action=new Ajax.Request(
+                   "ajax_misc.php",
+                   {
+                   method:'get',
+                   parameters:querystring,
+                   onFailure:error_get_pj,
+                   onSuccess:function (req){
+                       $('jrn_name_div').innerHTML=req.responseText;
+                   }
+                   }
+               );
+    
 }
 /**
  * @brief update the field predef

Modified: phpcompta/tags/rel670/html/style.css
===================================================================
--- phpcompta/tags/rel670/html/style.css        2013-12-05 05:37:23 UTC (rev 
5563)
+++ phpcompta/tags/rel670/html/style.css        2013-12-05 06:23:14 UTC (rev 
5564)
@@ -1009,7 +1009,6 @@
     color:blue;
     font-size:2.74em;
     margin-right:30%;
-    float: right;
 }
 tr.footer{
     font-size:0.87em;
@@ -1026,8 +1025,8 @@
 {
     float: right;
     margin-right:150;
+    width:50%;
 
-
 }
 #predef_form {
     margin-left:20%;

Modified: phpcompta/tags/rel670/include/class_html_input.php
===================================================================
--- phpcompta/tags/rel670/include/class_html_input.php  2013-12-05 05:37:23 UTC 
(rev 5563)
+++ phpcompta/tags/rel670/include/class_html_input.php  2013-12-05 06:23:14 UTC 
(rev 5564)
@@ -320,7 +320,14 @@
         echo HtmlInput::title_box("Journaux", $div."jrn_search");
         echo '<form method="GET" id="'.$div.'search_frm" onsubmit="return 
hide_ledger_choice(\''.$div.'search_frm\')">';
         echo HtmlInput::hidden('nb_jrn', count($p_array));
-        echo '<ul>';
+        echo _('Filtre ').HtmlInput::filter_table($div.'tb_jrn', '0,1,2', 1);
+        echo '<table class="result" id="'.$div.'tb_jrn">';
+        echo '<tr>';
+        echo th('Nom');
+        echo th('Description');
+        echo th('Type');
+        echo '</tr>';
+        
         for ($e=0;$e<count($p_array);$e++)
         {
             $row=$p_array[$e];
@@ -330,10 +337,15 @@
             {
                 $r->selected=true;
             }
-            echo '<li style="list-style-type: 
none;">'.$r->input().$row['jrn_def_name'].'('.$row['jrn_def_type'].')</li>';
+            $class=($e%2==0)?' class="even" ':' class="odd" ';
+            echo '<tr '.$class.'>';
+            echo '<td >'.$r->input().$row['jrn_def_name'].'</td>';
+            echo '<td >'.$row['jrn_def_description'].'</td>';
+            echo '<td >'.$row['jrn_def_type'].'</td>';
+            echo '</tr>';
 
         }
-        echo '</ul>';
+        echo '</table>';
         echo HtmlInput::hidden('div',$div);
         echo HtmlInput::submit('save','Valider');
         echo '</form>';

Modified: phpcompta/tags/rel670/include/class_user.php
===================================================================
--- phpcompta/tags/rel670/include/class_user.php        2013-12-05 05:37:23 UTC 
(rev 5563)
+++ phpcompta/tags/rel670/include/class_user.php        2013-12-05 06:23:14 UTC 
(rev 5564)
@@ -302,7 +302,7 @@
 
                        $sql = "select jrn_def_id,jrn_def_type,
                  
jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv,
-                 jrn_deb_max_line,jrn_cred_max_line
+                 jrn_deb_max_line,jrn_cred_max_line,jrn_def_description
                  from jrn_def join jrn_type on jrn_def_type=jrn_type_id
                  join user_sec_jrn on uj_jrn_id=jrn_def_id
                  where
@@ -314,7 +314,7 @@
                {
                        $sql_type = ($p_type == 'ALL') ? '' : "where 
jrn_def_type=upper('" . sql_string($p_type) . "')";
                        $sql = "select 
jrn_def_id,jrn_def_type,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_deb_max_line,jrn_cred_max_line,
-                 jrn_type_id,jrn_desc,'W' as uj_priv
+                 jrn_type_id,jrn_desc,'W' as uj_priv,jrn_def_description
                  from jrn_def join jrn_type on jrn_def_type=jrn_type_id
                  $sql_type
                  order by jrn_Def_name";

Modified: phpcompta/tags/rel670/include/compta_ach.inc.php
===================================================================
--- phpcompta/tags/rel670/include/compta_ach.inc.php    2013-12-05 05:37:23 UTC 
(rev 5563)
+++ phpcompta/tags/rel670/include/compta_ach.inc.php    2013-12-05 06:23:14 UTC 
(rev 5564)
@@ -227,7 +227,7 @@
 
 if (!isset($_POST['e_date']) && $g_parameter->MY_DATE_SUGGEST=='Y')
        echo create_script(" get_last_date()");
-
+echo create_script(" update_name()");
 echo '</div>';
 
 

Modified: phpcompta/tags/rel670/include/compta_fin.inc.php
===================================================================
--- phpcompta/tags/rel670/include/compta_fin.inc.php    2013-12-05 05:37:23 UTC 
(rev 5563)
+++ phpcompta/tags/rel670/include/compta_fin.inc.php    2013-12-05 06:23:14 UTC 
(rev 5564)
@@ -150,5 +150,5 @@
 }else {
        echo create_script(" ajax_saldo('first_sold');");
 }
-
+echo create_script(" update_name()");
 exit();
\ No newline at end of file

Modified: phpcompta/tags/rel670/include/compta_ven.inc.php
===================================================================
--- phpcompta/tags/rel670/include/compta_ven.inc.php    2013-12-05 05:37:23 UTC 
(rev 5563)
+++ phpcompta/tags/rel670/include/compta_ven.inc.php    2013-12-05 06:23:14 UTC 
(rev 5564)
@@ -236,6 +236,6 @@
        {
                echo create_script(" get_last_date()");
        }
-       
+echo create_script(" update_name()");  
 exit();
 ?>

Modified: phpcompta/tags/rel670/include/operation_ods_new.inc.php
===================================================================
--- phpcompta/tags/rel670/include/operation_ods_new.inc.php     2013-12-05 
05:37:23 UTC (rev 5563)
+++ phpcompta/tags/rel670/include/operation_ods_new.inc.php     2013-12-05 
06:23:14 UTC (rev 5564)
@@ -107,6 +107,7 @@
 echo '</form>';
 
 echo "<script>checkTotalDirect();</script>";
+echo create_script(" update_name()");
 
 if ($g_parameter->MY_DATE_SUGGEST=='Y')
 {



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

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