Forums / General Questions / Can I have secondary invoice number based on date? YYYYMMDDxxxx

Can I have secondary invoice number based on date? YYYYMMDDxxxx

Started by gsmsalers on 6 Oct 2013, 12:36 AM · Views: 789

Results 1 to 5 of 5
6 Oct 2013, 12:36 AM
#1
gsmsalers avatar

gsmsalers

New Zenner

Join Date:
Feb 2009
Posts:
71
Plugin Contributions:
0

Can I have secondary invoice number based on date? YYYYMMDDxxxx

Hi.
I need secondary invoice number beside of primary unique invoice number? It should be based on date of invoice. YYYYMMDDxxxx
Is it possible? I can add new field to invoice table and display to screen. But I can't figure out xxxx (1,2,3,4...) auto increase every time customer place an order.
Thank you.

7 Oct 2013, 6:41 AM
#2
gsmsalers avatar

gsmsalers

New Zenner

Join Date:
Feb 2009
Posts:
71
Plugin Contributions:
0

Re: Can I have secondary invoice number based on date? YYYYMMDDxxxx

No one can answer this?

7 Oct 2013, 4:23 PM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,735
Plugin Contributions:
56

Re: Can I have secondary invoice number based on date? YYYYMMDDxxxx

Why not just use the invoice number as xxxx?

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

9 Oct 2013, 5:42 AM
#4
gsmsalers avatar

gsmsalers

New Zenner

Join Date:
Feb 2009
Posts:
71
Plugin Contributions:
0

Re: Can I have secondary invoice number based on date? YYYYMMDDxxxx

I need solution, please don't spam.

swguy:

Why not just use the invoice number as xxxx?

9 Oct 2013, 6:00 AM
#5
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

Re: Can I have secondary invoice number based on date? YYYYMMDDxxxx

gsmsalers:

I need solution, please don't spam.And you NEED to read the replies before come out with #$%*^% like that :ohmy:

swguy is very well respected and very helpful on this site.

He suggested a perfectly reasonable and relatively easy solution to the question you asked.
Use the YYYYMMDD as you suggested then append the zen-cart allocated inv number.
So if the allocated Invoice number is 5432
Then your new secondary INV number would be 20131009 + 5432
ie: 201310095432