Change invoice number

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
bluesoul
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 23 Mar 2009, 19:01

Change invoice number

Post by bluesoul »

I want to use this really good add-on with my online shop, however I'm concerned that the first invoice will be with number 0001. It doesn't look professional as customers could think that this is my first day of business. Is there a way to change this number in the database?
Thanks
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Change invoice number

Post by Jan »

Hi, the numbers are auto increment numbers, but you can change it e.g. in PDF so you will add before the number som your tags, search this forum, there should be a guide how to do.

Jan
If you find Phoca extensions useful, please support the project
bluesoul
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 23 Mar 2009, 19:01

Re: Change invoice number

Post by bluesoul »

Thanks for your help Jan,

For those interested and to give an idea of how it can be done, I've added 9 (for 2009) at the beginning of my invoice number.
I've added in the english.php file the following line : 'VM_DELIVERY_YEAR' => '9',
and replaced in phoca.tcpdf.php the following line :
$this->Cell(24,5,$hD['dbb']->f('bill_id'),0,0,'C');
by
$this->Cell(24,5,$VM_LANG->_('VM_DELIVERY_YEAR').$hD['dbb']->f('bill_id'),0,0,'C');
If you want to do the same for the delivery number replace in the same file the following line :
$this->Cell(28,5,$hD['d']['delivery_id'],0,0,'C');
by
$this->Cell(28,5,$VM_LANG->_('VM_DELIVERY_YEAR').$hD['d']['delivery_id'],0,0,'C');
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Change invoice number

Post by Jan »

Great, thank you for this information, I hope it will be usable for other users too.

Thank you, Jan
If you find Phoca extensions useful, please support the project
Tobiwankenobi
Phoca Member
Phoca Member
Posts: 10
Joined: 09 Aug 2009, 20:33

Re: Change invoice number

Post by Tobiwankenobi »

I changed the following last entries in the database e.g. first Invoiceno. 100:

Table jos_vm_bills
Field bill_id=99 and delivery_id=99

Table jos_vm_deliveries
Field delivery_id=99

So, the next auto increment no. is of course 100. Hope that helps.

Tobi
Sckubba
Phoca Member
Phoca Member
Posts: 12
Joined: 13 Oct 2011, 03:53

Re: Change invoice number

Post by Sckubba »

bluesoul wrote:Thanks for your help Jan,

For those interested and to give an idea of how it can be done, I've added 9 (for 2009) at the beginning of my invoice number.
I've added in the english.php file the following line : 'VM_DELIVERY_YEAR' => '9',
and replaced in phoca.tcpdf.php the following line :
$this->Cell(24,5,$hD['dbb']->f('bill_id'),0,0,'C');
by
$this->Cell(24,5,$VM_LANG->_('VM_DELIVERY_YEAR').$hD['dbb']->f('bill_id'),0,0,'C');
If you want to do the same for the delivery number replace in the same file the following line :
$this->Cell(28,5,$hD['d']['delivery_id'],0,0,'C');
by
$this->Cell(28,5,$VM_LANG->_('VM_DELIVERY_YEAR').$hD['d']['delivery_id'],0,0,'C');
Hi,
What is the path of the english.php file?

Thks.
Post Reply