When clicking on a notificaiton on the dropdown instead of dismissing it takes you to the client page if specified otherwise its an empty click, updated some entity_id for notifications in cron.php

This commit is contained in:
johnnyq
2023-03-18 15:36:19 -04:00
parent a9c90a0c6a
commit d05aa0b829
4 changed files with 12 additions and 6 deletions

View File

@@ -95,7 +95,7 @@ mysqli_query($mysqli, "INSERT INTO history SET history_status = '$invoice_status
if ($invoice_status !== 'Paid') {
//$client_name_escaped = sanitizeInput($row['client_name']);
mysqli_query($mysqli, "INSERT INTO notifications SET notification_type = 'Invoice Viewed', notification = 'Invoice $invoice_prefix$invoice_number has been viewed by $client_name_escaped - $ip - $os - $browser', notification_client_id = $client_id");
mysqli_query($mysqli, "INSERT INTO notifications SET notification_type = 'Invoice Viewed', notification = 'Invoice $invoice_prefix$invoice_number has been viewed by $client_name_escaped - $ip - $os - $browser', notification_client_id = $client_id, notification_entity_id = $invoice_id");
}
$sql_payments = mysqli_query($mysqli, "SELECT * FROM payments, accounts WHERE payment_account_id = account_id AND payment_invoice_id = $invoice_id ORDER BY payments.payment_id DESC");