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


PHP products_minierp::stockReduce方法代码示例

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


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

示例1: header

//POST ACTION
if (isset($_POST['me_action']) && $_POST['me_action'] != '') {
    if ($_POST['me_action'] == 'CLEARBIN') {
        $bins_id = tep_db_prepare_input($_POST['bins_id']);
        $bin = $class_bin->retrieveBinDetail($bins_id);
        $segment = $class_bin->retrieveSegmentDetail($bin['bin_segments_id']);
        $jng_warehouses_id = $segment['warehouses_id'];
        $products_id = $bin['products_id'];
        $articles_id = $bin['articles_id'];
        $booked = $class_pm->productsBookedCount($jng_warehouses_id, $products_id, $articles_id);
        if ($booked > 0) {
            $messagebox->add("<strong>Clear Bin Failed</strong><br />Clear Bin is not allowed if On Stock and Booked by Real Order &gt; 0");
        } else {
            $class_bin->removeProductFromBox($bins_id);
            if ($bin['p_stock'] > 0) {
                $class_pm->stockReduce($jng_warehouses_id, $products_id, $articles_id, $bin['p_stock'], "REDUCE by {$session_userinfo['username']}");
            }
            header("Location: ?open=products-stock-detail&binid={$bin['bins_id']}" . ($hidemenuscript != '' ? '&hidemenu=true' : ''));
            exit;
        }
    } elseif ($_POST['me_action'] == 'SETBIN') {
        $bins_id = tep_db_prepare_input($_POST['bins_id']);
        $bin = $class_bin->retrieveBinDetail($bins_id);
        $ean = tep_db_prepare_input($_POST['ean']);
        $qty = tep_db_prepare_input($_POST['qty']);
        use_class('products_ean');
        $class_ean = new products_ean();
        $article = $class_ean->getProductArticle($ean);
        if ($article['products_id'] == '0') {
            $messagebox->add("<strong>Manual Bin In Failed: UNKNOWN EAN</strong><br />Please check if correct EAN Label is used");
        } else {
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:products-stock-detail.php

示例2:

                 if ($oi['print_confirmed'] > 0) {
                     $class_do->printConfirmAdd($item_do['depot_orders_id']);
                 }
                 if ($order_type == 'SP') {
                     $class_jo->updateItemStockStatus($oiid, '0');
                     $class_jo->updateItemStatus($oiid, $new_status, 'auto-set');
                 } else {
                     $class_o->updateProductStockStatus($oiid, '0');
                     $class_o->updateProductStatus($oiid, $new_status, 'auto-set');
                 }
             }
         }
     }
 } else {
     //PRODUCT AVAILABLE IN DEPOT
     $class_pm->stockReduce($whid_depot, $oi['products_id'], $oi['products_articles_id'], $order_qty, 'RED-FG ' . $order_type . '-' . $oiid);
     $products_stock[$stock_id] -= $order_qty;
     if ($products_stock[$stock_id] < 0) {
         $products_stock[$stock_id] = 0;
     }
     if (isset($products_stock_booked_instock[$stock_id])) {
         $products_stock_booked_instock[$stock_id] -= $order_qty;
     }
     if ($order_type == 'SP') {
         $class_jo->updateItemStockStatus($oiid, 'D');
         if ($oi['status'] != $new_status) {
             //PRODUCT IS NOT YET MOVED TO IN HH TAB
             $class_jo->updateItemStatus($oiid, $new_status, 'auto-set');
             if ($oi['status'] < 4) {
                 $class_jo->productionTargetInReset($oi);
             }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:process-open-orders.php

示例3: array

     $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']}");
                     }
                     $bins_cleared[] = $bin['code'];
                     $logger->write('BIN:' . $bin['code'] . ' > PID-AID:' . $products_id . '-' . $articles_id . ' > STOCK:' . $bin['products_stock']);
                 }
             }
         }
     }
     if (count($bins_cleared) > 0) {
         $_SESSION['bins_cleared_rack_no'] = $rack_no;
         $_SESSION['bins_cleared'] = serialize($bins_cleared);
     }
     $logger->close();
     header("Location: ?open=rack-info&id={$rack_id}&clearnbs=true&reloadsegment=true" . ($hidemenuscript != '' ? '&hidemenu=true' : ''));
     exit;
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:rack-info.php

示例4:

<?php

global $db;
require_once '../confy.php';
require_once '../functions.php';
require_once '../functions-2.php';
tep_db_connect();
use_class('products_minierp');
$class_pm = new products_minierp();
$jng_warehouses_id_fg = '7';
//7 is default warehouse for finished goods in bali
$products_id = 26272;
$products_stock = is_null($products_id) || $products_id == '' ? 0 : $class_pm->stockRetrieve($jng_warehouses_id_fg, $products_id);
$class_pm->stockReduce($jng_warehouses_id_fg, $products_id, 1);
//$row['stock_status'] = $this->updateItemStockStatus('', 'P');
echo "Product {$products_id} Stock = {$products_stock}";
tep_db_close();
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:17,代码来源:temp-test-product-stock.php


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