Commit a23573d2 authored by Nigel Kukard's avatar Nigel Kukard

Output error properly for reporting

parent 9c3d0445
......@@ -470,6 +470,9 @@ sub sendReport
$tmp->{'EndDate'} = $detail->{'EndDate'};
$tmp->{'Type'} = $types;
my $transactions = wiaflos::server::core::GL::getGLTransactions($tmp);
if (ref($transactions) ne "ARRAY") {
wiaflos::server::core::templating::abort('api_gl_transactions',$accounts,wiaflos::server::core::GL::Error());
}
# Sort based on transaction date
@{$transactions} = sort { $a->{'TransactionDate'} cmp $b->{'TransactionDate'} } @{$transactions};
# Loop and process
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment