More improvements e.g. flags and provision target

This commit is contained in:
2026-08-11 07:48:46 +02:00
parent a3d4825cbd
commit 41556cfe73
22 changed files with 961 additions and 484 deletions
+21 -1
View File
@@ -222,7 +222,7 @@ $sql = "SELECT sid, sname, stype, capacity, capaunit, x, y, z, wx, wy, wz, angle
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
$storage = $sth->fetch(PDO::FETCH_OBJ);
echo '<h2>', $storage->sname, "</h2>\n";
echo '<h1>', _('Storage'), ': ', $storage->sname, "</h1>\n";
echo '<table class="table">', "\n";
echo '<tr><th style="width:33%">', _('Typ'),"</th><td>", $opt_stype[$storage->stype], "</td></tr>\n";
@@ -257,6 +257,26 @@ if (count($res) > 0) {
echo '<p>', _('No boxes contained'), "</p>\n";
}
// show assigned inventory here
echo '<h3>', _('Inventory in storage'), "</h3>\n";
$sql = "SELECT invid, invname FROM inventory WHERE conttype='storage' and sid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
$res = $sth->fetchall();
if (count($res) > 0) {
echo '<table class="table table-sm">';
foreach ($res as $row) {
echo "<tr>";
echo '<td>', $row['invname'], "</td>";
echo '<td><a title="', _('View'), '" href="inventory.php?f=view&id=', $row['invid'], '"><i class="bi-eye"></i></a></td>';
echo "</tr>\n";
}
echo "</table>\n";
} else {
echo '<p>', _('No inventory contained'), "</p>\n";
}
// show assigned provisions here
echo '<h3>', _('Provisions in storage'), "</h3>\n";
$sql = "SELECT provid, provname, number, unit, storedate, shelflife FROM provisions WHERE sid=?";