order by transaction date

master
unknown 2023-01-07 23:28:47 -07:00
parent 864b838b69
commit 6701cf2faa
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ exports.getAll = async function() {
} }
exports.getByYear = async function(taxYear) { exports.getByYear = async function(taxYear) {
const queryResult = await connectionAsync.query('SELECT * FROM Transactions WHERE DeletedDate IS NULL AND TaxYear = ? AND GoodsOrServices = 0;', taxYear); const queryResult = await connectionAsync.query('SELECT * FROM Transactions WHERE DeletedDate IS NULL AND TaxYear = ? AND GoodsOrServices = 0 ORDER BY Date ASC;', taxYear);
const result = []; const result = [];
if (queryResult && queryResult.rows && queryResult.rows.length > 0) { if (queryResult && queryResult.rows && queryResult.rows.length > 0) {
for(var i = 0 ; i < queryResult.rows.length; i++) { for(var i = 0 ; i < queryResult.rows.length; i++) {