X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fcredit_note_entry.php;h=bc8a9e98f422091f50bfea779eb9def4fc547f77;hb=0e484731f1e6036625f5f22a59be003d0b409ef2;hp=1946aca1e339a6728e548e8db38f8e039b5dedf1;hpb=61027f425da0c66e2802076d6b48472462f3cf3b;p=fa-stable.git diff --git a/sales/credit_note_entry.php b/sales/credit_note_entry.php index 1946aca1..bc8a9e98 100644 --- a/sales/credit_note_entry.php +++ b/sales/credit_note_entry.php @@ -10,6 +10,7 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/data_checks.inc"); include_once($path_to_root . "/sales/includes/sales_db.inc"); include_once($path_to_root . "/sales/includes/sales_ui.inc"); +include_once($path_to_root . "/sales/includes/db/sales_types_db.inc"); include_once($path_to_root . "/sales/includes/ui/sales_credit_ui.inc"); include_once($path_to_root . "/sales/includes/ui/sales_order_ui.inc"); @@ -57,7 +58,9 @@ if (isset($_GET['AddedID'])) { //-------------------------------------------------------------------------------- function line_start_focus() { - set_focus(get_company_pref('no_supplier_list') ? 'stock_id_edit' : 'StockID2'); + global $Ajax; + $Ajax->activate('items_table'); + set_focus('_stock_id_edit'); } //----------------------------------------------------------------------------- @@ -93,6 +96,7 @@ function handle_new_credit($trans_no) processing_start(); $_SESSION['Items'] = new Cart(11,$trans_no); copy_from_cn(); + line_start_focus(); } //----------------------------------------------------------------------------- @@ -135,6 +139,7 @@ if (isset($_POST['ProcessCredit']) && can_process()) { display_note(_("For credit notes created to write off the stock, a general ledger account is required to be selected."), 1, 0); display_note(_("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;