Skip to content

Commit

Permalink
ER:Add a link into leave balance report if there is a diagnostic alert
Browse files Browse the repository at this point in the history
  • Loading branch information
bbalet committed Feb 11, 2017
1 parent 214d317 commit 6d2ec75
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion application/controllers/reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,18 @@ public function executeBalanceReport() {
$tbody .= '</tr>';
$line++;
}
$table = '<table class="table table-bordered table-hover">' .

//Check if there is any diagnostic alert on balance (LR without entitlments)
$alerts = $this->leaves_model->detectBalanceProblems();
if (count($alerts)) {
$table = "<div class='alert'>" .
"<button type='button' class='close' data-dismiss='alert'>&times;</button>" .
"<a href='" . base_url() . "admin/diagnostic#balance'>" .
"<i class='fa fa-exclamation-triangle' aria-hidden='true'></i>" .
"&nbsp;Error</a>" .
"</div>";
}
$table .= '<table class="table table-bordered table-hover">' .
'<thead>' .
'<tr>' .
$thead .
Expand Down

0 comments on commit 6d2ec75

Please sign in to comment.