Add Client to top of the modals trips, ticket, recurring ticket, invoice, recurring invoice, quote and rework the UI for Ticket/Recurring ticket create Put Billable beside subject so it doesnt take up a whole row

This commit is contained in:
johnnyq
2026-07-09 18:50:31 -04:00
parent fc59481476
commit d2026a417f
6 changed files with 172 additions and 183 deletions

View File

@@ -18,6 +18,36 @@ ob_start();
<div class="modal-body">
<?php if ($client_id) { ?>
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<?php }else{ ?>
<div class="form-group">
<label>Client</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
</div>
<select class="form-control select2" name="client_id" required>
<option value="0">- Client (Optional) -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at is NULL $access_permission_query ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql)) {
$client_id_select = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']);
?>
<option value="<?php echo $client_id_select; ?>"><?php echo $client_name; ?></option>
<?php
}
?>
</select>
</div>
</div>
<?php } ?>
<div class="form-row">
<div class="form-group col">
<label>Date <strong class="text-danger">*</strong></label>
@@ -111,36 +141,6 @@ ob_start();
</div>
</div>
<?php if ($client_id) { ?>
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<?php }else{ ?>
<div class="form-group">
<label>Client</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
</div>
<select class="form-control select2" name="client_id" required>
<option value="0">- Client (Optional) -</option>
<?php
$sql = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at is NULL $access_permission_query ORDER BY client_name ASC");
while ($row = mysqli_fetch_assoc($sql)) {
$client_id_select = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']);
?>
<option value="<?php echo $client_id_select; ?>"><?php echo $client_name; ?></option>
<?php
}
?>
</select>
</div>
</div>
<?php } ?>
</div>
<div class="modal-footer">