Exemplo n.º 1
0
    $sup->PartName = $_REQUEST["partname"];
    $sup->MinQty = $_REQUEST["minqty"];
    $sup->MaxQty = $_REQUEST["maxqty"];
    if ($_REQUEST["action"] == "Create") {
        if ($sup->PartNum != null && $sup->PartNum != "") {
            $sup->CreateSupplies();
        }
    } else {
        $status = "Updated";
        $sup->UpdateSupplies();
    }
}
$supplyList = $sup->GetSuppliesList();
$supplytable = '';
if (sizeof($inventory) > 0) {
    $sb = new SupplyBin();
    $supplytable = '<div class="table border">
	<div>
		<div>' . __("Bin ID") . '</div>
		<div>' . __("Count") . '</div>
	</div>';
    foreach ($inventory as $binContent) {
        $sb->BinID = $binContent->BinID;
        $sb->GetBin();
        $supplytable .= "\t<div>\t\t<div><a href=\"supplybin.php?binid={$sb->BinID}\">{$sb->Location}</a></div>\n\t\t<div>{$binContent->Count}</div>\n\t</div>\n";
    }
    $supplytable .= '</div>';
}
// endif of sizeof( $inventory ) > 0 block
?>
<!doctype html>
Exemplo n.º 2
0
<?php

require_once "db.inc.php";
require_once "facilities.inc.php";
$subheader = __("Data Center Stockroom Supply Bins");
if (!$person->SiteAdmin) {
    // No soup for you.
    header('Location: ' . redirect());
    exit;
}
$bin = new SupplyBin();
$bc = new BinContents();
$sup = new Supplies();
$supList = $sup->GetSuppliesList(true);
$formpatch = "";
$status = "";
if (isset($_REQUEST["binid"])) {
    $bin->BinID = isset($_POST['binid']) ? $_POST['binid'] : $_GET['binid'];
    $bin->GetBin();
    $bc->BinID = $bin->BinID;
    if (isset($_POST["action"]) && ($_POST["action"] == "Create" || $_POST["action"] == "Update") && ($_POST["location"] != null && $_POST["location"] != "")) {
        $bin->Location = $_POST["location"];
        if ($_POST["action"] == "Create") {
            $bin->CreateBin();
        } else {
            $binContents = $bc->GetBinContents();
            // We don't want someone changing the name of a bin to a blank anymore than we want them creating one as a blank name
            $status = __("Updated");
            $bin->UpdateBin();
            // only attempt to alter the contents of the bin if we have the proper elements
            if (isset($_POST['supplyid']) && count($_POST['supplyid'] > 0)) {
Exemplo n.º 3
0
		Will print out all supply types, list the Min/Max/Current quantities along with current locations
*/
require_once "db.inc.php";
require_once "facilities.inc.php";
require_once "mpdf/mpdf.php";
/* Version 1.0 of this report has no selectable parameters - you just get a complete dump */
$mpdf = new mPDF('win-1252', 'A4', '', '', 20, 15, 48, 25, 10, 10);
$mpdf->useOnlyCoreFonts = true;
// false is default
//$mpdf->SetProtection(array('print'));
$mpdf->SetTitle($config->ParameterArray["OrgName"] . " " . __("Supply Status Report"));
$mpdf->SetAuthor($config->ParameterArray["OrgName"]);
$mpdf->SetDisplayMode('fullpage');
$mpdf->useActiveForms = true;
$sup = new Supplies();
$bin = new SupplyBin();
$bc = new BinContents();
$SupplyList = $sup->GetSuppliesList();
$html = '
<html>
<head>
<style>
body {font-family: sans-serif;
    font-size: 10pt;
}
p {    margin: 0pt;
}
td { vertical-align: top; }
.items td {
    border-left: 0.1mm solid #000000;
    border-right: 0.1mm solid #000000;
Exemplo n.º 4
0
 function GetBinList()
 {
     $sql = "SELECT * FROM fac_SupplyBin ORDER BY Location ASC;";
     $binList = array();
     foreach ($this->query($sql) as $row) {
         $binList[] = SupplyBin::RowToObject($row);
     }
     return $binList;
 }