本文整理汇总了PHP中handle_delete_item函数的典型用法代码示例。如果您正苦于以下问题:PHP handle_delete_item函数的具体用法?PHP handle_delete_item怎么用?PHP handle_delete_item使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了handle_delete_item函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete_po
delete_po($_SESSION['PO']->order_no);
}
$_SESSION['PO']->clear_items();
$_SESSION['PO'] = new purch_order();
display_note(tr("This purchase order has been cancelled."), 0, 1);
hyperlink_params($path_to_root . "/purchasing/po_entry_items.php", tr("Enter a new purchase order"), "NewOrder=Yes");
echo "<br>";
end_page();
exit;
}
//---------------------------------------------------------------------------------------------------
if (isset($_GET['Delete']) || isset($_GET['Edit'])) {
copy_from_po();
}
if (isset($_GET['Delete'])) {
handle_delete_item();
}
//---------------------------------------------------------------------------------------------------
function check_data()
{
if (!check_num('qty', 0)) {
display_error(tr("The quantity of the order item must be numeric and not less than zero."));
set_focus('qty');
return false;
}
if (!check_num('price', 0)) {
display_error(tr("The price entered must be numeric and not less than zero."));
set_focus('price');
return false;
}
if (!is_date($_POST['req_del_date'])) {
示例2: line_start_focus
line_start_focus();
}
//-----------------------------------------------------------------------------------------------
function handle_new_item()
{
if (!check_item_data()) {
return;
}
$amount = ($_SESSION['pay_items']->trans_type == ST_BANKPAYMENT ? 1 : -1) * input_num('amount');
$_SESSION['pay_items']->add_gl_item($_POST['code_id'], $_POST['dimension_id'], $_POST['dimension2_id'], $amount, $_POST['LineMemo']);
line_start_focus();
}
//-----------------------------------------------------------------------------------------------
$id = find_submit('Delete');
if ($id != -1) {
handle_delete_item($id);
}
if (isset($_POST['AddItem'])) {
handle_new_item();
}
if (isset($_POST['UpdateItem'])) {
handle_update_item();
}
if (isset($_POST['CancelItemChanges'])) {
line_start_focus();
}
if (isset($_POST['go'])) {
display_quick_entries($_SESSION['pay_items'], $_POST['person_id'], input_num('totamount'), $_SESSION['pay_items']->trans_type == ST_BANKPAYMENT ? QE_PAYMENT : QE_DEPOSIT);
$_POST['totamount'] = price_format(0);
$Ajax->activate('totamount');
line_start_focus();