} $id = find_submit('Delete'); if ($id != -1) { handle_delete_item($id); } if (isset($_POST['UpdateItem'])) { handle_update_item(); } if (isset($_POST['AddItem'])) { handle_new_item(); } if (isset($_POST['CancelItemChanges'])) { line_start_focus(); } //-------------------------------------------------------------------------------- check_db_has_stock_items(_("There are no inventory items defined in the system.")); check_db_has_customer_branches(_("There are no customers, or there are no customers with branches. Please define customers and customer branches.")); if ($_SESSION['Items']->trans_type == ST_SALESINVOICE) { $idate = _("Invoice Date:"); $orderitems = _("Sales Invoice Items"); $deliverydetails = _("Enter Delivery Details and Confirm Invoice"); $cancelorder = _("Cancel Invoice"); $porder = _("Place Invoice"); } elseif ($_SESSION['Items']->trans_type == ST_CUSTDELIVERY) { $idate = _("Delivery Date:"); $orderitems = _("Delivery Note Items"); $deliverydetails = _("Enter Delivery Details and Confirm Dispatch"); $cancelorder = _("Cancel Delivery"); $porder = _("Place Delivery"); } elseif ($_SESSION['Items']->trans_type == ST_SALESQUOTE) { $idate = _("Quotation Date:");
$js .= get_js_open_window(900, 500); } if ($use_date_picker) { $js .= get_js_date_picker(); } if (isset($_GET['NewCredit'])) { $_SESSION['page_title'] = tr("Customer Credit Note"); handle_new_credit(0); } elseif (isset($_GET['ModifyCredit'])) { $_SESSION['page_title'] = sprintf(tr("Modifying Customer Credit Note #%d"), $_GET['ModifyCredit']); handle_new_credit($_GET['ModifyCredit']); $help_page_title = tr("Modifying Customer Credit Note"); } page($_SESSION['page_title'], false, false, "", $js); //----------------------------------------------------------------------------- check_db_has_stock_items(tr("There are no items defined in the system.")); check_db_has_customer_branches(tr("There are no customers, or there are no customers with branches. Please define customers and customer branches.")); //----------------------------------------------------------------------------- if (isset($_GET['AddedID'])) { $credit_no = $_GET['AddedID']; $trans_type = 11; display_notification_centered(sprintf(tr("Credit Note # %d has been processed"), $credit_no)); display_note(get_customer_trans_view_str($trans_type, $credit_no, tr("View this credit note")), 0, 1); display_note(get_gl_view_str($trans_type, $credit_no, tr("View the GL Journal Entries for this Credit Note"))); hyperlink_params($_SERVER['PHP_SELF'], tr("Enter Another Credit Note"), "NewCredit=yes"); display_footer_exit(); } //-------------------------------------------------------------------------------- function line_start_focus() { set_focus(get_company_pref('no_supplier_list') ? 'stock_id_edit' : 'StockID2');