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


PHP products_minierp::retrieveBestGoodSettings方法代码示例

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


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

示例1: actualStockReport

/**
 *
 * @param Int $actual_stock Stock qty we're actually having on related depot warehouse
 * @param Int $weight Product weight (0 for virtual product like voucher)
 * @param Int $stars Current stars of product
 * @param String $complexity Complexity flag of product
 * @param Int $age Current age of product
 * @param Int $total_sold_lastyear Last year total sold of product
 * @param Int $total_sold_thisyear This year total sold of product
 * @param Int $jng_sp_id Specified SP, this parameter can accept 2 values, 
 *  1) string or integer of jng_sp_id and 
 *  2) array result of class jng_sp function retrieveDetail
 * @param Int $reported_stock Virtual stock qty of a product to report to SP
 * @param Int $delivery_time Standard delivery time of a product to report to SP
 * @param Boolean $is_wholesale_product
 * @return Array 
 * <strong>stock</strong> = total stock to be reported to specified SP
 * <br /><strong>stock_isreal</strong> = flag if stock is real (1) or virtual (0)
 * <br /><strong>stock_ishide</strong> = flag to show (1) or hide (0) stock depending on special cases
 * <br /><strong>delivery_time</strong> = number of days the product can be delivered
 */
function actualStockReport($actual_stock, $weight, $stars, $complexity, $age, $total_sold_lastyear, $total_sold_thisyear, $total_sold_last30d, $jng_sp_id, $reported_stock, $delivery_time, $is_wholesale_product = false)
{
    //use below global variable so we only need to set the settings once even if the function called multiple times
    if ($weight > 0) {
        global $actualStockReport_settings;
        if (!isset($actualStockReport_settings) || !is_array($actualStockReport_settings)) {
            use_class('products_minierp');
            $class_pm = new products_minierp();
            $bgst = $class_pm->retrieveBestGoodSettings();
            $actualStockReport_settings = array();
            $actualStockReport_settings['jng_sp_id_affected_by_nostock_flag'] = array('JNG', '2');
            //group of sp that will be affected by all hide flag
            $actualStockReport_settings['hide_hard_flag'] = $bgst['hidenostock_hard'] == '1';
            $actualStockReport_settings['hide_extreme_flag'] = $bgst['hidenostock_xtreme'] == '1';
            $actualStockReport_settings['hide_nostock_flag'] = $bgst['hidenostock_somesp'] == '1';
            $actualStockReport_settings['hide_oldproducts_flag'] = $bgst['hidenostock_oldproducts'] == '1';
            $actualStockReport_settings['oldproducts_age_limit'] = $bgst['hidenostock_oldproducts_age'];
            $actualStockReport_settings['oldproducts_sold_limit'] = $bgst['hidenostock_oldproducts_sold'];
            $actualStockReport_settings['oldproducts_sold_limit_l30d'] = $bgst['hidenostock_oldproducts_sold_l30d'];
            $actualStockReport_settings['oldproducts_sold_limit_yearcurrent'] = $bgst['hidenostock_oldproducts_sold_yearcurrent'];
            $actualStockReport_settings['hide_newproducts_flag'] = $bgst['hidenostock_newproducts'] == '1';
            $actualStockReport_settings['newproducts_age_limit'] = $bgst['hidenostock_newproducts_age'];
            $actualStockReport_settings['newproducts_sold_limit_l30d'] = $bgst['hidenostock_newproducts_sold_l30d'];
            $actualStockReport_settings['hidenostock_somesp_stars'] = $bgst['hidenostock_somesp_stars'];
        }
        if (is_array($jng_sp_id)) {
            $sp = $jng_sp_id;
            $jng_sp_id = $sp['jng_sp_id'];
        } elseif ($jng_sp_id == 'JNG') {
            //JULE & GRACE
            $sp = array();
            $sp['delivery_time'] = 3;
        } else {
            use_class('jng_sp');
            $class_sp = new jng_sp();
            $sp = $class_sp->retrieveDetail($jng_sp_id);
        }
        //======================================================================
        //  Rules are used to decide when to use Virtual Stock
        //  and when to use Real Stock, especially when we don't
        //  have real stock available
        //
        //  Main Rule = We will only hide stock when we have no real stock
        //======================================================================
        //Rule 1: Hide stock if reported stock set for SP is 0
        $hidestock_rule1 = $reported_stock == 0;
        //Rule 2: Hide stock if:
        //  - hide no stock flag is on
        //  - product star is <= ____ star (configured by user)
        //  - SP is listed in the special list
        $hidestock_rule2 = $actualStockReport_settings['hide_nostock_flag'] && $stars <= $actualStockReport_settings['hidenostock_somesp_stars'] && in_array($jng_sp_id, $actualStockReport_settings['jng_sp_id_affected_by_nostock_flag']);
        //Rule 3: Hide stock if:
        //  - hide no stock extreme products flag is on
        //  - product complexity is extreme
        $hidestock_rule3 = $actualStockReport_settings['hide_extreme_flag'] && $complexity == 'X';
        //Rule 4: Hide stock if:
        //  - hide no stock hard products flag is on
        //  - product complexity is hard
        $hidestock_rule4 = $actualStockReport_settings['hide_hard_flag'] && $complexity == 'H';
        //Rule 5: Hide stock if:
        //  - hide no stock long tail products is on
        //  - product age > ____ days (configured by user)
        //  - total sold last year <= ____ (configured by user)
        //  - total sold last 30 days <= ____ (configured by user)
        //  - total sold this year <= ____ (configured by user)
        $hidestock_rule5 = $actualStockReport_settings['hide_oldproducts_flag'] && $age >= $actualStockReport_settings['oldproducts_age_limit'] && $total_sold_lastyear <= $actualStockReport_settings['oldproducts_sold_limit'] && $total_sold_last30d <= $actualStockReport_settings['oldproducts_sold_limit_l30d'] && $total_sold_thisyear <= $actualStockReport_settings['oldproducts_sold_limit_yearcurrent'];
        //Rule 6: Hide stock if:
        //  - hide no stock new products is on
        //  - product age <= ____ days (configured by user)
        //  - total sold last 30 days <= ____ (configured by user)
        $hidestock_rule6 = $actualStockReport_settings['hide_newproducts_flag'] && $age <= $actualStockReport_settings['newproducts_age_limit'] && $total_sold_last30d <= $actualStockReport_settings['newproducts_sold_limit_l30d'];
        //Rule 7: Hide all wholesale products
        $hidestock_rule7 = $is_wholesale_product;
        //===================== END OF HIDE STOCK RULES ========================
        //Prepare the default result of this function to be returned
        $result = array();
        $result['stock'] = $reported_stock;
        //0 = VIRTUAL, 1 = REAL
        $result['stock_isreal'] = '0';
//.........这里部分代码省略.........
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:101,代码来源:functions-2.php

示例2: split

#########################################
global $db;
require_once '../confy.php';
require_once '../functions.php';
require_once '../functions-2.php';
tep_db_connect();
list($input_id, $bctype) = split(";", tep_db_prepare_input(strtolower(trim($_SERVER['QUERY_STRING']))));
$qpid = tep_db_query("SELECT products_id, products_model FROM products WHERE products_id = {$input_id} OR products_model = {$input_id}");
$rpid = tep_db_fetch_array($qpid);
$product_id = $rpid['products_id'];
$product_model = $rpid['products_model'];
$products = array();
$is_best_product = false;
use_class('products_minierp');
$class_pm = new products_minierp();
$bg_settings = $class_pm->retrieveBestGoodSettings();
$q_min_sold = tep_db_query("SELECT {$bg_settings['log_column']} AS actual_sold FROM products_log WHERE products_id = {$product_id}");
$r_min_sold = tep_db_fetch_array($q_min_sold);
$bg_status = 'bad';
if ($r_min_sold['actual_sold'] >= $bg_settings['min_sold_good']) {
    $bg_status = 'good';
}
if ($r_min_sold['actual_sold'] >= $bg_settings['min_sold_best']) {
    $bg_status = 'best';
}
$qa = "SELECT p.products_id, 0 AS products_articles_id, pnc.products_length AS length FROM products p LEFT JOIN products_non_configurator pnc ON pnc.products_id = p.products_id";
$qa .= " WHERE p.products_id = {$product_id}";
$qa .= " UNION ALL";
$qa .= " SELECT products_id, products_articles_id, length FROM products_articles WHERE products_id = {$product_id}";
$pa = tep_db_query($qa);
if (tep_db_num_rows($pa) > 0) {
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:product-label-get-articles.php

示例3: explode

     $ldate = explode('.', tep_db_prepare_input($_POST['ldate']));
     $logistic_date = date('Y-m-d', strtotime($ldate[2] . '-' . $ldate[1] . '-' . $ldate[0]));
     $logistic_code = strtolower($logpart) == 'dhl' ? 'DHL' . date('ymd', strtotime($logistic_date)) : tep_db_prepare_input($_POST['lcode']);
     $logistic_weight = tep_db_prepare_input($_POST['lweight']);
     $logistic_price = tep_db_prepare_input($_POST['lprice']);
     $currency = tep_db_prepare_input($_POST['currency']);
     $currency_value = calculateCurrency(1, $currency);
     $awb_no = tep_db_prepare_input($_POST['awb_no']);
     $cogs_purchase_price_multiplier = $bgst['cogs_purchase_price_multiplier'];
     $use_cogs = $logistic_id > $last_logistic_id_without_cogs ? 1 : 0;
     $logistic_id = $class_ml->createUpdate($logistic_id, $logistic_date, $logistic_code, $logistic_weight, $logistic_price, $currency, $currency_value, $awb_no, $cogs_purchase_price_multiplier, $use_cogs);
     echo utf8_encode($logistic_id);
 } elseif ($_POST['me_action'] == 'ADDPACKAGE') {
     use_class('products_minierp');
     $class_pm = new products_minierp();
     $bgst = $class_pm->retrieveBestGoodSettings();
     $logistic_id = tep_db_prepare_input($_POST['logistic_id']);
     $logistic_partner = tep_db_prepare_input($_POST['logistic_partner']);
     $package_type = tep_db_prepare_input($_POST['package_type']);
     $package_id = tep_db_prepare_input($_POST['package_id']);
     $class_ml->addPackage($logistic_id, $package_type, $package_id, $logistic_partner);
 } elseif ($_POST['me_action'] == 'REMOVEPACKAGE') {
     $logistic_id = tep_db_prepare_input($_POST['logistic_id']);
     $logistic_partner = tep_db_prepare_input($_POST['logistic_partner']);
     $package_type = tep_db_prepare_input($_POST['package_type']);
     $package_id = tep_db_prepare_input($_POST['package_id']);
     $class_ml->removePackage($logistic_id, $package_type, $package_id, $logistic_partner);
 } elseif ($_POST['me_action'] == 'SAVEDATA') {
     $logistic_id = tep_db_prepare_input($_POST['logistic_id']);
     $data = array();
     $data['logistic_id'] = $logistic_id;
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:packages-logistic-detail.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

示例5: generatePMLog

 public static function generatePMLog($date)
 {
     //THE CALCULATION WHICH USE STARS WILL NOT GIVE RELEVANT DATA WHEN CALCULATING BACKDATE
     $sda = array();
     $q = tep_db_query("SELECT COUNT(products_id) AS total_products_new FROM products WHERE active_status='1' AND products_date_added LIKE '{$date}%'");
     $row = tep_db_fetch_array($q);
     $sda['products_new'] = $row['total_products_new'];
     $q = tep_db_query("SELECT COUNT(products_id) AS total_products_killed FROM products_removed WHERE removed_date LIKE '{$date}%'");
     $row = tep_db_fetch_array($q);
     $sda['products_killed'] = $row['total_products_killed'];
     $q = tep_db_query("SELECT 1 FROM scorecard_pm WHERE date='{$date}'");
     if (tep_db_num_rows($q) == 0) {
         $sda['date'] = $date;
         tep_db_perform('scorecard_pm', $sda);
     } else {
         tep_db_perform('scorecard_pm', $sda, 'update', "date='{$date}'");
     }
     //FOR BELOW DATA WE SAVED MONTHLY SO WE MUST CHANGE THE DATE TO ALWAYS IS THE END OF THE MONTH
     $date_monthly = date('Y-m-t', strtotime($date));
     $date_l90d = date('Y-m-d', strtotime("{$date_monthly} -90 days"));
     $q = "SELECT p.stars, COUNT(p.products_id) AS total_products_new_l90d";
     $q .= " FROM products p";
     $q .= " WHERE p.active_status='1' AND p.price_margin>0 AND p.products_date_added>='{$date_l90d}' AND p.products_date_added<='{$date_monthly}'";
     $q .= " GROUP BY stars";
     $r = tep_db_query($q);
     while ($row = tep_db_fetch_array($r)) {
         $sda = array();
         $sda['products_new_l90d'] = $row['total_products_new_l90d'];
         $q = tep_db_query("SELECT 1 FROM scorecard_pm_stars WHERE period='{$date_monthly}' AND stars={$row['stars']}");
         if (tep_db_num_rows($q) == 0) {
             $sda['period'] = $date_monthly;
             $sda['stars'] = $row['stars'];
             tep_db_perform('scorecard_pm_stars', $sda);
         } else {
             tep_db_perform('scorecard_pm_stars', $sda, 'update', "period='{$date_monthly}' AND stars={$row['stars']}");
         }
     }
     //STARS
     $q = "SELECT stars, COUNT(products_id) AS total_products FROM `products` WHERE active_status='1' AND price_margin>0 GROUP BY stars";
     $r = tep_db_query($q);
     while ($row = tep_db_fetch_array($r)) {
         $sda = array();
         $sda['products_total'] = $row['total_products'];
         $q = tep_db_query("SELECT 1 FROM scorecard_pm_stars WHERE period='{$date_monthly}' AND stars={$row['stars']}");
         if (tep_db_num_rows($q) == 0) {
             $sda['period'] = $date_monthly;
             $sda['stars'] = $row['stars'];
             tep_db_perform('scorecard_pm_stars', $sda);
         } else {
             tep_db_perform('scorecard_pm_stars', $sda, 'update', "period='{$date_monthly}' AND stars={$row['stars']}");
         }
     }
     //FOR BELOW DATA WE SAVED MONTHLY AND NEVER UPDATE BACKDATE BECAUSE THE DATA WILL BE IRRELEVANT
     //Only run filter if date is the actual month or actual date is maximum 1st day of a new month
     if (strpos($date_monthly, date('Y-m')) !== false || $date_monthly == date('Y-m-d', strtotime('-1 day'))) {
         use_class('products_minierp');
         $class_pm = new products_minierp();
         $bgst = $class_pm->retrieveBestGoodSettings();
         //BRAND
         $q = "SELECT p.products_brand_id, AVG(p.price_margin) AS average_margin, COUNT(p.products_id) AS products_total FROM products p WHERE p.active_status='1' AND p.price_margin>0 GROUP BY products_brand_id";
         $r = tep_db_query($q);
         while ($row = tep_db_fetch_array($r)) {
             $sda = array();
             $sda['average_margin'] = $row['average_margin'];
             $sda['products_total'] = $row['products_total'];
             $q = tep_db_query("SELECT 1 FROM scorecard_pm_brand WHERE period='{$date_monthly}' AND products_brand_id={$row['products_brand_id']}");
             if (tep_db_num_rows($q) == 0) {
                 $sda['period'] = $date_monthly;
                 $sda['products_brand_id'] = $row['products_brand_id'];
                 tep_db_perform('scorecard_pm_brand', $sda);
             } else {
                 tep_db_perform('scorecard_pm_brand', $sda, 'update', "period='{$date_monthly}' AND products_brand_id={$row['products_brand_id']}");
             }
         }
         //PRICE GROUP
         $q = "SELECT CASE";
         $q .= " WHEN p.products_price BETWEEN {$bgst['pg1_bgn']} AND {$bgst['pg1_end']} THEN 'pg1'";
         $q .= " WHEN p.products_price BETWEEN {$bgst['pg2_bgn']} AND {$bgst['pg2_end']} THEN 'pg2'";
         $q .= " WHEN p.products_price BETWEEN {$bgst['pg3_bgn']} AND {$bgst['pg3_end']} THEN 'pg3'";
         $q .= " WHEN p.products_price BETWEEN {$bgst['pg4_bgn']} AND {$bgst['pg4_end']} THEN 'pg4'";
         $q .= " WHEN p.products_price BETWEEN {$bgst['pg5_bgn']} AND {$bgst['pg5_end']} THEN 'pg5'";
         $q .= " WHEN p.products_price BETWEEN {$bgst['pg6_bgn']} AND {$bgst['pg6_end']} THEN 'pg6'";
         $q .= " WHEN p.products_price BETWEEN {$bgst['pg7_bgn']} AND {$bgst['pg7_end']} THEN 'pg7'";
         $q .= " WHEN p.products_price BETWEEN {$bgst['pg8_bgn']} AND {$bgst['pg8_end']} THEN 'pg8'";
         //set prices not in range as price group pgX
         $q .= " ELSE 'pgX' END AS price_group";
         $q .= ", MAX(p.products_price) AS products_price_max";
         $q .= ", AVG(p.price_margin) AS average_margin";
         $q .= ", COUNT(p.products_id) AS products_total";
         $q .= " FROM products p WHERE p.active_status='1' AND p.price_margin>0 GROUP BY price_group";
         $r = tep_db_query($q);
         while ($row = tep_db_fetch_array($r)) {
             $sda = array();
             if ($row['price_group'] == 'pgX') {
                 $sda['pricegroup_settings'] = 'Max Price = ' . $row['products_price_max'];
             } else {
                 $sda['pricegroup_settings'] = $bgst[$row['price_group'] . '_bgn'] . ' - ' . $bgst[$row['price_group'] . '_end'];
             }
             $sda['average_margin'] = $row['average_margin'];
             $sda['products_total'] = $row['products_total'];
//.........这里部分代码省略.........
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:101,代码来源:scorecard.php

示例6: calculateStars

 function calculateStars($sold)
 {
     //currently $sold value is Last 30 Days sold (L30D)
     use_class('products_minierp');
     $class_pm = new products_minierp();
     $bgst = $class_pm->retrieveBestGoodSettings();
     $stars = 0;
     if ($sold >= $bgst['e_star0_bgn'] && $sold <= $bgst['e_star0_end']) {
         $stars = 0;
     } elseif ($sold >= $bgst['e_star1_bgn'] && $sold <= $bgst['e_star1_end']) {
         $stars = 1;
     } elseif ($sold >= $bgst['e_star2_bgn'] && $sold <= $bgst['e_star2_end']) {
         $stars = 2;
     } elseif ($sold >= $bgst['e_star3_ge']) {
         $stars = 3;
     }
     return $stars;
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:18,代码来源:elements_minierp.php

示例7: calculatePurchasePrice

 public static function calculatePurchasePrice($cogs_or_matexp)
 {
     global $class_pm;
     if (!is_object($class_pm)) {
         $class_pm = new products_minierp();
     }
     $bgst = $class_pm->retrieveBestGoodSettings();
     return round($bgst['cogs_purchase_price_multiplier'] * $cogs_or_matexp, 2);
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:9,代码来源:product-old.php

示例8: loadDIOHsettings

 public static function loadDIOHsettings()
 {
     use_class('products_minierp');
     $class_pm = new products_minierp();
     $bgst = $class_pm->retrieveBestGoodSettings();
     self::$diohStopLevel = array();
     self::$diohStopLevel[0] = $bgst['e_star0_dioh'];
     self::$diohStopLevel[1] = $bgst['e_star1_dioh'];
     self::$diohStopLevel[2] = $bgst['e_star2_dioh'];
     self::$diohStopLevel[3] = $bgst['e_star3_dioh'];
     self::$adjustmentOrder = $bgst['eao'];
     self::$dtMultiplier = $bgst['dt_multiplier'];
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:13,代码来源:element.php


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