Merge pull request #54 from Pear-Trading/TBSliver/Graph-Fix

Add zero to sums to force number on output
This commit is contained in:
Finn 2017-09-08 13:13:40 +01:00 committed by GitHub
commit 7c9ab69d1c

View file

@ -102,7 +102,7 @@ sub _sales_last_duration {
my $transactions = $entity->sales
->search_between( $start, $next_end )
->get_column('value')
->sum || 0;
->sum || 0 + 0;
push @{ $data->{ labels } }, $start->day_name;
push @{ $data->{ data } }, $transactions;
$start->add( days => 1 );
@ -134,7 +134,7 @@ sub _purchases_last_duration {
my $transactions = $entity->purchases
->search_between( $start, $next_end )
->get_column('value')
->sum || 0;
->sum || 0 + 0;
push @{ $data->{ labels } }, $start->day_name;
push @{ $data->{ data } }, $transactions;
$start->add( days => 1 );