Merged in bugfix/PMC-798 (pull request #6904)

PMC-798

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2019-05-27 12:42:44 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 213 additions and 162 deletions

View File

@@ -177,7 +177,7 @@ class Delegation extends Model
});
// Add join for process, but only for certain scenarios such as category or process
if (($category && !$process) || $sort == 'APP_PRO_TITLE') {
if ($category || $process || $sort == 'APP_PRO_TITLE') {
$query->join('PROCESS', function ($join) use ($category) {
$join->on('APP_DELEGATION.PRO_ID', '=', 'PROCESS.PRO_ID');
if ($category) {