diff --git a/webgui/box.php b/webgui/box.php index 70aae00..962b870 100644 --- a/webgui/box.php +++ b/webgui/box.php @@ -122,9 +122,6 @@ foreach ($res as $row) { echo "\n"; echo "\n"; } -// Table summary -$numrows = count($res); -table_rec_summary($i, $numrows, $numrows, 5); echo "\n"; form_add_button('box.php'); @@ -187,6 +184,7 @@ echo '', "\n"; echo '\n"; echo '\n"; echo '\n"; +echo '\n"; # TODO also show sum of content weights for comparison echo '\n"; echo '\n"; diff --git a/webgui/company.php b/webgui/company.php index 855b5ae..6d3b9cc 100644 --- a/webgui/company.php +++ b/webgui/company.php @@ -299,10 +299,10 @@ echo "
', _('Box type'),"", ($opt_boxtype[$box->boxtype] ?? ''), "
', _('Content'),"", $box->content, "
', _('Color'), '', format_color($box->color), "
', _('Dimensions'), '', format_measurement(3, 'mm', $box->wx, $box->wy, $box->wz), "
', _('Weight'), '', format_float($box->weight, 2, 'kg'), "
', _('Empty Weight'), '', format_float($box->weight_net, 2, 'kg'), "
\n"; form_view_buttons($g_scriptname, $id); -// show referenced equipment -$sql = "SELECT eid, ename FROM equipment WHERE supplier=:id OR manufacturer=:id"; +// show referenced equipment for current vessel +$sql = "SELECT eid, ename FROM equipment WHERE vid=:vid AND (supplier=:id OR manufacturer=:id)"; $sth = $pdo->prepare($sql); -$sth->execute([':id' => $id]); +$sth->execute([':vid' => $user->vid, ':id' => $id]); if ($sth->rowCount() > 0) { echo '

', _('Referenced in equipment'), ":

\n"; echo "