Continue defaulting to 0 as well
This commit is contained in:
parent
e13a128179
commit
83094f380d
1 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ sub _sales_last_duration {
|
||||||
my $transactions = $entity->sales
|
my $transactions = $entity->sales
|
||||||
->search_between( $start, $next_end )
|
->search_between( $start, $next_end )
|
||||||
->get_column('value')
|
->get_column('value')
|
||||||
->sum + 0;
|
->sum || 0 + 0;
|
||||||
push @{ $data->{ labels } }, $start->day_name;
|
push @{ $data->{ labels } }, $start->day_name;
|
||||||
push @{ $data->{ data } }, $transactions;
|
push @{ $data->{ data } }, $transactions;
|
||||||
$start->add( days => 1 );
|
$start->add( days => 1 );
|
||||||
|
@ -134,7 +134,7 @@ sub _purchases_last_duration {
|
||||||
my $transactions = $entity->purchases
|
my $transactions = $entity->purchases
|
||||||
->search_between( $start, $next_end )
|
->search_between( $start, $next_end )
|
||||||
->get_column('value')
|
->get_column('value')
|
||||||
->sum + 0;
|
->sum || 0 + 0;
|
||||||
push @{ $data->{ labels } }, $start->day_name;
|
push @{ $data->{ labels } }, $start->day_name;
|
||||||
push @{ $data->{ data } }, $transactions;
|
push @{ $data->{ data } }, $transactions;
|
||||||
$start->add( days => 1 );
|
$start->add( days => 1 );
|
||||||
|
|
Reference in a new issue