mirror of
https://github.com/itflow-org/itflow
synced 2026-09-10 00:35:12 +00:00
Add Primary Location / Contact if missing link modals
This commit is contained in:
@@ -458,7 +458,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
if (empty($contact_name) && empty($contact_phone) && empty($contact_mobile) && empty($client_email)) {
|
||||
/* contact_id is the LEFT JOIN on contact_primary = 1, so empty
|
||||
means no primary contact at all. The wider test below stays as
|
||||
it was: it also covers a primary contact that exists but has
|
||||
nothing worth printing. */
|
||||
if (empty($contact_id) && lookupUserPermission("module_client") >= 2) { ?>
|
||||
<a class="ajax-modal" href="#" data-modal-url="modals/contact/contact_add.php?client_id=<?= $client_id ?>&primary=1">
|
||||
Add Primary Contact
|
||||
</a>
|
||||
<?php } elseif (empty($contact_name) && empty($contact_phone) && empty($contact_mobile) && empty($client_email)) {
|
||||
echo "-";
|
||||
}
|
||||
|
||||
@@ -491,7 +499,15 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td><?= $full_address ?></td>
|
||||
<td>
|
||||
<?php if (empty($location_id) && lookupUserPermission("module_client") >= 2) { ?>
|
||||
<a class="ajax-modal" href="#" data-modal-url="modals/location/location_add.php?client_id=<?= $client_id ?>&primary=1">
|
||||
Add Primary Location
|
||||
</a>
|
||||
<?php } else {
|
||||
echo $full_address;
|
||||
} ?>
|
||||
</td>
|
||||
<!-- Show Billing if perms & if accounting module is enabled -->
|
||||
<?php if ((lookupUserPermission("module_financial") >= 1) && $config_module_enable_accounting == 1) { ?>
|
||||
<td class="text-end">
|
||||
|
||||
Reference in New Issue
Block a user