mirror of https://github.com/itflow-org/itflow
Removed Cancelled and added Viewed to Invoice. Client Links mirror their accompanied tabs in the client portal, minor UI fixes on ticket view, client view of ticket sorted tickets DESC via ticket_id
This commit is contained in:
parent
d4992c4973
commit
5f30dbf9a9
|
|
@ -115,7 +115,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||
|
||||
?>
|
||||
<tr>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=contacts"><?php echo $client_name; ?></a></td>
|
||||
<td><?php echo $client_type; ?></td>
|
||||
<td><a href="mailto:<?php echo $client_email; ?>"><?php echo $client_email; ?></a></td>
|
||||
<td><?php echo $client_phone; ?></td>
|
||||
|
|
|
|||
|
|
@ -77,8 +77,6 @@ if(isset($_GET['invoice_id'])){
|
|||
$invoice_badge_color = "secondary";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<ol class="breadcrumb d-print-none">
|
||||
|
|
@ -86,7 +84,7 @@ if(isset($_GET['invoice_id'])){
|
|||
<a href="invoices.php">Invoices</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a>
|
||||
<a href="client.php?client_id=<?php echo $client_id; ?>&tab=invoices"><?php echo $client_name; ?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active"><?php echo $invoice_number; ?></li>
|
||||
<span class="p-2 ml-2 badge badge-<?php echo $invoice_badge_color; ?>"><?php echo $invoice_status; ?></span>
|
||||
|
|
@ -95,8 +93,6 @@ if(isset($_GET['invoice_id'])){
|
|||
<?php } ?>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="invoice_id" value="<?php echo $invoice_id; ?>">
|
||||
<div class="row mb-4 d-print-none">
|
||||
|
|
|
|||
36
invoices.php
36
invoices.php
|
|
@ -5,6 +5,9 @@
|
|||
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('invoice_id') AS num FROM invoices WHERE invoice_status = 'Sent' AND company_id = $session_company_id"));
|
||||
$sent_count = $row['num'];
|
||||
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('invoice_id') AS num FROM invoices WHERE invoice_status = 'Viewed' AND company_id = $session_company_id"));
|
||||
$viewed_count = $row['num'];
|
||||
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('invoice_id') AS num FROM invoices WHERE invoice_status = 'Partial' AND company_id = $session_company_id"));
|
||||
$partial_count = $row['num'];
|
||||
|
||||
|
|
@ -25,6 +28,10 @@
|
|||
$row = mysqli_fetch_array($sql_total_sent);
|
||||
$total_sent = $row['total_sent'];
|
||||
|
||||
$sql_total_viewed = mysqli_query($mysqli,"SELECT SUM(invoice_amount) AS total_viewed FROM invoices WHERE invoice_status = 'Viewed' AND company_id = $session_company_id");
|
||||
$row = mysqli_fetch_array($sql_total_viewed);
|
||||
$total_viewed = $row['total_viewed'];
|
||||
|
||||
$sql_total_cancelled = mysqli_query($mysqli,"SELECT SUM(invoice_amount) AS total_cancelled FROM invoices WHERE invoice_status = 'Cancelled' AND company_id = $session_company_id");
|
||||
$row = mysqli_fetch_array($sql_total_cancelled);
|
||||
$total_cancelled = $row['total_cancelled'];
|
||||
|
|
@ -122,6 +129,19 @@
|
|||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-3 col-sm-6 mb-3">
|
||||
<a class="text-white" href="?q=Viewed">
|
||||
<div class="card text-white bg-info o-hidden">
|
||||
<div class="card-body">
|
||||
<div class="card-body-icon">
|
||||
<i class="fas fa-fw fa-eye"></i>
|
||||
</div>
|
||||
<div class="mr-5"><?php echo $viewed_count; ?> Viewed <h1>$<?php echo number_format($total_viewed,2); ?></h1></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-3 col-sm-6 mb-3">
|
||||
<a class="text-white" href="?q=Partial">
|
||||
|
|
@ -135,19 +155,7 @@
|
|||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-3 col-sm-6 mb-3">
|
||||
<a class="text-white" href="?q=Cancelled">
|
||||
<div class="card text-white bg-danger o-hidden">
|
||||
<div class="card-body">
|
||||
<div class="card-body-icon">
|
||||
<i class="fas fa-fw fa-ban"></i>
|
||||
</div>
|
||||
<div class="mr-5"><?php echo $cancelled_count; ?> Cancelled <h1>$<?php echo number_format($total_cancelled,2); ?></h1></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card mb-3">
|
||||
|
|
@ -224,7 +232,7 @@
|
|||
|
||||
<tr>
|
||||
<td><a href="invoice.php?invoice_id=<?php echo $invoice_id; ?>"><?php echo $invoice_number; ?></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=invoices"><?php echo $client_name; ?></a></td>
|
||||
<td class="text-right text-monospace">$<?php echo number_format($invoice_amount,2); ?></td>
|
||||
<td><?php echo $invoice_date; ?></td>
|
||||
<td class="<?php echo $overdue_color; ?>"><?php echo $invoice_due; ?></td>
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
<tr>
|
||||
<td><?php echo $payment_date; ?></td>
|
||||
<td><a href="invoice.php?invoice_id=<?php echo $invoice_id; ?>"><?php echo $invoice_number; ?></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=payments"><?php echo $client_name; ?></a></td>
|
||||
<td class="text-right text-monospace">$<?php echo number_format($payment_amount,2); ?></td>
|
||||
|
||||
<td><?php echo $account_name; ?></td>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ if(isset($_GET['quote_id'])){
|
|||
<a href="quotes.php">Quotes</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a>
|
||||
<a href="client.php?client_id=<?php echo $client_id; ?>&tab=quotes"><?php echo $client_name; ?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active"><?php echo $quote_number; ?></li>
|
||||
<span class="ml-3 p-2 badge badge-<?php echo $quote_badge_color; ?>"><?php echo $quote_status; ?></span>
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
|
||||
<tr>
|
||||
<td><a href="quote.php?quote_id=<?php echo $quote_id; ?>"><?php echo $quote_number; ?></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=quotes"><?php echo $client_name; ?></a></td>
|
||||
<td class="text-right text-monospace">$<?php echo number_format($quote_amount,2); ?></td>
|
||||
<td><?php echo $quote_date; ?></td>
|
||||
<td><?php echo $category_name; ?></td>
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
|
||||
<tr>
|
||||
<td><?php echo ucwords($recurring_frequency); ?>ly</td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=recurring"><?php echo $client_name; ?></a></td>
|
||||
<td><?php echo $recurring_last_sent; ?></td>
|
||||
<td><?php echo $recurring_next_date; ?></td>
|
||||
<td><?php echo $category_name; ?></td>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,10 @@ if(isset($_GET['recurring_id'])){
|
|||
<li class="breadcrumb-item">
|
||||
<a href="recurring.php"> Recurring Invoices</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active"><?php echo $recurring_id; ?></li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="client.php?client_id=<?php echo $client_id; ?>&tab=recurring"> <?php echo $client_name; ?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">Details</li>
|
||||
<span class="ml-3 p-2 badge badge-<?php echo $status_badge_color; ?>"><?php echo $status; ?></span>
|
||||
</ol>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@
|
|||
<?php
|
||||
$sql_recent_logins = mysqli_query($mysqli,"SELECT * FROM logs
|
||||
WHERE log_type = 'Login' AND log_action = 'Success' AND user_id = $session_user_id
|
||||
ORDER BY log_id DESC LIMIT 5");
|
||||
ORDER BY log_id DESC LIMIT 8");
|
||||
|
||||
$sql_recent_logs = mysqli_query($mysqli,"SELECT * FROM logs
|
||||
WHERE user_id = $session_user_id
|
||||
ORDER BY log_id DESC LIMIT 8");
|
||||
?>
|
||||
|
||||
|
||||
|
|
@ -13,7 +17,7 @@ $sql_recent_logins = mysqli_query($mysqli,"SELECT * FROM logs
|
|||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
<h5 class="text-secondary">User Details</h5>
|
||||
|
||||
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
|
||||
|
|
@ -69,8 +73,36 @@ $sql_recent_logins = mysqli_query($mysqli,"SELECT * FROM logs
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<h5 class="text-secondary">Recent Logins</h5>
|
||||
<div class="col-md-4">
|
||||
<h5 class="text-secondary mb-4">Recent Logs</h5>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql_recent_logs)){
|
||||
$log_id = $row['log_id'];
|
||||
$log_type = $row['log_type'];
|
||||
$log_action = $row['log_action'];
|
||||
$log_description = $row['log_description'];
|
||||
$log_created_at = $row['log_created_at'];
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><i class="fa fa-fw fa-pencil-alt text-secondary"></i> <?php echo $log_type; ?></td>
|
||||
<td><?php echo $log_action; ?></td>
|
||||
<td><i class="fa fa-fw fa-clock text-secondary"></i> <?php echo $log_created_at; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5">
|
||||
<h5 class="text-secondary mb-4">Recent Logins</h5>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
|
|
|
|||
21
ticket.php
21
ticket.php
|
|
@ -60,6 +60,9 @@ if(isset($_GET['ticket_id'])){
|
|||
<li class="breadcrumb-item">
|
||||
<a href="tickets.php">Tickets</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item">
|
||||
<a href="client.php?client_id=<?php echo $client_id; ?>&tab=tickets"><?php echo $client_name; ?></a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">Ticket Details</li>
|
||||
</ol>
|
||||
<div class="row">
|
||||
|
|
@ -132,26 +135,26 @@ if(isset($_GET['ticket_id'])){
|
|||
<div class="form-group">
|
||||
<textarea rows="5" class="form-control" name="ticket_update"></textarea>
|
||||
</div>
|
||||
<button type="submit" name="add_ticket_update" class="btn btn-primary">Save</button>
|
||||
<button type="submit" name="close_ticket" class="btn btn-secondary">Close Ticket</button>
|
||||
<button type="submit" name="add_ticket_update" class="btn btn-primary"><i class="fa fa-fw fa-check"></i> Save</button>
|
||||
<button type="submit" name="close_ticket" class="btn btn-secondary float-right">Close Ticket</button>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM ticket_updates WHERE ticket_id = $ticket_id");
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM ticket_updates WHERE ticket_id = $ticket_id ORDER BY ticket_update_id DESC");
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){;
|
||||
$ticket_update_id = $row['ticket_update_id'];
|
||||
$ticket_update = $row['ticket_update'];
|
||||
$ticket_update_created_at = $row['ticket_update_created_at'];
|
||||
$user_id = $row['user_id'];
|
||||
$ticket_update_id = $row['ticket_update_id'];
|
||||
$ticket_update = $row['ticket_update'];
|
||||
$ticket_update_created_at = $row['ticket_update_created_at'];
|
||||
$user_id = $row['user_id'];
|
||||
|
||||
?>
|
||||
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<p class="blockquote"><?php echo $ticket_update; ?></p>
|
||||
<p><?php echo $ticket_update; ?></p>
|
||||
</div>
|
||||
<div class="card-footer"><?php echo $ticket_update_created_at - $user_id; ?></div>
|
||||
<div class="card-footer"><i class="fa fa-fw fa-clock"></i> <?php echo $ticket_update_created_at; ?></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
|
||||
<tr>
|
||||
<td><a href="ticket.php?ticket_id=<?php echo $ticket_id; ?>"><span class="badge badge-pill badge-secondary p-3"><?php echo $ticket_id; ?></span></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>"><?php echo $client_name; ?></a></td>
|
||||
<td><a href="client.php?client_id=<?php echo $client_id; ?>&tab=tickets"><?php echo $client_name; ?></a></td>
|
||||
<td><?php echo $ticket_subject; ?></td>
|
||||
<td><?php echo $ticket_created_at; ?></td>
|
||||
<td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue