Page 1 of 1

Year At Bill id Invoice

Posted: 29 Jun 2011, 22:29
by mrtsilva
Hi,

Many companies restart the invoice count number at each New Year and I will sugest a way to solve your problems ( like it solve my :) ).

Imagine that at the start of 2011 Year you wish to have invoice numbered by the following
2011XXXXX
The first invoice will be 2011000001, the second 2011000002 and so on.

If you wish to have this to Invoice, Receipt and Delivery Notes you need to make some little changes in the database:

Change the AutoIncrement Start Counter:
ALTER TABLE jos_vm_bills AUTO_INCREMENT = 2011000001;
ALTER TABLE jos_vm_deliveries AUTO_INCREMENT = 2011000001;
ALTER TABLE jos_vm_orders AUTO_INCREMENT = 2011000001;

Change the index order :
jos_vm_deliveries - Change the order Primary Index (vendor_id, delivery_id) to Primary Index ( delivery_id, vendor_id)
jos_vm_bills - Change the order Primary Index (vendor_id, bill_id) to Primary Index (bill_id, vendor_id)

I check several other posts that require something like this. Hope this can help someone.

Bye

Re: Year At Bill id Invoice

Posted: 29 Jun 2011, 23:55
by Jan
Hi, thank you for the guide.

Jan

Re: Year At Bill id Invoice

Posted: 19 Jul 2011, 16:40
by ardase
hi how too this:


Change the index order :
jos_vm_deliveries - Change the order Primary Index (vendor_id, delivery_id) to Primary Index ( delivery_id, vendor_id)
jos_vm_bills - Change the order Primary Index (vendor_id, bill_id) to Primary Index (bill_id, vendor_id)

I check several other posts that require something like this. Hope this can help someone.

i novice :oops:

Howw too change?? any idea

Re: Year At Bill id Invoice

Posted: 21 Jul 2011, 22:07
by Jan
Hi, no experiences with this :-(

Jan

Re: Year At Bill id Invoice

Posted: 08 Aug 2011, 20:01
by mrtsilva
Dear ardose,

You can install something in joomla to help you manage the database, phpMyAdmin or Artadminer or via console.
Then you must run the following sql commands

Code: Select all

ALTER TABLE `jos_vm_deliveries` ADD PRIMARY KEY ( `delivery_id`,`vendor_id`), DROP INDEX `PRIMARY`
ALTER TABLE `jos_vm_bills` ADD PRIMARY KEY ( `bill_id`,`vendor_id`), DROP INDEX `PRIMARY`
Best Regards,
Miguel