= " . $_POST['FromTransNo']. " AND $trans_no_name <= " . $_POST['ToTransNo']; if ($type_name != null) $sql .= " AND $type_name = " . $_POST['filterType']; $sql .= " ORDER BY $trans_no_name"; $result = db_query($sql, "could not query transactions on $table_name"); if (db_num_rows($result) == 0) { echo _("There are no transactions for the given parameters."); return; } $print_type = $_POST['filterType']; $print_out = ($print_type == 10 || $print_type == 11 || $print_type == systypes::cust_dispatch() || $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 $th = array(_("#"), _("View"), _("Print"), _("GL")); } else { if ($trans_ref) $th = array(_("#"), _("Reference"), _("View"), _("GL")); else $th = array(_("#"), _("View"), _("GL")); } div_start('transactions'); start_table($table_style); table_header($th); $k = 0; while ($line = db_fetch($result)) { alt_table_row_color($k); 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"))); 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"))); end_row(); } end_table(); div_end(); } } //---------------------------------------------------------------------------------------- if (isset($_POST['ProcessSearch'])) { if (!check_valid_entries()) unset($_POST['ProcessSearch']); $Ajax->activate('transactions'); } //---------------------------------------------------------------------------------------- viewing_controls(); handle_search(); br(2); end_page(); ?>