Skip to content

Commit

Permalink
Merge branch '0.1.8.4' of https://github.com/twetech/itflow into 0.1.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
o-psi committed Feb 15, 2024
2 parents 958e808 + 1ffa918 commit 466fbc0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion report_clients_with_balance.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
?>

<tr>
<td><a href="client_overview.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
<td><a href="client_statement.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
Expand Down
8 changes: 8 additions & 0 deletions report_collections.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,16 @@
</thead>
<tbody>
<?php
$processed_clients = []; // Array to keep track of processed client IDs

while ($row = mysqli_fetch_assoc($result_client_balance_report)) {
$client_id = intval($row['client_id']);
// Skip this row if we've already processed this client ID
if (in_array($client_id, $processed_clients)) {
continue; // Skip to the next iteration of the loop
} // Add the client ID to the array of processed clients
$processed_clients[] = $client_id;

$client_name = nullable_htmlentities($row['client_name']);
$balance = floatval($row['balance']);
$billing_contact_phone = formatPhoneNumber($row['billing_contact_phone']);
Expand Down

0 comments on commit 466fbc0

Please sign in to comment.