module budget : detail is finished

This commit is contained in:
sparkyx 2007-12-23 19:40:46 +00:00
parent 0e3761de05
commit 41cc846ade
4 changed files with 23 additions and 4 deletions

View file

@ -49,6 +49,13 @@ echo '<div class="u_tmenu">';
echo '<div style="float:left">';
echo "<H2 class=\"info\">Budget : ".dossier::name()."<h2> ";
echo '</div>';
echo '<div style="float:none;text-align:right;" title="Recherche">
<A HREF="user_compta.php?'.$str_dossier.'" title="Comptabilit&eacute;"><IMG SRC="image/compta.png" width="36" border="0" ></A>
<A HREF="parametre.php?'.$str_dossier.'" title="Param&egrave;tre"><IMG SRC="image/param.png" width="36" border="0" ></A>
<A HREF="login.php" title="Accueil"><IMG src="image/home.png" width="36" title="Accueil" border="0" ></A>
<A HREF="logout.php" title="Sortie"><IMG src="image/logout.png" title="Logout" width="36" border="0"></A>
</div>';
echo '<div style="clear:both">';
@ -66,6 +73,9 @@ switch($p_action) {
case 'detail':
$def=3;
break;
case 'synthese':
$def=4;
break;
}

View file

@ -107,9 +107,14 @@ echo $button_other;
echo '<hr>';
$hidden=dossier::hidden().widget::hidden('bh_id',$_REQUEST['bh_id']).
widget::hidden('po_id',$po_id).widget::hidden('p_action','detail');
//----------------------------------------------------------------------
// Show 20 lines by default
//----------------------------------------------------------------------
require_once ('class_bud_data.php');
echo JS_PROTOTYPE_JS;
echo JS_BUD_SCRIPT;
extract($_GET);
$obj=new Bud_Data($cn,$bh_id,$po_id);
$r=$obj->load();
echo $obj->form();

View file

@ -55,6 +55,10 @@ class Bud_Data {
}
function load() {
if ( $this->po_id == -1)
$sql_po_id="po_id is null";
else
$sql_po_id=".$this->po_id";
$sql=" select bd_id,bc_id,bc_code,bd.bh_id,bd.bh_name,".
" tmp_pcmn.pcm_val as pcm_val,pcm_lib ".
" from bud_detail ".
@ -62,7 +66,7 @@ class Bud_Data {
" join bud_card using (bc_id) ".
" join tmp_pcmn using (pcm_val) ".
" where bd.bh_id=".$this->bh_id.
" and po_id=".$this->po_id;
" and $sql_po_id ;";
echo_debug(__FILE__.':'.__LINE__.'- load',' SQL ',$sql);
$res1=ExecSql($this->cn,$sql);

View file

@ -34,7 +34,7 @@ define ("phpcompta_user","phpcompta");
// the domain can't start by a number !!!
define ("domaine","");
define ("MAX_COMPTE",4);
define ('MAX_BUD_DETAIL',3);
define ('MAX_BUD_DETAIL',20);
define ("DEBUG","true");