25if ( ! defined (
'ALLOWED') ) die(
'Appel direct ne sont pas permis');
26include_once(
'class/acc_account_ledger.class.php');
27include_once(
'lib/ac_common.php');
28include_once(
'lib/impress.class.php');
50$pdf->setTitle(
"Grand Livre",
true);
51$pdf->SetAuthor(
'NOALYSS');
60$header = array( _(
"Date"), _(
"Référence"), _(
"Libellé"), _(
"Pièce"),_(
"Let"), _(
"Débit"), _(
"Crédit"), _(
"Solde") );
62$lor = array(
"L" ,
"L" ,
"L" ,
"L" ,
"R",
"R" ,
"R" ,
"R" );
64$width = array( 13 , 20 , 60 , 15 , 12 , 20 , 20 , 20 );
75 if (empty($array1) || count($array1[0]) == 0 )
83 $pdf->SetFont(
'DejaVuCond',
'',10);
84 $Libelle=sprintf(
"%s - %s ",$accounting_item[
'pcm_val'],$accounting_item[
'pcm_lib']);
87 $pdf->SetFont(
'DejaVuCond',
'',6);
92 $pdf->SetFont(
'DejaVuCond',
'',7);
99 foreach ($acc_account_ledger->row as
$detail)
121 $pdf->SetFont(
'DejaVuCond',
'B',8);
131 $pdf->write_cell(
$width[
$i], 6,
'Total du compte '.$acc_account_ledger->id, 0, 0,
'R');
139 $pdf->write_cell(5, 6, ($solde_c > $solde_d ?
'C' :
'D'), 0, 0,
'L');
148 $pdf->SetFont(
'DejaVuCond',
'',6);
152 if (
$detail[
'cred_montant'] > 0)
155 $solde_c = bcadd($solde_c,
$detail[
'cred_montant']);
157 if (
$detail[
'deb_montant'] > 0)
160 $solde_d = bcadd($solde_d,
$detail[
'deb_montant']);
164 $side=
" ".$acc_account_ledger->get_amount_side(
$solde);
189 $pdf->SetFont(
'DejaVuCond',
'B',8);
200 $pdf->write_cell(
$width[
$i], 6,
'Total du compte '.$acc_account_ledger->id, 0, 0,
'R');
208 $pdf->write_cell(5, 6, ($solde_c > $solde_d ?
'C' :
'D'), 0, 0,
'L');
214$pdf->Output(
"gl_comptes.pdf",
'D');
shrink_date($p_date)
shrink the date, make a date shorter for the printing
nbm($p_number, $p_dec=2)
format the number with a sep.
global $g_user
if no group available , then stop
Manage the account from the table jrn, jrnx or tmp_pcmn.
static get_used_accounting($from_date, $to_date, $from_accounting, $to_accounting)
API for creating PDF, unicode, based on tfpdf.
if(count($a_accounting)==0) $header