<?php

if (!empty($_GET['pm_batch_header_id'])) {
 $pm_batch_header_id = filter_var($_GET['pm_batch_header_id'], FILTER_SANITIZE_NUMBER_INT);
 $boph = pm_batch_header::find_by_id($pm_batch_header_id);
 if (!empty($boph)) {
  foreach ($boph as $k => $v) {
   if (property_exists($$class, $k)) {
    $$class->$k = $v;
   }
  }
 }

 $pm_batch_operation_line_object = pm_batch_operation_line::find_by_ColumnNameVal('pm_batch_header_id', $pm_batch_header_id);
}

if (!empty($$class->pm_recipe_header_id)) {
 $pm_recipe_i = pm_recipe_all_v::find_by_id($$class->pm_recipe_header_id);
 $$class->recipe_name = $pm_recipe_i->recipe_name;
 $$class->routing_name = $pm_recipe_i->routing_name;
 $$class->formula_name = $pm_recipe_i->formula_name;
} else {
 $$class->routing_name = $$class->formula_name = null;
}

if (empty($pm_batch_operation_line_object)) {
 $pm_batch_operation_line_object = [new pm_batch_operation_line()];
}

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