AndriusS Posted November 5, 2013 Share Posted November 5, 2013 Hello! The system that I'm working on includes multiple sources for invoices. Because of that, I cannot make the invoices increment. I have managed to make some edits so I could change the invoice. But I could not yet find how to make a new order not have an invoice number. The searching is pretty abstract and I have no idea how I should go about it Any clues where I could find where the Order is placed to the database for the first time? Thanks! Link to comment Share on other sites More sharing options...
tuk66 Posted November 5, 2013 Share Posted November 5, 2013 The invoice number is stored in the ps_orders table, invoice_number fleld. Anyway, I think it is quite common to have more than one invoice line. Every shop or invoice source can use its own line. Link to comment Share on other sites More sharing options...
AndriusS Posted November 5, 2013 Author Share Posted November 5, 2013 Thanks for the comment! Yeah, I know where the number is stored. But I need to know where it is generated for the first time when the order is first put to the database so I could make it NULL or empty, or anything that's not something relevant and, possibly, causing errors in the shop. Link to comment Share on other sites More sharing options...
tuk66 Posted November 5, 2013 Share Posted November 5, 2013 Do you mean PS_INVOICE_NUMBER or PS_INVOICE in the ps_configuration table? Link to comment Share on other sites More sharing options...
AndriusS Posted November 5, 2013 Author Share Posted November 5, 2013 Uh, not really. I'm thinking of some method that adds "invoice_number" to the order variable that will be put to the database (when user finalizes their cart). Well, and now that you've mentioned some of these variables, I managed to find what I need What I was searching for was the setInvoice() method in Order. I changed from $this->invoice_number = $order_invoice->number; to $this->invoice_number = ""; And my problem is now solved! Thanks Link to comment Share on other sites More sharing options...
PascalVG Posted November 7, 2013 Share Posted November 7, 2013 Thanks Andrius for sharing the solution. I'll mark the topic as solved. pascal Link to comment Share on other sites More sharing options...
ObjetsBois Posted November 13, 2013 Share Posted November 13, 2013 in which file it is ? I did not find (PrestaShop™ 1.4.0.17) My problem : http://www.prestashop.com/forums/topic/150156-commande-napparait-pas-dans-les-stats/ 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