mirror of https://github.com/itflow-org/itflow
Fix unpaid invoices on client portal but also comment it out until ready for next release
This commit is contained in:
parent
33340b80f9
commit
ed9b99e2f0
|
|
@ -181,7 +181,7 @@ if ($session_contact_primary == 1 || $session_contact_is_billing_contact) { ?>
|
|||
|
||||
<?php if ($balance > 0) { ?>
|
||||
<div class="col-sm-3">
|
||||
<a href="unpaid_invoices.php" class="card">
|
||||
<a href="#unpaid_invoices.php" class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title text-bold text-dark">Account Balance</h3>
|
||||
</div>
|
||||
|
|
@ -218,30 +218,32 @@ if ($session_contact_primary == 1 || $session_contact_is_technical_contact) {
|
|||
|
||||
<?php if (mysqli_num_rows($sql_domains_expiring) > 0) { ?>
|
||||
<div class="col-sm-3">
|
||||
<a href="domains.php" class="card text-dark">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title text-bold">Domains Expiring</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_domains_expiring)) {
|
||||
$domain_id = intval($row['domain_id']);
|
||||
$domain_name = nullable_htmlentities($row['domain_name']);
|
||||
$domain_expire = nullable_htmlentities($row['domain_expire']);
|
||||
$domain_expire_human = timeAgo($row['domain_expire']);
|
||||
|
||||
?>
|
||||
<p class="mb-1">
|
||||
<i class="fa fa-fw fa-globe text-secondary mr-1"></i>
|
||||
Domain: <?php echo $domain_name; ?>
|
||||
<span>-- <?php echo $domain_expire; ?> (<?php echo $domain_expire_human; ?>)</span>
|
||||
</p>
|
||||
<a href="domains.php">
|
||||
<div class="card text-dark">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title text-bold"><i class="fas fa-fw fa-globe mr-2"></i>Domains Expiring</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
while ($row = mysqli_fetch_array($sql_domains_expiring)) {
|
||||
$domain_id = intval($row['domain_id']);
|
||||
$domain_name = nullable_htmlentities($row['domain_name']);
|
||||
$domain_expire = nullable_htmlentities($row['domain_expire']);
|
||||
$domain_expire_human = timeAgo($row['domain_expire']);
|
||||
|
||||
?>
|
||||
<p>
|
||||
<strong><?php echo $domain_name; ?></strong>
|
||||
<br>
|
||||
<small class="text-secondary"><?php echo $domain_expire; ?> (<?php echo $domain_expire_human; ?>)</small>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
|
@ -257,7 +259,7 @@ if ($session_contact_primary == 1 || $session_contact_is_technical_contact) {
|
|||
<div class="col-sm-3">
|
||||
<a href="assets.php" class="card text-dark">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Your Assigned Assets</h3>
|
||||
<h3 class="card-title"><i class="fas fa-fw fa-desktop mr-2"></i>Your Assigned Assets</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table>
|
||||
|
|
@ -271,7 +273,7 @@ if ($session_contact_primary == 1 || $session_contact_is_technical_contact) {
|
|||
|
||||
?>
|
||||
<tr>
|
||||
<td><i class="fa fa-fw fa-desktop text-secondary mr-2"></i><?php if ($asset_uri_client) { ?><a href="<?= $asset_uri_client ?>" target="_blank"><i class='fas fa-external-link-alt mr-2'></i></a><?php } ?><?php echo $asset_name; ?></td>
|
||||
<td><i class=" text-secondary mr-2"></i><?php if ($asset_uri_client) { ?><a href="<?= $asset_uri_client ?>" target="_blank"><i class='fas fa-external-link-alt mr-2'></i></a><?php } ?><?php echo $asset_name; ?></td>
|
||||
<td class="text-secondary">(<?php echo $asset_type; ?>)</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@ if ($session_contact_primary == 0 && !$session_contact_is_billing_contact) {
|
|||
$invoices_sql = mysqli_query($mysqli, "SELECT * FROM invoices WHERE invoice_client_id = $session_client_id AND (invoice_status = 'Viewed' OR invoice_status = 'Sent' OR invoice_status = 'Partial') ORDER BY invoice_date DESC");
|
||||
|
||||
|
||||
// Payment Provider Active Query
|
||||
$sql_payment_provider = mysqli_query($mysqli, "SELECT * FROM payment_providers WHERE payment_provider_active = 1 LIMIT 1;");
|
||||
$row = mysqli_fetch_array($sql_payment_provider);
|
||||
$payment_provider_active = intval($row['payment_provider_active']);
|
||||
|
||||
// Saved Payment Methods
|
||||
$sql_saved_payment_methods = mysqli_query($mysqli, "
|
||||
SELECT * FROM client_saved_payment_methods
|
||||
|
|
@ -48,7 +53,7 @@ $balance = $invoice_amounts - $amount_paid;
|
|||
<h3>Unpaid Invoices</h3>
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<?php if ($config_stripe_enable) { ?>
|
||||
<?php if ($payment_provider_active) { ?>
|
||||
<button type="button" class="btn btn-outline-success dropdown-toggle float-right" data-toggle="dropdown"><i class="fa fa-fw fa-credit-card mr-2"></i>Pay Balance <strong>(<?php echo numfmt_format_currency($currency_format, $balance, $session_company_currency); ?>)</strong></button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="//<?php echo $config_base_url ?>/guest/guest_pay_invoice_stripe.php?invoice_id=<?php echo "$invoice_id&url_key=$invoice_url_key"; ?>">Enter Card Manually</a>
|
||||
|
|
@ -62,11 +67,11 @@ $balance = $invoice_amounts - $amount_paid;
|
|||
$payment_provider_name = nullable_htmlentities($row['payment_provider_name']);
|
||||
?>
|
||||
|
||||
<a class="dropdown-item confirm-link" href="post.php?add_payment_by_provider=<?php echo $saved_payment_provider_id; ?>&invoice_id=<?php echo $invoice_id; ?>&csrf_token=<?php echo $_SESSION['csrf_token']; ?>"><?php echo "$payment_provider_name | $saved_payment_description"; ?></a>
|
||||
<a class="dropdown-item confirm-link" href="post.php?add_payment_by_provider=<?php echo $saved_payment_provider_id; ?>&invoice_id=<?php echo $invoice_id; ?>"><?php echo "$payment_provider_name | $saved_payment_description"; ?></a>
|
||||
<?php }
|
||||
} ?>
|
||||
</div>
|
||||
<?php } // End Payment Provider Enable Check ?>
|
||||
<?php } // End Payment Provider Active Check ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
|
@ -133,11 +138,20 @@ $balance = $invoice_amounts - $amount_paid;
|
|||
<td><?php echo $invoice_date; ?></td>
|
||||
<td class="<?php echo $overdue_color; ?>"><?php echo $invoice_due; ?></td>
|
||||
<td>
|
||||
<?php if ($config_stripe_enable) { ?>
|
||||
<?php if ($payment_provider_active) { ?>
|
||||
<button type="button" class="btn btn-sm btn-outline-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-fw fa-credit-card mr-2"></i>Pay</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="//<?php echo $config_base_url ?>/guest/guest_pay_invoice_stripe.php?invoice_id=<?php echo "$invoice_id&url_key=$invoice_url_key"; ?>">Enter Card Manually</a>
|
||||
|
||||
<?php
|
||||
// Saved Payment Methods
|
||||
$sql_saved_payment_methods = mysqli_query($mysqli, "
|
||||
SELECT * FROM client_saved_payment_methods
|
||||
LEFT JOIN payment_providers
|
||||
ON client_saved_payment_methods.saved_payment_provider_id = payment_providers.payment_provider_id
|
||||
WHERE saved_payment_client_id = $session_client_id
|
||||
AND payment_provider_active = 1;
|
||||
");
|
||||
if (mysqli_num_rows($sql_saved_payment_methods) > 0) { ?>
|
||||
<h6 class="dropdown-header text-left">Pay with a Saved Card</h6>
|
||||
<?php
|
||||
|
|
@ -147,11 +161,11 @@ $balance = $invoice_amounts - $amount_paid;
|
|||
$payment_provider_name = nullable_htmlentities($row['payment_provider_name']);
|
||||
?>
|
||||
|
||||
<a class="dropdown-item confirm-link" href="post.php?add_payment_by_provider=<?php echo $saved_payment_provider_id; ?>&invoice_id=<?php echo $invoice_id; ?>&csrf_token=<?php echo $_SESSION['csrf_token']; ?>"><?php echo "$payment_provider_name | $saved_payment_description"; ?></a>
|
||||
<a class="dropdown-item confirm-link" href="post.php?add_payment_by_provider=<?php echo $saved_payment_provider_id; ?>&invoice_id=<?php echo $invoice_id; ?>"><?php echo "$payment_provider_name | $saved_payment_description"; ?></a>
|
||||
<?php }
|
||||
} ?>
|
||||
</div>
|
||||
<?php } // End Payment Provider Enable Check ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Reference in New Issue