azzerare contatore fatture

Phoca Cart - complex e-commerce extension
lupen666
Phoca Member
Phoca Member
Posts: 25
Joined: 24 Jan 2021, 09:43

azzerare contatore fatture

Post by lupen666 »

buongiorno a tutti vorrei saper come azzerare il contatore delle fatture e riportarlo a zero.
Grazie mille
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: azzerare contatore fatture

Post by Jan »

Hi, it depends on which number do you exactly mean.

There is order number - automatically created in database, such number cannot be changed as it is fully managed by database - database starts to count from 0 when the table is truncated (all data removed)

Or there is invoice number - which will be allways + 1 based on highest number set there. So if all columns for invoice number will be set to zero, next invoice number will be 1

Image

Jan
If you find Phoca extensions useful, please support the project
lupen666
Phoca Member
Phoca Member
Posts: 25
Joined: 24 Jan 2021, 09:43

Re: azzerare contatore fatture

Post by lupen666 »

ciao grazie per la risosta.
avendo fatto dei test il numero della fattura è andato sempre ad incrementarsi, adesso mettendo il sito online volevo azzerare il numero delle fatture iniziando da 0!
cosa devo modificare?
grazie mille
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: azzerare contatore fatture

Post by Jan »

You need to set all the invoice_number_id to zero, because the system is simple:

- it detects the highest invoice number id and adds plus 1 there.
- so you need to set zero for all, so the next number will be 1

This works for invoice not for order number - order number is automatically created by database.

Jan
If you find Phoca extensions useful, please support the project
lupen666
Phoca Member
Phoca Member
Posts: 25
Joined: 24 Jan 2021, 09:43

Re: azzerare contatore fatture

Post by lupen666 »

grazie mille Jan per la risposta mi potresti aiutare passo passo nella procedura? grazie mille
lupen666
Phoca Member
Phoca Member
Posts: 25
Joined: 24 Jan 2021, 09:43

Re: azzerare contatore fatture

Post by lupen666 »

grazie mille Jan per la risposta mi potresti aiutare passo passo nella procedura? grazie mille
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: azzerare contatore fatture

Post by Jan »

Hi, there is no "step by step" procedure.

It depends on what you want to do exactly.
- if reset autoincrement number in database, then you truncate the orders table e.g. in phpMyAdmin
- if to change only invoice numbers in database, then you just edit order tables - the invoice_number_id column - each row set to zero e.g.

Jan
If you find Phoca extensions useful, please support the project
lupen666
Phoca Member
Phoca Member
Posts: 25
Joined: 24 Jan 2021, 09:43

Re: azzerare contatore fatture

Post by lupen666 »

Grazie mille Jan per la risposta io devo azzerare il numero della fattura ma non trovo in phpmyadmin il campo esatto!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: azzerare contatore fatture

Post by Jan »

If you find Phoca extensions useful, please support the project
lupen666
Phoca Member
Phoca Member
Posts: 25
Joined: 24 Jan 2021, 09:43

Re: azzerare contatore fatture

Post by lupen666 »

ho cercato questo campo su phpmyadmin ma non l'ho trovato ecco perchè sto avendo problemi.
grazie mille
Post Reply