Got rid of the due date and used client_net_terms if not used use the system default net terms

This commit is contained in:
root
2019-05-18 20:49:30 -04:00
parent 857a298588
commit 65c961986c
13 changed files with 41 additions and 38 deletions

View File

@@ -21,6 +21,9 @@ if(isset($_GET['client_id'])){
}
$client_website = $row['client_website'];
$client_net_terms = $row['client_net_terms'];
if($client_net_terms == 0){
$client_net_terms = $config_default_net_terms;
}
//Add up all the payments for the invoice and get the total amount paid to the invoice
$sql_invoice_amounts = mysqli_query($mysqli,"SELECT SUM(invoice_amount) AS invoice_amounts FROM invoices WHERE client_id = $client_id AND invoice_status NOT LIKE 'Draft' AND invoice_status NOT LIKE 'Cancelled'");
@@ -122,6 +125,10 @@ if(isset($_GET['client_id'])){
<h6 class="ml-1">Paid <div class="text-secondary float-right">$<?php echo number_format($amount_paid,2); ?></div></h6>
<h6 class="ml-1">Balance <div class="text-secondary float-right">$<?php echo number_format($balance,2); ?></div></h6>
</div>
<div class="col border-left">
<h4 class="text-secondary">Net Terms</h4>
<h6 class="ml-1"><?php echo $client_net_terms; ?> <small class="text-secondary">Days</small></h6>
</div>
<div class="col border-left">
<div class="dropdown dropleft text-center">
<button class="btn btn-dark btn-sm float-right" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">