update header

This commit is contained in:
sparkyx 2008-02-11 20:06:07 +00:00
parent aefc4b1eb8
commit 59a3f64d5a
8 changed files with 64 additions and 13 deletions

View file

@ -77,7 +77,7 @@ BODY {
</head>
<BODY onLoad="SetFocus(\'login\',0)">
<span style="background-color:#879ed4;color:white;padding-left:4px;padding-right:4px;">
version 3.1.0
version 4.0
</span>
<BR>
<BR>

View file

@ -98,7 +98,7 @@ div.u_tmenu {
}
div.u_subtmenu {
background-color:lightblue ;
background-color:white ;
float:left;
clear:both;
left:10px;

View file

@ -113,7 +113,7 @@ div.u_tool div.acces_direct{
div.u_subtmenu {
float:left;
clear:both;
background-color:#C0E6E9;
background-color:#879ED4;
}
div.u_subt2menu {
left:1%;

View file

@ -31,6 +31,8 @@ require_once ('jrn.php');
require_once ('class_acexception.php');
require_once ('class_acc_reconciliation.php');
require_once ('class_periode.php');
require_once ('class_gestion_purchase.php');
/*!\file
* \brief Class for jrn, class acc_ledger for manipulating the ledger
*/
@ -403,7 +405,9 @@ class Acc_Ledger {
{
$array[$i]=pg_fetch_array($Res);
$p=$this->get_detail($array[$i],$type,$trunc,$a_TVA,$a_ParmCode);
if ( $array[$i]['dep_priv'] != 0.0) {
$array[$i]['comment'].="(priv. ".$array[$i]['dep_priv'].")";
}
}
}
@ -444,6 +448,7 @@ class Acc_Ledger {
*/
function get_detail(&$p_array,$p_jrn_type,$trunc=0,$a_TVA=null,$a_ParmCode=null)
{
echo_debug(__FILE__.':'.__LINE__.'- get_detail','$p_array',$p_array);
if ( $a_TVA == null )
{
//Load TVA array
@ -460,9 +465,11 @@ class Acc_Ledger {
$p_array['TVAC']=0;
$p_array['TVA']=array();
$p_array['AMOUNT_TVA']=0.0;
$p_array['dep_priv']=0;
$dep_priv=0.0;
//
// Retrieve data from jrnx
$sql="select j_poste,j_montant, j_debit,j_qcode from jrnx where ".
$sql="select j_id,j_poste,j_montant, j_debit,j_qcode from jrnx where ".
" j_grpt=".$p_array['grpt_id'];
$Res2=ExecSql($this->db,$sql);
$data_jrnx=pg_fetch_all($Res2);
@ -565,9 +572,18 @@ class Acc_Ledger {
// isDNA
// If operation is reversed then amount are negatif
/* if ND */
if ( $p_array['jrn_def_type'] == 'ACH') {
$purchase=new Gestion_Purchase($this->db);
$purchase->search_by_jid($code['j_id']);
$purchase->load();
$dep_priv+=$purchase->qp_dep_priv;
echo_debug(__FILE__.':'.__LINE__.'- get_detail','$dep_priv',$dep_priv);
$p_array['dep_priv']=$dep_priv;
}
}
$p_array['TVAC']=sprintf('% 10.2f',$p_array['TVAC']);
$p_array['TVAC']=sprintf('% 10.2f',$p_array['TVAC']-$dep_priv);
$p_array['HTVA']=sprintf('% 10.2f',$p_array['TVAC']-$p_array['AMOUNT_TVA']);
$r="";
$a_tva_amount=array();

View file

@ -84,4 +84,39 @@ class gestion_purchase extends gestion_table
}
return $array;
}
function search_by_jid($p_jid) {
$res=ExecSql($this->db,"select qp_id from quant_purchase where j_id=".$p_jid);
if ( pg_NumRows($res) == 1)
$this->qp_id=pg_fetch_result($res,0,0);
else
$this->qp_id=0;
}
function load() {
$sql="select qp_id,
qp_internal,
qp_fiche,
qp_quantite,
qp_price,
qp_vat,
qp_vat_code,
qp_nd_amount,
qp_nd_tva,
qp_nd_tva_recup,
qp_supplier,
j_id,
qp_dep_priv
from quant_purchase
where qp_id=".$this->qp_id;
$ret=ExecSql($this->db,$sql);
// $res contains all the line
$res=pg_fetch_all($ret);
if ( empty($res) ) return null;
foreach ($res[0] as $idx=>$value)
$this->$idx=$value;
echo_debug(__FILE__.':'.__LINE__.'- gestion_purchase', 'load',$this);
}
}

View file

@ -36,7 +36,7 @@ define ("domaine","");
define ("MAX_COMPTE",4);
define ('MAX_BUD_DETAIL',20);
define ("DEBUG","false");
define ("DEBUG","true");
// securite correspond a la table
// action

View file

@ -41,7 +41,7 @@ $p_array=array(array ("?p_action=impress&type=jrn&".$str_dossier,"Journaux"),
$default=( isset ($_GET['type']))?"?p_action=impress&type=".$_GET['type']."&$str_dossier":"";
$result=ShowItem($p_array,'H',"mtitle","mtitle",$default);
$result=ShowItem($p_array,'H',"mtitle","mtitle",$default,' width="100%"');
echo $result;
echo "</DIV>";

View file

@ -193,7 +193,7 @@ function ShowMenuCompta($p_high="")
$str_dossier=dossier::get();
$r="";
$r.=menu_tool("compta");
$r.='<div style="float:left">';
$r.='<div style="float:left;background-color:#879ED4;">';
$r.=$result;
$r.='</div>';
// $r.='</div>';
@ -826,7 +826,7 @@ $r.='<script language="javascript">
$r.= "<H2 class=\"info\">Commercial ".dossier::name()."</h2> ";
$r.= '</div>';
$r.= '<div class="acces_direct">';
if ( $from == 'compta') $view='E';
if ( $p_from == 'compta') $view='E';
else $view='S';
$agent=$_SERVER['HTTP_USER_AGENT'];
@ -842,7 +842,7 @@ $r.='<script language="javascript">
);
if ( $_SESSION['g_topmenu'] == 'SELECT' ) {
$gDossier=dossier::id();
$r.= '<form method="GET" action="control.php">';
$r.= '<form method="GET" action="control.php" >';
$w=new widget('select');
$w->name='m';
$w->value=$amodule;
@ -851,9 +851,9 @@ $r.='<script language="javascript">
$search="openRecherche('".$_REQUEST['PHPSESSID']."','".$gDossier."','".$view."');";
$r.='<input type="BUTTON" onClick="'.$search.'" value="Recherche">';
$r.='</td>';
$r.= '<td>'.$w->IOValue().'</td>';
$r.= '<td style="border:2px solid blue;border-style:groove;">'.$w->IOValue();
$r.= dossier::hidden();
$r.= '<td>'.widget::submit('','Acces Direct').'</td>';
$r.=widget::submit('','Acces Direct').'</td>';
$r.= '</table>';
$r.= '</form>';
$r.= '</div>';