diff --git a/post.php b/post.php
index d9f629f2..b6a0fc6f 100644
--- a/post.php
+++ b/post.php
@@ -3785,11 +3785,11 @@ if(isset($_GET['force_recurring'])){
$sql = mysqli_query($mysqli,"SELECT * FROM invoices, clients, companies
WHERE invoices.client_id = clients.client_id
AND invoices.company_id = companies.company_id
- AND invoices.invoice_id = $new_invoice_id
- AND invoices.company_id = $session_company_id"
+ AND invoices.invoice_id = $new_invoice_id"
);
$row = mysqli_fetch_array($sql);
+ $invoice_prefix = $row['invoice_prefix'];
$invoice_number = $row['invoice_number'];
$invoice_scope = $row['invoice_scope'];
$invoice_date = $row['invoice_date'];
@@ -3839,8 +3839,8 @@ if(isset($_GET['force_recurring'])){
// Content
$mail->isHTML(true); // Set email format to HTML
- $mail->Subject = "Invoice $invoice_number";
- $mail->Body = "Hello $client_name,
Please view the details of the invoice below.
Invoice: $invoice_number
Issue Date: $invoice_date
Total: $$invoice_amount
Due Date: $invoice_due
To view your invoice online click here
~
$company_name
$company_phone";
+ $mail->Subject = "Invoice $invoice_prefix$invoice_number";
+ $mail->Body = "Hello $client_name,
Please view the details of the invoice below.
Invoice: $invoice_prefix$invoice_number
Issue Date: $invoice_date
Total: $$invoice_amount
Due Date: $invoice_due
To view your invoice online click here
~
$company_name
$company_phone";
$mail->send();