Allow associating a quote with a ticket

This commit is contained in:
wrongecho
2026-03-02 10:54:44 +00:00
parent 795144b288
commit dee5085f4a
6 changed files with 346 additions and 1 deletions

View File

@@ -368,7 +368,13 @@ if (isset($_GET['ticket_id'])) {
<div class="card-tools d-print-none">
<div class="btn-toolbar">
<?php if ($config_module_enable_accounting && $ticket_billable == 1 && empty($invoice_id) && lookupUserPermission("module_sales") >= 2) { ?>
<?php if ($config_module_enable_accounting && $ticket_billable == 1 && empty($quote_id) && empty($invoice_id) && lookupUserPermission("module_sales") >= 2) { ?>
<a href="#" class="btn btn-light btn-sm ml-3 ajax-modal" href="#" data-modal-url="modals/ticket/ticket_quote_add.php?ticket_id=<?= $ticket_id ?>" data-modal-size="lg">
<i class="fas fa-fw fa-comment-dollar mr-2"></i>Quote
</a>
<?php }
if ($config_module_enable_accounting && $ticket_billable == 1 && empty($invoice_id) && lookupUserPermission("module_sales") >= 2) { ?>
<a href="#" class="btn btn-light btn-sm ml-3 ajax-modal" href="#" data-modal-url="modals/ticket/ticket_invoice_add.php?ticket_id=<?= $ticket_id ?>" data-modal-size="lg">
<i class="fas fa-fw fa-file-invoice mr-2"></i>Invoice
</a>