Portal-related updates

- Bug fix contact password setting
- Add invoice guest view link to invoices portal page
- Billing contacts now have access to invoices on the portal
- Technical contacts now have access to all tickets
- General housekeeping/tidying
This commit is contained in:
Marcus Hill
2023-02-04 15:28:39 +00:00
parent 04070ff67a
commit 7f02464b92
15 changed files with 929 additions and 859 deletions

View File

@@ -1,4 +1,6 @@
<?php include("guest_header.php");
<?php
require_once("guest_header.php");
if (isset($_GET['invoice_id'], $_GET['url_key'])) {
@@ -71,6 +73,8 @@ if (isset($_GET['invoice_id'], $_GET['url_key'])) {
$os = strip_tags(mysqli_real_escape_string($mysqli,getOS($session_user_agent)));
$browser = strip_tags(mysqli_real_escape_string($mysqli,getWebBrowser($session_user_agent)));
$invoice_tally_total = 0; // Default
//Set Badge color based off of invoice status
if ($invoice_status == "Sent") {
$invoice_badge_color = "warning text-white";
@@ -108,6 +112,7 @@ if (isset($_GET['invoice_id'], $_GET['url_key'])) {
$balance = $invoice_amount - $amount_paid;
//check to see if overdue
$invoice_color = $invoice_badge_color; // Default
if ($invoice_status !== "Paid" && $invoice_status !== "Draft" && $invoice_status !== "Cancelled") {
$unixtime_invoice_due = strtotime($invoice_due) + 86400;
if ($unixtime_invoice_due < time()) {