Arrangement on the invoice

Hi.
When I have to turn a sales order into an invoice, the products end up in disorder.
I would like them to end up in chronological order.

Do you have any ideas?
Thanks so much

Hey

lines in the invoice are just listed as it has been created,
to obtain what you want, you will be obliged to modify the “order by” clause

the invoice object is loaded in htdocs/compta/facture/class/facture.class.php


on line 1777, you can replace the sql clause with “order by l.description, l.rowid;”

a good way to test this is to activate logs file on Dolibarr & make some tries with phpmyadmin, with the sql command generated with this fetch_lines function

Good continuation

1 Like

Success :slight_smile:
Thanks so much for your help and your time!

Now they are completely in the order I want!