From 4492af71d82bdc5d3b42051c57ab5b31520c4b26 Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Tue, 19 Nov 2019 19:25:22 -0500 Subject: [PATCH] Fixed Cron, added alert when cron is run, added new vendors to dashboard, added some UI cleanup to clients --- clients.php | 8 ++++---- cron.php | 4 +++- dashboard.php | 18 ++++++++++++++++++ report_income_summary.php | 4 ++-- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/clients.php b/clients.php index dcc6ebfd..49dcce60 100644 --- a/clients.php +++ b/clients.php @@ -65,8 +65,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); -
-
+
+
@@ -74,10 +74,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
-
+
- "> + "> diff --git a/cron.php b/cron.php index f0ba9bee..d46d8313 100644 --- a/cron.php +++ b/cron.php @@ -137,7 +137,7 @@ while($row = mysqli_fetch_array($sql_companies)){ //Get the last Invoice Number and add 1 for the new invoice number $sql_invoice_number = mysqli_query($mysqli,"SELECT * FROM settings WHERE company_id = $company_id"); - $row = mysqli_fetch_array($sql_invoice_number)){ + $row = mysqli_fetch_array($sql_invoice_number); $config_invoice_next_number = $row['config_invoice_next_number']; $new_invoice_number = "$config_invoice_prefix$config_invoice_next_number"; @@ -235,6 +235,8 @@ while($row = mysqli_fetch_array($sql_companies)){ } //End Mail Try } //End if Autosend is on } //End Recurring Invoices Loop + //Send Alert to inform Cron was run + mysqli_query($mysqli,"INSERT INTO alerts SET alert_type = 'Cron', alert_message = 'Cron.php successfully executed', alert_date = NOW(), company_id = $company_id"); } //End Cron Check } //End Company Loop through diff --git a/dashboard.php b/dashboard.php index c8693c30..379336ad 100644 --- a/dashboard.php +++ b/dashboard.php @@ -72,6 +72,10 @@ $total_miles = $row['total_miles']; $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_id') AS clients_added FROM clients WHERE YEAR(client_created_at) = $year AND company_id = $session_company_id")); $clients_added = $row['clients_added']; +//Get Total Vendors added +$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('vendor_id') AS vendors_added FROM vendors WHERE YEAR(vendor_created_at) = $year AND client_id = 0 AND company_id = $session_company_id")); +$vendors_added = $row['vendors_added']; + //Get Total of Recurring Invoices $sql_total_recurring_invoice_amount = mysqli_query($mysqli,"SELECT SUM(recurring_amount) AS total_recurring_invoice_amount FROM recurring WHERE YEAR(payment_date) = $year AND company_id = $session_company_id"); $row = mysqli_fetch_array($sql_total_recurring_invoice_amount); @@ -169,6 +173,20 @@ $total_recurring_invoice_amount = $row['total_recurring_invoice_amount']; +
+ +
+
+

+

New Vendors

+
+
+ +
+
+
+ +
Cash Flow
diff --git a/report_income_summary.php b/report_income_summary.php index ef2bc475..0f17c1de 100644 --- a/report_income_summary.php +++ b/report_income_summary.php @@ -18,8 +18,8 @@ $sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_
Income Summary
-
-
+
+
Name "> Type