Skip to content

Commit

Permalink
Make invoice numbers more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
jekkos committed Mar 17, 2015
1 parent ca2c9a6 commit ced5ca4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/controllers/sales.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ function complete()
$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);
}
Expand Down Expand Up @@ -407,7 +407,7 @@ function send_invoice($sale_id) {
$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');
Expand Down

0 comments on commit ced5ca4

Please sign in to comment.