From ced5ca4e2e11f9cca381c70513a8f2db8e1134d8 Mon Sep 17 00:00:00 2001 From: jekkos Date: Tue, 17 Mar 2015 18:05:43 +0100 Subject: [PATCH] Make invoice numbers more consistent --- application/controllers/sales.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controllers/sales.php b/application/controllers/sales.php index 1e1df5b7d..6783e3532 100644 --- a/application/controllers/sales.php +++ b/application/controllers/sales.php @@ -355,8 +355,8 @@ class Sales extends Secure_area $filename = $this->_invoice_email_pdf($data); $this->email->attach($filename); $text = $this->config->item('invoice_email_message'); - $text = str_replace('$INV', $sale_data['invoice_number'], $text); - $text = str_replace('$CO', $sale_data['sale_id'], $text); + $text = str_replace('$INV', $invoice_number, $text); + $text = str_replace('$CO', $data['sale_id'], $text); $text = $this->_substitute_customer($text, $cust_info); $this->email->message($text); } @@ -407,7 +407,7 @@ class Sales extends Secure_area $sale_data = $this->_load_sale_data($sale_id); $text = $this->config->item('invoice_email_message'); $text = str_replace('$INV', $sale_data['invoice_number'], $text); - $text = str_replace('$CO', $sale_data['sale_id'], $text); + $text = str_replace('$CO', 'POS ' . $sale_data['sale_id'], $text); $text = $this->_substitute_customer($text,(object) $sale_data); $result = FALSE; $message = $this->lang->line('sales_invoice_no_email');