mehnihma Posted March 13, 2013 Share Posted March 13, 2013 Hi I want to change invoice number to something like IN-ZV-2013-001 where 2013 is the year and restart to zero every year and Year to change to next year. Did any one had this problem and solved it? Thanks Link to comment Share on other sites More sharing options...
mehnihma Posted March 14, 2013 Author Share Posted March 14, 2013 Hi I figured out how to add year, but only in pdf, I cannot see same number in BO If anyone did something similar and wants to share ti? Or posting to this forum has no purpose, asking for help or advice on this forum is like asking a wall Maybe using prestahop was not so good idea Link to comment Share on other sites More sharing options...
tuk66 Posted March 19, 2013 Share Posted March 19, 2013 You can reset invoice number at the beginning of each year in BackOffice and to display year as a part of invoice number from the date of order creation. Link to comment Share on other sites More sharing options...
mehnihma Posted April 8, 2013 Author Share Posted April 8, 2013 You can reset invoice number at the beginning of each year in BackOffice and to display year as a part of invoice number from the date of order creation. Hi when I do that in BO I get error that number has to be greater than current invoice number Where I can do it in BO? Thanks Link to comment Share on other sites More sharing options...
mehnihma Posted April 8, 2013 Author Share Posted April 8, 2013 Also If I change in order/Order.php This: public static function getLastInvoiceNumber() { return Db::getInstance()->getValue(' SELECT MAX(`number`) FROM `'._DB_PREFIX_.'order_invoice` '); } to this: public static function getLastInvoiceNumber() { return Db::getInstance()->getValue(' SELECT COUNT( number ) FROM ps_order_invoice WHERE DATE(date_add) >= "2013-04-1 00:00:00"; '); } That will change to start counting form 1 from april? am I correct? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now