Prepare combo list reload with revisions and fix box/storage in webgui
This commit is contained in:
1 parent
ee947b772f
commit
aee50ecb4f
17 files changed
+128
-43
No files matched your search
@@ -180,10 +180,12 @@ $page = gpc_get_int($_REQUEST, 'p', 1);
|
||||
$rows_pp = gpc_get_int($_REQUEST, 'n', $user->rows_pp);
|
||||
$lastpage = ceil($numrows/$rows_pp);
|
||||
|
||||
$sql = "SELECT i.invid, i.invname, i.number, i.invcond, i.eid, s.sname AS container "
|
||||
$sql = "SELECT i.invid, i.invname, i.number, i.invcond, i.eid, s.sname AS container,"
|
||||
. " IF(CHAR_LENGTH(i.remarks)>40, CONCAT(LEFT(i.remarks, 40), '…'), i.remarks) AS remarks "
|
||||
. "FROM inventory AS i JOIN storage AS s ON (i.conttype='storage' AND i.sid=s.sid)";
|
||||
$sql .= ' WHERE ' . $where;
|
||||
$sql .= " UNION SELECT i.invid, i.invname, i.number, i.invcond, i.eid, b.label AS container "
|
||||
$sql .= " UNION SELECT i.invid, i.invname, i.number, i.invcond, i.eid, b.label AS container,"
|
||||
. " IF(CHAR_LENGTH(i.remarks)>40, CONCAT(LEFT(i.remarks, 40), '…'), i.remarks) AS remarks "
|
||||
. "FROM inventory AS i JOIN box AS b ON (i.conttype='box' AND i.boxid=b.boxid) "
|
||||
. " JOIN storage AS s ON (b.sid=s.sid) ";
|
||||
$sql .= ' WHERE ' . $where;
|
||||
@@ -275,6 +277,7 @@ echo "<th>", _('Name'), "</th>\n";
|
||||
echo "<th>", _('Container'), "</th>\n";
|
||||
echo "<th>", _('Number'), "</th>\n";
|
||||
echo "<th>", _('Condition'), "</th>\n";
|
||||
echo "<th>", _('Remarks'), "</th>\n";
|
||||
echo "<th>", _('Tags'), "</th>\n";
|
||||
echo "<td></td>\n";
|
||||
echo "</tr>\n";
|
||||
@@ -293,6 +296,7 @@ foreach ($res as $row) {
|
||||
echo "<td>", $row['container'], "</td>\n";
|
||||
echo "<td>", $row['number'], "</td>\n";
|
||||
echo "<td>", ($opt_invcond[$row['invcond']] ?? ''), "</td>\n";
|
||||
echo "<td>", $row['remarks'], "</td>\n";
|
||||
echo "<td>", _('No tags assigned'), "</td>\n";
|
||||
// Edit current record button
|
||||
echo "<td>";
|
||||
@@ -301,7 +305,7 @@ foreach ($res as $row) {
|
||||
echo "</tr>\n";
|
||||
}
|
||||
// Table summary
|
||||
table_rec_summary($i0, $i, $numrows, 7);
|
||||
table_rec_summary($i0, $i, $numrows, 8);
|
||||
echo "</table>\n";
|
||||
|
||||
echo $pagination;
|
||||
|
||||
Reference in new issue
Block a user