Ejemplo n.º 1
0
    $atds = true;
    //PLEASE USE FALSE WHEN DEBUGGING FOR ERRORS, SO IT WONT ADDED TO DAILY STATISTIC
}
//MAKE TROLLEY ARRAY DIMENSIONS
$trolley = array();
for ($tbox = 1; $tbox <= $trolley_box; $tbox++) {
    for ($tbins = 1; $tbins <= $trolley_bins_per_box; $tbins++) {
        $trolley["{$tbox}-{$tbins}"] = null;
    }
}
current($trolley);
//echo "<pre>";var_dump($trolley[key($trolley)]);die();
$filter = $PRINT_RETAILS ? 'jo.jng_sp_id=6' : 'jo.jng_sp_id NOT IN (5,6,7,9)';
$filter .= $filter_ir_sp;
$barcode_prefix = $PRINT_RETAILS ? 'JR' : 'SP';
$sp_orders = $class_jo->retrieveOrdersItemsFromDepo($inhh_status, WAREHOUSE_ID_PRODUCTS_HAMBURG, "", $filter);
$pick_from_racks = array();
$prev_oid = '';
foreach ($sp_orders as $oiid => $oi) {
    $oid = $barcode_prefix . 'O' . $oi['jng_sp_orders_id'];
    $ean_id = $oi['products_id'] . '-' . $oi['products_articles_id'];
    $oi['order_quantity'] = intval($oi['order_quantity']);
    if ($prev_oid != $oid && count($orders) >= $trolley_capacity) {
        break;
    }
    if (!isset($orders[$oid])) {
        $orders[$oid] = array();
        $orders_barcode[$oid] = $barcode_prefix . '-' . $oiid;
    }
    if (!isset($bin_location_qty_collection[$oi['bin_code']])) {
        $bin_location_qty_collection[$oi['bin_code']] = 0;
Ejemplo n.º 2
0
if ($tc == '') {
    $tc = '8;9';
}
//DEFAULT TROLLEY BINS DIMENSION (8 box, 9 bins per box)
list($trolley_box, $trolley_bins_per_box) = split(';', $tc);
$trolley_capacity = $trolley_box * $trolley_bins_per_box;
//MAKE TROLLEY ARRAY DIMENSIONS
$trolley = array();
for ($tbox = 1; $tbox <= $trolley_box; $tbox++) {
    for ($tbins = 1; $tbins <= $trolley_bins_per_box; $tbins++) {
        $trolley["{$tbox}-{$tbins}"] = null;
    }
}
current($trolley);
//echo "<pre>";var_dump($trolley[key($trolley)]);die();
$sp_orders = $class_jo->retrieveOrdersItemsFromDepo($inhh_status, WAREHOUSE_ID_PRODUCTS_HAMBURG, 'jo.order_date ASC, jo.order_id ASC, joi.products_ean ASC', "jo.jng_sp_id={$jng_sp_id} {$filter_ir}");
$pick_from_racks = array();
$prev_oid = '';
foreach ($sp_orders as $oiid => $oi) {
    $oid = 'SPO' . $oi['order_id'];
    $ean = $oi['products_ean'];
    $ean_id = $oi['products_id'] . '-' . $oi['products_articles_id'];
    $oi['order_quantity'] = intval($oi['order_quantity']);
    if ($prev_oid != $oid && count($orders) >= $trolley_capacity) {
        break;
    }
    if (!isset($orders[$oid])) {
        $orders[$oid] = array();
        //$orders_barcode[$oid] = 'SP-'.$oiid;
        $orders_barcode[$oid] = $prefix . '-' . $oi['order_id'];
    }
Ejemplo n.º 3
0
         //end .kpi-infobox
         $result .= '<div style="padding-bottom:10px;"><strong>Query Date </strong><input type="text" id="kpiprod" title="select date to load statistic on graph" class="date_picker input" readonly="readonly" value="' . $date_id_userformat . '"/></div>';
         $result .= '<div id="kpi-prod-content">';
         $result .= '<div id="kpi-prod-graph"></div>';
         $result .= '<div style="margin-top:10px;"><input id="btn-show-fullscreen" type="button" class="button" value="Show Fullscreen for Production LCD Display"/>';
         $result .= '<div id="kpi-prod-tables" style="margin-top:20px;">';
         $result .= $kpi_prod_daily_output;
         $result .= '</div>';
         //end #kpi-prod-tables
         $result .= '</div>';
         //end #kpi-prod-content
         $result .= '</div>';
     }
 } elseif ($_GET['week-sum'] == 'KPI-LOG') {
     $inhh_status = '8';
     $sp_orders_main = $class_jo->retrieveOrdersItemsFromDepo($inhh_status, WAREHOUSE_ID_PRODUCTS_HAMBURG, "", "jo.jng_sp_id!='5'");
     $sp_orders_amvd = $class_jo->retrieveOrdersItemsFromDepo($inhh_status, WAREHOUSE_ID_PRODUCTS_HAMBURG, "", "jo.jng_sp_id='5'");
     $sp_orders_amvd_total = count($sp_orders_amvd);
     $jg_orders = $class_o->retrieveOrdersItemsFromDepo($inhh_status, WAREHOUSE_ID_PRODUCTS_HAMBURG);
     $orders = array();
     $products = count($sp_orders_main) + $sp_orders_amvd_total + count($jg_orders);
     $products_qty = 0;
     foreach ($sp_orders_main as $oiid => $oi) {
         $products_qty += $oi['order_quantity'];
         $oid = 'SPO' . $oi['jng_sp_orders_id'];
         if (!in_array($oid, $orders)) {
             $orders[] = $oid;
         }
     }
     foreach ($sp_orders_amvd as $oiid => $oi) {
         $products_qty += $oi['order_quantity'];
Ejemplo n.º 4
0
use_class('orders');
use_class('jng_sp_orders');
$class_o = new orders();
$class_jo = new jng_sp_orders();
$inhh_status = '8';
$whid_fg_hh = '5';
//exclude order which product need repackaged by HH team
$filter_exclude_repackage_sp = ' AND jo.need_repackaging != 1';
$filter_exclude_repackage_jg = 'o.need_repackaging != 1';
//include order which product need repackaged by HH team
$filter_include_repackage_sp = ' AND jo.need_repackaging = 1';
$filter_include_repackage_jg = 'o.need_repackaging = 1';
//------------------------------------------------------------------------------
//SP NORMAL ORDERS
$sp_orders = $class_jo->retrieveOrdersItemsFromDepo($inhh_status, $whid_fg_hh, "", "jo.jng_sp_id NOT IN (5,6,7,9) {$filter_exclude_repackage_sp}");
//JG NORMAL ORDERS
$jg_orders = $class_o->retrieveOrdersItemsFromDepo($inhh_status, $whid_fg_hh, "", $filter_exclude_repackage_jg);
$orders_total = count($sp_orders) + count($jg_orders);
//SP NEED REPACKAGE
$sp_orders_r = $class_jo->retrieveOrdersItemsFromDepo($inhh_status, $whid_fg_hh, "", "jo.jng_sp_id NOT IN (5,6,7,9) {$filter_include_repackage_sp}");
//JG NEED REPACKAGE
$jg_orders_r = $class_o->retrieveOrdersItemsFromDepo($inhh_status, $whid_fg_hh, "", $filter_include_repackage_jg);
$orders_total_r = count($sp_orders_r) + count($jg_orders_r);
//------------------------------------------------------------------------------
//AMAZON VENDOR NORMAL ORDERS
$sp_orders_amvd = $class_jo->retrieveOrdersItemsFromDepo($inhh_status, $whid_fg_hh, "", "jo.jng_sp_id = 5 {$filter_exclude_repackage_sp}");
$orders_total_amvd = count($sp_orders_amvd);
//AMAZON VENDOR NEED REPACKAGE
$sp_orders_amvd_r = $class_jo->retrieveOrdersItemsFromDepo($inhh_status, $whid_fg_hh, "", "jo.jng_sp_id = 5 {$filter_include_repackage_sp}");
$orders_total_amvd_r = count($sp_orders_amvd_r);