order by transaction date
parent
864b838b69
commit
6701cf2faa
|
|
@ -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++) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue