Updated SQL query that fetches invoices by adding the 'ORDER BY' clause
This commit is contained in:
parent
a5199962f3
commit
0817d035a3
@ -473,6 +473,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
$sql .= ' AND type = 2'; // If paying back a credit note, we show all credit notes
|
$sql .= ' AND type = 2'; // If paying back a credit note, we show all credit notes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sort invoices by date and serial number: the older one comes first
|
||||||
|
$sql.=' ORDER BY f.datef ASC, f.facnumber ASC';
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user