<?php

 if (!empty($_GET['bu_org_id'])) {
  $$class->bu_org_id = $_GET['bu_org_id'];
 }

 if (!empty($_GET['class_name']) && $_GET['class_name'] == 'inv_receipt_line') {
  $mode = 2; $readonly = 1;
  $class = 'inv_ir_receipt_header';
  $$class = new $class;

  $class_second = 'inv_receipt_line';
  $$class_second = new $class_second;
  if (!empty($_GET['inv_receipt_line_id'])) {
   $inv_receipt_line_object = array(inv_receipt_line::find_by_id($_GET['inv_receipt_line_id']));
   $$class->inv_receipt_header_id = $inv_receipt_line_object[0]->inv_receipt_header_id;
   $$class->findBy_id($$class->inv_receipt_header_id);
  } else {
   $inv_receipt_line_object = array(new inv_receipt_line());
  }
 }

//$po_line = new po_line();
//$po_detail = new po_detail();

 if (empty($$class->receipt_date)) {
  $$class->receipt_date = current_time(true);
 }

 if (empty($$class->transaction_type_id)) {
  $$class->transaction_type_id = 33;
 }

 if ((!empty($$class->approval_status)) && ($$class->approval_status == 'CANCELLED')) {
  $mode = 2;
  $readonly = 1;
 }
?>
