[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 33/219: Task #0001324: Afficher la date (pér
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 33/219: Task #0001324: Afficher la date (période) dans FSALDO |
Date: |
Mon, 18 Dec 2017 13:22:31 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 6f27e74da4fa8e6f0d0baee9723e84e9702b8db0
Author: Dany De Bontridder <address@hidden>
Date: Sat Sep 2 23:23:32 2017 +0200
Task #0001324: Afficher la date (période) dans FSALDO
---
include/compta_fin_saldo.inc.php | 194 +++++++++++++++++++++------------------
1 file changed, 105 insertions(+), 89 deletions(-)
diff --git a/include/compta_fin_saldo.inc.php b/include/compta_fin_saldo.inc.php
index a472030..b7dcfa7 100644
--- a/include/compta_fin_saldo.inc.php
+++ b/include/compta_fin_saldo.inc.php
@@ -20,108 +20,124 @@
// Copyright Author Dany De Bontridder address@hidden
-/**\file
+/* * \file
*
*
* \brief show bank saldo
*
*/
-if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
-require_once NOALYSS_INCLUDE.'/class/acc_parm_code.class.php';
- echo '<div class="content">';
- $fiche=new Fiche($cn);
+if (!defined('ALLOWED'))
+ die('Appel direct ne sont pas permis');
+require_once NOALYSS_INCLUDE.'/class/acc_parm_code.class.php';
+echo '<div class="content">';
+$fiche=new Fiche($cn);
- $array=$fiche->get_bk_account();
+$array=$fiche->get_bk_account();
- echo '<div class="content">';
- echo dossier::hidden();
- echo _('Cherche').' : '.HtmlInput::filter_table("fin_saldo_tb", '0,1,2,3',
'1');
- echo '<table class="sortable" style="margin-left:2%;width:96%"
class="result" id="fin_saldo_tb">';
- echo tr(th('Quick Code',' class="
sorttable_sorted"',HtmlInput::infobulle(17).'<span
id="sorttable_sortfwdind"><img src="image/up.gif"></span>')
- .th('Compte en banque',' style="text-align:left"')
- .th('Journal',' style="text-align:center"')
- .th('Description',' style="text-align:center"')
- .th('solde opération',' style="text-align:right"
class="sorttable_numeric"')
- .th('solde extrait/relevé',' style="text-align:right"
class="sorttable_numeric"')
- .th('différence',' style="text-align:right"
class="sorttable_numeric"')
- );
- // Filter the saldo
- // on the current year
- $filter_year=" j_tech_per in (select p_id from parm_periode where
p_exercice='".$g_user->get_exercice()."')";
- // for highligting tje line
- $idx=0;
- bcscale(2);
- $tot_extrait=0;$tot_diff=0;$tot_operation=0;
- // for each account
- for ( $i = 0; $i < count($array);$i++)
+echo '<div class="content">';
+echo dossier::hidden();
+global $g_user;
+// Get exercice user
+$exercice=$g_user->get_exercice();
+// display exercice user
+echo h1(_("Exercice")." ".$exercice);
+echo _('Cherche').' : '.HtmlInput::filter_table("fin_saldo_tb", '0,1,2,3',
'1');
+echo '<table class="sortable" style="margin-left:2%;width:96%" class="result"
id="fin_saldo_tb">';
+echo tr(th('Quick Code', ' class=" sorttable_sorted"',
+ HtmlInput::infobulle(17).'<span id="sorttable_sortfwdind"><img
src="image/up.gif"></span>')
+ .th(_('Compte en banque'), ' style="text-align:left"')
+ .th(_('Journal'), ' style="text-align:center"')
+ .th(_('Description'), ' style="text-align:center"')
+ .th(_('solde opération'),
+ ' style="text-align:right" class="sorttable_numeric"')
+ .th(_('solde extrait/relevé'),
+ ' style="text-align:right" class="sorttable_numeric"')
+ .th(_('différence'),
+ ' style="text-align:right" class="sorttable_numeric"')
+);
+// Filter the saldo
+// on the current year
+$filter_year=" j_tech_per in (select p_id from parm_periode where
p_exercice='".$g_user->get_exercice()."')";
+// for highligting tje line
+$idx=0;
+bcscale(2);
+$tot_extrait=0; $tot_diff=0; $tot_operation=0;
+
+// for each account
+for ($i=0; $i<count($array); $i++)
+{
+ if ($array[$i]->id==0)
{
- if ( $array[$i]->id==0) {
- echo '<tr >';
- echo td(h2("Journal mal configuré",' class="error" '),'
colspan="5" style="width:auto" ');
- echo '</tr>';
- continue;
- }
- // get the saldo
- $m=$array[$i]->get_solde_detail($filter_year);
+ echo '<tr >';
+ echo td(h2(_("Journal mal configuré"), ' class="error" '),
+ ' colspan="5" style="width:auto" ');
+ echo '</tr>';
+ continue;
+ }
+ // get the saldo
+ $m=$array[$i]->get_solde_detail($filter_year);
+
+ $solde=$m['debit']-$m['credit'];
- $solde=$m['debit']-$m['credit'];
+ // print the result if the saldo is not equal to 0
+ if ($m['debit']!=0.0||$m['credit']!=0.0)
+ {
+ /* get saldo for not reconcilied operations */
+ $saldo_not_reconcilied=$array[$i]->get_bk_balance($filter_year." and
(trim(jr_pj_number) ='' or jr_pj_number is null)");
- // print the result if the saldo is not equal to 0
- if ( $m['debit'] != 0.0 || $m['credit'] != 0.0)
- {
- /* get saldo for not reconcilied operations */
- $saldo_not_reconcilied=$array[$i]->get_bk_balance($filter_year."
and (trim(jr_pj_number) ='' or jr_pj_number is null)" );
+ /* get saldo for reconcilied operation */
- /* get saldo for reconcilied operation */
+ $saldo_reconcilied=$array[$i]->get_bk_balance($filter_year." and (
trim(jr_pj_number) != '' and jr_pj_number is not null)");
- $saldo_reconcilied=$array[$i]->get_bk_balance($filter_year." and (
trim(jr_pj_number) != '' and jr_pj_number is not null)" );
+ if ($idx%2!=0)
+ $odd="odd";
+ else
+ $odd="even";
- if ( $idx%2 != 0 )
- $odd="odd";
- else
- $odd="even";
+ $idx++;
+ echo "<tr class=\"$odd\">";
+ echo "<TD >".
+ IButton::history_card($array[$i]->id,
+ $array[$i]->strAttribut(ATTR_DEF_QUICKCODE)).
+ "</TD>";
- $idx++;
- echo "<tr class=\"$odd\">";
- echo "<TD >".
-
IButton::history_card($array[$i]->id,$array[$i]->strAttribut(ATTR_DEF_QUICKCODE)).
- "</TD>";
+ $saldo_rec=bcsub($saldo_reconcilied['debit'],
+ $saldo_reconcilied['credit']);
+ $diff=bcsub($saldo_not_reconcilied['debit'],
+ $saldo_not_reconcilied['credit']);
+ echo "<TD >".
+ $array[$i]->strAttribut(ATTR_DEF_NAME).
+ "</TD>".
+ td(h($array[$i]->ledger_name)).
+ td(h($array[$i]->ledger_description)).
+ '<TD class="sorttable_numeric" sorttable_customkey="'.$solde.'"
style="text-align:right">'.
+ nbm($solde).
+ "</TD>".
+ '<TD class="sorttable_numeric" sorttable_customkey="'.$saldo_rec.'"
style="text-align:right">'.
+ nbm($saldo_rec).
+ "</TD>".
+ '<TD class="sorttable_numeric" sorttable_customkey="'.$diff.'"
style="text-align:right">'.
+ nbm($diff).
+ "</TD>".
+ "</TR>";
+ $tot_extrait=bcadd($tot_extrait, $solde);
+ $tot_operation=bcadd($tot_operation, $saldo_rec);
+ $tot_diff=bcadd($tot_diff, $diff);
+ }
+}// for
+echo '<tfoot>';
+echo '<tr class="highlight">';
+echo td('');
+echo td('');
+echo td('');
+echo td(_('TOTAUX'), 'style="font-weight:bold;text-align:center"');
+echo td(nbm($tot_extrait), 'style="font-weight:bold" class="num"');
+echo td(nbm($tot_operation), ' style="font-weight:bold" class="num"');
+echo td(nbm($tot_diff), ' style="font-weight:bold" class="num"');
+echo '</tr>';
-
$saldo_rec=bcsub($saldo_reconcilied['debit'],$saldo_reconcilied['credit']);
-
$diff=bcsub($saldo_not_reconcilied['debit'],$saldo_not_reconcilied['credit']);
- echo "<TD >".
- $array[$i]->strAttribut(ATTR_DEF_NAME).
- "</TD>".
- td(h($array[$i]->ledger_name)).
- td(h($array[$i]->ledger_description)).
- '<TD class="sorttable_numeric" sorttable_customkey="'.$solde.'"
style="text-align:right">'.
- nbm($solde).
- "</TD>".
- '<TD class="sorttable_numeric"
sorttable_customkey="'.$saldo_rec.'" style="text-align:right">'.
- nbm($saldo_rec).
- "</TD>".
- '<TD class="sorttable_numeric" sorttable_customkey="'.$diff.'"
style="text-align:right">'.
- nbm($diff).
- "</TD>".
- "</TR>";
- $tot_extrait=bcadd($tot_extrait,$solde);
- $tot_operation=bcadd($tot_operation,$saldo_rec);
- $tot_diff=bcadd($tot_diff,$diff);
- }
- }// for
- echo '<tfoot>';
- echo '<tr class="highlight">';
- echo td('');
- echo td('');
- echo td('');
- echo td(' TOTAUX ','style="font-weight:bold"');
- echo td(nbm($tot_extrait),'style="font-weight:bold" class="num"');
- echo td(nbm($tot_operation),' style="font-weight:bold" class="num"');
- echo td(nbm($tot_diff),' style="font-weight:bold" class="num"');
- echo '</tr>';
-
- echo '</tfoot>';
- echo "</table>";
- echo "</div>";
- return;
+echo '</tfoot>';
+echo "</table>";
+echo "</div>";
+return;
?>
- [Noalyss-commit] [noalyss] 108/219: task #0001272: Rendre possible l'appel de la calculatrice depuis le fin fond d'une page., (continued)
- [Noalyss-commit] [noalyss] 108/219: task #0001272: Rendre possible l'appel de la calculatrice depuis le fin fond d'une page., Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 174/219: space, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 114/219: Change max article in STOCK INV, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 16/219: Update test with new architecture, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 173/219: Improve calc, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 104/219: Réécriture de CFGPCMN pour utiliser ManageTable pas de delete proposé si compte utilisé, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 14/219: Infobulle : warning : esthetic, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 44/219: fix minor bug + doc, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 46/219: Manage_Table : Improve Javascript for adding / removing row of table, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 27/219: Task #0001443: opérations rapprochées : bug quand on utilise des tva avec autoliquidation Check with the view v_quant_detail and take into account the negative VAT, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 33/219: Task #0001324: Afficher la date (période) dans FSALDO,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 198/219: Task #001381 : reinitialize the search_form, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 154/219: Task #1440 CA - opération diverses inaccessibles Task #1370 les OD en comptabilité analytique - problème., Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 209/219: Merge branch 'master' of ns3:/srv/git/noalyss, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 186/219: Protect queryString with encodeURI, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 207/219: Task #1381 Change esthetic Search Filter, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 208/219: Fix search for reconcile, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 157/219: Fix issue with open_basedir, sometime set in the server config, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 196/219: Task #001381 : favori de filtre , table pour sauvegarder, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 109/219: Add button to pin the box, Dany De Bontridder, 2017/12/18
- [Noalyss-commit] [noalyss] 134/219: #0001414: LETTRAGE - montants différents non indiqués Apparation d'une bulle d'info avec la différence, Dany De Bontridder, 2017/12/18