Post by Melanie » Mon Dec 26, 2011 10:25 am

Hi there,

So when an order is placed the invoice number isn't generated automatically unil you press the following tab: [ Create Invoice No. ]

Is there any way to automate this so that it is automatically created when the order is placed?

Is there any reason why it isn't automatically created?

Thanks.

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by Maansy » Tue Dec 27, 2011 1:52 am

Would you like it to generate invoice even if order still pending?
I would like it to auto generate on a completion status.

ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com


User avatar
Active Member

Posts

Joined
Thu Jun 24, 2010 6:04 am


Post by Melanie » Tue Dec 27, 2011 12:40 pm

Yes, as soon as the order is made, as payment is taken right away.

Is there a way of doing this?

Thanks.

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by i2Paq » Tue Dec 27, 2011 3:06 pm

I believe that in 1.5.1.1 or so there was an auto-generate Invoice-number.

It was removed because this is not the way the Invoice-number system should work.

You could download that 1.5.1.1 and adopt the code in your 1.5.1.3

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by tooheys » Tue Jan 24, 2012 2:38 pm

There was a comment in this thread which indicated that the auto generation of invoice numbers would be included in release 1.5.1.2.
http://forum.opencart.com/viewtopic.php ... 4&start=20

Now its 1.5.1.3, is there a reason its not included??

Thanks.

Newbie

Posts

Joined
Mon Nov 21, 2011 1:11 pm

Post by i2Paq » Tue Jan 24, 2012 7:38 pm

tooheys wrote: Now its 1.5.1.3, is there a reason its not included??
yes, the reason is the many different laws in country's across the world.

A manual Generate Invoice button is the only way.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Qphoria » Tue Jan 24, 2012 10:36 pm

I suppose a simple setting in the setting area could be added:

AutoGenerate Invoice YES/NO

AutoGenerate When Status is: Complete/Processing (multiselect)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by straightlight » Wed Jan 25, 2012 1:43 am

Qphoria wrote:I suppose a simple setting in the setting area could be added:

AutoGenerate Invoice YES/NO

AutoGenerate When Status is: Complete/Processing (multiselect)
Done. Under Settings - > Option tab at the bottom.

Attachments

opencart_auto_generate_invoice.PNG

v1.5.1.3 - opencart_auto_generate_invoice.PNG (6.66 KiB) Viewed 3664 times

Last edited by straightlight on Wed Feb 01, 2012 6:23 am, edited 2 times in total.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Melanie » Wed Jan 25, 2012 8:23 am

Hey straightlight!!!

I tried this modification.

HOWEVER, when I try access SALES ---> ORDERS i get an error:

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request.

Also when I try and access an order from the main page of the dashboard I also get an error.

Please advise.

Thanks, Mel

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by straightlight » Wed Jan 25, 2012 10:12 am

In the admin - > systems - > error logs, what does it report regarding this event ?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by jty » Wed Jan 25, 2012 10:44 am

Running it on xammp, my error when trying to access sals > orders or view the order from dashboard is:

Code: Select all

Fatal error: Can't use method return value in write context in C:\test\vqmod\vqcache\vq2-admin_controller_sale_order.php on line 93
I've tracked the offending line to be line 116 in the xml. This line:

Code: Select all

if (isset($this->request->get['order_id']) && !empty($this->request->get['order_id']) && isset($this->config->get('config_generate_invoice') && (int)$this->config->get('config_generate_invoice') == 1 && isset($this->config->get('config_invoice_order_statuses')) && is_array($this->config->get('config_invoice_order_statuses')) && !empty($order_status_ids)) {
If I remove all the coditions except for the first if (isset($this->request->get['order_id']), the error goes away. But then of course, the results aren't right. But at least it shows us where to look.

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by jty » Wed Jan 25, 2012 10:47 am

PS: there's nothing in the admin error log and no vqmod error log

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by straightlight » Wed Jan 25, 2012 10:50 am

But then of course, the results aren't right.
Could you be more specific regarding the aren't right ? What is the result that is producing on your end ?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Wed Jan 25, 2012 11:08 am

I updated the XML file to get rid of the above error.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Melanie » Wed Jan 25, 2012 11:45 am

straightlight wrote:I updated the XML file to get rid of the above error.
Thank you, error has gone now.

Waiting for the next order to see it in action :)

Thanks.

New member

Posts

Joined
Tue Mar 30, 2010 9:39 am

Post by tooheys » Wed Feb 01, 2012 6:01 am

great. how do you implement the xml file?

Newbie

Posts

Joined
Mon Nov 21, 2011 1:11 pm

Post by straightlight » Wed Feb 01, 2012 6:25 am

XML file updated. Thanks to clapiana for reporting a very slight issue in the configuration key. Further evaluation was done regarding the paste over the XML file within the wrong method name from the admin order's controller file. All is working as it should now.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Wed Feb 01, 2012 6:27 am

tooheys wrote:great. how do you implement the xml file?
You must install VQMod and upload the XML file into your vqmod/xml folder. Then, go to your admin - > system - > Settings - > Option and go to the Option tab. Then, at the bottom, you will see the auto-generate invoice options (2 of them). Then, go to the Sales - > Orders - > Order History after selecting a specific order from the order list. Upon the ones you selected from the settings previously, those settings should match accordingly from your order status history and your invoice number should be generated automatically as such and as soon you click on the Add History button.

Then, see your invoice number on the second tab on the left and you should see the generated invoice number.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gpcsnet » Mon Feb 06, 2012 5:46 pm

It's ok, it's working.
But how do I change the number of invoice?
When I use manual where is thi tab [ Create Invoice No. ] ??


Thank you!

Newbie

Posts

Joined
Tue Mar 08, 2011 3:42 am

Post by straightlight » Mon Feb 06, 2012 10:15 pm

The subject title does say automatic does it ? ;)
The Automatic term represents process you don't need to do manually ?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 184 guests