Added Billable Recurring Tickets, UI: changed the Billable option to switch. Added ticket settings option to automatically mark new tickets as billable

This commit is contained in:
johnnyq
2024-05-29 17:55:39 -04:00
parent c389c68883
commit 1d19b72229
13 changed files with 58 additions and 29 deletions

View File

@@ -12,6 +12,7 @@
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
<input type="hidden" name="ticket_number" value="<?php echo "$ticket_prefix$ticket_number"; ?>">
<input type="hidden" name="contact_notify" value="0"> <!-- Default 0 -->
<input type="hidden" name="billable" value="0">
<div class="modal-body bg-white">
<ul class="nav nav-pills nav-justified mb-3">
@@ -97,23 +98,15 @@
</div>
</div>
<?php if ($config_module_enable_accounting) {
?>
<?php if ($config_module_enable_accounting) { ?>
<div class="form-group">
<label>Billable</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-money-bill"></i></span>
</div>
<select class="form-control" name="billable">
<option <?php if ($ticket_billable == 1) { echo "selected"; } ?> value="1">Yes</option>
<option <?php if ($ticket_billable == 0) { echo "selected"; } ?> value="0">No</option>
</select>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" name="billable" <?php if ($ticket_billable == 1) { echo "checked"; } ?> value="1" id="billableSwitch<?php echo $ticket_id; ?>">
<label class="custom-control-label" for="billableSwitch<?php echo $ticket_id; ?>">Mark Billable</label>
</div>
</div>
<?php } ?>
</div>
<div class="tab-pane fade" id="pills-contacts<?php echo $ticket_id; ?>">