Fix bug with misc ledger

This commit is contained in:
sparkyx 2007-05-29 19:56:10 +00:00
parent b0fa56ee27
commit 4eebad93e6
3 changed files with 7 additions and 6 deletions

View file

@ -53,15 +53,16 @@ if ( $action == 'new' ) {
$submit='<INPUT TYPE="SUBMIT" NAME="add_item" VALUE="Ajout poste">
<INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Confirmer">';
// add a one-line calculator
$prop=GetJrnProp($_SESSION['g_dossier'],$_GET['p_jrn']);
$line=$prop['jrn_deb_max_line'];
$r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,null,false,$line);
$r=FormODS($cn,$_GET['p_jrn'],$User->GetPeriode(),$submit,null,false);
echo '<div class="u_redcontent">';
echo '<div class="u_redcontent">';
echo $r;
echo "<div><h4>On-line calculator</h4>".JS_CALC_LINE."<div>";
echo "</div>";
}
// Add an item

View file

@ -209,7 +209,7 @@ function ComputeVat($p_cn, $p_fiche,$p_quant,$p_price,$p_vat )
$a=$a_vat['tva_id'];
$vat_amount=$p_price*$a_vat['tva_rate']*$p_quant;
}
echo_debug('user_common',__LINE__,'return '.round($vat_amount,2));
echo_debug('user_common',__LINE__,'return tva'.round($vat_amount,2));
return round($vat_amount,2);

View file

@ -143,7 +143,7 @@ function FormODS($p_cn,$p_jrn,$p_periode,$p_submit,$p_array=null,$pview_only=tru
}
// code
// Do we need a filter ?
$l_line=GetJrnProp($p_cn,$p_jrn);
$l_line=GetJrnProp($_SESSION['g_dossier'],$p_jrn);
if( strlen(trim ($l_line['jrn_def_class_cred']) ) > 0 or
strlen(trim ($l_line['jrn_def_class_deb']) ) > 0 ) {
$filter=1;