Post by speedingorange » Fri Mar 26, 2010 8:28 pm

Is this now included in the latest release?

Cheers
James

Active Member

Posts

Joined
Tue Feb 23, 2010 7:33 pm

Post by Daniel » Fri Mar 26, 2010 8:31 pm

yes

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by speedingorange » Fri Mar 26, 2010 8:38 pm

Cheers, I better upgrade then.

Active Member

Posts

Joined
Tue Feb 23, 2010 7:33 pm

Post by i2Paq » Fri Mar 26, 2010 10:16 pm

speedingorange wrote:Is this now included in the latest release?

Cheers
James
This is not released yet!

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 Daniel » Sun Mar 28, 2010 1:30 am

i have just finished it. going to release the next version tonight after I get some food.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by i2Paq » Sun Mar 28, 2010 1:45 am

Daniel wrote: after I get some food.
Image

There your go! ;D

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 sonicsam » Fri Jun 25, 2010 5:30 pm

Hi,

Sorry to reopen this thread however I am trying to work out of OpenCart will provide a suitable platform for a client project.

Firstly my client is Italian and so like has been mentioned there are some very specific requirements for invoicing which are -

1. Sequential Numbering with no missing invoice numbers (Canceling an order should not delete a created invoice).
2. Starting from 1 each year (A simple way to do this which we use in WHMCS is to have a "next invoice number" field in admin so we have 2010-01345 and next year we would simply change the next invoice field to 2011-00001).

Can OpenCart support the Italian requirements?

Regards

Sam M
www.servwise.com - Hosting Windows & Linux italia

Newbie

Posts

Joined
Fri Jun 25, 2010 5:18 pm

Post by SteveSherry » Fri Jun 25, 2010 7:22 pm

sonicsam wrote: Can OpenCart support the Italian requirements?
Yes

My Website ¦ Summer Madness Special Offer ¦


Active Member

Posts

Joined
Thu Apr 08, 2010 7:47 am
Location - Wirral, UK

Post by Xsecrets » Fri Jun 25, 2010 7:24 pm

well you can do sequential and you can set the initial start number, but I'm not sure if you can reset it to start over at 1 each year.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by i2Paq » Fri Jun 25, 2010 8:17 pm

Xsecrets wrote:well you can do sequential and you can set the initial start number, but I'm not sure if you can reset it to start over at 1 each year.

You can, by running a query via phpMyAdmin at the beginning of each year.

Thats how i do it with osCommerce and this should work with OpenCart as well.

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 JAY6390 » Fri Jun 25, 2010 11:10 pm

Or just have the current invoice prefix (the year) in a config variable and check it every time an order goes through against date('Y'). If they're not equal, bump it up to the next year, reset the invoice counter and carry on :)

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Maaris » Wed Jul 14, 2010 7:23 am

i2Paq wrote:You can, by running a query via phpMyAdmin at the beginning of each year.
What query it should be? Like setting all invoice id's to "0"??? I think there might be some problems for users when they view order history from account page and when I need to print an old invoice.
Last edited by Maaris on Sat Jul 17, 2010 3:37 am, edited 1 time in total.

New member

Posts

Joined
Sun Jul 11, 2010 2:35 am

Post by Maaris » Sat Jul 17, 2010 3:35 am

Here's a thing that I tried for myself. And it seems to be working.

Modification:

In a file "admin/model/sale/order.php" I found where it says:

Code: Select all

$query = $this->db->query("SELECT MAX(invoice_id) AS invoice_id FROM `" . DB_PREFIX . "order`");
and replaced it with:

Code: Select all

$query = $this->db->query("SELECT MAX(invoice_id) AS invoice_id FROM `" . DB_PREFIX . "order` WHERE invoice_prefix = '" . $this->db->escape($this->config->get('config_invoice_prefix')) . "'");
Effect:
Now you don't need to reset invoice counter when year starts. Just change the Invoice prefix when new year (month or whatever) and the counter will be re-set automatically. And you won't have to lose previously saved invoice numbers to reset counter.

Explanation:
Thing is that originally core file searches in DB for highest invoice number and adds +1. After this modification core file searches for highest invoice number in DB only in rows that use current invoice prefix (set at BackOffice settings). In this way, when you set a prefix that was never used before (like when changing from INV2009 to INV2010 whne a new year starts) invoice id automatically sets to 0+1 = 1

Disclaimer:
Edit this file at your own risk. I am not a coder. Just edited this file for my own shop (which is not even jet launched) and I might not be aware of harm it might cause.

New member

Posts

Joined
Sun Jul 11, 2010 2:35 am
Who is online

Users browsing this forum: No registered users and 103 guests