<?php
if (!empty($$class->ledger_id)) {
 $all_periods = gl_period::find_all_periods($$class->ledger_id);
 $period_name_stmt = form::select_field_from_object('period_id', $all_periods, 'gl_period_id', 'period_name', $$class->period_id, 'gl_period_id', '', '', '', 1);
}


if (!empty($_GET['ledger_id'])) {
 $ledger_id_h = $_GET['ledger_id'];
 } else {
 $ledger_id_h = null;
 }
 
 if (!empty($_GET['gl_budget_id'])) {
 $gl_budget_id_h = $_GET['gl_budget_id'];
 } else {
 $gl_budget_id_h = null;
 }
 
 if (!empty($_GET['gl_budget_ac_header_id'])) {
 $gl_budget_ac_header_id_h = $_GET['gl_budget_ac_header_id'];
 } else {
 $gl_budget_ac_header_id_h = null;
 }
 
 if (!empty($_GET['currency'])) {
 $currency_h = $_GET['currency'];
 } else {
 $currency_h = null;
 }

 
if(empty($budget_ac_object)){
 $budget_ac_object = [new gl_budget_entry()];
}

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


?>