if (!isset($_GET['id'])) {
    echo "<div class=\"span-24 ui-state-error ui-corner-all\">\n\t\t\t\t\t<span class=\"ui-icon ui-icon-alert\" style=\"float: left; margin-right: 30px;\"></span>\n\t\t\t\t\tYou arrived to this page in error</div>";
} else {
    try {
        $production = new Production_issue($_GET['id']);
        $production_details = Production_issue_detail::findDetail($_GET['id']);
        ?>
	<h2>Production Issue Form</h2>
  <div align=left> <a href=report/pi-pdf.php?PInum=<?php 
        echo $_GET['id'];
        ?>
><b>Download PDF</b></a></div><br>
	<div class="form-frame span-23 last">
		<h3>Production Issue Form</h3><br />
		<label for="doc_num">Document Number </label><span id="docNum"><?php 
        echo $production->prepareDocNumber();
        ?>
</span><br />
		<label for="doc_date">Document Date </label><?php 
        echo $production->prepareDocDate("j F Y");
        ?>
<br />
		<label for="doc_type">Document Type </label><?php 
        echo $production->prepareDocType();
        ?>
<br />
		<label for="branch_id">Branch </label>
				<?php 
        $branch = new Branch($production->getBranchId());
        echo $branch->prepareName() . " / " . "<span id=\"branchId\">" . $production->prepareBranchId() . "</span>";
        ?>