Post by robynice » Sat Mar 17, 2012 4:29 pm

You know, most operators already has a invoice system so they can't release opencart wrong invoice numbers because are not synchronized to each other. Any clue about that? Thanks.

New member

Posts

Joined
Mon Feb 13, 2012 9:33 am
Location - ITA

Post by allenshea » Sat Mar 17, 2012 4:49 pm

Yeah, back to 1.4, I remember I can change below code to make easy modification.

1. EDIT: admin\model\sale\order.php

Code: Select all

 $this->db->query("UPDATE `" . DB_PREFIX . "order` SET invoice_id = '" . (int)$invoice_id . "', invoice_prefix = '" . $this->db->escape($this->config->get('config_invoice_prefix')) . "', invoice_date = NOW(), date_modified = NOW() WHERE order_id = '" . (int)$order_id . "'");
2. Change to:

Code: Select all

 $this->db->query("UPDATE `" . DB_PREFIX . "order` SET invoice_id = order_id, invoice_prefix = '" . $this->db->escape($this->config->get('config_invoice_prefix')) . "', invoice_date = NOW(), date_modified = NOW() WHERE order_id = '" . (int)$order_id . "'");
But in 1.5, I have to use phpMyAdmin and manually adjust every Invoice ID. Because database already saved invoice_prefix. This is really bad.

I know nothing about PHP and SQL, but I still try my best to understand it.


Active Member

Posts

Joined
Mon Dec 14, 2009 10:01 pm

Post by robynice » Sat Mar 17, 2012 5:03 pm

Hi, thanks for reply, you are welcome. I'am testing the last version of OCv1.5.1.3.

However, the problem is that it's NOT useful to have everytime wrong invoice number because of out of sync. So the question is: is it possible to have a specific text field in OC's admin order section, a number to set/modify manually the right number stuff? Also should be nice to see the last invoice number associated to a order. Now you can't see anything on order list: you can't see if a specific order has it's own invoice released or not (and the last invoice number released too). So it's difficult to manage invoice order numbers.

New member

Posts

Joined
Mon Feb 13, 2012 9:33 am
Location - ITA
Who is online

Users browsing this forum: No registered users and 79 guests