<?php
$cust = new ar_customer();
if (!empty($$class->ar_customer_id)) {
 $cust->findBy_id($$class->ar_customer_id);
 $$class->customer_name = $cust->customer_name;
} else {
 $$class->customer_name = null;
}


if (!empty($_GET['fp_forecast_header_id']) && empty($fp_forecast_line_object)) {
 $fp_forecast_line_object = fp_forecast_line::find_by_parent_id($_GET['fp_forecast_header_id']);
} 

if(empty($fp_forecast_line_object)){
 $fp_forecast_line_object = [new fp_forecast_line()];
}

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

//if (!empty($fp_forecast_line_object)) {
// foreach ($fp_forecast_line_object as &$fp_forecast_line1) {
//	if (!empty($fp_forecast_line1->item_id_m)) {
//	 $item->findBy_id($fp_forecast_line1->item_id_m);
//	 $fp_forecast_line1->item_number = $item->item_number;
//	 $fp_forecast_line1->item_description = $item->item_description;
//	 $fp_forecast_line1->uom_id = $item->uom_id;
//   $fp_forecast_line1->current = null;
//   $fp_forecast_line1->total_current = null;
//	} 
// }
//}

?>
