This needs a full rewrite!
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
$date2=ParseDate($time2);
}
-my $date=UnixDate($date,'%Y-%m-%d');
-my $date2=UnixDate($date2,'%Y-%m-%d');
+$date=UnixDate($date,'%Y-%m-%d');
+$date2=UnixDate($date2,'%Y-%m-%d');
#warn "MASON: DATE: $date, $date2";
my $count=@payments;
# print "MASON: number of payments=$count\n";
-my $i=0;
+my $i = 0;
my $totalcharges=0;
my $totalcredits=0;
my $totalpaid=0;
#get credits and append to the bottom of payments
my @credits=getcredits($date,$date2);
-my $count=@credits;
-my $i=0;
+$count=@credits;
+$i=0;
while ($i<$count ){