[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 03/04: cosmetic gestion -> tiers -> balance ,
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 03/04: cosmetic gestion -> tiers -> balance , remove the style inline cosmetic gestion -> tiers -> lettering |
Date: |
Tue, 17 Sep 2019 12:31:00 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit c0a6e7e07ffc66f70e4999555777129d831e8f62
Author: Dany De Bontridder <address@hidden>
Date: Mon Sep 16 17:45:52 2019 +0200
cosmetic gestion -> tiers -> balance , remove the style inline
cosmetic gestion -> tiers -> lettering
---
include/balance_card.inc.php | 19 ++++++++++---------
include/template/letter_all.php | 36 +++++++++++++++++++++++-------------
2 files changed, 33 insertions(+), 22 deletions(-)
diff --git a/include/balance_card.inc.php b/include/balance_card.inc.php
index 1ae8834..1464652 100644
--- a/include/balance_card.inc.php
+++ b/include/balance_card.inc.php
@@ -24,12 +24,13 @@
*/
if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
require_once NOALYSS_INCLUDE.'/class/exercice.class.php';
+$http=new HttpInput();
global $g_user;
-echo '<div class="content" style="width:90%;margin-left:5%">';
+echo '<div class="content">';
$exercice=new Exercice($cn);
$old='';
-$fiche=new Fiche($cn,$_GET['f_id']);
+$fiche=new Fiche($cn,$http->get('f_id',"number"));
$year=$g_user->get_exercice();
if ( $year == 0 )
{
@@ -43,7 +44,7 @@ else
$array['to_periode']=$limit_periode[1]->last_day();
if (isset($_GET['ex']))
{
- $limit_periode=$per->get_limit($_GET['ex']);
+ $limit_periode=$per->get_limit($http->get('ex','number'));
$array['from_periode']=$limit_periode[0]->first_day();
}
@@ -52,16 +53,16 @@ else
*/
if ($exercice->count() > 1 )
{
- $default=(isset($_GET['ex']))?$_GET['ex']:$year;
+ $default=$http->get("ex","number",$year);
$dossier=dossier::id();
$old='<form method="get" action="do.php">';
$is=$exercice->select('ex',$default,'onchange = "submit(this)"');
- $old.="Autre exercice ".$is->input();
- $old.=HtmlInput::hidden('f_id',$_GET['f_id']);
- $old.=HtmlInput::hidden('ac',$_GET['ac']);
- $old.=HtmlInput::hidden('sb',$_GET['sb']);
- $old.=HtmlInput::hidden('sc',$_GET['sc']);
+ $old.=sprintf(_("Autre exercice %s"),$is->input());
+ $old.=HtmlInput::hidden('f_id',$http->get('f_id'));
+ $old.=HtmlInput::hidden('ac',$http->get('ac'));
+ $old.=HtmlInput::hidden('sb',$http->get('sb'));
+ $old.=HtmlInput::hidden('sc',$http->get('sc'));
$old.=dossier::hidden();
$old.='</form>';
}
diff --git a/include/template/letter_all.php b/include/template/letter_all.php
index 811f3d4..32f4e86 100644
--- a/include/template/letter_all.php
+++ b/include/template/letter_all.php
@@ -77,11 +77,11 @@ $r=sprintf('<A class="detail"
style="text-decoration:underline" href="javascrip
<td> <?php echo $r?> </td>
<td> <?php echo h($this->content[$i]['jr_comment'])?> </td>
<?php if ($this->content[$i]['j_debit']=='t') : ?>
- <td style="text-align:right"> <?php echo
nb($this->content[$i]['j_montant'])?> </td>
+ <td style="text-align:right"> <?php echo
nbm($this->content[$i]['j_montant'])?> </td>
<td></td>
<?php else : ?>
<td></td>
- <td style="text-align:right"> <?php echo
nb($this->content[$i]['j_montant'])?> </td>
+ <td style="text-align:right"> <?php echo
nbm($this->content[$i]['j_montant'])?> </td>
<?php endif ?>
<td style="text-align:center">
<?php
@@ -110,15 +110,25 @@
$amount_cred+=($this->content[$i]['j_debit']=='f')?$this->content[$i]['j_montant
<?php
endfor;
?>
+<tr class="highlight">
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td class="num"> <?php echo nbm($amount_deb,2);?> </td>
+ <td class="num"> <?php echo nbm($amount_cred,2);?> </td>
+ <td class="num">
+ <?php
+ bcscale(2);
+ $solde=bcsub($amount_deb,$amount_cred);
+ if ( $solde > 0 )
+ printf (_("Solde débiteur : %s"),nbm($solde));
+ elseif ($solde < 0)
+ printf (_("Solde créditeur : %s"),nbm(abs($solde)));
+
+
+ ?>
+
+ </td>
</table>
-<h2 class="info2" style="margin:0 0"> <?php echo _("Solde débit")?> : <?php
echo nb($amount_deb);?></h2>
-<h2 class="info2" style="margin:0 0"> <?php echo _("Solde crédit")?> : <?php
echo nb($amount_cred);?></h2>
- <?php
-bcscale(2);
- $solde=bcsub($amount_deb,$amount_cred);
-if ( $solde > 0 ) :
-?>
- <h2 class="info2" style="margin:0 0"> <?php echo _("Solde débiteur")?>
: <?php echo nb($solde)?></h2>
-<?php else : ?>
- <h2 class="info2" style="margin:0 0"> <?php echo _("Solde créditeur")?>
: <?php echo nb(abs($solde))?></h2>
-<?php endif; ?>