=================================================================== RCS file: /cvs/pta/pta.pl,v retrieving revision 1.1 retrieving revision 1.3 diff -u -p -r1.1 -r1.3 --- pta/pta.pl 2020/09/27 14:35:34 1.1 +++ pta/pta.pl 2020/10/18 23:47:35 1.3 @@ -507,7 +507,7 @@ for my $cc (sort keys %cclist) { # --- Cost center profits and losses. -------------------------- - if ($opt_p) { + if ($opt_p && $profit{$cc}) { printf "\n%s [%s] %s\n", (translate 'Cost center'), $cc, (translate 'Profits and losses'); my $pr = 0; @@ -554,7 +554,7 @@ for my $cc (sort keys %cclist) { # --- Global list of profits and losses. ------------------------------- -if ($opt_p) { +if ($opt_p && %ptot) { my $pr = 0; my $capital = 0; my $maxd = 0;