mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Do not add Cancelled or Draft invoices to the projected amount in dashboard
This commit is contained in:
@@ -485,7 +485,7 @@ var myLineChart = new Chart(ctx, {
|
||||
data: [
|
||||
<?php
|
||||
for($month = 1; $month<=12; $month++) {
|
||||
$sql_projected = mysqli_query($mysqli,"SELECT SUM(invoice_amount) AS invoice_amount_for_month FROM invoices WHERE YEAR(invoice_due) = $year AND MONTH(invoice_due) = $month AND company_id = $session_company_id");
|
||||
$sql_projected = mysqli_query($mysqli,"SELECT SUM(invoice_amount) AS invoice_amount_for_month FROM invoices WHERE YEAR(invoice_due) = $year AND MONTH(invoice_due) = $month AND invoice_status NOT LIKE 'Cancelled' AND invoice_status NOT LIKE 'Draft' AND company_id = $session_company_id");
|
||||
$row = mysqli_fetch_array($sql_projected);
|
||||
$invoice_for_month = $row['invoice_amount_for_month'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user