<?php

if (!empty($_GET['coa_id'])) {
 $coa_id_h = $_GET['coa_id'];
 $coa_combination_object = coa_combination::find_all_from_coa($coa_id_h);
} else if (!empty($_GET['coa_combination_id'])) {
 $coa_combination_i = coa_combination::find_by_id($_GET['coa_combination_id']);
 $coa_combination_object = array($coa_combination_i);
 $coa_id_h = $coa_combination_i->coa_id;
} else {
 $coa_id_h = null;
}
if (empty($coa_combination_object)) {
 $coa_combination_object = [new coa_combination()];
}

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