<?php

if (empty($$class->status)) {
 $$class->status = 'NEW';
}

if (empty($$class->escalation)) {
 $$class->escalation = 'NORMAL';
}

if (empty($$class->requester_user_id)) {
 $$class->requester_user_id = $ino_user->ino_user_id;
}

if (empty($$class->requester_username)) {
 $$class->requester_username = $ino_user->username;
}
if (empty($$class->requester_email)) {
 $$class->requester_email = $ino_user->email;
}

if (empty($$class->requester_phone)) {
 $$class->requester_phone = $ino_user->phone;
}

$customer_site_obj = [];
if (!empty($$class->ar_customer_site_id)) {
 $arc = new ar_customer_site();
 $arc_i = $arc->findBy_id($$class->ar_customer_site_id);
 array_push($customer_site_obj, $arc_i);
}

if(!empty($$class->item_id_m)){
 $$class->item_number = item::find_by_id($$class->item_id_m)->item_number;
}

if(!empty($$class->inv_serial_number_id)){
 $$class->serial_number = inv_serial_number::find_by_id($$class->inv_serial_number_id)->serial_number;
}

?>