<?php

if(!empty($$class->item_id_m)){
 $item = new item();
 $item->findBy_id($$class->item_id_m);
 $$class->item_number = $item->item_number;
 $$class->item_description = $item->item_description;
 $$class->uom = $item->uom_id;	 
}

if (!empty($ar_receipt_line_object)) {
 foreach ($ar_receipt_line_object as &$ar_receipt_lines) {
	if (!empty($ar_receipt_lines->ar_transaction_header_id)) {
	 $arth = new ar_transaction_header();
	 $arth_i = $arth->findBy_id($ar_receipt_lines->ar_transaction_header_id);
	 $ar_receipt_lines->transaction_number = $arth_i->transaction_number;
	 $ar_receipt_lines->invoice_amount  = $arth_i->header_amount;
	 $ar_receipt_lines->receipt_amount = $arth_i->receipt_amount;
	 $ar_receipt_lines->remaining_amount = $arth_i->header_amount - $arth_i->receipt_amount;
	} else {
	 $ar_receipt_lines->remaining_amount = null;
	 $ar_receipt_lines->transaction_number = null;
	 $ar_receipt_lines->invoice_amount  = null;
	 $ar_receipt_lines->receipt_amount  = null;
	}
	
 }
}

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