本文整理汇总了PHP中meta_forward函数的典型用法代码示例。如果您正苦于以下问题:PHP meta_forward函数的具体用法?PHP meta_forward怎么用?PHP meta_forward使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了meta_forward函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: new_doc_date
$bo_policy = 1;
}
$newdelivery = $dn->trans_no == 0;
if ($newdelivery) {
new_doc_date($dn->document_date);
}
$delivery_no = $dn->write($bo_policy);
if ($delivery_no == -1) {
display_error(_("The entered reference is already in use."));
set_focus('ref');
} else {
processing_end();
if ($newdelivery) {
meta_forward($_SERVER['PHP_SELF'], "AddedID={$delivery_no}");
} else {
meta_forward($_SERVER['PHP_SELF'], "UpdatedID={$delivery_no}");
}
}
}
if (isset($_POST['Update']) || isset($_POST['_Location_update']) || isset($_POST['qty']) || isset($_POST['process_delivery'])) {
$Ajax->activate('Items');
}
//------------------------------------------------------------------------------
start_form();
hidden('cart_id');
start_table(TABLESTYLE2, "width=90%", 5);
echo "<tr><td>";
// outer table
start_table(TABLESTYLE, "width=100%");
start_row();
label_cells(_("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'");
示例2: handle_delete
function handle_delete()
{
global $selected_id;
if ($selected_id == "") {
return;
}
delete_exchange_rate($selected_id);
meta_forward($_SERVER['PHP_SELF']);
}
示例3: handle_submit
function handle_submit()
{
if (!check_data()) {
return;
}
$trans = add_exchange_variation_all($_POST['date'], $_POST['ref'], $_POST['memo_']);
meta_forward($_SERVER['PHP_SELF'], "AddedID=" . $trans[0] . "&JE=" . $trans[1]);
//clear_data();
}
示例4: handle_delete
function handle_delete($todate)
{
global $selected_id;
if (!check_can_delete($todate)) {
return;
}
//only delete if used in neither customer or supplier, comp prefs, bank trans accounts
delete_fiscalyear($selected_id);
meta_forward($_SERVER['PHP_SELF']);
}
示例5: update_debtor_trans_allocation
/*end of the loop through the array of allocations made */
update_debtor_trans_allocation($_SESSION['alloc']->type, $_SESSION['alloc']->trans_no, $total_allocated);
commit_transaction();
clear_allocations();
}
//--------------------------------------------------------------------------------
if (isset($_POST['Process'])) {
if (check_data()) {
handle_process();
$_POST['Cancel'] = 1;
}
}
//--------------------------------------------------------------------------------
if (isset($_POST['Cancel'])) {
clear_allocations();
meta_forward($path_to_root . "/sales/allocations/customer_allocation_main.php");
exit;
}
//--------------------------------------------------------------------------------
function get_allocations_for_transaction($type, $trans_no)
{
clear_allocations();
$debtor = get_customer_trans($trans_no, $type);
$_SESSION['alloc'] = new allocation($trans_no, $type, $debtor["debtor_no"], $debtor["DebtorName"], $debtor["Total"], sql2date($debtor["tran_date"]));
/* Now populate the array of possible (and previous actual) allocations for this customer */
/*First get the transactions that have outstanding balances ie Total-alloc >0 */
$trans_items = get_allocatable_to_cust_transactions($_SESSION['alloc']->person_id);
while ($myrow = db_fetch($trans_items)) {
$_SESSION['alloc']->add_item($myrow["type"], $myrow["trans_no"], sql2date($myrow["tran_date"]), sql2date($myrow["due_date"]), $myrow["Total"], $myrow["alloc"], 0);
// this allocation
}
示例6: handle_cancel_order
function handle_cancel_order()
{
global $path_to_root, $Ajax;
if ($_SESSION['Items']->trans_type == ST_CUSTDELIVERY) {
display_notification(_("Direct delivery entry has been cancelled as requested."), 1);
submenu_option(_("Enter a New Sales Delivery"), "/sales/sales_order_entry.php?NewDelivery=1");
} elseif ($_SESSION['Items']->trans_type == ST_SALESINVOICE) {
display_notification(_("Direct invoice entry has been cancelled as requested."), 1);
submenu_option(_("Enter a New Sales Invoice"), "/sales/sales_order_entry.php?NewInvoice=1");
} elseif ($_SESSION['Items']->trans_type == ST_SALESQUOTE) {
if ($_SESSION['Items']->trans_no != 0) {
delete_sales_order(key($_SESSION['Items']->trans_no), $_SESSION['Items']->trans_type);
}
display_notification(_("This sales quotation has been cancelled as requested."), 1);
submenu_option(_("Enter a New Sales Quotation"), "/sales/sales_order_entry.php?NewQuotation=Yes");
} else {
// sales order
if ($_SESSION['Items']->trans_no != 0) {
$order_no = key($_SESSION['Items']->trans_no);
if (sales_order_has_deliveries($order_no)) {
close_sales_order($order_no);
display_notification(_("Undelivered part of order has been cancelled as requested."), 1);
submenu_option(_("Select Another Sales Order for Edition"), "/sales/inquiry/sales_orders_view.php?type=" . ST_SALESORDER);
} else {
delete_sales_order(key($_SESSION['Items']->trans_no), $_SESSION['Items']->trans_type);
display_notification(_("This sales order has been cancelled as requested."), 1);
submenu_option(_("Enter a New Sales Order"), "/sales/sales_order_entry.php?NewOrder=Yes");
}
} else {
processing_end();
meta_forward($path_to_root . '/index.php', 'application=orders');
}
}
processing_end();
display_footer_exit();
}
示例7: new_doc_date
}
//----------------------------------------------------------------------------------------------
if (isset($_POST['_customer_id_button'])) {
// unset($_POST['branch_id']);
$Ajax->activate('BranchID');
}
//----------------------------------------------------------------------------------------------
if (get_post('AddPaymentItem') && can_process()) {
new_doc_date($_POST['DateBanked']);
$new_pmt = !$_SESSION['alloc']->trans_no;
//Chaitanya : 13-OCT-2011 - To support Edit feature
$payment_no = write_customer_payment($_SESSION['alloc']->trans_no, $_POST['customer_id'], $_POST['BranchID'], $_POST['bank_account'], $_POST['DateBanked'], $_POST['ref'], input_num('amount'), input_num('discount'), $_POST['memo_'], 0, input_num('charge'), input_num('bank_amount', input_num('amount')));
$_SESSION['alloc']->trans_no = $payment_no;
$_SESSION['alloc']->write();
unset($_SESSION['alloc']);
meta_forward($_SERVER['PHP_SELF'], $new_pmt ? "AddedID={$payment_no}" : "UpdatedID={$payment_no}");
}
//----------------------------------------------------------------------------------------------
function read_customer_data()
{
global $Refs;
$myrow = get_customer_habit($_POST['customer_id']);
$_POST['HoldAccount'] = $myrow["dissallow_invoices"];
$_POST['pymt_discount'] = $myrow["pymt_discount"];
//Chaitanya : 13-OCT-2011 - To support Edit feature
//If page is called first time and New entry fetch the nex reference number
if (!$_SESSION['alloc']->trans_no && !isset($_POST['charge'])) {
$_POST['ref'] = $Refs->get_next(ST_CUSTPAYMENT);
}
}
//----------------------------------------------------------------------------------------------
示例8: handle_delete
function handle_delete()
{
global $comp_path, $def_coy, $db_connections, $comp_subdirs;
$id = $_GET['id'];
$err = remove_connection($id);
if ($err == 0) {
display_error(tr("Error removing Database: ") . $dbase . tr(", please remove it manuallly"));
}
if ($def_coy == $id) {
$def_coy = 0;
}
$error = write_config_db();
if ($error == -1) {
display_error(tr("Cannot open the configuration file - ") . $path_to_root . "/config_db.php");
} else {
if ($error == -2) {
display_error(tr("Cannot write to the configuration file - ") . $path_to_root . "/config_db.php");
} else {
if ($error == -3) {
display_error(tr("The configuration file ") . $path_to_root . "/config_db.php" . tr(" is not writable. Change its permissions so it is, then re-run the operation."));
}
}
}
if ($error != 0) {
return;
}
$cdir = $comp_path . '/' . $id;
flush_dir($cdir);
if (!rmdir($cdir)) {
display_error(tr("Cannot remove company data directory ") . $cdir);
return;
}
meta_forward($_SERVER['PHP_SELF']);
}
示例9: handle_add_deposit
function handle_add_deposit()
{
new_doc_date($_POST['DatePaid']);
$trans_no = add_bank_transfer($_POST['FromBankAccount'], $_POST['ToBankAccount'], $_POST['DatePaid'], input_num('amount'), $_POST['ref'], $_POST['memo_'], input_num('charge'), input_num('target_amount'));
meta_forward($_SERVER['PHP_SELF'], "AddedID={$trans_no}");
}
示例10: COUNT
// PREVENT DELETES IF DEPENDENT RECORDS IN 'debtor_trans'
$sql = "SELECT COUNT(*) FROM debtor_trans WHERE branch_code='" . $_POST['branch_code'] . "' AND debtor_no = '" . $_POST['customer_id'] . "'";
$result = db_query($sql, "could not query debtortrans");
$myrow = db_fetch_row($result);
if ($myrow[0] > 0) {
display_error(tr("Cannot delete this branch because customer transactions have been created to this branch."));
} else {
$sql = "SELECT COUNT(*) FROM sales_orders WHERE branch_code='" . $_POST['branch_code'] . "' AND debtor_no = '" . $_POST['customer_id'] . "'";
$result = db_query($sql, "could not query sales orders");
$myrow = db_fetch_row($result);
if ($myrow[0] > 0) {
display_error(tr("Cannot delete this branch because sales orders exist for it. Purge old sales orders first."));
} else {
$sql = "DELETE FROM cust_branch WHERE branch_code='" . $_POST['branch_code'] . "' AND debtor_no='" . $_POST['customer_id'] . "'";
db_query($sql, "could not delete branch");
meta_forward($_SERVER['PHP_SELF'], "debtor_no=" . $_POST['customer_id']);
}
}
//end ifs to test if the branch can be deleted
}
start_form();
echo "<center>" . tr("Select a customer: ") . " ";
customer_list('customer_id', null, false, true);
echo "</center><br><br>";
check_branches();
// we always want to have a branch (if possible)
$num_branches = db_customer_has_branches($_POST['customer_id']);
if ($num_branches) {
$sql = "SELECT debtors_master.name, cust_branch.*, salesman.salesman_name," . "areas.description, tax_groups.name AS tax_group_name " . "FROM cust_branch, debtors_master, areas, salesman, tax_groups " . "WHERE cust_branch.debtor_no=debtors_master.debtor_no " . "AND cust_branch.tax_group_id=tax_groups.id " . "AND cust_branch.area=areas.area_code " . "AND cust_branch.salesman=salesman.salesman_code " . "AND cust_branch.debtor_no = '" . $_POST['customer_id'] . "'";
$result = db_query($sql, "could not get customer branches");
start_table("{$table_style} width=60%");
示例11: process_receive_po
function process_receive_po()
{
global $path_to_root, $Ajax;
if (!can_process()) {
return;
}
if (check_po_changed()) {
display_error(_("This order has been changed or invoiced since this delivery was started to be actioned. Processing halted. To enter a delivery against this purchase order, it must be re-selected and re-read again to update the changes made by the other user."));
hyperlink_no_params("{$path_to_root}/purchasing/inquiry/po_search.php", _("Select a different purchase order for receiving goods against"));
hyperlink_params("{$path_to_root}/purchasing/po_receive_items.php", _("Re-Read the updated purchase order for receiving goods against"), "PONumber=" . $_SESSION['PO']->order_no);
unset($_SESSION['PO']->line_items);
unset($_SESSION['PO']);
unset($_POST['ProcessGoodsReceived']);
$Ajax->activate('_page_body');
display_footer_exit();
}
$grn =& $_SESSION['PO'];
$grn->orig_order_date = $_POST['DefaultReceivedDate'];
$grn->reference = $_POST['ref'];
$grn->Location = $_POST['Location'];
$grn->ex_rate = input_num('_ex_rate', null);
$grn_no = add_grn($grn);
new_doc_date($_POST['DefaultReceivedDate']);
unset($_SESSION['PO']->line_items);
unset($_SESSION['PO']);
meta_forward($_SERVER['PHP_SELF'], "AddedID={$grn_no}");
}
示例12: display_error
if (work_order_has_productions($selected_id) || work_order_has_issues($selected_id) || work_order_has_payments($selected_id)) {
display_error(_("This work order cannot be deleted because it has already been processed."));
$cancel_delete = true;
}
if ($cancel_delete == false) {
//ie not cancelled the delete as a result of above tests
// delete the actual work order
delete_work_order($selected_id);
meta_forward($_SERVER['PHP_SELF'], "DeletedID={$selected_id}");
}
}
//-------------------------------------------------------------------------------------
if (isset($_POST['close'])) {
// update the closed flag in the work order
close_work_order($selected_id);
meta_forward($_SERVER['PHP_SELF'], "ClosedID={$selected_id}");
}
//-------------------------------------------------------------------------------------
if (get_post('_type_update')) {
$Ajax->activate('_page_body');
}
//-------------------------------------------------------------------------------------
start_form();
start_table(TABLESTYLE2);
$existing_comments = "";
$dec = 0;
if (isset($selected_id)) {
$myrow = get_work_order($selected_id);
if (strlen($myrow[0]) == 0) {
echo _("The order number sent is not valid.");
safe_exit();
示例13: begin_transaction
if (isset($_POST['Process']) && !check_trans()) {
begin_transaction();
$_SESSION['pay_items'] =& $_SESSION['pay_items'];
$new = $_SESSION['pay_items']->order_id == 0;
add_new_exchange_rate(get_bank_account_currency(get_post('bank_account')), get_post('date_'), input_num('_ex_rate'));
$trans = write_bank_transaction($_SESSION['pay_items']->trans_type, $_SESSION['pay_items']->order_id, $_POST['bank_account'], $_SESSION['pay_items'], $_POST['date_'], $_POST['PayType'], $_POST['person_id'], get_post('PersonDetailID'), $_POST['ref'], $_POST['memo_'], true, input_num('settled_amount', null));
$trans_type = $trans[0];
$trans_no = $trans[1];
new_doc_date($_POST['date_']);
$_SESSION['pay_items']->clear_items();
unset($_SESSION['pay_items']);
commit_transaction();
if ($new) {
meta_forward($_SERVER['PHP_SELF'], $trans_type == ST_BANKPAYMENT ? "AddedID={$trans_no}" : "AddedDep={$trans_no}");
} else {
meta_forward($_SERVER['PHP_SELF'], $trans_type == ST_BANKPAYMENT ? "UpdatedID={$trans_no}" : "UpdatedDep={$trans_no}");
}
}
//-----------------------------------------------------------------------------------------------
function check_item_data()
{
if (!check_num('amount', 0)) {
display_error(_("The amount entered is not a valid number or is less than zero."));
set_focus('amount');
return false;
}
if (isset($_POST['_ex_rate']) && input_num('_ex_rate') <= 0) {
display_error(_("The exchange rate cannot be zero or a negative number."));
set_focus('_ex_rate');
return false;
}
示例14: set_focus
set_focus('discount');
return false;
}
return true;
}
//----------------------------------------------------------------------------------------------
// validate inputs
if (isset($_POST['AddPaymentItem'])) {
if (!can_process()) {
unset($_POST['AddPaymentItem']);
}
}
//----------------------------------------------------------------------------------------------
if (isset($_POST['AddPaymentItem'])) {
$payment_no = write_customer_payment(0, $_POST['customer_id'], $_POST['BranchID'], $_POST['bank_account'], $_POST['DateBanked'], $_POST['ReceiptType'], $_POST['ref'], input_num('amount'), input_num('discount'), $_POST['memo_']);
meta_forward($_SERVER['PHP_SELF'], "AddedID={$payment_no}");
}
//----------------------------------------------------------------------------------------------
function read_customer_data()
{
$sql = "SELECT debtors_master.pymt_discount,\n\t\tcredit_status.dissallow_invoices\n\t\tFROM debtors_master, credit_status\n\t\tWHERE debtors_master.credit_status = credit_status.id\n\t\t\tAND debtors_master.debtor_no = '" . $_POST['customer_id'] . "'";
$result = db_query($sql, "could not query customers");
$myrow = db_fetch($result);
$_POST['HoldAccount'] = $myrow["dissallow_invoices"];
$_POST['pymt_discount'] = $myrow["pymt_discount"];
$_POST['ref'] = references::get_next(12);
}
//-------------------------------------------------------------------------------------------------
function display_item_form()
{
global $table_style2;
示例15: display_note
}
return $input_error == 0;
}
//-----------------------------------------------------------------------------
if (isset($_POST['ProcessCredit']) && can_process()) {
if ($_POST['CreditType'] == "WriteOff" && (!isset($_POST['WriteOffGLCode']) || $_POST['WriteOffGLCode'] == '')) {
display_note(tr("For credit notes created to write off the stock, a general ledger account is required to be selected."), 1, 0);
display_note(tr("Please select an account to write the cost of the stock off to, then click on Process again."), 1, 0);
exit;
}
if (!isset($_POST['WriteOffGLCode'])) {
$_POST['WriteOffGLCode'] = 0;
}
$credit_no = $_SESSION['Items']->write($_POST['WriteOffGLCode']);
processing_end();
meta_forward($_SERVER['PHP_SELF'], "AddedID={$credit_no}");
}
/*end of process credit note */
//-----------------------------------------------------------------------------
function check_item_data()
{
if (!check_num('qty', 0)) {
display_error(tr("The quantity must be greater than zero."));
set_focus('qty');
return false;
}
if (!check_num('price', 0)) {
display_error(tr("The entered price is negative or invalid."));
set_focus('price');
return false;
}