本文整理汇总了PHP中products_minierp::stockAdjust方法的典型用法代码示例。如果您正苦于以下问题:PHP products_minierp::stockAdjust方法的具体用法?PHP products_minierp::stockAdjust怎么用?PHP products_minierp::stockAdjust使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类products_minierp
的用法示例。
在下文中一共展示了products_minierp::stockAdjust方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: openStockDetail
$adjustform .= '<tr><td colspan="2" class="tac"><input id="btn-updatestock" class="button" type="button" value="Update" /></td></tr>';
$adjustform .= '</table>';
$adjustform .= '</div>';
echo utf8_encode($adjustform);
exit;
} elseif ($_POST['me_action'] === 'ADJUSTSTOCKUPDATE') {
$psid = tep_db_prepare_input($_POST['psid']);
$stock_old = tep_db_prepare_input($_POST['oldstock']);
$stock_new = tep_db_prepare_input($_POST['newstock']);
$ps = $class_pm->stockRetrieveDetailByPSID($psid);
$bbro = $class_pm->productsBookedCount($ps['jng_warehouses_id'], $ps['products_id'], $ps['articles_id']);
$stock_new = $stock_new - $bbro;
if ($stock_new < 0) {
$result = 'ERROR-BOOK';
} elseif ($ps['stock'] + $bbro == $stock_old) {
$class_pm->stockAdjust($ps['jng_warehouses_id'], $ps['products_id'], $ps['articles_id'], $stock_new, "ADJUST by {$session_userinfo['username']}");
$result = 'OK';
} else {
$result = 'ERROR-CHANGED';
}
echo $result;
exit;
}
}
function openStockDetail($psid)
{
global $messagebox;
if ($psid == '') {
$messagebox->add('Can not find Stock information for such Product, please recheck your input');
} else {
global $hidemenuscript;