X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=admin%2Fview_print_transaction.php;h=dbae9f3467628618b52118c4a2acbecc1a516042;hb=bf00f0e16df5974ecba17b59be8bc660bdf6b8a8;hp=70c5ca51620b9cd048d7fde52173c6c9b7368938;hpb=4dd850870279bb6846695c39194c3d4b0b5c1345;p=fa-stable.git diff --git a/admin/view_print_transaction.php b/admin/view_print_transaction.php index 70c5ca51..dbae9f34 100644 --- a/admin/view_print_transaction.php +++ b/admin/view_print_transaction.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $path_to_root=".."; $page_security = 5; @@ -36,7 +45,7 @@ function viewing_controls() ref_cells(_("to #:"), 'ToTransNo'); - submit_cells('ProcessSearch', _("Search")); + submit_cells('ProcessSearch', _("Search"), '', '', true); end_row(); end_table(1); @@ -50,16 +59,16 @@ function check_valid_entries() { if (!is_numeric($_POST['FromTransNo']) OR $_POST['FromTransNo'] <= 0) { - display_note(_("The starting transaction number is expected to be numeric and greater than zero.")); + display_error(_("The starting transaction number is expected to be numeric and greater than zero.")); return false; } if (!is_numeric($_POST['ToTransNo']) OR $_POST['ToTransNo'] <= 0) { - echo _("The ending transaction number is expected to be numeric and greater than zero."); + display_error(_("The ending transaction number is expected to be numeric and greater than zero.")); return false; } - if ($_POST['filterType'] == "") + if (!isset($_POST['filterType']) || $_POST['filterType'] == "") return false; return true; @@ -100,7 +109,7 @@ function handle_search() if (db_num_rows($result) == 0) { - echo _("There are no transactions for the given parameters."); + display_notification(_("There are no transactions for the given parameters.")); return; } $print_type = $_POST['filterType']; @@ -108,7 +117,6 @@ function handle_search() $print_type == systypes::po() || $print_type == systypes::sales_order()); if ($print_out) { - print_hidden_script($print_type); if ($trans_ref) $th = array(_("#"), _("Reference"), _("View"), _("Print"), _("GL")); else @@ -121,6 +129,7 @@ function handle_search() else $th = array(_("#"), _("View"), _("GL")); } + div_start('transactions'); start_table($table_style); table_header($th); $k = 0; @@ -132,16 +141,17 @@ function handle_search() label_cell($line[$trans_no_name]); if ($trans_ref) label_cell($line[$trans_ref]); - label_cell(get_trans_view_str($_POST['filterType'],$line[$trans_no_name], _("View"))); + label_cell(get_trans_view_str($_POST['filterType'],$line[$trans_no_name], _("View"), ICON_VIEW)); if ($print_out) - label_cell(print_document_link($line[$trans_no_name], _("Print"), true, $print_type)); - label_cell(get_gl_view_str($_POST['filterType'], $line[$trans_no_name], _("View GL"))); + label_cell(print_document_link($line[$trans_no_name], _("Print"), true, $print_type, ICON_PRINT)); + label_cell(get_gl_view_str($_POST['filterType'], $line[$trans_no_name])); end_row(); } end_table(); + div_end(); } } @@ -151,6 +161,7 @@ if (isset($_POST['ProcessSearch'])) { if (!check_valid_entries()) unset($_POST['ProcessSearch']); + $Ajax->activate('transactions'); } //----------------------------------------------------------------------------------------