mirror of https://github.com/itflow-org/itflow
added client_recurring listing
This commit is contained in:
parent
d48ff8232d
commit
974bec2f17
|
|
@ -110,6 +110,7 @@ if(isset($_GET['client_id'])){
|
|||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientDomainModal">New Domain</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientApplicationModal">New Application</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientInvoiceModal">New Invoice</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addRecurringInvoiceModal">New Recurring</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addQuoteModal">New Quote</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientAttachmentModal">New Attachment</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addClientNoteModal">New Note</a>
|
||||
|
|
|
|||
|
|
@ -81,6 +81,15 @@
|
|||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if($num_recurring > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=recurring">
|
||||
<i class="fa fa-copy"></i><br>
|
||||
Recurring<br>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $num_recurring; ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if($num_quotes > 0){ ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="?client_id=<?php echo $client_id; ?>&tab=quotes">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli,"SELECT * FROM recurring_invoices, invoices
|
||||
WHERE invoices.invoice_id = recurring_invoices.invoice_id
|
||||
AND invoices.client_id = $client_id
|
||||
ORDER BY recurring_invoices.recurring_invoice_id DESC");
|
||||
?>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-borderless table-hover" id="dT" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Frequency</th>
|
||||
<th>Start Date</th>
|
||||
<th>Last Sent</th>
|
||||
<th>Next Date</th>
|
||||
<th>Status</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$recurring_invoice_id = $row['recurring_invoice_id'];
|
||||
$recurring_invoice_frequency = $row['recurring_invoice_frequency'];
|
||||
$recurring_invoice_status = $row['recurring_invoice_status'];
|
||||
$recurring_invoice_start_date = $row['recurring_invoice_start_date'];
|
||||
$recurring_invoice_last_sent = $row['recurring_invoice_last_sent'];
|
||||
$recurring_invoice_next_date = $row['recurring_invoice_next_date'];
|
||||
$invoice_id = $row['invoice_id'];
|
||||
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $recurring_invoice_frequency; ?></td>
|
||||
<td><?php echo $recurring_invoice_start_date; ?></td>
|
||||
<td><?php echo $recurring_invoice_last_sent; ?></td>
|
||||
<td><?php echo $recurring_invoice_next_date; ?></td>
|
||||
<td><?php echo $recurring_invoice_status; ?></td>
|
||||
<td>
|
||||
<div class="dropdown dropleft text-center">
|
||||
<button class="btn btn-secondary btn-sm" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" href="recurring_invoice.php?recurring_invoice_id=<?php echo $recurring_invoice_id; ?>">Edit</a>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#addinvoiceCopyModal<?php echo $invoice_id; ?>">Disable</a>
|
||||
<a class="dropdown-item" href="post.php?delete_invoice=<?php echo $invoice_id; ?>">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
//include("edit_invoice_modal.php");
|
||||
include("add_invoice_copy_modal.php");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -28,6 +28,9 @@ if(isset($_GET['tab'])){
|
|||
elseif($_GET['tab'] == "invoices"){
|
||||
include("client_invoices.php");
|
||||
}
|
||||
elseif($_GET['tab'] == "recurring"){
|
||||
include("client_recurring.php");
|
||||
}
|
||||
elseif($_GET['tab'] == "payments"){
|
||||
include("client_payments.php");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue