A.Hawk Posted March 12, 2015 Share Posted March 12, 2015 Hello to all the Prestashop community, this might be a recurrent topic actually, but those post i found about this issue arent really clear, so i need help to fix this problem. Like you see the image below, thats the problem, i delete the test orders in the platform but the bills are in #15 i need this number become #1 but well i cant manage to do it. Any suggestion? Thx to all community. Link to comment Share on other sites More sharing options...
erouvier29 Posted March 12, 2015 Share Posted March 12, 2015 You also have to empty the database table ps_order_invoice which contains information about the generared bills. This is normally automatically done if you use the PrestaShop cleaner (as a module). Regards 1 Link to comment Share on other sites More sharing options...
A.Hawk Posted March 12, 2015 Author Share Posted March 12, 2015 I already had 4 buys and the Bill Number is #15, so if i empty the database with the PSCleaner ill also lose the count of the orders? Orders and Bills will restart to 0? Link to comment Share on other sites More sharing options...
erouvier29 Posted March 12, 2015 Share Posted March 12, 2015 Yes they will. I thought you were just reinitializing your database, so the cleaner would have been a good idea. If you already have real orders and real invoices in your database, you should delete from the table ps_order_invoice only the lines that correspond to test invoices, but after that the next bill will be #last_real+1 and not #1. If no invoice has been generated for the real orders yet, then you can still truncate the ps_order_invoice table, and next (first) bill will be #1 Link to comment Share on other sites More sharing options...
A.Hawk Posted March 12, 2015 Author Share Posted March 12, 2015 So it only affects Orders and Bills the cleaner?, i dont have issue with that i can recreate the sell with a new user. Thx for the fast answer Link to comment Share on other sites More sharing options...
erouvier29 Posted March 12, 2015 Share Posted March 12, 2015 You're welcome. The cleaner proposes 2 different actions: clean the catalog, and clean the orders + customers. The data that will be removed (without possible rollback) for each of these is detailled in the module page. In your case, cleaning orders + customers will affect "customers, carts, orders, connections, guests, messages, stats...", and also invoices which are not mentionned. If it's not an issue for you... Otherwise, cleaning database "manually" is always possible, but if you miss some data you may face strange things afterward (e.g. from my own experience, a cart rule spontaneously applies to an order...) Link to comment Share on other sites More sharing options...
A.Hawk Posted March 12, 2015 Author Share Posted March 12, 2015 Excellent ill clean the Data Base with the Cleaner, cause we can make fantasy buys to recreate those 4 cause we already gave the items and took the money , so we reset Bills and Orders to 0. Thx. Link to comment Share on other sites More sharing options...
Recommended Posts