当前位置: 首页>>代码示例>>PHP>>正文


PHP design::getDesignCategory方法代码示例

本文整理汇总了PHP中design::getDesignCategory方法的典型用法代码示例。如果您正苦于以下问题:PHP design::getDesignCategory方法的具体用法?PHP design::getDesignCategory怎么用?PHP design::getDesignCategory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在design的用法示例。


在下文中一共展示了design::getDesignCategory方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: kpiLeadtimeLoad

/**
 * Construct KPI Leadtime Table
 * @param string $status
 * @param string $kpi_closing_date_start
 * @param string $kpi_closing_date_end
 * @return string
 */
function kpiLeadtimeLoad($kpi_status, $kpi_closing_date_start = '', $kpi_closing_date_end = '')
{
    use_class('jng_sp');
    use_class('design');
    $class_sp = new jng_sp();
    $sp_b2b = array_keys($class_sp->retrieveList('active_status = 1 AND use_amvd_logistic = 1'));
    $target_leadtime = load_config('kpi-leadtime');
    $design_categories = design::getDesignCategory();
    $initial = array('sourcing' => 0, 'depot-refill-orders' => 0, 'internal-levelling-orders' => 0, 'cust-order-mto-mmo' => 0, 'external-levelling-order' => 0, 'full-dso' => 0, 'mto' => 0);
    foreach ($design_categories as $des_cat_id => $des_cat_name) {
        $initial["design-{$des_cat_id}"] = 0;
    }
    $below_target = $initial;
    $on_target = $initial;
    $above_target_1to3d = $initial;
    $above_target_gt3d = $initial;
    $total = $initial;
    $kpi_leadtime_data_o = array();
    //open
    $kpi_leadtime_data_c = array();
    //closed
    //PREPARE KPI LEADTIME DATA
    if ($kpi_status == 'o') {
        //OPEN ORDERS
        //Sourcing
        $q = " SELECT sp_type, item_id, quantity, MIN(status_date) AS date_start FROM";
        $q .= " (";
        $q .= " SELECT 'sp' AS sp_type, joi.jng_sp_orders_items_id AS item_id" . ", joish.status_date, joi.order_quantity AS quantity";
        $q .= " FROM jng_sp_orders_items joi" . " INNER JOIN jng_sp_orders_items_status_history joish ON joish.jng_sp_orders_items_id = joi.jng_sp_orders_items_id" . " AND joish.status = 2";
        $q .= " WHERE joi.status = 2";
        $q .= " UNION";
        $q .= " SELECT 'jg' AS sp_type, op.orders_products_id AS item_id" . ", opsh.status_date, op.products_quantity AS quantity";
        $q .= " FROM orders_products op" . " INNER JOIN orders_products_status_history opsh ON opsh.orders_products_id = op.orders_products_id" . " AND opsh.status = 2";
        $q .= " WHERE op.status = 2";
        $q .= " UNION";
        $q .= " SELECT 'dp' AS sp_type, do.depot_orders_id AS item_id" . ", dosh.update_time AS status_date, do.quantity";
        $q .= " FROM depot_orders do" . " INNER JOIN depot_orders_status_history dosh ON dosh.depot_orders_id = do.depot_orders_id" . " AND dosh.status = 2";
        $q .= " WHERE do.status = 2";
        $q .= ") dt";
        $q .= " GROUP BY sp_type, item_id";
        $dbq = tep_db_query($q);
        while ($r = tep_db_fetch_array($dbq)) {
            //Sourcing Order Type
            $kpi_leadtime_data_o['sourcing'][] = $r;
        }
        //Production
        $q = " SELECT sp_type, item_id, quantity, MIN(status_date) AS date_start, mode, order_type, order_type_id, order_type_name";
        $q .= " FROM (";
        $q .= " SELECT 'sp' AS sp_type, joi.jng_sp_orders_items_id AS item_id" . ", joish.status_date, joi.order_quantity AS quantity, joi.mode" . ", '' AS order_type, '' AS order_type_id, '' AS order_type_name";
        $q .= " FROM jng_sp_orders_items joi" . " INNER JOIN jng_sp_orders_items_status_history joish ON joish.jng_sp_orders_items_id = joi.jng_sp_orders_items_id" . " AND joish.status = 4";
        $q .= " WHERE joi.status = 4";
        $q .= " UNION";
        $q .= " SELECT 'jg' AS sp_type, op.orders_products_id AS item_id" . ", opsh.status_date, op.products_quantity AS quantity, op.mode" . ", '' AS order_type, '' AS order_type_id, '' AS order_type_name";
        $q .= " FROM orders_products op" . " INNER JOIN orders_products_status_history opsh ON opsh.orders_products_id = op.orders_products_id" . " AND opsh.status = 4";
        $q .= " WHERE op.status = 4";
        $q .= " UNION";
        $q .= " SELECT 'dp' AS sp_type, do.depot_orders_id AS item_id" . ", dosh.update_time AS status_date, do.quantity, '' AS mode" . ", trans_type AS order_type, trans_id AS order_type_id, group_name AS order_type_name";
        $q .= " FROM depot_orders do" . " INNER JOIN depot_orders_status_history dosh ON dosh.depot_orders_id = do.depot_orders_id" . " AND dosh.status = 4";
        $q .= " WHERE do.status = 4";
        $q .= ") dt";
        $q .= " GROUP BY sp_type, item_id";
        $dbq = tep_db_query($q);
        while ($r = tep_db_fetch_array($dbq)) {
            if ($r['order_type'] == 'AR' || $r['order_type'] == '' && $r['order_type_id'] == depot_orders::MANUAL_REFILL_ID) {
                //Depot Refill Order Type
                $kpi_leadtime_data_o['depot-refill-orders'][] = $r;
            } elseif ($r['order_type_name'] == depot_orders::GROUP_NAME_LTF_INTERNAL) {
                //Internal Levelling Order Type
                $kpi_leadtime_data_o['internal-levelling-orders'][] = $r;
            } elseif ($r['mode'] == 2 || $r['mode'] == 4) {
                //Customer Orders (MTO/MMO) Order Type
                $kpi_leadtime_data_o['cust-order-mto-mmo'][] = $r;
            }
        }
        //Outsourcing
        $q = " SELECT do.depot_orders_id AS item_id, MIN(dosh.update_time) AS status_date, do.quantity";
        $q .= " FROM depot_orders do" . " INNER JOIN depot_orders_status_history dosh ON dosh.depot_orders_id = do.depot_orders_id" . " AND dosh.status = 22";
        $q .= " WHERE do.status = 22";
        $q .= " AND do.trans_type = '' && do.trans_id = " . depot_orders::MANUAL_REFILL_OUTSOURCED;
        $q .= " GROUP BY item_id";
        $dbq = tep_db_query($q);
        while ($r = tep_db_fetch_array($dbq)) {
            //External Levelling Order Type
            $kpi_leadtime_data_o['external-levelling-order'][] = $r;
        }
        //Customer Order
        $q = " SELECT sp_type, item_id, quantity, MIN(status_date) AS date_start, mode";
        $q .= " FROM (";
        $q .= " SELECT 'sp' AS sp_type, joi.jng_sp_orders_items_id AS item_id" . ", joish.status_date, joi.order_quantity AS quantity, joi.mode";
        $q .= " FROM jng_sp_orders jo " . " INNER JOIN jng_sp_orders_items joi ON joi.jng_sp_orders_id = jo.jng_sp_orders_id" . " INNER JOIN jng_sp_orders_items_status_history joish ON joish.jng_sp_orders_items_id = joi.jng_sp_orders_items_id" . " AND joish.status = 1";
        $q .= " WHERE joi.status < 9 AND jo.jng_sp_id NOT IN (" . implode(',', $sp_b2b) . ")";
        $q .= " UNION";
        $q .= " SELECT 'jg' AS sp_type, op.orders_products_id AS item_id" . ", opsh.status_date, op.products_quantity AS quantity, op.mode";
//.........这里部分代码省略.........
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:101,代码来源:home.php

示例2: design

<?php

#########################################
#  Author  : D3W4 & SAHAT               #
#  Created : Mar 29, 2011 11:00:49 AM    #
#########################################
use_class('products_minierp');
use_class('design');
$design = new design();
$class_pm = new products_minierp();
$pid = tep_db_prepare_input($_GET['pid']);
$d_cat = tep_db_prepare_input($_GET['dcat']);
$d_cat_text = $design->getDesignCategory($d_cat);
$imgsize = '150';
$products = $class_pm->retrieveDetail($pid, 'p');
$design->original_products_id = $pid;
$design->category = $d_cat;
$content .= '<form name="copydesign" method="post" action="?open=designs-detail">';
$content .= '<input type="hidden" name="me_action" value="CREATENEWDESIGN" />';
$content .= '<div style="float:left;margin-left:15px;">';
//LEFT Part open
$margin_left = 15;
$content .= '<div id="image_1" style="float:left;width:' . $imgsize . 'px;height:210px;text-align:center;">';
$content .= '<label><strong>Main Image</strong><br />';
$content .= webImage($products['p']['products_image'], $imgsize, $imgsize, 'Main Image', 'img-border', '') . '</label>';
$content .= '<input type="hidden" name="image_1" value="' . $products['p']['products_image'] . '" />';
$content .= '</div>';
$margin_left += $imgsize;
$margin_left += 30;
$content .= '</div>';
//LEFT Part close
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:products-analysis-rv.php

示例3: loadComboListFromArray

$content .= '</td></tr>';
$content .= '<tr><td>Price</td><td>' . $element_price . '</td></tr>';
$content .= '<tr><td>Image</td><td colspan="2">';
$content .= '<div>';
//$content .= '<iframe id="upload_target" name="upload_target" style="width:0;height:0;border:0px solid #fff;"></iframe>';
//$content .= '<form name="frm_upload_image" action="?open=element" method="post" enctype="multipart/form-data" target="upload_target">';
//$content .= '<input type="hidden" name="me_action" value="ELEMENTUPLOADIMAGE" />';
//$content .= '<input type="hidden" id="image_elements_id" name="elements_id" />';
$content .= '<input type="file" id="upload_image" name="elements_image" disabled="disabled" />';
$content .= ' <span class="notice">* JPG 500x500 pixels</span>';
$content .= '</form>';
$content .= '</div>';
$content .= '</td></tr>';
//$content .= '<tr><td>Wax Complexity</td><td colspan="2">'.$element_wax_complexity.'</td></tr>';
$content .= '<tr><td>Wax Complexity</td><td rowspan="2" width="200">' . $element_wax_complexity . '</td>';
$descat_array = $design->getDesignCategory();
$content .= '<td><form name="el-revision" method="post" action="?open=designs-detail" enctype="multipart/form-data">';
$content .= '<input type="hidden" name="me_action" value="CREATENEWDESIGN" />';
$content .= '<select id="cbo-descat" name="cat" class="input" style="display:none;">' . loadComboListFromArray($descat_array, '', 'E') . '</select>';
$content .= '<input id="el_id" name="element_id" type="hidden" class="input" value="' . $element->id . '" />';
$content .= '<input id="el_name" name="name" type="hidden" class="input" value="Revision element ' . $element->id . '" />';
$content .= '<input type="button" id="el-revision-button" value="Revision" />';
$content .= '</form></td>';
$content .= '</tr>';
$content .= '</table>';
$content .= '</div>';
//STOCKLESS CATEGORY NOTICE
$catnot_bg = '#efefef';
$catnot_fg = '#fcc';
$elcats = $class_ea->retrieveListData('cat');
$elcats_stockless = array();
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:element.php

示例4: drawKPItable

function drawKPItable($kpi_title, $kpi_date = '', $hidetable = false)
{
    global $design;
    use_class('products_minierp');
    $class_pm = new products_minierp();
    $bgst = $class_pm->retrieveBestGoodSettings();
    $kpi_data = array();
    $kpi_target = array();
    $descats = array();
    $descat_count = array();
    $descat_percent = array();
    $kpi_type1 = in_array($kpi_title, array('WIP', 'FIN'));
    //WIP: Work In Progress, FIN: Designs Finalized
    $kpi_type2 = in_array($kpi_title, array('PCATIP', 'PCATF'));
    //PCAT:Products Category >> IP:in Progress, F:Finalized
    $kpi_type3 = in_array($kpi_title, array('PPRIP', 'PPRF'));
    //PPR:Products Price >> IP:in Progress, F:Finalized
    $kpi_type4 = in_array($kpi_title, array('WIPT', 'FINT'));
    //WIPT: Work In Progress Type, FIN: Designs Finalized Type
    $ksd = generateKPISupportData($kpi_title, $kpi_date);
    $q = $ksd['q'];
    $kpi_id = $ksd['kpi_id'];
    $kpi_header = $ksd['kpi_header'];
    $r = tep_db_query($q);
    if ($kpi_type1) {
        $kpi_target['W'] = $bgst['kpides_catnw'];
        $kpi_target['R'] = $bgst['kpides_catr'];
        while ($row = tep_db_fetch_array($r)) {
            $kpi_data[$row['designs_category']] = $row['total_designs'];
        }
        $descats = design::getDesignCategory();
        if (array_key_exists('', $kpi_data)) {
            $descats[''] = '<span class="red">Unset</span>';
        }
    } elseif ($kpi_type2) {
        $kpi_target[2] = $bgst['kpides_prodnl'];
        $kpi_target[3] = $bgst['kpides_prodbl'];
        $kpi_target[4] = $bgst['kpides_proder'];
        $kpi_target[9] = $bgst['kpides_prodch'];
        $kpi_target[28] = $bgst['kpides_prodpn'];
        $kpi_target[29] = $bgst['kpides_prodrg'];
        $kpi_target[30] = $bgst['kpides_prodset'];
        $kpi_target[33] = $bgst['kpides_prodan'];
        while ($row = tep_db_fetch_array($r)) {
            $kpi_data[$row['products_category_id']] = $row['total_designs'];
        }
        $pcs = getProductsCategorySupportData();
        $q = "SELECT {$pcs['field_id']} AS id, {$pcs['field_name']} AS name FROM {$pcs['tables']} WHERE {$pcs['filter']}";
        $dbq = tep_db_query($q);
        while ($r = tep_db_fetch_array($dbq)) {
            $descats_temp[$r['id']] = $r['name'];
        }
        //SORT Product Category as Requested by user
        $descats_sorts = array(4 => 1, 2 => 2, 3 => 3, 29 => 4, 30 => 5, 9 => 6, 28 => 7, 33 => 8, 35 => 9);
        foreach ($descats_temp as $key => $val) {
            $descats_temp2[$descats_sorts[$key]] = $key;
        }
        ksort($descats_temp2);
        foreach ($descats_temp2 as $val) {
            $descats[$val] = $descats_temp[$val];
        }
    } elseif ($kpi_type3) {
        $kpi_target[1] = $bgst['kpides_pr1target'];
        $kpi_target[2] = $bgst['kpides_pr2target'];
        $kpi_target[3] = $bgst['kpides_pr3target'];
        $kpi_target[4] = $bgst['kpides_pr4target'];
        $kpi_target[5] = $bgst['kpides_pr5target'];
        $kpi_target[6] = $bgst['kpides_pr6target'];
        $kpi_target[7] = $bgst['kpides_pr7target'];
        $kpi_target[8] = $bgst['kpides_pr8target'];
        while ($row = tep_db_fetch_array($r)) {
            if ($row['target_price'] >= $bgst['kpides_pr1bgn'] && $row['target_price'] <= $bgst['kpides_pr1end']) {
                $kpi_data[1] += $row['total_designs'];
            } elseif ($row['target_price'] >= $bgst['kpides_pr2bgn'] && $row['target_price'] <= $bgst['kpides_pr2end']) {
                $kpi_data[2] += $row['total_designs'];
            } elseif ($row['target_price'] >= $bgst['kpides_pr3bgn'] && $row['target_price'] <= $bgst['kpides_pr3end']) {
                $kpi_data[3] += $row['total_designs'];
            } elseif ($row['target_price'] >= $bgst['kpides_pr4bgn'] && $row['target_price'] <= $bgst['kpides_pr4end']) {
                $kpi_data[4] += $row['total_designs'];
            } elseif ($row['target_price'] >= $bgst['kpides_pr5bgn'] && $row['target_price'] <= $bgst['kpides_pr5end']) {
                $kpi_data[5] += $row['total_designs'];
            } elseif ($row['target_price'] >= $bgst['kpides_pr6bgn'] && $row['target_price'] <= $bgst['kpides_pr6end']) {
                $kpi_data[6] += $row['total_designs'];
            } elseif ($row['target_price'] >= $bgst['kpides_pr7bgn'] && $row['target_price'] <= $bgst['kpides_pr7end']) {
                $kpi_data[7] += $row['total_designs'];
            } elseif ($row['target_price'] > $bgst['kpides_pr8bgn']) {
                $kpi_data[8] += $row['total_designs'];
            }
        }
        $descats[1] = "{$bgst['kpides_pr1bgn']} - {$bgst['kpides_pr1end']}";
        $descats[2] = "{$bgst['kpides_pr2bgn']} - {$bgst['kpides_pr2end']}";
        $descats[3] = "{$bgst['kpides_pr3bgn']} - {$bgst['kpides_pr3end']}";
        $descats[4] = "{$bgst['kpides_pr4bgn']} - {$bgst['kpides_pr4end']}";
        $descats[5] = "{$bgst['kpides_pr5bgn']} - {$bgst['kpides_pr5end']}";
        $descats[6] = "{$bgst['kpides_pr6bgn']} - {$bgst['kpides_pr6end']}";
        $descats[7] = "{$bgst['kpides_pr7bgn']} - {$bgst['kpides_pr7end']}";
        $descats[8] = "&gt;&nbsp;{$bgst['kpides_pr8ge']}";
    } elseif ($kpi_type4) {
        $kpi_target['I'] = $bgst['kpides_typib'];
        $kpi_target['E'] = $bgst['kpides_typeb'];
//.........这里部分代码省略.........
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:101,代码来源:designs-manage.php


注:本文中的design::getDesignCategory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。