foxnetwork Posted May 20, 2011 Share Posted May 20, 2011 I have been trying to change starting invoice number in BO under orders but it still wants to stay at the same number.Delivery slips works but not the new invoice number. Still stuck on 2 instead of starting point of 500.Is there some where I can do this directly in the databaseThanks Link to comment Share on other sites More sharing options...
Dreamtheme Posted May 22, 2011 Share Posted May 22, 2011 yes go to your phpmyadmin, find the exact table for invoices and change auto increment number to your preference. Link to comment Share on other sites More sharing options...
foxnetwork Posted June 2, 2011 Author Share Posted June 2, 2011 I have looked in mysql and cannot find where to change it. There is no invoices databaseHelp on this needed urgently Link to comment Share on other sites More sharing options...
Dreamtheme Posted June 2, 2011 Share Posted June 2, 2011 Ofc there is an DB in the configuration table, however i saw that there is option for that in the back office too. See the attached screenshot and fill the field Invoice number as you like.to do it from the phpmyadmin, go to ps_configuration and find invoice number and change the value to the desired one. see the second screenshot. 2 Link to comment Share on other sites More sharing options...
foxnetwork Posted June 2, 2011 Author Share Posted June 2, 2011 I tried the change of invoice number in BO but it will not change it stays the same. I looked in the ps_configuration and I have only what is in the image attached. tried to change invoice start number from 4 to 550 but in BO it still says next invoice 6Mayby this is why the BO invoice change doesnt work Link to comment Share on other sites More sharing options...
Dreamtheme Posted June 2, 2011 Share Posted June 2, 2011 The change will be valid from the invoices created after the change. This won't change the number of the old invoices. If you want to change the number of the old invoices, you will have to look in the DB and browse your DB invoices and change the number of every invoice. Link to comment Share on other sites More sharing options...
foxnetwork Posted June 2, 2011 Author Share Posted June 2, 2011 Never attached the image last time. Here it is. Also I am not worried about the old invoice but after changing the number . I tried again and it gave me invoice of 6 not the number i put in 1 Link to comment Share on other sites More sharing options...
Dreamtheme Posted June 2, 2011 Share Posted June 2, 2011 Where did you see this number 6? Link to comment Share on other sites More sharing options...
foxnetwork Posted June 2, 2011 Author Share Posted June 2, 2011 this is the invoice number that shows up in BO under the chage invoice number.I went through the database and id 37 PS_INVOICE_NUMBER was missing so I added it and changed the number but still nothing still shows next invoice as no 6. If I create another sale the invoice goes to 7 so somewhere it is changing it but where. USing ps1.4.2 Link to comment Share on other sites More sharing options...
Dreamtheme Posted June 2, 2011 Share Posted June 2, 2011 Yes you are right, i test it on clean install 1.4.2.5 presta and Back Office start number don't work. i looked at AdminInvoices.php and it seems that script is calling missing database "PS_INVOICE_START_NUMBER", i had only "PS_INVOICE_NUMBER" and i'm not sure where should start number table must be. I suggest to submit a bug in presta forge. Link to comment Share on other sites More sharing options...
Dreamtheme Posted June 2, 2011 Share Posted June 2, 2011 I have submitted bug. Also i have renamed 'PS_INVOICE_NUMBER to PS_INVOICE_START_NUMBER but it didn't work. The code in the AdminInvoices is if ((int)(Tools::getValue('PS_INVOICE_START_NUMBER')) != 0 AND (int)(Tools::getValue('PS_INVOICE_START_NUMBER')) <= Order::getLastInvoiceNumber()) $this->_errors[] = $this->l('Invalid invoice number (must be > ').Order::getLastInvoiceNumber() .')'; Link to comment Share on other sites More sharing options...
foxnetwork Posted June 2, 2011 Author Share Posted June 2, 2011 Ok I think I fixed itYou have to change PS_INVOICE_START_NUMBER or even ad this to ps_configuration if it isnt already there.Mine was but it had ps_INVOICE_START_NUMBER instead of PS_INVOICE_START_NUMBERChanged this and went back to backoffice and invoice now changesThanks for your help 1 Link to comment Share on other sites More sharing options...
Dreamtheme Posted June 2, 2011 Share Posted June 2, 2011 Nice i'm glad you fix it Link to comment Share on other sites More sharing options...
istox Posted June 25, 2011 Share Posted June 25, 2011 I changed the Invoice number in PS_INVOICE_START_NUMBER But when I will order. The order will be with right invoice for example I changed PS_INVOICE_START_NUMBER for 10Next order will be with invoice number 10.But after next order again some kind of other digits... Link to comment Share on other sites More sharing options...
ihackpro Posted July 4, 2011 Share Posted July 4, 2011 Ok I think I fixed itYou have to change PS_INVOICE_START_NUMBER or even ad this to ps_configuration if it isnt already there.Mine was but it had ps_INVOICE_START_NUMBER instead of PS_INVOICE_START_NUMBERChanged this and went back to backoffice and invoice now changesThanks for your help Hi, I've checked and I do have the PS_INVOICE_START_NUMBER, changed the number value, then the next order was processed well, but then again back to number 0, so it doen't work for me.do i have to change any code anywhere?thanks Link to comment Share on other sites More sharing options...
ihackpro Posted July 5, 2011 Share Posted July 5, 2011 any help is welcome Link to comment Share on other sites More sharing options...
Dreamtheme Posted July 5, 2011 Share Posted July 5, 2011 see http://forge.prestashop.com/browse/PSCFI-2125 Link to comment Share on other sites More sharing options...
ihackpro Posted July 5, 2011 Share Posted July 5, 2011 see http://forge.prestashop.com/browse/PSCFI-2125 Hi, thanks for replying.Yeah, I saw that post before but haven't found the solution there.I do have the PS_INVOICE_START_NUMBER field in the ps_configuration table but the number doesn't increase when having a new order, and changing the "state" of the order gives a numer like: CU000000, the CU is the prefix and the zeros is the number it gives to the invoice.The order also shows that was created: 0000-00-00 00:00:00 , so it's an error also.Does it happen also with version 1.4.3?thanks Link to comment Share on other sites More sharing options...
Dreamtheme Posted July 5, 2011 Share Posted July 5, 2011 yes it happens in 1.4.3 too, there is no official solution for now. Link to comment Share on other sites More sharing options...
johnk12 Posted August 25, 2011 Share Posted August 25, 2011 Ofc there is an DB in the configuration table, however i saw that there is option for that in the back office too. See the attached screenshot and fill the field Invoice number as you like.<br/><br/>to do it from the phpmyadmin, go to ps_configuration and find invoice number and change the value to the desired one. see the second screenshot. Thanks Dreamtheme! Link to comment Share on other sites More sharing options...
makethisworkout Posted February 1, 2012 Share Posted February 1, 2012 hi guys - sorry for being a bit thick here but i cant find the table you described on invoices - could you direct me to it please? (ive scoured the whole site) - thanks Jon Link to comment Share on other sites More sharing options...
karapa Posted June 23, 2013 Share Posted June 23, 2013 I met this issue on PS 1.5.4 and my solution was to delete PS_INVOICE_START_NUMBER from table ps_configuration because this was there two times. 1 Link to comment Share on other sites More sharing options...
KevinNash Posted July 17, 2013 Share Posted July 17, 2013 Thanks karapa, I had the same bug on 1.5.4 Link to comment Share on other sites More sharing options...
jetx Posted May 21, 2014 Share Posted May 21, 2014 Ok I think I fixed it You have to change PS_INVOICE_START_NUMBER or even ad this to ps_configuration if it isnt already there. Mine was but it had ps_INVOICE_START_NUMBER instead of PS_INVOICE_START_NUMBER Changed this and went back to backoffice and invoice now changes Thanks for your help Interesting this occurs in 1.6 also. Fixed it by using this method. There are two INVOICE_START_NUMBER tables in the db, why? A bug I expect. Link to comment Share on other sites More sharing options...
jvbferrer Posted September 12, 2014 Share Posted September 12, 2014 I can't believe this bug is still present in 1.6. I have the very last version and I was getting CRAZY trying to fix this problem. I'll try the solution given in the above posts, hope it works. Thank you to everyone. Link to comment Share on other sites More sharing options...
Wasabi-1971 Posted November 15, 2014 Share Posted November 15, 2014 Here with PS 1.6.0.9 same issue....Invoice number after changed on BO don't work and PDF Invoice still using "old" number... Any solution ?!? Link to comment Share on other sites More sharing options...
Klausandre Posted January 7, 2015 Share Posted January 7, 2015 I met this issue on PS 1.5.4 and my solution was to delete PS_INVOICE_START_NUMBER from table ps_configuration because this was there two times. I thought that was an error too but It seem to relate with multistore function: it would have 2 tables, one for each store. I solved this error changing the Id_shop number for 1 (in my case) instead "null" in one of the PS_INVOICE_START_NUMBER Cheers! Link to comment Share on other sites More sharing options...
fatum Posted January 7, 2016 Share Posted January 7, 2016 (edited) This solution works well! (1.5.6.2)Go to your "ps_configuration" table, search for "PS_INVOICE_START_NUMBER" and change the value ;-) Edited January 7, 2016 by fatum (see edit history) Link to comment Share on other sites More sharing options...
cvikenzi Posted October 14, 2016 Share Posted October 14, 2016 Hello, for change invoice numbers you can you this module: http://addons.prestashop.com/en/24429-orders-management-pro-edit-orders-and-custom-numbers.html With this module you can also set custom number for invoices and all other documents and update existing orders. Link to comment Share on other sites More sharing options...
softhightech Posted July 27, 2017 Share Posted July 27, 2017 How to get invoice number based on invoice number? 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