26if ( ! defined (
'ALLOWED') ) die(
'Appel direct ne sont pas permis');
27include_once NOALYSS_INCLUDE.
'/lib/ac_common.php';
28include_once NOALYSS_INCLUDE.
'/class/acc_balance.class.php';
39echo
'<div class="content">';
43echo
'<form method="GET" onsubmit="return waiting_box()">';
44echo _(
'Choisissez un autre exercice').
" : ";
46$js=sprintf(
"updatePeriode(%d,'%s','%s','%s',1)",
Dossier::id(),
'exercice',
'from_periode',
'to_periode');
49echo dossier::hidden();
56echo dossier::hidden();
91echo
" "._(
'jusque').
' :'.
$input_to->input();
93echo
HtmlInput::button_action(_(
'Avancé'),
" if (\$('balance_advanced_div').style.display=='none') { \$('balance_advanced_div').show();} else { \$('balance_advanced_div').hide();}",uniqid(),
"smallbutton");
95echo
'<div id="balance_advanced_div" style="display:none">';
112echo
'<ul style="list-style-type:none">';
116echo
'<li>'.$rad->input(
'p_filter',0)._(
'Aucun filtre, tous les journaux').
'</li>';
120echo
'<li>'.$rad->input(
'p_filter',1)._(
'Filtré par journal');
127echo
'<li>'.$rad->input(
'p_filter',2)._(
'Filtré par catégorie').HtmlInput::select_cat(
$array_cat).
'</li>';
130echo _(
'Totaux par sous-niveaux');
139echo
'<ul style="list-style-type:none">';
141if (
$http->get(
'lvl1',
"string",
false) !==
false)
143if (
$http->get(
'lvl2',
"string",
false) !==
false)
145if (
$http->get(
'lvl3',
"string",
false) !==
false)
147echo
'<li>'.$ck_lev1->input()._(
'Niveau 1').
'</li>';
148echo
'<li>'.$ck_lev2->input()._(
'Niveau 2').
'</li>';
149echo
'<li>'.$ck_lev3->input()._(
'Niveau 3').
'</li>';
153if (
$http->get(
'unsold',
"string",
false) !==
false)
158if (
$http->get(
'previous_exc',
"string",
false) !==
false)
164$from_poste->set_attribute(
'ipopup',
'ipop_account');
165$from_poste->set_attribute(
'label',
'from_poste_label');
173$to_poste->set_attribute(
'ipopup',
'ipop_account');
174$to_poste->set_attribute(
'label',
'to_poste_label');
175$to_poste->set_attribute(
'account',
'to_poste');
181echo _(
"Plage de postes").
" :".
$from_poste->input();
183echo
" "._(
"jusque").
" :".
$to_poste->input();
188echo _(
"Uniquement comptes non soldés").
" ".
$unsold->input();
191echo _(
"Avec la balance de l'année précédente").
" ".
$previous_exc->input();
196 <?php echo _(
"Récapitulatif par classe")?>
214if ( isset (
$_GET[
'view'] ) )
227 echo
'<TD><form method="GET" ACTION="export.php" ';
228 $id=uniqid(
"export_");
229 printf(
'id="%s" onsubmit="download_document_form(\'%s\')">',
$id,
$id);
231 echo dossier::hidden().
252 echo
'<TD><form method="GET" ACTION="export.php" ';
253 $id=uniqid(
"export_");
254 printf(
'id="%s" onsubmit="download_document_form(\'%s\')">',
$id,
$id);
278 echo
'<td style="vertical-align:top">';
308 $bal->from_poste=
$http->get(
'from_poste');
310 if ( isset(
$_GET[
'unsold']))
$bal->unsold=
true;
321 printf ( _(
"période du %s au %s"),
$a[
'p_start'],
$b[
'p_end']);
323 echo
'<span style="display:block">';
324 echo _(
'Cherche').Icon_Action::infobulle(24);
327 echo
'<table id="t_balance" width="100%">';
328 echo
'<th>'._(
"Poste Comptable").
'</th>';
329 echo
'<th>'._(
"Libellé").
'</th>';
331 echo
'<th style="text-align:right;">'._(
"Débit N-1").
'</th>';
332 echo
'<th style="text-align:right;">'._(
'Crédit N-1').
'</th>';
333 echo
'<th style="text-align:right;">'._(
'Solde N-1').
'</th>';
336 echo
'<th style="text-align:right;">'._(
'Ouverture').
'</th>';
337 echo
'<th style="text-align:right;">'._(
'Débit').
'</th>';
338 echo
'<th style="text-align:right;">'._(
'Crédit').
'</th>';
339 echo
'<th style="text-align:right;">'._(
'Solde').
'</th>';
343 $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');
346 $a_sum=array(
'sum_cred',
'sum_deb',
'solde_deb',
'solde_cred',
'sum_deb_ope',
'sum_cred_ope') ;
373 $r[
'solde_previous']=bcsub(
$r[
'solde_deb_previous'],
$r[
'solde_cred_previous']);
378 foreach (array(3,2,1) as
$ind)
380 if ( ! isset(
$_GET[
'lvl'.
$ind]))
continue;
381 if (${
'lvl'.$ind.
'_old'} ==
'') ${
'lvl'.$ind.
'_old'}=mb_substr(
$r[
'poste'],0,
$ind);
382 if ( ${
'lvl'.$ind.
'_old'} != mb_substr(
$r[
'poste'],0,
$ind))
385 echo
'<tr class="highlight">';
386 echo
td(${
'lvl'.$ind.
'_old'},
'style="font-weight:bold;"');
387 echo
td(${
'lvl'.$ind.
'_old'}.
" "._(
"Total niveau").
" ".
$ind,
'style="font-weight:bold;"');
391 echo
td(
nbm(${
'lvl'.$ind}[
'sum_deb_previous']),
'class="previous_year" style="font-weight:bold;"');
392 echo
td(
nbm(${
'lvl'.$ind}[
'sum_cred_previous']),
' class="previous_year" style="font-weight:bold;" ');
393 $delta_previous=${
'lvl'.$ind}[
'solde_previous'];
394 $side_previous=($delta_previous > 0 ) ?
"D":
"C";
395 echo
td(
nbm(abs($delta_previous)).
" $side_previous",
'class="previous_year" style="text-align:right;font-weight:bold;" ');
400 $solde3=bcsub(${
'lvl'.$ind}[
'sum_deb_ope'],${
'lvl'.$ind}[
'sum_cred_ope']);
401 $side3=($solde3<0)?
" C":
" D";
402 $side3=($solde3==0)?
" ":$side3;
403 echo
td(
nbm(abs($solde3)).$side3,
'style="text-align:right;font-weight:bold;"');
406 $solde_deb=bcsub(${
'lvl'.$ind}[
'sum_deb'],${
'lvl'.$ind}[
'sum_deb_ope']);
407 echo
td(
nbm($solde_deb),
'style="text-align:right;font-weight:bold;"');
410 $solde_cred=bcsub(${
'lvl'.$ind}[
'sum_cred'],${
'lvl'.$ind}[
'sum_cred_ope']);
411 echo
td(
nbm($solde_cred),
'style="text-align:right;font-weight:bold;"');
412 $delta=bcsub(${
'lvl'.$ind}[
'solde_cred'],${
'lvl'.$ind}[
'solde_deb']);
414 echo
td(
nbm(abs(
$delta)).
" $side",
'style="text-align:right;font-weight:bold;" ');
417 ${
'lvl'.$ind.
'_old'}=mb_substr(
$r[
'poste'],0,
$ind);
432 if (
$r[
'poste'] ==
"") {
438 echo
'<TR class="'.$tr.
'">';
439 echo
td($view_history);
442 if (in_array(
$r[
'type'],array(
'CHA',
'ACT',
'PASINV',
'PROINV')) &&
$r[
'sum_deb']<
$r[
'sum_cred'])
445 $label.=
" ".Icon_Action::warnbulle(85);
447 if (in_array(
$r[
'type'],array(
'PRO',
'PAS',
'ACTINV',
'CHAINV')) &&
$r[
'sum_deb']>
$r[
'sum_cred'])
450 $label.=
" ".Icon_Action::warnbulle(86);
456 echo
td(
nbm(
$r[
'sum_deb_previous']),
' class="previous_year"');
457 echo
td(
nbm(
$r[
'sum_cred_previous']),
' class="previous_year" ');
458 $solde_previous=bcsub(
$r[
'solde_deb_previous'],
$r[
'solde_cred_previous']);
459 $side=($solde_previous<0)?
"C":
"D";
461 $r[
'solde_previous']=$solde_previous;
462 echo
td(
nbm(abs($solde_previous)).
" ".
$side,
' class="previous_year"');
466 $r[
'sum_deb_previous'],
467 $r[
'sum_cred_previous']);
470 $solde=bcsub(
$r[
'sum_deb_ope'],
$r[
'sum_cred_ope']);
474 echo
td(
nbm(bcsub(
$r[
'sum_deb'],
$r[
'sum_deb_ope'])),
'style="text-align:right;"');
475 echo
td(
nbm(bcsub(
$r[
'sum_cred'],
$r[
'sum_cred_ope'])),
'style="text-align:right;"');
477 $solde2=bcsub(
$r[
'sum_deb'],
$r[
'sum_cred']);
478 $side=($solde2 < 0)?
" C":
" D";
481 echo
td(
nbm(abs($solde2)).
$side,
'style="text-align:right;"');
483 if ( isset(
$_GET[
'lvl1']) || isset(
$_GET[
'lvl2']) || isset(
$_GET[
'lvl3'])) echo
'<td></td>';
488 if ( DEBUGNOALYSS>1) echo \Noalyss\Dbg::hidden_info(
"\$row",
$row);
492 echo
'<div style="float:left;margin-right:50px">';
494 echo _(
"Résumé Exercice précédent");
499 echo
'<div style="float:left">';
501 echo _(
"Résumé Exercice courant");
get_array_column($p_array, $key)
td($p_string='', $p_extra='')
surround the string with td
nbm($p_number, $p_dec=2)
format the number with a sep.
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
for($i=0;$i<=6;$i++) $ind
Class for manipulating data to print the balance of account.
static array_cat()
create an array of the existing cat, to be used in a checkbox form
static id()
return the 'gDossier' value after a check
about the accountancy period (usually 1 year starting in January until december) = exercice
Generate the form for the periode Data Members.
show a button, for selecting a account and a input text for manually inserting an account the differe...
For the periode tables parm_periode and jrn_periode.
catch(Exception $exc) $summary_tab
foreach($a_sum as $a) $lvl1_old
for($e=2;$e< $nb_col;$e++) $a_sum