Go to the documentation of this file.
26 if ( ! defined (
'ALLOWED') ) die(
'Appel direct ne sont pas permis');
27 include_once NOALYSS_INCLUDE.
'/lib/ac_common.php';
28 include_once NOALYSS_INCLUDE.
'/class/acc_balance.class.php';
39 echo
'<div class="content">';
43 echo
'<form method="GET" onsubmit="return waiting_box()">';
44 echo _(
'Choisissez un autre exercice').
" : ";
46 $js=sprintf(
"updatePeriode(%d,'%s','%s','%s',1)",
Dossier::id(),
'exercice',
'from_periode',
'to_periode');
49 echo dossier::hidden();
56 echo dossier::hidden();
87 echo
" "._(
'jusque').
' :'.
$input_to->input();
89 echo
HtmlInput::button_action(_(
'Avancé'),
" if (\$('balance_advanced_div').style.display=='none') { \$('balance_advanced_div').show();} else { \$('balance_advanced_div').hide();}");
91 echo
'<div id="balance_advanced_div" style="display:none">';
108 echo
'<ul style="list-style-type:none">';
112 echo
'<li>'.$rad->input(
'p_filter',0)._(
'Aucun filtre, tous les journaux').
'</li>';
114 $rad->selected=
false;
116 echo
'<li>'.$rad->input(
'p_filter',1)._(
'Filtré par journal');
120 $rad->selected=
false;
123 echo
'<li>'.$rad->input(
'p_filter',2)._(
'Filtré par catégorie').HtmlInput::select_cat(
$array_cat).
'</li>';
126 echo _(
'Totaux par sous-niveaux');
135 echo
'<ul style="list-style-type:none">';
137 if (
$http->get(
'lvl1',
"string",
false) !==
false)
139 if (
$http->get(
'lvl2',
"string",
false) !==
false)
141 if (
$http->get(
'lvl3',
"string",
false) !==
false)
143 echo
'<li>'.$ck_lev1->input()._(
'Niveau 1').
'</li>';
144 echo
'<li>'.$ck_lev2->input()._(
'Niveau 2').
'</li>';
145 echo
'<li>'.$ck_lev3->input()._(
'Niveau 3').
'</li>';
149 if (
$http->get(
'unsold',
"string",
false) !==
false)
154 if (
$http->get(
'previous_exc',
"string",
false) !==
false)
160 $from_poste->set_attribute(
'ipopup',
'ipop_account');
161 $from_poste->set_attribute(
'label',
'from_poste_label');
162 $from_poste->set_attribute(
'account',
'from_poste');
169 $to_poste->set_attribute(
'ipopup',
'ipop_account');
170 $to_poste->set_attribute(
'label',
'to_poste_label');
171 $to_poste->set_attribute(
'account',
'to_poste');
177 echo _(
"Plage de postes").
" :".
$from_poste->input();
179 echo
" "._(
"jusque").
" :".
$to_poste->input();
184 echo _(
"Uniquement comptes non soldés").
" ".
$unsold->input();
187 echo _(
"Avec la balance de l'année précédente").
" ".
$previous_exc->input();
192 <?php echo _(
"Récapitulatif par classe")?>
210 if ( isset (
$_GET[
'view'] ) )
223 echo
'<TD><form method="GET" ACTION="export.php" ';
224 $id=uniqid(
"export_");
225 printf(
'id="%s" onsubmit="download_document_form(\'%s\')">',
$id,
$id);
227 echo dossier::hidden().
248 echo
'<TD><form method="GET" ACTION="export.php" ';
249 $id=uniqid(
"export_");
250 printf(
'id="%s" onsubmit="download_document_form(\'%s\')">',
$id,
$id);
274 echo
'<td style="vertical-align:top">';
286 if ( isset(
$_GET[
'view'] ) )
304 $bal->from_poste=
$http->get(
'from_poste');
306 if ( isset(
$_GET[
'unsold']))
$bal->unsold=
true;
317 printf ( _(
"période du %s au %s"),
$a[
'p_start'],
$b[
'p_end']);
319 echo
'<span style="display:block">';
320 echo _(
'Cherche').Icon_Action::infobulle(24);
323 echo
'<table id="t_balance" width="100%">';
324 echo
'<th>'._(
"Poste Comptable").
'</th>';
325 echo
'<th>'._(
"Libellé").
'</th>';
327 echo
'<th style="text-align:right;">'._(
"Débit N-1").
'</th>';
328 echo
'<th style="text-align:right;">'._(
'Crédit N-1').
'</th>';
329 echo
'<th style="text-align:right;">'._(
'Solde N-1').
'</th>';
332 echo
'<th style="text-align:right;">'._(
'Ouverture').
'</th>';
333 echo
'<th style="text-align:right;">'._(
'Débit').
'</th>';
334 echo
'<th style="text-align:right;">'._(
'Crédit').
'</th>';
335 echo
'<th style="text-align:right;">'._(
'Solde').
'</th>';
339 $a_sum=array(
'sum_cred',
'sum_deb',
'solde_deb',
'solde_cred',
'sum_deb_ope',
'sum_cred_ope',
'sum_cred_previous',
'sum_deb_previous',
'solde_previous');
342 $a_sum=array(
'sum_cred',
'sum_deb',
'solde_deb',
'solde_cred',
'sum_deb_ope',
'sum_cred_ope') ;
369 $r[
'solde_previous']=bcsub(
$r[
'solde_deb_previous'],
$r[
'solde_cred_previous']);
374 foreach (array(3,2,1) as
$ind)
376 if ( ! isset(
$_GET[
'lvl'.
$ind]))
continue;
377 if (${
'lvl'.$ind.
'_old'} ==
'') ${
'lvl'.$ind.
'_old'}=mb_substr(
$r[
'poste'],0,
$ind);
378 if ( ${
'lvl'.$ind.
'_old'} != mb_substr(
$r[
'poste'],0,
$ind))
381 echo
'<tr class="highlight">';
382 echo
td(${
'lvl'.$ind.
'_old'},
'style="font-weight:bold;"');
383 echo
td(${
'lvl'.$ind.
'_old'}.
" "._(
"Total niveau").
" ".
$ind,
'style="font-weight:bold;"');
387 echo
td(
nbm(${
'lvl'.$ind}[
'sum_deb_previous']),
'class="previous_year" style="font-weight:bold;"');
388 echo
td(
nbm(${
'lvl'.$ind}[
'sum_cred_previous']),
' class="previous_year" style="font-weight:bold;" ');
389 $delta_previous=${
'lvl'.$ind}[
'solde_previous'];
390 $side_previous=($delta_previous > 0 ) ?
"D":
"C";
391 echo
td(
nbm(abs($delta_previous)).
" $side_previous",
'class="previous_year" style="text-align:right;font-weight:bold;" ');
396 $solde3=bcsub(${
'lvl'.$ind}[
'sum_deb_ope'],${
'lvl'.$ind}[
'sum_cred_ope']);
397 $side3=($solde3<0)?
" C":
" D";
398 $side3=($solde3==0)?
" ":$side3;
399 echo
td(
nbm(abs($solde3)).$side3,
'style="text-align:right;font-weight:bold;"');
402 $solde_deb=bcsub(${
'lvl'.$ind}[
'sum_deb'],${
'lvl'.$ind}[
'sum_deb_ope']);
403 echo
td(
nbm($solde_deb),
'style="text-align:right;font-weight:bold;"');
406 $solde_cred=bcsub(${
'lvl'.$ind}[
'sum_cred'],${
'lvl'.$ind}[
'sum_cred_ope']);
407 echo
td(
nbm($solde_cred),
'style="text-align:right;font-weight:bold;"');
408 $delta=bcsub(${
'lvl'.$ind}[
'solde_cred'],${
'lvl'.$ind}[
'solde_deb']);
410 echo
td(
nbm(abs(
$delta)).
" $side",
'style="text-align:right;font-weight:bold;" ');
413 ${
'lvl'.$ind.
'_old'}=mb_substr(
$r[
'poste'],0,
$ind);
428 if (
$r[
'poste'] ==
"") {
434 echo
'<TR class="'.$tr.
'">';
435 echo
td($view_history);
436 echo
td(
h(
$r[
'label']));
439 echo
td(
nbm(
$r[
'sum_deb_previous']),
' class="previous_year"');
440 echo
td(
nbm(
$r[
'sum_cred_previous']),
' class="previous_year" ');
441 $solde_previous=bcsub(
$r[
'solde_deb_previous'],
$r[
'solde_cred_previous']);
442 $side=($solde_previous<0)?
"C":
"D";
444 $r[
'solde_previous']=$solde_previous;
445 echo
td(
nbm(abs($solde_previous)).
" ".
$side,
' class="previous_year"');
449 $r[
'sum_deb_previous'],
450 $r[
'sum_cred_previous']);
453 $solde=bcsub(
$r[
'sum_deb_ope'],
$r[
'sum_cred_ope']);
457 echo
td(
nbm(bcsub(
$r[
'sum_deb'],
$r[
'sum_deb_ope'])),
'style="text-align:right;"');
458 echo
td(
nbm(bcsub(
$r[
'sum_cred'],
$r[
'sum_cred_ope'])),
'style="text-align:right;"');
460 $solde2=bcsub(
$r[
'sum_deb'],
$r[
'sum_cred']);
461 $side=($solde2 < 0)?
" C":
" D";
464 echo
td(
nbm(abs($solde2)).
$side,
'style="text-align:right;"');
466 if ( isset(
$_GET[
'lvl1']) || isset(
$_GET[
'lvl2']) || isset(
$_GET[
'lvl3'])) echo
'<td></td>';
474 echo
'<div style="float:left;margin-right:50px">';
476 echo _(
"Résumé Exercice précédent");
481 echo
'<div style="float:left">';
483 echo _(
"Résumé Exercice courant");
nbm($p_number, $p_dec=2)
format the number with a sep.
h( $row[ 'oa_description'])
for($i=0;$i<=6;$i++) $ind
For the periode tables parm_periode and jrn_periode.
for($e=2;$e< $nb_col;$e++) $a_sum
Generate the form for the periode Data Members.
get_array_column($p_array, $key)
catch(Exception $exc) $summary_tab
Class for manipulating data to print the balance of account.
show a button, for selecting a account and a input text for manually inserting an account the differe...
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
static array_cat()
create an array of the existing cat, to be used in a checkbox form
static id()
return the $_REQUEST['gDossier'] after a check
td($p_string='', $p_extra='')
surround the string with td
about the accountancy period (usually 1 year starting in January until december) = exercice
foreach($a_sum as $a) $lvl1_old