Post by CraDae » Wed Sep 07, 2011 9:50 pm

Hello,

I trust you are all doing well.

I am having a bit of an issue with the invoice numbers.
When I "print invoice" in admin panel, it comes up correctly, e.g. Invoice No.: Inv000001
but when they get an email, the invoice number shows like this; Invoice No.: 1 .

Now I'm sure it wont be hard to fix, I just don't know how ;D

Inv is part of my invoice number, and because of the company type I own in South Africa, I have to use it like this: Inv000001

TIA,
Craig

EDIT:

Anyone, please assist, you could also PM me

Version 1.5.0.1

I have not upgraded
Last edited by CraDae on Wed Sep 07, 2011 10:47 pm, edited 1 time in total.

New member

Posts

Joined
Mon Aug 01, 2011 11:24 pm

Post by uksitebuilder » Wed Sep 07, 2011 11:54 pm

BACKUP first

open: admin/model/sale/order.php

find

Code: Select all

$query = $this->db->query("SELECT MAX(invoice_no) AS invoice_no FROM `" . DB_PREFIX . "order` WHERE invoice_prefix = '" . $this->db->escape($this->config->get('config_invoice_prefix')) . "'");
replace with

Code: Select all

$query = $this->db->query("SELECT MAX(invoice_no) AS invoice_no FROM `" . DB_PREFIX . "order` WHERE invoice_prefix = '" . $this->db->escape($order_info['invoice_prefix']) . "'");
find

Code: Select all

$this->db->query("UPDATE `" . DB_PREFIX . "order` SET invoice_no = '" . (int)$invoice_no . "', invoice_prefix = '" . $this->db->escape($this->config->get('config_invoice_prefix')) . "' WHERE order_id = '" . (int)$order_id . "'");
replace with

Code: Select all

$this->db->query("UPDATE `" . DB_PREFIX . "order` SET invoice_no = '" . (int)$invoice_no . "', invoice_prefix = '" . $this->db->escape($order_info['invoice_prefix']) . "' WHERE order_id = '" . (int)$order_id . "'");
it would be a good idea to upgrade to at least 1.5.0.5

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by CraDae » Sat Sep 10, 2011 5:46 pm

Hey, I changed the code, still nothing.

Admin:
Invoice No.: Inv000003

Email:
Invoice No.: 3

New member

Posts

Joined
Mon Aug 01, 2011 11:24 pm

Post by terrier » Fri Sep 23, 2011 11:34 am

any suggestion for oc1.5.11?

prefer a vqmod to fix this =D

New member

Posts

Joined
Wed Aug 31, 2011 7:05 pm
Who is online

Users browsing this forum: Baidu [Spider] and 279 guests