PageRenderTime 72ms CodeModel.GetById 33ms RepoModel.GetById 0ms app.codeStats 1ms

/PO/detail_tmp2.php

https://github.com/tlezotte/ePOS
PHP | 1733 lines | 1469 code | 88 blank | 176 comment | 197 complexity | 94954c34acf1089a0cfd2c0322749b00 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /**
  3. * Request System
  4. *
  5. * detail.php displays detailed information on PO.
  6. *
  7. * @version 1.5
  8. * @link http://www.yourdomain.com/go/Request/
  9. * @author Thomas LeZotte (tom@lezotte.net)
  10. *
  11. * @package PO
  12. * @filesource
  13. *
  14. * PHP Debug
  15. * @link http://phpdebug.sourceforge.net/
  16. * PDF Toolkit
  17. * @link http://www.accesspdf.com/
  18. */
  19. /**
  20. * - Forward BlackBerry users to BlackBerry version
  21. */
  22. require_once('../include/BlackBerry.php');
  23. /**
  24. * - Start Page Loading Timer
  25. */
  26. include_once('../include/Timer.php');
  27. $starttime = StartLoadTimer();
  28. /**
  29. * - Set debug mode
  30. */
  31. $debug_page = false;
  32. include_once('debug/header.php');
  33. $Dbg->DatabaseName = "Request";
  34. /**
  35. * - Database Connection
  36. */
  37. require_once('../Connections/connDB.php');
  38. /**
  39. * - Config Information
  40. */
  41. require_once('../include/config.php');
  42. /**
  43. * - Check User Access
  44. */
  45. require_once('../security/check_user.php');
  46. /**
  47. * - Form Validation
  48. */
  49. //include('vdaemon/vdaemon.php');
  50. /* -------------------------------------------------------------
  51. * ------------- START FINANCE PROCESSING -------------------
  52. * -------------------------------------------------------------
  53. */
  54. if ($_POST['action'] == 'finance_update') {
  55. $changePlant = false;
  56. $changeDepartment = false;
  57. /* ----- Controller changes Plant ----- */
  58. if ($_POST['currentPlant'] != $_POST['plant']) {
  59. $plant_sql = "UPDATE PO SET plant='" . $_POST['plant'] . "' WHERE id=" . $_POST['type_id']; // Update Bill to Plant
  60. $dbh->query($plant_sql);
  61. if ($default['debug_capture'] == 'on') {
  62. debug_capture($_SESSION['eid'], $_POST['id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($plant_sql))); // Record transaction for history
  63. }
  64. $changePlant = true;
  65. }
  66. /* ----- Controller changes Department ----- */
  67. if ($_POST['currentDepartment'] != $_POST['department']) {
  68. $dept_sql = "UPDATE PO SET department='" . $_POST['department'] . "' WHERE id=" . $_POST['type_id']; // Update Department
  69. $dbh->query($dept_sql);
  70. if ($default['debug_capture'] == 'on') {
  71. debug_capture($_SESSION['eid'], $_POST['id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($dept_sql))); // Record transaction for history
  72. }
  73. $changeDepartment = false; // Turned off because we are not checking for departments now (HQ)
  74. }
  75. /* ----- Forward to new Controller ----- */
  76. if ($changePlant OR $changeDepartment) {
  77. $forward = "router.php?type_id=" . $_POST['type_id'] . "&approval=controller&plant=" . $_POST['plant'] . "&department=" . $_POST['department']; // Check Controler
  78. header("Location: ".$forward);
  79. exit();
  80. }
  81. /* ----- Cycle through items ----- */
  82. for ($x=1; $x <= $_POST['items_count']; $x++) {
  83. $item = "item" . $x; // Item ID
  84. $item_COA = $item . "_newCOA"; // COA value
  85. $item_COAid = $item_COA . "id"; // COA value ID
  86. if (strlen($_POST[$item_COAid]) > 0) {
  87. $item_sql = "UPDATE Items SET cat='" . $_POST[$item_COAid] . "' WHERE id=" . $_POST[$item];
  88. $dbh->query($item_sql);
  89. if ($default['debug_capture'] == 'on') {
  90. debug_capture($_SESSION['eid'], $_POST['id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($item_sql))); // Record transaction for history
  91. }
  92. }
  93. }
  94. /* ----- Update CER numbers and Credit Card ----- */
  95. $po_sql = "UPDATE PO SET cer='" . $_POST['cer'] . "',
  96. creditcard='" . $_POST['creditcard'] . "'
  97. WHERE id=" . $_POST['type_id'];
  98. $dbh->query($po_sql);
  99. if ($default['debug_capture'] == 'on') {
  100. debug_capture($_SESSION['eid'], $_POST['id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($po_sql))); // Record transaction for history
  101. }
  102. }
  103. /* -------------------------------------------------------------
  104. * ------------- END FINANCE PROCESSING -------------------
  105. * -------------------------------------------------------------
  106. */
  107. /* -------------------------------------------------------------
  108. * ---------- START DENIAL PROCESSING --------------------------
  109. * -------------------------------------------------------------
  110. */
  111. if (substr($_POST['auth'],0,3) == 'app' OR $_POST['auth'] == 'controller') {
  112. if (array_key_exists('yes_x', $_POST)) { $yn = "yes"; } // Set approval button pressed
  113. if (array_key_exists('no_x', $_POST)) { $yn = "no"; } // Set approval button pressed
  114. /* ---------------- Check to see if a Comment was provided ---------------- */
  115. if (empty($_POST['Com']) AND $yn == 'no') {
  116. $_SESSION['error'] = "A denied Requisition requires you to enter a Comment.";
  117. $_SESSION['redirect'] = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
  118. header("location: ../error.php");
  119. exit();
  120. }
  121. /* ---------------- Change status for non approved request ---------------- */
  122. if ($yn == 'no') {
  123. setRequestStatus($_POST['type_id'], 'X'); // Update PO status
  124. }
  125. /* ---------------- Update the approvals for the PO ---------------- */
  126. $auth_sql = "UPDATE Authorization
  127. SET ".$_POST['auth']."yn='" . $yn . "',
  128. ".$_POST['auth']."Date=NOW(),
  129. ".$_POST['auth']."Com='" . htmlentities($_POST['Com'], ENT_QUOTES, 'UTF-8') . "'
  130. WHERE id = ".$_POST['auth_id'];
  131. $dbh->query($auth_sql);
  132. if ($default['debug_capture'] == 'on') {
  133. debug_capture($_SESSION['eid'], $_POST['id'], 'debug', $_SERVER['PHP_SELF'], addslashes(htmlentities($auth_sql))); // Record transaction for history
  134. }
  135. if ($_POST['auth'] == 'controller') {
  136. $forward = "router.php?type_id=" . $_POST['type_id'] . "&approval=app0"; // Forward to Approver 1
  137. } else {
  138. $forward = "router.php?type_id=" . $_POST['type_id'] . "&approval=" . $_POST['auth'] . "&yn=" . $yn; // Record Controllers Approval
  139. }
  140. header("Location: ".$forward);
  141. exit();
  142. }
  143. /* -------------------------------------------------------------
  144. * ---------- END DENIAL PROCESSING ----------------------------
  145. * -------------------------------------------------------------
  146. */
  147. /* -------------------------------------------------------------
  148. * ------------- START UPDATE PROCESSING -----------------------
  149. * -------------------------------------------------------------
  150. */
  151. if ($_POST['stage'] == "update") {
  152. /* -------------------------------------------------------------
  153. * ---------- START REQUESTER PROCESSING -----------------------
  154. * -------------------------------------------------------------
  155. */
  156. if ($_POST['auth'] == "req") {
  157. /* ---------------- START CANCEL PURCHASE ORDER -------------- */
  158. if ($_POST['cancel'] == 'yes') {
  159. setRequestStatus($_POST['type_id'], 'C'); // Update PO status
  160. header("location: list.php?action=my&access=0");
  161. exit();
  162. }
  163. /* --------- END CANCEL PURCHASE ORDER ----------------------- */
  164. /* ---------------- START COPY PURCHASE ORDER ---------------- */
  165. // if (array_key_exists('copyrequest_x',$_POST)) {
  166. // /* Getting PO information */
  167. // $PO = $dbh->getRow("SELECT *, DATE_FORMAT(reqDate,'%M %e, %Y') AS _reqDate
  168. // FROM PO
  169. // WHERE id = ?",array($_POST['type_id']));
  170. //
  171. // /* -- Read $PO into $_SESSION -- */
  172. // foreach ($PO as $key => $value) {
  173. // $_SESSION[$key] = $value;
  174. // }
  175. //
  176. // header("location: information.php");
  177. // exit();
  178. // }
  179. /* --------- END COPY PURCHASE ORDER ----------------------- */
  180. /* ---------------- START RESEND PURCHASE ORDER ---------------- */
  181. if (array_key_exists('restorerequest_x',$_POST)) {
  182. setRequestStatus($_POST['type_id'], 'N'); // Update PO status
  183. header("location: router.php?type_id=" . $_POST['type_id'] . "&approval=app0"); // Forward to router as new Request
  184. exit();
  185. }
  186. /* --------- END RESEND PURCHASE ORDER ----------------------- */
  187. }
  188. /* -------------------------------------------------------------
  189. * ---------- END REQUESTER PROCESSING -----------------------
  190. * -------------------------------------------------------------
  191. */
  192. }
  193. /* -------------------------------------------------------------
  194. * ------------- END UPDATE PROCESSING -----------------------
  195. * -------------------------------------------------------------
  196. */
  197. /* -------------------------------------------------------------
  198. * ------------- START PURCHASING PROCESSING -------------------
  199. * -------------------------------------------------------------
  200. */
  201. if ($_POST['action'] == 'purchasing_update') {
  202. /* ------------- Adding supplier contact information ------------- */
  203. if (array_key_exists('sendPO_x',$_POST)) {
  204. print_r($_POST);
  205. exit();
  206. }
  207. /* ------------- Adding supplier contact information ------------- */
  208. if (array_key_exists('addContact_x',$_POST)) {
  209. $status = ($_POST['cc_save'] == 'no') ? '1' : '0';
  210. $sql = "INSERT INTO Contacts (id, request_id, eid, recorded, name, phone, ext, fax, email, status)
  211. VALUES (NULL,
  212. '" . $_POST['id'] . "',
  213. '" . $_SESSION['eid'] . "',
  214. NOW(),
  215. '" . $_POST['cc_name'] . "',
  216. '" . $_POST['cc_phone'] . "',
  217. '" . $_POST['cc_ext'] . "',
  218. '" . $_POST['cc_fax'] . "',
  219. '" . $_POST['cc_email'] . "',
  220. '" . $status . "'
  221. )";
  222. $dbh->query($sql);
  223. header("location: " . $_SERVER['PHP_SELF'] . "?id=" . $_POST['id']);
  224. exit();
  225. }
  226. /* ------------- Adding payment information ------------- */
  227. if (array_key_exists('addPayment_x',$_POST)) {
  228. $sql = "INSERT INTO Payments (pay_id, request_id, pay_eid, pay_recorded, pay_amount, pay_date, pay_status)
  229. VALUES (NULL,
  230. '" . $_POST['id'] . "',
  231. '" . $_SESSION['eid'] . "',
  232. NOW(),
  233. '" . mysql_real_escape_string($_POST['pay_amount']) . "',
  234. '" . mysql_real_escape_string($_POST['paymentDate']) . "',
  235. '0')";
  236. $dbh->query($sql);
  237. header("location: " . $_SERVER['PHP_SELF'] . "?id=" . $_POST['id']);
  238. exit();
  239. }
  240. /* ------------- Update payment information ------------- */
  241. if (array_key_exists('updatePayments_x',$_POST)) {
  242. for ($i=1; $i <= $_POST['payments_count']; $i++) {
  243. $pay_id = "pay_id" . $i;
  244. $pay_amount = "pay_amount" . $i;
  245. $pay_date = "pay_date" . $i;
  246. $pay_remove = "pay_remove" . $i;
  247. $pay_status = ($_POST[$pay_remove] == 'yes') ? 1 : 0;
  248. $sql = "UPDATE Payments SET pay_eid = '" . $_SESSION['eid'] . "',
  249. pay_recorded = NOW(),
  250. pay_amount = '" . mysql_real_escape_string($_POST[$pay_amount]) . "',
  251. pay_date = '" . mysql_real_escape_string($_POST[$pay_date]) . "',
  252. pay_status = '" . $pay_status . "'
  253. WHERE pay_id = " . $_POST[$pay_id];
  254. $dbh->query($sql);
  255. }
  256. header("location: " . $_SERVER['PHP_SELF'] . "?id=" . $_POST['id']);
  257. exit();
  258. }
  259. /* ------------- Purchaser marks Request as Complete ------------- */
  260. if (array_key_exists('completed_x',$_POST)) {
  261. /* Record Purchasing agent */
  262. $auth_sql = "UPDATE Authorization SET issuer='" . $_SESSION['eid'] . "',
  263. issuerDate=NOW(),
  264. level='O'
  265. WHERE id = " . $_POST['auth_id'];
  266. $dbh->query($auth_sql);
  267. /* Update Request Status */
  268. $po_sql = "UPDATE PO SET po='" . $_POST['po'] . "',
  269. status='O'
  270. WHERE id = " . $_POST['id'];
  271. $dbh->query($po_sql);
  272. sendCompleted($_POST['req'],$_POST['id'],htmlspecialchars($_POST['purpose']),$_POST['po'], $_SESSION['eid']); // Send email to Requester
  273. //sendVendor($_POST['id']);
  274. header("location: " . $_SERVER['PHP_SELF'] . "?id=" . $_POST['id']);
  275. exit();
  276. }
  277. /* ------------- Add Vendor and change Terms when Purchasing changes Vendor ------------- */
  278. if (strlen($_POST['vendSearch']) > 0) {
  279. $supplier2 = "sup2='" . $_POST['supplierNew'] . "',";
  280. $supplier2 .= "terms='" . $_POST['supplierNewTerms'] . "',";
  281. } else {
  282. $supplier2 = "terms='".$_POST['terms']."',";
  283. }
  284. /* ------------- Creating update fields ------------- */
  285. $PO = "po='".$_POST['po']."',
  286. fob='".$_POST['fob']."',
  287. via='".$_POST['via']."',
  288. purchaseUpdate=NOW(),
  289. reqType='".$_POST['reqtype']."',
  290. $supplier2
  291. private='".$_POST['private']."',
  292. hot='".$_POST['hot']."'
  293. ";
  294. $sql = "UPDATE PO SET $PO WHERE id = ".$_POST['id'];
  295. $dbh->query($sql);
  296. History($_SESSION['eid'], 'update', $_SERVER['PHP_SELF'], addslashes(htmlentities($sql))); // Record transaction for history
  297. header("location: " . $_SERVER['PHP_SELF'] . "?id=" . $_POST['id']);
  298. exit();
  299. }
  300. /* -------------------------------------------------------------
  301. * ------------- END PURCHASING PROCESSING -------------------
  302. * -------------------------------------------------------------
  303. */
  304. /* -------------------------------------------------------------
  305. * ------------- START DATABASE CONNECTIONS -------------------
  306. * -------------------------------------------------------------
  307. */
  308. /* ------------- Getting PO information ------------- */
  309. $PO = $dbh->getRow("SELECT *, DATE_FORMAT(reqDate,'%M %e, %Y') AS _reqDate
  310. FROM PO
  311. WHERE id = ?",array($_GET['id']));
  312. /* ------------- Getting Authoriztions for above PO ------------- */
  313. $AUTH = $dbh->getRow("SELECT * FROM Authorization WHERE type_id = ? and type = 'PO'",array($PO['id']));
  314. /* ------------- Get Employee names from Standards database ------------- */
  315. $EMPLOYEES = $dbh->getAssoc("SELECT eid, CONCAT(fst,' ',lst) AS name
  316. FROM Standards.Employees");
  317. /* ------------- Getting Vendor information from Standards ------------- */
  318. $VENDOR = $dbh->getAssoc("SELECT BTVEND, BTNAME FROM Standards.Vendor");
  319. /* ------------- Getting Company information from Standards ------------- */
  320. //$COMPANY = $dbh->getAssoc("SELECT id, name FROM Standards.Companies");
  321. /* ------------- Getting Plant information from Standards ------------- */
  322. $plant_sql = "SELECT id, name FROM Standards.Plants WHERE status = '0'";
  323. $Dbg->addDebug($plant_sql,DBGLINE_QUERY,__FILE__,__LINE__); //Debug SQL
  324. $PLANTS = $dbh->getAssoc($plant_sql);
  325. $plant_query = $dbh->prepare($plant_sql);
  326. $PLANT = $dbh->getRow("SELECT * FROM Standards.Plants WHERE id=" . $PO['plant']);
  327. /* ------------- Getting Department information from Standards ------------- */
  328. $dept_sql = "SELECT id, CONCAT('(',id,') ',name) AS fullname FROM Standards.Department WHERE status='0' ORDER BY name";
  329. $DEPARTMENT = $dbh->getAssoc($dept_sql);
  330. $dept_query = $dbh->prepare($dept_sql);
  331. /* ------------- Getting Category information from Standards ------------- */
  332. $COA = $dbh->getAssoc("SELECT CONCAT(coa_account,'-',coa_suffix) AS id, coa_description AS name
  333. FROM Standards.COA
  334. WHERE coa_plant=" . $PLANT['conbr']);
  335. /* ------------- Getting CER numbers from CER ------------- */
  336. $cer_sql = "SELECT id, cer FROM CER WHERE cer IS NOT NULL ORDER BY cer+0";
  337. $CER = $dbh->getAssoc($cer_sql);
  338. $cer_query = $dbh->prepare($cer_sql);
  339. /* ------------- Getting Vendor terms from Standards ------------- */
  340. $terms_sql = "SELECT terms_id AS id, terms_name AS name FROM Standards.VendorTerms ORDER BY name";
  341. $TERMS = $dbh->getAssoc($terms_sql);
  342. $terms_query = $dbh->prepare($terms_sql);
  343. /* ------------- Get items related to this Request -------------*/
  344. $items_sql = "SELECT * FROM Items WHERE type_id = ".$PO['id'];
  345. $items_query = $dbh->prepare($items_sql);
  346. $items_sth = $dbh->execute($items_query);
  347. $items_count = $items_sth->numRows();
  348. /* ------------- Get Purchase Request users ------------- */
  349. $purchaser_sql = $dbh->prepare("SELECT U.eid, E.fst, E.lst, E.email
  350. FROM Users U
  351. INNER JOIN Standards.Employees E ON U.eid = E.eid
  352. WHERE U.role = 'purchasing'
  353. AND E.status = '0'
  354. AND U.eid <> '08745'
  355. ORDER BY E.lst ASC");
  356. /* ------------- Get Purchase Request users ------------- */
  357. $financer_sql = $dbh->prepare("SELECT U.eid, E.fst, E.lst, E.email
  358. FROM Users U
  359. INNER JOIN Standards.Employees E ON U.eid = E.eid
  360. WHERE U.role = 'financing'
  361. AND E.status = '0'
  362. AND U.eid <> '08745'
  363. ORDER BY E.lst ASC");
  364. /* ------------- Get Vendor Payments ------------- */
  365. $payments = $dbh->query("SELECT * FROM Payments WHERE request_id=" . $PO['id'] . " AND pay_status='0' ORDER BY pay_date ASC");
  366. $payments_count = $payments->numRows();
  367. /* ------------- Getting Comments Information ------------- */
  368. $post_sql = "SELECT * FROM Postings
  369. WHERE request_id = ".$_GET['id']."
  370. AND type = 'global'
  371. ORDER BY posted DESC";
  372. $LAST_POST = $dbh->getRow($post_sql); // Get the last posted comment
  373. $post_query = $dbh->prepare($post_sql);
  374. $post_sth = $dbh->execute($post_query);
  375. $post_count = $post_sth->numRows();
  376. /* -------------------------------------------------------------
  377. * ------------- END DATABASE CONNECTIONS -------------------
  378. * -------------------------------------------------------------
  379. */
  380. /* -------------------------------------------------------------
  381. * ------------- START VARIABLES -------------------------------
  382. * -------------------------------------------------------------
  383. */
  384. /* ------------- Check current level and current user ------------- */
  385. if (array_key_exists('approval', $_GET)) {
  386. if ($PO['status'] != 'N') {
  387. switch ($PO['status']) {
  388. case 'C': $message="This Requisition has been marked Canceled."; break;
  389. case 'X': $message="This Requisition has been marked Not Approved."; break;
  390. case 'A': $message="This Requisition has been already Approved."; break;
  391. case 'O': $message="This Requisition has been Kicked off to the Vendor."; break;
  392. }
  393. unset($_GET['approval']);
  394. } elseif ($_GET['approval'] != $AUTH['level']) {
  395. $message="This Requisition is currently not at your approval level.";
  396. unset($_GET['approval']);
  397. } elseif ($_GET['approval'] == $AUTH['level'] AND $AUTH[$_GET['approval']] == $_SESSION['eid']) {
  398. $_GET['approval'] = $_GET['approval'];
  399. }
  400. }
  401. /* ------------- Set message for Message Center ------------- */
  402. switch ($_GET['approval']) {
  403. // case 'controller': $message="Finance can edit the Finance area and fields highlighted in <span style=\"color:#009900;\">GREEN</span>."; break;
  404. }
  405. $highlight='class="highlight"'; // Highlighted style sheet class
  406. /* ------------- Set items display mode ------------- */
  407. if ($_GET['approval'] == 'controller') {
  408. $displayItem = "display"; // Display Items detail
  409. } else {
  410. $displayItem = "none"; // Don't display Items detail
  411. }
  412. /* -------------------------------------------------------------
  413. * ------------- END VARIABLES -------------------------------
  414. * -------------------------------------------------------------
  415. */
  416. /**
  417. * - Display attachments from V3
  418. */
  419. include_once('attachment.php');
  420. $phone_char=array('(', ')', ' ', '-', '.');
  421. $format_phone="(000)000-0000";
  422. /* ------------- Setup onLoad javascript program ------------- */
  423. //$ONLOAD_OPTIONS.="function() {
  424. // new Effect.Pulsate('hotMessage', {delay:2, duration:5});
  425. // new Effect.Pulsate('messageCenter', {delay:2, duration:5});
  426. // }";
  427. if (isset($ONLOAD_OPTIONS)) { $ONLOAD="onLoad=\"$ONLOAD_OPTIONS\""; }
  428. ?>
  429. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  430. <html><!-- InstanceBegin template="/Templates/vnmain.dwt.php" codeOutsideHTMLIsLocked="false" -->
  431. <head>
  432. <!-- InstanceBeginEditable name="doctitle" -->
  433. <title><?= $default['title1']; ?></title>
  434. <!-- InstanceEndEditable -->
  435. <meta http-equiv="imagetoolbar" content="no">
  436. <meta name="copyright" content="2004 Your Company" />
  437. <meta name="author" content="Thomas LeZotte" />
  438. <link type="text/css" href="/Common/Print.css" rel="stylesheet" media="print">
  439. <link type="text/css" href="../default.css" charset="UTF-8" rel="stylesheet">
  440. <?php if ($default['rss'] == 'on') { ?>
  441. <link rel="alternate" type="application/rss+xml" title="Purchase Requisition Announcements" href="<?= $default['URL_HOME']; ?>/PO/<?= $default['rss_file']; ?>">
  442. <link rel="alternate" type="application/rss+xml" title="Capital Acquisition Announcements" href="<?= $default['URL_HOME']; ?>/CER/<?= $default['rss_file']; ?>">
  443. <?php } ?>
  444. <script type="text/javascript" src="/Common/js/overlibmws.js"></script>
  445. <!-- InstanceBeginEditable name="head" -->
  446. <link type="text/css" rel="stylesheet" href="/Common/js/yahoo/container/assets/container.css" />
  447. <link type="text/css" rel="stylesheet" href="/Common/js/yahoo/fonts/fonts-min.css" />
  448. <link type="text/css" rel="stylesheet" href="/Common/js/yahoo/assets/skins/sam/datatable.css" />
  449. <link type="text/css" rel="stylesheet" href="/Common/js/yahoo/assets/skins/sam/tabview.css" />
  450. <script type="text/javascript" src="/Common/js/scriptaculous/prototype-min.js"></script>
  451. <script type="text/javascript" src="/Common/js/autoassist/autoassist.js"></script>
  452. <link href="/Common/js/autoassist/autoassist.css" rel="stylesheet" type="text/css" />
  453. <link type="text/css" href="/Common/js/greybox5/gb_styles.css" rel="stylesheet" media="all" />
  454. <link rel="stylesheet" type="text/css" href="<?= $default['URL_HOME']; ?>/style/dd_tabs.css" />
  455. <style type="text/css">
  456. form.inplaceeditor-form a {
  457. color:#FFFFFF;
  458. }
  459. </style>
  460. <script type="text/javascript">
  461. <!--
  462. function MM_openBrWindow(theURL,winName,features) { //v2.0
  463. window.open(theURL,winName,features);
  464. }
  465. //-->
  466. </script>
  467. <!-- InstanceEndEditable -->
  468. <?php if ($ONLOAD_OPTIONS) { ?>
  469. <script language="javascript">
  470. AJS.AEV(window, "load", <?= $ONLOAD_OPTIONS; ?>);
  471. </script>
  472. <?php } ?>
  473. </head>
  474. <body class="yui-skin-sam">
  475. <img src="/Common/images/CompanyPrint.gif" alt="Your Company" width="437" height="61" id="Print" />
  476. <div id="noPrint">
  477. <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="">
  478. <tbody>
  479. <tr>
  480. <td valign="top"><a href="../home.php" title="<?= $default['title1']; ?> Home"><img name="Company" src="/Common/images/Company.gif" width="300" height="50" border="0"></a></td>
  481. <td align="right" valign="top">
  482. <!-- InstanceBeginEditable name="topRightMenu" --><!-- #BeginLibraryItem "/Library/help.lbi" --><table cellspacing="0" cellpadding="0" summary="" border="0">
  483. <tr>
  484. <td width="30"><a href="../Common/calculator.php" onClick="window.open(this.href,this.target,'width=281,height=270'); return false;" <?php help('', 'Calculator', 'default'); ?>><img src="../images/xcalc.png" width="16" height="14" border="0"></a></td>
  485. <td><a href="../Help/index.php" rel="gb_page_fs[]"><img src="../images/help.gif" width="18" height="18" border="0" align="absmiddle"></a></td>
  486. <td class="DarkHeaderSubSub">&nbsp;<a href="../Help/index.php" rel="gb_page_fs[]" class="dark">Help</a></td>
  487. </tr>
  488. </table>
  489. <!-- #EndLibraryItem --><!-- InstanceEndEditable --></td>
  490. </tr>
  491. <tr>
  492. <td valign="bottom" align="right" colspan="2"><!-- InstanceBeginEditable name="rightMenu" -->
  493. <?php include('../include/menu/main_right.php'); ?>
  494. <!-- InstanceEndEditable --></td>
  495. <td>
  496. </td>
  497. </tr>
  498. <tr>
  499. <td width="100%" colspan="3"><table cellspacing="0" cellpadding="0" width="100%" summary="" border="0">
  500. <tbody>
  501. <tr>
  502. <td width="4" colspan="4" height="4"><img height="4" alt="" src="../images/c-ghtl.gif" width="4"></td>
  503. <td colspan="4"><table cellspacing="0" cellpadding="0" width="100%" summary="" background="../images/c-ght.gif" border="0">
  504. <tbody>
  505. <tr>
  506. <td height="4"></td>
  507. </tr>
  508. </tbody>
  509. </table></td>
  510. <td class="BGColorDark" valign="top" rowspan="2"><table cellspacing="0" cellpadding="0" width="100%" summary="" background="../images/c-ght.gif" border="0">
  511. <tbody>
  512. <tr>
  513. <td height="4"></td>
  514. </tr>
  515. </tbody>
  516. </table></td>
  517. <td width="4" colspan="4" height="4"><img height="4" alt="" src="../images/c-ghtr.gif" width="4"></td>
  518. </tr>
  519. <tr>
  520. <td class="BGGrayLight" rowspan="3"></td>
  521. <td class="BGGrayMedium" rowspan="3"></td>
  522. <td class="BGGrayDark" rowspan="3"></td>
  523. <td class="BGColorDark" rowspan="3"></td>
  524. <td class="BGColorDark" rowspan="3"><!-- InstanceBeginEditable name="leftMenu" --><?php include('../include/menu/main_left.php'); ?><!-- InstanceEndEditable --></td>
  525. <td class="BGColorDark" rowspan="3"></td>
  526. <td class="BGColorDark" rowspan="2"></td>
  527. <td class="BGColorDark" rowspan="2"></td>
  528. <td class="BGColorDark" rowspan="2"></td>
  529. <td class="BGGrayDark" rowspan="2"></td>
  530. <td class="BGGrayMedium" rowspan="2"></td>
  531. <td class="BGGrayLight" rowspan="2"></td>
  532. </tr>
  533. <tr>
  534. <td class="BGColorDark" width="100%"><?php
  535. if (isset($_SESSION['username'])) {
  536. ?>
  537. <div align="right" class="FieldNumberDisabled">&nbsp;</div>
  538. <?php
  539. } else {
  540. echo "&nbsp;";
  541. }
  542. ?>
  543. </td>
  544. </tr>
  545. <tr>
  546. <td valign="top"><img height="20" alt="" src="../images/c-ghct.gif" width="25"></td>
  547. <td valign="top" colspan="2"><table cellspacing="0" cellpadding="0" width="100%" summary="" background="../images/c-ghb.gif" border="0">
  548. <tbody>
  549. <tr>
  550. <td height="4"></td>
  551. </tr>
  552. </tbody>
  553. </table></td>
  554. <td valign="top" colspan="4"><img height="20" alt="" src="../images/c-ghbr.gif" width="4"></td>
  555. </tr>
  556. <tr>
  557. <td width="4" colspan="4" height="4"><img height="4" alt="" src="../images/c-ghbl.gif" width="4"></td>
  558. <td><table height="4" cellspacing="0" cellpadding="0" width="100%" summary="" background="../images/c-ghb.gif" border="0">
  559. <tbody>
  560. <tr>
  561. <td></td>
  562. </tr>
  563. </tbody>
  564. </table></td>
  565. <td><img height="4" alt="" src="../images/c-ghcb.gif" width="3"></td>
  566. <td colspan="7"></td>
  567. </tr>
  568. </tbody>
  569. </table></td>
  570. </tr>
  571. </tbody>
  572. </table>
  573. </div>
  574. <!-- InstanceBeginEditable name="main" -->
  575. <?php
  576. if ($_SESSION['request_access'] == '3') {
  577. echo "&nbsp;<img src=\"/Common/images/adminAction.gif\" onClick=\"new Effect.toggle('adminPanel', 'slide')\">";
  578. echo "&nbsp;<img src=\"/Common/images/adminSQLAction.gif\" onClick=\"new Effect.toggle('historyPanel', 'slide')\">";
  579. include('../Administration/include/detail.php');
  580. echo "<div id='historyPanel' style='display:none'></div>";
  581. }
  582. ?>
  583. <table cellspacing="0" cellpadding="0" width="100%" summary="" border="0">
  584. <tbody>
  585. <tr>
  586. <td height="2"></td>
  587. </tr>
  588. <tr>
  589. <td><table cellspacing="0" cellpadding="0" width="100%" summary="" border="0">
  590. <tbody>
  591. <tr>
  592. <td align="center">
  593. <div id="hotMessage" style="width: 98%;margin:3px auto;display:<?= ($PO['hot'] == 'yes') ? display : none; ?>">This Requisition has been tagged HOT!!</div>
  594. <div id="messageCenter" style="width: 98%;margin:3px auto;display:<?= (isset($message)) ? display : none; ?>"><?= $message; ?></div>
  595. <form action="<?= $_SERVER['PHP_SELF']; ?>" method="POST" name="Form" id="Form" runat="vdaemon">
  596. <table border="0" cellpadding="0" cellspacing="0">
  597. <tr>
  598. <td>
  599. <table width="100%" border="0" cellpadding="0" cellspacing="0">
  600. <tr>
  601. <td></td>
  602. <td height="26" valign="bottom">
  603. <table border="0" align="right" cellpadding="0" cellspacing="0">
  604. <tr>
  605. <?php if ($_SESSION['eid'] == $PO['req'] and ! empty($PO['po'])) { ?>
  606. <td><div id="ddcolortabs">
  607. <ul>
  608. <li id="inactive"><a href="checkInformation.php?id=<?= $PO['id']; ?>" <?php help('', 'Request Purchasing to send Vendor a check.', 'default'); ?> rel="gb_page_center[750, 450]"><span>Check&nbsp;Request</span></a></li>
  609. </ul>
  610. </div></td>
  611. <td>
  612. <div id="ddcolortabs">
  613. <ul>
  614. <li id="inactive"><a href="packingSlip.php?id=<?= $_GET['id']; ?>&po=<?= $PO['po']; ?>&req=<?= $PO['req']; ?>&issuer=<?= $AUTH['issuer']; ?>" <?php help('', 'Send electronic packing slip to Puchasing', 'default'); ?> rel="gb_page_center[500, 300]"><span>Packing&nbsp;Slip</span></a></li>
  615. </ul>
  616. </div></td>
  617. <?php } ?>
  618. <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
  619. </tr>
  620. </table></td>
  621. </tr>
  622. <tr class="BGAccentVeryDark">
  623. <td width="50%" height="30" nowrap class="DarkHeaderSubSub">&nbsp;&nbsp;Purchase Order Requisition...</td>
  624. <td width="50%"></td>
  625. </tr>
  626. </table>
  627. </td>
  628. </tr>
  629. <tr>
  630. <td class="BGAccentVeryDarkBorder"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  631. <tr>
  632. <td valign="top" class="BGAccentDarkBorder"><table width="100%" border="0">
  633. <tr>
  634. <td height="25" colspan="4" class="BGAccentDark"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  635. <tr>
  636. <td><img src="../images/info.png" width="16" height="16" align="texttop"><strong>&nbsp;Information</strong></td>
  637. <td><div align="right" class="mainsection">Status: <strong><?= reqStatus($PO['status']); ?></strong>
  638. <input type="hidden" name="status" value="<?= $PO['status']; ?>">
  639. &nbsp;&nbsp;</div></td>
  640. </tr>
  641. </table></td>
  642. </tr>
  643. <tr>
  644. <td nowrap>Requisition Number:</td>
  645. <td class="label"><?= $_GET['id']; ?></td>
  646. <td nowrap>&nbsp;</td>
  647. <td>&nbsp;</td>
  648. </tr>
  649. <tr>
  650. <td width="12%" nowrap>Purchase Order Number:</td>
  651. <td width="45%" class="label"><?= ($PO['creditcard'] == 'yes') ? "Credit Card" : $PO['po']; ?></td>
  652. <td width="13%" nowrap><table width="100%" border="0" cellspacing="0" cellpadding="0">
  653. <tr>
  654. <td nowrap>CER Number:</td>
  655. <td width="35" align="right"><a href="cer_list.php" rel="gb_page_center[700, 600]" <?php help('', 'Click here to get a list of approved Capital Acquisition Requests', 'default'); ?>><img src="../images/detail.gif" width="18" height="20" border="0" align="absmiddle"></a></td>
  656. </tr>
  657. </table></td>
  658. <td width="26%"><table border="0" cellspacing="0" cellpadding="0">
  659. <tr>
  660. <td class="label"><a href="../CER/detail.php?id=<?= $PO['cer']; ?>" class="dark" rel="gb_page_fs[]"><?= $CER[$PO['cer']]; ?></a></td>
  661. <td><?php if (!empty($PO['cer'])) { ?>
  662. <a href="<?= $default['URL_HOME']; ?>/CER/print.php?id=<?= $PO['cer']; ?>" <?php help('', 'Click here to print this Capital Acquisition Request', 'default'); ?>><img src="../images/printer.gif" border="0" align="absmiddle"></a>
  663. <?php } ?></td>
  664. </tr>
  665. </table></td>
  666. </tr>
  667. <tr>
  668. <td>Requisitioner:</td>
  669. <td class="label"><?= caps($EMPLOYEES[$PO['req']]); ?></td>
  670. <td nowrap>Requisition Date:</td>
  671. <td class="label"><?= $PO['_reqDate']; ?></td>
  672. </tr>
  673. <?php if (!empty($PO['incareof']) AND $PO['req'] != $PO['incareof']) { ?>
  674. <tr>
  675. <td><img src="/Common/images/menupointer2.gif" width="4" height="7" align="absmiddle"> In Care Of:</td>
  676. <td class="label"><?= caps($EMPLOYEES[$PO['incareof']]); ?></td>
  677. <td>&nbsp;</td>
  678. <td>&nbsp;</td>
  679. </tr>
  680. <?php } ?>
  681. <tr>
  682. <td height="5" colspan="4"><img src="../images/spacer.gif" width="5" height="5"></td>
  683. </tr>
  684. <?php if (strlen($PO['sup2']) == 6) { ?>
  685. <tr>
  686. <td nowrap>Final Vendor: </td>
  687. <td nowrap class="label"><?= caps($VENDOR[$PO['sup2']]) . " (" . strtoupper($PO['sup2']) . ")"; ?><?php
  688. /* Getting suppliers from Suppliers */
  689. $SUPPLIER = $dbh->getRow("SELECT BTVEND AS id, BTNAME AS name, BTADR1 AS address, BTADR3 AS city, BTPRCD AS state, BTPOST AS zip5, BTWPAG AS web
  690. FROM Standards.Vendor
  691. WHERE BTVEND = '".$PO['sup2']."'");
  692. ?><span class="padding"><a href="../Common/vendor_map.php?id=<?= strtoupper($SUPPLIER['id']); ?>&name=<?= caps($SUPPLIER['name']); ?>&address=<?= $SUPPLIER['address']; ?> <?= $SUPPLIER['city']; ?>, <?= $SUPPLIER['state']; ?> <?= $SUPPLIER['zip5']; ?>" title="<?= caps($SUPPLIER['name']); ?>'s Location" rel="gb_page_center[602, 602]"><img src="/Common/images/map.gif" width="20" height="20" border="0" align="absmiddle"></a><?php if (!empty($SUPPLIER['web'])) { ?>&nbsp;<a href="http://<?= $SUPPLIER['web']; ?>" title="<?= caps($SUPPLIER['name']); ?>'s website." rel="gb_page_fs[]"><img src="/Common/images/globe.gif" width="18" height="18" border="0" align="absmiddle"></a>
  693. <?php } ?><a href="../Administration/vendor_details.php?id=<?= $SUPPLIER[id]; ?>" title="<?= caps($SUPPLIER['name']); ?> information" rel="gb_page[400, 511]"><img src="../images/detail.gif" width="18" height="20" border="0" align="absmiddle"></a>&nbsp;<a href="fax.php?id=<?= $PO['sup']; ?>&company=<?= $PO['company']; ?>" title="Generate a fax cover sheet" target="_blank"><img src="../images/printer.gif" border="0" align="absmiddle"></a></span></td>
  694. <td>Kickoff Date:</td>
  695. <td class="label"><?= ($AUTH['issuerDate'] == '0000-00-00 00:00:00' OR is_null($AUTH['issuerDate'])) ? $blank : date("F j, Y", strtotime($AUTH['issuerDate'])); ?></td>
  696. </tr>
  697. <?php } ?>
  698. <tr>
  699. <td nowrap><?= (empty($PO['po'])) ? Recommended : Final; ?> Vendor:</td>
  700. <td nowrap class="label"><?= caps($VENDOR[$PO['sup']]) . " (" . strtoupper($PO['sup']) . ")"; ?><?php
  701. /* Getting suppliers from Suppliers */
  702. $SUPPLIER = $dbh->getRow("SELECT BTVEND AS id, BTNAME AS name, BTADR1 AS address, BTADR3 AS city, BTPRCD AS state, BTPOST AS zip5, BTWPAG AS web
  703. FROM Standards.Vendor
  704. WHERE BTVEND = '".$PO['sup']."'");
  705. ?><span class="padding"><a href="../Common/vendor_map.php?id=<?= strtoupper($SUPPLIER['id']); ?>&name=<?= caps($SUPPLIER['name']); ?>&address=<?= $SUPPLIER['address']; ?> <?= $SUPPLIER['city']; ?>, <?= $SUPPLIER['state']; ?> <?= $SUPPLIER['zip5']; ?>" title="<?= caps($SUPPLIER['name']); ?>'s Location" rel="gb_page_center[602, 602]"><img src="/Common/images/map.gif" width="20" height="20" border="0" align="absmiddle"></a><?php if (!empty($SUPPLIER['web'])) { ?>&nbsp;<a href="http://<?= $SUPPLIER['web']; ?>" title="<?= caps($SUPPLIER['name']); ?>'s website." rel="gb_page_fs[]"><img src="/Common/images/globe.gif" width="18" height="18" border="0" align="absmiddle"></a>
  706. <?php } ?><a href="../Administration/vendor_details.php?id=<?= $SUPPLIER[id]; ?>" title="<?= caps($SUPPLIER['name']); ?> information" rel="gb_page[400, 511]"><img src="../images/detail.gif" width="18" height="20" border="0" align="absmiddle"></a>&nbsp;<a href="fax.php?id=<?= $PO['sup']; ?>&company=<?= $PO['company']; ?>" title="Generate a fax cover sheet" target="_blank"><img src="../images/printer.gif" border="0" align="absmiddle"></a></span></td>
  707. <?php if (strlen($PO['sup2']) != 6 AND !empty($PO['po'])) { ?>
  708. <td>Kickoff Date:</td>
  709. <td class="label"><?= ($AUTH['issuerDate'] == '0000-00-00 00:00:00' OR is_null($AUTH['issuerDate'])) ? $blank : date("F j, Y", strtotime($AUTH['issuerDate'])); ?></td>
  710. <?php } else { ?>
  711. <td>&nbsp;</td>
  712. <td>&nbsp;</td>
  713. <?php } ?>
  714. </tr>
  715. <!-- <tr>
  716. <td>Company:</td>
  717. <td class="label"><?= caps($COMPANY[$PO[company]]); ?></td>
  718. <td nowrap>&nbsp;</td>
  719. <td>&nbsp;</td>
  720. </tr>-->
  721. <tr>
  722. <td>Bill to Plant: </td>
  723. <td class="label"><?= caps($PLANTS[$PO['plant']]); ?><input type="hidden" name="currentPlant" id="currentPlant" value="<?= $PO['plant']; ?>"></td>
  724. <td>Deliver to Plant: </td>
  725. <td class="label"><?= caps($PLANTS[$PO['ship']]); ?></td>
  726. </tr>
  727. <tr>
  728. <td>Department:</td>
  729. <td class="label"><?= caps($DEPARTMENT[$PO['department']]); ?><input type="hidden" name="currentDepartment" id="currentDepartment" value="<?= $PO['department']; ?>"></td>
  730. <td>Job Number: </td>
  731. <td class="label"><?= $PO['job']; ?></td>
  732. </tr>
  733. <tr>
  734. <td height="5" colspan="4"><img src="../images/spacer.gif" width="5" height="5"></td>
  735. </tr>
  736. <tr>
  737. <td valign="top" nowrap>Purpose / Usage:</td>
  738. <td colspan="3" class="label"><?= caps(stripslashes($PO['purpose'])); ?></td>
  739. </tr>
  740. </table></td>
  741. </tr>
  742. <!--
  743. <tr>
  744. <td>&nbsp;</td>
  745. </tr>
  746. <tr>
  747. <td class="BGAccentDarkBorder"><table width="100%" border="0">
  748. <tr>
  749. <td width="100%" height="25" colspan="6" class="BGAccentDark"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  750. <tr>
  751. <td>&nbsp;<a href="javascript:switchTracking();" class="black" <?php help('', 'Show or Hide the Track Shipments', 'default'); ?>><strong><img src="../images/package.gif" width="16" height="16" border="0" align="texttop">&nbsp;Track Shipments </strong></a></td>
  752. <td width="120">&nbsp;</td>
  753. </tr>
  754. </table></td>
  755. </tr>
  756. <td>&nbsp;</td>
  757. </table>
  758. </td>
  759. </tr>
  760. -->
  761. <tr>
  762. <td>&nbsp;</td>
  763. </tr>
  764. <tr><td class="BGAccentDarkBorder"><table width="100%" border="0">
  765. <tr>
  766. <td height="25" class="BGAccentDark"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  767. <tr>
  768. <td>&nbsp;<a href="javascript:void(0);" onClick="new Effect.toggle('itemsContainer','blind')" class="black" <?php help('', 'Show or Hide the Item Information', 'default'); ?>><strong><img src="../images/text.gif" width="16" height="16" border="0" align="texttop">&nbsp;Item Information</strong></a></td>
  769. <td width="120"><a href="javascript:toggleItemDisplay('itemsContainer');" class="viewcomments">View All Details </a></td>
  770. </tr>
  771. </table></td>
  772. </tr>
  773. <tr>
  774. <td>
  775. <div id="itemsContainer">
  776. <table width="100%" border="0">
  777. <tr>
  778. <td width="35" class="HeaderAccentDark">&nbsp;</td>
  779. <td width="35" class="HeaderAccentDark">Unit</td>
  780. <td width="80" nowrap class="HeaderAccentDark">Company#&nbsp;</td>
  781. <td width="60" nowrap class="HeaderAccentDark">Manuf#&nbsp;</td>
  782. <td class="HeaderAccentDark">Item Description</td>
  783. <td width="80" nowrap class="HeaderAccentDark">Price</td>
  784. </tr>
  785. <?php
  786. while($items_sth->fetchInto($ITEMS)) {
  787. $count_items++;
  788. $row_color = ($count_items % 2) ? FFFFFF : DFDFBF;
  789. ?>
  790. <!-- Start of Item<?= $count_items; ?> -->
  791. <tr>
  792. <td width="50" bgcolor="#<?= $row_color; ?>" class="label"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  793. <tr>
  794. <td><a href="javascript:switchItems('itemDetails<?= $count_items; ?>', 'collapsed');" id="itemDetails<?= $count_items; ?>A" <?php help('', 'View more details on this item', 'default'); ?>><img src="../images/1rightarrow.gif" name="itemDetails<?= $count_items; ?>I" width="16" height="16" border="0" id="itemDetails<?= $count_items; ?>I">
  795. <input name="item<?= $count_items; ?>" type="hidden" id="item<?= $count_items; ?>" value="<?= $ITEMS['id']; ?>">
  796. </a></td>
  797. <td><strong><?= $ITEMS['qty']; ?></strong></td>
  798. </tr>
  799. </table></td>
  800. <td class="label" bgcolor="#<?= $row_color; ?>"><?= strtoupper($ITEMS['unit']); ?></td>
  801. <td class="label" bgcolor="#<?= $row_color; ?>"><?= strtoupper(stripslashes($ITEMS['part'])); ?></td>
  802. <td class="label" bgcolor="#<?= $row_color; ?>"><?= strtoupper(stripslashes($ITEMS['manuf'])); ?></td>
  803. <td nowrap bgcolor="#<?= $row_color; ?>" class="label">
  804. <?php
  805. if (strlen($ITEMS['descr']) > 50) {
  806. echo caps(substr(stripslashes($ITEMS['descr']), 0, 50));
  807. echo "...<a href=\"javascript:void(0);\" class=black onmouseover=\"return overlib('" . caps(stripslashes($ITEMS['descr'])) . "', TEXTPADDING, 10, WIDTH, 300, WRAPMAX, 300, AUTOSTATUS, BGCOLOR, '#000000', CGCOLOR, '#E68B2C', FGCOLOR, '#B0D585');\" onmouseout=\"nd();\"><img src=\"../images/bubble.gif\" width=14 height=17 border=0 align=absmiddle></a>";
  808. } else {
  809. echo caps(stripslashes($ITEMS['descr']));
  810. }
  811. ?></td>
  812. <td bgcolor="#<?= $row_color; ?>" class="label"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  813. <tr>
  814. <td><strong>$</strong></td>
  815. <td align="right"><strong><?php $d=(substr($ITEMS['price'], -2, 2) == '00') ? 2 : 4; echo number_format($ITEMS['price'],$d); ?><?= ($d == 2) ? "<img src=\"/Common/images/spacer.gif\" width=\"18\" height=\"5\">" : ''; ?></strong></td>
  816. </tr>
  817. </table></td>
  818. </tr>
  819. <tr id="itemDetails<?= $count_items; ?>" style="display:<?= $displayItem; ?>">
  820. <td colspan="6" bgcolor="#<?= $row_color; ?>" class="label"><table border="0">
  821. <tr>
  822. <td width="20">&nbsp;</td>
  823. <td width="200">&nbsp;</td>
  824. <td width="24">&nbsp;</td>
  825. <td width="100" class="gHeader">GL Code </td>
  826. <td width="250" class="gHeader">Name</td>
  827. </tr>
  828. <tr>
  829. <td>&nbsp;</td>
  830. <td><?= ($_GET['approval'] == 'controller') ? Recommended : Item; ?> Category: </td>
  831. <td class="label"><?= checkCategory($count_items, $PLANT['conbr'], $PO['department'], $ITEMS['cat']); ?></td>
  832. <td class="label"><?= $PLANT['conbr'] . "-" . $PO['department'] . "-" . $ITEMS['cat']; ?></td>
  833. <td class="label"><?= caps($COA[$ITEMS['cat']]); ?></td>
  834. </tr>
  835. <?php if ($_GET['approval'] == 'controllerOFF') { ?>
  836. <tr>
  837. <td>&nbsp;</td>
  838. <td>Change Category: </td>
  839. <td class="label">&nbsp;</td>
  840. <td class="label"><div id="item<?= $count_items; ?>_newGLnumber"></div></td>
  841. <td class="label"><input id="item<?= $count_items; ?>_newCOA" name="item<?= $count_items; ?>_newCOA" type="text" size="50" class="editContent" />
  842. <script type="text/javascript">
  843. Event.observe(window, "load", function() {
  844. var aa = new

Large files files are truncated, but you can click here to view the full file