PageRenderTime 57ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/PO/detail.php

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

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