<?php $class_second = 'am_wo_routing_line'; $$class_second = &$am_wo_routing_line;?><?php if (!empty($_GET["am_wo_header_id"]) && (!is_array($_GET["am_wo_header_id"]))) {  $am_wo_header_id = ($_GET["am_wo_header_id"]);  $wwrv = new am_wo_routing_v();  $wwrv->am_wo_header_id = $am_wo_header_id;  $wwrv_i = $wwrv->findBy_woHeaderId();  $am_wo_header = am_wo_header::find_by_id($am_wo_header_id);  $$class->am_wo_header_id = $am_wo_header_id;  $$class->wo_number = $wwrv_i[0]->wo_number;  $$class->total_quantity = $wwrv_i[0]->quantity;  $$class->item_number = $wwrv_i[0]->item_number;  $$class->item_description = $wwrv_i[0]->item_description;  $$class->uom = $wwrv_i[0]->uom_id;  $$class->item_id_m = $wwrv_i[0]->item_id_m;  $$class->org_id = $wwrv_i[0]->org_id;  $am_wo_routing_detail_object = &$wwrv_i;  if (empty($am_wo_routing_detail_object)) {   $am_wo_routing_detail_object = array($wwrv);   } }//for WIP Resource transaction view  if (!empty($_GET["am_resource_transaction_id"]) && (!is_array($_GET["am_resource_transaction_id"]))) {  $am_resource_transaction_id = $_GET["am_resource_transaction_id"];  $am_wo_header_id = $$class->am_wo_header_id;  $am_wo_header = am_wo_header::find_by_id($am_wo_header_id);  $am_wo_routing_detail_object = [];  $$class->total_quantity = $am_wo_header->quantity;  $item = item::find_by_id($am_wo_header->item_id_m);  $$class->item_id_m = $am_wo_header->item_id_m;  $$class->wo_number = $am_wo_header->wo_number;  $$class->item_number = $item->item_number;  $$class->item_description = $item->item_description;  $$class->uom = $item->uom_id;  $am_wo_routing_line = am_wo_routing_line::find_by_id($$class->am_wo_routing_line_id);  foreach ($am_wo_routing_line as $key => $value) {   if (empty($$class->$value)) {    $$class->$key = $value;   }  }      $am_wo_routing_detail = am_wo_routing_detail::find_by_id($$class->am_wo_routing_detail_id);  foreach ($am_wo_routing_detail as $key => $value) {   if (empty($$class->$value)) {    $$class->$key = $value;   }  }  array_push($am_wo_routing_detail_object, $$class);  $readonly = 1;  $mode = 2; } if (empty($_GET["am_resource_transaction_id"]) && (empty($_GET["am_wo_header_id"]))) {  $am_wo_routing_detail_object = array(new am_wo_routing_detail()); } if (empty($$class->transaction_date)) {  $$class->transaction_date = current_time(true); } $$class->transaction_type = 'am_RESOURCE_TRANSACTION';?>