X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=gl%2Fgl_payment.php;h=60efb8ae655585504fc28833d988f2de6d1e1aae;hb=b32d16b2c0c6c43e569ebe87e2a13ceb892b5788;hp=12d05480f5dbf4b393e2b70947b296f85fc4879b;hpb=6183e9450dcd7e4c747889c10903f6ff1b0add33;p=fa-stable.git diff --git a/gl/gl_payment.php b/gl/gl_payment.php index 12d05480..60efb8ae 100644 --- a/gl/gl_payment.php +++ b/gl/gl_payment.php @@ -17,7 +17,7 @@ if ($use_popup_windows) $js .= get_js_open_window(800, 500); if ($use_date_picker) $js .= get_js_date_picker(); -set_focus('CodeID2'); + page(_("Bank Account Payment Entry"), false, false, '', $js); //----------------------------------------------------------------------------------------------- @@ -183,6 +183,7 @@ function handle_update_item() $_SESSION['pay_items']->update_gl_item($_POST['Index'], $_POST['dimension_id'], $_POST['dimension2_id'], input_num('amount'), $_POST['LineMemo']); } + set_focus('_code_id_edit'); } //----------------------------------------------------------------------------------------------- @@ -205,20 +206,30 @@ function handle_new_item() //----------------------------------------------------------------------------------------------- -if (isset($_GET['Delete']) || isset($_GET['Edit'])) +if (isset($_GET['Edit'])) { + copy_from_py(); + set_focus('dimension_id'); +} +if (isset($_GET['Delete'])) { copy_from_py(); - -if (isset($_GET['Delete'])) handle_delete_item(); - -if (isset($_POST['AddItem']) || isset($_POST['UpdateItem'])) + set_focus('_code_id_edit'); +} +if (isset($_POST['AddItem'])) { copy_to_py(); - -if (isset($_POST['AddItem'])) handle_new_item(); - -if (isset($_POST['UpdateItem'])) + set_focus('_code_id_edit'); +} +if (isset($_POST['UpdateItem'])) { + copy_to_py(); handle_update_item(); + set_focus('_code_id_edit'); +} +if (isset($_POST['CancelItemChanges'])) + set_focus('_code_id_edit'); + +if (isset($_POST['EditItem'])) + set_focus('dimension_id'); //----------------------------------------------------------------------------------------------- @@ -244,9 +255,13 @@ end_table(1); if (!isset($_POST['Process'])) { - submit_center_first('Update', _("Update")); if ($_SESSION['pay_items']->count_gl_items() >= 1) + { + submit_center_first('Update', _("Update")); submit_center_last('Process', _("Process Payment")); + } + else + submit_center('Update', _("Update")); } end_form();