<?php use_class('jng_sp_orders'); $class_jo = new jng_sp_orders(); use_class('products_minierp'); $class_pm = new products_minierp(); $oi_id = tep_db_prepare_input($_GET['oi_id']); $statusName = $class_jo->statusName(); $item = $class_jo->retrieveItemDetail($oi_id); $product = $class_pm->retrieveDetail($item['products_id'], 'p'); $order = $class_jo->retrieveDetail($item['jng_sp_orders_id']); $history = $class_jo->retrieveItemHistory($oi_id); $history_prod = retrieveProductionHistory('SP', $oi_id); $htable = array(); $ht = array(); $ht['sort'] = 'No'; $ht['date_add'] = 'Date'; $ht['status'] = 'Status'; //$ht['qty'] = 'Qty'; $ht['login'] = '******'; $htable[] = $ht; $count = 0; $total_history = count($history); $prev_info = array(); foreach ($history as $hk => $h) { $count++; $timestamp = strtotime($h['status_date']); $ht = array(); $ht['sort'] = $count; $ht['date_add'] = date('d.m.y H:i:s', $timestamp); $ht['status'] = $statusName[$h['status']];
<?php use_class('jng_sp'); use_class('jng_sp_orders'); use_class('payone'); $class_sp = new jng_sp(); $class_jo = new jng_sp_orders(); $default_comment = 'Comment...'; //SP SETTING salesPartnerCombo(); if (isset($_POST['me_action']) && $_POST['me_action'] != '') { if ($_POST['me_action'] == 'SEARCHORDERS') { $search_field = tep_db_prepare_input($_POST['search_field']); $search_keywords = tep_db_prepare_input(utf8_decode($_POST['search_keywords'])); $orders = $class_jo->searchOrders($search_field, $search_keywords, "joi.status IN (9,11)"); $itemStatus = $class_jo->statusName(); $result = ''; if (count($orders) == 0) { $result .= '<h3>No result is found, please check your search field/keywords</h3>'; } else { $orders_result = array(); $o = array(); $o['c'] = 'Order Info'; $o['a'] = 'Article No'; $o['r'] = 'Return Info'; $o['t'] = 'Action'; $orders_result[] = $o; foreach ($orders as $row) { $returnable = $row['order_quantity']; $return_data = $class_jo->retrieveReturnItem($row['jng_sp_orders_items_id']); if (!is_null($return_data)) {
$o['counter'] = $display_counter; $o['shipping_name'] = $name; $o['shipping_address'] = $address; $o['shipping_city'] = $city; $o['shipping_postcode'] = $postcode; $o['cod'] = $cod; return $o; } $result = array(); $result['status'] = 'NONE'; if ($order_type == 'SP') { use_class('jng_sp_orders'); $class_jo = new jng_sp_orders(); $i_temporary = $class_jo->retrieveItemDetail($item_id); if (isset($i_temporary['status']) && $i_temporary['status'] != $REQUIRED_STATUS) { $i_status = $class_jo->statusName(); $result['status'] = 'BADSTATUS'; $result['badstatus'] = $i_status[$i_temporary['status']]; } else { $order_id = $i_temporary['jng_sp_orders_id']; $order = $class_jo->retrieveDetail($order_id); if (isset($order['jng_sp_orders_id'])) { $display_counter = dailyCounterNo($order['order_date'], $order['daily_count']); $shipping_name = $order['customer_shipping_firstname'] . ' ' . $order['customer_shipping_lastname']; $shipping_address = $order['customer_shipping_address']; $cod_value = 0; switch ($order['jng_sp_id']) { case '1': //NM.DE $reference = $order['shipment_id']; break;