Merge pull request #771 from o-psi/add-links-in-reports-to-clients

Add link to client in reports
This commit is contained in:
Johnny 2023-10-16 17:25:22 -04:00 committed by GitHub
commit de91afe1a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ validateAccountantRole();
?>
<tr>
<td><?php echo $client_name; ?></td>
<td><a href="client_overview.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $balance, $session_company_currency); ?></td>
</tr>
<?php

View File

@ -76,7 +76,7 @@ $sql_payment_years = mysqli_query($mysqli, "SELECT DISTINCT YEAR(payment_date) A
?>
<tr>
<td><?php echo $client_name; ?></td>
<td><a href="client_overview.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $amount_paid, $session_company_currency); ?></td>
</tr>
<?php

View File

@ -4,7 +4,7 @@ require_once("inc_all_reports.php");
validateAccountantRole();
$sql = mysqli_query($mysqli, "
SELECT clients.client_name,
SELECT clients.client_id, clients.client_name,
SUM(CASE WHEN recurring.recurring_frequency = 'month' THEN recurring.recurring_amount
WHEN recurring.recurring_frequency = 'year' THEN recurring.recurring_amount / 12 END) AS recurring_monthly_total
FROM clients
@ -45,7 +45,7 @@ $sql = mysqli_query($mysqli, "
<tr>
<td><?php echo $client_name; ?></td>
<td><a href="client_overview.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $recurring_monthly_total, $session_company_currency); ?></td>
</tr>
<?php