';
echo '';
echo '
';
echo '
';
//-----------------------------------------------------
// If print is asked
// First time in html
// after in pdf or cvs
//-----------------------------------------------------
if ( isset( $_REQUEST['bt_html'] ) )
{
if ( isDate($_REQUEST['from_periode'])==null || isDate($_REQUEST['to_periode'])==null)
{
echo alert('Date malformée, désolée');
exit();
}
require_once("class_acc_account_ledger.php");
$go=0;
// we ask a poste_id
if ( isset($_GET['poste_id']) && strlen(trim($_GET['poste_id'])) != 0 && isNumber($_GET['poste_id']) )
{
if ( isset ($_GET['poste_fille']) )
{
$parent=$_GET['poste_id'];
$a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like '$parent%' order by pcm_val::text");
$go=3;
}
// Check if the post is numeric and exists
elseif ( $cn->count_sql('select * from tmp_pcmn where pcm_val=$1',array($_GET['poste_id'])) != 0 )
{
$Poste=new Acc_Account_Ledger($cn,$_GET['poste_id']);
$go=1;
}
}
if ( strlen(trim($_GET['f_id'])) != 0 )
{
require_once("class_fiche.php");
// thanks the qcode we found the poste account
$fiche=new Fiche($cn);
$qcode=$fiche->get_by_qcode($_GET['f_id']);
$p=$fiche->strAttribut(ATTR_DEF_ACCOUNT);
if ( $p != NOTFOUND)
{
$go=2;
}
}
// A account is given
if ( $go == 1)
{
echo '