mirror of https://github.com/itflow-org/itflow
Added Recurring Monthly to Client Listing Billing column as well
This commit is contained in:
parent
ee8aa53590
commit
6bafb0bcbb
18
clients.php
18
clients.php
|
|
@ -247,7 +247,21 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
$balance_text_color = "text-danger font-weight-bold";
|
||||
}else{
|
||||
$balance_text_color = "";
|
||||
}
|
||||
}
|
||||
|
||||
//Get Monthly Recurring Total
|
||||
$sql_recurring_monthly_total = mysqli_query($mysqli,"SELECT SUM(recurring_amount) AS recurring_monthly_total FROM recurring WHERE recurring_status = 1 AND recurring_frequency = 'month' AND recurring_client_id = $client_id AND company_id = $session_company_id");
|
||||
$row = mysqli_fetch_array($sql_recurring_monthly_total);
|
||||
|
||||
$recurring_monthly_total = $row['recurring_monthly_total'];
|
||||
|
||||
//Get Yearly Recurring Total
|
||||
$sql_recurring_yearly_total = mysqli_query($mysqli,"SELECT SUM(recurring_amount) AS recurring_yearly_total FROM recurring WHERE recurring_status = 1 AND recurring_frequency = 'year' AND recurring_client_id = $client_id AND company_id = $session_company_id");
|
||||
$row = mysqli_fetch_array($sql_recurring_yearly_total);
|
||||
|
||||
$recurring_yearly_total = $row['recurring_yearly_total'] / 12;
|
||||
|
||||
$recurring_monthly = $recurring_monthly_total + $recurring_yearly_total;
|
||||
|
||||
?>
|
||||
<tr>
|
||||
|
|
@ -316,6 +330,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
<span class="text-secondary">Balance</span> <span class="<?php echo $balance_text_color; ?>"><?php echo numfmt_format_currency($currency_format, $balance, $session_company_currency); ?></span>
|
||||
<br>
|
||||
<span class="text-secondary">Paid</span> <?php echo numfmt_format_currency($currency_format, $amount_paid, $session_company_currency); ?>
|
||||
<br>
|
||||
<span class="text-secondary">Monthly</span> <?php echo numfmt_format_currency($currency_format, $recurring_monthly, $session_company_currency); ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue