<?php

if (!empty($_GET['option_line_code'])) {
 $option_line_code_h = $_GET['option_line_code'];
 $calendar_object = gl_calendar::find_by_optionLineCode($option_line_code_h);
} else {
 $option_line_code_h = null;
}

$job_id_h = !empty($_GET['job_id']) ? ($_GET['job_id']) : null;
$bu_org_id_h = !empty($_GET['bu_org_id']) ? ($_GET['bu_org_id']) : null;
$position_id_h = !empty($_GET['position_id']) ? ($_GET['position_id']) : null;

$hras = new hr_approval_limit_assign();
$hras->position_id = $position_id_h;
$hras->job_id = $job_id_h;
$hras->bu_org_id = $bu_org_id_h;

$approval_limit_assignment_object = $hras->findBy_params();

if (empty($approval_limit_assignment_object)) {
 $approval_limit_assignment_object = [new hr_approval_limit_assign()];
}

$pageno = !empty($_GET['pageno']) ? $_GET['pageno'] : 1;
$per_page = !empty($_GET['per_page']) ? $_GET['per_page'] : 10;
$total_count = count($approval_limit_assignment_object);
$pagination = new pagination($pageno, $per_page, $total_count);
$pagination->setProperty('_path', 'form');
$position = ($pageno - 1) * $per_page;

?>