but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here <http://www.gnu.org/licenses/gpl-3.0.html>. ***********************************************************************/ $page_security = 'SA_REQUISITIONS'; $path_to_root = "../.."; include $path_to_root . "/includes/session.inc"; add_access_extensions(); page(_($help_context = "Requisitions")); include_once $path_to_root . "/modules/requisitions/includes/modules_db.inc"; include_once $path_to_root . "/includes/ui.inc"; include_once $path_to_root . "/includes/ui/ui_lists.inc"; simple_page_mode(true); //----------------------------------------------------------------------------------- if (isset($_GET['requisitionid'])) { $req = get_requisition($_GET['requisitionid']); if (!$req || $req['completed']) { display_error(sprintf(_("Requisition #%d is already completed or does not exists."), $_GET['requisitionid'])); submenu_option(_("Entry &New Requisition."), '/modules/requisitions/requisitions.php'); display_footer_exit(); } if (isset($_GET['complete']) && $_GET['complete'] == 'yes') { complete_requisition($_GET['requisitionid']); display_notification(sprintf(_("Requisition #%d has been completed."), $_GET['requisitionid'])); submenu_option(_("Entry &New Requisition."), '/modules/requisitions/requisitions.php'); display_footer_exit(); } else { $_POST['requisitionid'] = $_GET['requisitionid']; } } if ($Mode == 'ADD_ITEM' || $Mode == 'UPDATE_ITEM') {
label_cell($myrow["point_of_use"]); label_cell($myrow["narrative"]); label_cell(sql2date($myrow["application_date"])); edit_button_cell("Edit" . $myrow['requisition_id'], _("Edit")); inactive_control_cell($myrow["requisition_id"], $myrow["inactive"], 'requisitions', 'requisition_id'); delete_button_cell("Delete" . $myrow['requisition_id'], _("Delete")); echo "<td><a href='requisition_details.php?requisitionid=" . $myrow['requisition_id'] . "'>" . _("Details") . "</a></td>\n"; end_row(); } inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing status code $myrow = get_requisition($selected_id); $_POST['point_of_use'] = $myrow["point_of_use"]; $_POST['narrative'] = $myrow["narrative"]; $_POST['details'] = $myrow["details"]; } hidden('selected_id', $selected_id); } text_row(_("Point of use :"), 'point_of_use', null, 50, 50); text_row(_("Narrative :"), 'narrative', null, 50, 50); textarea_row(_("Details :"), 'details', null, 50, 5); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); //------------------------------------------------------------------------------------ end_page();