- $rep->TextCol(0, 2, _("Total"));
-
- $rep->TextCol(2, 3, number_format2(abs($totprevd), $dec));
- $rep->TextCol(3, 4, number_format2(abs($totprevc), $dec));
- $rep->TextCol(4, 5, number_format2(abs($totcurrd), $dec));
- $rep->TextCol(5, 6, number_format2(abs($totcurrc), $dec));
- $rep->TextCol(6, 7, number_format2(abs($totcurrd + $totprevd), $dec));
- $rep->TextCol(7, 8, number_format2(abs($totcurrc + $totprevc), $dec));
- $rep->NewLine();
- $totprev = $totprevd + $totprevc;
- $totcurr = $totcurrd + $totcurrc;
+
+ //$prev = get_balance(null, $dimension, $dimension2, $begin, $from, false, false);
+ //$curr = get_balance(null, $dimension, $dimension2, $from, $to, true, true);
+ //$tot = get_balance(null, $dimension, $dimension2, $begin, $to, false, true);
+
+ if ($balances == 0)
+ {
+ $rep->TextCol(0, 2, _("Total"));
+ $rep->TextCol(2, 3, number_format2($pdeb, $dec));
+ $rep->TextCol(3, 4, number_format2($pcre, $dec));
+ $rep->TextCol(4, 5, number_format2($cdeb, $dec));
+ $rep->TextCol(5, 6, number_format2($ccre, $dec));
+ $rep->TextCol(6, 7, number_format2($tdeb, $dec));
+ $rep->TextCol(7, 8, number_format2($tcre, $dec));
+ $rep->NewLine();
+ }