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


PHP products_minierp类代码示例

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


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

示例1: setParams

 function setParams($products_id, $param_code)
 {
     use_class('products_minierp');
     $class_pm = new products_minierp();
     if ($param_code == 'M') {
         $param_id_arrays = $class_pm->loadProductMaterials($products_id);
         $field_name = 'material';
     } elseif ($param_code == 'C') {
         $param_id_arrays = $class_pm->loadColorPattern($products_id);
         $field_name = 'color';
     } else {
         $param_id_arrays = array();
         $field_name = '';
     }
     if ($field_name != '') {
         if (count($param_id_arrays) == 0) {
             $sda = array($field_name => '');
             tep_db_perform('jng_sp_catalog', $sda, 'update', "products_id = {$products_id}");
         } else {
             use_class('jng_sp_catalog');
             $class_jc = new jng_sp_catalog();
             $q = tep_db_query("SELECT jng_sp_catalog_id, jng_sp_id FROM jng_sp_catalog WHERE products_id = {$products_id}");
             $sp_list = array();
             while ($row = tep_db_fetch_array($q)) {
                 $sp_list[$row['jng_sp_catalog_id']] = $row['jng_sp_id'];
             }
             foreach ($sp_list as $catalog_id => $jng_sp_id) {
                 $sp_params_raw = $this->load($jng_sp_id, $param_code);
                 $sp_params = array();
                 foreach ($sp_params_raw as $spr) {
                     if (in_array($spr['param_id'], $param_id_arrays)) {
                         $sp_params[] = $spr['param_value'];
                     }
                 }
                 $sda = array($field_name => implode(', ', $sp_params));
                 $class_jc->updateField($catalog_id, $sda);
             }
         }
     }
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:40,代码来源:jng_sp_catalog_params.php

示例2: killBrand

 /**
  * Set brand status as deleted and kill all active products of the brand
  * @param Int $brand_id Brand ID to delete
  * @param String $username Username trigger the function
  * @param Boolean $use_echo When set to true will echo "." dot during the looping of products killing
  */
 function killBrand($brand_id, $username, $use_echo = false)
 {
     use_class('products_minierp');
     $class_pm = new products_minierp();
     $q = tep_db_query("SELECT products_id FROM products WHERE products_brand_id={$brand_id} AND active_status='1'");
     while ($row = tep_db_fetch_array($q)) {
         if ($use_echo) {
             echo '. ';
         }
         $class_pm->killProduct($row['products_id'], $username);
     }
     $this->delete($brand_id);
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:19,代码来源:products_brand.php

示例3: use_class

<?php

#########################################
#  Author  : D3W4 & SAHAT               #
#  Created : Jan 3, 2012 10:59:04 PM    #
#########################################
use_class('products_minierp');
$class_pm = new products_minierp();
$products_id = tep_db_prepare_input($_GET['products_id']);
$designs_id = tep_db_prepare_input($_GET['designs_id']);
$accessed = strpos($_SERVER['HTTP_REFERER'], 'designs-manage') !== false || !empty($designs_id) ? CONST_ACCESS_DESIGNS_MANAGEMENT : '';
if (isset($_POST['me_action'])) {
    if ($_POST['me_action'] == 'PRODUCTELUSED') {
        $result = $class_pm->templateElementsUsed('?open=designs-products-elements-used&amp;products_id=' . $_POST['products_id'] . '&amp;hidemenu=true&amp;designs_id=' . $designs_id);
        echo $result;
        exit;
    } elseif ($_POST['me_action'] == 'ELEMENTSUSEDADD') {
        $class_pm->templateAddElementsUsed();
    } elseif ($_POST['me_action'] == 'ELEMENTSUSEDUPDATE') {
        $class_pm->templateUpdateElementsUsed();
    } elseif ($_POST['me_action'] == 'ELEMENTSUSEDOVR') {
        $class_pm->templateOverrideElementsUsed();
    }
}
$content = '<div id="area-el-used"></div>';
$title = "Product {$products_id} - Manage Elements Used";
$javascript = '
            var accessed = "' . $accessed . '";
            var designs_id = "' . $designs_id . '";
            document.reloadFocusedTab = function(){
                if(accessed != "undefined" && accessed == "' . CONST_ACCESS_DESIGNS_MANAGEMENT . '") window.parent.document.reloadFocusedTab(' . $designs_id . ');
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:designs-products-elements-used.php

示例4: tep_db_connect

<?php

global $db;
require_once '../confy.php';
require_once '../functions.php';
require_once '../functions-2.php';
require_once DIR_WS_FUNCTIONS . 'html_output.php';
tep_db_connect();
use_class('products_minierp');
$class_pm = new products_minierp();
$pids = tep_db_prepare_input($_POST['products_id']);
$group = tep_db_prepare_input($_POST['group']);
$group_name = tep_db_prepare_input($_POST['group_name']);
$npids = explode(',', $pids);
$n = count($npids);
$title = "<h1>List products of - {$group}: {$group_name} ({$n} total)</h1>";
?>
<html>
    <head>
        <title>Products List</title>
        <link rel="stylesheet" type="text/css" href="../templates/default.css" />
    </head>    
<body>
<div id="area-result">
    <div><?php 
echo $title;
?>
</div>
<div class="display-area ui-corner-all" style="margin-top:10px; display: block; width: 1000px;">
    
<?php 
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:products_list.php

示例5: header

         if ($products_id > 0) {
             $booked = $class_pm->productsBookedCount($jng_warehouses_id, $products_id, $articles_id);
             if ($booked === 0) {
                 $class_bin->removeProductFromBox($bin['bins_id']);
                 if ($bin['products_stock'] > 0) {
                     $class_pm->stockReduce($jng_warehouses_id, $products_id, $articles_id, $bin['products_stock'], "CLEAR RACK by {$session_userinfo['username']}");
                 }
             }
         }
     }
     header("Location: ?open=rack-info&id={$rack_id}&reloadsegment=true" . ($hidemenuscript != '' ? '&hidemenu=true' : ''));
     exit;
 } elseif ($_POST['me_action'] == 'CLEARRACKNBS') {
     $logger = new logger('modules', 'rack-info');
     use_class('products_minierp');
     $class_pm = new products_minierp();
     $segment = $class_bin->retrieveSegmentDetail($rack['segment_id']);
     $jng_warehouses_id = $segment['warehouses_id'];
     $rack_bins = $class_bin->retrieveBins($rack['segment_id'], $rack_id);
     $bins_cleared = array();
     $logger->write('Clearing NBS for Rack ' . $rack_no);
     foreach ($rack_bins as $bin) {
         if ($bin['is_bestselling'] != '1') {
             $products_id = $bin['products_id'];
             $articles_id = $bin['articles_id'];
             if ($products_id > 0) {
                 $booked = $class_pm->productsBookedCount($jng_warehouses_id, $products_id, $articles_id);
                 if ($booked === 0) {
                     $class_bin->removeProductFromBox($bin['bins_id']);
                     if ($bin['products_stock'] > 0) {
                         $class_pm->stockReduce($jng_warehouses_id, $products_id, $articles_id, $bin['products_stock'], "CLEAR NBS RACK by {$session_userinfo['username']}");
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:rack-info.php

示例6: tep_db_connect

<?php

global $db;
require_once '../confy.php';
require_once '../functions.php';
require_once '../functions-2.php';
tep_db_connect();
use_class('PHPExcel/PHPExcel');
use_class('Product');
use_class('depot_orders');
use_class('products_minierp');
use_class('elements_suppliers');
$class_do = new depot_orders();
$class_pm = new products_minierp();
$order_date = $_GET['date'];
$order_date_ts = strtotime($order_date);
$supplier_id = $_GET['supplier_id'];
$supplier = new elements_suppliers($supplier_id);
$filename = date('Ymd', $order_date_ts) . '-OutsourcingPO-' . $supplier->getCleanName() . '-' . time() . '.xls';
$order_date_nice = date('d.m.Y', $order_date_ts);
$po_number_sample = date('ymd', $order_date_ts) . '/' . $supplier->id . '/001';
$date_filter_start = $order_date . ' 00:00:00';
$date_filter_end = $order_date . ' 23:59:59';
$jng_company_name = utf8_encode(JNG_ADDRESS_NAME . ' - ' . JNG_COMPANY_SUFFIX);
$jng_address = utf8_encode(JNG_ADDRESS_STREET);
$jng_shipto_recepient = utf8_encode('Ms. Julia Schüssel');
$orders_items = array();
if (isset($_GET['type']) && $_GET['type'] == 'non-refill') {
    $trans_type = depot_orders::TRANS_TYPE_NON_REFILL;
    $trans_id = depot_orders::NONREFILL_OUTSOURCED_ID;
} else {
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:outsourcing-po.php

示例7: set_time_limit

// BEWARE NOTE!!!
// PLEASE PAY ATTENTION TO SP PRODUCTS ACTIVE AGE
// THIS DATA CALC ACTIVE DAY OF PRODUCTS
// AND SHOULD ONLY BE RUN ONCE PER DAY
set_time_limit(0);
global $db;
require_once '../confy.php';
require_once '../functions.php';
require_once '../functions-2.php';
tep_db_connect();
use_class('logger');
$logger = new logger('cron', 'daily-counter-products');
use_class('forecasting');
use_class('product');
use_class('products_minierp');
$class_pm = new products_minierp();
////////////////////////////////////
// SP PRODUCTS ACTIVE AGE COUNTER //
////////////////////////////////////
tep_db_query("UPDATE jng_sp_catalog SET active_age=active_age+1 WHERE last_active_status='1'");
$logger->write("DONE - SP PRODUCTS ACTIVE AGE COUNTER");
///////////////////////
// MATERIAL EXPENSES //
///////////////////////
// MOVED TO cron/daily-counter-products-matexp.php
///////////////////////
//////////////////////////////
// PRODUCT LOG DATA COUNTER //
//////////////////////////////
//MONTHLY VIEWED
//Data is never used, stop querying it
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:daily-counter-products.php

示例8: DSO

     $result .= '<tr><td class="label">PICKED FROM BIN</td><td>= Total products picked from Bin</td></tr>';
     //$result .= '<tr><td class="label">PRODUCTS SENT</td><td>= Total products sent</td></tr>';
     $result .= '<tr><td class="label">SENT B2B</td><td>= Total products sent to Business Partner</td></tr>';
     $result .= '<tr><td class="label">SENT B2C</td><td>= Total products sent to Customer</td></tr>';
     $result .= '<tr><td class="label">SENT FULL DSO</td><td>= Total products sent from Depo/Full DSO (Excluding MO)</td></tr>';
     $result .= '<tr><td class="label">SENT FULL MTO</td><td>= Total products sent directly from Bali (Full MTO)</td></tr>';
     $result .= '<tr><td class="label">SENT MO</td><td>= Total products sent from MO (WMO and MMO)</td></tr>';
     $result .= '</table>';
     $result .= '</div>';
     //.ibox
     $result .= '</div>';
     //end .kpi-infobox
     $result .= '<div style="padding-bottom:10px;"><strong>Query Date </strong><input type="text" id="kpilog" title="select date to load statistic on graph" class="date_picker input" readonly="readonly" value="' . $date_id_userformat . '"/></div>';
     $result .= '<div id="kpi-log-content"></div>';
 } elseif ($_GET['week-sum'] == 'KPI-COMP') {
     $class_pm = new products_minierp();
     $bgst = $class_pm->retrieveBestGoodSettings();
     $kpi_config = load_config('kpi-settings');
     $filterdate_start = date('Y-m-d', strtotime('-7 days'));
     $filterdate_end = date('Y-m-d');
     $q = " SELECT * FROM (";
     $q .= " SELECT DATE(jo.order_date) rowdate, joi.products_id, joi.order_quantity quantity, p.complexity";
     $q .= " FROM jng_sp_orders jo";
     $q .= " INNER JOIN jng_sp_orders_items joi ON joi.jng_sp_orders_id = jo.jng_sp_orders_id AND joi.status NOT IN ('10', '12')";
     $q .= " LEFT JOIN products p ON p.products_id = joi.products_id";
     //$q .= " WHERE DATE(jo.order_date)>DATE('$filterdate_start') AND DATE(jo.order_date)<=DATE('$filterdate_end')";
     $q .= " WHERE jo.order_date>'{$filterdate_start}' AND jo.order_date<='{$filterdate_end}'";
     $q .= " AND joi.mode IN (2, 4)";
     $q .= " UNION ALL";
     $q .= " SELECT DATE(o.date_purchased) rowdate, op.products_id, op.products_quantity quantity, p.complexity";
     $q .= " FROM orders o";
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:home.php

示例9: tep_db_connect

require_once '../confy.php';
require_once '../functions.php';
require_once '../functions-2.php';
tep_db_connect();
use_class('logger');
$logger = new logger('cron', 'tradebyte-catalog-updater');
use_class('jng_sp');
use_class('jng_sp_catalog');
use_class('jng_sp_upload');
use_class('products_minierp');
use_class('products_articles');
use_class('tradebyte');
use_class('xml_tools');
$class_sp = new jng_sp();
$class_jc = new jng_sp_catalog();
$class_pm = new products_minierp();
function getANR($pcode, $length)
{
    $a_nr = $pcode;
    if ($length > 0) {
        $a_nr .= '_' . textLength($length, false);
    }
    return $a_nr;
}
function getStock($stock, $stock_booked)
{
    $stock = $stock - $stock_booked;
    if ($stock < 0) {
        $stock = 0;
    }
    return $stock;
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:tradebyte-catalog-updater.php

示例10: use_class

<?php

#########################################
#  Author  : D3W4 & SAHAT               #
#  Created : Nov 23, 2010 11:07:08 AM    #
#########################################
use_class('sendback');
use_class('products_minierp');
use_class('products_ean');
$class_sendback = new sendback();
$class_pm = new products_minierp();
$class_pean = new products_ean();
if (isset($_POST['me_action']) && $_POST['me_action'] != '') {
    $post_result = '';
    if ($_POST['me_action'] == 'SHOWBIN') {
        $type = $_POST['type'];
        if ($type == 'bin_in') {
            list($products_id, $products_articles_id) = split("-", $_POST['ids']);
            $query = "SELECT * FROM sendback ";
            $query .= " WHERE products_id = '{$products_id}' AND products_articles_id = '{$products_articles_id}'";
            $query .= " AND status = '16' AND type='D' AND quantity_actual > 0 LIMIT 1";
            $dbq = tep_db_query($query);
            if (tep_db_num_rows($dbq) > 0) {
                $r = tep_db_fetch_array($dbq);
                if ($r['quantity_actual'] > 1) {
                    tep_db_query("UPDATE sendback SET quantity_actual = " . ($r['quantity_actual'] - 1) . " WHERE sendback_id = '{$r['sendback_id']}'");
                } else {
                    tep_db_query("DELETE FROM sendback_package_contents WHERE sendback_id = '{$r['sendback_id']}'");
                    tep_db_query("DELETE FROM sendback WHERE sendback_id = '{$r['sendback_id']}'");
                }
            } else {
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:package-returns-best-good-checking.php

示例11: set_time_limit

<?php

set_time_limit(0);
global $db;
require_once '../confy.php';
require_once '../functions.php';
require_once '../functions-2.php';
tep_db_connect();
use_class('logger');
$logger = new logger('cron', 'daily-counter-products-matexp');
use_class("products_minierp");
$class_pm = new products_minierp();
$products = array();
$products = $class_pm->retrieveList("active_status=1");
$pcount = 0;
foreach ($products as $p) {
    $pcount++;
    $class_pm->calculateMaterialExpenses($p['products_id']);
    $logger->write("{$pcount} - PID: " . $p['products_id'] . ' - TS: ' . time());
    echo '. ';
}
$logger->close();
echo 'Done!';
tep_db_close();
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:24,代码来源:daily-counter-products-matexp.php

示例12: use_class

<?php

use_class('element');
use_class('products_minierp');
use_class('elements_stock');
use_class('elements_order');
$class_pm = new products_minierp();
$class_es = new elements_stock();
//WAREHOUSE OPTIONS
$session_page = 'elements-stock';
$wo = warehouse_options($session_page);
$whid = $_SESSION[$session_page]['whid'];
if (isset($_POST['me_action'])) {
    if ($_POST['me_action'] == 'SEARCHFILTER') {
        $days = $_POST['days'];
        $day_filter = date('Y-m-d', strtotime("-{$days} days"));
        $q = "SELECT * FROM (";
        $q .= " SELECT joi.jng_sp_orders_items_id, joi.leadtime_start_date, joi.products_id, joi.products_articles_id as articles_id, joi.stock_status, FLOOR(joi.order_quantity) as quantity";
        $q .= " FROM jng_sp_orders jo";
        $q .= " INNER JOIN jng_sp_orders_items joi ON joi.jng_sp_orders_id = jo.jng_sp_orders_id";
        $q .= " WHERE joi.leadtime_start_date IS NOT NULL";
        $q .= " AND joi.leadtime_start_date < '{$day_filter}' AND joi.status = 2";
        $q .= " UNION";
        $q .= " SELECT op.orders_products_id, op.leadtime_start_date, op.products_id, op.products_articles_id as articles_id, op.stock_status, FLOOR(op.products_quantity) as quantity";
        $q .= " FROM orders o";
        $q .= " INNER JOIN orders_products op ON op.orders_id = o.orders_id";
        $q .= " WHERE op.leadtime_start_date IS NOT NULL";
        $q .= " AND op.leadtime_start_date < '{$day_filter}' AND op.status = 2";
        $q .= " UNION";
        $q .= " SELECT do.depot_orders_id, do.leadtime_start_date, do.products_id, do.articles_id as articles_id, do.stock_status, FLOOR(do.quantity) as quantity";
        $q .= " FROM depot_orders do";
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:report-missing-element.php

示例13: isPhotoProductComplete

 function isPhotoProductComplete($products = array())
 {
     use_class('products_minierp');
     $class_pm = new products_minierp();
     if (count($products) == 0) {
         $products = $this->retrieveProducts();
     }
     $photos_is_complete = count($products) > 0 ? true : false;
     foreach ($products as $p) {
         $dt_p = $class_pm->retrieveDetail($p['products_id'], 'p');
         if ($dt_p['p']['products_image'] == '') {
             $photos_is_complete = false;
             break;
         }
     }
     return $photos_is_complete;
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:17,代码来源:design.php

示例14: use_class

require_once '../functions-xml.php';
require_once DIR_WS_FUNCTIONS . 'html_output.php';
use_class('design');
use_class('products_brand');
use_class('styles');
use_class('products_minierp');
use_class('products_family');
use_class('jng_sp_catalog');
use_class('Product');
use_class('Order');
use_class('depot_orders');
use_class('ProductCOGS');
tep_db_connect();
$class_s = new styles();
$class_pb = new products_brand();
$class_pm = new products_minierp();
$class_jc = new jng_sp_catalog();
$class_do = new depot_orders();
$pid_array = array(24072, 25467, 48792, 51556, 51557, 51572, 58013, 60749, 60836, 60872, 64643, 64668, 65804, 66250, 66775, 67450, 68262, 68611, 70142, 71771, 72667, 72996, 73126, 73185, 73186, 73321, 73603, 73658, 73660, 73685, 74005, 74016, 74070, 74123, 74211, 74324, 74395, 74452, 74721, 74759, 74761, 74771, 74793, 74794, 74804, 74836, 74838, 74842, 74844, 74847, 74850, 74851, 74853, 74854, 74857, 74859, 74861, 74862, 74865, 74869, 74874, 74879, 74882, 74884, 74898, 74899, 74901, 74902, 74903, 74907, 74908, 74933, 74946, 74949, 74955, 74957, 74959, 74963, 74967, 74970, 74971, 74972, 74976, 74977, 74980, 74981, 74982, 74983, 74984, 74989, 74995, 74996, 75003, 75006, 75008, 75009, 75016, 75018, 75019, 75022, 75024, 75025, 75032, 75033, 75035, 75058, 75060, 75062, 75072, 75081, 75085, 75097, 75098, 75116, 75118, 75120, 75122, 75123, 75128, 75129, 75130, 75131, 75133, 75135, 75137, 75149, 75150, 75151, 75153, 75172, 75182, 75186, 75191, 75193, 75198, 75200, 75203, 75205, 75207, 75222, 75232, 75238, 75241, 75244, 75245, 75246, 75247, 75249);
//var_dump($pid_array);
//die();
$p = array();
$p['pid'] = 'Product ID';
$p['name'] = 'Product Name';
$p['desc'] = 'Product Description';
$p['keywords w200'] = 'Product Keyword';
$p['cogs'] = 'Product COGS';
$table_product[] = $p;
foreach ($pid_array as $pid) {
    $product_data = $class_pm->retrieveDetail($pid, 'p,pd');
    $product_name = $product_data['pd'][2]['products_name'];
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:temp-lazada-cogs-pids.php

示例15: substr

    }
}
$dest['bank_name_short'] = substr($dest['bank_name'], 0, strpos($dest['bank_name'], ' '));
$dest['account_no2'] = JNG_BANK_ACCOUNT_PAYONE;
$dest2 = array();
foreach ($dest as $key => $d) {
    if ($key == 'account_no' || $key == 'account_no2' || $key == 'bank_no') {
        $d = str_replace(' ', '', $d);
    }
    $dest2[$key] = insertSpacePerChar($d);
}
use_class('orders');
use_class('products_minierp');
use_class('payone_invoice');
$class_o = new orders();
$class_pm = new products_minierp();
//if(isset($_GET['id'])) {
//    $orders = tep_db_prepare_input($_GET['id']);
//    $orders_array = explode(',', $orders);
//} elseif(isset($_GET['pid'])) {
//    use_class("minierp_packages");
//    $class_mp = new minierp_packages;
//    $orders_array = $class_mp->getOrders($package_id);
//    $items_array = $class_mp->getProducts($package_id);
//}
class PDF extends FPDF
{
    var $using_logo;
    var $doc_type;
    //Page header
    function Header()
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:invoices-pdf.php


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