submenu_print(_("&Email Delivery Note"), ST_CUSTDELIVERY, $delivery, null, 1);
    submenu_print(_("P&rint as Packing Slip"), ST_CUSTDELIVERY, $delivery, 'prtopt', null, 1);
    submenu_print(_("E&mail as Packing Slip"), ST_CUSTDELIVERY, $delivery, null, 1, 1);
    set_focus('prtopt');
    display_note(get_gl_view_str(ST_CUSTDELIVERY, $delivery, _("View the GL Journal Entries for this Dispatch")), 0, 1);
    submenu_option(_("Make &Invoice Against This Delivery"), "/sales/customer_invoice.php?DeliveryNumber={$delivery}");
    if (isset($_GET['Type']) && $_GET['Type'] == 1) {
        submenu_option(_("Enter a New Template &Delivery"), "/sales/inquiry/sales_orders_view.php?DeliveryTemplates=Yes");
    } else {
        submenu_option(_("Enter a &New Delivery"), "/sales/sales_order_entry.php?NewDelivery=0");
    }
    display_footer_exit();
} elseif (isset($_GET['AddedDI'])) {
    $invoice = $_GET['AddedDI'];
    display_notification_centered(sprintf(_("Invoice # %d has been entered."), $invoice));
    submenu_view(_("&View This Invoice"), ST_SALESINVOICE, $invoice);
    submenu_print(_("&Print Sales Invoice"), ST_SALESINVOICE, $invoice . "-" . ST_SALESINVOICE, 'prtopt');
    submenu_print(_("&Email Sales Invoice"), ST_SALESINVOICE, $invoice . "-" . ST_SALESINVOICE, null, 1);
    set_focus('prtopt');
    $sql = "SELECT trans_type_from, trans_no_from FROM " . TB_PREF . "cust_allocations\n\t\t\tWHERE trans_type_to=" . ST_SALESINVOICE . " AND trans_no_to=" . db_escape($invoice);
    $result = db_query($sql, "could not retrieve customer allocation");
    $row = db_fetch($result);
    if ($row !== false) {
        submenu_print(_("Print &Receipt"), $row['trans_type_from'], $row['trans_no_from'] . "-" . $row['trans_type_from'], 'prtopt');
    }
    display_note(get_gl_view_str(ST_SALESINVOICE, $invoice, _("View the GL &Journal Entries for this Invoice")), 0, 1);
    if (isset($_GET['Type']) && $_GET['Type'] == 1) {
        submenu_option(_("Enter a &New Template Invoice"), "/sales/inquiry/sales_orders_view.php?InvoiceTemplates=Yes");
    } else {
        submenu_option(_("Enter a &New Direct Invoice"), "/sales/sales_order_entry.php?NewInvoice=0");
    }
}
if (!isset($_POST['customer_id'])) {
    $_SESSION['alloc']->person_id = $_POST['customer_id'] = get_global_customer(false);
    $_SESSION['alloc']->read();
}
if (!isset($_POST['DateBanked'])) {
    $_POST['DateBanked'] = new_doc_date();
    if (!is_date_in_fiscalyear($_POST['DateBanked'])) {
        $_POST['DateBanked'] = end_fiscalyear();
    }
}
if (isset($_GET['AddedID'])) {
    $payment_no = $_GET['AddedID'];
    display_notification_centered(_("The customer payment has been successfully entered."));
    submenu_print(_("&Print This Receipt"), ST_CUSTPAYMENT, $payment_no . "-" . ST_CUSTPAYMENT, 'prtopt');
    submenu_view(_("&View this Customer Payment"), ST_CUSTPAYMENT, $payment_no);
    submenu_option(_("Enter Another &Customer Payment"), "/sales/customer_payments.php");
    submenu_option(_("Enter Other &Deposit"), "/gl/gl_bank.php?NewDeposit=Yes");
    submenu_option(_("Enter Payment to &Supplier"), "/purchasing/supplier_payment.php");
    submenu_option(_("Enter Other &Payment"), "/gl/gl_bank.php?NewPayment=Yes");
    submenu_option(_("Bank Account &Transfer"), "/gl/bank_transfer.php");
    display_note(get_gl_view_str(ST_CUSTPAYMENT, $payment_no, _("&View the GL Journal Entries for this Customer Payment")));
    display_footer_exit();
} elseif (isset($_GET['UpdatedID'])) {
    $payment_no = $_GET['UpdatedID'];
    display_notification_centered(_("The customer payment has been successfully updated."));
    submenu_print(_("&Print This Receipt"), ST_CUSTPAYMENT, $payment_no . "-" . ST_CUSTPAYMENT, 'prtopt');
    display_note(get_gl_view_str(ST_CUSTPAYMENT, $payment_no, _("&View the GL Journal Entries for this Customer Payment")));
    //	hyperlink_params($path_to_root . "/sales/allocations/customer_allocate.php", _("&Allocate this Customer Payment"), "trans_no=$payment_no&trans_type=12");
    hyperlink_no_params($path_to_root . "/sales/inquiry/customer_inquiry.php?", _("Select Another Customer Payment for &Edition"));
    hyperlink_no_params($path_to_root . "/sales/customer_payments.php", _("Enter Another &Customer Payment"));
示例#3
0
                    $_POST['amount'] = $_POST['amount' . $line] = price_format($un_allocated);
                    break;
                }
            }
            unset($inv);
        } else {
            display_error(_("Invalid purchase invoice number."));
        }
    }
}
if (isset($_GET['AddedID'])) {
    $payment_id = $_GET['AddedID'];
    display_notification_centered(_("Payment has been sucessfully entered"));
    submenu_print(_("&Print This Remittance"), ST_SUPPAYMENT, $payment_id . "-" . ST_SUPPAYMENT, 'prtopt');
    submenu_print(_("&Email This Remittance"), ST_SUPPAYMENT, $payment_id . "-" . ST_SUPPAYMENT, null, 1);
    submenu_view(_("View this Payment"), ST_SUPPAYMENT, $payment_id);
    display_note(get_gl_view_str(ST_SUPPAYMENT, $payment_id, _("View the GL &Journal Entries for this Payment")), 0, 1);
    submenu_option(_("Enter another supplier &payment"), "/purchasing/supplier_payment.php?supplier_id=" . $_POST['supplier_id']);
    submenu_option(_("Enter Other &Payment"), "/gl/gl_bank.php?NewPayment=Yes");
    submenu_option(_("Enter &Customer Payment"), "/sales/customer_payments.php");
    submenu_option(_("Enter Other &Deposit"), "/gl/gl_bank.php?NewDeposit=Yes");
    submenu_option(_("Bank Account &Transfer"), "/gl/bank_transfer.php");
    display_footer_exit();
}
//----------------------------------------------------------------------------------------
function check_inputs()
{
    global $Refs;
    if (!get_post('supplier_id')) {
        display_error(_("There is no supplier selected."));
        set_focus('supplier_id');