Inform-All Posted January 2, 2014 Share Posted January 2, 2014 Hi, I want to change my invoice number to 14001 so it starts with the new year.. But in my BO it doesent work. I've manually changed the last invoice to 14001 but the next invoice goes back to 1413 again. Makes no sense right? I've run the query: SELECT MAX( `invoice_number` ) AS `invoice_number` FROM ps_orders and as result 14001. Any help would be more then welcome.(using prestashop 1.5.4.0) Link to comment Share on other sites More sharing options...
tuk66 Posted January 2, 2014 Share Posted January 2, 2014 Did you get the "Invalid invoice number." message? If the last existed number is 14001 you need to set at least 14002. Link to comment Share on other sites More sharing options...
Inform-All Posted January 2, 2014 Author Share Posted January 2, 2014 Did you get the "Invalid invoice number." message? If the last existed number is 14001 you need to set at least 14002. Nope. it saves the settings correctly but it just doesent work. (and I've cleared cookies + cache) Link to comment Share on other sites More sharing options...
tuk66 Posted January 2, 2014 Share Posted January 2, 2014 Search for name = PS_INVOICE_NUMBER in the ps_configuration table. What is there? Link to comment Share on other sites More sharing options...
Inform-All Posted January 2, 2014 Author Share Posted January 2, 2014 (edited) Search for name = PS_INVOICE_NUMBER in the ps_configuration table. What is there? id_configuration 41 id_shop_group id_shop name PC_INVOICE_NUMBER Value 1 date_add 0000-00-00 00:00:00 date_upd 0000-00-00 00:00:00 Edited January 2, 2014 by Bolinga (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted January 2, 2014 Share Posted January 2, 2014 Something went wrong. You can manually set Value to 14001 and than it should work. Link to comment Share on other sites More sharing options...
Inform-All Posted January 2, 2014 Author Share Posted January 2, 2014 That's the problem.. If I set the number manually it's oke. But the next one doesent work, it doesent continou from the last one I just manually changed. It's really strange, i've found multiple forum items about this and tried them all. ( even italian and french forums ) but nothing Link to comment Share on other sites More sharing options...
tuk66 Posted January 2, 2014 Share Posted January 2, 2014 There are 2 functions in the /classes/order/Order.php file - getLastInvoiceNumber and setInvoice. Here try to find an answer. Link to comment Share on other sites More sharing options...
Inform-All Posted January 2, 2014 Author Share Posted January 2, 2014 Oké found it!Rather strange, but... my ps_order_invoice had a maximum of 4 digits! It makes no sense ofcourse! No error message just not able to update any invoice number with 5 digits ofcourse! Thanks for the tips tuk66 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