$itrans = $class_jo->retrieveItemDetail($do['trans_id']); $otrans = $class_jo->retrieveDetail($itrans['jng_sp_orders_id']); $bih_start_date = $otrans['order_date']; $order_source = $class_do->translateOrderSource($do['trans_type'], $do['trans_id'], false, $itrans['jng_sp_orders_id'], $do['products_id']); } elseif ($do['trans_type'] == 'JG') { use_class('orders'); $class_o = new orders(); $itrans = $class_o->retrieveProductDetail($do['trans_id']); $otrans = $class_o->retrieveDetail($itrans['orders_id']); $bih_start_date = $otrans['date_purchased']; $order_source = $class_do->translateOrderSource($do['trans_type'], $do['trans_id'], false, $itrans['orders_id'], $do['products_id']); } else { $order_source = $class_do->translateOrderSource($do['trans_type'], $do['trans_id'], false, null, $do['products_id']); } $status_date = null; $history = $class_do->retrieveHistory($order_id); $history_prod = retrieveProductionHistory('DP', $order_id); $htable = array(); $ht = array(); $ht['sort'] = 'No'; $ht['date_add'] = 'Date'; $ht['status'] = 'Status'; $ht['login'] = '******'; $htable[] = $ht; $hcount = 1; $ht = array(); $ht['sort'] = $hcount; $ht['date_add'] = date('d.m.y H:i:s', $do_timestamp); $ht['status'] = $statusName[1]; $ht['login'] = '******'; $htable[] = $ht;