mirror of https://github.com/itflow-org/itflow
Fixed Cron, added alert when cron is run, added new vendors to dashboard, added some UI cleanup to clients
This commit is contained in:
parent
e5036253ed
commit
4492af71d8
|
|
@ -65,8 +65,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
<button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#addClientModal">add</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form autocomplete="off">
|
||||
<div class="card-body p-0">
|
||||
<form class="p-3 bg-light" autocomplete="off">
|
||||
<div class="input-group">
|
||||
<input type="search" class="form-control col-md-4" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Clients">
|
||||
<div class="input-group-append">
|
||||
|
|
@ -74,10 +74,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<hr>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover">
|
||||
<thead class="text-dark <?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
|
||||
<thead class="<?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
|
||||
<tr>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=client_name&o=<?php echo $disp; ?>">Name <i class="fa fa-sort-alpha<?php if($disp=='ASC'){ echo "-up"; }else{ echo "-down"; }?>"></i></a></th>
|
||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=client_type&o=<?php echo $disp; ?>">Type <i class="fa fa-sort"></i></a></th>
|
||||
|
|
|
|||
4
cron.php
4
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
|
||||
|
||||
|
|
|
|||
|
|
@ -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'];
|
|||
</div>
|
||||
<!-- ./col -->
|
||||
|
||||
<div class="col-lg-3 col-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-secondary">
|
||||
<div class="inner">
|
||||
<h3><?php echo $vendors_added; ?></h3>
|
||||
<p>New Vendors</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-building"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./col -->
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header"><i class="fas fa-fw fa-chart-area"></i> Cash Flow</div>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ $sql_categories = mysqli_query($mysqli,"SELECT * FROM categories WHERE category_
|
|||
<h6 class="float-left mt-1"><i class="fa fa-fw fa-coins mr-2"></i>Income Summary</h6>
|
||||
<button type="button" class="btn btn-primary btn-sm float-right d-print-none" onclick="window.print();"><i class="fas fa-fw fa-print"></i> Print</button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form class="mb-3">
|
||||
<div class="card-body p-0">
|
||||
<form class="p-3">
|
||||
<select onchange="this.form.submit()" class="form-control" name="year">
|
||||
<?php
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue