<div id="main" class="span-24 last"> <h2>Administration</h2><h3>Stock</h3> <br /> <form action = "admin-stock.php" method = "get"> <label for="inv_item">Choose Inventory Item: </label> <span id="inv_item"> <input id="autocompleteItem" name="item"></input> </span> <input id="submitBTN" type="submit" value="Submit" /> </form> <?php if (isset($_GET['item'])) { try { $inv_stocks = Inv_stock::findByItem($_GET['item']); $item = new Inv_item($_GET['item']); printf("<br /><h3>%s - %s</h3><table><thead><tr><th>Branch</th><th>Quantity</th><th width=\"100\">Update</th></tr></thead><tbody>", $item->prepareId(), $item->prepareDescription()); foreach ($inv_stocks as $inv_stock) { $branch = new Branch($inv_stock->getBranchId()); printf("<tr><td>%s</td><td><input type=\"text\" value=\"%s\" /> %s</td><td><input class=\"updateBTN\" id=\"%s\" type=\"button\" value=\"Update\"/></td></tr>", $branch->prepareName() . " [" . $branch->prepareId() . "]", $inv_stock->getQuantity(), $item->prepareUnitOfMeasure(), $inv_stock->getId()); } echo "</tbody></table>"; } catch (fExpectedException $e) { echo $e->printMessage(); } } ?> </div> </div> <div id="messageBox" style="display: none;">Loading</div> <?php $tmpl->place('footer');
echo $branch->prepareName() . " / " . "<span id=\"branchId\">" . $production->prepareBranchId() . "</span>"; ?> <br /> <table id="formContent"> <thead> <tr><th>No</th> <th>Item Code</th><th width="400">Description</th><th>Quantity</th><th>UOM</th><th>Remarks</th><th>Icons</th></tr> </thead> <tbody> <?php $hideCancel = false; $counter = 1; foreach ($production_details as $production_detail) { echo "<tr id=\"rowNo" . $counter . "\"><td id=\"detailId\" class=\"hideFirst\">" . $production_detail->getId() . "</td><td>" . $counter . "</td><td id=\"itemCode\">" . $production_detail->prepareItemId() . "</td>"; $item = new Inv_item($production_detail->getItemId()); echo "<td class=\"itemDesc\">" . $item->prepareDescription() . "</td>\n\t\t\t\t\t\t\t\t<td id=\"itemQuan\">" . $production_detail->prepareQuantity() . "</td>\n\t\t\t\t\t\t\t \t<td>" . $item->prepareUnitOfMeasure() . "</td><td>" . $production_detail->prepareRemark() . "</td>"; if ($production_detail->getStatus() == "pending") { echo "<td id=\"iconCell\"><ul id=\"icons\" class=\"ui-widget ui-helper-clearfix\">\n\t\t\t\t\t\t\t\t<li id=\"save\" title=\"Save\" class=\"ui-state-default ui-corner-all\">\n\t\t\t\t\t\t\t\t\t<span class=\"ui-icon ui-icon-disk\"></span>\n\t\t\t\t\t\t\t\t\t<span class=\"text-icon\">Save</span>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li title=\"Loading\" class=\"hideFirst ui-corner-all\">\n\t\t\t\t\t\t\t\t\t<img src=\"./img/layout/ajax-loader2.gif\" />\n\t\t\t\t\t\t\t\t</li></ul></td></tr>"; } else { echo "<td id=\"iconCell\"><ul id=\"icons\" class=\"ui-widget ui-helper-clearfix\"><li title=\"Complete\" class=\"ui-state-default ui-corner-all\"><span class=\"ui-icon ui-icon-check\"></span></li><li title=\"Loading\" class=\"hideFirst ui-corner-all\"><img src=\"./img/layout/ajax-loader2.gif\" /></li></ul></td></tr>"; $hideCancel = true; } $counter++; } ?> </tbody> </table> <label>Notes</label><br /><?php echo $production->prepareNotes(); ?> <br />
<br /> <table id="formContent"> <thead> <tr><th>No</th> <th>Item Code</th><th width="300px">Description</th><th>Quantity</th><th>UOM</th><th>Remarks</th><th>In <?php echo $fromBranch->getId(); ?> </th><th width="75px">Receiver</th></tr> </thead> <tbody> <?php $counter = 1; foreach ($mattrans_details as $mattrans_detail) { echo "<tr class=\"jsonRow\"><td>" . $counter . "</td><td class=\"itemCode\">" . $mattrans_detail->prepareItemId() . "<input class=\"itemId\" type=\"hidden\" value=\"" . $mattrans_detail->getId() . "\"></input></td>"; $item = new Inv_item($mattrans_detail->getItemId()); echo "<td>" . $item->prepareDescription() . "</td><td class=\"itemQuan\">" . $mattrans_detail->prepareQuantity() . "</td>\n\t\t\t\t\t\t\t \t<td>" . $item->prepareUnitOfMeasure() . "</td><td>" . $mattrans_detail->prepareRemark() . "</td>"; $tempRecords = Inv_stock::findStockByBranch($mattrans_detail->getItemId(), $mattrans->getBranchFrom()); $quanRow = 0; foreach ($tempRecords as $tempRecord) { $quanRow = $tempRecord->getQuantity(); } echo "<td>" . $quanRow . "</td>"; if (fAuthorization::checkAuthLevel('admin')) { echo "<td><span class=\"loader hideFirst\"><img src=\"./img/layout/ajax-loader2.gif\" /></span>"; if ($mattrans_detail->getStatus() == "pending" && $quanRow >= $mattrans_detail->getQuantity()) { echo "<input type=\"button\" value=\"Transit\" \n\t\t\t\t\t\t\t\t\t\tkey=\"" . $mattrans_detail->getId() . "\" class=\"transitBTN\"></input></td>"; } else { if ($mattrans_detail->getStatus() == "transit") { echo "<input type=\"button\" value=\"Reject\" \n\t\t\t\t\t\t\t\t\t\tkey=\"" . $mattrans_detail->getId() . "\" class=\"rejectBTN\"></input>"; echo "<input type=\"button\" value=\"Accept\" \n\t\t\t\t\t\t\t\t\t\tkey=\"" . $mattrans_detail->getId() . "\" class=\"acceptBTN\"></input>"; echo "</td>";
</table> </div> </div> <table id="formContent"> <thead> <tr><th>No</th> <th>Item Code</th><th width="300px">Description</th><th>Quantity</th><th>UOM</th><th>Remarks</th><th>(A)</th></tr> </thead> <!-- <tbody> <?php $counter = 1; foreach ($grn_details as $grn_detail) { echo "<tr><td>" . $counter . "</td><td>" . $grn_detail->prepareItemId() . "</td>"; $item = new Inv_item($grn_detail->getItemId()); echo "<td>" . $item->prepareDescription() . "</td><td>" . $grn_detail->prepareQuantity() . "</td>\n\t\t\t\t\t\t\t \t<td>" . $item->prepareUnitOfMeasure() . "</td><td>" . $grn_detail->prepareRemark() . "</td>\n\t\t\t\t\t\t\t\t<td class=\"assessText\">" . $grn_detail->prepareAssessment() . "</td></tr>"; $counter++; } ?> </tbody> --> <tbody> </tbody> <tfoot> <tr><td colspan="7"> <p> <label>Assesment Of Condition (A)</label><br /> <b>OK</b> : Item received in good condition<br /> <b>NG</b> : Item is in damaged condition<br /> <b>Q </b> : Quantity supplied did not match DO quantity<br /> <b>X </b> : Item sent is different from PO description
?> "/> <input type="submit" value="Upload" /> </p> </fieldset> </form> <?php } ?> </div> <div id="ViewTable" class="span-14 last"> <table> <tr> <td class="caption" width="100">Description</td> <td><span id="desc" class="varInput"><?php echo $inv_item->prepareDescription(); ?> </span></td> </tr> <tr> <td class="caption">Weight</td> <td><span id="weight" class="varInput"><?php echo $inv_item->prepareWeight(); ?> </span></td> </tr> <tr> <td class="caption">Dimension</td> <td><span id="dim" class="varInput"><?php echo $inv_item->prepareDimension(); ?>