Merge pull request #113 from Pear-Trading/finn/statfix

fixed display error
This commit is contained in:
Finn 2018-03-22 14:53:07 +00:00 committed by GitHub
commit 4844174ead
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,7 +92,7 @@ sub post_customer {
);
my @all_weeks = $week_transaction_rs->all;
my $first = $all_weeks[0]->get_column('count') || 0;
my $first = defined $all_weeks[0] ? $all_weeks[0]->get_column('count') || 0 : 0;
my $second = defined $all_weeks[1] ? $all_weeks[1]->get_column('count') || 0 : 0;
my $max = max( map { $_->get_column('count') } @all_weeks );
my $sum = sum( map { $_->get_column('count') } @all_weeks );