phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r5103 - phpcompta/tags/rel650/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r5103 - phpcompta/tags/rel650/include
Date: Sat, 15 Sep 2012 17:39:56 +0200 (CEST)

Author: danydb
Date: 2012-09-15 17:39:55 +0200 (Sat, 15 Sep 2012)
New Revision: 5103

Modified:
   phpcompta/tags/rel650/include/ajax_add_menu.php
Log:
Improve add menu printing

Modified: phpcompta/tags/rel650/include/ajax_add_menu.php
===================================================================
--- phpcompta/tags/rel650/include/ajax_add_menu.php     2012-09-15 13:22:08 UTC 
(rev 5102)
+++ phpcompta/tags/rel650/include/ajax_add_menu.php     2012-09-15 15:39:55 UTC 
(rev 5103)
@@ -25,6 +25,9 @@
  * @file
  * @brief show the form to add a menu
  */
+$type=$_GET['type'];
+if ( $type=='me')
+{
 $ame_code_dep=$cn->make_array("
        select me_code,me_code||' '||me_menu||' '||coalesce(me_description,'') 
from
        menu_ref
@@ -51,6 +54,7 @@
        menu_ref
        order by 1
        ");
+
 $p_order=new INum("p_order","10");
 $atype=$cn->make_array("select pm_type,pm_desc from profile_menu_type order by 
1");
 
@@ -76,7 +80,7 @@
        <td><?=$me_code->input()?></td>
 </tr>
 <tr>
-       <td>Dépendant de </td>
+       <td>Dépendant de <?=HtmlInput::infobulle(20)?></td>
        <td><?=$me_code_dep->input()?></td>
 </tr>
 
@@ -96,4 +100,47 @@
 <?
 echo HtmlInput::submit('add_menu',"Valider");
 echo '</form>';
+}
+if ($type=='pr')
+{
+
+$ame_code=$cn->make_array("
+select me_code,me_code||' '||coalesce(me_menu,'')||' 
'||coalesce(me_description,'')
+       from
+       menu_ref
+       where me_type='PR'
+       and me_code not in (select me_code from profile_menu where 
p_id=".sql_string($p_id).")
+       order by 1
+       ");
+
+$me_code=new ISelect('me_code');
+$me_code->value=$ame_code;
+
+       echo HtmlInput::title_box("Nouveau menu", $ctl);
+       if (count($ame_code)==0)
+       {
+               echo h2("Aucune impression disponible à 
ajouter",'class="notice"');
+               return;
+       }
 ?>
+<form method="POST" onsubmit="return confirm('Vous confirmez ?')">
+       <?
+       echo HtmlInput::hidden('tab','profile_print_div');
+       ?>
+       <?=HtmlInput::hidden('p_id',$p_id)?>
+       <?=HtmlInput::hidden('p_order',10)?>
+       <?=HtmlInput::hidden('me_code_dep','')?>
+       <?=HtmlInput::hidden('p_type','PR')?>
+<table>
+<tr>
+       <td>Code</td>
+       <td><?=$me_code->input()?></td>
+</tr>
+
+</table>
+<?
+echo HtmlInput::submit('add_impress',"Valider");
+echo '</form>';
+}
+
+?>



---
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]