More webgui development

This commit is contained in:
2024-04-30 19:38:28 +02:00
parent c3b5ef95a9
commit 0c09ce2916
21 changed files with 1056 additions and 155 deletions
+21
View File
@@ -245,6 +245,27 @@ if ($sth->rowCount() > 0) {
echo '<p>', _('Not referenced in any equipment'), "<p>\n";
}
// show referenced invoices
$sql = "SELECT docid, refid, filename, title "
. "FROM docref AS r JOIN document AS d USING (docid) "
. "WHERE reftype='company' AND refid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
if ($sth->rowCount() > 0) {
echo "<p>Invoices:</p>\n";
echo "<ul>\n";
foreach ($sth->fetchAll() as $row) {
echo "<li>";
echo '<a href="dl.php?id=', $row['docid'], '">', $row['filename'], "</a>\n";
echo ' ', $row['title'];
echo "</li>\n";
}
echo "</ul>\n";
} else {
echo '<p>', _('No invoices'), "<p>\n";
}
elseif ($action == ACT_EDIT):
// ========== VARIANT: edit single record =====================================