Exemple #1
0
        $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>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
  <title>openDCIM Stockroom Supplies</title>
  <link rel="stylesheet" href="css/inventory.php" type="text/css">
  <link rel="stylesheet" href="css/jquery-ui.css" type="text/css">
<td width="20%">' . __("Part Number") . '</td>
<td width="50%">' . __("Part Name") . '</td>
<td width="10%">' . __("Min Qty") . '</td>
<td width="10%">' . __("Max Qty") . '</td>
<td width="10%">' . __("On Hand") . '</td>
</tr>
</thead>
<tbody>
<!-- ITEMS HERE -->';
foreach ($SupplyList as $Supply) {
    $html .= sprintf('<tr><td align="center">%s</td><td>%s</td><td align="right">%d</td><td align="right">%d</td><td align="right">%d</td></tr>\\n', $Supply->PartNum, $Supply->PartName, $Supply->MinQty, $Supply->MaxQty, Supplies::GetSupplyCount($Supply->SupplyID));
    $bc->SupplyID = $Supply->SupplyID;
    $binList = $bc->FindSupplies();
    foreach ($binList as $sb) {
        $bin->BinID = $sb->BinID;
        $bin->GetBin();
        $html .= sprintf('<tr><td>&nbsp;</td><td>%s: %s</td><td>&nbsp;</td><td>&nbsp;</td><td align="right">%d</td></tr>\\n', __("Location"), $bin->Location, $sb->Count);
    }
}
$html .= '<!-- END ITEMS HERE -->
<tr>
<td class="bottom" colspan=5>&nbsp;</td>
</tbody>
</table>
</body>
</html>
';
$mpdf->WriteHTML($html);
$mpdf->Output();
exit;
exit;