<?php 

if ((!empty($_GET['org_id'])) && (!empty($_GET['ar_customer_id']))) {
  $org_id = $_GET['org_id'];
 $customer_id = $_GET['ar_customer_id'];
  $$class->org_id = $_GET['org_id'];
 $$class->ar_customer_id = $_GET['ar_customer_id'];
 
  if(ar_customer_bu::find_by_orgId_customerId($customer_id, $org_id)){
 $ar_customer_bu = ar_customer_bu::find_by_orgId_customerId($customer_id, $org_id);
 }
 

}

 if((!empty( $$class->org_id)) && ( $$class->ar_customer_id)){
 $customer = ar_customer::find_by_id($$class->ar_customer_id);
 $org = org::find_by_id($$class->org_id);
 $$class->customer_name = $customer->customer_name;
 $$class->customer_number = $customer->customer_number;
 $$class->org = $org->org;
 }

if ((!empty($$class->$primary_column)) && (!empty($class::$addressField_array))) {
 foreach ($class::$addressField_array as $key => $value) {
	if (!empty($$class->$value)) {
	 $address = address::find_by_id($$class->$value);
	} else {
	 $address = new address();
	}
	$$value = address::show_adrees_details($address);
 }
}

if (!empty($$class->$primary_column)) {
 $customer_bu_file = extn_file::find_by_reference_table_and_id('ar_customer_bu', $$class->ar_customer_bu_id);
}
?>