本文整理汇总了PHP中products_minierp::productsBookedCount方法的典型用法代码示例。如果您正苦于以下问题:PHP products_minierp::productsBookedCount方法的具体用法?PHP products_minierp::productsBookedCount怎么用?PHP products_minierp::productsBookedCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类products_minierp
的用法示例。
在下文中一共展示了products_minierp::productsBookedCount方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$history_options[5] = '6 Months';
$history_options[6] = '1 Year';
$history_options[7] = 'Hide History';
$history_options_2 = array();
$history_options_2[0] = 'in Details';
$history_options_2[1] = 'Daily Summary';
//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 > 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']);
示例2: elseif
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']}");
}
$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);
}
示例3:
$total_qty_total = 0;
$total_matexp_tot = 0;
while ($row = tep_db_fetch_array($r)) {
$pid = $row['products_id'];
$aid = $row['products_id'] . ' - ' . $row['articles_id'];
if (!in_array($pid, $products)) {
$products[] = $pid;
}
if (!in_array($aid, $articles)) {
$articles[] = $aid;
}
$stocks[] = $row;
//if($row['booked_jng']>0 || $row['booked_sp']>0) var_dump($row);
$stock_database = $row['stock'];
$bookmanual = $row['booking_active'];
$stock_on_and_bookedbyrealorder = $class_pm->productsBookedCount($whid, $row['products_id'], $row['articles_id']);
$stock_on_and_bookedmanually = $bookmanual > $stock_database ? $stock_database : $bookmanual;
$stock_available = $stock_database - $stock_on_and_bookedmanually;
$stock_on_total = $stock_database + $stock_on_and_bookedbyrealorder;
$matexp = $row['material_expenses'];
$matexp_tot = $stock_on_total * $matexp;
if ($row['bin_code'] != '') {
$total_bins++;
} else {
$total_bins_unknown++;
}
$total_qty_stock += $stock_available;
$total_qty_booked_m += $stock_on_and_bookedmanually;
$total_qty_booked_r += $stock_on_and_bookedbyrealorder;
$total_qty_total += $stock_on_total;
$total_matexp_tot += $matexp_tot;
示例4: transferBin
function transferBin($bin_id_old, $bin_id_new)
{
use_class('products_minierp');
$class_pm = new products_minierp();
$bin_old = $this->retrieveBinDetail($bin_id_old);
$bin_new = $this->retrieveBinDetail($bin_id_new);
$segment = $this->retrieveSegmentDetail($bin_old['bin_segments_id']);
$booked = $class_pm->productsBookedCount($segment['warehouses_id'], $bin_old['products_id'], $bin_old['articles_id'], true);
if ($booked == 0 && is_null($bin_new['products_stock_id'])) {
$sda = array('products_stock_id' => 'null');
tep_db_perform('bins', $sda, 'update', "bins_id={$bin_id_old}");
$sda = array('products_stock_id' => $bin_old['products_stock_id']);
tep_db_perform('bins', $sda, 'update', "bins_id={$bin_id_new}");
$this->binLogger("Transfer PID {$bin_old['products_id']} AID {$bin_old['articles_id']} from BIN {$bin_old['code_clean']} (ID {$bin_id_old}) to BIN {$bin_new['code_clean']} (ID {$bin_id_new})");
$result = true;
} else {
$result = false;
}
return $result;
}
示例5: ajaxReturn
$ean = tep_db_prepare_input($_POST['ean']);
if ($_SESSION[$session_page]['last_scan'] == "{$segment_id}|{$ean}") {
$_SESSION[$session_page]['last_scan_count']++;
} else {
$_SESSION[$session_page]['last_scan'] = "{$segment_id}|{$ean}";
$_SESSION[$session_page]['last_scan_count'] = 1;
}
$bin = $class_bins->getBinByEAN($segment_id, $ean);
$bin['scanned3times'] = $_SESSION[$session_page]['last_scan_count'] >= 3 ? '1' : '0';
ajaxReturn($bin);
exit;
} elseif ($_POST['me_action'] == 'CHECKBOOKEDCONDITION') {
$bin_id = tep_db_prepare_input($_POST['bin_id']);
$bin = $class_bins->retrieveBinDetail($bin_id);
$segment = $class_bins->retrieveSegmentDetail($bin['bin_segments_id']);
$booked = $class_pm->productsBookedCount($segment['warehouses_id'], $bin['products_id'], $bin['articles_id'], true);
$result = $booked > 0 ? 'REJECT' : 'OK';
echo utf8_encode($result);
exit;
} elseif ($_POST['me_action'] == 'LOADRACKS') {
$segment_id = tep_db_prepare_input($_POST['segment_id']);
$racks = $class_bins->retrieveRacks($segment_id);
$rack_combo_options = array();
$rack_combo_options[0] = '';
foreach ($racks as $rack) {
$rack_combo_options[$rack['bin_racks_id']] = 'Rack ' . $class_bins->formatRackNumber($rack['no']) . ' (' . $class_bins->rack_flag_options[$rack['rack_flag']] . ')';
}
echo utf8_encode('<select>' . loadComboListFromArray($rack_combo_options) . '</select>');
exit;
} elseif ($_POST['me_action'] == 'LOADBIN') {
$segment_id = tep_db_prepare_input($_POST['segment_id']);
示例6: IFNULL
$t['st w040 tac'] = 'Stock Total';
$t['pid w080 tac'] = 'Product ID';
$t['pco w080 tac'] = 'Product Code';
$t['length w080 tac'] = 'Length';
$table[] = $t;
$q = "SELECT ps.*, b.code, IFNULL(pa.products_ean, p.products_ean) AS products_ean";
$q .= ", p.products_model, pa.length FROM products_stock ps";
$q .= " INNER JOIN bins b ON b.products_stock_id = ps.products_stock_id";
$q .= " LEFT JOIN products p ON p.products_id = ps.products_id";
$q .= " LEFT JOIN products_articles pa ON pa.products_articles_id = ps.articles_id";
$q .= " WHERE ps.jng_warehouses_id = " . WAREHOUSE_ID_PRODUCTS_HAMBURG . " AND ps.products_id IN ({$pids})";
$q .= " ORDER BY b.code ASC";
$r = tep_db_query($q);
$no = 0;
while ($row = tep_db_fetch_array($r)) {
$stock_book_by_real_order = $class_pm->productsBookedCount(WAREHOUSE_ID_PRODUCTS_HAMBURG, $row['products_id'], $row['articles_id']);
$stock_database = $row['stock'];
$book_manual = $row['booking_active'];
$stock_on_and_booked_manually = $book_manual > $stock_database ? $stock_database : $book_manual;
$stock_available = $stock_database - $stock_on_and_booked_manually;
$stock_on_total = $stock_database + $stock_book_by_real_order;
$no++;
$t = array();
$t['no w040 tac'] = $no;
$t['bin w100 tac'] = $row['code'];
$t['ean w100 tac'] = $row['products_ean'];
$t['stock w040 tac'] = $stock_available == '' ? "0" : $stock_available;
$t['sb_manual w100 tac'] = $book_manual;
$t['sb_real_order w100 tac'] = $stock_book_by_real_order == '' ? "0" : $stock_book_by_real_order;
$t['st w040 tac'] = $stock_on_total;
$t['pid w080 tac'] = $row['products_id'];