Migrated Vendor Templates to its own table, lots of code modifications here

This commit is contained in:
johnnyq
2025-06-17 22:44:54 -04:00
parent f672991089
commit e7e7272002
40 changed files with 410 additions and 221 deletions

View File

@@ -22,10 +22,10 @@
<select class="form-control" name="vendor_template_id" required>
<option value="">- Select Template -</option>
<?php
$sql_vendor_templates = mysqli_query($mysqli, "SELECT * FROM vendors WHERE vendor_template = 1 AND vendor_archived_at IS NULL ORDER BY vendor_name ASC");
$sql_vendor_templates = mysqli_query($mysqli, "SELECT * FROM vendor_templates WHERE vendor_template_archived_at IS NULL ORDER BY vendor_template_name ASC");
while ($row = mysqli_fetch_array($sql_vendor_templates)) {
$vendor_template_id = intval($row['vendor_id']);
$vendor_template_name = nullable_htmlentities($row['vendor_name']);
$vendor_template_id = intval($row['vendor_template_id']);
$vendor_template_name = nullable_htmlentities($row['vendor_template_name']);
?>
<option value="<?php echo $vendor_template_id ?>"><?php echo $vendor_template_name; ?></option>