Ejemplo n.º 1
0
use_class('depot_orders');
use_class('bins');
$class_do = new depot_orders();
$class_bin = new bins();
$id = tep_db_prepare_input($_GET['id']);
$package = $class_do->packageDetail($id);
if (is_null($package)) {
    $package_code = '';
    $content .= '<h3 class="red">Package Not Found</h3>';
} else {
    $package_code = $package['package_code'];
    $sent_date = is_null($package['sent_date']) ? '<span class="notice">UNSET</span>' : date('d F Y', strtotime($package['sent_date']));
    $received_date = is_null($package['received_date']) ? '<span class="notice">UNSET</span>' : date('d F Y', strtotime($package['received_date']));
    $segment = $class_bin->retrieveSegmentDetail($package['segments_id']);
    $contents = $class_do->packageGetContents($id);
    $contents_table = array();
    $ct = array();
    $ct['d'] = 'Date';
    $ct['o'] = 'Order ID';
    $ct['e'] = 'Order Source';
    $ct['a'] = 'Article No';
    $ct['a2'] = 'EAN';
    $ct['q'] = 'Quantity';
    $ct['d2'] = 'Time Added';
    $contents_table[] = $ct;
    $counter_orders = 0;
    $counter_products = 0;
    foreach ($contents as $do) {
        $counter_orders++;
        $counter_products += $do['quantity'];