diff --git a/templates/fatture/footer.php b/templates/fatture/footer.php index 7a401f2a2..4c65625fe 100755 --- a/templates/fatture/footer.php +++ b/templates/fatture/footer.php @@ -70,7 +70,7 @@ echo " '; // Elenco scadenze -$rs2 = $dbo->fetchArray('SELECT * FROM co_scadenziario WHERE iddocumento='.prepare($id_record).' ORDER BY `data_emissione` ASC'); +$rs2 = $dbo->fetchArray('SELECT * FROM co_scadenziario WHERE iddocumento='.prepare($id_record).' ORDER BY `scadenza` ASC'); if (!empty($rs2)) { for ($i = 0; $i < sizeof($rs2); ++$i) { echo "