diff --git a/include/template/letter_prop.php b/include/template/letter_prop.php
index 845b2d0f2..b73e3f21b 100644
--- a/include/template/letter_prop.php
+++ b/include/template/letter_prop.php
@@ -10,6 +10,10 @@ if ( count($this->content) == 0 ) :
1) {
+ echo Noalyss\Dbg::hidden_info("linked ",$this->linked);
+ echo Noalyss\Dbg::hidden_info("content",$this->content);
+}
$delta=0;
?>
@@ -43,7 +47,8 @@ $delta=0;
content=array_merge($this->linked,$this->content);
+// ???
+// $this->content=array_merge($this->linked,$this->content);
$amount_deb=($j_debit=='t')?$amount_init:0;
$amount_cred=($j_debit=='f')?$amount_init:0;
@@ -153,18 +158,20 @@ if ($i<$linked_limit)
$amount_cred+=( $jnt_id == $this->content[$i]['letter'] && $this->content[$i]['j_debit']=='f')?$this->content[$i]['j_montant']:0;
}
endfor;
-$delta = bcsub($amount_deb, $amount_cred);
+$delta = bcsub($amount_deb, $amount_cred,2);
$side = _('Créditeur');
if ($delta < 0 ) {
$side = _("Débiteur");
$delta = abs($delta);
+} elseif ($delta==0) {
+ $side="";
}
?>
-
-
-
-
+
+
+
+