diff --git a/db/mariadb.sql b/db/mariadb.sql index 69d7e18..3bfdfb9 100644 --- a/db/mariadb.sql +++ b/db/mariadb.sql @@ -137,6 +137,7 @@ CREATE TABLE equipment ( price decimal(12,2) DEFAULT NULL, weight float(5,2) UNSIGNED DEFAULT NULL, remarks varchar(150) DEFAULT NULL, + flags set('ordered','deleted') DEFAULT NULL, PRIMARY KEY(eid) ); diff --git a/webgui/documents.php b/webgui/documents.php index fb32aef..50f0899 100644 --- a/webgui/documents.php +++ b/webgui/documents.php @@ -1,7 +1,7 @@ $v) { query($sql); +foreach ($sth->fetchAll() as $row) { + if (!in_array($row['vid'], $vids)) { + $opt_vessel[$row['vid']] = $row['vesselname']; + } +} +?> +
+ $user->vid); -if ($flt->cat == -1) { - $w[] = 'ecat IS NULL'; -} elseif ($flt->cat > 0) { +if ($flt->cat > 0) { $w[] = 'ecat=:ecat'; $p[':ecat'] = $flt->cat; +} elseif ($flt->cat == -1) { + $w[] = 'ecat IS NULL'; } if ($flt->manuf > 0) { $w[] = 'manufacturer=:manuf'; $p[':manuf'] = $flt->manuf; +} elseif ($flt->manuf == -1) { + $w[] = 'manufacturer IS NULL'; } if ($flt->supp > 0) { $w[] = 'supplier=:supp'; $p[':supp'] = $flt->supp; +} elseif ($flt->supp == -1) { + $w[] = 'supplier IS NULL'; } if (strlen($flt->txt) > 1) { $w[] = '(ename LIKE :txt OR model LIKE :txt OR remarks LIKE :txt)'; @@ -216,7 +220,7 @@ if (strlen($flt->txt) > 1) { $where = join(' AND ', $w); $order = ' ORDER BY ename'; -// get total recond count for pagination and limit +// get total record count for pagination and limit $sth = $pdo->prepare("SELECT COUNT(*) FROM equipment WHERE " . $where); try { $sth->execute($p); @@ -379,7 +383,7 @@ echo '| ', _('Storage type') , " | "; +echo '||
| ', _('Storage type') , " | "; foreach ($res as $row) { - echo "||
| ", $stype[$row[0]], " | ", $row[1], " | |
| ", $stype[$row[0]], " | ", $row[1], " | |
| ', _('Boxes'), ' | ', $sth->fetchColumn(), " | |
| ', _('Boxes'), ' | ', $sth->fetchColumn(), " | |
| ', _('Equipment') , " | "; -echo '||
| ', _('Count'), ' | ', $sth->fetchColumn(), " | |
| ', _('Equipment') , " | "; +echo '||
| ', _('Count'), ' | ', $sth->fetchColumn(), " | |
| ', _('Inventory') , " | "; -echo '||
| ', _('Count'), ' | ', $sth->fetchColumn(), " | |
| ', _('Inventory') , " | "; +echo '||
| ', _('Count'), ' | ', $sth->fetchColumn(), " | |
| ', _('Documents') , " | "; +echo '||
| ', _('Count'), ' | ', $sth->fetchColumn(), " | |
", _('Tasks not assigned to any project'), "
\n"; -$sql = "SELECT taskid, taskname " +$sql = "SELECT taskid, taskname, taskstate " . "FROM task " . "WHERE vid=? AND projid IS NULL " . "ORDER BY taskid"; @@ -132,11 +134,13 @@ echo '| " . _('Name') . " | "; +echo "" . _('State') . " | "; echo "
|---|---|
| ". $row['taskname'] ." | \n"; + echo "". $row['taskstate'] ." | \n"; form_action_buttons('task.php', $row['taskid']); echo "