Zen Cart Logo

invoice number

Locked

Views: 2,670

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
9 Apr 2009, 6:36 PM
#1
achraf avatar

achraf

New Zenner

Join Date:
Apr 2008
Posts:
3
Plugin Contributions:
0

invoice number

Hi all :
on my shop runing on 1.38 everything is going well butnow i have a small problem reguarding invoices . My fiscal conultent asked to to change the invoices number because of italian law ... on invoices here it must be relative as a year .. for example order 1 on 2009 must be 1/2009 or 1-2009 or 1.2009 or 1(2009) . for now i remake alla invoices manually but it might be a way to change the counter and rest it every year ? so how to make to invoice numer different from order number. or how to make another counter for invoices that don't depend on order number .

Thank you all any help is very apreciated ..

9 Apr 2009, 7:16 PM
#2
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: invoice number

It's easy to modify the order number shown on the invoice so that it includes the year of the order.
For example, if you have order number xyz, ordered in 2008 and want to display it on the invoice as Invoice No. xyz-2008 you can edit the file admin/invoices.php...
find this line of code at about line 141:

    <td class="main"><b><?php echo ENTRY_ORDER_ID . $oID; ?></b></td>

and replace it with this:

    <td class="main"><b><?php echo ENTRY_ORDER_ID . $oID . '-' . date(Y,strtotime($order->info['date_purchased'])) ; ?></b></td>

Then all your invoice numbers will include the year of the order, without ever having to update anything manually.

9 Apr 2009, 8:04 PM
#3
achraf avatar

achraf

New Zenner

Join Date:
Apr 2008
Posts:
3
Plugin Contributions:
0

Re: invoice number

yes but now that i have about 33 orders ' i need to rest shop ' ?

9 Apr 2009, 8:07 PM
#4
achraf avatar

achraf

New Zenner

Join Date:
Apr 2008
Posts:
3
Plugin Contributions:
0

Re: invoice number

as i mean i saw that after 33 order ... but i want to remake everything normaly that it will start since 34/2009